]> OCCT Git - occt.git/commitdiff
Foundation Classes, gp - Add constexpr/noexcept constructors and standard direction...
authorPasukhin Dmitry <dpasukhi@opencascade.com>
Tue, 4 Nov 2025 16:21:59 +0000 (16:21 +0000)
committerGitHub <noreply@github.com>
Tue, 4 Nov 2025 16:21:59 +0000 (16:21 +0000)
- 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

203 files changed:
src/DataExchange/TKDEIGES/BRepToIGES/BRepToIGES_BRShell.cxx
src/DataExchange/TKDEIGES/GeomToIGES/GeomToIGES_GeomSurface.cxx
src/DataExchange/TKDEIGES/IGESGeom/IGESGeom_CircularArc.cxx
src/DataExchange/TKDEIGES/IGESGeom/IGESGeom_ConicArc.cxx
src/DataExchange/TKDEIGES/IGESGeom/IGESGeom_ToolConicArc.cxx
src/DataExchange/TKDEIGES/IGESToBRep/IGESToBRep_TopoSurface.cxx
src/DataExchange/TKDESTEP/GeomToStep/GeomToStep_MakeAxis2Placement3d.cxx
src/DataExchange/TKDESTEP/STEPControl/STEPControl_ActorRead.cxx
src/DataExchange/TKDESTEP/StepToGeom/StepToGeom.cxx
src/DataExchange/TKDESTL/GTests/DESTL_Provider_Test.cxx
src/DataExchange/TKDEVRML/GTests/DEVRML_Provider_Test.cxx
src/DataExchange/TKDEVRML/VrmlConverter/VrmlConverter_Projector.cxx
src/DataExchange/TKDEVRML/VrmlData/VrmlData_Geometry.cxx
src/Draw/TKDCAF/DNaming/DNaming_SphereDriver.cxx
src/Draw/TKDraw/DBRep/DBRep_IsoBuilder.cxx
src/Draw/TKDraw/Draw/Draw_Axis2D.cxx
src/Draw/TKDraw/Draw/Draw_View.cxx
src/Draw/TKQADraw/QABugs/QABugs_10.cxx
src/Draw/TKQADraw/QABugs/QABugs_11.cxx
src/Draw/TKQADraw/QABugs/QABugs_14.cxx
src/Draw/TKQADraw/QABugs/QABugs_16.cxx
src/Draw/TKQADraw/QABugs/QABugs_17.cxx
src/Draw/TKQADraw/QABugs/QABugs_19.cxx
src/Draw/TKQADraw/QABugs/QABugs_20.cxx
src/Draw/TKQADraw/QABugs/QABugs_3.cxx
src/Draw/TKQADraw/QABugs/QABugs_9.cxx
src/Draw/TKQADraw/QABugs/QABugs_PresentableObject.cxx
src/Draw/TKTopTest/BRepTest/BRepTest_CurveCommands.cxx
src/Draw/TKTopTest/BRepTest/BRepTest_HelixCommands.cxx
src/Draw/TKTopTest/GeometryTest/GeometryTest_CurveCommands.cxx
src/Draw/TKTopTest/GeometryTest/GeometryTest_CurveTanCommands.cxx
src/Draw/TKTopTest/GeomliteTest/GeomliteTest_CurveCommands.cxx
src/Draw/TKTopTest/GeomliteTest/GeomliteTest_SurfaceCommands.cxx
src/Draw/TKViewerTest/ViewerTest/ViewerTest_ObjectCommands.cxx
src/Draw/TKViewerTest/ViewerTest/ViewerTest_RelationCommands.cxx
src/Draw/TKViewerTest/ViewerTest/ViewerTest_ViewerCommands.cxx
src/FoundationClasses/TKMath/Bnd/Bnd_OBB.cxx
src/FoundationClasses/TKMath/GTests/Bnd_BoundSortBox_Test.cxx
src/FoundationClasses/TKMath/GTests/Bnd_Box_Test.cxx
src/FoundationClasses/TKMath/GTests/ElCLib_Test.cxx
src/FoundationClasses/TKMath/gp/gp.cxx
src/FoundationClasses/TKMath/gp/gp.hxx
src/FoundationClasses/TKMath/gp/gp_Ax1.hxx
src/FoundationClasses/TKMath/gp/gp_Ax2.hxx
src/FoundationClasses/TKMath/gp/gp_Ax22d.hxx
src/FoundationClasses/TKMath/gp/gp_Ax2d.hxx
src/FoundationClasses/TKMath/gp/gp_Ax3.hxx
src/FoundationClasses/TKMath/gp/gp_Circ.hxx
src/FoundationClasses/TKMath/gp/gp_Circ2d.hxx
src/FoundationClasses/TKMath/gp/gp_Cone.hxx
src/FoundationClasses/TKMath/gp/gp_Cylinder.hxx
src/FoundationClasses/TKMath/gp/gp_Dir.hxx
src/FoundationClasses/TKMath/gp/gp_Dir2d.hxx
src/FoundationClasses/TKMath/gp/gp_Elips.hxx
src/FoundationClasses/TKMath/gp/gp_Elips2d.hxx
src/FoundationClasses/TKMath/gp/gp_Hypr.hxx
src/FoundationClasses/TKMath/gp/gp_Hypr2d.hxx
src/FoundationClasses/TKMath/gp/gp_Lin.hxx
src/FoundationClasses/TKMath/gp/gp_Parab.hxx
src/FoundationClasses/TKMath/gp/gp_Parab2d.hxx
src/FoundationClasses/TKMath/gp/gp_Pln.hxx
src/FoundationClasses/TKMath/gp/gp_Sphere.hxx
src/FoundationClasses/TKMath/gp/gp_Torus.hxx
src/FoundationClasses/TKernel/GTests/Standard_Dump_Test.cxx
src/ModelingAlgorithms/TKBO/BOPAlgo/BOPAlgo_WireSplitter_1.cxx
src/ModelingAlgorithms/TKBO/BOPTools/BOPTools_AlgoTools3D.cxx
src/ModelingAlgorithms/TKBO/GTests/BOPTest_Utilities.pxx
src/ModelingAlgorithms/TKBO/GTests/BRepAlgoAPI_Cut_Test.cxx
src/ModelingAlgorithms/TKBO/GTests/BRepAlgoAPI_Cut_Test_1.cxx
src/ModelingAlgorithms/TKBO/GTests/BRepAlgoAPI_Fuse_Test.cxx
src/ModelingAlgorithms/TKBO/IntTools/IntTools_FaceFace.cxx
src/ModelingAlgorithms/TKBool/BRepFill/BRepFill.cxx
src/ModelingAlgorithms/TKBool/BRepFill/BRepFill_Evolved.cxx
src/ModelingAlgorithms/TKBool/BRepFill/BRepFill_Generator.cxx
src/ModelingAlgorithms/TKBool/BRepFill/BRepFill_ShapeLaw.cxx
src/ModelingAlgorithms/TKBool/TopOpeBRepBuild/TopOpeBRepBuild_GridSS.cxx
src/ModelingAlgorithms/TKBool/TopOpeBRepBuild/TopOpeBRepBuild_WireEdgeSet.cxx
src/ModelingAlgorithms/TKBool/TopOpeBRepDS/TopOpeBRepDS_BuildTool.cxx
src/ModelingAlgorithms/TKBool/TopOpeBRepDS/TopOpeBRepDS_FaceInterferenceTool.cxx
src/ModelingAlgorithms/TKBool/TopOpeBRepTool/TopOpeBRepTool_CurveTool.cxx
src/ModelingAlgorithms/TKBool/TopOpeBRepTool/TopOpeBRepTool_GEOMETRY.cxx
src/ModelingAlgorithms/TKBool/TopOpeBRepTool/TopOpeBRepTool_ShapeTool.cxx
src/ModelingAlgorithms/TKBool/TopOpeBRepTool/TopOpeBRepTool_matter.cxx
src/ModelingAlgorithms/TKFeat/BRepFeat/BRepFeat_RibSlot.cxx
src/ModelingAlgorithms/TKFillet/BlendFunc/BlendFunc.cxx
src/ModelingAlgorithms/TKGeomAlgo/GccAna/GccAna_Circ2d2TanOn.cxx
src/ModelingAlgorithms/TKGeomAlgo/GccAna/GccAna_Circ2d2TanOn_1.cxx
src/ModelingAlgorithms/TKGeomAlgo/GccAna/GccAna_Circ2d2TanOn_10.cxx
src/ModelingAlgorithms/TKGeomAlgo/GccAna/GccAna_Circ2d2TanOn_11.cxx
src/ModelingAlgorithms/TKGeomAlgo/GccAna/GccAna_Circ2d2TanOn_2.cxx
src/ModelingAlgorithms/TKGeomAlgo/GccAna/GccAna_Circ2d2TanOn_3.cxx
src/ModelingAlgorithms/TKGeomAlgo/GccAna/GccAna_Circ2d2TanOn_4.cxx
src/ModelingAlgorithms/TKGeomAlgo/GccAna/GccAna_Circ2d2TanOn_5.cxx
src/ModelingAlgorithms/TKGeomAlgo/GccAna/GccAna_Circ2d2TanOn_6.cxx
src/ModelingAlgorithms/TKGeomAlgo/GccAna/GccAna_Circ2d2TanOn_7.cxx
src/ModelingAlgorithms/TKGeomAlgo/GccAna/GccAna_Circ2d2TanOn_8.cxx
src/ModelingAlgorithms/TKGeomAlgo/GccAna/GccAna_Circ2d2TanOn_9.cxx
src/ModelingAlgorithms/TKGeomAlgo/GccAna/GccAna_Circ2d2TanRad.cxx
src/ModelingAlgorithms/TKGeomAlgo/GccAna/GccAna_Circ2d2TanRad_1.cxx
src/ModelingAlgorithms/TKGeomAlgo/GccAna/GccAna_Circ2d2TanRad_2.cxx
src/ModelingAlgorithms/TKGeomAlgo/GccAna/GccAna_Circ2d2TanRad_3.cxx
src/ModelingAlgorithms/TKGeomAlgo/GccAna/GccAna_Circ2d2TanRad_4.cxx
src/ModelingAlgorithms/TKGeomAlgo/GccAna/GccAna_Circ2d2TanRad_5.cxx
src/ModelingAlgorithms/TKGeomAlgo/GccAna/GccAna_Circ2d3Tan.cxx
src/ModelingAlgorithms/TKGeomAlgo/GccAna/GccAna_Circ2d3Tan_1.cxx
src/ModelingAlgorithms/TKGeomAlgo/GccAna/GccAna_Circ2d3Tan_2.cxx
src/ModelingAlgorithms/TKGeomAlgo/GccAna/GccAna_Circ2d3Tan_3.cxx
src/ModelingAlgorithms/TKGeomAlgo/GccAna/GccAna_Circ2d3Tan_4.cxx
src/ModelingAlgorithms/TKGeomAlgo/GccAna/GccAna_Circ2d3Tan_5.cxx
src/ModelingAlgorithms/TKGeomAlgo/GccAna/GccAna_Circ2d3Tan_6.cxx
src/ModelingAlgorithms/TKGeomAlgo/GccAna/GccAna_Circ2d3Tan_7.cxx
src/ModelingAlgorithms/TKGeomAlgo/GccAna/GccAna_Circ2d3Tan_8.cxx
src/ModelingAlgorithms/TKGeomAlgo/GccAna/GccAna_Circ2d3Tan_9.cxx
src/ModelingAlgorithms/TKGeomAlgo/GccAna/GccAna_Circ2dBisec.cxx
src/ModelingAlgorithms/TKGeomAlgo/GccAna/GccAna_Circ2dTanCen.cxx
src/ModelingAlgorithms/TKGeomAlgo/GccAna/GccAna_Circ2dTanOnRad.cxx
src/ModelingAlgorithms/TKGeomAlgo/GccAna/GccAna_Circ2dTanOnRad_1.cxx
src/ModelingAlgorithms/TKGeomAlgo/GccAna/GccAna_Circ2dTanOnRad_2.cxx
src/ModelingAlgorithms/TKGeomAlgo/GccAna/GccAna_Circ2dTanOnRad_3.cxx
src/ModelingAlgorithms/TKGeomAlgo/GccAna/GccAna_Circ2dTanOnRad_4.cxx
src/ModelingAlgorithms/TKGeomAlgo/GccAna/GccAna_Circ2dTanOnRad_5.cxx
src/ModelingAlgorithms/TKGeomAlgo/GccAna/GccAna_CircPnt2dBisec.cxx
src/ModelingAlgorithms/TKGeomAlgo/Geom2dGcc/Geom2dGcc_Circ2d2TanOnGeo.cxx
src/ModelingAlgorithms/TKGeomAlgo/Geom2dGcc/Geom2dGcc_Circ2d2TanOnIter.cxx
src/ModelingAlgorithms/TKGeomAlgo/Geom2dGcc/Geom2dGcc_Circ2d2TanRadGeo.cxx
src/ModelingAlgorithms/TKGeomAlgo/Geom2dGcc/Geom2dGcc_Circ2d3TanIter.cxx
src/ModelingAlgorithms/TKGeomAlgo/Geom2dGcc/Geom2dGcc_Circ2dTanCenGeo.cxx
src/ModelingAlgorithms/TKGeomAlgo/Geom2dGcc/Geom2dGcc_Circ2dTanOnRadGeo.cxx
src/ModelingAlgorithms/TKGeomAlgo/Geom2dHatch/Geom2dHatch_Elements.cxx
src/ModelingAlgorithms/TKGeomAlgo/GeomFill/GeomFill.cxx
src/ModelingAlgorithms/TKGeomAlgo/GeomFill/GeomFill_Sweep.cxx
src/ModelingAlgorithms/TKGeomAlgo/GeomInt/GeomInt_IntSS_1.cxx
src/ModelingAlgorithms/TKGeomAlgo/Hatch/Hatch_Hatcher.cxx
src/ModelingAlgorithms/TKGeomAlgo/IntWalk/IntWalk_PWalking.cxx
src/ModelingAlgorithms/TKGeomAlgo/Intf/Intf_Tool.cxx
src/ModelingAlgorithms/TKHLR/Contap/Contap_ArcFunction.cxx
src/ModelingAlgorithms/TKHLR/Contap/Contap_SurfFunction.cxx
src/ModelingAlgorithms/TKHLR/HLRAlgo/HLRAlgo_Projector.cxx
src/ModelingAlgorithms/TKHLR/HLRBRep/HLRBRep_Data.cxx
src/ModelingAlgorithms/TKHLR/HLRTopoBRep/HLRTopoBRep_FaceIsoLiner.cxx
src/ModelingAlgorithms/TKHelix/GTests/HelixBRep_BuilderHelix_Integration_Test.cxx
src/ModelingAlgorithms/TKHelix/GTests/HelixBRep_BuilderHelix_Test.cxx
src/ModelingAlgorithms/TKHelix/GTests/HelixGeom_BuilderHelix_Test.cxx
src/ModelingAlgorithms/TKOffset/BRepOffset/BRepOffset_Inter2d.cxx
src/ModelingAlgorithms/TKOffset/BRepOffset/BRepOffset_MakeOffset.cxx
src/ModelingAlgorithms/TKOffset/BRepOffset/BRepOffset_MakeSimpleOffset.cxx
src/ModelingAlgorithms/TKOffset/BRepOffset/BRepOffset_Offset.cxx
src/ModelingAlgorithms/TKOffset/BRepOffset/BRepOffset_Tool.cxx
src/ModelingAlgorithms/TKOffset/BRepOffsetAPI/BRepOffsetAPI_ThruSections.cxx
src/ModelingAlgorithms/TKPrim/BRepPrim/BRepPrim_Cone.cxx
src/ModelingAlgorithms/TKPrim/BRepPrim/BRepPrim_Cylinder.cxx
src/ModelingAlgorithms/TKPrim/BRepPrim/BRepPrim_FaceBuilder.cxx
src/ModelingAlgorithms/TKPrim/BRepPrim/BRepPrim_OneAxis.cxx
src/ModelingAlgorithms/TKPrim/BRepPrim/BRepPrim_Sphere.cxx
src/ModelingAlgorithms/TKPrim/BRepPrim/BRepPrim_Torus.cxx
src/ModelingAlgorithms/TKPrim/BRepPrimAPI/BRepPrimAPI_MakeBox.cxx
src/ModelingAlgorithms/TKPrim/BRepPrimAPI/BRepPrimAPI_MakeRevolution.cxx
src/ModelingAlgorithms/TKPrim/BRepPrimAPI/BRepPrimAPI_MakeSphere.cxx
src/ModelingAlgorithms/TKPrim/BRepPrimAPI/BRepPrimAPI_MakeWedge.cxx
src/ModelingAlgorithms/TKPrim/BRepSweep/BRepSweep_Translation.cxx
src/ModelingAlgorithms/TKShHealing/GTests/ShapeAnalysis_CanonicalRecognition_Test.cxx
src/ModelingAlgorithms/TKShHealing/ShapeBuild/ShapeBuild_Edge.cxx
src/ModelingAlgorithms/TKShHealing/ShapeFix/ShapeFix_ComposeShell.cxx
src/ModelingAlgorithms/TKShHealing/ShapeFix/ShapeFix_EdgeProjAux.cxx
src/ModelingAlgorithms/TKShHealing/ShapeFix/ShapeFix_Face.cxx
src/ModelingAlgorithms/TKShHealing/ShapeFix/ShapeFix_Wire.cxx
src/ModelingAlgorithms/TKTopAlgo/BRepBuilderAPI/BRepBuilderAPI_FastSewing.cxx
src/ModelingAlgorithms/TKTopAlgo/BRepClass/BRepClass_FaceExplorer.cxx
src/ModelingAlgorithms/TKTopAlgo/BRepLib/BRepLib_MakeFace.cxx
src/ModelingAlgorithms/TKTopAlgo/BRepLib/BRepLib_MakeShell.cxx
src/ModelingAlgorithms/TKTopAlgo/Bisector/Bisector_BisecAna.cxx
src/ModelingData/TKBRep/BinTools/BinTools_Curve2dSet.cxx
src/ModelingData/TKBRep/BinTools/BinTools_CurveSet.cxx
src/ModelingData/TKBRep/BinTools/BinTools_SurfaceSet.cxx
src/ModelingData/TKG2d/GTests/Geom2d_OffsetCurve_Test.cxx
src/ModelingData/TKG3d/Adaptor3d/Adaptor3d_TopolTool.cxx
src/ModelingData/TKG3d/GTests/Geom_OffsetCurve_Test.cxx
src/ModelingData/TKG3d/GTests/Geom_OffsetSurface_Test.cxx
src/ModelingData/TKGeomBase/BndLib/BndLib.cxx
src/ModelingData/TKGeomBase/Extrema/Extrema_ExtElC.cxx
src/ModelingData/TKGeomBase/GTests/IntAna_IntQuadQuad_Test.cxx
src/ModelingData/TKGeomBase/Geom2dConvert/Geom2dConvert_ApproxArcsSegments.cxx
src/ModelingData/TKGeomBase/GeomConvert/GeomConvert_Units.cxx
src/ModelingData/TKGeomBase/GeomTools/GeomTools_Curve2dSet.cxx
src/ModelingData/TKGeomBase/GeomTools/GeomTools_CurveSet.cxx
src/ModelingData/TKGeomBase/GeomTools/GeomTools_SurfaceSet.cxx
src/ModelingData/TKGeomBase/IntAna/IntAna_IntConicQuad.cxx
src/ModelingData/TKGeomBase/ProjLib/ProjLib_CompProjectedCurve.cxx
src/ModelingData/TKGeomBase/ProjLib/ProjLib_ComputeApprox.cxx
src/ModelingData/TKGeomBase/gce/gce_MakeCirc.cxx
src/ModelingData/TKGeomBase/gce/gce_MakeCirc2d.cxx
src/Visualization/TKMeshVS/MeshVS/MeshVS_NodalColorPrsBuilder.cxx
src/Visualization/TKMeshVS/MeshVS/MeshVS_VectorPrsBuilder.cxx
src/Visualization/TKService/GTests/Graphic3d_BndBox_Test.cxx
src/Visualization/TKService/Graphic3d/Graphic3d_Camera.cxx
src/Visualization/TKV3d/AIS/AIS_Manipulator.cxx
src/Visualization/TKV3d/AIS/AIS_TextLabel.cxx
src/Visualization/TKV3d/DsgPrs/DsgPrs_EqualDistancePresentation.cxx
src/Visualization/TKV3d/Prs3d/Prs3d_ToolDisk.hxx
src/Visualization/TKV3d/Prs3d/Prs3d_ToolSector.hxx
src/Visualization/TKV3d/SelectMgr/SelectMgr_TriangularFrustumSet.cxx
src/Visualization/TKV3d/V3d/V3d_Viewer.cxx
tests/lowalgos/intss/bug24676

index d2e8a295027d38e5e31ef25eb2fd410efeb3178a..14f60ca10c2b93103018dbde3e3da28de14a52f4 100644 (file)
@@ -172,7 +172,7 @@ Handle(IGESData_IGESEntity) BRepToIGES_BRShell ::TransferFace(const TopoDS_Face&
     aSurf->Bounds(U1, U2, V1, V2);
     Standard_Real aCenter = 0.5 * (U1 + U2);
     gp_Trsf2d     T;
-    gp_Ax2d       axis(gp_Pnt2d(aCenter, V1), gp_Dir2d(0., 1.));
+    gp_Ax2d       axis(gp_Pnt2d(aCenter, V1), gp_Dir2d(gp_Dir2d::D::Y));
     T.SetMirror(axis);
     NCollection_Map<TopoDS_Shape, TopTools_ShapeMapHasher> aMap(101, new NCollection_IncAllocator);
     for (ex.Init(start, TopAbs_EDGE); ex.More(); ex.Next())
index 3c34365c74d787cde4b57377d747c9b9da15bd9d..70733574b33c81fe53ac2ab34a62e7409d6a24c8 100644 (file)
@@ -680,7 +680,7 @@ Handle(IGESData_IGESEntity) GeomToIGES_GeomSurface::TransferSurface(
 
   // creation of the generatrix : Generatrix
   Handle(Geom_Line) Ligne =
-    new Geom_Line(gp_Pnt(start->Cylinder().Radius(), 0.0, 0.0), gp_Dir(0.0, 0.0, 1.0));
+    new Geom_Line(gp_Pnt(start->Cylinder().Radius(), 0.0, 0.0), gp_Dir(gp_Dir::D::Z));
   GeomToIGES_GeomCurve        GC(*this);
   Handle(IGESData_IGESEntity) Generatrix = GC.TransferCurve(Ligne, V1, V2);
   gp_Pnt                      gen1       = Ligne->Value(V1);
index acbcfa7f9de1373d434e2744c93854e9f61cd16e..46a47ca9f40ae574d3d7a2479e738f7ef6171f28 100644 (file)
@@ -122,7 +122,7 @@ Standard_Real IGESGeom_CircularArc::Angle() const
 
 gp_Dir IGESGeom_CircularArc::Axis() const
 {
-  gp_Dir axis(0.0, 0.0, 1.0);
+  gp_Dir axis(gp_Dir::D::Z);
   return axis;
 }
 
index 0bbc19c46c6222621824742b98b90b80c3a95678..94006e0775cbd5f4aed468ad8cea6be46ee3140c 100644 (file)
@@ -170,7 +170,7 @@ Standard_Boolean IGESGeom_ConicArc::IsClosed() const
 
 gp_Dir IGESGeom_ConicArc::Axis() const
 {
-  gp_Dir axis(0.0, 0.0, 1.0);
+  gp_Dir axis(gp_Dir::D::Z);
   return axis;
 }
 
index b8f84d81280b142b79714ea0316fc990e6a4e5ca..8f3f4b5a9af365d6c578d87cfc60a67a825f9089 100644 (file)
@@ -222,7 +222,7 @@ void IGESGeom_ToolConicArc::OwnCheck(const Handle(IGESGeom_ConicArc)& ent,
       {
         Standard_Real xc = -D / (2 * A);
         Standard_Real yc = -E / (2 * C);
-        gp_Dir2d d0(1, 0);
+        gp_Dir2d d0(gp_Dir2d::D::X);
         gp_Dir2d d1(ent->StartPoint().X() - xc, ent->StartPoint().Y() - yc);
         gp_Dir2d d2(ent->EndPoint().X()   - xc, ent->EndPoint().Y()   - yc);
         Standard_Real t1 = d0.Angle(d1);
@@ -237,7 +237,7 @@ void IGESGeom_ToolConicArc::OwnCheck(const Handle(IGESGeom_ConicArc)& ent,
       {
         Standard_Real xc = -D / (2 * A);
         Standard_Real yc = -E / (2 * C);
-        gp_Dir2d d0(1, 0);
+        gp_Dir2d d0(gp_Dir2d::D::X);
         gp_Dir2d d1(ent->StartPoint().X() - xc, ent->StartPoint().Y() - yc);
         gp_Dir2d d2(ent->EndPoint().X()   - xc, ent->EndPoint().Y()   - yc);
         Standard_Real t1 = d0.Angle(d1);
index b988f556a0d3912a1c52b2f8e47d9d8b74662d2a..c386bff76fac0a20683809ef036a625aa6441d17 100644 (file)
@@ -1897,9 +1897,9 @@ TopoDS_Shape IGESToBRep_TopoSurface::ParamSurface(const Handle(IGESData_IGESEnti
       {
         DeclareAndCast(IGESGeom_CircularArc, circ, generatrix);
         gp_Pnt2d startpoint = circ->StartPoint();
-        paramv -=
-          ElCLib::Parameter(gp_Circ2d(gp_Ax2d(circ->Center(), gp_Dir2d(1, 0)), circ->Radius()),
-                            startpoint);
+        paramv -= ElCLib::Parameter(
+          gp_Circ2d(gp_Ax2d(circ->Center(), gp_Dir2d(gp_Dir2d::D::X)), circ->Radius()),
+          startpoint);
         if (Surf->IsKind(STANDARD_TYPE(Geom_SphericalSurface)))
           paramv += ShapeAnalysis::AdjustToPeriod(paramv, -M_PI, M_PI);
         else if (Surf->IsKind(STANDARD_TYPE(Geom_ToroidalSurface)))
@@ -1914,9 +1914,9 @@ TopoDS_Shape IGESToBRep_TopoSurface::ParamSurface(const Handle(IGESData_IGESEnti
       {
         DeclareAndCast(IGESGeom_CircularArc, circ, directrix);
         gp_Pnt2d startpoint = circ->StartPoint();
-        paramu -=
-          ElCLib::Parameter(gp_Circ2d(gp_Ax2d(circ->Center(), gp_Dir2d(1, 0)), circ->Radius()),
-                            startpoint);
+        paramu -= ElCLib::Parameter(
+          gp_Circ2d(gp_Ax2d(circ->Center(), gp_Dir2d(gp_Dir2d::D::X)), circ->Radius()),
+          startpoint);
         paramu += ShapeAnalysis::AdjustToPeriod(paramu, 0, M_PI * 2);
       }
     }
index 9a79ff462440179ad15dc8f91fe59f8c4a377f4a..f3dd5f019daf7d8fe217b958395e75f9740efe46 100644 (file)
@@ -61,7 +61,7 @@ static Handle(StepGeom_Axis2Placement3d) MakeAxis2Placement3d(const gp_Pnt&
 GeomToStep_MakeAxis2Placement3d::GeomToStep_MakeAxis2Placement3d(
   const StepData_Factors& theLocalFactors)
 {
-  gp_Ax2 A(gp_Pnt(0., 0., 0.), gp_Dir(0., 0., 1.), gp_Dir(1., 0., 0.));
+  gp_Ax2 A(gp_Pnt(0., 0., 0.), gp_Dir(gp_Dir::D::Z), gp_Dir(gp_Dir::D::X));
   //   le reste inchange
 
   Handle(StepGeom_Axis2Placement3d) Axe = MakeAxis2Placement3d(A.Location(),
@@ -115,7 +115,7 @@ GeomToStep_MakeAxis2Placement3d::GeomToStep_MakeAxis2Placement3d(
   const gp_Trsf&          T,
   const StepData_Factors& theLocalFactors)
 {
-  gp_Ax2 A(gp_Pnt(0., 0., 0.), gp_Dir(0., 0., 1.), gp_Dir(1., 0., 0.));
+  gp_Ax2 A(gp_Pnt(0., 0., 0.), gp_Dir(gp_Dir::D::Z), gp_Dir(gp_Dir::D::X));
   A.Transform(T);
   //   le reste inchange
 
index 0f713e1c7f3839b22a207c08d72d3b3408626dbf..91bb61904f5f97977ba83fdad011ff1fb7dbf06e 100644 (file)
@@ -954,7 +954,7 @@ Handle(TransferBRep_ShapeBinder) STEPControl_ActorRead::TransferEntity(
           Handle(Geom_Axis2Placement) aTargAP = StepToGeom::MakeAxis2Placement(aCS, aLocalFactors);
           if (!aTargAP.IsNull())
           {
-            const gp_Ax3 ax3Orig(gp_Pnt(0., 0., 0), gp_Vec(0., 0., 1.), gp_Vec(1., 0., 0.));
+            const gp_Ax3 ax3Orig(gp_Pnt(0., 0., 0), gp_Dir(gp_Dir::D::Z), gp_Dir(gp_Dir::D::X));
             const gp_Ax3 ax3Targ(aTargAP->Ax2());
             if (ax3Targ.Location().SquareDistance(ax3Orig.Location()) < Precision::SquareConfusion()
                 && ax3Targ.Direction().IsEqual(ax3Orig.Direction(), Precision::Angular())
index 132d82aa1bb7c716904855035f543da9c38d3d0f..4a41610022df3b6f7ee25f9fa1fddeb705750dba 100644 (file)
@@ -148,7 +148,7 @@ Handle(Geom_Axis1Placement) StepToGeom::MakeAxis1Placement(
   {
     // sln 22.10.2001. CTS23496: If problems with creation of axis direction occur default direction
     // is used
-    gp_Dir D(0., 0., 1.);
+    gp_Dir D(gp_Dir::D::Z);
     if (SA->HasAxis())
     {
       Handle(Geom_Direction) D1 = MakeDirection(SA->Axis());
@@ -175,7 +175,7 @@ Handle(Geom_Axis2Placement) StepToGeom::MakeAxis2Placement(
 
     // sln 22.10.2001. CTS23496: If problems with creation of direction occur default direction is
     // used (MakeLine(...) function)
-    gp_Dir Ngp(0., 0., 1.);
+    gp_Dir Ngp(gp_Dir::D::Z);
     if (SA->HasAxis())
     {
       Handle(Geom_Direction) D = MakeDirection(SA->Axis());
@@ -246,7 +246,7 @@ Handle(Geom2d_AxisPlacement) StepToGeom::MakeAxisPlacement(
   {
     // sln 23.10.2001. CTS23496: If problems with creation of direction occur default direction is
     // used
-    gp_Dir2d Vxgp(1., 0.);
+    gp_Dir2d Vxgp(gp_Dir2d::D::X);
     if (SA->HasRefDirection())
     {
       Handle(Geom2d_Direction) Vx = MakeDirection2d(SA->RefDirection());
@@ -2065,7 +2065,7 @@ Standard_Boolean StepToGeom::MakeTransformation2d(
   Handle(Geom2d_CartesianPoint) CP = MakeCartesianPoint2d(SCTO->LocalOrigin(), theLocalFactors);
   if (!CP.IsNull())
   {
-    gp_Dir2d D1(1., 0.);
+    gp_Dir2d D1(gp_Dir2d::D::X);
     // sln 23.10.2001. CTS23496: If problems with creation of direction occur default direction is
     // used
     const Handle(StepGeom_Direction) A = SCTO->Axis1();
@@ -2097,7 +2097,7 @@ Standard_Boolean StepToGeom::MakeTransformation3d(
 
     // sln 23.10.2001. CTS23496: If problems with creation of direction occur default direction is
     // used
-    gp_Dir                           D1(1., 0., 0.);
+    gp_Dir                           D1(gp_Dir::D::X);
     const Handle(StepGeom_Direction) A1 = SCTO->Axis1();
     if (!A1.IsNull())
     {
@@ -2106,7 +2106,7 @@ Standard_Boolean StepToGeom::MakeTransformation3d(
         D1 = D->Dir();
     }
 
-    gp_Dir                           D2(0., 1., 0.);
+    gp_Dir                           D2(gp_Dir::D::Y);
     const Handle(StepGeom_Direction) A2 = SCTO->Axis2();
     if (!A2.IsNull())
     {
index 7a0422530c969cef7942bea4994f8b58cbc14efe..15a018ac908efb472c6b16404c5280a595d91384 100644 (file)
@@ -94,7 +94,7 @@ protected:
     Handle(Poly_Triangulation) aTriangulation = new Poly_Triangulation(aNodes, aTriangles);
 
     // Create a simple planar face
-    gp_Pln                  aPlane(gp_Pnt(0.0, 0.0, 0.0), gp_Dir(0, 0, 1));
+    gp_Pln                  aPlane(gp_Pnt(0.0, 0.0, 0.0), gp_Dir(gp_Dir::D::Z));
     BRepBuilderAPI_MakeFace aFaceBuilder(aPlane, 0.0, 10.0, 0.0, 10.0);
 
     if (!aFaceBuilder.IsDone())
@@ -510,7 +510,7 @@ TEST_F(DESTL_ProviderTest, MultipleTriangulatedFaces)
 
   Handle(Poly_Triangulation) aTriangulation = new Poly_Triangulation(aNodes, aTriangles);
 
-  gp_Pln                  aPlane(gp_Pnt(0.0, 0.0, 0.0), gp_Dir(0, 0, 1));
+  gp_Pln                  aPlane(gp_Pnt(0.0, 0.0, 0.0), gp_Dir(gp_Dir::D::Z));
   BRepBuilderAPI_MakeFace aFaceBuilder(aPlane, 0.0, 5.0, 0.0, 5.0);
   TopoDS_Face             aTriangleFace = aFaceBuilder.Face();
 
index 1328e61dcead2ed764b277996306caa85784114e..50f25a8ecdbd7d483c96cb03a18f4b40f4164d26 100644 (file)
@@ -95,7 +95,7 @@ protected:
     Handle(Poly_Triangulation) aTriangulation = new Poly_Triangulation(aNodes, aTriangles);
 
     // Create a simple planar face
-    gp_Pln                  aPlane(gp_Pnt(0.0, 0.0, 0.0), gp_Dir(0, 0, 1));
+    gp_Pln                  aPlane(gp_Pnt(0.0, 0.0, 0.0), gp_Dir(gp_Dir::D::Z));
     BRepBuilderAPI_MakeFace aFaceBuilder(aPlane, 0.0, 10.0, 0.0, 10.0);
 
     if (!aFaceBuilder.IsDone())
index 2796122b2f9a1461ca7d5381cb1c7bffcf4dd1e1..13168e2356c36f6238d5ebbe1fd2fc52eee97605 100644 (file)
@@ -170,8 +170,8 @@ VrmlConverter_Projector::VrmlConverter_Projector(const TopTools_Array1OfShape&
   {
 
     /*
-  gp_Dir Zmain (0,0,1);
-  gp_Dir Xmain (1,0,0);
+  gp_Dir Zmain (gp_Dir::D::Z);
+  gp_Dir Xmain (gp_Dir::D::X);
 
 
   gp_Dir Dturn;
index 52832b38b426a6c59db90b33332d8ae75c003dbc..28969a0100551784b8d59050c04d6cf6d1e19205 100644 (file)
@@ -127,7 +127,7 @@ const Handle(TopoDS_TShape)& VrmlData_Cone::TShape()
   {
     try
     {
-      gp_Ax2        aLocalAxis(gp_Pnt(0., -0.5 * myHeight, 0.), gp_Dir(0., 1., 0.));
+      gp_Ax2        aLocalAxis(gp_Pnt(0., -0.5 * myHeight, 0.), gp_Dir(gp_Dir::D::Y));
       BRepPrim_Cone aBuilder(aLocalAxis, myBottomRadius, 0., myHeight);
       if (!myHasBottom)
         myTShape = aBuilder.LateralFace().TShape();
@@ -241,7 +241,7 @@ const Handle(TopoDS_TShape)& VrmlData_Cylinder::TShape()
   {
     try
     {
-      gp_Ax2            aLocalAxis(gp_Pnt(0., -0.5 * myHeight, 0.), gp_Dir(0., 1., 0.));
+      gp_Ax2            aLocalAxis(gp_Pnt(0., -0.5 * myHeight, 0.), gp_Dir(gp_Dir::D::Y));
       BRepPrim_Cylinder aBuilder(aLocalAxis, myRadius, myHeight);
       BRepPrim_Builder  aShapeBuilder;
       TopoDS_Shell      aShell;
index 665613c478a675111327a1282a2064a21e7cf52c..353052a6485377f1675796b1353b6a3820798600 100644 (file)
@@ -105,7 +105,7 @@ Standard_Integer DNaming_SphereDriver::Execute(Handle(TFunction_Logbook)& theLog
   {
     aCenter = BRep_Tool::Pnt(TopoDS::Vertex(aCntShape));
   }
-  gp_Ax2                 anAxis = gp_Ax2(aCenter, gp_Dir(0, 0, 1), gp_Dir(1, 0, 0));
+  gp_Ax2                 anAxis = gp_Ax2(aCenter, gp_Dir(gp_Dir::D::Z), gp_Dir(gp_Dir::D::X));
   BRepPrimAPI_MakeSphere aMakeSphere(anAxis, aRadius);
 
   aMakeSphere.Build();
index 9b06e44855469ae0b239bb39feb906de236e7ee9..2d8ac4582b1c3d22ee585a581d05f79f0431bfb1 100644 (file)
@@ -226,7 +226,7 @@ DBRep_IsoBuilder::DBRep_IsoBuilder(const TopoDS_Face&     TopologicalFace,
   if (StepU > confusion)
   {
     Standard_Real UPrm = myUMin + StepU / 2.;
-    gp_Dir2d      Dir(0., 1.);
+    gp_Dir2d      Dir(gp_Dir2d::D::Y);
     for (IIso = 1; IIso <= NbIsos; IIso++)
     {
       myUPrm(IIso) = UPrm;
@@ -241,7 +241,7 @@ DBRep_IsoBuilder::DBRep_IsoBuilder(const TopoDS_Face&     TopologicalFace,
   if (StepV > confusion)
   {
     Standard_Real VPrm = myVMin + StepV / 2.;
-    gp_Dir2d      Dir(1., 0.);
+    gp_Dir2d      Dir(gp_Dir2d::D::X);
     for (IIso = 1; IIso <= NbIsos; IIso++)
     {
       myVPrm(IIso) = VPrm;
index 3b09cf39eb43ba2c0859023fd8d96fc763861580..562433b236809ea0f76eb05f49222953591690f4 100644 (file)
@@ -29,7 +29,7 @@ extern Standard_Boolean Draw_Bounds;
 //=================================================================================================
 
 Draw_Axis2D::Draw_Axis2D(const Draw_Color& col, const Standard_Integer Size)
-    : myAxes(gp_Pnt2d(0, 0), gp_Dir2d(1, 0)),
+    : myAxes(gp_Pnt2d(0, 0), gp_Dir2d(gp_Dir2d::D::X)),
       myColor(col),
       mySize(Size)
 {
@@ -38,7 +38,7 @@ Draw_Axis2D::Draw_Axis2D(const Draw_Color& col, const Standard_Integer Size)
 //=================================================================================================
 
 Draw_Axis2D::Draw_Axis2D(const gp_Pnt2d& p, const Draw_Color& col, const Standard_Integer Size)
-    : myAxes(p, gp_Dir2d(1, 0)),
+    : myAxes(p, gp_Dir2d(gp_Dir2d::D::X)),
       myColor(col),
       mySize(Size)
 {
index ea3aaf001f015319f80b6add8c055644ffeb283a..3fd50f709d95fe2618c84667189d152a250dc8a2 100644 (file)
@@ -111,23 +111,23 @@ Standard_Boolean Draw_View::Init(const char* theType)
   }
   else if (!strcmp("-Y+X", theType))
   {
-    const gp_Dir aD(0., 0., 1.);
+    const gp_Dir aD(gp_Dir::D::Z);
     myMatrix.SetRotation(gp_Ax1(Pvise, aD), 0.5 * M_PI);
   }
   else if (!strcmp("-X-Y", theType))
   {
-    const gp_Dir aD(0., 0., 1.);
+    const gp_Dir aD(gp_Dir::D::Z);
     myMatrix.SetRotation(gp_Ax1(Pvise, aD), M_PI);
   }
   else if (!strcmp("+Y-X", theType))
   {
-    const gp_Dir aD(0., 0., 1.);
+    const gp_Dir aD(gp_Dir::D::Z);
     myMatrix.SetRotation(gp_Ax1(Pvise, aD), -0.5 * M_PI);
   }
   else if (!strcmp("+Y+X", theType))
   {
-    const gp_Dir aD1(0., 0., 1.);
-    const gp_Dir aD2(0., 1., 0.);
+    const gp_Dir aD1(gp_Dir::D::Z);
+    const gp_Dir aD2(gp_Dir::D::Y);
 
     myMatrix.SetRotation(gp_Ax1(Pvise, aD1), -0.5 * M_PI);
     aRotation.SetRotation(gp_Ax1(Pvise, aD2), M_PI);
@@ -135,13 +135,13 @@ Standard_Boolean Draw_View::Init(const char* theType)
   }
   else if (!strcmp("-X+Y", theType))
   {
-    const gp_Dir aD(0., 1., 0.);
+    const gp_Dir aD(gp_Dir::D::Y);
     myMatrix.SetRotation(gp_Ax1(Pvise, aD), M_PI);
   }
   else if (!strcmp("-Y-X", theType))
   {
-    const gp_Dir aD1(0., 0., 1.);
-    const gp_Dir aD2(1., 0., 0.);
+    const gp_Dir aD1(gp_Dir::D::Z);
+    const gp_Dir aD2(gp_Dir::D::X);
 
     myMatrix.SetRotation(gp_Ax1(Pvise, aD1), -0.5 * M_PI);
     aRotation.SetRotation(gp_Ax1(Pvise, aD2), M_PI);
@@ -149,18 +149,18 @@ Standard_Boolean Draw_View::Init(const char* theType)
   }
   else if (!strcmp("+X-Y", theType))
   {
-    const gp_Dir aD(1., 0., 0.);
+    const gp_Dir aD(gp_Dir::D::X);
     myMatrix.SetRotation(gp_Ax1(Pvise, aD), M_PI);
   }
   else if (!strcmp("+X+Z", theType))
   {
-    const gp_Dir aD(1., 0., 0.);
+    const gp_Dir aD(gp_Dir::D::X);
     myMatrix.SetRotation(gp_Ax1(Pvise, aD), -0.5 * M_PI);
   }
   else if (!strcmp("-Z+X", theType))
   {
-    const gp_Dir aD1(1., 0., 0.);
-    const gp_Dir aD2(0., 1., 0.);
+    const gp_Dir aD1(gp_Dir::D::X);
+    const gp_Dir aD2(gp_Dir::D::Y);
 
     myMatrix.SetRotation(gp_Ax1(Pvise, aD1), -0.5 * M_PI);
     aRotation.SetRotation(gp_Ax1(Pvise, aD2), -0.5 * M_PI);
@@ -168,8 +168,8 @@ Standard_Boolean Draw_View::Init(const char* theType)
   }
   else if (!strcmp("-X-Z", theType))
   {
-    const gp_Dir aD1(1., 0., 0.);
-    const gp_Dir aD2(0., 1., 0.);
+    const gp_Dir aD1(gp_Dir::D::X);
+    const gp_Dir aD2(gp_Dir::D::Y);
 
     myMatrix.SetRotation(gp_Ax1(Pvise, aD1), -0.5 * M_PI);
     aRotation.SetRotation(gp_Ax1(Pvise, aD2), -M_PI);
@@ -177,8 +177,8 @@ Standard_Boolean Draw_View::Init(const char* theType)
   }
   else if (!strcmp("+Z-X", theType))
   {
-    const gp_Dir aD1(1., 0., 0.);
-    const gp_Dir aD2(0., 1., 0.);
+    const gp_Dir aD1(gp_Dir::D::X);
+    const gp_Dir aD2(gp_Dir::D::Y);
 
     myMatrix.SetRotation(gp_Ax1(Pvise, aD1), -0.5 * M_PI);
     aRotation.SetRotation(gp_Ax1(Pvise, aD2), 0.5 * M_PI);
@@ -186,8 +186,8 @@ Standard_Boolean Draw_View::Init(const char* theType)
   }
   else if (!strcmp("+Z+X", theType))
   {
-    const gp_Dir aD1(1., 0., 0.);
-    const gp_Dir aD2(0., 1., 0.);
+    const gp_Dir aD1(gp_Dir::D::X);
+    const gp_Dir aD2(gp_Dir::D::Y);
 
     myMatrix.SetRotation(gp_Ax1(Pvise, aD1), 0.5 * M_PI);
     aRotation.SetRotation(gp_Ax1(Pvise, aD2), 0.5 * M_PI);
@@ -195,8 +195,8 @@ Standard_Boolean Draw_View::Init(const char* theType)
   }
   else if (!strcmp("-X+Z", theType))
   {
-    const gp_Dir aD1(1., 0., 0.);
-    const gp_Dir aD2(0., 1., 0.);
+    const gp_Dir aD1(gp_Dir::D::X);
+    const gp_Dir aD2(gp_Dir::D::Y);
 
     myMatrix.SetRotation(gp_Ax1(Pvise, aD1), 0.5 * M_PI);
     aRotation.SetRotation(gp_Ax1(Pvise, aD2), M_PI);
@@ -204,8 +204,8 @@ Standard_Boolean Draw_View::Init(const char* theType)
   }
   else if (!strcmp("-Z-X", theType))
   {
-    const gp_Dir aD1(1., 0., 0.);
-    const gp_Dir aD2(0., 1., 0.);
+    const gp_Dir aD1(gp_Dir::D::X);
+    const gp_Dir aD2(gp_Dir::D::Y);
 
     myMatrix.SetRotation(gp_Ax1(Pvise, aD1), 0.5 * M_PI);
     aRotation.SetRotation(gp_Ax1(Pvise, aD2), -0.5 * M_PI);
@@ -213,13 +213,13 @@ Standard_Boolean Draw_View::Init(const char* theType)
   }
   else if (!strcmp("+X-Z", theType))
   {
-    const gp_Dir aD(1., 0., 0.);
+    const gp_Dir aD(gp_Dir::D::X);
     myMatrix.SetRotation(gp_Ax1(Pvise, aD), 0.5 * M_PI);
   }
   else if (!strcmp("+Y+Z", theType))
   {
-    const gp_Dir aD1(0., 1., 0.);
-    const gp_Dir aD2(1., 0., 0.);
+    const gp_Dir aD1(gp_Dir::D::Y);
+    const gp_Dir aD2(gp_Dir::D::X);
 
     myMatrix.SetRotation(gp_Ax1(Pvise, aD1), -0.5 * M_PI);
     aRotation.SetRotation(gp_Ax1(Pvise, aD2), -0.5 * M_PI);
@@ -227,13 +227,13 @@ Standard_Boolean Draw_View::Init(const char* theType)
   }
   else if (!strcmp("-Z+Y", theType))
   {
-    const gp_Dir aD(0., 1., 0.);
+    const gp_Dir aD(gp_Dir::D::Y);
     myMatrix.SetRotation(gp_Ax1(Pvise, aD), -0.5 * M_PI);
   }
   else if (!strcmp("-Y-Z", theType))
   {
-    const gp_Dir aD1(0., 1., 0.);
-    const gp_Dir aD2(1., 0., 0.);
+    const gp_Dir aD1(gp_Dir::D::Y);
+    const gp_Dir aD2(gp_Dir::D::X);
 
     myMatrix.SetRotation(gp_Ax1(Pvise, aD1), -0.5 * M_PI);
     aRotation.SetRotation(gp_Ax1(Pvise, aD2), 0.5 * M_PI);
@@ -241,8 +241,8 @@ Standard_Boolean Draw_View::Init(const char* theType)
   }
   else if (!strcmp("+Z-Y", theType))
   {
-    const gp_Dir aD1(0., 1., 0.);
-    const gp_Dir aD2(1., 0., 0.);
+    const gp_Dir aD1(gp_Dir::D::Y);
+    const gp_Dir aD2(gp_Dir::D::X);
 
     myMatrix.SetRotation(gp_Ax1(Pvise, aD1), -0.5 * M_PI);
     aRotation.SetRotation(gp_Ax1(Pvise, aD2), M_PI);
@@ -250,13 +250,13 @@ Standard_Boolean Draw_View::Init(const char* theType)
   }
   else if (!strcmp("+Z+Y", theType))
   {
-    const gp_Dir aD(0., 1., 0.);
+    const gp_Dir aD(gp_Dir::D::Y);
     myMatrix.SetRotation(gp_Ax1(Pvise, aD), 0.5 * M_PI);
   }
   else if (!strcmp("-Y+Z", theType))
   {
-    const gp_Dir aD1(0., 1., 0.);
-    const gp_Dir aD2(1., 0., 0.);
+    const gp_Dir aD1(gp_Dir::D::Y);
+    const gp_Dir aD2(gp_Dir::D::X);
 
     myMatrix.SetRotation(gp_Ax1(Pvise, aD1), 0.5 * M_PI);
     aRotation.SetRotation(gp_Ax1(Pvise, aD2), -0.5 * M_PI);
@@ -264,8 +264,8 @@ Standard_Boolean Draw_View::Init(const char* theType)
   }
   else if (!strcmp("-Z-Y", theType))
   {
-    const gp_Dir aD1(0., 1., 0.);
-    const gp_Dir aD2(1., 0., 0.);
+    const gp_Dir aD1(gp_Dir::D::Y);
+    const gp_Dir aD2(gp_Dir::D::X);
 
     myMatrix.SetRotation(gp_Ax1(Pvise, aD1), 0.5 * M_PI);
     aRotation.SetRotation(gp_Ax1(Pvise, aD2), M_PI);
@@ -273,8 +273,8 @@ Standard_Boolean Draw_View::Init(const char* theType)
   }
   else if (!strcmp("+Y-Z", theType))
   {
-    const gp_Dir aD1(0., 1., 0.);
-    const gp_Dir aD2(1., 0., 0.);
+    const gp_Dir aD1(gp_Dir::D::Y);
+    const gp_Dir aD2(gp_Dir::D::X);
 
     myMatrix.SetRotation(gp_Ax1(Pvise, aD1), 0.5 * M_PI);
     aRotation.SetRotation(gp_Ax1(Pvise, aD2), 0.5 * M_PI);
@@ -282,8 +282,8 @@ Standard_Boolean Draw_View::Init(const char* theType)
   }
   else if (!strcmp("AXON", theType))
   {
-    const gp_Dir aD1(1., 0., 0.);
-    const gp_Dir aD2(0., 0., 1.);
+    const gp_Dir aD1(gp_Dir::D::X);
+    const gp_Dir aD2(gp_Dir::D::Z);
 
     myMatrix.SetRotation(gp_Ax1(Pvise, aD1), -0.25 * M_PI);
     aRotation.SetRotation(gp_Ax1(Pvise, aD2), -0.25 * M_PI);
@@ -291,8 +291,8 @@ Standard_Boolean Draw_View::Init(const char* theType)
   }
   else if (!strcmp("PERS", theType))
   {
-    const gp_Dir aD1(1., 0., 0.);
-    const gp_Dir aD2(0., 0., 1.);
+    const gp_Dir aD1(gp_Dir::D::X);
+    const gp_Dir aD2(gp_Dir::D::Z);
 
     myMatrix.SetRotation(gp_Ax1(Pvise, aD1), -0.25 * M_PI);
     aRotation.SetRotation(gp_Ax1(Pvise, aD2), -0.25 * M_PI);
index 278320935e56a9c499ac8ee21238ba086791fa56..4a79b9ec8812066a9ba5798f43dab63bedeff617 100644 (file)
@@ -382,7 +382,7 @@ static Standard_Integer OCC712(Draw_Interpretor& di, Standard_Integer argc, cons
   try
   {
     OCC_CATCH_SIGNALS
-    gp_Dir slabDir(0, 0, 1);
+    gp_Dir slabDir(gp_Dir::D::Z);
     gp_Vec slabVect(slabDir);
     slabVect *= slabThick;
 
@@ -494,7 +494,7 @@ static Standard_Integer OCC822_1(Draw_Interpretor& di, Standard_Integer argc, co
   int index = 1;
 
   gp_Pnt P1(0, 0, 0);
-  gp_Dir D1(0, 0, 1);
+  gp_Dir D1(gp_Dir::D::Z);
   gp_Ax2 A1(P1, D1);
 
   BRepPrimAPI_MakeCylinder cylMakerIn(A1, 40, 110);
@@ -503,7 +503,7 @@ static Standard_Integer OCC822_1(Draw_Interpretor& di, Standard_Integer argc, co
   TopoDS_Shape             cylOut = cylMakerOut.Shape();
 
   gp_Pnt P2(0, 0, 0);
-  gp_Dir D2(0, 0, -1);
+  gp_Dir D2(gp_Dir::D::NZ);
   gp_Ax2 A2(P2, D2);
 
   BRepPrimAPI_MakeCone conMakerIn(A2, 40, 60, 110);
@@ -563,8 +563,8 @@ static Standard_Integer OCC822_2(Draw_Interpretor& di, Standard_Integer argc, co
 
   int index = 1;
 
-  gp_Dir              xDir(1, 0, 0);
-  gp_Dir              zDir(0, 0, 1);
+  gp_Dir              xDir(gp_Dir::D::X);
+  gp_Dir              zDir(gp_Dir::D::Z);
   gp_Pnt              cen1(0, 0, 0);
   gp_Ax2              cor1(cen1, zDir, xDir);
   BRepPrimAPI_MakeBox boxMaker(cor1, 100, 100, 100);
@@ -678,7 +678,7 @@ static Standard_Integer OCC824(Draw_Interpretor& di, Standard_Integer argc, cons
   int index = 1;
 
   gp_Pnt                   P1(100, 0, 0);
-  gp_Dir                   D1(-1, 0, 0);
+  gp_Dir                   D1(gp_Dir::D::NX);
   gp_Ax2                   A1(P1, D1);
   BRepPrimAPI_MakeCylinder mkCyl(A1, 20, 100);
   TopoDS_Shape             cyl = mkCyl.Shape();
@@ -1091,7 +1091,7 @@ static Standard_Integer OCC828(Draw_Interpretor& di, Standard_Integer argc, cons
   try
   {
     OCC_CATCH_SIGNALS
-    gp_Dir slabDir(0, 0, 1);
+    gp_Dir slabDir(gp_Dir::D::Z);
     gp_Vec slabVect(slabDir);
     slabVect *= slabThick;
 
index 28a14f40b8cb58e69c6b2b4faa31233129cd1551..a99f686e4e0290b743be783e2325a65c5be2894c 100644 (file)
@@ -605,8 +605,6 @@ static Standard_Integer OCC297(Draw_Interpretor& di, Standard_Integer /*argc*/,
 
   DBRep::Set("Face", sol1_);
 
-  gp_Ax1 ax1_(gp_Pnt(0., 0., -100.), gp_Dir(0., 0., 1.));
-
   Standard_Real x = 0., y = 0., z = -80.;
 
   BRepPrimAPI_MakeBox box(gp_Pnt(x, y, z), gp_Pnt(x + 150, y + 200, z + 200));
@@ -1422,7 +1420,7 @@ static Standard_Integer OCC578(Draw_Interpretor& di, Standard_Integer argc, cons
   //                                 0.1,  0.1  , 0.4, 0.4 );
   TopoDS_Shape wedge1 = BRepPrimAPI_MakeWedge(0.5, 0.05, 0.5, 0.1, 0.1, 0.4, 0.4).Shape();
 
-  gp_Trsf rotate = gce_MakeRotation(gp_Pnt(0.0, 0.0, 0.0), gp_Dir(1.0, 0.0, 0.0), 1.570795);
+  gp_Trsf rotate = gce_MakeRotation(gp_Pnt(0.0, 0.0, 0.0), gp_Dir(gp_Dir::D::X), 1.570795);
 
   gp_Trsf translate = gce_MakeTranslation(gp_Pnt(0.0, -0.5, 0.0), gp_Pnt(0.25, 0.25, 0.5));
 
@@ -1444,7 +1442,7 @@ static Standard_Integer OCC578(Draw_Interpretor& di, Standard_Integer argc, cons
   //                                 0.1,  0.1  , 0.4, 0.4 );
   TopoDS_Shape wedge2 = BRepPrimAPI_MakeWedge(0.5, 0.3, 0.5, 0.1, 0.1, 0.4, 0.4).Shape();
 
-  gp_Trsf rotate2 = gce_MakeRotation(gp_Pnt(0.0, 0.0, 0.0), gp_Dir(1.0, 0.0, 0.0), 1.570795 * 3.0);
+  gp_Trsf rotate2 = gce_MakeRotation(gp_Pnt(0.0, 0.0, 0.0), gp_Dir(gp_Dir::D::X), 1.570795 * 3.0);
 
   gp_Trsf translate2 = gce_MakeTranslation(gp_Pnt(0.0, 0.0, 0.0), gp_Pnt(0.25, 0.25, 0.5));
 
@@ -1971,8 +1969,8 @@ static Standard_Integer OCC1487(Draw_Interpretor& di, Standard_Integer argc, con
 
   Standard_Integer CaseNumber = Draw::Atoi(argv[1]);
 
-  // BRepPrimAPI_MakeCylinder o_mc1 (gp_Ax2 (gp_Pnt(0,-50,140), gp_Dir(1,0,0)), 50,1000);
-  gp_Dir                   myDir(1, 0, 0);
+  // BRepPrimAPI_MakeCylinder o_mc1 (gp_Ax2 (gp_Pnt(0,-50,140), gp_Dir(gp_Dir::D::X)), 50,1000);
+  gp_Dir                   myDir(gp_Dir::D::X);
   gp_Pnt                   myPnt(0, -50, 140);
   gp_Ax2                   myAx2(myPnt, myDir);
   BRepPrimAPI_MakeCylinder o_mc1(myAx2, 50, 1000);
@@ -2090,11 +2088,11 @@ TopoDS_Shape OCC1077_Bug()
 
   TopoDS_Shape theCommon = BRepAlgoAPI_Common(theBox, theSphere);
   TopoDS_Shape theCylinder1 =
-    BRepPrimAPI_MakeCylinder(gp_Ax2(gp_Pnt(0, 0, -10), gp_Dir(0, 0, 1)), 3, 20).Shape();
+    BRepPrimAPI_MakeCylinder(gp_Ax2(gp_Pnt(0, 0, -10), gp_Dir(gp_Dir::D::Z)), 3, 20).Shape();
   TopoDS_Shape theCylinder2 =
-    BRepPrimAPI_MakeCylinder(gp_Ax2(gp_Pnt(-10, 0, 0), gp_Dir(1, 0, 0)), 3, 20).Shape();
+    BRepPrimAPI_MakeCylinder(gp_Ax2(gp_Pnt(-10, 0, 0), gp_Dir(gp_Dir::D::X)), 3, 20).Shape();
   TopoDS_Shape theCylinder3 =
-    BRepPrimAPI_MakeCylinder(gp_Ax2(gp_Pnt(0, -10, 0), gp_Dir(0, 1, 0)), 3, 20).Shape();
+    BRepPrimAPI_MakeCylinder(gp_Ax2(gp_Pnt(0, -10, 0), gp_Dir(gp_Dir::D::Y)), 3, 20).Shape();
   TopoDS_Shape           theTmp1 = OCC1077_cut_blend(theCommon, theCylinder1, 0.7);
   Handle(ShapeFix_Shape) fixer   = new ShapeFix_Shape(theTmp1);
   fixer->Perform();
index 0a74b58bdb19b1a3f0042b255237f19fecbbc11c..9b7f99d8aab308909bad20b73acfaf5e26f90d75 100644 (file)
@@ -66,7 +66,7 @@ static Standard_Integer BUC60897(Draw_Interpretor& di,
 {
   Standard_Character abuf[16];
 
-  Handle(Geom2d_Line) aLine = new Geom2d_Line(gp_Pnt2d(100, 0), gp_Dir2d(-1, 0));
+  Handle(Geom2d_Line) aLine = new Geom2d_Line(gp_Pnt2d(100, 0), gp_Dir2d(gp_Dir2d::D::NX));
   Sprintf(abuf, "line");
   Standard_CString st = abuf;
   DrawTrSurf::Set(st, aLine);
index bfc0beac3685289a751cedf49faff5ea83704f0f..50d39e7ca47ae39e23f5005c52224bddb87eb231 100644 (file)
@@ -140,7 +140,7 @@ static Standard_Integer BUC60814(Draw_Interpretor& di, Standard_Integer argc, co
 
   // Circle
   gp_Pnt P(10, 10, 10);
-  gp_Dir V(1, 0, 0);
+  gp_Dir V(gp_Dir::D::X);
   gp_Ax2 aAx2(P, V);
 
   Handle(Geom_Circle)           ahCircle = new Geom_Circle(aAx2, 20);
@@ -676,7 +676,7 @@ static Standard_Integer OCC301(Draw_Interpretor& di, Standard_Integer argc, cons
   context->Display(new AIS_Shape(E2), Standard_True);
 
   gp_Pnt             plnpt(0, 0, 0);
-  gp_Dir             plndir(0, 0, 1);
+  gp_Dir             plndir(gp_Dir::D::Z);
   Handle(Geom_Plane) pln = new Geom_Plane(plnpt, plndir);
 
   Handle(PrsDim_AngleDimension) anAngleDimension =
index 092a74705e81dde8ebcff6353019c8e1a91d817e..1a56be126a5d02e723ff2dd3d6cdd211df3a669f 100644 (file)
@@ -294,7 +294,7 @@ static Standard_Integer BUC60915_1(Draw_Interpretor& di, Standard_Integer argc,
   TopoDS_Vertex                 V7 = BRepBuilderAPI_MakeVertex(p7);
   TopoDS_Vertex                 V8 = BRepBuilderAPI_MakeVertex(p8);
   gp_Pnt                        plnpt(0, 0, 0);
-  gp_Dir                        plndir(0, 0, 1);
+  gp_Dir                        plndir(gp_Dir::D::Z);
   Handle(Geom_Plane)            pln      = new Geom_Plane(plnpt, plndir);
   Handle(Prs3d_DimensionAspect) anAspect = new Prs3d_DimensionAspect();
   anAspect->MakeArrows3d(Standard_True);
@@ -323,7 +323,7 @@ static Standard_Integer BUC60915_1(Draw_Interpretor& di, Standard_Integer argc,
   /***************************************/
   // dimension "R 88.58"
   /***************************************/
-  gp_Circ     cir = gp_Circ(gp_Ax2(gp_Pnt(191.09, -88.58, 0), gp_Dir(0, 0, 1)), 88.58);
+  gp_Circ     cir = gp_Circ(gp_Ax2(gp_Pnt(191.09, -88.58, 0), gp_Dir(gp_Dir::D::Z)), 88.58);
   TopoDS_Edge E1 = BRepBuilderAPI_MakeEdge(cir, gp_Pnt(191.09, 0, 0.), gp_Pnt(191.09, -177.16, 0.));
   Handle(PrsDim_RadiusDimension) dim1 = new PrsDim_RadiusDimension(E1);
   dim1->SetDimensionAspect(anAspect);
@@ -331,7 +331,7 @@ static Standard_Integer BUC60915_1(Draw_Interpretor& di, Standard_Integer argc,
   /***************************************/
   // dimension "R 43.80"
   /***************************************/
-  gp_Circ     cir1   = gp_Circ(gp_Ax2(gp_Pnt(191.09, -88.58, 0), gp_Dir(0, 0, 1)), 43.80);
+  gp_Circ     cir1   = gp_Circ(gp_Ax2(gp_Pnt(191.09, -88.58, 0), gp_Dir(gp_Dir::D::Z)), 43.80);
   TopoDS_Edge E_cir1 = BRepBuilderAPI_MakeEdge(cir1);
   dim1               = new PrsDim_RadiusDimension(E_cir1);
   anAspect->ArrowAspect()->SetLength(60.0);
@@ -340,7 +340,7 @@ static Standard_Integer BUC60915_1(Draw_Interpretor& di, Standard_Integer argc,
   /***************************************/
   // dimension "R 17.86"
   /***************************************/
-  gp_Circ     cir2   = gp_Circ(gp_Ax2(gp_Pnt(566.11, -88.58, 0), gp_Dir(0, 0, -1)), 17.86);
+  gp_Circ     cir2   = gp_Circ(gp_Ax2(gp_Pnt(566.11, -88.58, 0), gp_Dir(gp_Dir::D::NZ)), 17.86);
   TopoDS_Edge E_cir2 = BRepBuilderAPI_MakeEdge(cir2);
   dim1               = new PrsDim_RadiusDimension(E_cir2);
   anAspect->ArrowAspect()->SetLength(40.0);
@@ -416,13 +416,13 @@ static int geom_get_2Dpt_from_3Dpt(const gp_Pnt& pnt3d, const gp_Pln& pln, gp_Pn
 
 static Standard_Integer OCC353(Draw_Interpretor& di, Standard_Integer, const char**)
 {
-  gp_Ax2              ax21(gp_Pnt(100, 0, 0), gp_Dir(0, 0, 1));
+  gp_Ax2              ax21(gp_Pnt(100, 0, 0), gp_Dir(gp_Dir::D::Z));
   Handle(Geom_Circle) h_cir1 = new Geom_Circle(ax21, 25);
 
-  gp_Ax2              ax22(gp_Pnt(-100, 0, 0), gp_Dir(0, 0, 1));
+  gp_Ax2              ax22(gp_Pnt(-100, 0, 0), gp_Dir(gp_Dir::D::Z));
   Handle(Geom_Circle) h_cir2 = new Geom_Circle(ax22, 25);
 
-  gp_Pln               refpln(gp_Pnt(0, 0, 0), gp_Dir(0, 0, 1));
+  gp_Pln               refpln(gp_Pnt(0, 0, 0), gp_Dir(gp_Dir::D::Z));
   Handle(Geom2d_Curve) cir2d1 = GeomAPI::To2d(h_cir1, refpln);
   Handle(Geom2d_Curve) cir2d2 = GeomAPI::To2d(h_cir2, refpln);
 
index 4d5983eac7d0b1dcea393f6d41bccb3120507275..c66fb04928b767e2b02919a67223d5bbc1be5daa 100644 (file)
@@ -111,8 +111,8 @@ static Standard_Integer OCC23361(Draw_Interpretor& di,
   gp_Pnt p(0, 0, 2);
 
   gp_Trsf t1, t2;
-  t1.SetRotation(gp_Ax1(p, gp_Dir(0, 1, 0)), -0.49328285294022267);
-  t2.SetRotation(gp_Ax1(p, gp_Dir(0, 0, 1)), 0.87538474718473880);
+  t1.SetRotation(gp_Ax1(p, gp_Dir(gp_Dir::D::Y)), -0.49328285294022267);
+  t2.SetRotation(gp_Ax1(p, gp_Dir(gp_Dir::D::Z)), 0.87538474718473880);
 
   gp_Trsf tComp = t2 * t1;
 
@@ -1348,7 +1348,7 @@ static Standard_Integer OCC24945(Draw_Interpretor& di, Standard_Integer argc, co
   }
 
   gp_Pnt              aP3D(-1725.97, 843.257, -4.22741e-013);
-  gp_Ax2              aAxis(gp_Pnt(0, 843.257, 0), gp_Dir(0, -1, 0), gp::DX());
+  gp_Ax2              aAxis(gp_Pnt(0, 843.257, 0), gp_Dir(gp_Dir::D::NY), gp::DX());
   Handle(Geom_Circle) aCircle = new Geom_Circle(aAxis, 1725.9708621929999);
   GeomAdaptor_Curve   aC3D(aCircle);
 
@@ -2054,10 +2054,10 @@ static Standard_Integer OCC24889(Draw_Interpretor& theDI,
 {
   // Curves
   Handle(Geom2d_Circle) aCircle1 =
-    new Geom2d_Circle(gp_Ax22d(gp_Pnt2d(25, -25), gp_Dir2d(1, 0), gp_Dir2d(-0, 1)), 155);
+    new Geom2d_Circle(gp_Ax22d(gp_Pnt2d(25, -25), gp_Dir2d(gp_Dir2d::D::X), gp_Dir2d(-0, 1)), 155);
 
   Handle(Geom2d_Circle) aCircle2 =
-    new Geom2d_Circle(gp_Ax22d(gp_Pnt2d(25, 25), gp_Dir2d(1, 0), gp_Dir2d(-0, 1)), 155);
+    new Geom2d_Circle(gp_Ax22d(gp_Pnt2d(25, 25), gp_Dir2d(gp_Dir2d::D::X), gp_Dir2d(-0, 1)), 155);
 
   Handle(Geom2d_TrimmedCurve) aTrim[2] = {
     new Geom2d_TrimmedCurve(aCircle1, 1.57079632679490, 2.97959469729228),
@@ -2955,7 +2955,7 @@ static Standard_Integer OCC25413(Draw_Interpretor& di, Standard_Integer narg, co
   Bnd_Box aBndBox;
   BRepBndLib::Add(aShape, aBndBox);
 
-  gp_Dir        aDir(0., 1., 0.);
+  gp_Dir        aDir(gp_Dir::D::Y);
   const int     N     = 250;
   Standard_Real xMin  = aBndBox.CornerMin().X();
   Standard_Real zMin  = aBndBox.CornerMin().Z();
@@ -4706,7 +4706,7 @@ static TopoDS_Shape taper(const TopoDS_Shape& shape,
                           Standard_Real       angle)
 {
   // Use maximum face-to-taper z-offset.
-  const gp_Pln neutral_plane(gp_Ax3(gp_Pnt(0.0, 0.0, 140.0), gp_Dir(0.0, 0.0, 1.0)));
+  const gp_Pln neutral_plane(gp_Ax3(gp_Pnt(0.0, 0.0, 140.0), gp_Dir(gp_Dir::D::Z)));
 
   // Draft angle needs to be in radians, and flipped to adhere to our own (arbitrary) draft
   // angle definition.
@@ -4715,8 +4715,8 @@ static TopoDS_Shape taper(const TopoDS_Shape& shape,
   // Add face to draft. The first argument indicates that all material added/removed during
   // drafting is located below the neutral plane
   BRepOffsetAPI_DraftAngle drafter(shape);
-  drafter.Add(face_a, gp_Dir(0.0, 0.0, -1.0), draft_angle, neutral_plane);
-  drafter.Add(face_b, gp_Dir(0.0, 0.0, -1.0), draft_angle, neutral_plane);
+  drafter.Add(face_a, gp_Dir(gp_Dir::D::NZ), draft_angle, neutral_plane);
+  drafter.Add(face_b, gp_Dir(gp_Dir::D::NZ), draft_angle, neutral_plane);
   drafter.Build();
 
   return drafter.Shape();
@@ -4810,8 +4810,8 @@ static Standard_Integer OCC26750(Draw_Interpretor& theDI,
     theDI << "Error in gp_Vec2d. Vectors should be normal.\n";
   }
 
-  const gp_Dir2d aD1(1.0, 0.0);
-  const gp_Dir2d aD2(0.0, -1.0);
+  const gp_Dir2d aD1(gp_Dir2d::D::X);
+  const gp_Dir2d aD2(gp_Dir2d::D::NY);
 
   if (aD1.IsNormal(aD2, Precision::Angular()))
   {
index 15098f9e8f78047d9a73b59a68e6fd5b73ac3514..7590b2f1a6ba1ac7f4f71b6451d852041485d6e7 100644 (file)
@@ -2327,7 +2327,7 @@ static Standard_Integer OCC26747_1(Draw_Interpretor& theDI,
   //                  OR
   //  0 * X^2 + 1 * Y^2 + 2*0*X*Y + 2*(-1)*X + 2*(-3)*Y + 10 = 0.
 
-  Parab2d_Bug26747::Axes = gp_Ax2d(gp_Pnt2d(0.0, 3.0), gp_Dir2d(0.0, 1.0));
+  Parab2d_Bug26747::Axes = gp_Ax2d(gp_Pnt2d(0.0, 3.0), gp_Dir2d(gp_Dir2d::D::Y));
   Parab2d_Bug26747::FocusPoint.SetCoord(1.0, 3.0);
 
   Parab2d_Bug26747::FocalLength = 0.5;
@@ -2391,7 +2391,7 @@ static Standard_Integer OCC26747_2(Draw_Interpretor& theDI,
   //  A * X^2 + B * (Y^2) + 2*C*(X*Y) + 2*D*X + 2*E*Y    + F = 0.
   //  0 * X^2 + 1 * (Y^2) + 2*0*(X*Y) + 2*1*X + 2*(-3)*Y + 10 = 0.
 
-  Parab2d_Bug26747::Axes = gp_Ax2d(gp_Pnt2d(0.0, 0.0), gp_Dir2d(0.0, 1.0));
+  Parab2d_Bug26747::Axes = gp_Ax2d(gp_Pnt2d(0.0, 0.0), gp_Dir2d(gp_Dir2d::D::Y));
   Parab2d_Bug26747::FocusPoint.SetCoord(-1.0, 3.0);
 
   Parab2d_Bug26747::FocalLength = 0.5;
@@ -2456,7 +2456,7 @@ static Standard_Integer OCC26747_3(Draw_Interpretor& theDI,
   //  A * X^2 + B * (Y^2) + 2*C*(X*Y) + 2*D*X + 2*E*Y    + F = 0.
   //  0 * X^2 + 1 * (Y^2) + 2*0*(X*Y) + 2*0*X + 2*(-3)*Y + 9 = 0.
 
-  Parab2d_Bug26747::Axes = gp_Ax2d(gp_Pnt2d(0.0, 0.0), gp_Dir2d(0.0, 1.0));
+  Parab2d_Bug26747::Axes = gp_Ax2d(gp_Pnt2d(0.0, 0.0), gp_Dir2d(gp_Dir2d::D::Y));
   Parab2d_Bug26747::FocusPoint.SetCoord(0.0, 3.0);
 
   Parab2d_Bug26747::FocalLength = 0.0;
@@ -3022,7 +3022,7 @@ static Standard_Integer OCC28131(Draw_Interpretor&,
 
     Handle(Geom2d_BSplineCurve) c = anInterpolation.Curve();
 
-    gp_Pln pln(gp_Ax3(gp_Pnt(), gp_Dir(1, 0, 0), gp_Dir(0, -1, 0)));
+    gp_Pln pln{gp_Ax3(gp_Pnt(), gp_Dir(gp_Dir::D::X), gp_Dir(gp_Dir::D::NY))};
 
     Handle(Geom_BSplineCurve) c3d = Handle(Geom_BSplineCurve)::DownCast(GeomAPI::To3d(c, pln));
     curve1                        = c3d;
@@ -3039,7 +3039,7 @@ static Standard_Integer OCC28131(Draw_Interpretor&,
     anInterpolation.Perform();
 
     Handle(Geom2d_BSplineCurve) c = anInterpolation.Curve();
-    gp_Pln                      pln(gp_Ax3(gp_Pnt(), gp_Dir(0, -1, 0), gp_Dir(-1, 0, 0)));
+    gp_Pln                      pln{gp_Ax3(gp_Pnt(), gp_Dir(gp_Dir::D::NY), gp_Dir(gp_Dir::D::NX))};
     Handle(Geom_BSplineCurve)   c3d = Handle(Geom_BSplineCurve)::DownCast(GeomAPI::To3d(c, pln));
     curve2                          = c3d;
   }
@@ -3080,7 +3080,7 @@ static Standard_Integer OCC28131(Draw_Interpretor&,
 
 static Standard_Integer OCC29289(Draw_Interpretor&, Standard_Integer, const char**)
 {
-  gp_Elips2d             e1(gp_Ax2d(gp_Pnt2d(0., 0.), gp_Dir2d(1., 0)), 2., 1.);
+  gp_Elips2d             e1(gp_Ax2d(gp_Pnt2d(0., 0.), gp_Dir2d(gp_Dir2d::D::X)), 2., 1.);
   Handle(Geom2d_Ellipse) Ge1 = new Geom2d_Ellipse(e1);
   gp_Elips2d             e2(gp_Ax2d(gp_Pnt2d(0.5, 0.5), gp_Dir2d(1., 1.)), 2., 1.);
   Handle(Geom2d_Ellipse) Ge2 = new Geom2d_Ellipse(e2);
@@ -3402,7 +3402,7 @@ static Standard_Integer OCC29430(Draw_Interpretor& theDI,
   const Standard_Real r45 = M_PI / 4.0, r225 = 3.0 * M_PI / 4.0;
 
   GC_MakeArcOfCircle arcMaker(
-    gp_Circ(gp_Ax2(gp_Pnt(0.0, 0.0, 0.0), gp_Dir(0.0, 0.0, 1.0), gp_Dir(1.0, 0.0, 0.0)), 1.0),
+    gp_Circ(gp_Ax2(gp_Pnt(0.0, 0.0, 0.0), gp_Dir(gp_Dir::D::Z), gp_Dir(gp_Dir::D::X)), 1.0),
     r45,
     r225,
     Standard_True);
index 7a394f16ad7e38fd155dc0fd95a72e5b0ded99be..939628ac1b6dfd66b44fbd351f9f5c01a0698b92 100644 (file)
@@ -93,7 +93,7 @@ static Standard_Integer BUC60632(Draw_Interpretor& di, Standard_Integer /*n*/, c
   myAIScontext->Display(Ve1, Standard_False);
   myAIScontext->Display(Ve2, Standard_False);
 
-  Handle(Geom_Plane)             Plane1 = new Geom_Plane(gp_Pnt(0, 0, 0), gp_Dir(0, 0, 1));
+  Handle(Geom_Plane)             Plane1 = new Geom_Plane(gp_Pnt(0, 0, 0), gp_Dir(gp_Dir::D::Z));
   TCollection_ExtendedString     Ext1("Dim1");
   Handle(PrsDim_LengthDimension) Dim1 = new PrsDim_LengthDimension(V1, V2, Plane1->Pln());
   Dim1->SetCustomValue(Draw::Atof(a[2]));
@@ -215,10 +215,10 @@ static Standard_Integer BUC60792(Draw_Interpretor& di, Standard_Integer /*argc*/
   }
 
   gp_Pnt               pt3d(0, 20, 150);
-  gp_Ax2               anAx2(gp_Pnt(0, 0, 0), gp_Dir(1, 0, 0), gp_Dir(0, 0, 1));
+  gp_Ax2               anAx2(gp_Pnt(0, 0, 0), gp_Dir(gp_Dir::D::X), gp_Dir(gp_Dir::D::Z));
   gp_Circ              circ(anAx2, 50.0);
   Handle(Geom_Circle)  gcir  = new Geom_Circle(circ);
-  Handle(Geom_Plane)   pln   = new Geom_Plane(gp_Ax3(gp_Pnt(0, 0, 0), gp_Dir(1, 0, 0)));
+  Handle(Geom_Plane)   pln   = new Geom_Plane(gp_Ax3(gp_Pnt(0, 0, 0), gp_Dir(gp_Dir::D::X)));
   Handle(Geom2d_Curve) gcir1 = GeomAPI::To2d(gcir, pln->Pln());
   TopoDS_Shape         sh1   = BRepBuilderAPI_MakeEdge(gcir1, pln).Shape();
   Handle(AIS_Shape)    ais1  = new AIS_Shape(sh1);
@@ -504,7 +504,6 @@ static Standard_Integer BUC60856(Draw_Interpretor& di, Standard_Integer /*argc*/
     return -1;
   }
 
-  gp_Ax2                                 Cone_Ax;
   double                                 R1 = 8, R2 = 16;
   gp_Pnt                                 P1(0, 0, 20), P2(0, 0, 45);
   Handle(Geom_RectangularTrimmedSurface) S = GC_MakeTrimmedCone(P1, P2, R1, R2).Value();
@@ -798,9 +797,9 @@ static Standard_Integer BUC60841(Draw_Interpretor& di, Standard_Integer argc, co
     return 1;
   }
 
-  gp_Ax2                   Ax2 = gp_Ax2(gp_Pnt(0, 621, 78), gp_Dir(0, 1, 0));
+  gp_Ax2                   Ax2 = gp_Ax2(gp_Pnt(0, 621, 78), gp_Dir(gp_Dir::D::Y));
   BRepPrimAPI_MakeCylinder cyl(Ax2, 260, 150);
-  // BRepPrimAPI_MakeCylinder cyl(gp_Ax2(gp_Pnt(0, 621, 78), gp_Dir(0, 1,0)), 260, 150);
+  // BRepPrimAPI_MakeCylinder cyl(gp_Ax2(gp_Pnt(0, 621, 78), gp_Dir(gp_Dir::D::Y)), 260, 150);
 
   TopoDS_Shape sh1 = cyl.Shape();
   DBRep::Set("sh1", sh1);
@@ -1398,7 +1397,7 @@ static Standard_Integer BUC60951_(Draw_Interpretor& di, Standard_Integer argc, c
 
   BRepPrimAPI_MakeHalfSpace half(shell, gp_Pnt(0, 0, 20));
   const TopoDS_Solid&       sol = half.Solid();
-  gp_Ax2                    anAx2(gp_Pnt(-800.0, 0.0, 0), gp_Dir(0, 0, -1));
+  gp_Ax2                    anAx2(gp_Pnt(-800.0, 0.0, 0), gp_Dir(gp_Dir::D::NZ));
   BRepPrimAPI_MakeCylinder  cyl(anAx2, 50, 300);
   TopoDS_Shape              sh = cyl.Shape();
 
index 6537e1c342953bb75cb18bd960defc736f2cd2d9..45cefb35adbc11f1e4359bdeb75b1623f9edef3c 100644 (file)
@@ -31,7 +31,6 @@
 
 static Standard_Integer BUC60857(Draw_Interpretor& di, Standard_Integer /*argc*/, const char** argv)
 {
-  gp_Ax2 Cone_Ax;
   double R1 = 8, R2 = 16;
   gp_Pnt P1(0, 0, 20), P2(0, 0, 45);
 
index 0ed2025c7393089aa00c5afbdff4c117d9762c19..10e6f9d0f0f2391e8548b93784fa15e2bf1a677e 100644 (file)
@@ -60,7 +60,7 @@ void QABugs_PresentableObject::Compute(const Handle(PrsMgr_PresentationManager)&
     }
     case 1: {
       aPrims->AddVertex(gp_Pnt(5.0, 0.0, 0.0),
-                        gp_Dir(0.0, 0.0, 1.0),
+                        gp_Dir(gp_Dir::D::Z),
                         Quantity_Color(Quantity_NOC_RED));
       aPrims->AddVertex(gp_Pnt(5.0, 5.0, 1.0),
                         gp_Dir(1.0, 1.0, 1.0),
@@ -73,7 +73,7 @@ void QABugs_PresentableObject::Compute(const Handle(PrsMgr_PresentationManager)&
                         gp_Dir(1.0, 1.0, 1.0),
                         Quantity_Color(Quantity_NOC_BLUE1));
       aPrims->AddVertex(gp_Pnt(10.0, 5.0, -1.0),
-                        gp_Dir(0.0, 0.0, -1.0),
+                        gp_Dir(gp_Dir::D::NZ),
                         Quantity_Color(Quantity_NOC_GREEN));
       aPrims->AddVertex(gp_Pnt(10.0, 0.0, 1.0),
                         gp_Dir(0.0, 1.0, 1.0),
index d112c963b7fb8beacbef3cf68b11012e487dfa3d..b569dc31bf7355bdaf15952fd795c5ebad5e23d7 100644 (file)
@@ -576,12 +576,12 @@ static Standard_Integer isoedge(Draw_Interpretor&, Standard_Integer n, const cha
   if (uiso)
   {
     C = TS->UIso(p);
-    L = new Geom2d_Line(gp_Pnt2d(p, 0), gp_Dir2d(0, 1));
+    L = new Geom2d_Line(gp_Pnt2d(p, 0), gp_Dir2d(gp_Dir2d::D::Y));
   }
   else
   {
     C = TS->VIso(p);
-    L = new Geom2d_Line(gp_Pnt2d(0, p), gp_Dir2d(1, 0));
+    L = new Geom2d_Line(gp_Pnt2d(0, p), gp_Dir2d(gp_Dir2d::D::X));
   }
 
   TopoDS_Edge E = BRepBuilderAPI_MakeEdge(C, p1, p2);
index ecb8ae8f78748706bbae67f9b2434465e36353e1..4d80f2cf190f4b09447e2d74f9416d5434c8b843 100644 (file)
@@ -47,7 +47,7 @@
 #include <BRepTest.hxx>
 
 Standard_IMPORT Draw_Viewer dout;
-static gp_Ax3               theHelixAxis(gp_Pnt(0., 0., 0), gp_Dir(0., 0., 1.), gp_Dir(1., 0., 0.));
+static gp_Ax3 theHelixAxis(gp_Pnt(0., 0., 0), gp_Dir(gp_Dir::D::Z), gp_Dir(gp_Dir::D::X));
 
 static Standard_Integer comphelix(Draw_Interpretor&, Standard_Integer, const char**);
 static Standard_Integer helix(Draw_Interpretor&, Standard_Integer, const char**);
index b5dde85e52f20a04b344043b40e8ec6cf9f1a436..43388b8f368c1ff8562c8a1c2719d2bb26965505 100644 (file)
@@ -1158,9 +1158,9 @@ static Standard_Integer EllipsUniformAbscissa(Draw_Interpretor& di,
   {
     gp_Pnt location;
     location = gp_Pnt(0.0, 0.0, 0.0);
-    gp_Dir main_direction(0.0, 0.0, 1.0);
+    gp_Dir main_direction(gp_Dir::D::Z);
 
-    gp_Dir x_direction(1.0, 0.0, 0.0);
+    gp_Dir x_direction(gp_Dir::D::X);
     gp_Ax2 mainaxis(location, main_direction);
 
     mainaxis.SetXDirection(x_direction);
index 76fa3049d10e171084375b85f78dfe74fbe08f3c..ceaac8f396f60cac7228565af289a72d7bed1058 100644 (file)
@@ -50,9 +50,10 @@ static Standard_Integer qcurve(Draw_Interpretor&,
   if (!strcmp(theArgVec[0], "qcircle"))
   {
     if (theArgsNb == 5 || theArgsNb == 6)
-      aResult2d = new Geom2d_Circle(
-        gp_Ax22d(gp_Pnt2d(Draw::Atof(theArgVec[2]), Draw::Atof(theArgVec[3])), gp_Dir2d(1, 0)),
-        Draw::Atof(theArgVec[4]));
+      aResult2d =
+        new Geom2d_Circle(gp_Ax22d(gp_Pnt2d(Draw::Atof(theArgVec[2]), Draw::Atof(theArgVec[3])),
+                                   gp_Dir2d(gp_Dir2d::D::X)),
+                          Draw::Atof(theArgVec[4]));
     else if (theArgsNb == 7 || theArgsNb == 8)
       aResult2d =
         new Geom2d_Circle(gp_Ax22d(gp_Pnt2d(Draw::Atof(theArgVec[2]), Draw::Atof(theArgVec[3])),
index 31c53ab91d6597ca0c0cb4630b37739436787b47..ea4a0d2e021f10e171278f3a0e76502865aaed21 100644 (file)
@@ -153,12 +153,12 @@ static Standard_Integer anacurve(Draw_Interpretor&, Standard_Integer n, const ch
   else if (!strcmp(a[0], "circle"))
   {
     if (n == 5)
-      result2d =
-        new Geom2d_Circle(gp_Ax22d(gp_Pnt2d(Draw::Atof(a[2]), Draw::Atof(a[3])), gp_Dir2d(1, 0)),
-                          Draw::Atof(a[4]));
+      result2d = new Geom2d_Circle(
+        gp_Ax22d(gp_Pnt2d(Draw::Atof(a[2]), Draw::Atof(a[3])), gp_Dir2d(gp_Dir2d::D::X)),
+        Draw::Atof(a[4]));
     else if (n == 6)
       result = new Geom_Circle(
-        gp_Ax2(gp_Pnt(Draw::Atof(a[2]), Draw::Atof(a[3]), Draw::Atof(a[4])), gp_Dir(0, 0, 1)),
+        gp_Ax2(gp_Pnt(Draw::Atof(a[2]), Draw::Atof(a[3]), Draw::Atof(a[4])), gp_Dir(gp_Dir::D::Z)),
         Draw::Atof(a[5]));
     else if (n == 7)
       result2d = new Geom2d_Circle(gp_Ax22d(gp_Pnt2d(Draw::Atof(a[2]), Draw::Atof(a[3])),
@@ -181,12 +181,12 @@ static Standard_Integer anacurve(Draw_Interpretor&, Standard_Integer n, const ch
   else if (!strcmp(a[0], "parabola"))
   {
     if (n == 5)
-      result2d =
-        new Geom2d_Parabola(gp_Ax22d(gp_Pnt2d(Draw::Atof(a[2]), Draw::Atof(a[3])), gp_Dir2d(1, 0)),
-                            Draw::Atof(a[4]));
+      result2d = new Geom2d_Parabola(
+        gp_Ax22d(gp_Pnt2d(Draw::Atof(a[2]), Draw::Atof(a[3])), gp_Dir2d(gp_Dir2d::D::X)),
+        Draw::Atof(a[4]));
     else if (n == 6)
       result = new Geom_Parabola(
-        gp_Ax2(gp_Pnt(Draw::Atof(a[2]), Draw::Atof(a[3]), Draw::Atof(a[4])), gp_Dir(0, 0, 1)),
+        gp_Ax2(gp_Pnt(Draw::Atof(a[2]), Draw::Atof(a[3]), Draw::Atof(a[4])), gp_Dir(gp_Dir::D::Z)),
         Draw::Atof(a[5]));
     else if (n == 7)
       result2d = new Geom2d_Parabola(gp_Ax22d(gp_Pnt2d(Draw::Atof(a[2]), Draw::Atof(a[3])),
@@ -210,13 +210,13 @@ static Standard_Integer anacurve(Draw_Interpretor&, Standard_Integer n, const ch
   else if (!strcmp(a[0], "ellipse"))
   {
     if (n == 6)
-      result2d =
-        new Geom2d_Ellipse(gp_Ax22d(gp_Pnt2d(Draw::Atof(a[2]), Draw::Atof(a[3])), gp_Dir2d(1, 0)),
-                           Draw::Atof(a[4]),
-                           Draw::Atof(a[5]));
+      result2d = new Geom2d_Ellipse(
+        gp_Ax22d(gp_Pnt2d(Draw::Atof(a[2]), Draw::Atof(a[3])), gp_Dir2d(gp_Dir2d::D::X)),
+        Draw::Atof(a[4]),
+        Draw::Atof(a[5]));
     else if (n == 7)
       result = new Geom_Ellipse(
-        gp_Ax2(gp_Pnt(Draw::Atof(a[2]), Draw::Atof(a[3]), Draw::Atof(a[4])), gp_Dir(0, 0, 1)),
+        gp_Ax2(gp_Pnt(Draw::Atof(a[2]), Draw::Atof(a[3]), Draw::Atof(a[4])), gp_Dir(gp_Dir::D::Z)),
         Draw::Atof(a[5]),
         Draw::Atof(a[6]));
     else if (n == 8)
@@ -244,13 +244,13 @@ static Standard_Integer anacurve(Draw_Interpretor&, Standard_Integer n, const ch
   else if (!strcmp(a[0], "hyperbola"))
   {
     if (n == 6)
-      result2d =
-        new Geom2d_Hyperbola(gp_Ax22d(gp_Pnt2d(Draw::Atof(a[2]), Draw::Atof(a[3])), gp_Dir2d(1, 0)),
-                             Draw::Atof(a[4]),
-                             Draw::Atof(a[5]));
+      result2d = new Geom2d_Hyperbola(
+        gp_Ax22d(gp_Pnt2d(Draw::Atof(a[2]), Draw::Atof(a[3])), gp_Dir2d(gp_Dir2d::D::X)),
+        Draw::Atof(a[4]),
+        Draw::Atof(a[5]));
     else if (n == 7)
       result = new Geom_Hyperbola(
-        gp_Ax2(gp_Pnt(Draw::Atof(a[2]), Draw::Atof(a[3]), Draw::Atof(a[4])), gp_Dir(0, 0, 1)),
+        gp_Ax2(gp_Pnt(Draw::Atof(a[2]), Draw::Atof(a[3]), Draw::Atof(a[4])), gp_Dir(gp_Dir::D::Z)),
         Draw::Atof(a[5]),
         Draw::Atof(a[6]));
     else if (n == 8)
index fc06a20e44eeb8030c40f2e8a04182d607004a04..3c07436fa29c00508c73aa6ca331d14d80cc64a0 100644 (file)
@@ -145,14 +145,14 @@ static Standard_Integer anasurface(Draw_Interpretor&, Standard_Integer n, const
 
   if (n < 5)
   {
-    loc = gp_Ax3(gp_Pnt(0, 0, 0), gp_Dir(0, 0, 1), gp_Dir(1, 0, 0));
+    loc = gp_Ax3(gp_Pnt(0, 0, 0), gp_Dir(gp_Dir::D::Z), gp_Dir(gp_Dir::D::X));
     i   = 2;
   }
   else if (n < 8)
   {
     loc = gp_Ax3(gp_Pnt(Draw::Atof(a[2]), Draw::Atof(a[3]), Draw::Atof(a[4])),
-                 gp_Dir(0, 0, 1),
-                 gp_Dir(1, 0, 0));
+                 gp_Dir(gp_Dir::D::Z),
+                 gp_Dir(gp_Dir::D::X));
     i   = 5;
   }
   else if (n < 11)
index b5bdabb50b2c6c4116224d9f84dcd44b42b2eafb..5819883a7b071ee48cd2b29c7db627f3d0948cc9 100644 (file)
@@ -698,7 +698,6 @@ static int VTrihedron(Draw_Interpretor&, Standard_Integer theArgsNb, const char*
   }
 
   TCollection_AsciiString aName(theArgVec[1]);
-  gp_Pln                  aWorkingPlane;
   Standard_Boolean        toUpdate = Standard_True;
 
   NCollection_DataMap<TCollection_AsciiString, Standard_Real>           aRealParams;
@@ -2967,7 +2966,7 @@ Handle(Poly_Triangulation) CalculationOfSphere(double X, double Y, double Z, int
     if (modmax > Tol)
       Nor = gp_Dir(eqPlan);
     else
-      Nor = gp_Dir(0., 0., 1.);
+      Nor = gp_Dir(gp_Dir::D::Z);
 
     polyTriangulation->SetNormal(i, Nor.XYZ());
   }
@@ -5678,8 +5677,8 @@ static int TextToBRep(Draw_Interpretor& /*theDI*/,
   Font_FontAspect         aFontAspect        = Font_FA_Regular;
   Standard_Boolean        anIsCompositeCurve = Standard_False;
   gp_Ax3                  aPenAx3(gp::XOY());
-  gp_Dir                  aNormal(0.0, 0.0, 1.0);
-  gp_Dir                  aDirection(1.0, 0.0, 0.0);
+  gp_Dir                  aNormal(gp_Dir::D::Z);
+  gp_Dir                  aDirection(gp_Dir::D::X);
   gp_Pnt                  aPenLoc;
 
   Graphic3d_HorizontalTextAlignment aHJustification = Graphic3d_HTA_LEFT;
index 01b65679d2690cde34d1e648a508209b07caf266..fe55880ac2b4cfc9f75078b57fc28067911ec570 100644 (file)
@@ -1730,7 +1730,6 @@ static int VAngleParam(Draw_Interpretor& theDi, Standard_Integer theArgNum, cons
   }
 
   TCollection_AsciiString aName(theArgVec[1]);
-  gp_Pln                  aWorkingPlane;
   Standard_Boolean        toUpdate = Standard_True;
 
   NCollection_DataMap<TCollection_AsciiString, TCollection_AsciiString> aStringParams;
index 24749e6b88c4dfe6c7352cb07bd6bc95f9e20a40..2c1ca12cc80bc061c198ea0d4e2be2e5114ea63f 100644 (file)
@@ -5797,7 +5797,7 @@ public:
       myDrawer->SetTextAspect(aTextAspect);
     }
     {
-      const gp_Dir aNorm(0.0, 0.0, 1.0);
+      const gp_Dir aNorm(gp_Dir::D::Z);
       myTris = new Graphic3d_ArrayOfTriangles(4, 6, true, false, true);
       myTris->AddVertex(gp_Pnt(-myWidth * 0.5, -myHeight * 0.5, 0.0), aNorm, gp_Pnt2d(0.0, 0.0));
       myTris->AddVertex(gp_Pnt(myWidth * 0.5, -myHeight * 0.5, 0.0), aNorm, gp_Pnt2d(1.0, 0.0));
index 64bd9adb7395eeff06413a102f6403d17e40a19e..8930befcc8170d4d2a7c69c9cc1c0dd3a41c56f7 100644 (file)
@@ -695,9 +695,9 @@ void OBBTool::BuildBox(Bnd_OBB& theBox)
   const Standard_Boolean isOBB =
     myAxes[0].SquareModulus() * myAxes[1].SquareModulus() * myAxes[2].SquareModulus() > 1.0e-14;
 
-  const gp_Dir aXDir = isOBB ? myAxes[0] : gp_Dir(1, 0, 0);
-  const gp_Dir aYDir = isOBB ? myAxes[1] : gp_Dir(0, 1, 0);
-  const gp_Dir aZDir = isOBB ? myAxes[2] : gp_Dir(0, 0, 1);
+  const gp_Dir aXDir = isOBB ? myAxes[0] : gp_Dir(gp_Dir::D::X);
+  const gp_Dir aYDir = isOBB ? myAxes[1] : gp_Dir(gp_Dir::D::Y);
+  const gp_Dir aZDir = isOBB ? myAxes[2] : gp_Dir(gp_Dir::D::Z);
 
   const Standard_Integer aNbPoints = 6;
   Standard_Real          aParams[aNbPoints];
index 0eb33950cae01568d0442ca6bbfecec2ad074701..e39981e58c1161fe2801fcebd7ace16cf07bc438 100644 (file)
@@ -157,7 +157,7 @@ TEST_F(Bnd_BoundSortBoxTest, CompareWithPlane)
 
   // Create a plane that intersects the large box but not others
   gp_Pnt point(0.0, 0.0, 9.0);
-  gp_Dir direction(0.0, 0.0, 1.0);
+  gp_Dir direction(gp_Dir::D::Z);
   gp_Pln plane(point, direction);
 
   const TColStd_ListOfInteger& result = sortBox.Compare(plane);
index cd1464d60f1f6ab7a42911a7b6a10bd66c1ca708..5be9ca4c457ae2137b6994e940fc24f7ec8ea74c 100644 (file)
@@ -86,7 +86,7 @@ TEST(Bnd_BoxTest, SetWithPointAndDirection)
 {
   Bnd_Box aBox;
   gp_Pnt  aPnt(1.0, 2.0, 3.0);
-  gp_Dir  aDir(1.0, 0.0, 0.0);
+  gp_Dir  aDir(gp_Dir::D::X);
 
   aBox.Set(aPnt, aDir);
 
@@ -322,7 +322,7 @@ TEST(Bnd_BoxTest, TransformationVoidBox)
 {
   Bnd_Box aVoidBox;
   gp_Trsf aRotation;
-  aRotation.SetRotation(gp_Ax1(gp_Pnt(0, 0, 0), gp_Dir(0, 0, 1)), M_PI / 4);
+  aRotation.SetRotation(gp_Ax1(gp_Pnt(0, 0, 0), gp_Dir(gp_Dir::D::Z)), M_PI / 4);
 
   Bnd_Box aTransformed = aVoidBox.Transformed(aRotation);
 
@@ -414,7 +414,7 @@ TEST(Bnd_BoxTest, AddDirection)
   Bnd_Box aBox;
   aBox.Update(0.0, 0.0, 0.0, 1.0, 1.0, 1.0);
 
-  gp_Dir aDir(1.0, 0.0, 0.0);
+  gp_Dir aDir(gp_Dir::D::X);
   aBox.Add(aDir);
 
   EXPECT_TRUE(aBox.IsOpenXmax()) << "Positive X direction should open Xmax";
@@ -427,7 +427,7 @@ TEST(Bnd_BoxTest, AddPointWithDirection)
 {
   Bnd_Box aBox;
   gp_Pnt  aPnt(1.0, 2.0, 3.0);
-  gp_Dir  aDir(-1.0, 0.0, 0.0);
+  gp_Dir  aDir(gp_Dir::D::NX);
 
   aBox.Add(aPnt, aDir);
 
@@ -510,10 +510,10 @@ TEST(Bnd_BoxTest, IsOutPlane)
   aBox.Update(-1.0, -1.0, -1.0, 1.0, 1.0, 1.0);
 
   // Plane that intersects the box
-  gp_Pln anIntersectingPln(gp_Pnt(0, 0, 0), gp_Dir(1, 0, 0));
+  gp_Pln anIntersectingPln(gp_Pnt(0, 0, 0), gp_Dir(gp_Dir::D::X));
 
   // Plane that doesn't intersect the box
-  gp_Pln aSeparatePln(gp_Pnt(2, 0, 0), gp_Dir(1, 0, 0));
+  gp_Pln aSeparatePln(gp_Pnt(2, 0, 0), gp_Dir(gp_Dir::D::X));
 
   EXPECT_FALSE(aBox.IsOut(anIntersectingPln)) << "Intersecting plane should not be out";
   EXPECT_TRUE(aBox.IsOut(aSeparatePln)) << "Separate plane should be out";
@@ -525,10 +525,10 @@ TEST(Bnd_BoxTest, IsOutLine)
   aBox.Update(0.0, 0.0, 0.0, 2.0, 2.0, 2.0);
 
   // Line that passes through the box
-  gp_Lin anIntersectingLin(gp_Pnt(-1, 1, 1), gp_Dir(1, 0, 0));
+  gp_Lin anIntersectingLin(gp_Pnt(-1, 1, 1), gp_Dir(gp_Dir::D::X));
 
   // Line that misses the box
-  gp_Lin aSeparateLin(gp_Pnt(-1, 3, 1), gp_Dir(1, 0, 0));
+  gp_Lin aSeparateLin(gp_Pnt(-1, 3, 1), gp_Dir(gp_Dir::D::X));
 
   EXPECT_FALSE(aBox.IsOut(anIntersectingLin)) << "Intersecting line should not be out";
   EXPECT_TRUE(aBox.IsOut(aSeparateLin)) << "Separate line should be out";
@@ -641,7 +641,7 @@ TEST(Bnd_BoxTest, TransformationWithOpenBox)
   aBox.OpenXmax();
 
   gp_Trsf aRotation;
-  aRotation.SetRotation(gp_Ax1(gp_Pnt(0, 0, 0), gp_Dir(0, 0, 1)), M_PI / 2);
+  aRotation.SetRotation(gp_Ax1(gp_Pnt(0, 0, 0), gp_Dir(gp_Dir::D::Z)), M_PI / 2);
 
   Bnd_Box aTransformed = aBox.Transformed(aRotation);
 
@@ -744,7 +744,7 @@ TEST(Bnd_BoxTest, IsOutLineSegment)
   // Line segment that passes through box
   gp_Pnt aP1(-1.0, 1.0, 1.0);
   gp_Pnt aP2(3.0, 1.0, 1.0);
-  gp_Dir aDir(1.0, 0.0, 0.0);
+  gp_Dir aDir(gp_Dir::D::X);
 
   EXPECT_FALSE(aBox.IsOut(aP1, aP2, aDir)) << "Line segment through box should not be out";
 
index b7305d938c06f179c6485c0c7ddb723f4133c7ce..c1961cb701ab1079c2cf4cda72081b220d65082b 100644 (file)
@@ -123,7 +123,7 @@ TEST(ElClibTests, AdjustPeriodic)
 TEST(ElClibTests, Line3D)
 {
   const gp_Pnt        aLoc(1.0, 2.0, 3.0);
-  const gp_Dir        aDir(0.0, 0.0, 1.0);
+  const gp_Dir        aDir(gp_Dir::D::Z);
   const gp_Lin        aLin(aLoc, aDir);
   const Standard_Real aParam = 5.0;
 
@@ -154,8 +154,8 @@ TEST(ElClibTests, Line3D)
 TEST(ElClibTests, Circle3D)
 {
   const gp_Pnt        aLoc(0.0, 0.0, 0.0);
-  const gp_Dir        aDirZ(0.0, 0.0, 1.0);
-  const gp_Dir        aDirX(1.0, 0.0, 0.0);
+  const gp_Dir        aDirZ(gp_Dir::D::Z);
+  const gp_Dir        aDirX(gp_Dir::D::X);
   const gp_Ax2        anAxis(aLoc, aDirZ, aDirX);
   const Standard_Real aRadius = 2.0;
   const gp_Circ       aCircle(anAxis, aRadius);
@@ -211,8 +211,8 @@ TEST(ElClibTests, Circle3D)
 TEST(ElClibTests, Ellipse3D)
 {
   const gp_Pnt        aLoc(0.0, 0.0, 0.0);
-  const gp_Dir        aDirZ(0.0, 0.0, 1.0);
-  const gp_Dir        aDirX(1.0, 0.0, 0.0);
+  const gp_Dir        aDirZ(gp_Dir::D::Z);
+  const gp_Dir        aDirX(gp_Dir::D::X);
   const gp_Ax2        anAxis(aLoc, aDirZ, aDirX);
   const Standard_Real aMajorRadius = 3.0;
   const Standard_Real aMinorRadius = 2.0;
@@ -240,8 +240,8 @@ TEST(ElClibTests, Ellipse3D)
 TEST(ElClibTests, Hyperbola3D)
 {
   const gp_Pnt        aLoc(0.0, 0.0, 0.0);
-  const gp_Dir        aDirZ(0.0, 0.0, 1.0);
-  const gp_Dir        aDirX(1.0, 0.0, 0.0);
+  const gp_Dir        aDirZ(gp_Dir::D::Z);
+  const gp_Dir        aDirX(gp_Dir::D::X);
   const gp_Ax2        anAxis(aLoc, aDirZ, aDirX);
   const Standard_Real aMajorRadius = 3.0;
   const Standard_Real aMinorRadius = 2.0;
@@ -269,8 +269,8 @@ TEST(ElClibTests, Hyperbola3D)
 TEST(ElClibTests, Parabola3D)
 {
   const gp_Pnt        aLoc(0.0, 0.0, 0.0);
-  const gp_Dir        aDirZ(0.0, 0.0, 1.0);
-  const gp_Dir        aDirX(1.0, 0.0, 0.0);
+  const gp_Dir        aDirZ(gp_Dir::D::Z);
+  const gp_Dir        aDirX(gp_Dir::D::X);
   const gp_Ax2        anAxis(aLoc, aDirZ, aDirX);
   const Standard_Real aFocal = 2.0;
   const gp_Parab      aParabola(anAxis, aFocal);
@@ -297,8 +297,8 @@ TEST(ElClibTests, Parabola3D)
 TEST(ElClibTests, To3dConversion)
 {
   const gp_Pnt aLoc(1.0, 2.0, 3.0);
-  const gp_Dir aDirZ(0.0, 0.0, 1.0);
-  const gp_Dir aDirX(1.0, 0.0, 0.0);
+  const gp_Dir aDirZ(gp_Dir::D::Z);
+  const gp_Dir aDirX(gp_Dir::D::X);
   const gp_Ax2 anAxis(aLoc, aDirZ, aDirX);
 
   // Test conversion of a point
@@ -321,7 +321,7 @@ TEST(ElClibTests, To3dConversion)
 
   // Test conversion of a circle
   const gp_Pnt2d      aLoc2d(0.0, 0.0);
-  const gp_Dir2d      aDir2dX(1.0, 0.0);
+  const gp_Dir2d      aDir2dX(gp_Dir2d::D::X);
   const gp_Ax22d      anAxis2d(aLoc2d, aDir2dX, true);
   const Standard_Real aRadius = 2.0;
   const gp_Circ2d     aCirc2d(anAxis2d, aRadius);
index bb98f685ba411457a4e165961e68988b51f3a662..58e74999762eaf62eff293b1f2d4fd48e2c37f86 100644 (file)
@@ -14,6 +14,7 @@
 
 #include <gp.hxx>
 
+#include <gp_Ax1.hxx>
 #include <gp_Ax2.hxx>
 #include <gp_Ax2d.hxx>
 #include <gp_Dir.hxx>
 
 //=================================================================================================
 
-const gp_Pnt& gp::Origin()
+const gp_Pnt& gp::Origin() noexcept
 {
-  static gp_Pnt gp_Origin(0, 0, 0);
+  static const gp_Pnt gp_Origin(0, 0, 0);
   return gp_Origin;
 }
 
 //=================================================================================================
 
-const gp_Dir& gp::DX()
+const gp_Dir& gp::DX() noexcept
 {
-  static gp_Dir gp_DX(1, 0, 0);
+  static const gp_Dir gp_DX(gp_Dir::D::X);
   return gp_DX;
 }
 
 //=================================================================================================
 
-const gp_Dir& gp::DY()
+const gp_Dir& gp::DY() noexcept
 {
-  static gp_Dir gp_DY(0, 1, 0);
+  static const gp_Dir gp_DY(gp_Dir::D::Y);
   return gp_DY;
 }
 
 //=================================================================================================
 
-const gp_Dir& gp::DZ()
+const gp_Dir& gp::DZ() noexcept
 {
-  static gp_Dir gp_DZ(0, 0, 1);
+  static const gp_Dir gp_DZ(gp_Dir::D::Z);
   return gp_DZ;
 }
 
 //=================================================================================================
 
-const gp_Ax1& gp::OX()
+const gp_Ax1& gp::OX() noexcept
 {
-  static gp_Ax1 gp_OX(gp_Pnt(0, 0, 0), gp_Dir(1, 0, 0));
+  static const gp_Ax1 gp_OX(gp_Pnt(0, 0, 0), gp_Dir::D::X);
   return gp_OX;
 }
 
 //=================================================================================================
 
-const gp_Ax1& gp::OY()
+const gp_Ax1& gp::OY() noexcept
 {
-  static gp_Ax1 gp_OY(gp_Pnt(0, 0, 0), gp_Dir(0, 1, 0));
+  static const gp_Ax1 gp_OY(gp_Pnt(0, 0, 0), gp_Dir::D::Y);
   return gp_OY;
 }
 
 //=================================================================================================
 
-const gp_Ax1& gp::OZ()
+const gp_Ax1& gp::OZ() noexcept
 {
-  static gp_Ax1 gp_OZ(gp_Pnt(0, 0, 0), gp_Dir(0, 0, 1));
+  static const gp_Ax1 gp_OZ(gp_Pnt(0, 0, 0), gp_Dir::D::Z);
   return gp_OZ;
 }
 
 //=================================================================================================
 
-const gp_Ax2& gp::XOY()
+const gp_Ax2& gp::XOY() noexcept
 {
-  static gp_Ax2 gp_XOY(gp_Pnt(0, 0, 0), gp_Dir(0, 0, 1), gp_Dir(1, 0, 0));
+  static const gp_Ax2 gp_XOY(gp_Pnt(0, 0, 0), gp_Dir::D::Z);
   return gp_XOY;
 }
 
 //=================================================================================================
 
-const gp_Ax2& gp::ZOX()
+const gp_Ax2& gp::ZOX() noexcept
 {
-  static gp_Ax2 gp_ZOX(gp_Pnt(0, 0, 0), gp_Dir(0, 1, 0), gp_Dir(0, 0, 1));
+  static const gp_Ax2 gp_ZOX(gp_Pnt(0, 0, 0), gp_Dir::D::Y);
   return gp_ZOX;
 }
 
 //=================================================================================================
 
-const gp_Ax2& gp::YOZ()
+const gp_Ax2& gp::YOZ() noexcept
 {
-  static gp_Ax2 gp_YOZ(gp_Pnt(0, 0, 0), gp_Dir(1, 0, 0), gp_Dir(0, 1, 0));
+  static const gp_Ax2 gp_YOZ(gp_Pnt(0, 0, 0), gp_Dir::D::X);
   return gp_YOZ;
 }
 
 //=================================================================================================
 
-const gp_Pnt2d& gp::Origin2d()
+const gp_Pnt2d& gp::Origin2d() noexcept
 {
-  static gp_Pnt2d gp_Origin2d(0, 0);
+  static const gp_Pnt2d gp_Origin2d(0, 0);
   return gp_Origin2d;
 }
 
 //=================================================================================================
 
-const gp_Dir2d& gp::DX2d()
+const gp_Dir2d& gp::DX2d() noexcept
 {
-  static gp_Dir2d gp_DX2d(1, 0);
+  static const gp_Dir2d gp_DX2d(gp_Dir2d::D::X);
   return gp_DX2d;
 }
 
 //=================================================================================================
 
-const gp_Dir2d& gp::DY2d()
+const gp_Dir2d& gp::DY2d() noexcept
 {
-  static gp_Dir2d gp_DY2d(0, 1);
+  static const gp_Dir2d gp_DY2d(gp_Dir2d::D::Y);
   return gp_DY2d;
 }
 
 //=================================================================================================
 
-const gp_Ax2d& gp::OX2d()
+const gp_Ax2d& gp::OX2d() noexcept
 {
-  static gp_Ax2d gp_OX2d(gp_Pnt2d(0, 0), gp_Dir2d(1, 0));
+  static const gp_Ax2d gp_OX2d(gp_Pnt2d(0, 0), gp_Dir2d::D::X);
   return gp_OX2d;
 }
 
 //=================================================================================================
 
-const gp_Ax2d& gp::OY2d()
+const gp_Ax2d& gp::OY2d() noexcept
 {
-  static gp_Ax2d gp_OY2d(gp_Pnt2d(0, 0), gp_Dir2d(0, 1));
+  static const gp_Ax2d gp_OY2d(gp_Pnt2d(0, 0), gp_Dir2d::D::Y);
   return gp_OY2d;
 }
index 025fdb082b9b6d4da9db58971f9bd8a896727d09..12bacb2018db4308d5fa9d9e3d19d06a6c754900 100644 (file)
@@ -39,11 +39,16 @@ class gp_Ax2d;
 //! surfaces.
 //! These entities are defined in 2d and 3d space.
 //! All the classes of this package are non-persistent.
+//! This is a utility class that cannot be instantiated.
 class gp
 {
-public:
-  DEFINE_STANDARD_ALLOC
+private:
+  // Non-instantiable utility class
+  gp()                     = delete;
+  gp(const gp&)            = delete;
+  gp& operator=(const gp&) = delete;
 
+public:
   //! Method of package gp
   //!
   //! In geometric computations, defines the tolerance criterion
@@ -55,61 +60,61 @@ public:
   static constexpr Standard_Real Resolution() { return RealSmall(); }
 
   //! Identifies a Cartesian point with coordinates X = Y = Z = 0.0.0
-  Standard_EXPORT static const gp_Pnt& Origin();
+  Standard_EXPORT static const gp_Pnt& Origin() noexcept;
 
   //! Returns a unit vector with the combination (1,0,0)
-  Standard_EXPORT static const gp_Dir& DX();
+  Standard_EXPORT static const gp_Dir& DX() noexcept;
 
   //! Returns a unit vector with the combination (0,1,0)
-  Standard_EXPORT static const gp_Dir& DY();
+  Standard_EXPORT static const gp_Dir& DY() noexcept;
 
   //! Returns a unit vector with the combination (0,0,1)
-  Standard_EXPORT static const gp_Dir& DZ();
+  Standard_EXPORT static const gp_Dir& DZ() noexcept;
 
   //! Identifies an axis where its origin is Origin
   //! and its unit vector coordinates  X = 1.0,  Y = Z = 0.0
-  Standard_EXPORT static const gp_Ax1& OX();
+  Standard_EXPORT static const gp_Ax1& OX() noexcept;
 
   //! Identifies an axis where its origin is Origin
   //! and its unit vector coordinates Y = 1.0,  X = Z = 0.0
-  Standard_EXPORT static const gp_Ax1& OY();
+  Standard_EXPORT static const gp_Ax1& OY() noexcept;
 
   //! Identifies an axis where its origin is Origin
   //! and its unit vector coordinates Z = 1.0,  Y = X = 0.0
-  Standard_EXPORT static const gp_Ax1& OZ();
+  Standard_EXPORT static const gp_Ax1& OZ() noexcept;
 
   //! Identifies a coordinate system where its origin is Origin,
   //! and its "main Direction" and "X Direction" coordinates
   //! Z = 1.0, X = Y =0.0 and X direction coordinates X = 1.0, Y = Z = 0.0
-  Standard_EXPORT static const gp_Ax2& XOY();
+  Standard_EXPORT static const gp_Ax2& XOY() noexcept;
 
   //! Identifies a coordinate system where its origin is Origin,
   //! and its "main Direction" and "X Direction" coordinates
   //! Y = 1.0, X = Z =0.0 and X direction coordinates Z = 1.0, X = Y = 0.0
-  Standard_EXPORT static const gp_Ax2& ZOX();
+  Standard_EXPORT static const gp_Ax2& ZOX() noexcept;
 
   //! Identifies a coordinate system where its origin is Origin,
   //! and its "main Direction" and "X Direction" coordinates
   //! X = 1.0, Z = Y =0.0 and X direction coordinates Y = 1.0, X = Z = 0.0
   //! In 2D space
-  Standard_EXPORT static const gp_Ax2& YOZ();
+  Standard_EXPORT static const gp_Ax2& YOZ() noexcept;
 
   //! Identifies a Cartesian point with coordinates X = Y = 0.0
-  Standard_EXPORT static const gp_Pnt2d& Origin2d();
+  Standard_EXPORT static const gp_Pnt2d& Origin2d() noexcept;
 
   //! Returns a unit vector with the combinations (1,0)
-  Standard_EXPORT static const gp_Dir2d& DX2d();
+  Standard_EXPORT static const gp_Dir2d& DX2d() noexcept;
 
   //! Returns a unit vector with the combinations (0,1)
-  Standard_EXPORT static const gp_Dir2d& DY2d();
+  Standard_EXPORT static const gp_Dir2d& DY2d() noexcept;
 
   //! Identifies an axis where its origin is Origin2d
   //! and its unit vector coordinates are: X = 1.0,  Y = 0.0
-  Standard_EXPORT static const gp_Ax2d& OX2d();
+  Standard_EXPORT static const gp_Ax2d& OX2d() noexcept;
 
   //! Identifies an axis where its origin is Origin2d
   //! and its unit vector coordinates are Y = 1.0,  X = 0.0
-  Standard_EXPORT static const gp_Ax2d& OY2d();
+  Standard_EXPORT static const gp_Ax2d& OY2d() noexcept;
 };
 
 #endif // _gp_HeaderFile
index 1853d5b50a2944a435428095d37d67285937b8a1..5e6c47fac5a06052168d8936b0996c60f41f0506 100644 (file)
@@ -41,9 +41,9 @@ public:
 
   //! Creates an axis object representing Z axis of
   //! the reference coordinate system.
-  gp_Ax1()
+  constexpr gp_Ax1() noexcept
       : loc(0., 0., 0.),
-        vdir(0., 0., 1.)
+        vdir(gp_Dir::D::Z)
   {
   }
 
@@ -54,6 +54,21 @@ public:
   {
   }
 
+  //! Creates an axis with the given location point and standard direction.
+  constexpr gp_Ax1(const gp_Pnt& theP, const gp_Dir::D theDir) noexcept
+      : loc(theP),
+        vdir(theDir)
+  {
+  }
+
+  //! Creates an axis at the origin with the given standard direction.
+  //! Replaces gp::OX(), gp::OY(), gp::OZ() static functions.
+  constexpr explicit gp_Ax1(const gp_Dir::D theDir) noexcept
+      : loc(0., 0., 0.),
+        vdir(theDir)
+  {
+  }
+
   //! Assigns V as the "Direction"  of this axis.
   constexpr void SetDirection(const gp_Dir& theV) noexcept { vdir = theV; }
 
index 77bb2837d5449cf358583811792e256ad53889ca..65259e26ac7c61800d4c966deb2cd7365350e3e0 100644 (file)
@@ -57,9 +57,10 @@ public:
 
   //! Creates an object corresponding to the reference
   //! coordinate system (OXYZ).
-  gp_Ax2()
-      : vydir(0., 1., 0.)
-  // vxdir(1.,0.,0.) use default ctor of gp_Dir, as it creates the same dir(1,0,0)
+  constexpr gp_Ax2() noexcept
+      : vydir(gp_Dir::D::Y),
+        vxdir(gp_Dir::D::X)
+  // axis uses default ctor which creates Z axis at origin
   {
   }
 
@@ -78,11 +79,38 @@ public:
     vydir.Cross(vxdir);
   }
 
+  //! Creates an axis placement with standard directions.
+  constexpr gp_Ax2(const gp_Pnt& theP, const gp_Dir::D theN, const gp_Dir::D theVx) noexcept
+      : axis(theP, theN),
+        vydir(crossStandardDir(theN, theVx)), // Y = Z x X (right-handed)
+        vxdir(theVx)
+  {
+    // Note: For standard directions, cross product is computed at compile time
+    // This constructor assumes theN and theVx are orthogonal standard directions
+  }
+
   //! Creates -   a coordinate system with an origin P, where V
   //! gives the "main Direction" (here, "X Direction" and "Y
   //! Direction" are defined automatically).
   Standard_EXPORT gp_Ax2(const gp_Pnt& P, const gp_Dir& V);
 
+  //! Creates a coordinate system with an origin P and standard main direction.
+  constexpr gp_Ax2(const gp_Pnt& theP, const gp_Dir::D theV) noexcept
+      : axis(theP, theV),
+        vydir(getPerpendicularYDir(theV)),
+        vxdir(getPerpendicularXDir(theV))
+  {
+  }
+
+  //! Creates a coordinate system at the origin with the given standard main direction.
+  //! Replaces gp::XOY(), gp::YOZ(), gp::ZOX() static functions.
+  constexpr explicit gp_Ax2(const gp_Dir::D theV) noexcept
+      : axis(gp_Pnt(0., 0., 0.), theV),
+        vydir(getPerpendicularYDir(theV)),
+        vxdir(getPerpendicularXDir(theV))
+  {
+  }
+
   //! Assigns the origin and "main Direction" of the axis A1 to
   //! this coordinate system, then recomputes its "X Direction" and "Y Direction".
   //! Note: The new "X Direction" is computed as follows:
@@ -367,6 +395,16 @@ public:
   Standard_EXPORT Standard_Boolean InitFromJson(const Standard_SStream& theSStream,
                                                 Standard_Integer&       theStreamPos);
 
+protected:
+  //! Helper to compute perpendicular X direction for standard main directions
+  static constexpr gp_Dir::D getPerpendicularXDir(const gp_Dir::D theMainDir) noexcept;
+
+  //! Helper to compute Y direction (main x X) for standard directions
+  static constexpr gp_Dir::D getPerpendicularYDir(const gp_Dir::D theMainDir) noexcept;
+
+  //! Helper to compute cross product of two standard directions (right-handed: A x B)
+  static constexpr gp_Dir::D crossStandardDir(const gp_Dir::D theA, const gp_Dir::D theB) noexcept;
+
 private:
   gp_Ax1 axis;
   gp_Dir vydir;
@@ -375,6 +413,112 @@ private:
 
 //=================================================================================================
 
+inline constexpr gp_Dir::D gp_Ax2::getPerpendicularXDir(const gp_Dir::D theMainDir) noexcept
+{
+  return (theMainDir == gp_Dir::D::X || theMainDir == gp_Dir::D::NX)   ? gp_Dir::D::Y
+         : (theMainDir == gp_Dir::D::Y || theMainDir == gp_Dir::D::NY) ? gp_Dir::D::Z
+                                                                       : gp_Dir::D::X;
+}
+
+//=================================================================================================
+
+inline constexpr gp_Dir::D gp_Ax2::getPerpendicularYDir(const gp_Dir::D theMainDir) noexcept
+{
+  return (theMainDir == gp_Dir::D::Z)    ? gp_Dir::D::Y
+         : (theMainDir == gp_Dir::D::NZ) ? gp_Dir::D::NY
+         : (theMainDir == gp_Dir::D::X)  ? gp_Dir::D::Z
+         : (theMainDir == gp_Dir::D::NX) ? gp_Dir::D::NZ
+         : (theMainDir == gp_Dir::D::Y)  ? gp_Dir::D::X
+                                         : gp_Dir::D::NX; // NY case
+}
+
+//=================================================================================================
+
+inline constexpr gp_Dir::D gp_Ax2::crossStandardDir(const gp_Dir::D theA,
+                                                    const gp_Dir::D theB) noexcept
+{
+  // Handle positive directions first
+  if (theA == gp_Dir::D::X)
+  {
+    if (theB == gp_Dir::D::Y)
+      return gp_Dir::D::Z;
+    if (theB == gp_Dir::D::Z)
+      return gp_Dir::D::NY;
+    if (theB == gp_Dir::D::NY)
+      return gp_Dir::D::NZ;
+    if (theB == gp_Dir::D::NZ)
+      return gp_Dir::D::Y;
+    // X x X = 0, X x NX = 0 (parallel, should not happen)
+    return gp_Dir::D::Z; // fallback
+  }
+  if (theA == gp_Dir::D::Y)
+  {
+    if (theB == gp_Dir::D::Z)
+      return gp_Dir::D::X;
+    if (theB == gp_Dir::D::X)
+      return gp_Dir::D::NZ;
+    if (theB == gp_Dir::D::NX)
+      return gp_Dir::D::Z;
+    if (theB == gp_Dir::D::NZ)
+      return gp_Dir::D::NX;
+    // Y x Y = 0, Y x NY = 0 (parallel, should not happen)
+    return gp_Dir::D::X; // fallback
+  }
+  if (theA == gp_Dir::D::Z)
+  {
+    if (theB == gp_Dir::D::X)
+      return gp_Dir::D::Y;
+    if (theB == gp_Dir::D::Y)
+      return gp_Dir::D::NX;
+    if (theB == gp_Dir::D::NX)
+      return gp_Dir::D::NY;
+    if (theB == gp_Dir::D::NY)
+      return gp_Dir::D::X;
+    // Z x Z = 0, Z x NZ = 0 (parallel, should not happen)
+    return gp_Dir::D::Y; // fallback
+  }
+  // Handle negative directions: -A x B = -(A x B)
+  if (theA == gp_Dir::D::NX)
+  {
+    if (theB == gp_Dir::D::Y)
+      return gp_Dir::D::NZ;
+    if (theB == gp_Dir::D::Z)
+      return gp_Dir::D::Y;
+    if (theB == gp_Dir::D::NY)
+      return gp_Dir::D::Z;
+    if (theB == gp_Dir::D::NZ)
+      return gp_Dir::D::NY;
+    return gp_Dir::D::NZ; // fallback
+  }
+  if (theA == gp_Dir::D::NY)
+  {
+    if (theB == gp_Dir::D::Z)
+      return gp_Dir::D::NX;
+    if (theB == gp_Dir::D::X)
+      return gp_Dir::D::Z;
+    if (theB == gp_Dir::D::NX)
+      return gp_Dir::D::NZ;
+    if (theB == gp_Dir::D::NZ)
+      return gp_Dir::D::X;
+    return gp_Dir::D::NX; // fallback
+  }
+  if (theA == gp_Dir::D::NZ)
+  {
+    if (theB == gp_Dir::D::X)
+      return gp_Dir::D::NY;
+    if (theB == gp_Dir::D::Y)
+      return gp_Dir::D::X;
+    if (theB == gp_Dir::D::NX)
+      return gp_Dir::D::Y;
+    if (theB == gp_Dir::D::NY)
+      return gp_Dir::D::NX;
+    return gp_Dir::D::NY; // fallback
+  }
+  return gp_Dir::D::Z; // fallback
+}
+
+//=================================================================================================
+
 inline void gp_Ax2::SetAxis(const gp_Ax1& theA1)
 {
   Standard_Real a = theA1.Direction() * vxdir;
index 1690deaf0055ea2df8d5b8c36f5692f6dac13af4..faa4662691f35b19d203a84ce76026da71e572d2 100644 (file)
@@ -45,9 +45,9 @@ public:
 
   //! Creates an object representing the reference
   //! coordinate system (OXY).
-  gp_Ax22d()
-      : vydir(0., 1.)
-  // vxdir(1.,0.) use default ctor of gp_Dir2d, as it creates the same dir(1, 0)
+  constexpr gp_Ax22d() noexcept
+      : vydir(gp_Dir2d::D::Y)
+  // vxdir default ctor creates X direction (1, 0)
   {
   }
 
index 87b0c1db4755e28a9f1403c11bd1cb471efd19de..b7fbfcdfae1da8adfb14eaa5f8c0202b4ae33595 100644 (file)
@@ -60,6 +60,21 @@ public:
   {
   }
 
+  //! Creates an axis with the given location point and standard direction.
+  constexpr gp_Ax2d(const gp_Pnt2d& theP, const gp_Dir2d::D theDir) noexcept
+      : loc(theP),
+        vdir(theDir)
+  {
+  }
+
+  //! Creates an axis at the origin with the given standard direction.
+  //! Replaces gp::OX2d(), gp::OY2d() static functions.
+  constexpr explicit gp_Ax2d(const gp_Dir2d::D theDir) noexcept
+      : loc(0., 0.),
+        vdir(theDir)
+  {
+  }
+
   //! Changes the "Location" point (origin) of <me>.
   constexpr void SetLocation(const gp_Pnt2d& theP) noexcept { loc = theP; }
 
index 96208eb8c79cb334d57f62c3f305f5eeab9ffe0b..e77b69f772076086fa1cb935917e7424422b35a6 100644 (file)
@@ -66,9 +66,10 @@ public:
 
   //! Creates an object corresponding to the reference
   //! coordinate system (OXYZ).
-  gp_Ax3()
-      : vydir(0., 1., 0.)
-  // vxdir(1.,0.,0.) use default ctor of gp_Dir, as it creates the same dir(1,0,0)
+  constexpr gp_Ax3() noexcept
+      : vydir(gp_Dir::D::Y),
+        vxdir(gp_Dir::D::X)
+  // axis uses default ctor which creates Z axis at origin
   {
   }
 
@@ -89,10 +90,37 @@ public:
     vydir.Cross(vxdir);
   }
 
+  //! Creates an axis placement with standard directions.
+  //! This constructor allows constexpr and noexcept construction when using standard directions.
+  constexpr gp_Ax3(const gp_Pnt& theP, const gp_Dir::D theN, const gp_Dir::D theVx) noexcept
+      : axis(theP, theN),
+        vydir(crossStandardDir(theN, theVx)), // Y = Z x X (right-handed)
+        vxdir(theVx)
+  {
+    // Note: For standard directions, cross product is computed at compile time
+    // This constructor assumes theN and theVx are orthogonal standard directions
+  }
+
   //! Creates an axis placement with the "Location" point <theP>
   //! and the normal direction <theV>.
   Standard_EXPORT gp_Ax3(const gp_Pnt& theP, const gp_Dir& theV);
 
+  //! Creates an axis placement with the given location point and standard direction.
+  constexpr gp_Ax3(const gp_Pnt& theP, const gp_Dir::D theV) noexcept
+      : axis(theP, theV),
+        vydir(getPerpendicularYDir(theV)),
+        vxdir(getPerpendicularXDir(theV))
+  {
+  }
+
+  //! Creates an axis placement at the origin with the given standard direction.
+  constexpr explicit gp_Ax3(const gp_Dir::D theV) noexcept
+      : axis(gp_Pnt(0., 0., 0.), theV),
+        vydir(getPerpendicularYDir(theV)),
+        vxdir(getPerpendicularXDir(theV))
+  {
+  }
+
   //! Reverses the X direction of <me>.
   constexpr void XReverse() noexcept { vxdir.Reverse(); }
 
@@ -322,6 +350,15 @@ public:
                                                 Standard_Integer&       theStreamPos);
 
 private:
+  //! Helper to compute perpendicular X direction for standard main directions
+  static constexpr gp_Dir::D getPerpendicularXDir(const gp_Dir::D theMainDir) noexcept;
+
+  //! Helper to compute Y direction (main x X) for standard directions
+  static constexpr gp_Dir::D getPerpendicularYDir(const gp_Dir::D theMainDir) noexcept;
+
+  //! Helper to compute cross product of two standard directions (right-handed: A x B)
+  static constexpr gp_Dir::D crossStandardDir(const gp_Dir::D theA, const gp_Dir::D theB) noexcept;
+
   gp_Ax1 axis;
   gp_Dir vydir;
   gp_Dir vxdir;
@@ -329,6 +366,112 @@ private:
 
 //=================================================================================================
 
+inline constexpr gp_Dir::D gp_Ax3::getPerpendicularXDir(const gp_Dir::D theMainDir) noexcept
+{
+  return (theMainDir == gp_Dir::D::X || theMainDir == gp_Dir::D::NX)   ? gp_Dir::D::Y
+         : (theMainDir == gp_Dir::D::Y || theMainDir == gp_Dir::D::NY) ? gp_Dir::D::Z
+                                                                       : gp_Dir::D::X;
+}
+
+//=================================================================================================
+
+inline constexpr gp_Dir::D gp_Ax3::getPerpendicularYDir(const gp_Dir::D theMainDir) noexcept
+{
+  return (theMainDir == gp_Dir::D::Z)    ? gp_Dir::D::Y
+         : (theMainDir == gp_Dir::D::NZ) ? gp_Dir::D::NY
+         : (theMainDir == gp_Dir::D::X)  ? gp_Dir::D::Z
+         : (theMainDir == gp_Dir::D::NX) ? gp_Dir::D::NZ
+         : (theMainDir == gp_Dir::D::Y)  ? gp_Dir::D::X
+                                         : gp_Dir::D::NX; // NY case
+}
+
+//=================================================================================================
+
+inline constexpr gp_Dir::D gp_Ax3::crossStandardDir(const gp_Dir::D theA,
+                                                    const gp_Dir::D theB) noexcept
+{
+  // Handle positive directions first
+  if (theA == gp_Dir::D::X)
+  {
+    if (theB == gp_Dir::D::Y)
+      return gp_Dir::D::Z;
+    if (theB == gp_Dir::D::Z)
+      return gp_Dir::D::NY;
+    if (theB == gp_Dir::D::NY)
+      return gp_Dir::D::NZ;
+    if (theB == gp_Dir::D::NZ)
+      return gp_Dir::D::Y;
+    // X x X = 0, X x NX = 0 (parallel, should not happen)
+    return gp_Dir::D::Z; // fallback
+  }
+  if (theA == gp_Dir::D::Y)
+  {
+    if (theB == gp_Dir::D::Z)
+      return gp_Dir::D::X;
+    if (theB == gp_Dir::D::X)
+      return gp_Dir::D::NZ;
+    if (theB == gp_Dir::D::NX)
+      return gp_Dir::D::Z;
+    if (theB == gp_Dir::D::NZ)
+      return gp_Dir::D::NX;
+    // Y x Y = 0, Y x NY = 0 (parallel, should not happen)
+    return gp_Dir::D::X; // fallback
+  }
+  if (theA == gp_Dir::D::Z)
+  {
+    if (theB == gp_Dir::D::X)
+      return gp_Dir::D::Y;
+    if (theB == gp_Dir::D::Y)
+      return gp_Dir::D::NX;
+    if (theB == gp_Dir::D::NX)
+      return gp_Dir::D::NY;
+    if (theB == gp_Dir::D::NY)
+      return gp_Dir::D::X;
+    // Z x Z = 0, Z x NZ = 0 (parallel, should not happen)
+    return gp_Dir::D::Y; // fallback
+  }
+  // Handle negative directions: -A x B = -(A x B)
+  if (theA == gp_Dir::D::NX)
+  {
+    if (theB == gp_Dir::D::Y)
+      return gp_Dir::D::NZ;
+    if (theB == gp_Dir::D::Z)
+      return gp_Dir::D::Y;
+    if (theB == gp_Dir::D::NY)
+      return gp_Dir::D::Z;
+    if (theB == gp_Dir::D::NZ)
+      return gp_Dir::D::NY;
+    return gp_Dir::D::NZ; // fallback
+  }
+  if (theA == gp_Dir::D::NY)
+  {
+    if (theB == gp_Dir::D::Z)
+      return gp_Dir::D::NX;
+    if (theB == gp_Dir::D::X)
+      return gp_Dir::D::Z;
+    if (theB == gp_Dir::D::NX)
+      return gp_Dir::D::NZ;
+    if (theB == gp_Dir::D::NZ)
+      return gp_Dir::D::X;
+    return gp_Dir::D::NX; // fallback
+  }
+  if (theA == gp_Dir::D::NZ)
+  {
+    if (theB == gp_Dir::D::X)
+      return gp_Dir::D::NY;
+    if (theB == gp_Dir::D::Y)
+      return gp_Dir::D::X;
+    if (theB == gp_Dir::D::NX)
+      return gp_Dir::D::Y;
+    if (theB == gp_Dir::D::NY)
+      return gp_Dir::D::NX;
+    return gp_Dir::D::NY; // fallback
+  }
+  return gp_Dir::D::Z; // fallback
+}
+
+//=================================================================================================
+
 inline gp_Ax3::gp_Ax3(const gp_Ax2& theA)
     : axis(theA.Axis()),
       vydir(theA.YDirection()),
index b4c136b0cf35818ed31eae8ed34e334ad79ce444..d5d4cf4b9e75bbbdfed61bf6bb20c300bd5bb9cd 100644 (file)
@@ -54,7 +54,7 @@ public:
   DEFINE_STANDARD_ALLOC
 
   //! Creates an indefinite circle.
-  gp_Circ()
+  constexpr gp_Circ() noexcept
       : radius(RealLast())
   {
   }
index df9686bdebefcb446b7bb8971bfa0434344c3860..ba096d346bfcb5fd1a17067142165e060eea3b90 100644 (file)
@@ -52,7 +52,7 @@ public:
   DEFINE_STANDARD_ALLOC
 
   //! creates an indefinite circle.
-  gp_Circ2d() noexcept
+  constexpr gp_Circ2d() noexcept
       : radius(RealLast())
   {
   }
index aa63968e0894207e4afaf34fb08acf8930997480..5899e422f848a90cf2679002371ebe8a994ec5c5 100644 (file)
@@ -54,7 +54,7 @@ public:
   DEFINE_STANDARD_ALLOC
 
   //! Creates an indefinite Cone.
-  gp_Cone()
+  constexpr gp_Cone() noexcept
       : radius(RealLast()),
         semiAngle(M_PI * 0.25)
   {
index 48eb53651a34af3a1559fc58e7c5c5b45794376f..1edfca19ed94951bb562c9c529ac912034f0c0fb 100644 (file)
@@ -44,7 +44,10 @@ public:
   DEFINE_STANDARD_ALLOC
 
   //! Creates a indefinite cylinder.
-  gp_Cylinder() { radius = RealLast(); }
+  constexpr gp_Cylinder() noexcept
+      : radius(RealLast())
+  {
+  }
 
   //! Creates a cylinder of radius Radius, whose axis is the "main
   //! Axis" of theA3. theA3 is the local coordinate system of the cylinder.   Raises
index 904aefe38be256d6d1910f613c4bc32bd9047f08..88cb43157202ba4ac0e135360d2e3a62fb827d4f 100644 (file)
@@ -35,6 +35,17 @@ class gp_Trsf;
 class gp_Dir
 {
 public:
+  //! Standard directions in 3D space for optimized constexpr construction
+  enum class D
+  {
+    X,  //!< Direction along positive X axis (1, 0, 0)
+    Y,  //!< Direction along positive Y axis (0, 1, 0)
+    Z,  //!< Direction along positive Z axis (0, 0, 1)
+    NX, //!< Direction along negative X axis (-1, 0, 0)
+    NY, //!< Direction along negative Y axis (0, -1, 0)
+    NZ  //!< Direction along negative Z axis (0, 0, -1)
+  };
+
   DEFINE_STANDARD_ALLOC
 
   //! Creates a direction corresponding to X axis.
@@ -43,6 +54,20 @@ public:
   {
   }
 
+  //! Creates a direction from a standard direction enumeration.
+  constexpr explicit gp_Dir(const D theDir) noexcept
+      : coord(theDir == D::X    ? 1.0
+              : theDir == D::NX ? -1.0
+                                : 0.0,
+              theDir == D::Y    ? 1.0
+              : theDir == D::NY ? -1.0
+                                : 0.0,
+              theDir == D::Z    ? 1.0
+              : theDir == D::NZ ? -1.0
+                                : 0.0)
+  {
+  }
+
   //! Normalizes the vector theV and creates a direction. Raises ConstructionError if
   //! theV.Magnitude() <= Resolution.
   gp_Dir(const gp_Vec& theV);
index 86faacec32b70598c00a41850883579b20de5897..4f041b2071f097dcc38ca6456dab3511fdfd1ac8 100644 (file)
@@ -35,6 +35,15 @@ class gp_Trsf2d;
 class gp_Dir2d
 {
 public:
+  //! Standard directions in 2D space for optimized constexpr construction
+  enum class D
+  {
+    X,  //!< Direction along positive X axis (1, 0)
+    Y,  //!< Direction along positive Y axis (0, 1)
+    NX, //!< Direction along negative X axis (-1, 0)
+    NY  //!< Direction along negative Y axis (0, -1)
+  };
+
   DEFINE_STANDARD_ALLOC
 
   //! Creates a direction corresponding to X axis.
@@ -43,6 +52,17 @@ public:
   {
   }
 
+  //! Creates a direction from a standard direction enumeration.
+  constexpr explicit gp_Dir2d(const D theDir) noexcept
+      : coord(theDir == D::X    ? 1.0
+              : theDir == D::NX ? -1.0
+                                : 0.0,
+              theDir == D::Y    ? 1.0
+              : theDir == D::NY ? -1.0
+                                : 0.0)
+  {
+  }
+
   //! Normalizes the vector theV and creates a Direction. Raises ConstructionError if
   //! theV.Magnitude() <= Resolution from gp.
   gp_Dir2d(const gp_Vec2d& theV);
index acb60181e37432e0ca19559263ac6c80f1ae488f..28e2bd2bee7b09adc09af9ea634f3aa31e9b17ba 100644 (file)
@@ -52,7 +52,7 @@ public:
   DEFINE_STANDARD_ALLOC
 
   //! Creates an indefinite ellipse.
-  gp_Elips()
+  constexpr gp_Elips() noexcept
       : majorRadius(RealLast()),
         minorRadius(RealSmall())
   {
index a15620c97d9bbb5efca3716bff87aff998d328cd..08901c43eab33c14e61eee64e07d6dea083f1b1b 100644 (file)
@@ -47,7 +47,7 @@ public:
   DEFINE_STANDARD_ALLOC
 
   //! Creates an indefinite ellipse.
-  gp_Elips2d() noexcept
+  constexpr gp_Elips2d() noexcept
       : majorRadius(RealLast()),
         minorRadius(RealSmall())
   {
index 6450c20407212d239f361221ab95779aad15f35a..824edb760d207fbfe121d016d36cfb21dd5754cf 100644 (file)
@@ -74,7 +74,7 @@ public:
   DEFINE_STANDARD_ALLOC
 
   //! Creates of an indefinite hyperbola.
-  gp_Hypr()
+  constexpr gp_Hypr() noexcept
       : majorRadius(RealLast()),
         minorRadius(RealFirst())
   {
index b58de0c8bd9ec5e41b240b8842e7c262e6e15370..cf029932d0ef84446774ab6866ee6f8575aa420b 100644 (file)
@@ -68,7 +68,7 @@ public:
   DEFINE_STANDARD_ALLOC
 
   //! Creates of an indefinite hyperbola.
-  gp_Hypr2d() noexcept
+  constexpr gp_Hypr2d() noexcept
       : majorRadius(RealLast()),
         minorRadius(RealLast())
   {
index a3762b9e94a34604ac535a86f69cfba2f4c6f215..7028ae46e46b7d4227c54e7119352f15c2a769b1 100644 (file)
@@ -43,10 +43,10 @@ public:
 
   //! Creates a Line corresponding to Z axis of the
   //! reference coordinate system.
-  gp_Lin() {}
+  constexpr gp_Lin() noexcept {}
 
   //! Creates a line defined by axis theA1.
-  gp_Lin(const gp_Ax1& theA1)
+  constexpr gp_Lin(const gp_Ax1& theA1) noexcept
       : pos(theA1)
   {
   }
index f822ab40c3c5847973a62234cbf6be930530e49c..d63e543a8ba05e13ce8808ce597cf96e6cc964c7 100644 (file)
@@ -53,7 +53,7 @@ public:
   DEFINE_STANDARD_ALLOC
 
   //! Creates an indefinite Parabola.
-  gp_Parab()
+  constexpr gp_Parab() noexcept
       : focalLength(RealLast())
   {
   }
index b3c7eea544488745750cafc9cbba07141e1a82df..8d95030919f31948d9cdacbed4011970bbdc4fa7 100644 (file)
@@ -50,7 +50,7 @@ public:
   DEFINE_STANDARD_ALLOC
 
   //! Creates an indefinite parabola.
-  gp_Parab2d() noexcept
+  constexpr gp_Parab2d() noexcept
       : focalLength(RealLast())
   {
   }
index 14d2992963202db3e1a59b17711faec13002744a..f95de8a9db8c35bdd96cd04c83f9c4261deaeefa 100644 (file)
@@ -50,7 +50,7 @@ public:
 
   //! Creates a plane coincident with OXY plane of the
   //! reference coordinate system.
-  gp_Pln() {}
+  constexpr gp_Pln() noexcept {}
 
   //! The coordinate system of the plane is defined with the axis
   //! placement theA3.
@@ -58,7 +58,7 @@ public:
   //! The "Location" of theA3 defines the location (origin) of the plane.
   //! The "XDirection" and "YDirection" of theA3 define the "XAxis" and
   //! the "YAxis" of the plane used to parametrize the plane.
-  gp_Pln(const gp_Ax3& theA3)
+  constexpr gp_Pln(const gp_Ax3& theA3) noexcept
       : pos(theA3)
   {
   }
index 142de872586858b47eb9187af2970644b381fb67..51bb797e951dbe2c72a9967321bb78f3eb560c14 100644 (file)
@@ -45,7 +45,7 @@ public:
   DEFINE_STANDARD_ALLOC
 
   //! Creates an indefinite sphere.
-  gp_Sphere()
+  constexpr gp_Sphere() noexcept
       : radius(RealLast())
   {
   }
index eb7de67d768d54be3042421e4a679dd2ba37b25e..133400d0625475f3ecad2ce9576bb7480b09ee96 100644 (file)
@@ -58,7 +58,7 @@ public:
   DEFINE_STANDARD_ALLOC
 
   //! creates an indefinite Torus.
-  gp_Torus()
+  constexpr gp_Torus() noexcept
       : majorRadius(RealLast()),
         minorRadius(RealSmall())
   {
index bab8cfc278df1a5aeee4d6d5685ccabf02e34fcf..97bbf8dbb4bc9590d2ddbf33ee3381fc4d781296 100644 (file)
@@ -129,7 +129,7 @@ TEST(Standard_DumpTest, gp_Pnt_DumpAndInit)
 TEST(Standard_DumpTest, gp_Ax3_DumpAndInit_MultipleSeparators)
 {
   // Test gp_Ax3 which has multiple fields requiring separators
-  gp_Ax3 anAxis(gp_Pnt(1, 2, 3), gp_Dir(0, 0, 1), gp_Dir(1, 0, 0));
+  gp_Ax3 anAxis(gp_Pnt(1, 2, 3), gp_Dir(gp_Dir::D::Z), gp_Dir(gp_Dir::D::X));
 
   // Serialize
   std::ostringstream anOStream;
index 6e57ce88d0e3bfccce050715570c2e60ba88be2d..06836f788120903b570679c7a99d79bd26008833 100644 (file)
@@ -833,7 +833,7 @@ Standard_Real Angle2D(const TopoDS_Vertex&            aV,
 
 Standard_Real Angle(const gp_Dir2d& aDir2D)
 {
-  gp_Dir2d      aRefDir(1., 0.);
+  gp_Dir2d      aRefDir(gp_Dir2d::D::X);
   Standard_Real anAngle;
 
   anAngle = aRefDir.Angle(aDir2D);
index 7102d97b856e8711e5d0fb649ab16e905457e388..fa741c49e50fdfbfdb444099f4fabc1d76404b89 100644 (file)
@@ -144,7 +144,7 @@ Standard_Boolean BOPTools_AlgoTools3D::DoSplitSEAMOnFace(const TopoDS_Edge& aSpl
   //
   aT = BOPTools_AlgoTools2D::IntermediatePoint(a, b);
   C2D1->D1(aT, aP2D, aVec2D);
-  gp_Dir2d aDir2D1(aVec2D), aDOX(-1., 0.), aDOY(0., 1.);
+  gp_Dir2d aDir2D1(aVec2D), aDOX(gp_Dir2d::D::NX), aDOY(gp_Dir2d::D::Y);
   //
   anU = aP2D.X();
   anV = aP2D.Y();
@@ -892,7 +892,7 @@ Standard_Integer BOPTools_AlgoTools3D::PointInFace(const TopoDS_Face&
   //
   theContext->UVBounds(theF, aUMin, aUMax, aVMin, aVMax);
   //
-  gp_Dir2d aD2D(0., 1.);
+  gp_Dir2d aD2D(gp_Dir2d::D::Y);
   aUx = IntTools_Tools::IntermediatePoint(aUMin, aUMax);
   //
   for (i = 0; i < 2; ++i)
index e42692323fa5515e983170aa9dd83d3c040c7f4c..5fcf071d8d534c7ba65f6b9cbf44d579b11ef9fa 100644 (file)
@@ -567,7 +567,7 @@ public:
     const std::vector<ProfileOperation>& theOperations)
   {
     // Use default plane (XY plane)
-    const gp_Pln aPlane(gp_Pnt(0, 0, 0), gp_Dir(0, 0, 1));
+    const gp_Pln aPlane(gp_Pnt(0, 0, 0), gp_Dir(gp_Dir::D::Z));
     return CreateProfile(aPlane, theOperations);
   }
 
@@ -649,7 +649,8 @@ public:
   static TopoDS_Shape RotateZ(const TopoDS_Shape& theShape, Standard_Real theAngleDeg)
   {
     gp_Trsf aRotation;
-    aRotation.SetRotation(gp_Ax1(gp_Pnt(0, 0, 0), gp_Dir(0, 0, 1)), theAngleDeg * M_PI / 180.0);
+    aRotation.SetRotation(gp_Ax1(gp_Pnt(0, 0, 0), gp_Dir(gp_Dir::D::Z)),
+                          theAngleDeg * M_PI / 180.0);
     BRepBuilderAPI_Transform aTransform(theShape, aRotation);
     return aTransform.Shape();
   }
@@ -658,7 +659,8 @@ public:
   static TopoDS_Shape RotateY(const TopoDS_Shape& theShape, Standard_Real theAngleDeg)
   {
     gp_Trsf aRotation;
-    aRotation.SetRotation(gp_Ax1(gp_Pnt(0, 0, 0), gp_Dir(0, 1, 0)), theAngleDeg * M_PI / 180.0);
+    aRotation.SetRotation(gp_Ax1(gp_Pnt(0, 0, 0), gp_Dir(gp_Dir::D::Y)),
+                          theAngleDeg * M_PI / 180.0);
     BRepBuilderAPI_Transform aTransform(theShape, aRotation);
     return aTransform.Shape();
   }
@@ -667,7 +669,8 @@ public:
   static TopoDS_Shape RotateX(const TopoDS_Shape& theShape, Standard_Real theAngleDeg)
   {
     gp_Trsf aRotation;
-    aRotation.SetRotation(gp_Ax1(gp_Pnt(0, 0, 0), gp_Dir(1, 0, 0)), theAngleDeg * M_PI / 180.0);
+    aRotation.SetRotation(gp_Ax1(gp_Pnt(0, 0, 0), gp_Dir(gp_Dir::D::X)),
+                          theAngleDeg * M_PI / 180.0);
     BRepBuilderAPI_Transform aTransform(theShape, aRotation);
     return aTransform.Shape();
   }
@@ -695,7 +698,7 @@ public:
   static TopoDS_Shape RotateY90(const TopoDS_Shape& theShape)
   {
     gp_Trsf aRotation;
-    aRotation.SetRotation(gp_Ax1(gp_Pnt(0, 0, 1), gp_Dir(0, 1, 0)), 90.0 * M_PI / 180.0);
+    aRotation.SetRotation(gp_Ax1(gp_Pnt(0, 0, 1), gp_Dir(gp_Dir::D::Y)), 90.0 * M_PI / 180.0);
     BRepBuilderAPI_Transform aTransform(theShape, aRotation);
     return aTransform.Shape();
   }
index 947632b1c8e7a4a6713241c97767d6febbd10a11..62544ccdb9e9778d88ff7545bcb3ea63ddaf837a 100644 (file)
@@ -629,7 +629,7 @@ TEST_F(BCutSimpleTest, NurbsBoxMinusRotatedRectangularBox_F1)
   constexpr Standard_Real r    = M_SQRT2;
   TopoDS_Shape aRectangularBox = BOPTest_Utilities::CreateBox(gp_Pnt(0, 0, 0), r, r / 2.0, 1.0);
   aRectangularBox              = BOPTest_Utilities::RotateShape(aRectangularBox,
-                                                   gp_Ax1(gp_Pnt(0, 0, 0), gp_Dir(0, 0, 1)),
+                                                   gp_Ax1(gp_Pnt(0, 0, 0), gp_Dir(gp_Dir::D::Z)),
                                                    45.0 * M_PI / 180.0);
   const TopoDS_Shape aResult   = PerformCut(aNurbsBox, aRectangularBox);
   ValidateResult(aResult, 4.41421);
@@ -643,7 +643,7 @@ TEST_F(BCutSimpleTest, RotatedRectangularBoxMinusNurbsBox_F2)
   constexpr Standard_Real r    = M_SQRT2;
   TopoDS_Shape aRectangularBox = BOPTest_Utilities::CreateBox(gp_Pnt(0, 0, 0), r, r / 2.0, 1.0);
   aRectangularBox              = BOPTest_Utilities::RotateShape(aRectangularBox,
-                                                   gp_Ax1(gp_Pnt(0, 0, 0), gp_Dir(0, 0, 1)),
+                                                   gp_Ax1(gp_Pnt(0, 0, 0), gp_Dir(gp_Dir::D::Z)),
                                                    45.0 * M_PI / 180.0);
   const TopoDS_Shape aResult   = PerformCut(aRectangularBox, aNurbsBox);
   ValidateResult(aResult, 5.82843);
@@ -657,7 +657,7 @@ TEST_F(BCutSimpleTest, NurbsBoxMinusRotatedSquareBox_F3)
   const Standard_Real r          = sqrt(2.0) / 2.0;
   TopoDS_Shape        aSquareBox = BOPTest_Utilities::CreateBox(gp_Pnt(0, 0, 0), r, r, 1.0);
   aSquareBox                     = BOPTest_Utilities::RotateShape(aSquareBox,
-                                              gp_Ax1(gp_Pnt(0, 0, 0), gp_Dir(0, 0, 1)),
+                                              gp_Ax1(gp_Pnt(0, 0, 0), gp_Dir(gp_Dir::D::Z)),
                                               45.0 * M_PI / 180.0);
   const TopoDS_Shape aResult     = PerformCut(aNurbsBox, aSquareBox);
   ValidateResult(aResult, 5.91421);
@@ -671,7 +671,7 @@ TEST_F(BCutSimpleTest, RotatedSquareBoxMinusNurbsBox_F4)
   const Standard_Real r          = sqrt(2.0) / 2.0;
   TopoDS_Shape        aSquareBox = BOPTest_Utilities::CreateBox(gp_Pnt(0, 0, 0), r, r, 1.0);
   aSquareBox                     = BOPTest_Utilities::RotateShape(aSquareBox,
-                                              gp_Ax1(gp_Pnt(0, 0, 0), gp_Dir(0, 0, 1)),
+                                              gp_Ax1(gp_Pnt(0, 0, 0), gp_Dir(gp_Dir::D::Z)),
                                               45.0 * M_PI / 180.0);
   const TopoDS_Shape aResult     = PerformCut(aSquareBox, aNurbsBox);
   ValidateResult(aResult, 2.91421);
@@ -685,7 +685,7 @@ TEST_F(BCutSimpleTest, NurbsBoxMinusRotatedThinBox_F5)
   constexpr Standard_Real r        = M_SQRT2;
   TopoDS_Shape            aThinBox = BOPTest_Utilities::CreateBox(gp_Pnt(0, 0, 0), r, 0.25, 1.0);
   aThinBox                         = BOPTest_Utilities::RotateShape(aThinBox,
-                                            gp_Ax1(gp_Pnt(0, 0, 0), gp_Dir(0, 0, 1)),
+                                            gp_Ax1(gp_Pnt(0, 0, 0), gp_Dir(gp_Dir::D::Z)),
                                             45.0 * M_PI / 180.0);
   const TopoDS_Shape aResult       = PerformCut(aNurbsBox, aThinBox);
   ValidateResult(aResult, 7.03921);
@@ -699,7 +699,7 @@ TEST_F(BCutSimpleTest, RotatedThinBoxMinusNurbsBox_F6)
   constexpr Standard_Real r        = M_SQRT2;
   TopoDS_Shape            aThinBox = BOPTest_Utilities::CreateBox(gp_Pnt(0, 0, 0), r, 0.25, 1.0);
   aThinBox                         = BOPTest_Utilities::RotateShape(aThinBox,
-                                            gp_Ax1(gp_Pnt(0, 0, 0), gp_Dir(0, 0, 1)),
+                                            gp_Ax1(gp_Pnt(0, 0, 0), gp_Dir(gp_Dir::D::Z)),
                                             45.0 * M_PI / 180.0);
   const TopoDS_Shape aResult       = PerformCut(aThinBox, aNurbsBox);
   ValidateResult(aResult, 1.83211);
@@ -713,7 +713,7 @@ TEST_F(BCutSimpleTest, NurbsBoxMinusRotatedNarrowBox_F7)
   constexpr Standard_Real r  = 5.5677643628300219; // sqrt(31.0)
   TopoDS_Shape aNarrowBox    = BOPTest_Utilities::CreateBox(gp_Pnt(0, 0, 0), r / 4.0, 0.25, 1.0);
   aNarrowBox                 = BOPTest_Utilities::RotateShape(aNarrowBox,
-                                              gp_Ax1(gp_Pnt(0, 0, 0), gp_Dir(0, 0, 1)),
+                                              gp_Ax1(gp_Pnt(0, 0, 0), gp_Dir(gp_Dir::D::Z)),
                                               34.73 * M_PI / 180.0);
   const TopoDS_Shape aResult = PerformCut(aNurbsBox, aNarrowBox);
   ValidateResult(aResult, 7.21677);
@@ -727,7 +727,7 @@ TEST_F(BCutSimpleTest, RotatedNarrowBoxMinusNurbsBox_F8)
   constexpr Standard_Real r  = 5.5677643628300219;
   TopoDS_Shape aNarrowBox    = BOPTest_Utilities::CreateBox(gp_Pnt(0, 0, 0), r / 4.0, 0.25, 1.0);
   aNarrowBox                 = BOPTest_Utilities::RotateShape(aNarrowBox,
-                                              gp_Ax1(gp_Pnt(0, 0, 0), gp_Dir(0, 0, 1)),
+                                              gp_Ax1(gp_Pnt(0, 0, 0), gp_Dir(gp_Dir::D::Z)),
                                               34.73 * M_PI / 180.0);
   const TopoDS_Shape aResult = PerformCut(aNarrowBox, aNurbsBox);
   ValidateResult(aResult, 1.54631);
@@ -756,10 +756,10 @@ TEST_F(BCutSimpleTest, RotatedSphereMinusBox_G2)
 {
   TopoDS_Shape aSphere       = BOPTest_Utilities::CreateSphere(gp_Pnt(0, 0, 0), 1.0);
   aSphere                    = BOPTest_Utilities::RotateShape(aSphere,
-                                           gp_Ax1(gp_Pnt(0, 0, 0), gp_Dir(0, 0, 1)),
+                                           gp_Ax1(gp_Pnt(0, 0, 0), gp_Dir(gp_Dir::D::Z)),
                                            -90.0 * M_PI / 180.0);
   aSphere                    = BOPTest_Utilities::RotateShape(aSphere,
-                                           gp_Ax1(gp_Pnt(0, 0, 0), gp_Dir(0, 1, 0)),
+                                           gp_Ax1(gp_Pnt(0, 0, 0), gp_Dir(gp_Dir::D::Y)),
                                            -45.0 * M_PI / 180.0);
   const TopoDS_Shape aBox    = BOPTest_Utilities::CreateBox(gp_Pnt(0, 0, 0), 1.0, 1.0, 1.0);
   const TopoDS_Shape aResult = PerformCut(aSphere, aBox);
@@ -771,10 +771,10 @@ TEST_F(BCutSimpleTest, BoxMinusRotatedSphere_G3)
 {
   TopoDS_Shape aSphere       = BOPTest_Utilities::CreateSphere(gp_Pnt(0, 0, 0), 1.0);
   aSphere                    = BOPTest_Utilities::RotateShape(aSphere,
-                                           gp_Ax1(gp_Pnt(0, 0, 0), gp_Dir(0, 0, 1)),
+                                           gp_Ax1(gp_Pnt(0, 0, 0), gp_Dir(gp_Dir::D::Z)),
                                            -90.0 * M_PI / 180.0);
   aSphere                    = BOPTest_Utilities::RotateShape(aSphere,
-                                           gp_Ax1(gp_Pnt(0, 0, 0), gp_Dir(0, 1, 0)),
+                                           gp_Ax1(gp_Pnt(0, 0, 0), gp_Dir(gp_Dir::D::Y)),
                                            -45.0 * M_PI / 180.0);
   const TopoDS_Shape aBox    = BOPTest_Utilities::CreateBox(gp_Pnt(0, 0, 0), 1.0, 1.0, 1.0);
   const TopoDS_Shape aResult = PerformCut(aBox, aSphere);
@@ -787,7 +787,7 @@ TEST_F(BCutSimpleTest, SphereMinusRotatedBox_G4)
   const TopoDS_Shape aSphere = BOPTest_Utilities::CreateSphere(gp_Pnt(0, 0, 0), 1.0);
   TopoDS_Shape       aBox    = BOPTest_Utilities::CreateBox(gp_Pnt(0, 0, 0), 1.0, 1.0, 1.0);
   aBox                       = BOPTest_Utilities::RotateShape(aBox,
-                                        gp_Ax1(gp_Pnt(0, 0, 1), gp_Dir(0, 1, 0)),
+                                        gp_Ax1(gp_Pnt(0, 0, 1), gp_Dir(gp_Dir::D::Y)),
                                         90.0 * M_PI / 180.0);
   const TopoDS_Shape aResult = PerformCut(aSphere, aBox);
   ValidateResult(aResult, 13.3517);
@@ -799,7 +799,7 @@ TEST_F(BCutSimpleTest, RotatedBoxMinusSphere_G5)
   const TopoDS_Shape aSphere = BOPTest_Utilities::CreateSphere(gp_Pnt(0, 0, 0), 1.0);
   TopoDS_Shape       aBox    = BOPTest_Utilities::CreateBox(gp_Pnt(0, 0, 0), 1.0, 1.0, 1.0);
   aBox                       = BOPTest_Utilities::RotateShape(aBox,
-                                        gp_Ax1(gp_Pnt(0, 0, 1), gp_Dir(0, 1, 0)),
+                                        gp_Ax1(gp_Pnt(0, 0, 1), gp_Dir(gp_Dir::D::Y)),
                                         90.0 * M_PI / 180.0);
   const TopoDS_Shape aResult = PerformCut(aBox, aSphere);
   ValidateResult(aResult, 5.2146);
@@ -812,7 +812,7 @@ TEST_F(BCutSimpleTest, ComplexProfileRevolOperation_G6)
   const TopoDS_Shape aBox = BOPTest_Utilities::CreateBox(gp_Pnt(0, 0, 0), 100.0, 100.0, 40.0);
 
   // Create exact G6 profile: "profile rev S b_4 F 50 20 Y 50 C 10 180 Y -50 C 10 180"
-  gp_Pln aPlane(gp_Pnt(0, 0, 40), gp_Dir(0, 0, 1)); // Face b_4 of box (top face at Z=40)
+  gp_Pln aPlane(gp_Pnt(0, 0, 40), gp_Dir(gp_Dir::D::Z)); // Face b_4 of box (top face at Z=40)
   std::vector<BOPTest_Utilities::ProfileOperation> aProfileOps = {
     BOPTest_Utilities::ProfileOperation(BOPTest_Utilities::ProfileCmd::F, 50.0, 20.0),  // F 50 20
     BOPTest_Utilities::ProfileOperation(BOPTest_Utilities::ProfileCmd::Y, 50.0),        // Y 50
@@ -825,7 +825,7 @@ TEST_F(BCutSimpleTest, ComplexProfileRevolOperation_G6)
   // Create revolution: "revol rev2 rev 0 0 50 0 1 0 360" (around Y-axis at Z=50)
   const TopoDS_Shape aRevolution =
     BOPTest_Utilities::CreateRevolution(aProfile,
-                                        gp_Ax1(gp_Pnt(0, 0, 50), gp_Dir(0, 1, 0)),
+                                        gp_Ax1(gp_Pnt(0, 0, 50), gp_Dir(gp_Dir::D::Y)),
                                         2.0 * M_PI);
 
   // Perform boolean cut operation: "bcut result b rev2"
@@ -964,7 +964,7 @@ TEST_F(BCutSimpleTest, ComplexCylinderConeOperationPro13307_H3)
 TEST_F(BCutSimpleTest, ComplexProfileForwardForward_H4)
 {
   // Create profile p1: "profile p1 o 0 0 40 x 150 y 200 x -150"
-  gp_Pln                                           aPlane1(gp_Pnt(0, 0, 40), gp_Dir(0, 0, 1));
+  gp_Pln                                           aPlane1(gp_Pnt(0, 0, 40), gp_Dir(gp_Dir::D::Z));
   std::vector<BOPTest_Utilities::ProfileOperation> aProfileOps1 = {
     BOPTest_Utilities::ProfileOperation(BOPTest_Utilities::ProfileCmd::O,
                                         0.0,
@@ -978,7 +978,7 @@ TEST_F(BCutSimpleTest, ComplexProfileForwardForward_H4)
   const TopoDS_Shape aPrism1   = BOPTest_Utilities::CreatePrism(aProfile1, gp_Vec(0, 0, -40));
 
   // Create profile p2: "profile p2 o 0 0 50 f 25 25 y 100 x 75 y -100"
-  gp_Pln                                           aPlane2(gp_Pnt(0, 0, 50), gp_Dir(0, 0, 1));
+  gp_Pln                                           aPlane2(gp_Pnt(0, 0, 50), gp_Dir(gp_Dir::D::Z));
   std::vector<BOPTest_Utilities::ProfileOperation> aProfileOps2 = {
     BOPTest_Utilities::ProfileOperation(BOPTest_Utilities::ProfileCmd::O,
                                         0.0,
@@ -1022,7 +1022,7 @@ TEST_F(BCutSimpleTest, ComplexProfileForwardForwardVariation_H5)
   // H5 has same profiles as H4, but p3 has different sequence: "f 50 -75 y -100 x 75 y 100"
 
   // Create profile p1: same as H4 "profile p1 o 0 0 40 x 150 y 200 x -150"
-  gp_Pln                                           aPlane1(gp_Pnt(0, 0, 40), gp_Dir(0, 0, 1));
+  gp_Pln                                           aPlane1(gp_Pnt(0, 0, 40), gp_Dir(gp_Dir::D::Z));
   std::vector<BOPTest_Utilities::ProfileOperation> aProfileOps1 = {
     BOPTest_Utilities::ProfileOperation(BOPTest_Utilities::ProfileCmd::O,
                                         0.0,
@@ -1036,7 +1036,7 @@ TEST_F(BCutSimpleTest, ComplexProfileForwardForwardVariation_H5)
   const TopoDS_Shape aPrism1   = BOPTest_Utilities::CreatePrism(aProfile1, gp_Vec(0, 0, -40));
 
   // Create profile p2: same as H4 "profile p2 o 0 0 50 f 25 25 y 100 x 75 y -100"
-  gp_Pln                                           aPlane2(gp_Pnt(0, 0, 50), gp_Dir(0, 0, 1));
+  gp_Pln                                           aPlane2(gp_Pnt(0, 0, 50), gp_Dir(gp_Dir::D::Z));
   std::vector<BOPTest_Utilities::ProfileOperation> aProfileOps2 = {
     BOPTest_Utilities::ProfileOperation(BOPTest_Utilities::ProfileCmd::O,
                                         0.0,
@@ -1076,7 +1076,7 @@ TEST_F(BCutSimpleTest, ComplexProfileForwardForwardVariation_H5)
 TEST_F(BCutSimpleTest, ComplexProfileForwardReversed_H6)
 {
   // Create profile p1: same as H4/H5 "profile p1 o 0 0 40 x 150 y 200 x -150"
-  gp_Pln                                           aPlane1(gp_Pnt(0, 0, 40), gp_Dir(0, 0, 1));
+  gp_Pln                                           aPlane1(gp_Pnt(0, 0, 40), gp_Dir(gp_Dir::D::Z));
   std::vector<BOPTest_Utilities::ProfileOperation> aProfileOps1 = {
     BOPTest_Utilities::ProfileOperation(BOPTest_Utilities::ProfileCmd::O,
                                         0.0,
@@ -1090,7 +1090,7 @@ TEST_F(BCutSimpleTest, ComplexProfileForwardReversed_H6)
   const TopoDS_Shape aPrism1   = BOPTest_Utilities::CreatePrism(aProfile1, gp_Vec(0, 0, -40));
 
   // Create profile p2: same as H4/H5 "profile p2 o 0 0 50 f 25 25 y 100 x 75 y -100"
-  gp_Pln                                           aPlane2(gp_Pnt(0, 0, 50), gp_Dir(0, 0, 1));
+  gp_Pln                                           aPlane2(gp_Pnt(0, 0, 50), gp_Dir(gp_Dir::D::Z));
   std::vector<BOPTest_Utilities::ProfileOperation> aProfileOps2 = {
     BOPTest_Utilities::ProfileOperation(BOPTest_Utilities::ProfileCmd::O,
                                         0.0,
@@ -1130,7 +1130,7 @@ TEST_F(BCutSimpleTest, ComplexProfileForwardReversed_H6)
 TEST_F(BCutSimpleTest, ComplexProfileForwardReversedVariation_H7)
 {
   // Create profile p1: same as other H tests "profile p1 o 0 0 40 x 150 y 200 x -150"
-  gp_Pln                                           aPlane1(gp_Pnt(0, 0, 40), gp_Dir(0, 0, 1));
+  gp_Pln                                           aPlane1(gp_Pnt(0, 0, 40), gp_Dir(gp_Dir::D::Z));
   std::vector<BOPTest_Utilities::ProfileOperation> aProfileOps1 = {
     BOPTest_Utilities::ProfileOperation(BOPTest_Utilities::ProfileCmd::O,
                                         0.0,
@@ -1144,7 +1144,7 @@ TEST_F(BCutSimpleTest, ComplexProfileForwardReversedVariation_H7)
   const TopoDS_Shape aPrism1   = BOPTest_Utilities::CreatePrism(aProfile1, gp_Vec(0, 0, -40));
 
   // Create profile p2: same as other H tests "profile p2 o 0 0 50 f 25 25 y 100 x 75 y -100"
-  gp_Pln                                           aPlane2(gp_Pnt(0, 0, 50), gp_Dir(0, 0, 1));
+  gp_Pln                                           aPlane2(gp_Pnt(0, 0, 50), gp_Dir(gp_Dir::D::Z));
   std::vector<BOPTest_Utilities::ProfileOperation> aProfileOps2 = {
     BOPTest_Utilities::ProfileOperation(BOPTest_Utilities::ProfileCmd::O,
                                         0.0,
@@ -1184,7 +1184,7 @@ TEST_F(BCutSimpleTest, ComplexProfileForwardReversedVariation_H7)
 TEST_F(BCutSimpleTest, ComplexProfileReversedForward_H8)
 {
   // Create profile p1: "profile p1 p 0 0 -1 1 0 0 o 0 0 40 y -200 x 150 y 200"
-  gp_Pln aPlane1(gp_Pnt(0, 0, 40), gp_Dir(0, 0, 1)); // Use same approach as working H4/H5
+  gp_Pln aPlane1(gp_Pnt(0, 0, 40), gp_Dir(gp_Dir::D::Z)); // Use same approach as working H4/H5
   std::vector<BOPTest_Utilities::ProfileOperation> aProfileOps1 = {
     BOPTest_Utilities::ProfileOperation(BOPTest_Utilities::ProfileCmd::O,
                                         0.0,
@@ -1198,7 +1198,7 @@ TEST_F(BCutSimpleTest, ComplexProfileReversedForward_H8)
   const TopoDS_Shape aPrism1   = BOPTest_Utilities::CreatePrism(aProfile1, gp_Vec(0, 0, -40));
 
   // Create profile p2: "profile p2 p 0 0 -1 1 0 0 o 0 0 50 f 25 -25 x 75 y -100 x -75"
-  gp_Pln                                           aPlane2(gp_Pnt(0, 0, 50), gp_Dir(0, 0, 1));
+  gp_Pln                                           aPlane2(gp_Pnt(0, 0, 50), gp_Dir(gp_Dir::D::Z));
   std::vector<BOPTest_Utilities::ProfileOperation> aProfileOps2 = {
     BOPTest_Utilities::ProfileOperation(BOPTest_Utilities::ProfileCmd::O,
                                         0.0,
@@ -1238,7 +1238,7 @@ TEST_F(BCutSimpleTest, ComplexProfileReversedForward_H8)
 TEST_F(BCutSimpleTest, ComplexProfileReversedForwardVariation_H9)
 {
   // Create profile p1: same as H8 "profile p1 p 0 0 -1 1 0 0 o 0 0 40 y -200 x 150 y 200"
-  gp_Pln                                           aPlane1(gp_Pnt(0, 0, 40), gp_Dir(0, 0, 1));
+  gp_Pln                                           aPlane1(gp_Pnt(0, 0, 40), gp_Dir(gp_Dir::D::Z));
   std::vector<BOPTest_Utilities::ProfileOperation> aProfileOps1 = {
     BOPTest_Utilities::ProfileOperation(BOPTest_Utilities::ProfileCmd::O,
                                         0.0,
@@ -1252,7 +1252,7 @@ TEST_F(BCutSimpleTest, ComplexProfileReversedForwardVariation_H9)
   const TopoDS_Shape aPrism1   = BOPTest_Utilities::CreatePrism(aProfile1, gp_Vec(0, 0, -40));
 
   // Create profile p2: same as H8 "profile p2 p 0 0 -1 1 0 0 o 0 0 50 f 25 -25 x 75 y -100 x -75"
-  gp_Pln                                           aPlane2(gp_Pnt(0, 0, 50), gp_Dir(0, 0, 1));
+  gp_Pln                                           aPlane2(gp_Pnt(0, 0, 50), gp_Dir(gp_Dir::D::Z));
   std::vector<BOPTest_Utilities::ProfileOperation> aProfileOps2 = {
     BOPTest_Utilities::ProfileOperation(BOPTest_Utilities::ProfileCmd::O,
                                         0.0,
@@ -1292,7 +1292,7 @@ TEST_F(BCutSimpleTest, ComplexProfileReversedForwardVariation_H9)
 TEST_F(BCutSimpleTest, ComplexProfileReversedReversed_I1)
 {
   // Create profile p1: same as H8/H9 "profile p1 p 0 0 -1 1 0 0 o 0 0 40 y -200 x 150 y 200"
-  gp_Pln                                           aPlane1(gp_Pnt(0, 0, 40), gp_Dir(0, 0, 1));
+  gp_Pln                                           aPlane1(gp_Pnt(0, 0, 40), gp_Dir(gp_Dir::D::Z));
   std::vector<BOPTest_Utilities::ProfileOperation> aProfileOps1 = {
     BOPTest_Utilities::ProfileOperation(BOPTest_Utilities::ProfileCmd::O,
                                         0.0,
@@ -1307,7 +1307,7 @@ TEST_F(BCutSimpleTest, ComplexProfileReversedReversed_I1)
 
   // Create profile p2: same as H8/H9 "profile p2 p 0 0 -1 1 0 0 o 0 0 50 f 25 -25 x 75 y -100 x
   // -75"
-  gp_Pln                                           aPlane2(gp_Pnt(0, 0, 50), gp_Dir(0, 0, 1));
+  gp_Pln                                           aPlane2(gp_Pnt(0, 0, 50), gp_Dir(gp_Dir::D::Z));
   std::vector<BOPTest_Utilities::ProfileOperation> aProfileOps2 = {
     BOPTest_Utilities::ProfileOperation(BOPTest_Utilities::ProfileCmd::O,
                                         0.0,
@@ -1347,7 +1347,7 @@ TEST_F(BCutSimpleTest, ComplexProfileReversedReversed_I1)
 TEST_F(BCutSimpleTest, ComplexProfileReversedReversedVariation_I2)
 {
   // Create profile p1: same as I1 "profile p1 p 0 0 -1 1 0 0 o 0 0 40 y -200 x 150 y 200"
-  gp_Pln                                           aPlane1(gp_Pnt(0, 0, 40), gp_Dir(0, 0, 1));
+  gp_Pln                                           aPlane1(gp_Pnt(0, 0, 40), gp_Dir(gp_Dir::D::Z));
   std::vector<BOPTest_Utilities::ProfileOperation> aProfileOps1 = {
     BOPTest_Utilities::ProfileOperation(BOPTest_Utilities::ProfileCmd::O,
                                         0.0,
@@ -1361,7 +1361,7 @@ TEST_F(BCutSimpleTest, ComplexProfileReversedReversedVariation_I2)
   const TopoDS_Shape aPrism1   = BOPTest_Utilities::CreatePrism(aProfile1, gp_Vec(0, 0, -40));
 
   // Create profile p2: same as I1 "profile p2 p 0 0 -1 1 0 0 o 0 0 50 f 25 -25 x 75 y -100 x -75"
-  gp_Pln                                           aPlane2(gp_Pnt(0, 0, 50), gp_Dir(0, 0, 1));
+  gp_Pln                                           aPlane2(gp_Pnt(0, 0, 50), gp_Dir(gp_Dir::D::Z));
   std::vector<BOPTest_Utilities::ProfileOperation> aProfileOps2 = {
     BOPTest_Utilities::ProfileOperation(BOPTest_Utilities::ProfileCmd::O,
                                         0.0,
@@ -1401,7 +1401,7 @@ TEST_F(BCutSimpleTest, ComplexProfileReversedReversedVariation_I2)
 TEST_F(BCutSimpleTest, ComplexProfileForwardForwardVariation2_I3)
 {
   // Create profile p1: "profile p1 o 0 0 40 f 0 50 x 150 y 100 x -150"
-  gp_Pln                                           aPlane1(gp_Pnt(0, 0, 40), gp_Dir(0, 0, 1));
+  gp_Pln                                           aPlane1(gp_Pnt(0, 0, 40), gp_Dir(gp_Dir::D::Z));
   std::vector<BOPTest_Utilities::ProfileOperation> aProfileOps1 = {
     BOPTest_Utilities::ProfileOperation(BOPTest_Utilities::ProfileCmd::O,
                                         0.0,
@@ -1417,7 +1417,7 @@ TEST_F(BCutSimpleTest, ComplexProfileForwardForwardVariation2_I3)
 
   // Create profile p2: same as I1/I2 but different plane "profile p2 o 0 0 50 f 25 25 y 100 x 75 y
   // -100"
-  gp_Pln                                           aPlane2(gp_Pnt(0, 0, 50), gp_Dir(0, 0, 1));
+  gp_Pln                                           aPlane2(gp_Pnt(0, 0, 50), gp_Dir(gp_Dir::D::Z));
   std::vector<BOPTest_Utilities::ProfileOperation> aProfileOps2 = {
     BOPTest_Utilities::ProfileOperation(BOPTest_Utilities::ProfileCmd::O,
                                         0.0,
@@ -1457,7 +1457,7 @@ TEST_F(BCutSimpleTest, ComplexProfileForwardForwardVariation2_I3)
 TEST_F(BCutSimpleTest, ComplexProfileForwardForwardVariation3_I4)
 {
   // Create profile p1: same as I3 "profile p1 o 0 0 40 f 0 50 x 150 y 100 x -150"
-  gp_Pln                                           aPlane1(gp_Pnt(0, 0, 40), gp_Dir(0, 0, 1));
+  gp_Pln                                           aPlane1(gp_Pnt(0, 0, 40), gp_Dir(gp_Dir::D::Z));
   std::vector<BOPTest_Utilities::ProfileOperation> aProfileOps1 = {
     BOPTest_Utilities::ProfileOperation(BOPTest_Utilities::ProfileCmd::O,
                                         0.0,
@@ -1472,7 +1472,7 @@ TEST_F(BCutSimpleTest, ComplexProfileForwardForwardVariation3_I4)
   const TopoDS_Shape aPrism1   = BOPTest_Utilities::CreatePrism(aProfile1, gp_Vec(0, 0, -40));
 
   // Create profile p2: same as I3 "profile p2 o 0 0 50 f 25 25 y 100 x 75 y -100"
-  gp_Pln                                           aPlane2(gp_Pnt(0, 0, 50), gp_Dir(0, 0, 1));
+  gp_Pln                                           aPlane2(gp_Pnt(0, 0, 50), gp_Dir(gp_Dir::D::Z));
   std::vector<BOPTest_Utilities::ProfileOperation> aProfileOps2 = {
     BOPTest_Utilities::ProfileOperation(BOPTest_Utilities::ProfileCmd::O,
                                         0.0,
@@ -1514,7 +1514,7 @@ TEST_F(BCutSimpleTest, ComplexProfileForwardForwardVariation3_I4)
 TEST_F(BCutSimpleTest, ComplexProfileForwardReversedVariation2_I5)
 {
   // Create profile p1: same as I3/I4 "profile p1 o 0 0 40 f 0 50 x 150 y 100 x -150"
-  gp_Pln                                           aPlane1(gp_Pnt(0, 0, 40), gp_Dir(0, 0, 1));
+  gp_Pln                                           aPlane1(gp_Pnt(0, 0, 40), gp_Dir(gp_Dir::D::Z));
   std::vector<BOPTest_Utilities::ProfileOperation> aProfileOps1 = {
     BOPTest_Utilities::ProfileOperation(BOPTest_Utilities::ProfileCmd::O,
                                         0.0,
@@ -1529,7 +1529,7 @@ TEST_F(BCutSimpleTest, ComplexProfileForwardReversedVariation2_I5)
   const TopoDS_Shape aPrism1   = BOPTest_Utilities::CreatePrism(aProfile1, gp_Vec(0, 0, -40));
 
   // Create profile p2: same as I3/I4 "profile p2 o 0 0 50 f 25 25 y 100 x 75 y -100"
-  gp_Pln                                           aPlane2(gp_Pnt(0, 0, 50), gp_Dir(0, 0, 1));
+  gp_Pln                                           aPlane2(gp_Pnt(0, 0, 50), gp_Dir(gp_Dir::D::Z));
   std::vector<BOPTest_Utilities::ProfileOperation> aProfileOps2 = {
     BOPTest_Utilities::ProfileOperation(BOPTest_Utilities::ProfileCmd::O,
                                         0.0,
@@ -1569,7 +1569,7 @@ TEST_F(BCutSimpleTest, ComplexProfileForwardReversedVariation2_I5)
 TEST_F(BCutSimpleTest, ComplexProfileForwardReversedVariation3_I6)
 {
   // Same profiles as I5 but different p3 - "profile p3 o 0 0 50 f 50 75 y 100 x 75 y -100"
-  gp_Pln                                           aPlane1(gp_Pnt(0, 0, 40), gp_Dir(0, 0, 1));
+  gp_Pln                                           aPlane1(gp_Pnt(0, 0, 40), gp_Dir(gp_Dir::D::Z));
   std::vector<BOPTest_Utilities::ProfileOperation> aProfileOps1 = {
     BOPTest_Utilities::ProfileOperation(BOPTest_Utilities::ProfileCmd::O, 0.0, 0.0, 40.0),
     BOPTest_Utilities::ProfileOperation(BOPTest_Utilities::ProfileCmd::F, 0.0, 50.0),
@@ -1579,7 +1579,7 @@ TEST_F(BCutSimpleTest, ComplexProfileForwardReversedVariation3_I6)
   const TopoDS_Shape aProfile1 = BOPTest_Utilities::CreateProfile(aPlane1, aProfileOps1);
   const TopoDS_Shape aPrism1   = BOPTest_Utilities::CreatePrism(aProfile1, gp_Vec(0, 0, -40));
 
-  gp_Pln                                           aPlane2(gp_Pnt(0, 0, 50), gp_Dir(0, 0, 1));
+  gp_Pln                                           aPlane2(gp_Pnt(0, 0, 50), gp_Dir(gp_Dir::D::Z));
   std::vector<BOPTest_Utilities::ProfileOperation> aProfileOps2 = {
     BOPTest_Utilities::ProfileOperation(BOPTest_Utilities::ProfileCmd::O, 0.0, 0.0, 50.0),
     BOPTest_Utilities::ProfileOperation(BOPTest_Utilities::ProfileCmd::F, 25.0, 25.0),
@@ -1610,7 +1610,7 @@ TEST_F(BCutSimpleTest, ComplexProfileForwardReversedVariation3_I6)
 TEST_F(BCutSimpleTest, ComplexProfileReversedForwardVariation2_I7)
 {
   // Create profile p1: "profile p1 p 0 0 -1 1 0 0 o 0 0 40 f 0 -50 y -100 x 150 y 100"
-  gp_Pln                                           aPlane1(gp_Pnt(0, 0, 40), gp_Dir(0, 0, 1));
+  gp_Pln                                           aPlane1(gp_Pnt(0, 0, 40), gp_Dir(gp_Dir::D::Z));
   std::vector<BOPTest_Utilities::ProfileOperation> aProfileOps1 = {
     BOPTest_Utilities::ProfileOperation(BOPTest_Utilities::ProfileCmd::O,
                                         0.0,
@@ -1625,7 +1625,7 @@ TEST_F(BCutSimpleTest, ComplexProfileReversedForwardVariation2_I7)
   const TopoDS_Shape aPrism1   = BOPTest_Utilities::CreatePrism(aProfile1, gp_Vec(0, 0, -40));
 
   // Create profile p2: "profile p2 p 0 0 -1 1 0 0 o 0 0 50 f 25 -25 x 75 y -100 x -75"
-  gp_Pln                                           aPlane2(gp_Pnt(0, 0, 50), gp_Dir(0, 0, 1));
+  gp_Pln                                           aPlane2(gp_Pnt(0, 0, 50), gp_Dir(gp_Dir::D::Z));
   std::vector<BOPTest_Utilities::ProfileOperation> aProfileOps2 = {
     BOPTest_Utilities::ProfileOperation(BOPTest_Utilities::ProfileCmd::O,
                                         0.0,
@@ -1665,7 +1665,7 @@ TEST_F(BCutSimpleTest, ComplexProfileReversedForwardVariation2_I7)
 TEST_F(BCutSimpleTest, ComplexProfileReversedForwardVariation3_I8)
 {
   // Create profile p1: "profile p1 p 0 0 -1 1 0 0 o 0 0 40 f 0 -50 y -100 x 150 y 100"
-  gp_Pln                                           aPlane1(gp_Pnt(0, 0, 40), gp_Dir(0, 0, 1));
+  gp_Pln                                           aPlane1(gp_Pnt(0, 0, 40), gp_Dir(gp_Dir::D::Z));
   std::vector<BOPTest_Utilities::ProfileOperation> aProfileOps1 = {
     BOPTest_Utilities::ProfileOperation(BOPTest_Utilities::ProfileCmd::O,
                                         0.0,
@@ -1680,7 +1680,7 @@ TEST_F(BCutSimpleTest, ComplexProfileReversedForwardVariation3_I8)
   const TopoDS_Shape aPrism1   = BOPTest_Utilities::CreatePrism(aProfile1, gp_Vec(0, 0, -40));
 
   // Create profile p2: "profile p2 p 0 0 -1 1 0 0 o 0 0 50 f 25 -25 x 75 y -100 x -75"
-  gp_Pln                                           aPlane2(gp_Pnt(0, 0, 50), gp_Dir(0, 0, 1));
+  gp_Pln                                           aPlane2(gp_Pnt(0, 0, 50), gp_Dir(gp_Dir::D::Z));
   std::vector<BOPTest_Utilities::ProfileOperation> aProfileOps2 = {
     BOPTest_Utilities::ProfileOperation(BOPTest_Utilities::ProfileCmd::O,
                                         0.0,
@@ -1720,7 +1720,7 @@ TEST_F(BCutSimpleTest, ComplexProfileReversedForwardVariation3_I8)
 TEST_F(BCutSimpleTest, ComplexProfileReversedReversedVariation2_I9)
 {
   // Create profile p1: "profile p1 p 0 0 -1 1 0 0 o 0 0 40 f 0 -50 y -100 x 150 y 100"
-  gp_Pln                                           aPlane1(gp_Pnt(0, 0, 40), gp_Dir(0, 0, 1));
+  gp_Pln                                           aPlane1(gp_Pnt(0, 0, 40), gp_Dir(gp_Dir::D::Z));
   std::vector<BOPTest_Utilities::ProfileOperation> aProfileOps1 = {
     BOPTest_Utilities::ProfileOperation(BOPTest_Utilities::ProfileCmd::O,
                                         0.0,
@@ -1735,7 +1735,7 @@ TEST_F(BCutSimpleTest, ComplexProfileReversedReversedVariation2_I9)
   const TopoDS_Shape aPrism1   = BOPTest_Utilities::CreatePrism(aProfile1, gp_Vec(0, 0, -40));
 
   // Create profile p2: "profile p2 p 0 0 -1 1 0 0 o 0 0 50 f 25 -25 x 75 y -100 x -75"
-  gp_Pln                                           aPlane2(gp_Pnt(0, 0, 50), gp_Dir(0, 0, 1));
+  gp_Pln                                           aPlane2(gp_Pnt(0, 0, 50), gp_Dir(gp_Dir::D::Z));
   std::vector<BOPTest_Utilities::ProfileOperation> aProfileOps2 = {
     BOPTest_Utilities::ProfileOperation(BOPTest_Utilities::ProfileCmd::O,
                                         0.0,
index 74a2a66b3db8f736a513640fcc69445173a503d9..d511d7b8e492e38a1ab7d2c0953e01c87a1d149f 100644 (file)
@@ -26,7 +26,7 @@ class BCutSimpleTest1 : public BRepAlgoAPI_TestBase
 TEST_F(BCutSimpleTest1, ComplexProfileReversedReversedVariation3_J1)
 {
   // Create profile p1: "profile p1 p 0 0 -1 1 0 0 o 0 0 40 f 0 -50 y -100 x 150 y 100"
-  gp_Pln                                           aPlane1(gp_Pnt(0, 0, 40), gp_Dir(0, 0, 1));
+  gp_Pln                                           aPlane1(gp_Pnt(0, 0, 40), gp_Dir(gp_Dir::D::Z));
   std::vector<BOPTest_Utilities::ProfileOperation> aProfileOps1 = {
     BOPTest_Utilities::ProfileOperation(BOPTest_Utilities::ProfileCmd::O,
                                         0.0,
@@ -41,7 +41,7 @@ TEST_F(BCutSimpleTest1, ComplexProfileReversedReversedVariation3_J1)
   const TopoDS_Shape aPrism1   = BOPTest_Utilities::CreatePrism(aProfile1, gp_Vec(0, 0, -40));
 
   // Create profile p2: "profile p2 p 0 0 -1 1 0 0 o 0 0 50 f 25 -25 x 75 y -100 x -75"
-  gp_Pln                                           aPlane2(gp_Pnt(0, 0, 50), gp_Dir(0, 0, 1));
+  gp_Pln                                           aPlane2(gp_Pnt(0, 0, 50), gp_Dir(gp_Dir::D::Z));
   std::vector<BOPTest_Utilities::ProfileOperation> aProfileOps2 = {
     BOPTest_Utilities::ProfileOperation(BOPTest_Utilities::ProfileCmd::O,
                                         0.0,
@@ -120,7 +120,7 @@ TEST_F(BCutSimpleTest1, ComplexProfileWithTranslationForwardReversedForward_J3)
     BOPTest_Utilities::CreateRectangularPrism(gp_Pnt(0, 0, 40), 175, 250, -40);
 
   // Create profile p2: "profile p2 o 0 0 50 f 25 25 y 75 x 50 y -75"
-  gp_Pln                                           aPlane2(gp_Pnt(0, 0, 50), gp_Dir(0, 0, 1));
+  gp_Pln                                           aPlane2(gp_Pnt(0, 0, 50), gp_Dir(gp_Dir::D::Z));
   std::vector<BOPTest_Utilities::ProfileOperation> aProfileOps2 = {
     BOPTest_Utilities::ProfileOperation(BOPTest_Utilities::ProfileCmd::O,
                                         0.0,
@@ -204,7 +204,7 @@ TEST_F(BCutSimpleTest1, ComplexProfileReversedReversedForward_J4)
     BOPTest_Utilities::CreateRectangularPrism(gp_Pnt(0, 0, 40), 175, 250, -40);
 
   // Create profile p2: "profile p2 p 0 0 -1 1 0 0 o 0 0 50 f 25 -25 y -75 x 50 y 75"
-  gp_Pln                                           aPlane2(gp_Pnt(0, 0, 0), gp_Dir(0, 0, 1));
+  gp_Pln                                           aPlane2(gp_Pnt(0, 0, 0), gp_Dir(gp_Dir::D::Z));
   std::vector<BOPTest_Utilities::ProfileOperation> aProfileOps2 = {
     BOPTest_Utilities::ProfileOperation(BOPTest_Utilities::ProfileCmd::P,
                                         0.0,
@@ -292,7 +292,7 @@ TEST_F(BCutSimpleTest1, ComplexProfileForwardForwardForwardVariation_J5)
     BOPTest_Utilities::CreateRectangularPrism(gp_Pnt(0, 0, 40), 175, 250, -40);
 
   // Create profile p2: "profile p2 o 0 0 50 f 25 25 y 75 x 50 y -75"
-  gp_Pln                                           aPlane2(gp_Pnt(0, 0, 50), gp_Dir(0, 0, 1));
+  gp_Pln                                           aPlane2(gp_Pnt(0, 0, 50), gp_Dir(gp_Dir::D::Z));
   std::vector<BOPTest_Utilities::ProfileOperation> aProfileOps2 = {
     BOPTest_Utilities::ProfileOperation(BOPTest_Utilities::ProfileCmd::O,
                                         0.0,
@@ -359,7 +359,7 @@ TEST_F(BCutSimpleTest1, ComplexProfileForwardReversedForwardVariation_J6)
     BOPTest_Utilities::CreateRectangularPrism(gp_Pnt(0, 0, 40), 175, 250, -40);
 
   // Create profile p2: "profile p2 o 0 0 50 f 25 25 y 75 x 50 y -75"
-  gp_Pln                                           aPlane2(gp_Pnt(0, 0, 50), gp_Dir(0, 0, 1));
+  gp_Pln                                           aPlane2(gp_Pnt(0, 0, 50), gp_Dir(gp_Dir::D::Z));
   std::vector<BOPTest_Utilities::ProfileOperation> aProfileOps2 = {
     BOPTest_Utilities::ProfileOperation(BOPTest_Utilities::ProfileCmd::O,
                                         0.0,
@@ -426,7 +426,7 @@ TEST_F(BCutSimpleTest1, ComplexProfileReversedReversedForwardVariation_J7)
     BOPTest_Utilities::CreateRectangularPrism(gp_Pnt(0, 0, 40), 175, 250, -40);
 
   // Create profile p2: "profile p2 p 0 0 -1 1 0 0 o 0 0 50 f 25 -25 y -75 x 50 y 75"
-  gp_Pln                                           aPlane2(gp_Pnt(0, 0, 0), gp_Dir(0, 0, 1));
+  gp_Pln                                           aPlane2(gp_Pnt(0, 0, 0), gp_Dir(gp_Dir::D::Z));
   std::vector<BOPTest_Utilities::ProfileOperation> aProfileOps2 = {
     BOPTest_Utilities::ProfileOperation(BOPTest_Utilities::ProfileCmd::P,
                                         0.0,
@@ -500,7 +500,7 @@ TEST_F(BCutSimpleTest1, SameOrientedProfileForwardForward_J8)
     BOPTest_Utilities::CreateRectangularPrism(gp_Pnt(0, 0, 40), 150, 200, -40);
 
   // Create profile p2: "profile p2 o 0 0 50 f 25 25 y 100 x 75 y -100"
-  gp_Pln                                           aPlane2(gp_Pnt(0, 0, 50), gp_Dir(0, 0, 1));
+  gp_Pln                                           aPlane2(gp_Pnt(0, 0, 50), gp_Dir(gp_Dir::D::Z));
   std::vector<BOPTest_Utilities::ProfileOperation> aProfileOps2 = {
     BOPTest_Utilities::ProfileOperation(BOPTest_Utilities::ProfileCmd::O,
                                         0.0,
@@ -520,7 +520,7 @@ TEST_F(BCutSimpleTest1, SameOrientedProfileForwardForward_J8)
   const TopoDS_Shape aIntermediate = aCutOp1.Shape();
 
   // Create profile p3: "profile p3 o 0 0 -10 f 50 75 y 100 x 75 y -100"
-  gp_Pln                                           aPlane3(gp_Pnt(0, 0, -10), gp_Dir(0, 0, 1));
+  gp_Pln                                           aPlane3(gp_Pnt(0, 0, -10), gp_Dir(gp_Dir::D::Z));
   std::vector<BOPTest_Utilities::ProfileOperation> aProfileOps3 = {
     BOPTest_Utilities::ProfileOperation(BOPTest_Utilities::ProfileCmd::O,
                                         0.0,
@@ -547,7 +547,7 @@ TEST_F(BCutSimpleTest1, SameOrientedProfileForwardForwardWithReversed_J9)
     BOPTest_Utilities::CreateRectangularPrism(gp_Pnt(0, 0, 40), 150, 200, -40);
 
   // Create profile p2: "profile p2 o 0 0 50 f 25 25 y 100 x 75 y -100"
-  gp_Pln                                           aPlane2(gp_Pnt(0, 0, 50), gp_Dir(0, 0, 1));
+  gp_Pln                                           aPlane2(gp_Pnt(0, 0, 50), gp_Dir(gp_Dir::D::Z));
   std::vector<BOPTest_Utilities::ProfileOperation> aProfileOps2 = {
     BOPTest_Utilities::ProfileOperation(BOPTest_Utilities::ProfileCmd::O,
                                         0.0,
@@ -567,7 +567,7 @@ TEST_F(BCutSimpleTest1, SameOrientedProfileForwardForwardWithReversed_J9)
   const TopoDS_Shape aIntermediate = aCutOp1.Shape();
 
   // Create profile p3: "profile p3 o 0 0 -10 f 50 75 x 75 y 100 x -75"
-  gp_Pln                                           aPlane3(gp_Pnt(0, 0, -10), gp_Dir(0, 0, 1));
+  gp_Pln                                           aPlane3(gp_Pnt(0, 0, -10), gp_Dir(gp_Dir::D::Z));
   std::vector<BOPTest_Utilities::ProfileOperation> aProfileOps3 = {
     BOPTest_Utilities::ProfileOperation(BOPTest_Utilities::ProfileCmd::O,
                                         0.0,
@@ -594,7 +594,7 @@ TEST_F(BCutSimpleTest1, SameOrientedProfileForwardReversed_K1)
     BOPTest_Utilities::CreateRectangularPrism(gp_Pnt(0, 0, 40), 150, 200, -40);
 
   // Create profile p2: "profile p2 o 0 0 50 f 25 25 y 100 x 75 y -100"
-  gp_Pln                                           aPlane2(gp_Pnt(0, 0, 50), gp_Dir(0, 0, 1));
+  gp_Pln                                           aPlane2(gp_Pnt(0, 0, 50), gp_Dir(gp_Dir::D::Z));
   std::vector<BOPTest_Utilities::ProfileOperation> aProfileOps2 = {
     BOPTest_Utilities::ProfileOperation(BOPTest_Utilities::ProfileCmd::O,
                                         0.0,
@@ -614,7 +614,7 @@ TEST_F(BCutSimpleTest1, SameOrientedProfileForwardReversed_K1)
   const TopoDS_Shape aIntermediate = aCutOp1.Shape();
 
   // Create profile p3: "profile p3 p 0 0 -1 1 0 0 o 0 0 -10 f 50 -75 y -100 x 75 y 100"
-  gp_Pln                                           aPlane3(gp_Pnt(0, 0, -1), gp_Dir(1, 0, 0));
+  gp_Pln                                           aPlane3(gp_Pnt(0, 0, -1), gp_Dir(gp_Dir::D::X));
   std::vector<BOPTest_Utilities::ProfileOperation> aProfileOps3 = {
     BOPTest_Utilities::ProfileOperation(BOPTest_Utilities::ProfileCmd::O,
                                         0.0,
@@ -641,7 +641,7 @@ TEST_F(BCutSimpleTest1, SameOrientedProfileForwardObjectReversedTool_K2)
     BOPTest_Utilities::CreateRectangularPrism(gp_Pnt(0, 0, 40), 150, 200, -40);
 
   // Create profile p2: "profile p2 o 0 0 50 f 25 25 y 100 x 75 y -100"
-  gp_Pln                                           aPlane2(gp_Pnt(0, 0, 50), gp_Dir(0, 0, 1));
+  gp_Pln                                           aPlane2(gp_Pnt(0, 0, 50), gp_Dir(gp_Dir::D::Z));
   std::vector<BOPTest_Utilities::ProfileOperation> aProfileOps2 = {
     BOPTest_Utilities::ProfileOperation(BOPTest_Utilities::ProfileCmd::O,
                                         0.0,
@@ -661,7 +661,7 @@ TEST_F(BCutSimpleTest1, SameOrientedProfileForwardObjectReversedTool_K2)
   const TopoDS_Shape aIntermediate = aCutOp1.Shape();
 
   // Create profile p3: "profile p3 p 0 0 -1 1 0 0 o 0 0 -10 f 50 -75 x 75 y -100 x -75"
-  gp_Pln                                           aPlane3(gp_Pnt(0, 0, -1), gp_Dir(1, 0, 0));
+  gp_Pln                                           aPlane3(gp_Pnt(0, 0, -1), gp_Dir(gp_Dir::D::X));
   std::vector<BOPTest_Utilities::ProfileOperation> aProfileOps3 = {
     BOPTest_Utilities::ProfileOperation(BOPTest_Utilities::ProfileCmd::O,
                                         0.0,
@@ -684,7 +684,7 @@ TEST_F(BCutSimpleTest1, SameOrientedProfileForwardObjectReversedTool_K2)
 TEST_F(BCutSimpleTest1, SameOrientedProfileReversedObjectForwardTool_K3)
 {
   // Create profile p1: "profile p1 p 0 0 -1 1 0 0 o 0 0 40 y -200 x 150 y 200"
-  gp_Pln                                           aPlane1(gp_Pnt(0, 0, 0), gp_Dir(0, 0, 1));
+  gp_Pln                                           aPlane1(gp_Pnt(0, 0, 0), gp_Dir(gp_Dir::D::Z));
   std::vector<BOPTest_Utilities::ProfileOperation> aProfileOps1 = {
     BOPTest_Utilities::ProfileOperation(BOPTest_Utilities::ProfileCmd::P,
                                         0.0,
@@ -705,7 +705,7 @@ TEST_F(BCutSimpleTest1, SameOrientedProfileReversedObjectForwardTool_K3)
   const TopoDS_Shape aPrism1   = BOPTest_Utilities::CreatePrism(aProfile1, gp_Vec(0, 0, -40));
 
   // Create profile p2: "profile p2 p 0 0 -1 1 0 0 o 0 0 50 f 25 -25 x 75 y -100 x -75"
-  gp_Pln                                           aPlane2(gp_Pnt(0, 0, 0), gp_Dir(0, 0, 1));
+  gp_Pln                                           aPlane2(gp_Pnt(0, 0, 0), gp_Dir(gp_Dir::D::Z));
   std::vector<BOPTest_Utilities::ProfileOperation> aProfileOps2 = {
     BOPTest_Utilities::ProfileOperation(BOPTest_Utilities::ProfileCmd::P,
                                         0.0,
@@ -732,7 +732,7 @@ TEST_F(BCutSimpleTest1, SameOrientedProfileReversedObjectForwardTool_K3)
   const TopoDS_Shape aIntermediate = aCutOp1.Shape();
 
   // Create profile p3: "profile p3 o 0 0 -10 f 50 75 y 100 x 75 y -100"
-  gp_Pln                                           aPlane3(gp_Pnt(0, 0, -10), gp_Dir(0, 0, 1));
+  gp_Pln                                           aPlane3(gp_Pnt(0, 0, -10), gp_Dir(gp_Dir::D::Z));
   std::vector<BOPTest_Utilities::ProfileOperation> aProfileOps3 = {
     BOPTest_Utilities::ProfileOperation(BOPTest_Utilities::ProfileCmd::O,
                                         0.0,
@@ -755,7 +755,7 @@ TEST_F(BCutSimpleTest1, SameOrientedProfileReversedObjectForwardTool_K3)
 TEST_F(BCutSimpleTest1, SameOrientedProfileReversedObjectReversedTool_K4)
 {
   // Create profile p1: "profile p1 p 0 0 -1 1 0 0 o 0 0 40 y -200 x 150 y 200"
-  gp_Pln                                           aPlane1(gp_Pnt(0, 0, 0), gp_Dir(0, 0, 1));
+  gp_Pln                                           aPlane1(gp_Pnt(0, 0, 0), gp_Dir(gp_Dir::D::Z));
   std::vector<BOPTest_Utilities::ProfileOperation> aProfileOps1 = {
     BOPTest_Utilities::ProfileOperation(BOPTest_Utilities::ProfileCmd::P,
                                         0.0,
@@ -776,7 +776,7 @@ TEST_F(BCutSimpleTest1, SameOrientedProfileReversedObjectReversedTool_K4)
   const TopoDS_Shape aPrism1   = BOPTest_Utilities::CreatePrism(aProfile1, gp_Vec(0, 0, -40));
 
   // Create profile p2: "profile p2 p 0 0 -1 1 0 0 o 0 0 50 f 25 -25 x 75 y -100 x -75"
-  gp_Pln                                           aPlane2(gp_Pnt(0, 0, 0), gp_Dir(0, 0, 1));
+  gp_Pln                                           aPlane2(gp_Pnt(0, 0, 0), gp_Dir(gp_Dir::D::Z));
   std::vector<BOPTest_Utilities::ProfileOperation> aProfileOps2 = {
     BOPTest_Utilities::ProfileOperation(BOPTest_Utilities::ProfileCmd::P,
                                         0.0,
@@ -803,7 +803,7 @@ TEST_F(BCutSimpleTest1, SameOrientedProfileReversedObjectReversedTool_K4)
   const TopoDS_Shape aIntermediate = aCutOp1.Shape();
 
   // Create profile p3: "profile p3 o 0 0 -10 f 50 75 x 75 y 100 x -75"
-  gp_Pln                                           aPlane3(gp_Pnt(0, 0, -10), gp_Dir(0, 0, 1));
+  gp_Pln                                           aPlane3(gp_Pnt(0, 0, -10), gp_Dir(gp_Dir::D::Z));
   std::vector<BOPTest_Utilities::ProfileOperation> aProfileOps3 = {
     BOPTest_Utilities::ProfileOperation(BOPTest_Utilities::ProfileCmd::O,
                                         0.0,
@@ -830,7 +830,7 @@ TEST_F(BCutSimpleTest1, SameOrientedProfileForwardReversedRepeated_K5)
     BOPTest_Utilities::CreateRectangularPrism(gp_Pnt(0, 0, 40), 150, 200, -40);
 
   // Create profile p2: "profile p2 o 0 0 50 f 25 25 y 100 x 75 y -100"
-  gp_Pln                                           aPlane2(gp_Pnt(0, 0, 50), gp_Dir(0, 0, 1));
+  gp_Pln                                           aPlane2(gp_Pnt(0, 0, 50), gp_Dir(gp_Dir::D::Z));
   std::vector<BOPTest_Utilities::ProfileOperation> aProfileOps2 = {
     BOPTest_Utilities::ProfileOperation(BOPTest_Utilities::ProfileCmd::O,
                                         0.0,
@@ -850,7 +850,7 @@ TEST_F(BCutSimpleTest1, SameOrientedProfileForwardReversedRepeated_K5)
   const TopoDS_Shape aIntermediate = aCutOp1.Shape();
 
   // Create profile p3: "profile p3 p 0 0 -1 1 0 0 o 0 0 -10 f 50 -75 y -100 x 75 y 100"
-  gp_Pln                                           aPlane3(gp_Pnt(0, 0, -1), gp_Dir(1, 0, 0));
+  gp_Pln                                           aPlane3(gp_Pnt(0, 0, -1), gp_Dir(gp_Dir::D::X));
   std::vector<BOPTest_Utilities::ProfileOperation> aProfileOps3 = {
     BOPTest_Utilities::ProfileOperation(BOPTest_Utilities::ProfileCmd::O,
                                         0.0,
@@ -877,7 +877,7 @@ TEST_F(BCutSimpleTest1, SameOrientedProfileForwardObjectReversedToolVar_K6)
     BOPTest_Utilities::CreateRectangularPrism(gp_Pnt(0, 0, 40), 150, 200, -40);
 
   // Create profile p2: "profile p2 o 0 0 50 f 25 25 y 100 x 75 y -100"
-  gp_Pln                                           aPlane2(gp_Pnt(0, 0, 50), gp_Dir(0, 0, 1));
+  gp_Pln                                           aPlane2(gp_Pnt(0, 0, 50), gp_Dir(gp_Dir::D::Z));
   std::vector<BOPTest_Utilities::ProfileOperation> aProfileOps2 = {
     BOPTest_Utilities::ProfileOperation(BOPTest_Utilities::ProfileCmd::O,
                                         0.0,
@@ -897,7 +897,7 @@ TEST_F(BCutSimpleTest1, SameOrientedProfileForwardObjectReversedToolVar_K6)
   const TopoDS_Shape aIntermediate = aCutOp1.Shape();
 
   // Create profile p3: "profile p3 p 0 0 -1 1 0 0 o 0 0 -10 f 50 -75 x 75 y -100 x -75"
-  gp_Pln                                           aPlane3(gp_Pnt(0, 0, -1), gp_Dir(1, 0, 0));
+  gp_Pln                                           aPlane3(gp_Pnt(0, 0, -1), gp_Dir(gp_Dir::D::X));
   std::vector<BOPTest_Utilities::ProfileOperation> aProfileOps3 = {
     BOPTest_Utilities::ProfileOperation(BOPTest_Utilities::ProfileCmd::O,
                                         0.0,
@@ -924,7 +924,7 @@ TEST_F(BCutSimpleTest1, ComplexMultiStepProfileAllForward_K7)
     BOPTest_Utilities::CreateRectangularPrism(gp_Pnt(0, 0, 40), 175, 250, -40);
 
   // Create profile p2: "profile p2 o 0 0 50 f 25 25 y 75 x 50 y -75"
-  gp_Pln                                           aPlane2(gp_Pnt(0, 0, 50), gp_Dir(0, 0, 1));
+  gp_Pln                                           aPlane2(gp_Pnt(0, 0, 50), gp_Dir(gp_Dir::D::Z));
   std::vector<BOPTest_Utilities::ProfileOperation> aProfileOps2 = {
     BOPTest_Utilities::ProfileOperation(BOPTest_Utilities::ProfileCmd::O,
                                         0.0,
@@ -944,7 +944,7 @@ TEST_F(BCutSimpleTest1, ComplexMultiStepProfileAllForward_K7)
   const TopoDS_Shape aIntermediate1 = aCutOp1.Shape();
 
   // Create profile p3: "profile p3 p 0 0 -1 1 0 0 o 0 0 20 f 100 -150 y -75 x 50 y 75"
-  gp_Pln                                           aPlane3(gp_Pnt(0, 0, -1), gp_Dir(1, 0, 0));
+  gp_Pln                                           aPlane3(gp_Pnt(0, 0, -1), gp_Dir(gp_Dir::D::X));
   std::vector<BOPTest_Utilities::ProfileOperation> aProfileOps3 = {
     BOPTest_Utilities::ProfileOperation(BOPTest_Utilities::ProfileCmd::O,
                                         0.0,
@@ -966,7 +966,7 @@ TEST_F(BCutSimpleTest1, ComplexMultiStepProfileAllForward_K7)
   const TopoDS_Shape aIntermediate2 = aCutOp2.Shape();
 
   // Create profile p4: "profile p4 o 0 0 25 f 50 75 x 75 y 100 x -75"
-  gp_Pln                                           aPlane4(gp_Pnt(0, 0, 25), gp_Dir(0, 0, 1));
+  gp_Pln                                           aPlane4(gp_Pnt(0, 0, 25), gp_Dir(gp_Dir::D::Z));
   std::vector<BOPTest_Utilities::ProfileOperation> aProfileOps4 = {
     BOPTest_Utilities::ProfileOperation(BOPTest_Utilities::ProfileCmd::O,
                                         0.0,
@@ -993,7 +993,7 @@ TEST_F(BCutSimpleTest1, DiffOrientedProfileAllForward_K8)
     BOPTest_Utilities::CreateRectangularPrism(gp_Pnt(0, 0, 40), 150, 200, -40);
 
   // Create profile p2: "profile p2 o 0 0 50 f 25 25 y 100 x 75 y -100"
-  gp_Pln                                           aPlane2(gp_Pnt(0, 0, 50), gp_Dir(0, 0, 1));
+  gp_Pln                                           aPlane2(gp_Pnt(0, 0, 50), gp_Dir(gp_Dir::D::Z));
   std::vector<BOPTest_Utilities::ProfileOperation> aProfileOps2 = {
     BOPTest_Utilities::ProfileOperation(BOPTest_Utilities::ProfileCmd::O,
                                         0.0,
@@ -1013,7 +1013,7 @@ TEST_F(BCutSimpleTest1, DiffOrientedProfileAllForward_K8)
   const TopoDS_Shape aIntermediate = aCutOp1.Shape();
 
   // Create profile p3: "profile p3 p 0 0 -1 1 0 0 o 0 0 50 f 50 -125 x 75 y -50 x -75"
-  gp_Pln                                           aPlane3(gp_Pnt(0, 0, -1), gp_Dir(1, 0, 0));
+  gp_Pln                                           aPlane3(gp_Pnt(0, 0, -1), gp_Dir(gp_Dir::D::X));
   std::vector<BOPTest_Utilities::ProfileOperation> aProfileOps3 = {
     BOPTest_Utilities::ProfileOperation(BOPTest_Utilities::ProfileCmd::O,
                                         0.0,
@@ -1042,7 +1042,7 @@ TEST_F(BCutSimpleTest1, DiffOrientedProfileAllForwardVar_K9)
     BOPTest_Utilities::CreateRectangularPrism(gp_Pnt(0, 0, 40), 150, 200, -40);
 
   // Create profile p2: "profile p2 o 0 0 50 f 25 25 y 100 x 75 y -100"
-  gp_Pln                                           aPlane2(gp_Pnt(0, 0, 50), gp_Dir(0, 0, 1));
+  gp_Pln                                           aPlane2(gp_Pnt(0, 0, 50), gp_Dir(gp_Dir::D::Z));
   std::vector<BOPTest_Utilities::ProfileOperation> aProfileOps2 = {
     BOPTest_Utilities::ProfileOperation(BOPTest_Utilities::ProfileCmd::O,
                                         0.0,
@@ -1062,7 +1062,7 @@ TEST_F(BCutSimpleTest1, DiffOrientedProfileAllForwardVar_K9)
   const TopoDS_Shape aIntermediate = aCutOp1.Shape();
 
   // Create profile p3: "profile p3 p 0 0 -1 1 0 0 o 0 0 50 f 25 -125 x 50 y -50 x -50"
-  gp_Pln                                           aPlane3(gp_Pnt(0, 0, -1), gp_Dir(1, 0, 0));
+  gp_Pln                                           aPlane3(gp_Pnt(0, 0, -1), gp_Dir(gp_Dir::D::X));
   std::vector<BOPTest_Utilities::ProfileOperation> aProfileOps3 = {
     BOPTest_Utilities::ProfileOperation(BOPTest_Utilities::ProfileCmd::O,
                                         0.0,
@@ -1091,7 +1091,7 @@ TEST_F(BCutSimpleTest1, DiffOrientedProfileAllForward_L1)
     BOPTest_Utilities::CreateRectangularPrism(gp_Pnt(0, 0, 40), 150, 200, -40);
 
   // Create profile p2: "profile p2 o 0 0 50 f 25 25 y 100 x 75 y -100"
-  gp_Pln                                           aPlane2(gp_Pnt(0, 0, 50), gp_Dir(0, 0, 1));
+  gp_Pln                                           aPlane2(gp_Pnt(0, 0, 50), gp_Dir(gp_Dir::D::Z));
   std::vector<BOPTest_Utilities::ProfileOperation> aProfileOps2 = {
     BOPTest_Utilities::ProfileOperation(BOPTest_Utilities::ProfileCmd::O,
                                         0.0,
@@ -1111,7 +1111,7 @@ TEST_F(BCutSimpleTest1, DiffOrientedProfileAllForward_L1)
   const TopoDS_Shape aIntermediate = aCutOp1.Shape();
 
   // Create profile p3: "profile p3 p 0 0 -1 1 0 0 o 0 0 50 f 50 25 x 25 y -280 x -25"
-  gp_Pln                                           aPlane3(gp_Pnt(0, 0, -1), gp_Dir(1, 0, 0));
+  gp_Pln                                           aPlane3(gp_Pnt(0, 0, -1), gp_Dir(gp_Dir::D::X));
   std::vector<BOPTest_Utilities::ProfileOperation> aProfileOps3 = {
     BOPTest_Utilities::ProfileOperation(BOPTest_Utilities::ProfileCmd::O,
                                         0.0,
@@ -1138,7 +1138,7 @@ TEST_F(BCutSimpleTest1, DiffOrientedProfileForwardObjectReversedTool_L2)
     BOPTest_Utilities::CreateRectangularPrism(gp_Pnt(0, 0, 40), 150, 200, -40);
 
   // Create profile p2: "profile p2 o 0 0 50 f 25 25 y 100 x 75 y -100"
-  gp_Pln                                           aPlane2(gp_Pnt(0, 0, 50), gp_Dir(0, 0, 1));
+  gp_Pln                                           aPlane2(gp_Pnt(0, 0, 50), gp_Dir(gp_Dir::D::Z));
   std::vector<BOPTest_Utilities::ProfileOperation> aProfileOps2 = {
     BOPTest_Utilities::ProfileOperation(BOPTest_Utilities::ProfileCmd::O,
                                         0.0,
@@ -1158,7 +1158,7 @@ TEST_F(BCutSimpleTest1, DiffOrientedProfileForwardObjectReversedTool_L2)
   const TopoDS_Shape aIntermediate = aCutOp1.Shape();
 
   // Create profile p3: "profile p3 o 0 0 20 f 50 255 y -280 x 25 y 280"
-  gp_Pln                                           aPlane3(gp_Pnt(0, 0, 20), gp_Dir(0, 0, 1));
+  gp_Pln                                           aPlane3(gp_Pnt(0, 0, 20), gp_Dir(gp_Dir::D::Z));
   std::vector<BOPTest_Utilities::ProfileOperation> aProfileOps3 = {
     BOPTest_Utilities::ProfileOperation(BOPTest_Utilities::ProfileCmd::O,
                                         0.0,
@@ -1181,7 +1181,7 @@ TEST_F(BCutSimpleTest1, DiffOrientedProfileForwardObjectReversedTool_L2)
 TEST_F(BCutSimpleTest1, RolexCaseForwardForward_L3)
 {
   // Create profile f1: "profile f1 c 60 360"
-  gp_Pln                                           aPlane1(gp_Pnt(0, 0, 0), gp_Dir(0, 0, 1));
+  gp_Pln                                           aPlane1(gp_Pnt(0, 0, 0), gp_Dir(gp_Dir::D::Z));
   std::vector<BOPTest_Utilities::ProfileOperation> aProfileOps1 = {
     BOPTest_Utilities::ProfileOperation(BOPTest_Utilities::ProfileCmd::C, 60.0, 360.0) // c 60 360
   };
@@ -1189,7 +1189,7 @@ TEST_F(BCutSimpleTest1, RolexCaseForwardForward_L3)
   const TopoDS_Shape aPrism1   = BOPTest_Utilities::CreatePrism(aProfile1, gp_Vec(0, 0, 20));
 
   // Create profile f2: "profile f2 o 0 0 20 f 10 -20 c 40 360"
-  gp_Pln                                           aPlane2(gp_Pnt(0, 0, 20), gp_Dir(0, 0, 1));
+  gp_Pln                                           aPlane2(gp_Pnt(0, 0, 20), gp_Dir(gp_Dir::D::Z));
   std::vector<BOPTest_Utilities::ProfileOperation> aProfileOps2 = {
     BOPTest_Utilities::ProfileOperation(BOPTest_Utilities::ProfileCmd::O,
                                         0.0,
@@ -1207,7 +1207,7 @@ TEST_F(BCutSimpleTest1, RolexCaseForwardForward_L3)
   const TopoDS_Shape aIntermediate = aCutOp1.Shape();
 
   // Create profile f3: "profile f3 p 0 0 -1 1 0 0 o 0 0 23 f 50 -10 c -30 360"
-  gp_Pln                                           aPlane3(gp_Pnt(0, 0, -1), gp_Dir(1, 0, 0));
+  gp_Pln                                           aPlane3(gp_Pnt(0, 0, -1), gp_Dir(gp_Dir::D::X));
   std::vector<BOPTest_Utilities::ProfileOperation> aProfileOps3 = {
     BOPTest_Utilities::ProfileOperation(BOPTest_Utilities::ProfileCmd::O,
                                         0.0,
index 80fec7e4ffaf412f8ae8dd8f50d54b3483083a4e..0162fe8e08618265b6ce06a2c8e7270b8e70e7d0 100644 (file)
@@ -387,7 +387,7 @@ TEST_F(BFuseSimpleTest, NurbsBoxPlusRotatedNarrowBox_D1)
   constexpr Standard_Real r     = M_SQRT2;
   TopoDS_Shape            aBox2 = BOPTest_Utilities::CreateBox(gp_Pnt(0, 0, 0), r, 0.25, 1.0);
   gp_Trsf                 aTrsf;
-  aTrsf.SetRotation(gp_Ax1(gp_Pnt(0, 0, 0), gp_Dir(0, 0, 1)), M_PI / 4.0); // 45 degrees
+  aTrsf.SetRotation(gp_Ax1(gp_Pnt(0, 0, 0), gp_Dir(gp_Dir::D::Z)), M_PI / 4.0); // 45 degrees
   aBox2.Move(aTrsf);
 
   const TopoDS_Shape aResult = PerformFuse(aBox2, aBox1);
@@ -404,7 +404,7 @@ TEST_F(BFuseSimpleTest, NurbsBoxPlusRotatedNarrowBoxVariation_D2)
   constexpr Standard_Real r     = 5.5677643628300219;
   TopoDS_Shape            aBox2 = BOPTest_Utilities::CreateBox(gp_Pnt(0, 0, 0), r / 4.0, 0.25, 1.0);
   gp_Trsf                 aTrsf;
-  aTrsf.SetRotation(gp_Ax1(gp_Pnt(0, 0, 0), gp_Dir(0, 0, 1)), 34.73 * M_PI / 180.0);
+  aTrsf.SetRotation(gp_Ax1(gp_Pnt(0, 0, 0), gp_Dir(gp_Dir::D::Z)), 34.73 * M_PI / 180.0);
   aBox2.Move(aTrsf);
 
   const TopoDS_Shape aResult = PerformFuse(aBox2, aBox1);
@@ -438,8 +438,8 @@ TEST_F(BFuseSimpleTest, RotatedSpherePlusBox_D5)
 
   // Apply rotations: -90 degrees around Z, then -45 degrees around Y
   gp_Trsf aTrsf1, aTrsf2, aTrsfCombined;
-  aTrsf1.SetRotation(gp_Ax1(gp_Pnt(0, 0, 0), gp_Dir(0, 0, 1)), -M_PI / 2.0); // -90 degrees Z
-  aTrsf2.SetRotation(gp_Ax1(gp_Pnt(0, 0, 0), gp_Dir(0, 1, 0)), -M_PI / 4.0); // -45 degrees Y
+  aTrsf1.SetRotation(gp_Ax1(gp_Pnt(0, 0, 0), gp_Dir(gp_Dir::D::Z)), -M_PI / 2.0); // -90 degrees Z
+  aTrsf2.SetRotation(gp_Ax1(gp_Pnt(0, 0, 0), gp_Dir(gp_Dir::D::Y)), -M_PI / 4.0); // -45 degrees Y
   aTrsfCombined = aTrsf2 * aTrsf1;
   aSphere.Move(aTrsfCombined);
 
@@ -455,8 +455,8 @@ TEST_F(BFuseSimpleTest, BoxPlusRotatedSphere_D6)
 
   // Apply rotations: -90 degrees around Z, then -45 degrees around Y
   gp_Trsf aTrsf1, aTrsf2, aTrsfCombined;
-  aTrsf1.SetRotation(gp_Ax1(gp_Pnt(0, 0, 0), gp_Dir(0, 0, 1)), -M_PI / 2.0);
-  aTrsf2.SetRotation(gp_Ax1(gp_Pnt(0, 0, 0), gp_Dir(0, 1, 0)), -M_PI / 4.0);
+  aTrsf1.SetRotation(gp_Ax1(gp_Pnt(0, 0, 0), gp_Dir(gp_Dir::D::Z)), -M_PI / 2.0);
+  aTrsf2.SetRotation(gp_Ax1(gp_Pnt(0, 0, 0), gp_Dir(gp_Dir::D::Y)), -M_PI / 4.0);
   aTrsfCombined = aTrsf2 * aTrsf1;
   aSphere.Move(aTrsfCombined);
 
@@ -473,7 +473,7 @@ TEST_F(BFuseSimpleTest, SpherePlusRotatedBox_D7)
   TopoDS_Shape aBox = BOPTest_Utilities::CreateBox(gp_Pnt(0, 0, 0), 1.0, 1.0, 1.0);
   // Rotate box 90 degrees around Y axis: "trotate b 0 0 1 0 1 0 90"
   gp_Trsf aTrsf;
-  aTrsf.SetRotation(gp_Ax1(gp_Pnt(0, 0, 1), gp_Dir(0, 1, 0)), M_PI / 2.0); // 90 degrees Y
+  aTrsf.SetRotation(gp_Ax1(gp_Pnt(0, 0, 1), gp_Dir(gp_Dir::D::Y)), M_PI / 2.0); // 90 degrees Y
   aBox.Move(aTrsf);
 
   const TopoDS_Shape aResult = PerformFuse(aSphere, aBox);
@@ -488,7 +488,7 @@ TEST_F(BFuseSimpleTest, RotatedBoxPlusSphere_D8)
   TopoDS_Shape aBox = BOPTest_Utilities::CreateBox(gp_Pnt(0, 0, 0), 1.0, 1.0, 1.0);
   // Rotate box 90 degrees around Y axis: "trotate b 0 0 1 0 1 0 90"
   gp_Trsf aTrsf;
-  aTrsf.SetRotation(gp_Ax1(gp_Pnt(0, 0, 1), gp_Dir(0, 1, 0)), M_PI / 2.0); // 90 degrees Y
+  aTrsf.SetRotation(gp_Ax1(gp_Pnt(0, 0, 1), gp_Dir(gp_Dir::D::Y)), M_PI / 2.0); // 90 degrees Y
   aBox.Move(aTrsf);
 
   const TopoDS_Shape aResult = PerformFuse(aBox, aSphere);
@@ -500,7 +500,7 @@ TEST_F(BFuseSimpleTest, ProfileBasedPrisms_D9)
 {
   // Create first profile: "profile f1 x 100 y 100 x -200 y -200 x 100"
   // This creates a closed rectangular profile starting at origin
-  gp_Pln aPlane1(gp_Ax3(gp_Pnt(0, 0, 0), gp_Dir(0, 0, 1)));
+  gp_Pln aPlane1(gp_Ax3(gp_Pnt(0, 0, 0), gp_Dir(gp_Dir::D::Z)));
   std::vector<BOPTest_Utilities::ProfileOperation> aProfileOps1 = {
     BOPTest_Utilities::ProfileOperation(BOPTest_Utilities::ProfileCmd::X,
                                         100.0), // move to (100, 0)
@@ -518,7 +518,7 @@ TEST_F(BFuseSimpleTest, ProfileBasedPrisms_D9)
 
   // Create second profile: "profile f2 x -100 y 100 x 100; ttranslate f2 0 0 100"
   // This creates a triangular profile translated to z=100
-  gp_Pln aPlane2(gp_Ax3(gp_Pnt(0, 0, 100), gp_Dir(0, 0, 1)));
+  gp_Pln aPlane2(gp_Ax3(gp_Pnt(0, 0, 100), gp_Dir(gp_Dir::D::Z)));
   std::vector<BOPTest_Utilities::ProfileOperation> aProfileOps2 = {
     BOPTest_Utilities::ProfileOperation(BOPTest_Utilities::ProfileCmd::X,
                                         -100.0), // move to (-100, 0)
@@ -540,7 +540,7 @@ TEST_F(BFuseSimpleTest, ComplexProfileWithScaling_E1)
   const Standard_Real SCALE = 100.0;
 
   // Create first profile: "profile f1 c 50*SCALE 180 x -100*SCALE c 50*SCALE 180"
-  gp_Pln aPlane1(gp_Ax3(gp_Pnt(0, 0, 0), gp_Dir(0, 0, 1)));
+  gp_Pln aPlane1(gp_Ax3(gp_Pnt(0, 0, 0), gp_Dir(gp_Dir::D::Z)));
   std::vector<BOPTest_Utilities::ProfileOperation> aProfileOps1 = {
     BOPTest_Utilities::ProfileOperation(BOPTest_Utilities::ProfileCmd::C, 50.0 * SCALE, 180.0),
     BOPTest_Utilities::ProfileOperation(BOPTest_Utilities::ProfileCmd::X, -100.0 * SCALE),
@@ -551,7 +551,7 @@ TEST_F(BFuseSimpleTest, ComplexProfileWithScaling_E1)
 
   // Create second profile: "profile f2 x 300*SCALE y 200*SCALE x -300*SCALE; ttranslate f2
   // -200*SCALE -50*SCALE 0"
-  gp_Pln aPlane2(gp_Ax3(gp_Pnt(-200.0 * SCALE, -50.0 * SCALE, 0), gp_Dir(0, 0, 1)));
+  gp_Pln aPlane2(gp_Ax3(gp_Pnt(-200.0 * SCALE, -50.0 * SCALE, 0), gp_Dir(gp_Dir::D::Z)));
   std::vector<BOPTest_Utilities::ProfileOperation> aProfileOps2 = {
     BOPTest_Utilities::ProfileOperation(BOPTest_Utilities::ProfileCmd::X, 300.0 * SCALE),
     BOPTest_Utilities::ProfileOperation(BOPTest_Utilities::ProfileCmd::Y, 200.0 * SCALE),
@@ -595,7 +595,7 @@ TEST_F(BFuseSimpleTest, ComplexVertexEdgeWireRevolution_E3)
   // Create revolution: "revol cyla pa 0 0 0 0 0 1 360"
   const TopoDS_Shape aRevolution =
     BOPTest_Utilities::CreateRevolution(aFace,
-                                        gp_Ax1(gp_Pnt(0, 0, 0), gp_Dir(0, 0, 1)),
+                                        gp_Ax1(gp_Pnt(0, 0, 0), gp_Dir(gp_Dir::D::Z)),
                                         2.0 * M_PI);
 
   // Create cylinder: "pcylinder cylb 1 9; ttranslate cylb 5 0 -2"
@@ -627,7 +627,7 @@ TEST_F(BFuseSimpleTest, CylinderWithComplexWireRevolution_E4)
   // Create revolution: "revol ring f 0 0 0 0 0 1 269"
   const TopoDS_Shape aRing =
     BOPTest_Utilities::CreateRevolution(aFace,
-                                        gp_Ax1(gp_Pnt(0, 0, 0), gp_Dir(0, 0, 1)),
+                                        gp_Ax1(gp_Pnt(0, 0, 0), gp_Dir(gp_Dir::D::Z)),
                                         269.0 * M_PI / 180.0);
 
   const TopoDS_Shape aResult = PerformFuse(aCylinder, aRing);
@@ -1844,7 +1844,7 @@ TEST_F(BFuseSimpleTest, CylinderWithRevolutionRing_J9)
   const TopoDS_Shape  aRingFace = BOPTest_Utilities::CreateFaceFromWire(aRingWire);
 
   // Create revolution: revol ring f 0 0 0 0 0 1 269
-  const gp_Ax1       aAxis(gp_Pnt(0, 0, 0), gp_Dir(0, 0, 1));
+  const gp_Ax1       aAxis(gp_Pnt(0, 0, 0), gp_Dir(gp_Dir::D::Z));
   const TopoDS_Shape aRing =
     BOPTest_Utilities::CreateRevolution(aRingFace, aAxis, 269.0 * M_PI / 180.0);
 
@@ -1868,11 +1868,11 @@ TEST_F(BFuseSimpleTest, ComplexProfileWithRevolution_K1)
     {BOPTest_Utilities::ProfileCmd::Y, -25},
     {BOPTest_Utilities::ProfileCmd::X, -60},
     {BOPTest_Utilities::ProfileCmd::W, {}}};
-  const gp_Pln       aPlane(gp_Pnt(0, 0, 0), gp_Dir(1, 0, 0)); // pl 1 0 0 0 0 1 (normal 1,0,0)
+  const gp_Pln       aPlane(gp_Pnt(0, 0, 0), gp_Dir(gp_Dir::D::X)); // pl 1 0 0 0 0 1 (normal 1,0,0)
   const TopoDS_Shape aProfile = BOPTest_Utilities::CreateProfile(aPlane, aOps);
 
   // Create revolution: revol rv wr 50 100 50 0 0 1 360
-  const gp_Ax1       aRevAxis(gp_Pnt(50, 100, 50), gp_Dir(0, 0, 1));
+  const gp_Ax1       aRevAxis(gp_Pnt(50, 100, 50), gp_Dir(gp_Dir::D::Z));
   const TopoDS_Shape aRevolution =
     BOPTest_Utilities::CreateRevolution(aProfile, aRevAxis, 2 * M_PI);
 
@@ -1893,7 +1893,7 @@ TEST_F(BFuseSimpleTest, BlendBoxWithCylinder_K2)
   const TopoDS_Shape aCylinder = BOPTest_Utilities::CreateCylinder(100.0, 50.0);
 
   // Create plane and cylinder: plane pl1 100 100 100 0 0 1 1 0 0, pcylinder pc pl1 100 50
-  // const gp_Ax3 anAx3(gp_Pnt(100, 100, 100), gp_Dir(0, 0, 1), gp_Dir(1, 0, 0));
+  // const gp_Ax3 anAx3(gp_Pnt(100, 100, 100), gp_Dir(gp_Dir::D::Z), gp_Dir(gp_Dir::D::X));
   // const gp_Pln aPlane(anAx3);
   // const TopoDS_Shape aCylinder = BOPTest_Utilities::CreateCylinderOnPlane(aPlane, 100.0, 50.0);
 
@@ -1912,7 +1912,7 @@ TEST_F(BFuseSimpleTest, BlendBoxWithCylinderNegX_K3)
   EXPECT_FALSE(aBlendedBox.IsNull()) << "Blend operation failed";
 
   // Create plane and cylinder: plane pl1 100 100 100 0 0 1 -1 0 0, pcylinder pc pl1 100 50
-  const gp_Ax3       anAx3(gp_Pnt(100, 100, 100), gp_Dir(0, 0, 1), gp_Dir(-1, 0, 0));
+  const gp_Ax3       anAx3(gp_Pnt(100, 100, 100), gp_Dir(gp_Dir::D::Z), gp_Dir(gp_Dir::D::NX));
   const gp_Pln       aPlane(anAx3);
   const TopoDS_Shape aCylinder = BOPTest_Utilities::CreateCylinderOnPlane(aPlane, 100.0, 50.0);
   EXPECT_FALSE(aCylinder.IsNull()) << "Cylinder creation failed";
@@ -1931,7 +1931,7 @@ TEST_F(BFuseSimpleTest, BlendBoxWithCylinderY_K4)
   const TopoDS_Shape aBlendedBox = BOPTest_Utilities::CreateBlend(aBox, 1, 100.0);
 
   // Create plane and cylinder: plane pl1 100 100 100 0 0 1 0 1 0, pcylinder pc pl1 100 50
-  const gp_Ax3       anAx3(gp_Pnt(100, 100, 100), gp_Dir(0, 0, 1), gp_Dir(0, 1, 0));
+  const gp_Ax3       anAx3(gp_Pnt(100, 100, 100), gp_Dir(gp_Dir::D::Z), gp_Dir(gp_Dir::D::Y));
   const gp_Pln       aPlane(anAx3);
   const TopoDS_Shape aCylinder = BOPTest_Utilities::CreateCylinderOnPlane(aPlane, 100.0, 50.0);
 
@@ -1949,7 +1949,7 @@ TEST_F(BFuseSimpleTest, BlendBoxWithCylinderNegY_K5)
   const TopoDS_Shape aBlendedBox = BOPTest_Utilities::CreateBlend(aBox, 1, 100.0);
 
   // Create plane and cylinder: plane pl1 100 100 100 0 0 1 0 -1 0, pcylinder pc pl1 100 50
-  const gp_Ax3       anAx3(gp_Pnt(100, 100, 100), gp_Dir(0, 0, 1), gp_Dir(0, -1, 0));
+  const gp_Ax3       anAx3(gp_Pnt(100, 100, 100), gp_Dir(gp_Dir::D::Z), gp_Dir(gp_Dir::D::NY));
   const gp_Pln       aPlane(anAx3);
   const TopoDS_Shape aCylinder = BOPTest_Utilities::CreateCylinderOnPlane(aPlane, 100.0, 50.0);
 
@@ -1967,7 +1967,7 @@ TEST_F(BFuseSimpleTest, BlendBoxWithCylinderBottomX_K6)
   const TopoDS_Shape aBlendedBox = BOPTest_Utilities::CreateBlend(aBox, 1, 100.0);
 
   // Create plane and cylinder: plane pl1 100 100 0 0 0 -1 1 0 0, pcylinder pc pl1 100 50
-  const gp_Ax3       anAx3(gp_Pnt(100, 100, 0), gp_Dir(0, 0, -1), gp_Dir(1, 0, 0));
+  const gp_Ax3       anAx3(gp_Pnt(100, 100, 0), gp_Dir(gp_Dir::D::NZ), gp_Dir(gp_Dir::D::X));
   const gp_Pln       aPlane(anAx3);
   const TopoDS_Shape aCylinder = BOPTest_Utilities::CreateCylinderOnPlane(aPlane, 100.0, 50.0);
 
@@ -1985,7 +1985,7 @@ TEST_F(BFuseSimpleTest, BlendBoxWithCylinderBottomNegX_K7)
   const TopoDS_Shape aBlendedBox = BOPTest_Utilities::CreateBlend(aBox, 1, 100.0);
 
   // Create plane and cylinder: plane pl1 100 100 0 0 0 -1 -1 0 0, pcylinder pc pl1 100 50
-  const gp_Ax3       anAx3(gp_Pnt(100, 100, 0), gp_Dir(0, 0, -1), gp_Dir(-1, 0, 0));
+  const gp_Ax3       anAx3(gp_Pnt(100, 100, 0), gp_Dir(gp_Dir::D::NZ), gp_Dir(gp_Dir::D::NX));
   const gp_Pln       aPlane(anAx3);
   const TopoDS_Shape aCylinder = BOPTest_Utilities::CreateCylinderOnPlane(aPlane, 100.0, 50.0);
 
@@ -2003,7 +2003,7 @@ TEST_F(BFuseSimpleTest, BlendBoxWithCylinderBottomY_K8)
   const TopoDS_Shape aBlendedBox = BOPTest_Utilities::CreateBlend(aBox, 1, 100.0);
 
   // Create plane and cylinder: plane pl1 100 100 0 0 0 -1 0 1 0, pcylinder pc pl1 100 50
-  const gp_Ax3       anAx3(gp_Pnt(100, 100, 0), gp_Dir(0, 0, -1), gp_Dir(0, 1, 0));
+  const gp_Ax3       anAx3(gp_Pnt(100, 100, 0), gp_Dir(gp_Dir::D::NZ), gp_Dir(gp_Dir::D::Y));
   const gp_Pln       aPlane(anAx3);
   const TopoDS_Shape aCylinder = BOPTest_Utilities::CreateCylinderOnPlane(aPlane, 100.0, 50.0);
 
@@ -2021,7 +2021,7 @@ TEST_F(BFuseSimpleTest, BlendBoxWithCylinderBottomNegY_K9)
   const TopoDS_Shape aBlendedBox = BOPTest_Utilities::CreateBlend(aBox, 1, 100.0);
 
   // Create plane and cylinder: plane pl1 100 100 0 0 0 -1 0 -1 0, pcylinder pc pl1 100 50
-  const gp_Ax3       anAx3(gp_Pnt(100, 100, 0), gp_Dir(0, 0, -1), gp_Dir(0, -1, 0));
+  const gp_Ax3       anAx3(gp_Pnt(100, 100, 0), gp_Dir(gp_Dir::D::NZ), gp_Dir(gp_Dir::D::NY));
   const gp_Pln       aPlane(anAx3);
   const TopoDS_Shape aCylinder = BOPTest_Utilities::CreateCylinderOnPlane(aPlane, 100.0, 50.0);
 
index fc4f18c7ab1d6b6f1a57e9cb2a116e46313eb655..8bf6885ce6320b1f2d8ec28731e2facf7acc32d3 100644 (file)
@@ -2121,8 +2121,8 @@ void CorrectSurfaceBoundaries(const TopoDS_Face&  theFace,
             correct = Standard_False;
             break;
           }
-          gp_Dir2d      anUDir(1., 0.);
-          gp_Dir2d      aVDir(0., 1.);
+          gp_Dir2d      anUDir(gp_Dir2d::D::X);
+          gp_Dir2d      aVDir(gp_Dir2d::D::Y);
           Standard_Real anAngularTolerance = Precision::Angular();
 
           correctU =
index 2630d31b7808d013de23b2312067abfe1bb3eb9b..efd4fe4b59a565cf5197d2cb05e1b62917611bac 100644 (file)
@@ -367,38 +367,38 @@ TopoDS_Face BRepFill::Face(const TopoDS_Edge& Edge1, const TopoDS_Edge& Edge2)
 
   if (Edge1.Orientation() == TopAbs_REVERSED)
   {
-    B.UpdateEdge(Edge1, new Geom2d_Line(gp_Pnt2d(0, f2), gp_Dir2d(-1, 0)), Face, T);
+    B.UpdateEdge(Edge1, new Geom2d_Line(gp_Pnt2d(0, f2), gp_Dir2d(gp_Dir2d::D::NX)), Face, T);
     B.Range(Edge1, Face, -l1, -f1);
   }
   else
   {
-    B.UpdateEdge(Edge1, new Geom2d_Line(gp_Pnt2d(0, f2), gp_Dir2d(1, 0)), Face, T);
+    B.UpdateEdge(Edge1, new Geom2d_Line(gp_Pnt2d(0, f2), gp_Dir2d(gp_Dir2d::D::X)), Face, T);
     B.Range(Edge1, Face, f1, l1);
   }
 
   if (Edge2.Orientation() == TopAbs_REVERSED)
   {
-    B.UpdateEdge(Edge2, new Geom2d_Line(gp_Pnt2d(0, l2), gp_Dir2d(-1, 0)), Face, T);
+    B.UpdateEdge(Edge2, new Geom2d_Line(gp_Pnt2d(0, l2), gp_Dir2d(gp_Dir2d::D::NX)), Face, T);
     B.Range(Edge2, Face, -l1, -f1);
   }
   else
   {
-    B.UpdateEdge(Edge2, new Geom2d_Line(gp_Pnt2d(0, l2), gp_Dir2d(1, 0)), Face, T);
+    B.UpdateEdge(Edge2, new Geom2d_Line(gp_Pnt2d(0, l2), gp_Dir2d(gp_Dir2d::D::X)), Face, T);
     B.Range(Edge2, Face, f1, l1);
   }
 
   if (Closed)
   {
     B.UpdateEdge(Edge3,
-                 new Geom2d_Line(gp_Pnt2d(l1, 0), gp_Dir2d(0, 1)),
-                 new Geom2d_Line(gp_Pnt2d(f1, 0), gp_Dir2d(0, 1)),
+                 new Geom2d_Line(gp_Pnt2d(l1, 0), gp_Dir2d(gp_Dir2d::D::Y)),
+                 new Geom2d_Line(gp_Pnt2d(f1, 0), gp_Dir2d(gp_Dir2d::D::Y)),
                  Face,
                  T);
   }
   else
   {
-    B.UpdateEdge(Edge3, new Geom2d_Line(gp_Pnt2d(f1, 0), gp_Dir2d(0, 1)), Face, T);
-    B.UpdateEdge(Edge4, new Geom2d_Line(gp_Pnt2d(l1, 0), gp_Dir2d(0, 1)), Face, T);
+    B.UpdateEdge(Edge3, new Geom2d_Line(gp_Pnt2d(f1, 0), gp_Dir2d(gp_Dir2d::D::Y)), Face, T);
+    B.UpdateEdge(Edge4, new Geom2d_Line(gp_Pnt2d(l1, 0), gp_Dir2d(gp_Dir2d::D::Y)), Face, T);
   }
 
   // Set the non parameter flag;
@@ -608,38 +608,38 @@ TopoDS_Shell BRepFill::Shell(const TopoDS_Wire& Wire1, const TopoDS_Wire& Wire2)
 
     if (Edge1.Orientation() == TopAbs_REVERSED)
     {
-      B.UpdateEdge(Edge1, new Geom2d_Line(gp_Pnt2d(0, f2), gp_Dir2d(-1, 0)), Face, T);
+      B.UpdateEdge(Edge1, new Geom2d_Line(gp_Pnt2d(0, f2), gp_Dir2d(gp_Dir2d::D::NX)), Face, T);
       B.Range(Edge1, Face, -l1, -f1);
     }
     else
     {
-      B.UpdateEdge(Edge1, new Geom2d_Line(gp_Pnt2d(0, f2), gp_Dir2d(1, 0)), Face, T);
+      B.UpdateEdge(Edge1, new Geom2d_Line(gp_Pnt2d(0, f2), gp_Dir2d(gp_Dir2d::D::X)), Face, T);
       B.Range(Edge1, Face, f1, l1);
     }
 
     if (Edge2.Orientation() == TopAbs_REVERSED)
     {
-      B.UpdateEdge(Edge2, new Geom2d_Line(gp_Pnt2d(0, l2), gp_Dir2d(-1, 0)), Face, T);
+      B.UpdateEdge(Edge2, new Geom2d_Line(gp_Pnt2d(0, l2), gp_Dir2d(gp_Dir2d::D::NX)), Face, T);
       B.Range(Edge2, Face, -l1, -f1);
     }
     else
     {
-      B.UpdateEdge(Edge2, new Geom2d_Line(gp_Pnt2d(0, l2), gp_Dir2d(1, 0)), Face, T);
+      B.UpdateEdge(Edge2, new Geom2d_Line(gp_Pnt2d(0, l2), gp_Dir2d(gp_Dir2d::D::X)), Face, T);
       B.Range(Edge2, Face, f1, l1);
     }
 
     if (Periodic)
     {
       B.UpdateEdge(Edge3,
-                   new Geom2d_Line(gp_Pnt2d(l1, 0), gp_Dir2d(0, 1)),
-                   new Geom2d_Line(gp_Pnt2d(f1, 0), gp_Dir2d(0, 1)),
+                   new Geom2d_Line(gp_Pnt2d(l1, 0), gp_Dir2d(gp_Dir2d::D::Y)),
+                   new Geom2d_Line(gp_Pnt2d(f1, 0), gp_Dir2d(gp_Dir2d::D::Y)),
                    Face,
                    T);
     }
     else
     {
-      B.UpdateEdge(Edge3, new Geom2d_Line(gp_Pnt2d(f1, 0), gp_Dir2d(0, 1)), Face, T);
-      B.UpdateEdge(Edge4, new Geom2d_Line(gp_Pnt2d(l1, 0), gp_Dir2d(0, 1)), Face, T);
+      B.UpdateEdge(Edge3, new Geom2d_Line(gp_Pnt2d(f1, 0), gp_Dir2d(gp_Dir2d::D::Y)), Face, T);
+      B.UpdateEdge(Edge4, new Geom2d_Line(gp_Pnt2d(l1, 0), gp_Dir2d(gp_Dir2d::D::Y)), Face, T);
     }
 
     // Set the non parameter flag;
index 31350e8dd10b8cabd91b329564d4ac2a32a33bab..b9f01f76e104fd1d33127424977a7d1501224ab7 100644 (file)
@@ -682,7 +682,7 @@ void BRepFill_Evolved::ElementaryPerform(const TopoDS_Face&              Sp,
   TColStd_SequenceOfReal       EmptySeqOfReal;
 
   // mark of the profile.
-  gp_Ax3 AxeRef(gp_Pnt(0., 0., 0.), gp_Dir(0., 0., 1.), gp_Dir(1., 0., 0.));
+  gp_Ax3 AxeRef(gp_Pnt(0., 0., 0.), gp_Dir(gp_Dir::D::Z), gp_Dir(gp_Dir::D::X));
 
   //---------------------------------------------------------------
   // Construction of revolutions and tubes.
@@ -2446,7 +2446,7 @@ TopLoc_Location BRepFill_Evolved::FindLocation(const TopoDS_Face& Face) const
   gp_Ax3             Axis = P->Position();
 
   gp_Trsf T;
-  gp_Ax3  AxeRef(gp_Pnt(0., 0., 0.), gp_Dir(0., 0., 1.), gp_Dir(1., 0., 0.));
+  gp_Ax3  AxeRef(gp_Pnt(0., 0., 0.), gp_Dir(gp_Dir::D::Z), gp_Dir(gp_Dir::D::X));
   T.SetTransformation(AxeRef, Axis);
 
   return TopLoc_Location(T);
index 3880a257503bd8092c1c161229225eedaf433faa..b74d9bc43e1f377768c10b596eba31392181f289 100644 (file)
@@ -983,23 +983,23 @@ void BRepFill_Generator::Perform()
       {
         if (Edge1.Orientation() == TopAbs_REVERSED)
         {
-          B.UpdateEdge(Edge1, new Geom2d_Line(gp_Pnt2d(0, f2), gp_Dir2d(-1, 0)), Face, T);
+          B.UpdateEdge(Edge1, new Geom2d_Line(gp_Pnt2d(0, f2), gp_Dir2d(gp_Dir2d::D::NX)), Face, T);
           B.Range(Edge1, Face, -l1, -f1);
         }
         else
         {
-          B.UpdateEdge(Edge1, new Geom2d_Line(gp_Pnt2d(0, f2), gp_Dir2d(1, 0)), Face, T);
+          B.UpdateEdge(Edge1, new Geom2d_Line(gp_Pnt2d(0, f2), gp_Dir2d(gp_Dir2d::D::X)), Face, T);
           B.Range(Edge1, Face, f1, l1);
         }
 
         if (Edge2.Orientation() == TopAbs_REVERSED)
         {
-          B.UpdateEdge(Edge2, new Geom2d_Line(gp_Pnt2d(0, l2), gp_Dir2d(-1, 0)), Face, T);
+          B.UpdateEdge(Edge2, new Geom2d_Line(gp_Pnt2d(0, l2), gp_Dir2d(gp_Dir2d::D::NX)), Face, T);
           B.Range(Edge2, Face, -l1, -f1);
         }
         else
         {
-          B.UpdateEdge(Edge2, new Geom2d_Line(gp_Pnt2d(0, l2), gp_Dir2d(1, 0)), Face, T);
+          B.UpdateEdge(Edge2, new Geom2d_Line(gp_Pnt2d(0, l2), gp_Dir2d(gp_Dir2d::D::X)), Face, T);
           B.Range(Edge2, Face, f1, l1);
         }
       }
@@ -1009,15 +1009,15 @@ void BRepFill_Generator::Perform()
         if (Periodic)
         {
           B.UpdateEdge(Edge3,
-                       new Geom2d_Line(gp_Pnt2d(l1, 0), gp_Dir2d(0, 1)),
-                       new Geom2d_Line(gp_Pnt2d(f1, 0), gp_Dir2d(0, 1)),
+                       new Geom2d_Line(gp_Pnt2d(l1, 0), gp_Dir2d(gp_Dir2d::D::Y)),
+                       new Geom2d_Line(gp_Pnt2d(f1, 0), gp_Dir2d(gp_Dir2d::D::Y)),
                        Face,
                        T);
         }
         else
         {
-          B.UpdateEdge(Edge3, new Geom2d_Line(gp_Pnt2d(f1, 0), gp_Dir2d(0, 1)), Face, T);
-          B.UpdateEdge(Edge4, new Geom2d_Line(gp_Pnt2d(l1, 0), gp_Dir2d(0, 1)), Face, T);
+          B.UpdateEdge(Edge3, new Geom2d_Line(gp_Pnt2d(f1, 0), gp_Dir2d(gp_Dir2d::D::Y)), Face, T);
+          B.UpdateEdge(Edge4, new Geom2d_Line(gp_Pnt2d(l1, 0), gp_Dir2d(gp_Dir2d::D::Y)), Face, T);
         }
       }
       else
index 46fccaee32301925a1e2076a3426cf7f1dd9d39c..822c0bebbb8a2c9ca71992bf66efa006715417ed 100644 (file)
@@ -63,7 +63,7 @@ BRepFill_ShapeLaw::BRepFill_ShapeLaw(const TopoDS_Vertex& V, const Standard_Bool
   {
     myLaws = new (GeomFill_HArray1OfSectionLaw)(1, 1);
     //    gp_Pnt Origine;
-    gp_Dir                    D(1, 0, 0); // Following the normal
+    gp_Dir                    D(gp_Dir::D::X); // Following the normal
     Handle(Geom_Line)         L    = new (Geom_Line)(BRep_Tool::Pnt(V), D);
     Standard_Real             Last = 2 * BRep_Tool::Tolerance(V) + Precision::PConfusion();
     Handle(Geom_TrimmedCurve) TC   = new (Geom_TrimmedCurve)(L, 0, Last);
index e8b2b7189737b657a4729de0b731e4d8113d04f3..8278f73cb8a9ba44be18db1747283c7fd36747d2 100644 (file)
@@ -216,7 +216,7 @@ TopTools_ListOfShape& losplits)
   Vl.Orientation(oriVsup);   BB.Add(Esup2pi,Vl);   BT.Parameter(Esup2pi,Vl,pl);
   gp_Pnt2d tmp = PC->Value(pf); Standard_Real v = tmp.Y();
   Handle(Geom2d_Line) L2d =
-    new Geom2d_Line(gp_Pnt2d(-paronE,v),gp_Dir2d(1.,0.));
+    new Geom2d_Line(gp_Pnt2d(-paronE,v),gp_Dir2d(gp_Dir2d::D::X));
   Handle(Geom2d_TrimmedCurve) PCsup2pi = new Geom2d_TrimmedCurve(L2d,paronE,pl);
   TopOpeBRepDS_SetThePCurve(BB,Esup2pi,F,oriE,PCsup2pi);
 
index 6adf125d4c33218896e88819e74ac1a74a79da3a..3034a8760d399c6f3ba701aa4ce2da64d689795d 100644 (file)
@@ -593,9 +593,9 @@ void TopOpeBRepBuild_WireEdgeSet::IsUVISO(const TopoDS_Edge& E,
     const gp_Dir2d&     D   = HL->Direction();
     Standard_Real       tol = Precision::Angular();
 
-    if (D.IsParallel(gp_Dir2d(0., 1.), tol))
+    if (D.IsParallel(gp_Dir2d(gp_Dir2d::D::Y), tol))
       uiso = Standard_True;
-    else if (D.IsParallel(gp_Dir2d(1., 0.), tol))
+    else if (D.IsParallel(gp_Dir2d(gp_Dir2d::D::X), tol))
       viso = Standard_True;
   }
 }
index ceffed582d5275a850099da84792f64fdd4ff07d..c417cf3485135e132c57d1d099c3ad6de6f01790 100644 (file)
@@ -608,9 +608,9 @@ Standard_Boolean FUN_makeUisoLineOnSphe(const TopoDS_Face& F, // with geometry t
   Standard_Boolean isvgrowing = (vsup - vinf > -tol);
   gp_Dir2d         vdir;
   if (isvgrowing)
-    vdir = gp_Dir2d(0, 1);
+    vdir = gp_Dir2d(gp_Dir2d::D::Y);
   else
-    vdir = gp_Dir2d(0, -1);
+    vdir = gp_Dir2d(gp_Dir2d::D::NY);
 
   gp_Pnt2d origin(uinf, vinf);
   origin.Translate(gp_Vec2d(vdir).Scaled(p3df - par3dinf));
index 74ae08f96f81d408d733b13fb9ffb321ecfa9852..8df22650e2fbc39077337ae76b79296a8b518bb5 100644 (file)
@@ -130,11 +130,11 @@ Standard_EXPORT void FUN_ComputeGeomData(const TopoDS_Shape& F,
     Standard_Real    x = D1.X(), y = D1.Y(), z = D1.Z(), tol = Precision::Confusion();
     Standard_Boolean nullx = (Abs(x) < tol), nully = (Abs(y) < tol), nullz = (Abs(z) < tol);
     if (nullx && nully)
-      D2 = gp_Dir(1, 0, 0);
+      D2 = gp_Dir(gp_Dir::D::X);
     else if (nullx && nullz)
-      D2 = gp_Dir(1, 0, 0);
+      D2 = gp_Dir(gp_Dir::D::X);
     else if (nully && nullz)
-      D2 = gp_Dir(0, 1, 0);
+      D2 = gp_Dir(gp_Dir::D::Y);
     else
       D2 = gp_Dir(y * z, x * z, -2. * x * y);
   }
index 8a1cc6dd507b4b8e4ac876c5da85951ad28da47e..d554bc21a325c506d9cf22b05415d40f9a595aa9 100644 (file)
@@ -1020,7 +1020,7 @@ Handle(Geom2d_Curve) TopOpeBRepTool_CurveTool::MakePCurveOnFace(const TopoDS_Sha
       gp_Pnt2d  po(0, -M_PI / 2);
       if (maxcond)
         po.SetY(M_PI / 2);
-      aTrsf.SetMirror(gp_Ax2d(po, gp_Dir2d(1, 0)));
+      aTrsf.SetMirror(gp_Ax2d(po, gp_Dir2d(gp_Dir2d::D::X)));
       PCT->Transform(aTrsf);
       // add translation along U direction on PI
       gp_Vec2d      vec(M_PI, 0);
index 815f1662a0f83ecfa477f9479593594ee585566e..5709ae358f2eaed62441741bf2979a05f3403e56 100644 (file)
@@ -172,7 +172,7 @@ Standard_EXPORT gp_Dir FUN_tool_ngS(const gp_Pnt2d& p2d, const Handle(Geom_Surfa
 #ifdef OCCT_DEBUG
     std::cout << "FUN_tool_nggeomF NYI" << std::endl;
 #endif
-    return gp_Dir(0, 0, 1);
+    return gp_Dir(gp_Dir::D::Z);
   }
 
   gp_Dir udir(d1u);
index 38bd671423cc29140fe3e5d32deaa6a0e130f48c..b2f2e5d052f32a9ecf0c5895c55cc1c448da1a7f 100644 (file)
@@ -331,9 +331,9 @@ Standard_Real TopOpeBRepTool_ShapeTool::PeriodizeParameter(const Standard_Real p
 
     Standard_Real    tol  = Precision::Angular();
     Standard_Boolean isoU = Standard_False, isoV = Standard_False;
-    if (D.IsParallel(gp_Dir2d(0., 1.), tol))
+    if (D.IsParallel(gp_Dir2d(gp_Dir2d::D::Y), tol))
       isoU = Standard_True;
-    else if (D.IsParallel(gp_Dir2d(1., 0.), tol))
+    else if (D.IsParallel(gp_Dir2d(gp_Dir2d::D::X), tol))
       isoV = Standard_True;
     if (isoU)
     {
index d2fc113927e7af97c869331ef34034979d1654f2..c707c86165ecfc6b5b4a4413bab3f0cc8dee7b52 100644 (file)
@@ -52,7 +52,7 @@ Standard_EXPORT gp_Dir2d FUN_tool_nC2dINSIDES(const gp_Dir2d& tgC2d)
   // X = (tgC2d,0),Y = (xx,0),Z =(0,0,1)
   // ------------------------------------------------------------
   gp_Dir X, Y, Z;
-  Z = gp_Dir(0., 0., 1.);
+  Z = gp_Dir(gp_Dir::D::Z);
   X = gp_Dir(tgC2d.X(), tgC2d.Y(), 0.);
   Y = Z ^ X;
   gp_Dir2d xx(Y.X(), Y.Y());
index a245a74f6b498752cfbf3fd03638f8e7363ec747..d900029730986181a480107d56250a8a19a75bf3 100644 (file)
@@ -496,7 +496,7 @@ gp_Dir BRepFeat_RibSlot::Normal(const TopoDS_Face& F, const gp_Pnt& P)
       break;
 
     default: {
-      return gp_Dir(1., 0., 0.);
+      return gp_Dir(gp_Dir::D::X);
     }
   }
 
index 1196db0068e85b5cf36a6036bcd9221a782808bd..998c9f1ac4e04b0d029ce58f6ad2173b4105e3cf 100644 (file)
@@ -109,7 +109,7 @@ void BlendFunc::GetMinimalWeights(const BlendFunc_SectionShape       SShape,
     break;
     case BlendFunc_Rational:
     case BlendFunc_QuasiAngular: {
-      gp_Ax2                    popAx2(gp_Pnt(0, 0, 0), gp_Dir(0, 0, 1));
+      gp_Ax2                    popAx2(gp_Pnt(0, 0, 0), gp_Dir(gp_Dir::D::Z));
       gp_Circ                   C(popAx2, 1);
       Handle(Geom_TrimmedCurve) Sect1   = new Geom_TrimmedCurve(new Geom_Circle(C), 0., MaxAng);
       Handle(Geom_BSplineCurve) CtoBspl = GeomConvert::CurveToBSplineCurve(Sect1, TConv);
index 644458cb76571341c448fa48d14cdfbafd417c08..8c5a0237ed26b7aa8a8618607c6208864656d546 100644 (file)
@@ -79,7 +79,7 @@ GccAna_Circ2d2TanOn::GccAna_Circ2d2TanOn(const GccEnt_QualifiedCirc& Qualified1,
   gp_Circ2d            C2 = Qualified2.Qualified();
   Standard_Real        R1 = C1.Radius();
   Standard_Real        R2 = C2.Radius();
-  gp_Dir2d             dirx(1., 0.);
+  gp_Dir2d             dirx(gp_Dir2d::D::X);
   gp_Pnt2d             center1(C1.Location());
   gp_Pnt2d             center2(C2.Location());
   TColStd_Array1OfReal Radius(1, 2);
index fb04e65809bc4983e095b392ee42a9f921bfab72..e38300ffb1b32a535045c63ab1518f7a0068ee6a 100644 (file)
@@ -77,7 +77,7 @@ GccAna_Circ2d2TanOn::GccAna_Circ2d2TanOn(const GccEnt_QualifiedCirc& Qualified1,
   Standard_Real    Tol    = Abs(Tolerance);
   Standard_Real    Radius = 0;
   Standard_Boolean ok     = Standard_False;
-  gp_Dir2d         dirx(1., 0.);
+  gp_Dir2d         dirx(gp_Dir2d::D::X);
   gp_Circ2d        C1 = Qualified1.Qualified();
   gp_Lin2d         L2 = Qualified2.Qualified();
   Standard_Real    R1 = C1.Radius();
index 5629a7d713fb0d16005df05e1061e2b3b27ee487..0f306b6cb70e6cdc41a3f98207d19a7269122f0e 100644 (file)
@@ -73,7 +73,7 @@ GccAna_Circ2d2TanOn::GccAna_Circ2d2TanOn(const GccEnt_QualifiedLin& Qualified1,
     return;
   }
   Standard_Real Tol = Abs(Tolerance);
-  gp_Dir2d      dirx(1., 0.);
+  gp_Dir2d      dirx(gp_Dir2d::D::X);
   gp_Lin2d      L1 = Qualified1.Qualified();
   gp_Pnt2d      originL1(L1.Location());
   gp_Dir2d      dirL1(L1.Direction());
index e9ea2dc0cb0f5913f5c8e07bbc708d1571874442..da449bbd73dc3abff48709e71deba1a02fa91c02 100644 (file)
@@ -66,7 +66,7 @@ GccAna_Circ2d2TanOn::GccAna_Circ2d2TanOn(const gp_Pnt2d&     Point1,
   TheSame2.Init(0);
   WellDone = Standard_False;
   NbrSol   = 0;
-  gp_Dir2d      dirx(1., 0.);
+  gp_Dir2d      dirx(gp_Dir2d::D::X);
   Standard_Real Tol    = Abs(Tolerance);
   Standard_Real dist   = Point1.Distance(Point2);
   Standard_Real dp1cen = Point1.Distance(OnCirc.Location());
index 290310c721986bb9ffdee055887c8878809626a0..dd6b958feb714d43608cb6713d83306949382ecf 100644 (file)
@@ -58,7 +58,7 @@ GccAna_Circ2d2TanOn::GccAna_Circ2d2TanOn(const GccEnt_QualifiedLin& Qualified1,
     return;
   }
 
-  gp_Dir2d      dirx(1., 0.);
+  gp_Dir2d      dirx(gp_Dir2d::D::X);
   Standard_Real Tol = Abs(Tolerance);
 
   // calculation of bisectrices of L1 and L2
index 70d44c088185bd4f6be5c724e14b540f802c6464..0d9345f3193ddd0c52e6fac45da54fbe4113fdf3 100644 (file)
@@ -75,7 +75,7 @@ GccAna_Circ2d2TanOn::GccAna_Circ2d2TanOn(const GccEnt_QualifiedCirc& Qualified1,
     return;
   }
   TColStd_Array1OfReal Radius(1, 2);
-  gp_Dir2d             dirx(1., 0.);
+  gp_Dir2d             dirx(gp_Dir2d::D::X);
   gp_Circ2d            C1 = Qualified1.Qualified();
   Standard_Real        R1 = C1.Radius();
   gp_Pnt2d             center1(C1.Location());
index addb6845bb870434e6e365a60f355c44f8d2fcfe..585076dbe06f491b4f2c0ccaa19fb4c10d5cfb9d 100644 (file)
@@ -76,7 +76,7 @@ GccAna_Circ2d2TanOn::GccAna_Circ2d2TanOn(const GccEnt_QualifiedLin& Qualified1,
     return;
   }
   Standard_Real Tol = Abs(Tolerance);
-  gp_Dir2d      dirx(1., 0.);
+  gp_Dir2d      dirx(gp_Dir2d::D::X);
   gp_Lin2d      L1 = Qualified1.Qualified();
   gp_Pnt2d      originL1(L1.Location());
   gp_Dir2d      dirL1(L1.Direction());
index f70912c3ae394f4d5c629584582d8e941789608f..14e4887a35240c4d9f84b4274146cc131c3d340a 100644 (file)
@@ -59,7 +59,7 @@ GccAna_Circ2d2TanOn::GccAna_Circ2d2TanOn(const gp_Pnt2d&     Point1,
   WellDone = Standard_False;
   NbrSol   = 0;
 
-  gp_Dir2d      dirx(1., 0.);
+  gp_Dir2d      dirx(gp_Dir2d::D::X);
   Standard_Real dist = Point1.Distance(Point2);
   if (dist < Abs(Tolerance))
   {
index f4ca305c67d95553a74df20a25d531e942dbc46f..e37a16e15b012b8a3ef11152b27610a7f9cd55cc 100644 (file)
@@ -75,7 +75,7 @@ GccAna_Circ2d2TanOn::GccAna_Circ2d2TanOn(const GccEnt_QualifiedCirc& Qualified1,
   Standard_Real        Tol = Abs(Tolerance);
   gp_Circ2d            C1  = Qualified1.Qualified();
   gp_Circ2d            C2  = Qualified2.Qualified();
-  gp_Dir2d             dirx(1., 0.);
+  gp_Dir2d             dirx(gp_Dir2d::D::X);
   TColStd_Array1OfReal Radius(1, 2);
   TColStd_Array1OfReal Rradius(1, 2);
   gp_Pnt2d             center1(C1.Location());
index 934b6db4ddaff64ac8d77f859974909dfe475dd7..91908a4ae2d8013a05f8b0b1866a86449d63b850 100644 (file)
@@ -62,7 +62,7 @@ GccAna_Circ2d2TanOn::GccAna_Circ2d2TanOn(const GccEnt_QualifiedCirc& Qualified1,
     return;
   }
   Standard_Real Radius = 0;
-  gp_Dir2d      dirx(1., 0.);
+  gp_Dir2d      dirx(gp_Dir2d::D::X);
   gp_Circ2d     C1 = Qualified1.Qualified();
   gp_Lin2d      L2 = Qualified2.Qualified();
   Standard_Real R1 = C1.Radius();
index 3f859e07faa9b47e4ccf811b5085a81ae1ebbbda..1ac5a9ea4a499ee27400a73a6f96da134760ff11 100644 (file)
@@ -69,7 +69,7 @@ GccAna_Circ2d2TanOn::GccAna_Circ2d2TanOn(const GccEnt_QualifiedCirc& Qualified1,
   }
   Standard_Real        Tol = Abs(Tolerance);
   TColStd_Array1OfReal Radius(1, 2);
-  gp_Dir2d             dirx(1., 0.);
+  gp_Dir2d             dirx(gp_Dir2d::D::X);
   gp_Circ2d            C1 = Qualified1.Qualified();
   Standard_Real        R1 = C1.Radius();
   gp_Pnt2d             center1(C1.Location());
index 76031224b6bd4e4ea97527cbb890a711b3835cc0..baf14d2bf6d3931bc5fbe399e7b2032619ea4a45 100644 (file)
@@ -51,7 +51,7 @@ GccAna_Circ2d2TanOn::GccAna_Circ2d2TanOn(const GccEnt_QualifiedLin& Qualified1,
   WellDone = Standard_False;
   NbrSol   = 0;
 
-  gp_Dir2d dirx(1., 0.);
+  gp_Dir2d dirx(gp_Dir2d::D::X);
   if (!(Qualified1.IsEnclosed() || Qualified1.IsOutside() || Qualified1.IsUnqualified())
       || !(Qualified2.IsEnclosed() || Qualified2.IsOutside() || Qualified2.IsUnqualified()))
   {
index e5df29f234c4cd1663492c3703a84b30e826e7b0..7899f5330e13b13dd83d33072dfd042a1bf87ef3 100644 (file)
@@ -57,7 +57,7 @@ GccAna_Circ2d2TanRad::GccAna_Circ2d2TanRad(const GccEnt_QualifiedCirc& Qualified
 {
 
   Standard_Real Tol = Abs(Tolerance);
-  gp_Dir2d      dirx(1., 0.);
+  gp_Dir2d      dirx(gp_Dir2d::D::X);
   WellDone = Standard_False;
   NbrSol   = 0;
   if (!(Qualified1.IsEnclosed() || Qualified1.IsEnclosing() || Qualified1.IsOutside()
index bd9377b6008ff2a648e0c362db3335c23396fd54..524bf2764b4b019c79edfc02ce27e22953f4cd38 100644 (file)
@@ -58,7 +58,7 @@ GccAna_Circ2d2TanRad::GccAna_Circ2d2TanRad(const GccEnt_QualifiedCirc& Qualified
 {
 
   Standard_Real Tol = Abs(Tolerance);
-  gp_Dir2d      dirx(1., 0.);
+  gp_Dir2d      dirx(gp_Dir2d::D::X);
   NbrSol   = 0;
   WellDone = Standard_False;
   if (!(Qualified1.IsEnclosed() || Qualified1.IsEnclosing() || Qualified1.IsOutside()
index c98e7d5eb268c296cec0b7a9450f24e6f38c1822..1c683fb0c32f6bcb99646f5badad6d0704dfc296 100644 (file)
@@ -56,7 +56,7 @@ GccAna_Circ2d2TanRad::GccAna_Circ2d2TanRad(const GccEnt_QualifiedCirc& Qualified
       pararg2(1, 4)
 {
 
-  gp_Dir2d      dirx(1.0, 0.0);
+  gp_Dir2d      dirx(gp_Dir2d::D::X);
   Standard_Real Tol = Abs(Tolerance);
   NbrSol            = 0;
   WellDone          = Standard_False;
index 84df6783adc8ba63ba97438f34f541831dcd0595..1970ce987b02d3b5ce6f36bb7afa0656e46f19f9 100644 (file)
@@ -60,7 +60,7 @@ GccAna_Circ2d2TanRad::GccAna_Circ2d2TanRad(const GccEnt_QualifiedLin& Qualified1
       pararg2(1, 2)
 {
 
-  gp_Dir2d      dirx(1.0, 0.0);
+  gp_Dir2d      dirx(gp_Dir2d::D::X);
   Standard_Real Tol = Abs(Tolerance);
   NbrSol            = 0;
   WellDone          = Standard_False;
index 7ca4b06a4b8a764bbfa37fad7ffc6dfb926edfbf..d592736c238e8b8b995618ea85d6af0c47363cd7 100644 (file)
@@ -56,7 +56,7 @@ GccAna_Circ2d2TanRad::GccAna_Circ2d2TanRad(const GccEnt_QualifiedLin& Qualified1
       pararg2(1, 4)
 {
 
-  gp_Dir2d             dirx(1.0, 0.0);
+  gp_Dir2d             dirx(gp_Dir2d::D::X);
   TColStd_Array1OfReal cote1(1, 2);
   TColStd_Array1OfReal cote2(1, 2);
   Standard_Integer     nbrcote1 = 0;
index 9fc878a1aafd5d49e727f8103e507e8f49383a9b..f46e92d9f468a46a5b43c96a826b853f1e33e02a 100644 (file)
@@ -47,7 +47,7 @@ GccAna_Circ2d2TanRad::GccAna_Circ2d2TanRad(const gp_Pnt2d&     Point1,
       pararg2(1, 2)
 {
 
-  gp_Dir2d      dirx(1.0, 0.0);
+  gp_Dir2d      dirx(gp_Dir2d::D::X);
   Standard_Real Tol = Abs(Tolerance);
   NbrSol            = 0;
   WellDone          = Standard_False;
index 42ba3f78f53c22e7e65591de03a8630431bbc725..920c80a08da097846921450c98f57481d1cad3a7 100644 (file)
@@ -56,7 +56,7 @@ GccAna_Circ2d3Tan::GccAna_Circ2d3Tan(const GccEnt_QualifiedCirc& Qualified1,
       pararg3(1, 16)
 {
 
-  gp_Dir2d      dirx(1.0, 0.0);
+  gp_Dir2d      dirx(gp_Dir2d::D::X);
   Standard_Real Tol = Abs(Tolerance);
   WellDone          = Standard_False;
   NbrSol            = 0;
index 414cbca75fa3021298617031473156bee21143d2..72f6d5319ddbd5984fe93a98c1c5dc24ebb44360 100644 (file)
@@ -61,7 +61,7 @@ GccAna_Circ2d3Tan::GccAna_Circ2d3Tan(const GccEnt_QualifiedCirc& Qualified1,
       pararg3(1, 16)
 {
 
-  gp_Dir2d      dirx(1.0, 0.0);
+  gp_Dir2d      dirx(gp_Dir2d::D::X);
   Standard_Real Tol = Abs(Tolerance);
   WellDone          = Standard_False;
   NbrSol            = 0;
index 234ea01a3a5c1190b72c3199856b0d1908f07eb5..270fbf705c09f53352dc8d75b191e5c18ad95fb0 100644 (file)
@@ -62,7 +62,7 @@ GccAna_Circ2d3Tan::GccAna_Circ2d3Tan(const GccEnt_QualifiedCirc& Qualified1,
 
   TheSame1.Init(0);
 
-  gp_Dir2d      dirx(1.0, 0.0);
+  gp_Dir2d      dirx(gp_Dir2d::D::X);
   Standard_Real Tol = Abs(Tolerance);
   WellDone          = Standard_False;
   NbrSol            = 0;
index cdae80394558e23fe28aef05981d675082edbad1..d2cb20d113c82a3a6d65fb25b8e420c88011630b 100644 (file)
@@ -65,7 +65,7 @@ GccAna_Circ2d3Tan::GccAna_Circ2d3Tan(const GccEnt_QualifiedLin& Qualified1,
   TheSame1.Init(0);
   TheSame2.Init(0);
   TheSame3.Init(0);
-  gp_Dir2d dirx(1.0, 0.0);
+  gp_Dir2d dirx(gp_Dir2d::D::X);
   WellDone = Standard_False;
   NbrSol   = 0;
   if (!(Qualified1.IsEnclosed() || Qualified1.IsOutside() || Qualified1.IsUnqualified())
index 35b31d852376f89b793688ef7aab59679a821b5c..7f3b8625e0cae6dd57dccf2b3e7cd9d6b19c006d 100644 (file)
@@ -65,7 +65,7 @@ GccAna_Circ2d3Tan::GccAna_Circ2d3Tan(const GccEnt_QualifiedCirc& Qualified1,
       pararg3(1, MaxSol)
 {
 
-  gp_Dir2d      dirx(1.0, 0.0);
+  gp_Dir2d      dirx(gp_Dir2d::D::X);
   Standard_Real Tol = Abs(Tolerance);
   WellDone          = Standard_False;
   NbrSol            = 0;
index e1ecf0e456d02b2e1c2cce1be36c50898aac944e..1174f424233705a0d3d094818747f39c030e5b98 100644 (file)
@@ -63,7 +63,7 @@ GccAna_Circ2d3Tan::GccAna_Circ2d3Tan(const GccEnt_QualifiedCirc& Qualified1,
       pararg3(1, 4)
 {
 
-  gp_Dir2d      dirx(1.0, 0.0);
+  gp_Dir2d      dirx(gp_Dir2d::D::X);
   Standard_Real Tol    = Abs(Tolerance);
   Standard_Real MaxRad = 1e10, MinRad = 1e-6;
   WellDone = Standard_False;
index b26f29878bbba6c16e4495d5b764c1ba5d802e0e..0db34a8b1a0b4bcb3537e6b24bef7d81b4bcb570 100644 (file)
@@ -55,7 +55,7 @@ GccAna_Circ2d3Tan::GccAna_Circ2d3Tan(const GccEnt_QualifiedLin& Qualified1,
       pararg3(1, 2)
 {
 
-  gp_Dir2d dirx(1.0, 0.0);
+  gp_Dir2d dirx(gp_Dir2d::D::X);
   WellDone          = Standard_False;
   Standard_Real Tol = Abs(Tolerance);
   NbrSol            = 0;
index 324cd6fde829ec36bba3c6e38ef1148f6a535d78..9ca28597ac0cc4e89ea615ec3f75192308fae41f 100644 (file)
@@ -57,7 +57,7 @@ GccAna_Circ2d3Tan::GccAna_Circ2d3Tan(const GccEnt_QualifiedCirc& Qualified1,
       pararg3(1, 2)
 {
 
-  gp_Dir2d      dirx(1.0, 0.0);
+  gp_Dir2d      dirx(gp_Dir2d::D::X);
   Standard_Real Tol = Abs(Tolerance);
   WellDone          = Standard_False;
   NbrSol            = 0;
index 53035a902ccff42d9aac0b5ce022f9ded2e4afa0..b434e2eacb18c4f6eeaa09bb904b9e44ab0f0a74 100644 (file)
@@ -58,7 +58,7 @@ GccAna_Circ2d3Tan::GccAna_Circ2d3Tan(const GccEnt_QualifiedLin& Qualified1,
 
   WellDone          = Standard_False;
   Standard_Real Tol = Abs(Tolerance);
-  gp_Dir2d      dirx(1.0, 0.0);
+  gp_Dir2d      dirx(gp_Dir2d::D::X);
   NbrSol = 0;
   if (!(Qualified1.IsEnclosed() || Qualified1.IsOutside() || Qualified1.IsUnqualified()))
   {
index 50647c93206d333ae97560cee7e2fdff1299acc1..3babc84bca10b29c6712927f569b7a6220f56057 100644 (file)
@@ -65,7 +65,7 @@ GccAna_Circ2d3Tan::GccAna_Circ2d3Tan(const gp_Pnt2d&     Point1,
       pararg3(1, 1)
 {
 
-  gp_Dir2d dirx(1.0, 0.0);
+  gp_Dir2d dirx(gp_Dir2d::D::X);
   WellDone = Standard_False;
   NbrSol   = 0;
 
index 351b92b0e1502f18e8ee26b06ec649189a4665d0..027aba5735e4cf6fb8cd9bb9fbe436406c25048f 100644 (file)
@@ -175,7 +175,7 @@ Handle(GccInt_Bisec) GccAna_Circ2dBisec::ThisSolution(const Standard_Integer Ind
       dircen.SetCoord(xcencir2 - xcencir1, ycencir2 - ycencir1);
       medcen.SetCoord(ycencir2 - ycencir1, xcencir1 - xcencir2);
     }
-    gp_Dir2d dirx(1.0, 0.0);
+    gp_Dir2d dirx(gp_Dir2d::D::X);
     gp_Ax2d  acenx(pcen, dirx);
     gp_Ax2d  acencen(pcen, dircen);
 
index 68edf26155a0a2b5ac266734a10e35dffa02b201..7842841ee5856cebf665fe5518194f681bee937b 100644 (file)
@@ -65,7 +65,7 @@ GccAna_Circ2dTanCen::GccAna_Circ2dTanCen(const GccEnt_QualifiedCirc& Qualified1,
     throw GccEnt_BadQualifier();
     return;
   }
-  gp_Dir2d         dirx(1.0, 0.0);
+  gp_Dir2d         dirx(gp_Dir2d::D::X);
   Standard_Real    Tol = Abs(Tolerance);
   gp_Circ2d        C1  = Qualified1.Qualified();
   Standard_Real    R1  = C1.Radius();
@@ -210,7 +210,7 @@ GccAna_Circ2dTanCen::GccAna_Circ2dTanCen(const gp_Lin2d& Linetan, const gp_Pnt2d
       pararg1(1, 1)
 {
 
-  gp_Dir2d      dirx(1.0, 0.0);
+  gp_Dir2d      dirx(gp_Dir2d::D::X);
   Standard_Real rayon = Linetan.Distance(Pcenter);
   cirsol(1)           = gp_Circ2d(gp_Ax2d(Pcenter, dirx), rayon);
   // ==================================================
@@ -258,7 +258,7 @@ GccAna_Circ2dTanCen::GccAna_Circ2dTanCen(const gp_Pnt2d& Point1, const gp_Pnt2d&
       pararg1(1, 1)
 {
 
-  gp_Dir2d      dirx(1.0, 0.0);
+  gp_Dir2d      dirx(gp_Dir2d::D::X);
   Standard_Real rayon = Point1.Distance(Pcenter);
   cirsol(1)           = gp_Circ2d(gp_Ax2d(Pcenter, dirx), rayon);
   // =================================================
index 0f386347e7ad4d178d76f109a21dcb4f1f4a7b13..ad0782b3873409d18f846bf33296a8325a72747b 100644 (file)
@@ -68,7 +68,7 @@ GccAna_Circ2dTanOnRad::GccAna_Circ2dTanOnRad(const GccEnt_QualifiedCirc& Qualifi
 {
 
   TheSame1.Init(0);
-  gp_Dir2d      dirx(1.0, 0.0);
+  gp_Dir2d      dirx(gp_Dir2d::D::X);
   Standard_Real Tol = Abs(Tolerance);
   WellDone          = Standard_False;
   NbrSol            = 0;
index 46154d830dd3c629343f31cf2349c06d8811107a..ce9647647c6d348bc4e6d1deea2b354e94e61535 100644 (file)
@@ -54,7 +54,7 @@ GccAna_Circ2dTanOnRad::GccAna_Circ2dTanOnRad(const GccEnt_QualifiedLin& Qualifie
 {
 
   Standard_Real Tol = Abs(Tolerance);
-  gp_Dir2d      dirx(1.0, 0.0);
+  gp_Dir2d      dirx(gp_Dir2d::D::X);
   WellDone = Standard_False;
   NbrSol   = 0;
   if (!(Qualified1.IsEnclosed() || Qualified1.IsOutside() || Qualified1.IsUnqualified()))
index b16ee4617e435b51d90f2db36e3a5718f5fcffbf..e51b267b17b6877905c2013075142d6592acf6fa 100644 (file)
@@ -55,7 +55,7 @@ GccAna_Circ2dTanOnRad::GccAna_Circ2dTanOnRad(const gp_Pnt2d&     Point1,
       parcen3(1, 2)
 {
 
-  gp_Dir2d      dirx(1.0, 0.0);
+  gp_Dir2d      dirx(gp_Dir2d::D::X);
   Standard_Real Tol    = Abs(Tolerance);
   WellDone             = Standard_False;
   NbrSol               = 0;
index 3c7d4dcf2ea2abeea12040ac19b6defe7d9c5fa9..e22eec901ed440d0897dbc1c1f72e4b7c0fde46a 100644 (file)
@@ -52,7 +52,7 @@ GccAna_Circ2dTanOnRad::GccAna_Circ2dTanOnRad(const GccEnt_QualifiedCirc& Qualifi
 {
 
   TheSame1.Init(0);
-  gp_Dir2d         dirx(1.0, 0.0);
+  gp_Dir2d         dirx(gp_Dir2d::D::X);
   Standard_Real    Tol = Abs(Tolerance);
   Standard_Integer signe[5];
   signe[0] = 0;
index 0686860257420d6dd2e46ec14216af0f4c428ed2..9e3b5adc6a9411767808e2ff85dc700cb18be12d 100644 (file)
@@ -57,7 +57,7 @@ GccAna_Circ2dTanOnRad::GccAna_Circ2dTanOnRad(const GccEnt_QualifiedLin& Qualifie
 {
 
   TheSame1.Init(0);
-  gp_Dir2d      dirx(1.0, 0.0);
+  gp_Dir2d      dirx(gp_Dir2d::D::X);
   Standard_Real Tol = Abs(Tolerance);
   WellDone          = Standard_False;
   NbrSol            = 0;
index ce5ccf403ce6930edbacfe14733c9d50d09e0edb..a0112af763bc2ae005b525574a4917fbd38edbc5 100644 (file)
@@ -49,7 +49,7 @@ GccAna_Circ2dTanOnRad::GccAna_Circ2dTanOnRad(const gp_Pnt2d&     Point1,
       parcen3(1, 2)
 {
 
-  gp_Dir2d      dirx(1.0, 0.0);
+  gp_Dir2d      dirx(gp_Dir2d::D::X);
   Standard_Real Tol     = Abs(Tolerance);
   WellDone              = Standard_False;
   NbrSol                = 0;
index 8c548157965f04f1295297db34564d35b5ac85ae..d9d630f880e5aaafb8b1f87040085a68e32f859e 100644 (file)
@@ -107,7 +107,7 @@ Handle(GccInt_Bisec) GccAna_CircPnt2dBisec::ThisSolution(const Standard_Integer
 
   if (dist < myTolerance)
   {
-    gp_Circ2d biscirpnt1(gp_Ax2d(point, gp_Dir2d(1.0, 0.0)), R1 / 2.);
+    gp_Circ2d biscirpnt1(gp_Ax2d(point, gp_Dir2d(gp_Dir2d::D::X)), R1 / 2.);
     bissol = new GccInt_BCirc(biscirpnt1);
     //       ==========================================================
   }
index f8817923e3a11201e053cb2305a3b5b4ef57c8bf..84fae67d25087e10f8326ffe24238ce05db47fc4 100644 (file)
@@ -87,7 +87,7 @@ Geom2dGcc_Circ2d2TanOnGeo::Geom2dGcc_Circ2d2TanOnGeo(const GccEnt_QualifiedCirc&
   gp_Circ2d          C2 = Qualified2.Qualified();
   Standard_Real      R1 = C1.Radius();
   Standard_Real      R2 = C2.Radius();
-  gp_Dir2d           dirx(1., 0.);
+  gp_Dir2d           dirx(gp_Dir2d::D::X);
   gp_Pnt2d           center1(C1.Location());
   gp_Pnt2d           center2(C2.Location());
   GccAna_Circ2dBisec Bis(C1, C2);
@@ -354,7 +354,7 @@ Geom2dGcc_Circ2d2TanOnGeo::Geom2dGcc_Circ2d2TanOnGeo(const GccEnt_QualifiedCirc&
     throw GccEnt_BadQualifier();
     return;
   }
-  gp_Dir2d      dirx(1., 0.);
+  gp_Dir2d      dirx(gp_Dir2d::D::X);
   gp_Circ2d     C1 = Qualified1.Qualified();
   gp_Lin2d      L2 = Qualified2.Qualified();
   Standard_Real R1 = C1.Radius();
@@ -566,7 +566,7 @@ Geom2dGcc_Circ2d2TanOnGeo::Geom2dGcc_Circ2d2TanOnGeo(const GccEnt_QualifiedLin&
   }
   Standard_Real     Tol    = Abs(Tolerance);
   Standard_Real     Radius = 0;
-  gp_Dir2d          dirx(1., 0.);
+  gp_Dir2d          dirx(gp_Dir2d::D::X);
   gp_Lin2d          L1 = Qualified1.Qualified();
   gp_Lin2d          L2 = Qualified2.Qualified();
   gp_Dir2d          dir1(L1.Direction());
@@ -748,7 +748,7 @@ Geom2dGcc_Circ2d2TanOnGeo::Geom2dGcc_Circ2d2TanOnGeo(const GccEnt_QualifiedCirc&
   }
   Standard_Real         Tol = Abs(Tolerance);
   Standard_Real         Radius;
-  gp_Dir2d              dirx(1., 0.);
+  gp_Dir2d              dirx(gp_Dir2d::D::X);
   gp_Circ2d             C1 = Qualified1.Qualified();
   Standard_Real         R1 = C1.Radius();
   gp_Pnt2d              center1(C1.Location());
@@ -941,7 +941,7 @@ Geom2dGcc_Circ2d2TanOnGeo::Geom2dGcc_Circ2d2TanOnGeo(const GccEnt_QualifiedLin&
     throw GccEnt_BadQualifier();
     return;
   }
-  gp_Dir2d             dirx(1., 0.);
+  gp_Dir2d             dirx(gp_Dir2d::D::X);
   gp_Lin2d             L1 = Qualified1.Qualified();
   gp_Pnt2d             origin1(L1.Location());
   gp_Dir2d             dir1(L1.Direction());
@@ -1090,7 +1090,7 @@ Geom2dGcc_Circ2d2TanOnGeo::Geom2dGcc_Circ2d2TanOnGeo(const gp_Pnt2d&
   Standard_Real lastparam;
   Standard_Real Tol = Abs(Tolerance);
   NbrSol            = 0;
-  gp_Dir2d          dirx(1., 0.);
+  gp_Dir2d          dirx(gp_Dir2d::D::X);
   GccAna_Pnt2dBisec Bis(Point1, Point2);
   if (Bis.IsDone())
   {
index f92b36b2a3ace9a1bcb9c3366ff324b991dd0cad..703b336cdeefa056cb5aa1780c09013462529db9 100644 (file)
@@ -69,7 +69,7 @@ Geom2dGcc_Circ2d2TanOnIter::Geom2dGcc_Circ2d2TanOnIter(const GccEnt_QualifiedLin
     throw GccEnt_BadQualifier();
     return;
   }
-  gp_Dir2d            dirx(1., 0.);
+  gp_Dir2d            dirx(gp_Dir2d::D::X);
   gp_Lin2d            L1  = Qualified1.Qualified();
   Geom2dAdaptor_Curve Cu2 = Qualified2.Qualified();
   math_Vector         Umin(1, 4);
@@ -178,7 +178,7 @@ Geom2dGcc_Circ2d2TanOnIter::Geom2dGcc_Circ2d2TanOnIter(const Geom2dGcc_QCurve& Q
     return;
   }
   Standard_Real       Tol = Abs(Tolerance);
-  gp_Dir2d            dirx(1., 0.);
+  gp_Dir2d            dirx(gp_Dir2d::D::X);
   Geom2dAdaptor_Curve Cu1 = Qualified1.Qualified();
   Geom2dAdaptor_Curve Cu2 = Qualified2.Qualified();
   math_Vector         Umin(1, 4);
@@ -296,7 +296,7 @@ Geom2dGcc_Circ2d2TanOnIter::Geom2dGcc_Circ2d2TanOnIter(const Geom2dGcc_QCurve& Q
     return;
   }
   Standard_Real       Tol = Abs(Tolerance);
-  gp_Dir2d            dirx(1., 0.);
+  gp_Dir2d            dirx(gp_Dir2d::D::X);
   Geom2dAdaptor_Curve Cu1 = Qualified1.Qualified();
   math_Vector         Umin(1, 3);
   math_Vector         Umax(1, 3);
@@ -391,7 +391,7 @@ Geom2dGcc_Circ2d2TanOnIter::Geom2dGcc_Circ2d2TanOnIter(const GccEnt_QualifiedCir
     return;
   }
   Standard_Real       Tol = Abs(Tolerance);
-  gp_Dir2d            dirx(1., 0.);
+  gp_Dir2d            dirx(gp_Dir2d::D::X);
   gp_Circ2d           C1  = Qualified1.Qualified();
   Standard_Real       R1  = C1.Radius();
   Geom2dAdaptor_Curve Cu2 = Qualified2.Qualified();
@@ -507,7 +507,7 @@ Geom2dGcc_Circ2d2TanOnIter::Geom2dGcc_Circ2d2TanOnIter(const GccEnt_QualifiedCir
     return;
   }
   Standard_Real       Tol = Abs(Tolerance);
-  gp_Dir2d            dirx(1., 0.);
+  gp_Dir2d            dirx(gp_Dir2d::D::X);
   gp_Circ2d           C1  = Qualified1.Qualified();
   Standard_Real       R1  = C1.Radius();
   Geom2dAdaptor_Curve Cu2 = Qualified2.Qualified();
@@ -620,7 +620,7 @@ Geom2dGcc_Circ2d2TanOnIter::Geom2dGcc_Circ2d2TanOnIter(const GccEnt_QualifiedLin
     return;
   }
   Standard_Real       Tol = Abs(Tolerance);
-  gp_Dir2d            dirx(1., 0.);
+  gp_Dir2d            dirx(gp_Dir2d::D::X);
   gp_Lin2d            L1  = Qualified1.Qualified();
   Geom2dAdaptor_Curve Cu2 = Qualified2.Qualified();
   math_Vector         Umin(1, 4);
@@ -731,7 +731,7 @@ Geom2dGcc_Circ2d2TanOnIter::Geom2dGcc_Circ2d2TanOnIter(const Geom2dGcc_QCurve& Q
     return;
   }
   Standard_Real       Tol = Abs(Tolerance);
-  gp_Dir2d            dirx(1., 0.);
+  gp_Dir2d            dirx(gp_Dir2d::D::X);
   Geom2dAdaptor_Curve Cu1 = Qualified1.Qualified();
   Geom2dAdaptor_Curve Cu2 = Qualified2.Qualified();
   math_Vector         Umin(1, 4);
@@ -849,7 +849,7 @@ Geom2dGcc_Circ2d2TanOnIter::Geom2dGcc_Circ2d2TanOnIter(const Geom2dGcc_QCurve& Q
     return;
   }
   Standard_Real       Tol = Abs(Tolerance);
-  gp_Dir2d            dirx(1., 0.);
+  gp_Dir2d            dirx(gp_Dir2d::D::X);
   Geom2dAdaptor_Curve Cu1 = Qualified1.Qualified();
   math_Vector         Umin(1, 3);
   math_Vector         Umax(1, 3);
@@ -944,7 +944,7 @@ Geom2dGcc_Circ2d2TanOnIter::Geom2dGcc_Circ2d2TanOnIter(const Geom2dGcc_QCurve&
     throw GccEnt_BadQualifier();
     return;
   }
-  gp_Dir2d            dirx(1., 0.);
+  gp_Dir2d            dirx(gp_Dir2d::D::X);
   Geom2dAdaptor_Curve Cu1 = Qualified1.Qualified();
   Geom2dAdaptor_Curve Cu2 = Qualified2.Qualified();
   math_Vector         Umin(1, 4);
@@ -1102,7 +1102,7 @@ Geom2dGcc_Circ2d2TanOnIter::Geom2dGcc_Circ2d2TanOnIter(const GccEnt_QualifiedCir
     Standard_Real dist2 = point3.Distance(point2);
     if (Abs(dist1 - dist2) / 2. <= Tol)
     {
-      gp_Dir2d dirx(1., 0.);
+      gp_Dir2d dirx(gp_Dir2d::D::X);
       cirsol                  = gp_Circ2d(gp_Ax2d(point3, dirx), (dist1 + dist2) / 2.);
       Standard_Real normetan2 = Tan2.Magnitude();
       gp_Vec2d      Vec1(point1.XY(), point3.XY());
@@ -1170,7 +1170,7 @@ Geom2dGcc_Circ2d2TanOnIter::Geom2dGcc_Circ2d2TanOnIter(const GccEnt_QualifiedLin
     return;
   }
   Standard_Real       Tol = Abs(Tolerance);
-  gp_Dir2d            dirx(1., 0.);
+  gp_Dir2d            dirx(gp_Dir2d::D::X);
   gp_Lin2d            L1  = Qualified1.Qualified();
   Geom2dAdaptor_Curve Cu2 = Qualified2.Qualified();
   math_Vector         Umin(1, 4);
@@ -1274,7 +1274,7 @@ Geom2dGcc_Circ2d2TanOnIter::Geom2dGcc_Circ2d2TanOnIter(const Geom2dGcc_QCurve&
     return;
   }
   Standard_Real       Tol = Abs(Tolerance);
-  gp_Dir2d            dirx(1., 0.);
+  gp_Dir2d            dirx(gp_Dir2d::D::X);
   Geom2dAdaptor_Curve Cu1 = Qualified1.Qualified();
   math_Vector         Umin(1, 3);
   math_Vector         Umax(1, 3);
index b4e25117c3aea195bc59859d772773b992e11c4f..b87d684a8ad16301a9301996f2eaf9b1402e61c2 100644 (file)
@@ -80,7 +80,7 @@ Geom2dGcc_Circ2d2TanRadGeo::Geom2dGcc_Circ2d2TanRadGeo(const GccEnt_QualifiedLin
   Standard_Real        thelast  = 100000.;
   Standard_Real        firstparam;
   Standard_Real        lastparam;
-  gp_Dir2d             dirx(1., 0.);
+  gp_Dir2d             dirx(gp_Dir2d::D::X);
   TColStd_Array1OfReal cote1(1, 2);
   TColStd_Array1OfReal cote2(1, 2);
   Standard_Integer     nbrcote1 = 0;
@@ -294,7 +294,7 @@ Geom2dGcc_Circ2d2TanRadGeo::Geom2dGcc_Circ2d2TanRadGeo(const GccEnt_QualifiedCir
   Standard_Real        thelast  = 100000.;
   Standard_Real        firstparam;
   Standard_Real        lastparam;
-  gp_Dir2d             dirx(1., 0.);
+  gp_Dir2d             dirx(gp_Dir2d::D::X);
   TColStd_Array1OfReal cote1(1, 2);
   TColStd_Array1OfReal cote2(1, 2);
   Standard_Integer     nbrcote1 = 0;
@@ -519,7 +519,7 @@ Geom2dGcc_Circ2d2TanRadGeo::Geom2dGcc_Circ2d2TanRadGeo(const Geom2dGcc_QCurve& Q
   Standard_Real        thelast  = 100000.;
   Standard_Real        firstparam;
   Standard_Real        lastparam;
-  gp_Dir2d             dirx(1., 0.);
+  gp_Dir2d             dirx(gp_Dir2d::D::X);
   TColStd_Array1OfReal cote1(1, 2);
   Standard_Integer     nbrcote1 = 0;
   WellDone                      = Standard_False;
@@ -556,7 +556,7 @@ Geom2dGcc_Circ2d2TanRadGeo::Geom2dGcc_Circ2d2TanRadGeo(const Geom2dGcc_QCurve& Q
       cote1(1) = Radius;
       cote1(2) = -Radius;
     }
-    gp_Circ2d       Circ(gp_Ax2d(Point2, gp_Dir2d(1., 0.)), Radius);
+    gp_Circ2d       Circ(gp_Ax2d(Point2, gp_Dir2d(gp_Dir2d::D::X)), Radius);
     IntRes2d_Domain D1(ElCLib::Value(0., Circ),
                        0.,
                        Tol,
@@ -812,7 +812,7 @@ Geom2dGcc_Circ2d2TanRadGeo::Geom2dGcc_Circ2d2TanRadGeo(const Geom2dGcc_QCurve& Q
   const Standard_Real thefirst = -100000.;
   const Standard_Real thelast  = 100000.;
 #endif
-  gp_Dir2d             dirx(1., 0.);
+  gp_Dir2d             dirx(gp_Dir2d::D::X);
   TColStd_Array1OfReal cote1(1, 2);
   TColStd_Array1OfReal cote2(1, 2);
   Standard_Integer     nbrcote1 = 0;
index 3463051effaf08e0ff35c7d62314108e7372d923..a63df35da5b27791c21a22126599475255d5dbd7 100644 (file)
@@ -806,7 +806,7 @@ Geom2dGcc_Circ2d3TanIter::Geom2dGcc_Circ2d3TanIter(const Geom2dGcc_QCurve& Quali
     throw GccEnt_BadQualifier();
     return;
   }
-  gp_Circ2d                   C1(gp_Ax2d(Point3, gp_Dir2d(1., 0.)), 0.);
+  gp_Circ2d                   C1(gp_Ax2d(Point3, gp_Dir2d(gp_Dir2d::D::X)), 0.);
   Geom2dAdaptor_Curve         Cu1 = Qualified1.Qualified();
   Geom2dAdaptor_Curve         Cu2 = Qualified2.Qualified();
   Geom2dGcc_FunctionTanCuCuCu Func(C1, Cu1, Cu2);
@@ -937,9 +937,8 @@ Geom2dGcc_Circ2d3TanIter::Geom2dGcc_Circ2d3TanIter(const Geom2dGcc_QCurve& Quali
     throw GccEnt_BadQualifier();
     return;
   }
-  gp_Dir2d                    dirx(1., 0.);
-  gp_Circ2d                   C1(gp_Ax2d(Point2, dirx), 0.);
-  gp_Circ2d                   C2(gp_Ax2d(Point3, dirx), 0.);
+  gp_Circ2d                   C1(gp_Ax2d(Point2, gp_Dir2d(gp_Dir2d::D::X)), 0.);
+  gp_Circ2d                   C2(gp_Ax2d(Point3, gp_Dir2d(gp_Dir2d::D::X)), 0.);
   Geom2dAdaptor_Curve         Cu1 = Qualified1.Qualified();
   Geom2dGcc_FunctionTanCuCuCu Func(C1, C2, Cu1);
   math_Vector                 Umin(1, 3);
@@ -1065,10 +1064,9 @@ Geom2dGcc_Circ2d3TanIter::Geom2dGcc_Circ2d3TanIter(const GccEnt_QualifiedLin& Qu
     throw GccEnt_BadQualifier();
     return;
   }
-  gp_Dir2d                    dirx(1., 0.);
   gp_Lin2d                    L1  = Qualified1.Qualified();
   Geom2dAdaptor_Curve         Cu2 = Qualified2.Qualified();
-  gp_Circ2d                   C3(gp_Ax2d(Point3, dirx), 0.);
+  gp_Circ2d                   C3(gp_Ax2d(Point3, gp_Dir2d(gp_Dir2d::D::X)), 0.);
   Geom2dGcc_FunctionTanCuCuCu Func(C3, L1, Cu2);
   math_Vector                 Umin(1, 3);
   math_Vector                 Umax(1, 3);
@@ -1350,8 +1348,7 @@ Geom2dGcc_Circ2d3TanIter::Geom2dGcc_Circ2d3TanIter(const GccEnt_QualifiedCirc& Q
   }
   gp_Circ2d                   C1  = Qualified1.Qualified();
   Geom2dAdaptor_Curve         Cu2 = Qualified2.Qualified();
-  gp_Dir2d                    dirx(1., 0.);
-  gp_Circ2d                   C3(gp_Ax2d(Point3, dirx), 0.);
+  gp_Circ2d                   C3(gp_Ax2d(Point3, gp_Dir2d(gp_Dir2d::D::X)), 0.);
   Geom2dGcc_FunctionTanCuCuCu Func(C1, C3, Cu2);
   math_Vector                 Umin(1, 3);
   math_Vector                 Umax(1, 3);
index a4344b53df403693d0132e86f89e9475c6fa84bd..7c17bea9cf2ac20b0242a863755d146c325e2362 100644 (file)
@@ -57,7 +57,7 @@ Geom2dGcc_Circ2dTanCenGeo::Geom2dGcc_Circ2dTanCenGeo(const Geom2dGcc_QCurve& Qua
   theDist2(2)               = 0.;
   Standard_Integer    i     = 1;
   Standard_Integer    nbsol = 0;
-  gp_Dir2d            dirx(1.0, 0.0);
+  gp_Dir2d            dirx(gp_Dir2d::D::X);
   Standard_Real       thePar;
   Geom2dAdaptor_Curve curve = Qualified1.Qualified();
   Extrema_ExtPC2d     distmin(Pcenter,
index bd13e9dd5ea7e55db91c0794400429e13215ea72..b842e36b0dbc6a8891ee26d3d655a079b3217dcb 100644 (file)
@@ -83,7 +83,7 @@ Geom2dGcc_Circ2dTanOnRadGeo::Geom2dGcc_Circ2dTanOnRadGeo(const Geom2dGcc_QCurve&
   // Traitement.                                                            +
   //=========================================================================
 
-  gp_Dir2d      dirx(1.0, 0.0);
+  gp_Dir2d      dirx(gp_Dir2d::D::X);
   Standard_Real Tol      = Abs(Tolerance);
   Standard_Real thefirst = -100000.;
   Standard_Real thelast  = 100000.;
@@ -208,7 +208,7 @@ Geom2dGcc_Circ2dTanOnRadGeo::Geom2dGcc_Circ2dTanOnRadGeo(const Geom2dGcc_QCurve&
   // Traitement.                                                            +
   //=========================================================================
 
-  gp_Dir2d         dirx(1.0, 0.0);
+  gp_Dir2d         dirx(gp_Dir2d::D::X);
   Standard_Real    thefirst = -100000.;
   Standard_Real    thelast  = 100000.;
   Standard_Real    firstparam;
@@ -339,7 +339,7 @@ Geom2dGcc_Circ2dTanOnRadGeo::Geom2dGcc_Circ2dTanOnRadGeo(const GccEnt_QualifiedC
   // Traitement.                                                            +
   //=========================================================================
 
-  gp_Dir2d         dirx(1.0, 0.0);
+  gp_Dir2d         dirx(gp_Dir2d::D::X);
   Standard_Real    thefirst = -100000.;
   Standard_Real    thelast  = 100000.;
   Standard_Real    firstparam;
@@ -486,7 +486,7 @@ Geom2dGcc_Circ2dTanOnRadGeo::Geom2dGcc_Circ2dTanOnRadGeo(const GccEnt_QualifiedL
   // Traitement.                                                            +
   //=========================================================================
 
-  gp_Dir2d      dirx(1.0, 0.0);
+  gp_Dir2d      dirx(gp_Dir2d::D::X);
   Standard_Real thefirst = -100000.;
   Standard_Real thelast  = 100000.;
   Standard_Real firstparam;
@@ -624,7 +624,7 @@ Geom2dGcc_Circ2dTanOnRadGeo::Geom2dGcc_Circ2dTanOnRadGeo(const Geom2dGcc_QCurve&
   // Traitement.                                                            +
   //=========================================================================
 
-  gp_Dir2d         dirx(1.0, 0.0);
+  gp_Dir2d         dirx(gp_Dir2d::D::X);
   Standard_Real    thefirst = -100000.;
   Standard_Real    thelast  = 100000.;
   Standard_Real    firstparam;
@@ -758,7 +758,7 @@ Geom2dGcc_Circ2dTanOnRadGeo::Geom2dGcc_Circ2dTanOnRadGeo(const gp_Pnt2d&
   // Traitement.                                                            +
   //=========================================================================
 
-  gp_Dir2d      dirx(1.0, 0.0);
+  gp_Dir2d      dirx(gp_Dir2d::D::X);
   Standard_Real thefirst = -100000.;
   Standard_Real thelast  = 100000.;
   Standard_Real firstparam;
@@ -774,7 +774,7 @@ Geom2dGcc_Circ2dTanOnRadGeo::Geom2dGcc_Circ2dTanOnRadGeo(const gp_Pnt2d&
   else
   {
     //     gp_Dir2d Dir(-y1dir,x1dir);
-    gp_Circ2d       Circ(gp_Ax2d(Point1, gp_Dir2d(1., 0.)), Radius);
+    gp_Circ2d       Circ(gp_Ax2d(Point1, gp_Dir2d(gp_Dir2d::D::X)), Radius);
     IntRes2d_Domain D1(ElCLib::Value(0., Circ),
                        0.,
                        Tol,
index 5169c0af6c0418d5e5c6e17f75bf191c6dcc830f..943f7abbebfa6373ad9f7be783a8e51d7dec7ce4 100644 (file)
@@ -184,7 +184,7 @@ Standard_Boolean Geom2dHatch_Elements::OtherSegment(const gp_Pnt2d& P,
   }
 
   Par = RealLast();
-  L   = gp_Lin2d(P, gp_Dir2d(1, 0));
+  L   = gp_Lin2d(P, gp_Dir2d(gp_Dir2d::D::X));
 
   return Standard_False;
 }
index 3f9611392a9ceb5e600435ec620852513c9a4a96..045315f89665db4f50b2041be99639e4bf64d8d7 100644 (file)
@@ -240,7 +240,7 @@ void GeomFill::GetMinimalWeights(const Convert_ParameterisationType TConv,
     Weights.Init(1);
   else
   {
-    gp_Ax2                    popAx2(gp_Pnt(0, 0, 0), gp_Dir(0, 0, 1));
+    gp_Ax2                    popAx2(gp_Pnt(0, 0, 0), gp_Dir(gp_Dir::D::Z));
     gp_Circ                   C(popAx2, 1);
     Handle(Geom_TrimmedCurve) Sect1   = new Geom_TrimmedCurve(new Geom_Circle(C), 0., MaxAng);
     Handle(Geom_BSplineCurve) CtoBspl = GeomConvert::CurveToBSplineCurve(Sect1, TConv);
@@ -326,7 +326,7 @@ Standard_Real GeomFill::GetTolerance(const Convert_ParameterisationType TConv,
                                      const Standard_Real                AngularTol,
                                      const Standard_Real                SpatialTol)
 {
-  gp_Ax2                    popAx2(gp_Pnt(0, 0, 0), gp_Dir(0, 0, 1));
+  gp_Ax2                    popAx2(gp_Pnt(0, 0, 0), gp_Dir(gp_Dir::D::Z));
   gp_Circ                   C(popAx2, Radius);
   Handle(Geom_Circle)       popCircle = new Geom_Circle(C);
   Handle(Geom_TrimmedCurve) Sect      = new Geom_TrimmedCurve(popCircle, 0., Max(AngleMin, 0.02));
index 619c911589f77e36869655866794e26a23e350d3..d5598b28d4544d04546c9e26deb3e7a1d86881b5 100644 (file)
@@ -306,7 +306,7 @@ Standard_Boolean GeomFill_Sweep::BuildAll(const GeomAbs_Shape    Continuity,
 
         Handle(Geom_BSplineSurface) BSplSurf(Handle(Geom_BSplineSurface)::DownCast(mySurface));
 
-        gp_Dir2d                    D(0., 1.);
+        gp_Dir2d                    D(gp_Dir2d::D::Y);
         gp_Pnt2d                    P(BSplSurf->UKnot(1), 0);
         Handle(Geom2d_Line)         LC1 = new (Geom2d_Line)(P, D);
         Handle(Geom2d_TrimmedCurve) TC1 =
@@ -363,7 +363,7 @@ Standard_Boolean GeomFill_Sweep::BuildAll(const GeomAbs_Shape    Continuity,
       // les iso Bords.
       if (!myLoc->HasFirstRestriction())
       {
-        gp_Dir2d                    D(0., 1.);
+        gp_Dir2d                    D(gp_Dir2d::D::Y);
         gp_Pnt2d                    P(UKnots(UKnots.Lower()), 0);
         Handle(Geom2d_Line)         LC = new (Geom2d_Line)(P, D);
         Handle(Geom2d_TrimmedCurve) TC = new (Geom2d_TrimmedCurve)(LC, First, Last);
@@ -375,7 +375,7 @@ Standard_Boolean GeomFill_Sweep::BuildAll(const GeomAbs_Shape    Continuity,
 
       if (!myLoc->HasLastRestriction())
       {
-        gp_Dir2d                    D(0., 1.);
+        gp_Dir2d                    D(gp_Dir2d::D::Y);
         gp_Pnt2d                    P(UKnots(UKnots.Upper()), 0);
         Handle(Geom2d_Line)         LC = new (Geom2d_Line)(P, D);
         Handle(Geom2d_TrimmedCurve) TC = new (Geom2d_TrimmedCurve)(LC, First, Last);
index 35c07aea8c4c235414f5ae5036bf1d54930a12ff..d08caa98186ce328fa9cd3ab435b8ec40f584770 100644 (file)
@@ -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);
     }
index d6b71a36074dbdd3d109bfdd97cb226b63d5ed02..373de0d988d83edef683ada6b5821dbe79c837f7 100644 (file)
@@ -56,7 +56,7 @@ void Hatch_Hatcher::AddLine(const gp_Dir2d& D, const Standard_Real Dist)
 void Hatch_Hatcher::AddXLine(const Standard_Real X)
 {
   gp_Pnt2d O(X, 0);
-  gp_Dir2d D(0, 1);
+  gp_Dir2d D(gp_Dir2d::D::Y);
   gp_Lin2d L(O, D);
   AddLine(L, Hatch_XLINE);
 }
@@ -66,7 +66,7 @@ void Hatch_Hatcher::AddXLine(const Standard_Real X)
 void Hatch_Hatcher::AddYLine(const Standard_Real Y)
 {
   gp_Pnt2d O(0, Y);
-  gp_Dir2d D(1, 0);
+  gp_Dir2d D(gp_Dir2d::D::X);
   gp_Lin2d L(O, D);
   AddLine(L, Hatch_YLINE);
 }
index e436f3e25f3d56a43959470cca599069110e2a33..70f4bbcc30ef0ebf9dfaf896cafee773c4f0cae5 100644 (file)
@@ -2171,10 +2171,10 @@ Standard_Boolean IntWalk_PWalking::ExtendLineInCommonZone(
           gp_Pnt2d(FirstParams.Value(afirstindex), FirstParams.Value(afirstindex + 1)),
           gp_Pnt2d(LastParams.Value(afirstindex), LastParams.Value(afirstindex + 1)));
 
-        gp_Dir2d anIsoDir(0, 1);
+        gp_Dir2d anIsoDir(gp_Dir2d::D::Y);
 
         if ((indexofiso == 1) || (indexofiso == 3))
-          anIsoDir = gp_Dir2d(1, 0);
+          anIsoDir = gp_Dir2d(gp_Dir2d::D::X);
 
         if (aTangentZoneDir.SquareMagnitude() > gp::Resolution())
         {
index 0f2a9269078d2cdddde7e4dabf646814924318e7..8501d74707c8c8ff12abf8b3fc5a6f02bc8ed19b 100644 (file)
@@ -313,7 +313,7 @@ Standard_Integer Intf_Tool::Inters2d(const gp_Hypr2d& theCurv, const Bnd_Box2d&
 
   if (!Domain.IsOpenYmax())
   {
-    gp_Lin2d                 L1(gp_Pnt2d(0., ymax), gp_Dir2d(-1., 0.));
+    gp_Lin2d                 L1(gp_Pnt2d(0., ymax), gp_Dir2d(gp_Dir2d::D::NX));
     IntAna2d_AnaIntersection Inters1(theCurv, IntAna2d_Conic(L1));
     if (Inters1.IsDone())
     {
@@ -336,7 +336,7 @@ Standard_Integer Intf_Tool::Inters2d(const gp_Hypr2d& theCurv, const Bnd_Box2d&
 
   if (!Domain.IsOpenXmin())
   {
-    gp_Lin2d                 L2(gp_Pnt2d(xmin, 0.), gp_Dir2d(0., -1.));
+    gp_Lin2d                 L2(gp_Pnt2d(xmin, 0.), gp_Dir2d(gp_Dir2d::D::NY));
     IntAna2d_AnaIntersection Inters2(theCurv, IntAna2d_Conic(L2));
     if (Inters2.IsDone())
     {
@@ -359,7 +359,7 @@ Standard_Integer Intf_Tool::Inters2d(const gp_Hypr2d& theCurv, const Bnd_Box2d&
 
   if (!Domain.IsOpenYmin())
   {
-    gp_Lin2d                 L3(gp_Pnt2d(0., ymin), gp_Dir2d(1., 0.));
+    gp_Lin2d                 L3(gp_Pnt2d(0., ymin), gp_Dir2d(gp_Dir2d::D::X));
     IntAna2d_AnaIntersection Inters3(theCurv, IntAna2d_Conic(L3));
     if (Inters3.IsDone())
     {
@@ -382,7 +382,7 @@ Standard_Integer Intf_Tool::Inters2d(const gp_Hypr2d& theCurv, const Bnd_Box2d&
 
   if (!Domain.IsOpenXmax())
   {
-    gp_Lin2d                 L4(gp_Pnt2d(xmax, 0.), gp_Dir2d(0., 1.));
+    gp_Lin2d                 L4(gp_Pnt2d(xmax, 0.), gp_Dir2d(gp_Dir2d::D::Y));
     IntAna2d_AnaIntersection Inters4(theCurv, IntAna2d_Conic(L4));
     if (Inters4.IsDone())
     {
@@ -554,7 +554,7 @@ Standard_Integer Intf_Tool::Inters2d(const gp_Parab2d& theCurv, const Bnd_Box2d&
 
   if (!Domain.IsOpenYmax())
   {
-    gp_Lin2d                 L1(gp_Pnt2d(0., ymax), gp_Dir2d(-1., 0.));
+    gp_Lin2d                 L1(gp_Pnt2d(0., ymax), gp_Dir2d(gp_Dir2d::D::NX));
     IntAna2d_AnaIntersection Inters1(theCurv, IntAna2d_Conic(L1));
     if (Inters1.IsDone())
     {
@@ -577,7 +577,7 @@ Standard_Integer Intf_Tool::Inters2d(const gp_Parab2d& theCurv, const Bnd_Box2d&
 
   if (!Domain.IsOpenXmin())
   {
-    gp_Lin2d                 L2(gp_Pnt2d(xmin, 0.), gp_Dir2d(0., -1.));
+    gp_Lin2d                 L2(gp_Pnt2d(xmin, 0.), gp_Dir2d(gp_Dir2d::D::NY));
     IntAna2d_AnaIntersection Inters2(theCurv, IntAna2d_Conic(L2));
     if (Inters2.IsDone())
     {
@@ -600,7 +600,7 @@ Standard_Integer Intf_Tool::Inters2d(const gp_Parab2d& theCurv, const Bnd_Box2d&
 
   if (!Domain.IsOpenYmin())
   {
-    gp_Lin2d                 L3(gp_Pnt2d(0., ymin), gp_Dir2d(1., 0.));
+    gp_Lin2d                 L3(gp_Pnt2d(0., ymin), gp_Dir2d(gp_Dir2d::D::X));
     IntAna2d_AnaIntersection Inters3(theCurv, IntAna2d_Conic(L3));
     if (Inters3.IsDone())
     {
@@ -623,7 +623,7 @@ Standard_Integer Intf_Tool::Inters2d(const gp_Parab2d& theCurv, const Bnd_Box2d&
 
   if (!Domain.IsOpenXmax())
   {
-    gp_Lin2d                 L4(gp_Pnt2d(xmax, 0.), gp_Dir2d(0., 1.));
+    gp_Lin2d                 L4(gp_Pnt2d(xmax, 0.), gp_Dir2d(gp_Dir2d::D::Y));
     IntAna2d_AnaIntersection Inters4(theCurv, IntAna2d_Conic(L4));
     if (Inters4.IsDone())
     {
index 646d9c92b4033b32bf7348ea3c2f4ee80853c792..70ed1ece9e995a37ec4a93576c50723a28ae0258 100644 (file)
@@ -24,7 +24,7 @@
 Contap_ArcFunction::Contap_ArcFunction()
     : myMean(1.),
       myType(Contap_ContourStd),
-      myDir(0., 0., 1.),
+      myDir(gp_Dir::D::Z),
       myCosAng(0.0)
 {
 }
index 456b2c5db8d8bbc47420fbe5e1e3496dab30309e..8ad04e5267424f4bcefd983d553091927b5baa56 100644 (file)
@@ -29,7 +29,7 @@
 Contap_SurfFunction::Contap_SurfFunction()
     : myMean(1.),
       myType(Contap_ContourStd),
-      myDir(0., 0., 1.),
+      myDir(gp_Dir::D::Z),
       myAng(0.0),
       myCosAng(0.), // PI/2 - Angle de depouille
       tol(1.e-6),
index e8faf68d2c35e0e541159a61a4f6c0bdc4ed84c4..bf12239c2a452e6894a633902a0946ff8d21346d 100644 (file)
@@ -353,7 +353,7 @@ gp_Lin HLRAlgo_Projector::Shoot(const Standard_Real X, const Standard_Real Y) co
   }
   else
   {
-    L = gp_Lin(gp_Pnt(X, Y, 0), gp_Dir(0, 0, -1));
+    L = gp_Lin(gp_Pnt(X, Y, 0), gp_Dir(gp_Dir::D::NZ));
   }
   L.Transform(myInvTrsf);
   return L;
index a14c1e322aa1622afce31559409338a12506a09d..fb0f977d073779c6daba53dc78d65cf61fc2a9f9 100644 (file)
@@ -1536,7 +1536,7 @@ void HLRBRep_Data::EdgeState(const Standard_Real p1,
       }
       else
       {
-        V = gp_Dir(0, 0, -1);
+        V = gp_Dir(gp_Dir::D::NZ);
       }
       V.Transform(TI);
       if (NrmFace.Dot(V) > 0.)
@@ -1717,7 +1717,7 @@ Standard_Boolean HLRBRep_Data::OrientOutLine(const Standard_Integer I, HLRBRep_F
           }
           else
           {
-            V = gp_Dir(0, 0, -1);
+            V = gp_Dir(gp_Dir::D::NZ);
           }
           V.Transform(TI);
           if (mySLProps.IsNormalDefined())
index 4106bf500693dd077a51d074b1efe08253578ed6..5b70e60a8a6800a50edaea80e145c0f23338c9fd 100644 (file)
@@ -182,7 +182,7 @@ void HLRTopoBRep_FaceIsoLiner::Perform(const Standard_Integer FI,
   if (StepU > Confusion)
   {
     Standard_Real UPrm = UMin + StepU / 2.;
-    gp_Dir2d      Dir(0., 1.);
+    gp_Dir2d      Dir(gp_Dir2d::D::Y);
 
     for (IIso = 1; IIso <= nbIsos; IIso++)
     {
@@ -286,7 +286,7 @@ void HLRTopoBRep_FaceIsoLiner::Perform(const Standard_Integer FI,
   if (StepV > Confusion)
   {
     Standard_Real VPrm = VMin + StepV / 2.;
-    gp_Dir2d      Dir(1., 0.);
+    gp_Dir2d      Dir(gp_Dir2d::D::X);
 
     for (IIso = 1; IIso <= nbIsos; IIso++)
     {
index 3aeb0e9ff6307d46bbcdfe7be9ebf69ed8bd14fd..a2b4cb55ee5b040aab3d4281aeb1b159b961fb7d 100644 (file)
@@ -34,7 +34,7 @@ protected:
   void SetUp() override
   {
     // Standard axis aligned with Z
-    myAxis      = gp_Ax3(gp_Pnt(0., 0., 0.), gp_Dir(0., 0., 1.), gp_Dir(1., 0., 0.));
+    myAxis      = gp_Ax3(gp_Pnt(0., 0., 0.), gp_Dir(gp_Dir::D::Z), gp_Dir(gp_Dir::D::X));
     myTolerance = 1.e-4;
   }
 
index 9c34cddde503fe3be751c1aefd0f5c41ef36b1be..e17d390a4e4b337b755e4513e34a9b7b1c29fbf7 100644 (file)
@@ -45,7 +45,7 @@ protected:
   void SetUp() override
   {
     // Default axis setup
-    myAxis      = gp_Ax3(gp_Pnt(0., 0., 0.), gp_Dir(0., 0., 1.), gp_Dir(1., 0., 0.));
+    myAxis      = gp_Ax3(gp_Pnt(0., 0., 0.), gp_Dir(gp_Dir::D::Z), gp_Dir(gp_Dir::D::X));
     myTolerance = 1.e-4;
   }
 
@@ -167,7 +167,7 @@ TEST_F(TKHelixTest, HelixGeomBuilderHelix_SingleCoil)
 {
   HelixGeom_BuilderHelix aBuilder;
 
-  gp_Ax2 aPosition(gp_Pnt(0., 0., 0.), gp_Dir(0., 0., 1.), gp_Dir(1., 0., 0.));
+  gp_Ax2 aPosition(gp_Pnt(0., 0., 0.), gp_Dir(gp_Dir::D::Z), gp_Dir(gp_Dir::D::X));
   aBuilder.SetPosition(aPosition);
   aBuilder.SetTolerance(myTolerance);
   aBuilder.SetCurveParameters(0.0, 2.0 * M_PI, 10.0, 5.0, 0.0, Standard_True);
@@ -184,7 +184,7 @@ TEST_F(TKHelixTest, HelixGeomBuilderHelix_MultipleCoils)
 {
   HelixGeom_BuilderHelix aBuilder;
 
-  gp_Ax2 aPosition(gp_Pnt(0., 0., 0.), gp_Dir(0., 0., 1.), gp_Dir(1., 0., 0.));
+  gp_Ax2 aPosition(gp_Pnt(0., 0., 0.), gp_Dir(gp_Dir::D::Z), gp_Dir(gp_Dir::D::X));
   aBuilder.SetPosition(aPosition);
   aBuilder.SetTolerance(myTolerance);
 
index 0d6d44caff1dbacaff6184388345288e6fefcd84..240beac5beee28c2ae9ba9c65d25304c94b52b59 100644 (file)
@@ -31,7 +31,7 @@ TEST_F(HelixGeom_BuilderHelix_Test, SingleCoil)
 {
   HelixGeom_BuilderHelix aBuilder;
 
-  gp_Ax2 aPosition(gp_Pnt(0., 0., 0.), gp_Dir(0., 0., 1.), gp_Dir(1., 0., 0.));
+  gp_Ax2 aPosition(gp_Pnt(0., 0., 0.), gp_Dir(gp_Dir::D::Z), gp_Dir(gp_Dir::D::X));
   aBuilder.SetPosition(aPosition);
   aBuilder.SetTolerance(myTolerance);
   aBuilder.SetCurveParameters(0.0, 2.0 * M_PI, 10.0, 5.0, 0.0, Standard_True);
@@ -48,7 +48,7 @@ TEST_F(HelixGeom_BuilderHelix_Test, MultipleCoils)
 {
   HelixGeom_BuilderHelix aBuilder;
 
-  gp_Ax2 aPosition(gp_Pnt(0., 0., 0.), gp_Dir(0., 0., 1.), gp_Dir(1., 0., 0.));
+  gp_Ax2 aPosition(gp_Pnt(0., 0., 0.), gp_Dir(gp_Dir::D::Z), gp_Dir(gp_Dir::D::X));
   aBuilder.SetPosition(aPosition);
   aBuilder.SetTolerance(myTolerance);
 
@@ -67,7 +67,7 @@ TEST_F(HelixGeom_BuilderHelix_Test, PositionGetterSetter)
 {
   HelixGeom_BuilderHelix aBuilder;
 
-  gp_Ax2 aTestPosition(gp_Pnt(10., 20., 30.), gp_Dir(1., 0., 0.), gp_Dir(0., 1., 0.));
+  gp_Ax2 aTestPosition(gp_Pnt(10., 20., 30.), gp_Dir(gp_Dir::D::X), gp_Dir(gp_Dir::D::Y));
   aBuilder.SetPosition(aTestPosition);
 
   const gp_Ax2& aRetrievedPosition = aBuilder.Position();
index 4bf7912bfed1c6224f6123ced7844322d49327a6..5a024fda0443368b03cb9c88a62c09f9f46de020 100644 (file)
@@ -1206,22 +1206,22 @@ Standard_Boolean BRepOffset_Inter2d::ExtentEdge(const TopoDS_Edge&  E,
       TColGeom2d_SequenceOfCurve BoundLines;
       if (!Precision::IsInfinite(Vmin))
       {
-        Handle(Geom2d_Line) aLine = new Geom2d_Line(gp_Pnt2d(0., Vmin), gp_Dir2d(1., 0.));
+        Handle(Geom2d_Line) aLine = new Geom2d_Line(gp_Pnt2d(0., Vmin), gp_Dir2d(gp_Dir2d::D::X));
         BoundLines.Append(aLine);
       }
       if (!Precision::IsInfinite(Umin))
       {
-        Handle(Geom2d_Line) aLine = new Geom2d_Line(gp_Pnt2d(Umin, 0.), gp_Dir2d(0., 1.));
+        Handle(Geom2d_Line) aLine = new Geom2d_Line(gp_Pnt2d(Umin, 0.), gp_Dir2d(gp_Dir2d::D::Y));
         BoundLines.Append(aLine);
       }
       if (!Precision::IsInfinite(Vmax))
       {
-        Handle(Geom2d_Line) aLine = new Geom2d_Line(gp_Pnt2d(0., Vmax), gp_Dir2d(1., 0.));
+        Handle(Geom2d_Line) aLine = new Geom2d_Line(gp_Pnt2d(0., Vmax), gp_Dir2d(gp_Dir2d::D::X));
         BoundLines.Append(aLine);
       }
       if (!Precision::IsInfinite(Umax))
       {
-        Handle(Geom2d_Line) aLine = new Geom2d_Line(gp_Pnt2d(Umax, 0.), gp_Dir2d(0., 1.));
+        Handle(Geom2d_Line) aLine = new Geom2d_Line(gp_Pnt2d(Umax, 0.), gp_Dir2d(gp_Dir2d::D::Y));
         BoundLines.Append(aLine);
       }
 
index cc58452d18e96dce4e59a9b1c11542b7a2247cbc..65c8085dcf8a41badaf6b8efee57a45944e2f329 100644 (file)
@@ -3340,10 +3340,10 @@ void BRepOffset_MakeOffset::MakeMissingWalls(const Message_ProgressRange& theRan
           if (!IsPlanar)
           {
             TopLoc_Location Loc;
-            EdgeLine2d = new Geom2d_Line(gp_Pnt2d(0., 0.), gp_Dir2d(1., 0.));
+            EdgeLine2d = new Geom2d_Line(gp_Pnt2d(0., 0.), gp_Dir2d(gp_Dir2d::D::X));
             BB.UpdateEdge(anEdge, EdgeLine2d, theSurf, Loc, Precision::Confusion());
             Standard_Real Coeff = (OffsetDir * CircAxisDir > 0.) ? 1. : -1.;
-            OELine2d = new Geom2d_Line(gp_Pnt2d(0., OffsetVal * Coeff), gp_Dir2d(1., 0.));
+            OELine2d = new Geom2d_Line(gp_Pnt2d(0., OffsetVal * Coeff), gp_Dir2d(gp_Dir2d::D::X));
             BB.UpdateEdge(OE, OELine2d, theSurf, Loc, Precision::Confusion());
             aLine2d  = new Geom2d_Line(gp_Pnt2d(ParV2, 0.), gp_Dir2d(0., Coeff));
             aLine2d2 = new Geom2d_Line(gp_Pnt2d(ParV1, 0.), gp_Dir2d(0., Coeff));
@@ -3427,14 +3427,14 @@ void BRepOffset_MakeOffset::MakeMissingWalls(const Message_ProgressRange& theRan
           Standard_Real Uf, Ul, Vf, Vl;
           theSurf->Bounds(Uf, Ul, Vf, Vl);
           TopLoc_Location Loc;
-          EdgeLine2d = new Geom2d_Line(gp_Pnt2d(0., Vf), gp_Dir2d(1., 0.));
+          EdgeLine2d = new Geom2d_Line(gp_Pnt2d(0., Vf), gp_Dir2d(gp_Dir2d::D::X));
           BB.UpdateEdge(anEdge, EdgeLine2d, theSurf, Loc, Precision::Confusion());
-          OELine2d = new Geom2d_Line(gp_Pnt2d(0., Vl), gp_Dir2d(1., 0.));
+          OELine2d = new Geom2d_Line(gp_Pnt2d(0., Vl), gp_Dir2d(gp_Dir2d::D::X));
           BB.UpdateEdge(OE, OELine2d, theSurf, Loc, Precision::Confusion());
           Standard_Real UonV1 = (ToReverse) ? Ul : Uf;
           Standard_Real UonV2 = (ToReverse) ? Uf : Ul;
-          aLine2d             = new Geom2d_Line(gp_Pnt2d(UonV2, 0.), gp_Dir2d(0., 1.));
-          aLine2d2            = new Geom2d_Line(gp_Pnt2d(UonV1, 0.), gp_Dir2d(0., 1.));
+          aLine2d             = new Geom2d_Line(gp_Pnt2d(UonV2, 0.), gp_Dir2d(gp_Dir2d::D::Y));
+          aLine2d2            = new Geom2d_Line(gp_Pnt2d(UonV1, 0.), gp_Dir2d(gp_Dir2d::D::Y));
           if (E3.IsSame(E4))
           {
             BB.UpdateEdge(E3, aLine2d, aLine2d2, theSurf, Loc, Precision::Confusion());
index bfeca12a844b6a31ce4ef026159c0fc205634f91..7a540114aaad5df73f93eaa845d2207ed12c2b47 100644 (file)
@@ -582,14 +582,14 @@ TopoDS_Face BRepOffset_MakeSimpleOffset::BuildWallFace(const TopoDS_Edge& theOri
     theSurf->Bounds(Uf, Ul, Vf, Vl);
     TopLoc_Location     Loc;
     Handle(Geom2d_Line) EdgeLine2d, OELine2d, aLine2d, aLine2d2;
-    EdgeLine2d = new Geom2d_Line(gp_Pnt2d(0., Vf), gp_Dir2d(1., 0.));
+    EdgeLine2d = new Geom2d_Line(gp_Pnt2d(0., Vf), gp_Dir2d(gp_Dir2d::D::X));
     aBB.UpdateEdge(theOrigEdge, EdgeLine2d, theSurf, Loc, Precision::Confusion());
-    OELine2d = new Geom2d_Line(gp_Pnt2d(0., Vl), gp_Dir2d(1., 0.));
+    OELine2d = new Geom2d_Line(gp_Pnt2d(0., Vl), gp_Dir2d(gp_Dir2d::D::X));
     aBB.UpdateEdge(aNewEdge, OELine2d, theSurf, Loc, Precision::Confusion());
     Standard_Real UonV1 = (ToReverse) ? Ul : Uf;
     Standard_Real UonV2 = (ToReverse) ? Uf : Ul;
-    aLine2d             = new Geom2d_Line(gp_Pnt2d(UonV2, 0.), gp_Dir2d(0., 1.));
-    aLine2d2            = new Geom2d_Line(gp_Pnt2d(UonV1, 0.), gp_Dir2d(0., 1.));
+    aLine2d             = new Geom2d_Line(gp_Pnt2d(UonV2, 0.), gp_Dir2d(gp_Dir2d::D::Y));
+    aLine2d2            = new Geom2d_Line(gp_Pnt2d(UonV1, 0.), gp_Dir2d(gp_Dir2d::D::Y));
     if (aWall1.IsSame(aWall2))
     {
       aBB.UpdateEdge(aWall1, aLine2d, aLine2d2, theSurf, Loc, Precision::Confusion());
index fdad28d107596b372a4d0a3dd4e2ed1fcef6154f..4dcc45b44e0fbfad1557da6eea54cd4eae470d02 100644 (file)
@@ -1125,7 +1125,7 @@ void BRepOffset_Offset::Init(const TopoDS_Edge&     Path,
   Handle(Geom2d_Curve) PC;
   if (ExchUV)
   {
-    PC = new Geom2d_Line(gp_Pnt2d(0, f2), gp_Dir2d(1, 0));
+    PC = new Geom2d_Line(gp_Pnt2d(0, f2), gp_Dir2d(gp_Dir2d::D::X));
     U1 = f1;
     U2 = l1;
     if (!C1is3D)
@@ -1133,7 +1133,7 @@ void BRepOffset_Offset::Init(const TopoDS_Edge&     Path,
   }
   else
   {
-    PC = new Geom2d_Line(gp_Pnt2d(f1, 0), gp_Dir2d(0, 1));
+    PC = new Geom2d_Line(gp_Pnt2d(f1, 0), gp_Dir2d(gp_Dir2d::D::Y));
     U1 = f2;
     U2 = l2;
     if (!C1is3D)
@@ -1172,7 +1172,7 @@ void BRepOffset_Offset::Init(const TopoDS_Edge&     Path,
   // Update de edge2. (Rem : has already a 3d curve)
   if (ExchUV)
   {
-    PC = new Geom2d_Line(gp_Pnt2d(0, l2), gp_Dir2d(1, 0));
+    PC = new Geom2d_Line(gp_Pnt2d(0, l2), gp_Dir2d(gp_Dir2d::D::X));
     U1 = f1;
     U2 = l1;
     if (!C2is3D)
@@ -1180,7 +1180,7 @@ void BRepOffset_Offset::Init(const TopoDS_Edge&     Path,
   }
   else
   {
-    PC = new Geom2d_Line(gp_Pnt2d(l1, 0), gp_Dir2d(0, 1));
+    PC = new Geom2d_Line(gp_Pnt2d(l1, 0), gp_Dir2d(gp_Dir2d::D::Y));
     U1 = f2;
     U2 = l2;
     if (!C2is3D)
@@ -1275,15 +1275,15 @@ void BRepOffset_Offset::Init(const TopoDS_Edge&     Path,
     {
       // rem : si ExchUv, il faut  reverser le Wire.
       // donc l'edge Forward dans la face sera E4 : d'ou L1 et L2
-      L2 = new Geom2d_Line(gp_Pnt2d(f1, 0), gp_Dir2d(0, 1));
-      L1 = new Geom2d_Line(gp_Pnt2d(l1, 0), gp_Dir2d(0, 1));
+      L2 = new Geom2d_Line(gp_Pnt2d(f1, 0), gp_Dir2d(gp_Dir2d::D::Y));
+      L1 = new Geom2d_Line(gp_Pnt2d(l1, 0), gp_Dir2d(gp_Dir2d::D::Y));
       U1 = f2;
       U2 = l2;
     }
     else
     {
-      L1 = new Geom2d_Line(gp_Pnt2d(0, f2), gp_Dir2d(1, 0));
-      L2 = new Geom2d_Line(gp_Pnt2d(0, l2), gp_Dir2d(1, 0));
+      L1 = new Geom2d_Line(gp_Pnt2d(0, f2), gp_Dir2d(gp_Dir2d::D::X));
+      L2 = new Geom2d_Line(gp_Pnt2d(0, l2), gp_Dir2d(gp_Dir2d::D::X));
       U1 = f1;
       U2 = l1;
     }
@@ -1340,13 +1340,13 @@ void BRepOffset_Offset::Init(const TopoDS_Edge&     Path,
 
     if (ExchUV)
     {
-      L1 = new Geom2d_Line(gp_Pnt2d(f1, 0), gp_Dir2d(0, 1));
+      L1 = new Geom2d_Line(gp_Pnt2d(f1, 0), gp_Dir2d(gp_Dir2d::D::Y));
       U1 = f2;
       U2 = l2;
     }
     else
     {
-      L1 = new Geom2d_Line(gp_Pnt2d(0, f2), gp_Dir2d(1, 0));
+      L1 = new Geom2d_Line(gp_Pnt2d(0, f2), gp_Dir2d(gp_Dir2d::D::X));
       U1 = f1;
       U2 = l1;
     }
@@ -1366,13 +1366,13 @@ void BRepOffset_Offset::Init(const TopoDS_Edge&     Path,
 
     if (ExchUV)
     {
-      L2 = new Geom2d_Line(gp_Pnt2d(l1, 0), gp_Dir2d(0, 1));
+      L2 = new Geom2d_Line(gp_Pnt2d(l1, 0), gp_Dir2d(gp_Dir2d::D::Y));
       U1 = f2;
       U2 = l2;
     }
     else
     {
-      L2 = new Geom2d_Line(gp_Pnt2d(0, l2), gp_Dir2d(1, 0));
+      L2 = new Geom2d_Line(gp_Pnt2d(0, l2), gp_Dir2d(gp_Dir2d::D::X));
       U1 = f1;
       U2 = l1;
     }
index 54705e01758744860790dac6c31b262a1d19dd18..cdc8b786945b12cf115aa2d6c757bbbe6e2e10ff 100644 (file)
@@ -2618,13 +2618,13 @@ static void MakeFace(const Handle(Geom_Surface)& S,
   // make the lines
   Handle(Geom2d_Line) Lumin, Lumax, Lvmin, Lvmax;
   if (!umininf)
-    Lumin = new Geom2d_Line(gp_Pnt2d(UMin, 0), gp_Dir2d(0, 1));
+    Lumin = new Geom2d_Line(gp_Pnt2d(UMin, 0), gp_Dir2d(gp_Dir2d::D::Y));
   if (!umaxinf)
-    Lumax = new Geom2d_Line(gp_Pnt2d(UMax, 0), gp_Dir2d(0, 1));
+    Lumax = new Geom2d_Line(gp_Pnt2d(UMax, 0), gp_Dir2d(gp_Dir2d::D::Y));
   if (!vmininf)
-    Lvmin = new Geom2d_Line(gp_Pnt2d(0, VMin), gp_Dir2d(1, 0));
+    Lvmin = new Geom2d_Line(gp_Pnt2d(0, VMin), gp_Dir2d(gp_Dir2d::D::X));
   if (!vmaxinf)
-    Lvmax = new Geom2d_Line(gp_Pnt2d(0, VMax), gp_Dir2d(1, 0));
+    Lvmax = new Geom2d_Line(gp_Pnt2d(0, VMax), gp_Dir2d(gp_Dir2d::D::X));
 
   Handle(Geom_Curve) Cumin, Cumax, Cvmin, Cvmax;
   Standard_Real      TolApex = 1.e-5;
index 8e25ffd1444e0e5d8d251990b1b8a3aae9ace91a..078376c0e8e224c52a2afc277efbce71fa6bfed4 100644 (file)
@@ -906,8 +906,8 @@ void BRepOffsetAPI_ThruSections::CreateSmoothed()
     if (vClosed)
     {
       B.UpdateEdge(edge1,
-                   new Geom2d_Line(gp_Pnt2d(0, f2), gp_Dir2d(1, 0)),
-                   new Geom2d_Line(gp_Pnt2d(0, l2), gp_Dir2d(1, 0)),
+                   new Geom2d_Line(gp_Pnt2d(0, f2), gp_Dir2d(gp_Dir2d::D::X)),
+                   new Geom2d_Line(gp_Pnt2d(0, l2), gp_Dir2d(gp_Dir2d::D::X)),
                    face,
                    Precision::Confusion());
       B.Range(edge1, face, f1, l1);
@@ -915,12 +915,12 @@ void BRepOffsetAPI_ThruSections::CreateSmoothed()
     else
     {
       B.UpdateEdge(edge1,
-                   new Geom2d_Line(gp_Pnt2d(0, f2), gp_Dir2d(1, 0)),
+                   new Geom2d_Line(gp_Pnt2d(0, f2), gp_Dir2d(gp_Dir2d::D::X)),
                    face,
                    Precision::Confusion());
       B.Range(edge1, face, f1, l1);
       B.UpdateEdge(edge2,
-                   new Geom2d_Line(gp_Pnt2d(0, l2), gp_Dir2d(1, 0)),
+                   new Geom2d_Line(gp_Pnt2d(0, l2), gp_Dir2d(gp_Dir2d::D::X)),
                    face,
                    Precision::Confusion());
       B.Range(edge2, face, f1, l1);
@@ -929,8 +929,8 @@ void BRepOffsetAPI_ThruSections::CreateSmoothed()
     if (uClosed && nbEdges == 1)
     {
       B.UpdateEdge(edge3,
-                   new Geom2d_Line(gp_Pnt2d(l1, 0), gp_Dir2d(0, 1)),
-                   new Geom2d_Line(gp_Pnt2d(f1, 0), gp_Dir2d(0, 1)),
+                   new Geom2d_Line(gp_Pnt2d(l1, 0), gp_Dir2d(gp_Dir2d::D::Y)),
+                   new Geom2d_Line(gp_Pnt2d(f1, 0), gp_Dir2d(gp_Dir2d::D::Y)),
                    face,
                    Precision::Confusion());
       B.Range(edge3, face, f2, l2);
@@ -938,12 +938,12 @@ void BRepOffsetAPI_ThruSections::CreateSmoothed()
     else
     {
       B.UpdateEdge(edge3,
-                   new Geom2d_Line(gp_Pnt2d(f1, 0), gp_Dir2d(0, 1)),
+                   new Geom2d_Line(gp_Pnt2d(f1, 0), gp_Dir2d(gp_Dir2d::D::Y)),
                    face,
                    Precision::Confusion());
       B.Range(edge3, face, f2, l2);
       B.UpdateEdge(edge4,
-                   new Geom2d_Line(gp_Pnt2d(l1, 0), gp_Dir2d(0, 1)),
+                   new Geom2d_Line(gp_Pnt2d(l1, 0), gp_Dir2d(gp_Dir2d::D::Y)),
                    face,
                    Precision::Confusion());
       B.Range(edge4, face, f2, l2);
index c9f5a925949037d0ade98d0d4f2bebd37c32ee92..c125bd5e858bbdef15b06e41eaa8022fa2032d4d 100644 (file)
@@ -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();
index 6226e6ffaa463448a14b12a7cd67e71f4e18c6c0..6eb81894a72daef5438ff10b6fa45e5fbe2cabd5 100644 (file)
@@ -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);
 }
index e05ee1993372c89c0ede300e15832e13ee25095a..fb2891c201fa2927417a8e431fa0fee0ca859ef4 100644 (file)
@@ -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
index 73ad9b5098ea64c45fc0f23435bd1012b5ad4708..0f92085e0ac5813cd07c6d74072f8aebd1ab0bb9 100644 (file)
@@ -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)));
-    if (EdgesBuilt[ETOPEND])
-      myBuilder.SetPCurve(myEdges[ETOPEND],
+      myBuilder.SetPCurve(myEdges[EAXIS],
                           myFaces[FEND],
-                          gp_Lin2d(gp_Pnt2d(0, MeridianValue(myVMax).Y()), gp_Dir2d(1, 0)));
+                          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(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;
index a15a72cb3459fa2441a06ea6e19e707b77102f41..8ed310d5b456764505741bd25b727e2caffee272 100644 (file)
@@ -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);
 }
index 9d6b1c0e469bf81724867409ac7fc20734ad4e0a..95737d5f721a9e3e75f8ad23136a6c0253174222 100644 (file)
@@ -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);
 }
index 2cee33b9dda79dbd51c85336a0defcd783849361..4d98a42eeab281c69df8cbca69742a6bce9500b1 100644 (file)
@@ -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()));
 }
 
 //=================================================================================================
index feab9a5887cae7e2c97222b2928747e0c0697a11..4be6566e62ee1eff3963816055531c1fde69c002 100644 (file)
@@ -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,
index 18d58b5d13748157bf993992edadd682064a0449..a30282bdccd9f808c269c49ef70dca9ff6bf7b37 100644 (file)
@@ -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);
index b705dfcf34ba06b1a72743d31944e74f593e750d..93890143fae5ce1cf94ae9177081e8be28f58f7f 100644 (file)
@@ -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,
index 127c9744d820a332e0df79dbfd0c1635bde41ddd..b13e08a4302e795a29ac334e829761039bb0e2f4 100644 (file)
@@ -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{
index f19720ceb91a165ae5b963de7cd67b85b8a0a06e..5d816d928a9eb537b6b384d4a34ad2f781b15e50 100644 (file)
@@ -141,7 +141,7 @@ TEST_F(CanonicalRecognitionApproxTest, ConicalSurfaceRecognition_A3)
 {
   // Create conical face: cone with half angle 30 degrees
   const Standard_Real         aHalfAngle = M_PI / 6.0; // 30 degrees
-  gp_Ax2                      aAxis(gp_Pnt(0, 0, 0), gp_Dir(0, 0, 1));
+  gp_Ax2                      aAxis(gp_Pnt(0, 0, 0), gp_Dir(gp_Dir::D::Z));
   Handle(Geom_ConicalSurface) aConeSurf = new Geom_ConicalSurface(aAxis, aHalfAngle, 2.0);
   BRepBuilderAPI_MakeFace     aFaceMaker(aConeSurf, 0, 2 * M_PI, 0, 3, Precision::Confusion());
 
@@ -167,7 +167,7 @@ TEST_F(CanonicalRecognitionApproxTest, ConicalSurfaceRecognition_A3)
 TEST_F(CanonicalRecognitionApproxTest, SphericalSurfaceRecognition_A4)
 {
   // Create spherical face
-  gp_Ax2                        aAxis(gp_Pnt(0, 0, 0), gp_Dir(0, 0, 1));
+  gp_Ax2                        aAxis(gp_Pnt(0, 0, 0), gp_Dir(gp_Dir::D::Z));
   Handle(Geom_SphericalSurface) aSphereSurf = new Geom_SphericalSurface(aAxis, 1.0);
   BRepBuilderAPI_MakeFace aFaceMaker(aSphereSurf, 0, 2 * M_PI, 0, M_PI / 2, Precision::Confusion());
 
@@ -262,7 +262,7 @@ TEST_F(CanonicalRecognitionBaseCurveTest, BezierToCircleRecognition_A2)
 TEST_F(CanonicalRecognitionBaseCurveTest, EllipseToEllipseRecognition_A3)
 {
   // Create ellipse with major radius 1, minor radius 0.5
-  gp_Ax2               aAxis(gp_Pnt(0, 0, 0), gp_Dir(0, 0, 1), gp_Dir(1, 0, 0));
+  gp_Ax2               aAxis(gp_Pnt(0, 0, 0), gp_Dir(gp_Dir::D::Z), gp_Dir(gp_Dir::D::X));
   Handle(Geom_Ellipse) aEllipse = new Geom_Ellipse(aAxis, 1.0, 0.5);
 
   // Convert to B-spline curve
@@ -322,7 +322,7 @@ TEST_F(CanonicalRecognitionBaseCurveTest, MultiSegmentWireToLineRecognition_A4)
 TEST_F(CanonicalRecognitionBaseCurveTest, MultiSegmentCircleWireRecognition_A5)
 {
   // Create circle and convert to B-spline
-  gp_Ax2              aAxis(gp_Pnt(0, 0, 0), gp_Dir(0, 0, 1));
+  gp_Ax2              aAxis(gp_Pnt(0, 0, 0), gp_Dir(gp_Dir::D::Z));
   Handle(Geom_Circle) aCircle = new Geom_Circle(aAxis, 1.0);
 
   // Convert to B-spline curve
@@ -358,7 +358,7 @@ TEST_F(CanonicalRecognitionBaseCurveTest, MultiSegmentCircleWireRecognition_A5)
 TEST_F(CanonicalRecognitionBaseCurveTest, MultiSegmentEllipseWireRecognition_A6)
 {
   // Create ellipse and convert to B-spline
-  gp_Ax2               aAxis(gp_Pnt(0, 0, 0), gp_Dir(0, 0, 1), gp_Dir(1, 0, 0));
+  gp_Ax2               aAxis(gp_Pnt(0, 0, 0), gp_Dir(gp_Dir::D::Z), gp_Dir(gp_Dir::D::X));
   Handle(Geom_Ellipse) aEllipse = new Geom_Ellipse(aAxis, 1.0, 0.5);
 
   // Convert to B-spline curve
@@ -440,7 +440,7 @@ TEST_F(CanonicalRecognitionBaseSurfaceTest, TrimmedPlaneRecognition_B1)
 TEST_F(CanonicalRecognitionBaseSurfaceTest, TrimmedCylinderRecognition_B2)
 {
   // Create cylindrical surface
-  gp_Ax2                          aAxis(gp_Pnt(0, 0, 0), gp_Dir(0, 0, 1));
+  gp_Ax2                          aAxis(gp_Pnt(0, 0, 0), gp_Dir(gp_Dir::D::Z));
   Handle(Geom_CylindricalSurface) aCylSurf = new Geom_CylindricalSurface(aAxis, 1.0);
 
   // Create face from cylinder
@@ -467,7 +467,7 @@ TEST_F(CanonicalRecognitionBaseSurfaceTest, TrimmedConeRecognition_B3)
 {
   // Create conical surface (30 degree half-angle)
   const Standard_Real         aSemiAngle = M_PI / 6.0; // 30 degrees
-  gp_Ax2                      aAxis(gp_Pnt(0, 0, 0), gp_Dir(0, 0, 1));
+  gp_Ax2                      aAxis(gp_Pnt(0, 0, 0), gp_Dir(gp_Dir::D::Z));
   Handle(Geom_ConicalSurface) aConeSurf = new Geom_ConicalSurface(aAxis, aSemiAngle, 0);
 
   // Create face from cone
@@ -493,7 +493,7 @@ TEST_F(CanonicalRecognitionBaseSurfaceTest, TrimmedConeRecognition_B3)
 TEST_F(CanonicalRecognitionBaseSurfaceTest, ConvertedSphereRecognition_B4)
 {
   // Create spherical surface and convert to B-spline
-  gp_Ax2                        aAxis(gp_Pnt(0, 0, 0), gp_Dir(0, 0, 1));
+  gp_Ax2                        aAxis(gp_Pnt(0, 0, 0), gp_Dir(gp_Dir::D::Z));
   Handle(Geom_SphericalSurface) aSphereSurf = new Geom_SphericalSurface(aAxis, 1.0);
 
   // Convert to B-spline surface
@@ -559,7 +559,7 @@ TEST_F(CanonicalRecognitionBaseSurfaceTest, SewnPlanarSurfaceRecognition_B5)
 TEST_F(CanonicalRecognitionBaseSurfaceTest, SewnCylindricalSurfaceRecognition_B6)
 {
   // Create 4 cylindrical face segments to be sewn together
-  gp_Ax2                          aAxis(gp_Pnt(0, 0, 0), gp_Dir(0, 0, 1));
+  gp_Ax2                          aAxis(gp_Pnt(0, 0, 0), gp_Dir(gp_Dir::D::Z));
   Handle(Geom_CylindricalSurface) aCylSurf = new Geom_CylindricalSurface(aAxis, 1.0);
 
   BRepBuilderAPI_MakeFace aFaceMaker1(aCylSurf, 0, 3, -1, 0, Precision::Confusion());
@@ -601,7 +601,7 @@ TEST_F(CanonicalRecognitionBaseSurfaceTest, SewnConicalSurfaceRecognition_B7)
 {
   // Create 4 conical face segments to be sewn together
   const Standard_Real         aSemiAngle = M_PI / 6.0; // 30 degrees
-  gp_Ax2                      aAxis(gp_Pnt(0, 0, 0), gp_Dir(0, 0, 1));
+  gp_Ax2                      aAxis(gp_Pnt(0, 0, 0), gp_Dir(gp_Dir::D::Z));
   Handle(Geom_ConicalSurface) aConeSurf = new Geom_ConicalSurface(aAxis, aSemiAngle, 0);
 
   BRepBuilderAPI_MakeFace aFaceMaker1(aConeSurf, 0, 3, 0, 1, Precision::Confusion());
@@ -642,7 +642,7 @@ TEST_F(CanonicalRecognitionBaseSurfaceTest, SewnConicalSurfaceRecognition_B7)
 TEST_F(CanonicalRecognitionBaseSurfaceTest, SewnSphericalSurfaceRecognition_B8)
 {
   // Create 4 spherical face segments to be sewn together, converted to B-spline
-  gp_Ax2                        aAxis(gp_Pnt(0, 0, 0), gp_Dir(0, 0, 1));
+  gp_Ax2                        aAxis(gp_Pnt(0, 0, 0), gp_Dir(gp_Dir::D::Z));
   Handle(Geom_SphericalSurface) aSphereSurf = new Geom_SphericalSurface(aAxis, 1.0);
 
   // Convert to B-spline surface
@@ -681,7 +681,7 @@ TEST_F(CanonicalRecognitionBaseSurfaceTest, SewnSphericalSurfaceRecognition_B8)
 TEST_F(CanonicalRecognitionBaseSurfaceTest, ComplexCylindricalRecognitionWithSection_B9)
 {
   // Create 4 cylindrical face segments and sew them together
-  gp_Ax2                          aAxis(gp_Pnt(0, 0, 0), gp_Dir(0, 0, 1));
+  gp_Ax2                          aAxis(gp_Pnt(0, 0, 0), gp_Dir(gp_Dir::D::Z));
   Handle(Geom_CylindricalSurface) aCylSurf = new Geom_CylindricalSurface(aAxis, 1.0);
 
   // Create 4 face segments with parameter ranges matching the original test
@@ -726,7 +726,7 @@ TEST_F(CanonicalRecognitionBaseSurfaceTest, ComplexCylindricalRecognitionWithSec
 TEST_F(CanonicalRecognitionBaseSurfaceTest, ExtrudedCylindricalSurfaceRecognition_B10)
 {
   // Create cylindrical surface (radius 1)
-  gp_Ax2                          aAxis(gp_Pnt(0, 0, 0), gp_Dir(0, 0, 1));
+  gp_Ax2                          aAxis(gp_Pnt(0, 0, 0), gp_Dir(gp_Dir::D::Z));
   Handle(Geom_CylindricalSurface) aCylSurf = new Geom_CylindricalSurface(aAxis, 1.0);
 
   // Create plane for intersection: plane at origin with normal (1, 0, 1) normalized
@@ -745,7 +745,7 @@ TEST_F(CanonicalRecognitionBaseSurfaceTest, ExtrudedCylindricalSurfaceRecognitio
   ASSERT_FALSE(anIntCurve.IsNull()) << "Intersection curve is null";
 
   // Create a surface of linear extrusion from the intersection curve
-  gp_Dir                                anExtrusionDir(0, 0, 1);
+  gp_Dir                                anExtrusionDir(gp_Dir::D::Z);
   Handle(Geom_SurfaceOfLinearExtrusion) anExtSurf =
     new Geom_SurfaceOfLinearExtrusion(anIntCurve, anExtrusionDir);
 
index da7624b0543915f5257696d4804e8e8adfa3eefc..8104574bbca3894b0860f54e9cded85795b95b26 100644 (file)
@@ -585,7 +585,7 @@ Handle(Geom2d_Curve) ShapeBuild_Edge::TransformPCurve(const Handle(Geom2d_Curve)
     Handle(Geom2d_BSplineCurve) aBSpline2d;
     if (result->IsKind(STANDARD_TYPE(Geom2d_Conic)))
     {
-      // gp_Pln pln(gp_Pnt(0,0,0),gp_Dir(0,0,1));
+      // gp_Pln pln(gp_Pnt(0,0,0),gp_Dir(gp_Dir::D::Z));
       // Handle(Geom_Curve) curve = GeomAPI::To3d(result,pln);
       // clang-format off
       Handle(Geom2d_Curve) tcurve = new Geom2d_TrimmedCurve(result,aFirst,aLast); //protection against parabols ets
index 0a498cebc739193eb052c699c3c6f13bffc58f88..d7c5ebf67b755f417725584d87777c7573bf3f47 100644 (file)
@@ -2031,7 +2031,7 @@ void ShapeFix_ComposeShell::SplitByGrid(ShapeFix_SequenceOfWireSegment& seqw)
     // clang-format off
     gp_Pnt2d pos ( myGrid->UJointValue(i), 0. ); // 0. - for infinite ranges: myGrid->VJointValue(1) ;
     // clang-format on
-    gp_Lin2d line(pos, gp_Dir2d(0., 1.));
+    gp_Lin2d line(pos, gp_Dir2d(gp_Dir2d::D::Y));
     if (!myClosedMode && myUClosed)
     {
       Standard_Real period = Umax - Umin;
@@ -2053,7 +2053,7 @@ void ShapeFix_ComposeShell::SplitByGrid(ShapeFix_SequenceOfWireSegment& seqw)
   for (i = (myVClosed ? 1 : 2); i <= myGrid->NbVPatches(); i++)
   {
     gp_Pnt2d pos(0., myGrid->VJointValue(i));
-    gp_Lin2d line(pos, gp_Dir2d(1., 0.));
+    gp_Lin2d line(pos, gp_Dir2d(gp_Dir2d::D::X));
     if (!myClosedMode && myVClosed)
     {
       Standard_Real period = Vmax - Vmin;
index b56c7d03ec481118e2bdcc852206535009ff8b30..6f1844a3b64d4be1150c76c3be0f1e3f7fecc1be 100644 (file)
@@ -140,8 +140,8 @@ Standard_Boolean ShapeFix_EdgeProjAux::IsIso(const Handle(Geom2d_Curve)& /*theCu
       Handle(Geom2d_Line) theLine2d = Handle(Geom2d_Line)::DownCast(theCurve2d);
       gp_Dir2d theDir2d = theLine2d->Direction();
 
-      gp_Dir2d dir1(0.,1.);
-      gp_Dir2d dir2(0.,-1.);
+      gp_Dir2d dir1(gp_Dir2d::D::Y);
+      gp_Dir2d dir2(gp_Dir2d::D::NY);
 
       return (theDir2d.IsEqual(dir1,Precision::Angular()) ||
           theDir2d.IsEqual(dir2,Precision::Angular()) ||
index acee21dbaf8de1af2a2b7f1490032ca7a3e8ffb8..0286d5afd89dab5987dd41df7447c397a32f40c3 100644 (file)
@@ -2853,7 +2853,7 @@ Standard_Boolean ShapeFix_Face::FixPeriodicDegenerated()
   // Apex curve below the wire
   if (anApexV < aMinLoopV)
   {
-    anApexCurve2d = new Geom2d_Line(gp_Pnt2d(aMinLoopU, anApexV), gp_Dir2d(1, 0));
+    anApexCurve2d = new Geom2d_Line(gp_Pnt2d(aMinLoopU, anApexV), gp_Dir2d(gp_Dir2d::D::X));
     if (!isUDecrease)
       aSoleWire.Reverse();
   }
@@ -2861,7 +2861,7 @@ Standard_Boolean ShapeFix_Face::FixPeriodicDegenerated()
   // Apex curve above the wire
   if (anApexV > aMaxLoopV)
   {
-    anApexCurve2d = new Geom2d_Line(gp_Pnt2d(aMaxLoopU, anApexV), gp_Dir2d(-1, 0));
+    anApexCurve2d = new Geom2d_Line(gp_Pnt2d(aMaxLoopU, anApexV), gp_Dir2d(gp_Dir2d::D::NX));
     if (isUDecrease)
       aSoleWire.Reverse();
   }
index eddea48d7914bcdc0caa6cf3373d96db067e035e..6824376cfae3211bddda7d314fdbb010eb6fb1ea 100644 (file)
@@ -2012,7 +2012,7 @@ static Standard_Boolean RemoveLoop(TopoDS_Edge&                      E,
 
   // direct construction causes error on osf system.
   gp_Pnt p(0, 0, 0);
-  gp_Dir d(0, 0, 1);
+  gp_Dir d(gp_Dir::D::Z);
   gp_Ax3 ax(p, d);
   gp_Pln Pln(ax);
 
index 6bca83da0dfe21fb0a611c8e0ba803c682f01b35..995f7b995baa5f469925992a02faf80d04cf9d2b 100644 (file)
@@ -87,28 +87,28 @@ static Handle(Geom2d_Curve) Get2DCurve(const Standard_Integer theIndex,
     switch (theIndex)
     {
       case 0:
-        a2dCurv =
-          new Geom2d_TrimmedCurve(new Geom2d_Line(gp_Pnt2d(0.0, theVfirst), gp_Dir2d(1.0, 0.0)),
-                                  theUfirst,
-                                  theUlast);
+        a2dCurv = new Geom2d_TrimmedCurve(
+          new Geom2d_Line(gp_Pnt2d(0.0, theVfirst), gp_Dir2d(gp_Dir2d::D::X)),
+          theUfirst,
+          theUlast);
         break;
       case 1:
-        a2dCurv =
-          new Geom2d_TrimmedCurve(new Geom2d_Line(gp_Pnt2d(theUlast, 0.0), gp_Dir2d(0.0, 1.0)),
-                                  theVfirst,
-                                  theVlast);
+        a2dCurv = new Geom2d_TrimmedCurve(
+          new Geom2d_Line(gp_Pnt2d(theUlast, 0.0), gp_Dir2d(gp_Dir2d::D::Y)),
+          theVfirst,
+          theVlast);
         break;
       case 2:
-        a2dCurv =
-          new Geom2d_TrimmedCurve(new Geom2d_Line(gp_Pnt2d(0.0, theVlast), gp_Dir2d(1.0, 0.0)),
-                                  theUfirst,
-                                  theUlast);
+        a2dCurv = new Geom2d_TrimmedCurve(
+          new Geom2d_Line(gp_Pnt2d(0.0, theVlast), gp_Dir2d(gp_Dir2d::D::X)),
+          theUfirst,
+          theUlast);
         break;
       case 3:
-        a2dCurv =
-          new Geom2d_TrimmedCurve(new Geom2d_Line(gp_Pnt2d(theUfirst, 0.0), gp_Dir2d(0.0, 1.0)),
-                                  theVfirst,
-                                  theVlast);
+        a2dCurv = new Geom2d_TrimmedCurve(
+          new Geom2d_Line(gp_Pnt2d(theUfirst, 0.0), gp_Dir2d(gp_Dir2d::D::Y)),
+          theVfirst,
+          theVlast);
         break;
       default:
         break;
@@ -120,25 +120,25 @@ static Handle(Geom2d_Curve) Get2DCurve(const Standard_Integer theIndex,
     {
       case 0:
         a2dCurv = new Geom2d_TrimmedCurve(
-          new Geom2d_Line(gp_Pnt2d(theUfirst + theUlast, theVfirst), gp_Dir2d(-1.0, 0.0)),
+          new Geom2d_Line(gp_Pnt2d(theUfirst + theUlast, theVfirst), gp_Dir2d(gp_Dir2d::D::NX)),
           theUfirst,
           theUlast);
         break;
       case 1:
         a2dCurv = new Geom2d_TrimmedCurve(
-          new Geom2d_Line(gp_Pnt2d(theUlast, theVfirst + theVlast), gp_Dir2d(0.0, -1.0)),
+          new Geom2d_Line(gp_Pnt2d(theUlast, theVfirst + theVlast), gp_Dir2d(gp_Dir2d::D::NY)),
           theVfirst,
           theVlast);
         break;
       case 2:
         a2dCurv = new Geom2d_TrimmedCurve(
-          new Geom2d_Line(gp_Pnt2d(theUfirst + theUlast, theVlast), gp_Dir2d(-1.0, 0.0)),
+          new Geom2d_Line(gp_Pnt2d(theUfirst + theUlast, theVlast), gp_Dir2d(gp_Dir2d::D::NX)),
           theUfirst,
           theUlast);
         break;
       case 3:
         a2dCurv = new Geom2d_TrimmedCurve(
-          new Geom2d_Line(gp_Pnt2d(theUfirst, theVfirst + theVlast), gp_Dir2d(0.0, -1.0)),
+          new Geom2d_Line(gp_Pnt2d(theUfirst, theVfirst + theVlast), gp_Dir2d(gp_Dir2d::D::NY)),
           theVfirst,
           theVlast);
         break;
index a2c37c51572c91dadb77858491eddafa8f2ec65c..2ec75d68afe3dc50f464b44e3030a6d963703475 100644 (file)
@@ -268,7 +268,7 @@ Standard_Boolean BRepClass_FaceExplorer::OtherSegment(const gp_Pnt2d& P,
 
   // nothing found, return an horizontal line
   Par = RealLast();
-  L   = gp_Lin2d(P, gp_Dir2d(1, 0));
+  L   = gp_Lin2d(P, gp_Dir2d(gp_Dir2d::D::X));
 
   return Standard_False;
 }
index f8f58e7ddb7270a4f471c737fe6e5252ea909497..a62e9987a01f26cf1256dc41345453d09c627260 100644 (file)
@@ -612,13 +612,13 @@ void BRepLib_MakeFace::Init(const Handle(Geom_Surface)& SS,
   // make the lines
   Handle(Geom2d_Line) Lumin, Lumax, Lvmin, Lvmax;
   if (!umininf)
-    Lumin = new Geom2d_Line(gp_Pnt2d(UMin, 0), gp_Dir2d(0, 1));
+    Lumin = new Geom2d_Line(gp_Pnt2d(UMin, 0), gp_Dir2d(gp_Dir2d::D::Y));
   if (!umaxinf)
-    Lumax = new Geom2d_Line(gp_Pnt2d(UMax, 0), gp_Dir2d(0, 1));
+    Lumax = new Geom2d_Line(gp_Pnt2d(UMax, 0), gp_Dir2d(gp_Dir2d::D::Y));
   if (!vmininf)
-    Lvmin = new Geom2d_Line(gp_Pnt2d(0, VMin), gp_Dir2d(1, 0));
+    Lvmin = new Geom2d_Line(gp_Pnt2d(0, VMin), gp_Dir2d(gp_Dir2d::D::X));
   if (!vmaxinf)
-    Lvmax = new Geom2d_Line(gp_Pnt2d(0, VMax), gp_Dir2d(1, 0));
+    Lvmax = new Geom2d_Line(gp_Pnt2d(0, VMax), gp_Dir2d(gp_Dir2d::D::X));
 
   // make the face
   TopoDS_Face& F = TopoDS::Face(myShape);
index 3f4191bf8337932bac1bbcca00a40c6a7a6d4164..62205a3613f9ee64d26caa8131b3238cdda05bbf 100644 (file)
@@ -104,7 +104,7 @@ void BRepLib_MakeShell::Init(const Handle(Geom_Surface)& S,
   Standard_Integer iu, iv;
 
   GS.UIntervals(upars, GeomAbs_C2);
-  gp_Dir2d dv(0, 1);
+  gp_Dir2d dv(gp_Dir2d::D::Y);
   for (iu = 1; iu <= nu + 1; iu++)
   {
     Standard_Real u = upars(iu);
@@ -113,7 +113,7 @@ void BRepLib_MakeShell::Init(const Handle(Geom_Surface)& S,
   }
 
   GS.VIntervals(vpars, GeomAbs_C2);
-  gp_Dir2d du(1, 0);
+  gp_Dir2d du(gp_Dir2d::D::X);
   for (iv = 1; iv <= nv + 1; iv++)
   {
     Standard_Real v = vpars(iv);
index fed74f8934dd9ffd83f0f4d42b8db5a7004f9a7b..2edde1662508bebfa2787cc5beb41000648e2906 100644 (file)
@@ -373,7 +373,7 @@ void Bisector_BisecAna::Perform(const Handle(Geom2d_Curve)& afirstcurve,
         else
         {
           // radius is equal to 0. No matter what direction to chose.
-          line = gp_Lin2d(circle1.Location(), gp_Dir2d(1., 0.));
+          line = gp_Lin2d(circle1.Location(), gp_Dir2d(gp_Dir2d::D::X));
         }
         //  Modified by skv - Fri Jul  1 16:23:32 2005 IDEM(Airbus) End
         Handle(GccInt_Bisec) solution = new GccInt_BLine(line);
index ffdf3e7546e94655c639f2d11e9e80a7e6ca65c1..bd3c00bc40ac9ff76c40df817a8e36289b98309f 100644 (file)
@@ -345,7 +345,7 @@ static Standard_IStream& operator>>(Standard_IStream& IS, gp_Dir2d& D)
 static Standard_IStream& operator>>(Standard_IStream& IS, Handle(Geom2d_Line)& L)
 {
   gp_Pnt2d P(0., 0.);
-  gp_Dir2d AX(1., 0.);
+  gp_Dir2d AX(gp_Dir2d::D::X);
   IS >> P >> AX;
   L = new Geom2d_Line(P, AX);
   return IS;
@@ -356,7 +356,7 @@ static Standard_IStream& operator>>(Standard_IStream& IS, Handle(Geom2d_Line)& L
 static Standard_IStream& operator>>(Standard_IStream& IS, Handle(Geom2d_Circle)& C)
 {
   gp_Pnt2d      P(0., 0.);
-  gp_Dir2d      AX(1., 0.), AY(1., 0.);
+  gp_Dir2d      AX(gp_Dir2d::D::X), AY(gp_Dir2d::D::X);
   Standard_Real R = 0.;
   IS >> P >> AX >> AY;
   BinTools::GetReal(IS, R);
@@ -369,7 +369,7 @@ static Standard_IStream& operator>>(Standard_IStream& IS, Handle(Geom2d_Circle)&
 static Standard_IStream& operator>>(Standard_IStream& IS, Handle(Geom2d_Ellipse)& E)
 {
   gp_Pnt2d      P(0., 0.);
-  gp_Dir2d      AX(1., 0.), AY(1., 0.);
+  gp_Dir2d      AX(gp_Dir2d::D::X), AY(gp_Dir2d::D::X);
   Standard_Real R1 = 0., R2 = 0.;
   IS >> P >> AX >> AY;
   BinTools::GetReal(IS, R1);
@@ -383,7 +383,7 @@ static Standard_IStream& operator>>(Standard_IStream& IS, Handle(Geom2d_Ellipse)
 static Standard_IStream& operator>>(Standard_IStream& IS, Handle(Geom2d_Parabola)& C)
 {
   gp_Pnt2d      P(0., 0.);
-  gp_Dir2d      AX(1., 0.), AY(1., 0.);
+  gp_Dir2d      AX(gp_Dir2d::D::X), AY(gp_Dir2d::D::X);
   Standard_Real R1 = 0.;
   IS >> P >> AX >> AY;
   BinTools::GetReal(IS, R1);
@@ -396,7 +396,7 @@ static Standard_IStream& operator>>(Standard_IStream& IS, Handle(Geom2d_Parabola
 static Standard_IStream& operator>>(Standard_IStream& IS, Handle(Geom2d_Hyperbola)& H)
 {
   gp_Pnt2d      P(0., 0.);
-  gp_Dir2d      AX(1., 0.), AY(1., 0.);
+  gp_Dir2d      AX(gp_Dir2d::D::X), AY(gp_Dir2d::D::X);
   Standard_Real R1 = 0., R2 = 0.;
   IS >> P >> AX >> AY;
   BinTools::GetReal(IS, R1);
index 09d0035cb5014f7f971c341c0e042f6ae51b5641..fff94030d7419cfb6acf6af9c3424e321cb658e2 100644 (file)
@@ -355,7 +355,7 @@ static Standard_IStream& operator>>(Standard_IStream& IS, gp_Dir& D)
 static Standard_IStream& operator>>(Standard_IStream& IS, Handle(Geom_Line)& L)
 {
   gp_Pnt P(0., 0., 0.);
-  gp_Dir AX(1., 0., 0.);
+  gp_Dir AX(gp_Dir::D::X);
   IS >> P >> AX;
   L = new Geom_Line(P, AX);
   return IS;
@@ -366,7 +366,7 @@ static Standard_IStream& operator>>(Standard_IStream& IS, Handle(Geom_Line)& L)
 static Standard_IStream& operator>>(Standard_IStream& IS, Handle(Geom_Circle)& C)
 {
   gp_Pnt        P(0., 0., 0.);
-  gp_Dir        A(1., 0., 0.), AX(1., 0., 0.), AY(1., 0., 0.);
+  gp_Dir        A(gp_Dir::D::X), AX(gp_Dir::D::X), AY(gp_Dir::D::X);
   Standard_Real R = 0.;
   IS >> P >> A >> AX >> AY;
   BinTools::GetReal(IS, R);
@@ -379,7 +379,7 @@ static Standard_IStream& operator>>(Standard_IStream& IS, Handle(Geom_Circle)& C
 static Standard_IStream& operator>>(Standard_IStream& IS, Handle(Geom_Ellipse)& E)
 {
   gp_Pnt        P(0., 0., 0.);
-  gp_Dir        A(1., 0., 0.), AX(1., 0., 0.), AY(1., 0., 0.);
+  gp_Dir        A(gp_Dir::D::X), AX(gp_Dir::D::X), AY(gp_Dir::D::X);
   Standard_Real R1 = 0., R2 = 0.;
   IS >> P >> A >> AX >> AY;
   BinTools::GetReal(IS, R1);
@@ -393,7 +393,7 @@ static Standard_IStream& operator>>(Standard_IStream& IS, Handle(Geom_Ellipse)&
 static Standard_IStream& operator>>(Standard_IStream& IS, Handle(Geom_Parabola)& C)
 {
   gp_Pnt        P(0., 0., 0.);
-  gp_Dir        A(1., 0., 0.), AX(1., 0., 0.), AY(1., 0., 0.);
+  gp_Dir        A(gp_Dir::D::X), AX(gp_Dir::D::X), AY(gp_Dir::D::X);
   Standard_Real R1 = 0.;
   IS >> P >> A >> AX >> AY;
   BinTools::GetReal(IS, R1);
@@ -406,7 +406,7 @@ static Standard_IStream& operator>>(Standard_IStream& IS, Handle(Geom_Parabola)&
 static Standard_IStream& operator>>(Standard_IStream& IS, Handle(Geom_Hyperbola)& H)
 {
   gp_Pnt        P(0., 0., 0.);
-  gp_Dir        A(1., 0., 0.), AX(1., 0., 0.), AY(1., 0., 0);
+  gp_Dir        A(gp_Dir::D::X), AX(gp_Dir::D::X), AY(gp_Dir::D::X);
   Standard_Real R1 = 0., R2 = 0.;
   IS >> P >> A >> AX >> AY;
   BinTools::GetReal(IS, R1);
@@ -513,7 +513,7 @@ static Standard_IStream& operator>>(Standard_IStream& IS, Handle(Geom_OffsetCurv
 {
   Standard_Real p = 0.;
   BinTools::GetReal(IS, p); // Offset
-  gp_Dir D(1., 0., 0.);
+  gp_Dir D(gp_Dir::D::X);
   IS >> D;
   Handle(Geom_Curve) BC;
   BinTools_CurveSet::ReadCurve(IS, BC);
index 52e9aee2b737d9ac35b641b5a44b9131fef6e14d..076ea6fa9df0c47147db0f5a97e6ad3097fff30f 100644 (file)
@@ -425,7 +425,7 @@ static Standard_IStream& operator>>(Standard_IStream& IS, gp_Dir& D)
 static Standard_IStream& operator>>(Standard_IStream& IS, gp_Ax3& A3)
 {
   gp_Pnt P(0., 0., 0.);
-  gp_Dir A(1., 0., 0.), AX(1., 0., 0.), AY(1., 0., 0.);
+  gp_Dir A(gp_Dir::D::X), AX(gp_Dir::D::X), AY(gp_Dir::D::X);
   IS >> P >> A >> AX >> AY;
   gp_Ax3 ax3(P, A, AX);
   if (AY.DotCross(A, AX) < 0)
@@ -516,7 +516,7 @@ static Standard_IStream& operator>>(Standard_IStream& IS, Handle(Geom_ToroidalSu
 
 static Standard_IStream& operator>>(Standard_IStream& IS, Handle(Geom_SurfaceOfLinearExtrusion)& S)
 {
-  gp_Dir             D(1., 0., 0.);
+  gp_Dir             D(gp_Dir::D::X);
   Handle(Geom_Curve) C;
   IS >> D;
   BinTools_CurveSet::ReadCurve(IS, C);
@@ -532,7 +532,7 @@ static Standard_IStream& operator>>(Standard_IStream& IS, Handle(Geom_SurfaceOfL
 static Standard_IStream& operator>>(Standard_IStream& IS, Handle(Geom_SurfaceOfRevolution)& S)
 {
   gp_Pnt             P(0., 0., 0.);
-  gp_Dir             D(1., 0., 0.);
+  gp_Dir             D(gp_Dir::D::X);
   Handle(Geom_Curve) C;
   IS >> P >> D;
   BinTools_CurveSet::ReadCurve(IS, C);
index 362122c37c6566b24e66c94c126c1b9a67774b3d..1807dec8269ecbc26d618494907672da5905b920 100644 (file)
@@ -26,7 +26,7 @@ protected:
   void SetUp() override
   {
     // Create a circle as basis curve
-    gp_Circ2d             aCircle(gp_Ax2d(gp_Pnt2d(0, 0), gp_Dir2d(1, 0)), 5.0);
+    gp_Circ2d             aCircle(gp_Ax2d(gp_Pnt2d(0, 0), gp_Dir2d(gp_Dir2d::D::X)), 5.0);
     Handle(Geom2d_Circle) aBasisCurve = new Geom2d_Circle(aCircle);
 
     // Create offset curve
index 24e5d9f93f1450ea2424149e35ac6d7c57a65484..824f01fd34bc8bb7fb93ecbe3063eb520052798e 100644 (file)
@@ -91,10 +91,10 @@ void Adaptor3d_TopolTool::Initialize(const Handle(Adaptor3d_Surface)& S)
       psup = myInfinite;
     }
 
-    // Line2dPtr = new Adaptor2d_Line2d(gp_Pnt2d(0.,Vinf),gp_Dir2d(1.,0.),pinf,psup);
+    // Line2dPtr = new Adaptor2d_Line2d(gp_Pnt2d(0.,Vinf),gp_Dir2d(gp_Dir2d::D::X),pinf,psup);
     // myRestr[nbRestr] = new Adaptor2d_Line2d(*Line2dPtr);
-    myRestr[nbRestr] =
-      new Adaptor2d_Line2d(Adaptor2d_Line2d(gp_Pnt2d(0., Vinf), gp_Dir2d(1., 0.), pinf, psup));
+    myRestr[nbRestr] = new Adaptor2d_Line2d(
+      Adaptor2d_Line2d(gp_Pnt2d(0., Vinf), gp_Dir2d(gp_Dir2d::D::X), pinf, psup));
     nbRestr++;
   }
 
@@ -117,10 +117,10 @@ void Adaptor3d_TopolTool::Initialize(const Handle(Adaptor3d_Surface)& S)
       psup = myInfinite;
     }
 
-    // Line2dPtr = new Adaptor2d_Line2d(gp_Pnt2d(Usup,0.),gp_Dir2d(0.,1.),pinf,psup);
+    // Line2dPtr = new Adaptor2d_Line2d(gp_Pnt2d(Usup,0.),gp_Dir2d(gp_Dir2d::D::Y),pinf,psup);
     // myRestr[nbRestr] = new Adaptor2d_Line2d(*Line2dPtr);
-    myRestr[nbRestr] =
-      new Adaptor2d_Line2d(Adaptor2d_Line2d(gp_Pnt2d(Usup, 0.), gp_Dir2d(0., 1.), pinf, psup));
+    myRestr[nbRestr] = new Adaptor2d_Line2d(
+      Adaptor2d_Line2d(gp_Pnt2d(Usup, 0.), gp_Dir2d(gp_Dir2d::D::Y), pinf, psup));
     nbRestr++;
   }
 
@@ -143,10 +143,10 @@ void Adaptor3d_TopolTool::Initialize(const Handle(Adaptor3d_Surface)& S)
       psup = myInfinite;
     }
 
-    // Line2dPtr = new Adaptor2d_Line2d(gp_Pnt2d(0.,Vsup),gp_Dir2d(-1.,0.),pinf,psup);
+    // Line2dPtr = new Adaptor2d_Line2d(gp_Pnt2d(0.,Vsup),gp_Dir2d(gp_Dir2d::D::NX),pinf,psup);
     // myRestr[nbRestr] = new Adaptor2d_Line2d(*Line2dPtr);
-    myRestr[nbRestr] =
-      new Adaptor2d_Line2d(Adaptor2d_Line2d(gp_Pnt2d(0., Vsup), gp_Dir2d(-1., 0.), pinf, psup));
+    myRestr[nbRestr] = new Adaptor2d_Line2d(
+      Adaptor2d_Line2d(gp_Pnt2d(0., Vsup), gp_Dir2d(gp_Dir2d::D::NX), pinf, psup));
     nbRestr++;
   }
 
@@ -169,10 +169,10 @@ void Adaptor3d_TopolTool::Initialize(const Handle(Adaptor3d_Surface)& S)
       psup = myInfinite;
     }
 
-    // Line2dPtr = new Adaptor2d_Line2d(gp_Pnt2d(Uinf,0.),gp_Dir2d(0.,-1),pinf,psup);
+    // Line2dPtr = new Adaptor2d_Line2d(gp_Pnt2d(Uinf,0.),gp_Dir2d(gp_Dir2d::D::NY),pinf,psup);
     // myRestr[nbRestr] = new Adaptor2d_Line2d(*Line2dPtr);
-    myRestr[nbRestr] =
-      new Adaptor2d_Line2d(Adaptor2d_Line2d(gp_Pnt2d(Uinf, 0.), gp_Dir2d(0., -1), pinf, psup));
+    myRestr[nbRestr] = new Adaptor2d_Line2d(
+      Adaptor2d_Line2d(gp_Pnt2d(Uinf, 0.), gp_Dir2d(gp_Dir2d::D::NY), pinf, psup));
     nbRestr++;
   }
 
@@ -200,10 +200,10 @@ void Adaptor3d_TopolTool::Initialize(const Handle(Adaptor3d_Surface)& S)
       psup = myInfinite;
     }
 
-    // Line2dPtr = new Adaptor2d_Line2d(gp_Pnt2d(U,V),gp_Dir2d(1.,0.),pinf,psup);
+    // Line2dPtr = new Adaptor2d_Line2d(gp_Pnt2d(U,V),gp_Dir2d(gp_Dir2d::D::X),pinf,psup);
     // myRestr[nbRestr] = new Adaptor2d_Line2d(*Line2dPtr);
     myRestr[nbRestr] =
-      new Adaptor2d_Line2d(Adaptor2d_Line2d(gp_Pnt2d(U, V), gp_Dir2d(1., 0.), pinf, psup));
+      new Adaptor2d_Line2d(Adaptor2d_Line2d(gp_Pnt2d(U, V), gp_Dir2d(gp_Dir2d::D::X), pinf, psup));
     nbRestr++;
   }
 }
index 0de247ebe3b3ef98a1c7a1570f44c5d4e025af1c..e48bc82ad401b3b236ee7df3cddcc1eada4cf70b 100644 (file)
@@ -26,11 +26,11 @@ protected:
   void SetUp() override
   {
     // Create a circle as basis curve
-    gp_Circ             aCircle(gp_Ax2(gp_Pnt(0, 0, 0), gp_Dir(0, 0, 1)), 5.0);
+    gp_Circ             aCircle(gp_Ax2(gp_Pnt(0, 0, 0), gp_Dir(gp_Dir::D::Z)), 5.0);
     Handle(Geom_Circle) aBasisCurve = new Geom_Circle(aCircle);
 
     // Create offset curve
-    gp_Dir        anOffsetDir(0, 0, 1);
+    gp_Dir        anOffsetDir(gp_Dir::D::Z);
     Standard_Real anOffsetValue = 2.0;
 
     myOriginalCurve = new Geom_OffsetCurve(aBasisCurve, anOffsetValue, anOffsetDir);
index f81290296339b8ba1c8c851bd58574d7f3c2d743..78ab8fa7056391054c4a255749a13f84afb2d790 100644 (file)
@@ -26,7 +26,7 @@ protected:
   void SetUp() override
   {
     // Create a plane as basis surface
-    gp_Pln             aPlane(gp_Ax3(gp_Pnt(0, 0, 0), gp_Dir(0, 0, 1)));
+    gp_Pln             aPlane(gp_Ax3(gp_Pnt(0, 0, 0), gp_Dir(gp_Dir::D::Z)));
     Handle(Geom_Plane) aBasisSurface = new Geom_Plane(aPlane);
 
     // Create offset surface
index 5533dd9547ae6db153887c8803c488e58a37af1f..ba3079a5239f6df3feb0095ac3116b44dace5cd9 100644 (file)
@@ -238,9 +238,9 @@ void Compute(const Standard_Real theP1,
 
 static void OpenMin(const gp_Dir& V, Bnd_Box& B)
 {
-  gp_Dir OX(1., 0., 0.);
-  gp_Dir OY(0., 1., 0.);
-  gp_Dir OZ(0., 0., 1.);
+  gp_Dir OX(gp_Dir::D::X);
+  gp_Dir OY(gp_Dir::D::Y);
+  gp_Dir OZ(gp_Dir::D::Z);
   if (V.IsParallel(OX, Precision::Angular()))
     B.OpenXmin();
   else if (V.IsParallel(OY, Precision::Angular()))
@@ -257,9 +257,9 @@ static void OpenMin(const gp_Dir& V, Bnd_Box& B)
 
 static void OpenMax(const gp_Dir& V, Bnd_Box& B)
 {
-  gp_Dir OX(1., 0., 0.);
-  gp_Dir OY(0., 1., 0.);
-  gp_Dir OZ(0., 0., 1.);
+  gp_Dir OX(gp_Dir::D::X);
+  gp_Dir OY(gp_Dir::D::Y);
+  gp_Dir OZ(gp_Dir::D::Z);
   if (V.IsParallel(OX, Precision::Angular()))
     B.OpenXmax();
   else if (V.IsParallel(OY, Precision::Angular()))
@@ -276,9 +276,9 @@ static void OpenMax(const gp_Dir& V, Bnd_Box& B)
 
 static void OpenMinMax(const gp_Dir& V, Bnd_Box& B)
 {
-  gp_Dir OX(1., 0., 0.);
-  gp_Dir OY(0., 1., 0.);
-  gp_Dir OZ(0., 0., 1.);
+  gp_Dir OX(gp_Dir::D::X);
+  gp_Dir OY(gp_Dir::D::Y);
+  gp_Dir OZ(gp_Dir::D::Z);
   if (V.IsParallel(OX, Precision::Angular()))
   {
     B.OpenXmax();
@@ -307,8 +307,8 @@ static void OpenMinMax(const gp_Dir& V, Bnd_Box& B)
 
 static void OpenMin(const gp_Dir2d& V, Bnd_Box2d& B)
 {
-  gp_Dir2d OX(1., 0.);
-  gp_Dir2d OY(0., 1.);
+  gp_Dir2d OX(gp_Dir2d::D::X);
+  gp_Dir2d OY(gp_Dir2d::D::Y);
   if (V.IsParallel(OX, Precision::Angular()))
     B.OpenXmin();
   else if (V.IsParallel(OY, Precision::Angular()))
@@ -322,8 +322,8 @@ static void OpenMin(const gp_Dir2d& V, Bnd_Box2d& B)
 
 static void OpenMax(const gp_Dir2d& V, Bnd_Box2d& B)
 {
-  gp_Dir2d OX(1., 0.);
-  gp_Dir2d OY(0., 1.);
+  gp_Dir2d OX(gp_Dir2d::D::X);
+  gp_Dir2d OY(gp_Dir2d::D::Y);
   if (V.IsParallel(OX, Precision::Angular()))
     B.OpenXmax();
   else if (V.IsParallel(OY, Precision::Angular()))
@@ -337,8 +337,8 @@ static void OpenMax(const gp_Dir2d& V, Bnd_Box2d& B)
 
 static void OpenMinMax(const gp_Dir2d& V, Bnd_Box2d& B)
 {
-  gp_Dir2d OX(1., 0.);
-  gp_Dir2d OY(0., 1.);
+  gp_Dir2d OX(gp_Dir2d::D::X);
+  gp_Dir2d OY(gp_Dir2d::D::Y);
   if (V.IsParallel(OX, Precision::Angular()))
   {
     B.OpenXmax();
index 43b1c800bd145e136c14f6675c94fbec49b50a60..a5e7e5921c599a60e154a7730e34f7993584e4c3 100644 (file)
@@ -384,7 +384,7 @@ Standard_Boolean Extrema_ExtElC::PlanarLineCircleExtrema(const gp_Lin&  theLin,
   // Center of 2D-circle
   const gp_Pnt2d aPC(0.0, 0.0);
 
-  gp_Ax22d  aCircAxis(aPC, gp_Dir2d(1.0, 0.0), gp_Dir2d(0.0, 1.0));
+  gp_Ax22d  aCircAxis(aPC, gp_Dir2d(gp_Dir2d::D::X), gp_Dir2d(gp_Dir2d::D::Y));
   gp_Circ2d aCirc2d(aCircAxis, theCirc.Radius());
 
   gp_Pnt2d aPL(aVecCL.Dot(aDCx), aVecCL.Dot(aDCy));
index aba169b87fe16a1776dee6bba6eebec94a300a1e..411fd3f82f916a8c4f2e7dcb08956e1c184c37a9 100644 (file)
@@ -28,8 +28,8 @@ protected:
   {
     // Set up common geometric objects for tests
     gp_Pnt anOrigin(0, 0, 0);
-    gp_Dir aZDir(0, 0, 1);
-    gp_Dir anXDir(1, 0, 0);
+    gp_Dir aZDir(gp_Dir::D::Z);
+    gp_Dir anXDir(gp_Dir::D::X);
     gp_Ax3 anAxis(anOrigin, aZDir, anXDir);
 
     // Create sphere at origin with radius 5
@@ -132,8 +132,8 @@ TEST_F(IntAna_IntQuadQuad_Test, ConnectedCurvesScenario)
   // Create two spheres that intersect in a circle
   gp_Pnt aCenter1(0, 0, 0);
   gp_Pnt aCenter2(3, 0, 0); // Overlapping spheres
-  gp_Dir aZDir(0, 0, 1);
-  gp_Dir anXDir(1, 0, 0);
+  gp_Dir aZDir(gp_Dir::D::Z);
+  gp_Dir anXDir(gp_Dir::D::X);
   gp_Ax3 anAxis1(aCenter1, aZDir, anXDir);
   gp_Ax3 anAxis2(aCenter2, aZDir, anXDir);
 
index 586de2d53fa836c598977e3c216ae2d2cb62388e..dc5d2f3b52add862ab7b12481de066a7abf105f1 100644 (file)
@@ -174,7 +174,7 @@ Standard_Boolean Geom2dConvert_ApproxArcsSegments::makeArc(
     const gp_Pnt2d              aCenter((prodP1V * aDelta.Y() - prodDeM * aVec.Y()) / vprodVD,
                            (prodDeM * aVec.X() - prodP1V * aDelta.X()) / vprodVD);
     const Standard_Real         aRad = (aCenter.Distance(aP1) + aCenter.Distance(aP2)) * 0.5;
-    const gp_Ax22d              ax22d(aCenter, gp_Dir2d(1., 0.), gp_Dir2d(0., 1.));
+    const gp_Ax22d              ax22d(aCenter, gp_Dir2d(gp_Dir2d::D::X), gp_Dir2d(gp_Dir2d::D::Y));
     const gp_Circ2d             aCir(ax22d, aRad);
     const Handle(Geom2d_Circle) Circ = new Geom2d_Circle(aCir);
 
index 55d9be55d682ec720d8f7821bbff591b217e9c84..38229bcd3190d11616db89a4eee880e236631d57 100644 (file)
@@ -307,7 +307,7 @@ Handle(Geom2d_Curve) GeomConvert_Units::MirrorPCurve(const Handle(Geom2d_Curve)&
   Handle(Geom2d_Curve) theMirrored = Handle(Geom2d_Curve)::DownCast(theCurve->Copy());
   gp_Trsf2d            T;
   gp_Pnt2d             Loc(0., 0.);
-  gp_Dir2d             Dir(1., 0.);
+  gp_Dir2d             Dir(gp_Dir2d::D::X);
   gp_Ax2d              ax2(Loc, Dir);
   T.SetMirror(ax2);
   theMirrored->Transform(T);
index d46a7f1ff06c5b87f5a882ec4bd2cbcee12b50e3..4e210a564b98dbe8497264eec230cb58b63e85bb 100644 (file)
@@ -526,7 +526,7 @@ static Standard_IStream& operator>>(Standard_IStream& IS, gp_Dir2d& D)
 static Standard_IStream& operator>>(Standard_IStream& IS, Handle(Geom2d_Line)& L)
 {
   gp_Pnt2d P(0., 0.);
-  gp_Dir2d AX(1., 0.);
+  gp_Dir2d AX(gp_Dir2d::D::X);
   IS >> P >> AX;
   L = new Geom2d_Line(P, AX);
   return IS;
@@ -537,7 +537,7 @@ static Standard_IStream& operator>>(Standard_IStream& IS, Handle(Geom2d_Line)& L
 static Standard_IStream& operator>>(Standard_IStream& IS, Handle(Geom2d_Circle)& C)
 {
   gp_Pnt2d      P(0., 0.);
-  gp_Dir2d      AX(1., 0.), AY(1., 0.);
+  gp_Dir2d      AX(gp_Dir2d::D::X), AY(gp_Dir2d::D::X);
   Standard_Real R = 0.;
   IS >> P >> AX >> AY;
   GeomTools::GetReal(IS, R);
@@ -550,7 +550,7 @@ static Standard_IStream& operator>>(Standard_IStream& IS, Handle(Geom2d_Circle)&
 static Standard_IStream& operator>>(Standard_IStream& IS, Handle(Geom2d_Ellipse)& E)
 {
   gp_Pnt2d      P(0., 0.);
-  gp_Dir2d      AX(1., 0.), AY(1., 0.);
+  gp_Dir2d      AX(gp_Dir2d::D::X), AY(gp_Dir2d::D::X);
   Standard_Real R1 = 0., R2 = 0.;
   IS >> P >> AX >> AY;
   GeomTools::GetReal(IS, R1);
@@ -564,7 +564,7 @@ static Standard_IStream& operator>>(Standard_IStream& IS, Handle(Geom2d_Ellipse)
 static Standard_IStream& operator>>(Standard_IStream& IS, Handle(Geom2d_Parabola)& C)
 {
   gp_Pnt2d      P(0., 0.);
-  gp_Dir2d      AX(1., 0.), AY(1., 0.);
+  gp_Dir2d      AX(gp_Dir2d::D::X), AY(gp_Dir2d::D::X);
   Standard_Real R1 = 0.;
   IS >> P >> AX >> AY;
   GeomTools::GetReal(IS, R1);
@@ -577,7 +577,7 @@ static Standard_IStream& operator>>(Standard_IStream& IS, Handle(Geom2d_Parabola
 static Standard_IStream& operator>>(Standard_IStream& IS, Handle(Geom2d_Hyperbola)& H)
 {
   gp_Pnt2d      P(0., 0.);
-  gp_Dir2d      AX(1., 0.), AY(1., 0.);
+  gp_Dir2d      AX(gp_Dir2d::D::X), AY(gp_Dir2d::D::X);
   Standard_Real R1 = 0., R2 = 0.;
   IS >> P >> AX >> AY;
   GeomTools::GetReal(IS, R1);
index 49d7382fdd8996a34f6f869d54551d6a8b1cb30b..95c3e7312b2e4ef54db3e0c552f4d309bf7480fe 100644 (file)
@@ -547,7 +547,7 @@ static Standard_IStream& operator>>(Standard_IStream& IS, gp_Dir& D)
 static Standard_IStream& operator>>(Standard_IStream& IS, Handle(Geom_Line)& L)
 {
   gp_Pnt P(0., 0., 0.);
-  gp_Dir AX(1., 0., 0.);
+  gp_Dir AX(gp_Dir::D::X);
   IS >> P >> AX;
   L = new Geom_Line(P, AX);
   return IS;
@@ -558,7 +558,7 @@ static Standard_IStream& operator>>(Standard_IStream& IS, Handle(Geom_Line)& L)
 static Standard_IStream& operator>>(Standard_IStream& IS, Handle(Geom_Circle)& C)
 {
   gp_Pnt        P(0., 0., 0.);
-  gp_Dir        A(1., 0., 0.), AX(1., 0., 0.), AY(1., 0., 0.);
+  gp_Dir        A(gp_Dir::D::X), AX(gp_Dir::D::X), AY(gp_Dir::D::X);
   Standard_Real R = 0.;
   IS >> P >> A >> AX >> AY;
   GeomTools::GetReal(IS, R);
@@ -571,7 +571,7 @@ static Standard_IStream& operator>>(Standard_IStream& IS, Handle(Geom_Circle)& C
 static Standard_IStream& operator>>(Standard_IStream& IS, Handle(Geom_Ellipse)& E)
 {
   gp_Pnt        P(0., 0., 0.);
-  gp_Dir        A(1., 0., 0.), AX(1., 0., 0.), AY(1., 0., 0.);
+  gp_Dir        A(gp_Dir::D::X), AX(gp_Dir::D::X), AY(gp_Dir::D::X);
   Standard_Real R1 = 0., R2 = 0.;
   IS >> P >> A >> AX >> AY;
   GeomTools::GetReal(IS, R1);
@@ -585,7 +585,7 @@ static Standard_IStream& operator>>(Standard_IStream& IS, Handle(Geom_Ellipse)&
 static Standard_IStream& operator>>(Standard_IStream& IS, Handle(Geom_Parabola)& C)
 {
   gp_Pnt        P(0., 0., 0.);
-  gp_Dir        A(1., 0., 0.), AX(1., 0., 0.), AY(1., 0., 0.);
+  gp_Dir        A(gp_Dir::D::X), AX(gp_Dir::D::X), AY(gp_Dir::D::X);
   Standard_Real R1 = 0.;
   IS >> P >> A >> AX >> AY;
   GeomTools::GetReal(IS, R1);
@@ -598,7 +598,7 @@ static Standard_IStream& operator>>(Standard_IStream& IS, Handle(Geom_Parabola)&
 static Standard_IStream& operator>>(Standard_IStream& IS, Handle(Geom_Hyperbola)& H)
 {
   gp_Pnt        P(0., 0., 0.);
-  gp_Dir        A(1., 0., 0.), AX(1., 0., 0.), AY(1., 0., 0.);
+  gp_Dir        A(gp_Dir::D::X), AX(gp_Dir::D::X), AY(gp_Dir::D::X);
   Standard_Real R1 = 0., R2 = 0.;
   IS >> P >> A >> AX >> AY;
   GeomTools::GetReal(IS, R1);
@@ -693,7 +693,7 @@ static Standard_IStream& operator>>(Standard_IStream& IS, Handle(Geom_OffsetCurv
 {
   Standard_Real p = 0.;
   GeomTools::GetReal(IS, p);
-  gp_Dir D(1., 0., 0.);
+  gp_Dir D(gp_Dir::D::X);
   IS >> D;
   Handle(Geom_Curve) BC = GeomTools_CurveSet::ReadCurve(IS);
   C                     = new Geom_OffsetCurve(BC, p, D);
index 25c81ac841f6f2eb45fcab6fcec811211f287e1a..1ff31f6f388a9f252763ad2197408db3820771d3 100644 (file)
@@ -664,7 +664,7 @@ static Standard_IStream& operator>>(Standard_IStream& IS, gp_Dir& D)
 static Standard_IStream& operator>>(Standard_IStream& IS, gp_Ax3& A3)
 {
   gp_Pnt P(0., 0., 0.);
-  gp_Dir A(1., 0., 0.), AX(1., 0., 0.), AY(1., 0., 0.);
+  gp_Dir A(gp_Dir::D::X), AX(gp_Dir::D::X), AY(gp_Dir::D::X);
   IS >> P >> A >> AX >> AY;
   gp_Ax3 ax3(P, A, AX);
   if (AY.DotCross(A, AX) < 0)
@@ -755,7 +755,7 @@ static Standard_IStream& operator>>(Standard_IStream& IS, Handle(Geom_ToroidalSu
 
 static Standard_IStream& operator>>(Standard_IStream& IS, Handle(Geom_SurfaceOfLinearExtrusion)& S)
 {
-  gp_Dir D(1., 0., 0.);
+  gp_Dir D(gp_Dir::D::X);
   IS >> D;
   Handle(Geom_Curve) C = GeomTools_CurveSet::ReadCurve(IS);
   S                    = new Geom_SurfaceOfLinearExtrusion(C, D);
@@ -770,7 +770,7 @@ static Standard_IStream& operator>>(Standard_IStream& IS, Handle(Geom_SurfaceOfL
 static Standard_IStream& operator>>(Standard_IStream& IS, Handle(Geom_SurfaceOfRevolution)& S)
 {
   gp_Pnt P(0., 0., 0.);
-  gp_Dir D(1., 0., 0.);
+  gp_Dir D(gp_Dir::D::X);
   IS >> P >> D;
   Handle(Geom_Curve) C = GeomTools_CurveSet::ReadCurve(IS);
   S                    = new Geom_SurfaceOfRevolution(C, gp_Ax1(P, D));
index 9d05c5383fbd69f118e41fe6810f8f633e4216e2..04a5022cd5e5096601b88b06a5158afd9c37a8d0 100644 (file)
@@ -551,7 +551,7 @@ void IntAna_IntConicQuad::Perform(const gp_Circ&      C,
 
     gp_Lin2d  Ligs(Orig, Dire);
     gp_Pnt2d  Pnt2dBid(0.0, 0.0);
-    gp_Dir2d  Dir2dBid(1.0, 0.0);
+    gp_Dir2d  Dir2dBid(gp_Dir2d::D::X);
     gp_Ax2d   Ax2dBid(Pnt2dBid, Dir2dBid);
     gp_Circ2d Cir(Ax2dBid, C.Radius());
 
index f92e8a70cf8e60fba0341c62c30c82b40f94a6f3..c3c7b6d434c486bc792e1750a257ab4f24d7b110 100644 (file)
@@ -1287,12 +1287,12 @@ void ProjLib_CompProjectedCurve::Perform()
         Ufin = Pfin.Y();
         if (Udeb > Ufin)
         {
-          Dir  = gp_Dir2d(0, -1);
+          Dir  = gp_Dir2d(gp_Dir2d::D::NY);
           Udeb = -Udeb;
           Ufin = -Ufin;
         }
         else
-          Dir = gp_Dir2d(0, 1);
+          Dir = gp_Dir2d(gp_Dir2d::D::Y);
         PCur2d = new Geom2d_TrimmedCurve(new Geom2d_Line(gp_Pnt2d(UIso, 0), Dir), Udeb, Ufin);
         HPCur  = new Geom2dAdaptor_Curve(PCur2d);
       }
@@ -1306,12 +1306,12 @@ void ProjLib_CompProjectedCurve::Perform()
         Ufin = Pfin.X();
         if (Udeb > Ufin)
         {
-          Dir  = gp_Dir2d(-1, 0);
+          Dir  = gp_Dir2d(gp_Dir2d::D::NX);
           Udeb = -Udeb;
           Ufin = -Ufin;
         }
         else
-          Dir = gp_Dir2d(1, 0);
+          Dir = gp_Dir2d(gp_Dir2d::D::X);
         PCur2d = new Geom2d_TrimmedCurve(new Geom2d_Line(gp_Pnt2d(0, VIso), Dir), Udeb, Ufin);
         HPCur  = new Geom2dAdaptor_Curve(PCur2d);
       }
index 2603413402dc51ee8fc168befc330a602791e35a..0035112e5af1d8ae40cc26e45db8d29716beca48 100644 (file)
@@ -1407,7 +1407,7 @@ void ProjLib_ComputeApprox::Perform(const Handle(Adaptor3d_Curve)&   C,
         myBSpline->Translate(gp_Vec2d(du, dv));
       if (ToMirror)
       {
-        gp_Ax2d Axe(gp_Pnt2d(0., 0.), gp_Dir2d(1., 0.));
+        gp_Ax2d Axe(gp_Pnt2d(0., 0.), gp_Dir2d(gp_Dir2d::D::X));
         myBSpline->Mirror(Axe);
       }
     }
index c28658323318278159d1da3a9ea74d15e9d2d058..d7706a741957e21d3d8c27b3a02b94f278318539 100644 (file)
@@ -59,8 +59,8 @@ gce_MakeCirc::gce_MakeCirc(const gp_Pnt& P1, const gp_Pnt& P2, const gp_Pnt& P3)
   //
   if ((dist1 < aResolution) && (dist2 < aResolution) && (dist3 < aResolution))
   {
-    gp_Dir Dirx(1., 0., 0.);
-    gp_Dir Dirz(0., 0., 1.);
+    gp_Dir Dirx(gp_Dir::D::X);
+    gp_Dir Dirz(gp_Dir::D::Z);
     TheCirc = gp_Circ(gp_Ax2(P1, Dirx, Dirz), 0.);
     return;
   }
@@ -151,8 +151,8 @@ gce_MakeCirc::gce_MakeCirc(const gp_Pnt& P1, const gp_Pnt& P2, const gp_Pnt& P3)
       pInt.Coord(x3, y3, z3);
       if (dist1 < aResolution)
       {
-        gp_Dir Dirx(1., 0., 0.);
-        gp_Dir Dirz(0., 0., 1.);
+        gp_Dir Dirx(gp_Dir::D::X);
+        gp_Dir Dirz(gp_Dir::D::Z);
         TheCirc = gp_Circ(gp_Ax2(pInt, Dirx, Dirz), 0.);
         return;
       }
index bd83ee0e68bbbb10b1f82b8c7461933fc32a0a70..fa4bf9d835b154ec2f2870e4cc95828ebcab6c5c 100644 (file)
@@ -46,7 +46,7 @@
 //=========================================================================
 gce_MakeCirc2d::gce_MakeCirc2d(const gp_Pnt2d& P1, const gp_Pnt2d& P2, const gp_Pnt2d& P3)
 {
-  gp_Dir2d dirx(1.0, 0.0);
+  gp_Dir2d dirx(gp_Dir2d::D::X);
 
   //=========================================================================
   //   Traitement.                                                          +
@@ -169,7 +169,7 @@ gce_MakeCirc2d::gce_MakeCirc2d(const gp_Pnt2d&        Center,
 {
   if (Radius >= 0.)
   {
-    TheCirc2d = gp_Circ2d(gp_Ax2d(Center, gp_Dir2d(1.0, 0.0)), Radius, Sense);
+    TheCirc2d = gp_Circ2d(gp_Ax2d(Center, gp_Dir2d(gp_Dir2d::D::X)), Radius, Sense);
     TheError  = gce_Done;
   }
   else
@@ -187,7 +187,7 @@ gce_MakeCirc2d::gce_MakeCirc2d(const gp_Pnt2d&        Center,
                                const gp_Pnt2d&        Point,
                                const Standard_Boolean Sense)
 {
-  TheCirc2d = gp_Circ2d(gp_Ax2d(Center, gp_Dir2d(1.0, 0.0)), Point.Distance(Center), Sense);
+  TheCirc2d = gp_Circ2d(gp_Ax2d(Center, gp_Dir2d(gp_Dir2d::D::X)), Point.Distance(Center), Sense);
   TheError  = gce_Done;
 }
 
index 075e94f43674652c4d35f0eca4679cf12bf122db..8ee45fb2c91cf96aa8209dfb84e83d4ca2df6c96 100644 (file)
@@ -269,7 +269,7 @@ void MeshVS_NodalColorPrsBuilder::Build(const Handle(Prs3d_Presentation)& Prs,
     new Graphic3d_ArrayOfSegments(aNbEdgePrimitives * 2);
 
   Standard_Real aMin = gp::Resolution() * gp::Resolution();
-  gp_Dir        aDefNorm(0., 0., 1.);
+  gp_Dir        aDefNorm(gp_Dir::D::Z);
 
   // Prepare for scaling the incoming colors
   const Standard_Real anColorRatio = 1.0;
index a386108947bc427928e41945c0a305e5de10c8ab..08fd0176070db6eb13efe4b1de116de188989d71 100644 (file)
@@ -272,7 +272,7 @@ void MeshVS_VectorPrsBuilder::Build(const Handle(Prs3d_Presentation)& Prs,
           continue;
         }
 
-        aTrsf.SetDisplacement(gp_Ax3(gp_Pnt(0, 0, 0), gp_Dir(0, 0, 1)),
+        aTrsf.SetDisplacement(gp_Ax3(gp_Pnt(0, 0, 0), gp_Dir(gp_Dir::D::Z)),
                               gp_Ax3(gp_Pnt(X, Y, Z), aVec));
 
         DrawVector(aTrsf,
index e5b44b8b3f3be67975431e5cfcbdcbfca6f4326f..9cc8b25cc8153d61a4b0bd405bdf2d79ae408687 100644 (file)
@@ -245,7 +245,7 @@ TEST(Graphic3d_BndBox3dTest, TransformationInvalidBox)
   Graphic3d_BndBox3d aBox; // Invalid box
 
   gp_Trsf aRotation;
-  aRotation.SetRotation(gp_Ax1(gp_Pnt(0, 0, 0), gp_Dir(0, 0, 1)), M_PI / 4);
+  aRotation.SetRotation(gp_Ax1(gp_Pnt(0, 0, 0), gp_Dir(gp_Dir::D::Z)), M_PI / 4);
   Graphic3d_Mat4d aMat;
   aRotation.GetMat4(aMat);
 
index 7640c1347a65c206bf0634c58f6c41d705f9e77c..eb2dcd92f6b76b8546eeac7c4a0295dcae812f95 100644 (file)
@@ -74,7 +74,7 @@ gp_Ax3 cameraToAx3(const Graphic3d_Camera& theCamera)
 
 Graphic3d_Camera::Graphic3d_Camera()
     : myUp(0.0, 1.0, 0.0),
-      myDirection(0.0, 0.0, 1.0),
+      myDirection(gp_Dir::D::Z),
       myEye(0.0, 0.0, -1500.0),
       myDistance(1500.0),
       myAxialScale(1.0, 1.0, 1.0),
@@ -103,7 +103,7 @@ Graphic3d_Camera::Graphic3d_Camera()
 
 Graphic3d_Camera::Graphic3d_Camera(const Handle(Graphic3d_Camera)& theOther)
     : myUp(0.0, 1.0, 0.0),
-      myDirection(0.0, 0.0, 1.0),
+      myDirection(gp_Dir::D::Z),
       myEye(0.0, 0.0, -1500.0),
       myDistance(1500.0),
       myAxialScale(1.0, 1.0, 1.0),
@@ -193,7 +193,7 @@ void Graphic3d_Camera::Copy(const Handle(Graphic3d_Camera)& theOther)
 void Graphic3d_Camera::SetIdentityOrientation()
 {
   SetEyeAndCenter(gp_Pnt(0.0, 0.0, 0.0), gp_Pnt(0.0, 0.0, -1.0));
-  SetUp(gp_Dir(0.0, 1.0, 0.0));
+  SetUp(gp_Dir(gp_Dir::D::Y));
 }
 
 //=================================================================================================
index 89e6ad4efa679bad7beee353411f554a7a2378c9..fad803f7e5b01b043e21579d1c356f2caf585b2e 100644 (file)
@@ -1747,7 +1747,7 @@ void AIS_Manipulator::Sector::Init(const Standard_ShortReal theRadius,
     gp_Pnt              aV2      = gp_Pnt(anIndent, anIndent * 2.0, 0.0).Transformed(aTrsf);
     gp_Pnt              aV3      = gp_Pnt(anIndent * 2.0, anIndent * 2.0, 0.0).Transformed(aTrsf);
     gp_Pnt              aV4      = gp_Pnt(anIndent * 2.0, anIndent, 0.0).Transformed(aTrsf);
-    gp_Dir              aNormal  = gp_Dir(0.0, 0.0, -1.0).Transformed(aTrsf);
+    gp_Dir              aNormal  = gp_Dir(gp_Dir::D::NZ).Transformed(aTrsf);
 
     myArray->AddVertex(aV1, aNormal);
     myArray->AddVertex(aV2, aNormal);
@@ -1836,7 +1836,7 @@ void AIS_Manipulator::Axis::Compute(const Handle(PrsMgr_PresentationManager)& th
       gp_Trsf aTrsf;
       aTrsf.SetTransformation(aSystem, gp_Ax3());
 
-      gp_Dir        aNormal = gp_Dir(1.0, 0.0, 0.0).Transformed(aTrsf);
+      gp_Dir        aNormal = gp_Dir(gp_Dir::D::X).Transformed(aTrsf);
       Standard_Real aLength = myLength + myIndent * 4.0f;
 
       const Standard_Real aStepV = 1.0f / aStripsNb;
index d7c234bd786a39d2b2c1a7acc43253c1b4269808..4f27b35c633d1348d5239d9037264497694dab49 100644 (file)
@@ -402,7 +402,7 @@ Standard_Boolean AIS_TextLabel::calculateLabelParams(const gp_Pnt&  thePosition,
 gp_Trsf AIS_TextLabel::calculateLabelTrsf(const gp_Pnt& thePosition, gp_Pnt& theCenterOfLabel) const
 {
   const Standard_Real anAngle = myDrawer->TextAspect()->Aspect()->TextAngle() * M_PI / 180.0;
-  const gp_Ax1        aRotAxis(thePosition, gp_Dir(0.0, 0.0, 1.0));
+  const gp_Ax1        aRotAxis(thePosition, gp_Dir(gp_Dir::D::Z));
 
   gp_Ax2 anOrientation = myOrientation3D;
   anOrientation.Rotate(aRotAxis, anAngle);
index b0fddafef5e4c403b32ed445dd3da691031cfe23..e4e53cc95f3735e49be1f0758bab94c3f94a3da4 100644 (file)
@@ -58,7 +58,7 @@ void DsgPrs_EqualDistancePresentation::Add(const Handle(Prs3d_Presentation)& aPr
   aPresentation->CurrentGroup()->AddPrimitiveArray(aPrims);
 
   // Add presentation of arrows (points)
-  gp_Dir aDir(0, 0, 1);
+  gp_Dir aDir(gp_Dir::D::Z);
   DsgPrs::ComputeSymbol(aPresentation, LA, Middle12, Middle34, aDir, aDir, DsgPrs_AS_BOTHPT);
   // ota -- begin --
   // Two small lines in the middle of this line
index eeab4f70866dc6c51d756a3b1fa5466ea6ee5715..40d463a98608cee10d7624e60caff457a3854f1b 100644 (file)
@@ -64,7 +64,7 @@ protected:
   //! Computes normal at given parameter location of the surface.
   virtual gp_Dir Normal(const Standard_Real, const Standard_Real) const Standard_OVERRIDE
   {
-    return gp_Dir(0.0, 0.0, -1.0);
+    return gp_Dir(gp_Dir::D::NZ);
   }
 
 protected:
index 039be994024da4c7a3cced8e6d43188332437306..485c7badd7caaf3334759a0fd860f83acce8ecb0 100644 (file)
@@ -51,7 +51,7 @@ protected:
   //! Computes normal at given parameter location of the surface.
   virtual gp_Dir Normal(const Standard_Real, const Standard_Real) const Standard_OVERRIDE
   {
-    return gp_Dir(0.0, 0.0, -1.0);
+    return gp_Dir(gp_Dir::D::NZ);
   }
 
 protected:
index 4cb2661b3b123105edb73f27023ef2ce13744cef..4463a975e07e13f602153fdc4e2d62179b16cbd1 100644 (file)
@@ -859,7 +859,7 @@ Standard_Boolean SelectMgr_TriangularFrustumSet::isIntersectBoundary(
   anAxis.Transform(theTrsf);
   Handle(Geom_Circle) aCirc = new Geom_Circle(anAxis, theRadius);
 
-  gp_Dir               aCircNorm  = gp_Dir(0, 0, 1).Transformed(theTrsf);
+  gp_Dir               aCircNorm  = gp_Dir(gp_Dir::D::Z).Transformed(theTrsf);
   Handle(Geom_Surface) aCircPlane = new Geom_Plane(aCircCenter, aCircNorm);
 
   for (Standard_Integer anIdx = myBoundaryPoints.Lower();
index c15b334cdcb4d42d8b1b0bc079493a5c9cd0fdf5..b4c70ad1a5f1d335f1ef9571269c582cb60d7045 100644 (file)
@@ -46,7 +46,7 @@ V3d_Viewer::V3d_Viewer(const Handle(Graphic3d_GraphicDriver)& theDriver)
       myDefaultTypeOfView(V3d_ORTHOGRAPHIC),
       myComputedMode(Standard_True),
       myDefaultComputedMode(Standard_False),
-      myPrivilegedPlane(gp_Ax3(gp_Pnt(0., 0., 0), gp_Dir(0., 0., 1.), gp_Dir(1., 0., 0.))),
+      myPrivilegedPlane(gp_Ax3(gp_Pnt(0., 0., 0), gp_Dir(gp_Dir::D::Z), gp_Dir(gp_Dir::D::X))),
       myDisplayPlane(Standard_False),
       myDisplayPlaneLength(1000.0),
       myGridType(Aspect_GT_Rectangular),
index 4f5630c07acfae8ce481ebaca6eb765e25eaae3b..8c4a5cde516b2eb3650cb7d29797a5f1ab5bc1e2 100644 (file)
@@ -7,7 +7,9 @@ restore [locate_data_file bug24676_b2.brep] b2
 
 for {set i 1} { $i <= 6} {incr i} {
   restore [locate_data_file bug24676_b1_${i}.brep] b1_$i
-  if {![regexp "no 3d curves\n has no 3d points" [ bopcurves b1_$i b2 ]]} {
-    puts "Error: Non-empty intersection result between b1_$i and b2, while empty is expected"
+  set log [bopcurves b1_$i b2]
+  regexp {Tolerance Reached=+([-0-9.+eE]+)\n+([-0-9.+eE]+)} $log full Toler NbCurv
+  if {$NbCurv != 1} {
+    puts "Error: Number of curves is wrong"
   }
 }