#include <BRep_Builder.hxx>
#include <BRepBuilderAPI_MakeEdge.hxx>
#include <BRepBuilderAPI_MakeWire.hxx>
+#include <BRepBuilderAPI_MakeFace.hxx>
+#include <BRepOffsetAPI_NormalProjection.hxx>
#include <GeomAPI_ProjectPointOnCurve.hxx>
#include <GeomAdaptor_Curve.hxx>
#include <gp_Pnt.hxx>
#include <gp_XY.hxx>
+#include <gp_Pln.hxx>
#include <NCollection_Map.hxx>
#include <TopExp_Explorer.hxx>
#include <ShapeAnalysis_FreeBounds.hxx>
#include <TopoDS.hxx>
+
#include <QColor>
#include <QPainterPath>
#include <QVariant>
aShape = aMakeWire.Wire();
}
- setPolylineShape( aShape );
+ gp_Pln aPlane( gp_Pnt( 0, 0, 0 ), gp_Dir( 0, 0, 1 ) );
+ BRepBuilderAPI_MakeFace aMakeFace( aPlane );
+ aMakeFace.Build();
+ BRepOffsetAPI_NormalProjection aProj( aMakeFace.Face() );
+ aProj.Add( aShape );
+ aProj.Build();
+ TopoDS_Shape aResult;
+ if( aProj.IsDone() )
+ aResult = aProj.Shape();
+
+ setPolylineShape( aResult );
}
setEditable( anIsCanBeImported );