- BRepOffsetAPI_MakeOffset aParal;
- aParal.Init(aFace, GeomAbs_Arc, Standard_True);
- aParal.Perform(theOffsetValue, 0.);
- if (aParal.IsDone()) {
- TopoDS_Shape anOffset = aParal.Shape();
- aResult.reset(new GeomAPI_Shape());
+ BRepOffsetAPI_MakeOffset* aParal = new BRepOffsetAPI_MakeOffset;
+ setImpl(aParal);
+ setBuilderType(OCCT_BRepBuilderAPI_MakeShape);
+
+ // Joint type
+ GeomAbs_JoinType aJoin = GeomAbs_Arc; // default mode, corresponding to KeepDistance
+ if (theJoint == GeomAlgoAPI_OffsetJoint::Lines)
+ aJoin = GeomAbs_Intersection;
+ // for GeomAlgoAPI_OffsetJoint::Arcs do the same as for KeepDistance
+
+ Standard_Boolean isOpenResult = !aWire.Closed();
+ aParal->Init(aFace, aJoin, isOpenResult);
+ aParal->Perform(theOffsetValue, 0.);
+ if (aParal->IsDone()) {
+ TopoDS_Shape anOffset = aParal->Shape();
+ GeomShapePtr aResult(new GeomAPI_Shape());