Use OCCT Handle macro for Handle_ classes
This is the result of running OCCT's upgrade script provided with OCCT 7.0. See https://www.opencascade.com/content/freecad-occt710-and-windows-rtti-data-missing#comment-form and https://www.forum.freecadweb.org/viewtopic.php?f=4&t=21405&start=120#p169019 for why this is necessary for OCCT >= 7.1
This commit is contained in:
@@ -157,12 +157,12 @@ TopoDS_Edge DrawingOutput::asBSpline(const BRepAdaptor_Curve& c, int maxDegree)
|
||||
{
|
||||
Standard_Real tol3D = 0.001;
|
||||
Standard_Integer maxSegment = 50;
|
||||
Handle_BRepAdaptor_HCurve hCurve = new BRepAdaptor_HCurve(c);
|
||||
Handle(BRepAdaptor_HCurve) hCurve = new BRepAdaptor_HCurve(c);
|
||||
// approximate the curve using a tolerance
|
||||
Approx_Curve3d approx(hCurve,tol3D,GeomAbs_C0,maxSegment,maxDegree);
|
||||
if (approx.IsDone() && approx.HasResult()) {
|
||||
// have the result
|
||||
Handle_Geom_BSplineCurve spline = approx.Curve();
|
||||
Handle(Geom_BSplineCurve) spline = approx.Curve();
|
||||
BRepBuilderAPI_MakeEdge mkEdge(spline, spline->FirstParameter(), spline->LastParameter());
|
||||
return mkEdge.Edge();
|
||||
}
|
||||
@@ -297,7 +297,7 @@ void SVGOutput::printBezier(const BRepAdaptor_Curve& c, int id, std::ostream& ou
|
||||
std::stringstream str;
|
||||
str << "<path d=\"M";
|
||||
|
||||
Handle_Geom_BezierCurve bezier = c.Bezier();
|
||||
Handle(Geom_BezierCurve) bezier = c.Bezier();
|
||||
Standard_Integer poles = bezier->NbPoles();
|
||||
|
||||
// if it's a bezier with degree higher than 3 convert it into a B-spline
|
||||
@@ -359,11 +359,11 @@ void SVGOutput::printBSpline(const BRepAdaptor_Curve& c, int id, std::ostream& o
|
||||
{
|
||||
try {
|
||||
std::stringstream str;
|
||||
Handle_Geom_BSplineCurve spline = c.BSpline();
|
||||
Handle(Geom_BSplineCurve) spline = c.BSpline();
|
||||
if (spline->Degree() > 3 || spline->IsRational()) {
|
||||
Standard_Real tol3D = 0.001;
|
||||
Standard_Integer maxDegree = 3, maxSegment = 50;
|
||||
Handle_BRepAdaptor_HCurve hCurve = new BRepAdaptor_HCurve(c);
|
||||
Handle(BRepAdaptor_HCurve) hCurve = new BRepAdaptor_HCurve(c);
|
||||
// approximate the curve using a tolerance
|
||||
Approx_Curve3d approx(hCurve,tol3D,GeomAbs_C0,maxSegment,maxDegree);
|
||||
if (approx.IsDone() && approx.HasResult()) {
|
||||
@@ -376,7 +376,7 @@ void SVGOutput::printBSpline(const BRepAdaptor_Curve& c, int id, std::ostream& o
|
||||
Standard_Integer arcs = crt.NbArcs();
|
||||
str << "<path d=\"M";
|
||||
for (Standard_Integer i=1; i<=arcs; i++) {
|
||||
Handle_Geom_BezierCurve bezier = crt.Arc(i);
|
||||
Handle(Geom_BezierCurve) bezier = crt.Arc(i);
|
||||
Standard_Integer poles = bezier->NbPoles();
|
||||
if (i == 1) {
|
||||
gp_Pnt p1 = bezier->Pole(1);
|
||||
@@ -646,11 +646,11 @@ void DXFOutput::printBSpline(const BRepAdaptor_Curve& c, int id, std::ostream& o
|
||||
{
|
||||
try {
|
||||
std::stringstream str;
|
||||
Handle_Geom_BSplineCurve spline = c.BSpline();
|
||||
Handle(Geom_BSplineCurve) spline = c.BSpline();
|
||||
if (spline->Degree() > 3 || spline->IsRational()) {
|
||||
Standard_Real tol3D = 0.001;
|
||||
Standard_Integer maxDegree = 3, maxSegment = 50;
|
||||
Handle_BRepAdaptor_HCurve hCurve = new BRepAdaptor_HCurve(c);
|
||||
Handle(BRepAdaptor_HCurve) hCurve = new BRepAdaptor_HCurve(c);
|
||||
// approximate the curve using a tolerance
|
||||
Approx_Curve3d approx(hCurve,tol3D,GeomAbs_C0,maxSegment,maxDegree);
|
||||
if (approx.IsDone() && approx.HasResult()) {
|
||||
|
||||
Reference in New Issue
Block a user