Group_1 = model.addGroup(Part_1_doc, "Solids", [model.selection("SOLID", "Extrusion_1_1_1")])
Copy_1 = model.addCopy(Part_1_doc, [model.selection("COMPSOLID", "Origin")], 1)
Copy_1.result().setName("Origin_1")
-Fillet_1 = model.addFillet(Part_1_doc, [model.selection("EDGE", "[Origin_1_1/Copy_3][Origin_1_1/Copy_7]"), model.selection("EDGE", "[Origin_1_1/Copy_12][Origin_1_1/Copy_14]")], 2)
+Fillet_1 = model.addFillet(Part_1_doc, [model.selection("EDGE", "[Origin_1_1/Copy_2][Origin_1_1/Copy_6]"), model.selection("EDGE", "[Origin_1_2/Copy_4][Origin_1_2/Copy_6]")], 2)
Fillet_1.result().setName("CopyCompound")
model.do()
# move the group feature to the end - through copy and fillet on this copy (to distinguish the origin and the copy)
//=======================================================================
void Model_BodyBuilder::loadFirstLevel(GeomShapePtr theShape, const std::string& theName)
{
- if(theShape->isNull()) return;
- TopoDS_Shape aShape = theShape->impl<TopoDS_Shape>();
+ GeomShapePtr aShapePtr = shape();
+ if (theShape->isNull() || !aShapePtr.get())
+ return;
+ TopoDS_Shape aShape = shape()->impl<TopoDS_Shape>();
+ if (aShape.IsNull())
+ return;
std::string aName;
if (aShape.ShapeType() == TopAbs_COMPOUND || aShape.ShapeType() == TopAbs_COMPSOLID) {
TopoDS_Iterator itr(aShape);