Update errors in unit tests.
SketchConstraintCoincidence_6 = Sketch_1.setCoincident(SketchArc_1.startPoint(), SketchArc_3.startPoint())
SketchMultiRotation_1_objects = [SketchArc_1.results()[1], SketchLine_2.result(), SketchLine_4.result(), SketchArc_2.results()[1]]
SketchMultiRotation_1 = Sketch_1.addRotation(SketchMultiRotation_1_objects, SketchAPI_Line(SketchLine_1).startPoint(), 360, "nb", True)
-[SketchArc_4, SketchArc_5, SketchArc_6, SketchArc_7, SketchArc_8, SketchArc_9, SketchArc_10, SketchLine_5, SketchLine_6, SketchLine_7, SketchLine_8, SketchLine_9, SketchLine_10, SketchLine_11, SketchLine_4, SketchLine_12, SketchLine_13, SketchLine_14, SketchLine_15, SketchLine_16, SketchLine_17, SketchLine_18, SketchArc_2, SketchArc_11, SketchArc_12, SketchArc_13, SketchArc_14, SketchArc_15, SketchArc_16, SketchArc_17] = SketchMultiRotation_1.rotated()
+[SketchArc_4, SketchArc_5, SketchArc_6, SketchArc_7, SketchArc_8, SketchArc_9, SketchArc_10, SketchLine_5, SketchLine_6, SketchLine_7, SketchLine_8, SketchLine_9, SketchLine_10, SketchLine_11, SketchLine_12, SketchLine_13, SketchLine_14, SketchLine_15, SketchLine_16, SketchLine_17, SketchLine_18, SketchArc_11, SketchArc_12, SketchArc_13, SketchArc_14, SketchArc_15, SketchArc_16, SketchArc_17] = SketchMultiRotation_1.rotated()
SketchArc_13.setName("SketchArc_9")
SketchArc_13.result().setName("SketchArc_9")
SketchArc_13.results()[1].setName("SketchArc_9_2")
[SketchLine_5, SketchLine_6, SketchLine_7] = SketchConstraintMirror_1.mirrored()
SketchMultiTranslation_1_objects = [SketchLine_1.result(), SketchLine_4.result(), SketchLine_3.result(), SketchLine_5.result(), SketchLine_6.result()]
SketchMultiTranslation_1 = Sketch_1.addTranslation(SketchMultiTranslation_1_objects, SketchLine_2.endPoint(), SketchLine_4.startPoint(), 4)
-[SketchLine_8, SketchLine_9, SketchLine_10, SketchLine_11, SketchLine_12, SketchLine_13, SketchLine_14, SketchLine_15, SketchLine_16, SketchLine_5, SketchLine_17, SketchLine_18, SketchLine_19, SketchLine_6, SketchLine_20, SketchLine_21, SketchLine_22] = SketchMultiTranslation_1.translated()
+[SketchLine_8, SketchLine_9, SketchLine_10, SketchLine_11, SketchLine_12, SketchLine_13, SketchLine_14, SketchLine_15, SketchLine_16, SketchLine_17, SketchLine_18, SketchLine_19, SketchLine_20, SketchLine_21, SketchLine_22] = SketchMultiTranslation_1.translated()
model.do()
Part_1 = model.addPart(partSet)
Part_1_doc = Part_1.document()
std::list<std::shared_ptr<SketchAPI_SketchEntity> > SketchAPI_Rotation::rotated() const
{
- std::list<ObjectPtr> aList = rotatedObjects()->list();
+ std::list<ObjectPtr> aList = rotationList()->list();
+ std::set<ObjectPtr> anOriginalObjects;
+ anOriginalObjects.insert(aList.begin(), aList.end());
// remove all initial features
std::list<FeaturePtr> anIntermediate;
+ aList = rotatedObjects()->list();
std::list<ObjectPtr>::const_iterator anIt = aList.begin();
for (; anIt != aList.end(); ++anIt) {
+ if (anOriginalObjects.find(*anIt) != anOriginalObjects.end())
+ continue; // skip initial object
FeaturePtr aFeature = ModelAPI_Feature::feature(*anIt);
AttributeBooleanPtr isCopy = aFeature->boolean(SketchPlugin_SketchEntity::COPY_ID());
if (isCopy.get() && isCopy->value())
std::list<std::shared_ptr<SketchAPI_SketchEntity> > SketchAPI_Translation::translated() const
{
- std::list<ObjectPtr> aList = translatedObjects()->list();
+ std::list<ObjectPtr> aList = translationList()->list();
+ std::set<ObjectPtr> anOriginalObjects;
+ anOriginalObjects.insert(aList.begin(), aList.end());
// remove all initial features
std::list<FeaturePtr> anIntermediate;
+ aList = translatedObjects()->list();
std::list<ObjectPtr>::const_iterator anIt = aList.begin();
for (; anIt != aList.end(); ++anIt) {
+ if (anOriginalObjects.find(*anIt) != anOriginalObjects.end())
+ continue; // skip initial object
FeaturePtr aFeature = ModelAPI_Feature::feature(*anIt);
AttributeBooleanPtr isCopy = aFeature->boolean(SketchPlugin_SketchEntity::COPY_ID());
if (isCopy.get() && isCopy->value())
SketchProjection_2 = Sketch_1.addProjection(model.selection("EDGE", "[Box_1_1/Front][Box_1_1/Top]"), True)
SketchLine_1 = SketchProjection_2.createdFeature()
SketchMultiRotation_1 = Sketch_1.addRotation([SketchLine_1.result()], SketchAPI_Point(SketchPoint_1).coordinates(), 90, 3)
-[SketchLine_1, SketchLine_2, SketchLine_3] = SketchMultiRotation_1.rotated()
+[SketchLine_2, SketchLine_3] = SketchMultiRotation_1.rotated()
model.do()
model.checkSketch(Sketch_1, 0)
SketchProjection_1 = Sketch_1.addProjection(model.selection("EDGE", "OX"), True)
SketchLine_1 = SketchProjection_1.createdFeature()
SketchMultiRotation_1 = Sketch_1.addRotation([SketchLine_1.result()], SketchAPI_Line(SketchLine_1).startPoint(), 360, NB_COPIES, True)
-[SketchLine_1, SketchLine_2, SketchLine_3, SketchLine_4, SketchLine_5, SketchLine_6, SketchLine_7, SketchLine_8] = SketchMultiRotation_1.rotated()
+[SketchLine_2, SketchLine_3, SketchLine_4, SketchLine_5, SketchLine_6, SketchLine_7, SketchLine_8] = SketchMultiRotation_1.rotated()
model.do()
model.end()