-// Copyright (C) 2019-2022 CEA/DEN, EDF R&D
+// Copyright (C) 2019-2024 CEA, EDF
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
GeomAlgoAPI_Offset::GeomAlgoAPI_Offset(const GeomPlanePtr& thePlane,
const GeomShapePtr& theEdgeOrWire,
- const double theOffsetValue)
+ const double theOffsetValue,
+ const GeomAlgoAPI_OffsetJoint theJoint,
+ const bool theIsApprox)
{
// 1. Make wire from edge, if need
TopoDS_Wire aWire;
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, GeomAbs_Arc, isOpenResult);
+ aParal->Init(aFace, aJoin, isOpenResult);
+ aParal->SetApprox(theIsApprox);
aParal->Perform(theOffsetValue, 0.);
if (aParal->IsDone()) {
TopoDS_Shape anOffset = aParal->Shape();