void Model_ResultConstruction::setShape(std::shared_ptr<GeomAPI_Shape> theShape)
{
if (myShape != theShape) {
- if (!isInfinite())
- storeShape(theShape);
+ storeShape(theShape);
if (!theShape.get() || !theShape->isEqual(myShape)) {
static const Events_ID anEvent = Events_Loop::eventByName(EVENT_OBJECT_UPDATED);
ModelAPI_EventCreator::get()->sendUpdated(data()->owner(), anEvent);
std::shared_ptr<Model_Document> aMyDoc =
std::dynamic_pointer_cast<Model_Document>(document());
const TopoDS_Shape& aShape = theShape->impl<TopoDS_Shape>();
- if (aShape.ShapeType() == TopAbs_VERTEX) {
+ if (isInfinite() || aShape.ShapeType() == TopAbs_VERTEX) {
aShapeLab.ForgetAllAttributes(); // clear all previously stored
TNaming_Builder aBuilder(aShapeLab);
aBuilder.Generated(aShape);
Partition_1.result().subResult(2).setName("bottom_right")
Partition_1.result().subResult(3).setName("Partition_1_1_4")
Sketch_1 = model.addSketch(Part_1_doc, model.selection("FACE", "Partition_1_1_1/Modified_Face&_plate/Top"))
-SketchProjection_1 = Sketch_1.addProjection(model.selection("VERTEX", "[Partition_1_1_1/Modified_Face&_plate/Top][_weak_name_5_Partition_1_1_1][_weak_name_6_Partition_1_1_1]"), False)
+SketchProjection_1 = Sketch_1.addProjection(model.selection("VERTEX", "[Partition_1_1_1/Modified_Face&_plate/Top][Partition_1_1_1/Modified_Face&Plane_2/Plane_2][Partition_1_1_1/Modified_Face&Plane_1/Plane_1]"), False)
SketchPoint_1 = SketchProjection_1.createdFeature()
SketchCircle_1 = Sketch_1.addCircle(50, 50, 40)
SketchConstraintCoincidence_1 = Sketch_1.setCoincident(SketchPoint_1.result(), SketchCircle_1.center())