mirror of
https://github.com/Open-Cascade-SAS/OCCT.git
synced 2026-09-08 21:58:12 +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:
@@ -65,7 +65,7 @@ BRepPrim_Cone::BRepPrim_Cone(const Standard_Real Angle)
|
||||
//=================================================================================================
|
||||
|
||||
BRepPrim_Cone::BRepPrim_Cone(const Standard_Real Angle, const gp_Pnt& Apex)
|
||||
: BRepPrim_Revolution(gp_Ax2(Apex, gp_Dir(0, 0, 1), gp_Dir(1, 0, 0)), 0, RealLast()),
|
||||
: BRepPrim_Revolution(gp_Ax2(Apex, gp_Dir(gp_Dir::D::Z), gp_Dir(gp_Dir::D::X)), 0, RealLast()),
|
||||
myHalfAngle(Angle),
|
||||
myRadius(0.)
|
||||
{
|
||||
@@ -102,7 +102,7 @@ BRepPrim_Cone::BRepPrim_Cone(const gp_Pnt& Center,
|
||||
const Standard_Real R1,
|
||||
const Standard_Real R2,
|
||||
const Standard_Real H)
|
||||
: BRepPrim_Revolution(gp_Ax2(Center, gp_Dir(0, 0, 1), gp_Dir(1, 0, 0)), 0, 0)
|
||||
: BRepPrim_Revolution(gp_Ax2(Center, gp_Dir(gp_Dir::D::Z), gp_Dir(gp_Dir::D::X)), 0, 0)
|
||||
{
|
||||
SetParameters(R1, R2, H);
|
||||
SetMeridian();
|
||||
|
||||
@@ -48,7 +48,7 @@ BRepPrim_Cylinder::BRepPrim_Cylinder(const Standard_Real Radius)
|
||||
//=================================================================================================
|
||||
|
||||
BRepPrim_Cylinder::BRepPrim_Cylinder(const gp_Pnt& Center, const Standard_Real Radius)
|
||||
: BRepPrim_Revolution(gp_Ax2(Center, gp_Dir(0, 0, 1), gp_Dir(1, 0, 0)),
|
||||
: BRepPrim_Revolution(gp_Ax2(Center, gp_Dir(gp_Dir::D::Z), gp_Dir(gp_Dir::D::X)),
|
||||
RealFirst(),
|
||||
RealLast()),
|
||||
myRadius(Radius)
|
||||
@@ -79,7 +79,7 @@ BRepPrim_Cylinder::BRepPrim_Cylinder(const Standard_Real R, const Standard_Real
|
||||
BRepPrim_Cylinder::BRepPrim_Cylinder(const gp_Pnt& Center,
|
||||
const Standard_Real R,
|
||||
const Standard_Real H)
|
||||
: BRepPrim_Revolution(gp_Ax2(Center, gp_Dir(0, 0, 1), gp_Dir(1, 0, 0)), 0, H),
|
||||
: BRepPrim_Revolution(gp_Ax2(Center, gp_Dir(gp_Dir::D::Z), gp_Dir(gp_Dir::D::X)), 0, H),
|
||||
myRadius(R)
|
||||
{
|
||||
SetMeridian();
|
||||
@@ -104,6 +104,6 @@ void BRepPrim_Cylinder::SetMeridian()
|
||||
gp_Ax1 A = Axes().Axis();
|
||||
A.Translate(V);
|
||||
Handle(Geom_Line) L = new Geom_Line(A);
|
||||
Handle(Geom2d_Line) L2d = new Geom2d_Line(gp_Pnt2d(myRadius, 0), gp_Dir2d(0, 1));
|
||||
Handle(Geom2d_Line) L2d = new Geom2d_Line(gp_Pnt2d(myRadius, 0), gp_Dir2d(gp_Dir2d::D::Y));
|
||||
Meridian(L, L2d);
|
||||
}
|
||||
|
||||
@@ -102,13 +102,13 @@ void BRepPrim_FaceBuilder::Init(const BRep_Builder& B,
|
||||
|
||||
// set the pcurves
|
||||
Handle(Geom2d_Line) L;
|
||||
L = new Geom2d_Line(gp_Pnt2d(UMin, VMin), gp_Dir2d(1, 0));
|
||||
L = new Geom2d_Line(gp_Pnt2d(UMin, VMin), gp_Dir2d(gp_Dir2d::D::X));
|
||||
B.UpdateEdge(myEdges[0], L, myFace, Precision::Confusion());
|
||||
L = new Geom2d_Line(gp_Pnt2d(UMax, VMin), gp_Dir2d(0, 1));
|
||||
L = new Geom2d_Line(gp_Pnt2d(UMax, VMin), gp_Dir2d(gp_Dir2d::D::Y));
|
||||
B.UpdateEdge(myEdges[1], L, myFace, Precision::Confusion());
|
||||
L = new Geom2d_Line(gp_Pnt2d(UMax, VMax), gp_Dir2d(-1, 0));
|
||||
L = new Geom2d_Line(gp_Pnt2d(UMax, VMax), gp_Dir2d(gp_Dir2d::D::NX));
|
||||
B.UpdateEdge(myEdges[2], L, myFace, Precision::Confusion());
|
||||
L = new Geom2d_Line(gp_Pnt2d(UMin, VMax), gp_Dir2d(0, -1));
|
||||
L = new Geom2d_Line(gp_Pnt2d(UMin, VMax), gp_Dir2d(gp_Dir2d::D::NY));
|
||||
B.UpdateEdge(myEdges[3], L, myFace, Precision::Confusion());
|
||||
|
||||
// set the parameters
|
||||
|
||||
@@ -296,8 +296,8 @@ const TopoDS_Face& BRepPrim_OneAxis::LateralFace()
|
||||
// closed edge
|
||||
myBuilder.SetPCurve(myEdges[ETOP],
|
||||
myFaces[FLATERAL],
|
||||
gp_Lin2d(gp_Pnt2d(0, myVMin), gp_Dir2d(1, 0)),
|
||||
gp_Lin2d(gp_Pnt2d(0, myVMax), gp_Dir2d(1, 0)));
|
||||
gp_Lin2d(gp_Pnt2d(0, myVMin), gp_Dir2d(gp_Dir2d::D::X)),
|
||||
gp_Lin2d(gp_Pnt2d(0, myVMax), gp_Dir2d(gp_Dir2d::D::X)));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -305,7 +305,7 @@ const TopoDS_Face& BRepPrim_OneAxis::LateralFace()
|
||||
{
|
||||
myBuilder.SetPCurve(myEdges[ETOP],
|
||||
myFaces[FLATERAL],
|
||||
gp_Lin2d(gp_Pnt2d(0, myVMax), gp_Dir2d(1, 0)));
|
||||
gp_Lin2d(gp_Pnt2d(0, myVMax), gp_Dir2d(gp_Dir2d::D::X)));
|
||||
if (!HasSides() || MeridianOnAxis(myVMax))
|
||||
{
|
||||
// closed edge set parameters
|
||||
@@ -316,7 +316,7 @@ const TopoDS_Face& BRepPrim_OneAxis::LateralFace()
|
||||
{
|
||||
myBuilder.SetPCurve(myEdges[EBOTTOM],
|
||||
myFaces[FLATERAL],
|
||||
gp_Lin2d(gp_Pnt2d(0, myVMin), gp_Dir2d(1, 0)));
|
||||
gp_Lin2d(gp_Pnt2d(0, myVMin), gp_Dir2d(gp_Dir2d::D::X)));
|
||||
if (!HasSides() || MeridianOnAxis(myVMin))
|
||||
{
|
||||
// closed edge set parameters
|
||||
@@ -328,19 +328,19 @@ const TopoDS_Face& BRepPrim_OneAxis::LateralFace()
|
||||
{
|
||||
myBuilder.SetPCurve(myEdges[ESTART],
|
||||
myFaces[FLATERAL],
|
||||
gp_Lin2d(gp_Pnt2d(0, -myMeridianOffset), gp_Dir2d(0, 1)));
|
||||
gp_Lin2d(gp_Pnt2d(0, -myMeridianOffset), gp_Dir2d(gp_Dir2d::D::Y)));
|
||||
|
||||
myBuilder.SetPCurve(myEdges[EEND],
|
||||
myFaces[FLATERAL],
|
||||
gp_Lin2d(gp_Pnt2d(myAngle, -myMeridianOffset), gp_Dir2d(0, 1)));
|
||||
gp_Lin2d(gp_Pnt2d(myAngle, -myMeridianOffset), gp_Dir2d(gp_Dir2d::D::Y)));
|
||||
}
|
||||
else
|
||||
{
|
||||
// closed edge
|
||||
myBuilder.SetPCurve(myEdges[ESTART],
|
||||
myFaces[FLATERAL],
|
||||
gp_Lin2d(gp_Pnt2d(myAngle, -myMeridianOffset), gp_Dir2d(0, 1)),
|
||||
gp_Lin2d(gp_Pnt2d(0, -myMeridianOffset), gp_Dir2d(0, 1)));
|
||||
gp_Lin2d(gp_Pnt2d(myAngle, -myMeridianOffset), gp_Dir2d(gp_Dir2d::D::Y)),
|
||||
gp_Lin2d(gp_Pnt2d(0, -myMeridianOffset), gp_Dir2d(gp_Dir2d::D::Y)));
|
||||
}
|
||||
myBuilder.CompleteFace(myFaces[FLATERAL]);
|
||||
FacesBuilt[FLATERAL] = Standard_True;
|
||||
@@ -373,12 +373,12 @@ const TopoDS_Face& BRepPrim_OneAxis::TopFace()
|
||||
myBuilder.SetPCurve(
|
||||
myEdges[ETOP],
|
||||
myFaces[FTOP],
|
||||
gp_Circ2d(gp_Ax2d(gp_Pnt2d(0, 0), gp_Dir2d(1, 0)), MeridianValue(myVMax).X()));
|
||||
gp_Circ2d(gp_Ax2d(gp_Pnt2d(0, 0), gp_Dir2d(gp_Dir2d::D::X)), MeridianValue(myVMax).X()));
|
||||
if (HasSides())
|
||||
{
|
||||
myBuilder.SetPCurve(myEdges[ETOPSTART],
|
||||
myFaces[FTOP],
|
||||
gp_Lin2d(gp_Pnt2d(0, 0), gp_Dir2d(1, 0)));
|
||||
gp_Lin2d(gp_Pnt2d(0, 0), gp_Dir2d(gp_Dir2d::D::X)));
|
||||
myBuilder.SetPCurve(myEdges[ETOPEND],
|
||||
myFaces[FTOP],
|
||||
gp_Lin2d(gp_Pnt2d(0, 0), gp_Dir2d(Cos(myAngle), Sin(myAngle))));
|
||||
@@ -414,12 +414,12 @@ const TopoDS_Face& BRepPrim_OneAxis::BottomFace()
|
||||
myBuilder.SetPCurve(
|
||||
myEdges[EBOTTOM],
|
||||
myFaces[FBOTTOM],
|
||||
gp_Circ2d(gp_Ax2d(gp_Pnt2d(0, 0), gp_Dir2d(1, 0)), MeridianValue(myVMin).X()));
|
||||
gp_Circ2d(gp_Ax2d(gp_Pnt2d(0, 0), gp_Dir2d(gp_Dir2d::D::X)), MeridianValue(myVMin).X()));
|
||||
if (HasSides())
|
||||
{
|
||||
myBuilder.SetPCurve(myEdges[EBOTSTART],
|
||||
myFaces[FBOTTOM],
|
||||
gp_Lin2d(gp_Pnt2d(0, 0), gp_Dir2d(1, 0)));
|
||||
gp_Lin2d(gp_Pnt2d(0, 0), gp_Dir2d(gp_Dir2d::D::X)));
|
||||
myBuilder.SetPCurve(myEdges[EBOTEND],
|
||||
myFaces[FBOTTOM],
|
||||
gp_Lin2d(gp_Pnt2d(0, 0), gp_Dir2d(Cos(myAngle), Sin(myAngle))));
|
||||
@@ -456,15 +456,17 @@ const TopoDS_Face& BRepPrim_OneAxis::StartFace()
|
||||
if (EdgesBuilt[EAXIS])
|
||||
myBuilder.SetPCurve(myEdges[EAXIS],
|
||||
myFaces[FSTART],
|
||||
gp_Lin2d(gp_Pnt2d(0, 0), gp_Dir2d(0, 1)));
|
||||
gp_Lin2d(gp_Pnt2d(0, 0), gp_Dir2d(gp_Dir2d::D::Y)));
|
||||
if (EdgesBuilt[ETOPSTART])
|
||||
myBuilder.SetPCurve(myEdges[ETOPSTART],
|
||||
myFaces[FSTART],
|
||||
gp_Lin2d(gp_Pnt2d(0, MeridianValue(myVMax).Y()), gp_Dir2d(1, 0)));
|
||||
myBuilder.SetPCurve(
|
||||
myEdges[ETOPSTART],
|
||||
myFaces[FSTART],
|
||||
gp_Lin2d(gp_Pnt2d(0, MeridianValue(myVMax).Y()), gp_Dir2d(gp_Dir2d::D::X)));
|
||||
if (EdgesBuilt[EBOTSTART])
|
||||
myBuilder.SetPCurve(myEdges[EBOTSTART],
|
||||
myFaces[FSTART],
|
||||
gp_Lin2d(gp_Pnt2d(0, MeridianValue(myVMin).Y()), gp_Dir2d(1, 0)));
|
||||
myBuilder.SetPCurve(
|
||||
myEdges[EBOTSTART],
|
||||
myFaces[FSTART],
|
||||
gp_Lin2d(gp_Pnt2d(0, MeridianValue(myVMin).Y()), gp_Dir2d(gp_Dir2d::D::X)));
|
||||
|
||||
myBuilder.CompleteFace(myFaces[FSTART]);
|
||||
FacesBuilt[FSTART] = Standard_True;
|
||||
@@ -496,15 +498,19 @@ const TopoDS_Face& BRepPrim_OneAxis::EndFace()
|
||||
// parametric curves
|
||||
SetMeridianPCurve(myEdges[EEND], myFaces[FEND]);
|
||||
if (EdgesBuilt[EAXIS])
|
||||
myBuilder.SetPCurve(myEdges[EAXIS], myFaces[FEND], gp_Lin2d(gp_Pnt2d(0, 0), gp_Dir2d(0, 1)));
|
||||
myBuilder.SetPCurve(myEdges[EAXIS],
|
||||
myFaces[FEND],
|
||||
gp_Lin2d(gp_Pnt2d(0, 0), gp_Dir2d(gp_Dir2d::D::Y)));
|
||||
if (EdgesBuilt[ETOPEND])
|
||||
myBuilder.SetPCurve(myEdges[ETOPEND],
|
||||
myFaces[FEND],
|
||||
gp_Lin2d(gp_Pnt2d(0, MeridianValue(myVMax).Y()), gp_Dir2d(1, 0)));
|
||||
myBuilder.SetPCurve(
|
||||
myEdges[ETOPEND],
|
||||
myFaces[FEND],
|
||||
gp_Lin2d(gp_Pnt2d(0, MeridianValue(myVMax).Y()), gp_Dir2d(gp_Dir2d::D::X)));
|
||||
if (EdgesBuilt[EBOTEND])
|
||||
myBuilder.SetPCurve(myEdges[EBOTEND],
|
||||
myFaces[FEND],
|
||||
gp_Lin2d(gp_Pnt2d(0, MeridianValue(myVMin).Y()), gp_Dir2d(1, 0)));
|
||||
myBuilder.SetPCurve(
|
||||
myEdges[EBOTEND],
|
||||
myFaces[FEND],
|
||||
gp_Lin2d(gp_Pnt2d(0, MeridianValue(myVMin).Y()), gp_Dir2d(gp_Dir2d::D::X)));
|
||||
|
||||
myBuilder.CompleteFace(myFaces[FEND]);
|
||||
FacesBuilt[FEND] = Standard_True;
|
||||
|
||||
@@ -41,7 +41,7 @@ BRepPrim_Sphere::BRepPrim_Sphere(const Standard_Real Radius)
|
||||
//=================================================================================================
|
||||
|
||||
BRepPrim_Sphere::BRepPrim_Sphere(const gp_Pnt& Center, const Standard_Real Radius)
|
||||
: BRepPrim_Revolution(gp_Ax2(Center, gp_Dir(0, 0, 1), gp_Dir(1, 0, 0)), PMIN, PMAX),
|
||||
: BRepPrim_Revolution(gp_Ax2(Center, gp_Dir(gp_Dir::D::Z), gp_Dir(gp_Dir::D::X)), PMIN, PMAX),
|
||||
myRadius(Radius)
|
||||
{
|
||||
SetMeridian();
|
||||
@@ -78,7 +78,8 @@ void BRepPrim_Sphere::SetMeridian()
|
||||
gp_Dir D = Axes().YDirection();
|
||||
D.Reverse();
|
||||
gp_Ax2 A(Axes().Location(), D, Axes().XDirection());
|
||||
Handle(Geom_Circle) C = new Geom_Circle(A, myRadius);
|
||||
Handle(Geom2d_Circle) C2d = new Geom2d_Circle(gp_Ax2d(gp_Pnt2d(0, 0), gp_Dir2d(1, 0)), myRadius);
|
||||
Handle(Geom_Circle) C = new Geom_Circle(A, myRadius);
|
||||
Handle(Geom2d_Circle) C2d =
|
||||
new Geom2d_Circle(gp_Ax2d(gp_Pnt2d(0, 0), gp_Dir2d(gp_Dir2d::D::X)), myRadius);
|
||||
Meridian(C, C2d);
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@ BRepPrim_Torus::BRepPrim_Torus(const Standard_Real Major, const Standard_Real Mi
|
||||
BRepPrim_Torus::BRepPrim_Torus(const gp_Pnt& Center,
|
||||
const Standard_Real Major,
|
||||
const Standard_Real Minor)
|
||||
: BRepPrim_Revolution(gp_Ax2(Center, gp_Dir(0, 0, 1), gp_Dir(1, 0, 0)), 0, 2 * M_PI),
|
||||
: BRepPrim_Revolution(gp_Ax2(Center, gp_Dir(gp_Dir::D::Z), gp_Dir(gp_Dir::D::X)), 0, 2 * M_PI),
|
||||
myMajor(Major),
|
||||
myMinor(Minor)
|
||||
{
|
||||
@@ -82,6 +82,6 @@ void BRepPrim_Torus::SetMeridian()
|
||||
A.Translate(V);
|
||||
Handle(Geom_Circle) C = new Geom_Circle(A, myMinor);
|
||||
Handle(Geom2d_Circle) C2d =
|
||||
new Geom2d_Circle(gp_Ax2d(gp_Pnt2d(myMajor, 0), gp_Dir2d(1, 0)), myMinor);
|
||||
new Geom2d_Circle(gp_Ax2d(gp_Pnt2d(myMajor, 0), gp_Dir2d(gp_Dir2d::D::X)), myMinor);
|
||||
Meridian(C, C2d);
|
||||
}
|
||||
|
||||
@@ -42,7 +42,7 @@ inline gp_Pnt pmin(const gp_Pnt& p,
|
||||
BRepPrimAPI_MakeBox::BRepPrimAPI_MakeBox(const Standard_Real dx,
|
||||
const Standard_Real dy,
|
||||
const Standard_Real dz)
|
||||
: myWedge(gp_Ax2(pmin(gp_Pnt(0, 0, 0), dx, dy, dz), gp_Dir(0, 0, 1), gp_Dir(1, 0, 0)),
|
||||
: myWedge(gp_Ax2(pmin(gp_Pnt(0, 0, 0), dx, dy, dz), gp_Dir(gp_Dir::D::Z), gp_Dir(gp_Dir::D::X)),
|
||||
Abs(dx),
|
||||
Abs(dy),
|
||||
Abs(dz))
|
||||
@@ -55,7 +55,7 @@ BRepPrimAPI_MakeBox::BRepPrimAPI_MakeBox(const gp_Pnt& P,
|
||||
const Standard_Real dx,
|
||||
const Standard_Real dy,
|
||||
const Standard_Real dz)
|
||||
: myWedge(gp_Ax2(pmin(P, dx, dy, dz), gp_Dir(0, 0, 1), gp_Dir(1, 0, 0)),
|
||||
: myWedge(gp_Ax2(pmin(P, dx, dy, dz), gp_Dir(gp_Dir::D::Z), gp_Dir(gp_Dir::D::X)),
|
||||
Abs(dx),
|
||||
Abs(dy),
|
||||
Abs(dz))
|
||||
@@ -70,7 +70,7 @@ inline gp_Pnt pmin(const gp_Pnt& p1, const gp_Pnt& p2)
|
||||
}
|
||||
|
||||
BRepPrimAPI_MakeBox::BRepPrimAPI_MakeBox(const gp_Pnt& P1, const gp_Pnt& P2)
|
||||
: myWedge(gp_Ax2(pmin(P1, P2), gp_Dir(0, 0, 1), gp_Dir(1, 0, 0)),
|
||||
: myWedge(gp_Ax2(pmin(P1, P2), gp_Dir(gp_Dir::D::Z), gp_Dir(gp_Dir::D::X)),
|
||||
Abs(P2.X() - P1.X()),
|
||||
Abs(P2.Y() - P1.Y()),
|
||||
Abs(P2.Z() - P1.Z()))
|
||||
@@ -94,7 +94,7 @@ void BRepPrimAPI_MakeBox::Init(const Standard_Real theDX,
|
||||
const Standard_Real theDZ)
|
||||
{
|
||||
myWedge = BRepPrim_Wedge(
|
||||
gp_Ax2(pmin(gp_Pnt(0, 0, 0), theDX, theDY, theDZ), gp_Dir(0, 0, 1), gp_Dir(1, 0, 0)),
|
||||
gp_Ax2(pmin(gp_Pnt(0, 0, 0), theDX, theDY, theDZ), gp_Dir(gp_Dir::D::Z), gp_Dir(gp_Dir::D::X)),
|
||||
Abs(theDX),
|
||||
Abs(theDY),
|
||||
Abs(theDZ));
|
||||
@@ -107,21 +107,22 @@ void BRepPrimAPI_MakeBox::Init(const gp_Pnt& thePnt,
|
||||
const Standard_Real theDY,
|
||||
const Standard_Real theDZ)
|
||||
{
|
||||
myWedge =
|
||||
BRepPrim_Wedge(gp_Ax2(pmin(thePnt, theDX, theDY, theDZ), gp_Dir(0, 0, 1), gp_Dir(1, 0, 0)),
|
||||
Abs(theDX),
|
||||
Abs(theDY),
|
||||
Abs(theDZ));
|
||||
myWedge = BRepPrim_Wedge(
|
||||
gp_Ax2(pmin(thePnt, theDX, theDY, theDZ), gp_Dir(gp_Dir::D::Z), gp_Dir(gp_Dir::D::X)),
|
||||
Abs(theDX),
|
||||
Abs(theDY),
|
||||
Abs(theDZ));
|
||||
}
|
||||
|
||||
//=================================================================================================
|
||||
|
||||
void BRepPrimAPI_MakeBox::Init(const gp_Pnt& thePnt1, const gp_Pnt& thePnt2)
|
||||
{
|
||||
myWedge = BRepPrim_Wedge(gp_Ax2(pmin(thePnt1, thePnt2), gp_Dir(0, 0, 1), gp_Dir(1, 0, 0)),
|
||||
Abs(thePnt2.X() - thePnt1.X()),
|
||||
Abs(thePnt2.Y() - thePnt1.Y()),
|
||||
Abs(thePnt2.Z() - thePnt1.Z()));
|
||||
myWedge =
|
||||
BRepPrim_Wedge(gp_Ax2(pmin(thePnt1, thePnt2), gp_Dir(gp_Dir::D::Z), gp_Dir(gp_Dir::D::X)),
|
||||
Abs(thePnt2.X() - thePnt1.X()),
|
||||
Abs(thePnt2.Y() - thePnt1.Y()),
|
||||
Abs(thePnt2.Z() - thePnt1.Z()));
|
||||
}
|
||||
|
||||
//=================================================================================================
|
||||
|
||||
@@ -52,7 +52,7 @@ BRepPrimAPI_MakeRevolution::BRepPrimAPI_MakeRevolution(const Handle(Geom_Curve)&
|
||||
|
||||
BRepPrimAPI_MakeRevolution::BRepPrimAPI_MakeRevolution(const Handle(Geom_Curve)& Meridian,
|
||||
const Standard_Real angle)
|
||||
: myRevolution(gp_Ax2(gp_Pnt(0, 0, 0), gp_Dir(0, 0, 1), gp_Dir(1, 0, 0)),
|
||||
: myRevolution(gp_Ax2(gp_Pnt(0, 0, 0), gp_Dir(gp_Dir::D::Z), gp_Dir(gp_Dir::D::X)),
|
||||
Meridian->FirstParameter(),
|
||||
Meridian->LastParameter(),
|
||||
Meridian,
|
||||
@@ -66,7 +66,7 @@ BRepPrimAPI_MakeRevolution::BRepPrimAPI_MakeRevolution(const Handle(Geom_Curve)&
|
||||
BRepPrimAPI_MakeRevolution::BRepPrimAPI_MakeRevolution(const Handle(Geom_Curve)& Meridian,
|
||||
const Standard_Real VMin,
|
||||
const Standard_Real VMax)
|
||||
: myRevolution(gp_Ax2(gp_Pnt(0, 0, 0), gp_Dir(0, 0, 1), gp_Dir(1, 0, 0)),
|
||||
: myRevolution(gp_Ax2(gp_Pnt(0, 0, 0), gp_Dir(gp_Dir::D::Z), gp_Dir(gp_Dir::D::X)),
|
||||
VMin,
|
||||
VMax,
|
||||
Meridian,
|
||||
@@ -80,7 +80,7 @@ BRepPrimAPI_MakeRevolution::BRepPrimAPI_MakeRevolution(const Handle(Geom_Curve)&
|
||||
const Standard_Real VMin,
|
||||
const Standard_Real VMax,
|
||||
const Standard_Real angle)
|
||||
: myRevolution(gp_Ax2(gp_Pnt(0, 0, 0), gp_Dir(0, 0, 1), gp_Dir(1, 0, 0)),
|
||||
: myRevolution(gp_Ax2(gp_Pnt(0, 0, 0), gp_Dir(gp_Dir::D::Z), gp_Dir(gp_Dir::D::X)),
|
||||
VMin,
|
||||
VMax,
|
||||
Meridian,
|
||||
|
||||
@@ -63,7 +63,7 @@ BRepPrimAPI_MakeSphere::BRepPrimAPI_MakeSphere(const Standard_Real R,
|
||||
//=================================================================================================
|
||||
|
||||
BRepPrimAPI_MakeSphere::BRepPrimAPI_MakeSphere(const gp_Pnt& Center, const Standard_Real R)
|
||||
: mySphere(gp_Ax2(Center, gp_Dir(0, 0, 1), gp_Dir(1, 0, 0)), R)
|
||||
: mySphere(gp_Ax2(Center, gp_Dir(gp_Dir::D::Z), gp_Dir(gp_Dir::D::X)), R)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -72,7 +72,7 @@ BRepPrimAPI_MakeSphere::BRepPrimAPI_MakeSphere(const gp_Pnt& Center, const Stand
|
||||
BRepPrimAPI_MakeSphere::BRepPrimAPI_MakeSphere(const gp_Pnt& Center,
|
||||
const Standard_Real R,
|
||||
const Standard_Real angle)
|
||||
: mySphere(gp_Ax2(Center, gp_Dir(0, 0, 1), gp_Dir(1, 0, 0)), R)
|
||||
: mySphere(gp_Ax2(Center, gp_Dir(gp_Dir::D::Z), gp_Dir(gp_Dir::D::X)), R)
|
||||
{
|
||||
mySphere.Angle(angle);
|
||||
}
|
||||
@@ -83,7 +83,7 @@ BRepPrimAPI_MakeSphere::BRepPrimAPI_MakeSphere(const gp_Pnt& Center,
|
||||
const Standard_Real R,
|
||||
const Standard_Real angle1,
|
||||
const Standard_Real angle2)
|
||||
: mySphere(gp_Ax2(Center, gp_Dir(0, 0, 1), gp_Dir(1, 0, 0)), R)
|
||||
: mySphere(gp_Ax2(Center, gp_Dir(gp_Dir::D::Z), gp_Dir(gp_Dir::D::X)), R)
|
||||
{
|
||||
mySphere.VMin(angle1);
|
||||
mySphere.VMax(angle2);
|
||||
@@ -96,7 +96,7 @@ BRepPrimAPI_MakeSphere::BRepPrimAPI_MakeSphere(const gp_Pnt& Center,
|
||||
const Standard_Real angle1,
|
||||
const Standard_Real angle2,
|
||||
const Standard_Real angle3)
|
||||
: mySphere(gp_Ax2(Center, gp_Dir(0, 0, 1), gp_Dir(1, 0, 0)), R)
|
||||
: mySphere(gp_Ax2(Center, gp_Dir(gp_Dir::D::Z), gp_Dir(gp_Dir::D::X)), R)
|
||||
{
|
||||
mySphere.VMin(angle1);
|
||||
mySphere.VMax(angle2);
|
||||
|
||||
@@ -26,7 +26,7 @@ BRepPrimAPI_MakeWedge::BRepPrimAPI_MakeWedge(const Standard_Real dx,
|
||||
const Standard_Real dy,
|
||||
const Standard_Real dz,
|
||||
const Standard_Real ltx)
|
||||
: myWedge(gp_Ax2(gp_Pnt(0, 0, 0), gp_Dir(0, 0, 1), gp_Dir(1, 0, 0)), dx, dy, dz, ltx)
|
||||
: myWedge(gp_Ax2(gp_Pnt(0, 0, 0), gp_Dir(gp_Dir::D::Z), gp_Dir(gp_Dir::D::X)), dx, dy, dz, ltx)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -50,7 +50,7 @@ BRepPrimAPI_MakeWedge::BRepPrimAPI_MakeWedge(const Standard_Real dx,
|
||||
const Standard_Real zmin,
|
||||
const Standard_Real xmax,
|
||||
const Standard_Real zmax)
|
||||
: myWedge(gp_Ax2(gp_Pnt(0, 0, 0), gp_Dir(0, 0, 1), gp_Dir(1, 0, 0)),
|
||||
: myWedge(gp_Ax2(gp_Pnt(0, 0, 0), gp_Dir(gp_Dir::D::Z), gp_Dir(gp_Dir::D::X)),
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
|
||||
@@ -350,7 +350,7 @@ void BRepSweep_Translation::SetGeneratingPCurve(const TopoDS_Shape& aNewFace,
|
||||
if (aDirV.Index() == 2)
|
||||
v = -myVec.Magnitude();
|
||||
L.SetLocation(gp_Pnt2d(0, v));
|
||||
L.SetDirection(gp_Dir2d(1, 0));
|
||||
L.SetDirection(gp_Dir2d(gp_Dir2d::D::X));
|
||||
// }
|
||||
Handle(Geom2d_Line) GL = new Geom2d_Line(L);
|
||||
SetThePCurve(myBuilder.Builder(), TopoDS::Edge(aNewEdge), TopoDS::Face(aNewFace), orien, GL);
|
||||
@@ -372,7 +372,7 @@ void BRepSweep_Translation::SetDirectingPCurve(const TopoDS_Shape& aNewFace,
|
||||
if (AS.GetType() != GeomAbs_Plane)
|
||||
{
|
||||
L.SetLocation(gp_Pnt2d(BRep_Tool::Parameter(TopoDS::Vertex(aGenV), TopoDS::Edge(aGenE)), 0));
|
||||
L.SetDirection(gp_Dir2d(0, -1));
|
||||
L.SetDirection(gp_Dir2d(gp_Dir2d::D::NY));
|
||||
/* JAG
|
||||
}
|
||||
else{
|
||||
|
||||
Reference in New Issue
Block a user