diff --git a/src/Mod/Part/App/ExtrusionHelper.cpp b/src/Mod/Part/App/ExtrusionHelper.cpp index 4572226436..42989e494b 100644 --- a/src/Mod/Part/App/ExtrusionHelper.cpp +++ b/src/Mod/Part/App/ExtrusionHelper.cpp @@ -154,16 +154,16 @@ void ExtrusionHelper::makeDraft(const TopoDS_Shape& shape, // create an offset copy of the wire if (!isInnerWire[rows]) { // this is an outer wire - createTaperedPrismOffset(TopoDS::Wire(singleWire), vecRev, distanceRev, numEdges, true, offsetWire); + createTaperedPrismOffset(TopoDS::Wire(singleWire), vecRev, distanceRev, true, offsetWire); } else { // there is an OCC bug with single-edge wires (circles), see inside createTaperedPrismOffset if (numEdges > 1 || !isPartDesign) // inner wires must get the negated offset - createTaperedPrismOffset(TopoDS::Wire(singleWire), vecRev, -distanceRev, numEdges, true, offsetWire); + createTaperedPrismOffset(TopoDS::Wire(singleWire), vecRev, -distanceRev, true, offsetWire); else - // these wires must not get the negated offset - createTaperedPrismOffset(TopoDS::Wire(singleWire), vecRev, distanceRev, numEdges, true, offsetWire); + // circles in PartDesign must not get the negated offset + createTaperedPrismOffset(TopoDS::Wire(singleWire), vecRev, distanceRev, true, offsetWire); } if (offsetWire.IsNull()) return; @@ -202,16 +202,16 @@ void ExtrusionHelper::makeDraft(const TopoDS_Shape& shape, // create an offset copy of the wire if (!isInnerWire[rows]) { // this is an outer wire - createTaperedPrismOffset(TopoDS::Wire(singleWire), vecFwd, distanceFwd, numEdges, false, offsetWire); + createTaperedPrismOffset(TopoDS::Wire(singleWire), vecFwd, distanceFwd, false, offsetWire); } else { - // there is an OCC bug with single-edge wires (circles) + // there is an OCC bug with single-edge wires (circles), see inside createTaperedPrismOffset if (numEdges > 1 || !isPartDesign) // inner wires must get the negated offset - createTaperedPrismOffset(TopoDS::Wire(singleWire), vecFwd, -distanceFwd, numEdges, false, offsetWire); + createTaperedPrismOffset(TopoDS::Wire(singleWire), vecFwd, -distanceFwd, false, offsetWire); else - // circles in isPartDesign must not get the negated offset - createTaperedPrismOffset(TopoDS::Wire(singleWire), vecFwd, distanceFwd, numEdges, false, offsetWire); + // circles in PartDesign must not get the negated offset + createTaperedPrismOffset(TopoDS::Wire(singleWire), vecFwd, distanceFwd, false, offsetWire); } if (offsetWire.IsNull()) return; @@ -412,7 +412,6 @@ void ExtrusionHelper::checkInnerWires(std::vector& isInnerWire, const gp_D void ExtrusionHelper::createTaperedPrismOffset(TopoDS_Wire sourceWire, const gp_Vec& translation, double offset, - int numEdges, bool isSecond, TopoDS_Wire& result) { @@ -420,7 +419,8 @@ void ExtrusionHelper::createTaperedPrismOffset(TopoDS_Wire sourceWire, // then this placement must be reset because otherwise // BRepOffsetAPI_MakeOffset shows weird behaviour by applying the placement, see // https://dev.opencascade.org/content/brepoffsetapimakeoffset-wire-and-face-odd-occt-740 - std::ignore = numEdges; + // therefore we use here the workaround of BRepOffsetAPI_MakeOffsetFix and not BRepOffsetAPI_MakeOffset + gp_Trsf tempTransform; tempTransform.SetTranslation(translation); TopLoc_Location loc(tempTransform); diff --git a/src/Mod/Part/App/ExtrusionHelper.h b/src/Mod/Part/App/ExtrusionHelper.h index ab455320fc..5b8f7bda44 100644 --- a/src/Mod/Part/App/ExtrusionHelper.h +++ b/src/Mod/Part/App/ExtrusionHelper.h @@ -65,7 +65,6 @@ public: static void createTaperedPrismOffset(TopoDS_Wire sourceWire, const gp_Vec& translation, double offset, - int numEdges, bool isSecond, TopoDS_Wire& result); };