fixes 0003020: 2D offset of circle are not in the right place
This commit is contained in:
@@ -196,6 +196,7 @@
|
||||
#include "Tools.h"
|
||||
#include "encodeFilename.h"
|
||||
#include "FaceMakerBullseye.h"
|
||||
#include "BRepOffsetAPI_MakeOffsetFix.h"
|
||||
|
||||
using namespace Part;
|
||||
|
||||
@@ -2618,14 +2619,9 @@ TopoDS_Shape TopoShape::makeOffset2D(double offset, short joinType, bool fill, b
|
||||
|
||||
//do the offset..
|
||||
TopoDS_Shape offsetShape;
|
||||
BRepOffsetAPI_MakeOffset mkOffset(sourceWires[0], GeomAbs_JoinType(joinType)
|
||||
#if OCC_VERSION_HEX >= 0x060900
|
||||
, allowOpenResult
|
||||
#endif
|
||||
);
|
||||
BRepOffsetAPI_MakeOffsetFix mkOffset(GeomAbs_JoinType(joinType), allowOpenResult);
|
||||
for (TopoDS_Wire &w : sourceWires) {
|
||||
if (&w != &(sourceWires[0])) //filter out first wire - it's already added
|
||||
mkOffset.AddWire(w);
|
||||
mkOffset.AddWire(w);
|
||||
}
|
||||
|
||||
if (fabs(offset) > Precision::Confusion()) {
|
||||
@@ -2643,7 +2639,7 @@ TopoDS_Shape TopoShape::makeOffset2D(double offset, short joinType, bool fill, b
|
||||
}
|
||||
offsetShape = mkOffset.Shape();
|
||||
|
||||
if(offsetShape.IsNull())
|
||||
if (offsetShape.IsNull())
|
||||
throw Base::CADKernelError("makeOffset2D: result of offsetting is null!");
|
||||
|
||||
//Copying shape to fix strange orientation behavior, OCC7.0.0. See bug #2699
|
||||
|
||||
Reference in New Issue
Block a user