TechDraw: Expose two functions for SVG export

This commit is contained in:
Pieter Hijma
2023-09-19 08:18:45 +02:00
committed by WandererFan
parent 695a314229
commit 1fc5dea14c
3 changed files with 50 additions and 10 deletions

View File

@@ -50,6 +50,18 @@ using namespace std;
// ProjectionAlgos
//===========================================================================
namespace TechDraw {
//added by tanderson. aka blobfish.
//projection algorithms build a 2d curve(pcurve) but no 3d curve.
//this causes problems with meshing algorithms after save and load.
const TopoDS_Shape& build3dCurves(const TopoDS_Shape &shape)
{
TopExp_Explorer it;
for (it.Init(shape, TopAbs_EDGE); it.More(); it.Next())
BRepLib::BuildCurve3d(TopoDS::Edge(it.Current()));
return shape;
}
}
ProjectionAlgos::ProjectionAlgos(const TopoDS_Shape &Input, const Base::Vector3d &Dir)
: Input(Input), Direction(Dir)
@@ -61,16 +73,6 @@ ProjectionAlgos::~ProjectionAlgos()
{
}
//added by tanderson. aka blobfish.
//projection algorithms build a 2d curve(pcurve) but no 3d curve.
//this causes problems with meshing algorithms after save and load.
static const TopoDS_Shape& build3dCurves(const TopoDS_Shape &shape)
{
TopExp_Explorer it;
for (it.Init(shape, TopAbs_EDGE); it.More(); it.Next())
BRepLib::BuildCurve3d(TopoDS::Edge(it.Current()));
return shape;
}
void ProjectionAlgos::execute()
{