+ port to OCC 7.0
This commit is contained in:
@@ -62,12 +62,11 @@
|
||||
#include <BRepMesh_IncrementalMesh.hxx>
|
||||
#include <BRepLib.hxx>
|
||||
#include <BRepAdaptor_CompCurve.hxx>
|
||||
#include <Handle_BRepAdaptor_HCompCurve.hxx>
|
||||
#include <BRepAdaptor_HCompCurve.hxx>
|
||||
#include <Approx_Curve3d.hxx>
|
||||
#include <BRepAdaptor_HCurve.hxx>
|
||||
#include <Handle_BRepAdaptor_HCurve.hxx>
|
||||
#include <BRepAdaptor_HCurve.hxx>
|
||||
#include <Geom_BSplineCurve.hxx>
|
||||
#include <Handle_Geom_BSplineCurve.hxx>
|
||||
#include <Geom_BezierCurve.hxx>
|
||||
#include <GeomConvert_BSplineCurveToBezierCurve.hxx>
|
||||
#include <GeomConvert_BSplineCurveKnotSplitting.hxx>
|
||||
@@ -99,13 +98,13 @@ ProjectionAlgos::ProjectionAlgos(const TopoDS_Shape &Input, const Base::Vector3d
|
||||
ProjectionAlgos::~ProjectionAlgos()
|
||||
{
|
||||
}
|
||||
|
||||
/*
|
||||
// no longer used, replaced invertY by adding
|
||||
|
||||
/*
|
||||
// no longer used, replaced invertY by adding
|
||||
// << " transform=\"scale(1,-1)\"" << endl
|
||||
// to getSVG(...) below.
|
||||
// invertY, as here, wasn't right for intended purpose - always reflected in model Y direction rather
|
||||
// than SVG projection Y direction. Also better to reflect about (0,0,0) rather than bbox centre
|
||||
// to getSVG(...) below.
|
||||
// invertY, as here, wasn't right for intended purpose - always reflected in model Y direction rather
|
||||
// than SVG projection Y direction. Also better to reflect about (0,0,0) rather than bbox centre
|
||||
|
||||
TopoDS_Shape ProjectionAlgos::invertY(const TopoDS_Shape& shape)
|
||||
{
|
||||
@@ -120,20 +119,20 @@ TopoDS_Shape ProjectionAlgos::invertY(const TopoDS_Shape& shape)
|
||||
BRepBuilderAPI_Transform mkTrf(shape, mat);
|
||||
return mkTrf.Shape();
|
||||
}
|
||||
*/
|
||||
*/
|
||||
|
||||
|
||||
//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;
|
||||
}
|
||||
|
||||
|
||||
//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(void)
|
||||
{
|
||||
Handle( HLRBRep_Algo ) brep_hlr = new HLRBRep_Algo;
|
||||
@@ -146,20 +145,20 @@ void ProjectionAlgos::execute(void)
|
||||
brep_hlr->Hide();
|
||||
|
||||
// extracting the result sets:
|
||||
HLRBRep_HLRToShape shapes( brep_hlr );
|
||||
|
||||
V = build3dCurves(shapes.VCompound ());// hard edge visibly
|
||||
V1 = build3dCurves(shapes.Rg1LineVCompound());// Smoth edges visibly
|
||||
VN = build3dCurves(shapes.RgNLineVCompound());// contour edges visibly
|
||||
VO = build3dCurves(shapes.OutLineVCompound());// contours apparents visibly
|
||||
VI = build3dCurves(shapes.IsoLineVCompound());// isoparamtriques visibly
|
||||
H = build3dCurves(shapes.HCompound ());// hard edge invisibly
|
||||
H1 = build3dCurves(shapes.Rg1LineHCompound());// Smoth edges invisibly
|
||||
HN = build3dCurves(shapes.RgNLineHCompound());// contour edges invisibly
|
||||
HO = build3dCurves(shapes.OutLineHCompound());// contours apparents invisibly
|
||||
HI = build3dCurves(shapes.IsoLineHCompound());// isoparamtriques invisibly
|
||||
}
|
||||
|
||||
HLRBRep_HLRToShape shapes( brep_hlr );
|
||||
|
||||
V = build3dCurves(shapes.VCompound ());// hard edge visibly
|
||||
V1 = build3dCurves(shapes.Rg1LineVCompound());// Smoth edges visibly
|
||||
VN = build3dCurves(shapes.RgNLineVCompound());// contour edges visibly
|
||||
VO = build3dCurves(shapes.OutLineVCompound());// contours apparents visibly
|
||||
VI = build3dCurves(shapes.IsoLineVCompound());// isoparamtriques visibly
|
||||
H = build3dCurves(shapes.HCompound ());// hard edge invisibly
|
||||
H1 = build3dCurves(shapes.Rg1LineHCompound());// Smoth edges invisibly
|
||||
HN = build3dCurves(shapes.RgNLineHCompound());// contour edges invisibly
|
||||
HO = build3dCurves(shapes.OutLineHCompound());// contours apparents invisibly
|
||||
HI = build3dCurves(shapes.IsoLineHCompound());// isoparamtriques invisibly
|
||||
}
|
||||
|
||||
std::string ProjectionAlgos::getSVG(ExtractionType type, double scale, double tolerance, double hiddenscale)
|
||||
{
|
||||
std::stringstream result;
|
||||
|
||||
Reference in New Issue
Block a user