THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 05/06/2010 at 12:53, xxxxxxxx wrote:
i place my object inside a hypernurbs (Osds) to do so, but i think you mean something other. it should be able by using CommandData
here is a snippet of how i used the optimize command on a polygon object.
if (op->GetType()==Opolygon)
{
ModelingCommandData cd;
cd.doc = doc;
cd.op = op;
BaseContainer bc;
bc.SetReal(MDATA_OPTIMIZE_TOLERANCE, tolerance);
bc.SetReal(MDATA_OPTIMIZE_POINTS, TRUE);
bc.SetReal(MDATA_OPTIMIZE_POLYGONS, TRUE);
bc.SetReal(MDATA_OPTIMIZE_UNUSEDPOINTS, TRUE);
cd.bc = &bc;
if(SendModelingCommand(MCOMMAND_OPTIMIZE, cd))
{
cd.op->Message(MSG_UPDATE, NULL);
BaseTag *phongTag = op->MakeTag(Tphong);
BaseContainer *bc = phongTag->GetDataInstance();
bc->SetBool(PHONGTAG_PHONG_ANGLELIMIT,TRUE);
bc->SetReal(PHONGTAG_PHONG_ANGLE,ToRad(winkel));
} else {
GePrint("failed");
}
}
hope this makes sense :)
edit: in your case it'd be the MCOMMAND_SUBDIVIDE .. check the sdk for its parameters...