SketchAPI_Offset::SketchAPI_Offset (const std::shared_ptr<ModelAPI_Feature> & theFeature,
const std::list<std::shared_ptr<ModelAPI_Object> > & theObjects,
const ModelHighAPI_Double & theOffsetValue,
- bool theIsReversed,
- bool theIsAuxiliary)
+ bool theIsReversed)
: ModelHighAPI_Interface(theFeature)
{
if (initialize()) {
fillAttribute(theObjects, edgesList());
fillAttribute(theOffsetValue, value());
fillAttribute(theIsReversed, reversed());
- fillAttribute(theIsAuxiliary, auxiliary());
execute();
}
std::list<std::shared_ptr<SketchAPI_SketchEntity> > SketchAPI_Offset::offset() const
{
- std::list<ObjectPtr> aList = createdList()->list();
+ std::list<ObjectPtr> aList = feature()->reflist(SketchPlugin_Constraint::ENTITY_B())->list();
std::list<FeaturePtr> anIntermediate;
std::list<ObjectPtr>::const_iterator anIt = aList.begin();
for (; anIt != aList.end(); ++anIt) {
AttributeRefListPtr aOffsetObjects = edgesList();
AttributeDoublePtr aValue = value();
AttributeBooleanPtr aReversed = reversed();
- AttributeBooleanPtr anAux = auxiliary();
// Check all attributes are already dumped. If not, store the feature as postponed.
if (!theDumper.isDumped(aOffsetObjects)) {
}
theDumper << aBase << " = " << aSketchName << ".addOffset(" << aOffsetObjects << ", "
- << aValue << ", " << aReversed << ", " << anAux << ")" << std::endl;
+ << aValue << ", " << aReversed << ")" << std::endl;
// Dump variables for a list of created features
theDumper << "[";
}
theDumper << "] = " << theDumper.name(aBase) << ".offset()" << std::endl;
- // Set necessary "auxiliary" flag for created features
- // (flag is set if it differs to anAux)
- for (anIt = aList.begin(); anIt != aList.end(); ++anIt) {
- FeaturePtr aFeature = (*anIt)->feature();
- bool aFeatAux = aFeature->boolean(SketchPlugin_SketchEntity::AUXILIARY_ID())->value();
- if (aFeatAux != anAux->value())
- theDumper << theDumper.name((*anIt)->feature(), false)
- << ".setAuxiliary(" << aFeatAux << ")" <<std::endl;
- }
+//// // Set necessary "auxiliary" flag for created features
+//// // (flag is set if it differs to anAux)
+//// for (anIt = aList.begin(); anIt != aList.end(); ++anIt) {
+//// FeaturePtr aFeature = (*anIt)->feature();
+//// bool aFeatAux = aFeature->boolean(SketchPlugin_SketchEntity::AUXILIARY_ID())->value();
+//// if (aFeatAux != anAux->value())
+//// theDumper << theDumper.name((*anIt)->feature(), false)
+//// << ".setAuxiliary(" << aFeatAux << ")" <<std::endl;
+//// }
}