}
AddToRefArray(aFeaturesLab, aFeatureLab, aPrevFeateureLab);
- initData(theFeature, aFeatureLab, TAG_FEATURE_ARGUMENTS);
// keep the feature ID to restore document later correctly
TDataStd_Comment::Set(aFeatureLab, theFeature->getKind().c_str());
myFeatures.Bind(aFeatureLab, theFeature);
+ // must be after binding to the map because of "Box" macro feature that
+ // creates other features in "initData"
+ initData(theFeature, aFeatureLab, TAG_FEATURE_ARGUMENTS);
// event: feature is added
static Events_ID anEvent = Events_Loop::eventByName(EVENT_OBJECT_CREATED);
ModelAPI_EventCreator::get()->sendUpdated(theFeature, anEvent);
def __init__ (self, part, sketch, size):
"""Inserts an extrusion of the given Sketch to the given Part and executes the operation."""
self.my = part.addFeature("Extrusion")
+ self.my.string("CreationMethod").setValue("BySizes")
self.my.data().selectionList("base").append(sketch.result(), sketch.buildShape())
if size < 0:
self.my.data().real("from_size").setValue(-size)