[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
This commit is contained in:
committed by
WandererFan
parent
c469601f95
commit
222a2520b1
@@ -72,13 +72,13 @@ void ShapeValidator::checkEdge(const TopoDS_Shape& shape)
|
||||
Standard_Failure::Raise("Shape is not an edge.\n");
|
||||
}
|
||||
|
||||
TopoDS_Edge etmp = TopoDS::Edge(shape); // Curve TopoDS_Edge
|
||||
TopLoc_Location heloc; // this will be output
|
||||
Standard_Real u0; // contains output
|
||||
Standard_Real u1; // contains output
|
||||
Handle(Geom_Curve) c_geom = BRep_Tool::Curve(etmp, heloc, u0, u1);// The geometric curve
|
||||
TopoDS_Edge etmp = TopoDS::Edge(shape); // Curve TopoDS_Edge
|
||||
TopLoc_Location heloc; // this will be output
|
||||
Standard_Real u0; // contains output
|
||||
Standard_Real u1; // contains output
|
||||
Handle(Geom_Curve) c_geom = BRep_Tool::Curve(etmp, heloc, u0, u1); // The geometric curve
|
||||
Handle(Geom_BezierCurve) bez_geom =
|
||||
Handle(Geom_BezierCurve)::DownCast(c_geom);// Try to get Bezier curve
|
||||
Handle(Geom_BezierCurve)::DownCast(c_geom); // Try to get Bezier curve
|
||||
|
||||
// if not a Bezier then try to create a B-spline surface from the edges
|
||||
if (bez_geom.IsNull()) {
|
||||
@@ -117,7 +117,7 @@ void ShapeValidator::checkAndAdd(const Part::TopoShape& ts,
|
||||
checkAndAdd(ts.getShape(), aWD);
|
||||
}
|
||||
}
|
||||
catch (Standard_Failure&) {// any OCC exception means an inappropriate shape in the selection
|
||||
catch (Standard_Failure&) { // any OCC exception means an inappropriate shape in the selection
|
||||
Standard_Failure::Raise("Wrong shape type.\n");
|
||||
}
|
||||
}
|
||||
@@ -199,7 +199,7 @@ GeomFill_FillingStyle GeomFillSurface::getFillingStyle()
|
||||
default:
|
||||
Standard_Failure::Raise(
|
||||
"Filling style must be 0 (Stretch), 1 (Coons), or 2 (Curved).\n");
|
||||
return GeomFill_StretchStyle;// this is to shut up the compiler
|
||||
return GeomFill_StretchStyle; // this is to shut up the compiler
|
||||
}
|
||||
}
|
||||
|
||||
@@ -209,7 +209,7 @@ bool GeomFillSurface::getWire(TopoDS_Wire& aWire)
|
||||
Handle(ShapeExtend_WireData) aWD = new ShapeExtend_WireData;
|
||||
|
||||
std::vector<App::PropertyLinkSubList::SubSet> boundary = BoundaryList.getSubListValues();
|
||||
if (boundary.size() > 4) {// if too many not even try
|
||||
if (boundary.size() > 4) { // if too many not even try
|
||||
Standard_Failure::Raise("Only 2-4 curves are allowed\n");
|
||||
}
|
||||
|
||||
@@ -233,14 +233,14 @@ bool GeomFillSurface::getWire(TopoDS_Wire& aWire)
|
||||
|
||||
// Reorder the curves and fix the wire if required
|
||||
|
||||
aShFW->Load(aWD); // Load in the wire
|
||||
aShFW->FixReorder(); // Fix the order of the edges if required
|
||||
aShFW->ClosedWireMode() = Standard_True;// Enables closed wire mode
|
||||
aShFW->FixConnected(); // Fix connection between wires
|
||||
aShFW->FixSelfIntersection(); // Fix Self Intersection
|
||||
aShFW->Perform(); // Perform the fixes
|
||||
aShFW->Load(aWD); // Load in the wire
|
||||
aShFW->FixReorder(); // Fix the order of the edges if required
|
||||
aShFW->ClosedWireMode() = Standard_True; // Enables closed wire mode
|
||||
aShFW->FixConnected(); // Fix connection between wires
|
||||
aShFW->FixSelfIntersection(); // Fix Self Intersection
|
||||
aShFW->Perform(); // Perform the fixes
|
||||
|
||||
aWire = aShFW->Wire();// Healed Wire
|
||||
aWire = aShFW->Wire(); // Healed Wire
|
||||
|
||||
if (aWire.IsNull()) {
|
||||
Standard_Failure::Raise("Wire unable to be constructed\n");
|
||||
@@ -273,18 +273,18 @@ void GeomFillSurface::createBezierSurface(TopoDS_Wire& aWire)
|
||||
std::vector<Handle(Geom_BezierCurve)> curves;
|
||||
curves.reserve(4);
|
||||
|
||||
Standard_Real u1, u2;// contains output
|
||||
Standard_Real u1, u2; // contains output
|
||||
TopExp_Explorer anExp(aWire, TopAbs_EDGE);
|
||||
for (; anExp.More(); anExp.Next()) {
|
||||
const TopoDS_Edge hedge = TopoDS::Edge(anExp.Current());
|
||||
TopLoc_Location heloc; // this will be output
|
||||
Handle(Geom_Curve) c_geom = BRep_Tool::Curve(hedge, heloc, u1, u2);// The geometric curve
|
||||
TopLoc_Location heloc; // this will be output
|
||||
Handle(Geom_Curve) c_geom = BRep_Tool::Curve(hedge, heloc, u1, u2); // The geometric curve
|
||||
Handle(Geom_BezierCurve) bezier =
|
||||
Handle(Geom_BezierCurve)::DownCast(c_geom);// Try to get Bezier curve
|
||||
Handle(Geom_BezierCurve)::DownCast(c_geom); // Try to get Bezier curve
|
||||
|
||||
if (!bezier.IsNull()) {
|
||||
gp_Trsf transf = heloc.Transformation();
|
||||
bezier->Transform(transf);// apply original transformation to control points
|
||||
bezier->Transform(transf); // apply original transformation to control points
|
||||
// Store Underlying Geometry
|
||||
curves.push_back(bezier);
|
||||
}
|
||||
@@ -294,7 +294,7 @@ void GeomFillSurface::createBezierSurface(TopoDS_Wire& aWire)
|
||||
}
|
||||
|
||||
GeomFill_FillingStyle fstyle = getFillingStyle();
|
||||
GeomFill_BezierCurves aSurfBuilder;// Create Surface Builder
|
||||
GeomFill_BezierCurves aSurfBuilder; // Create Surface Builder
|
||||
|
||||
std::size_t edgeCount = curves.size();
|
||||
const boost::dynamic_bitset<>& booleans = ReversedList.getValues();
|
||||
@@ -323,17 +323,17 @@ void GeomFillSurface::createBSplineSurface(TopoDS_Wire& aWire)
|
||||
{
|
||||
std::vector<Handle(Geom_BSplineCurve)> curves;
|
||||
curves.reserve(4);
|
||||
Standard_Real u1, u2;// contains output
|
||||
Standard_Real u1, u2; // contains output
|
||||
TopExp_Explorer anExp(aWire, TopAbs_EDGE);
|
||||
for (; anExp.More(); anExp.Next()) {
|
||||
const TopoDS_Edge& edge = TopoDS::Edge(anExp.Current());
|
||||
TopLoc_Location heloc; // this will be output
|
||||
Handle(Geom_Curve) c_geom = BRep_Tool::Curve(edge, heloc, u1, u2);// The geometric curve
|
||||
TopLoc_Location heloc; // this will be output
|
||||
Handle(Geom_Curve) c_geom = BRep_Tool::Curve(edge, heloc, u1, u2); // The geometric curve
|
||||
Handle(Geom_BSplineCurve) bspline =
|
||||
Handle(Geom_BSplineCurve)::DownCast(c_geom);// Try to get BSpline curve
|
||||
Handle(Geom_BSplineCurve)::DownCast(c_geom); // Try to get BSpline curve
|
||||
gp_Trsf transf = heloc.Transformation();
|
||||
if (!bspline.IsNull()) {
|
||||
bspline->Transform(transf);// apply original transformation to control points
|
||||
bspline->Transform(transf); // apply original transformation to control points
|
||||
// Store Underlying Geometry
|
||||
curves.push_back(bspline);
|
||||
}
|
||||
@@ -346,7 +346,7 @@ void GeomFillSurface::createBSplineSurface(TopoDS_Wire& aWire)
|
||||
Convert_ParameterisationType paratype = Convert_Polynomial;
|
||||
Handle(Geom_BSplineCurve) bspline2 = conv.CurveToBSplineCurve(trim, paratype);
|
||||
if (!bspline2.IsNull()) {
|
||||
bspline2->Transform(transf);// apply original transformation to control points
|
||||
bspline2->Transform(transf); // apply original transformation to control points
|
||||
curves.push_back(bspline2);
|
||||
}
|
||||
else {
|
||||
@@ -358,14 +358,14 @@ void GeomFillSurface::createBSplineSurface(TopoDS_Wire& aWire)
|
||||
Standard_Failure::Raise(
|
||||
"A curve was not a B-spline and could not be converted into one.");
|
||||
}
|
||||
spline->Transform(transf);// apply original transformation to control points
|
||||
spline->Transform(transf); // apply original transformation to control points
|
||||
curves.push_back(spline);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
GeomFill_FillingStyle fstyle = getFillingStyle();
|
||||
GeomFill_BSplineCurves aSurfBuilder;// Create Surface Builder
|
||||
GeomFill_BSplineCurves aSurfBuilder; // Create Surface Builder
|
||||
|
||||
std::size_t edgeCount = curves.size();
|
||||
const boost::dynamic_bitset<>& booleans = ReversedList.getValues();
|
||||
|
||||
Reference in New Issue
Block a user