mirror of
https://github.com/Open-Cascade-SAS/OCCT.git
synced 2026-09-06 04:37:55 +08:00
Foundation Classes, gp - Add constexpr/noexcept constructors and standard direction enums (#803)
- Addition of `gp_Dir::D` and `gp_Dir2d::D` enums for standard directions (X, Y, Z, NX, NY, NZ) - Constexpr/noexcept constructors for geometric primitives (circles, cones, cylinders, etc.) - Enhanced axis placement classes with enum-based constructors - Replacement of hardcoded direction values throughout the codebase
This commit is contained in:
@@ -1321,7 +1321,7 @@ void GeomInt_IntSS::TrimILineOnSurfBoundaries(const Handle(Geom2d_Curve)& theC2d
|
||||
{
|
||||
if (!Precision::IsInfinite(aU1f))
|
||||
{
|
||||
aCurS1Bounds[0] = new Geom2d_Line(gp_Pnt2d(aU1f, aV1f), gp_Dir2d(0.0, 1.0));
|
||||
aCurS1Bounds[0] = new Geom2d_Line(gp_Pnt2d(aU1f, aV1f), gp_Dir2d(gp_Dir2d::D::Y));
|
||||
|
||||
if (!Precision::IsInfinite(aDelta))
|
||||
aCurS1Bounds[0] = new Geom2d_TrimmedCurve(aCurS1Bounds[0], 0, aDelta);
|
||||
@@ -1329,7 +1329,7 @@ void GeomInt_IntSS::TrimILineOnSurfBoundaries(const Handle(Geom2d_Curve)& theC2d
|
||||
|
||||
if (!Precision::IsInfinite(aU1l))
|
||||
{
|
||||
aCurS1Bounds[1] = new Geom2d_Line(gp_Pnt2d(aU1l, aV1f), gp_Dir2d(0.0, 1.0));
|
||||
aCurS1Bounds[1] = new Geom2d_Line(gp_Pnt2d(aU1l, aV1f), gp_Dir2d(gp_Dir2d::D::Y));
|
||||
if (!Precision::IsInfinite(aDelta))
|
||||
aCurS1Bounds[1] = new Geom2d_TrimmedCurve(aCurS1Bounds[1], 0, aDelta);
|
||||
}
|
||||
@@ -1340,14 +1340,14 @@ void GeomInt_IntSS::TrimILineOnSurfBoundaries(const Handle(Geom2d_Curve)& theC2d
|
||||
{
|
||||
if (!Precision::IsInfinite(aV1f))
|
||||
{
|
||||
aCurS1Bounds[2] = new Geom2d_Line(gp_Pnt2d(aU1f, aV1f), gp_Dir2d(1.0, 0.0));
|
||||
aCurS1Bounds[2] = new Geom2d_Line(gp_Pnt2d(aU1f, aV1f), gp_Dir2d(gp_Dir2d::D::X));
|
||||
if (!Precision::IsInfinite(aDelta))
|
||||
aCurS1Bounds[2] = new Geom2d_TrimmedCurve(aCurS1Bounds[2], 0, aDelta);
|
||||
}
|
||||
|
||||
if (!Precision::IsInfinite(aV1l))
|
||||
{
|
||||
aCurS1Bounds[3] = new Geom2d_Line(gp_Pnt2d(aU1l, aV1l), gp_Dir2d(1.0, 0.0));
|
||||
aCurS1Bounds[3] = new Geom2d_Line(gp_Pnt2d(aU1f, aV1l), gp_Dir2d(gp_Dir2d::D::X));
|
||||
if (!Precision::IsInfinite(aDelta))
|
||||
aCurS1Bounds[3] = new Geom2d_TrimmedCurve(aCurS1Bounds[3], 0, aDelta);
|
||||
}
|
||||
@@ -1358,14 +1358,14 @@ void GeomInt_IntSS::TrimILineOnSurfBoundaries(const Handle(Geom2d_Curve)& theC2d
|
||||
{
|
||||
if (!Precision::IsInfinite(aU2f))
|
||||
{
|
||||
aCurS2Bounds[0] = new Geom2d_Line(gp_Pnt2d(aU2f, aV2f), gp_Dir2d(0.0, 1.0));
|
||||
aCurS2Bounds[0] = new Geom2d_Line(gp_Pnt2d(aU2f, aV2f), gp_Dir2d(gp_Dir2d::D::Y));
|
||||
if (!Precision::IsInfinite(aDelta))
|
||||
aCurS2Bounds[0] = new Geom2d_TrimmedCurve(aCurS2Bounds[0], 0, aDelta);
|
||||
}
|
||||
|
||||
if (!Precision::IsInfinite(aU2l))
|
||||
{
|
||||
aCurS2Bounds[1] = new Geom2d_Line(gp_Pnt2d(aU2l, aV2f), gp_Dir2d(0.0, 1.0));
|
||||
aCurS2Bounds[1] = new Geom2d_Line(gp_Pnt2d(aU2l, aV2f), gp_Dir2d(gp_Dir2d::D::Y));
|
||||
if (!Precision::IsInfinite(aDelta))
|
||||
aCurS2Bounds[1] = new Geom2d_TrimmedCurve(aCurS2Bounds[1], 0, aDelta);
|
||||
}
|
||||
@@ -1376,14 +1376,14 @@ void GeomInt_IntSS::TrimILineOnSurfBoundaries(const Handle(Geom2d_Curve)& theC2d
|
||||
{
|
||||
if (!Precision::IsInfinite(aV2f))
|
||||
{
|
||||
aCurS2Bounds[2] = new Geom2d_Line(gp_Pnt2d(aU2f, aV2f), gp_Dir2d(1.0, 0.0));
|
||||
aCurS2Bounds[2] = new Geom2d_Line(gp_Pnt2d(aU2f, aV2f), gp_Dir2d(gp_Dir2d::D::X));
|
||||
if (!Precision::IsInfinite(aDelta))
|
||||
aCurS2Bounds[2] = new Geom2d_TrimmedCurve(aCurS2Bounds[2], 0, aDelta);
|
||||
}
|
||||
|
||||
if (!Precision::IsInfinite(aV2l))
|
||||
{
|
||||
aCurS2Bounds[3] = new Geom2d_Line(gp_Pnt2d(aU2l, aV2l), gp_Dir2d(1.0, 0.0));
|
||||
aCurS2Bounds[3] = new Geom2d_Line(gp_Pnt2d(aU2f, aV2l), gp_Dir2d(gp_Dir2d::D::X));
|
||||
if (!Precision::IsInfinite(aDelta))
|
||||
aCurS2Bounds[3] = new Geom2d_TrimmedCurve(aCurS2Bounds[3], 0, aDelta);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user