FeaturePtr aBase = feature();
const std::string& aDocName = theDumper.name(aBase->document());
+ AttributeReferencePtr anAttrSketch = aBase->reference(FeaturesPlugin_CompositeSketch::SKETCH_ID());
AttributeSelectionListPtr anAttrObjects = aBase->selectionList(FeaturesPlugin_Extrusion::BASE_OBJECTS_ID());
AttributeSelectionPtr anAttrDirection = aBase->selection(FeaturesPlugin_Extrusion::DIRECTION_OBJECT_ID());
- theDumper << aBase << " = model.addExtrusion(" << aDocName << ", " << anAttrObjects << ", " << anAttrDirection;
+ theDumper << aBase << " = model.addExtrusion(" << aDocName << ", ";
+ anAttrSketch->isInitialized() ? theDumper << "[]" : theDumper << anAttrObjects;
+ theDumper << ", " << anAttrDirection;
std::string aCreationMethod = aBase->string(FeaturesPlugin_Extrusion::CREATION_METHOD())->value();
theDumper << ")" << std::endl;
- AttributeReferencePtr anAttrSketch = aBase->reference(FeaturesPlugin_CompositeSketch::SKETCH_ID());
if(anAttrSketch->isInitialized()) {
theDumper << aBase << ".setNestedSketch(" << anAttrSketch << ")";
}
FEATURESAPI_EXPORT
virtual ~FeaturesAPI_Extrusion();
- INTERFACE_11(FeaturesPlugin_Extrusion::ID(),
- sketch, FeaturesPlugin_Extrusion::SKETCH_ID(), ModelAPI_AttributeReference, /** Sketch object */,
+ INTERFACE_10(FeaturesPlugin_Extrusion::ID(),
+ sketch, FeaturesPlugin_Extrusion::SKETCH_ID(), ModelAPI_AttributeReference, /** Sketch launcher */,
baseObjects, FeaturesPlugin_Extrusion::BASE_OBJECTS_ID(), ModelAPI_AttributeSelectionList, /** Base objects */,
+ direction, FeaturesPlugin_Extrusion::DIRECTION_OBJECT_ID(), ModelAPI_AttributeSelection, /** Direction */,
creationMethod, FeaturesPlugin_Extrusion::CREATION_METHOD(), ModelAPI_AttributeString, /** Creation method */,
toSize, FeaturesPlugin_Extrusion::TO_SIZE_ID(), ModelAPI_AttributeDouble, /** To size */,
fromSize, FeaturesPlugin_Extrusion::FROM_SIZE_ID(), ModelAPI_AttributeDouble, /** From size */,
toObject, FeaturesPlugin_Extrusion::TO_OBJECT_ID(), ModelAPI_AttributeSelection, /** To object */,
toOffset, FeaturesPlugin_Extrusion::TO_OFFSET_ID(), ModelAPI_AttributeDouble, /** To offset */,
fromObject, FeaturesPlugin_Extrusion::FROM_OBJECT_ID(), ModelAPI_AttributeSelection, /** From object */,
- fromOffset, FeaturesPlugin_Extrusion::FROM_OFFSET_ID(), ModelAPI_AttributeDouble, /** From offset */,
- direction, FeaturesPlugin_Extrusion::DIRECTION_OBJECT_ID(), ModelAPI_AttributeSelection, /** Direction */,
- sketchLauncher, FeaturesPlugin_Extrusion::SKETCH_ID(), ModelAPI_AttributeReference, /** Sketch launcher */)
+ fromOffset, FeaturesPlugin_Extrusion::FROM_OFFSET_ID(), ModelAPI_AttributeDouble, /** From offset */)
/// Modify base attribute of the feature.
FEATURESAPI_EXPORT