From c22b52d60ee32387b227cbb81a72d0544a35822f Mon Sep 17 00:00:00 2001 From: kgv Date: Thu, 3 Dec 2020 17:36:19 +0300 Subject: [PATCH] 0028966: Coding Rules - remove Adaptor2d_HCurve2d, Adaptor3d_HCurve and Adaptor3d_HSurface classes Adaptor2d_Curve2d, Adaptor3d_Curve and Adaptor3d_Surface now inherit Standard_Transient. Interfaces Adaptor2d_HCurve2d, Adaptor3d_HCurve, Adaptor3d_HSurface and their subclasses are now aliases to Adaptor2d_Curve2d, Adaptor3d_Curve and Adaptor3d_Surface. Removed numerous unsafe reinterpret casts. Generic classes Adaptor3d_GenHCurve, Adaptor3d_GenHSurface, Adaptor2d_GenHCurve2d have been removed. Several redundant .lxx files have been merged into .hxx. Removed obsolete adaptor classes with H suffix. --- adm/upgrade.dat | 22 + dox/upgrade/upgrade.md | 9 + .../standard/01_Geometry/src/GeomSources.cpp | 12 +- .../src/ISession2D/ISession_Surface.cpp | 4 +- samples/mfc/standard/01_Geometry/src/StdAfx.h | 2 - .../standard/02_Modeling/src/ModelingDoc.cpp | 9 +- samples/mfc/standard/02_Modeling/src/StdAfx.h | 4 +- src/Adaptor2d/Adaptor2d_Curve2d.cxx | 7 +- src/Adaptor2d/Adaptor2d_Curve2d.hxx | 50 +- src/Adaptor2d/Adaptor2d_GenHCurve2d.gxx | 48 -- src/Adaptor2d/Adaptor2d_GenHCurve2d.lxx | 20 - src/Adaptor2d/Adaptor2d_HCurve2d.cxx | 27 - src/Adaptor2d/Adaptor2d_HCurve2d.hxx | 127 ----- src/Adaptor2d/Adaptor2d_HCurve2d.lxx | 296 ----------- src/Adaptor2d/Adaptor2d_HLine2d.hxx | 93 ---- src/Adaptor2d/Adaptor2d_HLine2d_0.cxx | 42 -- src/Adaptor2d/Adaptor2d_HOffsetCurve.hxx | 93 ---- src/Adaptor2d/Adaptor2d_HOffsetCurve_0.cxx | 42 -- src/Adaptor2d/Adaptor2d_Line2d.cxx | 12 +- src/Adaptor2d/Adaptor2d_Line2d.hxx | 25 +- src/Adaptor2d/Adaptor2d_OffsetCurve.cxx | 21 +- src/Adaptor2d/Adaptor2d_OffsetCurve.hxx | 62 +-- src/Adaptor2d/Adaptor2d_OffsetCurve.lxx | 54 -- src/Adaptor2d/FILES | 10 - src/Adaptor3d/Adaptor3d_Curve.cxx | 9 +- src/Adaptor3d/Adaptor3d_Curve.hxx | 48 +- src/Adaptor3d/Adaptor3d_CurveOnSurface.cxx | 49 +- src/Adaptor3d/Adaptor3d_CurveOnSurface.hxx | 91 +--- src/Adaptor3d/Adaptor3d_GenHCurve.gxx | 52 -- src/Adaptor3d/Adaptor3d_GenHCurve.lxx | 20 - src/Adaptor3d/Adaptor3d_GenHSurface.gxx | 49 -- src/Adaptor3d/Adaptor3d_GenHSurface.lxx | 20 - src/Adaptor3d/Adaptor3d_HCurve.cxx | 26 - src/Adaptor3d/Adaptor3d_HCurve.hxx | 162 ------ src/Adaptor3d/Adaptor3d_HCurve.lxx | 304 ----------- src/Adaptor3d/Adaptor3d_HCurveOnSurface.hxx | 97 ---- src/Adaptor3d/Adaptor3d_HCurveOnSurface_0.cxx | 42 -- src/Adaptor3d/Adaptor3d_HIsoCurve.hxx | 97 ---- src/Adaptor3d/Adaptor3d_HIsoCurve_0.cxx | 42 -- src/Adaptor3d/Adaptor3d_HSurface.cxx | 28 - src/Adaptor3d/Adaptor3d_HSurface.hxx | 188 ------- src/Adaptor3d/Adaptor3d_HSurface.lxx | 485 ------------------ src/Adaptor3d/Adaptor3d_HSurfaceTool.cxx | 14 +- src/Adaptor3d/Adaptor3d_HSurfaceTool.hxx | 243 ++++----- src/Adaptor3d/Adaptor3d_HSurfaceTool.lxx | 260 ---------- src/Adaptor3d/Adaptor3d_HVertex.cxx | 7 +- src/Adaptor3d/Adaptor3d_HVertex.hxx | 14 +- src/Adaptor3d/Adaptor3d_InterFunc.cxx | 6 +- src/Adaptor3d/Adaptor3d_InterFunc.hxx | 32 +- src/Adaptor3d/Adaptor3d_IsoCurve.cxx | 23 +- src/Adaptor3d/Adaptor3d_IsoCurve.hxx | 85 +-- src/Adaptor3d/Adaptor3d_IsoCurve.lxx | 62 --- src/Adaptor3d/Adaptor3d_Surface.cxx | 19 +- src/Adaptor3d/Adaptor3d_Surface.hxx | 66 +-- src/Adaptor3d/Adaptor3d_TopolTool.cxx | 41 +- src/Adaptor3d/Adaptor3d_TopolTool.hxx | 30 +- src/Adaptor3d/FILES | 16 - src/Approx/Approx_Array1OfAdHSurface.hxx | 4 +- src/Approx/Approx_Curve2d.cxx | 8 +- src/Approx/Approx_Curve2d.hxx | 9 +- src/Approx/Approx_Curve3d.cxx | 12 +- src/Approx/Approx_Curve3d.hxx | 9 +- src/Approx/Approx_CurveOnSurface.cxx | 56 +- src/Approx/Approx_CurveOnSurface.hxx | 38 +- src/Approx/Approx_CurvilinearParameter.cxx | 29 +- src/Approx/Approx_CurvilinearParameter.hxx | 25 +- src/Approx/Approx_CurvlinFunc.cxx | 56 +- src/Approx/Approx_CurvlinFunc.hxx | 37 +- src/Approx/Approx_HArray1OfAdHSurface.hxx | 2 +- src/Approx/Approx_SameParameter.cxx | 64 +-- src/Approx/Approx_SameParameter.hxx | 26 +- src/BOPTools/BOPTools_AlgoTools2D.cxx | 7 +- src/BOPTools/BOPTools_AlgoTools_1.cxx | 53 +- src/BRep/BRep_Tool.cxx | 8 +- src/BRepAdaptor/BRepAdaptor_CompCurve.cxx | 36 +- src/BRepAdaptor/BRepAdaptor_CompCurve.hxx | 9 +- src/BRepAdaptor/BRepAdaptor_Curve.cxx | 58 +-- src/BRepAdaptor/BRepAdaptor_Curve.hxx | 34 +- src/BRepAdaptor/BRepAdaptor_Curve2d.cxx | 2 + src/BRepAdaptor/BRepAdaptor_Curve2d.hxx | 22 +- src/BRepAdaptor/BRepAdaptor_HCompCurve.hxx | 97 ---- src/BRepAdaptor/BRepAdaptor_HCompCurve_0.cxx | 42 -- src/BRepAdaptor/BRepAdaptor_HCurve.hxx | 97 ---- src/BRepAdaptor/BRepAdaptor_HCurve2d.hxx | 93 ---- src/BRepAdaptor/BRepAdaptor_HCurve2d_0.cxx | 42 -- src/BRepAdaptor/BRepAdaptor_HCurve_0.cxx | 42 -- src/BRepAdaptor/BRepAdaptor_HSurface.hxx | 93 ---- src/BRepAdaptor/BRepAdaptor_HSurface_0.cxx | 42 -- src/BRepAdaptor/BRepAdaptor_Surface.cxx | 41 +- src/BRepAdaptor/BRepAdaptor_Surface.hxx | 153 +++--- src/BRepAdaptor/BRepAdaptor_Surface.lxx | 272 ---------- src/BRepAdaptor/FILES | 9 - src/BRepAlgo/BRepAlgo_NormalProjection.cxx | 50 +- src/BRepApprox/BRepApprox_SurfaceTool.cxx | 7 +- src/BRepApprox/BRepApprox_SurfaceTool.hxx | 24 +- src/BRepApprox/BRepApprox_SurfaceTool.lxx | 10 +- src/BRepBlend/BRepBlend_BlendTool.cxx | 24 +- src/BRepBlend/BRepBlend_BlendTool.hxx | 36 +- src/BRepBlend/BRepBlend_BlendTool.lxx | 14 +- src/BRepBlend/BRepBlend_CSWalking.hxx | 44 +- src/BRepBlend/BRepBlend_CSWalking_0.cxx | 18 +- src/BRepBlend/BRepBlend_CurvPointRadInv.cxx | 6 +- src/BRepBlend/BRepBlend_CurvPointRadInv.hxx | 8 +- src/BRepBlend/BRepBlend_Extremity.cxx | 8 +- src/BRepBlend/BRepBlend_Extremity.hxx | 3 +- src/BRepBlend/BRepBlend_HCurve2dTool.cxx | 6 +- src/BRepBlend/BRepBlend_HCurve2dTool.hxx | 78 ++- src/BRepBlend/BRepBlend_HCurve2dTool.lxx | 46 +- src/BRepBlend/BRepBlend_HCurveTool.cxx | 6 +- src/BRepBlend/BRepBlend_HCurveTool.hxx | 80 ++- src/BRepBlend/BRepBlend_HCurveTool.lxx | 46 +- src/BRepBlend/BRepBlend_PointOnRst.cxx | 8 +- src/BRepBlend/BRepBlend_PointOnRst.hxx | 17 +- src/BRepBlend/BRepBlend_PointOnRst.lxx | 2 +- src/BRepBlend/BRepBlend_RstRstConstRad.cxx | 26 +- src/BRepBlend/BRepBlend_RstRstConstRad.hxx | 40 +- src/BRepBlend/BRepBlend_RstRstEvolRad.cxx | 26 +- src/BRepBlend/BRepBlend_RstRstEvolRad.hxx | 40 +- src/BRepBlend/BRepBlend_RstRstLineBuilder.cxx | 20 +- src/BRepBlend/BRepBlend_RstRstLineBuilder.hxx | 24 +- .../BRepBlend_SurfCurvConstRadInv.cxx | 14 +- .../BRepBlend_SurfCurvConstRadInv.hxx | 24 +- .../BRepBlend_SurfCurvEvolRadInv.cxx | 14 +- .../BRepBlend_SurfCurvEvolRadInv.hxx | 24 +- .../BRepBlend_SurfPointConstRadInv.cxx | 8 +- .../BRepBlend_SurfPointConstRadInv.hxx | 19 +- .../BRepBlend_SurfPointEvolRadInv.cxx | 8 +- .../BRepBlend_SurfPointEvolRadInv.hxx | 18 +- src/BRepBlend/BRepBlend_SurfRstConstRad.cxx | 18 +- src/BRepBlend/BRepBlend_SurfRstConstRad.hxx | 34 +- src/BRepBlend/BRepBlend_SurfRstEvolRad.cxx | 18 +- src/BRepBlend/BRepBlend_SurfRstEvolRad.hxx | 34 +- .../BRepBlend_SurfRstLineBuilder.cxx | 22 +- .../BRepBlend_SurfRstLineBuilder.hxx | 26 +- src/BRepBlend/BRepBlend_Walking.hxx | 44 +- src/BRepBlend/BRepBlend_Walking_0.cxx | 20 +- src/BRepBndLib/BRepBndLib.cxx | 10 +- src/BRepBndLib/BRepBndLib_1.cxx | 12 +- src/BRepCheck/BRepCheck.cxx | 4 +- src/BRepCheck/BRepCheck.hxx | 10 +- src/BRepCheck/BRepCheck_Edge.cxx | 75 ++- src/BRepCheck/BRepCheck_Edge.hxx | 26 +- src/BRepCheck/BRepCheck_Face.cxx | 2 +- src/BRepCheck/BRepCheck_Wire.cxx | 8 +- src/BRepClass/BRepClass_FaceClassifier.cxx | 5 +- src/BRepClass3d/BRepClass3d_Intersector3d.cxx | 8 +- src/BRepClass3d/BRepClass3d_SolidExplorer.cxx | 15 +- src/BRepClass3d/BRepClass3d_SolidExplorer.hxx | 23 +- src/BRepExtrema/BRepExtrema_ExtCC.cxx | 9 +- src/BRepExtrema/BRepExtrema_ExtCC.hxx | 6 +- src/BRepExtrema/BRepExtrema_ExtCF.cxx | 8 +- src/BRepExtrema/BRepExtrema_ExtCF.hxx | 6 +- src/BRepExtrema/BRepExtrema_ExtFF.cxx | 10 +- src/BRepExtrema/BRepExtrema_ExtFF.hxx | 7 +- src/BRepExtrema/BRepExtrema_ExtPC.cxx | 10 +- src/BRepExtrema/BRepExtrema_ExtPC.hxx | 5 +- src/BRepFill/BRepFill_ACRLaw.cxx | 6 +- src/BRepFill/BRepFill_AdvancedEvolved.cxx | 16 +- src/BRepFill/BRepFill_CurveConstraint.cxx | 30 +- src/BRepFill/BRepFill_CurveConstraint.hxx | 7 +- src/BRepFill/BRepFill_Draft.cxx | 7 +- src/BRepFill/BRepFill_Edge3DLaw.cxx | 6 +- src/BRepFill/BRepFill_EdgeOnSurfLaw.cxx | 19 +- src/BRepFill/BRepFill_Filling.cxx | 52 +- src/BRepFill/BRepFill_LocationLaw.cxx | 8 +- src/BRepFill/BRepFill_OffsetWire.cxx | 11 +- src/BRepFill/BRepFill_Pipe.cxx | 8 +- src/BRepFill/BRepFill_PipeShell.cxx | 12 +- src/BRepFill/BRepFill_SectionPlacement.cxx | 10 +- src/BRepFill/BRepFill_Sweep.cxx | 56 +- src/BRepFill/BRepFill_TrimSurfaceTool.cxx | 6 +- .../BRepIntCurveSurface_Inter.cxx | 14 +- .../BRepIntCurveSurface_Inter.hxx | 12 +- src/BRepLib/BRepLib.cxx | 86 ++-- src/BRepLib/BRepLib_MakeEdge.cxx | 10 +- src/BRepMesh/BRepMesh_CurveTessellator.cxx | 8 +- .../BRepMesh_DefaultRangeSplitter.cxx | 6 +- .../BRepMesh_DefaultRangeSplitter.hxx | 4 +- ...Mesh_DelaunayDeflectionControlMeshAlgo.hxx | 3 +- src/BRepMesh/BRepMesh_EdgeDiscret.cxx | 2 +- .../BRepMesh_EdgeParameterProvider.hxx | 6 +- src/BRepMesh/BRepMesh_GeomTool.cxx | 24 +- src/BRepMesh/BRepMesh_GeomTool.hxx | 14 +- src/BRepMesh/BRepMesh_NURBSRangeSplitter.cxx | 11 +- src/BRepOffset/BRepOffset_Inter2d.cxx | 20 +- src/BRepOffset/BRepOffset_Inter2d.hxx | 16 +- src/BRepOffset/BRepOffset_MakeOffset.cxx | 12 +- .../BRepOffset_MakeSimpleOffset.cxx | 9 +- src/BRepOffset/BRepOffset_Offset.cxx | 28 +- src/BRepOffset/BRepOffset_SimpleOffset.cxx | 8 +- src/BRepOffset/BRepOffset_Tool.cxx | 8 +- src/BRepPrimAPI/BRepPrimAPI_MakeRevol.cxx | 13 +- src/BRepSweep/BRepSweep_Rotation.cxx | 7 +- src/BRepSweep/BRepSweep_Translation.cxx | 5 +- src/BRepTest/BRepTest_FillingCommands.cxx | 58 +-- src/BRepTest/BRepTest_SweepCommands.cxx | 4 +- .../BRepTools_NurbsConvertModification.cxx | 23 +- .../BRepTopAdaptor_FClass2d.cxx | 14 +- src/BRepTopAdaptor/BRepTopAdaptor_HVertex.cxx | 27 +- src/BRepTopAdaptor/BRepTopAdaptor_HVertex.hxx | 11 +- src/BRepTopAdaptor/BRepTopAdaptor_Tool.cxx | 22 +- src/BRepTopAdaptor/BRepTopAdaptor_Tool.hxx | 17 +- .../BRepTopAdaptor_TopolTool.cxx | 53 +- .../BRepTopAdaptor_TopolTool.hxx | 29 +- src/BiTgte/BiTgte_CurveOnEdge.cxx | 9 +- src/BiTgte/BiTgte_CurveOnEdge.hxx | 26 +- src/BiTgte/BiTgte_CurveOnVertex.cxx | 9 +- src/BiTgte/BiTgte_CurveOnVertex.hxx | 26 +- src/BiTgte/BiTgte_HCurveOnEdge.hxx | 97 ---- src/BiTgte/BiTgte_HCurveOnEdge_0.cxx | 42 -- src/BiTgte/BiTgte_HCurveOnVertex.hxx | 97 ---- src/BiTgte/BiTgte_HCurveOnVertex_0.cxx | 42 -- src/BiTgte/FILES | 4 - src/Blend/Blend_CSWalking.gxx | 2 +- src/Blend/Blend_CSWalking_3.gxx | 2 +- src/Blend/Blend_FuncInv.cxx | 2 +- src/Blend/Blend_FuncInv.hxx | 4 +- src/Blend/Blend_SurfCurvFuncInv.cxx | 2 +- src/Blend/Blend_SurfCurvFuncInv.hxx | 4 +- src/Blend/Blend_Walking.gxx | 2 +- src/Blend/Blend_Walking_1.gxx | 2 +- src/Blend/Blend_Walking_3.gxx | 6 +- src/Blend/Blend_Walking_4.gxx | 6 +- src/BlendFunc/BlendFunc.cxx | 6 +- src/BlendFunc/BlendFunc.hxx | 14 +- src/BlendFunc/BlendFunc_CSCircular.cxx | 10 +- src/BlendFunc/BlendFunc_CSCircular.hxx | 25 +- src/BlendFunc/BlendFunc_CSConstRad.cxx | 10 +- src/BlendFunc/BlendFunc_CSConstRad.hxx | 25 +- src/BlendFunc/BlendFunc_ChAsym.cxx | 10 +- src/BlendFunc/BlendFunc_ChAsym.hxx | 26 +- src/BlendFunc/BlendFunc_ChAsymInv.cxx | 14 +- src/BlendFunc/BlendFunc_ChAsymInv.hxx | 26 +- src/BlendFunc/BlendFunc_ChamfInv.cxx | 12 +- src/BlendFunc/BlendFunc_ChamfInv.hxx | 16 +- src/BlendFunc/BlendFunc_Chamfer.cxx | 10 +- src/BlendFunc/BlendFunc_Chamfer.hxx | 15 +- src/BlendFunc/BlendFunc_ConstRad.cxx | 10 +- src/BlendFunc/BlendFunc_ConstRad.hxx | 26 +- src/BlendFunc/BlendFunc_ConstRadInv.cxx | 14 +- src/BlendFunc/BlendFunc_ConstRadInv.hxx | 26 +- src/BlendFunc/BlendFunc_ConstThroat.cxx | 10 +- src/BlendFunc/BlendFunc_ConstThroat.hxx | 21 +- src/BlendFunc/BlendFunc_ConstThroatInv.cxx | 12 +- src/BlendFunc/BlendFunc_ConstThroatInv.hxx | 16 +- .../BlendFunc_ConstThroatWithPenetration.cxx | 10 +- .../BlendFunc_ConstThroatWithPenetration.hxx | 21 +- ...lendFunc_ConstThroatWithPenetrationInv.cxx | 12 +- ...lendFunc_ConstThroatWithPenetrationInv.hxx | 20 +- src/BlendFunc/BlendFunc_Corde.cxx | 8 +- src/BlendFunc/BlendFunc_Corde.hxx | 21 +- src/BlendFunc/BlendFunc_EvolRad.cxx | 10 +- src/BlendFunc/BlendFunc_EvolRad.hxx | 26 +- src/BlendFunc/BlendFunc_EvolRadInv.cxx | 14 +- src/BlendFunc/BlendFunc_EvolRadInv.hxx | 26 +- src/BlendFunc/BlendFunc_GenChamfInv.cxx | 14 +- src/BlendFunc/BlendFunc_GenChamfInv.hxx | 30 +- src/BlendFunc/BlendFunc_GenChamfer.cxx | 10 +- src/BlendFunc/BlendFunc_GenChamfer.hxx | 28 +- src/BlendFunc/BlendFunc_Ruled.cxx | 10 +- src/BlendFunc/BlendFunc_Ruled.hxx | 24 +- src/BlendFunc/BlendFunc_RuledInv.cxx | 14 +- src/BlendFunc/BlendFunc_RuledInv.hxx | 26 +- src/BndLib/BndLib_AddSurface.cxx | 6 +- src/ChFi3d/ChFi3d.cxx | 6 +- src/ChFi3d/ChFi3d_Builder.cxx | 10 +- src/ChFi3d/ChFi3d_Builder.hxx | 246 +++++---- src/ChFi3d/ChFi3d_Builder_0.cxx | 182 +++---- src/ChFi3d/ChFi3d_Builder_0.hxx | 76 +-- src/ChFi3d/ChFi3d_Builder_1.cxx | 27 +- src/ChFi3d/ChFi3d_Builder_2.cxx | 383 +++++++------- src/ChFi3d/ChFi3d_Builder_6.cxx | 144 +++--- src/ChFi3d/ChFi3d_Builder_C1.cxx | 134 +++-- src/ChFi3d/ChFi3d_Builder_C2.cxx | 51 +- src/ChFi3d/ChFi3d_Builder_CnCrn.cxx | 61 ++- src/ChFi3d/ChFi3d_Builder_NotImp.cxx | 94 ++-- src/ChFi3d/ChFi3d_Builder_SpKP.cxx | 88 ++-- src/ChFi3d/ChFi3d_ChBuilder.cxx | 172 +++---- src/ChFi3d/ChFi3d_ChBuilder.hxx | 120 ++--- src/ChFi3d/ChFi3d_ChBuilder_C2.cxx | 6 +- src/ChFi3d/ChFi3d_ChBuilder_C3.cxx | 54 +- src/ChFi3d/ChFi3d_FilBuilder.cxx | 204 ++++---- src/ChFi3d/ChFi3d_FilBuilder.hxx | 49 +- src/ChFi3d/ChFi3d_FilBuilder_C2.cxx | 49 +- src/ChFi3d/ChFi3d_FilBuilder_C3.cxx | 32 +- src/ChFiDS/ChFiDS_ElSpine.cxx | 6 +- src/ChFiDS/ChFiDS_ElSpine.hxx | 26 +- src/ChFiDS/ChFiDS_FilSpine.cxx | 14 +- src/ChFiDS/ChFiDS_FilSpine.hxx | 22 +- src/ChFiDS/ChFiDS_HElSpine.hxx | 97 ---- src/ChFiDS/ChFiDS_HElSpine_0.cxx | 42 -- src/ChFiDS/ChFiDS_ListOfHElSpine.hxx | 6 +- src/ChFiDS/ChFiDS_Spine.cxx | 16 +- src/ChFiDS/ChFiDS_Spine.hxx | 30 +- src/ChFiDS/FILES | 2 - src/ChFiKPart/ChFiKPart_ComputeData.cxx | 32 +- src/ChFiKPart/ChFiKPart_ComputeData.hxx | 18 +- src/ChFiKPart/ChFiKPart_ComputeData_CS.cxx | 4 +- src/ChFiKPart/ChFiKPart_ComputeData_CS.hxx | 6 +- .../ChFiKPart_ComputeData_ChAsymPlnCon.cxx | 2 +- .../ChFiKPart_ComputeData_ChAsymPlnCyl.cxx | 2 +- .../ChFiKPart_ComputeData_ChAsymPlnPln.cxx | 2 +- .../ChFiKPart_ComputeData_ChPlnCon.cxx | 2 +- .../ChFiKPart_ComputeData_ChPlnCyl.cxx | 2 +- .../ChFiKPart_ComputeData_ChPlnPln.cxx | 2 +- src/ChFiKPart/ChFiKPart_ComputeData_Fcts.cxx | 8 +- .../ChFiKPart_ComputeData_FilPlnCon.cxx | 2 +- .../ChFiKPart_ComputeData_FilPlnCyl.cxx | 2 +- .../ChFiKPart_ComputeData_FilPlnPln.cxx | 2 +- .../ChFiKPart_ComputeData_Rotule.cxx | 2 +- .../ChFiKPart_ComputeData_Sphere.cxx | 6 +- .../ChFiKPart_ComputeData_Sphere.hxx | 4 +- src/ChFiKPart/ChFiKPart_RstMap.hxx | 6 +- src/Contap/Contap_ArcFunction.cxx | 6 +- src/Contap/Contap_ArcFunction.hxx | 25 +- src/Contap/Contap_ArcFunction.lxx | 4 +- src/Contap/Contap_Contour.cxx | 68 +-- src/Contap/Contap_Contour.hxx | 31 +- src/Contap/Contap_HContTool.cxx | 42 +- src/Contap/Contap_HContTool.hxx | 46 +- src/Contap/Contap_HCurve2dTool.cxx | 4 +- src/Contap/Contap_HCurve2dTool.hxx | 49 +- src/Contap/Contap_HCurve2dTool.lxx | 48 +- src/Contap/Contap_Line.cxx | 6 +- src/Contap/Contap_Line.hxx | 7 +- src/Contap/Contap_Point.cxx | 2 +- src/Contap/Contap_Point.hxx | 8 +- src/Contap/Contap_Point.lxx | 4 +- src/Contap/Contap_SurfFunction.cxx | 4 +- src/Contap/Contap_SurfFunction.hxx | 19 +- src/Contap/Contap_SurfFunction.lxx | 2 +- src/Contap/Contap_SurfProps.cxx | 8 +- src/Contap/Contap_SurfProps.hxx | 13 +- src/Contap/Contap_TheIWalking.hxx | 21 +- src/Contap/Contap_TheIWalking_0.cxx | 6 +- src/Contap/Contap_ThePathPointOfTheSearch.hxx | 27 +- .../Contap_ThePathPointOfTheSearch_0.cxx | 6 +- src/Contap/Contap_TheSearch.hxx | 5 +- src/Contap/Contap_TheSearchInside.hxx | 24 +- src/Contap/Contap_TheSearchInside_0.cxx | 6 +- src/Contap/Contap_TheSearch_0.cxx | 6 +- src/Contap/Contap_TheSegmentOfTheSearch.hxx | 20 +- src/Contap/Contap_TheSegmentOfTheSearch_0.cxx | 6 +- src/DBRep/DBRep_DrawableShape.cxx | 8 +- .../DNaming_BooleanOperationDriver.cxx | 4 +- src/Draft/Draft_Modification_1.cxx | 45 +- src/DrawTrSurf/DrawTrSurf_BSplineSurface.cxx | 6 +- src/DrawTrSurf/DrawTrSurf_Surface.cxx | 6 +- src/Extrema/Extrema_ExtPExtS.cxx | 30 +- src/Extrema/Extrema_ExtPExtS.hxx | 33 +- src/Extrema/Extrema_ExtPRevS.cxx | 34 +- src/Extrema/Extrema_ExtPRevS.hxx | 23 +- src/Extrema/Extrema_ExtPS.cxx | 8 +- src/Extrema/Extrema_GenExtCS.cxx | 10 +- src/Extrema/Extrema_GenExtPS.cxx | 19 +- src/FilletSurf/FilletSurf_InternalBuilder.cxx | 58 +-- src/FilletSurf/FilletSurf_InternalBuilder.hxx | 29 +- src/Geom2dAdaptor/FILES | 5 - src/Geom2dAdaptor/Geom2dAdaptor.hxx | 28 - src/Geom2dAdaptor/Geom2dAdaptor_Curve.cxx | 12 +- src/Geom2dAdaptor/Geom2dAdaptor_Curve.hxx | 88 ++-- src/Geom2dAdaptor/Geom2dAdaptor_Curve.lxx | 88 ---- src/Geom2dAdaptor/Geom2dAdaptor_GHCurve.hxx | 93 ---- src/Geom2dAdaptor/Geom2dAdaptor_GHCurve_0.cxx | 42 -- src/Geom2dAdaptor/Geom2dAdaptor_HCurve.cxx | 65 --- src/Geom2dAdaptor/Geom2dAdaptor_HCurve.hxx | 74 --- .../Geom2dConvert_ApproxCurve.cxx | 16 +- .../Geom2dConvert_ApproxCurve.hxx | 15 +- .../Geom2dEvaluator_OffsetCurve.cxx | 4 +- .../Geom2dEvaluator_OffsetCurve.hxx | 7 +- src/Geom2dGcc/Geom2dGcc_Circ2d2TanOnGeo.cxx | 14 +- src/Geom2dGcc/Geom2dGcc_Circ2d2TanRadGeo.cxx | 12 +- src/Geom2dGcc/Geom2dGcc_Circ2dTanOnRadGeo.cxx | 10 +- src/GeomAPI/GeomAPI.cxx | 14 +- src/GeomAPI/GeomAPI_IntCS.cxx | 12 +- src/GeomAdaptor/FILES | 16 - src/GeomAdaptor/GeomAdaptor.cxx | 10 +- src/GeomAdaptor/GeomAdaptor.hxx | 34 -- src/GeomAdaptor/GeomAdaptor_Curve.cxx | 12 +- src/GeomAdaptor/GeomAdaptor_Curve.hxx | 115 ++--- src/GeomAdaptor/GeomAdaptor_Curve.lxx | 124 ----- src/GeomAdaptor/GeomAdaptor_GHCurve.hxx | 97 ---- src/GeomAdaptor/GeomAdaptor_GHCurve_0.cxx | 42 -- src/GeomAdaptor/GeomAdaptor_GHSurface.hxx | 93 ---- src/GeomAdaptor/GeomAdaptor_GHSurface_0.cxx | 42 -- src/GeomAdaptor/GeomAdaptor_HCurve.cxx | 24 - src/GeomAdaptor/GeomAdaptor_HCurve.hxx | 75 --- src/GeomAdaptor/GeomAdaptor_HCurve.lxx | 56 -- src/GeomAdaptor/GeomAdaptor_HSurface.cxx | 24 - src/GeomAdaptor/GeomAdaptor_HSurface.hxx | 76 --- src/GeomAdaptor/GeomAdaptor_HSurface.lxx | 60 --- .../GeomAdaptor_HSurfaceOfLinearExtrusion.hxx | 93 ---- ...eomAdaptor_HSurfaceOfLinearExtrusion_0.cxx | 35 -- .../GeomAdaptor_HSurfaceOfRevolution.hxx | 93 ---- .../GeomAdaptor_HSurfaceOfRevolution_0.cxx | 35 -- src/GeomAdaptor/GeomAdaptor_Surface.cxx | 39 +- src/GeomAdaptor/GeomAdaptor_Surface.hxx | 139 +++-- src/GeomAdaptor/GeomAdaptor_Surface.lxx | 152 ------ .../GeomAdaptor_SurfaceOfLinearExtrusion.cxx | 25 +- .../GeomAdaptor_SurfaceOfLinearExtrusion.hxx | 40 +- .../GeomAdaptor_SurfaceOfRevolution.cxx | 24 +- .../GeomAdaptor_SurfaceOfRevolution.hxx | 42 +- src/GeomConvert/GeomConvert_ApproxCurve.cxx | 14 +- src/GeomConvert/GeomConvert_ApproxCurve.hxx | 15 +- src/GeomConvert/GeomConvert_ApproxSurface.cxx | 16 +- src/GeomConvert/GeomConvert_ApproxSurface.hxx | 18 +- .../GeomEvaluator_OffsetCurve.cxx | 4 +- .../GeomEvaluator_OffsetCurve.hxx | 7 +- .../GeomEvaluator_OffsetSurface.cxx | 11 +- .../GeomEvaluator_OffsetSurface.hxx | 8 +- .../GeomEvaluator_SurfaceOfExtrusion.cxx | 4 +- .../GeomEvaluator_SurfaceOfExtrusion.hxx | 8 +- .../GeomEvaluator_SurfaceOfRevolution.cxx | 5 +- .../GeomEvaluator_SurfaceOfRevolution.hxx | 8 +- src/GeomFill/GeomFill_BoundWithSurf.cxx | 16 +- src/GeomFill/GeomFill_BoundWithSurf.hxx | 8 +- src/GeomFill/GeomFill_CircularBlendFunc.cxx | 14 +- src/GeomFill/GeomFill_CircularBlendFunc.hxx | 16 +- src/GeomFill/GeomFill_ConstantBiNormal.cxx | 4 +- src/GeomFill/GeomFill_ConstantBiNormal.hxx | 3 +- src/GeomFill/GeomFill_CorrectedFrenet.cxx | 10 +- src/GeomFill/GeomFill_CorrectedFrenet.hxx | 4 +- src/GeomFill/GeomFill_CurveAndTrihedron.cxx | 8 +- src/GeomFill/GeomFill_CurveAndTrihedron.hxx | 9 +- src/GeomFill/GeomFill_Darboux.cxx | 56 +- src/GeomFill/GeomFill_DiscreteTrihedron.cxx | 8 +- src/GeomFill/GeomFill_DiscreteTrihedron.hxx | 3 +- src/GeomFill/GeomFill_DraftTrihedron.cxx | 6 +- src/GeomFill/GeomFill_Frenet.cxx | 6 +- src/GeomFill/GeomFill_Frenet.hxx | 3 +- src/GeomFill/GeomFill_FunctionDraft.cxx | 14 +- src/GeomFill/GeomFill_FunctionDraft.hxx | 21 +- src/GeomFill/GeomFill_FunctionGuide.cxx | 8 +- src/GeomFill/GeomFill_FunctionGuide.hxx | 7 +- src/GeomFill/GeomFill_GuideTrihedronAC.cxx | 22 +- src/GeomFill/GeomFill_GuideTrihedronAC.hxx | 9 +- src/GeomFill/GeomFill_GuideTrihedronPlan.cxx | 19 +- src/GeomFill/GeomFill_GuideTrihedronPlan.hxx | 12 +- src/GeomFill/GeomFill_LocationDraft.cxx | 24 +- src/GeomFill/GeomFill_LocationDraft.hxx | 28 +- src/GeomFill/GeomFill_LocationGuide.cxx | 21 +- src/GeomFill/GeomFill_LocationGuide.hxx | 13 +- src/GeomFill/GeomFill_LocationLaw.cxx | 4 +- src/GeomFill/GeomFill_LocationLaw.hxx | 19 +- src/GeomFill/GeomFill_Pipe.cxx | 57 +- src/GeomFill/GeomFill_Pipe.hxx | 28 +- src/GeomFill/GeomFill_PlanFunc.cxx | 4 +- src/GeomFill/GeomFill_PlanFunc.hxx | 6 +- src/GeomFill/GeomFill_SectionPlacement.cxx | 40 +- src/GeomFill/GeomFill_SectionPlacement.hxx | 3 +- src/GeomFill/GeomFill_SimpleBound.cxx | 6 +- src/GeomFill/GeomFill_SimpleBound.hxx | 14 +- src/GeomFill/GeomFill_SnglrFunc.cxx | 4 +- src/GeomFill/GeomFill_SnglrFunc.hxx | 6 +- .../GeomFill_SweepSectionGenerator.cxx | 16 +- .../GeomFill_SweepSectionGenerator.hxx | 20 +- src/GeomFill/GeomFill_TrihedronLaw.cxx | 4 +- src/GeomFill/GeomFill_TrihedronLaw.hxx | 16 +- src/GeomFill/GeomFill_TrihedronWithGuide.cxx | 4 +- src/GeomFill/GeomFill_TrihedronWithGuide.hxx | 8 +- src/GeomInt/GeomInt_IntSS.cxx | 10 +- src/GeomInt/GeomInt_IntSS.hxx | 23 +- src/GeomInt/GeomInt_IntSS.lxx | 8 +- src/GeomInt/GeomInt_IntSS_1.cxx | 73 +-- src/GeomInt/GeomInt_LineConstructor.cxx | 40 +- src/GeomInt/GeomInt_LineConstructor.hxx | 21 +- src/GeomInt/GeomInt_LineConstructor.lxx | 4 +- src/GeomInt/GeomInt_LineTool.cxx | 20 +- src/GeomInt/GeomInt_LineTool.hxx | 15 +- ...heInt2SOfThePrmPrmSvSurfacesOfWLApprox.hxx | 25 +- ...Int2SOfThePrmPrmSvSurfacesOfWLApprox_0.cxx | 6 +- .../GeomInt_TheImpPrmSvSurfacesOfWLApprox.hxx | 18 +- ...eomInt_TheImpPrmSvSurfacesOfWLApprox_0.cxx | 6 +- ...heInt2SOfThePrmPrmSvSurfacesOfWLApprox.hxx | 25 +- ...Int2SOfThePrmPrmSvSurfacesOfWLApprox_0.cxx | 6 +- .../GeomInt_ThePrmPrmSvSurfacesOfWLApprox.hxx | 16 +- ...eomInt_ThePrmPrmSvSurfacesOfWLApprox_0.cxx | 6 +- ...ImpFuncOfTheImpPrmSvSurfacesOfWLApprox.hxx | 27 +- ...pFuncOfTheImpPrmSvSurfacesOfWLApprox_0.cxx | 6 +- src/GeomInt/GeomInt_WLApprox.hxx | 16 +- src/GeomInt/GeomInt_WLApprox_0.cxx | 6 +- src/GeomLib/GeomLib.cxx | 39 +- src/GeomLib/GeomLib.hxx | 18 +- src/GeomLib/GeomLib_CheckCurveOnSurface.cxx | 15 +- src/GeomPlate/GeomPlate_Array1OfHCurve.hxx | 4 +- src/GeomPlate/GeomPlate_BuildPlateSurface.cxx | 60 +-- src/GeomPlate/GeomPlate_BuildPlateSurface.hxx | 7 +- src/GeomPlate/GeomPlate_CurveConstraint.cxx | 53 +- src/GeomPlate/GeomPlate_CurveConstraint.hxx | 39 +- src/GeomPlate/GeomPlate_HArray1OfHCurve.hxx | 2 +- src/GeomProjLib/GeomProjLib.cxx | 19 +- .../GeometryTest_CurveCommands.cxx | 65 ++- .../GeomliteTest_API2dCommands.cxx | 2 +- .../GeomliteTest_CurveCommands.cxx | 32 +- .../GeomliteTest_SurfaceCommands.cxx | 1 - src/HLRBRep/HLRBRep_BSurfaceTool.cxx | 6 +- src/HLRBRep/HLRBRep_BSurfaceTool.hxx | 20 +- src/HLRBRep/HLRBRep_BSurfaceTool.lxx | 10 +- src/HLRBRep/HLRBRep_SurfaceTool.cxx | 6 +- src/HLRBRep/HLRBRep_SurfaceTool.hxx | 25 +- src/HLRBRep/HLRBRep_SurfaceTool.lxx | 12 +- .../HLRBRep_ThePolygonOfInterCSurf.hxx | 75 +-- src/HLRTopoBRep/HLRTopoBRep_DSFiller.cxx | 8 +- src/IMeshData/IMeshData_Face.hxx | 8 +- src/IVtkOCC/IVtkOCC_ShapeMesher.hxx | 2 +- src/IntCurveSurface/FILES | 1 - .../IntCurveSurface_HInter.hxx | 52 +- .../IntCurveSurface_HInter_0.cxx | 12 +- src/IntCurveSurface/IntCurveSurface_Inter.gxx | 14 +- .../IntCurveSurface_Polygon.lxx | 59 --- .../IntCurveSurface_TheCSFunctionOfHInter.hxx | 25 +- ...ntCurveSurface_TheCSFunctionOfHInter_0.cxx | 12 +- .../IntCurveSurface_TheExactHInter.hxx | 15 +- .../IntCurveSurface_TheExactHInter_0.cxx | 12 +- .../IntCurveSurface_TheHCurveTool.hxx | 63 +-- .../IntCurveSurface_TheHCurveTool_0.cxx | 6 +- .../IntCurveSurface_ThePolygonOfHInter.hxx | 92 ++-- .../IntCurveSurface_ThePolygonOfHInter_0.cxx | 6 +- .../IntCurveSurface_ThePolyhedronOfHInter.hxx | 32 +- ...ntCurveSurface_ThePolyhedronOfHInter_0.cxx | 6 +- ...IntCurveSurface_TheQuadCurvExactHInter.hxx | 34 +- ...tCurveSurface_TheQuadCurvExactHInter_0.cxx | 12 +- ...heQuadCurvFuncOfTheQuadCurvExactHInter.hxx | 15 +- ...QuadCurvFuncOfTheQuadCurvExactHInter_0.cxx | 6 +- .../IntCurvesFace_Intersector.cxx | 16 +- .../IntCurvesFace_Intersector.hxx | 19 +- .../IntCurvesFace_ShapeIntersector.cxx | 6 +- .../IntCurvesFace_ShapeIntersector.hxx | 7 +- src/IntPatch/IntPatch_ALineToWLine.cxx | 10 +- src/IntPatch/IntPatch_ALineToWLine.hxx | 13 +- src/IntPatch/IntPatch_ArcFunction.cxx | 4 +- src/IntPatch/IntPatch_ArcFunction.hxx | 27 +- src/IntPatch/IntPatch_ArcFunction.lxx | 8 +- src/IntPatch/IntPatch_CSFunction.cxx | 20 +- src/IntPatch/IntPatch_CSFunction.hxx | 22 +- src/IntPatch/IntPatch_CurvIntSurf.hxx | 16 +- src/IntPatch/IntPatch_CurvIntSurf_0.cxx | 12 +- src/IntPatch/IntPatch_HCurve2dTool.cxx | 4 +- src/IntPatch/IntPatch_HCurve2dTool.hxx | 49 +- src/IntPatch/IntPatch_HCurve2dTool.lxx | 48 +- src/IntPatch/IntPatch_HInterTool.cxx | 42 +- src/IntPatch/IntPatch_HInterTool.hxx | 55 +- src/IntPatch/IntPatch_HInterTool.lxx | 8 +- src/IntPatch/IntPatch_ImpImpIntersection.cxx | 4 +- src/IntPatch/IntPatch_ImpImpIntersection.hxx | 23 +- .../IntPatch_ImpImpIntersection_0.gxx | 48 +- .../IntPatch_ImpImpIntersection_2.gxx | 14 +- src/IntPatch/IntPatch_ImpPrmIntersection.cxx | 79 +-- src/IntPatch/IntPatch_ImpPrmIntersection.hxx | 21 +- src/IntPatch/IntPatch_Intersection.cxx | 114 ++-- src/IntPatch/IntPatch_Intersection.hxx | 36 +- src/IntPatch/IntPatch_LineConstructor.cxx | 84 +-- src/IntPatch/IntPatch_LineConstructor.hxx | 13 +- src/IntPatch/IntPatch_Point.cxx | 4 +- src/IntPatch/IntPatch_Point.hxx | 12 +- src/IntPatch/IntPatch_Point.lxx | 4 +- src/IntPatch/IntPatch_PointLine.cxx | 6 +- src/IntPatch/IntPatch_PointLine.hxx | 7 +- src/IntPatch/IntPatch_PolyArc.cxx | 4 +- src/IntPatch/IntPatch_PolyArc.hxx | 3 +- src/IntPatch/IntPatch_Polyhedron.cxx | 12 +- src/IntPatch/IntPatch_Polyhedron.hxx | 23 +- src/IntPatch/IntPatch_PrmPrmIntersection.cxx | 58 +-- src/IntPatch/IntPatch_PrmPrmIntersection.hxx | 36 +- src/IntPatch/IntPatch_RLine.cxx | 6 +- src/IntPatch/IntPatch_RLine.hxx | 14 +- src/IntPatch/IntPatch_RLine.lxx | 8 +- src/IntPatch/IntPatch_RstInt.cxx | 24 +- src/IntPatch/IntPatch_RstInt.hxx | 12 +- src/IntPatch/IntPatch_SpecialPoints.cxx | 34 +- src/IntPatch/IntPatch_SpecialPoints.hxx | 19 +- src/IntPatch/IntPatch_TheIWalking.hxx | 19 +- src/IntPatch/IntPatch_TheIWalking_0.cxx | 6 +- .../IntPatch_ThePathPointOfTheSOnBounds.hxx | 27 +- .../IntPatch_ThePathPointOfTheSOnBounds_0.cxx | 6 +- src/IntPatch/IntPatch_TheSOnBounds.hxx | 5 +- src/IntPatch/IntPatch_TheSOnBounds_0.cxx | 6 +- src/IntPatch/IntPatch_TheSearchInside.hxx | 25 +- src/IntPatch/IntPatch_TheSearchInside_0.cxx | 6 +- .../IntPatch_TheSegmentOfTheSOnBounds.hxx | 12 +- .../IntPatch_TheSegmentOfTheSOnBounds_0.cxx | 6 +- src/IntPatch/IntPatch_TheSurfFunction.hxx | 27 +- src/IntPatch/IntPatch_TheSurfFunction_0.cxx | 6 +- src/IntPatch/IntPatch_WLine.cxx | 10 +- src/IntPatch/IntPatch_WLine.hxx | 14 +- src/IntPatch/IntPatch_WLineTool.cxx | 52 +- src/IntPatch/IntPatch_WLineTool.hxx | 12 +- src/IntPolyh/IntPolyh_Intersection.cxx | 14 +- src/IntPolyh/IntPolyh_Intersection.hxx | 24 +- src/IntPolyh/IntPolyh_MaillageAffinage.cxx | 32 +- src/IntPolyh/IntPolyh_MaillageAffinage.hxx | 24 +- src/IntPolyh/IntPolyh_Point.cxx | 4 +- src/IntPolyh/IntPolyh_Point.hxx | 11 +- src/IntPolyh/IntPolyh_Tools.cxx | 12 +- src/IntPolyh/IntPolyh_Tools.hxx | 10 +- src/IntPolyh/IntPolyh_Triangle.cxx | 12 +- src/IntPolyh/IntPolyh_Triangle.hxx | 15 +- src/IntStart/IntStart_SearchOnBoundaries.gxx | 16 +- src/IntSurf/IntSurf.cxx | 6 +- src/IntSurf/IntSurf.hxx | 8 +- src/IntTools/IntTools_BeanFaceIntersector.cxx | 10 +- src/IntTools/IntTools_EdgeFace.cxx | 8 +- src/IntTools/IntTools_FClass2d.cxx | 14 +- src/IntTools/IntTools_FaceFace.cxx | 147 +++--- src/IntTools/IntTools_FaceFace.hxx | 27 +- src/IntTools/IntTools_TopolTool.cxx | 6 +- src/IntTools/IntTools_TopolTool.hxx | 13 +- src/IntTools/IntTools_WLineTool.cxx | 33 +- src/IntTools/IntTools_WLineTool.hxx | 9 +- src/IntWalk/IntWalk_PWalking.cxx | 52 +- src/IntWalk/IntWalk_PWalking.hxx | 47 +- src/IntWalk/IntWalk_TheFunctionOfTheInt2S.hxx | 25 +- .../IntWalk_TheFunctionOfTheInt2S_0.cxx | 6 +- src/IntWalk/IntWalk_TheInt2S.hxx | 26 +- src/IntWalk/IntWalk_TheInt2S_0.cxx | 6 +- src/LProp3d/LProp3d_CLProps.hxx | 18 +- src/LProp3d/LProp3d_CLProps_0.cxx | 6 +- src/LProp3d/LProp3d_CurveTool.cxx | 16 +- src/LProp3d/LProp3d_CurveTool.hxx | 16 +- src/LProp3d/LProp3d_SLProps.hxx | 48 +- src/LProp3d/LProp3d_SLProps_0.cxx | 6 +- src/LProp3d/LProp3d_SurfaceTool.cxx | 14 +- src/LProp3d/LProp3d_SurfaceTool.hxx | 24 +- src/LocOpe/LocOpe.cxx | 17 +- src/LocOpe/LocOpe_CSIntersector.cxx | 10 +- src/LocOpe/LocOpe_FindEdgesInFace.cxx | 5 +- src/LocOpe/LocOpe_SplitDrafts.cxx | 28 +- src/MAT2d/MAT2d_Circuit.cxx | 6 +- src/ProjLib/FILES | 2 - src/ProjLib/ProjLib.cxx | 4 +- src/ProjLib/ProjLib.hxx | 7 +- src/ProjLib/ProjLib_CompProjectedCurve.cxx | 104 ++-- src/ProjLib/ProjLib_CompProjectedCurve.hxx | 58 +-- src/ProjLib/ProjLib_ComputeApprox.cxx | 40 +- src/ProjLib/ProjLib_ComputeApprox.hxx | 14 +- .../ProjLib_ComputeApproxOnPolarSurface.cxx | 154 +++--- .../ProjLib_ComputeApproxOnPolarSurface.hxx | 30 +- src/ProjLib/ProjLib_HCompProjectedCurve.hxx | 72 +-- src/ProjLib/ProjLib_HCompProjectedCurve_0.cxx | 42 -- src/ProjLib/ProjLib_HProjectedCurve.hxx | 72 +-- src/ProjLib/ProjLib_HProjectedCurve_0.cxx | 42 -- src/ProjLib/ProjLib_ProjectOnPlane.cxx | 64 +-- src/ProjLib/ProjLib_ProjectOnPlane.hxx | 25 +- src/ProjLib/ProjLib_ProjectOnSurface.cxx | 20 +- src/ProjLib/ProjLib_ProjectOnSurface.hxx | 19 +- src/ProjLib/ProjLib_ProjectedCurve.cxx | 49 +- src/ProjLib/ProjLib_ProjectedCurve.hxx | 66 +-- src/PrsDim/PrsDim.cxx | 12 +- src/PrsDim/PrsDim_Dimension.cxx | 4 +- src/QABugs/QABugs_19.cxx | 11 +- src/QABugs/QABugs_20.cxx | 16 +- src/QABugs/QABugs_5.cxx | 16 +- src/SWDRAW/SWDRAW_ShapeAnalysis.cxx | 8 +- src/ShapeAnalysis/ShapeAnalysis_Edge.cxx | 12 +- src/ShapeAnalysis/ShapeAnalysis_Surface.cxx | 24 +- src/ShapeAnalysis/ShapeAnalysis_Surface.hxx | 20 +- src/ShapeAnalysis/ShapeAnalysis_Surface.lxx | 4 +- .../ShapeAnalysis_TransferParametersProj.cxx | 16 +- src/ShapeAnalysis/ShapeAnalysis_Wire.cxx | 24 +- src/ShapeConstruct/ShapeConstruct.hxx | 27 - src/ShapeConstruct/ShapeConstruct_Curve.cxx | 8 +- .../ShapeConstruct_ProjectCurveOnSurface.cxx | 10 +- src/ShapeCustom/ShapeCustom_Surface.cxx | 8 +- .../ShapeCustom_SweptToElementary.cxx | 10 +- src/ShapeFix/ShapeFix.cxx | 8 +- src/ShapeFix/ShapeFix_EdgeProjAux.cxx | 15 +- src/ShapeFix/ShapeFix_Face.cxx | 4 +- src/ShapeFix/ShapeFix_IntersectionTool.cxx | 2 +- src/ShapeFix/ShapeFix_Wire.cxx | 13 +- src/ShapeFix/ShapeFix_Wire_1.cxx | 11 +- .../ShapeUpgrade_UnifySameDomain.cxx | 6 +- src/ShapeUpgrade/ShapeUpgrade_WireDivide.cxx | 8 +- src/StdPrs/StdPrs_BRepFont.cxx | 10 +- src/StdPrs/StdPrs_BRepFont.hxx | 4 +- src/StdPrs/StdPrs_Isolines.cxx | 6 +- src/StdPrs/StdPrs_Isolines.hxx | 6 +- src/StdPrs/StdPrs_ToolRFace.cxx | 6 +- src/StdPrs/StdPrs_ToolRFace.hxx | 13 +- .../StdPrs_WFDeflectionRestrictedFace.cxx | 20 +- .../StdPrs_WFDeflectionRestrictedFace.hxx | 34 +- src/StdPrs/StdPrs_WFDeflectionSurface.cxx | 8 +- src/StdPrs/StdPrs_WFDeflectionSurface.hxx | 5 +- src/StdPrs/StdPrs_WFRestrictedFace.cxx | 18 +- src/StdPrs/StdPrs_WFRestrictedFace.hxx | 18 +- src/StdPrs/StdPrs_WFShape.cxx | 2 +- src/StdPrs/StdPrs_WFSurface.cxx | 6 +- src/StdPrs/StdPrs_WFSurface.hxx | 5 +- .../StepToTopoDS_TranslateFace.cxx | 1 - .../TopOpeBRep_EdgesIntersector.cxx | 13 +- .../TopOpeBRep_EdgesIntersector.hxx | 24 +- .../TopOpeBRep_EdgesIntersector_1.cxx | 1 - .../TopOpeBRep_FacesIntersector.cxx | 84 +-- .../TopOpeBRep_FacesIntersector.hxx | 30 +- src/TopOpeBRep/TopOpeBRep_Hctxff2d.cxx | 24 +- src/TopOpeBRep/TopOpeBRep_Hctxff2d.hxx | 23 +- src/TopOpeBRep/TopOpeBRep_LineInter.cxx | 20 +- src/TopOpeBRep/TopOpeBRep_PointClassifier.cxx | 5 +- src/TopOpeBRep/TopOpeBRep_PointClassifier.hxx | 12 +- src/TopOpeBRep/TopOpeBRep_VPointInter.cxx | 11 +- src/TopOpeBRepBuild/TopOpeBRepBuild_Tools.cxx | 4 +- .../TopOpeBRepBuild_Tools_1.cxx | 44 +- src/TopOpeBRepDS/TopOpeBRepDS_funk.cxx | 7 +- src/TopOpeBRepTool/TopOpeBRepTool_2d.cxx | 11 +- .../TopOpeBRepTool_CurveTool.cxx | 6 +- ...mlConverter_WFDeflectionRestrictedFace.cxx | 12 +- ...mlConverter_WFDeflectionRestrictedFace.hxx | 18 +- .../VrmlConverter_WFDeflectionShape.cxx | 8 +- .../VrmlConverter_WFRestrictedFace.cxx | 10 +- .../VrmlConverter_WFRestrictedFace.hxx | 18 +- src/VrmlConverter/VrmlConverter_WFShape.cxx | 8 +- 710 files changed, 6144 insertions(+), 14175 deletions(-) delete mode 100644 src/Adaptor2d/Adaptor2d_GenHCurve2d.gxx delete mode 100644 src/Adaptor2d/Adaptor2d_GenHCurve2d.lxx delete mode 100644 src/Adaptor2d/Adaptor2d_HCurve2d.cxx delete mode 100644 src/Adaptor2d/Adaptor2d_HCurve2d.hxx delete mode 100644 src/Adaptor2d/Adaptor2d_HCurve2d.lxx delete mode 100644 src/Adaptor2d/Adaptor2d_HLine2d.hxx delete mode 100644 src/Adaptor2d/Adaptor2d_HLine2d_0.cxx delete mode 100644 src/Adaptor2d/Adaptor2d_HOffsetCurve.hxx delete mode 100644 src/Adaptor2d/Adaptor2d_HOffsetCurve_0.cxx delete mode 100644 src/Adaptor2d/Adaptor2d_OffsetCurve.lxx delete mode 100644 src/Adaptor3d/Adaptor3d_GenHCurve.gxx delete mode 100644 src/Adaptor3d/Adaptor3d_GenHCurve.lxx delete mode 100644 src/Adaptor3d/Adaptor3d_GenHSurface.gxx delete mode 100644 src/Adaptor3d/Adaptor3d_GenHSurface.lxx delete mode 100644 src/Adaptor3d/Adaptor3d_HCurve.cxx delete mode 100644 src/Adaptor3d/Adaptor3d_HCurve.hxx delete mode 100644 src/Adaptor3d/Adaptor3d_HCurve.lxx delete mode 100644 src/Adaptor3d/Adaptor3d_HCurveOnSurface.hxx delete mode 100644 src/Adaptor3d/Adaptor3d_HCurveOnSurface_0.cxx delete mode 100644 src/Adaptor3d/Adaptor3d_HIsoCurve.hxx delete mode 100644 src/Adaptor3d/Adaptor3d_HIsoCurve_0.cxx delete mode 100644 src/Adaptor3d/Adaptor3d_HSurface.cxx delete mode 100644 src/Adaptor3d/Adaptor3d_HSurface.hxx delete mode 100644 src/Adaptor3d/Adaptor3d_HSurface.lxx delete mode 100644 src/Adaptor3d/Adaptor3d_HSurfaceTool.lxx delete mode 100644 src/Adaptor3d/Adaptor3d_IsoCurve.lxx delete mode 100644 src/BRepAdaptor/BRepAdaptor_HCompCurve.hxx delete mode 100644 src/BRepAdaptor/BRepAdaptor_HCompCurve_0.cxx delete mode 100644 src/BRepAdaptor/BRepAdaptor_HCurve.hxx delete mode 100644 src/BRepAdaptor/BRepAdaptor_HCurve2d.hxx delete mode 100644 src/BRepAdaptor/BRepAdaptor_HCurve2d_0.cxx delete mode 100644 src/BRepAdaptor/BRepAdaptor_HCurve_0.cxx delete mode 100644 src/BRepAdaptor/BRepAdaptor_HSurface.hxx delete mode 100644 src/BRepAdaptor/BRepAdaptor_HSurface_0.cxx delete mode 100644 src/BRepAdaptor/BRepAdaptor_Surface.lxx delete mode 100644 src/BiTgte/BiTgte_HCurveOnEdge.hxx delete mode 100644 src/BiTgte/BiTgte_HCurveOnEdge_0.cxx delete mode 100644 src/BiTgte/BiTgte_HCurveOnVertex.hxx delete mode 100644 src/BiTgte/BiTgte_HCurveOnVertex_0.cxx delete mode 100644 src/ChFiDS/ChFiDS_HElSpine.hxx delete mode 100644 src/ChFiDS/ChFiDS_HElSpine_0.cxx delete mode 100644 src/Geom2dAdaptor/Geom2dAdaptor_Curve.lxx delete mode 100644 src/Geom2dAdaptor/Geom2dAdaptor_GHCurve.hxx delete mode 100644 src/Geom2dAdaptor/Geom2dAdaptor_GHCurve_0.cxx delete mode 100644 src/Geom2dAdaptor/Geom2dAdaptor_HCurve.cxx delete mode 100644 src/Geom2dAdaptor/Geom2dAdaptor_HCurve.hxx delete mode 100644 src/GeomAdaptor/GeomAdaptor_Curve.lxx delete mode 100644 src/GeomAdaptor/GeomAdaptor_GHCurve.hxx delete mode 100644 src/GeomAdaptor/GeomAdaptor_GHCurve_0.cxx delete mode 100644 src/GeomAdaptor/GeomAdaptor_GHSurface.hxx delete mode 100644 src/GeomAdaptor/GeomAdaptor_GHSurface_0.cxx delete mode 100644 src/GeomAdaptor/GeomAdaptor_HCurve.cxx delete mode 100644 src/GeomAdaptor/GeomAdaptor_HCurve.hxx delete mode 100644 src/GeomAdaptor/GeomAdaptor_HCurve.lxx delete mode 100644 src/GeomAdaptor/GeomAdaptor_HSurface.cxx delete mode 100644 src/GeomAdaptor/GeomAdaptor_HSurface.hxx delete mode 100644 src/GeomAdaptor/GeomAdaptor_HSurface.lxx delete mode 100644 src/GeomAdaptor/GeomAdaptor_HSurfaceOfLinearExtrusion.hxx delete mode 100644 src/GeomAdaptor/GeomAdaptor_HSurfaceOfLinearExtrusion_0.cxx delete mode 100644 src/GeomAdaptor/GeomAdaptor_HSurfaceOfRevolution.hxx delete mode 100644 src/GeomAdaptor/GeomAdaptor_HSurfaceOfRevolution_0.cxx delete mode 100644 src/GeomAdaptor/GeomAdaptor_Surface.lxx delete mode 100644 src/IntCurveSurface/IntCurveSurface_Polygon.lxx delete mode 100644 src/ProjLib/ProjLib_HCompProjectedCurve_0.cxx delete mode 100644 src/ProjLib/ProjLib_HProjectedCurve_0.cxx diff --git a/adm/upgrade.dat b/adm/upgrade.dat index ff200b9d43..cc120fb3b4 100644 --- a/adm/upgrade.dat +++ b/adm/upgrade.dat @@ -72,6 +72,28 @@ BOPCol_Box2DBndTreeSelector BOPTools_BoxSelector BiTgte_DataMapOfShapeBox TopTools_DataMapOfShapeBox CDM_MessageDriver Message_Messenger Message_ProgressSentry Message_ProgressScope +Adaptor2d_HCurve2d Adaptor2d_Curve2d +Adaptor2d_HLine2d Adaptor2d_Line2d +Adaptor2d_HOffsetCurve Adaptor2d_OffsetCurve +Adaptor3d_HCurve Adaptor3d_Curve +Adaptor3d_HCurveOnSurface Adaptor3d_CurveOnSurface +Adaptor3d_HIsoCurve Adaptor3d_IsoCurve +Adaptor3d_HSurface Adaptor3d_Surface +BRepAdaptor_HCompCurve BRepAdaptor_CompCurve +BRepAdaptor_HCurve BRepAdaptor_Curve +BRepAdaptor_HCurve2d BRepAdaptor_Curve2d +BRepAdaptor_HSurface BRepAdaptor_Surface +BiTgte_HCurveOnEdge BiTgte_CurveOnEdge +BiTgte_HCurveOnVertex BiTgte_CurveOnVertex +ChFiDS_HElSpine ChFiDS_ElSpine +Geom2dAdaptor_GHCurve Geom2dAdaptor_Curve +Geom2dAdaptor_HCurve Geom2dAdaptor_Curve +GeomAdaptor_GHCurve GeomAdaptor_Curve +GeomAdaptor_GHSurface GeomAdaptor_Surface +GeomAdaptor_HCurve GeomAdaptor_Curve +GeomAdaptor_HSurface GeomAdaptor_Surface +GeomAdaptor_HSurfaceOfLinearExtrusion GeomAdaptor_SurfaceOfLinearExtrusion +GeomAdaptor_HSurfaceOfRevolution GeomAdaptor_SurfaceOfRevolution [tcollection] AdvApp2Var_SequenceOfNode diff --git a/dox/upgrade/upgrade.md b/dox/upgrade/upgrade.md index 80b8cbc9a6..3bacb4ebce 100644 --- a/dox/upgrade/upgrade.md +++ b/dox/upgrade/upgrade.md @@ -2159,6 +2159,15 @@ Existing message files containing 8-bit characters (previously interpreted as ch @section upgrade_occt760 Upgrade to OCCT 7.6.0 +@subsection upgrade_760_handle_adaptors Simplification of surface/curve adaptor + +Interfaces *Adaptor2d_Curve2d*, *Adaptor3d_Curve* and *Adaptor3d_Surface* now inherit Standard_Transient and can be Handle-managed. +No more necessary parallel hiererchy of classes *Adaptor2d_HCurve2d*, *Adaptor3d_HCurve* and *Adaptor3d_HSurface* (generated from generic templates by WOK) has been eliminated. +Existing code using old Handle classes should be updated to: +* Rename occurrences of old names (remove H suffix); upgrade.bat could be used for that purpose. +* Replace redundant calls to previously declared methods .GetCurve2d()/.GetCurve()/.GetSurface() with the common operator->() syntax. +* Pay attention on code calling GetSurface()/GetCurve() methods of removed handle classes. Such places should be replaced with Handle dereference. + @subsection upgrade_760_extendedstring_cout Output of TCollection_ExtendedString to stream Behavior of the method TCollection_ExtendedString::Print(Standard_OStream&) and corresponding operator << has changed. diff --git a/samples/mfc/standard/01_Geometry/src/GeomSources.cpp b/samples/mfc/standard/01_Geometry/src/GeomSources.cpp index 3be3305fa4..c59e5bd156 100755 --- a/samples/mfc/standard/01_Geometry/src/GeomSources.cpp +++ b/samples/mfc/standard/01_Geometry/src/GeomSources.cpp @@ -3036,13 +3036,13 @@ void GeomSources::gpTest39(CGeometryDoc* aDoc) Handle(Geom_BSplineCurve) SPL2 = GeomAPI_PointsToBSpline(array2).Curve(); Handle(Geom_BSplineCurve) SPL3 = GeomAPI_PointsToBSpline(array3).Curve(); - Handle(GeomAdaptor_HCurve) SPL1Adaptor = new GeomAdaptor_HCurve(SPL1); + Handle(GeomAdaptor_Curve) SPL1Adaptor = new GeomAdaptor_Curve(SPL1); Handle(GeomFill_SimpleBound) B1 = new GeomFill_SimpleBound(SPL1Adaptor,Precision::Approximation(),Precision::Angular()); - Handle(GeomAdaptor_HCurve) SPL2Adaptor = new GeomAdaptor_HCurve(SPL2); + Handle(GeomAdaptor_Curve) SPL2Adaptor = new GeomAdaptor_Curve(SPL2); Handle(GeomFill_SimpleBound) B2 = new GeomFill_SimpleBound(SPL2Adaptor,Precision::Approximation(),Precision::Angular()); - Handle(GeomAdaptor_HCurve) SPL3Adaptor = new GeomAdaptor_HCurve(SPL3); + Handle(GeomAdaptor_Curve) SPL3Adaptor = new GeomAdaptor_Curve(SPL3); Handle(GeomFill_SimpleBound) B3 = new GeomFill_SimpleBound(SPL3Adaptor,Precision::Approximation(),Precision::Angular()); Standard_Boolean NoCheck= Standard_False; @@ -3064,13 +3064,13 @@ Handle(Geom_BSplineCurve) SPL1 = GeomAPI_PointsToBSpline(array1).Curve(); Handle(Geom_BSplineCurve) SPL2 = GeomAPI_PointsToBSpline(array2).Curve(); \n\ Handle(Geom_BSplineCurve) SPL3 = GeomAPI_PointsToBSpline(array3).Curve(); \n\ \n\ -Handle(GeomAdaptor_HCurve) SPL1Adaptor = new GeomAdaptor_HCurve(SPL1); \n\ +Handle(GeomAdaptor_Curve) SPL1Adaptor = new GeomAdaptor_Curve(SPL1); \n\ Handle(GeomFill_SimpleBound) B1 = \n\ new GeomFill_SimpleBound(SPL1Adaptor,Precision::Approximation(),Precision::Angular()); \n\ -Handle(GeomAdaptor_HCurve) SPL2Adaptor = new GeomAdaptor_HCurve(SPL2); \n\ +Handle(GeomAdaptor_Curve) SPL2Adaptor = new GeomAdaptor_Curve(SPL2); \n\ Handle(GeomFill_SimpleBound) B2 = \n\ new GeomFill_SimpleBound(SPL2Adaptor,Precision::Approximation(),Precision::Angular()); \n\ -Handle(GeomAdaptor_HCurve) SPL3Adaptor = new GeomAdaptor_HCurve(SPL3); \n\ +Handle(GeomAdaptor_Curve) SPL3Adaptor = new GeomAdaptor_Curve(SPL3); \n\ Handle(GeomFill_SimpleBound) B3 = \n\ new GeomFill_SimpleBound(SPL3Adaptor,Precision::Approximation(),Precision::Angular()); \n\ Standard_Boolean NoCheck= Standard_False; \n\ diff --git a/samples/mfc/standard/01_Geometry/src/ISession2D/ISession_Surface.cpp b/samples/mfc/standard/01_Geometry/src/ISession2D/ISession_Surface.cpp index ff9298a035..a9147a180e 100755 --- a/samples/mfc/standard/01_Geometry/src/ISession2D/ISession_Surface.cpp +++ b/samples/mfc/standard/01_Geometry/src/ISession2D/ISession_Surface.cpp @@ -5,7 +5,7 @@ #include "stdafx.h" #include "..\\GeometryApp.h" #include "ISession_Surface.h" -#include +#include #include #include #include @@ -23,7 +23,7 @@ void ISession_Surface::Compute (const Handle(PrsMgr_PresentationManager3d)& , const Standard_Integer theMode) { GeomAdaptor_Surface anAdaptorSurface (mySurface); - Handle(GeomAdaptor_HSurface) anAdaptorHSurface = new GeomAdaptor_HSurface (mySurface); + Handle(GeomAdaptor_Surface) anAdaptorHSurface = new GeomAdaptor_Surface (mySurface); Handle(Prs3d_Drawer) aPoleDrawer = new Prs3d_Drawer(); aPoleDrawer->SetLineAspect (new Prs3d_LineAspect (Quantity_NOC_YELLOW3, Aspect_TOL_SOLID, 1.0)); diff --git a/samples/mfc/standard/01_Geometry/src/StdAfx.h b/samples/mfc/standard/01_Geometry/src/StdAfx.h index bf7d6259e5..0bd735f658 100755 --- a/samples/mfc/standard/01_Geometry/src/StdAfx.h +++ b/samples/mfc/standard/01_Geometry/src/StdAfx.h @@ -161,9 +161,7 @@ #include #include #include -#include #include -#include #include #include #include diff --git a/samples/mfc/standard/02_Modeling/src/ModelingDoc.cpp b/samples/mfc/standard/02_Modeling/src/ModelingDoc.cpp index e784af2282..951a7971cf 100755 --- a/samples/mfc/standard/02_Modeling/src/ModelingDoc.cpp +++ b/samples/mfc/standard/02_Modeling/src/ModelingDoc.cpp @@ -12,7 +12,6 @@ #include "ISession_Direction.h" #include "..\res\resource.h" -#include #include #include #include @@ -4660,14 +4659,14 @@ void CModelingDoc::OnStopStop() BRepAdaptor_Surface S(F); GeomAdaptor_Surface aGAS = S.Surface(); - Handle(GeomAdaptor_HSurface) aHGAS = new GeomAdaptor_HSurface(aGAS); + Handle(GeomAdaptor_Surface) aHGAS = new GeomAdaptor_Surface(aGAS); - Handle(BRepAdaptor_HCurve2d) C = new BRepAdaptor_HCurve2d(); - C->ChangeCurve2d().Initialize(E,F); + Handle(BRepAdaptor_Curve2d) C = new BRepAdaptor_Curve2d(); + C->Initialize(E,F); Adaptor3d_CurveOnSurface ConS(C,aHGAS); - Handle (Adaptor3d_HCurveOnSurface) HConS = new Adaptor3d_HCurveOnSurface(ConS); + Handle (Adaptor3d_CurveOnSurface) HConS = new Adaptor3d_CurveOnSurface(ConS); Fronts->SetValue(i,HConS); } GeomPlate_BuildPlateSurface abuildplate(NbPtsCur,Fronts,Tang,3); diff --git a/samples/mfc/standard/02_Modeling/src/StdAfx.h b/samples/mfc/standard/02_Modeling/src/StdAfx.h index 2fece811c0..47650a2bbd 100755 --- a/samples/mfc/standard/02_Modeling/src/StdAfx.h +++ b/samples/mfc/standard/02_Modeling/src/StdAfx.h @@ -111,8 +111,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include diff --git a/src/Adaptor2d/Adaptor2d_Curve2d.cxx b/src/Adaptor2d/Adaptor2d_Curve2d.cxx index aabbf95842..3df4666d44 100644 --- a/src/Adaptor2d/Adaptor2d_Curve2d.cxx +++ b/src/Adaptor2d/Adaptor2d_Curve2d.cxx @@ -16,7 +16,6 @@ #include -#include #include #include #include @@ -31,6 +30,8 @@ #include #include +IMPLEMENT_STANDARD_RTTIEXT(Adaptor2d_Curve2d, Standard_Transient) + //======================================================================= //function : ~Adaptor2d_Curve2d //purpose : Destructor @@ -103,10 +104,10 @@ void Adaptor2d_Curve2d::Intervals(TColStd_Array1OfReal& , //purpose : //======================================================================= -//Handle(Adaptor2d_HCurve2d) Adaptor2d_Curve2d::Trim(const Standard_Real First, +//Handle(Adaptor2d_Curve2d) Adaptor2d_Curve2d::Trim(const Standard_Real First, // const Standard_Real Last , // const Standard_Real Tol) const -Handle(Adaptor2d_HCurve2d) Adaptor2d_Curve2d::Trim(const Standard_Real , +Handle(Adaptor2d_Curve2d) Adaptor2d_Curve2d::Trim(const Standard_Real , const Standard_Real , const Standard_Real ) const { diff --git a/src/Adaptor2d/Adaptor2d_Curve2d.hxx b/src/Adaptor2d/Adaptor2d_Curve2d.hxx index 5b9dad340e..ae14128738 100644 --- a/src/Adaptor2d/Adaptor2d_Curve2d.hxx +++ b/src/Adaptor2d/Adaptor2d_Curve2d.hxx @@ -17,30 +17,27 @@ #ifndef _Adaptor2d_Curve2d_HeaderFile #define _Adaptor2d_Curve2d_HeaderFile +#include +#include +#include +#include +#include +#include +#include #include #include #include - -#include -#include -#include #include -#include -#include + class Standard_OutOfRange; class Standard_NoSuchObject; class Standard_DomainError; -class Adaptor2d_HCurve2d; class gp_Pnt2d; class gp_Vec2d; -class gp_Lin2d; -class gp_Circ2d; -class gp_Elips2d; -class gp_Hypr2d; -class gp_Parab2d; class Geom2d_BezierCurve; class Geom2d_BSplineCurve; +DEFINE_STANDARD_HANDLE(Adaptor2d_Curve2d, Standard_Transient) //! Root class for 2D curves on which geometric //! algorithms work. @@ -53,12 +50,10 @@ class Geom2d_BSplineCurve; //! Polynomial coefficients of BSpline curves used for their evaluation are //! cached for better performance. Therefore these evaluations are not //! thread-safe and parallel evaluations need to be prevented. -class Adaptor2d_Curve2d +class Adaptor2d_Curve2d : public Standard_Transient { + DEFINE_STANDARD_RTTIEXT(Adaptor2d_Curve2d, Standard_Transient) public: - - DEFINE_STANDARD_ALLOC - Standard_EXPORT virtual Standard_Real FirstParameter() const; @@ -82,7 +77,7 @@ public: //! parameters and . is used to //! test for 3d points confusion. //! If >= - Standard_EXPORT virtual Handle(Adaptor2d_HCurve2d) Trim (const Standard_Real First, const Standard_Real Last, const Standard_Real Tol) const; + Standard_EXPORT virtual Handle(Adaptor2d_Curve2d) Trim (const Standard_Real First, const Standard_Real Last, const Standard_Real Tol) const; Standard_EXPORT virtual Standard_Boolean IsClosed() const; @@ -158,27 +153,6 @@ public: Standard_EXPORT virtual Handle(Geom2d_BSplineCurve) BSpline() const; Standard_EXPORT virtual ~Adaptor2d_Curve2d(); - - - -protected: - - - - - -private: - - - - - }; - - - - - - #endif // _Adaptor2d_Curve2d_HeaderFile diff --git a/src/Adaptor2d/Adaptor2d_GenHCurve2d.gxx b/src/Adaptor2d/Adaptor2d_GenHCurve2d.gxx deleted file mode 100644 index 7a1e4d3b9c..0000000000 --- a/src/Adaptor2d/Adaptor2d_GenHCurve2d.gxx +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - -//======================================================================= -//function : Adaptor2d_GenHCurve2d -//purpose : -//======================================================================= - -Adaptor2d_GenHCurve2d::Adaptor2d_GenHCurve2d () {} - -//======================================================================= -//function : Adaptor2d_GenHCurve2d -//purpose : -//======================================================================= - -Adaptor2d_GenHCurve2d::Adaptor2d_GenHCurve2d (const TheCurve& C): - myCurve(C) -{} - -//======================================================================= -//function : Set -//purpose : -//======================================================================= - -void Adaptor2d_GenHCurve2d::Set(const TheCurve& C) -{ - myCurve = C; -} - -//======================================================================= -//function : Curve2d -//purpose : -//======================================================================= - -const Adaptor2d_Curve2d& Adaptor2d_GenHCurve2d::Curve2d () const -{ - return myCurve; -} diff --git a/src/Adaptor2d/Adaptor2d_GenHCurve2d.lxx b/src/Adaptor2d/Adaptor2d_GenHCurve2d.lxx deleted file mode 100644 index 054ea2a50b..0000000000 --- a/src/Adaptor2d/Adaptor2d_GenHCurve2d.lxx +++ /dev/null @@ -1,20 +0,0 @@ -// Created on: 1995-05-09 -// Created by: Xavier BENVENISTE -// Copyright (c) 1995-1999 Matra Datavision -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - -inline TheCurve& Adaptor2d_GenHCurve2d::ChangeCurve2d() -{ - return myCurve; -} diff --git a/src/Adaptor2d/Adaptor2d_HCurve2d.cxx b/src/Adaptor2d/Adaptor2d_HCurve2d.cxx deleted file mode 100644 index 479d155470..0000000000 --- a/src/Adaptor2d/Adaptor2d_HCurve2d.cxx +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -IMPLEMENT_STANDARD_RTTIEXT(Adaptor2d_HCurve2d,Standard_Transient) \ No newline at end of file diff --git a/src/Adaptor2d/Adaptor2d_HCurve2d.hxx b/src/Adaptor2d/Adaptor2d_HCurve2d.hxx deleted file mode 100644 index 1e2f815751..0000000000 --- a/src/Adaptor2d/Adaptor2d_HCurve2d.hxx +++ /dev/null @@ -1,127 +0,0 @@ -// Created on: 1994-02-23 -// Created by: model -// Copyright (c) 1994-1999 Matra Datavision -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - -#ifndef _Adaptor2d_HCurve2d_HeaderFile -#define _Adaptor2d_HCurve2d_HeaderFile - -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -class Adaptor2d_Curve2d; -class gp_Pnt2d; -class gp_Vec2d; - - -class Adaptor2d_HCurve2d; -DEFINE_STANDARD_HANDLE(Adaptor2d_HCurve2d, Standard_Transient) - -//! Root class for 2D curves manipulated by handles, on -//! which geometric algorithms work. -//! An adapted curve is an interface between the -//! services provided by a curve, and those required of -//! the curve by algorithms, which use it. -//! A derived specific class is provided: -//! Geom2dAdaptor_HCurve for a curve from the Geom2d package. -class Adaptor2d_HCurve2d : public Standard_Transient -{ - -public: - - - //! Returns a reference to the Curve2d inside the HCurve2d. - Standard_EXPORT virtual const Adaptor2d_Curve2d& Curve2d() const = 0; - - Standard_Real FirstParameter() const; - - Standard_Real LastParameter() const; - - GeomAbs_Shape Continuity() const; - - Standard_Integer NbIntervals (const GeomAbs_Shape S) const; - - void Intervals (TColStd_Array1OfReal& T, const GeomAbs_Shape S) const; - - //! If >= - Handle(Adaptor2d_HCurve2d) Trim (const Standard_Real First, const Standard_Real Last, const Standard_Real Tol) const; - - Standard_Boolean IsClosed() const; - - Standard_Boolean IsPeriodic() const; - - Standard_Real Period() const; - - gp_Pnt2d Value (const Standard_Real U) const; - - void D0 (const Standard_Real U, gp_Pnt2d& P) const; - - void D1 (const Standard_Real U, gp_Pnt2d& P, gp_Vec2d& V) const; - - void D2 (const Standard_Real U, gp_Pnt2d& P, gp_Vec2d& V1, gp_Vec2d& V2) const; - - void D3 (const Standard_Real U, gp_Pnt2d& P, gp_Vec2d& V1, gp_Vec2d& V2, gp_Vec2d& V3) const; - - gp_Vec2d DN (const Standard_Real U, const Standard_Integer N) const; - - Standard_Real Resolution (const Standard_Real R3d) const; - - GeomAbs_CurveType GetType() const; - - gp_Lin2d Line() const; - - gp_Circ2d Circle() const; - - gp_Elips2d Ellipse() const; - - gp_Hypr2d Hyperbola() const; - - gp_Parab2d Parabola() const; - - Standard_Integer Degree() const; - - Standard_Boolean IsRational() const; - - Standard_Integer NbPoles() const; - - Standard_Integer NbKnots() const; - - Handle(Geom2d_BezierCurve) Bezier() const; - - virtual Handle(Geom2d_BSplineCurve) BSpline() const; - - - DEFINE_STANDARD_RTTIEXT(Adaptor2d_HCurve2d,Standard_Transient) -}; - -#include - -#endif // _Adaptor2d_HCurve2d_HeaderFile diff --git a/src/Adaptor2d/Adaptor2d_HCurve2d.lxx b/src/Adaptor2d/Adaptor2d_HCurve2d.lxx deleted file mode 100644 index c8d728dc03..0000000000 --- a/src/Adaptor2d/Adaptor2d_HCurve2d.lxx +++ /dev/null @@ -1,296 +0,0 @@ -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - -#include - -//======================================================================= -//function : FirstParameter -//purpose : -//======================================================================= - -inline Standard_Real Adaptor2d_HCurve2d::FirstParameter() const -{ - return Curve2d().FirstParameter(); -} - -//======================================================================= -//function : LastParameter -//purpose : -//======================================================================= - - inline Standard_Real Adaptor2d_HCurve2d::LastParameter() const -{ - return Curve2d().LastParameter(); -} - -//======================================================================= -//function : Continuity -//purpose : -//======================================================================= - - inline GeomAbs_Shape Adaptor2d_HCurve2d::Continuity() const -{ - return Curve2d().Continuity(); -} - -//======================================================================= -//function : NbIntervals -//purpose : -//======================================================================= - - inline Standard_Integer Adaptor2d_HCurve2d::NbIntervals(const GeomAbs_Shape S) const -{ - return Curve2d().NbIntervals(S); -} - -//======================================================================= -//function : Intervals -//purpose : -//======================================================================= - - inline void Adaptor2d_HCurve2d::Intervals(TColStd_Array1OfReal& T, - const GeomAbs_Shape S) const -{ - Curve2d().Intervals(T,S); -} - -//======================================================================= -//function : Trim -//purpose : -//======================================================================= - - inline Handle(Adaptor2d_HCurve2d) Adaptor2d_HCurve2d::Trim - (const Standard_Real First, - const Standard_Real Last, - const Standard_Real Tol) const -{ - return Curve2d().Trim(First,Last,Tol); -} - -//======================================================================= -//function : IsClosed -//purpose : -//======================================================================= - - inline Standard_Boolean Adaptor2d_HCurve2d::IsClosed() const -{ - return Curve2d().IsClosed(); -} - -//======================================================================= -//function : IsPeriodic -//purpose : -//======================================================================= - - inline Standard_Boolean Adaptor2d_HCurve2d::IsPeriodic() const -{ - return Curve2d().IsPeriodic(); -} - -//======================================================================= -//function : Period -//purpose : -//======================================================================= - - inline Standard_Real Adaptor2d_HCurve2d::Period() const -{ - return Curve2d().Period(); -} - -//======================================================================= -//function : Value -//purpose : -//======================================================================= - - inline gp_Pnt2d Adaptor2d_HCurve2d::Value(const Standard_Real U) const -{ - return Curve2d().Value(U); -} - -//======================================================================= -//function : D0 -//purpose : -//======================================================================= - - inline void Adaptor2d_HCurve2d::D0(const Standard_Real U, gp_Pnt2d& P) const -{ - Curve2d().D0(U,P); -} - -//======================================================================= -//function : D1 -//purpose : -//======================================================================= - - inline void Adaptor2d_HCurve2d::D1(const Standard_Real U, gp_Pnt2d& P, gp_Vec2d& V) const -{ - Curve2d().D1(U,P,V); -} - -//======================================================================= -//function : D2 -//purpose : -//======================================================================= - - inline void Adaptor2d_HCurve2d::D2(const Standard_Real U, gp_Pnt2d& P, gp_Vec2d& V1, gp_Vec2d& V2) const -{ - Curve2d().D2(U,P,V1,V2); -} - -//======================================================================= -//function : D3 -//purpose : -//======================================================================= - - inline void Adaptor2d_HCurve2d::D3(const Standard_Real U, gp_Pnt2d& P, gp_Vec2d& V1, gp_Vec2d& V2, gp_Vec2d& V3) const -{ - Curve2d().D3(U,P,V1,V2,V3); -} - -//======================================================================= -//function : DN -//purpose : -//======================================================================= - - inline gp_Vec2d Adaptor2d_HCurve2d::DN(const Standard_Real U, const Standard_Integer N) const -{ - return Curve2d().DN(U,N); -} - -//======================================================================= -//function : Resolution -//purpose : -//======================================================================= - - inline Standard_Real Adaptor2d_HCurve2d::Resolution(const Standard_Real R3d) const -{ - return Curve2d().Resolution(R3d); -} - -//======================================================================= -//function : GetType -//purpose : -//======================================================================= - - inline GeomAbs_CurveType Adaptor2d_HCurve2d::GetType() const -{ - return Curve2d().GetType(); -} - -//======================================================================= -//function : Line -//purpose : -//======================================================================= - - inline gp_Lin2d Adaptor2d_HCurve2d::Line() const -{ - return Curve2d().Line(); -} - -//======================================================================= -//function : Circle -//purpose : -//======================================================================= - - inline gp_Circ2d Adaptor2d_HCurve2d::Circle() const -{ - return Curve2d().Circle(); -} - -//======================================================================= -//function : Ellipse -//purpose : -//======================================================================= - - inline gp_Elips2d Adaptor2d_HCurve2d::Ellipse() const -{ - return Curve2d().Ellipse(); -} - -//======================================================================= -//function : Hyperbola -//purpose : -//======================================================================= - - inline gp_Hypr2d Adaptor2d_HCurve2d::Hyperbola() const -{ - return Curve2d().Hyperbola(); -} - -//======================================================================= -//function : Parabola -//purpose : -//======================================================================= - - inline gp_Parab2d Adaptor2d_HCurve2d::Parabola() const -{ - return Curve2d().Parabola(); -} - -//======================================================================= -//function : Degree -//purpose : -//======================================================================= - -inline Standard_Integer Adaptor2d_HCurve2d::Degree() const -{ - return Curve2d().Degree() ; - } -//======================================================================= -//function : IsRational -//purpose : -//======================================================================= - -inline Standard_Boolean Adaptor2d_HCurve2d::IsRational() const -{ - return Curve2d().IsRational() ; -} -//======================================================================= -//function : NbPoles -//purpose : -//======================================================================= -inline Standard_Integer Adaptor2d_HCurve2d::NbPoles() const -{ - return Curve2d().NbPoles() ; -} -//======================================================================= -//function : NbKnots -//purpose : -//======================================================================= - -inline Standard_Integer Adaptor2d_HCurve2d::NbKnots() const -{ - return Curve2d().NbKnots() ; -} - - -//======================================================================= -//function : Bezier -//purpose : -//======================================================================= - - inline Handle(Geom2d_BezierCurve) Adaptor2d_HCurve2d::Bezier() const -{ - return Curve2d().Bezier(); -} - -//======================================================================= -//function : BSpline -//purpose : -//======================================================================= - - inline Handle(Geom2d_BSplineCurve) Adaptor2d_HCurve2d::BSpline() const -{ - return Curve2d().BSpline(); -} - diff --git a/src/Adaptor2d/Adaptor2d_HLine2d.hxx b/src/Adaptor2d/Adaptor2d_HLine2d.hxx deleted file mode 100644 index de28c8d272..0000000000 --- a/src/Adaptor2d/Adaptor2d_HLine2d.hxx +++ /dev/null @@ -1,93 +0,0 @@ -// Created on: 1992-10-08 -// Created by: Isabelle GRIGNON -// Copyright (c) 1992-1999 Matra Datavision -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - -#ifndef _Adaptor2d_HLine2d_HeaderFile -#define _Adaptor2d_HLine2d_HeaderFile - -#include -#include - -#include -#include -class Standard_OutOfRange; -class Standard_NoSuchObject; -class Standard_DomainError; -class Adaptor2d_Line2d; -class Adaptor2d_Curve2d; - - -class Adaptor2d_HLine2d; -DEFINE_STANDARD_HANDLE(Adaptor2d_HLine2d, Adaptor2d_HCurve2d) - - -class Adaptor2d_HLine2d : public Adaptor2d_HCurve2d -{ - -public: - - - //! Creates an empty GenHCurve2d. - Standard_EXPORT Adaptor2d_HLine2d(); - - //! Creates a GenHCurve2d from a Curve - Standard_EXPORT Adaptor2d_HLine2d(const Adaptor2d_Line2d& C); - - //! Sets the field of the GenHCurve2d. - Standard_EXPORT void Set (const Adaptor2d_Line2d& C); - - //! Returns the curve used to create the GenHCurve2d. - //! This is redefined from HCurve2d, cannot be inline. - Standard_EXPORT const Adaptor2d_Curve2d& Curve2d() const Standard_OVERRIDE; - - //! Returns the curve used to create the GenHCurve. - Adaptor2d_Line2d& ChangeCurve2d(); - - - - - DEFINE_STANDARD_RTTI_INLINE(Adaptor2d_HLine2d,Adaptor2d_HCurve2d) - -protected: - - - Adaptor2d_Line2d myCurve; - - -private: - - - - -}; - -#define TheCurve Adaptor2d_Line2d -#define TheCurve_hxx -#define Adaptor2d_GenHCurve2d Adaptor2d_HLine2d -#define Adaptor2d_GenHCurve2d_hxx -#define Handle_Adaptor2d_GenHCurve2d Handle(Adaptor2d_HLine2d) - -#include - -#undef TheCurve -#undef TheCurve_hxx -#undef Adaptor2d_GenHCurve2d -#undef Adaptor2d_GenHCurve2d_hxx -#undef Handle_Adaptor2d_GenHCurve2d - - - - -#endif // _Adaptor2d_HLine2d_HeaderFile diff --git a/src/Adaptor2d/Adaptor2d_HLine2d_0.cxx b/src/Adaptor2d/Adaptor2d_HLine2d_0.cxx deleted file mode 100644 index 2f143dace6..0000000000 --- a/src/Adaptor2d/Adaptor2d_HLine2d_0.cxx +++ /dev/null @@ -1,42 +0,0 @@ -// Created on: 1992-10-08 -// Created by: Isabelle GRIGNON -// Copyright (c) 1992-1999 Matra Datavision -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - -#include - -#include - -#include -#include -#include -#include -#include - - - - - - - - - - -#define TheCurve Adaptor2d_Line2d -#define TheCurve_hxx -#define Adaptor2d_GenHCurve2d Adaptor2d_HLine2d -#define Adaptor2d_GenHCurve2d_hxx -#define Handle_Adaptor2d_GenHCurve2d Handle(Adaptor2d_HLine2d) -#include - diff --git a/src/Adaptor2d/Adaptor2d_HOffsetCurve.hxx b/src/Adaptor2d/Adaptor2d_HOffsetCurve.hxx deleted file mode 100644 index 082d6718db..0000000000 --- a/src/Adaptor2d/Adaptor2d_HOffsetCurve.hxx +++ /dev/null @@ -1,93 +0,0 @@ -// Created on: 1992-10-08 -// Created by: Isabelle GRIGNON -// Copyright (c) 1992-1999 Matra Datavision -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - -#ifndef _Adaptor2d_HOffsetCurve_HeaderFile -#define _Adaptor2d_HOffsetCurve_HeaderFile - -#include -#include - -#include -#include -class Standard_OutOfRange; -class Standard_NoSuchObject; -class Standard_DomainError; -class Adaptor2d_OffsetCurve; -class Adaptor2d_Curve2d; - - -class Adaptor2d_HOffsetCurve; -DEFINE_STANDARD_HANDLE(Adaptor2d_HOffsetCurve, Adaptor2d_HCurve2d) - - -class Adaptor2d_HOffsetCurve : public Adaptor2d_HCurve2d -{ - -public: - - - //! Creates an empty GenHCurve2d. - Standard_EXPORT Adaptor2d_HOffsetCurve(); - - //! Creates a GenHCurve2d from a Curve - Standard_EXPORT Adaptor2d_HOffsetCurve(const Adaptor2d_OffsetCurve& C); - - //! Sets the field of the GenHCurve2d. - Standard_EXPORT void Set (const Adaptor2d_OffsetCurve& C); - - //! Returns the curve used to create the GenHCurve2d. - //! This is redefined from HCurve2d, cannot be inline. - Standard_EXPORT const Adaptor2d_Curve2d& Curve2d() const Standard_OVERRIDE; - - //! Returns the curve used to create the GenHCurve. - Adaptor2d_OffsetCurve& ChangeCurve2d(); - - - - - DEFINE_STANDARD_RTTI_INLINE(Adaptor2d_HOffsetCurve,Adaptor2d_HCurve2d) - -protected: - - - Adaptor2d_OffsetCurve myCurve; - - -private: - - - - -}; - -#define TheCurve Adaptor2d_OffsetCurve -#define TheCurve_hxx -#define Adaptor2d_GenHCurve2d Adaptor2d_HOffsetCurve -#define Adaptor2d_GenHCurve2d_hxx -#define Handle_Adaptor2d_GenHCurve2d Handle(Adaptor2d_HOffsetCurve) - -#include - -#undef TheCurve -#undef TheCurve_hxx -#undef Adaptor2d_GenHCurve2d -#undef Adaptor2d_GenHCurve2d_hxx -#undef Handle_Adaptor2d_GenHCurve2d - - - - -#endif // _Adaptor2d_HOffsetCurve_HeaderFile diff --git a/src/Adaptor2d/Adaptor2d_HOffsetCurve_0.cxx b/src/Adaptor2d/Adaptor2d_HOffsetCurve_0.cxx deleted file mode 100644 index 47a5b1a984..0000000000 --- a/src/Adaptor2d/Adaptor2d_HOffsetCurve_0.cxx +++ /dev/null @@ -1,42 +0,0 @@ -// Created on: 1992-10-08 -// Created by: Isabelle GRIGNON -// Copyright (c) 1992-1999 Matra Datavision -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - -#include - -#include - -#include -#include -#include -#include -#include - - - - - - - - - - -#define TheCurve Adaptor2d_OffsetCurve -#define TheCurve_hxx -#define Adaptor2d_GenHCurve2d Adaptor2d_HOffsetCurve -#define Adaptor2d_GenHCurve2d_hxx -#define Handle_Adaptor2d_GenHCurve2d Handle(Adaptor2d_HOffsetCurve) -#include - diff --git a/src/Adaptor2d/Adaptor2d_Line2d.cxx b/src/Adaptor2d/Adaptor2d_Line2d.cxx index d9c117832d..7e5cd5deec 100644 --- a/src/Adaptor2d/Adaptor2d_Line2d.cxx +++ b/src/Adaptor2d/Adaptor2d_Line2d.cxx @@ -11,10 +11,8 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. - -#include -#include #include + #include #include #include @@ -31,6 +29,8 @@ #include #include +IMPLEMENT_STANDARD_RTTIEXT(Adaptor2d_Line2d, Adaptor2d_Curve2d) + //======================================================================= //function : Adaptor2d_Line2d //purpose : @@ -136,13 +136,13 @@ void Adaptor2d_Line2d::Intervals(TColStd_Array1OfReal& T, //purpose : //======================================================================= -Handle(Adaptor2d_HCurve2d) Adaptor2d_Line2d::Trim +Handle(Adaptor2d_Curve2d) Adaptor2d_Line2d::Trim (const Standard_Real First, const Standard_Real Last, const Standard_Real) const { - Handle(Adaptor2d_HLine2d) HL = new Adaptor2d_HLine2d(); - HL->ChangeCurve2d().Load(gp_Lin2d(myAx2d),First,Last); + Handle(Adaptor2d_Line2d) HL = new Adaptor2d_Line2d(); + HL->Load(gp_Lin2d(myAx2d),First,Last); return HL; } diff --git a/src/Adaptor2d/Adaptor2d_Line2d.hxx b/src/Adaptor2d/Adaptor2d_Line2d.hxx index a7abeb3b19..3cdb10ef14 100644 --- a/src/Adaptor2d/Adaptor2d_Line2d.hxx +++ b/src/Adaptor2d/Adaptor2d_Line2d.hxx @@ -35,7 +35,6 @@ class Standard_DomainError; class gp_Pnt2d; class gp_Dir2d; class gp_Lin2d; -class Adaptor2d_HCurve2d; class gp_Vec2d; class gp_Circ2d; class gp_Elips2d; @@ -48,11 +47,9 @@ class Geom2d_BSplineCurve; class Adaptor2d_Line2d : public Adaptor2d_Curve2d { + DEFINE_STANDARD_RTTIEXT(Adaptor2d_Line2d, Adaptor2d_Curve2d) public: - DEFINE_STANDARD_ALLOC - - Standard_EXPORT Adaptor2d_Line2d(); Standard_EXPORT Adaptor2d_Line2d(const gp_Pnt2d& P, const gp_Dir2d& D, const Standard_Real UFirst, const Standard_Real ULast); @@ -83,7 +80,7 @@ public: //! parameters and . is used to //! test for 3d points confusion. //! If >= - Standard_EXPORT Handle(Adaptor2d_HCurve2d) Trim (const Standard_Real First, const Standard_Real Last, const Standard_Real Tol) const Standard_OVERRIDE; + Standard_EXPORT Handle(Adaptor2d_Curve2d) Trim (const Standard_Real First, const Standard_Real Last, const Standard_Real Tol) const Standard_OVERRIDE; Standard_EXPORT Standard_Boolean IsClosed() const Standard_OVERRIDE; @@ -129,30 +126,14 @@ public: Standard_EXPORT Handle(Geom2d_BSplineCurve) BSpline() const Standard_OVERRIDE; - - - -protected: - - - - - private: - - Standard_Real myUfirst; Standard_Real myUlast; gp_Ax2d myAx2d; - }; - - - - - +DEFINE_STANDARD_HANDLE(Adaptor2d_Line2d, Adaptor2d_Curve2d) #endif // _Adaptor2d_Line2d_HeaderFile diff --git a/src/Adaptor2d/Adaptor2d_OffsetCurve.cxx b/src/Adaptor2d/Adaptor2d_OffsetCurve.cxx index 66be2af518..db84f18200 100644 --- a/src/Adaptor2d/Adaptor2d_OffsetCurve.cxx +++ b/src/Adaptor2d/Adaptor2d_OffsetCurve.cxx @@ -11,9 +11,6 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. - -#include -#include #include #include #include @@ -36,6 +33,8 @@ #include #include +IMPLEMENT_STANDARD_RTTIEXT(Adaptor2d_OffsetCurve, Adaptor2d_Curve2d) + //======================================================================= //function : Adaptor2d_OffsetCurve //purpose : @@ -52,7 +51,7 @@ Adaptor2d_OffsetCurve::Adaptor2d_OffsetCurve() //purpose : //======================================================================= -Adaptor2d_OffsetCurve::Adaptor2d_OffsetCurve(const Handle(Adaptor2d_HCurve2d)& theCurve) +Adaptor2d_OffsetCurve::Adaptor2d_OffsetCurve(const Handle(Adaptor2d_Curve2d)& theCurve) : myCurve (theCurve), myOffset(0.0), myFirst (0.0), @@ -66,7 +65,7 @@ Adaptor2d_OffsetCurve::Adaptor2d_OffsetCurve(const Handle(Adaptor2d_HCurve2d)& t //======================================================================= Adaptor2d_OffsetCurve::Adaptor2d_OffsetCurve - (const Handle(Adaptor2d_HCurve2d)& theCurve, const Standard_Real theOffset) + (const Handle(Adaptor2d_Curve2d)& theCurve, const Standard_Real theOffset) : myCurve (theCurve), myOffset(theOffset), myFirst (theCurve->FirstParameter()), @@ -80,7 +79,7 @@ Adaptor2d_OffsetCurve::Adaptor2d_OffsetCurve //======================================================================= Adaptor2d_OffsetCurve::Adaptor2d_OffsetCurve( - const Handle(Adaptor2d_HCurve2d)& theCurve, + const Handle(Adaptor2d_Curve2d)& theCurve, const Standard_Real theOffset, const Standard_Real theWFirst, const Standard_Real theWLast ) @@ -96,7 +95,7 @@ Adaptor2d_OffsetCurve::Adaptor2d_OffsetCurve( //purpose : //======================================================================= -void Adaptor2d_OffsetCurve::Load(const Handle(Adaptor2d_HCurve2d)& C ) +void Adaptor2d_OffsetCurve::Load(const Handle(Adaptor2d_Curve2d)& C ) { myCurve = C; myOffset = 0.; @@ -226,13 +225,13 @@ void Adaptor2d_OffsetCurve::Intervals(TColStd_Array1OfReal& TI, //purpose : //======================================================================= -Handle(Adaptor2d_HCurve2d) Adaptor2d_OffsetCurve::Trim +Handle(Adaptor2d_Curve2d) Adaptor2d_OffsetCurve::Trim (const Standard_Real First, const Standard_Real Last, const Standard_Real) const { - Handle(Adaptor2d_HOffsetCurve) HO = new Adaptor2d_HOffsetCurve(*this); - HO->ChangeCurve2d().Load(myOffset,First,Last); + Handle(Adaptor2d_OffsetCurve) HO = new Adaptor2d_OffsetCurve(*this); + HO->Load(myOffset,First,Last); return HO; } @@ -610,7 +609,7 @@ Handle(Geom2d_BSplineCurve) Adaptor2d_OffsetCurve::BSpline() const return myCurve->BSpline(); } -static Standard_Integer nbPoints(const Handle(Adaptor2d_HCurve2d)& theCurve) +static Standard_Integer nbPoints(const Handle(Adaptor2d_Curve2d)& theCurve) { Standard_Integer nbs = 20; diff --git a/src/Adaptor2d/Adaptor2d_OffsetCurve.hxx b/src/Adaptor2d/Adaptor2d_OffsetCurve.hxx index 29c3a63a84..bdfa376dd5 100644 --- a/src/Adaptor2d/Adaptor2d_OffsetCurve.hxx +++ b/src/Adaptor2d/Adaptor2d_OffsetCurve.hxx @@ -17,18 +17,12 @@ #ifndef _Adaptor2d_OffsetCurve_HeaderFile #define _Adaptor2d_OffsetCurve_HeaderFile -#include -#include -#include - -#include #include +#include #include #include #include -#include -#include -class Adaptor2d_HCurve2d; + class Standard_NoSuchObject; class Standard_DomainError; class Standard_OutOfRange; @@ -43,46 +37,43 @@ class gp_Parab2d; class Geom2d_BezierCurve; class Geom2d_BSplineCurve; - //! Defines an Offset curve (algorithmic 2d curve). class Adaptor2d_OffsetCurve : public Adaptor2d_Curve2d { + DEFINE_STANDARD_RTTIEXT(Adaptor2d_OffsetCurve, Adaptor2d_Curve2d) public: - DEFINE_STANDARD_ALLOC - - //! The Offset is set to 0. Standard_EXPORT Adaptor2d_OffsetCurve(); //! The curve is loaded. The Offset is set to 0. - Standard_EXPORT Adaptor2d_OffsetCurve(const Handle(Adaptor2d_HCurve2d)& C); + Standard_EXPORT Adaptor2d_OffsetCurve(const Handle(Adaptor2d_Curve2d)& C); //! Creates an OffsetCurve curve. //! The Offset is set to Offset. - Standard_EXPORT Adaptor2d_OffsetCurve(const Handle(Adaptor2d_HCurve2d)& C, const Standard_Real Offset); + Standard_EXPORT Adaptor2d_OffsetCurve(const Handle(Adaptor2d_Curve2d)& C, const Standard_Real Offset); //! Create an Offset curve. //! WFirst,WLast define the bounds of the Offset curve. - Standard_EXPORT Adaptor2d_OffsetCurve(const Handle(Adaptor2d_HCurve2d)& C, const Standard_Real Offset, const Standard_Real WFirst, const Standard_Real WLast); + Standard_EXPORT Adaptor2d_OffsetCurve(const Handle(Adaptor2d_Curve2d)& C, const Standard_Real Offset, const Standard_Real WFirst, const Standard_Real WLast); //! Changes the curve. The Offset is reset to 0. - Standard_EXPORT void Load (const Handle(Adaptor2d_HCurve2d)& S); + Standard_EXPORT void Load (const Handle(Adaptor2d_Curve2d)& S); //! Changes the Offset on the current Curve. Standard_EXPORT void Load (const Standard_Real Offset); //! Changes the Offset Curve on the current Curve. Standard_EXPORT void Load (const Standard_Real Offset, const Standard_Real WFirst, const Standard_Real WLast); - - const Handle(Adaptor2d_HCurve2d)& Curve() const; - - Standard_Real Offset() const; - - Standard_Real FirstParameter() const Standard_OVERRIDE; - - Standard_Real LastParameter() const Standard_OVERRIDE; - + + const Handle(Adaptor2d_Curve2d)& Curve() const { return myCurve; } + + Standard_Real Offset() const { return myOffset; } + + virtual Standard_Real FirstParameter() const Standard_OVERRIDE { return myFirst; } + + virtual Standard_Real LastParameter() const Standard_OVERRIDE { return myLast; } + Standard_EXPORT GeomAbs_Shape Continuity() const Standard_OVERRIDE; //! If necessary, breaks the curve in intervals of @@ -101,7 +92,7 @@ public: //! parameters and . is used to //! test for 3d points confusion. //! If >= - Standard_EXPORT Handle(Adaptor2d_HCurve2d) Trim (const Standard_Real First, const Standard_Real Last, const Standard_Real Tol) const Standard_OVERRIDE; + Standard_EXPORT Handle(Adaptor2d_Curve2d) Trim (const Standard_Real First, const Standard_Real Last, const Standard_Real Tol) const Standard_OVERRIDE; Standard_EXPORT Standard_Boolean IsClosed() const Standard_OVERRIDE; @@ -176,30 +167,15 @@ public: Standard_EXPORT Standard_Integer NbSamples() const Standard_OVERRIDE; - - -protected: - - - - - private: - - - Handle(Adaptor2d_HCurve2d) myCurve; + Handle(Adaptor2d_Curve2d) myCurve; Standard_Real myOffset; Standard_Real myFirst; Standard_Real myLast; }; - -#include - - - - +DEFINE_STANDARD_HANDLE(Adaptor2d_OffsetCurve, Adaptor2d_Curve2d) #endif // _Adaptor2d_OffsetCurve_HeaderFile diff --git a/src/Adaptor2d/Adaptor2d_OffsetCurve.lxx b/src/Adaptor2d/Adaptor2d_OffsetCurve.lxx deleted file mode 100644 index d088c4bfad..0000000000 --- a/src/Adaptor2d/Adaptor2d_OffsetCurve.lxx +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - -//======================================================================= -//function : Curve -//purpose : -//======================================================================= - -inline const Handle(Adaptor2d_HCurve2d)& Adaptor2d_OffsetCurve::Curve() const -{ - return myCurve; -} - - -//======================================================================= -//function : Offset -//purpose : -//======================================================================= - -inline Standard_Real Adaptor2d_OffsetCurve::Offset() const -{ - return myOffset; -} - - -//======================================================================= -//function : FirstParameter -//purpose : -//======================================================================= - -inline Standard_Real Adaptor2d_OffsetCurve::FirstParameter() const -{ - return myFirst; -} - -//======================================================================= -//function : LastParameter -//purpose : -//======================================================================= - -inline Standard_Real Adaptor2d_OffsetCurve::LastParameter() const -{ - return myLast; -} diff --git a/src/Adaptor2d/FILES b/src/Adaptor2d/FILES index 7096ea29d6..c306075af7 100644 --- a/src/Adaptor2d/FILES +++ b/src/Adaptor2d/FILES @@ -1,16 +1,6 @@ Adaptor2d_Curve2d.cxx Adaptor2d_Curve2d.hxx -Adaptor2d_GenHCurve2d.gxx -Adaptor2d_GenHCurve2d.lxx -Adaptor2d_HCurve2d.cxx -Adaptor2d_HCurve2d.hxx -Adaptor2d_HCurve2d.lxx -Adaptor2d_HLine2d.hxx -Adaptor2d_HLine2d_0.cxx -Adaptor2d_HOffsetCurve.hxx -Adaptor2d_HOffsetCurve_0.cxx Adaptor2d_Line2d.cxx Adaptor2d_Line2d.hxx Adaptor2d_OffsetCurve.cxx Adaptor2d_OffsetCurve.hxx -Adaptor2d_OffsetCurve.lxx diff --git a/src/Adaptor3d/Adaptor3d_Curve.cxx b/src/Adaptor3d/Adaptor3d_Curve.cxx index 49b02da158..d82c14b1b8 100644 --- a/src/Adaptor3d/Adaptor3d_Curve.cxx +++ b/src/Adaptor3d/Adaptor3d_Curve.cxx @@ -14,9 +14,8 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. - #include -#include + #include #include #include @@ -32,6 +31,8 @@ #include #include +IMPLEMENT_STANDARD_RTTIEXT(Adaptor3d_Curve, Standard_Transient) + //======================================================================= //function : ~Adaptor3d_Curve //purpose : Destructor @@ -100,8 +101,8 @@ void Adaptor3d_Curve::Intervals(TColStd_Array1OfReal& , const GeomAbs_Shape ) co //purpose : //======================================================================= -//Handle(Adaptor3d_HCurve) Adaptor3d_Curve::Trim(const Standard_Real First, const Standard_Real Last, const Standard_Real Tol) const -Handle(Adaptor3d_HCurve) Adaptor3d_Curve::Trim(const Standard_Real , const Standard_Real , const Standard_Real ) const +//Handle(Adaptor3d_Curve) Adaptor3d_Curve::Trim(const Standard_Real First, const Standard_Real Last, const Standard_Real Tol) const +Handle(Adaptor3d_Curve) Adaptor3d_Curve::Trim(const Standard_Real , const Standard_Real , const Standard_Real ) const { throw Standard_NotImplemented("Adaptor3d_Curve::Trim"); } diff --git a/src/Adaptor3d/Adaptor3d_Curve.hxx b/src/Adaptor3d/Adaptor3d_Curve.hxx index 85f9b279cf..52897871e4 100644 --- a/src/Adaptor3d/Adaptor3d_Curve.hxx +++ b/src/Adaptor3d/Adaptor3d_Curve.hxx @@ -17,31 +17,28 @@ #ifndef _Adaptor3d_Curve_HeaderFile #define _Adaptor3d_Curve_HeaderFile +#include +#include +#include +#include +#include +#include #include #include #include - -#include -#include -#include #include -#include #include + class Standard_OutOfRange; class Standard_NoSuchObject; class Standard_DomainError; -class Adaptor3d_HCurve; class gp_Pnt; class gp_Vec; -class gp_Lin; -class gp_Circ; -class gp_Elips; -class gp_Hypr; -class gp_Parab; class Geom_BezierCurve; class Geom_BSplineCurve; class Geom_OffsetCurve; +DEFINE_STANDARD_HANDLE(Adaptor3d_Curve, Standard_Transient) //! Root class for 3D curves on which geometric //! algorithms work. @@ -56,13 +53,11 @@ class Geom_OffsetCurve; //! Polynomial coefficients of BSpline curves used for their evaluation are //! cached for better performance. Therefore these evaluations are not //! thread-safe and parallel evaluations need to be prevented. -class Adaptor3d_Curve +class Adaptor3d_Curve : public Standard_Transient { + DEFINE_STANDARD_RTTIEXT(Adaptor3d_Curve, Standard_Transient) public: - DEFINE_STANDARD_ALLOC - - Standard_EXPORT virtual Standard_Real FirstParameter() const; Standard_EXPORT virtual Standard_Real LastParameter() const; @@ -84,7 +79,7 @@ public: //! parameters and . is used to //! test for 3d points confusion. //! If >= - Standard_EXPORT virtual Handle(Adaptor3d_HCurve) Trim (const Standard_Real First, const Standard_Real Last, const Standard_Real Tol) const; + Standard_EXPORT virtual Handle(Adaptor3d_Curve) Trim (const Standard_Real First, const Standard_Real Last, const Standard_Real Tol) const; Standard_EXPORT virtual Standard_Boolean IsClosed() const; @@ -161,27 +156,6 @@ public: Standard_EXPORT virtual ~Adaptor3d_Curve(); - - - -protected: - - - - - -private: - - - - - }; - - - - - - #endif // _Adaptor3d_Curve_HeaderFile diff --git a/src/Adaptor3d/Adaptor3d_CurveOnSurface.cxx b/src/Adaptor3d/Adaptor3d_CurveOnSurface.cxx index 43f8530b9a..707096dcef 100644 --- a/src/Adaptor3d/Adaptor3d_CurveOnSurface.cxx +++ b/src/Adaptor3d/Adaptor3d_CurveOnSurface.cxx @@ -14,11 +14,10 @@ #define No_Standard_OutOfRange -#include #include -#include -#include -#include + +#include +#include #include #include #include @@ -58,6 +57,8 @@ #include #include +IMPLEMENT_STANDARD_RTTIEXT(Adaptor3d_CurveOnSurface, Adaptor3d_Curve) + static gp_Pnt to3d(const gp_Pln& Pl, const gp_Pnt2d& P) { return ElSLib::Value(P.X(),P.Y(),Pl); @@ -697,7 +698,7 @@ Adaptor3d_CurveOnSurface::Adaptor3d_CurveOnSurface() //======================================================================= Adaptor3d_CurveOnSurface::Adaptor3d_CurveOnSurface -(const Handle(Adaptor3d_HSurface)& S) +(const Handle(Adaptor3d_Surface)& S) : myType(GeomAbs_OtherCurve), myIntCont(GeomAbs_CN) { Load(S); @@ -709,8 +710,8 @@ Adaptor3d_CurveOnSurface::Adaptor3d_CurveOnSurface //======================================================================= Adaptor3d_CurveOnSurface::Adaptor3d_CurveOnSurface -(const Handle(Adaptor2d_HCurve2d)& C, - const Handle(Adaptor3d_HSurface)& S) +(const Handle(Adaptor2d_Curve2d)& C, + const Handle(Adaptor3d_Surface)& S) : myType(GeomAbs_OtherCurve), myIntCont(GeomAbs_CN) { Load(S); @@ -722,7 +723,7 @@ Adaptor3d_CurveOnSurface::Adaptor3d_CurveOnSurface //purpose : //======================================================================= -void Adaptor3d_CurveOnSurface::Load(const Handle(Adaptor3d_HSurface)& S) +void Adaptor3d_CurveOnSurface::Load(const Handle(Adaptor3d_Surface)& S) { mySurface = S; if (!myCurve.IsNull()) EvalKPart(); @@ -733,7 +734,7 @@ void Adaptor3d_CurveOnSurface::Load(const Handle(Adaptor3d_HSurface)& S) //purpose : //======================================================================= -void Adaptor3d_CurveOnSurface::Load(const Handle(Adaptor2d_HCurve2d)& C) +void Adaptor3d_CurveOnSurface::Load(const Handle(Adaptor2d_Curve2d)& C) { myCurve = C; if (mySurface.IsNull()) @@ -762,8 +763,8 @@ void Adaptor3d_CurveOnSurface::Load(const Handle(Adaptor2d_HCurve2d)& C) //purpose : //======================================================================= -void Adaptor3d_CurveOnSurface::Load (const Handle(Adaptor2d_HCurve2d)& C, - const Handle(Adaptor3d_HSurface)& S) +void Adaptor3d_CurveOnSurface::Load (const Handle(Adaptor2d_Curve2d)& C, + const Handle(Adaptor3d_Surface)& S) { Load (C); Load (S); @@ -926,14 +927,14 @@ void Adaptor3d_CurveOnSurface::Intervals(TColStd_Array1OfReal& T, //purpose : //======================================================================= -Handle(Adaptor3d_HCurve) Adaptor3d_CurveOnSurface::Trim +Handle(Adaptor3d_Curve) Adaptor3d_CurveOnSurface::Trim (const Standard_Real First, const Standard_Real Last, const Standard_Real Tol) const { - Handle(Adaptor3d_HCurveOnSurface) HCS = new Adaptor3d_HCurveOnSurface(); - HCS->ChangeCurve().Load(mySurface); - HCS->ChangeCurve().Load(myCurve->Trim(First,Last,Tol)); + Handle(Adaptor3d_CurveOnSurface) HCS = new Adaptor3d_CurveOnSurface(); + HCS->Load(mySurface); + HCS->Load(myCurve->Trim(First,Last,Tol)); return HCS; } @@ -1398,7 +1399,7 @@ Handle(Geom_BSplineCurve) Adaptor3d_CurveOnSurface::BSpline() const //purpose : //======================================================================= -const Handle(Adaptor2d_HCurve2d)& Adaptor3d_CurveOnSurface::GetCurve() const +const Handle(Adaptor2d_Curve2d)& Adaptor3d_CurveOnSurface::GetCurve() const { return myCurve; } @@ -1408,7 +1409,7 @@ const Handle(Adaptor2d_HCurve2d)& Adaptor3d_CurveOnSurface::GetCurve() const //purpose : //======================================================================= -const Handle(Adaptor3d_HSurface)& Adaptor3d_CurveOnSurface::GetSurface() const +const Handle(Adaptor3d_Surface)& Adaptor3d_CurveOnSurface::GetSurface() const { return mySurface; } @@ -1418,7 +1419,7 @@ const Handle(Adaptor3d_HSurface)& Adaptor3d_CurveOnSurface::GetSurface() const //purpose : //======================================================================= -Handle(Adaptor2d_HCurve2d)& Adaptor3d_CurveOnSurface::ChangeCurve() +Handle(Adaptor2d_Curve2d)& Adaptor3d_CurveOnSurface::ChangeCurve() { return myCurve; } @@ -1428,7 +1429,7 @@ Handle(Adaptor2d_HCurve2d)& Adaptor3d_CurveOnSurface::ChangeCurve() //purpose : //======================================================================= -Handle(Adaptor3d_HSurface)& Adaptor3d_CurveOnSurface::ChangeSurface() { +Handle(Adaptor3d_Surface)& Adaptor3d_CurveOnSurface::ChangeSurface() { return mySurface; } @@ -1705,11 +1706,11 @@ void Adaptor3d_CurveOnSurface::EvalFirstLastSurf() Standard_Boolean Adaptor3d_CurveOnSurface::LocatePart_RevExt(const gp_Pnt2d& UV, const gp_Vec2d& DUV, - const Handle(Adaptor3d_HSurface)& S, + const Handle(Adaptor3d_Surface)& S, gp_Pnt2d& LeftBot, gp_Pnt2d& RightTop) const { - Handle(Adaptor3d_HCurve) AHC = S->BasisCurve(); + Handle(Adaptor3d_Curve) AHC = S->BasisCurve(); if (AHC->GetType() == GeomAbs_BSplineCurve) { Handle( Geom_BSplineCurve) BSplC; @@ -1743,11 +1744,11 @@ Standard_Boolean Adaptor3d_CurveOnSurface::LocatePart_RevExt(const gp_Pnt2d& UV, Standard_Boolean Adaptor3d_CurveOnSurface:: LocatePart_Offset(const gp_Pnt2d& UV, const gp_Vec2d& DUV, - const Handle(Adaptor3d_HSurface)& S, + const Handle(Adaptor3d_Surface)& S, gp_Pnt2d& LeftBot, gp_Pnt2d& RightTop) const { Standard_Boolean Ok = Standard_True; - Handle( Adaptor3d_HSurface) AHS; + Handle( Adaptor3d_Surface) AHS; Handle( Geom_BSplineSurface) BSplS; AHS = S->BasisSurface(); GeomAbs_SurfaceType BasisSType = AHS->GetType(); @@ -1773,7 +1774,7 @@ Standard_Boolean Adaptor3d_CurveOnSurface:: //======================================================================= void Adaptor3d_CurveOnSurface::LocatePart(const gp_Pnt2d& UV, const gp_Vec2d& DUV, - const Handle(Adaptor3d_HSurface)& S, + const Handle(Adaptor3d_Surface)& S, gp_Pnt2d& LeftBot, gp_Pnt2d& RightTop) const { Handle( Geom_BSplineSurface) BSplS; diff --git a/src/Adaptor3d/Adaptor3d_CurveOnSurface.hxx b/src/Adaptor3d/Adaptor3d_CurveOnSurface.hxx index 0705d056fa..96c2309534 100644 --- a/src/Adaptor3d/Adaptor3d_CurveOnSurface.hxx +++ b/src/Adaptor3d/Adaptor3d_CurveOnSurface.hxx @@ -17,38 +17,15 @@ #ifndef _Adaptor3d_CurveOnSurface_HeaderFile #define _Adaptor3d_CurveOnSurface_HeaderFile -#include -#include -#include - -#include -#include -#include -#include -#include +#include #include -#include -#include +#include +#include +#include #include -#include -class Adaptor3d_HSurface; -class Adaptor2d_HCurve2d; -class Standard_NoSuchObject; -class Standard_DomainError; -class Standard_OutOfRange; -class Adaptor3d_HCurve; -class gp_Pnt; -class gp_Vec; -class gp_Lin; -class gp_Circ; -class gp_Elips; -class gp_Hypr; -class gp_Parab; -class Geom_BezierCurve; -class Geom_BSplineCurve; -class gp_Pnt2d; -class gp_Vec2d; +#include +DEFINE_STANDARD_HANDLE(Adaptor3d_CurveOnSurface, Adaptor3d_Curve) //! An interface between the services provided by a curve //! lying on a surface from the package Geom and those @@ -57,35 +34,33 @@ class gp_Vec2d; //! package, in the parametric space of the surface. class Adaptor3d_CurveOnSurface : public Adaptor3d_Curve { + DEFINE_STANDARD_RTTIEXT(Adaptor3d_CurveOnSurface, Adaptor3d_Curve) public: - DEFINE_STANDARD_ALLOC - - Standard_EXPORT Adaptor3d_CurveOnSurface(); - Standard_EXPORT Adaptor3d_CurveOnSurface(const Handle(Adaptor3d_HSurface)& S); + Standard_EXPORT Adaptor3d_CurveOnSurface(const Handle(Adaptor3d_Surface)& S); //! Creates a CurveOnSurface from the 2d curve and //! the surface . - Standard_EXPORT Adaptor3d_CurveOnSurface(const Handle(Adaptor2d_HCurve2d)& C, const Handle(Adaptor3d_HSurface)& S); + Standard_EXPORT Adaptor3d_CurveOnSurface(const Handle(Adaptor2d_Curve2d)& C, const Handle(Adaptor3d_Surface)& S); //! Changes the surface. - Standard_EXPORT void Load (const Handle(Adaptor3d_HSurface)& S); + Standard_EXPORT void Load (const Handle(Adaptor3d_Surface)& S); //! Changes the 2d curve. - Standard_EXPORT void Load (const Handle(Adaptor2d_HCurve2d)& C); + Standard_EXPORT void Load (const Handle(Adaptor2d_Curve2d)& C); //! Load both curve and surface. - Standard_EXPORT void Load (const Handle(Adaptor2d_HCurve2d)& C, const Handle(Adaptor3d_HSurface)& S); + Standard_EXPORT void Load (const Handle(Adaptor2d_Curve2d)& C, const Handle(Adaptor3d_Surface)& S); - Standard_EXPORT const Handle(Adaptor2d_HCurve2d)& GetCurve() const; + Standard_EXPORT const Handle(Adaptor2d_Curve2d)& GetCurve() const; - Standard_EXPORT const Handle(Adaptor3d_HSurface)& GetSurface() const; + Standard_EXPORT const Handle(Adaptor3d_Surface)& GetSurface() const; - Standard_EXPORT Handle(Adaptor2d_HCurve2d)& ChangeCurve(); + Standard_EXPORT Handle(Adaptor2d_Curve2d)& ChangeCurve(); - Standard_EXPORT Handle(Adaptor3d_HSurface)& ChangeSurface(); + Standard_EXPORT Handle(Adaptor3d_Surface)& ChangeSurface(); Standard_EXPORT Standard_Real FirstParameter() const Standard_OVERRIDE; @@ -108,7 +83,7 @@ public: //! parameters and . is used to //! test for 3d points confusion. //! If >= - Standard_EXPORT Handle(Adaptor3d_HCurve) Trim (const Standard_Real First, const Standard_Real Last, const Standard_Real Tol) const Standard_OVERRIDE; + Standard_EXPORT Handle(Adaptor3d_Curve) Trim (const Standard_Real First, const Standard_Real Last, const Standard_Real Tol) const Standard_OVERRIDE; Standard_EXPORT Standard_Boolean IsClosed() const Standard_OVERRIDE; @@ -181,17 +156,7 @@ public: Standard_EXPORT Handle(Geom_BSplineCurve) BSpline() const Standard_OVERRIDE; - - - -protected: - - - - - private: - Standard_EXPORT void EvalKPart(); @@ -202,35 +167,29 @@ private: //! for trimming the curve on surface. Standard_EXPORT void EvalFirstLastSurf(); - Standard_EXPORT void LocatePart (const gp_Pnt2d& UV, const gp_Vec2d& DUV, const Handle(Adaptor3d_HSurface)& S, gp_Pnt2d& LeftBot, gp_Pnt2d& RightTop) const; + Standard_EXPORT void LocatePart (const gp_Pnt2d& UV, const gp_Vec2d& DUV, const Handle(Adaptor3d_Surface)& S, gp_Pnt2d& LeftBot, gp_Pnt2d& RightTop) const; - Standard_EXPORT Standard_Boolean LocatePart_RevExt (const gp_Pnt2d& UV, const gp_Vec2d& DUV, const Handle(Adaptor3d_HSurface)& S, gp_Pnt2d& LeftBot, gp_Pnt2d& RightTop) const; + Standard_EXPORT Standard_Boolean LocatePart_RevExt (const gp_Pnt2d& UV, const gp_Vec2d& DUV, const Handle(Adaptor3d_Surface)& S, gp_Pnt2d& LeftBot, gp_Pnt2d& RightTop) const; - Standard_EXPORT Standard_Boolean LocatePart_Offset (const gp_Pnt2d& UV, const gp_Vec2d& DUV, const Handle(Adaptor3d_HSurface)& S, gp_Pnt2d& LeftBot, gp_Pnt2d& RightTop) const; + Standard_EXPORT Standard_Boolean LocatePart_Offset (const gp_Pnt2d& UV, const gp_Vec2d& DUV, const Handle(Adaptor3d_Surface)& S, gp_Pnt2d& LeftBot, gp_Pnt2d& RightTop) const; //! Extracts the numbers of knots which equal //! the point and checks derivative components //! by zero equivalence. Standard_EXPORT void FindBounds (const TColStd_Array1OfReal& Arr, const Standard_Real XYComp, const Standard_Real DUVComp, Standard_Integer& Bnd1, Standard_Integer& Bnd2, Standard_Boolean& DerIsNull) const; +private: - Handle(Adaptor3d_HSurface) mySurface; - Handle(Adaptor2d_HCurve2d) myCurve; + Handle(Adaptor3d_Surface) mySurface; + Handle(Adaptor2d_Curve2d) myCurve; GeomAbs_CurveType myType; gp_Circ myCirc; gp_Lin myLin; - Handle(Adaptor3d_HSurface) myFirstSurf; - Handle(Adaptor3d_HSurface) myLastSurf; + Handle(Adaptor3d_Surface) myFirstSurf; + Handle(Adaptor3d_Surface) myLastSurf; Handle(TColStd_HSequenceOfReal) myIntervals; GeomAbs_Shape myIntCont; - }; - - - - - - #endif // _Adaptor3d_CurveOnSurface_HeaderFile diff --git a/src/Adaptor3d/Adaptor3d_GenHCurve.gxx b/src/Adaptor3d/Adaptor3d_GenHCurve.gxx deleted file mode 100644 index a999f092b1..0000000000 --- a/src/Adaptor3d/Adaptor3d_GenHCurve.gxx +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - -//======================================================================= -//function : Adaptor3d_GenHCurve -//purpose : -//======================================================================= - -Adaptor3d_GenHCurve::Adaptor3d_GenHCurve () {} - -//======================================================================= -//function : Adaptor3d_GenHCurve -//purpose : -//======================================================================= - -Adaptor3d_GenHCurve::Adaptor3d_GenHCurve (const TheCurve& C) -{myCurve = C;} - -//======================================================================= -//function : Set -//purpose : -//======================================================================= - -void Adaptor3d_GenHCurve::Set(const TheCurve& C) -{ - myCurve = C; -} - -//======================================================================= -//function : Curve -//purpose : -//======================================================================= - -const Adaptor3d_Curve& Adaptor3d_GenHCurve::Curve () const -{ - return myCurve; -} - -Adaptor3d_Curve& Adaptor3d_GenHCurve::GetCurve () -{ - return myCurve; -} diff --git a/src/Adaptor3d/Adaptor3d_GenHCurve.lxx b/src/Adaptor3d/Adaptor3d_GenHCurve.lxx deleted file mode 100644 index c8f434dc63..0000000000 --- a/src/Adaptor3d/Adaptor3d_GenHCurve.lxx +++ /dev/null @@ -1,20 +0,0 @@ -// Created on: 1995-05-09 -// Created by: Xavier BENVENISTE -// Copyright (c) 1995-1999 Matra Datavision -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - -inline TheCurve& Adaptor3d_GenHCurve::ChangeCurve() -{ - return myCurve; -} diff --git a/src/Adaptor3d/Adaptor3d_GenHSurface.gxx b/src/Adaptor3d/Adaptor3d_GenHSurface.gxx deleted file mode 100644 index a32a21d9a6..0000000000 --- a/src/Adaptor3d/Adaptor3d_GenHSurface.gxx +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - -//======================================================================= -//function : Adaptor3d_GenHSurface -//purpose : -//======================================================================= - -Adaptor3d_GenHSurface::Adaptor3d_GenHSurface () {} - -//======================================================================= -//function : Adaptor3d_GenHSurface -//purpose : -//======================================================================= - -Adaptor3d_GenHSurface::Adaptor3d_GenHSurface (const TheSurface& S): - mySurf(S) -{} - -//======================================================================= -//function : Set -//purpose : -//======================================================================= - -void Adaptor3d_GenHSurface::Set (const TheSurface& S) -{ - mySurf = S; -} - -//======================================================================= -//function : Surface -//purpose : -//======================================================================= - -const Adaptor3d_Surface& Adaptor3d_GenHSurface::Surface () const -{ - return mySurf; -} - diff --git a/src/Adaptor3d/Adaptor3d_GenHSurface.lxx b/src/Adaptor3d/Adaptor3d_GenHSurface.lxx deleted file mode 100644 index d6e95c6c52..0000000000 --- a/src/Adaptor3d/Adaptor3d_GenHSurface.lxx +++ /dev/null @@ -1,20 +0,0 @@ -// Created on: 1995-05-09 -// Created by: Xavier BENVENISTE -// Copyright (c) 1995-1999 Matra Datavision -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - -inline TheSurface& Adaptor3d_GenHSurface::ChangeSurface() -{ - return mySurf; -} diff --git a/src/Adaptor3d/Adaptor3d_HCurve.cxx b/src/Adaptor3d/Adaptor3d_HCurve.cxx deleted file mode 100644 index d5a309d29f..0000000000 --- a/src/Adaptor3d/Adaptor3d_HCurve.cxx +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -IMPLEMENT_STANDARD_RTTIEXT(Adaptor3d_HCurve,Standard_Transient) \ No newline at end of file diff --git a/src/Adaptor3d/Adaptor3d_HCurve.hxx b/src/Adaptor3d/Adaptor3d_HCurve.hxx deleted file mode 100644 index 6c360c87bf..0000000000 --- a/src/Adaptor3d/Adaptor3d_HCurve.hxx +++ /dev/null @@ -1,162 +0,0 @@ -// Created on: 1994-02-23 -// Created by: model -// Copyright (c) 1994-1999 Matra Datavision -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - -#ifndef _Adaptor3d_HCurve_HeaderFile -#define _Adaptor3d_HCurve_HeaderFile - -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -class Standard_OutOfRange; -class Standard_NoSuchObject; -class Standard_DomainError; -class Adaptor3d_Curve; -class gp_Pnt; -class gp_Vec; -class Geom_BezierCurve; -class Geom_BSplineCurve; -class Geom_OffsetCurve; - - -class Adaptor3d_HCurve; -DEFINE_STANDARD_HANDLE(Adaptor3d_HCurve, Standard_Transient) - -//! Root class for 3D curves manipulated by handles, on -//! which geometric algorithms work. -//! An adapted curve is an interface between the -//! services provided by a curve and those required of -//! the curve by algorithms which use it. -//! Two derived concrete classes are provided: -//! - GeomAdaptor_HCurve for a curve from the Geom package -//! - Adaptor3d_HCurveOnSurface for a curve lying -//! on a surface from the Geom package. -class Adaptor3d_HCurve : public Standard_Transient -{ - -public: - - - //! Returns a pointer to the Curve inside the HCurve. - Standard_EXPORT virtual const Adaptor3d_Curve& Curve() const = 0; - - //! Returns a pointer to the Curve inside the HCurve. - Standard_EXPORT virtual Adaptor3d_Curve& GetCurve() = 0; - - Standard_Real FirstParameter() const; - - Standard_Real LastParameter() const; - - GeomAbs_Shape Continuity() const; - - Standard_Integer NbIntervals (const GeomAbs_Shape S) const; - - //! Stores in the parameters bounding the intervals - //! of continuity . - //! - //! The array must provide enough room to accommodate - //! for the parameters. i.e. T.Length() > NbIntervals() - void Intervals (TColStd_Array1OfReal& T, const GeomAbs_Shape S) const; - - //! Returns a curve equivalent of between - //! parameters and . is used to - //! test for 3d points confusion. - //! - //! If >= - Handle(Adaptor3d_HCurve) Trim (const Standard_Real First, const Standard_Real Last, const Standard_Real Tol) const; - - Standard_Boolean IsClosed() const; - - Standard_Boolean IsPeriodic() const; - - Standard_Real Period() const; - - gp_Pnt Value (const Standard_Real U) const; - - void D0 (const Standard_Real U, gp_Pnt& P) const; - - void D1 (const Standard_Real U, gp_Pnt& P, gp_Vec& V) const; - - void D2 (const Standard_Real U, gp_Pnt& P, gp_Vec& V1, gp_Vec& V2) const; - - void D3 (const Standard_Real U, gp_Pnt& P, gp_Vec& V1, gp_Vec& V2, gp_Vec& V3) const; - - gp_Vec DN (const Standard_Real U, const Standard_Integer N) const; - - Standard_Real Resolution (const Standard_Real R3d) const; - - GeomAbs_CurveType GetType() const; - - gp_Lin Line() const; - - gp_Circ Circle() const; - - gp_Elips Ellipse() const; - - gp_Hypr Hyperbola() const; - - gp_Parab Parabola() const; - - Standard_Integer Degree() const; - - Standard_Boolean IsRational() const; - - Standard_Integer NbPoles() const; - - Standard_Integer NbKnots() const; - - Handle(Geom_BezierCurve) Bezier() const; - - Handle(Geom_BSplineCurve) BSpline() const; - - Handle(Geom_OffsetCurve) OffsetCurve() const; - - - DEFINE_STANDARD_RTTIEXT(Adaptor3d_HCurve,Standard_Transient) - -protected: - - - - -private: - - - - -}; - - -#include - - - - - -#endif // _Adaptor3d_HCurve_HeaderFile diff --git a/src/Adaptor3d/Adaptor3d_HCurve.lxx b/src/Adaptor3d/Adaptor3d_HCurve.lxx deleted file mode 100644 index 48b2d8d0d3..0000000000 --- a/src/Adaptor3d/Adaptor3d_HCurve.lxx +++ /dev/null @@ -1,304 +0,0 @@ -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - -#include - -//======================================================================= -//function : FirstParameter -//purpose : -//======================================================================= - -inline Standard_Real Adaptor3d_HCurve::FirstParameter() const -{ - return Curve().FirstParameter(); -} - -//======================================================================= -//function : LastParameter -//purpose : -//======================================================================= - - inline Standard_Real Adaptor3d_HCurve::LastParameter() const -{ - return Curve().LastParameter(); -} - -//======================================================================= -//function : Continuity -//purpose : -//======================================================================= - - inline GeomAbs_Shape Adaptor3d_HCurve::Continuity() const -{ - return Curve().Continuity(); -} - -//======================================================================= -//function : NbIntervals -//purpose : -//======================================================================= - - inline Standard_Integer Adaptor3d_HCurve::NbIntervals(const GeomAbs_Shape S) const -{ - return Curve().NbIntervals(S); -} - -//======================================================================= -//function : Intervals -//purpose : -//======================================================================= - - inline void Adaptor3d_HCurve::Intervals(TColStd_Array1OfReal& T, - const GeomAbs_Shape S) const -{ - Curve().Intervals(T,S); -} - -//======================================================================= -//function : Trim -//purpose : -//======================================================================= - - inline Handle(Adaptor3d_HCurve) Adaptor3d_HCurve::Trim - (const Standard_Real First, - const Standard_Real Last, - const Standard_Real Tol) const -{ - return Curve().Trim(First,Last,Tol); -} - -//======================================================================= -//function : IsClosed -//purpose : -//======================================================================= - - inline Standard_Boolean Adaptor3d_HCurve::IsClosed() const -{ - return Curve().IsClosed(); -} - -//======================================================================= -//function : IsPeriodic -//purpose : -//======================================================================= - - inline Standard_Boolean Adaptor3d_HCurve::IsPeriodic() const -{ - return Curve().IsPeriodic(); -} - -//======================================================================= -//function : Period -//purpose : -//======================================================================= - - inline Standard_Real Adaptor3d_HCurve::Period() const -{ - return Curve().Period(); -} - -//======================================================================= -//function : Value -//purpose : -//======================================================================= - - inline gp_Pnt Adaptor3d_HCurve::Value(const Standard_Real U) const -{ - return Curve().Value(U); -} - -//======================================================================= -//function : D0 -//purpose : -//======================================================================= - - inline void Adaptor3d_HCurve::D0(const Standard_Real U, gp_Pnt& P) const -{ - Curve().D0(U,P); -} - -//======================================================================= -//function : D1 -//purpose : -//======================================================================= - - inline void Adaptor3d_HCurve::D1(const Standard_Real U, gp_Pnt& P, gp_Vec& V) const -{ - Curve().D1(U,P,V); -} - -//======================================================================= -//function : D2 -//purpose : -//======================================================================= - - inline void Adaptor3d_HCurve::D2(const Standard_Real U, gp_Pnt& P, gp_Vec& V1, gp_Vec& V2) const -{ - Curve().D2(U,P,V1,V2); -} - -//======================================================================= -//function : D3 -//purpose : -//======================================================================= - - inline void Adaptor3d_HCurve::D3(const Standard_Real U, gp_Pnt& P, gp_Vec& V1, gp_Vec& V2, gp_Vec& V3) const -{ - Curve().D3(U,P,V1,V2,V3); -} - -//======================================================================= -//function : DN -//purpose : -//======================================================================= - - inline gp_Vec Adaptor3d_HCurve::DN(const Standard_Real U, const Standard_Integer N) const -{ - return Curve().DN(U,N); -} - -//======================================================================= -//function : Resolution -//purpose : -//======================================================================= - - inline Standard_Real Adaptor3d_HCurve::Resolution(const Standard_Real R3d) const -{ - return Curve().Resolution(R3d); -} - -//======================================================================= -//function : GetType -//purpose : -//======================================================================= - - inline GeomAbs_CurveType Adaptor3d_HCurve::GetType() const -{ - return Curve().GetType(); -} - -//======================================================================= -//function : Line -//purpose : -//======================================================================= - - inline gp_Lin Adaptor3d_HCurve::Line() const -{ - return Curve().Line(); -} - -//======================================================================= -//function : Circle -//purpose : -//======================================================================= - - inline gp_Circ Adaptor3d_HCurve::Circle() const -{ - return Curve().Circle(); -} - -//======================================================================= -//function : Ellipse -//purpose : -//======================================================================= - - inline gp_Elips Adaptor3d_HCurve::Ellipse() const -{ - return Curve().Ellipse(); -} - -//======================================================================= -//function : Hyperbola -//purpose : -//======================================================================= - - inline gp_Hypr Adaptor3d_HCurve::Hyperbola() const -{ - return Curve().Hyperbola(); -} - -//======================================================================= -//function : Parabola -//purpose : -//======================================================================= - - inline gp_Parab Adaptor3d_HCurve::Parabola() const -{ - return Curve().Parabola(); -} - -//======================================================================= -//function : Degree -//purpose : -//======================================================================= - -inline Standard_Integer Adaptor3d_HCurve::Degree() const -{ - return Curve().Degree() ; - } -//======================================================================= -//function : IsRational -//purpose : -//======================================================================= - -inline Standard_Boolean Adaptor3d_HCurve::IsRational() const -{ - return Curve().IsRational() ; -} -//======================================================================= -//function : NbPoles -//purpose : -//======================================================================= -inline Standard_Integer Adaptor3d_HCurve::NbPoles() const -{ - return Curve().NbPoles() ; -} -//======================================================================= -//function : NbKnots -//purpose : -//======================================================================= - -inline Standard_Integer Adaptor3d_HCurve::NbKnots() const -{ - return Curve().NbKnots() ; -} - -//======================================================================= -//function : Bezier -//purpose : -//======================================================================= - - inline Handle(Geom_BezierCurve) Adaptor3d_HCurve::Bezier() const -{ - return Curve().Bezier(); -} - -//======================================================================= -//function : BSpline -//purpose : -//======================================================================= - - inline Handle(Geom_BSplineCurve) Adaptor3d_HCurve::BSpline() const -{ - return Curve().BSpline(); -} - -//======================================================================= -//function : BasisCurve -//purpose : -//======================================================================= - - inline Handle(Geom_OffsetCurve) Adaptor3d_HCurve::OffsetCurve() const -{ - return Curve().OffsetCurve(); -} diff --git a/src/Adaptor3d/Adaptor3d_HCurveOnSurface.hxx b/src/Adaptor3d/Adaptor3d_HCurveOnSurface.hxx deleted file mode 100644 index 4ccc7d0e0d..0000000000 --- a/src/Adaptor3d/Adaptor3d_HCurveOnSurface.hxx +++ /dev/null @@ -1,97 +0,0 @@ -// Created on: 1992-10-08 -// Created by: Isabelle GRIGNON -// Copyright (c) 1992-1999 Matra Datavision -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - -#ifndef _Adaptor3d_HCurveOnSurface_HeaderFile -#define _Adaptor3d_HCurveOnSurface_HeaderFile - -#include -#include - -#include -#include -class Standard_OutOfRange; -class Standard_NoSuchObject; -class Standard_DomainError; -class Adaptor3d_CurveOnSurface; -class Adaptor3d_Curve; - - -class Adaptor3d_HCurveOnSurface; -DEFINE_STANDARD_HANDLE(Adaptor3d_HCurveOnSurface, Adaptor3d_HCurve) - - -class Adaptor3d_HCurveOnSurface : public Adaptor3d_HCurve -{ - -public: - - - //! Creates an empty GenHCurve. - Standard_EXPORT Adaptor3d_HCurveOnSurface(); - - //! Creates a GenHCurve from a Curve - Standard_EXPORT Adaptor3d_HCurveOnSurface(const Adaptor3d_CurveOnSurface& C); - - //! Sets the field of the GenHCurve. - Standard_EXPORT void Set (const Adaptor3d_CurveOnSurface& C); - - //! Returns the curve used to create the GenHCurve. - //! This is redefined from HCurve, cannot be inline. - Standard_EXPORT const Adaptor3d_Curve& Curve() const Standard_OVERRIDE; - - //! Returns the curve used to create the GenHCurve. - //! This is redefined from HCurve, cannot be inline. - Standard_EXPORT Adaptor3d_Curve& GetCurve() Standard_OVERRIDE; - - //! Returns the curve used to create the GenHCurve. - Adaptor3d_CurveOnSurface& ChangeCurve(); - - - - - DEFINE_STANDARD_RTTI_INLINE(Adaptor3d_HCurveOnSurface,Adaptor3d_HCurve) - -protected: - - - Adaptor3d_CurveOnSurface myCurve; - - -private: - - - - -}; - -#define TheCurve Adaptor3d_CurveOnSurface -#define TheCurve_hxx -#define Adaptor3d_GenHCurve Adaptor3d_HCurveOnSurface -#define Adaptor3d_GenHCurve_hxx -#define Handle_Adaptor3d_GenHCurve Handle(Adaptor3d_HCurveOnSurface) - -#include - -#undef TheCurve -#undef TheCurve_hxx -#undef Adaptor3d_GenHCurve -#undef Adaptor3d_GenHCurve_hxx -#undef Handle_Adaptor3d_GenHCurve - - - - -#endif // _Adaptor3d_HCurveOnSurface_HeaderFile diff --git a/src/Adaptor3d/Adaptor3d_HCurveOnSurface_0.cxx b/src/Adaptor3d/Adaptor3d_HCurveOnSurface_0.cxx deleted file mode 100644 index dedb934068..0000000000 --- a/src/Adaptor3d/Adaptor3d_HCurveOnSurface_0.cxx +++ /dev/null @@ -1,42 +0,0 @@ -// Created on: 1992-10-08 -// Created by: Isabelle GRIGNON -// Copyright (c) 1992-1999 Matra Datavision -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - -#include - -#include - -#include -#include -#include -#include -#include - - - - - - - - - - -#define TheCurve Adaptor3d_CurveOnSurface -#define TheCurve_hxx -#define Adaptor3d_GenHCurve Adaptor3d_HCurveOnSurface -#define Adaptor3d_GenHCurve_hxx -#define Handle_Adaptor3d_GenHCurve Handle(Adaptor3d_HCurveOnSurface) -#include - diff --git a/src/Adaptor3d/Adaptor3d_HIsoCurve.hxx b/src/Adaptor3d/Adaptor3d_HIsoCurve.hxx deleted file mode 100644 index 56da57daf7..0000000000 --- a/src/Adaptor3d/Adaptor3d_HIsoCurve.hxx +++ /dev/null @@ -1,97 +0,0 @@ -// Created on: 1992-10-08 -// Created by: Isabelle GRIGNON -// Copyright (c) 1992-1999 Matra Datavision -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - -#ifndef _Adaptor3d_HIsoCurve_HeaderFile -#define _Adaptor3d_HIsoCurve_HeaderFile - -#include -#include - -#include -#include -class Standard_OutOfRange; -class Standard_NoSuchObject; -class Standard_DomainError; -class Adaptor3d_IsoCurve; -class Adaptor3d_Curve; - - -class Adaptor3d_HIsoCurve; -DEFINE_STANDARD_HANDLE(Adaptor3d_HIsoCurve, Adaptor3d_HCurve) - - -class Adaptor3d_HIsoCurve : public Adaptor3d_HCurve -{ - -public: - - - //! Creates an empty GenHCurve. - Standard_EXPORT Adaptor3d_HIsoCurve(); - - //! Creates a GenHCurve from a Curve - Standard_EXPORT Adaptor3d_HIsoCurve(const Adaptor3d_IsoCurve& C); - - //! Sets the field of the GenHCurve. - Standard_EXPORT void Set (const Adaptor3d_IsoCurve& C); - - //! Returns the curve used to create the GenHCurve. - //! This is redefined from HCurve, cannot be inline. - Standard_EXPORT const Adaptor3d_Curve& Curve() const Standard_OVERRIDE; - - //! Returns the curve used to create the GenHCurve. - //! This is redefined from HCurve, cannot be inline. - Standard_EXPORT Adaptor3d_Curve& GetCurve() Standard_OVERRIDE; - - //! Returns the curve used to create the GenHCurve. - Adaptor3d_IsoCurve& ChangeCurve(); - - - - - DEFINE_STANDARD_RTTI_INLINE(Adaptor3d_HIsoCurve,Adaptor3d_HCurve) - -protected: - - - Adaptor3d_IsoCurve myCurve; - - -private: - - - - -}; - -#define TheCurve Adaptor3d_IsoCurve -#define TheCurve_hxx -#define Adaptor3d_GenHCurve Adaptor3d_HIsoCurve -#define Adaptor3d_GenHCurve_hxx -#define Handle_Adaptor3d_GenHCurve Handle(Adaptor3d_HIsoCurve) - -#include - -#undef TheCurve -#undef TheCurve_hxx -#undef Adaptor3d_GenHCurve -#undef Adaptor3d_GenHCurve_hxx -#undef Handle_Adaptor3d_GenHCurve - - - - -#endif // _Adaptor3d_HIsoCurve_HeaderFile diff --git a/src/Adaptor3d/Adaptor3d_HIsoCurve_0.cxx b/src/Adaptor3d/Adaptor3d_HIsoCurve_0.cxx deleted file mode 100644 index 791880cb10..0000000000 --- a/src/Adaptor3d/Adaptor3d_HIsoCurve_0.cxx +++ /dev/null @@ -1,42 +0,0 @@ -// Created on: 1992-10-08 -// Created by: Isabelle GRIGNON -// Copyright (c) 1992-1999 Matra Datavision -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - -#include - -#include - -#include -#include -#include -#include -#include - - - - - - - - - - -#define TheCurve Adaptor3d_IsoCurve -#define TheCurve_hxx -#define Adaptor3d_GenHCurve Adaptor3d_HIsoCurve -#define Adaptor3d_GenHCurve_hxx -#define Handle_Adaptor3d_GenHCurve Handle(Adaptor3d_HIsoCurve) -#include - diff --git a/src/Adaptor3d/Adaptor3d_HSurface.cxx b/src/Adaptor3d/Adaptor3d_HSurface.cxx deleted file mode 100644 index afbc6dafb1..0000000000 --- a/src/Adaptor3d/Adaptor3d_HSurface.cxx +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -IMPLEMENT_STANDARD_RTTIEXT(Adaptor3d_HSurface,Standard_Transient) \ No newline at end of file diff --git a/src/Adaptor3d/Adaptor3d_HSurface.hxx b/src/Adaptor3d/Adaptor3d_HSurface.hxx deleted file mode 100644 index 80fd5f8199..0000000000 --- a/src/Adaptor3d/Adaptor3d_HSurface.hxx +++ /dev/null @@ -1,188 +0,0 @@ -// Created on: 1994-02-14 -// Created by: model -// Copyright (c) 1994-1999 Matra Datavision -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - -#ifndef _Adaptor3d_HSurface_HeaderFile -#define _Adaptor3d_HSurface_HeaderFile - -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -class Standard_OutOfRange; -class Standard_NoSuchObject; -class Standard_DomainError; -class Standard_NotImplemented; -class Adaptor3d_Surface; -class gp_Pnt; -class gp_Vec; -class Geom_BezierSurface; -class Geom_BSplineSurface; -class Adaptor3d_HCurve; - - -class Adaptor3d_HSurface; -DEFINE_STANDARD_HANDLE(Adaptor3d_HSurface, Standard_Transient) - -//! Root class for surfaces manipulated by handles, on -//! which geometric algorithms work. -//! An adapted surface is an interface between the -//! services provided by a surface and those required of -//! the surface by algorithms which use it. -//! A derived concrete class is provided: -//! GeomAdaptor_HSurface for a surface from the Geom package. -class Adaptor3d_HSurface : public Standard_Transient -{ - -public: - - - //! Returns a reference to the Surface inside the HSurface. - Standard_EXPORT virtual const Adaptor3d_Surface& Surface() const = 0; - - Standard_Real FirstUParameter() const; - - Standard_Real LastUParameter() const; - - Standard_Real FirstVParameter() const; - - Standard_Real LastVParameter() const; - - GeomAbs_Shape UContinuity() const; - - GeomAbs_Shape VContinuity() const; - - Standard_Integer NbUIntervals (const GeomAbs_Shape S) const; - - Standard_Integer NbVIntervals (const GeomAbs_Shape S) const; - - void UIntervals (TColStd_Array1OfReal& T, const GeomAbs_Shape S) const; - - void VIntervals (TColStd_Array1OfReal& T, const GeomAbs_Shape S) const; - - Handle(Adaptor3d_HSurface) UTrim (const Standard_Real First, const Standard_Real Last, const Standard_Real Tol) const; - - Handle(Adaptor3d_HSurface) VTrim (const Standard_Real First, const Standard_Real Last, const Standard_Real Tol) const; - - Standard_Boolean IsUClosed() const; - - Standard_Boolean IsVClosed() const; - - Standard_Boolean IsUPeriodic() const; - - Standard_Real UPeriod() const; - - Standard_Boolean IsVPeriodic() const; - - Standard_Real VPeriod() const; - - gp_Pnt Value (const Standard_Real U, const Standard_Real V) const; - - void D0 (const Standard_Real U, const Standard_Real V, gp_Pnt& P) const; - - void D1 (const Standard_Real U, const Standard_Real V, gp_Pnt& P, gp_Vec& D1U, gp_Vec& D1V) const; - - void D2 (const Standard_Real U, const Standard_Real V, gp_Pnt& P, gp_Vec& D1U, gp_Vec& D1V, gp_Vec& D2U, gp_Vec& D2V, gp_Vec& D2UV) const; - - void D3 (const Standard_Real U, const Standard_Real V, gp_Pnt& P, gp_Vec& D1U, gp_Vec& D1V, gp_Vec& D2U, gp_Vec& D2V, gp_Vec& D2UV, gp_Vec& D3U, gp_Vec& D3V, gp_Vec& D3UUV, gp_Vec& D3UVV) const; - - gp_Vec DN (const Standard_Real U, const Standard_Real V, const Standard_Integer Nu, const Standard_Integer Nv) const; - - Standard_Real UResolution (const Standard_Real R3d) const; - - Standard_Real VResolution (const Standard_Real R3d) const; - - GeomAbs_SurfaceType GetType() const; - - gp_Pln Plane() const; - - gp_Cylinder Cylinder() const; - - gp_Cone Cone() const; - - gp_Sphere Sphere() const; - - gp_Torus Torus() const; - - Standard_Integer UDegree() const; - - Standard_Integer NbUPoles() const; - - Standard_Integer VDegree() const; - - Standard_Integer NbVPoles() const; - - Standard_Integer NbUKnots() const; - - Standard_Integer NbVKnots() const; - - Standard_Boolean IsURational() const; - - Standard_Boolean IsVRational() const; - - Handle(Geom_BezierSurface) Bezier() const; - - Handle(Geom_BSplineSurface) BSpline() const; - - gp_Ax1 AxeOfRevolution() const; - - gp_Dir Direction() const; - - Handle(Adaptor3d_HCurve) BasisCurve() const; - - Handle(Adaptor3d_HSurface) BasisSurface() const; - - Standard_Real OffsetValue() const; - - - - - DEFINE_STANDARD_RTTIEXT(Adaptor3d_HSurface,Standard_Transient) - -protected: - - - - -private: - - - - -}; - - -#include - - - - - -#endif // _Adaptor3d_HSurface_HeaderFile diff --git a/src/Adaptor3d/Adaptor3d_HSurface.lxx b/src/Adaptor3d/Adaptor3d_HSurface.lxx deleted file mode 100644 index 3510b204ff..0000000000 --- a/src/Adaptor3d/Adaptor3d_HSurface.lxx +++ /dev/null @@ -1,485 +0,0 @@ -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - -#include - -//======================================================================= -//function : FirstUParameter -//purpose : -//======================================================================= - -inline Standard_Real Adaptor3d_HSurface::FirstUParameter() const -{ - return Surface().FirstUParameter(); -} - -//======================================================================= -//function : LastUParameter -//purpose : -//======================================================================= - - inline Standard_Real Adaptor3d_HSurface::LastUParameter() const -{ - return Surface().LastUParameter(); -} - -//======================================================================= -//function : FirstVParameter -//purpose : -//======================================================================= - - inline Standard_Real Adaptor3d_HSurface::FirstVParameter() const -{ - return Surface().FirstVParameter(); -} - -//======================================================================= -//function : LastVParameter -//purpose : -//======================================================================= - - inline Standard_Real Adaptor3d_HSurface::LastVParameter() const -{ - return Surface().LastVParameter(); -} - -//======================================================================= -//function : UContinuity -//purpose : -//======================================================================= - - inline GeomAbs_Shape Adaptor3d_HSurface::UContinuity() const -{ - return Surface().UContinuity(); -} - -//======================================================================= -//function : VContinuity -//purpose : -//======================================================================= - - inline GeomAbs_Shape Adaptor3d_HSurface::VContinuity() const -{ - return Surface().VContinuity(); -} - -//======================================================================= -//function : NbUIntervals -//purpose : -//======================================================================= - - inline Standard_Integer Adaptor3d_HSurface::NbUIntervals(const GeomAbs_Shape S) const -{ - return Surface().NbUIntervals(S); -} - -//======================================================================= -//function : NbVIntervals -//purpose : -//======================================================================= - - inline Standard_Integer Adaptor3d_HSurface::NbVIntervals(const GeomAbs_Shape S) const -{ - return Surface().NbVIntervals(S); -} - -//======================================================================= -//function : UInterval -//purpose : -//======================================================================= - - inline void Adaptor3d_HSurface::UIntervals(TColStd_Array1OfReal& T, - const GeomAbs_Shape S) const -{ - Surface().UIntervals(T,S); -} - -//======================================================================= -//function : VInterval -//purpose : -//======================================================================= - - inline void Adaptor3d_HSurface::VIntervals(TColStd_Array1OfReal& T, - const GeomAbs_Shape S) const -{ - Surface().VIntervals(T, S); -} - -//======================================================================= -//function : inline -//purpose : -//======================================================================= - -inline Handle(Adaptor3d_HSurface) Adaptor3d_HSurface::UTrim -(const Standard_Real First, - const Standard_Real Last, - const Standard_Real Tol) const -{ - return Surface().UTrim(First,Last,Tol); -} - - -//======================================================================= -//function : inline -//purpose : -//======================================================================= - -inline Handle(Adaptor3d_HSurface) Adaptor3d_HSurface::VTrim -(const Standard_Real First, - const Standard_Real Last, - const Standard_Real Tol) const -{ - return Surface().VTrim(First,Last,Tol); -} - - -//======================================================================= -//function : IsUClosed -//purpose : -//======================================================================= - - inline Standard_Boolean Adaptor3d_HSurface::IsUClosed() const -{ - return Surface().IsUClosed(); -} - -//======================================================================= -//function : IsVClosed -//purpose : -//======================================================================= - - inline Standard_Boolean Adaptor3d_HSurface::IsVClosed() const -{ - return Surface().IsVClosed(); -} - -//======================================================================= -//function : IsUPeriodic -//purpose : -//======================================================================= - - inline Standard_Boolean Adaptor3d_HSurface::IsUPeriodic() const -{ - return Surface().IsUPeriodic(); -} - -//======================================================================= -//function : UPeriod -//purpose : -//======================================================================= - - inline Standard_Real Adaptor3d_HSurface::UPeriod() const -{ - return Surface().UPeriod(); -} - -//======================================================================= -//function : IsVPeriodic -//purpose : -//======================================================================= - - inline Standard_Boolean Adaptor3d_HSurface::IsVPeriodic() const -{ - return Surface().IsVPeriodic(); -} - -//======================================================================= -//function : VPeriod -//purpose : -//======================================================================= - - inline Standard_Real Adaptor3d_HSurface::VPeriod() const -{ - return Surface().VPeriod(); -} - -//======================================================================= -//function : Value -//purpose : -//======================================================================= - - inline gp_Pnt Adaptor3d_HSurface::Value(const Standard_Real U, const Standard_Real V) const -{ - return Surface().Value(U,V); -} - -//======================================================================= -//function : D0 -//purpose : -//======================================================================= - - inline void Adaptor3d_HSurface::D0(const Standard_Real U, const Standard_Real V, gp_Pnt& P) const -{ - Surface().D0(U,V,P); -} - -//======================================================================= -//function : D1 -//purpose : -//======================================================================= - - inline void Adaptor3d_HSurface::D1(const Standard_Real U, const Standard_Real V, gp_Pnt& P, gp_Vec& D1U, gp_Vec& D1V) const -{ - Surface().D1(U,V,P,D1U,D1V); -} - -//======================================================================= -//function : D2 -//purpose : -//======================================================================= - - inline void Adaptor3d_HSurface::D2(const Standard_Real U, const Standard_Real V, gp_Pnt& P, gp_Vec& D1U, gp_Vec& D1V, gp_Vec& D2U, gp_Vec& D2V, gp_Vec& D2UV) const -{ - Surface().D2(U,V,P,D1U,D1V,D2U,D2V,D2UV); -} - -//======================================================================= -//function : D3 -//purpose : -//======================================================================= - - inline void Adaptor3d_HSurface::D3(const Standard_Real U, const Standard_Real V, gp_Pnt& P, gp_Vec& D1U, gp_Vec& D1V, gp_Vec& D2U, gp_Vec& D2V, gp_Vec& D2UV, gp_Vec& D3U, gp_Vec& D3V, gp_Vec& D3UUV, gp_Vec& D3UVV) const -{ - Surface().D3(U,V,P,D1U,D1V,D2U,D2V,D2UV,D3U,D3V,D3UUV,D3UVV); -} - -//======================================================================= -//function : DN -//purpose : -//======================================================================= - - inline gp_Vec Adaptor3d_HSurface::DN(const Standard_Real U, const Standard_Real V, const Standard_Integer Nu, const Standard_Integer Nv) const -{ - return Surface().DN(U,V,Nu,Nv); -} - -//======================================================================= -//function : UResolution -//purpose : -//======================================================================= - - inline Standard_Real Adaptor3d_HSurface::UResolution(const Standard_Real R3d) const -{ - return Surface().UResolution(R3d); -} - -//======================================================================= -//function : VResolution -//purpose : -//======================================================================= - - inline Standard_Real Adaptor3d_HSurface::VResolution(const Standard_Real R3d) const -{ - return Surface().VResolution(R3d); -} - -//======================================================================= -//function : GetType -//purpose : -//======================================================================= - - inline GeomAbs_SurfaceType Adaptor3d_HSurface::GetType() const -{ - return Surface().GetType(); -} - -//======================================================================= -//function : Plane -//purpose : -//======================================================================= - - inline gp_Pln Adaptor3d_HSurface::Plane() const -{ - return Surface().Plane(); -} - -//======================================================================= -//function : Cylinder -//purpose : -//======================================================================= - - inline gp_Cylinder Adaptor3d_HSurface::Cylinder() const -{ - return Surface().Cylinder(); -} - -//======================================================================= -//function : Cone -//purpose : -//======================================================================= - - inline gp_Cone Adaptor3d_HSurface::Cone() const -{ - return Surface().Cone(); -} - -//======================================================================= -//function : Sphere -//purpose : -//======================================================================= - - inline gp_Sphere Adaptor3d_HSurface::Sphere() const -{ - return Surface().Sphere(); -} - -//======================================================================= -//function : Torus -//purpose : -//======================================================================= - - inline gp_Torus Adaptor3d_HSurface::Torus() const -{ - return Surface().Torus(); -} -//======================================================================= -//function : UDegree -//purpose : -//======================================================================= - -inline Standard_Integer Adaptor3d_HSurface::UDegree() const -{ - return Surface().UDegree(); -} -//======================================================================= -//function : NbUPoles -//purpose : -//======================================================================= - -inline Standard_Integer Adaptor3d_HSurface::NbUPoles() const -{ - return Surface().NbUPoles(); -} -//======================================================================= -//function : VDegree -//purpose : -//======================================================================= - -inline Standard_Integer Adaptor3d_HSurface::VDegree() const -{ - return Surface().VDegree(); -} -//======================================================================= -//function : NbVPoles -//purpose : -//======================================================================= - -inline Standard_Integer Adaptor3d_HSurface::NbVPoles() const -{ - return Surface().NbVPoles(); -} -//======================================================================= -//function : NbUKnots -//purpose : -//======================================================================= - -inline Standard_Integer Adaptor3d_HSurface::NbUKnots() const -{ - return Surface().NbUKnots(); -} -//======================================================================= -//function : NbVKnots -//purpose : -//======================================================================= - -inline Standard_Integer Adaptor3d_HSurface::NbVKnots() const -{ - return Surface().NbVKnots(); -} -//======================================================================= -//function : IsURational -//purpose : -//======================================================================= - -inline Standard_Boolean Adaptor3d_HSurface::IsURational() const -{ - return Surface().IsURational(); -} -//======================================================================= -//function : NbVKnots -//purpose : -//======================================================================= - -inline Standard_Boolean Adaptor3d_HSurface::IsVRational() const -{ - return Surface().IsVRational(); -} -//======================================================================= -//function : Bezier -//purpose : -//======================================================================= - - inline Handle(Geom_BezierSurface) Adaptor3d_HSurface::Bezier() const -{ - return Surface().Bezier(); -} - -//======================================================================= -//function : BSpline -//purpose : -//======================================================================= - - inline Handle(Geom_BSplineSurface) Adaptor3d_HSurface::BSpline() const -{ - return Surface().BSpline(); -} - -//======================================================================= -//function : Axis -//purpose : -//======================================================================= - - inline gp_Ax1 Adaptor3d_HSurface::AxeOfRevolution() const -{ - return Surface().AxeOfRevolution(); -} - -//======================================================================= -//function : Direction -//purpose : -//======================================================================= - - inline gp_Dir Adaptor3d_HSurface::Direction() const -{ - return Surface().Direction(); -} - -//======================================================================= -//function : BasisCurve -//purpose : -//======================================================================= - - inline Handle(Adaptor3d_HCurve) Adaptor3d_HSurface::BasisCurve() const -{ - return Surface().BasisCurve(); -} - -//======================================================================= -//function : BasisSurface -//purpose : -//======================================================================= - - inline Handle(Adaptor3d_HSurface) Adaptor3d_HSurface::BasisSurface() const -{ - return Surface().BasisSurface(); -} - -//======================================================================= -//function : OffsetValue -//purpose : -//======================================================================= - - inline Standard_Real Adaptor3d_HSurface::OffsetValue() const -{ - return Surface().OffsetValue(); -} diff --git a/src/Adaptor3d/Adaptor3d_HSurfaceTool.cxx b/src/Adaptor3d/Adaptor3d_HSurfaceTool.cxx index a2aa0ee872..673acbaa73 100644 --- a/src/Adaptor3d/Adaptor3d_HSurfaceTool.cxx +++ b/src/Adaptor3d/Adaptor3d_HSurfaceTool.cxx @@ -13,10 +13,10 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. - -#include -#include #include + +#include +#include #include #include #include @@ -24,7 +24,7 @@ #include #include -Standard_Integer Adaptor3d_HSurfaceTool::NbSamplesU(const Handle(Adaptor3d_HSurface)& S) +Standard_Integer Adaptor3d_HSurfaceTool::NbSamplesU(const Handle(Adaptor3d_Surface)& S) { switch (S->GetType()) { @@ -42,7 +42,7 @@ Standard_Integer Adaptor3d_HSurfaceTool::NbSamplesU(const Handle(Adaptor3d_HSurf return 10; } -Standard_Integer Adaptor3d_HSurfaceTool::NbSamplesV(const Handle(Adaptor3d_HSurface)& S) +Standard_Integer Adaptor3d_HSurfaceTool::NbSamplesV(const Handle(Adaptor3d_Surface)& S) { switch (S->GetType()) { @@ -65,7 +65,7 @@ Standard_Integer Adaptor3d_HSurfaceTool::NbSamplesV(const Handle(Adaptor3d_HSurf return 10; } -Standard_Integer Adaptor3d_HSurfaceTool::NbSamplesU(const Handle(Adaptor3d_HSurface)& S, +Standard_Integer Adaptor3d_HSurfaceTool::NbSamplesU(const Handle(Adaptor3d_Surface)& S, const Standard_Real u1, const Standard_Real u2) { @@ -82,7 +82,7 @@ Standard_Integer Adaptor3d_HSurfaceTool::NbSamplesU(const Handle(Adaptor3d_HSurf return n; } -Standard_Integer Adaptor3d_HSurfaceTool::NbSamplesV(const Handle(Adaptor3d_HSurface)& S, +Standard_Integer Adaptor3d_HSurfaceTool::NbSamplesV(const Handle(Adaptor3d_Surface)& S, const Standard_Real v1, const Standard_Real v2) { diff --git a/src/Adaptor3d/Adaptor3d_HSurfaceTool.hxx b/src/Adaptor3d/Adaptor3d_HSurfaceTool.hxx index 6fd07573f3..9ec2f39268 100644 --- a/src/Adaptor3d/Adaptor3d_HSurfaceTool.hxx +++ b/src/Adaptor3d/Adaptor3d_HSurfaceTool.hxx @@ -17,35 +17,26 @@ #ifndef _Adaptor3d_HSurfaceTool_HeaderFile #define _Adaptor3d_HSurfaceTool_HeaderFile +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include #include - -#include -#include -#include -#include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -class Standard_NoSuchObject; -class Standard_OutOfRange; -class Adaptor3d_HSurface; -class gp_Pnt; -class gp_Vec; -class Geom_BezierSurface; -class Geom_BSplineSurface; -class Adaptor3d_HCurve; - - +#include class Adaptor3d_HSurfaceTool { @@ -53,113 +44,135 @@ public: DEFINE_STANDARD_ALLOC - - static Standard_Real FirstUParameter (const Handle(Adaptor3d_HSurface)& S); - - static Standard_Real FirstVParameter (const Handle(Adaptor3d_HSurface)& S); - - static Standard_Real LastUParameter (const Handle(Adaptor3d_HSurface)& S); - - static Standard_Real LastVParameter (const Handle(Adaptor3d_HSurface)& S); - - static Standard_Integer NbUIntervals (const Handle(Adaptor3d_HSurface)& S, const GeomAbs_Shape Sh); - - static Standard_Integer NbVIntervals (const Handle(Adaptor3d_HSurface)& S, const GeomAbs_Shape Sh); - - static void UIntervals (const Handle(Adaptor3d_HSurface)& S, TColStd_Array1OfReal& T, const GeomAbs_Shape Sh); - - static void VIntervals (const Handle(Adaptor3d_HSurface)& S, TColStd_Array1OfReal& T, const GeomAbs_Shape Sh); - + static Standard_Real FirstUParameter (const Handle(Adaptor3d_Surface)& theSurf) { return theSurf->FirstUParameter(); } + + static Standard_Real FirstVParameter (const Handle(Adaptor3d_Surface)& theSurf) { return theSurf->FirstVParameter(); } + + static Standard_Real LastUParameter (const Handle(Adaptor3d_Surface)& theSurf) { return theSurf->LastUParameter(); } + + static Standard_Real LastVParameter (const Handle(Adaptor3d_Surface)& theSurf) { return theSurf->LastVParameter(); } + + static Standard_Integer NbUIntervals (const Handle(Adaptor3d_Surface)& theSurf, const GeomAbs_Shape theSh) { return theSurf->NbUIntervals (theSh); } + + static Standard_Integer NbVIntervals (const Handle(Adaptor3d_Surface)& theSurf, const GeomAbs_Shape theSh) { return theSurf->NbVIntervals (theSh); } + + static void UIntervals (const Handle(Adaptor3d_Surface)& theSurf, TColStd_Array1OfReal& theTab, const GeomAbs_Shape theSh) { theSurf->UIntervals (theTab, theSh); } + + static void VIntervals (const Handle(Adaptor3d_Surface)& theSurf, TColStd_Array1OfReal& theTab, const GeomAbs_Shape theSh) { theSurf->VIntervals (theTab, theSh); } + //! If >= - static Handle(Adaptor3d_HSurface) UTrim (const Handle(Adaptor3d_HSurface)& S, const Standard_Real First, const Standard_Real Last, const Standard_Real Tol); - + static Handle(Adaptor3d_Surface) UTrim (const Handle(Adaptor3d_Surface)& theSurf, + const Standard_Real theFirst, const Standard_Real theLast, const Standard_Real theTol) + { + return theSurf->UTrim (theFirst, theLast, theTol); + } + //! If >= - static Handle(Adaptor3d_HSurface) VTrim (const Handle(Adaptor3d_HSurface)& S, const Standard_Real First, const Standard_Real Last, const Standard_Real Tol); + static Handle(Adaptor3d_Surface) VTrim (const Handle(Adaptor3d_Surface)& theSurf, + const Standard_Real theFirst, const Standard_Real theLast, const Standard_Real theTol) + { + return theSurf->VTrim (theFirst, theLast, theTol); + } - static Standard_Boolean IsUClosed (const Handle(Adaptor3d_HSurface)& S); - - static Standard_Boolean IsVClosed (const Handle(Adaptor3d_HSurface)& S); - - static Standard_Boolean IsUPeriodic (const Handle(Adaptor3d_HSurface)& S); - - static Standard_Real UPeriod (const Handle(Adaptor3d_HSurface)& S); - - static Standard_Boolean IsVPeriodic (const Handle(Adaptor3d_HSurface)& S); - - static Standard_Real VPeriod (const Handle(Adaptor3d_HSurface)& S); - - static gp_Pnt Value (const Handle(Adaptor3d_HSurface)& S, const Standard_Real u, const Standard_Real v); - - static void D0 (const Handle(Adaptor3d_HSurface)& S, const Standard_Real u, const Standard_Real v, gp_Pnt& P); - - static void D1 (const Handle(Adaptor3d_HSurface)& S, const Standard_Real u, const Standard_Real v, gp_Pnt& P, gp_Vec& D1u, gp_Vec& D1v); - - static void D2 (const Handle(Adaptor3d_HSurface)& S, const Standard_Real u, const Standard_Real v, gp_Pnt& P, gp_Vec& D1U, gp_Vec& D1V, gp_Vec& D2U, gp_Vec& D2V, gp_Vec& D2UV); - - static void D3 (const Handle(Adaptor3d_HSurface)& S, const Standard_Real u, const Standard_Real v, gp_Pnt& P, gp_Vec& D1U, gp_Vec& D1V, gp_Vec& D2U, gp_Vec& D2V, gp_Vec& D2UV, gp_Vec& D3U, gp_Vec& D3V, gp_Vec& D3UUV, gp_Vec& D3UVV); - - static gp_Vec DN (const Handle(Adaptor3d_HSurface)& S, const Standard_Real u, const Standard_Real v, const Standard_Integer Nu, const Standard_Integer Nv); - - static Standard_Real UResolution (const Handle(Adaptor3d_HSurface)& S, const Standard_Real R3d); - - static Standard_Real VResolution (const Handle(Adaptor3d_HSurface)& S, const Standard_Real R3d); - - static GeomAbs_SurfaceType GetType (const Handle(Adaptor3d_HSurface)& S); - - static gp_Pln Plane (const Handle(Adaptor3d_HSurface)& S); - - static gp_Cylinder Cylinder (const Handle(Adaptor3d_HSurface)& S); - - static gp_Cone Cone (const Handle(Adaptor3d_HSurface)& S); - - static gp_Torus Torus (const Handle(Adaptor3d_HSurface)& S); - - static gp_Sphere Sphere (const Handle(Adaptor3d_HSurface)& S); - - static Handle(Geom_BezierSurface) Bezier (const Handle(Adaptor3d_HSurface)& S); - - static Handle(Geom_BSplineSurface) BSpline (const Handle(Adaptor3d_HSurface)& S); - - static gp_Ax1 AxeOfRevolution (const Handle(Adaptor3d_HSurface)& S); - - static gp_Dir Direction (const Handle(Adaptor3d_HSurface)& S); - - static Handle(Adaptor3d_HCurve) BasisCurve (const Handle(Adaptor3d_HSurface)& S); - - static Handle(Adaptor3d_HSurface) BasisSurface (const Handle(Adaptor3d_HSurface)& S); - - static Standard_Real OffsetValue (const Handle(Adaptor3d_HSurface)& S); - - Standard_EXPORT static Standard_Integer NbSamplesU (const Handle(Adaptor3d_HSurface)& S); - - Standard_EXPORT static Standard_Integer NbSamplesV (const Handle(Adaptor3d_HSurface)& S); - - Standard_EXPORT static Standard_Integer NbSamplesU (const Handle(Adaptor3d_HSurface)& S, const Standard_Real u1, const Standard_Real u2); - - Standard_EXPORT static Standard_Integer NbSamplesV (const Handle(Adaptor3d_HSurface)& S, const Standard_Real v1, const Standard_Real v2); + static Standard_Boolean IsUClosed (const Handle(Adaptor3d_Surface)& theSurf) { return theSurf->IsUClosed(); } + static Standard_Boolean IsVClosed (const Handle(Adaptor3d_Surface)& theSurf) { return theSurf->IsVClosed(); } + + static Standard_Boolean IsUPeriodic (const Handle(Adaptor3d_Surface)& theSurf) { return theSurf->IsUPeriodic(); } + static Standard_Real UPeriod (const Handle(Adaptor3d_Surface)& theSurf) { return theSurf->UPeriod(); } + static Standard_Boolean IsVPeriodic (const Handle(Adaptor3d_Surface)& theSurf) { return theSurf->IsVPeriodic(); } + + static Standard_Real VPeriod (const Handle(Adaptor3d_Surface)& theSurf) { return theSurf->VPeriod(); } -protected: + static gp_Pnt Value (const Handle(Adaptor3d_Surface)& theSurf, const Standard_Real theU, const Standard_Real theV) { return theSurf->Value (theU, theV); } + static void D0 (const Handle(Adaptor3d_Surface)& theSurf, + const Standard_Real theU, const Standard_Real theV, + gp_Pnt& thePnt) + { + theSurf->D0 (theU, theV, thePnt); + } + static void D1 (const Handle(Adaptor3d_Surface)& theSurf, + const Standard_Real theU, const Standard_Real theV, + gp_Pnt& thePnt, + gp_Vec& theD1U, gp_Vec& theD1V) + { + theSurf->D1 (theU, theV, thePnt, theD1U, theD1V); + } + static void D2 (const Handle(Adaptor3d_Surface)& theSurf, + const Standard_Real theU, const Standard_Real theV, + gp_Pnt& thePnt, + gp_Vec& theD1U, gp_Vec& theD1V, + gp_Vec& theD2U, gp_Vec& theD2V, gp_Vec& theD2UV) + { + theSurf->D2 (theU, theV, thePnt, theD1U, theD1V, theD2U, theD2V, theD2UV); + } + static void D3 (const Handle(Adaptor3d_Surface)& theSurf, + const Standard_Real theU, const Standard_Real theV, + gp_Pnt& thePnt, + gp_Vec& theD1U, gp_Vec& theD1V, + gp_Vec& theD2U, gp_Vec& theD2V, gp_Vec& theD2UV, + gp_Vec& theD3U, gp_Vec& theD3V, gp_Vec& theD3UUV, gp_Vec& theD3UVV) + { + theSurf->D3 (theU, theV, thePnt, theD1U, theD1V, theD2U, theD2V, theD2UV, theD3U, theD3V, theD3UUV, theD3UVV); + } -private: + static gp_Vec DN (const Handle(Adaptor3d_Surface)& theSurf, + const Standard_Real theU, const Standard_Real theV, + const Standard_Integer theNU, const Standard_Integer theNV) + { + return theSurf->DN (theU, theV, theNU, theNV); + } + static Standard_Real UResolution (const Handle(Adaptor3d_Surface)& theSurf, const Standard_Real theR3d) + { + return theSurf->UResolution (theR3d); + } + static Standard_Real VResolution (const Handle(Adaptor3d_Surface)& theSurf, const Standard_Real theR3d) + { + return theSurf->VResolution (theR3d); + } + static GeomAbs_SurfaceType GetType (const Handle(Adaptor3d_Surface)& theSurf) { return theSurf->GetType(); } + static gp_Pln Plane (const Handle(Adaptor3d_Surface)& theSurf) { return theSurf->Plane(); } + + static gp_Cylinder Cylinder (const Handle(Adaptor3d_Surface)& theSurf) { return theSurf->Cylinder(); } + + static gp_Cone Cone (const Handle(Adaptor3d_Surface)& theSurf) { return theSurf->Cone(); } + + static gp_Torus Torus (const Handle(Adaptor3d_Surface)& theSurf) { return theSurf->Torus(); } + + static gp_Sphere Sphere (const Handle(Adaptor3d_Surface)& theSurf) { return theSurf->Sphere(); } + + static Handle(Geom_BezierSurface) Bezier (const Handle(Adaptor3d_Surface)& theSurf) { return theSurf->Bezier(); } + + static Handle(Geom_BSplineSurface) BSpline (const Handle(Adaptor3d_Surface)& theSurf) { return theSurf->BSpline(); } + + static gp_Ax1 AxeOfRevolution (const Handle(Adaptor3d_Surface)& theSurf) { return theSurf->AxeOfRevolution(); } + + static gp_Dir Direction (const Handle(Adaptor3d_Surface)& theSurf) { return theSurf->Direction(); } + + static Handle(Adaptor3d_Curve) BasisCurve (const Handle(Adaptor3d_Surface)& theSurf) { return theSurf->BasisCurve(); } + + static Handle(Adaptor3d_Surface) BasisSurface (const Handle(Adaptor3d_Surface)& theSurf) { return theSurf->BasisSurface(); } + + static Standard_Real OffsetValue (const Handle(Adaptor3d_Surface)& theSurf) { return theSurf->OffsetValue(); } + + Standard_EXPORT static Standard_Integer NbSamplesU (const Handle(Adaptor3d_Surface)& S); + + Standard_EXPORT static Standard_Integer NbSamplesV (const Handle(Adaptor3d_Surface)& S); + + Standard_EXPORT static Standard_Integer NbSamplesU (const Handle(Adaptor3d_Surface)& S, const Standard_Real u1, const Standard_Real u2); + + Standard_EXPORT static Standard_Integer NbSamplesV (const Handle(Adaptor3d_Surface)& , const Standard_Real v1, const Standard_Real v2); }; - -#include - - - - - #endif // _Adaptor3d_HSurfaceTool_HeaderFile diff --git a/src/Adaptor3d/Adaptor3d_HSurfaceTool.lxx b/src/Adaptor3d/Adaptor3d_HSurfaceTool.lxx deleted file mode 100644 index 2d4483a742..0000000000 --- a/src/Adaptor3d/Adaptor3d_HSurfaceTool.lxx +++ /dev/null @@ -1,260 +0,0 @@ -// Created by: Laurent BUCHARD -// Copyright (c) 1993-1999 Matra Datavision -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - - -inline Standard_Real Adaptor3d_HSurfaceTool::FirstUParameter(const Handle(Adaptor3d_HSurface)& Surf) -{ - return Surf->FirstUParameter(); -} - -inline Standard_Real Adaptor3d_HSurfaceTool::FirstVParameter(const Handle(Adaptor3d_HSurface)& Surf) -{ - return Surf->FirstVParameter(); -} - -inline Standard_Real Adaptor3d_HSurfaceTool::LastUParameter(const Handle(Adaptor3d_HSurface)& Surf) -{ - return Surf->LastUParameter(); -} - -inline Standard_Real Adaptor3d_HSurfaceTool::LastVParameter(const Handle(Adaptor3d_HSurface)& Surf) -{ - return Surf->LastVParameter(); -} - -inline Standard_Integer Adaptor3d_HSurfaceTool::NbUIntervals(const Handle(Adaptor3d_HSurface)& Surf, const GeomAbs_Shape S) -{ - return Surf->NbUIntervals(S); -} - -inline Standard_Integer Adaptor3d_HSurfaceTool::NbVIntervals(const Handle(Adaptor3d_HSurface)& Surf, const GeomAbs_Shape S) -{ - return Surf->NbVIntervals(S); -} - -inline void Adaptor3d_HSurfaceTool::UIntervals(const Handle(Adaptor3d_HSurface)& Surf, - TColStd_Array1OfReal& Tab, - const GeomAbs_Shape S) -{ - Surf->UIntervals(Tab,S); -} - -inline void Adaptor3d_HSurfaceTool::VIntervals(const Handle(Adaptor3d_HSurface)& Surf, - TColStd_Array1OfReal& Tab, - const GeomAbs_Shape S) -{ - Surf->VIntervals(Tab,S); -} - -inline Handle(Adaptor3d_HSurface) Adaptor3d_HSurfaceTool::UTrim(const Handle(Adaptor3d_HSurface)& Surf, - const Standard_Real F, - const Standard_Real L, - const Standard_Real Tol) -{ - return Surf->UTrim(F,L,Tol); -} - -inline Handle(Adaptor3d_HSurface) Adaptor3d_HSurfaceTool::VTrim(const Handle(Adaptor3d_HSurface)& Surf, - const Standard_Real F, - const Standard_Real L, - const Standard_Real Tol) -{ - return Surf->VTrim(F,L,Tol); -} - -inline Standard_Boolean Adaptor3d_HSurfaceTool::IsUClosed(const Handle(Adaptor3d_HSurface)& S) -{ - return S->IsUClosed(); -} - -inline Standard_Boolean Adaptor3d_HSurfaceTool::IsVClosed(const Handle(Adaptor3d_HSurface)& S) -{ - return S->IsVClosed(); -} - -inline Standard_Boolean Adaptor3d_HSurfaceTool::IsUPeriodic(const Handle(Adaptor3d_HSurface)& S) -{ - return S->IsUPeriodic(); -} - -inline Standard_Real Adaptor3d_HSurfaceTool::UPeriod(const Handle(Adaptor3d_HSurface)& S) -{ - return S->UPeriod(); -} - -inline Standard_Boolean Adaptor3d_HSurfaceTool::IsVPeriodic(const Handle(Adaptor3d_HSurface)& S) -{ - return S->IsVPeriodic(); -} - -inline Standard_Real Adaptor3d_HSurfaceTool::VPeriod(const Handle(Adaptor3d_HSurface)& S) -{ - return S->VPeriod(); -} - -inline gp_Pnt Adaptor3d_HSurfaceTool::Value(const Handle(Adaptor3d_HSurface)& S, - const Standard_Real U, - const Standard_Real V ) -{ - return S->Value(U,V); -} - -inline void Adaptor3d_HSurfaceTool::D0(const Handle(Adaptor3d_HSurface)& S, - const Standard_Real U, - const Standard_Real V, - gp_Pnt& P) -{ - S->D0(U,V,P); -} - -inline void Adaptor3d_HSurfaceTool::D1(const Handle(Adaptor3d_HSurface)& S, - const Standard_Real U, - const Standard_Real V, - gp_Pnt& P, - gp_Vec& D1U, - gp_Vec& D1V) -{ - S->D1(U,V,P,D1U,D1V); -} - -inline void Adaptor3d_HSurfaceTool::D2(const Handle(Adaptor3d_HSurface)& S, - const Standard_Real U, - const Standard_Real V, - gp_Pnt& P, - gp_Vec& D1U, - gp_Vec& D1V, - gp_Vec& D2U, - gp_Vec& D2V, - gp_Vec& D2UV) -{ - S->D2(U,V,P,D1U,D1V,D2U,D2V,D2UV); -} - -inline void Adaptor3d_HSurfaceTool::D3(const Handle(Adaptor3d_HSurface)& S, - const Standard_Real U, - const Standard_Real V, - gp_Pnt& P, - gp_Vec& D1U, - gp_Vec& D1V, - gp_Vec& D2U, - gp_Vec& D2V, - gp_Vec& D2UV, - gp_Vec& D3U, - gp_Vec& D3V, - gp_Vec& D3UUV, - gp_Vec& D3UVV) -{ - S->D3(U,V,P,D1U,D1V,D2U,D2V,D2UV,D3U,D3V,D3UUV,D3UVV); -} - -inline gp_Vec Adaptor3d_HSurfaceTool::DN(const Handle(Adaptor3d_HSurface)& S, - const Standard_Real U, - const Standard_Real V, - const Standard_Integer Nu, - const Standard_Integer Nv) -{ - return S->DN(U,V,Nu,Nv); -} - -inline Standard_Real Adaptor3d_HSurfaceTool::UResolution(const Handle(Adaptor3d_HSurface)& S, - const Standard_Real R3d) -{ - return S->UResolution(R3d); -} - -inline Standard_Real Adaptor3d_HSurfaceTool::VResolution(const Handle(Adaptor3d_HSurface)& S, - const Standard_Real R3d) -{ - return S->VResolution(R3d); -} - -inline GeomAbs_SurfaceType Adaptor3d_HSurfaceTool::GetType(const Handle(Adaptor3d_HSurface)& S ) -{ - return S->GetType(); -} - -inline gp_Pln Adaptor3d_HSurfaceTool::Plane(const Handle(Adaptor3d_HSurface)& S) -{ - return S->Plane(); -} - -inline gp_Cylinder Adaptor3d_HSurfaceTool::Cylinder(const Handle(Adaptor3d_HSurface)& S) -{ - return S->Cylinder(); -} - -inline gp_Cone Adaptor3d_HSurfaceTool::Cone(const Handle(Adaptor3d_HSurface)& S) -{ - return S->Cone(); -} - -inline gp_Sphere Adaptor3d_HSurfaceTool::Sphere(const Handle(Adaptor3d_HSurface)& S) -{ - return S->Sphere(); -} - -inline gp_Torus Adaptor3d_HSurfaceTool::Torus(const Handle(Adaptor3d_HSurface)& S) -{ - return S->Torus(); -} - -inline Handle(Geom_BezierSurface) Adaptor3d_HSurfaceTool::Bezier(const Handle(Adaptor3d_HSurface)& S) -{ - return(S->Bezier()); -} - -inline Handle(Geom_BSplineSurface) Adaptor3d_HSurfaceTool::BSpline(const Handle(Adaptor3d_HSurface)& S) -{ - return(S->BSpline()); -} - -inline gp_Ax1 Adaptor3d_HSurfaceTool::AxeOfRevolution(const Handle(Adaptor3d_HSurface)& S) -{ - return(S->AxeOfRevolution()); -} - -inline gp_Dir Adaptor3d_HSurfaceTool::Direction(const Handle(Adaptor3d_HSurface)& S) -{ - return(S->Direction()); -} - -inline Handle(Adaptor3d_HCurve) Adaptor3d_HSurfaceTool::BasisCurve(const Handle(Adaptor3d_HSurface)& S) -{ - return(S->BasisCurve()); -} - -inline Handle(Adaptor3d_HSurface) Adaptor3d_HSurfaceTool::BasisSurface(const Handle(Adaptor3d_HSurface)& S) -{ - return(S->BasisSurface()); -} - -inline Standard_Real Adaptor3d_HSurfaceTool::OffsetValue(const Handle(Adaptor3d_HSurface)& S) -{ - return(S->OffsetValue()); -} diff --git a/src/Adaptor3d/Adaptor3d_HVertex.cxx b/src/Adaptor3d/Adaptor3d_HVertex.cxx index 28656327d0..f816665015 100644 --- a/src/Adaptor3d/Adaptor3d_HVertex.cxx +++ b/src/Adaptor3d/Adaptor3d_HVertex.cxx @@ -12,8 +12,9 @@ // commercial license or contractual agreement. -#include #include + +#include #include #include #include @@ -39,12 +40,12 @@ gp_Pnt2d Adaptor3d_HVertex::Value () return myPnt; } -Standard_Real Adaptor3d_HVertex::Parameter (const Handle(Adaptor2d_HCurve2d)& C) +Standard_Real Adaptor3d_HVertex::Parameter (const Handle(Adaptor2d_Curve2d)& C) { return ElCLib::Parameter(C->Line(),myPnt); } -Standard_Real Adaptor3d_HVertex::Resolution (const Handle(Adaptor2d_HCurve2d)&) +Standard_Real Adaptor3d_HVertex::Resolution (const Handle(Adaptor2d_Curve2d)&) { return myTol; } diff --git a/src/Adaptor3d/Adaptor3d_HVertex.hxx b/src/Adaptor3d/Adaptor3d_HVertex.hxx index 20a735163d..9a6b6838e3 100644 --- a/src/Adaptor3d/Adaptor3d_HVertex.hxx +++ b/src/Adaptor3d/Adaptor3d_HVertex.hxx @@ -17,17 +17,11 @@ #ifndef _Adaptor3d_HVertex_HeaderFile #define _Adaptor3d_HVertex_HeaderFile -#include -#include - +#include #include -#include #include -#include -#include -class gp_Pnt2d; -class Adaptor2d_HCurve2d; +class gp_Pnt2d; class Adaptor3d_HVertex; DEFINE_STANDARD_HANDLE(Adaptor3d_HVertex, Standard_Transient) @@ -45,10 +39,10 @@ public: Standard_EXPORT virtual gp_Pnt2d Value(); - Standard_EXPORT virtual Standard_Real Parameter (const Handle(Adaptor2d_HCurve2d)& C); + Standard_EXPORT virtual Standard_Real Parameter (const Handle(Adaptor2d_Curve2d)& C); //! Parametric resolution (2d). - Standard_EXPORT virtual Standard_Real Resolution (const Handle(Adaptor2d_HCurve2d)& C); + Standard_EXPORT virtual Standard_Real Resolution (const Handle(Adaptor2d_Curve2d)& C); Standard_EXPORT virtual TopAbs_Orientation Orientation(); diff --git a/src/Adaptor3d/Adaptor3d_InterFunc.cxx b/src/Adaptor3d/Adaptor3d_InterFunc.cxx index 264363089e..fec695971e 100644 --- a/src/Adaptor3d/Adaptor3d_InterFunc.cxx +++ b/src/Adaptor3d/Adaptor3d_InterFunc.cxx @@ -14,14 +14,14 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. - -#include #include + +#include #include #include #include -Adaptor3d_InterFunc::Adaptor3d_InterFunc(const Handle(Adaptor2d_HCurve2d)& C, const Standard_Real FixVal, const Standard_Integer Fix) : myCurve2d(C),myFixVal(FixVal),myFix(Fix) +Adaptor3d_InterFunc::Adaptor3d_InterFunc(const Handle(Adaptor2d_Curve2d)& C, const Standard_Real FixVal, const Standard_Integer Fix) : myCurve2d(C),myFixVal(FixVal),myFix(Fix) { if(Fix != 1 && Fix != 2 ) throw Standard_ConstructionError(); diff --git a/src/Adaptor3d/Adaptor3d_InterFunc.hxx b/src/Adaptor3d/Adaptor3d_InterFunc.hxx index 65b825a780..857326f4a7 100644 --- a/src/Adaptor3d/Adaptor3d_InterFunc.hxx +++ b/src/Adaptor3d/Adaptor3d_InterFunc.hxx @@ -17,17 +17,9 @@ #ifndef _Adaptor3d_InterFunc_HeaderFile #define _Adaptor3d_InterFunc_HeaderFile -#include -#include -#include - -#include -#include #include -#include -class Adaptor2d_HCurve2d; -class Standard_ConstructionError; +class Adaptor2d_Curve2d; //! Used to find the points U(t) = U0 or V(t) = V0 in //! order to determine the Cn discontinuities of an @@ -43,7 +35,7 @@ public: //! build the function U(t)=FixVal if Fix =1 or //! V(t)=FixVal if Fix=2 - Standard_EXPORT Adaptor3d_InterFunc(const Handle(Adaptor2d_HCurve2d)& C, const Standard_Real FixVal, const Standard_Integer Fix); + Standard_EXPORT Adaptor3d_InterFunc(const Handle(Adaptor2d_Curve2d)& C, const Standard_Real FixVal, const Standard_Integer Fix); //! computes the value of the function for the variable . //! Returns True if the calculation were successfully done, @@ -62,30 +54,12 @@ public: //! False otherwise. Standard_EXPORT Standard_Boolean Values (const Standard_Real X, Standard_Real& F, Standard_Real& D); - - - -protected: - - - - - private: - - - Handle(Adaptor2d_HCurve2d) myCurve2d; + Handle(Adaptor2d_Curve2d) myCurve2d; Standard_Real myFixVal; Standard_Integer myFix; - }; - - - - - - #endif // _Adaptor3d_InterFunc_HeaderFile diff --git a/src/Adaptor3d/Adaptor3d_IsoCurve.cxx b/src/Adaptor3d/Adaptor3d_IsoCurve.cxx index 5cbc54eb86..712d89a8a3 100644 --- a/src/Adaptor3d/Adaptor3d_IsoCurve.cxx +++ b/src/Adaptor3d/Adaptor3d_IsoCurve.cxx @@ -11,11 +11,10 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. - -#include -#include -#include #include + +#include +#include #include #include #include @@ -41,6 +40,8 @@ #include #include +IMPLEMENT_STANDARD_RTTIEXT(Adaptor3d_IsoCurve, Adaptor3d_Curve) + //======================================================================= //function : Adaptor3d_IsoCurve //purpose : @@ -58,7 +59,7 @@ Adaptor3d_IsoCurve::Adaptor3d_IsoCurve() //purpose : //======================================================================= -Adaptor3d_IsoCurve::Adaptor3d_IsoCurve(const Handle(Adaptor3d_HSurface)& S) +Adaptor3d_IsoCurve::Adaptor3d_IsoCurve(const Handle(Adaptor3d_Surface)& S) : mySurface (S), myIso (GeomAbs_NoneIso), myFirst (0.0), @@ -72,7 +73,7 @@ Adaptor3d_IsoCurve::Adaptor3d_IsoCurve(const Handle(Adaptor3d_HSurface)& S) //purpose : //======================================================================= -Adaptor3d_IsoCurve::Adaptor3d_IsoCurve(const Handle(Adaptor3d_HSurface)& S, +Adaptor3d_IsoCurve::Adaptor3d_IsoCurve(const Handle(Adaptor3d_Surface)& S, const GeomAbs_IsoType theIso, const Standard_Real theParam) : mySurface (S), @@ -89,7 +90,7 @@ Adaptor3d_IsoCurve::Adaptor3d_IsoCurve(const Handle(Adaptor3d_HSurface)& S, //purpose : //======================================================================= -Adaptor3d_IsoCurve::Adaptor3d_IsoCurve(const Handle(Adaptor3d_HSurface)& theS, +Adaptor3d_IsoCurve::Adaptor3d_IsoCurve(const Handle(Adaptor3d_Surface)& theS, const GeomAbs_IsoType theIso, const Standard_Real theParam, const Standard_Real theWFirst, @@ -108,7 +109,7 @@ Adaptor3d_IsoCurve::Adaptor3d_IsoCurve(const Handle(Adaptor3d_HSurface)& theS, //purpose : //======================================================================= -void Adaptor3d_IsoCurve::Load(const Handle(Adaptor3d_HSurface)& S ) +void Adaptor3d_IsoCurve::Load(const Handle(Adaptor3d_Surface)& S ) { mySurface = S; myIso = GeomAbs_NoneIso; @@ -310,13 +311,13 @@ void Adaptor3d_IsoCurve::Intervals(TColStd_Array1OfReal& TI, //purpose : //======================================================================= -Handle(Adaptor3d_HCurve) Adaptor3d_IsoCurve::Trim +Handle(Adaptor3d_Curve) Adaptor3d_IsoCurve::Trim (const Standard_Real First, const Standard_Real Last, const Standard_Real) const { - Handle(Adaptor3d_HIsoCurve) HI = new Adaptor3d_HIsoCurve(*this); - ((Adaptor3d_IsoCurve *)&(HI->Curve()))->Load(myIso,myParameter,First,Last); + Handle(Adaptor3d_IsoCurve) HI = new Adaptor3d_IsoCurve(*this); + HI->Load(myIso,myParameter,First,Last); return HI; } diff --git a/src/Adaptor3d/Adaptor3d_IsoCurve.hxx b/src/Adaptor3d/Adaptor3d_IsoCurve.hxx index 50a134c2b8..b05da9e2c7 100644 --- a/src/Adaptor3d/Adaptor3d_IsoCurve.hxx +++ b/src/Adaptor3d/Adaptor3d_IsoCurve.hxx @@ -17,33 +17,11 @@ #ifndef _Adaptor3d_IsoCurve_HeaderFile #define _Adaptor3d_IsoCurve_HeaderFile -#include -#include -#include - -#include -#include #include -#include -#include -#include -#include -#include -class Adaptor3d_HSurface; -class Standard_NoSuchObject; -class Standard_OutOfRange; -class Standard_DomainError; -class Adaptor3d_HCurve; -class gp_Pnt; -class gp_Vec; -class gp_Lin; -class gp_Circ; -class gp_Elips; -class gp_Hypr; -class gp_Parab; -class Geom_BezierCurve; -class Geom_BSplineCurve; +#include +#include +DEFINE_STANDARD_HANDLE(Adaptor3d_IsoCurve, Adaptor3d_Curve) //! Defines an isoparametric curve on a surface. The //! type of isoparametric curve (U or V) is defined @@ -51,48 +29,46 @@ class Geom_BSplineCurve; //! NoneIso is given an error is raised. class Adaptor3d_IsoCurve : public Adaptor3d_Curve { + DEFINE_STANDARD_RTTIEXT(Adaptor3d_IsoCurve, Adaptor3d_Curve) public: - DEFINE_STANDARD_ALLOC - - //! The iso is set to NoneIso. Standard_EXPORT Adaptor3d_IsoCurve(); //! The surface is loaded. The iso is set to NoneIso. - Standard_EXPORT Adaptor3d_IsoCurve(const Handle(Adaptor3d_HSurface)& S); + Standard_EXPORT Adaptor3d_IsoCurve(const Handle(Adaptor3d_Surface)& S); //! Creates an IsoCurve curve. Iso defines the //! type (isoU or isoU) Param defines the value of //! the iso. The bounds of the iso are the bounds //! of the surface. - Standard_EXPORT Adaptor3d_IsoCurve(const Handle(Adaptor3d_HSurface)& S, const GeomAbs_IsoType Iso, const Standard_Real Param); + Standard_EXPORT Adaptor3d_IsoCurve(const Handle(Adaptor3d_Surface)& S, const GeomAbs_IsoType Iso, const Standard_Real Param); //! Create an IsoCurve curve. Iso defines the type //! (isoU or isov). Param defines the value of the //! iso. WFirst,WLast define the bounds of the iso. - Standard_EXPORT Adaptor3d_IsoCurve(const Handle(Adaptor3d_HSurface)& S, const GeomAbs_IsoType Iso, const Standard_Real Param, const Standard_Real WFirst, const Standard_Real WLast); + Standard_EXPORT Adaptor3d_IsoCurve(const Handle(Adaptor3d_Surface)& S, const GeomAbs_IsoType Iso, const Standard_Real Param, const Standard_Real WFirst, const Standard_Real WLast); //! Changes the surface. The iso is reset to //! NoneIso. - Standard_EXPORT void Load (const Handle(Adaptor3d_HSurface)& S); + Standard_EXPORT void Load (const Handle(Adaptor3d_Surface)& S); //! Changes the iso on the current surface. Standard_EXPORT void Load (const GeomAbs_IsoType Iso, const Standard_Real Param); //! Changes the iso on the current surface. Standard_EXPORT void Load (const GeomAbs_IsoType Iso, const Standard_Real Param, const Standard_Real WFirst, const Standard_Real WLast); - - const Handle(Adaptor3d_HSurface)& Surface() const; - - GeomAbs_IsoType Iso() const; - - Standard_Real Parameter() const; - - Standard_Real FirstParameter() const Standard_OVERRIDE; - - Standard_Real LastParameter() const Standard_OVERRIDE; - + + const Handle(Adaptor3d_Surface)& Surface() const { return mySurface; } + + GeomAbs_IsoType Iso() const { return myIso; } + + Standard_Real Parameter() const { return myParameter; } + + virtual Standard_Real FirstParameter() const Standard_OVERRIDE { return myFirst; } + + virtual Standard_Real LastParameter() const Standard_OVERRIDE { return myLast; } + Standard_EXPORT GeomAbs_Shape Continuity() const Standard_OVERRIDE; //! Returns the number of intervals for continuity @@ -110,7 +86,7 @@ public: //! parameters and . is used to //! test for 3d points confusion. //! If >= - Standard_EXPORT Handle(Adaptor3d_HCurve) Trim (const Standard_Real First, const Standard_Real Last, const Standard_Real Tol) const Standard_OVERRIDE; + Standard_EXPORT Handle(Adaptor3d_Curve) Trim (const Standard_Real First, const Standard_Real Last, const Standard_Real Tol) const Standard_OVERRIDE; Standard_EXPORT Standard_Boolean IsClosed() const Standard_OVERRIDE; @@ -183,33 +159,14 @@ public: Standard_EXPORT Handle(Geom_BSplineCurve) BSpline() const Standard_OVERRIDE; - - - -protected: - - - - - private: - - - Handle(Adaptor3d_HSurface) mySurface; + Handle(Adaptor3d_Surface) mySurface; GeomAbs_IsoType myIso; Standard_Real myFirst; Standard_Real myLast; Standard_Real myParameter; - }; - -#include - - - - - #endif // _Adaptor3d_IsoCurve_HeaderFile diff --git a/src/Adaptor3d/Adaptor3d_IsoCurve.lxx b/src/Adaptor3d/Adaptor3d_IsoCurve.lxx deleted file mode 100644 index 3033073279..0000000000 --- a/src/Adaptor3d/Adaptor3d_IsoCurve.lxx +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - -//======================================================================= -//function : Surface -//purpose : -//======================================================================= - -inline const Handle(Adaptor3d_HSurface)& Adaptor3d_IsoCurve::Surface() const -{ - return mySurface; -} - -//======================================================================= -//function : Iso -//purpose : -//======================================================================= - -inline GeomAbs_IsoType Adaptor3d_IsoCurve::Iso() const -{ - return myIso; -} - -//======================================================================= -//function : Parameter -//purpose : -//======================================================================= - -inline Standard_Real Adaptor3d_IsoCurve::Parameter() const -{ - return myParameter; -} - -//======================================================================= -//function : FirstParameter -//purpose : -//======================================================================= - -inline Standard_Real Adaptor3d_IsoCurve::FirstParameter() const -{ - return myFirst; -} - -//======================================================================= -//function : LastParameter -//purpose : -//======================================================================= - -inline Standard_Real Adaptor3d_IsoCurve::LastParameter() const { - return myLast; -} - diff --git a/src/Adaptor3d/Adaptor3d_Surface.cxx b/src/Adaptor3d/Adaptor3d_Surface.cxx index 42adac71bb..5a52130b5c 100644 --- a/src/Adaptor3d/Adaptor3d_Surface.cxx +++ b/src/Adaptor3d/Adaptor3d_Surface.cxx @@ -14,10 +14,9 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. - -#include -#include #include + +#include #include #include #include @@ -34,6 +33,8 @@ #include #include +IMPLEMENT_STANDARD_RTTIEXT(Adaptor3d_Surface, Standard_Transient) + //======================================================================= //function : ~Adaptor3d_Surface //purpose : Destructor @@ -161,8 +162,8 @@ void Adaptor3d_Surface::VIntervals(TColStd_Array1OfReal& , const GeomAbs_Shape ) //purpose : //======================================================================= -//Handle(Adaptor3d_HSurface) Adaptor3d_Surface::UTrim(const Standard_Real First, const Standard_Real Last, const Standard_Real Tol) const -Handle(Adaptor3d_HSurface) Adaptor3d_Surface::UTrim(const Standard_Real , const Standard_Real , const Standard_Real ) const +//Handle(Adaptor3d_Surface) Adaptor3d_Surface::UTrim(const Standard_Real First, const Standard_Real Last, const Standard_Real Tol) const +Handle(Adaptor3d_Surface) Adaptor3d_Surface::UTrim(const Standard_Real , const Standard_Real , const Standard_Real ) const { throw Standard_NotImplemented("Adaptor3d_Surface::UTrim"); } @@ -173,8 +174,8 @@ Handle(Adaptor3d_HSurface) Adaptor3d_Surface::UTrim(const Standard_Real , const //purpose : //======================================================================= -//Handle(Adaptor3d_HSurface) Adaptor3d_Surface::VTrim(const Standard_Real First, const Standard_Real Last, const Standard_Real Tol) const -Handle(Adaptor3d_HSurface) Adaptor3d_Surface::VTrim(const Standard_Real , const Standard_Real , const Standard_Real ) const +//Handle(Adaptor3d_Surface) Adaptor3d_Surface::VTrim(const Standard_Real First, const Standard_Real Last, const Standard_Real Tol) const +Handle(Adaptor3d_Surface) Adaptor3d_Surface::VTrim(const Standard_Real , const Standard_Real , const Standard_Real ) const { throw Standard_NotImplemented("Adaptor3d_Surface::VTrim"); } @@ -545,7 +546,7 @@ gp_Dir Adaptor3d_Surface::Direction() const //purpose : //======================================================================= -Handle(Adaptor3d_HCurve) Adaptor3d_Surface::BasisCurve() const +Handle(Adaptor3d_Curve) Adaptor3d_Surface::BasisCurve() const { throw Standard_NotImplemented("Adaptor3d_Surface::BasisCurve"); } @@ -556,7 +557,7 @@ Handle(Adaptor3d_HCurve) Adaptor3d_Surface::BasisCurve() const //purpose : //======================================================================= -Handle(Adaptor3d_HSurface) Adaptor3d_Surface::BasisSurface() const +Handle(Adaptor3d_Surface) Adaptor3d_Surface::BasisSurface() const { throw Standard_NotImplemented("Adaptor3d_Surface::BasisSurface"); } diff --git a/src/Adaptor3d/Adaptor3d_Surface.hxx b/src/Adaptor3d/Adaptor3d_Surface.hxx index 1f5c3061ee..00add4069e 100644 --- a/src/Adaptor3d/Adaptor3d_Surface.hxx +++ b/src/Adaptor3d/Adaptor3d_Surface.hxx @@ -17,33 +17,24 @@ #ifndef _Adaptor3d_Surface_HeaderFile #define _Adaptor3d_Surface_HeaderFile +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include #include - -#include -#include -#include #include -#include -#include -class Standard_OutOfRange; -class Standard_NoSuchObject; -class Standard_DomainError; -class Adaptor3d_HSurface; -class gp_Pnt; -class gp_Vec; -class gp_Pln; -class gp_Cylinder; -class gp_Cone; -class gp_Sphere; -class gp_Torus; + class Geom_BezierSurface; class Geom_BSplineSurface; -class gp_Ax1; -class gp_Dir; -class Adaptor3d_HCurve; +DEFINE_STANDARD_HANDLE(Adaptor3d_Surface, Standard_Transient) //! Root class for surfaces on which geometric algorithms work. //! An adapted surface is an interface between the @@ -65,13 +56,11 @@ class Adaptor3d_HCurve; //! Polynomial coefficients of BSpline surfaces used for their evaluation are //! cached for better performance. Therefore these evaluations are not //! thread-safe and parallel evaluations need to be prevented. -class Adaptor3d_Surface +class Adaptor3d_Surface : public Standard_Transient { + DEFINE_STANDARD_RTTIEXT(Adaptor3d_Surface, Standard_Transient) public: - DEFINE_STANDARD_ALLOC - - Standard_EXPORT virtual Standard_Real FirstUParameter() const; Standard_EXPORT virtual Standard_Real LastUParameter() const; @@ -105,13 +94,13 @@ public: //! parameters and . is used to //! test for 3d points confusion. //! If >= - Standard_EXPORT virtual Handle(Adaptor3d_HSurface) UTrim (const Standard_Real First, const Standard_Real Last, const Standard_Real Tol) const; + Standard_EXPORT virtual Handle(Adaptor3d_Surface) UTrim (const Standard_Real First, const Standard_Real Last, const Standard_Real Tol) const; //! Returns a surface trimmed in the V direction between //! parameters and . is used to //! test for 3d points confusion. //! If >= - Standard_EXPORT virtual Handle(Adaptor3d_HSurface) VTrim (const Standard_Real First, const Standard_Real Last, const Standard_Real Tol) const; + Standard_EXPORT virtual Handle(Adaptor3d_Surface) VTrim (const Standard_Real First, const Standard_Real Last, const Standard_Real Tol) const; Standard_EXPORT virtual Standard_Boolean IsUClosed() const; @@ -204,34 +193,13 @@ public: Standard_EXPORT virtual gp_Dir Direction() const; - Standard_EXPORT virtual Handle(Adaptor3d_HCurve) BasisCurve() const; + Standard_EXPORT virtual Handle(Adaptor3d_Curve) BasisCurve() const; - Standard_EXPORT virtual Handle(Adaptor3d_HSurface) BasisSurface() const; + Standard_EXPORT virtual Handle(Adaptor3d_Surface) BasisSurface() const; Standard_EXPORT virtual Standard_Real OffsetValue() const; Standard_EXPORT virtual ~Adaptor3d_Surface(); - - - -protected: - - - - - -private: - - - - - }; - - - - - - #endif // _Adaptor3d_Surface_HeaderFile diff --git a/src/Adaptor3d/Adaptor3d_TopolTool.cxx b/src/Adaptor3d/Adaptor3d_TopolTool.cxx index b5d06497b4..d52e5525d6 100644 --- a/src/Adaptor3d/Adaptor3d_TopolTool.cxx +++ b/src/Adaptor3d/Adaptor3d_TopolTool.cxx @@ -11,12 +11,11 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. - -#include -#include -#include -#include #include + +#include +#include +#include #include #include #include @@ -74,7 +73,7 @@ Adaptor3d_TopolTool::Adaptor3d_TopolTool () { } -Adaptor3d_TopolTool::Adaptor3d_TopolTool (const Handle(Adaptor3d_HSurface)& S) +Adaptor3d_TopolTool::Adaptor3d_TopolTool (const Handle(Adaptor3d_Surface)& S) { Initialize(S); } @@ -85,7 +84,7 @@ void Adaptor3d_TopolTool::Initialize () throw Standard_NotImplemented("Adaptor3d_TopolTool::Initialize ()"); } -void Adaptor3d_TopolTool::Initialize (const Handle(Adaptor3d_HSurface)& S) +void Adaptor3d_TopolTool::Initialize (const Handle(Adaptor3d_Surface)& S) { Standard_Real pinf,psup,deltap; //Adaptor2d_Line2d * Line2dPtr ; @@ -119,8 +118,8 @@ void Adaptor3d_TopolTool::Initialize (const Handle(Adaptor3d_HSurface)& S) } // Line2dPtr = new Adaptor2d_Line2d(gp_Pnt2d(0.,Vinf),gp_Dir2d(1.,0.),pinf,psup); - //myRestr[nbRestr] = new Adaptor2d_HLine2d(*Line2dPtr); - myRestr[nbRestr] = new Adaptor2d_HLine2d(Adaptor2d_Line2d(gp_Pnt2d(0.,Vinf),gp_Dir2d(1.,0.),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)); nbRestr++; } @@ -142,8 +141,8 @@ void Adaptor3d_TopolTool::Initialize (const Handle(Adaptor3d_HSurface)& S) //Line2dPtr = new Adaptor2d_Line2d(gp_Pnt2d(Usup,0.),gp_Dir2d(0.,1.),pinf,psup); - //myRestr[nbRestr] = new Adaptor2d_HLine2d(*Line2dPtr); - myRestr[nbRestr] = new Adaptor2d_HLine2d(Adaptor2d_Line2d(gp_Pnt2d(Usup,0.),gp_Dir2d(0.,1.),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)); nbRestr++; } @@ -164,8 +163,8 @@ void Adaptor3d_TopolTool::Initialize (const Handle(Adaptor3d_HSurface)& S) //Line2dPtr = new Adaptor2d_Line2d(gp_Pnt2d(0.,Vsup),gp_Dir2d(-1.,0.),pinf,psup); - //myRestr[nbRestr] = new Adaptor2d_HLine2d(*Line2dPtr); - myRestr[nbRestr] = new Adaptor2d_HLine2d(Adaptor2d_Line2d(gp_Pnt2d(0.,Vsup),gp_Dir2d(-1.,0.),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)); nbRestr++; } @@ -185,8 +184,8 @@ void Adaptor3d_TopolTool::Initialize (const Handle(Adaptor3d_HSurface)& S) } //Line2dPtr = new Adaptor2d_Line2d(gp_Pnt2d(Uinf,0.),gp_Dir2d(0.,-1),pinf,psup); - //myRestr[nbRestr] = new Adaptor2d_HLine2d(*Line2dPtr); - myRestr[nbRestr] = new Adaptor2d_HLine2d(Adaptor2d_Line2d(gp_Pnt2d(Uinf,0.),gp_Dir2d(0.,-1),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)); nbRestr++; } @@ -211,8 +210,8 @@ void Adaptor3d_TopolTool::Initialize (const Handle(Adaptor3d_HSurface)& S) } //Line2dPtr = new Adaptor2d_Line2d(gp_Pnt2d(U,V),gp_Dir2d(1.,0.),pinf,psup); - //myRestr[nbRestr] = new Adaptor2d_HLine2d(*Line2dPtr); - myRestr[nbRestr] = new Adaptor2d_HLine2d(Adaptor2d_Line2d(gp_Pnt2d(U,V),gp_Dir2d(1.,0.),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)); nbRestr++; } } @@ -229,7 +228,7 @@ Standard_Boolean Adaptor3d_TopolTool::More () return (idRestr < nbRestr); } -Handle(Adaptor2d_HCurve2d) Adaptor3d_TopolTool::Value () +Handle(Adaptor2d_Curve2d) Adaptor3d_TopolTool::Value () { if (idRestr >= nbRestr) {throw Standard_DomainError();} return myRestr[idRestr]; @@ -241,7 +240,7 @@ void Adaptor3d_TopolTool::Next () } -void Adaptor3d_TopolTool::Initialize(const Handle(Adaptor2d_HCurve2d)& C) +void Adaptor3d_TopolTool::Initialize(const Handle(Adaptor2d_Curve2d)& C) { nbVtx = 0; idVtx = 0; @@ -555,7 +554,7 @@ Standard_Boolean Adaptor3d_TopolTool::IsThePointOn(const gp_Pnt2d& P, TopAbs_Orientation Adaptor3d_TopolTool::Orientation - (const Handle(Adaptor2d_HCurve2d)&) + (const Handle(Adaptor2d_Curve2d)&) { return TopAbs_FORWARD; } @@ -840,7 +839,7 @@ Standard_Boolean Adaptor3d_TopolTool::Has3d() const //purpose : //======================================================================= -Standard_Real Adaptor3d_TopolTool::Tol3d(const Handle(Adaptor2d_HCurve2d)&) const +Standard_Real Adaptor3d_TopolTool::Tol3d(const Handle(Adaptor2d_Curve2d)&) const { throw Standard_DomainError("Adaptor3d_TopolTool: has no 3d representation"); } diff --git a/src/Adaptor3d/Adaptor3d_TopolTool.hxx b/src/Adaptor3d/Adaptor3d_TopolTool.hxx index d2bfa3446f..2c742aef26 100644 --- a/src/Adaptor3d/Adaptor3d_TopolTool.hxx +++ b/src/Adaptor3d/Adaptor3d_TopolTool.hxx @@ -17,22 +17,16 @@ #ifndef _Adaptor3d_TopolTool_HeaderFile #define _Adaptor3d_TopolTool_HeaderFile +#include +#include +#include +#include #include #include #include -#include -#include -class Adaptor2d_HLine2d; class Adaptor3d_HVertex; -class Adaptor3d_HSurface; -class Standard_DomainError; -class Adaptor2d_HCurve2d; -class gp_Pnt2d; -class gp_Pnt; - -class Adaptor3d_TopolTool; DEFINE_STANDARD_HANDLE(Adaptor3d_TopolTool, Standard_Transient) //! This class provides a default topological tool, @@ -50,19 +44,19 @@ public: Standard_EXPORT Adaptor3d_TopolTool(); - Standard_EXPORT Adaptor3d_TopolTool(const Handle(Adaptor3d_HSurface)& Surface); + Standard_EXPORT Adaptor3d_TopolTool(const Handle(Adaptor3d_Surface)& Surface); Standard_EXPORT virtual void Initialize(); - Standard_EXPORT virtual void Initialize (const Handle(Adaptor3d_HSurface)& S); + Standard_EXPORT virtual void Initialize (const Handle(Adaptor3d_Surface)& S); - Standard_EXPORT virtual void Initialize (const Handle(Adaptor2d_HCurve2d)& Curve); + Standard_EXPORT virtual void Initialize (const Handle(Adaptor2d_Curve2d)& Curve); Standard_EXPORT virtual void Init(); Standard_EXPORT virtual Standard_Boolean More(); - Standard_EXPORT virtual Handle(Adaptor2d_HCurve2d) Value(); + Standard_EXPORT virtual Handle(Adaptor2d_Curve2d) Value(); Standard_EXPORT virtual void Next(); @@ -83,7 +77,7 @@ public: //! a "real" limit of the surface. //! If the orientation is INTERNAL or EXTERNAL, the arc is //! considered as an arc on the surface. - Standard_EXPORT virtual TopAbs_Orientation Orientation (const Handle(Adaptor2d_HCurve2d)& C); + Standard_EXPORT virtual TopAbs_Orientation Orientation (const Handle(Adaptor2d_Curve2d)& C); //! Returns the orientation of the vertex V. //! The vertex has been found with an exploration on @@ -101,7 +95,7 @@ public: Standard_EXPORT virtual Standard_Boolean Has3d() const; //! returns 3d tolerance of the arc C - Standard_EXPORT virtual Standard_Real Tol3d (const Handle(Adaptor2d_HCurve2d)& C) const; + Standard_EXPORT virtual Standard_Real Tol3d (const Handle(Adaptor2d_Curve2d)& C) const; //! returns 3d tolerance of the vertex V Standard_EXPORT virtual Standard_Real Tol3d (const Handle(Adaptor3d_HVertex)& V) const; @@ -159,7 +153,7 @@ public: protected: - Handle(Adaptor3d_HSurface) myS; + Handle(Adaptor3d_Surface) myS; Standard_Integer myNbSamplesU; Standard_Integer myNbSamplesV; Handle(TColStd_HArray1OfReal) myUPars; @@ -175,7 +169,7 @@ private: Standard_Real Usup; Standard_Real Vinf; Standard_Real Vsup; - Handle(Adaptor2d_HLine2d) myRestr[4]; + Handle(Adaptor2d_Line2d) myRestr[4]; Standard_Integer nbVtx; Standard_Integer idVtx; Handle(Adaptor3d_HVertex) myVtx[2]; diff --git a/src/Adaptor3d/FILES b/src/Adaptor3d/FILES index b48a53c683..7bf779a5e1 100644 --- a/src/Adaptor3d/FILES +++ b/src/Adaptor3d/FILES @@ -4,30 +4,14 @@ Adaptor3d_CurveOnSurface.cxx Adaptor3d_CurveOnSurface.hxx Adaptor3d_CurveOnSurfacePtr.hxx Adaptor3d_CurvePtr.hxx -Adaptor3d_GenHCurve.gxx -Adaptor3d_GenHCurve.lxx -Adaptor3d_GenHSurface.gxx -Adaptor3d_GenHSurface.lxx -Adaptor3d_HCurve.cxx -Adaptor3d_HCurve.hxx -Adaptor3d_HCurve.lxx -Adaptor3d_HCurveOnSurface.hxx -Adaptor3d_HCurveOnSurface_0.cxx -Adaptor3d_HIsoCurve.hxx -Adaptor3d_HIsoCurve_0.cxx -Adaptor3d_HSurface.cxx -Adaptor3d_HSurface.hxx -Adaptor3d_HSurface.lxx Adaptor3d_HSurfaceTool.cxx Adaptor3d_HSurfaceTool.hxx -Adaptor3d_HSurfaceTool.lxx Adaptor3d_HVertex.cxx Adaptor3d_HVertex.hxx Adaptor3d_InterFunc.cxx Adaptor3d_InterFunc.hxx Adaptor3d_IsoCurve.cxx Adaptor3d_IsoCurve.hxx -Adaptor3d_IsoCurve.lxx Adaptor3d_Surface.cxx Adaptor3d_Surface.hxx Adaptor3d_SurfacePtr.hxx diff --git a/src/Approx/Approx_Array1OfAdHSurface.hxx b/src/Approx/Approx_Array1OfAdHSurface.hxx index 3a33492008..ba7d26d1a6 100644 --- a/src/Approx/Approx_Array1OfAdHSurface.hxx +++ b/src/Approx/Approx_Array1OfAdHSurface.hxx @@ -17,10 +17,10 @@ #ifndef Approx_Array1OfAdHSurface_HeaderFile #define Approx_Array1OfAdHSurface_HeaderFile -#include +#include #include -typedef NCollection_Array1 Approx_Array1OfAdHSurface; +typedef NCollection_Array1 Approx_Array1OfAdHSurface; #endif diff --git a/src/Approx/Approx_Curve2d.cxx b/src/Approx/Approx_Curve2d.cxx index 5d53152f08..be3c9def4c 100644 --- a/src/Approx/Approx_Curve2d.cxx +++ b/src/Approx/Approx_Curve2d.cxx @@ -15,7 +15,7 @@ // commercial license or contractual agreement. -#include +#include #include #include #include @@ -30,7 +30,7 @@ class Approx_Curve2d_Eval : public AdvApprox_EvaluatorFunction { public: - Approx_Curve2d_Eval (const Handle(Adaptor2d_HCurve2d)& theFunc, + Approx_Curve2d_Eval (const Handle(Adaptor2d_Curve2d)& theFunc, Standard_Real First, Standard_Real Last) : fonct(theFunc) { StartEndSav[0] = First; StartEndSav[1] = Last; } @@ -42,7 +42,7 @@ class Approx_Curve2d_Eval : public AdvApprox_EvaluatorFunction Standard_Integer *ErrorCode); private: - Handle(Adaptor2d_HCurve2d) fonct; + Handle(Adaptor2d_Curve2d) fonct; Standard_Real StartEndSav[2]; }; @@ -96,7 +96,7 @@ void Approx_Curve2d_Eval::Evaluate (Standard_Integer *Dimension, } } - Approx_Curve2d::Approx_Curve2d(const Handle(Adaptor2d_HCurve2d)& C2D,const Standard_Real First,const Standard_Real Last,const Standard_Real TolU,const Standard_Real TolV,const GeomAbs_Shape Continuity,const Standard_Integer MaxDegree,const Standard_Integer MaxSegments) + Approx_Curve2d::Approx_Curve2d(const Handle(Adaptor2d_Curve2d)& C2D,const Standard_Real First,const Standard_Real Last,const Standard_Real TolU,const Standard_Real TolV,const GeomAbs_Shape Continuity,const Standard_Integer MaxDegree,const Standard_Integer MaxSegments) { C2D->Trim(First,Last,Precision::PConfusion()); diff --git a/src/Approx/Approx_Curve2d.hxx b/src/Approx/Approx_Curve2d.hxx index 2109447133..9fcf2f6e5b 100644 --- a/src/Approx/Approx_Curve2d.hxx +++ b/src/Approx/Approx_Curve2d.hxx @@ -17,15 +17,10 @@ #ifndef _Approx_Curve2d_HeaderFile #define _Approx_Curve2d_HeaderFile -#include -#include -#include - +#include #include #include -class Adaptor2d_HCurve2d; - //! Makes an approximation for HCurve2d from Adaptor3d class Approx_Curve2d { @@ -34,7 +29,7 @@ public: DEFINE_STANDARD_ALLOC - Standard_EXPORT Approx_Curve2d(const Handle(Adaptor2d_HCurve2d)& C2D, const Standard_Real First, const Standard_Real Last, const Standard_Real TolU, const Standard_Real TolV, const GeomAbs_Shape Continuity, const Standard_Integer MaxDegree, const Standard_Integer MaxSegments); + Standard_EXPORT Approx_Curve2d(const Handle(Adaptor2d_Curve2d)& C2D, const Standard_Real First, const Standard_Real Last, const Standard_Real TolU, const Standard_Real TolV, const GeomAbs_Shape Continuity, const Standard_Integer MaxDegree, const Standard_Integer MaxSegments); Standard_EXPORT Standard_Boolean IsDone() const; diff --git a/src/Approx/Approx_Curve3d.cxx b/src/Approx/Approx_Curve3d.cxx index 9f3d944751..830ef39610 100644 --- a/src/Approx/Approx_Curve3d.cxx +++ b/src/Approx/Approx_Curve3d.cxx @@ -14,13 +14,13 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. +#include -#include +#include #include #include -#include #include -#include +#include #include #include #include @@ -36,7 +36,7 @@ class Approx_Curve3d_Eval : public AdvApprox_EvaluatorFunction { public: - Approx_Curve3d_Eval (const Handle(Adaptor3d_HCurve)& theFunc, + Approx_Curve3d_Eval (const Handle(Adaptor3d_Curve)& theFunc, Standard_Real First, Standard_Real Last) : fonct(theFunc) { StartEndSav[0] = First; StartEndSav[1] = Last; } @@ -48,7 +48,7 @@ class Approx_Curve3d_Eval : public AdvApprox_EvaluatorFunction Standard_Integer *ErrorCode); private: - Handle(Adaptor3d_HCurve) fonct; + Handle(Adaptor3d_Curve) fonct; Standard_Real StartEndSav[2]; }; @@ -103,7 +103,7 @@ void Approx_Curve3d_Eval::Evaluate (Standard_Integer *Dimension, } } -Approx_Curve3d::Approx_Curve3d(const Handle(Adaptor3d_HCurve)& Curve, +Approx_Curve3d::Approx_Curve3d(const Handle(Adaptor3d_Curve)& Curve, const Standard_Real Tol3d, const GeomAbs_Shape Order, const Standard_Integer MaxSegments, diff --git a/src/Approx/Approx_Curve3d.hxx b/src/Approx/Approx_Curve3d.hxx index f9a1eba8ca..97ab07a95d 100644 --- a/src/Approx/Approx_Curve3d.hxx +++ b/src/Approx/Approx_Curve3d.hxx @@ -17,15 +17,10 @@ #ifndef _Approx_Curve3d_HeaderFile #define _Approx_Curve3d_HeaderFile -#include -#include -#include - +#include #include #include -class Adaptor3d_HCurve; - class Approx_Curve3d { public: @@ -35,7 +30,7 @@ public: //! Approximation of a curve with respect of the //! required tolerance Tol3D. - Standard_EXPORT Approx_Curve3d(const Handle(Adaptor3d_HCurve)& Curve, const Standard_Real Tol3d, const GeomAbs_Shape Order, const Standard_Integer MaxSegments, const Standard_Integer MaxDegree); + Standard_EXPORT Approx_Curve3d(const Handle(Adaptor3d_Curve)& Curve, const Standard_Real Tol3d, const GeomAbs_Shape Order, const Standard_Integer MaxSegments, const Standard_Integer MaxDegree); Standard_EXPORT Handle(Geom_BSplineCurve) Curve() const; diff --git a/src/Approx/Approx_CurveOnSurface.cxx b/src/Approx/Approx_CurveOnSurface.cxx index e0c42d2d02..e612171046 100644 --- a/src/Approx/Approx_CurveOnSurface.cxx +++ b/src/Approx/Approx_CurveOnSurface.cxx @@ -14,24 +14,26 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. +#include -#include +#include #include -#include -#include -#include +#include +#include +#include #include #include #include -#include +#include #include -#include +#include #include #include #include -#include -#include +#include +#include #include +#include #include #include #include @@ -49,8 +51,8 @@ class Approx_CurveOnSurface_Eval : public AdvApprox_EvaluatorFunction { public: - Approx_CurveOnSurface_Eval (const Handle(Adaptor3d_HCurve)& theFunc, - const Handle(Adaptor2d_HCurve2d)& theFunc2d, + Approx_CurveOnSurface_Eval (const Handle(Adaptor3d_Curve)& theFunc, + const Handle(Adaptor2d_Curve2d)& theFunc2d, Standard_Real First, Standard_Real Last) : fonct(theFunc), fonct2d(theFunc2d) { StartEndSav[0] = First; StartEndSav[1] = Last; } @@ -63,8 +65,8 @@ class Approx_CurveOnSurface_Eval : public AdvApprox_EvaluatorFunction Standard_Integer *ErrorCode); private: - Handle(Adaptor3d_HCurve) fonct; - Handle(Adaptor2d_HCurve2d) fonct2d; + Handle(Adaptor3d_Curve) fonct; + Handle(Adaptor2d_Curve2d) fonct2d; Standard_Real StartEndSav[2]; }; @@ -150,7 +152,7 @@ void Approx_CurveOnSurface_Eval::Evaluate (Standard_Integer *Dimension, class Approx_CurveOnSurface_Eval3d : public AdvApprox_EvaluatorFunction { public: - Approx_CurveOnSurface_Eval3d (const Handle(Adaptor3d_HCurve)& theFunc, + Approx_CurveOnSurface_Eval3d (const Handle(Adaptor3d_Curve)& theFunc, Standard_Real First, Standard_Real Last) : fonct(theFunc) { StartEndSav[0] = First; StartEndSav[1] = Last; } @@ -162,7 +164,7 @@ class Approx_CurveOnSurface_Eval3d : public AdvApprox_EvaluatorFunction Standard_Integer *ErrorCode); private: - Handle(Adaptor3d_HCurve) fonct; + Handle(Adaptor3d_Curve) fonct; Standard_Real StartEndSav[2]; }; @@ -231,7 +233,7 @@ void Approx_CurveOnSurface_Eval3d::Evaluate (Standard_Integer *Dimension, class Approx_CurveOnSurface_Eval2d : public AdvApprox_EvaluatorFunction { public: - Approx_CurveOnSurface_Eval2d (const Handle(Adaptor2d_HCurve2d)& theFunc2d, + Approx_CurveOnSurface_Eval2d (const Handle(Adaptor2d_Curve2d)& theFunc2d, Standard_Real First, Standard_Real Last) : fonct2d(theFunc2d) { StartEndSav[0] = First; StartEndSav[1] = Last; } @@ -243,7 +245,7 @@ class Approx_CurveOnSurface_Eval2d : public AdvApprox_EvaluatorFunction Standard_Integer *ErrorCode); private: - Handle(Adaptor2d_HCurve2d) fonct2d; + Handle(Adaptor2d_Curve2d) fonct2d; Standard_Real StartEndSav[2]; }; @@ -307,8 +309,8 @@ void Approx_CurveOnSurface_Eval2d::Evaluate (Standard_Integer *Dimension, //function : Approx_CurveOnSurface //purpose : Constructor //============================================================================= - Approx_CurveOnSurface::Approx_CurveOnSurface(const Handle(Adaptor2d_HCurve2d)& C2D, - const Handle(Adaptor3d_HSurface)& Surf, + Approx_CurveOnSurface::Approx_CurveOnSurface(const Handle(Adaptor2d_Curve2d)& C2D, + const Handle(Adaptor3d_Surface)& Surf, const Standard_Real First, const Standard_Real Last, const Standard_Real Tol, @@ -335,8 +337,8 @@ void Approx_CurveOnSurface_Eval2d::Evaluate (Standard_Integer *Dimension, //function : Approx_CurveOnSurface //purpose : Constructor //============================================================================= - Approx_CurveOnSurface::Approx_CurveOnSurface(const Handle(Adaptor2d_HCurve2d)& theC2D, - const Handle(Adaptor3d_HSurface)& theSurf, + Approx_CurveOnSurface::Approx_CurveOnSurface(const Handle(Adaptor2d_Curve2d)& theC2D, + const Handle(Adaptor3d_Surface)& theSurf, const Standard_Real theFirst, const Standard_Real theLast, const Standard_Real theTol) @@ -371,7 +373,7 @@ void Approx_CurveOnSurface::Perform(const Standard_Integer theMaxSegments, if(theOnly3d && theOnly2d) throw Standard_ConstructionError(); - Handle( Adaptor2d_HCurve2d ) TrimmedC2D = myC2D->Trim( myFirst, myLast, Precision::PConfusion() ); + Handle( Adaptor2d_Curve2d ) TrimmedC2D = myC2D->Trim( myFirst, myLast, Precision::PConfusion() ); Standard_Boolean isU, isForward; Standard_Real aParam; @@ -385,9 +387,7 @@ void Approx_CurveOnSurface::Perform(const Standard_Integer theMaxSegments, } } - Adaptor3d_CurveOnSurface COnS( TrimmedC2D, mySurf ); - Handle(Adaptor3d_HCurveOnSurface) HCOnS = new Adaptor3d_HCurveOnSurface(); - HCOnS->Set(COnS); + Handle(Adaptor3d_CurveOnSurface) HCOnS = new Adaptor3d_CurveOnSurface (TrimmedC2D, mySurf); Standard_Integer Num1DSS = 0, Num2DSS=0, Num3DSS=0; Handle(TColStd_HArray1OfReal) OneDTol; @@ -510,7 +510,7 @@ void Approx_CurveOnSurface::Perform(const Standard_Integer theMaxSegments, //function : isIsoLine //purpose : //============================================================================= -Standard_Boolean Approx_CurveOnSurface::isIsoLine(const Handle(Adaptor2d_HCurve2d) theC2D, +Standard_Boolean Approx_CurveOnSurface::isIsoLine(const Handle(Adaptor2d_Curve2d) theC2D, Standard_Boolean& theIsU, Standard_Real& theParam, Standard_Boolean& theIsForward) const @@ -592,13 +592,13 @@ Standard_Boolean Approx_CurveOnSurface::isIsoLine(const Handle(Adaptor2d_HCurve2 //function : buildC3dOnIsoLine //purpose : //============================================================================= -Standard_Boolean Approx_CurveOnSurface::buildC3dOnIsoLine(const Handle(Adaptor2d_HCurve2d) theC2D, +Standard_Boolean Approx_CurveOnSurface::buildC3dOnIsoLine(const Handle(Adaptor2d_Curve2d) theC2D, const Standard_Boolean theIsU, const Standard_Real theParam, const Standard_Boolean theIsForward) { // Convert adapter to the appropriate type. - Handle(GeomAdaptor_HSurface) aGeomAdapter = Handle(GeomAdaptor_HSurface)::DownCast(mySurf); + Handle(GeomAdaptor_Surface) aGeomAdapter = Handle(GeomAdaptor_Surface)::DownCast(mySurf); if (aGeomAdapter.IsNull()) return Standard_False; @@ -606,7 +606,7 @@ Standard_Boolean Approx_CurveOnSurface::buildC3dOnIsoLine(const Handle(Adaptor2d return Standard_False; // Extract isoline - Handle(Geom_Surface) aSurf = aGeomAdapter->ChangeSurface().Surface(); + Handle(Geom_Surface) aSurf = aGeomAdapter->Surface(); Handle(Geom_Curve) aC3d; gp_Pnt2d aF2d = theC2D->Value(theC2D->FirstParameter()); diff --git a/src/Approx/Approx_CurveOnSurface.hxx b/src/Approx/Approx_CurveOnSurface.hxx index a93c13a9a7..55f376e5c8 100644 --- a/src/Approx/Approx_CurveOnSurface.hxx +++ b/src/Approx/Approx_CurveOnSurface.hxx @@ -17,21 +17,12 @@ #ifndef _Approx_CurveOnSurface_HeaderFile #define _Approx_CurveOnSurface_HeaderFile -#include -#include -#include - -#include -#include +#include +#include #include -#include -class Geom2d_BSplineCurve; -class Geom_BSplineCurve; -class Standard_OutOfRange; -class Standard_ConstructionError; -class Adaptor2d_HCurve2d; -class Adaptor3d_HSurface; +class Geom_BSplineCurve; +class Geom2d_BSplineCurve; //! Approximation of curve on surface class Approx_CurveOnSurface @@ -42,7 +33,7 @@ public: //! This constructor calls perform method. This constructor is deprecated. Standard_DEPRECATED("This constructor is deprecated. Use other constructor and perform method instead.") - Standard_EXPORT Approx_CurveOnSurface(const Handle(Adaptor2d_HCurve2d)& C2D, const Handle(Adaptor3d_HSurface)& Surf, const Standard_Real First, const Standard_Real Last, const Standard_Real Tol, const GeomAbs_Shape Continuity, const Standard_Integer MaxDegree, const Standard_Integer MaxSegments, const Standard_Boolean Only3d = Standard_False, const Standard_Boolean Only2d = Standard_False); + Standard_EXPORT Approx_CurveOnSurface(const Handle(Adaptor2d_Curve2d)& C2D, const Handle(Adaptor3d_Surface)& Surf, const Standard_Real First, const Standard_Real Last, const Standard_Real Tol, const GeomAbs_Shape Continuity, const Standard_Integer MaxDegree, const Standard_Integer MaxSegments, const Standard_Boolean Only3d = Standard_False, const Standard_Boolean Only2d = Standard_False); //! This constructor does not call perform method. //! @param theC2D 2D Curve to be approximated in 3D. @@ -50,8 +41,8 @@ public: //! @param theFirst First parameter of resulting curve. //! @param theFirst Last parameter of resulting curve. //! @param theTol Computation tolerance. - Standard_EXPORT Approx_CurveOnSurface(const Handle(Adaptor2d_HCurve2d)& theC2D, - const Handle(Adaptor3d_HSurface)& theSurf, + Standard_EXPORT Approx_CurveOnSurface(const Handle(Adaptor2d_Curve2d)& theC2D, + const Handle(Adaptor3d_Surface)& theSurf, const Standard_Real theFirst, const Standard_Real theLast, const Standard_Real theTol); @@ -94,7 +85,7 @@ protected: //! @param theParam Line parameter. //! @param theIsForward Flag indicating forward parameterization on a isoline. //! @return Standard_True when 2d curve is a line and Standard_False otherwise. - Standard_Boolean isIsoLine(const Handle(Adaptor2d_HCurve2d) theC2D, + Standard_Boolean isIsoLine(const Handle(Adaptor2d_Curve2d) theC2D, Standard_Boolean& theIsU, Standard_Real& theParam, Standard_Boolean& theIsForward) const; @@ -106,7 +97,7 @@ protected: //! @param theParam Line parameter. //! @param theIsForward Flag indicating forward parameterization on a isoline. //! @return Standard_True when 3d curve is built and Standard_False otherwise. - Standard_Boolean buildC3dOnIsoLine(const Handle(Adaptor2d_HCurve2d) theC2D, + Standard_Boolean buildC3dOnIsoLine(const Handle(Adaptor2d_Curve2d) theC2D, const Standard_Boolean theIsU, const Standard_Real theParam, const Standard_Boolean theIsForward); @@ -117,10 +108,10 @@ private: private: //! Input curve. - const Handle(Adaptor2d_HCurve2d) myC2D; + const Handle(Adaptor2d_Curve2d) myC2D; //! Input surface. - const Handle(Adaptor3d_HSurface) mySurf; + const Handle(Adaptor3d_Surface) mySurf; //! First parameter of the result. const Standard_Real myFirst; @@ -139,13 +130,6 @@ private: Standard_Real myError2dU; Standard_Real myError2dV; - }; - - - - - - #endif // _Approx_CurveOnSurface_HeaderFile diff --git a/src/Approx/Approx_CurvilinearParameter.cxx b/src/Approx/Approx_CurvilinearParameter.cxx index 72e1d45f91..b5ca21c518 100644 --- a/src/Approx/Approx_CurvilinearParameter.cxx +++ b/src/Approx/Approx_CurvilinearParameter.cxx @@ -14,23 +14,22 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. +#include -#include +#include #include #include -#include -#include +#include #include #include -#include #include #include #include #include #include #include -#include -#include +#include +#include #include #include #include @@ -128,7 +127,7 @@ void Approx_CurvilinearParameter_EvalCurv::Evaluate (Standard_Integer * Dimensio Result[i] = Res(i); } -Approx_CurvilinearParameter::Approx_CurvilinearParameter(const Handle(Adaptor3d_HCurve)& C3D, +Approx_CurvilinearParameter::Approx_CurvilinearParameter(const Handle(Adaptor3d_Curve)& C3D, const Standard_Real Tol, const GeomAbs_Shape Order, const Standard_Integer MaxDegree, @@ -267,8 +266,8 @@ void Approx_CurvilinearParameter_EvalCurvOnSurf::Evaluate (Standard_Integer * Di Result[i] = Res(i); } -Approx_CurvilinearParameter::Approx_CurvilinearParameter(const Handle(Adaptor2d_HCurve2d)& C2D, - const Handle(Adaptor3d_HSurface)& Surf, +Approx_CurvilinearParameter::Approx_CurvilinearParameter(const Handle(Adaptor2d_Curve2d)& C2D, + const Handle(Adaptor3d_Surface)& Surf, const Standard_Real Tol, const GeomAbs_Shape Order, const Standard_Integer MaxDegree, @@ -428,10 +427,10 @@ void Approx_CurvilinearParameter_EvalCurvOn2Surf::Evaluate (Standard_Integer * D Result[i] = Res(i); } -Approx_CurvilinearParameter::Approx_CurvilinearParameter(const Handle(Adaptor2d_HCurve2d)& C2D1, - const Handle(Adaptor3d_HSurface)& Surf1, - const Handle(Adaptor2d_HCurve2d)& C2D2, - const Handle(Adaptor3d_HSurface)& Surf2, +Approx_CurvilinearParameter::Approx_CurvilinearParameter(const Handle(Adaptor2d_Curve2d)& C2D1, + const Handle(Adaptor3d_Surface)& Surf1, + const Handle(Adaptor2d_Curve2d)& C2D2, + const Handle(Adaptor3d_Surface)& Surf2, const Standard_Real Tol, const GeomAbs_Shape Order, const Standard_Integer MaxDegree, @@ -643,8 +642,8 @@ void Approx_CurvilinearParameter::Dump(Standard_OStream& o) const //purpose : //======================================================================= -void Approx_CurvilinearParameter::ToleranceComputation(const Handle(Adaptor2d_HCurve2d) &C2D, - const Handle(Adaptor3d_HSurface) &S, +void Approx_CurvilinearParameter::ToleranceComputation(const Handle(Adaptor2d_Curve2d) &C2D, + const Handle(Adaptor3d_Surface) &S, const Standard_Integer MaxNumber, const Standard_Real Tol, Standard_Real &TolV, Standard_Real &TolW) diff --git a/src/Approx/Approx_CurvilinearParameter.hxx b/src/Approx/Approx_CurvilinearParameter.hxx index 0f03b02ba3..9c6e4cc2ed 100644 --- a/src/Approx/Approx_CurvilinearParameter.hxx +++ b/src/Approx/Approx_CurvilinearParameter.hxx @@ -17,23 +17,10 @@ #ifndef _Approx_CurvilinearParameter_HeaderFile #define _Approx_CurvilinearParameter_HeaderFile -#include -#include -#include - -#include -#include -#include +#include +#include #include #include -class Geom_BSplineCurve; -class Geom2d_BSplineCurve; -class Standard_OutOfRange; -class Standard_ConstructionError; -class Adaptor3d_HCurve; -class Adaptor2d_HCurve2d; -class Adaptor3d_HSurface; - //! Approximation of a Curve to make its parameter be its //! curvilinear abscissa @@ -50,13 +37,13 @@ public: //! case of a free 3D curve - Standard_EXPORT Approx_CurvilinearParameter(const Handle(Adaptor3d_HCurve)& C3D, const Standard_Real Tol, const GeomAbs_Shape Order, const Standard_Integer MaxDegree, const Standard_Integer MaxSegments); + Standard_EXPORT Approx_CurvilinearParameter(const Handle(Adaptor3d_Curve)& C3D, const Standard_Real Tol, const GeomAbs_Shape Order, const Standard_Integer MaxDegree, const Standard_Integer MaxSegments); //! case of a curve on one surface - Standard_EXPORT Approx_CurvilinearParameter(const Handle(Adaptor2d_HCurve2d)& C2D, const Handle(Adaptor3d_HSurface)& Surf, const Standard_Real Tol, const GeomAbs_Shape Order, const Standard_Integer MaxDegree, const Standard_Integer MaxSegments); + Standard_EXPORT Approx_CurvilinearParameter(const Handle(Adaptor2d_Curve2d)& C2D, const Handle(Adaptor3d_Surface)& Surf, const Standard_Real Tol, const GeomAbs_Shape Order, const Standard_Integer MaxDegree, const Standard_Integer MaxSegments); //! case of a curve on two surfaces - Standard_EXPORT Approx_CurvilinearParameter(const Handle(Adaptor2d_HCurve2d)& C2D1, const Handle(Adaptor3d_HSurface)& Surf1, const Handle(Adaptor2d_HCurve2d)& C2D2, const Handle(Adaptor3d_HSurface)& Surf2, const Standard_Real Tol, const GeomAbs_Shape Order, const Standard_Integer MaxDegree, const Standard_Integer MaxSegments); + Standard_EXPORT Approx_CurvilinearParameter(const Handle(Adaptor2d_Curve2d)& C2D1, const Handle(Adaptor3d_Surface)& Surf1, const Handle(Adaptor2d_Curve2d)& C2D2, const Handle(Adaptor3d_Surface)& Surf2, const Standard_Real Tol, const GeomAbs_Shape Order, const Standard_Integer MaxDegree, const Standard_Integer MaxSegments); Standard_EXPORT Standard_Boolean IsDone() const; @@ -97,7 +84,7 @@ protected: private: - Standard_EXPORT static void ToleranceComputation (const Handle(Adaptor2d_HCurve2d)& C2D, const Handle(Adaptor3d_HSurface)& S, const Standard_Integer MaxNumber, const Standard_Real Tol, Standard_Real& TolV, Standard_Real& TolW); + Standard_EXPORT static void ToleranceComputation (const Handle(Adaptor2d_Curve2d)& C2D, const Handle(Adaptor3d_Surface)& S, const Standard_Integer MaxNumber, const Standard_Real Tol, Standard_Real& TolV, Standard_Real& TolW); Standard_Integer myCase; diff --git a/src/Approx/Approx_CurvlinFunc.cxx b/src/Approx/Approx_CurvlinFunc.cxx index 37aadf579f..9bb8c5a5a9 100644 --- a/src/Approx/Approx_CurvlinFunc.cxx +++ b/src/Approx/Approx_CurvlinFunc.cxx @@ -14,14 +14,12 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. +#include -#include +#include #include #include -#include -#include -#include -#include +#include #include #include #include @@ -114,7 +112,7 @@ static void findfourpoints(const Standard_Real , } */ -Approx_CurvlinFunc::Approx_CurvlinFunc(const Handle(Adaptor3d_HCurve)& C, const Standard_Real Tol) : myC3D(C), +Approx_CurvlinFunc::Approx_CurvlinFunc(const Handle(Adaptor3d_Curve)& C, const Standard_Real Tol) : myC3D(C), myCase(1), myFirstS(0), myLastS(1), @@ -125,7 +123,7 @@ Approx_CurvlinFunc::Approx_CurvlinFunc(const Handle(Adaptor3d_HCurve)& C, const Init(); } -Approx_CurvlinFunc::Approx_CurvlinFunc(const Handle(Adaptor2d_HCurve2d)& C2D, const Handle(Adaptor3d_HSurface)& S, const Standard_Real Tol) : +Approx_CurvlinFunc::Approx_CurvlinFunc(const Handle(Adaptor2d_Curve2d)& C2D, const Handle(Adaptor3d_Surface)& S, const Standard_Real Tol) : myC2D1(C2D), mySurf1(S), myCase(2), @@ -138,7 +136,7 @@ Approx_CurvlinFunc::Approx_CurvlinFunc(const Handle(Adaptor2d_HCurve2d)& C2D, co Init(); } -Approx_CurvlinFunc::Approx_CurvlinFunc(const Handle(Adaptor2d_HCurve2d)& C2D1, const Handle(Adaptor2d_HCurve2d)& C2D2, const Handle(Adaptor3d_HSurface)& S1, const Handle(Adaptor3d_HSurface)& S2, const Standard_Real Tol) : +Approx_CurvlinFunc::Approx_CurvlinFunc(const Handle(Adaptor2d_Curve2d)& C2D1, const Handle(Adaptor2d_Curve2d)& C2D2, const Handle(Adaptor3d_Surface)& S1, const Handle(Adaptor3d_Surface)& S2, const Standard_Real Tol) : myC2D1(C2D1), myC2D2(C2D2), mySurf1(S1), @@ -159,7 +157,7 @@ void Approx_CurvlinFunc::Init() switch(myCase) { case 1: - Init(myC3D->GetCurve(), mySi_1, myUi_1); + Init (*myC3D, mySi_1, myUi_1); myFirstU1 = myC3D->FirstParameter(); myLastU1 = myC3D->LastParameter(); myFirstU2 = myLastU2 = 0; @@ -330,45 +328,45 @@ void Approx_CurvlinFunc::Trim(const Standard_Real First, const Standard_Real Las Standard_Real FirstU, LastU; Adaptor3d_CurveOnSurface CurOnSur; - Handle(Adaptor3d_HCurve) HCurOnSur; + Handle(Adaptor3d_CurveOnSurface) HCurOnSur; switch(myCase) { case 1: myC3D = myC3D->Trim(myFirstU1, myLastU1, Tol); - FirstU = GetUParameter(myC3D->GetCurve(), First, 1); - LastU = GetUParameter(myC3D->GetCurve(), Last, 1); + FirstU = GetUParameter(*myC3D, First, 1); + LastU = GetUParameter (*myC3D, Last, 1); myC3D = myC3D->Trim(FirstU, LastU, Tol); break; case 3: CurOnSur.Load(myC2D2); CurOnSur.Load(mySurf2); - HCurOnSur = CurOnSur.Trim(myFirstU2, myLastU2, Tol); - myC2D2 = ((Adaptor3d_CurveOnSurface *)(&(HCurOnSur->Curve())))->GetCurve(); - mySurf2 = ((Adaptor3d_CurveOnSurface *)(&(HCurOnSur->Curve())))->GetSurface(); + HCurOnSur = Handle(Adaptor3d_CurveOnSurface)::DownCast (CurOnSur.Trim(myFirstU2, myLastU2, Tol)); + myC2D2 = HCurOnSur->GetCurve(); + mySurf2 = HCurOnSur->GetSurface(); CurOnSur.Load(myC2D2); CurOnSur.Load(mySurf2); FirstU = GetUParameter(CurOnSur, First, 1); LastU = GetUParameter(CurOnSur, Last, 1); - HCurOnSur = CurOnSur.Trim(FirstU, LastU, Tol); - myC2D2 = ((Adaptor3d_CurveOnSurface *)(&(HCurOnSur->Curve())))->GetCurve(); - mySurf2 = ((Adaptor3d_CurveOnSurface *)(&(HCurOnSur->Curve())))->GetSurface(); + HCurOnSur = Handle(Adaptor3d_CurveOnSurface)::DownCast (CurOnSur.Trim(FirstU, LastU, Tol)); + myC2D2 = HCurOnSur->GetCurve(); + mySurf2 = HCurOnSur->GetSurface(); Standard_FALLTHROUGH case 2: CurOnSur.Load(myC2D1); CurOnSur.Load(mySurf1); - HCurOnSur = CurOnSur.Trim(myFirstU1, myLastU1, Tol); - myC2D1 = ((Adaptor3d_CurveOnSurface *)(&(HCurOnSur->Curve())))->GetCurve(); - mySurf1 = ((Adaptor3d_CurveOnSurface *)(&(HCurOnSur->Curve())))->GetSurface(); + HCurOnSur = Handle(Adaptor3d_CurveOnSurface)::DownCast (CurOnSur.Trim(myFirstU1, myLastU1, Tol)); + myC2D1 = HCurOnSur->GetCurve(); + mySurf1 = HCurOnSur->GetSurface(); CurOnSur.Load(myC2D1); CurOnSur.Load(mySurf1); FirstU = GetUParameter(CurOnSur, First, 1); LastU = GetUParameter(CurOnSur, Last, 1); - HCurOnSur = CurOnSur.Trim(FirstU, LastU, Tol); - myC2D1 = ((Adaptor3d_CurveOnSurface *)(&(HCurOnSur->Curve())))->GetCurve(); - mySurf1 = ((Adaptor3d_CurveOnSurface *)(&(HCurOnSur->Curve())))->GetSurface(); + HCurOnSur = Handle(Adaptor3d_CurveOnSurface)::DownCast (CurOnSur.Trim(FirstU, LastU, Tol)); + myC2D1 = HCurOnSur->GetCurve(); + mySurf1 = HCurOnSur->GetSurface(); } myFirstS = First; myLastS = Last; @@ -383,7 +381,7 @@ void Approx_CurvlinFunc::Length() case 1: FirstU = myC3D->FirstParameter(); LastU = myC3D->LastParameter(); - myLength = Length(myC3D->GetCurve(), FirstU, LastU); + myLength = Length (*myC3D, FirstU, LastU); myLength1 = myLength2 = 0; break; case 2: @@ -431,7 +429,7 @@ Standard_Real Approx_CurvlinFunc::GetSParameter(const Standard_Real U) const switch (myCase) { case 1: - S = GetSParameter(myC3D->GetCurve(), U, myLength); + S = GetSParameter (*myC3D, U, myLength); break; case 2: CurOnSur.Load(myC2D1); @@ -534,7 +532,7 @@ Standard_Boolean Approx_CurvlinFunc::EvalCase1(const Standard_Real S, const Stan gp_Vec dC_dU, dC_dS, d2C_dU2, d2C_dS2; Standard_Real U, Mag, dU_dS, d2U_dS2; - U = GetUParameter(myC3D->GetCurve(), S, 1); + U = GetUParameter (*myC3D, S, 1); switch(Order) { @@ -610,8 +608,8 @@ Standard_Boolean Approx_CurvlinFunc::EvalCase3(const Standard_Real S, const Stan Standard_Boolean Approx_CurvlinFunc::EvalCurOnSur(const Standard_Real S, const Standard_Integer Order, TColStd_Array1OfReal& Result, const Standard_Integer NumberOfCurve) const { - Handle(Adaptor2d_HCurve2d) Cur2D; - Handle(Adaptor3d_HSurface) Surf; + Handle(Adaptor2d_Curve2d) Cur2D; + Handle(Adaptor3d_Surface) Surf; Standard_Real U=0, Length=0; if (NumberOfCurve == 1) { diff --git a/src/Approx/Approx_CurvlinFunc.hxx b/src/Approx/Approx_CurvlinFunc.hxx index ee5c6acc40..6a9f6bd02d 100644 --- a/src/Approx/Approx_CurvlinFunc.hxx +++ b/src/Approx/Approx_CurvlinFunc.hxx @@ -17,26 +17,13 @@ #ifndef _Approx_CurvlinFunc_HeaderFile #define _Approx_CurvlinFunc_HeaderFile -#include -#include - -#include -#include -#include -#include +#include +#include +#include #include #include -#include -class Adaptor3d_HCurve; -class Adaptor2d_HCurve2d; -class Adaptor3d_HSurface; -class Standard_OutOfRange; -class Standard_DomainError; -class Standard_ConstructionError; -class Adaptor3d_Curve; +#include - -class Approx_CurvlinFunc; DEFINE_STANDARD_HANDLE(Approx_CurvlinFunc, Standard_Transient) //! defines an abstract curve with @@ -47,11 +34,11 @@ class Approx_CurvlinFunc : public Standard_Transient public: - Standard_EXPORT Approx_CurvlinFunc(const Handle(Adaptor3d_HCurve)& C, const Standard_Real Tol); + Standard_EXPORT Approx_CurvlinFunc(const Handle(Adaptor3d_Curve)& C, const Standard_Real Tol); - Standard_EXPORT Approx_CurvlinFunc(const Handle(Adaptor2d_HCurve2d)& C2D, const Handle(Adaptor3d_HSurface)& S, const Standard_Real Tol); + Standard_EXPORT Approx_CurvlinFunc(const Handle(Adaptor2d_Curve2d)& C2D, const Handle(Adaptor3d_Surface)& S, const Standard_Real Tol); - Standard_EXPORT Approx_CurvlinFunc(const Handle(Adaptor2d_HCurve2d)& C2D1, const Handle(Adaptor2d_HCurve2d)& C2D2, const Handle(Adaptor3d_HSurface)& S1, const Handle(Adaptor3d_HSurface)& S2, const Standard_Real Tol); + Standard_EXPORT Approx_CurvlinFunc(const Handle(Adaptor2d_Curve2d)& C2D1, const Handle(Adaptor2d_Curve2d)& C2D2, const Handle(Adaptor3d_Surface)& S1, const Handle(Adaptor3d_Surface)& S2, const Standard_Real Tol); //! ---Purpose Update the tolerance to used Standard_EXPORT void SetTol (const Standard_Real Tol); @@ -121,11 +108,11 @@ private: Standard_EXPORT Standard_Boolean EvalCurOnSur (const Standard_Real S, const Standard_Integer Order, TColStd_Array1OfReal& Result, const Standard_Integer NumberOfCurve) const; - Handle(Adaptor3d_HCurve) myC3D; - Handle(Adaptor2d_HCurve2d) myC2D1; - Handle(Adaptor2d_HCurve2d) myC2D2; - Handle(Adaptor3d_HSurface) mySurf1; - Handle(Adaptor3d_HSurface) mySurf2; + Handle(Adaptor3d_Curve) myC3D; + Handle(Adaptor2d_Curve2d) myC2D1; + Handle(Adaptor2d_Curve2d) myC2D2; + Handle(Adaptor3d_Surface) mySurf1; + Handle(Adaptor3d_Surface) mySurf2; Standard_Integer myCase; Standard_Real myFirstS; Standard_Real myLastS; diff --git a/src/Approx/Approx_HArray1OfAdHSurface.hxx b/src/Approx/Approx_HArray1OfAdHSurface.hxx index b8c2b25c72..c4f37f6c0f 100644 --- a/src/Approx/Approx_HArray1OfAdHSurface.hxx +++ b/src/Approx/Approx_HArray1OfAdHSurface.hxx @@ -17,7 +17,7 @@ #ifndef Approx_HArray1OfAdHSurface_HeaderFile #define Approx_HArray1OfAdHSurface_HeaderFile -#include +#include #include #include diff --git a/src/Approx/Approx_SameParameter.cxx b/src/Approx/Approx_SameParameter.cxx index 7258312053..b4c282710b 100644 --- a/src/Approx/Approx_SameParameter.cxx +++ b/src/Approx/Approx_SameParameter.cxx @@ -14,24 +14,24 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. - -#include -#include -#include -#include -#include #include + +#include +#include +#include +#include +#include #include #include #include #include #include #include -#include +#include #include #include -#include -#include +#include +#include #include #include #include @@ -48,7 +48,7 @@ class Approx_SameParameter_Evaluator : public AdvApprox_EvaluatorFunction public: Approx_SameParameter_Evaluator (const TColStd_Array1OfReal& theFlatKnots, const TColStd_Array1OfReal& thePoles, - const Handle(Adaptor2d_HCurve2d)& theHCurve2d) + const Handle(Adaptor2d_Curve2d)& theHCurve2d) : FlatKnots(theFlatKnots), Poles(thePoles), HCurve2d(theHCurve2d) {} @@ -63,7 +63,7 @@ public: private: const TColStd_Array1OfReal& FlatKnots; const TColStd_Array1OfReal& Poles; - Handle(Adaptor2d_HCurve2d) HCurve2d; + Handle(Adaptor2d_Curve2d) HCurve2d; }; //======================================================================= @@ -162,7 +162,7 @@ static void ProjectPointOnCurve(const Standard_Real InitValue, //function : ComputeTolReached //purpose : //======================================================================= -static Standard_Real ComputeTolReached(const Handle(Adaptor3d_HCurve)& c3d, +static Standard_Real ComputeTolReached(const Handle(Adaptor3d_Curve)& c3d, const Adaptor3d_CurveOnSurface& cons, const Standard_Integer nbp) { @@ -199,7 +199,7 @@ static Standard_Boolean Check(const TColStd_Array1OfReal& FlatKnots, const TColStd_Array1OfReal& Poles, const Standard_Integer nbp, const Standard_Real *pc3d, - const Handle(Adaptor3d_HCurve)& c3d, + const Handle(Adaptor3d_Curve)& c3d, const Adaptor3d_CurveOnSurface& cons, Standard_Real& tol, const Standard_Real oldtol) @@ -276,9 +276,9 @@ Approx_SameParameter::Approx_SameParameter(const Handle(Geom_Curve)& C3D, mySameParameter(Standard_True), myDone(Standard_False) { - myHCurve2d = new Geom2dAdaptor_HCurve(C2D); - myC3d = new GeomAdaptor_HCurve(C3D); - mySurf = new GeomAdaptor_HSurface(S); + myHCurve2d = new Geom2dAdaptor_Curve(C2D); + myC3d = new GeomAdaptor_Curve(C3D); + mySurf = new GeomAdaptor_Surface(S); Build(Tol); } @@ -286,9 +286,9 @@ Approx_SameParameter::Approx_SameParameter(const Handle(Geom_Curve)& C3D, //function : Approx_SameParameter //purpose : //======================================================================= -Approx_SameParameter::Approx_SameParameter(const Handle(Adaptor3d_HCurve)& C3D, +Approx_SameParameter::Approx_SameParameter(const Handle(Adaptor3d_Curve)& C3D, const Handle(Geom2d_Curve)& C2D, - const Handle(Adaptor3d_HSurface)& S, + const Handle(Adaptor3d_Surface)& S, const Standard_Real Tol) : myDeltaMin(Precision::PConfusion()), mySameParameter(Standard_True), @@ -296,7 +296,7 @@ Approx_SameParameter::Approx_SameParameter(const Handle(Adaptor3d_HCurve)& C3D { myC3d = C3D; mySurf = S; - myHCurve2d = new Geom2dAdaptor_HCurve(C2D); + myHCurve2d = new Geom2dAdaptor_Curve(C2D); Build(Tol); } @@ -304,9 +304,9 @@ Approx_SameParameter::Approx_SameParameter(const Handle(Adaptor3d_HCurve)& C3D //function : Approx_SameParameter //purpose : //======================================================================= -Approx_SameParameter::Approx_SameParameter(const Handle(Adaptor3d_HCurve)& C3D, - const Handle(Adaptor2d_HCurve2d)& C2D, - const Handle(Adaptor3d_HSurface)& S, +Approx_SameParameter::Approx_SameParameter(const Handle(Adaptor3d_Curve)& C3D, + const Handle(Adaptor2d_Curve2d)& C2D, + const Handle(Adaptor3d_Surface)& S, const Standard_Real Tol) : myDeltaMin(Precision::PConfusion()), mySameParameter(Standard_True), @@ -374,7 +374,7 @@ void Approx_SameParameter::Build(const Standard_Real Tolerance) if(aData.myNbPnt < aNbPnt ) { myTolReached = ComputeTolReached(myC3d,aData.myCOnS, 2 * myNbSamples); - myCurve2d = Geom2dAdaptor::MakeCurve(myHCurve2d->Curve2d()); + myCurve2d = Geom2dAdaptor::MakeCurve (*myHCurve2d); myDone = Standard_False; return; } @@ -445,7 +445,7 @@ void Approx_SameParameter::Build(const Standard_Real Tolerance) Adaptor3d_CurveOnSurface ACS = aData.myCOnS; GeomLib_MakeCurvefromApprox aCurveBuilder(anApproximator); Handle(Geom2d_BSplineCurve) aC2d = aCurveBuilder.Curve2dFromTwo1d(1,2); - Handle(Adaptor2d_HCurve2d) aHCurve2d = new Geom2dAdaptor_HCurve(aC2d); + Handle(Adaptor2d_Curve2d) aHCurve2d = new Geom2dAdaptor_Curve(aC2d); aData.myCOnS.Load(aHCurve2d); myTolReached = ComputeTolReached(myC3d,aData.myCOnS, 2 * myNbSamples); @@ -482,7 +482,7 @@ void Approx_SameParameter::Build(const Standard_Real Tolerance) // Original 2d curve. aData.myCOnS.Load(myHCurve2d); myTolReached = ComputeTolReached(myC3d,aData.myCOnS, 2 * myNbSamples); - myCurve2d = Geom2dAdaptor::MakeCurve(myHCurve2d->Curve2d()); + myCurve2d = Geom2dAdaptor::MakeCurve (*myHCurve2d); // Approximation curve. Standard_Integer num_knots = aData.myNbPnt + 7; @@ -512,7 +512,7 @@ void Approx_SameParameter::Build(const Standard_Real Tolerance) GeomLib_MakeCurvefromApprox aCurveBuilder(anApproximator); Handle(Geom2d_BSplineCurve) aC2d = aCurveBuilder.Curve2dFromTwo1d(1,2); - Handle(Adaptor2d_HCurve2d) aHCurve2d = new Geom2dAdaptor_HCurve(aC2d); + Handle(Adaptor2d_Curve2d) aHCurve2d = new Geom2dAdaptor_Curve(aC2d); aData.myCOnS.Load(aHCurve2d); Standard_Real anApproxTol = ComputeTolReached(myC3d,aData.myCOnS,2 * myNbSamples); @@ -650,7 +650,7 @@ Standard_Boolean Approx_SameParameter::CheckSameParameter(Approx_SameParameter_D dmax2 = Max(dmax2, dist2); Extrema_LocateExtPC Projector; - Projector.Initialize(myC3d->Curve(), theData.myC3dPF, theData.myC3dPL, theData.myTol); + Projector.Initialize (*myC3d, theData.myC3dPF, theData.myC3dPL, theData.myTol); Standard_Integer count = 1; Standard_Real previousp = theData.myC3dPF, initp=0, curp; @@ -688,7 +688,7 @@ Standard_Boolean Approx_SameParameter::CheckSameParameter(Approx_SameParameter_D } else { - ProjectPointOnCurve(initp,Pcons,theData.myTol,30,myC3d->Curve(),isProjOk,curp); + ProjectPointOnCurve(initp,Pcons,theData.myTol,30, *myC3d,isProjOk,curp); } isProjOk = isProjOk && // Good projection. curp > previousp + myDeltaMin && // Point is separated from previous. @@ -702,7 +702,7 @@ Standard_Boolean Approx_SameParameter::CheckSameParameter(Approx_SameParameter_D } // Whole parameter space search using general extrema. - Extrema_ExtPC PR(Pcons,myC3d->Curve(),theData.myC3dPF, theData.myC3dPL,theData.myTol); + Extrema_ExtPC PR(Pcons, *myC3d, theData.myC3dPF, theData.myC3dPL, theData.myTol); if (!PR.IsDone() || PR.NbExt() == 0) // Lazy evaluation is used. continue; @@ -830,7 +830,7 @@ Standard_Boolean Approx_SameParameter::IncreaseNbPoles(const TColStd_Array1OfRea Standard_Real &theBestSqTol) const { Extrema_LocateExtPC Projector; - Projector.Initialize(myC3d->Curve(), myC3d->FirstParameter(), myC3d->LastParameter(), theData.myTol); + Projector.Initialize (*myC3d, myC3d->FirstParameter(), myC3d->LastParameter(), theData.myTol); Standard_Real curp = 0.0; Standard_Boolean projok = Standard_False; @@ -869,7 +869,7 @@ Standard_Boolean Approx_SameParameter::IncreaseNbPoles(const TColStd_Array1OfRea } else { - ProjectPointOnCurve(uc3d,Pcons,theData.myTol,30,myC3d->Curve(),projok,curp); + ProjectPointOnCurve(uc3d,Pcons,theData.myTol,30, *myC3d,projok,curp); } if(projok) { @@ -917,7 +917,7 @@ Standard_Boolean Approx_SameParameter::IncreaseNbPoles(const TColStd_Array1OfRea } else { - ProjectPointOnCurve(uc3d,Pcons,theData.myTol,30,myC3d->Curve(),projok,curp); + ProjectPointOnCurve(uc3d,Pcons,theData.myTol,30, *myC3d,projok,curp); } if(projok) { diff --git a/src/Approx/Approx_SameParameter.hxx b/src/Approx/Approx_SameParameter.hxx index 7f56fc3f91..617c2b2573 100644 --- a/src/Approx/Approx_SameParameter.hxx +++ b/src/Approx/Approx_SameParameter.hxx @@ -17,15 +17,9 @@ #ifndef _Approx_SameParameter_HeaderFile #define _Approx_SameParameter_HeaderFile -#include -#include -#include #include -#include -#include -class Adaptor2d_HCurve2d; -class Adaptor3d_HCurve; -class Adaptor3d_HSurface; +#include + class Geom_Curve; class Geom2d_Curve; class Geom_Surface; @@ -46,15 +40,15 @@ public: const Standard_Real Tol); //! Warning: the C3D and C2D must have the same parametric domain. - Standard_EXPORT Approx_SameParameter(const Handle(Adaptor3d_HCurve)& C3D, + Standard_EXPORT Approx_SameParameter(const Handle(Adaptor3d_Curve)& C3D, const Handle(Geom2d_Curve)& C2D, - const Handle(Adaptor3d_HSurface)& S, + const Handle(Adaptor3d_Surface)& S, const Standard_Real Tol); //! Warning: the C3D and C2D must have the same parametric domain. - Standard_EXPORT Approx_SameParameter(const Handle(Adaptor3d_HCurve)& C3D, - const Handle(Adaptor2d_HCurve2d)& C2D, - const Handle(Adaptor3d_HSurface)& S, + Standard_EXPORT Approx_SameParameter(const Handle(Adaptor3d_Curve)& C3D, + const Handle(Adaptor2d_Curve2d)& C2D, + const Handle(Adaptor3d_Surface)& S, const Standard_Real Tol); //!@Returns .false. if calculations failed, @@ -179,9 +173,9 @@ private: Standard_Boolean myDone; Standard_Real myTolReached; Handle(Geom2d_Curve) myCurve2d; - Handle(Adaptor2d_HCurve2d) myHCurve2d; - Handle(Adaptor3d_HCurve) myC3d; - Handle(Adaptor3d_HSurface) mySurf; + Handle(Adaptor2d_Curve2d) myHCurve2d; + Handle(Adaptor3d_Curve) myC3d; + Handle(Adaptor3d_Surface) mySurf; }; #endif // _Approx_SameParameter_HeaderFile diff --git a/src/BOPTools/BOPTools_AlgoTools2D.cxx b/src/BOPTools/BOPTools_AlgoTools2D.cxx index b24667e264..7304421ac4 100644 --- a/src/BOPTools/BOPTools_AlgoTools2D.cxx +++ b/src/BOPTools/BOPTools_AlgoTools2D.cxx @@ -21,7 +21,6 @@ #include #include #include -#include #include #include #include @@ -40,8 +39,6 @@ #include #include #include -#include -#include #include #include #include @@ -554,8 +551,8 @@ void BOPTools_AlgoTools2D::MakePCurveOnFace pBAS = &aBASTmp; } // - Handle(BRepAdaptor_HSurface) aBAHS = new BRepAdaptor_HSurface(*pBAS); - Handle(GeomAdaptor_HCurve) aBAHC = new GeomAdaptor_HCurve(aC3D, aT1, aT2); + Handle(BRepAdaptor_Surface) aBAHS = new BRepAdaptor_Surface(*pBAS); + Handle(GeomAdaptor_Curve) aBAHC = new GeomAdaptor_Curve(aC3D, aT1, aT2); // Standard_Real aTolR; Standard_Real aTR = Precision::Confusion();//1.e-7; diff --git a/src/BOPTools/BOPTools_AlgoTools_1.cxx b/src/BOPTools/BOPTools_AlgoTools_1.cxx index 78e1a5e386..d020740e1f 100644 --- a/src/BOPTools/BOPTools_AlgoTools_1.cxx +++ b/src/BOPTools/BOPTools_AlgoTools_1.cxx @@ -14,8 +14,6 @@ #include -#include -#include #include #include #include @@ -36,7 +34,6 @@ #include #include #include -#include #include #include #include @@ -44,8 +41,6 @@ #include #include #include -#include -#include #include #include #include @@ -723,7 +718,7 @@ void CorrectEdgeTolerance (const TopoDS_Edge& myShape, // // 1. Minimum of conditions to Perform Handle (BRep_CurveRepresentation) myCref; - Handle (Adaptor3d_HCurve) myHCurve; + Handle (Adaptor3d_Curve) myHCurve; myCref.Nullify(); @@ -791,19 +786,19 @@ void CorrectEdgeTolerance (const TopoDS_Edge& myShape, (myCref->Curve3D()->Transformed (myCref->Location().Transformation())); GeomAdaptor_Curve GAC3d(C3dx, First, Last); - myHCurve = new GeomAdaptor_HCurve(GAC3d); + myHCurve = new GeomAdaptor_Curve(GAC3d); } else { // curve on surface Handle(Geom_Surface) Sref = myCref->Surface(); Sref = Handle(Geom_Surface):: DownCast(Sref->Transformed(myCref->Location().Transformation())); const Handle(Geom2d_Curve)& PCref = myCref->PCurve(); - Handle(GeomAdaptor_HSurface) GAHSref = - new GeomAdaptor_HSurface(Sref); - Handle(Geom2dAdaptor_HCurve) GHPCref = - new Geom2dAdaptor_HCurve(PCref, First, Last); + Handle(GeomAdaptor_Surface) GAHSref = + new GeomAdaptor_Surface(Sref); + Handle(Geom2dAdaptor_Curve) GHPCref = + new Geom2dAdaptor_Curve(PCref, First, Last); Adaptor3d_CurveOnSurface ACSref(GHPCref,GAHSref); - myHCurve = new Adaptor3d_HCurveOnSurface(ACSref); + myHCurve = new Adaptor3d_CurveOnSurface(ACSref); } } } @@ -848,13 +843,12 @@ void CorrectEdgeTolerance (const TopoDS_Edge& myShape, Sb = Handle(Geom_Surface):: DownCast (Su->Transformed(L.Transformation())); Handle(Geom2d_Curve) PC = cr->PCurve(); - Handle(GeomAdaptor_HSurface) GAHS = - new GeomAdaptor_HSurface(Sb); - Handle(Geom2dAdaptor_HCurve) GHPC = - new Geom2dAdaptor_HCurve(PC,f,l); + Handle(GeomAdaptor_Surface) GAHS = + new GeomAdaptor_Surface(Sb); + Handle(Geom2dAdaptor_Curve) GHPC = + new Geom2dAdaptor_Curve(PC,f,l); Adaptor3d_CurveOnSurface ACS(GHPC,GAHS); - ok = Validate(myHCurve->Curve(), ACS, - Tol, SameParameter, aNewTol); + ok = Validate (*myHCurve, ACS, Tol, SameParameter, aNewTol); if (ok) { if (aNewTolIsCurveOnClosedSurface()) { //checkclosed = Standard_True; - GHPC->ChangeCurve2d().Load(cr->PCurve2(),f,l); // same bounds + GHPC->Load(cr->PCurve2(),f,l); // same bounds ACS.Load(GHPC, GAHS); // sans doute inutile - ok = Validate(myHCurve->Curve(),ACS,Tol,SameParameter, aNewTol); + ok = Validate (*myHCurve, ACS, Tol, SameParameter, aNewTol); if (ok) { if (aNewTolTransformed(L.Transformation())); //on projette Cref sur ce plan - Handle(GeomAdaptor_HSurface) GAHS = new GeomAdaptor_HSurface(P); + Handle(GeomAdaptor_Surface) GAHS = new GeomAdaptor_Surface(P); - // Dub - Normalement myHCurve est une GeomAdaptor_HCurve - GeomAdaptor_Curve& Gac = - Handle(GeomAdaptor_HCurve)::DownCast(myHCurve)->ChangeCurve(); - Handle(Geom_Curve) C3dx = Gac.Curve(); + // Dub - Normalement myHCurve est une GeomAdaptor_Curve + Handle(GeomAdaptor_Curve) Gac = Handle(GeomAdaptor_Curve)::DownCast(myHCurve); + Handle(Geom_Curve) C3dx = Gac->Curve(); Handle(Geom_Curve) ProjOnPlane = GeomProjLib::ProjectOnPlane(new Geom_TrimmedCurve(C3dx,First,Last), P, P->Position().Direction(), Standard_True); - Handle(GeomAdaptor_HCurve) aHCurve = - new GeomAdaptor_HCurve(ProjOnPlane); + Handle(GeomAdaptor_Curve) aHCurve = + new GeomAdaptor_Curve(ProjOnPlane); ProjLib_ProjectedCurve proj(GAHS,aHCurve); Handle(Geom2d_Curve) PC = Geom2dAdaptor::MakeCurve(proj); - Handle(Geom2dAdaptor_HCurve) GHPC = - new Geom2dAdaptor_HCurve(PC, + Handle(Geom2dAdaptor_Curve) GHPC = + new Geom2dAdaptor_Curve(PC, myHCurve->FirstParameter(), myHCurve->LastParameter()); Adaptor3d_CurveOnSurface ACS(GHPC,GAHS); - Standard_Boolean okx = Validate(myHCurve->Curve(),ACS, + Standard_Boolean okx = Validate(*myHCurve, ACS, Tol,Standard_True, aNewTol); if (okx) { if (aNewTol #include #include -#include -#include +#include +#include #include #include #include @@ -391,8 +391,8 @@ Handle(Geom2d_Curve) BRep_Tool::CurveOnPlane(const TopoDS_Edge& E, GP->Position().Direction(), Standard_True); - Handle(GeomAdaptor_HSurface) HS = new GeomAdaptor_HSurface(GP); - Handle(GeomAdaptor_HCurve) HC = new GeomAdaptor_HCurve(ProjOnPlane); + Handle(GeomAdaptor_Surface) HS = new GeomAdaptor_Surface(GP); + Handle(GeomAdaptor_Curve) HC = new GeomAdaptor_Curve(ProjOnPlane); ProjLib_ProjectedCurve Proj(HS, HC); Handle(Geom2d_Curve) pc = Geom2dAdaptor::MakeCurve(Proj); diff --git a/src/BRepAdaptor/BRepAdaptor_CompCurve.cxx b/src/BRepAdaptor/BRepAdaptor_CompCurve.cxx index e4068ac95c..619f46d039 100644 --- a/src/BRepAdaptor/BRepAdaptor_CompCurve.cxx +++ b/src/BRepAdaptor/BRepAdaptor_CompCurve.cxx @@ -14,13 +14,9 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. - -#include -#include #include -#include -#include -#include + +#include #include #include #include @@ -42,6 +38,8 @@ #include #include +IMPLEMENT_STANDARD_RTTIEXT(BRepAdaptor_CompCurve, Adaptor3d_Curve) + BRepAdaptor_CompCurve::BRepAdaptor_CompCurve() : TFirst (0.0), TLast (0.0), @@ -152,7 +150,7 @@ BRepAdaptor_CompCurve::BRepAdaptor_CompCurve(const TopoDS_Wire& theWire, PTol = Tol; // Trim the extremal curves. - Handle (BRepAdaptor_HCurve) HC; + Handle (BRepAdaptor_Curve) HC; Standard_Integer i1, i2; Standard_Real f=TFirst, l=TLast, d; i1 = i2 = CurIndex; @@ -161,10 +159,10 @@ BRepAdaptor_CompCurve::BRepAdaptor_CompCurve(const TopoDS_Wire& theWire, CurIndex = (i1+i2)/2; // Small optimization if (i1==i2) { if (l > f) - HC = Handle(BRepAdaptor_HCurve)::DownCast(myCurves->Value(i1).Trim(f, l, PTol)); + HC = Handle(BRepAdaptor_Curve)::DownCast(myCurves->Value(i1).Trim(f, l, PTol)); else - HC = Handle(BRepAdaptor_HCurve)::DownCast(myCurves->Value(i1).Trim(l, f, PTol)); - myCurves->SetValue(i1, HC->ChangeCurve()); + HC = Handle(BRepAdaptor_Curve)::DownCast(myCurves->Value(i1).Trim(l, f, PTol)); + myCurves->SetValue(i1, *HC); } else { const BRepAdaptor_Curve& c1 = myCurves->Value(i1); @@ -173,17 +171,17 @@ BRepAdaptor_CompCurve::BRepAdaptor_CompCurve(const TopoDS_Wire& theWire, k = c1.LastParameter(); if (k>f) - HC = Handle(BRepAdaptor_HCurve)::DownCast(c1.Trim(f, k, PTol)); + HC = Handle(BRepAdaptor_Curve)::DownCast(c1.Trim(f, k, PTol)); else - HC = Handle(BRepAdaptor_HCurve)::DownCast(c1.Trim(k, f, PTol)); - myCurves->SetValue(i1, HC->ChangeCurve()); + HC = Handle(BRepAdaptor_Curve)::DownCast(c1.Trim(k, f, PTol)); + myCurves->SetValue(i1, *HC); k = c2.FirstParameter(); if (k<=l) - HC = Handle(BRepAdaptor_HCurve)::DownCast(c2.Trim(k, l, PTol)); + HC = Handle(BRepAdaptor_Curve)::DownCast(c2.Trim(k, l, PTol)); else - HC = Handle(BRepAdaptor_HCurve)::DownCast(c2.Trim(l, k, PTol)); - myCurves->SetValue(i2, HC->ChangeCurve()); + HC = Handle(BRepAdaptor_Curve)::DownCast(c2.Trim(l, k, PTol)); + myCurves->SetValue(i2, *HC); } } @@ -269,13 +267,13 @@ const TopoDS_Wire& BRepAdaptor_CompCurve::Wire() const } } - Handle(Adaptor3d_HCurve) BRepAdaptor_CompCurve::Trim(const Standard_Real First, + Handle(Adaptor3d_Curve) BRepAdaptor_CompCurve::Trim(const Standard_Real First, const Standard_Real Last, const Standard_Real Tol) const { BRepAdaptor_CompCurve C(myWire, IsbyAC, First, Last, Tol); - Handle(BRepAdaptor_HCompCurve) HC = - new (BRepAdaptor_HCompCurve) (C); + Handle(BRepAdaptor_CompCurve) HC = + new (BRepAdaptor_CompCurve) (C); return HC; } diff --git a/src/BRepAdaptor/BRepAdaptor_CompCurve.hxx b/src/BRepAdaptor/BRepAdaptor_CompCurve.hxx index 99e18bc36c..87efb3f294 100644 --- a/src/BRepAdaptor/BRepAdaptor_CompCurve.hxx +++ b/src/BRepAdaptor/BRepAdaptor_CompCurve.hxx @@ -31,13 +31,13 @@ #include #include #include + class Standard_NullObject; class Standard_DomainError; class Standard_OutOfRange; class Standard_NoSuchObject; class TopoDS_Wire; class TopoDS_Edge; -class Adaptor3d_HCurve; class gp_Pnt; class gp_Vec; class gp_Lin; @@ -48,6 +48,7 @@ class gp_Parab; class Geom_BezierCurve; class Geom_BSplineCurve; +DEFINE_STANDARD_HANDLE(BRepAdaptor_CompCurve, Adaptor3d_Curve) //! The Curve from BRepAdaptor allows to use a Wire //! of the BRep topology like a 3D curve. @@ -61,11 +62,9 @@ class Geom_BSplineCurve; //! connected to each other to make a chain. class BRepAdaptor_CompCurve : public Adaptor3d_Curve { + DEFINE_STANDARD_RTTIEXT(BRepAdaptor_CompCurve, Adaptor3d_Curve) public: - DEFINE_STANDARD_ALLOC - - //! Creates an undefined Curve with no Wire loaded. Standard_EXPORT BRepAdaptor_CompCurve(); @@ -109,7 +108,7 @@ public: //! parameters and . is used to //! test for 3d points confusion. //! If >= - Standard_EXPORT Handle(Adaptor3d_HCurve) Trim (const Standard_Real First, const Standard_Real Last, const Standard_Real Tol) const Standard_OVERRIDE; + Standard_EXPORT Handle(Adaptor3d_Curve) Trim (const Standard_Real First, const Standard_Real Last, const Standard_Real Tol) const Standard_OVERRIDE; Standard_EXPORT Standard_Boolean IsClosed() const Standard_OVERRIDE; diff --git a/src/BRepAdaptor/BRepAdaptor_Curve.cxx b/src/BRepAdaptor/BRepAdaptor_Curve.cxx index 4b75698d01..f6915be1f6 100644 --- a/src/BRepAdaptor/BRepAdaptor_Curve.cxx +++ b/src/BRepAdaptor/BRepAdaptor_Curve.cxx @@ -14,21 +14,18 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. +#include #include -#include -#include #include -#include -#include #include -#include +#include #include #include #include #include #include -#include +#include #include #include #include @@ -44,7 +41,9 @@ #include #include #include -#include +#include + +IMPLEMENT_STANDARD_RTTIEXT(BRepAdaptor_Curve, Adaptor3d_Curve) //======================================================================= //function : BRepAdaptor_Curve @@ -108,12 +107,12 @@ void BRepAdaptor_Curve::Initialize(const TopoDS_Edge& E) Handle(Geom_Surface) S; BRep_Tool::CurveOnSurface(E,PC,S,L,pf,pl); if (!PC.IsNull()) { - Handle(GeomAdaptor_HSurface) HS = new GeomAdaptor_HSurface(); - HS->ChangeSurface().Load(S); - Handle(Geom2dAdaptor_HCurve) HC = new Geom2dAdaptor_HCurve(); - HC->ChangeCurve2d().Load(PC,pf,pl); - myConSurf = new Adaptor3d_HCurveOnSurface(); - myConSurf->ChangeCurve().Load(HC, HS); + Handle(GeomAdaptor_Surface) HS = new GeomAdaptor_Surface(); + HS->Load(S); + Handle(Geom2dAdaptor_Curve) HC = new Geom2dAdaptor_Curve(); + HC->Load(PC,pf,pl); + myConSurf = new Adaptor3d_CurveOnSurface(); + myConSurf->Load(HC, HS); } else { throw Standard_NullObject("BRepAdaptor_Curve::No geometry"); @@ -138,12 +137,12 @@ void BRepAdaptor_Curve::Initialize(const TopoDS_Edge& E, Handle(Geom_Surface) S = BRep_Tool::Surface(F,L); Handle(Geom2d_Curve) PC = BRep_Tool::CurveOnSurface(E,F,pf,pl); - Handle(GeomAdaptor_HSurface) HS = new GeomAdaptor_HSurface(); - HS->ChangeSurface().Load(S); - Handle(Geom2dAdaptor_HCurve) HC = new Geom2dAdaptor_HCurve(); - HC->ChangeCurve2d().Load(PC,pf,pl); - myConSurf = new Adaptor3d_HCurveOnSurface(); - myConSurf->ChangeCurve().Load(HC, HS); + Handle(GeomAdaptor_Surface) HS = new GeomAdaptor_Surface(); + HS->Load(S); + Handle(Geom2dAdaptor_Curve) HC = new Geom2dAdaptor_Curve(); + HC->Load(PC,pf,pl); + myConSurf = new Adaptor3d_CurveOnSurface(); + myConSurf->Load(HC, HS); myTrsf = L.Transformation(); } @@ -195,7 +194,7 @@ const GeomAdaptor_Curve& BRepAdaptor_Curve::Curve() const const Adaptor3d_CurveOnSurface& BRepAdaptor_Curve::CurveOnSurface() const { - return *((Adaptor3d_CurveOnSurface*)&(myConSurf->Curve())); + return *myConSurf; } //======================================================================= @@ -300,25 +299,24 @@ void BRepAdaptor_Curve::Intervals(TColStd_Array1OfReal& T, //purpose : //======================================================================= -Handle(Adaptor3d_HCurve) BRepAdaptor_Curve::Trim(const Standard_Real First, +Handle(Adaptor3d_Curve) BRepAdaptor_Curve::Trim(const Standard_Real First, const Standard_Real Last, const Standard_Real Tol) const { // On fait une copie de this pour garder la trsf. - Handle(BRepAdaptor_HCurve) res = new BRepAdaptor_HCurve(); + Handle(BRepAdaptor_Curve) res; if (myConSurf.IsNull()){ Standard_Real pf = FirstParameter(), pl = LastParameter(); Handle(Geom_Curve) C = myCurve.Curve(); - ((GeomAdaptor_Curve*) (void*) &myCurve)->Load(C,First,Last); - res->ChangeCurve() = *this; - ((GeomAdaptor_Curve*) (void*) &myCurve)->Load(C,pf,pl); + const_cast(&myCurve)->Load(C,First,Last); + res = new BRepAdaptor_Curve (*this); + const_cast(&myCurve)->Load(C,pf,pl); } else { - Handle(Adaptor3d_HCurveOnSurface) sav = myConSurf; - *((Handle(Adaptor3d_HCurveOnSurface)*) (void*) &myConSurf) = - Handle(Adaptor3d_HCurveOnSurface)::DownCast(myConSurf->Trim(First,Last,Tol)); - res->ChangeCurve() = *this; - *((Handle(Adaptor3d_HCurveOnSurface)*) (void*) &myConSurf) = sav; + Handle(Adaptor3d_CurveOnSurface) sav = myConSurf; + const_cast(myConSurf) = Handle(Adaptor3d_CurveOnSurface)::DownCast(myConSurf->Trim(First,Last,Tol)); + res = new BRepAdaptor_Curve (*this); + const_cast(myConSurf) = sav; } return res; } diff --git a/src/BRepAdaptor/BRepAdaptor_Curve.hxx b/src/BRepAdaptor/BRepAdaptor_Curve.hxx index 6e42a204a6..583413934f 100644 --- a/src/BRepAdaptor/BRepAdaptor_Curve.hxx +++ b/src/BRepAdaptor/BRepAdaptor_Curve.hxx @@ -17,10 +17,7 @@ #ifndef _BRepAdaptor_Curve_HeaderFile #define _BRepAdaptor_Curve_HeaderFile -#include -#include -#include - +#include #include #include #include @@ -31,7 +28,7 @@ #include #include #include -class Adaptor3d_HCurveOnSurface; + class Standard_NullObject; class Standard_DomainError; class Standard_OutOfRange; @@ -41,7 +38,6 @@ class TopoDS_Face; class gp_Trsf; class GeomAdaptor_Curve; class Adaptor3d_CurveOnSurface; -class Adaptor3d_HCurve; class gp_Pnt; class gp_Vec; class gp_Lin; @@ -53,6 +49,7 @@ class Geom_BezierCurve; class Geom_BSplineCurve; class Geom_OffsetCurve; +DEFINE_STANDARD_HANDLE(BRepAdaptor_Curve, Adaptor3d_Curve) //! The Curve from BRepAdaptor allows to use an Edge //! of the BRep topology like a 3D curve. @@ -68,11 +65,9 @@ class Geom_OffsetCurve; //! an Edge and a Face. class BRepAdaptor_Curve : public Adaptor3d_Curve { + DEFINE_STANDARD_RTTIEXT(BRepAdaptor_Curve, Adaptor3d_Curve) public: - DEFINE_STANDARD_ALLOC - - //! Creates an undefined Curve with no Edge loaded. Standard_EXPORT BRepAdaptor_Curve(); @@ -145,7 +140,7 @@ public: //! parameters and . is used to //! test for 3d points confusion. //! If >= - Standard_EXPORT Handle(Adaptor3d_HCurve) Trim (const Standard_Real First, const Standard_Real Last, const Standard_Real Tol) const Standard_OVERRIDE; + Standard_EXPORT Handle(Adaptor3d_Curve) Trim (const Standard_Real First, const Standard_Real Last, const Standard_Real Tol) const Standard_OVERRIDE; Standard_EXPORT Standard_Boolean IsClosed() const Standard_OVERRIDE; @@ -226,30 +221,13 @@ public: Standard_EXPORT Handle(Geom_OffsetCurve) OffsetCurve() const Standard_OVERRIDE; - - -protected: - - - - - private: - - gp_Trsf myTrsf; GeomAdaptor_Curve myCurve; - Handle(Adaptor3d_HCurveOnSurface) myConSurf; + Handle(Adaptor3d_CurveOnSurface) myConSurf; TopoDS_Edge myEdge; - }; - - - - - - #endif // _BRepAdaptor_Curve_HeaderFile diff --git a/src/BRepAdaptor/BRepAdaptor_Curve2d.cxx b/src/BRepAdaptor/BRepAdaptor_Curve2d.cxx index 2d121bed41..140f4dd97b 100644 --- a/src/BRepAdaptor/BRepAdaptor_Curve2d.cxx +++ b/src/BRepAdaptor/BRepAdaptor_Curve2d.cxx @@ -21,6 +21,8 @@ #include #include +IMPLEMENT_STANDARD_RTTIEXT(BRepAdaptor_Curve2d, Geom2dAdaptor_Curve) + //======================================================================= //function : BRepAdaptor_Curve2d //purpose : diff --git a/src/BRepAdaptor/BRepAdaptor_Curve2d.hxx b/src/BRepAdaptor/BRepAdaptor_Curve2d.hxx index cf220cc57f..f19157649d 100644 --- a/src/BRepAdaptor/BRepAdaptor_Curve2d.hxx +++ b/src/BRepAdaptor/BRepAdaptor_Curve2d.hxx @@ -41,10 +41,8 @@ class TopoDS_Face; //! Geom2dAdaptor. class BRepAdaptor_Curve2d : public Geom2dAdaptor_Curve { + DEFINE_STANDARD_RTTIEXT(BRepAdaptor_Curve2d, Geom2dAdaptor_Curve) public: - - DEFINE_STANDARD_ALLOC - //! Creates an uninitialized curve2d. Standard_EXPORT BRepAdaptor_Curve2d(); @@ -61,29 +59,13 @@ public: //! Returns the Face. Standard_EXPORT const TopoDS_Face& Face() const; - - - -protected: - - - - - private: - - TopoDS_Edge myEdge; TopoDS_Face myFace; - }; - - - - - +DEFINE_STANDARD_HANDLE(BRepAdaptor_Curve2d, Geom2dAdaptor_Curve) #endif // _BRepAdaptor_Curve2d_HeaderFile diff --git a/src/BRepAdaptor/BRepAdaptor_HCompCurve.hxx b/src/BRepAdaptor/BRepAdaptor_HCompCurve.hxx deleted file mode 100644 index f0b085758b..0000000000 --- a/src/BRepAdaptor/BRepAdaptor_HCompCurve.hxx +++ /dev/null @@ -1,97 +0,0 @@ -// Created on: 1993-02-19 -// Created by: Remi LEQUETTE -// Copyright (c) 1993-1999 Matra Datavision -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - -#ifndef _BRepAdaptor_HCompCurve_HeaderFile -#define _BRepAdaptor_HCompCurve_HeaderFile - -#include -#include - -#include -#include -class Standard_OutOfRange; -class Standard_NoSuchObject; -class Standard_DomainError; -class BRepAdaptor_CompCurve; -class Adaptor3d_Curve; - - -class BRepAdaptor_HCompCurve; -DEFINE_STANDARD_HANDLE(BRepAdaptor_HCompCurve, Adaptor3d_HCurve) - - -class BRepAdaptor_HCompCurve : public Adaptor3d_HCurve -{ - -public: - - - //! Creates an empty GenHCurve. - Standard_EXPORT BRepAdaptor_HCompCurve(); - - //! Creates a GenHCurve from a Curve - Standard_EXPORT BRepAdaptor_HCompCurve(const BRepAdaptor_CompCurve& C); - - //! Sets the field of the GenHCurve. - Standard_EXPORT void Set (const BRepAdaptor_CompCurve& C); - - //! Returns the curve used to create the GenHCurve. - //! This is redefined from HCurve, cannot be inline. - Standard_EXPORT const Adaptor3d_Curve& Curve() const Standard_OVERRIDE; - - //! Returns the curve used to create the GenHCurve. - //! This is redefined from HCurve, cannot be inline. - Standard_EXPORT Adaptor3d_Curve& GetCurve() Standard_OVERRIDE; - - //! Returns the curve used to create the GenHCurve. - BRepAdaptor_CompCurve& ChangeCurve(); - - - - - DEFINE_STANDARD_RTTI_INLINE(BRepAdaptor_HCompCurve,Adaptor3d_HCurve) - -protected: - - - BRepAdaptor_CompCurve myCurve; - - -private: - - - - -}; - -#define TheCurve BRepAdaptor_CompCurve -#define TheCurve_hxx -#define Adaptor3d_GenHCurve BRepAdaptor_HCompCurve -#define Adaptor3d_GenHCurve_hxx -#define Handle_Adaptor3d_GenHCurve Handle(BRepAdaptor_HCompCurve) - -#include - -#undef TheCurve -#undef TheCurve_hxx -#undef Adaptor3d_GenHCurve -#undef Adaptor3d_GenHCurve_hxx -#undef Handle_Adaptor3d_GenHCurve - - - - -#endif // _BRepAdaptor_HCompCurve_HeaderFile diff --git a/src/BRepAdaptor/BRepAdaptor_HCompCurve_0.cxx b/src/BRepAdaptor/BRepAdaptor_HCompCurve_0.cxx deleted file mode 100644 index 04211ebbbb..0000000000 --- a/src/BRepAdaptor/BRepAdaptor_HCompCurve_0.cxx +++ /dev/null @@ -1,42 +0,0 @@ -// Created on: 1993-02-19 -// Created by: Remi LEQUETTE -// Copyright (c) 1993-1999 Matra Datavision -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - -#include - -#include - -#include -#include -#include -#include -#include - - - - - - - - - - -#define TheCurve BRepAdaptor_CompCurve -#define TheCurve_hxx -#define Adaptor3d_GenHCurve BRepAdaptor_HCompCurve -#define Adaptor3d_GenHCurve_hxx -#define Handle_Adaptor3d_GenHCurve Handle(BRepAdaptor_HCompCurve) -#include - diff --git a/src/BRepAdaptor/BRepAdaptor_HCurve.hxx b/src/BRepAdaptor/BRepAdaptor_HCurve.hxx deleted file mode 100644 index 0e048d93df..0000000000 --- a/src/BRepAdaptor/BRepAdaptor_HCurve.hxx +++ /dev/null @@ -1,97 +0,0 @@ -// Created on: 1993-02-19 -// Created by: Remi LEQUETTE -// Copyright (c) 1993-1999 Matra Datavision -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - -#ifndef _BRepAdaptor_HCurve_HeaderFile -#define _BRepAdaptor_HCurve_HeaderFile - -#include -#include - -#include -#include -class Standard_OutOfRange; -class Standard_NoSuchObject; -class Standard_DomainError; -class BRepAdaptor_Curve; -class Adaptor3d_Curve; - - -class BRepAdaptor_HCurve; -DEFINE_STANDARD_HANDLE(BRepAdaptor_HCurve, Adaptor3d_HCurve) - - -class BRepAdaptor_HCurve : public Adaptor3d_HCurve -{ - -public: - - - //! Creates an empty GenHCurve. - Standard_EXPORT BRepAdaptor_HCurve(); - - //! Creates a GenHCurve from a Curve - Standard_EXPORT BRepAdaptor_HCurve(const BRepAdaptor_Curve& C); - - //! Sets the field of the GenHCurve. - Standard_EXPORT void Set (const BRepAdaptor_Curve& C); - - //! Returns the curve used to create the GenHCurve. - //! This is redefined from HCurve, cannot be inline. - Standard_EXPORT const Adaptor3d_Curve& Curve() const Standard_OVERRIDE; - - //! Returns the curve used to create the GenHCurve. - //! This is redefined from HCurve, cannot be inline. - Standard_EXPORT Adaptor3d_Curve& GetCurve() Standard_OVERRIDE; - - //! Returns the curve used to create the GenHCurve. - BRepAdaptor_Curve& ChangeCurve(); - - - - - DEFINE_STANDARD_RTTI_INLINE(BRepAdaptor_HCurve,Adaptor3d_HCurve) - -protected: - - - BRepAdaptor_Curve myCurve; - - -private: - - - - -}; - -#define TheCurve BRepAdaptor_Curve -#define TheCurve_hxx -#define Adaptor3d_GenHCurve BRepAdaptor_HCurve -#define Adaptor3d_GenHCurve_hxx -#define Handle_Adaptor3d_GenHCurve Handle(BRepAdaptor_HCurve) - -#include - -#undef TheCurve -#undef TheCurve_hxx -#undef Adaptor3d_GenHCurve -#undef Adaptor3d_GenHCurve_hxx -#undef Handle_Adaptor3d_GenHCurve - - - - -#endif // _BRepAdaptor_HCurve_HeaderFile diff --git a/src/BRepAdaptor/BRepAdaptor_HCurve2d.hxx b/src/BRepAdaptor/BRepAdaptor_HCurve2d.hxx deleted file mode 100644 index 9549145068..0000000000 --- a/src/BRepAdaptor/BRepAdaptor_HCurve2d.hxx +++ /dev/null @@ -1,93 +0,0 @@ -// Created on: 1993-02-19 -// Created by: Remi LEQUETTE -// Copyright (c) 1993-1999 Matra Datavision -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - -#ifndef _BRepAdaptor_HCurve2d_HeaderFile -#define _BRepAdaptor_HCurve2d_HeaderFile - -#include -#include - -#include -#include -class Standard_OutOfRange; -class Standard_NoSuchObject; -class Standard_DomainError; -class BRepAdaptor_Curve2d; -class Adaptor2d_Curve2d; - - -class BRepAdaptor_HCurve2d; -DEFINE_STANDARD_HANDLE(BRepAdaptor_HCurve2d, Adaptor2d_HCurve2d) - - -class BRepAdaptor_HCurve2d : public Adaptor2d_HCurve2d -{ - -public: - - - //! Creates an empty GenHCurve2d. - Standard_EXPORT BRepAdaptor_HCurve2d(); - - //! Creates a GenHCurve2d from a Curve - Standard_EXPORT BRepAdaptor_HCurve2d(const BRepAdaptor_Curve2d& C); - - //! Sets the field of the GenHCurve2d. - Standard_EXPORT void Set (const BRepAdaptor_Curve2d& C); - - //! Returns the curve used to create the GenHCurve2d. - //! This is redefined from HCurve2d, cannot be inline. - Standard_EXPORT const Adaptor2d_Curve2d& Curve2d() const Standard_OVERRIDE; - - //! Returns the curve used to create the GenHCurve. - BRepAdaptor_Curve2d& ChangeCurve2d(); - - - - - DEFINE_STANDARD_RTTI_INLINE(BRepAdaptor_HCurve2d,Adaptor2d_HCurve2d) - -protected: - - - BRepAdaptor_Curve2d myCurve; - - -private: - - - - -}; - -#define TheCurve BRepAdaptor_Curve2d -#define TheCurve_hxx -#define Adaptor2d_GenHCurve2d BRepAdaptor_HCurve2d -#define Adaptor2d_GenHCurve2d_hxx -#define Handle_Adaptor2d_GenHCurve2d Handle(BRepAdaptor_HCurve2d) - -#include - -#undef TheCurve -#undef TheCurve_hxx -#undef Adaptor2d_GenHCurve2d -#undef Adaptor2d_GenHCurve2d_hxx -#undef Handle_Adaptor2d_GenHCurve2d - - - - -#endif // _BRepAdaptor_HCurve2d_HeaderFile diff --git a/src/BRepAdaptor/BRepAdaptor_HCurve2d_0.cxx b/src/BRepAdaptor/BRepAdaptor_HCurve2d_0.cxx deleted file mode 100644 index 008350d6b7..0000000000 --- a/src/BRepAdaptor/BRepAdaptor_HCurve2d_0.cxx +++ /dev/null @@ -1,42 +0,0 @@ -// Created on: 1993-02-19 -// Created by: Remi LEQUETTE -// Copyright (c) 1993-1999 Matra Datavision -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - -#include - -#include - -#include -#include -#include -#include -#include - - - - - - - - - - -#define TheCurve BRepAdaptor_Curve2d -#define TheCurve_hxx -#define Adaptor2d_GenHCurve2d BRepAdaptor_HCurve2d -#define Adaptor2d_GenHCurve2d_hxx -#define Handle_Adaptor2d_GenHCurve2d Handle(BRepAdaptor_HCurve2d) -#include - diff --git a/src/BRepAdaptor/BRepAdaptor_HCurve_0.cxx b/src/BRepAdaptor/BRepAdaptor_HCurve_0.cxx deleted file mode 100644 index c36285740b..0000000000 --- a/src/BRepAdaptor/BRepAdaptor_HCurve_0.cxx +++ /dev/null @@ -1,42 +0,0 @@ -// Created on: 1993-02-19 -// Created by: Remi LEQUETTE -// Copyright (c) 1993-1999 Matra Datavision -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - -#include - -#include - -#include -#include -#include -#include -#include - - - - - - - - - - -#define TheCurve BRepAdaptor_Curve -#define TheCurve_hxx -#define Adaptor3d_GenHCurve BRepAdaptor_HCurve -#define Adaptor3d_GenHCurve_hxx -#define Handle_Adaptor3d_GenHCurve Handle(BRepAdaptor_HCurve) -#include - diff --git a/src/BRepAdaptor/BRepAdaptor_HSurface.hxx b/src/BRepAdaptor/BRepAdaptor_HSurface.hxx deleted file mode 100644 index cc544cf03f..0000000000 --- a/src/BRepAdaptor/BRepAdaptor_HSurface.hxx +++ /dev/null @@ -1,93 +0,0 @@ -// Created on: 1993-02-19 -// Created by: Remi LEQUETTE -// Copyright (c) 1993-1999 Matra Datavision -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - -#ifndef _BRepAdaptor_HSurface_HeaderFile -#define _BRepAdaptor_HSurface_HeaderFile - -#include -#include - -#include -#include -class Standard_OutOfRange; -class Standard_NoSuchObject; -class Standard_DomainError; -class BRepAdaptor_Surface; -class Adaptor3d_Surface; - - -class BRepAdaptor_HSurface; -DEFINE_STANDARD_HANDLE(BRepAdaptor_HSurface, Adaptor3d_HSurface) - - -class BRepAdaptor_HSurface : public Adaptor3d_HSurface -{ - -public: - - - //! Creates an empty GenHSurface. - Standard_EXPORT BRepAdaptor_HSurface(); - - //! Creates a GenHSurface from a Surface. - Standard_EXPORT BRepAdaptor_HSurface(const BRepAdaptor_Surface& S); - - //! Sets the field of the GenHSurface. - Standard_EXPORT void Set (const BRepAdaptor_Surface& S); - - //! Returns a reference to the Surface inside the HSurface. - //! This is redefined from HSurface, cannot be inline. - Standard_EXPORT const Adaptor3d_Surface& Surface() const Standard_OVERRIDE; - - //! Returns the surface used to create the GenHSurface. - BRepAdaptor_Surface& ChangeSurface(); - - - - - DEFINE_STANDARD_RTTI_INLINE(BRepAdaptor_HSurface,Adaptor3d_HSurface) - -protected: - - - BRepAdaptor_Surface mySurf; - - -private: - - - - -}; - -#define TheSurface BRepAdaptor_Surface -#define TheSurface_hxx -#define Adaptor3d_GenHSurface BRepAdaptor_HSurface -#define Adaptor3d_GenHSurface_hxx -#define Handle_Adaptor3d_GenHSurface Handle(BRepAdaptor_HSurface) - -#include - -#undef TheSurface -#undef TheSurface_hxx -#undef Adaptor3d_GenHSurface -#undef Adaptor3d_GenHSurface_hxx -#undef Handle_Adaptor3d_GenHSurface - - - - -#endif // _BRepAdaptor_HSurface_HeaderFile diff --git a/src/BRepAdaptor/BRepAdaptor_HSurface_0.cxx b/src/BRepAdaptor/BRepAdaptor_HSurface_0.cxx deleted file mode 100644 index a29b8b11f5..0000000000 --- a/src/BRepAdaptor/BRepAdaptor_HSurface_0.cxx +++ /dev/null @@ -1,42 +0,0 @@ -// Created on: 1993-02-19 -// Created by: Remi LEQUETTE -// Copyright (c) 1993-1999 Matra Datavision -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - -#include - -#include - -#include -#include -#include -#include -#include - - - - - - - - - - -#define TheSurface BRepAdaptor_Surface -#define TheSurface_hxx -#define Adaptor3d_GenHSurface BRepAdaptor_HSurface -#define Adaptor3d_GenHSurface_hxx -#define Handle_Adaptor3d_GenHSurface Handle(BRepAdaptor_HSurface) -#include - diff --git a/src/BRepAdaptor/BRepAdaptor_Surface.cxx b/src/BRepAdaptor/BRepAdaptor_Surface.cxx index 850facead9..1eda58f4fe 100644 --- a/src/BRepAdaptor/BRepAdaptor_Surface.cxx +++ b/src/BRepAdaptor/BRepAdaptor_Surface.cxx @@ -14,17 +14,16 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. - -#include -#include -#include #include + +#include +#include +#include #include #include #include #include -#include -#include +#include #include #include #include @@ -41,6 +40,8 @@ #include #include +IMPLEMENT_STANDARD_RTTIEXT(BRepAdaptor_Surface, Adaptor3d_Surface) + //======================================================================= //function : BRepAdaptor_Surface //purpose : @@ -170,14 +171,13 @@ void BRepAdaptor_Surface::VIntervals(TColStd_Array1OfReal& T, //purpose : //======================================================================= -Handle(Adaptor3d_HSurface) BRepAdaptor_Surface::UTrim +Handle(Adaptor3d_Surface) BRepAdaptor_Surface::UTrim (const Standard_Real First, const Standard_Real Last , const Standard_Real Tol ) const { - Handle(GeomAdaptor_HSurface) HS = new GeomAdaptor_HSurface(); - HS->ChangeSurface().Load - (Handle(Geom_Surface)::DownCast(mySurf.Surface()->Transformed(myTrsf))); + Handle(GeomAdaptor_Surface) HS = new GeomAdaptor_Surface(); + HS->Load (Handle(Geom_Surface)::DownCast(mySurf.Surface()->Transformed(myTrsf))); return HS->UTrim(First,Last,Tol); } @@ -187,14 +187,13 @@ Handle(Adaptor3d_HSurface) BRepAdaptor_Surface::UTrim //purpose : //======================================================================= -Handle(Adaptor3d_HSurface) BRepAdaptor_Surface::VTrim +Handle(Adaptor3d_Surface) BRepAdaptor_Surface::VTrim (const Standard_Real First, const Standard_Real Last, const Standard_Real Tol) const { - Handle(GeomAdaptor_HSurface) HS = new GeomAdaptor_HSurface(); - HS->ChangeSurface().Load - (Handle(Geom_Surface)::DownCast(mySurf.Surface()->Transformed(myTrsf))); + Handle(GeomAdaptor_Surface) HS = new GeomAdaptor_Surface(); + HS->Load (Handle(Geom_Surface)::DownCast(mySurf.Surface()->Transformed(myTrsf))); return HS->VTrim(First,Last,Tol); } @@ -408,11 +407,10 @@ gp_Dir BRepAdaptor_Surface::Direction() const //purpose : //======================================================================= -Handle(Adaptor3d_HCurve) BRepAdaptor_Surface::BasisCurve() const +Handle(Adaptor3d_Curve) BRepAdaptor_Surface::BasisCurve() const { - Handle(GeomAdaptor_HSurface) HS = new GeomAdaptor_HSurface(); - HS->ChangeSurface().Load - (Handle(Geom_Surface)::DownCast(mySurf.Surface()->Transformed(myTrsf))); + Handle(GeomAdaptor_Surface) HS = new GeomAdaptor_Surface(); + HS->Load (Handle(Geom_Surface)::DownCast(mySurf.Surface()->Transformed(myTrsf))); return HS->BasisCurve(); } @@ -423,11 +421,10 @@ Handle(Adaptor3d_HCurve) BRepAdaptor_Surface::BasisCurve() const //purpose : //======================================================================= -Handle(Adaptor3d_HSurface) BRepAdaptor_Surface::BasisSurface() const +Handle(Adaptor3d_Surface) BRepAdaptor_Surface::BasisSurface() const { - Handle(GeomAdaptor_HSurface) HS = new GeomAdaptor_HSurface(); - HS->ChangeSurface().Load - (Handle(Geom_Surface)::DownCast(mySurf.Surface()->Transformed(myTrsf))); + Handle(GeomAdaptor_Surface) HS = new GeomAdaptor_Surface(); + HS->Load (Handle(Geom_Surface)::DownCast(mySurf.Surface()->Transformed(myTrsf))); return HS->BasisSurface(); } diff --git a/src/BRepAdaptor/BRepAdaptor_Surface.hxx b/src/BRepAdaptor/BRepAdaptor_Surface.hxx index 70858bf8fa..ffd8648d35 100644 --- a/src/BRepAdaptor/BRepAdaptor_Surface.hxx +++ b/src/BRepAdaptor/BRepAdaptor_Surface.hxx @@ -17,27 +17,18 @@ #ifndef _BRepAdaptor_Surface_HeaderFile #define _BRepAdaptor_Surface_HeaderFile -#include -#include -#include - -#include -#include -#include #include -#include -#include +#include #include -#include -#include #include +#include +#include +#include + class Standard_OutOfRange; class Standard_DomainError; class Standard_NoSuchObject; -class TopoDS_Face; -class GeomAdaptor_Surface; class gp_Trsf; -class Adaptor3d_HSurface; class gp_Pnt; class gp_Vec; class gp_Pln; @@ -49,8 +40,8 @@ class Geom_BezierSurface; class Geom_BSplineSurface; class gp_Ax1; class gp_Dir; -class Adaptor3d_HCurve; +DEFINE_STANDARD_HANDLE(BRepAdaptor_Surface, Adaptor3d_Surface) //! The Surface from BRepAdaptor allows to use a Face //! of the BRep topology look like a 3D surface. @@ -66,11 +57,9 @@ class Adaptor3d_HCurve; //! set to false. class BRepAdaptor_Surface : public Adaptor3d_Surface { + DEFINE_STANDARD_RTTIEXT(BRepAdaptor_Surface, Adaptor3d_Surface) public: - DEFINE_STANDARD_ALLOC - - //! Creates an undefined surface with no face loaded. Standard_EXPORT BRepAdaptor_Surface(); @@ -97,28 +86,28 @@ public: //! Returns the face tolerance. Standard_EXPORT Standard_Real Tolerance() const; - - Standard_Real FirstUParameter() const Standard_OVERRIDE; - - Standard_Real LastUParameter() const Standard_OVERRIDE; - - Standard_Real FirstVParameter() const Standard_OVERRIDE; - - Standard_Real LastVParameter() const Standard_OVERRIDE; - - GeomAbs_Shape UContinuity() const Standard_OVERRIDE; - - GeomAbs_Shape VContinuity() const Standard_OVERRIDE; + + virtual Standard_Real FirstUParameter() const Standard_OVERRIDE { return mySurf.FirstUParameter(); } + + virtual Standard_Real LastUParameter() const Standard_OVERRIDE { return mySurf.LastUParameter(); } + + virtual Standard_Real FirstVParameter() const Standard_OVERRIDE { return mySurf.FirstVParameter(); } + + virtual Standard_Real LastVParameter() const Standard_OVERRIDE { return mySurf.LastVParameter(); } + + virtual GeomAbs_Shape UContinuity() const Standard_OVERRIDE { return mySurf.UContinuity(); } + + virtual GeomAbs_Shape VContinuity() const Standard_OVERRIDE { return mySurf.VContinuity(); } //! If necessary, breaks the surface in U intervals of //! continuity . And returns the number of //! intervals. - Standard_Integer NbUIntervals (const GeomAbs_Shape S) const Standard_OVERRIDE; - + virtual Standard_Integer NbUIntervals (const GeomAbs_Shape theSh) const Standard_OVERRIDE { return mySurf.NbUIntervals (theSh); } + //! If necessary, breaks the surface in V intervals of //! continuity . And returns the number of //! intervals. - Standard_Integer NbVIntervals (const GeomAbs_Shape S) const Standard_OVERRIDE; + virtual Standard_Integer NbVIntervals (const GeomAbs_Shape theSh) const Standard_OVERRIDE { return mySurf.NbVIntervals (theSh); } //! Returns the intervals with the requested continuity //! in the U direction. @@ -133,26 +122,26 @@ public: //! parameters and . is used to //! test for 3d points confusion. //! If >= - Standard_EXPORT Handle(Adaptor3d_HSurface) UTrim (const Standard_Real First, const Standard_Real Last, const Standard_Real Tol) const Standard_OVERRIDE; + Standard_EXPORT Handle(Adaptor3d_Surface) UTrim (const Standard_Real First, const Standard_Real Last, const Standard_Real Tol) const Standard_OVERRIDE; //! Returns a surface trimmed in the V direction between //! parameters and . is used to //! test for 3d points confusion. //! If >= - Standard_EXPORT Handle(Adaptor3d_HSurface) VTrim (const Standard_Real First, const Standard_Real Last, const Standard_Real Tol) const Standard_OVERRIDE; - - Standard_Boolean IsUClosed() const Standard_OVERRIDE; - - Standard_Boolean IsVClosed() const Standard_OVERRIDE; - - Standard_Boolean IsUPeriodic() const Standard_OVERRIDE; - - Standard_Real UPeriod() const Standard_OVERRIDE; - - Standard_Boolean IsVPeriodic() const Standard_OVERRIDE; - - Standard_Real VPeriod() const Standard_OVERRIDE; - + Standard_EXPORT Handle(Adaptor3d_Surface) VTrim (const Standard_Real First, const Standard_Real Last, const Standard_Real Tol) const Standard_OVERRIDE; + + virtual Standard_Boolean IsUClosed() const Standard_OVERRIDE { return mySurf.IsUClosed(); } + + virtual Standard_Boolean IsVClosed() const Standard_OVERRIDE { return mySurf.IsVClosed(); } + + virtual Standard_Boolean IsUPeriodic() const Standard_OVERRIDE { return mySurf.IsUPeriodic(); } + + virtual Standard_Real UPeriod() const Standard_OVERRIDE { return mySurf.UPeriod(); } + + virtual Standard_Boolean IsVPeriodic() const Standard_OVERRIDE { return mySurf.IsVPeriodic(); } + + virtual Standard_Real VPeriod() const Standard_OVERRIDE { return mySurf.VPeriod(); } + //! Computes the point of parameters U,V on the surface. Standard_EXPORT gp_Pnt Value (const Standard_Real U, const Standard_Real V) const Standard_OVERRIDE; @@ -186,17 +175,17 @@ public: //! Returns the parametric U resolution corresponding //! to the real space resolution . - Standard_Real UResolution (const Standard_Real R3d) const Standard_OVERRIDE; + virtual Standard_Real UResolution (const Standard_Real theR3d) const Standard_OVERRIDE { return mySurf.UResolution (theR3d); } //! Returns the parametric V resolution corresponding //! to the real space resolution . - Standard_Real VResolution (const Standard_Real R3d) const Standard_OVERRIDE; - + virtual Standard_Real VResolution (const Standard_Real theR3d) const Standard_OVERRIDE { return mySurf.VResolution (theR3d); } + //! Returns the type of the surface : Plane, Cylinder, //! Cone, Sphere, Torus, BezierSurface, //! BSplineSurface, SurfaceOfRevolution, //! SurfaceOfExtrusion, OtherSurface - GeomAbs_SurfaceType GetType() const Standard_OVERRIDE; + virtual GeomAbs_SurfaceType GetType() const Standard_OVERRIDE { return mySurf.GetType(); } Standard_EXPORT gp_Pln Plane() const Standard_OVERRIDE; @@ -208,29 +197,28 @@ public: Standard_EXPORT gp_Torus Torus() const Standard_OVERRIDE; - Standard_Integer UDegree() const Standard_OVERRIDE; - - Standard_Integer NbUPoles() const Standard_OVERRIDE; - - Standard_Integer VDegree() const Standard_OVERRIDE; - - Standard_Integer NbVPoles() const Standard_OVERRIDE; - - Standard_Integer NbUKnots() const Standard_OVERRIDE; - - Standard_Integer NbVKnots() const Standard_OVERRIDE; - - Standard_Boolean IsURational() const Standard_OVERRIDE; - - Standard_Boolean IsVRational() const Standard_OVERRIDE; - + virtual Standard_Integer UDegree() const Standard_OVERRIDE { return mySurf.UDegree(); } + + virtual Standard_Integer NbUPoles() const Standard_OVERRIDE { return mySurf.NbUPoles(); } + + virtual Standard_Integer VDegree() const Standard_OVERRIDE { return mySurf.VDegree(); } + + virtual Standard_Integer NbVPoles() const Standard_OVERRIDE { return mySurf.NbVPoles(); } + + virtual Standard_Integer NbUKnots() const Standard_OVERRIDE { return mySurf.NbUKnots(); } + + virtual Standard_Integer NbVKnots() const Standard_OVERRIDE { return mySurf.NbVKnots(); } + + virtual Standard_Boolean IsURational() const Standard_OVERRIDE { return mySurf.IsURational(); } + + virtual Standard_Boolean IsVRational() const Standard_OVERRIDE { return mySurf.IsVRational(); } + Standard_EXPORT Handle(Geom_BezierSurface) Bezier() const Standard_OVERRIDE; - //! Warning : this will make a copy of the //! BSpline Surface since it applies //! to it the myTsrf transformation - //! Be Carefull when using this method + //! Be Careful when using this method Standard_EXPORT Handle(Geom_BSplineSurface) BSpline() const Standard_OVERRIDE; Standard_EXPORT gp_Ax1 AxeOfRevolution() const Standard_OVERRIDE; @@ -240,38 +228,19 @@ public: //! only for SurfaceOfExtrusion and SurfaceOfRevolution //! Warning: this will make a copy of the underlying curve //! since it applies to it the transformation - //! myTrsf. Be carefull when using this method. - Standard_EXPORT Handle(Adaptor3d_HCurve) BasisCurve() const Standard_OVERRIDE; + //! myTrsf. Be careful when using this method. + Standard_EXPORT Handle(Adaptor3d_Curve) BasisCurve() const Standard_OVERRIDE; - Standard_EXPORT Handle(Adaptor3d_HSurface) BasisSurface() const Standard_OVERRIDE; + Standard_EXPORT Handle(Adaptor3d_Surface) BasisSurface() const Standard_OVERRIDE; Standard_EXPORT Standard_Real OffsetValue() const Standard_OVERRIDE; - - - -protected: - - - - - private: - - GeomAdaptor_Surface mySurf; gp_Trsf myTrsf; TopoDS_Face myFace; - }; - -#include - - - - - #endif // _BRepAdaptor_Surface_HeaderFile diff --git a/src/BRepAdaptor/BRepAdaptor_Surface.lxx b/src/BRepAdaptor/BRepAdaptor_Surface.lxx deleted file mode 100644 index ebb6bcda74..0000000000 --- a/src/BRepAdaptor/BRepAdaptor_Surface.lxx +++ /dev/null @@ -1,272 +0,0 @@ -// Created on: 1993-02-19 -// Created by: Remi LEQUETTE -// Copyright (c) 1993-1999 Matra Datavision -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - -//======================================================================= -//function : FirstUParameter -//purpose : -//======================================================================= - -inline Standard_Real BRepAdaptor_Surface::FirstUParameter() const -{ - return mySurf.FirstUParameter(); -} - -//======================================================================= -//function : LastUParameter -//purpose : -//======================================================================= - -inline Standard_Real BRepAdaptor_Surface::LastUParameter() const -{ - return mySurf.LastUParameter(); -} - -//======================================================================= -//function : FirstVParameter -//purpose : -//======================================================================= - -inline Standard_Real BRepAdaptor_Surface::FirstVParameter() const -{ - return mySurf.FirstVParameter(); -} - -//======================================================================= -//function : LastVParameter -//purpose : -//======================================================================= - -inline Standard_Real BRepAdaptor_Surface::LastVParameter() const -{ - return mySurf.LastVParameter(); -} - -//======================================================================= -//function : UContinuity -//purpose : -//======================================================================= - -inline GeomAbs_Shape BRepAdaptor_Surface::UContinuity() const -{ - return mySurf.UContinuity(); -} - -//======================================================================= -//function : VContinuity -//purpose : -//======================================================================= - -inline GeomAbs_Shape BRepAdaptor_Surface::VContinuity() const -{ - return mySurf.VContinuity(); -} - -//======================================================================= -//function : NbUIntervals -//purpose : -//======================================================================= - -inline Standard_Integer BRepAdaptor_Surface::NbUIntervals - (const GeomAbs_Shape S) const -{ - return mySurf.NbUIntervals(S); -} - -//======================================================================= -//function : NbVIntervals -//purpose : -//======================================================================= - -inline Standard_Integer BRepAdaptor_Surface::NbVIntervals - (const GeomAbs_Shape S) const -{ - return mySurf.NbVIntervals(S); -} - -//======================================================================= -//function : IsUClosed -//purpose : -//======================================================================= - -inline Standard_Boolean BRepAdaptor_Surface::IsUClosed()const -{ - return mySurf.IsUClosed(); -} - -//======================================================================= -//function : IsVClosed -//purpose : -//======================================================================= - -inline Standard_Boolean BRepAdaptor_Surface::IsVClosed()const -{ - return mySurf.IsVClosed(); -} - -//======================================================================= -//function : IsUPeriodic -//purpose : -//======================================================================= - -inline Standard_Boolean BRepAdaptor_Surface::IsUPeriodic()const -{ - return mySurf.IsUPeriodic(); -} - -//======================================================================= -//function : UPeriod -//purpose : -//======================================================================= - -inline Standard_Real BRepAdaptor_Surface::UPeriod()const -{ - return mySurf.UPeriod(); -} - -//======================================================================= -//function : IsVPeriodic -//purpose : -//======================================================================= - -inline Standard_Boolean BRepAdaptor_Surface::IsVPeriodic()const -{ - return mySurf.IsVPeriodic(); -} - -//======================================================================= -//function : VPeriod -//purpose : -//======================================================================= - -inline Standard_Real BRepAdaptor_Surface::VPeriod()const -{ - return mySurf.VPeriod(); -} - -//======================================================================= -//function : UResolution -//purpose : -//======================================================================= - -inline Standard_Real BRepAdaptor_Surface::UResolution(const Standard_Real R3d)const -{ - return mySurf.UResolution(R3d); -} - -//======================================================================= -//function : VResolution -//purpose : -//======================================================================= - -inline Standard_Real BRepAdaptor_Surface::VResolution(const Standard_Real R3d)const -{ - return mySurf.VResolution(R3d); -} - -//======================================================================= -//function : GetType -//purpose : -//======================================================================= - -inline GeomAbs_SurfaceType BRepAdaptor_Surface::GetType()const -{ - return mySurf.GetType(); -} -//======================================================================= -//function : UDegree -//purpose : -//======================================================================= - -inline Standard_Integer BRepAdaptor_Surface::UDegree()const -{ - return mySurf.UDegree(); -} - - -//======================================================================= -//function : NbUPoles -//purpose : -//======================================================================= - -inline Standard_Integer BRepAdaptor_Surface::NbUPoles()const -{ - return mySurf.NbUPoles(); -} - -//======================================================================= -//function : VDegree -//purpose : -//======================================================================= - -inline Standard_Integer BRepAdaptor_Surface::VDegree()const -{ - return mySurf.VDegree(); -} - - -//======================================================================= -//function : NbVPoles -//purpose : -//======================================================================= - -inline Standard_Integer BRepAdaptor_Surface::NbVPoles()const -{ - return mySurf.NbVPoles(); -} - -//======================================================================= -//function : NbUKnots -//purpose : -//======================================================================= - -inline Standard_Integer BRepAdaptor_Surface::NbUKnots()const -{ - return mySurf.NbUKnots(); -} - - - -//======================================================================= -//function : NbVKnots -//purpose : -//======================================================================= - -inline Standard_Integer BRepAdaptor_Surface::NbVKnots()const -{ - return mySurf.NbVKnots(); -} - - -//======================================================================= -//function : IsURational -//purpose : -//======================================================================= - -inline Standard_Boolean BRepAdaptor_Surface::IsURational()const -{ - return mySurf.IsURational(); -} - -//======================================================================= -//function : IsVRational -//purpose : -//======================================================================= - -inline Standard_Boolean BRepAdaptor_Surface::IsVRational()const -{ - return mySurf.IsVRational(); -} - diff --git a/src/BRepAdaptor/FILES b/src/BRepAdaptor/FILES index 9e2f30a9d6..2b2dd8dafb 100644 --- a/src/BRepAdaptor/FILES +++ b/src/BRepAdaptor/FILES @@ -6,14 +6,5 @@ BRepAdaptor_Curve.hxx BRepAdaptor_Curve2d.cxx BRepAdaptor_Curve2d.hxx BRepAdaptor_HArray1OfCurve.hxx -BRepAdaptor_HCompCurve.hxx -BRepAdaptor_HCompCurve_0.cxx -BRepAdaptor_HCurve.hxx -BRepAdaptor_HCurve2d.hxx -BRepAdaptor_HCurve2d_0.cxx -BRepAdaptor_HCurve_0.cxx -BRepAdaptor_HSurface.hxx -BRepAdaptor_HSurface_0.cxx BRepAdaptor_Surface.cxx BRepAdaptor_Surface.hxx -BRepAdaptor_Surface.lxx diff --git a/src/BRepAlgo/BRepAlgo_NormalProjection.cxx b/src/BRepAlgo/BRepAlgo_NormalProjection.cxx index 2899cf674f..2a289ebab0 100644 --- a/src/BRepAlgo/BRepAlgo_NormalProjection.cxx +++ b/src/BRepAlgo/BRepAlgo_NormalProjection.cxx @@ -19,8 +19,6 @@ #include #include #include -#include -#include #include #include #include @@ -32,7 +30,7 @@ #include #include #include -#include +#include #include #include #include @@ -212,7 +210,7 @@ void BRepAlgo_NormalProjection::SetDefaultParams() InitChron(chr_total); #endif myIsDone = Standard_False; - ProjLib_CompProjectedCurve Projector; + Handle(TopTools_HSequenceOfShape) Edges = new TopTools_HSequenceOfShape(); Handle(TopTools_HSequenceOfShape) Faces = new TopTools_HSequenceOfShape(); TopTools_ListOfShape DescenList; @@ -251,14 +249,10 @@ void BRepAlgo_NormalProjection::SetDefaultParams() for(i = 1; i <= NbEdges; i++){ DescenList.Clear(); - BRepAdaptor_Curve cur(TopoDS::Edge(Edges->Value(i))); - Handle(BRepAdaptor_HCurve) hcur = new BRepAdaptor_HCurve(); - hcur->Set(cur); - Elementary = IsElementary(cur); + Handle(BRepAdaptor_Curve) hcur = new BRepAdaptor_Curve (TopoDS::Edge(Edges->Value(i))); + Elementary = IsElementary(*hcur); for(j = 1; j <= NbFaces; j++){ - BRepAdaptor_Surface sur(TopoDS::Face(Faces->Value(j))); - Handle(BRepAdaptor_HSurface) hsur = new BRepAdaptor_HSurface(); - hsur->Set(sur); + Handle(BRepAdaptor_Surface) hsur = new BRepAdaptor_Surface (TopoDS::Face(Faces->Value(j))); // computation of TolU and TolV @@ -270,32 +264,28 @@ void BRepAlgo_NormalProjection::SetDefaultParams() #ifdef OCCT_DEBUG_CHRONO InitChron(chr_init); #endif - Projector = - ProjLib_CompProjectedCurve(hsur, hcur, TolU, TolV, myMaxDist); + Handle(ProjLib_HCompProjectedCurve) HProjector = new ProjLib_HCompProjectedCurve (hsur, hcur, TolU, TolV, myMaxDist); #ifdef OCCT_DEBUG_CHRONO ResultChron(chr_init,t_init); init_count++; #endif // - Handle(ProjLib_HCompProjectedCurve) HProjector = - new ProjLib_HCompProjectedCurve(); - HProjector->Set(Projector); TopoDS_Shape prj; Standard_Boolean Degenerated = Standard_False; gp_Pnt2d P2d, Pdeb, Pfin; gp_Pnt P; Standard_Real UIso, VIso; - Handle(Adaptor2d_HCurve2d) HPCur; + Handle(Adaptor2d_Curve2d) HPCur; Handle(Geom2d_Curve) PCur2d; // Only for isoparametric projection - for(k = 1; k <= Projector.NbCurves(); k++){ - if(Projector.IsSinglePnt(k, P2d)){ + for(k = 1; k <= HProjector->NbCurves(); k++){ + if(HProjector->IsSinglePnt(k, P2d)){ #ifdef OCCT_DEBUG std::cout << "Projection of edge "<D0(P2d.X(), P2d.Y(), P); + HProjector->GetSurface()->D0(P2d.X(), P2d.Y(), P); prj = BRepLib_MakeVertex(P).Shape(); DescenList.Append(prj); BB.Add(VertexRes, prj); @@ -305,16 +295,16 @@ void BRepAlgo_NormalProjection::SetDefaultParams() } else { Only2d = Only3d = Standard_False; - Projector.Bounds(k, Udeb, Ufin); + HProjector->Bounds(k, Udeb, Ufin); /**************************************************************/ - if (Projector.IsUIso(k, UIso)) { + if (HProjector->IsUIso(k, UIso)) { #ifdef OCCT_DEBUG std::cout << "Projection of edge "<D0(Udeb, Pdeb); + HProjector->D0(Ufin, Pfin); Poles(1) = Pdeb; Poles(2) = Pfin; Knots(1) = Udeb; @@ -322,16 +312,16 @@ void BRepAlgo_NormalProjection::SetDefaultParams() Handle(Geom2d_BSplineCurve) BS2d = new Geom2d_BSplineCurve(Poles, Knots, Mults, Deg); PCur2d = new Geom2d_TrimmedCurve( BS2d, Udeb, Ufin); - HPCur = new Geom2dAdaptor_HCurve(PCur2d); + HPCur = new Geom2dAdaptor_Curve(PCur2d); Only3d = Standard_True; } - else if (Projector.IsVIso(k, VIso)) { + else if (HProjector->IsVIso(k, VIso)) { #ifdef OCCT_DEBUG std::cout << "Projection of edge "<D0(Udeb, Pdeb); + HProjector->D0(Ufin, Pfin); Poles(1) = Pdeb; Poles(2) = Pfin; Knots(1) = Udeb; @@ -339,13 +329,13 @@ void BRepAlgo_NormalProjection::SetDefaultParams() Handle(Geom2d_BSplineCurve) BS2d = new Geom2d_BSplineCurve(Poles, Knots, Mults, Deg); PCur2d = new Geom2d_TrimmedCurve(BS2d, Udeb, Ufin); - HPCur = new Geom2dAdaptor_HCurve(PCur2d); + HPCur = new Geom2dAdaptor_Curve(PCur2d); Only3d = Standard_True; } else HPCur = HProjector; if((myWith3d == Standard_False || Elementary) && - (Projector.MaxDistance(k) <= myTol3d) ) + (HProjector->MaxDistance(k) <= myTol3d) ) Only2d = Standard_True; if(Only2d && Only3d) { diff --git a/src/BRepApprox/BRepApprox_SurfaceTool.cxx b/src/BRepApprox/BRepApprox_SurfaceTool.cxx index b74bc6eaf0..4f28c123b4 100644 --- a/src/BRepApprox/BRepApprox_SurfaceTool.cxx +++ b/src/BRepApprox/BRepApprox_SurfaceTool.cxx @@ -14,11 +14,10 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. - -#include -#include -#include #include + +#include +#include #include #include #include diff --git a/src/BRepApprox/BRepApprox_SurfaceTool.hxx b/src/BRepApprox/BRepApprox_SurfaceTool.hxx index 0aa2504da2..b41da2a545 100644 --- a/src/BRepApprox/BRepApprox_SurfaceTool.hxx +++ b/src/BRepApprox/BRepApprox_SurfaceTool.hxx @@ -17,15 +17,9 @@ #ifndef _BRepApprox_SurfaceTool_HeaderFile #define _BRepApprox_SurfaceTool_HeaderFile -#include -#include -#include - -#include -#include +#include #include #include -#include #include #include #include @@ -36,17 +30,9 @@ #include #include #include -class Standard_NoSuchObject; -class Standard_OutOfRange; -class BRepAdaptor_Surface; -class Adaptor3d_HSurface; -class gp_Pnt; -class gp_Vec; + class Geom_BezierSurface; class Geom_BSplineSurface; -class Adaptor3d_HCurve; - - class BRepApprox_SurfaceTool { @@ -72,10 +58,10 @@ public: static void VIntervals (const BRepAdaptor_Surface& S, TColStd_Array1OfReal& T, const GeomAbs_Shape Sh); //! If >= - static Handle(Adaptor3d_HSurface) UTrim (const BRepAdaptor_Surface& S, const Standard_Real First, const Standard_Real Last, const Standard_Real Tol); + static Handle(Adaptor3d_Surface) UTrim (const BRepAdaptor_Surface& S, const Standard_Real First, const Standard_Real Last, const Standard_Real Tol); //! If >= - static Handle(Adaptor3d_HSurface) VTrim (const BRepAdaptor_Surface& S, const Standard_Real First, const Standard_Real Last, const Standard_Real Tol); + static Handle(Adaptor3d_Surface) VTrim (const BRepAdaptor_Surface& S, const Standard_Real First, const Standard_Real Last, const Standard_Real Tol); static Standard_Boolean IsUClosed (const BRepAdaptor_Surface& S); @@ -125,7 +111,7 @@ public: static gp_Dir Direction (const BRepAdaptor_Surface& S); - static Handle(Adaptor3d_HCurve) BasisCurve (const BRepAdaptor_Surface& S); + static Handle(Adaptor3d_Curve) BasisCurve (const BRepAdaptor_Surface& S); Standard_EXPORT static Standard_Integer NbSamplesU (const BRepAdaptor_Surface& S); diff --git a/src/BRepApprox/BRepApprox_SurfaceTool.lxx b/src/BRepApprox/BRepApprox_SurfaceTool.lxx index d48bf3ef7a..56daedd75e 100644 --- a/src/BRepApprox/BRepApprox_SurfaceTool.lxx +++ b/src/BRepApprox/BRepApprox_SurfaceTool.lxx @@ -25,8 +25,8 @@ #include #include #include -#include -#include +#include +#include inline Standard_Real BRepApprox_SurfaceTool::FirstUParameter(const BRepAdaptor_Surface& Surf){ return Surf.FirstUParameter(); } inline Standard_Real BRepApprox_SurfaceTool::FirstVParameter(const BRepAdaptor_Surface& Surf){ return Surf.FirstVParameter();} @@ -56,14 +56,14 @@ inline void BRepApprox_SurfaceTool::VIntervals(const BRepAdaptor_Surface& Surf, } -inline Handle(Adaptor3d_HSurface) BRepApprox_SurfaceTool::UTrim(const BRepAdaptor_Surface& Surf, +inline Handle(Adaptor3d_Surface) BRepApprox_SurfaceTool::UTrim(const BRepAdaptor_Surface& Surf, const Standard_Real F, const Standard_Real L, const Standard_Real Tol) { return Surf.UTrim(F,L,Tol); } -inline Handle(Adaptor3d_HSurface) BRepApprox_SurfaceTool::VTrim(const BRepAdaptor_Surface& Surf, +inline Handle(Adaptor3d_Surface) BRepApprox_SurfaceTool::VTrim(const BRepAdaptor_Surface& Surf, const Standard_Real F, const Standard_Real L, const Standard_Real Tol) { @@ -227,6 +227,6 @@ inline gp_Dir BRepApprox_SurfaceTool::Direction(const BRepAdaptor_Surface& S) { return(S.Direction()); } -inline Handle(Adaptor3d_HCurve) BRepApprox_SurfaceTool::BasisCurve(const BRepAdaptor_Surface& S) { +inline Handle(Adaptor3d_Curve) BRepApprox_SurfaceTool::BasisCurve(const BRepAdaptor_Surface& S) { return(S.BasisCurve()); } diff --git a/src/BRepBlend/BRepBlend_BlendTool.cxx b/src/BRepBlend/BRepBlend_BlendTool.cxx index 34b38fb212..23147b0a98 100644 --- a/src/BRepBlend/BRepBlend_BlendTool.cxx +++ b/src/BRepBlend/BRepBlend_BlendTool.cxx @@ -14,12 +14,12 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. +#include -#include -#include +#include +#include #include #include -#include #include #include #include @@ -40,8 +40,8 @@ // pmn 8/10/98 : On retourne toujours une distance. (BUC60360) //======================================================================= Standard_Boolean BRepBlend_BlendTool::Project(const gp_Pnt2d& P, - const Handle(Adaptor3d_HSurface)&, - const Handle(Adaptor2d_HCurve2d)& C, + const Handle(Adaptor3d_Surface)&, + const Handle(Adaptor2d_Curve2d)& C, Standard_Real& Paramproj, Standard_Real& Dist) { @@ -60,7 +60,7 @@ Standard_Boolean BRepBlend_BlendTool::Project(const gp_Pnt2d& P, const Standard_Real epsX = 1.e-8; const Standard_Integer Nbu = 20; const Standard_Real Tol = 1.e-5; - Extrema_EPCOfExtPC2d extrema(P, C->Curve2d(), Nbu, epsX, Tol); + Extrema_EPCOfExtPC2d extrema(P, *C, Nbu, epsX, Tol); if (!extrema.IsDone()) return Standard_True; @@ -83,8 +83,8 @@ Standard_Boolean BRepBlend_BlendTool::Project(const gp_Pnt2d& P, //======================================================================= Standard_Boolean BRepBlend_BlendTool::Inters(const gp_Pnt2d& P1, const gp_Pnt2d& P2, - const Handle(Adaptor3d_HSurface)&, - const Handle(Adaptor2d_HCurve2d)& C, + const Handle(Adaptor3d_Surface)&, + const Handle(Adaptor2d_Curve2d)& C, Standard_Real& Param, Standard_Real& Dist) { @@ -97,7 +97,7 @@ Standard_Boolean BRepBlend_BlendTool::Inters(const gp_Pnt2d& P1, Handle(Geom2d_Line) bid = new Geom2d_Line(P1,d); Geom2dAdaptor_Curve seg(bid,-0.01*mag,1.01*mag); - Geom2dInt_GInter inter(seg,C->Curve2d(),Tol,Tol); + Geom2dInt_GInter inter (seg, *C, Tol, Tol); if (!inter.IsDone()) return Standard_False; @@ -112,7 +112,7 @@ Standard_Boolean BRepBlend_BlendTool::Inters(const gp_Pnt2d& P1, } Standard_Integer BRepBlend_BlendTool::NbSamplesV - (const Handle(Adaptor3d_HSurface)&, + (const Handle(Adaptor3d_Surface)&, const Standard_Real, const Standard_Real) { @@ -120,14 +120,14 @@ Standard_Integer BRepBlend_BlendTool::NbSamplesV } Standard_Integer BRepBlend_BlendTool::NbSamplesU - (const Handle(Adaptor3d_HSurface)&, + (const Handle(Adaptor3d_Surface)&, const Standard_Real, const Standard_Real) { return 10; } -void BRepBlend_BlendTool::Bounds(const Handle(Adaptor2d_HCurve2d)& A, +void BRepBlend_BlendTool::Bounds(const Handle(Adaptor2d_Curve2d)& A, Standard_Real& Ufirst, Standard_Real& Ulast) { diff --git a/src/BRepBlend/BRepBlend_BlendTool.hxx b/src/BRepBlend/BRepBlend_BlendTool.hxx index 8ef6dee328..a22f62d87f 100644 --- a/src/BRepBlend/BRepBlend_BlendTool.hxx +++ b/src/BRepBlend/BRepBlend_BlendTool.hxx @@ -17,20 +17,12 @@ #ifndef _BRepBlend_BlendTool_HeaderFile #define _BRepBlend_BlendTool_HeaderFile -#include -#include -#include +#include -#include -#include -#include class gp_Pnt2d; -class Adaptor3d_HSurface; -class Adaptor2d_HCurve2d; +class Adaptor2d_Curve2d; class Adaptor3d_HVertex; - - class BRepBlend_BlendTool { public: @@ -45,38 +37,38 @@ public: //! P and the curve.. //! If the method returns Standard_False, Param proj and Dist //! are not significant. - Standard_EXPORT static Standard_Boolean Project (const gp_Pnt2d& P, const Handle(Adaptor3d_HSurface)& S, const Handle(Adaptor2d_HCurve2d)& C, Standard_Real& Paramproj, Standard_Real& Dist); + Standard_EXPORT static Standard_Boolean Project (const gp_Pnt2d& P, const Handle(Adaptor3d_Surface)& S, const Handle(Adaptor2d_Curve2d)& C, Standard_Real& Paramproj, Standard_Real& Dist); - Standard_EXPORT static Standard_Boolean Inters (const gp_Pnt2d& P1, const gp_Pnt2d& P2, const Handle(Adaptor3d_HSurface)& S, const Handle(Adaptor2d_HCurve2d)& C, Standard_Real& Param, Standard_Real& Dist); + Standard_EXPORT static Standard_Boolean Inters (const gp_Pnt2d& P1, const gp_Pnt2d& P2, const Handle(Adaptor3d_Surface)& S, const Handle(Adaptor2d_Curve2d)& C, Standard_Real& Param, Standard_Real& Dist); //! Returns the parameter of the vertex V on the edge A. - static Standard_Real Parameter (const Handle(Adaptor3d_HVertex)& V, const Handle(Adaptor2d_HCurve2d)& A); + static Standard_Real Parameter (const Handle(Adaptor3d_HVertex)& V, const Handle(Adaptor2d_Curve2d)& A); //! Returns the parametric tolerance on the arc A //! used to consider that the vertex and another point meet, //! i-e if Abs(Parameter(Vertex)-Parameter(OtherPnt))<= //! Tolerance, the points are "merged". - static Standard_Real Tolerance (const Handle(Adaptor3d_HVertex)& V, const Handle(Adaptor2d_HCurve2d)& A); + static Standard_Real Tolerance (const Handle(Adaptor3d_HVertex)& V, const Handle(Adaptor2d_Curve2d)& A); - static Standard_Boolean SingularOnUMin (const Handle(Adaptor3d_HSurface)& S); + static Standard_Boolean SingularOnUMin (const Handle(Adaptor3d_Surface)& S); - static Standard_Boolean SingularOnUMax (const Handle(Adaptor3d_HSurface)& S); + static Standard_Boolean SingularOnUMax (const Handle(Adaptor3d_Surface)& S); - static Standard_Boolean SingularOnVMin (const Handle(Adaptor3d_HSurface)& S); + static Standard_Boolean SingularOnVMin (const Handle(Adaptor3d_Surface)& S); - static Standard_Boolean SingularOnVMax (const Handle(Adaptor3d_HSurface)& S); + static Standard_Boolean SingularOnVMax (const Handle(Adaptor3d_Surface)& S); - Standard_EXPORT static Standard_Integer NbSamplesU (const Handle(Adaptor3d_HSurface)& S, const Standard_Real u1, const Standard_Real u2); + Standard_EXPORT static Standard_Integer NbSamplesU (const Handle(Adaptor3d_Surface)& S, const Standard_Real u1, const Standard_Real u2); - Standard_EXPORT static Standard_Integer NbSamplesV (const Handle(Adaptor3d_HSurface)& S, const Standard_Real v1, const Standard_Real v2); + Standard_EXPORT static Standard_Integer NbSamplesV (const Handle(Adaptor3d_Surface)& S, const Standard_Real v1, const Standard_Real v2); //! Returns the parametric limits on the arc C. //! These limits must be finite : they are either //! the real limits of the arc, for a finite arc, //! or a bounding box for an infinite arc. - Standard_EXPORT static void Bounds (const Handle(Adaptor2d_HCurve2d)& C, Standard_Real& Ufirst, Standard_Real& Ulast); + Standard_EXPORT static void Bounds (const Handle(Adaptor2d_Curve2d)& C, Standard_Real& Ufirst, Standard_Real& Ulast); - static Handle(Adaptor2d_HCurve2d) CurveOnSurf (const Handle(Adaptor2d_HCurve2d)& C, const Handle(Adaptor3d_HSurface)& S); + static Handle(Adaptor2d_Curve2d) CurveOnSurf (const Handle(Adaptor2d_Curve2d)& C, const Handle(Adaptor3d_Surface)& S); diff --git a/src/BRepBlend/BRepBlend_BlendTool.lxx b/src/BRepBlend/BRepBlend_BlendTool.lxx index eaea4e94e7..bb77b3edcd 100644 --- a/src/BRepBlend/BRepBlend_BlendTool.lxx +++ b/src/BRepBlend/BRepBlend_BlendTool.lxx @@ -16,39 +16,39 @@ #include -inline Standard_Boolean BRepBlend_BlendTool::SingularOnUMin (const Handle(Adaptor3d_HSurface)& ) +inline Standard_Boolean BRepBlend_BlendTool::SingularOnUMin (const Handle(Adaptor3d_Surface)& ) { return Standard_False; } -inline Standard_Boolean BRepBlend_BlendTool::SingularOnUMax (const Handle(Adaptor3d_HSurface)& ) +inline Standard_Boolean BRepBlend_BlendTool::SingularOnUMax (const Handle(Adaptor3d_Surface)& ) { return Standard_False; } -inline Standard_Boolean BRepBlend_BlendTool::SingularOnVMin (const Handle(Adaptor3d_HSurface)& ) +inline Standard_Boolean BRepBlend_BlendTool::SingularOnVMin (const Handle(Adaptor3d_Surface)& ) { return Standard_False; } -inline Standard_Boolean BRepBlend_BlendTool::SingularOnVMax (const Handle(Adaptor3d_HSurface)& ) +inline Standard_Boolean BRepBlend_BlendTool::SingularOnVMax (const Handle(Adaptor3d_Surface)& ) { return Standard_False; } -inline Standard_Real BRepBlend_BlendTool::Tolerance (const Handle(Adaptor3d_HVertex)& V, const Handle(Adaptor2d_HCurve2d)& A) +inline Standard_Real BRepBlend_BlendTool::Tolerance (const Handle(Adaptor3d_HVertex)& V, const Handle(Adaptor2d_Curve2d)& A) { // return Adaptor2d_HCurve2dTool::Resolution(A,1.e-6); // a voir return V->Resolution(A); // a voir } -inline Standard_Real BRepBlend_BlendTool::Parameter (const Handle(Adaptor3d_HVertex)& V, const Handle(Adaptor2d_HCurve2d)& C) +inline Standard_Real BRepBlend_BlendTool::Parameter (const Handle(Adaptor3d_HVertex)& V, const Handle(Adaptor2d_Curve2d)& C) { // return BRep_Tool::Parameter(V,A->Curve().Edge()); return V->Parameter(C); } -inline Handle(Adaptor2d_HCurve2d) BRepBlend_BlendTool::CurveOnSurf (const Handle(Adaptor2d_HCurve2d)& C, const Handle(Adaptor3d_HSurface)&) +inline Handle(Adaptor2d_Curve2d) BRepBlend_BlendTool::CurveOnSurf (const Handle(Adaptor2d_Curve2d)& C, const Handle(Adaptor3d_Surface)&) { return C; } diff --git a/src/BRepBlend/BRepBlend_CSWalking.hxx b/src/BRepBlend/BRepBlend_CSWalking.hxx index 27cbe6d7da..4dd1ffb262 100644 --- a/src/BRepBlend/BRepBlend_CSWalking.hxx +++ b/src/BRepBlend/BRepBlend_CSWalking.hxx @@ -17,25 +17,18 @@ #ifndef _BRepBlend_CSWalking_HeaderFile #define _BRepBlend_CSWalking_HeaderFile -#include -#include -#include - -#include -#include +#include +#include #include #include -#include #include #include #include + class BRepBlend_Line; -class Adaptor3d_HSurface; -class Adaptor3d_HCurve; class Adaptor3d_TopolTool; class StdFail_NotDone; class Adaptor3d_HVertex; -class Adaptor2d_HCurve2d; class BRepBlend_HCurve2dTool; class Adaptor3d_HSurfaceTool; class BRepBlend_HCurveTool; @@ -49,8 +42,6 @@ class gp_Pnt2d; class gp_Vec; class gp_Vec2d; - - class BRepBlend_CSWalking { public: @@ -58,7 +49,7 @@ public: DEFINE_STANDARD_ALLOC - Standard_EXPORT BRepBlend_CSWalking(const Handle(Adaptor3d_HCurve)& Curv, const Handle(Adaptor3d_HSurface)& Surf, const Handle(Adaptor3d_TopolTool)& Domain); + Standard_EXPORT BRepBlend_CSWalking(const Handle(Adaptor3d_Curve)& Curv, const Handle(Adaptor3d_Surface)& Surf, const Handle(Adaptor3d_TopolTool)& Domain); Standard_EXPORT void Perform (Blend_CSFunction& F, const Standard_Real Pdep, const Standard_Real Pmax, const Standard_Real MaxStep, const Standard_Real TolGuide, const math_Vector& Soldep, const Standard_Real Tolesp, const Standard_Real Fleche, const Standard_Boolean Appro = Standard_False); @@ -68,21 +59,12 @@ public: const Handle(BRepBlend_Line)& Line() const; - - - -protected: - - - - - private: Standard_EXPORT void InternalPerform (Blend_CSFunction& F, math_Vector& Sol, const Standard_Real Bound); - Standard_EXPORT void Transition (const Handle(Adaptor2d_HCurve2d)& A, const Standard_Real Param, IntSurf_Transition& TLine, IntSurf_Transition& TArc); + Standard_EXPORT void Transition (const Handle(Adaptor2d_Curve2d)& A, const Standard_Real Param, IntSurf_Transition& TLine, IntSurf_Transition& TArc); Standard_EXPORT void MakeExtremity (BRepBlend_Extremity& Extrem, const Standard_Integer Index, const Standard_Real Param, const Standard_Boolean IsVtx, const Handle(Adaptor3d_HVertex)& Vtx); @@ -95,8 +77,8 @@ private: Standard_Boolean done; Handle(BRepBlend_Line) line; - Handle(Adaptor3d_HSurface) surf; - Handle(Adaptor3d_HCurve) curv; + Handle(Adaptor3d_Surface) surf; + Handle(Adaptor3d_Curve) curv; Handle(Adaptor3d_TopolTool) domain; Standard_Real tolesp; Standard_Real tolgui; @@ -116,12 +98,12 @@ private: #define TheVertex Handle(Adaptor3d_HVertex) #define TheVertex_hxx -#define TheArc Handle(Adaptor2d_HCurve2d) -#define TheArc_hxx -#define TheSurface Handle(Adaptor3d_HSurface) -#define TheSurface_hxx -#define TheCurve Handle(Adaptor3d_HCurve) -#define TheCurve_hxx +#define TheArc Handle(Adaptor2d_Curve2d) +#define TheArc_hxx +#define TheSurface Handle(Adaptor3d_Surface) +#define TheSurface_hxx +#define TheCurve Handle(Adaptor3d_Curve) +#define TheCurve_hxx #define TheVertexTool Standard_Integer #define TheVertexTool_hxx #define TheArcTool BRepBlend_HCurve2dTool diff --git a/src/BRepBlend/BRepBlend_CSWalking_0.cxx b/src/BRepBlend/BRepBlend_CSWalking_0.cxx index bbd04670ee..7ab7c9d844 100644 --- a/src/BRepBlend/BRepBlend_CSWalking_0.cxx +++ b/src/BRepBlend/BRepBlend_CSWalking_0.cxx @@ -17,12 +17,12 @@ #include #include -#include -#include +#include +#include #include #include #include -#include +#include #include #include #include @@ -39,12 +39,12 @@ #define TheVertex Handle(Adaptor3d_HVertex) #define TheVertex_hxx -#define TheArc Handle(Adaptor2d_HCurve2d) -#define TheArc_hxx -#define TheSurface Handle(Adaptor3d_HSurface) -#define TheSurface_hxx -#define TheCurve Handle(Adaptor3d_HCurve) -#define TheCurve_hxx +#define TheArc Handle(Adaptor2d_Curve2d) +#define TheArc_hxx +#define TheSurface Handle(Adaptor3d_Surface) +#define TheSurface_hxx +#define TheCurve Handle(Adaptor3d_Curve) +#define TheCurve_hxx #define TheVertexTool Standard_Integer #define TheVertexTool_hxx #define TheArcTool BRepBlend_HCurve2dTool diff --git a/src/BRepBlend/BRepBlend_CurvPointRadInv.cxx b/src/BRepBlend/BRepBlend_CurvPointRadInv.cxx index 32a5badb93..0ac0b96a04 100644 --- a/src/BRepBlend/BRepBlend_CurvPointRadInv.cxx +++ b/src/BRepBlend/BRepBlend_CurvPointRadInv.cxx @@ -15,7 +15,7 @@ // commercial license or contractual agreement. -#include +#include #include #include #include @@ -25,8 +25,8 @@ //purpose : //======================================================================= BRepBlend_CurvPointRadInv::BRepBlend_CurvPointRadInv -(const Handle(Adaptor3d_HCurve)& C1, - const Handle(Adaptor3d_HCurve)& C2) +(const Handle(Adaptor3d_Curve)& C1, + const Handle(Adaptor3d_Curve)& C2) : curv1(C1), curv2(C2), choix(0) diff --git a/src/BRepBlend/BRepBlend_CurvPointRadInv.hxx b/src/BRepBlend/BRepBlend_CurvPointRadInv.hxx index c1c24c648a..0672178e8b 100644 --- a/src/BRepBlend/BRepBlend_CurvPointRadInv.hxx +++ b/src/BRepBlend/BRepBlend_CurvPointRadInv.hxx @@ -27,7 +27,7 @@ #include #include #include -class Adaptor3d_HCurve; + class math_Matrix; class gp_Pnt; @@ -49,7 +49,7 @@ public: DEFINE_STANDARD_ALLOC - Standard_EXPORT BRepBlend_CurvPointRadInv(const Handle(Adaptor3d_HCurve)& C1, const Handle(Adaptor3d_HCurve)& C2); + Standard_EXPORT BRepBlend_CurvPointRadInv(const Handle(Adaptor3d_Curve)& C1, const Handle(Adaptor3d_Curve)& C2); Standard_EXPORT void Set (const Standard_Integer Choix); @@ -105,8 +105,8 @@ private: - Handle(Adaptor3d_HCurve) curv1; - Handle(Adaptor3d_HCurve) curv2; + Handle(Adaptor3d_Curve) curv1; + Handle(Adaptor3d_Curve) curv2; gp_Pnt point; Standard_Integer choix; diff --git a/src/BRepBlend/BRepBlend_Extremity.cxx b/src/BRepBlend/BRepBlend_Extremity.cxx index a3ca84236e..6ace49c32f 100644 --- a/src/BRepBlend/BRepBlend_Extremity.cxx +++ b/src/BRepBlend/BRepBlend_Extremity.cxx @@ -12,10 +12,10 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. - -#include -#include #include + +#include +#include #include #include #include @@ -122,7 +122,7 @@ void BRepBlend_Extremity::SetVertex (const Handle(Adaptor3d_HVertex)& V) vtx = V; } -void BRepBlend_Extremity::AddArc (const Handle(Adaptor2d_HCurve2d)& A, +void BRepBlend_Extremity::AddArc (const Handle(Adaptor2d_Curve2d)& A, const Standard_Real Param, const IntSurf_Transition& TLine, const IntSurf_Transition& TArc) diff --git a/src/BRepBlend/BRepBlend_Extremity.hxx b/src/BRepBlend/BRepBlend_Extremity.hxx index d66db8a26a..31de857649 100644 --- a/src/BRepBlend/BRepBlend_Extremity.hxx +++ b/src/BRepBlend/BRepBlend_Extremity.hxx @@ -32,7 +32,6 @@ class Standard_DomainError; class Standard_OutOfRange; class gp_Pnt; class gp_Vec; -class Adaptor2d_HCurve2d; class IntSurf_Transition; class BRepBlend_PointOnRst; @@ -90,7 +89,7 @@ public: //! Sets the values of a point which is on the arc //! A, at parameter Param. - Standard_EXPORT void AddArc (const Handle(Adaptor2d_HCurve2d)& A, const Standard_Real Param, const IntSurf_Transition& TLine, const IntSurf_Transition& TArc); + Standard_EXPORT void AddArc (const Handle(Adaptor2d_Curve2d)& A, const Standard_Real Param, const IntSurf_Transition& TLine, const IntSurf_Transition& TArc); //! This method returns the parameters of the point //! on the concerned surface. diff --git a/src/BRepBlend/BRepBlend_HCurve2dTool.cxx b/src/BRepBlend/BRepBlend_HCurve2dTool.cxx index 6e0632a371..709787d04c 100644 --- a/src/BRepBlend/BRepBlend_HCurve2dTool.cxx +++ b/src/BRepBlend/BRepBlend_HCurve2dTool.cxx @@ -14,9 +14,9 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. - -#include #include + +#include #include #include #include @@ -29,7 +29,7 @@ #include //============================================================ -Standard_Integer BRepBlend_HCurve2dTool::NbSamples (const Handle(Adaptor2d_HCurve2d)& C, +Standard_Integer BRepBlend_HCurve2dTool::NbSamples (const Handle(Adaptor2d_Curve2d)& C, const Standard_Real U0, const Standard_Real U1) { GeomAbs_CurveType typC = C->GetType(); diff --git a/src/BRepBlend/BRepBlend_HCurve2dTool.hxx b/src/BRepBlend/BRepBlend_HCurve2dTool.hxx index 08ae204b81..2e00dfcfc1 100644 --- a/src/BRepBlend/BRepBlend_HCurve2dTool.hxx +++ b/src/BRepBlend/BRepBlend_HCurve2dTool.hxx @@ -17,33 +17,19 @@ #ifndef _BRepBlend_HCurve2dTool_HeaderFile #define _BRepBlend_HCurve2dTool_HeaderFile -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include #include +#include #include #include #include -#include #include -class Standard_OutOfRange; -class Standard_NoSuchObject; -class Standard_DomainError; -class Adaptor2d_HCurve2d; -class gp_Pnt2d; -class gp_Vec2d; -class Geom2d_BezierCurve; -class Geom2d_BSplineCurve; - - +#include +#include +#include +#include class BRepBlend_HCurve2dTool { @@ -52,54 +38,54 @@ public: DEFINE_STANDARD_ALLOC - static Standard_Real FirstParameter (const Handle(Adaptor2d_HCurve2d)& C); + static Standard_Real FirstParameter (const Handle(Adaptor2d_Curve2d)& C); - static Standard_Real LastParameter (const Handle(Adaptor2d_HCurve2d)& C); + static Standard_Real LastParameter (const Handle(Adaptor2d_Curve2d)& C); - static GeomAbs_Shape Continuity (const Handle(Adaptor2d_HCurve2d)& C); + static GeomAbs_Shape Continuity (const Handle(Adaptor2d_Curve2d)& C); //! Returns the number of intervals for continuity //! . May be one if Continuity(myclass) >= - static Standard_Integer NbIntervals (const Handle(Adaptor2d_HCurve2d)& C, const GeomAbs_Shape S); + static Standard_Integer NbIntervals (const Handle(Adaptor2d_Curve2d)& C, const GeomAbs_Shape S); //! Stores in the parameters bounding the intervals //! of continuity . //! //! The array must provide enough room to accommodate //! for the parameters. i.e. T.Length() > NbIntervals() - static void Intervals (const Handle(Adaptor2d_HCurve2d)& C, TColStd_Array1OfReal& T, const GeomAbs_Shape S); + static void Intervals (const Handle(Adaptor2d_Curve2d)& C, TColStd_Array1OfReal& T, const GeomAbs_Shape S); - static Standard_Boolean IsClosed (const Handle(Adaptor2d_HCurve2d)& C); + static Standard_Boolean IsClosed (const Handle(Adaptor2d_Curve2d)& C); - static Standard_Boolean IsPeriodic (const Handle(Adaptor2d_HCurve2d)& C); + static Standard_Boolean IsPeriodic (const Handle(Adaptor2d_Curve2d)& C); - static Standard_Real Period (const Handle(Adaptor2d_HCurve2d)& C); + static Standard_Real Period (const Handle(Adaptor2d_Curve2d)& C); //! Computes the point of parameter U on the curve. - static gp_Pnt2d Value (const Handle(Adaptor2d_HCurve2d)& C, const Standard_Real U); + static gp_Pnt2d Value (const Handle(Adaptor2d_Curve2d)& C, const Standard_Real U); //! Computes the point of parameter U on the curve. - static void D0 (const Handle(Adaptor2d_HCurve2d)& C, const Standard_Real U, gp_Pnt2d& P); + static void D0 (const Handle(Adaptor2d_Curve2d)& C, const Standard_Real U, gp_Pnt2d& P); //! Computes the point of parameter U on the curve with its //! first derivative. //! Raised if the continuity of the current interval //! is not C1. - static void D1 (const Handle(Adaptor2d_HCurve2d)& C, const Standard_Real U, gp_Pnt2d& P, gp_Vec2d& V); + static void D1 (const Handle(Adaptor2d_Curve2d)& C, const Standard_Real U, gp_Pnt2d& P, gp_Vec2d& V); //! Returns the point P of parameter U, the first and second //! derivatives V1 and V2. //! Raised if the continuity of the current interval //! is not C2. - static void D2 (const Handle(Adaptor2d_HCurve2d)& C, const Standard_Real U, gp_Pnt2d& P, gp_Vec2d& V1, gp_Vec2d& V2); + static void D2 (const Handle(Adaptor2d_Curve2d)& C, const Standard_Real U, gp_Pnt2d& P, gp_Vec2d& V1, gp_Vec2d& V2); //! Returns the point P of parameter U, the first, the second //! and the third derivative. //! Raised if the continuity of the current interval //! is not C3. - static void D3 (const Handle(Adaptor2d_HCurve2d)& C, const Standard_Real U, gp_Pnt2d& P, gp_Vec2d& V1, gp_Vec2d& V2, gp_Vec2d& V3); + static void D3 (const Handle(Adaptor2d_Curve2d)& C, const Standard_Real U, gp_Pnt2d& P, gp_Vec2d& V1, gp_Vec2d& V2, gp_Vec2d& V3); //! The returned vector gives the value of the derivative for the @@ -107,32 +93,32 @@ public: //! Raised if the continuity of the current interval //! is not CN. //! Raised if N < 1. - static gp_Vec2d DN (const Handle(Adaptor2d_HCurve2d)& C, const Standard_Real U, const Standard_Integer N); + static gp_Vec2d DN (const Handle(Adaptor2d_Curve2d)& C, const Standard_Real U, const Standard_Integer N); //! Returns the parametric resolution corresponding //! to the real space resolution . - static Standard_Real Resolution (const Handle(Adaptor2d_HCurve2d)& C, const Standard_Real R3d); + static Standard_Real Resolution (const Handle(Adaptor2d_Curve2d)& C, const Standard_Real R3d); //! Returns the type of the curve in the current //! interval : Line, Circle, Ellipse, Hyperbola, //! Parabola, BezierCurve, BSplineCurve, OtherCurve. - static GeomAbs_CurveType GetType (const Handle(Adaptor2d_HCurve2d)& C); + static GeomAbs_CurveType GetType (const Handle(Adaptor2d_Curve2d)& C); - static gp_Lin2d Line (const Handle(Adaptor2d_HCurve2d)& C); + static gp_Lin2d Line (const Handle(Adaptor2d_Curve2d)& C); - static gp_Circ2d Circle (const Handle(Adaptor2d_HCurve2d)& C); + static gp_Circ2d Circle (const Handle(Adaptor2d_Curve2d)& C); - static gp_Elips2d Ellipse (const Handle(Adaptor2d_HCurve2d)& C); + static gp_Elips2d Ellipse (const Handle(Adaptor2d_Curve2d)& C); - static gp_Hypr2d Hyperbola (const Handle(Adaptor2d_HCurve2d)& C); + static gp_Hypr2d Hyperbola (const Handle(Adaptor2d_Curve2d)& C); - static gp_Parab2d Parabola (const Handle(Adaptor2d_HCurve2d)& C); + static gp_Parab2d Parabola (const Handle(Adaptor2d_Curve2d)& C); - static Handle(Geom2d_BezierCurve) Bezier (const Handle(Adaptor2d_HCurve2d)& C); + static Handle(Geom2d_BezierCurve) Bezier (const Handle(Adaptor2d_Curve2d)& C); - static Handle(Geom2d_BSplineCurve) BSpline (const Handle(Adaptor2d_HCurve2d)& C); + static Handle(Geom2d_BSplineCurve) BSpline (const Handle(Adaptor2d_Curve2d)& C); - Standard_EXPORT static Standard_Integer NbSamples (const Handle(Adaptor2d_HCurve2d)& C, const Standard_Real U0, const Standard_Real U1); + Standard_EXPORT static Standard_Integer NbSamples (const Handle(Adaptor2d_Curve2d)& C, const Standard_Real U0, const Standard_Real U1); diff --git a/src/BRepBlend/BRepBlend_HCurve2dTool.lxx b/src/BRepBlend/BRepBlend_HCurve2dTool.lxx index 04654ca2c3..ebc4a88f5c 100644 --- a/src/BRepBlend/BRepBlend_HCurve2dTool.lxx +++ b/src/BRepBlend/BRepBlend_HCurve2dTool.lxx @@ -31,59 +31,59 @@ #include //============================================================ -inline Standard_Real BRepBlend_HCurve2dTool::FirstParameter (const Handle(Adaptor2d_HCurve2d)& C) { +inline Standard_Real BRepBlend_HCurve2dTool::FirstParameter (const Handle(Adaptor2d_Curve2d)& C) { return(C->FirstParameter()); } //============================================================ -inline Standard_Real BRepBlend_HCurve2dTool::LastParameter (const Handle(Adaptor2d_HCurve2d)& C) { +inline Standard_Real BRepBlend_HCurve2dTool::LastParameter (const Handle(Adaptor2d_Curve2d)& C) { return(C->LastParameter()); } //============================================================ -inline GeomAbs_Shape BRepBlend_HCurve2dTool::Continuity (const Handle(Adaptor2d_HCurve2d)& C) { +inline GeomAbs_Shape BRepBlend_HCurve2dTool::Continuity (const Handle(Adaptor2d_Curve2d)& C) { return(C->Continuity()); } //============================================================ -inline Standard_Integer BRepBlend_HCurve2dTool::NbIntervals(const Handle(Adaptor2d_HCurve2d)& C,const GeomAbs_Shape Sh) { +inline Standard_Integer BRepBlend_HCurve2dTool::NbIntervals(const Handle(Adaptor2d_Curve2d)& C,const GeomAbs_Shape Sh) { return(C->NbIntervals(Sh)); } //============================================================ -inline void BRepBlend_HCurve2dTool::Intervals(const Handle(Adaptor2d_HCurve2d)& C, +inline void BRepBlend_HCurve2dTool::Intervals(const Handle(Adaptor2d_Curve2d)& C, TColStd_Array1OfReal& Tab, const GeomAbs_Shape Sh) { C->Intervals(Tab,Sh); } //============================================================ -inline Standard_Boolean BRepBlend_HCurve2dTool::IsClosed(const Handle(Adaptor2d_HCurve2d)& C) { +inline Standard_Boolean BRepBlend_HCurve2dTool::IsClosed(const Handle(Adaptor2d_Curve2d)& C) { return(C->IsClosed()); } //============================================================ -inline Standard_Boolean BRepBlend_HCurve2dTool::IsPeriodic(const Handle(Adaptor2d_HCurve2d)& C) { +inline Standard_Boolean BRepBlend_HCurve2dTool::IsPeriodic(const Handle(Adaptor2d_Curve2d)& C) { return(C->IsPeriodic()); } //============================================================ -inline Standard_Real BRepBlend_HCurve2dTool::Period(const Handle(Adaptor2d_HCurve2d)& C) { +inline Standard_Real BRepBlend_HCurve2dTool::Period(const Handle(Adaptor2d_Curve2d)& C) { return(C->Period()); } //============================================================ -inline gp_Pnt2d BRepBlend_HCurve2dTool::Value (const Handle(Adaptor2d_HCurve2d)& C, +inline gp_Pnt2d BRepBlend_HCurve2dTool::Value (const Handle(Adaptor2d_Curve2d)& C, const Standard_Real U) { return(C->Value(U)); } //============================================================ -inline void BRepBlend_HCurve2dTool::D0(const Handle(Adaptor2d_HCurve2d)& C, +inline void BRepBlend_HCurve2dTool::D0(const Handle(Adaptor2d_Curve2d)& C, const Standard_Real U, gp_Pnt2d& P) { C->D0(U,P); } //============================================================ -inline void BRepBlend_HCurve2dTool::D1 (const Handle(Adaptor2d_HCurve2d)& C, +inline void BRepBlend_HCurve2dTool::D1 (const Handle(Adaptor2d_Curve2d)& C, const Standard_Real U, gp_Pnt2d& P, gp_Vec2d& T) { C->D1(U,P,T); } //============================================================ -inline void BRepBlend_HCurve2dTool::D2 (const Handle(Adaptor2d_HCurve2d)& C, +inline void BRepBlend_HCurve2dTool::D2 (const Handle(Adaptor2d_Curve2d)& C, const Standard_Real U, gp_Pnt2d& P, gp_Vec2d& T, @@ -92,7 +92,7 @@ inline void BRepBlend_HCurve2dTool::D2 (const Handle(Adaptor2d_HCurve2d)& C, C->D2(U,P,T,N); } //============================================================ -inline void BRepBlend_HCurve2dTool::D3 (const Handle(Adaptor2d_HCurve2d)& C, +inline void BRepBlend_HCurve2dTool::D3 (const Handle(Adaptor2d_Curve2d)& C, const Standard_Real U, gp_Pnt2d& P, gp_Vec2d& V1, @@ -102,47 +102,47 @@ inline void BRepBlend_HCurve2dTool::D3 (const Handle(Adaptor2d_HCurve2d)& C, C->D3(U,P,V1,V2,V3); } //============================================================ -inline gp_Vec2d BRepBlend_HCurve2dTool::DN (const Handle(Adaptor2d_HCurve2d)& C, +inline gp_Vec2d BRepBlend_HCurve2dTool::DN (const Handle(Adaptor2d_Curve2d)& C, const Standard_Real U, const Standard_Integer N) { return(C->DN(U,N)); } //============================================================ -inline Standard_Real BRepBlend_HCurve2dTool::Resolution(const Handle(Adaptor2d_HCurve2d)& C, +inline Standard_Real BRepBlend_HCurve2dTool::Resolution(const Handle(Adaptor2d_Curve2d)& C, const Standard_Real R3d) { return(C->Resolution(R3d)); } //============================================================ -inline GeomAbs_CurveType BRepBlend_HCurve2dTool::GetType(const Handle(Adaptor2d_HCurve2d)& C) { +inline GeomAbs_CurveType BRepBlend_HCurve2dTool::GetType(const Handle(Adaptor2d_Curve2d)& C) { return(C->GetType()); } //============================================================ -inline gp_Lin2d BRepBlend_HCurve2dTool::Line (const Handle(Adaptor2d_HCurve2d)& C) { +inline gp_Lin2d BRepBlend_HCurve2dTool::Line (const Handle(Adaptor2d_Curve2d)& C) { return(C->Line()); } //============================================================ -inline gp_Circ2d BRepBlend_HCurve2dTool::Circle (const Handle(Adaptor2d_HCurve2d)& C) { +inline gp_Circ2d BRepBlend_HCurve2dTool::Circle (const Handle(Adaptor2d_Curve2d)& C) { return(C->Circle()); } //============================================================ -inline gp_Elips2d BRepBlend_HCurve2dTool::Ellipse (const Handle(Adaptor2d_HCurve2d)& C) { +inline gp_Elips2d BRepBlend_HCurve2dTool::Ellipse (const Handle(Adaptor2d_Curve2d)& C) { return(C->Ellipse()); } //============================================================ -inline gp_Parab2d BRepBlend_HCurve2dTool::Parabola (const Handle(Adaptor2d_HCurve2d)& C) { +inline gp_Parab2d BRepBlend_HCurve2dTool::Parabola (const Handle(Adaptor2d_Curve2d)& C) { return(C->Parabola()); } //============================================================ -inline gp_Hypr2d BRepBlend_HCurve2dTool::Hyperbola (const Handle(Adaptor2d_HCurve2d)& C) { +inline gp_Hypr2d BRepBlend_HCurve2dTool::Hyperbola (const Handle(Adaptor2d_Curve2d)& C) { return(C->Hyperbola()); } //============================================================ -inline Handle(Geom2d_BezierCurve) BRepBlend_HCurve2dTool::Bezier (const Handle(Adaptor2d_HCurve2d)& C) { +inline Handle(Geom2d_BezierCurve) BRepBlend_HCurve2dTool::Bezier (const Handle(Adaptor2d_Curve2d)& C) { return(C->Bezier()); } //============================================================ -inline Handle(Geom2d_BSplineCurve) BRepBlend_HCurve2dTool::BSpline (const Handle(Adaptor2d_HCurve2d)& C) { +inline Handle(Geom2d_BSplineCurve) BRepBlend_HCurve2dTool::BSpline (const Handle(Adaptor2d_Curve2d)& C) { return(C->BSpline()); } //============================================================ diff --git a/src/BRepBlend/BRepBlend_HCurveTool.cxx b/src/BRepBlend/BRepBlend_HCurveTool.cxx index 915c671423..8902fe3401 100644 --- a/src/BRepBlend/BRepBlend_HCurveTool.cxx +++ b/src/BRepBlend/BRepBlend_HCurveTool.cxx @@ -14,9 +14,9 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. - -#include #include + +#include #include #include #include @@ -29,7 +29,7 @@ #include //============================================================ -Standard_Integer BRepBlend_HCurveTool::NbSamples (const Handle(Adaptor3d_HCurve)& C, +Standard_Integer BRepBlend_HCurveTool::NbSamples (const Handle(Adaptor3d_Curve)& C, const Standard_Real U0, const Standard_Real U1) { GeomAbs_CurveType typC = C->GetType(); diff --git a/src/BRepBlend/BRepBlend_HCurveTool.hxx b/src/BRepBlend/BRepBlend_HCurveTool.hxx index e22eef11eb..247b59741d 100644 --- a/src/BRepBlend/BRepBlend_HCurveTool.hxx +++ b/src/BRepBlend/BRepBlend_HCurveTool.hxx @@ -17,33 +17,19 @@ #ifndef _BRepBlend_HCurveTool_HeaderFile #define _BRepBlend_HCurveTool_HeaderFile -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include #include -#include +#include #include #include -#include +#include #include -class Standard_OutOfRange; -class Standard_NoSuchObject; -class Standard_DomainError; -class Adaptor3d_HCurve; -class gp_Pnt; -class gp_Vec; -class Geom_BezierCurve; -class Geom_BSplineCurve; - - +#include +#include +#include +#include class BRepBlend_HCurveTool { @@ -52,54 +38,54 @@ public: DEFINE_STANDARD_ALLOC - static Standard_Real FirstParameter (const Handle(Adaptor3d_HCurve)& C); + static Standard_Real FirstParameter (const Handle(Adaptor3d_Curve)& C); - static Standard_Real LastParameter (const Handle(Adaptor3d_HCurve)& C); + static Standard_Real LastParameter (const Handle(Adaptor3d_Curve)& C); - static GeomAbs_Shape Continuity (const Handle(Adaptor3d_HCurve)& C); + static GeomAbs_Shape Continuity (const Handle(Adaptor3d_Curve)& C); //! Returns the number of intervals for continuity //! . May be one if Continuity(myclass) >= - static Standard_Integer NbIntervals (const Handle(Adaptor3d_HCurve)& C, const GeomAbs_Shape S); + static Standard_Integer NbIntervals (const Handle(Adaptor3d_Curve)& C, const GeomAbs_Shape S); //! Stores in the parameters bounding the intervals //! of continuity . //! //! The array must provide enough room to accommodate //! for the parameters. i.e. T.Length() > NbIntervals() - static void Intervals (const Handle(Adaptor3d_HCurve)& C, TColStd_Array1OfReal& T, const GeomAbs_Shape S); + static void Intervals (const Handle(Adaptor3d_Curve)& C, TColStd_Array1OfReal& T, const GeomAbs_Shape S); - static Standard_Boolean IsClosed (const Handle(Adaptor3d_HCurve)& C); + static Standard_Boolean IsClosed (const Handle(Adaptor3d_Curve)& C); - static Standard_Boolean IsPeriodic (const Handle(Adaptor3d_HCurve)& C); + static Standard_Boolean IsPeriodic (const Handle(Adaptor3d_Curve)& C); - static Standard_Real Period (const Handle(Adaptor3d_HCurve)& C); + static Standard_Real Period (const Handle(Adaptor3d_Curve)& C); //! Computes the point of parameter U on the curve. - static gp_Pnt Value (const Handle(Adaptor3d_HCurve)& C, const Standard_Real U); + static gp_Pnt Value (const Handle(Adaptor3d_Curve)& C, const Standard_Real U); //! Computes the point of parameter U on the curve. - static void D0 (const Handle(Adaptor3d_HCurve)& C, const Standard_Real U, gp_Pnt& P); + static void D0 (const Handle(Adaptor3d_Curve)& C, const Standard_Real U, gp_Pnt& P); //! Computes the point of parameter U on the curve with its //! first derivative. //! Raised if the continuity of the current interval //! is not C1. - static void D1 (const Handle(Adaptor3d_HCurve)& C, const Standard_Real U, gp_Pnt& P, gp_Vec& V); + static void D1 (const Handle(Adaptor3d_Curve)& C, const Standard_Real U, gp_Pnt& P, gp_Vec& V); //! Returns the point P of parameter U, the first and second //! derivatives V1 and V2. //! Raised if the continuity of the current interval //! is not C2. - static void D2 (const Handle(Adaptor3d_HCurve)& C, const Standard_Real U, gp_Pnt& P, gp_Vec& V1, gp_Vec& V2); + static void D2 (const Handle(Adaptor3d_Curve)& C, const Standard_Real U, gp_Pnt& P, gp_Vec& V1, gp_Vec& V2); //! Returns the point P of parameter U, the first, the second //! and the third derivative. //! Raised if the continuity of the current interval //! is not C3. - static void D3 (const Handle(Adaptor3d_HCurve)& C, const Standard_Real U, gp_Pnt& P, gp_Vec& V1, gp_Vec& V2, gp_Vec& V3); + static void D3 (const Handle(Adaptor3d_Curve)& C, const Standard_Real U, gp_Pnt& P, gp_Vec& V1, gp_Vec& V2, gp_Vec& V3); //! The returned vector gives the value of the derivative for the @@ -107,32 +93,32 @@ public: //! Raised if the continuity of the current interval //! is not CN. //! Raised if N < 1. - static gp_Vec DN (const Handle(Adaptor3d_HCurve)& C, const Standard_Real U, const Standard_Integer N); + static gp_Vec DN (const Handle(Adaptor3d_Curve)& C, const Standard_Real U, const Standard_Integer N); //! Returns the parametric resolution corresponding //! to the real space resolution . - static Standard_Real Resolution (const Handle(Adaptor3d_HCurve)& C, const Standard_Real R3d); + static Standard_Real Resolution (const Handle(Adaptor3d_Curve)& C, const Standard_Real R3d); //! Returns the type of the curve in the current //! interval : Line, Circle, Ellipse, Hyperbola, //! Parabola, BezierCurve, BSplineCurve, OtherCurve. - static GeomAbs_CurveType GetType (const Handle(Adaptor3d_HCurve)& C); + static GeomAbs_CurveType GetType (const Handle(Adaptor3d_Curve)& C); - static gp_Lin Line (const Handle(Adaptor3d_HCurve)& C); + static gp_Lin Line (const Handle(Adaptor3d_Curve)& C); - static gp_Circ Circle (const Handle(Adaptor3d_HCurve)& C); + static gp_Circ Circle (const Handle(Adaptor3d_Curve)& C); - static gp_Elips Ellipse (const Handle(Adaptor3d_HCurve)& C); + static gp_Elips Ellipse (const Handle(Adaptor3d_Curve)& C); - static gp_Hypr Hyperbola (const Handle(Adaptor3d_HCurve)& C); + static gp_Hypr Hyperbola (const Handle(Adaptor3d_Curve)& C); - static gp_Parab Parabola (const Handle(Adaptor3d_HCurve)& C); + static gp_Parab Parabola (const Handle(Adaptor3d_Curve)& C); - static Handle(Geom_BezierCurve) Bezier (const Handle(Adaptor3d_HCurve)& C); + static Handle(Geom_BezierCurve) Bezier (const Handle(Adaptor3d_Curve)& C); - static Handle(Geom_BSplineCurve) BSpline (const Handle(Adaptor3d_HCurve)& C); + static Handle(Geom_BSplineCurve) BSpline (const Handle(Adaptor3d_Curve)& C); - Standard_EXPORT static Standard_Integer NbSamples (const Handle(Adaptor3d_HCurve)& C, const Standard_Real U0, const Standard_Real U1); + Standard_EXPORT static Standard_Integer NbSamples (const Handle(Adaptor3d_Curve)& C, const Standard_Real U0, const Standard_Real U1); diff --git a/src/BRepBlend/BRepBlend_HCurveTool.lxx b/src/BRepBlend/BRepBlend_HCurveTool.lxx index 9abcc9ddcb..356e16ac7e 100644 --- a/src/BRepBlend/BRepBlend_HCurveTool.lxx +++ b/src/BRepBlend/BRepBlend_HCurveTool.lxx @@ -31,59 +31,59 @@ #include //============================================================ -inline Standard_Real BRepBlend_HCurveTool::FirstParameter (const Handle(Adaptor3d_HCurve)& C) { +inline Standard_Real BRepBlend_HCurveTool::FirstParameter (const Handle(Adaptor3d_Curve)& C) { return(C->FirstParameter()); } //============================================================ -inline Standard_Real BRepBlend_HCurveTool::LastParameter (const Handle(Adaptor3d_HCurve)& C) { +inline Standard_Real BRepBlend_HCurveTool::LastParameter (const Handle(Adaptor3d_Curve)& C) { return(C->LastParameter()); } //============================================================ -inline GeomAbs_Shape BRepBlend_HCurveTool::Continuity (const Handle(Adaptor3d_HCurve)& C) { +inline GeomAbs_Shape BRepBlend_HCurveTool::Continuity (const Handle(Adaptor3d_Curve)& C) { return(C->Continuity()); } //============================================================ -inline Standard_Integer BRepBlend_HCurveTool::NbIntervals(const Handle(Adaptor3d_HCurve)& C,const GeomAbs_Shape Sh) { +inline Standard_Integer BRepBlend_HCurveTool::NbIntervals(const Handle(Adaptor3d_Curve)& C,const GeomAbs_Shape Sh) { return(C->NbIntervals(Sh)); } //============================================================ -inline void BRepBlend_HCurveTool::Intervals(const Handle(Adaptor3d_HCurve)& C, +inline void BRepBlend_HCurveTool::Intervals(const Handle(Adaptor3d_Curve)& C, TColStd_Array1OfReal& Tab, const GeomAbs_Shape Sh) { C->Intervals(Tab,Sh); } //============================================================ -inline Standard_Boolean BRepBlend_HCurveTool::IsClosed(const Handle(Adaptor3d_HCurve)& C) { +inline Standard_Boolean BRepBlend_HCurveTool::IsClosed(const Handle(Adaptor3d_Curve)& C) { return(C->IsClosed()); } //============================================================ -inline Standard_Boolean BRepBlend_HCurveTool::IsPeriodic(const Handle(Adaptor3d_HCurve)& C) { +inline Standard_Boolean BRepBlend_HCurveTool::IsPeriodic(const Handle(Adaptor3d_Curve)& C) { return(C->IsPeriodic()); } //============================================================ -inline Standard_Real BRepBlend_HCurveTool::Period(const Handle(Adaptor3d_HCurve)& C) { +inline Standard_Real BRepBlend_HCurveTool::Period(const Handle(Adaptor3d_Curve)& C) { return(C->Period()); } //============================================================ -inline gp_Pnt BRepBlend_HCurveTool::Value (const Handle(Adaptor3d_HCurve)& C, +inline gp_Pnt BRepBlend_HCurveTool::Value (const Handle(Adaptor3d_Curve)& C, const Standard_Real U) { return(C->Value(U)); } //============================================================ -inline void BRepBlend_HCurveTool::D0(const Handle(Adaptor3d_HCurve)& C, +inline void BRepBlend_HCurveTool::D0(const Handle(Adaptor3d_Curve)& C, const Standard_Real U, gp_Pnt& P) { C->D0(U,P); } //============================================================ -inline void BRepBlend_HCurveTool::D1 (const Handle(Adaptor3d_HCurve)& C, +inline void BRepBlend_HCurveTool::D1 (const Handle(Adaptor3d_Curve)& C, const Standard_Real U, gp_Pnt& P, gp_Vec& T) { C->D1(U,P,T); } //============================================================ -inline void BRepBlend_HCurveTool::D2 (const Handle(Adaptor3d_HCurve)& C, +inline void BRepBlend_HCurveTool::D2 (const Handle(Adaptor3d_Curve)& C, const Standard_Real U, gp_Pnt& P, gp_Vec& T, @@ -92,7 +92,7 @@ inline void BRepBlend_HCurveTool::D2 (const Handle(Adaptor3d_HCurve)& C, C->D2(U,P,T,N); } //============================================================ -inline void BRepBlend_HCurveTool::D3 (const Handle(Adaptor3d_HCurve)& C, +inline void BRepBlend_HCurveTool::D3 (const Handle(Adaptor3d_Curve)& C, const Standard_Real U, gp_Pnt& P, gp_Vec& V1, @@ -102,47 +102,47 @@ inline void BRepBlend_HCurveTool::D3 (const Handle(Adaptor3d_HCurve)& C, C->D3(U,P,V1,V2,V3); } //============================================================ -inline gp_Vec BRepBlend_HCurveTool::DN (const Handle(Adaptor3d_HCurve)& C, +inline gp_Vec BRepBlend_HCurveTool::DN (const Handle(Adaptor3d_Curve)& C, const Standard_Real U, const Standard_Integer N) { return(C->DN(U,N)); } //============================================================ -inline Standard_Real BRepBlend_HCurveTool::Resolution(const Handle(Adaptor3d_HCurve)& C, +inline Standard_Real BRepBlend_HCurveTool::Resolution(const Handle(Adaptor3d_Curve)& C, const Standard_Real R3d) { return(C->Resolution(R3d)); } //============================================================ -inline GeomAbs_CurveType BRepBlend_HCurveTool::GetType(const Handle(Adaptor3d_HCurve)& C) { +inline GeomAbs_CurveType BRepBlend_HCurveTool::GetType(const Handle(Adaptor3d_Curve)& C) { return(C->GetType()); } //============================================================ -inline gp_Lin BRepBlend_HCurveTool::Line (const Handle(Adaptor3d_HCurve)& C) { +inline gp_Lin BRepBlend_HCurveTool::Line (const Handle(Adaptor3d_Curve)& C) { return(C->Line()); } //============================================================ -inline gp_Circ BRepBlend_HCurveTool::Circle (const Handle(Adaptor3d_HCurve)& C) { +inline gp_Circ BRepBlend_HCurveTool::Circle (const Handle(Adaptor3d_Curve)& C) { return(C->Circle()); } //============================================================ -inline gp_Elips BRepBlend_HCurveTool::Ellipse (const Handle(Adaptor3d_HCurve)& C) { +inline gp_Elips BRepBlend_HCurveTool::Ellipse (const Handle(Adaptor3d_Curve)& C) { return(C->Ellipse()); } //============================================================ -inline gp_Parab BRepBlend_HCurveTool::Parabola (const Handle(Adaptor3d_HCurve)& C) { +inline gp_Parab BRepBlend_HCurveTool::Parabola (const Handle(Adaptor3d_Curve)& C) { return(C->Parabola()); } //============================================================ -inline gp_Hypr BRepBlend_HCurveTool::Hyperbola (const Handle(Adaptor3d_HCurve)& C) { +inline gp_Hypr BRepBlend_HCurveTool::Hyperbola (const Handle(Adaptor3d_Curve)& C) { return(C->Hyperbola()); } //============================================================ -inline Handle(Geom_BezierCurve) BRepBlend_HCurveTool::Bezier (const Handle(Adaptor3d_HCurve)& C) { +inline Handle(Geom_BezierCurve) BRepBlend_HCurveTool::Bezier (const Handle(Adaptor3d_Curve)& C) { return(C->Bezier()); } //============================================================ -inline Handle(Geom_BSplineCurve) BRepBlend_HCurveTool::BSpline (const Handle(Adaptor3d_HCurve)& C) { +inline Handle(Geom_BSplineCurve) BRepBlend_HCurveTool::BSpline (const Handle(Adaptor3d_Curve)& C) { return(C->BSpline()); } //============================================================ diff --git a/src/BRepBlend/BRepBlend_PointOnRst.cxx b/src/BRepBlend/BRepBlend_PointOnRst.cxx index a1bfa3d646..90815bdfc8 100644 --- a/src/BRepBlend/BRepBlend_PointOnRst.cxx +++ b/src/BRepBlend/BRepBlend_PointOnRst.cxx @@ -12,9 +12,9 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. - -#include #include + +#include #include #include @@ -24,7 +24,7 @@ BRepBlend_PointOnRst::BRepBlend_PointOnRst () } -BRepBlend_PointOnRst::BRepBlend_PointOnRst(const Handle(Adaptor2d_HCurve2d)& A, +BRepBlend_PointOnRst::BRepBlend_PointOnRst(const Handle(Adaptor2d_Curve2d)& A, const Standard_Real Param, const IntSurf_Transition& TLine, const IntSurf_Transition& TArc): @@ -32,7 +32,7 @@ BRepBlend_PointOnRst::BRepBlend_PointOnRst(const Handle(Adaptor2d_HCurve2d)& A, arc(A),traline(TLine),traarc(TArc),prm(Param) {} -void BRepBlend_PointOnRst::SetArc(const Handle(Adaptor2d_HCurve2d)& A, +void BRepBlend_PointOnRst::SetArc(const Handle(Adaptor2d_Curve2d)& A, const Standard_Real Param, const IntSurf_Transition& TLine, const IntSurf_Transition& TArc) diff --git a/src/BRepBlend/BRepBlend_PointOnRst.hxx b/src/BRepBlend/BRepBlend_PointOnRst.hxx index 7efd6e7732..61601a84e1 100644 --- a/src/BRepBlend/BRepBlend_PointOnRst.hxx +++ b/src/BRepBlend/BRepBlend_PointOnRst.hxx @@ -17,17 +17,12 @@ #ifndef _BRepBlend_PointOnRst_HeaderFile #define _BRepBlend_PointOnRst_HeaderFile -#include -#include -#include - +#include #include -#include -class Adaptor2d_HCurve2d; + class Standard_DomainError; class IntSurf_Transition; - //! Definition of an intersection point between a line //! and a restriction on a surface. //! Such a point is contains geometrical information (see @@ -45,15 +40,15 @@ public: //! Creates the PointOnRst on the arc A, at parameter Param, //! with the transition TLine on the walking line, and //! TArc on the arc A. - Standard_EXPORT BRepBlend_PointOnRst(const Handle(Adaptor2d_HCurve2d)& A, const Standard_Real Param, const IntSurf_Transition& TLine, const IntSurf_Transition& TArc); + Standard_EXPORT BRepBlend_PointOnRst(const Handle(Adaptor2d_Curve2d)& A, const Standard_Real Param, const IntSurf_Transition& TLine, const IntSurf_Transition& TArc); //! Sets the values of a point which is on the arc //! A, at parameter Param. - Standard_EXPORT void SetArc (const Handle(Adaptor2d_HCurve2d)& A, const Standard_Real Param, const IntSurf_Transition& TLine, const IntSurf_Transition& TArc); + Standard_EXPORT void SetArc (const Handle(Adaptor2d_Curve2d)& A, const Standard_Real Param, const IntSurf_Transition& TLine, const IntSurf_Transition& TArc); //! Returns the arc of restriction containing the //! vertex. - const Handle(Adaptor2d_HCurve2d)& Arc() const; + const Handle(Adaptor2d_Curve2d)& Arc() const; //! Returns the transition of the point on the //! line on surface. @@ -80,7 +75,7 @@ private: - Handle(Adaptor2d_HCurve2d) arc; + Handle(Adaptor2d_Curve2d) arc; IntSurf_Transition traline; IntSurf_Transition traarc; Standard_Real prm; diff --git a/src/BRepBlend/BRepBlend_PointOnRst.lxx b/src/BRepBlend/BRepBlend_PointOnRst.lxx index fb36b4dce5..b23ec7d5f1 100644 --- a/src/BRepBlend/BRepBlend_PointOnRst.lxx +++ b/src/BRepBlend/BRepBlend_PointOnRst.lxx @@ -14,7 +14,7 @@ #include -inline const Handle(Adaptor2d_HCurve2d)& BRepBlend_PointOnRst::Arc () const +inline const Handle(Adaptor2d_Curve2d)& BRepBlend_PointOnRst::Arc () const { return arc; } diff --git a/src/BRepBlend/BRepBlend_RstRstConstRad.cxx b/src/BRepBlend/BRepBlend_RstRstConstRad.cxx index 9ab45e7091..7ebfde0f53 100644 --- a/src/BRepBlend/BRepBlend_RstRstConstRad.cxx +++ b/src/BRepBlend/BRepBlend_RstRstConstRad.cxx @@ -14,13 +14,13 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. +#include -#include -#include -#include +#include +#include +#include #include #include -#include #include #include #include @@ -60,11 +60,11 @@ static void t3dto2d(Standard_Real& a, //======================================================================= BRepBlend_RstRstConstRad::BRepBlend_RstRstConstRad -(const Handle(Adaptor3d_HSurface)& Surf1, - const Handle(Adaptor2d_HCurve2d)& Rst1, - const Handle(Adaptor3d_HSurface)& Surf2, - const Handle(Adaptor2d_HCurve2d)& Rst2, - const Handle(Adaptor3d_HCurve)& CGuide): +(const Handle(Adaptor3d_Surface)& Surf1, + const Handle(Adaptor2d_Curve2d)& Rst1, + const Handle(Adaptor3d_Surface)& Surf2, + const Handle(Adaptor2d_Curve2d)& Rst2, + const Handle(Adaptor3d_Curve)& CGuide): surf1(Surf1), surf2(Surf2), rst1(Rst1), rst2(Rst2), cons1(Rst1, Surf1), cons2(Rst2, Surf2), guide(CGuide), tguide(CGuide), @@ -155,10 +155,10 @@ Standard_Boolean BRepBlend_RstRstConstRad::Values(const math_Vector& X, //purpose : //======================================================================= -void BRepBlend_RstRstConstRad::Set(const Handle(Adaptor3d_HSurface)& SurfRef1, - const Handle(Adaptor2d_HCurve2d)& RstRef1, - const Handle(Adaptor3d_HSurface)& SurfRef2, - const Handle(Adaptor2d_HCurve2d)& RstRef2) +void BRepBlend_RstRstConstRad::Set(const Handle(Adaptor3d_Surface)& SurfRef1, + const Handle(Adaptor2d_Curve2d)& RstRef1, + const Handle(Adaptor3d_Surface)& SurfRef2, + const Handle(Adaptor2d_Curve2d)& RstRef2) { surfref1 = SurfRef1; surfref2 = SurfRef2; diff --git a/src/BRepBlend/BRepBlend_RstRstConstRad.hxx b/src/BRepBlend/BRepBlend_RstRstConstRad.hxx index 0174b282a4..de8221a068 100644 --- a/src/BRepBlend/BRepBlend_RstRstConstRad.hxx +++ b/src/BRepBlend/BRepBlend_RstRstConstRad.hxx @@ -17,18 +17,12 @@ #ifndef _BRepBlend_RstRstConstRad_HeaderFile #define _BRepBlend_RstRstConstRad_HeaderFile -#include -#include -#include - +#include #include #include #include -#include -#include #include #include -#include #include #include #include @@ -41,14 +35,8 @@ #include #include #include -class Adaptor3d_HSurface; -class Adaptor2d_HCurve2d; -class Adaptor3d_HCurve; + class math_Matrix; -class gp_Pnt; -class gp_Pnt2d; -class gp_Vec; -class gp_Vec2d; class gp_Circ; class Blend_Point; @@ -62,7 +50,7 @@ public: DEFINE_STANDARD_ALLOC - Standard_EXPORT BRepBlend_RstRstConstRad(const Handle(Adaptor3d_HSurface)& Surf1, const Handle(Adaptor2d_HCurve2d)& Rst1, const Handle(Adaptor3d_HSurface)& Surf2, const Handle(Adaptor2d_HCurve2d)& Rst2, const Handle(Adaptor3d_HCurve)& CGuide); + Standard_EXPORT BRepBlend_RstRstConstRad(const Handle(Adaptor3d_Surface)& Surf1, const Handle(Adaptor2d_Curve2d)& Rst1, const Handle(Adaptor3d_Surface)& Surf2, const Handle(Adaptor2d_Curve2d)& Rst2, const Handle(Adaptor3d_Curve)& CGuide); //! Returns 2. Standard_EXPORT Standard_Integer NbVariables() const Standard_OVERRIDE; @@ -88,7 +76,7 @@ public: //! False otherwise. Standard_EXPORT Standard_Boolean Values (const math_Vector& X, math_Vector& F, math_Matrix& D) Standard_OVERRIDE; - Standard_EXPORT void Set (const Handle(Adaptor3d_HSurface)& SurfRef1, const Handle(Adaptor2d_HCurve2d)& RstRef1, const Handle(Adaptor3d_HSurface)& SurfRef2, const Handle(Adaptor2d_HCurve2d)& RstRef2); + Standard_EXPORT void Set (const Handle(Adaptor3d_Surface)& SurfRef1, const Handle(Adaptor2d_Curve2d)& RstRef1, const Handle(Adaptor3d_Surface)& SurfRef2, const Handle(Adaptor2d_Curve2d)& RstRef2); Standard_EXPORT void Set (const Standard_Real Param) Standard_OVERRIDE; @@ -209,14 +197,14 @@ private: - Handle(Adaptor3d_HSurface) surf1; - Handle(Adaptor3d_HSurface) surf2; - Handle(Adaptor2d_HCurve2d) rst1; - Handle(Adaptor2d_HCurve2d) rst2; + Handle(Adaptor3d_Surface) surf1; + Handle(Adaptor3d_Surface) surf2; + Handle(Adaptor2d_Curve2d) rst1; + Handle(Adaptor2d_Curve2d) rst2; Adaptor3d_CurveOnSurface cons1; Adaptor3d_CurveOnSurface cons2; - Handle(Adaptor3d_HCurve) guide; - Handle(Adaptor3d_HCurve) tguide; + Handle(Adaptor3d_Curve) guide; + Handle(Adaptor3d_Curve) tguide; gp_Pnt ptrst1; gp_Pnt ptrst2; gp_Pnt2d pt2drst1; @@ -236,10 +224,10 @@ private: gp_Vec nplan; Standard_Real normtg; Standard_Real theD; - Handle(Adaptor3d_HSurface) surfref1; - Handle(Adaptor2d_HCurve2d) rstref1; - Handle(Adaptor3d_HSurface) surfref2; - Handle(Adaptor2d_HCurve2d) rstref2; + Handle(Adaptor3d_Surface) surfref1; + Handle(Adaptor2d_Curve2d) rstref1; + Handle(Adaptor3d_Surface) surfref2; + Handle(Adaptor2d_Curve2d) rstref2; Standard_Real maxang; Standard_Real minang; Standard_Real distmin; diff --git a/src/BRepBlend/BRepBlend_RstRstEvolRad.cxx b/src/BRepBlend/BRepBlend_RstRstEvolRad.cxx index 4a7a50ae6c..034bc2f5de 100644 --- a/src/BRepBlend/BRepBlend_RstRstEvolRad.cxx +++ b/src/BRepBlend/BRepBlend_RstRstEvolRad.cxx @@ -14,13 +14,13 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. +#include -#include -#include -#include +#include +#include +#include #include #include -#include #include #include #include @@ -119,11 +119,11 @@ static void FusionneIntervalles(const TColStd_Array1OfReal& I1, //======================================================================= BRepBlend_RstRstEvolRad::BRepBlend_RstRstEvolRad -(const Handle(Adaptor3d_HSurface)& Surf1, - const Handle(Adaptor2d_HCurve2d)& Rst1, - const Handle(Adaptor3d_HSurface)& Surf2, - const Handle(Adaptor2d_HCurve2d)& Rst2, - const Handle(Adaptor3d_HCurve)& CGuide, +(const Handle(Adaptor3d_Surface)& Surf1, + const Handle(Adaptor2d_Curve2d)& Rst1, + const Handle(Adaptor3d_Surface)& Surf2, + const Handle(Adaptor2d_Curve2d)& Rst2, + const Handle(Adaptor3d_Curve)& CGuide, const Handle(Law_Function)& Evol): surf1(Surf1), surf2(Surf2), rst1(Rst1), rst2(Rst2), cons1(Rst1, Surf1), cons2(Rst2, Surf2), @@ -215,10 +215,10 @@ Standard_Boolean BRepBlend_RstRstEvolRad::Values(const math_Vector& X, //purpose : //======================================================================= -void BRepBlend_RstRstEvolRad::Set(const Handle(Adaptor3d_HSurface)& SurfRef1, - const Handle(Adaptor2d_HCurve2d)& RstRef1, - const Handle(Adaptor3d_HSurface)& SurfRef2, - const Handle(Adaptor2d_HCurve2d)& RstRef2) +void BRepBlend_RstRstEvolRad::Set(const Handle(Adaptor3d_Surface)& SurfRef1, + const Handle(Adaptor2d_Curve2d)& RstRef1, + const Handle(Adaptor3d_Surface)& SurfRef2, + const Handle(Adaptor2d_Curve2d)& RstRef2) { surfref1 = SurfRef1; surfref2 = SurfRef2; diff --git a/src/BRepBlend/BRepBlend_RstRstEvolRad.hxx b/src/BRepBlend/BRepBlend_RstRstEvolRad.hxx index 44e8d5edda..10aa7da64c 100644 --- a/src/BRepBlend/BRepBlend_RstRstEvolRad.hxx +++ b/src/BRepBlend/BRepBlend_RstRstEvolRad.hxx @@ -17,18 +17,12 @@ #ifndef _BRepBlend_RstRstEvolRad_HeaderFile #define _BRepBlend_RstRstEvolRad_HeaderFile -#include -#include -#include - #include +#include #include #include -#include -#include #include #include -#include #include #include #include @@ -41,15 +35,9 @@ #include #include #include -class Adaptor3d_HSurface; -class Adaptor2d_HCurve2d; -class Adaptor3d_HCurve; + class Law_Function; class math_Matrix; -class gp_Pnt; -class gp_Pnt2d; -class gp_Vec; -class gp_Vec2d; class gp_Circ; class Blend_Point; @@ -63,7 +51,7 @@ public: DEFINE_STANDARD_ALLOC - Standard_EXPORT BRepBlend_RstRstEvolRad(const Handle(Adaptor3d_HSurface)& Surf1, const Handle(Adaptor2d_HCurve2d)& Rst1, const Handle(Adaptor3d_HSurface)& Surf2, const Handle(Adaptor2d_HCurve2d)& Rst2, const Handle(Adaptor3d_HCurve)& CGuide, const Handle(Law_Function)& Evol); + Standard_EXPORT BRepBlend_RstRstEvolRad(const Handle(Adaptor3d_Surface)& Surf1, const Handle(Adaptor2d_Curve2d)& Rst1, const Handle(Adaptor3d_Surface)& Surf2, const Handle(Adaptor2d_Curve2d)& Rst2, const Handle(Adaptor3d_Curve)& CGuide, const Handle(Law_Function)& Evol); //! Returns 2. Standard_EXPORT Standard_Integer NbVariables() const Standard_OVERRIDE; @@ -89,7 +77,7 @@ public: //! False otherwise. Standard_EXPORT Standard_Boolean Values (const math_Vector& X, math_Vector& F, math_Matrix& D) Standard_OVERRIDE; - Standard_EXPORT void Set (const Handle(Adaptor3d_HSurface)& SurfRef1, const Handle(Adaptor2d_HCurve2d)& RstRef1, const Handle(Adaptor3d_HSurface)& SurfRef2, const Handle(Adaptor2d_HCurve2d)& RstRef2); + Standard_EXPORT void Set (const Handle(Adaptor3d_Surface)& SurfRef1, const Handle(Adaptor2d_Curve2d)& RstRef1, const Handle(Adaptor3d_Surface)& SurfRef2, const Handle(Adaptor2d_Curve2d)& RstRef2); Standard_EXPORT void Set (const Standard_Real Param) Standard_OVERRIDE; @@ -210,14 +198,14 @@ private: - Handle(Adaptor3d_HSurface) surf1; - Handle(Adaptor3d_HSurface) surf2; - Handle(Adaptor2d_HCurve2d) rst1; - Handle(Adaptor2d_HCurve2d) rst2; + Handle(Adaptor3d_Surface) surf1; + Handle(Adaptor3d_Surface) surf2; + Handle(Adaptor2d_Curve2d) rst1; + Handle(Adaptor2d_Curve2d) rst2; Adaptor3d_CurveOnSurface cons1; Adaptor3d_CurveOnSurface cons2; - Handle(Adaptor3d_HCurve) guide; - Handle(Adaptor3d_HCurve) tguide; + Handle(Adaptor3d_Curve) guide; + Handle(Adaptor3d_Curve) tguide; gp_Pnt ptrst1; gp_Pnt ptrst2; gp_Pnt2d pt2drst1; @@ -238,10 +226,10 @@ private: gp_Vec nplan; Standard_Real normtg; Standard_Real theD; - Handle(Adaptor3d_HSurface) surfref1; - Handle(Adaptor2d_HCurve2d) rstref1; - Handle(Adaptor3d_HSurface) surfref2; - Handle(Adaptor2d_HCurve2d) rstref2; + Handle(Adaptor3d_Surface) surfref1; + Handle(Adaptor2d_Curve2d) rstref1; + Handle(Adaptor3d_Surface) surfref2; + Handle(Adaptor2d_Curve2d) rstref2; Standard_Real maxang; Standard_Real minang; Standard_Real distmin; diff --git a/src/BRepBlend/BRepBlend_RstRstLineBuilder.cxx b/src/BRepBlend/BRepBlend_RstRstLineBuilder.cxx index 03dec64458..63d77a7bb6 100644 --- a/src/BRepBlend/BRepBlend_RstRstLineBuilder.cxx +++ b/src/BRepBlend/BRepBlend_RstRstLineBuilder.cxx @@ -15,8 +15,8 @@ // commercial license or contractual agreement. -#include -#include +#include +#include #include #include #include @@ -168,11 +168,11 @@ static void Drawsect(const Standard_Real param, //======================================================================= BRepBlend_RstRstLineBuilder::BRepBlend_RstRstLineBuilder -(const Handle(Adaptor3d_HSurface)& Surf1, - const Handle(Adaptor2d_HCurve2d)& Rst1, +(const Handle(Adaptor3d_Surface)& Surf1, + const Handle(Adaptor2d_Curve2d)& Rst1, const Handle(Adaptor3d_TopolTool)& Domain1, - const Handle(Adaptor3d_HSurface)& Surf2, - const Handle(Adaptor2d_HCurve2d)& Rst2, + const Handle(Adaptor3d_Surface)& Surf2, + const Handle(Adaptor2d_Curve2d)& Rst2, const Handle(Adaptor3d_TopolTool)& Domain2): done(Standard_False), sol(1, 2), surf1(Surf1), domain1(Domain1), surf2(Surf2), @@ -327,7 +327,7 @@ Standard_Boolean BRepBlend_RstRstLineBuilder::PerformFirstSection math_Vector solinvp1(1, 2), solinvp2(1, 2), solinvrst1(1, 3), solinvrst2(1, 3); Handle(Adaptor3d_HVertex) Vtxp1, Vtxp2, Vtxrst1, Vtxrst2, Vtxc; Standard_Boolean IsVtxp1 = 0, IsVtxp2 = 0, IsVtxrst1 = 0, IsVtxrst2 = 0; - Handle(Adaptor2d_HCurve2d) Arc; + Handle(Adaptor2d_Curve2d) Arc; wp1 = wp2 = wrst1 = wrst2 = Pmax; param = Pdep; Func.Set(param); @@ -1321,7 +1321,7 @@ Standard_Boolean BRepBlend_RstRstLineBuilder::Recadre2(Blend_CurvPointFuncInv& //======================================================================= void BRepBlend_RstRstLineBuilder::Transition(const Standard_Boolean OnFirst, - const Handle(Adaptor2d_HCurve2d)& Arc, + const Handle(Adaptor2d_Curve2d)& Arc, const Standard_Real Param, IntSurf_Transition& TLine, IntSurf_Transition& TArc) @@ -1371,7 +1371,7 @@ void BRepBlend_RstRstLineBuilder::Transition(const Standard_Boolean OnF void BRepBlend_RstRstLineBuilder::MakeExtremity(BRepBlend_Extremity& Extrem, const Standard_Boolean OnFirst, - const Handle(Adaptor2d_HCurve2d)& Arc, + const Handle(Adaptor2d_Curve2d)& Arc, const Standard_Real Param, const Standard_Boolean IsVtx, const Handle(Adaptor3d_HVertex)& Vtx) @@ -1404,7 +1404,7 @@ void BRepBlend_RstRstLineBuilder::MakeExtremity(BRepBlend_Extremity& else { Extrem.SetVertex(Vtx); while (Iter->More()) { - Handle(Adaptor2d_HCurve2d) arc = Iter->Value(); + Handle(Adaptor2d_Curve2d) arc = Iter->Value(); if (arc != Arc) { Iter->Initialize(arc); Iter->InitVertexIterator(); diff --git a/src/BRepBlend/BRepBlend_RstRstLineBuilder.hxx b/src/BRepBlend/BRepBlend_RstRstLineBuilder.hxx index 138704df88..65f117b69d 100644 --- a/src/BRepBlend/BRepBlend_RstRstLineBuilder.hxx +++ b/src/BRepBlend/BRepBlend_RstRstLineBuilder.hxx @@ -17,21 +17,15 @@ #ifndef _BRepBlend_RstRstLineBuilder_HeaderFile #define _BRepBlend_RstRstLineBuilder_HeaderFile -#include -#include -#include - -#include +#include #include -#include #include #include #include #include + class BRepBlend_Line; -class Adaptor3d_HSurface; class Adaptor3d_TopolTool; -class Adaptor2d_HCurve2d; class Blend_RstRstFunction; class Blend_SurfCurvFuncInv; class Blend_CurvPointFuncInv; @@ -77,7 +71,7 @@ public: DEFINE_STANDARD_ALLOC - Standard_EXPORT BRepBlend_RstRstLineBuilder(const Handle(Adaptor3d_HSurface)& Surf1, const Handle(Adaptor2d_HCurve2d)& Rst1, const Handle(Adaptor3d_TopolTool)& Domain1, const Handle(Adaptor3d_HSurface)& Surf2, const Handle(Adaptor2d_HCurve2d)& Rst2, const Handle(Adaptor3d_TopolTool)& Domain2); + Standard_EXPORT BRepBlend_RstRstLineBuilder(const Handle(Adaptor3d_Surface)& Surf1, const Handle(Adaptor2d_Curve2d)& Rst1, const Handle(Adaptor3d_TopolTool)& Domain1, const Handle(Adaptor3d_Surface)& Surf2, const Handle(Adaptor2d_Curve2d)& Rst2, const Handle(Adaptor3d_TopolTool)& Domain2); Standard_EXPORT void Perform (Blend_RstRstFunction& Func, Blend_SurfCurvFuncInv& Finv1, Blend_CurvPointFuncInv& FinvP1, Blend_SurfCurvFuncInv& Finv2, Blend_CurvPointFuncInv& FinvP2, const Standard_Real Pdep, const Standard_Real Pmax, const Standard_Real MaxStep, const Standard_Real TolGuide, const math_Vector& Soldep, const Standard_Real Tolesp, const Standard_Real Fleche, const Standard_Boolean Appro = Standard_False); @@ -119,9 +113,9 @@ private: Standard_EXPORT Standard_Boolean Recadre2 (Blend_CurvPointFuncInv& FinvP, math_Vector& Solinv, Standard_Boolean& IsVtx, Handle(Adaptor3d_HVertex)& Vtx); - Standard_EXPORT void Transition (const Standard_Boolean OnFirst, const Handle(Adaptor2d_HCurve2d)& Arc, const Standard_Real Param, IntSurf_Transition& TLine, IntSurf_Transition& TArc); + Standard_EXPORT void Transition (const Standard_Boolean OnFirst, const Handle(Adaptor2d_Curve2d)& Arc, const Standard_Real Param, IntSurf_Transition& TLine, IntSurf_Transition& TArc); - Standard_EXPORT void MakeExtremity (BRepBlend_Extremity& Extrem, const Standard_Boolean OnFirst, const Handle(Adaptor2d_HCurve2d)& Arc, const Standard_Real Param, const Standard_Boolean IsVtx, const Handle(Adaptor3d_HVertex)& Vtx); + Standard_EXPORT void MakeExtremity (BRepBlend_Extremity& Extrem, const Standard_Boolean OnFirst, const Handle(Adaptor2d_Curve2d)& Arc, const Standard_Real Param, const Standard_Boolean IsVtx, const Handle(Adaptor3d_HVertex)& Vtx); Standard_EXPORT Blend_Status CheckDeflectionOnRst1 (const Blend_Point& CurPoint); @@ -135,12 +129,12 @@ private: Standard_Boolean done; Handle(BRepBlend_Line) line; math_Vector sol; - Handle(Adaptor3d_HSurface) surf1; + Handle(Adaptor3d_Surface) surf1; Handle(Adaptor3d_TopolTool) domain1; - Handle(Adaptor3d_HSurface) surf2; + Handle(Adaptor3d_Surface) surf2; Handle(Adaptor3d_TopolTool) domain2; - Handle(Adaptor2d_HCurve2d) rst1; - Handle(Adaptor2d_HCurve2d) rst2; + Handle(Adaptor2d_Curve2d) rst1; + Handle(Adaptor2d_Curve2d) rst2; Standard_Real tolesp; Standard_Real tolgui; Standard_Real pasmax; diff --git a/src/BRepBlend/BRepBlend_SurfCurvConstRadInv.cxx b/src/BRepBlend/BRepBlend_SurfCurvConstRadInv.cxx index 256339bc5f..e855c3ab43 100644 --- a/src/BRepBlend/BRepBlend_SurfCurvConstRadInv.cxx +++ b/src/BRepBlend/BRepBlend_SurfCurvConstRadInv.cxx @@ -15,9 +15,9 @@ // commercial license or contractual agreement. -#include -#include -#include +#include +#include +#include #include #include @@ -26,9 +26,9 @@ //purpose : //======================================================================= BRepBlend_SurfCurvConstRadInv::BRepBlend_SurfCurvConstRadInv -(const Handle(Adaptor3d_HSurface)& S, - const Handle(Adaptor3d_HCurve)& C, - const Handle(Adaptor3d_HCurve)& Cg) +(const Handle(Adaptor3d_Surface)& S, + const Handle(Adaptor3d_Curve)& C, + const Handle(Adaptor3d_Curve)& Cg) : surf(S), curv(C), guide(Cg), @@ -274,7 +274,7 @@ Standard_Boolean BRepBlend_SurfCurvConstRadInv::Values(const math_Vector& X, //purpose : //======================================================================= -void BRepBlend_SurfCurvConstRadInv::Set(const Handle(Adaptor2d_HCurve2d)& Rst) +void BRepBlend_SurfCurvConstRadInv::Set(const Handle(Adaptor2d_Curve2d)& Rst) { rst = Rst; } diff --git a/src/BRepBlend/BRepBlend_SurfCurvConstRadInv.hxx b/src/BRepBlend/BRepBlend_SurfCurvConstRadInv.hxx index 474fe73b95..9853df01a8 100644 --- a/src/BRepBlend/BRepBlend_SurfCurvConstRadInv.hxx +++ b/src/BRepBlend/BRepBlend_SurfCurvConstRadInv.hxx @@ -17,18 +17,10 @@ #ifndef _BRepBlend_SurfCurvConstRadInv_HeaderFile #define _BRepBlend_SurfCurvConstRadInv_HeaderFile -#include -#include -#include - -#include -#include +#include #include -#include #include -class Adaptor3d_HSurface; -class Adaptor3d_HCurve; -class Adaptor2d_HCurve2d; + class math_Matrix; @@ -50,7 +42,7 @@ public: DEFINE_STANDARD_ALLOC - Standard_EXPORT BRepBlend_SurfCurvConstRadInv(const Handle(Adaptor3d_HSurface)& S, const Handle(Adaptor3d_HCurve)& C, const Handle(Adaptor3d_HCurve)& Cg); + Standard_EXPORT BRepBlend_SurfCurvConstRadInv(const Handle(Adaptor3d_Surface)& S, const Handle(Adaptor3d_Curve)& C, const Handle(Adaptor3d_Curve)& Cg); Standard_EXPORT void Set (const Standard_Real R, const Standard_Integer Choix); @@ -76,7 +68,7 @@ public: Standard_EXPORT Standard_Boolean Values (const math_Vector& X, math_Vector& F, math_Matrix& D); //! Set the restriction on which a solution has to be found. - Standard_EXPORT void Set (const Handle(Adaptor2d_HCurve2d)& Rst); + Standard_EXPORT void Set (const Handle(Adaptor2d_Curve2d)& Rst); //! Returns in the vector Tolerance the parametric tolerance //! for each of the 3 variables; @@ -106,10 +98,10 @@ private: - Handle(Adaptor3d_HSurface) surf; - Handle(Adaptor3d_HCurve) curv; - Handle(Adaptor3d_HCurve) guide; - Handle(Adaptor2d_HCurve2d) rst; + Handle(Adaptor3d_Surface) surf; + Handle(Adaptor3d_Curve) curv; + Handle(Adaptor3d_Curve) guide; + Handle(Adaptor2d_Curve2d) rst; Standard_Real ray; Standard_Integer choix; diff --git a/src/BRepBlend/BRepBlend_SurfCurvEvolRadInv.cxx b/src/BRepBlend/BRepBlend_SurfCurvEvolRadInv.cxx index 999010189c..b32d2c2b22 100644 --- a/src/BRepBlend/BRepBlend_SurfCurvEvolRadInv.cxx +++ b/src/BRepBlend/BRepBlend_SurfCurvEvolRadInv.cxx @@ -15,9 +15,9 @@ // commercial license or contractual agreement. -#include -#include -#include +#include +#include +#include #include #include #include @@ -27,9 +27,9 @@ //purpose : //======================================================================= BRepBlend_SurfCurvEvolRadInv::BRepBlend_SurfCurvEvolRadInv -(const Handle(Adaptor3d_HSurface)& S, -const Handle(Adaptor3d_HCurve)& C, -const Handle(Adaptor3d_HCurve)& Cg, +(const Handle(Adaptor3d_Surface)& S, +const Handle(Adaptor3d_Curve)& C, +const Handle(Adaptor3d_Curve)& Cg, const Handle(Law_Function)& Evol): surf(S),curv(C),guide(Cg) { tevol=Evol; } @@ -276,7 +276,7 @@ const Handle(Adaptor3d_HCurve)& Cg, //function : //purpose : //======================================================================= - void BRepBlend_SurfCurvEvolRadInv::Set(const Handle(Adaptor2d_HCurve2d)& Rst) + void BRepBlend_SurfCurvEvolRadInv::Set(const Handle(Adaptor2d_Curve2d)& Rst) { rst = Rst; } diff --git a/src/BRepBlend/BRepBlend_SurfCurvEvolRadInv.hxx b/src/BRepBlend/BRepBlend_SurfCurvEvolRadInv.hxx index e08ee0c121..2115eb0898 100644 --- a/src/BRepBlend/BRepBlend_SurfCurvEvolRadInv.hxx +++ b/src/BRepBlend/BRepBlend_SurfCurvEvolRadInv.hxx @@ -17,18 +17,10 @@ #ifndef _BRepBlend_SurfCurvEvolRadInv_HeaderFile #define _BRepBlend_SurfCurvEvolRadInv_HeaderFile -#include -#include -#include - -#include -#include +#include #include -#include #include -class Adaptor3d_HSurface; -class Adaptor3d_HCurve; -class Adaptor2d_HCurve2d; + class Law_Function; class math_Matrix; @@ -51,7 +43,7 @@ public: DEFINE_STANDARD_ALLOC - Standard_EXPORT BRepBlend_SurfCurvEvolRadInv(const Handle(Adaptor3d_HSurface)& S, const Handle(Adaptor3d_HCurve)& C, const Handle(Adaptor3d_HCurve)& Cg, const Handle(Law_Function)& Evol); + Standard_EXPORT BRepBlend_SurfCurvEvolRadInv(const Handle(Adaptor3d_Surface)& S, const Handle(Adaptor3d_Curve)& C, const Handle(Adaptor3d_Curve)& Cg, const Handle(Law_Function)& Evol); Standard_EXPORT void Set (const Standard_Integer Choix); @@ -77,7 +69,7 @@ public: Standard_EXPORT Standard_Boolean Values (const math_Vector& X, math_Vector& F, math_Matrix& D); //! Set the restriction on which a solution has to be found. - Standard_EXPORT void Set (const Handle(Adaptor2d_HCurve2d)& Rst); + Standard_EXPORT void Set (const Handle(Adaptor2d_Curve2d)& Rst); //! Returns in the vector Tolerance the parametric tolerance //! for each of the 3 variables; @@ -107,10 +99,10 @@ private: - Handle(Adaptor3d_HSurface) surf; - Handle(Adaptor3d_HCurve) curv; - Handle(Adaptor3d_HCurve) guide; - Handle(Adaptor2d_HCurve2d) rst; + Handle(Adaptor3d_Surface) surf; + Handle(Adaptor3d_Curve) curv; + Handle(Adaptor3d_Curve) guide; + Handle(Adaptor2d_Curve2d) rst; Standard_Real ray; Standard_Integer choix; Handle(Law_Function) tevol; diff --git a/src/BRepBlend/BRepBlend_SurfPointConstRadInv.cxx b/src/BRepBlend/BRepBlend_SurfPointConstRadInv.cxx index bf99fa0271..933b58e942 100644 --- a/src/BRepBlend/BRepBlend_SurfPointConstRadInv.cxx +++ b/src/BRepBlend/BRepBlend_SurfPointConstRadInv.cxx @@ -15,8 +15,8 @@ // commercial license or contractual agreement. -#include -#include +#include +#include #include #include #include @@ -26,8 +26,8 @@ //purpose : //======================================================================= BRepBlend_SurfPointConstRadInv::BRepBlend_SurfPointConstRadInv -(const Handle(Adaptor3d_HSurface)& S, - const Handle(Adaptor3d_HCurve)& C) +(const Handle(Adaptor3d_Surface)& S, + const Handle(Adaptor3d_Curve)& C) : surf(S), curv(C), ray(0.0), diff --git a/src/BRepBlend/BRepBlend_SurfPointConstRadInv.hxx b/src/BRepBlend/BRepBlend_SurfPointConstRadInv.hxx index fddaef74c8..775382a189 100644 --- a/src/BRepBlend/BRepBlend_SurfPointConstRadInv.hxx +++ b/src/BRepBlend/BRepBlend_SurfPointConstRadInv.hxx @@ -17,21 +17,12 @@ #ifndef _BRepBlend_SurfPointConstRadInv_HeaderFile #define _BRepBlend_SurfPointConstRadInv_HeaderFile -#include -#include -#include - +#include #include -#include -#include #include -#include #include -class Adaptor3d_HSurface; -class Adaptor3d_HCurve; -class math_Matrix; -class gp_Pnt; +class math_Matrix; //! Function of reframing between a point and a surface. //! This function is used to find a solution on a done @@ -49,7 +40,7 @@ public: DEFINE_STANDARD_ALLOC - Standard_EXPORT BRepBlend_SurfPointConstRadInv(const Handle(Adaptor3d_HSurface)& S, const Handle(Adaptor3d_HCurve)& C); + Standard_EXPORT BRepBlend_SurfPointConstRadInv(const Handle(Adaptor3d_Surface)& S, const Handle(Adaptor3d_Curve)& C); Standard_EXPORT void Set (const Standard_Real R, const Standard_Integer Choix); @@ -105,8 +96,8 @@ private: - Handle(Adaptor3d_HSurface) surf; - Handle(Adaptor3d_HCurve) curv; + Handle(Adaptor3d_Surface) surf; + Handle(Adaptor3d_Curve) curv; gp_Pnt point; Standard_Real ray; Standard_Integer choix; diff --git a/src/BRepBlend/BRepBlend_SurfPointEvolRadInv.cxx b/src/BRepBlend/BRepBlend_SurfPointEvolRadInv.cxx index 5e4380d884..ed48d2b423 100644 --- a/src/BRepBlend/BRepBlend_SurfPointEvolRadInv.cxx +++ b/src/BRepBlend/BRepBlend_SurfPointEvolRadInv.cxx @@ -15,8 +15,8 @@ // commercial license or contractual agreement. -#include -#include +#include +#include #include #include #include @@ -27,8 +27,8 @@ //purpose : //======================================================================= BRepBlend_SurfPointEvolRadInv::BRepBlend_SurfPointEvolRadInv -(const Handle(Adaptor3d_HSurface)& S, -const Handle(Adaptor3d_HCurve)& C, +(const Handle(Adaptor3d_Surface)& S, +const Handle(Adaptor3d_Curve)& C, const Handle(Law_Function)& Evol ) : surf(S), curv(C) { tevol=Evol; diff --git a/src/BRepBlend/BRepBlend_SurfPointEvolRadInv.hxx b/src/BRepBlend/BRepBlend_SurfPointEvolRadInv.hxx index 56647390c8..4356b08f91 100644 --- a/src/BRepBlend/BRepBlend_SurfPointEvolRadInv.hxx +++ b/src/BRepBlend/BRepBlend_SurfPointEvolRadInv.hxx @@ -17,21 +17,13 @@ #ifndef _BRepBlend_SurfPointEvolRadInv_HeaderFile #define _BRepBlend_SurfPointEvolRadInv_HeaderFile -#include -#include -#include - +#include #include -#include -#include #include -#include #include -class Adaptor3d_HSurface; -class Adaptor3d_HCurve; + class Law_Function; class math_Matrix; -class gp_Pnt; //! Function of reframing between a point and a surface. @@ -50,7 +42,7 @@ public: DEFINE_STANDARD_ALLOC - Standard_EXPORT BRepBlend_SurfPointEvolRadInv(const Handle(Adaptor3d_HSurface)& S, const Handle(Adaptor3d_HCurve)& C, const Handle(Law_Function)& Evol); + Standard_EXPORT BRepBlend_SurfPointEvolRadInv(const Handle(Adaptor3d_Surface)& S, const Handle(Adaptor3d_Curve)& C, const Handle(Law_Function)& Evol); Standard_EXPORT void Set (const Standard_Integer Choix); @@ -106,8 +98,8 @@ private: - Handle(Adaptor3d_HSurface) surf; - Handle(Adaptor3d_HCurve) curv; + Handle(Adaptor3d_Surface) surf; + Handle(Adaptor3d_Curve) curv; gp_Pnt point; Standard_Real ray; Standard_Integer choix; diff --git a/src/BRepBlend/BRepBlend_SurfRstConstRad.cxx b/src/BRepBlend/BRepBlend_SurfRstConstRad.cxx index a984ea7050..1e878dec20 100644 --- a/src/BRepBlend/BRepBlend_SurfRstConstRad.cxx +++ b/src/BRepBlend/BRepBlend_SurfRstConstRad.cxx @@ -15,9 +15,9 @@ // commercial license or contractual agreement. -#include -#include -#include +#include +#include +#include #include #include #include @@ -60,10 +60,10 @@ static void t3dto2d(Standard_Real& a, //======================================================================= BRepBlend_SurfRstConstRad::BRepBlend_SurfRstConstRad -(const Handle(Adaptor3d_HSurface)& Surf, - const Handle(Adaptor3d_HSurface)& SurfRst, - const Handle(Adaptor2d_HCurve2d)& Rst, - const Handle(Adaptor3d_HCurve)& CGuide): +(const Handle(Adaptor3d_Surface)& Surf, + const Handle(Adaptor3d_Surface)& SurfRst, + const Handle(Adaptor2d_Curve2d)& Rst, + const Handle(Adaptor3d_Curve)& CGuide): surf(Surf), surfrst(SurfRst), rst(Rst), cons(Rst,SurfRst), guide(CGuide), tguide(CGuide), prmrst(0.0), istangent(Standard_True), @@ -259,8 +259,8 @@ Standard_Boolean BRepBlend_SurfRstConstRad::Values(const math_Vector& X, //purpose : //======================================================================= -void BRepBlend_SurfRstConstRad::Set(const Handle(Adaptor3d_HSurface)& SurfRef, - const Handle(Adaptor2d_HCurve2d)& RstRef) +void BRepBlend_SurfRstConstRad::Set(const Handle(Adaptor3d_Surface)& SurfRef, + const Handle(Adaptor2d_Curve2d)& RstRef) { surfref = SurfRef; rstref = RstRef; diff --git a/src/BRepBlend/BRepBlend_SurfRstConstRad.hxx b/src/BRepBlend/BRepBlend_SurfRstConstRad.hxx index 6be5d87de4..a77097fcc6 100644 --- a/src/BRepBlend/BRepBlend_SurfRstConstRad.hxx +++ b/src/BRepBlend/BRepBlend_SurfRstConstRad.hxx @@ -17,18 +17,12 @@ #ifndef _BRepBlend_SurfRstConstRad_HeaderFile #define _BRepBlend_SurfRstConstRad_HeaderFile -#include -#include -#include - +#include #include #include #include -#include -#include #include #include -#include #include #include #include @@ -40,14 +34,8 @@ #include #include #include -class Adaptor3d_HSurface; -class Adaptor2d_HCurve2d; -class Adaptor3d_HCurve; + class math_Matrix; -class gp_Pnt; -class gp_Pnt2d; -class gp_Vec; -class gp_Vec2d; class gp_Circ; class Blend_Point; @@ -61,7 +49,7 @@ public: DEFINE_STANDARD_ALLOC - Standard_EXPORT BRepBlend_SurfRstConstRad(const Handle(Adaptor3d_HSurface)& Surf, const Handle(Adaptor3d_HSurface)& SurfRst, const Handle(Adaptor2d_HCurve2d)& Rst, const Handle(Adaptor3d_HCurve)& CGuide); + Standard_EXPORT BRepBlend_SurfRstConstRad(const Handle(Adaptor3d_Surface)& Surf, const Handle(Adaptor3d_Surface)& SurfRst, const Handle(Adaptor2d_Curve2d)& Rst, const Handle(Adaptor3d_Curve)& CGuide); //! Returns 3. Standard_EXPORT Standard_Integer NbVariables() const Standard_OVERRIDE; @@ -87,7 +75,7 @@ public: //! False otherwise. Standard_EXPORT Standard_Boolean Values (const math_Vector& X, math_Vector& F, math_Matrix& D) Standard_OVERRIDE; - Standard_EXPORT void Set (const Handle(Adaptor3d_HSurface)& SurfRef, const Handle(Adaptor2d_HCurve2d)& RstRef); + Standard_EXPORT void Set (const Handle(Adaptor3d_Surface)& SurfRef, const Handle(Adaptor2d_Curve2d)& RstRef); Standard_EXPORT void Set (const Standard_Real Param) Standard_OVERRIDE; @@ -203,12 +191,12 @@ private: - Handle(Adaptor3d_HSurface) surf; - Handle(Adaptor3d_HSurface) surfrst; - Handle(Adaptor2d_HCurve2d) rst; + Handle(Adaptor3d_Surface) surf; + Handle(Adaptor3d_Surface) surfrst; + Handle(Adaptor2d_Curve2d) rst; Adaptor3d_CurveOnSurface cons; - Handle(Adaptor3d_HCurve) guide; - Handle(Adaptor3d_HCurve) tguide; + Handle(Adaptor3d_Curve) guide; + Handle(Adaptor3d_Curve) tguide; gp_Pnt pts; gp_Pnt ptrst; gp_Pnt2d pt2ds; @@ -227,8 +215,8 @@ private: gp_Vec nplan; Standard_Real normtg; Standard_Real theD; - Handle(Adaptor3d_HSurface) surfref; - Handle(Adaptor2d_HCurve2d) rstref; + Handle(Adaptor3d_Surface) surfref; + Handle(Adaptor2d_Curve2d) rstref; Standard_Real maxang; Standard_Real minang; Standard_Real distmin; diff --git a/src/BRepBlend/BRepBlend_SurfRstEvolRad.cxx b/src/BRepBlend/BRepBlend_SurfRstEvolRad.cxx index ed7a94c0f3..afcb4a4c8b 100644 --- a/src/BRepBlend/BRepBlend_SurfRstEvolRad.cxx +++ b/src/BRepBlend/BRepBlend_SurfRstEvolRad.cxx @@ -15,9 +15,9 @@ // commercial license or contractual agreement. -#include -#include -#include +#include +#include +#include #include #include #include @@ -115,10 +115,10 @@ static void FusionneIntervalles(const TColStd_Array1OfReal& I1, //purpose : Contructor //======================================================================= BRepBlend_SurfRstEvolRad::BRepBlend_SurfRstEvolRad -(const Handle(Adaptor3d_HSurface)& Surf, - const Handle(Adaptor3d_HSurface)& SurfRst, - const Handle(Adaptor2d_HCurve2d)& Rst, - const Handle(Adaptor3d_HCurve)& CGuide, +(const Handle(Adaptor3d_Surface)& Surf, + const Handle(Adaptor3d_Surface)& SurfRst, + const Handle(Adaptor2d_Curve2d)& Rst, + const Handle(Adaptor3d_Curve)& CGuide, const Handle(Law_Function)& Evol): surf(Surf), surfrst(SurfRst), rst(Rst), cons(Rst,SurfRst), @@ -309,8 +309,8 @@ Standard_Boolean BRepBlend_SurfRstEvolRad::Values //purpose : //======================================================================= void BRepBlend_SurfRstEvolRad::Set -(const Handle(Adaptor3d_HSurface)& SurfRef, -const Handle(Adaptor2d_HCurve2d)& RstRef) +(const Handle(Adaptor3d_Surface)& SurfRef, +const Handle(Adaptor2d_Curve2d)& RstRef) { surfref = SurfRef; rstref = RstRef; diff --git a/src/BRepBlend/BRepBlend_SurfRstEvolRad.hxx b/src/BRepBlend/BRepBlend_SurfRstEvolRad.hxx index 5131c85aff..ebdc9b82ae 100644 --- a/src/BRepBlend/BRepBlend_SurfRstEvolRad.hxx +++ b/src/BRepBlend/BRepBlend_SurfRstEvolRad.hxx @@ -17,18 +17,12 @@ #ifndef _BRepBlend_SurfRstEvolRad_HeaderFile #define _BRepBlend_SurfRstEvolRad_HeaderFile -#include -#include -#include - #include +#include #include #include -#include -#include #include #include -#include #include #include #include @@ -40,15 +34,9 @@ #include #include #include -class Adaptor3d_HSurface; -class Adaptor2d_HCurve2d; -class Adaptor3d_HCurve; + class Law_Function; class math_Matrix; -class gp_Pnt; -class gp_Pnt2d; -class gp_Vec; -class gp_Vec2d; class gp_Circ; class Blend_Point; @@ -62,7 +50,7 @@ public: DEFINE_STANDARD_ALLOC - Standard_EXPORT BRepBlend_SurfRstEvolRad(const Handle(Adaptor3d_HSurface)& Surf, const Handle(Adaptor3d_HSurface)& SurfRst, const Handle(Adaptor2d_HCurve2d)& Rst, const Handle(Adaptor3d_HCurve)& CGuide, const Handle(Law_Function)& Evol); + Standard_EXPORT BRepBlend_SurfRstEvolRad(const Handle(Adaptor3d_Surface)& Surf, const Handle(Adaptor3d_Surface)& SurfRst, const Handle(Adaptor2d_Curve2d)& Rst, const Handle(Adaptor3d_Curve)& CGuide, const Handle(Law_Function)& Evol); //! Returns 3. Standard_EXPORT Standard_Integer NbVariables() const Standard_OVERRIDE; @@ -88,7 +76,7 @@ public: //! False otherwise. Standard_EXPORT Standard_Boolean Values (const math_Vector& X, math_Vector& F, math_Matrix& D) Standard_OVERRIDE; - Standard_EXPORT void Set (const Handle(Adaptor3d_HSurface)& SurfRef, const Handle(Adaptor2d_HCurve2d)& RstRef); + Standard_EXPORT void Set (const Handle(Adaptor3d_Surface)& SurfRef, const Handle(Adaptor2d_Curve2d)& RstRef); Standard_EXPORT void Set (const Standard_Real Param) Standard_OVERRIDE; @@ -202,12 +190,12 @@ private: - Handle(Adaptor3d_HSurface) surf; - Handle(Adaptor3d_HSurface) surfrst; - Handle(Adaptor2d_HCurve2d) rst; + Handle(Adaptor3d_Surface) surf; + Handle(Adaptor3d_Surface) surfrst; + Handle(Adaptor2d_Curve2d) rst; Adaptor3d_CurveOnSurface cons; - Handle(Adaptor3d_HCurve) guide; - Handle(Adaptor3d_HCurve) tguide; + Handle(Adaptor3d_Curve) guide; + Handle(Adaptor3d_Curve) tguide; gp_Pnt pts; gp_Pnt ptrst; gp_Pnt2d pt2ds; @@ -227,8 +215,8 @@ private: gp_Vec nplan; Standard_Real normtg; Standard_Real theD; - Handle(Adaptor3d_HSurface) surfref; - Handle(Adaptor2d_HCurve2d) rstref; + Handle(Adaptor3d_Surface) surfref; + Handle(Adaptor2d_Curve2d) rstref; Standard_Real maxang; Standard_Real minang; Standard_Real distmin; diff --git a/src/BRepBlend/BRepBlend_SurfRstLineBuilder.cxx b/src/BRepBlend/BRepBlend_SurfRstLineBuilder.cxx index 449335133e..98c7af553d 100644 --- a/src/BRepBlend/BRepBlend_SurfRstLineBuilder.cxx +++ b/src/BRepBlend/BRepBlend_SurfRstLineBuilder.cxx @@ -15,8 +15,8 @@ // commercial license or contractual agreement. -#include -#include +#include +#include #include #include #include @@ -207,10 +207,10 @@ Standard_Integer BRepBlend_SurfRstLineBuilder:: //======================================================================= BRepBlend_SurfRstLineBuilder::BRepBlend_SurfRstLineBuilder -(const Handle(Adaptor3d_HSurface)& Surf1, +(const Handle(Adaptor3d_Surface)& Surf1, const Handle(Adaptor3d_TopolTool)& Domain1, - const Handle(Adaptor3d_HSurface)& Surf2, - const Handle(Adaptor2d_HCurve2d)& Rst, + const Handle(Adaptor3d_Surface)& Surf2, + const Handle(Adaptor2d_Curve2d)& Rst, const Handle(Adaptor3d_TopolTool)& Domain2): done(Standard_False), sol(1, 3), surf1(Surf1), domain1(Domain1), surf2(Surf2), rst(Rst), @@ -362,7 +362,7 @@ Standard_Boolean BRepBlend_SurfRstLineBuilder::PerformFirstSection math_Vector solinvp(1,3),solinvrst(1,4),solinvs(1,3); Handle(Adaptor3d_HVertex) Vtxp,Vtxrst,Vtxs,Vtxc; Standard_Boolean IsVtxp = 0,IsVtxrst = 0,IsVtxs = 0; - Handle(Adaptor2d_HCurve2d) Arc; + Handle(Adaptor2d_Curve2d) Arc; wp = wrst = ws = Pmax; param = Pdep; Func.Set(param); @@ -536,7 +536,7 @@ void BRepBlend_SurfRstLineBuilder::InternalPerform(Blend_SurfRstFunction& Func, Handle(Adaptor3d_HVertex) Vtxp,Vtxrst,Vtxs,Vtxc; Standard_Boolean IsVtxp = 0,IsVtxrst = 0,IsVtxs = 0; BRepBlend_Extremity Extrst,Exts; - Handle(Adaptor2d_HCurve2d) Arc; + Handle(Adaptor2d_Curve2d) Arc; //IntSurf_Transition Tline,Tarc; @@ -917,7 +917,7 @@ void BRepBlend_SurfRstLineBuilder::InternalPerform(Blend_SurfRstFunction& Func, Standard_Boolean BRepBlend_SurfRstLineBuilder::Recadre(Blend_SurfCurvFuncInv& FinvC, math_Vector& Solinv, - Handle(Adaptor2d_HCurve2d)& Arc, + Handle(Adaptor2d_Curve2d)& Arc, Standard_Boolean& IsVtx, Handle(Adaptor3d_HVertex)& Vtx) { @@ -1180,7 +1180,7 @@ Standard_Boolean BRepBlend_SurfRstLineBuilder::Recadre(Blend_SurfPointFuncInv& //======================================================================= void BRepBlend_SurfRstLineBuilder::Transition(const Standard_Boolean OnFirst, - const Handle(Adaptor2d_HCurve2d)& Arc, + const Handle(Adaptor2d_Curve2d)& Arc, const Standard_Real Param, IntSurf_Transition& TLine, IntSurf_Transition& TArc) @@ -1230,7 +1230,7 @@ void BRepBlend_SurfRstLineBuilder::Transition(const Standard_Boolean On void BRepBlend_SurfRstLineBuilder::MakeExtremity(BRepBlend_Extremity& Extrem, const Standard_Boolean OnFirst, - const Handle(Adaptor2d_HCurve2d)& Arc, + const Handle(Adaptor2d_Curve2d)& Arc, const Standard_Real Param, const Standard_Boolean IsVtx, const Handle(Adaptor3d_HVertex)& Vtx) @@ -1263,7 +1263,7 @@ void BRepBlend_SurfRstLineBuilder::MakeExtremity(BRepBlend_Extremity& else { Extrem.SetVertex(Vtx); while (Iter->More()) { - Handle(Adaptor2d_HCurve2d) arc = Iter->Value(); + Handle(Adaptor2d_Curve2d) arc = Iter->Value(); if (arc != Arc) { Iter->Initialize(arc); Iter->InitVertexIterator(); diff --git a/src/BRepBlend/BRepBlend_SurfRstLineBuilder.hxx b/src/BRepBlend/BRepBlend_SurfRstLineBuilder.hxx index 62c2330b83..77b03dce45 100644 --- a/src/BRepBlend/BRepBlend_SurfRstLineBuilder.hxx +++ b/src/BRepBlend/BRepBlend_SurfRstLineBuilder.hxx @@ -17,21 +17,14 @@ #ifndef _BRepBlend_SurfRstLineBuilder_HeaderFile #define _BRepBlend_SurfRstLineBuilder_HeaderFile -#include -#include -#include - -#include +#include #include -#include #include -#include #include #include + class BRepBlend_Line; -class Adaptor3d_HSurface; class Adaptor3d_TopolTool; -class Adaptor2d_HCurve2d; class Blend_SurfRstFunction; class Blend_FuncInv; class Blend_SurfPointFuncInv; @@ -42,7 +35,6 @@ class IntSurf_Transition; class BRepBlend_Extremity; class Blend_Point; - //! This class processes data resulting from //! Blend_CSWalking taking in consideration the Surface //! supporting the curve to detect the breakpoint. @@ -78,7 +70,7 @@ public: DEFINE_STANDARD_ALLOC - Standard_EXPORT BRepBlend_SurfRstLineBuilder(const Handle(Adaptor3d_HSurface)& Surf1, const Handle(Adaptor3d_TopolTool)& Domain1, const Handle(Adaptor3d_HSurface)& Surf2, const Handle(Adaptor2d_HCurve2d)& Rst, const Handle(Adaptor3d_TopolTool)& Domain2); + Standard_EXPORT BRepBlend_SurfRstLineBuilder(const Handle(Adaptor3d_Surface)& Surf1, const Handle(Adaptor3d_TopolTool)& Domain1, const Handle(Adaptor3d_Surface)& Surf2, const Handle(Adaptor2d_Curve2d)& Rst, const Handle(Adaptor3d_TopolTool)& Domain2); Standard_EXPORT void Perform (Blend_SurfRstFunction& Func, Blend_FuncInv& Finv, Blend_SurfPointFuncInv& FinvP, Blend_SurfCurvFuncInv& FinvC, const Standard_Real Pdep, const Standard_Real Pmax, const Standard_Real MaxStep, const Standard_Real TolGuide, const math_Vector& Soldep, const Standard_Real Tolesp, const Standard_Real Fleche, const Standard_Boolean Appro = Standard_False); @@ -110,15 +102,15 @@ private: Standard_EXPORT void InternalPerform (Blend_SurfRstFunction& Func, Blend_FuncInv& Finv, Blend_SurfPointFuncInv& FinvP, Blend_SurfCurvFuncInv& FinvC, const Standard_Real Bound); - Standard_EXPORT Standard_Boolean Recadre (Blend_SurfCurvFuncInv& FinvC, math_Vector& Solinv, Handle(Adaptor2d_HCurve2d)& Arc, Standard_Boolean& IsVtx, Handle(Adaptor3d_HVertex)& Vtx); + Standard_EXPORT Standard_Boolean Recadre (Blend_SurfCurvFuncInv& FinvC, math_Vector& Solinv, Handle(Adaptor2d_Curve2d)& Arc, Standard_Boolean& IsVtx, Handle(Adaptor3d_HVertex)& Vtx); Standard_EXPORT Standard_Boolean Recadre (Blend_SurfRstFunction& Func, Blend_FuncInv& Finv, math_Vector& Solinv, Standard_Boolean& IsVtx, Handle(Adaptor3d_HVertex)& Vtx); Standard_EXPORT Standard_Boolean Recadre (Blend_SurfPointFuncInv& FinvP, math_Vector& Solinv, Standard_Boolean& IsVtx, Handle(Adaptor3d_HVertex)& Vtx); - Standard_EXPORT void Transition (const Standard_Boolean OnFirst, const Handle(Adaptor2d_HCurve2d)& Arc, const Standard_Real Param, IntSurf_Transition& TLine, IntSurf_Transition& TArc); + Standard_EXPORT void Transition (const Standard_Boolean OnFirst, const Handle(Adaptor2d_Curve2d)& Arc, const Standard_Real Param, IntSurf_Transition& TLine, IntSurf_Transition& TArc); - Standard_EXPORT void MakeExtremity (BRepBlend_Extremity& Extrem, const Standard_Boolean OnFirst, const Handle(Adaptor2d_HCurve2d)& Arc, const Standard_Real Param, const Standard_Boolean IsVtx, const Handle(Adaptor3d_HVertex)& Vtx); + Standard_EXPORT void MakeExtremity (BRepBlend_Extremity& Extrem, const Standard_Boolean OnFirst, const Handle(Adaptor2d_Curve2d)& Arc, const Standard_Real Param, const Standard_Boolean IsVtx, const Handle(Adaptor3d_HVertex)& Vtx); Standard_EXPORT Blend_Status CheckDeflectionOnSurf (const Blend_Point& CurPoint); @@ -132,10 +124,10 @@ private: Standard_Boolean done; Handle(BRepBlend_Line) line; math_Vector sol; - Handle(Adaptor3d_HSurface) surf1; + Handle(Adaptor3d_Surface) surf1; Handle(Adaptor3d_TopolTool) domain1; - Handle(Adaptor3d_HSurface) surf2; - Handle(Adaptor2d_HCurve2d) rst; + Handle(Adaptor3d_Surface) surf2; + Handle(Adaptor2d_Curve2d) rst; Handle(Adaptor3d_TopolTool) domain2; Standard_Real tolesp; Standard_Real tolgui; diff --git a/src/BRepBlend/BRepBlend_Walking.hxx b/src/BRepBlend/BRepBlend_Walking.hxx index 974703c52e..0f08fc6fe8 100644 --- a/src/BRepBlend/BRepBlend_Walking.hxx +++ b/src/BRepBlend/BRepBlend_Walking.hxx @@ -17,27 +17,19 @@ #ifndef _BRepBlend_Walking_HeaderFile #define _BRepBlend_Walking_HeaderFile -#include -#include -#include - +#include #include -#include #include -#include -#include -#include -#include -#include #include +#include +#include +#include +#include + class BRepBlend_Line; -class Adaptor3d_HSurface; class Adaptor3d_TopolTool; -class ChFiDS_HElSpine; class StdFail_NotDone; class Adaptor3d_HVertex; -class Adaptor2d_HCurve2d; -class Adaptor3d_HCurve; class BRepBlend_HCurve2dTool; class Adaptor3d_HSurfaceTool; class BRepBlend_HCurveTool; @@ -51,8 +43,6 @@ class gp_Pnt; class gp_Pnt2d; class IntSurf_Transition; - - class BRepBlend_Walking { public: @@ -60,7 +50,7 @@ public: DEFINE_STANDARD_ALLOC - Standard_EXPORT BRepBlend_Walking(const Handle(Adaptor3d_HSurface)& Surf1, const Handle(Adaptor3d_HSurface)& Surf2, const Handle(Adaptor3d_TopolTool)& Domain1, const Handle(Adaptor3d_TopolTool)& Domain2, const Handle(ChFiDS_HElSpine)& HGuide); + Standard_EXPORT BRepBlend_Walking(const Handle(Adaptor3d_Surface)& Surf1, const Handle(Adaptor3d_Surface)& Surf2, const Handle(Adaptor3d_TopolTool)& Domain1, const Handle(Adaptor3d_TopolTool)& Domain2, const Handle(ChFiDS_ElSpine)& HGuide); //! To define different domains for control and clipping. Standard_EXPORT void SetDomainsToRecadre (const Handle(Adaptor3d_TopolTool)& RecDomain1, const Handle(Adaptor3d_TopolTool)& RecDomain2); @@ -116,7 +106,7 @@ private: Standard_EXPORT Standard_Boolean Recadre (Blend_FuncInv& FInv, const Standard_Boolean OnFirst, const math_Vector& Sol, math_Vector& Solrst, Standard_Integer& Indexsol, Standard_Boolean& IsVtx, Handle(Adaptor3d_HVertex)& Vtx, const Standard_Real Extrap = 0.0); - Standard_EXPORT void Transition (const Standard_Boolean OnFirst, const Handle(Adaptor2d_HCurve2d)& A, const Standard_Real Param, IntSurf_Transition& TLine, IntSurf_Transition& TArc); + Standard_EXPORT void Transition (const Standard_Boolean OnFirst, const Handle(Adaptor2d_Curve2d)& A, const Standard_Real Param, IntSurf_Transition& TLine, IntSurf_Transition& TArc); Standard_EXPORT void MakeExtremity (BRepBlend_Extremity& Extrem, const Standard_Boolean OnFirst, const Standard_Integer Index, const Standard_Real Param, const Standard_Boolean IsVtx, const Handle(Adaptor3d_HVertex)& Vtx); @@ -131,13 +121,13 @@ private: Handle(BRepBlend_Line) line; math_Vector sol; Blend_SequenceOfPoint jalons; - Handle(Adaptor3d_HSurface) surf1; - Handle(Adaptor3d_HSurface) surf2; + Handle(Adaptor3d_Surface) surf1; + Handle(Adaptor3d_Surface) surf2; Handle(Adaptor3d_TopolTool) domain1; Handle(Adaptor3d_TopolTool) domain2; Handle(Adaptor3d_TopolTool) recdomain1; Handle(Adaptor3d_TopolTool) recdomain2; - Handle(ChFiDS_HElSpine) hguide; + Handle(ChFiDS_ElSpine) hguide; Standard_Boolean ToCorrectOnRst1; Standard_Boolean ToCorrectOnRst2; Standard_Real CorrectedParam; @@ -163,12 +153,12 @@ private: #define TheVertex Handle(Adaptor3d_HVertex) #define TheVertex_hxx -#define TheArc Handle(Adaptor2d_HCurve2d) -#define TheArc_hxx -#define TheSurface Handle(Adaptor3d_HSurface) -#define TheSurface_hxx -#define TheCurve Handle(Adaptor3d_HCurve) -#define TheCurve_hxx +#define TheArc Handle(Adaptor2d_Curve2d) +#define TheArc_hxx +#define TheSurface Handle(Adaptor3d_Surface) +#define TheSurface_hxx +#define TheCurve Handle(Adaptor3d_Curve) +#define TheCurve_hxx #define TheVertexTool Standard_Integer #define TheVertexTool_hxx #define TheArcTool BRepBlend_HCurve2dTool diff --git a/src/BRepBlend/BRepBlend_Walking_0.cxx b/src/BRepBlend/BRepBlend_Walking_0.cxx index aac96d71b9..5387bfc79b 100644 --- a/src/BRepBlend/BRepBlend_Walking_0.cxx +++ b/src/BRepBlend/BRepBlend_Walking_0.cxx @@ -17,13 +17,13 @@ #include #include -#include +#include #include -#include +#include #include #include -#include -#include +#include +#include #include #include #include @@ -40,12 +40,12 @@ #define TheVertex Handle(Adaptor3d_HVertex) #define TheVertex_hxx -#define TheArc Handle(Adaptor2d_HCurve2d) -#define TheArc_hxx -#define TheSurface Handle(Adaptor3d_HSurface) -#define TheSurface_hxx -#define TheCurve Handle(Adaptor3d_HCurve) -#define TheCurve_hxx +#define TheArc Handle(Adaptor2d_Curve2d) +#define TheArc_hxx +#define TheSurface Handle(Adaptor3d_Surface) +#define TheSurface_hxx +#define TheCurve Handle(Adaptor3d_Curve) +#define TheCurve_hxx #define TheVertexTool Standard_Integer #define TheVertexTool_hxx #define TheArcTool BRepBlend_HCurve2dTool diff --git a/src/BRepBndLib/BRepBndLib.cxx b/src/BRepBndLib/BRepBndLib.cxx index 1809948617..903a03735e 100644 --- a/src/BRepBndLib/BRepBndLib.cxx +++ b/src/BRepBndLib/BRepBndLib.cxx @@ -34,8 +34,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include @@ -402,7 +402,7 @@ Standard_Boolean CanUseEdges(const Adaptor3d_Surface& BS) } else if(aST == GeomAbs_SurfaceOfRevolution) { - const Handle(Adaptor3d_HCurve)& aBC = BS.BasisCurve(); + const Handle(Adaptor3d_Curve)& aBC = BS.BasisCurve(); if(aBC->GetType() == GeomAbs_Line) { return Standard_True; @@ -414,8 +414,8 @@ Standard_Boolean CanUseEdges(const Adaptor3d_Surface& BS) } else if(aST == GeomAbs_OffsetSurface) { - const Handle(Adaptor3d_HSurface)& aS = BS.BasisSurface(); - return CanUseEdges(aS->Surface()); + const Handle(Adaptor3d_Surface)& aS = BS.BasisSurface(); + return CanUseEdges (*aS); } else if(aST == GeomAbs_BSplineSurface) { diff --git a/src/BRepBndLib/BRepBndLib_1.cxx b/src/BRepBndLib/BRepBndLib_1.cxx index 1dbf95479c..b63c87681f 100644 --- a/src/BRepBndLib/BRepBndLib_1.cxx +++ b/src/BRepBndLib/BRepBndLib_1.cxx @@ -11,9 +11,9 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#include -#include -#include +#include +#include +#include #include #include #include @@ -33,7 +33,7 @@ #include #include #include -#include +#include #include #include @@ -80,12 +80,12 @@ static Standard_Boolean IsPlanar(const Adaptor3d_Surface& theS) const GeomAbs_SurfaceType aST = theS.GetType(); if(aST == GeomAbs_OffsetSurface) { - return IsPlanar(theS.BasisSurface()->Surface()); + return IsPlanar (*theS.BasisSurface()); } if(aST == GeomAbs_SurfaceOfExtrusion) { - return IsLinear(theS.BasisCurve()->Curve()); + return IsLinear (*theS.BasisCurve()); } if((aST == GeomAbs_BSplineSurface) || (aST == GeomAbs_BezierSurface)) diff --git a/src/BRepCheck/BRepCheck.cxx b/src/BRepCheck/BRepCheck.cxx index 6d088f44c1..e057a54588 100644 --- a/src/BRepCheck/BRepCheck.cxx +++ b/src/BRepCheck/BRepCheck.cxx @@ -24,7 +24,7 @@ #include #include #include -#include +#include #include #include #include @@ -99,7 +99,7 @@ Standard_Real BRepCheck::PrecCurve(const Adaptor3d_Curve& aAC3D) //function : PrecSurface //purpose : //======================================================================= -Standard_Real BRepCheck::PrecSurface(const Handle(Adaptor3d_HSurface)& aAHSurf) +Standard_Real BRepCheck::PrecSurface(const Handle(Adaptor3d_Surface)& aAHSurf) { Standard_Real aXEmax = RealEpsilon(); // diff --git a/src/BRepCheck/BRepCheck.hxx b/src/BRepCheck/BRepCheck.hxx index 3ce578d44b..820adb65e5 100644 --- a/src/BRepCheck/BRepCheck.hxx +++ b/src/BRepCheck/BRepCheck.hxx @@ -17,19 +17,15 @@ #ifndef _BRepCheck_HeaderFile #define _BRepCheck_HeaderFile -#include -#include -#include - +#include #include #include #include -#include + class TopoDS_Wire; class TopoDS_Face; class TopoDS_Edge; class Adaptor3d_Curve; -class Adaptor3d_HSurface; class BRepCheck_Result; class BRepCheck_Vertex; class BRepCheck_Edge; @@ -59,7 +55,7 @@ public: Standard_EXPORT static Standard_Real PrecCurve(const Adaptor3d_Curve& aAC3D); //! Returns the resolution on the surface - Standard_EXPORT static Standard_Real PrecSurface(const Handle(Adaptor3d_HSurface)& aAHSurf); + Standard_EXPORT static Standard_Real PrecSurface(const Handle(Adaptor3d_Surface)& aAHSurf); diff --git a/src/BRepCheck/BRepCheck_Edge.cxx b/src/BRepCheck/BRepCheck_Edge.cxx index 84f7679d23..7adbadfb55 100644 --- a/src/BRepCheck/BRepCheck_Edge.cxx +++ b/src/BRepCheck/BRepCheck_Edge.cxx @@ -16,8 +16,8 @@ #include -#include -#include +#include +#include #include #include #include @@ -36,7 +36,7 @@ #include #include #include -#include +#include #include #include #include @@ -44,8 +44,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include @@ -216,7 +216,7 @@ void BRepCheck_Edge::Minimum() { GeomAdaptor_Curve GAC3d(C3d, C3d->TransformedParameter(First, L.Transformation()), C3d->TransformedParameter(Last, L.Transformation())); - myHCurve = new GeomAdaptor_HCurve(GAC3d); + myHCurve = new GeomAdaptor_Curve(GAC3d); } } else { // curve on surface @@ -254,11 +254,11 @@ void BRepCheck_Edge::Minimum() } else { - Handle(GeomAdaptor_HSurface) GAHSref = new GeomAdaptor_HSurface(Sref); - Handle(Geom2dAdaptor_HCurve) GHPCref = - new Geom2dAdaptor_HCurve(PCref,First,Last); + Handle(GeomAdaptor_Surface) GAHSref = new GeomAdaptor_Surface(Sref); + Handle(Geom2dAdaptor_Curve) GHPCref = + new Geom2dAdaptor_Curve(PCref,First,Last); Adaptor3d_CurveOnSurface ACSref(GHPCref,GAHSref); - myHCurve = new Adaptor3d_HCurveOnSurface(ACSref); + myHCurve = new Adaptor3d_CurveOnSurface(ACSref); } } } @@ -395,11 +395,10 @@ void BRepCheck_Edge::InContext(const TopoDS_Shape& S) // (Su->Transformed(L.Transformation())); (Su->Transformed(/*L*/(Floc * TFloc).Transformation())); Handle(Geom2d_Curve) PC = cr->PCurve(); - Handle(GeomAdaptor_HSurface) GAHS = new GeomAdaptor_HSurface(Sb); - Handle(Geom2dAdaptor_HCurve) GHPC = new Geom2dAdaptor_HCurve(PC,f,l); + Handle(GeomAdaptor_Surface) GAHS = new GeomAdaptor_Surface(Sb); + Handle(Geom2dAdaptor_Curve) GHPC = new Geom2dAdaptor_Curve(PC,f,l); Adaptor3d_CurveOnSurface ACS(GHPC,GAHS); - Standard_Boolean ok = - Validate(myHCurve->Curve() ,ACS,Tol,SameParameter); + Standard_Boolean ok = Validate (*myHCurve, ACS, Tol, SameParameter); if (!ok) { if (cr->IsCurveOnClosedSurface()) { BRepCheck::Add(lst,BRepCheck_InvalidCurveOnClosedSurface); @@ -415,9 +414,9 @@ void BRepCheck_Edge::InContext(const TopoDS_Shape& S) // Modified by skv - Tue Apr 27 11:53:01 2004 End } if (cr->IsCurveOnClosedSurface()) { - GHPC->ChangeCurve2d().Load(cr->PCurve2(),f,l); // same bounds + GHPC->Load(cr->PCurve2(),f,l); // same bounds ACS.Load(GHPC, GAHS); // sans doute inutile - ok = Validate(myHCurve->Curve(),ACS,Tol,SameParameter); + ok = Validate(*myHCurve,ACS,Tol,SameParameter); if (!ok) { BRepCheck::Add(lst,BRepCheck_InvalidCurveOnClosedSurface); // Modified by skv - Tue Apr 27 11:53:20 2004 Begin @@ -452,30 +451,28 @@ void BRepCheck_Edge::InContext(const TopoDS_Shape& S) P = Handle(Geom_Plane):: DownCast(P->Transformed(/*L*/(Floc * TFloc).Transformation()));// eap occ332 //on projette Cref sur ce plan - Handle(GeomAdaptor_HSurface) GAHS = new GeomAdaptor_HSurface(P); + Handle(GeomAdaptor_Surface) GAHS = new GeomAdaptor_Surface(P); - // Dub - Normalement myHCurve est une GeomAdaptor_HCurve - GeomAdaptor_Curve& Gac = - Handle(GeomAdaptor_HCurve)::DownCast(myHCurve)->ChangeCurve(); - Handle(Geom_Curve) C3d = Gac.Curve(); + // Dub - Normalement myHCurve est une GeomAdaptor_Curve + Handle(GeomAdaptor_Curve) Gac = Handle(GeomAdaptor_Curve)::DownCast(myHCurve); + Handle(Geom_Curve) C3d = Gac->Curve(); Handle(Geom_Curve) ProjOnPlane = GeomProjLib::ProjectOnPlane(new Geom_TrimmedCurve(C3d,First,Last), P, P->Position().Direction(), Standard_True); - Handle(GeomAdaptor_HCurve) aHCurve = - new GeomAdaptor_HCurve(ProjOnPlane); + Handle(GeomAdaptor_Curve) aHCurve = + new GeomAdaptor_Curve(ProjOnPlane); ProjLib_ProjectedCurve proj(GAHS,aHCurve); Handle(Geom2d_Curve) PC = Geom2dAdaptor::MakeCurve(proj); - Handle(Geom2dAdaptor_HCurve) GHPC = - new Geom2dAdaptor_HCurve(PC, + Handle(Geom2dAdaptor_Curve) GHPC = + new Geom2dAdaptor_Curve(PC, myHCurve->FirstParameter(), myHCurve->LastParameter()); Adaptor3d_CurveOnSurface ACS(GHPC,GAHS); - Standard_Boolean ok = Validate(myHCurve->Curve(),ACS, - Tol,Standard_True); // voir dub... + Standard_Boolean ok = Validate (*myHCurve, ACS, Tol,Standard_True); // voir dub... if (!ok) { BRepCheck::Add(lst,BRepCheck_InvalidCurveOnSurface); } @@ -602,7 +599,7 @@ Standard_Real BRepCheck_Edge::Tolerance() theRep(iRep)=theRep(1); it=1; } - theRep(it) = new GeomAdaptor_HCurve(GAC3d); + theRep(it) = new GeomAdaptor_Curve(GAC3d); iRep++; } else if (cr->IsCurveOnSurface()) { @@ -614,11 +611,11 @@ Standard_Real BRepCheck_Edge::Tolerance() (Sref->Transformed( Loc.Transformation() )); /////////////////////////////////// const Handle(Geom2d_Curve)& PCref = cr->PCurve(); - Handle(GeomAdaptor_HSurface) GAHSref = new GeomAdaptor_HSurface(Sref); - Handle(Geom2dAdaptor_HCurve) GHPCref = - new Geom2dAdaptor_HCurve(PCref,First,Last); + Handle(GeomAdaptor_Surface) GAHSref = new GeomAdaptor_Surface(Sref); + Handle(Geom2dAdaptor_Curve) GHPCref = + new Geom2dAdaptor_Curve(PCref,First,Last); Adaptor3d_CurveOnSurface ACSref(GHPCref,GAHSref); - theRep(iRep) = new Adaptor3d_HCurveOnSurface(ACSref); + theRep(iRep) = new Adaptor3d_CurveOnSurface(ACSref); iRep++; } if (cr->IsCurveOnClosedSurface()) { @@ -626,11 +623,11 @@ Standard_Real BRepCheck_Edge::Tolerance() Sref = Handle(Geom_Surface)::DownCast (Sref->Transformed(cr->Location().Transformation())); const Handle(Geom2d_Curve)& PCref = cr->PCurve2(); - Handle(GeomAdaptor_HSurface) GAHSref = new GeomAdaptor_HSurface(Sref); - Handle(Geom2dAdaptor_HCurve) GHPCref = - new Geom2dAdaptor_HCurve(PCref,First,Last); + Handle(GeomAdaptor_Surface) GAHSref = new GeomAdaptor_Surface(Sref); + Handle(Geom2dAdaptor_Curve) GHPCref = + new Geom2dAdaptor_Curve(PCref,First,Last); Adaptor3d_CurveOnSurface ACSref(GHPCref,GAHSref); - theRep(iRep) = new Adaptor3d_HCurveOnSurface(ACSref); + theRep(iRep) = new Adaptor3d_CurveOnSurface(ACSref); iRep++; nbRep++; } @@ -646,14 +643,14 @@ Standard_Real BRepCheck_Edge::Tolerance() for (i= 0; i< NCONTROL; i++) { prm = ((NCONTROL-1-i)*First + i*Last)/(NCONTROL-1); tol2=dist2=0.; - center=(*(Handle(Adaptor3d_HCurve)*)&theRep(1))->Value(prm); + center=(*(Handle(Adaptor3d_Curve)*)&theRep(1))->Value(prm); if(Precision::IsInfinite(center.X()) || Precision::IsInfinite(center.Y()) || Precision::IsInfinite(center.Z())) { return Precision::Infinite(); } for (iRep=2; iRep<=nbRep; iRep++) { - othP=(*(Handle(Adaptor3d_HCurve)*)&theRep(iRep))->Value(prm); + othP=(*(Handle(Adaptor3d_Curve)*)&theRep(iRep))->Value(prm); if(Precision::IsInfinite(othP.X()) || Precision::IsInfinite(othP.Y()) || Precision::IsInfinite(othP.Z())) { @@ -903,7 +900,7 @@ Standard_Real Prec(const Adaptor3d_Curve& aAC3D, const Adaptor3d_CurveOnSurface& aACS) { Standard_Real aXEmax, aXC, aXS; - const Handle(Adaptor3d_HSurface)& aAHS = aACS.GetSurface(); + const Handle(Adaptor3d_Surface)& aAHS = aACS.GetSurface(); // aXC = BRepCheck::PrecCurve(aAC3D); aXS = BRepCheck::PrecSurface(aAHS); diff --git a/src/BRepCheck/BRepCheck_Edge.hxx b/src/BRepCheck/BRepCheck_Edge.hxx index 05fee227d0..3051c17673 100644 --- a/src/BRepCheck/BRepCheck_Edge.hxx +++ b/src/BRepCheck/BRepCheck_Edge.hxx @@ -17,19 +17,14 @@ #ifndef _BRepCheck_Edge_HeaderFile #define _BRepCheck_Edge_HeaderFile -#include -#include - -#include +#include #include -#include #include + class BRep_CurveRepresentation; -class Adaptor3d_HCurve; class TopoDS_Edge; class TopoDS_Shape; - class BRepCheck_Edge; DEFINE_STANDARD_HANDLE(BRepCheck_Edge, BRepCheck_Result) @@ -61,30 +56,15 @@ public: //! is out of 3D-curve of this edge. Standard_EXPORT BRepCheck_Status CheckPolygonOnTriangulation (const TopoDS_Edge& theEdge); - - - DEFINE_STANDARD_RTTIEXT(BRepCheck_Edge,BRepCheck_Result) -protected: - - - - private: Handle(BRep_CurveRepresentation) myCref; - Handle(Adaptor3d_HCurve) myHCurve; + Handle(Adaptor3d_Curve) myHCurve; Standard_Boolean myGctrl; - }; - - - - - - #endif // _BRepCheck_Edge_HeaderFile diff --git a/src/BRepCheck/BRepCheck_Face.cxx b/src/BRepCheck/BRepCheck_Face.cxx index 983d095696..11485b5a35 100644 --- a/src/BRepCheck/BRepCheck_Face.cxx +++ b/src/BRepCheck/BRepCheck_Face.cxx @@ -20,7 +20,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/BRepCheck/BRepCheck_Wire.cxx b/src/BRepCheck/BRepCheck_Wire.cxx index 759f4993b0..e8e23f54a1 100644 --- a/src/BRepCheck/BRepCheck_Wire.cxx +++ b/src/BRepCheck/BRepCheck_Wire.cxx @@ -26,7 +26,6 @@ #include #include #include -#include #include #include #include @@ -36,7 +35,6 @@ #include #include #include -#include #include #include #include @@ -954,7 +952,7 @@ BRepCheck_Status BRepCheck_Wire::SelfIntersect(const TopoDS_Face& F, Standard_Real first1,last1,first2,last2, tolint; gp_Pnt2d pfirst1,plast1,pfirst2,plast2; gp_Pnt P3d, P3d2; - Handle(BRepAdaptor_HSurface) HS; + Handle(BRepAdaptor_Surface) HS; Geom2dAdaptor_Curve C1, C2; Geom2dInt_GInter Inter; IntRes2d_Domain myDomain1; @@ -964,8 +962,8 @@ BRepCheck_Status BRepCheck_Wire::SelfIntersect(const TopoDS_Face& F, //-- check with proper tolerances if there is no //-- point in the tolerance of a vertex. tolint = 1.e-10; - HS = new BRepAdaptor_HSurface(); - HS->ChangeSurface().Initialize(F,Standard_False); + HS = new BRepAdaptor_Surface(); + HS->Initialize(F,Standard_False); // for (TopoDS_Iterator Iter1(myShape);Iter1.More();Iter1.Next()) { if (Iter1.Value().ShapeType() == TopAbs_EDGE) { diff --git a/src/BRepClass/BRepClass_FaceClassifier.cxx b/src/BRepClass/BRepClass_FaceClassifier.cxx index b593eb0cb0..e5ab5006f4 100644 --- a/src/BRepClass/BRepClass_FaceClassifier.cxx +++ b/src/BRepClass/BRepClass_FaceClassifier.cxx @@ -12,10 +12,9 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. - -#include -#include #include + +#include #include #include #include diff --git a/src/BRepClass3d/BRepClass3d_Intersector3d.cxx b/src/BRepClass3d/BRepClass3d_Intersector3d.cxx index 4c7df4fa97..29977872e2 100644 --- a/src/BRepClass3d/BRepClass3d_Intersector3d.cxx +++ b/src/BRepClass3d/BRepClass3d_Intersector3d.cxx @@ -15,12 +15,12 @@ // commercial license or contractual agreement. -#include +#include #include #include #include #include -#include +#include #include #include #include @@ -65,8 +65,8 @@ void BRepClass3d_Intersector3d::Perform(const gp_Lin& L, Standard_Real V2 = surface.LastVParameter(); //-- - Handle(GeomAdaptor_HCurve) HLL = new GeomAdaptor_HCurve(LL); - Handle(BRepAdaptor_HSurface) Hsurface = new BRepAdaptor_HSurface(surface); + Handle(GeomAdaptor_Curve) HLL = new GeomAdaptor_Curve(LL); + Handle(BRepAdaptor_Surface) Hsurface = new BRepAdaptor_Surface(surface); //-- HICS.Perform(HLL,Hsurface); diff --git a/src/BRepClass3d/BRepClass3d_SolidExplorer.cxx b/src/BRepClass3d/BRepClass3d_SolidExplorer.cxx index 8f8b054a01..3b0aa638f5 100644 --- a/src/BRepClass3d/BRepClass3d_SolidExplorer.cxx +++ b/src/BRepClass3d/BRepClass3d_SolidExplorer.cxx @@ -28,7 +28,6 @@ #include #include #include -#include #include #include #include @@ -214,7 +213,7 @@ Standard_Boolean BRepClass3d_SolidExplorer::PointInTheFace Standard_Real& u_, Standard_Real& v_, Standard_Real& param_, Standard_Integer& IndexPoint, - const Handle(BRepAdaptor_HSurface)& surf, + const Handle(BRepAdaptor_Surface)& surf, const Standard_Real U1, const Standard_Real V1, const Standard_Real U2, @@ -232,7 +231,7 @@ Standard_Boolean BRepClass3d_SolidExplorer::PointInTheFace TopAbs_State BRepClass3d_SolidExplorer::ClassifyUVPoint (const IntCurvesFace_Intersector& theIntersector, - const Handle(BRepAdaptor_HSurface)& theSurf, + const Handle(BRepAdaptor_Surface)& theSurf, const gp_Pnt2d& theP2d) const { // first find if the point is near an edge/vertex @@ -259,7 +258,7 @@ Standard_Boolean BRepClass3d_SolidExplorer::PointInTheFace Standard_Real& u_, Standard_Real& v_, Standard_Real& param_, Standard_Integer& IndexPoint, - const Handle(BRepAdaptor_HSurface)& surf, + const Handle(BRepAdaptor_Surface)& surf, const Standard_Real U1, const Standard_Real V1, const Standard_Real U2, @@ -479,7 +478,7 @@ Standard_Integer BRepClass3d_SolidExplorer::OtherSegment(const gp_Pnt& P, if (myFirstFace > NbFacesInSolid) continue; face = TopoDS::Face(faceexplorer.Current()); - Handle(BRepAdaptor_HSurface) surf = new BRepAdaptor_HSurface(); + Handle(BRepAdaptor_Surface) surf = new BRepAdaptor_Surface(); if(aTestInvert) { BRepTopAdaptor_FClass2d aClass(face, Precision::Confusion()); @@ -499,7 +498,7 @@ Standard_Integer BRepClass3d_SolidExplorer::OtherSegment(const gp_Pnt& P, aRestr = Standard_True; } } - surf->ChangeSurface().Initialize(face, aRestr); + surf->Initialize(face, aRestr); Standard_Real U1,V1,U2,V2; U1 = surf->FirstUParameter(); V1 = surf->FirstVParameter(); @@ -714,8 +713,8 @@ Standard_Boolean BRepClass3d_SolidExplorer::PointInTheFace { TopoDS_Face Face = _face; Face.Orientation(TopAbs_FORWARD); - Handle(BRepAdaptor_HSurface) surf = new BRepAdaptor_HSurface(); - surf->ChangeSurface().Initialize(Face); + Handle(BRepAdaptor_Surface) surf = new BRepAdaptor_Surface(); + surf->Initialize(Face); Standard_Real U1,V1,U2,V2;//,u,v; U1 = surf->FirstUParameter(); V1 = surf->FirstVParameter(); diff --git a/src/BRepClass3d/BRepClass3d_SolidExplorer.hxx b/src/BRepClass3d/BRepClass3d_SolidExplorer.hxx index 9e93d07507..8daba7883e 100644 --- a/src/BRepClass3d/BRepClass3d_SolidExplorer.hxx +++ b/src/BRepClass3d/BRepClass3d_SolidExplorer.hxx @@ -17,29 +17,20 @@ #ifndef _BRepClass3d_SolidExplorer_HeaderFile #define _BRepClass3d_SolidExplorer_HeaderFile -#include -#include -#include - #include -#include -#include -#include -#include -#include +#include +#include #include #include -#include +#include +#include #include -class TopoDS_Shape; class gp_Pnt; class TopoDS_Face; class gp_Vec; -class BRepAdaptor_HSurface; class TopoDS_Shell; class gp_Lin; -class Bnd_Box; class IntCurvesFace_Intersector; //! Provide an exploration of a BRep Shape for the classification. @@ -79,11 +70,11 @@ public: Standard_EXPORT Standard_Boolean PointInTheFace (const TopoDS_Face& F, gp_Pnt& P, Standard_Real& u, Standard_Real& v, Standard_Real& Param, Standard_Integer& Index) const; - Standard_EXPORT Standard_Boolean PointInTheFace (const TopoDS_Face& F, gp_Pnt& P, Standard_Real& u, Standard_Real& v, Standard_Real& Param, Standard_Integer& Index, const Handle(BRepAdaptor_HSurface)& surf, const Standard_Real u1, const Standard_Real v1, const Standard_Real u2, const Standard_Real v2) const; + Standard_EXPORT Standard_Boolean PointInTheFace (const TopoDS_Face& F, gp_Pnt& P, Standard_Real& u, Standard_Real& v, Standard_Real& Param, Standard_Integer& Index, const Handle(BRepAdaptor_Surface)& surf, const Standard_Real u1, const Standard_Real v1, const Standard_Real u2, const Standard_Real v2) const; //! gives point index to search from and returns //! point index of succeseful search - Standard_EXPORT Standard_Boolean PointInTheFace (const TopoDS_Face& F, gp_Pnt& P, Standard_Real& u, Standard_Real& v, Standard_Real& Param, Standard_Integer& Index, const Handle(BRepAdaptor_HSurface)& surf, const Standard_Real u1, const Standard_Real v1, const Standard_Real u2, const Standard_Real v2, gp_Vec& theVecD1U, gp_Vec& theVecD1V) const; + Standard_EXPORT Standard_Boolean PointInTheFace (const TopoDS_Face& F, gp_Pnt& P, Standard_Real& u, Standard_Real& v, Standard_Real& Param, Standard_Integer& Index, const Handle(BRepAdaptor_Surface)& surf, const Standard_Real u1, const Standard_Real v1, const Standard_Real u2, const Standard_Real v2, gp_Vec& theVecD1U, gp_Vec& theVecD1V) const; //! Starts an exploration of the shells. Standard_EXPORT void InitShell(); @@ -157,7 +148,7 @@ protected: Standard_EXPORT TopAbs_State ClassifyUVPoint (const IntCurvesFace_Intersector& theIntersector, - const Handle(BRepAdaptor_HSurface)& theSurf, + const Handle(BRepAdaptor_Surface)& theSurf, const gp_Pnt2d& theP2d) const; private: diff --git a/src/BRepExtrema/BRepExtrema_ExtCC.cxx b/src/BRepExtrema/BRepExtrema_ExtCC.cxx index d6fdb93077..d4c24eb0e8 100644 --- a/src/BRepExtrema/BRepExtrema_ExtCC.cxx +++ b/src/BRepExtrema/BRepExtrema_ExtCC.cxx @@ -19,7 +19,6 @@ #include #include #include -#include //======================================================================= @@ -44,11 +43,11 @@ void BRepExtrema_ExtCC::Initialize(const TopoDS_Edge& E2) return; // protect against non-geometric type (e.g. polygon) Standard_Real V1, V2; BRepAdaptor_Curve Curv(E2); - myHC = new BRepAdaptor_HCurve(Curv); + myHC = new BRepAdaptor_Curve(Curv); Standard_Real Tol = Min(BRep_Tool::Tolerance(E2), Precision::Confusion()); Tol = Max(Curv.Resolution(Tol), Precision::PConfusion()); BRep_Tool::Range(E2,V1,V2); - myExtCC.SetCurve(2,myHC->Curve(),V1,V2); + myExtCC.SetCurve (2, *myHC, V1, V2); myExtCC.SetTolerance(2, Tol); } @@ -63,11 +62,11 @@ void BRepExtrema_ExtCC::Perform(const TopoDS_Edge& E1) return; // protect against non-geometric type (e.g. polygon) Standard_Real U1, U2; BRepAdaptor_Curve Curv(E1); - Handle(BRepAdaptor_HCurve) HC = new BRepAdaptor_HCurve(Curv); + Handle(BRepAdaptor_Curve) HC = new BRepAdaptor_Curve(Curv); Standard_Real Tol = Min(BRep_Tool::Tolerance(E1), Precision::Confusion()); Tol = Max(Curv.Resolution(Tol), Precision::PConfusion()); BRep_Tool::Range(E1,U1,U2); - myExtCC.SetCurve (1, HC->Curve(), U1, U2); + myExtCC.SetCurve (1, *HC, U1, U2); myExtCC.SetTolerance(1, Tol); // If we enable SetSingleSolutionFlag Extrema will run much quicker on almost parallel curves // (e.g. bug 27665), however some solutions will be lost, e.g. see bug 28183. diff --git a/src/BRepExtrema/BRepExtrema_ExtCC.hxx b/src/BRepExtrema/BRepExtrema_ExtCC.hxx index 0afb1f8701..734d8b1ace 100644 --- a/src/BRepExtrema/BRepExtrema_ExtCC.hxx +++ b/src/BRepExtrema/BRepExtrema_ExtCC.hxx @@ -15,14 +15,12 @@ #define _BRepExtrema_ExtCC_HeaderFile #include -#include +#include #include -class BRepAdaptor_HCurve; class TopoDS_Edge; class gp_Pnt; - class BRepExtrema_ExtCC { public: @@ -75,7 +73,7 @@ class BRepExtrema_ExtCC private: Extrema_ExtCC myExtCC; - Handle(BRepAdaptor_HCurve) myHC; + Handle(BRepAdaptor_Curve) myHC; }; #endif diff --git a/src/BRepExtrema/BRepExtrema_ExtCF.cxx b/src/BRepExtrema/BRepExtrema_ExtCF.cxx index 109ce3237e..cafdc8db11 100644 --- a/src/BRepExtrema/BRepExtrema_ExtCF.cxx +++ b/src/BRepExtrema/BRepExtrema_ExtCF.cxx @@ -22,9 +22,7 @@ #include #include #include -#include #include -#include //======================================================================= //function : BRepExtrema_ExtCF @@ -49,7 +47,7 @@ void BRepExtrema_ExtCF::Initialize(const TopoDS_Edge& E, const TopoDS_Face& F) !BRep_Tool::IsGeometric(E)) return; // protect against non-geometric type (e.g. triangulation) BRepAdaptor_Curve aC(E); - myHS = new BRepAdaptor_HSurface(Surf); + myHS = new BRepAdaptor_Surface(Surf); Standard_Real aTolC, aTolS; // aTolS = Min(BRep_Tool::Tolerance(F), Precision::Confusion()); @@ -62,7 +60,7 @@ void BRepExtrema_ExtCF::Initialize(const TopoDS_Edge& E, const TopoDS_Face& F) // Standard_Real U1, U2, V1, V2; BRepTools::UVBounds(F, U1, U2, V1, V2); - myExtCS.Initialize(myHS->Surface(), U1, U2, V1, V2, aTolC, aTolS); + myExtCS.Initialize (*myHS, U1, U2, V1, V2, aTolC, aTolS); } //======================================================================= @@ -83,7 +81,7 @@ void BRepExtrema_ExtCF::Perform(const TopoDS_Edge& E, const TopoDS_Face& F2) BRep_Tool::Range(E, U1, U2); BRepAdaptor_Curve Curv(E); - Handle(BRepAdaptor_HCurve) HC = new BRepAdaptor_HCurve(Curv); + Handle(BRepAdaptor_Curve) HC = new BRepAdaptor_Curve(Curv); myExtCS.Perform(HC->Curve(), U1, U2); if(!myExtCS.IsDone()) diff --git a/src/BRepExtrema/BRepExtrema_ExtCF.hxx b/src/BRepExtrema/BRepExtrema_ExtCF.hxx index 27e33b6549..159bc8c165 100644 --- a/src/BRepExtrema/BRepExtrema_ExtCF.hxx +++ b/src/BRepExtrema/BRepExtrema_ExtCF.hxx @@ -18,17 +18,15 @@ #include #include #include -#include +#include #include #include #include -class BRepAdaptor_HSurface; class TopoDS_Edge; class TopoDS_Face; class gp_Pnt; - class BRepExtrema_ExtCF { public: @@ -92,7 +90,7 @@ class BRepExtrema_ExtCF TColStd_SequenceOfReal mySqDist; Extrema_SequenceOfPOnSurf myPointsOnS; Extrema_SequenceOfPOnCurv myPointsOnC; - Handle(BRepAdaptor_HSurface) myHS; + Handle(BRepAdaptor_Surface) myHS; }; #endif diff --git a/src/BRepExtrema/BRepExtrema_ExtFF.cxx b/src/BRepExtrema/BRepExtrema_ExtFF.cxx index e777f25cc6..02f7d5826e 100644 --- a/src/BRepExtrema/BRepExtrema_ExtFF.cxx +++ b/src/BRepExtrema/BRepExtrema_ExtFF.cxx @@ -25,7 +25,7 @@ #include #include #include -#include +#include //======================================================================= //function : BRepExtrema_ExtFF @@ -49,13 +49,13 @@ void BRepExtrema_ExtFF::Initialize(const TopoDS_Face& F2) if (Surf.GetType() == GeomAbs_OtherSurface) return; // protect against non-geometric type (e.g. triangulation) - myHS = new BRepAdaptor_HSurface(Surf); + myHS = new BRepAdaptor_Surface(Surf); Standard_Real Tol = Min(BRep_Tool::Tolerance(F2), Precision::Confusion()); Tol = Min(Surf.UResolution(Tol), Surf.VResolution(Tol)); Tol = Max(Tol, Precision::PConfusion()); Standard_Real U1, U2, V1, V2; BRepTools::UVBounds(F2, U1, U2, V1, V2); - myExtSS.Initialize(myHS->Surface(), U1, U2, V1, V2, Tol); + myExtSS.Initialize (*myHS, U1, U2, V1, V2, Tol); } //======================================================================= @@ -73,13 +73,13 @@ void BRepExtrema_ExtFF::Perform(const TopoDS_Face& F1, const TopoDS_Face& F2) if (myHS.IsNull() || Surf1.GetType() == GeomAbs_OtherSurface) return; // protect against non-geometric type (e.g. triangulation) - Handle(BRepAdaptor_HSurface) HS1 = new BRepAdaptor_HSurface(Surf1); + Handle(BRepAdaptor_Surface) HS1 = new BRepAdaptor_Surface(Surf1); Standard_Real Tol1 = Min(BRep_Tool::Tolerance(F1), Precision::Confusion()); Tol1 = Min(Surf1.UResolution(Tol1), Surf1.VResolution(Tol1)); Tol1 = Max(Tol1, Precision::PConfusion()); Standard_Real U1, U2, V1, V2; BRepTools::UVBounds(F1, U1, U2, V1, V2); - myExtSS.Perform(HS1->Surface(), U1, U2, V1, V2, Tol1); + myExtSS.Perform (*HS1, U1, U2, V1, V2, Tol1); if (!myExtSS.IsDone()) return; diff --git a/src/BRepExtrema/BRepExtrema_ExtFF.hxx b/src/BRepExtrema/BRepExtrema_ExtFF.hxx index 7bdbaefa14..74bf88316a 100644 --- a/src/BRepExtrema/BRepExtrema_ExtFF.hxx +++ b/src/BRepExtrema/BRepExtrema_ExtFF.hxx @@ -17,16 +17,13 @@ #include #include #include -#include +#include #include #include -class BRepAdaptor_HSurface; class TopoDS_Face; class gp_Pnt; - - class BRepExtrema_ExtFF { public: @@ -90,7 +87,7 @@ class BRepExtrema_ExtFF TColStd_SequenceOfReal mySqDist; Extrema_SequenceOfPOnSurf myPointsOnS1; Extrema_SequenceOfPOnSurf myPointsOnS2; - Handle(BRepAdaptor_HSurface) myHS; + Handle(BRepAdaptor_Surface) myHS; }; #endif diff --git a/src/BRepExtrema/BRepExtrema_ExtPC.cxx b/src/BRepExtrema/BRepExtrema_ExtPC.cxx index a74939ca8a..23b6fb62d7 100644 --- a/src/BRepExtrema/BRepExtrema_ExtPC.cxx +++ b/src/BRepExtrema/BRepExtrema_ExtPC.cxx @@ -17,10 +17,7 @@ #include #include -//#include -//#include #include -#include //======================================================================= @@ -44,12 +41,11 @@ void BRepExtrema_ExtPC::Initialize(const TopoDS_Edge& E) if (!BRep_Tool::IsGeometric(E)) return; // protect against non-geometric type (e.g. polygon) Standard_Real U1, U2; - BRepAdaptor_Curve Curv(E); - myHC = new BRepAdaptor_HCurve(Curv); + myHC = new BRepAdaptor_Curve(E); Standard_Real Tol = Min(BRep_Tool::Tolerance(E), Precision::Confusion()); - Tol = Max(Curv.Resolution(Tol), Precision::PConfusion()); + Tol = Max(myHC->Resolution(Tol), Precision::PConfusion()); BRep_Tool::Range(E,U1,U2); - myExtPC.Initialize(myHC->Curve(),U1,U2,Tol); + myExtPC.Initialize (*myHC, U1, U2, Tol); } //======================================================================= diff --git a/src/BRepExtrema/BRepExtrema_ExtPC.hxx b/src/BRepExtrema/BRepExtrema_ExtPC.hxx index 3061d4690d..a4c3a765c5 100644 --- a/src/BRepExtrema/BRepExtrema_ExtPC.hxx +++ b/src/BRepExtrema/BRepExtrema_ExtPC.hxx @@ -15,10 +15,9 @@ #define _BRepExtrema_ExtPC_HeaderFile #include -#include +#include #include -class BRepAdaptor_HCurve; class TopoDS_Vertex; class TopoDS_Edge; class gp_Pnt; @@ -82,7 +81,7 @@ class BRepExtrema_ExtPC private: Extrema_ExtPC myExtPC; - Handle(BRepAdaptor_HCurve) myHC; + Handle(BRepAdaptor_Curve) myHC; }; #endif diff --git a/src/BRepFill/BRepFill_ACRLaw.cxx b/src/BRepFill/BRepFill_ACRLaw.cxx index 2b91200be4..dec7b3dc0b 100644 --- a/src/BRepFill/BRepFill_ACRLaw.cxx +++ b/src/BRepFill/BRepFill_ACRLaw.cxx @@ -22,7 +22,7 @@ #include #include #include -#include +#include #include #include #include @@ -56,7 +56,7 @@ BRepFill_ACRLaw::BRepFill_ACRLaw(const TopoDS_Wire& Path, // BRep_Tool B; TopoDS_Edge E; Handle(Geom_Curve) C; - Handle(GeomAdaptor_HCurve) AC; + Handle(GeomAdaptor_Curve) AC; Standard_Real First, Last; // return ACR of edges of the trajectory @@ -82,7 +82,7 @@ BRepFill_ACRLaw::BRepFill_ACRLaw(const TopoDS_Wire& Path, First = C->FirstParameter(); Last = C->LastParameter(); } - AC = new (GeomAdaptor_HCurve) (C, First, Last); + AC = new (GeomAdaptor_Curve) (C, First, Last); // Set the parameters for the case multi-edges Standard_Real t1 = OrigParam->Value(ipath-1); diff --git a/src/BRepFill/BRepFill_AdvancedEvolved.cxx b/src/BRepFill/BRepFill_AdvancedEvolved.cxx index d28adfe2f0..b5eb9b8fa2 100644 --- a/src/BRepFill/BRepFill_AdvancedEvolved.cxx +++ b/src/BRepFill/BRepFill_AdvancedEvolved.cxx @@ -33,8 +33,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include @@ -1149,8 +1149,8 @@ public: gp_Pnt GetPoint(const Standard_Real theX) { - const Handle(Adaptor2d_HCurve2d) &aC = myCOnS.GetCurve(); - const Handle(Adaptor3d_HSurface) &aS = myCOnS.GetSurface(); + const Handle(Adaptor2d_Curve2d) &aC = myCOnS.GetCurve(); + const Handle(Adaptor3d_Surface) &aS = myCOnS.GetSurface(); const gp_Pnt2d aP2d(aC->Value(theX)); return aS->Value(aP2d.X(), aP2d.Y()); } @@ -1174,8 +1174,8 @@ private: //======================================================================= Standard_Boolean NormalFunc::Value(const math_Vector& theX, Standard_Real& theF) { - const Handle(Adaptor2d_HCurve2d) &aC = myCOnS.GetCurve(); - const Handle(Adaptor3d_HSurface) &aS = myCOnS.GetSurface(); + const Handle(Adaptor2d_Curve2d) &aC = myCOnS.GetCurve(); + const Handle(Adaptor3d_Surface) &aS = myCOnS.GetSurface(); const gp_Pnt2d aP2d(aC->Value(theX(1))); gp_Pnt aP3d; @@ -1213,8 +1213,8 @@ Standard_Boolean NormalFunc::Value(const math_Vector& theX, Standard_Real& theF) //======================================================================= Standard_Boolean NormalFunc::Gradient(const math_Vector& theX, math_Vector& theG) { - const Handle(Adaptor2d_HCurve2d) &aC = myCOnS.GetCurve(); - const Handle(Adaptor3d_HSurface) &aS = myCOnS.GetSurface(); + const Handle(Adaptor2d_Curve2d) &aC = myCOnS.GetCurve(); + const Handle(Adaptor3d_Surface) &aS = myCOnS.GetSurface(); gp_Pnt2d aP2d; gp_Vec2d aDc; diff --git a/src/BRepFill/BRepFill_CurveConstraint.cxx b/src/BRepFill/BRepFill_CurveConstraint.cxx index c21401fba2..b8cf9eb637 100644 --- a/src/BRepFill/BRepFill_CurveConstraint.cxx +++ b/src/BRepFill/BRepFill_CurveConstraint.cxx @@ -15,18 +15,18 @@ // commercial license or contractual agreement. -#include -#include -#include -#include +#include +#include +#include +#include #include -#include +#include #include #include -#include +#include #include #include -#include +#include #include #include #include @@ -40,7 +40,7 @@ IMPLEMENT_STANDARD_RTTIEXT(BRepFill_CurveConstraint,GeomPlate_CurveConstraint) //--------------------------------------------------------- // Constructeurs avec courbe sur surface //--------------------------------------------------------- -BRepFill_CurveConstraint :: BRepFill_CurveConstraint (const Handle(Adaptor3d_HCurveOnSurface)& Boundary, +BRepFill_CurveConstraint :: BRepFill_CurveConstraint (const Handle(Adaptor3d_CurveOnSurface)& Boundary, const Standard_Integer Tang, const Standard_Integer NPt, const Standard_Real TolDist, @@ -64,15 +64,15 @@ myConstG2=Standard_True; if (myFrontiere.IsNull()) throw Standard_Failure("BRepFill_CurveConstraint : Curve must be on a Surface"); Handle(Geom_Surface) Surf; - Handle(GeomAdaptor_HSurface) GS1; - GS1 = Handle(GeomAdaptor_HSurface)::DownCast(myFrontiere->ChangeCurve().GetSurface()); + Handle(GeomAdaptor_Surface) GS1; + GS1 = Handle(GeomAdaptor_Surface)::DownCast(myFrontiere->GetSurface()); if (!GS1.IsNull()) { - Surf=GS1->ChangeSurface().Surface(); + Surf = GS1->Surface(); } else { - Handle(BRepAdaptor_HSurface) BS1; - BS1=Handle(BRepAdaptor_HSurface)::DownCast(myFrontiere->ChangeCurve().GetSurface()); - Surf = BRep_Tool::Surface(BS1->ChangeSurface().Face()); + Handle(BRepAdaptor_Surface) BS1; + BS1=Handle(BRepAdaptor_Surface)::DownCast(myFrontiere->GetSurface()); + Surf = BRep_Tool::Surface(BS1->Face()); } myLProp.SetSurface(Surf); } @@ -80,7 +80,7 @@ myConstG2=Standard_True; //--------------------------------------------------------- // Constructeurs avec courbe 3d (pour continuite G0 G-1) //--------------------------------------------------------- -BRepFill_CurveConstraint :: BRepFill_CurveConstraint (const Handle(Adaptor3d_HCurve)& Boundary, +BRepFill_CurveConstraint :: BRepFill_CurveConstraint (const Handle(Adaptor3d_Curve)& Boundary, const Standard_Integer Tang, const Standard_Integer NPt, const Standard_Real TolDist) diff --git a/src/BRepFill/BRepFill_CurveConstraint.hxx b/src/BRepFill/BRepFill_CurveConstraint.hxx index be01a01c79..acc2a087d9 100644 --- a/src/BRepFill/BRepFill_CurveConstraint.hxx +++ b/src/BRepFill/BRepFill_CurveConstraint.hxx @@ -24,9 +24,6 @@ #include #include class Standard_ConstructionError; -class Adaptor3d_HCurveOnSurface; -class Adaptor3d_HCurve; - class BRepFill_CurveConstraint; DEFINE_STANDARD_HANDLE(BRepFill_CurveConstraint, GeomPlate_CurveConstraint) @@ -48,9 +45,9 @@ public: //! TolAng is the maximum error to satisfy for G1 constraints //! TolCurv is the maximum error to satisfy for G2 constraints //! These errors can be replaced by laws of criterion. - Standard_EXPORT BRepFill_CurveConstraint(const Handle(Adaptor3d_HCurveOnSurface)& Boundary, const Standard_Integer Order, const Standard_Integer NPt = 10, const Standard_Real TolDist = 0.0001, const Standard_Real TolAng = 0.01, const Standard_Real TolCurv = 0.1); + Standard_EXPORT BRepFill_CurveConstraint(const Handle(Adaptor3d_CurveOnSurface)& Boundary, const Standard_Integer Order, const Standard_Integer NPt = 10, const Standard_Real TolDist = 0.0001, const Standard_Real TolAng = 0.01, const Standard_Real TolCurv = 0.1); - Standard_EXPORT BRepFill_CurveConstraint(const Handle(Adaptor3d_HCurve)& Boundary, const Standard_Integer Tang, const Standard_Integer NPt = 10, const Standard_Real TolDist = 0.0001); + Standard_EXPORT BRepFill_CurveConstraint(const Handle(Adaptor3d_Curve)& Boundary, const Standard_Integer Tang, const Standard_Integer NPt = 10, const Standard_Real TolDist = 0.0001); diff --git a/src/BRepFill/BRepFill_Draft.cxx b/src/BRepFill/BRepFill_Draft.cxx index 6024733704..401b08faa9 100644 --- a/src/BRepFill/BRepFill_Draft.cxx +++ b/src/BRepFill/BRepFill_Draft.cxx @@ -14,8 +14,9 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. +#include -#include +#include #include #include #include @@ -31,7 +32,6 @@ #include #include #include -#include #include #include #include @@ -47,7 +47,6 @@ #include #include #include -#include #include #include #include @@ -189,7 +188,7 @@ static Standard_Boolean GoodOrientation(const Bnd_Box& B, Nb++; // Number of points TColgp_Array1OfPnt Pnts(1, Nb); - Handle(Adaptor3d_HCurve) AC; + Handle(Adaptor3d_Curve) AC; gp_XYZ Bary(0.,0.,0.); for (ii=1; ii<=Nb; ii++) { diff --git a/src/BRepFill/BRepFill_Edge3DLaw.cxx b/src/BRepFill/BRepFill_Edge3DLaw.cxx index 98be92c5f8..2fc30df8c1 100644 --- a/src/BRepFill/BRepFill_Edge3DLaw.cxx +++ b/src/BRepFill/BRepFill_Edge3DLaw.cxx @@ -20,7 +20,7 @@ #include #include #include -#include +#include #include #include #include @@ -44,7 +44,7 @@ BRepFill_Edge3DLaw::BRepFill_Edge3DLaw(const TopoDS_Wire& Path, // BRep_Tool B; TopoDS_Edge E; Handle(Geom_Curve) C; - Handle(GeomAdaptor_HCurve) AC; + Handle(GeomAdaptor_Curve) AC; Standard_Real First, Last; for (ipath=0, wexp.Init(myPath); @@ -65,7 +65,7 @@ BRepFill_Edge3DLaw::BRepFill_Edge3DLaw(const TopoDS_Wire& Path, Last = C->LastParameter(); } - AC = new (GeomAdaptor_HCurve) (C,First, Last); + AC = new (GeomAdaptor_Curve) (C,First, Last); myLaws->SetValue(ipath, Law->Copy()); myLaws->ChangeValue(ipath)->SetCurve(AC); } diff --git a/src/BRepFill/BRepFill_EdgeOnSurfLaw.cxx b/src/BRepFill/BRepFill_EdgeOnSurfLaw.cxx index b5a0003109..e68c4f3813 100644 --- a/src/BRepFill/BRepFill_EdgeOnSurfLaw.cxx +++ b/src/BRepFill/BRepFill_EdgeOnSurfLaw.cxx @@ -14,16 +14,15 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. +#include #include -#include #include -#include -#include +#include #include #include #include -#include +#include #include #include #include @@ -53,9 +52,9 @@ BRepFill_EdgeOnSurfLaw::BRepFill_EdgeOnSurfLaw(const TopoDS_Wire& Path, // BRep_Tool B; TopoDS_Edge E; Handle(Geom2d_Curve) C; - Handle(Geom2dAdaptor_HCurve) AC2d; - Handle(Adaptor3d_HCurveOnSurface) AC; - Handle(BRepAdaptor_HSurface) AS; + Handle(Geom2dAdaptor_Curve) AC2d; + Handle(Adaptor3d_CurveOnSurface) AC; + Handle(BRepAdaptor_Surface) AS; Standard_Real First = 0., Last = 0.; Handle(GeomFill_Darboux) TLaw = new (GeomFill_Darboux)() ; Handle(GeomFill_CurveAndTrihedron) Law = @@ -74,7 +73,7 @@ BRepFill_EdgeOnSurfLaw::BRepFill_EdgeOnSurfLaw(const TopoDS_Wire& Path, C = BRep_Tool::CurveOnSurface(E, F, First, Last); if (!C.IsNull()) { Trouve=Standard_True; - AS = new (BRepAdaptor_HSurface) (F); + AS = new (BRepAdaptor_Surface) (F); } } if (!Trouve) { // Impossible to construct the law. @@ -93,8 +92,8 @@ BRepFill_EdgeOnSurfLaw::BRepFill_EdgeOnSurfLaw(const TopoDS_Wire& Path, Last = C->LastParameter(); } - AC2d = new (Geom2dAdaptor_HCurve) (C,First, Last); - AC = new (Adaptor3d_HCurveOnSurface) + AC2d = new (Geom2dAdaptor_Curve) (C,First, Last); + AC = new (Adaptor3d_CurveOnSurface) (Adaptor3d_CurveOnSurface(AC2d, AS)); myLaws->SetValue(ipath, Law->Copy()); myLaws->ChangeValue(ipath)->SetCurve(AC); diff --git a/src/BRepFill/BRepFill_Filling.cxx b/src/BRepFill/BRepFill_Filling.cxx index d45e19c3f9..856e633674 100644 --- a/src/BRepFill/BRepFill_Filling.cxx +++ b/src/BRepFill/BRepFill_Filling.cxx @@ -16,16 +16,16 @@ #include -#include +#include #include #include #include #include #include #include -#include -#include -#include +#include +#include +#include #include #include #include @@ -40,9 +40,9 @@ #include #include #include -#include +#include #include -#include +#include #include #include #include @@ -298,10 +298,10 @@ Standard_Integer BRepFill_Filling::Add( const Standard_Real U, const TopoDS_Face& Support, const GeomAbs_Shape Order ) { - Handle( BRepAdaptor_HSurface ) HSurf = new BRepAdaptor_HSurface(); - HSurf->ChangeSurface().Initialize( Support ); + Handle( BRepAdaptor_Surface ) HSurf = new BRepAdaptor_Surface(); + HSurf->Initialize( Support ); Handle( GeomPlate_PointConstraint ) aPC = - new GeomPlate_PointConstraint( U, V, BRep_Tool::Surface( HSurf->ChangeSurface().Face() ), Order, + new GeomPlate_PointConstraint( U, V, BRep_Tool::Surface( HSurf->Face() ), Order, myTol3d, myTolAng, myTolCurv ); myPoints.Append( aPC ); return (myBoundary.Length() + myFreeConstraints.Length() + myConstraints.Length() + myPoints.Length()); @@ -328,9 +328,9 @@ void BRepFill_Filling::AddConstraints( const BRepFill_SequenceOfEdgeFaceAndOrder if (CurFace.IsNull()) { if (CurOrder == GeomAbs_C0) { - Handle( BRepAdaptor_HCurve ) HCurve = new BRepAdaptor_HCurve(); - HCurve->ChangeCurve().Initialize( CurEdge ); - const Handle(Adaptor3d_HCurve)& aHCurve = HCurve; // to avoid ambiguity + Handle( BRepAdaptor_Curve ) HCurve = new BRepAdaptor_Curve(); + HCurve->Initialize( CurEdge ); + const Handle(Adaptor3d_Curve)& aHCurve = HCurve; // to avoid ambiguity Constr = new BRepFill_CurveConstraint(aHCurve, CurOrder, myNbPtsOnCur, @@ -349,11 +349,11 @@ void BRepFill_Filling::AddConstraints( const BRepFill_SequenceOfEdgeFaceAndOrder } Surface = Handle(Geom_Surface)::DownCast(Surface->Copy()); Surface->Transform(loc.Transformation()); - Handle( GeomAdaptor_HSurface ) Surf = new GeomAdaptor_HSurface(Surface); - Handle( Geom2dAdaptor_HCurve ) Curve2d = new Geom2dAdaptor_HCurve(C2d); + Handle( GeomAdaptor_Surface ) Surf = new GeomAdaptor_Surface(Surface); + Handle( Geom2dAdaptor_Curve ) Curve2d = new Geom2dAdaptor_Curve(C2d); Adaptor3d_CurveOnSurface CurvOnSurf( Curve2d, Surf ); - Handle (Adaptor3d_HCurveOnSurface) HCurvOnSurf = new Adaptor3d_HCurveOnSurface( CurvOnSurf ); + Handle (Adaptor3d_CurveOnSurface) HCurvOnSurf = new Adaptor3d_CurveOnSurface( CurvOnSurf ); Constr = new GeomPlate_CurveConstraint(HCurvOnSurf, CurOrder, @@ -365,15 +365,15 @@ void BRepFill_Filling::AddConstraints( const BRepFill_SequenceOfEdgeFaceAndOrder } else { - Handle( BRepAdaptor_HSurface ) Surf = new BRepAdaptor_HSurface(); - Surf->ChangeSurface().Initialize( CurFace ); - Handle( BRepAdaptor_HCurve2d ) Curve2d = new BRepAdaptor_HCurve2d(); - Curve2d->ChangeCurve2d().Initialize( CurEdge, CurFace ); + Handle( BRepAdaptor_Surface ) Surf = new BRepAdaptor_Surface(); + Surf->Initialize( CurFace ); + Handle( BRepAdaptor_Curve2d ) Curve2d = new BRepAdaptor_Curve2d(); + Curve2d->Initialize( CurEdge, CurFace ); // If CurEdge has no 2d representation on CurFace, // there will be exception "Attempt to access to null object" // in this initialization (null pcurve). Adaptor3d_CurveOnSurface CurvOnSurf( Curve2d, Surf ); - Handle (Adaptor3d_HCurveOnSurface) HCurvOnSurf = new Adaptor3d_HCurveOnSurface( CurvOnSurf ); + Handle (Adaptor3d_CurveOnSurface) HCurvOnSurf = new Adaptor3d_CurveOnSurface( CurvOnSurf ); Constr = new BRepFill_CurveConstraint( HCurvOnSurf, CurOrder, @@ -597,9 +597,9 @@ void BRepFill_Filling::Build() Standard_Real U1, V1, U2, V2; CurFace = myFreeConstraints(j).myFace; - Handle( BRepAdaptor_HSurface ) HSurf = new BRepAdaptor_HSurface(); - HSurf->ChangeSurface().Initialize( CurFace ); - Handle( Geom_Surface ) CurSurface = BRep_Tool::Surface( HSurf->ChangeSurface().Face() ); + Handle( BRepAdaptor_Surface ) HSurf = new BRepAdaptor_Surface(); + HSurf->Initialize( CurFace ); + Handle( Geom_Surface ) CurSurface = BRep_Tool::Surface( HSurf->Face() ); //BRepTopAdaptor_FClass2d Classifier( CurFace, Precision::Confusion() ); for (i = 1; i <= VerSeq.Length(); i += 2) @@ -648,9 +648,9 @@ void BRepFill_Filling::Build() //Load initial surface to myBuilder if it is given if (myIsInitFaceGiven) { - Handle( BRepAdaptor_HSurface ) HSurfInit = new BRepAdaptor_HSurface(); - HSurfInit->ChangeSurface().Initialize( myInitFace ); - myBuilder.LoadInitSurface( BRep_Tool::Surface( HSurfInit->ChangeSurface().Face() ) ); + Handle( BRepAdaptor_Surface ) HSurfInit = new BRepAdaptor_Surface(); + HSurfInit->Initialize( myInitFace ); + myBuilder.LoadInitSurface( BRep_Tool::Surface( HSurfInit->Face() ) ); } //Adding constraints to myBuilder diff --git a/src/BRepFill/BRepFill_LocationLaw.cxx b/src/BRepFill/BRepFill_LocationLaw.cxx index 6ca54a717b..cb7b44e728 100644 --- a/src/BRepFill/BRepFill_LocationLaw.cxx +++ b/src/BRepFill/BRepFill_LocationLaw.cxx @@ -15,7 +15,7 @@ // commercial license or contractual agreement. -#include +#include #include #include #include @@ -440,7 +440,7 @@ void BRepFill_LocationLaw::CurvilinearBounds(const Standard_Integer Index, for (ii=1, Length=0.; ii<=NbE; ii++) { myLaws->Value(ii)->GetDomain(f, l); - Length += AbsC.Length(myLaws->Value(ii)->GetCurve()->GetCurve(), myTol); + Length += AbsC.Length(*myLaws->Value(ii)->GetCurve(), myTol); myLength->SetValue(ii+1, Length); } @@ -585,7 +585,7 @@ void BRepFill_LocationLaw::CurvilinearBounds(const Standard_Integer Index, else { GCPnts_AbscissaPoint AbsC(myTol, - myLaws->Value(iedge)->GetCurve()->GetCurve(), + *myLaws->Value(iedge)->GetCurve(), Abcissa-myLength->Value(iedge), f); U = AbsC.Parameter(); } @@ -645,7 +645,7 @@ void BRepFill_LocationLaw::CurvilinearBounds(const Standard_Integer Index, CurvilinearBounds(Index, bid, Length); } - Length += AbsC.Length(myLaws->Value(Index)->GetCurve()->GetCurve(), + Length += AbsC.Length(*myLaws->Value(Index)->GetCurve(), myLaws->Value(Index)->GetCurve()->FirstParameter(), Param, myTol); return Length; diff --git a/src/BRepFill/BRepFill_OffsetWire.cxx b/src/BRepFill/BRepFill_OffsetWire.cxx index 362092bb04..be82150111 100644 --- a/src/BRepFill/BRepFill_OffsetWire.cxx +++ b/src/BRepFill/BRepFill_OffsetWire.cxx @@ -51,7 +51,6 @@ #include #include #include -#include #include #include #include @@ -271,7 +270,7 @@ static Standard_Boolean KPartCircle Standard_Real anOffset = myOffset; Handle(Geom2d_Curve) aPCurve = BRep_Tool::CurveOnSurface(E, mySpine, f, l); - Handle(Geom2dAdaptor_HCurve) AHC = new Geom2dAdaptor_HCurve(aPCurve, f, l); + Handle(Geom2dAdaptor_Curve) AHC = new Geom2dAdaptor_Curve(aPCurve, f, l); Handle(Geom2d_Curve) OC; if (AHC->GetType() == GeomAbs_Line) { @@ -2055,8 +2054,8 @@ void MakeOffset (const TopoDS_Edge& E, if (anOffset*Signe < AC.Circle().Radius() - Precision::Confusion()) { - Handle(Geom2dAdaptor_HCurve) AHC = - new Geom2dAdaptor_HCurve(G2d); + Handle(Geom2dAdaptor_Curve) AHC = + new Geom2dAdaptor_Curve(G2d); Adaptor2d_OffsetCurve Off(AHC, anOffset); Handle(Geom2d_Circle) CC = new Geom2d_Circle(Off.Circle()); @@ -2090,8 +2089,8 @@ void MakeOffset (const TopoDS_Edge& E, } } else if (AC.GetType() == GeomAbs_Line) { - Handle(Geom2dAdaptor_HCurve) AHC = - new Geom2dAdaptor_HCurve(G2d); + Handle(Geom2dAdaptor_Curve) AHC = + new Geom2dAdaptor_Curve(G2d); Adaptor2d_OffsetCurve Off(AHC, anOffset); Handle(Geom2d_Line) CC = new Geom2d_Line(Off.Line()); Standard_Real Delta = (l - f); diff --git a/src/BRepFill/BRepFill_Pipe.cxx b/src/BRepFill/BRepFill_Pipe.cxx index d51a3c9811..13374944a4 100644 --- a/src/BRepFill/BRepFill_Pipe.cxx +++ b/src/BRepFill/BRepFill_Pipe.cxx @@ -30,12 +30,12 @@ #include #include #include -#include +#include #include #include #include #include -#include +#include #include #include #include @@ -115,9 +115,9 @@ static void UpdateTolFromTopOrBottomPCurve(const TopoDS_Face& aFace, if (aCurve.IsNull()) return; - Handle(Geom2dAdaptor_HCurve) GAHC2d = new Geom2dAdaptor_HCurve(aPCurve, fpar, lpar); + Handle(Geom2dAdaptor_Curve) GAHC2d = new Geom2dAdaptor_Curve(aPCurve, fpar, lpar); Handle(Geom_Surface) aSurf = BRep_Tool::Surface(aFace); - Handle(GeomAdaptor_HSurface) GAHS = new GeomAdaptor_HSurface(aSurf); + Handle(GeomAdaptor_Surface) GAHS = new GeomAdaptor_Surface(aSurf); Adaptor3d_CurveOnSurface ConS(GAHC2d, GAHS); Standard_Real Tol = BRep_Tool::Tolerance(anEdge); diff --git a/src/BRepFill/BRepFill_PipeShell.cxx b/src/BRepFill/BRepFill_PipeShell.cxx index 5efc443877..a51ccc6b35 100644 --- a/src/BRepFill/BRepFill_PipeShell.cxx +++ b/src/BRepFill/BRepFill_PipeShell.cxx @@ -17,7 +17,7 @@ #include #include -#include +#include #include #include #include @@ -38,8 +38,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include @@ -386,7 +386,7 @@ BRepFill_PipeShell::BRepFill_PipeShell(const TopoDS_Wire& Spine) DBRep::Set("theguide", TheGuide); #endif // transform the guide in a single curve - Handle(BRepAdaptor_HCompCurve) Guide = new (BRepAdaptor_HCompCurve) (TheGuide); + Handle(BRepAdaptor_CompCurve) Guide = new (BRepAdaptor_CompCurve) (TheGuide); if (CurvilinearEquivalence) { // trihedron by curvilinear reduced abscissa if (KeepContact == BRepFill_Contact || @@ -491,9 +491,9 @@ void BRepFill_PipeShell::SetForceApproxC1(const Standard_Boolean ForceApproxC1) TopoDS_Face ProfileFace = BRepLib_MakeFace(TopoDS::Wire(Profile), Standard_True); //only plane Handle(Geom_Surface) thePlane = BRep_Tool::Surface(ProfileFace); - Handle(GeomAdaptor_HSurface) GAHplane = new GeomAdaptor_HSurface(thePlane); + Handle(GeomAdaptor_Surface) GAHplane = new GeomAdaptor_Surface(thePlane); IntCurveSurface_HInter Intersector; - Handle(Adaptor3d_HCurve) aHCurve [2]; + Handle(Adaptor3d_Curve) aHCurve [2]; aHCurve[0] = Loc->GetCurve(); aHCurve[1] = Loc->Guide(); gp_Pnt PointsOnSpines [2]; diff --git a/src/BRepFill/BRepFill_SectionPlacement.cxx b/src/BRepFill/BRepFill_SectionPlacement.cxx index 9335334f0f..0164700549 100644 --- a/src/BRepFill/BRepFill_SectionPlacement.cxx +++ b/src/BRepFill/BRepFill_SectionPlacement.cxx @@ -16,8 +16,8 @@ #include -#include -#include +#include +#include #include #include #include @@ -27,7 +27,7 @@ #include #include #include -#include +#include #include #include #include @@ -288,8 +288,8 @@ BRepFill_SectionPlacement(const Handle(BRepFill_LocationLaw)& Law, } SuperKnot(1) = 0; - Handle(BRepAdaptor_HCompCurve) adpPath = - new (BRepAdaptor_HCompCurve) (myLaw->Wire()); + Handle(BRepAdaptor_CompCurve) adpPath = + new (BRepAdaptor_CompCurve) (myLaw->Wire()); Place.Perform(adpPath, Precision::Confusion()); diff --git a/src/BRepFill/BRepFill_Sweep.cxx b/src/BRepFill/BRepFill_Sweep.cxx index e00cf0aa70..46ef252fb1 100644 --- a/src/BRepFill/BRepFill_Sweep.cxx +++ b/src/BRepFill/BRepFill_Sweep.cxx @@ -15,7 +15,7 @@ // commercial license or contractual agreement. -#include +#include #include #include #include @@ -27,9 +27,9 @@ #include #include #include -#include -#include -#include +#include +#include +#include #include #include #include @@ -48,7 +48,7 @@ #include #include #include -#include +#include #include #include #include @@ -56,8 +56,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include @@ -271,9 +271,9 @@ static Handle(Geom2d_Curve) Couture(const TopoDS_Edge& E, //======================================================================= static Standard_Boolean CheckSameParameter -(const Handle(Adaptor3d_HCurve)& C3d, +(const Handle(Adaptor3d_Curve)& C3d, const Handle(Geom2d_Curve)& Pcurv, - const Handle(Adaptor3d_HSurface)& S, + const Handle(Adaptor3d_Surface)& S, const Standard_Real tol3d, Standard_Real& tolreached) { @@ -315,13 +315,13 @@ static Standard_Boolean SameParameter(TopoDS_Edge& E, const Standard_Real tol3d, Standard_Real& tolreached) { - //Handle(BRepAdaptor_HCurve) C3d = new (BRepAdaptor_HCurve)(E); + //Handle(BRepAdaptor_Curve) C3d = new (BRepAdaptor_Curve)(E); Standard_Real f, l; Handle(Geom_Curve) C3d = BRep_Tool::Curve( E, f, l ); GeomAdaptor_Curve GAC3d( C3d, f, l ); - Handle(GeomAdaptor_HCurve) HC3d = new GeomAdaptor_HCurve( GAC3d ); + Handle(GeomAdaptor_Curve) HC3d = new GeomAdaptor_Curve( GAC3d ); - Handle(GeomAdaptor_HSurface) S = new (GeomAdaptor_HSurface)(Surf); + Handle(GeomAdaptor_Surface) S = new (GeomAdaptor_Surface)(Surf); Standard_Real ResTol; if(CheckSameParameter( HC3d, Pcurv, S, tol3d, tolreached )) @@ -329,7 +329,7 @@ static Standard_Boolean SameParameter(TopoDS_Edge& E, if (!HasPCurves(E)) { - Handle(Geom2dAdaptor_HCurve) HC2d = new Geom2dAdaptor_HCurve( Pcurv ); + Handle(Geom2dAdaptor_Curve) HC2d = new Geom2dAdaptor_Curve( Pcurv ); Approx_CurveOnSurface AppCurve(HC2d, S, HC2d->FirstParameter(), HC2d->LastParameter(), Precision::Confusion()); AppCurve.Perform(10, 10, GeomAbs_C1, Standard_True); @@ -343,7 +343,7 @@ static Standard_Boolean SameParameter(TopoDS_Edge& E, } } - const Handle(Adaptor3d_HCurve)& aHCurve = HC3d; // to avoid ambiguity + const Handle(Adaptor3d_Curve)& aHCurve = HC3d; // to avoid ambiguity Approx_SameParameter sp (aHCurve, Pcurv, S, tol3d ); if(sp.IsDone() && !sp.IsSameParameter()) Pcurv = sp.Curve2d(); else if(!sp.IsDone() && !sp.IsSameParameter()){ @@ -951,9 +951,9 @@ static Standard_Boolean Filling(const TopoDS_Shape& EF, // Deform the surface of revolution. GeomPlate_BuildPlateSurface BPS; - Handle(BRepAdaptor_HSurface) AS; - Handle(BRepAdaptor_HCurve2d) AC2d; - Handle(Adaptor3d_HCurveOnSurface) HConS; + Handle(BRepAdaptor_Surface) AS; + Handle(BRepAdaptor_Curve2d) AC2d; + Handle(Adaptor3d_CurveOnSurface) HConS; */ Handle(Geom2d_Line) L; gp_Pnt2d P2d(0.,0.); @@ -1009,10 +1009,10 @@ static Standard_Boolean Filling(const TopoDS_Shape& EF, // Determine the constraints and // their parametric localisation. if (!E1.IsNull()) { - AS = new BRepAdaptor_HSurface(TopoDS::Face(F1)); - AC2d = new BRepAdaptor_HCurve2d(); + AS = new BRepAdaptor_Surface(TopoDS::Face(F1)); + AC2d = new BRepAdaptor_Curve2d(); AC2d->ChangeCurve2d().Initialize(E1,TopoDS::Face(F1)); - HConS = new (Adaptor3d_HCurveOnSurface)(); + HConS = new (Adaptor3d_CurveOnSurface)(); HConS->ChangeCurve().Load(AC2d); HConS->ChangeCurve().Load(AS); @@ -1025,10 +1025,10 @@ static Standard_Boolean Filling(const TopoDS_Shape& EF, } if (!E2.IsNull()) { - AS = new BRepAdaptor_HSurface(TopoDS::Face(F2)); - AC2d = new BRepAdaptor_HCurve2d(); + AS = new BRepAdaptor_Surface(TopoDS::Face(F2)); + AC2d = new BRepAdaptor_Curve2d(); AC2d->ChangeCurve2d().Initialize(E2,TopoDS::Face(F2)); - HConS = new (Adaptor3d_HCurveOnSurface); + HConS = new (Adaptor3d_CurveOnSurface); HConS->ChangeCurve().Load(AC2d); HConS->ChangeCurve().Load(AS); @@ -1040,7 +1040,7 @@ static Standard_Boolean Filling(const TopoDS_Shape& EF, } if (WithE3) { - Handle(BRepAdaptor_HCurve) AC = new (BRepAdaptor_HCurve) (E3); + Handle(BRepAdaptor_Curve) AC = new (BRepAdaptor_Curve) (E3); Handle(BRepFill_CurveConstraint) Cont = new BRepFill_CurveConstraint(AC, 0); Cont->SetCurve2dOnSurf(C3); @@ -1061,7 +1061,7 @@ static Standard_Boolean Filling(const TopoDS_Shape& EF, if (WithE4) { - Handle(BRepAdaptor_HCurve) AC = new (BRepAdaptor_HCurve) (E4); + Handle(BRepAdaptor_Curve) AC = new (BRepAdaptor_Curve) (E4); Handle(BRepFill_CurveConstraint) Cont = new BRepFill_CurveConstraint(AC, 0); Cont->SetCurve2dOnSurf(C4); @@ -1236,7 +1236,7 @@ static Standard_Boolean Filling(const TopoDS_Shape& EF, // C1 = BT.CurveOnSurface(E1, TopoDS::Face(F1), f2, l2); C1 = BRep_Tool::CurveOnSurface(E1, TopoDS::Face(F1), f2, l2); C1->D0(aPrm[i], P2d); - Handle(BRepAdaptor_HSurface) AS = new BRepAdaptor_HSurface(TopoDS::Face(F1)); + Handle(BRepAdaptor_Surface) AS = new BRepAdaptor_Surface(TopoDS::Face(F1)); AS->D1(P2d.X(), P2d.Y(), P, D1U, D1V); N2 = D1U^D1V; @@ -1555,9 +1555,9 @@ static TopoDS_Edge BuildEdge(const Handle(Geom_Surface)& S, Standard_Real MaxTol = 1.e-4; Standard_Real theTol; GeomAdaptor_Curve GAiso(Iso); - Handle(GeomAdaptor_HCurve) GAHiso = new GeomAdaptor_HCurve(GAiso); + Handle(GeomAdaptor_Curve) GAHiso = new GeomAdaptor_Curve(GAiso); GeomAdaptor_Surface GAsurf(S); - Handle(GeomAdaptor_HSurface) GAHsurf = new GeomAdaptor_HSurface(GAsurf); + Handle(GeomAdaptor_Surface) GAHsurf = new GeomAdaptor_Surface(GAsurf); CheckSameParameter( GAHiso, L, GAHsurf, MaxTol, theTol); B.UpdateEdge(E, theTol); diff --git a/src/BRepFill/BRepFill_TrimSurfaceTool.cxx b/src/BRepFill/BRepFill_TrimSurfaceTool.cxx index 7921d87d9b..53de917a72 100644 --- a/src/BRepFill/BRepFill_TrimSurfaceTool.cxx +++ b/src/BRepFill/BRepFill_TrimSurfaceTool.cxx @@ -36,7 +36,7 @@ #include #include #include -#include +#include #include #include #include @@ -368,8 +368,8 @@ static void EvalParameters(const TopoDS_Edge& Edge, //---------------------------------------------------------- Handle(Geom_SurfaceOfRevolution) GSRev = Handle(Geom_SurfaceOfRevolution)::DownCast(GS); - Handle(GeomAdaptor_HCurve) HC = - new GeomAdaptor_HCurve(GSRev->BasisCurve()); + Handle(GeomAdaptor_Curve) HC = + new GeomAdaptor_Curve(GSRev->BasisCurve()); GeomAdaptor_SurfaceOfRevolution ASRev(HC,GAS.AxeOfRevolution()); Axis = ASRev.Axis(); Phase = EvalPhase(Edge,Face,GAS,Axis); diff --git a/src/BRepIntCurveSurface/BRepIntCurveSurface_Inter.cxx b/src/BRepIntCurveSurface/BRepIntCurveSurface_Inter.cxx index 0bf8e39760..396e7d08b3 100644 --- a/src/BRepIntCurveSurface/BRepIntCurveSurface_Inter.cxx +++ b/src/BRepIntCurveSurface/BRepIntCurveSurface_Inter.cxx @@ -14,17 +14,15 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. +#include #include #include -#include #include #include -#include #include #include #include -#include #include #include #include @@ -118,9 +116,11 @@ void BRepIntCurveSurface_Inter::Init(const GeomAdaptor_Curve& theCurve ) myCurveBox.SetVoid(); Standard_Real aFirst = theCurve.FirstParameter(); Standard_Real aLast = theCurve.LastParameter(); - myCurve = new GeomAdaptor_HCurve(theCurve ); + myCurve = new GeomAdaptor_Curve(theCurve ); if( !Precision::IsInfinite(aFirst) && !Precision::IsInfinite(aLast) ) - BndLib_Add3dCurve::Add(myCurve->Curve(),0., myCurveBox); + { + BndLib_Add3dCurve::Add (*myCurve, 0., myCurveBox); + } Find(); } @@ -172,13 +172,13 @@ void BRepIntCurveSurface_Inter::Find() ( !myCurveBox.IsVoid() ? aFaceBox.IsOut(myCurveBox ) : Standard_False ) ); if(isOut ) continue; - Handle(BRepAdaptor_HSurface) aSurfForFastClass = new BRepAdaptor_HSurface(TopoDS::Face(aCurface)); + Handle(BRepAdaptor_Surface) aSurfForFastClass = new BRepAdaptor_Surface(TopoDS::Face(aCurface)); myIntcs.Perform(myCurve,aSurfForFastClass); myCurrentnbpoints = myIntcs.NbPoints(); if( !myCurrentnbpoints) continue; - const Handle(Adaptor3d_HSurface)& aSurf = aSurfForFastClass; // to avoid ambiguity + const Handle(Adaptor3d_Surface)& aSurf = aSurfForFastClass; // to avoid ambiguity myFastClass->Initialize(aSurf); myIndFace = i; if(FindPoint()) diff --git a/src/BRepIntCurveSurface/BRepIntCurveSurface_Inter.hxx b/src/BRepIntCurveSurface/BRepIntCurveSurface_Inter.hxx index eaf62be1f4..c86ba7625a 100644 --- a/src/BRepIntCurveSurface/BRepIntCurveSurface_Inter.hxx +++ b/src/BRepIntCurveSurface/BRepIntCurveSurface_Inter.hxx @@ -17,20 +17,14 @@ #ifndef _BRepIntCurveSurface_Inter_HeaderFile #define _BRepIntCurveSurface_Inter_HeaderFile -#include -#include -#include - -#include +#include #include -#include #include #include #include #include -#include #include -class GeomAdaptor_HCurve; + class BRepTopAdaptor_TopolTool; class StdFail_NotDone; class TopoDS_Shape; @@ -142,7 +136,7 @@ private: Standard_Real myTolerance; - Handle(GeomAdaptor_HCurve) myCurve; + Handle(GeomAdaptor_Curve) myCurve; IntCurveSurface_HInter myIntcs; Standard_Integer myCurrentindex; Standard_Integer myCurrentnbpoints; diff --git a/src/BRepLib/BRepLib.cxx b/src/BRepLib/BRepLib.cxx index 6a35e1fdf5..62363c085f 100644 --- a/src/BRepLib/BRepLib.cxx +++ b/src/BRepLib/BRepLib.cxx @@ -17,6 +17,8 @@ //pmn 26/09/97 Add parameters of approximation in BuildCurve3d // Modified by skv - Thu Jun 3 12:39:19 2004 OCC5898 +#include + #include #include #include @@ -34,13 +36,11 @@ #include #include #include -#include -#include -#include +#include +#include #include #include #include -#include #include #include #include @@ -51,7 +51,6 @@ #include #include #include -#include #include #include #include @@ -61,8 +60,6 @@ #include #include #include -#include -#include #include #include #include @@ -309,8 +306,8 @@ static Standard_Integer evaluateMaxSegment(const Standard_Integer aMaxSegment, { if (aMaxSegment != 0) return aMaxSegment; - Handle(Adaptor3d_HSurface) aSurf = aCurveOnSurface.GetSurface(); - Handle(Adaptor2d_HCurve2d) aCurv2d = aCurveOnSurface.GetCurve(); + Handle(Adaptor3d_Surface) aSurf = aCurveOnSurface.GetSurface(); + Handle(Adaptor2d_Curve2d) aCurv2d = aCurveOnSurface.GetCurve(); Standard_Real aNbSKnots = 0, aNbC2dKnots = 0; @@ -436,10 +433,10 @@ Standard_Boolean BRepLib::BuildCurve3d(const TopoDS_Edge& AnEdge, Geom2dAdaptor_Curve AnAdaptor3dCurve2d (Curve2dPtr, f, l) ; GeomAdaptor_Surface AnAdaptor3dSurface (SurfacePtr) ; - Handle(Geom2dAdaptor_HCurve) AnAdaptor3dCurve2dPtr = - new Geom2dAdaptor_HCurve(AnAdaptor3dCurve2d) ; - Handle(GeomAdaptor_HSurface) AnAdaptor3dSurfacePtr = - new GeomAdaptor_HSurface (AnAdaptor3dSurface) ; + Handle(Geom2dAdaptor_Curve) AnAdaptor3dCurve2dPtr = + new Geom2dAdaptor_Curve(AnAdaptor3dCurve2d) ; + Handle(GeomAdaptor_Surface) AnAdaptor3dSurfacePtr = + new GeomAdaptor_Surface (AnAdaptor3dSurface) ; Adaptor3d_CurveOnSurface CurveOnSurface( AnAdaptor3dCurve2dPtr, AnAdaptor3dSurfacePtr) ; @@ -616,10 +613,10 @@ Standard_Boolean BRepLib::UpdateEdgeTol(const TopoDS_Edge& AnEdge, } Geom2dAdaptor_Curve AnAdaptor3dCurve2d (curve2d_ptr) ; GeomAdaptor_Surface AnAdaptor3dSurface (surface_ptr) ; - Handle(Geom2dAdaptor_HCurve) AnAdaptor3dCurve2dPtr = - new Geom2dAdaptor_HCurve(AnAdaptor3dCurve2d) ; - Handle(GeomAdaptor_HSurface) AnAdaptor3dSurfacePtr = - new GeomAdaptor_HSurface (AnAdaptor3dSurface) ; + Handle(Geom2dAdaptor_Curve) AnAdaptor3dCurve2dPtr = + new Geom2dAdaptor_Curve(AnAdaptor3dCurve2d) ; + Handle(GeomAdaptor_Surface) AnAdaptor3dSurfacePtr = + new GeomAdaptor_Surface (AnAdaptor3dSurface) ; curve_on_surface_reference.Load (AnAdaptor3dCurve2dPtr, AnAdaptor3dSurfacePtr); a_sampler.Initialize(curve_on_surface_reference, MinToleranceRequested * factor, @@ -685,10 +682,10 @@ Standard_Boolean BRepLib::UpdateEdgeTol(const TopoDS_Edge& AnEdge, } Geom2dAdaptor_Curve an_adaptor_curve2d (curve2d_ptr) ; GeomAdaptor_Surface an_adaptor_surface(surface_ptr) ; - Handle(Geom2dAdaptor_HCurve) an_adaptor_curve2d_ptr = - new Geom2dAdaptor_HCurve(an_adaptor_curve2d) ; - Handle(GeomAdaptor_HSurface) an_adaptor_surface_ptr = - new GeomAdaptor_HSurface (an_adaptor_surface) ; + Handle(Geom2dAdaptor_Curve) an_adaptor_curve2d_ptr = + new Geom2dAdaptor_Curve(an_adaptor_curve2d) ; + Handle(GeomAdaptor_Surface) an_adaptor_surface_ptr = + new GeomAdaptor_Surface (an_adaptor_surface) ; Adaptor3d_CurveOnSurface a_curve_on_surface(an_adaptor_curve2d_ptr, an_adaptor_surface_ptr) ; @@ -786,20 +783,19 @@ static void GetEdgeTol(const TopoDS_Edge& theEdge, else GP = Handle(Geom_Plane)::DownCast(S); - Handle(GeomAdaptor_HCurve) HC = new GeomAdaptor_HCurve(); - Handle(GeomAdaptor_HSurface) HS = new GeomAdaptor_HSurface(); + Handle(GeomAdaptor_Curve) HC = new GeomAdaptor_Curve(); + Handle(GeomAdaptor_Surface) HS = new GeomAdaptor_Surface(); TopLoc_Location LC; Standard_Real First, Last; - GeomAdaptor_Curve& GAC = HC->ChangeCurve(); - GAC.Load(BRep_Tool::Curve(theEdge,LC,First,Last)); + HC->Load(BRep_Tool::Curve(theEdge,LC,First,Last)); LC = L.Predivided(LC); if (!LC.IsIdentity()) { GP = Handle(Geom_Plane)::DownCast( GP->Transformed(LC.Transformation())); } - GeomAdaptor_Surface& GAS = HS->ChangeSurface(); + GeomAdaptor_Surface& GAS = *HS; GAS.Load(GP); ProjLib_ProjectedCurve Proj(HS,HC); @@ -1062,9 +1058,9 @@ static Standard_Boolean EvalTol(const Handle(Geom2d_Curve)& pc, //function : ComputeTol //purpose : //======================================================================= -static Standard_Real ComputeTol(const Handle(Adaptor3d_HCurve)& c3d, - const Handle(Adaptor2d_HCurve2d)& c2d, - const Handle(Adaptor3d_HSurface)& surf, +static Standard_Real ComputeTol(const Handle(Adaptor3d_Curve)& c3d, + const Handle(Adaptor2d_Curve2d)& c2d, + const Handle(Adaptor3d_Surface)& surf, const Standard_Integer nbp) { @@ -1276,12 +1272,12 @@ TopoDS_Edge BRepLib::SameParameter(const TopoDS_Edge& theEdge, const Standard_Integer NCONTROL = 22; - Handle(GeomAdaptor_HCurve) HC = new GeomAdaptor_HCurve(); - Handle(Geom2dAdaptor_HCurve) HC2d = new Geom2dAdaptor_HCurve(); - Handle(GeomAdaptor_HSurface) HS = new GeomAdaptor_HSurface(); - GeomAdaptor_Curve& GAC = HC->ChangeCurve(); - Geom2dAdaptor_Curve& GAC2d = HC2d->ChangeCurve2d(); - GeomAdaptor_Surface& GAS = HS->ChangeSurface(); + Handle(GeomAdaptor_Curve) HC = new GeomAdaptor_Curve(); + Handle(Geom2dAdaptor_Curve) HC2d = new Geom2dAdaptor_Curve(); + Handle(GeomAdaptor_Surface) HS = new GeomAdaptor_Surface(); + GeomAdaptor_Curve& GAC = *HC; + Geom2dAdaptor_Curve& GAC2d = *HC2d; + GeomAdaptor_Surface& GAS = *HS; // modified by NIZHNY-OCC486 Tue Aug 27 17:15:13 2002 : Standard_Boolean m_TrimmedPeriodical = Standard_False; @@ -1556,8 +1552,8 @@ TopoDS_Edge BRepLib::SameParameter(const TopoDS_Edge& theEdge, if(goodpc){ // Approx_SameParameter SameP(HC,HC2d,HS,Tolerance); Standard_Real aTol = (isANA && isBSP) ? 1.e-7 : theTolerance; - const Handle(Adaptor3d_HCurve)& aHCurv = HC; // to avoid ambiguity - const Handle(Adaptor2d_HCurve2d)& aHCurv2d = HC2d; // to avoid ambiguity + const Handle(Adaptor3d_Curve)& aHCurv = HC; // to avoid ambiguity + const Handle(Adaptor2d_Curve2d)& aHCurv2d = HC2d; // to avoid ambiguity Approx_SameParameter SameP(aHCurv,aHCurv2d,HS,aTol); if (SameP.IsSameParameter()) { @@ -1845,8 +1841,8 @@ void BRepLib::UpdateInnerTolerances(const TopoDS_Shape& aShape) BRep_Tool::Range(anEdge, fpar, lpar); Standard_Real TolEdge = BRep_Tool::Tolerance(anEdge); gp_Pnt Pnt1, Pnt2; - Handle(BRepAdaptor_HCurve) anHCurve = new BRepAdaptor_HCurve(); - anHCurve->ChangeCurve().Initialize(anEdge); + Handle(BRepAdaptor_Curve) anHCurve = new BRepAdaptor_Curve(); + anHCurve->Initialize(anEdge); if (!V1.IsNull()) Pnt1 = BRep_Tool::Pnt(V1); if (!V2.IsNull()) @@ -1855,14 +1851,14 @@ void BRepLib::UpdateInnerTolerances(const TopoDS_Shape& aShape) if (!BRep_Tool::Degenerated(anEdge) && EFmap(i).Extent() > 0) { - NCollection_Sequence theRep; + NCollection_Sequence theRep; theRep.Append(anHCurve); TopTools_ListIteratorOfListOfShape itl(EFmap(i)); for (; itl.More(); itl.Next()) { const TopoDS_Face& aFace = TopoDS::Face(itl.Value()); - Handle(BRepAdaptor_HCurve) anHCurvOnSurf = new BRepAdaptor_HCurve(); - anHCurvOnSurf->ChangeCurve().Initialize(anEdge, aFace); + Handle(BRepAdaptor_Curve) anHCurvOnSurf = new BRepAdaptor_Curve(); + anHCurvOnSurf->Initialize(anEdge, aFace); theRep.Append(anHCurvOnSurf); } @@ -2062,7 +2058,7 @@ static GeomAbs_Shape tgtfaces(const TopoDS_Edge& Ed, Standard_Real f, l, eps; BRep_Tool::Range(E,f,l); Extrema_LocateExtPC ext; - Handle(BRepAdaptor_HCurve) aHC2; + Handle(BRepAdaptor_Curve) aHC2; eps = (l - f)/100.; f += eps; // to avoid calculations on @@ -2105,8 +2101,8 @@ static GeomAbs_Shape tgtfaces(const TopoDS_Edge& Ed, if (aHC2.IsNull()) { // adaptor for pcurve on the second surface - aHC2 = new BRepAdaptor_HCurve(BRepAdaptor_Curve(E, F2)); - ext.Initialize(aHC2->Curve(), f, l, Precision::PConfusion()); + aHC2 = new BRepAdaptor_Curve (E, F2); + ext.Initialize(*aHC2, f, l, Precision::PConfusion()); } ext.Perform(aSP1.Value(), u); if (ext.IsDone() && ext.IsMin()) diff --git a/src/BRepLib/BRepLib_MakeEdge.cxx b/src/BRepLib/BRepLib_MakeEdge.cxx index 4029c3ddcb..f1ddbdcefb 100644 --- a/src/BRepLib/BRepLib_MakeEdge.cxx +++ b/src/BRepLib/BRepLib_MakeEdge.cxx @@ -26,7 +26,7 @@ #include #include #include -#include +#include #include #include #include @@ -36,7 +36,7 @@ #include #include #include -#include +#include #include #include #include @@ -120,10 +120,8 @@ static Standard_Boolean Project(const Handle(Geom2d_Curve)& C, Standard_Real Eps2 = BRep_Tool::Tolerance(V); Eps2 *= Eps2; - Handle(Geom2dAdaptor_HCurve) HG2AHC = new Geom2dAdaptor_HCurve(); - HG2AHC->Set(C); - Handle(GeomAdaptor_HSurface) HGAHS = new GeomAdaptor_HSurface(); - HGAHS->Set(S); + Handle(Geom2dAdaptor_Curve) HG2AHC = new Geom2dAdaptor_Curve (C); + Handle(GeomAdaptor_Surface) HGAHS = new GeomAdaptor_Surface (S); Adaptor3d_CurveOnSurface ACOS(HG2AHC,HGAHS); Standard_Real D1,D2; diff --git a/src/BRepMesh/BRepMesh_CurveTessellator.cxx b/src/BRepMesh/BRepMesh_CurveTessellator.cxx index 179597bbc8..ec6860afa2 100644 --- a/src/BRepMesh/BRepMesh_CurveTessellator.cxx +++ b/src/BRepMesh/BRepMesh_CurveTessellator.cxx @@ -23,8 +23,8 @@ #include #include #include -#include -#include +#include +#include #include #include @@ -108,7 +108,7 @@ void BRepMesh_CurveTessellator::init() if (myCurve.IsCurveOnSurface()) { const Adaptor3d_CurveOnSurface& aCurve = myCurve.CurveOnSurface(); - const Handle(Adaptor3d_HSurface)& aSurface = aCurve.GetSurface(); + const Handle(Adaptor3d_Surface)& aSurface = aCurve.GetSurface(); const Standard_Real aTol = Precision::Confusion(); const Standard_Real aDu = aSurface->UResolution(aTol); @@ -238,7 +238,7 @@ Standard_Boolean BRepMesh_CurveTessellator::Value ( // If point coordinates are out of surface range, // it is necessary to re-project point. const Adaptor3d_CurveOnSurface& aCurve = myCurve.CurveOnSurface(); - const Handle(Adaptor3d_HSurface)& aSurface = aCurve.GetSurface(); + const Handle(Adaptor3d_Surface)& aSurface = aCurve.GetSurface(); if (aSurface->GetType() != GeomAbs_BSplineSurface && aSurface->GetType() != GeomAbs_BezierSurface && aSurface->GetType() != GeomAbs_OtherSurface) diff --git a/src/BRepMesh/BRepMesh_DefaultRangeSplitter.cxx b/src/BRepMesh/BRepMesh_DefaultRangeSplitter.cxx index ae5041418e..89557796a2 100644 --- a/src/BRepMesh/BRepMesh_DefaultRangeSplitter.cxx +++ b/src/BRepMesh/BRepMesh_DefaultRangeSplitter.cxx @@ -52,7 +52,7 @@ void BRepMesh_DefaultRangeSplitter::AddPoint(const gp_Pnt2d& thePoint) //======================================================================= void BRepMesh_DefaultRangeSplitter::AdjustRange() { - const Handle(BRepAdaptor_HSurface)& aSurface = GetSurface(); + const Handle(BRepAdaptor_Surface)& aSurface = GetSurface(); updateRange(aSurface->FirstUParameter(), aSurface->LastUParameter(), aSurface->IsUPeriodic(), myRangeU.first, myRangeU.second); @@ -165,7 +165,7 @@ Standard_Real BRepMesh_DefaultRangeSplitter::computeLengthU() Standard_Real dfucur; Standard_Integer i1; - const Handle(BRepAdaptor_HSurface)& gFace = GetSurface(); + const Handle(BRepAdaptor_Surface)& gFace = GetSurface(); gFace->D0(myRangeU.first, myRangeV.first, P11); gFace->D0(myRangeU.first, dfvave, P21); gFace->D0(myRangeU.first, myRangeV.second, P31); @@ -197,7 +197,7 @@ Standard_Real BRepMesh_DefaultRangeSplitter::computeLengthV() Standard_Real dfvcur; Standard_Integer i1; - const Handle(BRepAdaptor_HSurface)& gFace = GetSurface(); + const Handle(BRepAdaptor_Surface)& gFace = GetSurface(); gFace->D0(myRangeU.first, myRangeV.first, P11); gFace->D0(dfuave, myRangeV.first, P21); gFace->D0(myRangeU.second, myRangeV.first, P31); diff --git a/src/BRepMesh/BRepMesh_DefaultRangeSplitter.hxx b/src/BRepMesh/BRepMesh_DefaultRangeSplitter.hxx index a12333d100..23f9864dcc 100644 --- a/src/BRepMesh/BRepMesh_DefaultRangeSplitter.hxx +++ b/src/BRepMesh/BRepMesh_DefaultRangeSplitter.hxx @@ -18,7 +18,7 @@ #include #include -#include +#include #include #include @@ -91,7 +91,7 @@ public: } //! Returns surface. - const Handle(BRepAdaptor_HSurface)& GetSurface() const + const Handle(BRepAdaptor_Surface)& GetSurface() const { return myDFace->GetSurface(); } diff --git a/src/BRepMesh/BRepMesh_DelaunayDeflectionControlMeshAlgo.hxx b/src/BRepMesh/BRepMesh_DelaunayDeflectionControlMeshAlgo.hxx index cc496f20ca..39da48b602 100644 --- a/src/BRepMesh/BRepMesh_DelaunayDeflectionControlMeshAlgo.hxx +++ b/src/BRepMesh/BRepMesh_DelaunayDeflectionControlMeshAlgo.hxx @@ -357,8 +357,7 @@ private: const gp_XY& /*theMidPoint*/) { gp_Dir aNorm1, aNorm2; - const Handle(Geom_Surface)& aSurf = - this->getDFace()->GetSurface()->ChangeSurface().Surface().Surface(); + const Handle(Geom_Surface)& aSurf = this->getDFace()->GetSurface()->Surface().Surface(); if ((GeomLib::NormEstim(aSurf, theNodeInfo1.Point2d, Precision::Confusion(), aNorm1) == 0) && (GeomLib::NormEstim(aSurf, theNodeInfo2.Point2d, Precision::Confusion(), aNorm2) == 0)) diff --git a/src/BRepMesh/BRepMesh_EdgeDiscret.cxx b/src/BRepMesh/BRepMesh_EdgeDiscret.cxx index 277ec6ab1c..6fe4463fb4 100644 --- a/src/BRepMesh/BRepMesh_EdgeDiscret.cxx +++ b/src/BRepMesh/BRepMesh_EdgeDiscret.cxx @@ -308,7 +308,7 @@ void BRepMesh_EdgeDiscret::Tessellate2d( BRepMesh_EdgeParameterProvider aProvider( theDEdge, aPCurve->GetOrientation(), aDFace, aCurveArray); - const Handle(Adaptor2d_HCurve2d)& aGeomPCurve = aProvider.GetPCurve(); + const Handle(Adaptor2d_Curve2d)& aGeomPCurve = aProvider.GetPCurve(); Standard_Integer aParamIdx, aParamNb; if (theUpdateEnds) diff --git a/src/BRepMesh/BRepMesh_EdgeParameterProvider.hxx b/src/BRepMesh/BRepMesh_EdgeParameterProvider.hxx index 7d73cbe922..ab778b9256 100644 --- a/src/BRepMesh/BRepMesh_EdgeParameterProvider.hxx +++ b/src/BRepMesh/BRepMesh_EdgeParameterProvider.hxx @@ -27,8 +27,8 @@ #include #include #include -#include -#include +#include +#include class gp_Pnt; class TopoDS_Edge; @@ -146,7 +146,7 @@ public: } //! Returns pcurve used to compute parameters. - const Handle(Adaptor2d_HCurve2d)& GetPCurve() const + const Handle(Adaptor2d_Curve2d)& GetPCurve() const { return myCurveAdaptor.CurveOnSurface().GetCurve(); } diff --git a/src/BRepMesh/BRepMesh_GeomTool.cxx b/src/BRepMesh/BRepMesh_GeomTool.cxx index ae3126741c..c42a082aec 100644 --- a/src/BRepMesh/BRepMesh_GeomTool.cxx +++ b/src/BRepMesh/BRepMesh_GeomTool.cxx @@ -22,16 +22,16 @@ #include #include #include -#include +#include #include -#include +#include #include #include namespace { void ComputeErrFactors (const Standard_Real theDeflection, - const Handle(Adaptor3d_HSurface)& theFace, + const Handle(Adaptor3d_Surface)& theFace, Standard_Real& theErrFactorU, Standard_Real& theErrFactorV) { @@ -49,7 +49,7 @@ namespace case GeomAbs_SurfaceOfExtrusion: case GeomAbs_SurfaceOfRevolution: { - Handle(Adaptor3d_HCurve) aCurve = theFace->BasisCurve (); + Handle(Adaptor3d_Curve) aCurve = theFace->BasisCurve (); if (aCurve->GetType () == GeomAbs_BSplineCurve && aCurve->Degree () > 2) { theErrFactorV /= (aCurve->Degree () * aCurve->NbKnots ()); @@ -87,7 +87,7 @@ namespace } } - void AdjustCellsCounts (const Handle(Adaptor3d_HSurface)& theFace, + void AdjustCellsCounts (const Handle(Adaptor3d_Surface)& theFace, const Standard_Integer theNbVertices, Standard_Integer& theCellsCountU, Standard_Integer& theCellsCountV) @@ -111,7 +111,7 @@ namespace } else if (aType == GeomAbs_SurfaceOfExtrusion || aType == GeomAbs_SurfaceOfRevolution) { - Handle (Adaptor3d_HCurve) aCurve = theFace->BasisCurve (); + Handle (Adaptor3d_Curve) aCurve = theFace->BasisCurve (); if (aCurve->GetType () == GeomAbs_Line || (aCurve->GetType () == GeomAbs_BSplineCurve && aCurve->Degree () < 2)) { @@ -169,7 +169,7 @@ BRepMesh_GeomTool::BRepMesh_GeomTool( //purpose : //======================================================================= BRepMesh_GeomTool::BRepMesh_GeomTool( - const Handle(BRepAdaptor_HSurface)& theSurface, + const Handle(BRepAdaptor_Surface)& theSurface, const GeomAbs_IsoType theIsoType, const Standard_Real theParamIso, const Standard_Real theFirstParam, @@ -195,7 +195,7 @@ BRepMesh_GeomTool::BRepMesh_GeomTool( //======================================================================= Standard_Boolean BRepMesh_GeomTool::Value( const Standard_Integer theIndex, - const Handle(BRepAdaptor_HSurface)& theSurface, + const Handle(BRepAdaptor_Surface)& theSurface, Standard_Real& theParam, gp_Pnt& thePoint, gp_Pnt2d& theUV) const @@ -209,7 +209,7 @@ Standard_Boolean BRepMesh_GeomTool::Value( thePoint = myDiscretTool.Value(theIndex); theParam = myDiscretTool.Parameter(theIndex); - const TopoDS_Face& aFace = ((BRepAdaptor_Surface*)&(theSurface->Surface()))->Face(); + const TopoDS_Face& aFace = theSurface->Face(); Standard_Real aFirst, aLast; Handle(Geom2d_Curve) aCurve = @@ -250,7 +250,7 @@ Standard_Boolean BRepMesh_GeomTool::Value( //purpose : //======================================================================= Standard_Boolean BRepMesh_GeomTool::Normal( - const Handle(BRepAdaptor_HSurface)& theSurface, + const Handle(BRepAdaptor_Surface)& theSurface, const Standard_Real theParamU, const Standard_Real theParamV, gp_Pnt& thePoint, @@ -275,7 +275,7 @@ Standard_Boolean BRepMesh_GeomTool::Normal( if (!isOK) return Standard_False; - const TopoDS_Face& aFace = ((BRepAdaptor_Surface*)&(theSurface->Surface()))->Face(); + const TopoDS_Face& aFace = theSurface->Face(); TopAbs_Orientation aOri = aFace.Orientation(); if (aOri == TopAbs_REVERSED) theNormal.Reverse(); @@ -428,7 +428,7 @@ BRepMesh_GeomTool::IntFlag BRepMesh_GeomTool::IntSegSeg( //purpose : //============================================================================= std::pair BRepMesh_GeomTool::CellsCount ( - const Handle (Adaptor3d_HSurface)& theSurface, + const Handle (Adaptor3d_Surface)& theSurface, const Standard_Integer theVerticesNb, const Standard_Real theDeflection, const BRepMesh_DefaultRangeSplitter* theRangeSplitter) diff --git a/src/BRepMesh/BRepMesh_GeomTool.hxx b/src/BRepMesh/BRepMesh_GeomTool.hxx index c4d6c39d2e..0ebeb843b1 100644 --- a/src/BRepMesh/BRepMesh_GeomTool.hxx +++ b/src/BRepMesh/BRepMesh_GeomTool.hxx @@ -14,21 +14,17 @@ #ifndef _BRepMesh_GeomTool_HeaderFile #define _BRepMesh_GeomTool_HeaderFile -#include -#include -#include +#include #include #include #include #include class BRepAdaptor_Curve; -class BRepAdaptor_HSurface; class gp_Pnt; class gp_Pnt2d; class gp_Dir; class BRepMesh_DefaultRangeSplitter; -class Adaptor3d_HSurface; //! Tool class accumulating common geometrical functions as well as //! functionality using shape geometry to produce data necessary for @@ -83,7 +79,7 @@ public: //! @param theAngDeflection angular deflection. //! @param theMinPointsNb minimum nuber of points to be produced. Standard_EXPORT BRepMesh_GeomTool( - const Handle(BRepAdaptor_HSurface)& theSurface, + const Handle(BRepAdaptor_Surface)& theSurface, const GeomAbs_IsoType theIsoType, const Standard_Real theParamIso, const Standard_Real theFirstParam, @@ -134,7 +130,7 @@ public: //! @param theUV[out] discretization point in parametric space of the surface. //! @return TRUE on success, FALSE elsewhere. Standard_EXPORT Standard_Boolean Value(const Standard_Integer theIndex, - const Handle(BRepAdaptor_HSurface)& theSurface, + const Handle(BRepAdaptor_Surface)& theSurface, Standard_Real& theParam, gp_Pnt& thePoint, gp_Pnt2d& theUV) const; @@ -150,7 +146,7 @@ public: //! @name static API //! @param[out] theNormal normal vector at the point specified by the parameters. //! @return FALSE if the normal can not be computed, TRUE elsewhere. Standard_EXPORT static Standard_Boolean Normal( - const Handle(BRepAdaptor_HSurface)& theSurface, + const Handle(BRepAdaptor_Surface)& theSurface, const Standard_Real theParamU, const Standard_Real theParamV, gp_Pnt& thePoint, @@ -223,7 +219,7 @@ public: //! @name static API // For linear parametric direction we fall back to the initial vertex count: // cells_count = 2 ^ log10 ( initial_vertex_count ) Standard_EXPORT static std::pair CellsCount ( - const Handle (Adaptor3d_HSurface)& theSurface, + const Handle (Adaptor3d_Surface)& theSurface, const Standard_Integer theVerticesNb, const Standard_Real theDeflection, const BRepMesh_DefaultRangeSplitter* theRangeSplitter); diff --git a/src/BRepMesh/BRepMesh_NURBSRangeSplitter.cxx b/src/BRepMesh/BRepMesh_NURBSRangeSplitter.cxx index e64f1980ba..7b0bdb67ad 100644 --- a/src/BRepMesh/BRepMesh_NURBSRangeSplitter.cxx +++ b/src/BRepMesh/BRepMesh_NURBSRangeSplitter.cxx @@ -37,7 +37,7 @@ namespace const Handle(IMeshData::MapOfReal)& theParamsForbiddenToRemove, const Handle(IMeshData::MapOfReal)& theControlParamsForbiddenToRemove) : myDFace(theDFace), - mySurface(myDFace->GetSurface()->ChangeSurface().Surface().Surface()), + mySurface(myDFace->GetSurface()->Surface().Surface()), myIsoU(theIsoType == GeomAbs_IsoU), myParams(theParams), myControlParams(theControlParams), @@ -333,8 +333,8 @@ Handle(IMeshData::ListOfPnt2d) BRepMesh_NURBSRangeSplitter::GenerateSurfaceNodes const std::pair& aDelta = GetDelta (); const Standard_Real aDefFace = GetDFace()->GetDeflection(); - const Handle(BRepAdaptor_HSurface)& gFace = GetSurface(); - Handle(Geom_Surface) aSurface = gFace->ChangeSurface().Surface().Surface(); + const Handle(BRepAdaptor_Surface)& gFace = GetSurface(); + Handle(Geom_Surface) aSurface = gFace->Surface().Surface(); const Handle(NCollection_IncAllocator) aTmpAlloc = new NCollection_IncAllocator(IMeshData::MEMORY_BLOCK_SIZE_HUGE); @@ -398,7 +398,7 @@ Handle(IMeshData::ListOfPnt2d) BRepMesh_NURBSRangeSplitter::GenerateSurfaceNodes //======================================================================= Standard_Boolean BRepMesh_NURBSRangeSplitter::initParameters() const { - const Handle(BRepAdaptor_HSurface)& aSurface = GetSurface(); + const Handle(BRepAdaptor_Surface)& aSurface = GetSurface(); const GeomAbs_Shape aContinuity = GeomAbs_CN; const std::pair aIntervalsNb( @@ -414,8 +414,7 @@ Standard_Boolean BRepMesh_NURBSRangeSplitter::initParameters() const aSurface->UIntervals(aIntervals[0], aContinuity); aSurface->VIntervals(aIntervals[1], aContinuity); - const Standard_Boolean isSplitIntervals = toSplitIntervals ( - aSurface->ChangeSurface().Surface().Surface(), aIntervals); + const Standard_Boolean isSplitIntervals = toSplitIntervals (aSurface->Surface().Surface(), aIntervals); if (!initParamsFromIntervals(aIntervals[0], GetRangeU(), isSplitIntervals, const_cast(GetParametersU()))) diff --git a/src/BRepOffset/BRepOffset_Inter2d.cxx b/src/BRepOffset/BRepOffset_Inter2d.cxx index b19f2b2c70..c93a30f8a6 100644 --- a/src/BRepOffset/BRepOffset_Inter2d.cxx +++ b/src/BRepOffset/BRepOffset_Inter2d.cxx @@ -16,9 +16,11 @@ // Modified by skv - Wed Dec 24 18:08:39 2003 OCC4455 -#include +#include + +#include #include -#include +#include #include #include #include @@ -35,7 +37,6 @@ #include #include #include -#include #include #include #include @@ -44,7 +45,7 @@ #include #include #include -#include +#include #include #include #include @@ -54,7 +55,6 @@ #include #include #include -#include #include #include #include @@ -810,8 +810,8 @@ static void RefEdgeInter(const TopoDS_Face& F, static Standard_Integer evaluateMaxSegment(const Adaptor3d_CurveOnSurface& aCurveOnSurface) { - Handle(Adaptor3d_HSurface) aSurf = aCurveOnSurface.GetSurface(); - Handle(Adaptor2d_HCurve2d) aCurv2d = aCurveOnSurface.GetCurve(); + Handle(Adaptor3d_Surface) aSurf = aCurveOnSurface.GetSurface(); + Handle(Adaptor2d_Curve2d) aCurv2d = aCurveOnSurface.GetCurve(); Standard_Real aNbSKnots = 0, aNbC2dKnots = 0; @@ -1202,8 +1202,8 @@ Standard_Boolean BRepOffset_Inter2d::ExtentEdge(const TopoDS_Edge& E,TopoDS_Edge { Geom2dAdaptor_Curve AC2d( MinPC, FirstParOnPC, LastParOnPC ); GeomAdaptor_Surface GAsurf( MinSurf ); - Handle(Geom2dAdaptor_HCurve) HC2d = new Geom2dAdaptor_HCurve( AC2d ); - Handle(GeomAdaptor_HSurface) HSurf = new GeomAdaptor_HSurface( GAsurf ); + Handle(Geom2dAdaptor_Curve) HC2d = new Geom2dAdaptor_Curve( AC2d ); + Handle(GeomAdaptor_Surface) HSurf = new GeomAdaptor_Surface( GAsurf ); Adaptor3d_CurveOnSurface ConS( HC2d, HSurf ); Standard_Real /*max_deviation,*/ average_deviation; GeomAbs_Shape Continuity = GeomAbs_C1; @@ -1840,4 +1840,4 @@ Standard_Boolean BRepOffset_Inter2d::FuseVertices (const TopTools_IndexedDataMap } } return Standard_True; -} \ No newline at end of file +} diff --git a/src/BRepOffset/BRepOffset_Inter2d.hxx b/src/BRepOffset/BRepOffset_Inter2d.hxx index cf0f53bafd..1a9d125a89 100644 --- a/src/BRepOffset/BRepOffset_Inter2d.hxx +++ b/src/BRepOffset/BRepOffset_Inter2d.hxx @@ -17,21 +17,17 @@ #ifndef _BRepOffset_Inter2d_HeaderFile #define _BRepOffset_Inter2d_HeaderFile -#include -#include -#include - #include -#include #include #include + class BRepAlgo_AsDes; -class TopoDS_Face; class BRepOffset_Analyse; class BRepOffset_Offset; +class TopoDS_Edge; +class TopoDS_Face; - -//! Computes the intersections betwwen edges on a face +//! Computes the intersections between edges on a face //! stores result is SD as AsDes from BRepOffset. class BRepOffset_Inter2d { @@ -94,10 +90,6 @@ public: TopoDS_Edge& NE, const Standard_Real theOffset); -protected: - -private: - }; #endif // _BRepOffset_Inter2d_HeaderFile diff --git a/src/BRepOffset/BRepOffset_MakeOffset.cxx b/src/BRepOffset/BRepOffset_MakeOffset.cxx index ba95118b8e..62f33a948c 100644 --- a/src/BRepOffset/BRepOffset_MakeOffset.cxx +++ b/src/BRepOffset/BRepOffset_MakeOffset.cxx @@ -64,7 +64,7 @@ #include #include #include -#include +#include #include #include #include @@ -73,7 +73,7 @@ #include #include #include -#include +#include #include #include #include @@ -2994,8 +2994,8 @@ void BRepOffset_MakeOffset::MakeMissingWalls () Standard_Real FirstPar = 0., LastPar = fp2d.Distance(fp2dOE); Geom2dAdaptor_Curve AC2d( aLine2d2, FirstPar, LastPar ); GeomAdaptor_Surface GAsurf( theSurf ); - Handle(Geom2dAdaptor_HCurve) HC2d = new Geom2dAdaptor_HCurve( AC2d ); - Handle(GeomAdaptor_HSurface) HSurf = new GeomAdaptor_HSurface( GAsurf ); + Handle(Geom2dAdaptor_Curve) HC2d = new Geom2dAdaptor_Curve( AC2d ); + Handle(GeomAdaptor_Surface) HSurf = new GeomAdaptor_Surface( GAsurf ); Adaptor3d_CurveOnSurface ConS( HC2d, HSurf ); Standard_Real max_deviation = 0., average_deviation; GeomLib::BuildCurve3d(Precision::Confusion(), @@ -3015,8 +3015,8 @@ void BRepOffset_MakeOffset::MakeMissingWalls () Standard_Real FirstPar = 0., LastPar = lp2d.Distance(lp2dOE); Geom2dAdaptor_Curve AC2d( aLine2d, FirstPar, LastPar ); GeomAdaptor_Surface GAsurf( theSurf ); - Handle(Geom2dAdaptor_HCurve) HC2d = new Geom2dAdaptor_HCurve( AC2d ); - Handle(GeomAdaptor_HSurface) HSurf = new GeomAdaptor_HSurface( GAsurf ); + Handle(Geom2dAdaptor_Curve) HC2d = new Geom2dAdaptor_Curve( AC2d ); + Handle(GeomAdaptor_Surface) HSurf = new GeomAdaptor_Surface( GAsurf ); Adaptor3d_CurveOnSurface ConS( HC2d, HSurf ); Standard_Real max_deviation = 0., average_deviation; GeomLib::BuildCurve3d(Precision::Confusion(), diff --git a/src/BRepOffset/BRepOffset_MakeSimpleOffset.cxx b/src/BRepOffset/BRepOffset_MakeSimpleOffset.cxx index 45909cc2e8..d3f5ed8cd9 100644 --- a/src/BRepOffset/BRepOffset_MakeSimpleOffset.cxx +++ b/src/BRepOffset/BRepOffset_MakeSimpleOffset.cxx @@ -24,8 +24,7 @@ #include #include #include -#include -#include +#include #include #include #include @@ -238,10 +237,10 @@ static void tgtfaces(const TopoDS_Edge& Ed, BRepAdaptor_Surface aBAS1(F1,Standard_False); BRepAdaptor_Surface aBAS2(F2,Standard_False); - Handle(BRepAdaptor_HSurface) HS1 = new BRepAdaptor_HSurface (aBAS1); - Handle(BRepAdaptor_HSurface) HS2; + Handle(BRepAdaptor_Surface) HS1 = new BRepAdaptor_Surface (aBAS1); + Handle(BRepAdaptor_Surface) HS2; if(couture) HS2 = HS1; - else HS2 = new BRepAdaptor_HSurface(aBAS2); + else HS2 = new BRepAdaptor_Surface(aBAS2); //case when edge lies on the one face E.Orientation(TopAbs_FORWARD); diff --git a/src/BRepOffset/BRepOffset_Offset.cxx b/src/BRepOffset/BRepOffset_Offset.cxx index 5008021517..449b3452af 100644 --- a/src/BRepOffset/BRepOffset_Offset.cxx +++ b/src/BRepOffset/BRepOffset_Offset.cxx @@ -14,9 +14,9 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. +#include #include -#include #include #include #include @@ -28,7 +28,6 @@ #include #include #include -#include #include #include #include @@ -37,7 +36,6 @@ #include #include #include -#include #include #include #include @@ -50,8 +48,6 @@ #include #include #include -#include -#include #include #include #include @@ -1057,11 +1053,11 @@ void BRepOffset_Offset::Init(const TopoDS_Edge& Path, Handle(Geom_Curve) CP = BRep_Tool::Curve(Path,Loc,f[0],l[0]); CP = new Geom_TrimmedCurve(CP,f[0], l[0]); CP->Transform(Loc.Transformation()); - Handle(GeomAdaptor_HCurve) HCP = new GeomAdaptor_HCurve(CP); + Handle(GeomAdaptor_Curve) HCP = new GeomAdaptor_Curve(CP); Handle(Geom_Curve) C1 = BRep_Tool::Curve(Edge1,Loc,f[1],l[1]); - Handle(Adaptor3d_HCurve) HEdge1; + Handle(Adaptor3d_Curve) HEdge1; Standard_Boolean C1is3D = Standard_True; if (C1.IsNull()) { C1is3D = Standard_False; @@ -1070,15 +1066,15 @@ void BRepOffset_Offset::Init(const TopoDS_Edge& Path, BRep_Tool::CurveOnSurface(Edge1,C12d,S1,Loc,f[1],l[1]); S1 = Handle(Geom_Surface)::DownCast(S1->Transformed(Loc.Transformation())); C12d = new Geom2d_TrimmedCurve(C12d,f[1],l[1]); - Handle(GeomAdaptor_HSurface) HS1 = new GeomAdaptor_HSurface(S1); - Handle(Geom2dAdaptor_HCurve) HC1 = new Geom2dAdaptor_HCurve(C12d); + Handle(GeomAdaptor_Surface) HS1 = new GeomAdaptor_Surface(S1); + Handle(Geom2dAdaptor_Curve) HC1 = new Geom2dAdaptor_Curve(C12d); Adaptor3d_CurveOnSurface Cons(HC1,HS1); - HEdge1 = new Adaptor3d_HCurveOnSurface(Cons); + HEdge1 = new Adaptor3d_CurveOnSurface(Cons); } else { C1 = new Geom_TrimmedCurve(C1, f[1], l[1]); C1->Transform(Loc.Transformation()); - HEdge1 = new GeomAdaptor_HCurve(C1); + HEdge1 = new GeomAdaptor_Curve(C1); GeomAdaptor_Curve AC1(C1); if ( AC1.GetType() == GeomAbs_Circle) { C1Denerated = (AC1.Circle().Radius() < Precision::Confusion()); @@ -1087,7 +1083,7 @@ void BRepOffset_Offset::Init(const TopoDS_Edge& Path, Handle(Geom_Curve) C2 = BRep_Tool::Curve(Edge2,Loc,f[2],l[2]); - Handle(Adaptor3d_HCurve) HEdge2; + Handle(Adaptor3d_Curve) HEdge2; Standard_Boolean C2is3D = Standard_True; if (C2.IsNull()) { C2is3D = Standard_False; @@ -1096,15 +1092,15 @@ void BRepOffset_Offset::Init(const TopoDS_Edge& Path, BRep_Tool::CurveOnSurface(Edge2,C12d,S1,Loc,f[2],l[2]); S1 = Handle(Geom_Surface)::DownCast(S1->Transformed(Loc.Transformation())); C12d = new Geom2d_TrimmedCurve(C12d,f[2],l[2]); - Handle(GeomAdaptor_HSurface) HS1 = new GeomAdaptor_HSurface(S1); - Handle(Geom2dAdaptor_HCurve) HC1 = new Geom2dAdaptor_HCurve(C12d); + Handle(GeomAdaptor_Surface) HS1 = new GeomAdaptor_Surface(S1); + Handle(Geom2dAdaptor_Curve) HC1 = new Geom2dAdaptor_Curve(C12d); Adaptor3d_CurveOnSurface Cons(HC1,HS1); - HEdge2 = new Adaptor3d_HCurveOnSurface(Cons); + HEdge2 = new Adaptor3d_CurveOnSurface(Cons); } else { C2 = new Geom_TrimmedCurve(C2, f[2], l[2]); C2->Transform(Loc.Transformation()); - HEdge2 = new GeomAdaptor_HCurve(C2); + HEdge2 = new GeomAdaptor_Curve(C2); GeomAdaptor_Curve AC2(C2); if ( AC2.GetType() == GeomAbs_Circle) { C2Denerated = (AC2.Circle().Radius() < Precision::Confusion()); diff --git a/src/BRepOffset/BRepOffset_SimpleOffset.cxx b/src/BRepOffset/BRepOffset_SimpleOffset.cxx index e021d5e7e5..82689904f4 100644 --- a/src/BRepOffset/BRepOffset_SimpleOffset.cxx +++ b/src/BRepOffset/BRepOffset_SimpleOffset.cxx @@ -24,8 +24,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include @@ -291,8 +291,8 @@ void BRepOffset_SimpleOffset::FillEdgeData(const TopoDS_Edge& theEdge, // Create offset curve on surface. const Handle(Geom2d_Curve) aC2dNew = BRep_Tool::CurveOnSurface(theEdge, aCurFace, aF, aL); - const Handle(Adaptor2d_HCurve2d) aHCurve2d = new Geom2dAdaptor_HCurve(aC2dNew, aF, aL); - const Handle(Adaptor3d_HSurface) aHSurface = new GeomAdaptor_HSurface(myFaceInfo.Find(aCurFace).myOffsetS); + const Handle(Adaptor2d_Curve2d) aHCurve2d = new Geom2dAdaptor_Curve(aC2dNew, aF, aL); + const Handle(Adaptor3d_Surface) aHSurface = new GeomAdaptor_Surface(myFaceInfo.Find(aCurFace).myOffsetS); Adaptor3d_CurveOnSurface aCurveOnSurf(aHCurve2d, aHSurface); // Extract 3d-curve (it is not null). diff --git a/src/BRepOffset/BRepOffset_Tool.cxx b/src/BRepOffset/BRepOffset_Tool.cxx index 0374614ba2..a2543c1d50 100644 --- a/src/BRepOffset/BRepOffset_Tool.cxx +++ b/src/BRepOffset/BRepOffset_Tool.cxx @@ -14,6 +14,7 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. +#include #include #include @@ -28,8 +29,6 @@ #include #include #include -#include -#include #include #include #include @@ -43,7 +42,6 @@ #include #include #include -#include #include #include #include @@ -424,8 +422,8 @@ static void BuildPCurves (const TopoDS_Edge& E, } } // if (typS == ... - Handle(BRepAdaptor_HSurface) HS = new BRepAdaptor_HSurface(AS); - Handle(BRepAdaptor_HCurve) HC = new BRepAdaptor_HCurve(AC); + Handle(BRepAdaptor_Surface) HS = new BRepAdaptor_Surface(AS); + Handle(BRepAdaptor_Curve) HC = new BRepAdaptor_Curve(AC); ProjLib_ProjectedCurve Proj(HS,HC,Tolerance); diff --git a/src/BRepPrimAPI/BRepPrimAPI_MakeRevol.cxx b/src/BRepPrimAPI/BRepPrimAPI_MakeRevol.cxx index a6aed7dc16..b830fde662 100644 --- a/src/BRepPrimAPI/BRepPrimAPI_MakeRevol.cxx +++ b/src/BRepPrimAPI/BRepPrimAPI_MakeRevol.cxx @@ -22,16 +22,19 @@ #include #include #include +#include +#include #include #include #include #include #include #include -#include +#include #include #include #include +#include // perform checks on the argument static const TopoDS_Shape& check(const TopoDS_Shape& S) @@ -249,7 +252,7 @@ void BRepPrimAPI_MakeRevol::Build() //purpose : used in CheckValidity to find out is there // intersection between curve and axe of revolution //======================================================================= -static Standard_Boolean IsIntersect(const Handle(Adaptor3d_HCurve)& theC, +static Standard_Boolean IsIntersect(const Handle(Adaptor3d_Curve)& theC, const gp_Ax1& theAxe) { const gp_Lin anAxis(theAxe); @@ -272,7 +275,7 @@ static Standard_Boolean IsIntersect(const Handle(Adaptor3d_HCurve)& theC, const Standard_Real aParF = theC->FirstParameter() + aParTol, aParL = theC->LastParameter() - aParTol; - Extrema_ExtCC anExtr(theC->Curve(), aLin); + Extrema_ExtCC anExtr (*theC, aLin); anExtr.Perform(); if (anExtr.IsDone() && anExtr.NbExt() > 0) { @@ -320,8 +323,8 @@ Standard_Boolean BRepPrimAPI_MakeRevol::CheckValidity(const TopoDS_Shape& theSha C = new Geom_TrimmedCurve(C, First, Last); C->Transform(Tr); - Handle(GeomAdaptor_HCurve) HC = new GeomAdaptor_HCurve(); - HC->ChangeCurve().Load(C, First, Last); + Handle(GeomAdaptor_Curve) HC = new GeomAdaptor_Curve(); + HC->Load(C, First, Last); //Checking coinsidence axe of revolution and basis curve //This code is taken directly from GeomAdaptor_SurfaceOfRevolution Standard_Integer Ratio = 1; diff --git a/src/BRepSweep/BRepSweep_Rotation.cxx b/src/BRepSweep/BRepSweep_Rotation.cxx index 953894deb7..2a468000a6 100644 --- a/src/BRepSweep/BRepSweep_Rotation.cxx +++ b/src/BRepSweep/BRepSweep_Rotation.cxx @@ -14,12 +14,12 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. +#include #include #include #include #include -#include #include #include #include @@ -38,7 +38,6 @@ #include #include #include -#include #include #include #include @@ -345,8 +344,8 @@ TopoDS_Shape BRepSweep_Rotation::MakeEmptyFace ////////////////////////////////// C->Transform(Tr); - Handle(GeomAdaptor_HCurve) HC = new GeomAdaptor_HCurve(); - HC->ChangeCurve().Load(C,First,Last); + Handle(GeomAdaptor_Curve) HC = new GeomAdaptor_Curve(); + HC->Load(C,First,Last); GeomAdaptor_SurfaceOfRevolution AS(HC,myAxe); switch(AS.GetType()){ case GeomAbs_Plane : diff --git a/src/BRepSweep/BRepSweep_Translation.cxx b/src/BRepSweep/BRepSweep_Translation.cxx index c1e8da2e8f..4bb9d92723 100644 --- a/src/BRepSweep/BRepSweep_Translation.cxx +++ b/src/BRepSweep/BRepSweep_Translation.cxx @@ -14,6 +14,7 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. +#include #include #include @@ -22,7 +23,6 @@ #include #include #include -#include #include #include #include @@ -34,7 +34,6 @@ #include #include #include -#include #include #include #include @@ -265,7 +264,7 @@ TopoDS_Shape BRepSweep_Translation::MakeEmptyFace D.Reverse(); if (myCanonize) { - Handle(GeomAdaptor_HCurve) HC = new GeomAdaptor_HCurve(C,First,Last); + Handle(GeomAdaptor_Curve) HC = new GeomAdaptor_Curve(C,First,Last); GeomAdaptor_SurfaceOfLinearExtrusion AS(HC,D); switch(AS.GetType()){ diff --git a/src/BRepTest/BRepTest_FillingCommands.cxx b/src/BRepTest/BRepTest_FillingCommands.cxx index 99d7b4a06d..99f424d24e 100644 --- a/src/BRepTest/BRepTest_FillingCommands.cxx +++ b/src/BRepTest/BRepTest_FillingCommands.cxx @@ -36,15 +36,11 @@ #include #include #include -#include -#include -#include #include #include #include #include #include -#include #include #include #include @@ -62,7 +58,7 @@ #include #include #include -#include +#include #include #include @@ -86,8 +82,8 @@ #include #include -#include -#include +#include +#include #include #include @@ -158,12 +154,12 @@ static Standard_Integer plate (Draw_Interpretor & di,Standard_Integer n,const ch Standard_Integer T = Draw::Atoi(a[3*i+3]); Tang->SetValue(i,T); NbPtsCur->SetValue(i,Draw::Atoi(a[2])); - Handle(BRepAdaptor_HSurface) S = new BRepAdaptor_HSurface(); - S->ChangeSurface().Initialize(F); - Handle(BRepAdaptor_HCurve2d) C = new BRepAdaptor_HCurve2d(); - C->ChangeCurve2d().Initialize(E,F); + Handle(BRepAdaptor_Surface) S = new BRepAdaptor_Surface(); + S->Initialize(F); + Handle(BRepAdaptor_Curve2d) C = new BRepAdaptor_Curve2d(); + C->Initialize(E,F); Adaptor3d_CurveOnSurface ConS(C,S); - Handle (Adaptor3d_HCurveOnSurface) HConS = new Adaptor3d_HCurveOnSurface(ConS); + Handle (Adaptor3d_CurveOnSurface) HConS = new Adaptor3d_CurveOnSurface(ConS); Fronts->SetValue(i,HConS); Handle(GeomPlate_CurveConstraint) Cont = new BRepFill_CurveConstraint(HConS, @@ -239,9 +235,9 @@ static Standard_Integer gplate (Draw_Interpretor & ,Standard_Integer n,const cha if(SI.IsNull()) Indice--; else - { Handle(BRepAdaptor_HSurface) HSI = new BRepAdaptor_HSurface(); - HSI->ChangeSurface().Initialize(SI); - Henri.LoadInitSurface( BRep_Tool::Surface(HSI->ChangeSurface().Face())); + { Handle(BRepAdaptor_Surface) HSI = new BRepAdaptor_Surface(); + HSI->Initialize(SI); + Henri.LoadInitSurface( BRep_Tool::Surface(HSI->Face())); } for (i=1; i<=NbCurFront ; i++) { TopoDS_Shape aLocalShape(DBRep::Get(a[Indice++],TopAbs_EDGE)); @@ -250,9 +246,9 @@ static Standard_Integer gplate (Draw_Interpretor & ,Standard_Integer n,const cha if(E.IsNull()) return 1; Conti=Draw::Atoi(a[Indice++]); if ((Conti==0)||(Conti==-1)) - { Handle(BRepAdaptor_HCurve) C = new BRepAdaptor_HCurve(); - C->ChangeCurve().Initialize(E); - const Handle(Adaptor3d_HCurve)& aC = C; // to avoid ambiguity + { Handle(BRepAdaptor_Curve) C = new BRepAdaptor_Curve(); + C->Initialize(E); + const Handle(Adaptor3d_Curve)& aC = C; // to avoid ambiguity Handle(GeomPlate_CurveConstraint) Cont= new BRepFill_CurveConstraint(aC,Conti); Henri.Add(Cont); } @@ -263,12 +259,12 @@ static Standard_Integer gplate (Draw_Interpretor & ,Standard_Integer n,const cha // TopoDS_Face F = TopoDS::Face(DBRep::Get(a[Indice++],TopAbs_FACE)); if(F.IsNull()) return 1; - Handle(BRepAdaptor_HSurface) S = new BRepAdaptor_HSurface(); - S->ChangeSurface().Initialize(F); - Handle(BRepAdaptor_HCurve2d) C = new BRepAdaptor_HCurve2d(); - C->ChangeCurve2d().Initialize(E,F); + Handle(BRepAdaptor_Surface) S = new BRepAdaptor_Surface(); + S->Initialize(F); + Handle(BRepAdaptor_Curve2d) C = new BRepAdaptor_Curve2d(); + C->Initialize(E,F); Adaptor3d_CurveOnSurface ConS(C,S); - Handle (Adaptor3d_HCurveOnSurface) HConS = new Adaptor3d_HCurveOnSurface(ConS); + Handle (Adaptor3d_CurveOnSurface) HConS = new Adaptor3d_CurveOnSurface(ConS); Handle(GeomPlate_CurveConstraint) Cont= new BRepFill_CurveConstraint(HConS,Conti); Henri.Add(Cont); } @@ -296,9 +292,9 @@ static Standard_Integer gplate (Draw_Interpretor & ,Standard_Integer n,const cha // TopoDS_Face F = TopoDS::Face(DBRep::Get(a[Indice++],TopAbs_FACE)); if(F.IsNull()) return 1; - Handle(BRepAdaptor_HSurface) HF = new BRepAdaptor_HSurface(); - HF->ChangeSurface().Initialize(F); - Handle(GeomPlate_PointConstraint) PCont= new GeomPlate_PointConstraint(u,v,BRep_Tool::Surface(HF->ChangeSurface().Face()),Conti,0.001,0.001,0.001); + Handle(BRepAdaptor_Surface) HF = new BRepAdaptor_Surface(); + HF->Initialize(F); + Handle(GeomPlate_PointConstraint) PCont= new GeomPlate_PointConstraint(u,v,BRep_Tool::Surface(HF->Face()),Conti,0.001,0.001,0.001); Henri.Add(PCont); } } @@ -358,12 +354,12 @@ static Standard_Integer approxplate (Draw_Interpretor & di,Standard_Integer n,co Standard_Integer T = Draw::Atoi(a[3*i+3]); Tang->SetValue(i,T); NbPtsCur->SetValue(i,NbMedium); - Handle(BRepAdaptor_HSurface) S = new BRepAdaptor_HSurface(); - S->ChangeSurface().Initialize(F); - Handle(BRepAdaptor_HCurve2d) C = new BRepAdaptor_HCurve2d(); - C->ChangeCurve2d().Initialize(E,F); + Handle(BRepAdaptor_Surface) S = new BRepAdaptor_Surface(); + S->Initialize(F); + Handle(BRepAdaptor_Curve2d) C = new BRepAdaptor_Curve2d(); + C->Initialize(E,F); Adaptor3d_CurveOnSurface ConS(C,S); - Handle (Adaptor3d_HCurveOnSurface) HConS = new Adaptor3d_HCurveOnSurface(ConS); + Handle (Adaptor3d_CurveOnSurface) HConS = new Adaptor3d_CurveOnSurface(ConS); Fronts->SetValue(i,HConS); Handle(GeomPlate_CurveConstraint) Cont = new BRepFill_CurveConstraint(HConS, diff --git a/src/BRepTest/BRepTest_SweepCommands.cxx b/src/BRepTest/BRepTest_SweepCommands.cxx index 6ce85a02e4..6b54ac18e8 100644 --- a/src/BRepTest/BRepTest_SweepCommands.cxx +++ b/src/BRepTest/BRepTest_SweepCommands.cxx @@ -50,7 +50,7 @@ static BRepOffsetAPI_ThruSections* Generator = 0; #include #include -#include +#include #include #include #include @@ -225,7 +225,7 @@ static Standard_Integer geompipe(Draw_Interpretor&, Standard_Real aSpFirst, aSpLast, aPrFirst, aPrLast; Handle(Geom_Curve) SpineCurve = BRep_Tool::Curve(TopoDS::Edge(Spine), aSpFirst, aSpLast); Handle(Geom_Curve) ProfileCurve = BRep_Tool::Curve(TopoDS::Edge(Profile), aPrFirst, aPrLast); - Handle(GeomAdaptor_HCurve) aAdaptCurve = new GeomAdaptor_HCurve(SpineCurve, aSpFirst, aSpLast); + Handle(GeomAdaptor_Curve) aAdaptCurve = new GeomAdaptor_Curve(SpineCurve, aSpFirst, aSpLast); Standard_Boolean ByACR = Standard_False; Standard_Boolean rotate = Standard_False; Standard_Real Radius = Draw::Atof(a[4]); diff --git a/src/BRepTools/BRepTools_NurbsConvertModification.cxx b/src/BRepTools/BRepTools_NurbsConvertModification.cxx index 101a548f5a..bd05b0378c 100644 --- a/src/BRepTools/BRepTools_NurbsConvertModification.cxx +++ b/src/BRepTools/BRepTools_NurbsConvertModification.cxx @@ -14,6 +14,7 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. +#include #include #include @@ -21,7 +22,6 @@ #include #include #include -#include #include #include #include @@ -30,7 +30,6 @@ #include #include #include -#include #include #include #include @@ -46,8 +45,6 @@ #include #include #include -#include -#include #include #include #include @@ -396,7 +393,7 @@ Standard_Boolean BRepTools_NurbsConvertModification::NewCurve2d C2d = new Geom2d_TrimmedCurve(C2d, f2d, l2d); Geom2dAdaptor_Curve G2dAC(C2d, f2d, l2d); - Handle(Geom2dAdaptor_HCurve) G2dAHC = new Geom2dAdaptor_HCurve(G2dAC); + Handle(Geom2dAdaptor_Curve) G2dAHC = new Geom2dAdaptor_Curve(G2dAC); if(!newE.IsNull()) { C3d = BRep_Tool::Curve(newE, f3d, l3d); @@ -405,7 +402,7 @@ Standard_Boolean BRepTools_NurbsConvertModification::NewCurve2d C3d = BRep_Tool::Curve(E,f3d,l3d); } GeomAdaptor_Curve G3dAC(C3d, f3d, l3d); - Handle(GeomAdaptor_HCurve) G3dAHC = new GeomAdaptor_HCurve(G3dAC); + Handle(GeomAdaptor_Curve) G3dAHC = new GeomAdaptor_Curve(G3dAC); Standard_Real Uinf, Usup, Vinf, Vsup, u = 0, v = 0; Handle(Geom_Surface) S = BRep_Tool::Surface(F); @@ -461,7 +458,7 @@ Standard_Boolean BRepTools_NurbsConvertModification::NewCurve2d else { S = BRep_Tool::Surface(F);// Si S est un plan, pas de changement de parametrisation GeomAdaptor_Surface GAS(S); - Handle(GeomAdaptor_HSurface) GAHS = new GeomAdaptor_HSurface(GAS); + Handle(GeomAdaptor_Surface) GAHS = new GeomAdaptor_Surface(GAS); ProjLib_ComputeApprox ProjOnCurve(G3dAHC,GAHS,Tol); if(ProjOnCurve.BSpline().IsNull()) { Curve2d = Geom2dConvert::CurveToBSplineCurve(ProjOnCurve.Bezier()); @@ -486,7 +483,7 @@ Standard_Boolean BRepTools_NurbsConvertModification::NewCurve2d // GeomAdaptor_Surface GAS(S,Uinf-u,Usup+u,Vinf-v,Vsup+v); - Handle(GeomAdaptor_HSurface) GAHS = new GeomAdaptor_HSurface(GAS); + Handle(GeomAdaptor_Surface) GAHS = new GeomAdaptor_Surface(GAS); ProjLib_ComputeApproxOnPolarSurface ProjOnCurve(G2dAHC,G3dAHC,GAHS,Tol); @@ -541,14 +538,14 @@ Standard_Boolean BRepTools_NurbsConvertModification::NewCurve2d Standard_Real f2dBis,l2dBis; C2d = new Geom2d_TrimmedCurve(C2d, f2d, l2d); Geom2dAdaptor_Curve G2dAC(C2d, f2d, l2d); - Handle(Geom2dAdaptor_HCurve) G2dAHC = new Geom2dAdaptor_HCurve(G2dAC); + Handle(Geom2dAdaptor_Curve) G2dAHC = new Geom2dAdaptor_Curve(G2dAC); TopoDS_Edge ERevers = E; ERevers.Reverse(); C2dBis = BRep_Tool::CurveOnSurface(ERevers,F,f2dBis,l2dBis); Handle(Standard_Type) TheTypeC2dBis = C2dBis->DynamicType(); C2dBis = new Geom2d_TrimmedCurve(C2dBis,f2dBis, l2dBis); Geom2dAdaptor_Curve G2dACBis(C2dBis, f2dBis, l2dBis); - Handle(Geom2dAdaptor_HCurve) G2dAHCBis = new Geom2dAdaptor_HCurve(G2dACBis); + Handle(Geom2dAdaptor_Curve) G2dAHCBis = new Geom2dAdaptor_Curve(G2dACBis); if(C3d.IsNull()) { if(isConvert2d) { @@ -574,7 +571,7 @@ Standard_Boolean BRepTools_NurbsConvertModification::NewCurve2d C3d = BRep_Tool::Curve(newE, f3d,l3d); } GeomAdaptor_Curve G3dAC(C3d, f3d, l3d); - Handle(GeomAdaptor_HCurve) G3dAHC = new GeomAdaptor_HCurve(G3dAC); + Handle(GeomAdaptor_Curve) G3dAHC = new GeomAdaptor_Curve(G3dAC); Handle(Geom_Surface) S = BRep_Tool::Surface(F); Handle(Standard_Type) myT = S->DynamicType(); @@ -623,7 +620,7 @@ Standard_Boolean BRepTools_NurbsConvertModification::NewCurve2d } } GeomAdaptor_Surface GAS(S, Uinf-u,Usup+u,Vinf-v,Vsup+v); - Handle(GeomAdaptor_HSurface) GAHS = new GeomAdaptor_HSurface(GAS); + Handle(GeomAdaptor_Surface) GAHS = new GeomAdaptor_Surface(GAS); myled.Append(E); ProjLib_ComputeApproxOnPolarSurface @@ -730,4 +727,4 @@ const TopTools_ListOfShape& BRepTools_NurbsConvertModification::GetUpdatedEdges() const { return myUpdatedEdges; -} \ No newline at end of file +} diff --git a/src/BRepTopAdaptor/BRepTopAdaptor_FClass2d.cxx b/src/BRepTopAdaptor/BRepTopAdaptor_FClass2d.cxx index 8d389294b0..76804d5107 100644 --- a/src/BRepTopAdaptor/BRepTopAdaptor_FClass2d.cxx +++ b/src/BRepTopAdaptor/BRepTopAdaptor_FClass2d.cxx @@ -22,7 +22,7 @@ #include #include #include -#include +#include #include #include #include @@ -99,8 +99,8 @@ BRepTopAdaptor_FClass2d::BRepTopAdaptor_FClass2d(const TopoDS_Face& aFace,const //-- dead end on surfaces defined on more than one period Face.Orientation(TopAbs_FORWARD); - Handle(BRepAdaptor_HSurface) surf = new BRepAdaptor_HSurface(); - surf->ChangeSurface().Initialize(aFace,Standard_False); + Handle(BRepAdaptor_Surface) surf = new BRepAdaptor_Surface(); + surf->Initialize(aFace,Standard_False); TopoDS_Edge edge; TopAbs_Orientation Or; @@ -511,8 +511,8 @@ TopAbs_State BRepTopAdaptor_FClass2d::Perform(const gp_Pnt2d& _Puv, Standard_Real v=_Puv.Y(); Standard_Real uu = u, vv = v; - Handle(BRepAdaptor_HSurface) surf = new BRepAdaptor_HSurface(); - surf->ChangeSurface().Initialize( Face, Standard_False ); + Handle(BRepAdaptor_Surface) surf = new BRepAdaptor_Surface(); + surf->Initialize( Face, Standard_False ); const Standard_Boolean IsUPer = surf->IsUPeriodic(); const Standard_Boolean IsVPer = surf->IsVPeriodic(); const Standard_Real uperiod = IsUPer ? surf->UPeriod() : 0.0; @@ -645,8 +645,8 @@ TopAbs_State BRepTopAdaptor_FClass2d::TestOnRestriction(const gp_Pnt2d& _Puv, Standard_Real v=_Puv.Y(); Standard_Real uu = u, vv = v; - Handle(BRepAdaptor_HSurface) surf = new BRepAdaptor_HSurface(); - surf->ChangeSurface().Initialize( Face, Standard_False ); + Handle(BRepAdaptor_Surface) surf = new BRepAdaptor_Surface(); + surf->Initialize( Face, Standard_False ); const Standard_Boolean IsUPer = surf->IsUPeriodic(); const Standard_Boolean IsVPer = surf->IsVPeriodic(); const Standard_Real uperiod = IsUPer ? surf->UPeriod() : 0.0; diff --git a/src/BRepTopAdaptor/BRepTopAdaptor_HVertex.cxx b/src/BRepTopAdaptor/BRepTopAdaptor_HVertex.cxx index 0da87cd856..01260ed326 100644 --- a/src/BRepTopAdaptor/BRepTopAdaptor_HVertex.cxx +++ b/src/BRepTopAdaptor/BRepTopAdaptor_HVertex.cxx @@ -13,10 +13,10 @@ // commercial license or contractual agreement. -#include +#include #include #include -#include +#include #include #include #include @@ -30,7 +30,7 @@ IMPLEMENT_STANDARD_RTTIEXT(BRepTopAdaptor_HVertex,Adaptor3d_HVertex) BRepTopAdaptor_HVertex::BRepTopAdaptor_HVertex (const TopoDS_Vertex& V, - const Handle(BRepAdaptor_HCurve2d)& C): + const Handle(BRepAdaptor_Curve2d)& C): myVtx(V),myCurve(C) {} @@ -41,28 +41,21 @@ gp_Pnt2d BRepTopAdaptor_HVertex::Value () } Standard_Real BRepTopAdaptor_HVertex::Parameter - (const Handle(Adaptor2d_HCurve2d)& C) + (const Handle(Adaptor2d_Curve2d)& C) { - Handle(BRepAdaptor_HCurve2d) brhc = - Handle(BRepAdaptor_HCurve2d)::DownCast(C); - return BRep_Tool::Parameter(myVtx, - ((BRepAdaptor_Curve2d *)&(brhc->Curve2d()))->Edge(), - ((BRepAdaptor_Curve2d *)&(brhc->Curve2d()))->Face()); + Handle(BRepAdaptor_Curve2d) brhc = Handle(BRepAdaptor_Curve2d)::DownCast(C); + return BRep_Tool::Parameter (myVtx, brhc->Edge(), brhc->Face()); } Standard_Real BRepTopAdaptor_HVertex::Resolution - (const Handle(Adaptor2d_HCurve2d)& C) + (const Handle(Adaptor2d_Curve2d)& C) { - Handle(BRepAdaptor_HCurve2d) brhc = - Handle(BRepAdaptor_HCurve2d)::DownCast(C); - const TopoDS_Face& F = ((BRepAdaptor_Curve2d *)&(brhc->Curve2d()))->Face(); + Handle(BRepAdaptor_Curve2d) brhc = Handle(BRepAdaptor_Curve2d)::DownCast(C); + const TopoDS_Face& F = brhc->Face(); BRepAdaptor_Surface S(F,0); Standard_Real tv = BRep_Tool::Tolerance(myVtx); - Standard_Real pp, p = BRep_Tool::Parameter - (myVtx, - ((BRepAdaptor_Curve2d *)&(brhc->Curve2d()))->Edge(), - ((BRepAdaptor_Curve2d *)&(brhc->Curve2d()))->Face()); + Standard_Real pp, p = BRep_Tool::Parameter (myVtx, brhc->Edge(), brhc->Face()); TopAbs_Orientation Or = Orientation(); gp_Pnt2d p2d; gp_Vec2d v2d; C->D1(p,p2d,v2d); diff --git a/src/BRepTopAdaptor/BRepTopAdaptor_HVertex.hxx b/src/BRepTopAdaptor/BRepTopAdaptor_HVertex.hxx index 75d69129ed..85ea45ccd5 100644 --- a/src/BRepTopAdaptor/BRepTopAdaptor_HVertex.hxx +++ b/src/BRepTopAdaptor/BRepTopAdaptor_HVertex.hxx @@ -25,10 +25,9 @@ #include #include #include -class BRepAdaptor_HCurve2d; + class TopoDS_Vertex; class gp_Pnt2d; -class Adaptor2d_HCurve2d; class Adaptor3d_HVertex; @@ -42,7 +41,7 @@ class BRepTopAdaptor_HVertex : public Adaptor3d_HVertex public: - Standard_EXPORT BRepTopAdaptor_HVertex(const TopoDS_Vertex& Vtx, const Handle(BRepAdaptor_HCurve2d)& Curve); + Standard_EXPORT BRepTopAdaptor_HVertex(const TopoDS_Vertex& Vtx, const Handle(BRepAdaptor_Curve2d)& Curve); const TopoDS_Vertex& Vertex() const; @@ -50,10 +49,10 @@ public: Standard_EXPORT virtual gp_Pnt2d Value() Standard_OVERRIDE; - Standard_EXPORT virtual Standard_Real Parameter (const Handle(Adaptor2d_HCurve2d)& C) Standard_OVERRIDE; + Standard_EXPORT virtual Standard_Real Parameter (const Handle(Adaptor2d_Curve2d)& C) Standard_OVERRIDE; //! Parametric resolution (2d). - Standard_EXPORT virtual Standard_Real Resolution (const Handle(Adaptor2d_HCurve2d)& C) Standard_OVERRIDE; + Standard_EXPORT virtual Standard_Real Resolution (const Handle(Adaptor2d_Curve2d)& C) Standard_OVERRIDE; Standard_EXPORT virtual TopAbs_Orientation Orientation() Standard_OVERRIDE; @@ -73,7 +72,7 @@ private: TopoDS_Vertex myVtx; - Handle(BRepAdaptor_HCurve2d) myCurve; + Handle(BRepAdaptor_Curve2d) myCurve; }; diff --git a/src/BRepTopAdaptor/BRepTopAdaptor_Tool.cxx b/src/BRepTopAdaptor/BRepTopAdaptor_Tool.cxx index 9261958f11..1fbdc1509b 100644 --- a/src/BRepTopAdaptor/BRepTopAdaptor_Tool.cxx +++ b/src/BRepTopAdaptor/BRepTopAdaptor_Tool.cxx @@ -15,8 +15,8 @@ // commercial license or contractual agreement. -#include -#include +#include +#include #include #include #include @@ -31,15 +31,15 @@ BRepTopAdaptor_Tool::BRepTopAdaptor_Tool(const TopoDS_Face& F, const Standard_Real /*Tol2d*/) { myTopolTool = new BRepTopAdaptor_TopolTool(); - Handle(BRepAdaptor_HSurface) surface = new BRepAdaptor_HSurface(); - surface->ChangeSurface().Initialize(F,Standard_True); - const Handle(Adaptor3d_HSurface)& aSurf = surface; // to avoid ambiguity + Handle(BRepAdaptor_Surface) surface = new BRepAdaptor_Surface(); + surface->Initialize(F,Standard_True); + const Handle(Adaptor3d_Surface)& aSurf = surface; // to avoid ambiguity myTopolTool->Initialize(aSurf); myHSurface = surface; myloaded=Standard_True; } -BRepTopAdaptor_Tool::BRepTopAdaptor_Tool(const Handle(Adaptor3d_HSurface)& surface, +BRepTopAdaptor_Tool::BRepTopAdaptor_Tool(const Handle(Adaptor3d_Surface)& surface, const Standard_Real /*Tol2d*/) { myTopolTool = new BRepTopAdaptor_TopolTool(); @@ -51,15 +51,15 @@ BRepTopAdaptor_Tool::BRepTopAdaptor_Tool(const Handle(Adaptor3d_HSurface)& surfa void BRepTopAdaptor_Tool::Init(const TopoDS_Face& F, const Standard_Real /*Tol2d*/) { - Handle(BRepAdaptor_HSurface) surface = new BRepAdaptor_HSurface(); - surface->ChangeSurface().Initialize(F); - const Handle(Adaptor3d_HSurface)& aSurf = surface; // to avoid ambiguity + Handle(BRepAdaptor_Surface) surface = new BRepAdaptor_Surface(); + surface->Initialize(F); + const Handle(Adaptor3d_Surface)& aSurf = surface; // to avoid ambiguity myTopolTool->Initialize(aSurf); myHSurface = surface; myloaded=Standard_True; } -void BRepTopAdaptor_Tool::Init(const Handle(Adaptor3d_HSurface)& surface, +void BRepTopAdaptor_Tool::Init(const Handle(Adaptor3d_Surface)& surface, const Standard_Real /*Tol2d*/) { myTopolTool->Initialize(surface); @@ -79,7 +79,7 @@ Handle(BRepTopAdaptor_TopolTool) BRepTopAdaptor_Tool::GetTopolTool() { } } -Handle(Adaptor3d_HSurface) BRepTopAdaptor_Tool::GetSurface() { +Handle(Adaptor3d_Surface) BRepTopAdaptor_Tool::GetSurface() { if(myloaded) { return(myHSurface); } diff --git a/src/BRepTopAdaptor/BRepTopAdaptor_Tool.hxx b/src/BRepTopAdaptor/BRepTopAdaptor_Tool.hxx index a824fbf5bd..7e8179909a 100644 --- a/src/BRepTopAdaptor/BRepTopAdaptor_Tool.hxx +++ b/src/BRepTopAdaptor/BRepTopAdaptor_Tool.hxx @@ -17,18 +17,11 @@ #ifndef _BRepTopAdaptor_Tool_HeaderFile #define _BRepTopAdaptor_Tool_HeaderFile -#include -#include -#include +#include -#include -#include class BRepTopAdaptor_TopolTool; -class Adaptor3d_HSurface; class TopoDS_Face; - - class BRepTopAdaptor_Tool { public: @@ -40,17 +33,17 @@ public: Standard_EXPORT BRepTopAdaptor_Tool(const TopoDS_Face& F, const Standard_Real Tol2d); - Standard_EXPORT BRepTopAdaptor_Tool(const Handle(Adaptor3d_HSurface)& Surface, const Standard_Real Tol2d); + Standard_EXPORT BRepTopAdaptor_Tool(const Handle(Adaptor3d_Surface)& Surface, const Standard_Real Tol2d); Standard_EXPORT void Init (const TopoDS_Face& F, const Standard_Real Tol2d); - Standard_EXPORT void Init (const Handle(Adaptor3d_HSurface)& Surface, const Standard_Real Tol2d); + Standard_EXPORT void Init (const Handle(Adaptor3d_Surface)& Surface, const Standard_Real Tol2d); Standard_EXPORT Handle(BRepTopAdaptor_TopolTool) GetTopolTool(); Standard_EXPORT void SetTopolTool (const Handle(BRepTopAdaptor_TopolTool)& TT); - Standard_EXPORT Handle(Adaptor3d_HSurface) GetSurface(); + Standard_EXPORT Handle(Adaptor3d_Surface) GetSurface(); Standard_EXPORT void Destroy(); ~BRepTopAdaptor_Tool() @@ -73,7 +66,7 @@ private: Standard_Boolean myloaded; Handle(BRepTopAdaptor_TopolTool) myTopolTool; - Handle(Adaptor3d_HSurface) myHSurface; + Handle(Adaptor3d_Surface) myHSurface; }; diff --git a/src/BRepTopAdaptor/BRepTopAdaptor_TopolTool.cxx b/src/BRepTopAdaptor/BRepTopAdaptor_TopolTool.cxx index d89548561c..f4001581a2 100644 --- a/src/BRepTopAdaptor/BRepTopAdaptor_TopolTool.cxx +++ b/src/BRepTopAdaptor/BRepTopAdaptor_TopolTool.cxx @@ -13,12 +13,12 @@ // commercial license or contractual agreement. -#include -#include +#include +#include #include #include -#include -#include +#include +#include #include #include #include @@ -62,7 +62,7 @@ static //function : BRepTopAdaptor_TopolTool //purpose : //======================================================================= - BRepTopAdaptor_TopolTool::BRepTopAdaptor_TopolTool(const Handle(Adaptor3d_HSurface)& S) + BRepTopAdaptor_TopolTool::BRepTopAdaptor_TopolTool(const Handle(Adaptor3d_Surface)& S) : myFClass2d(NULL) { Initialize(S); @@ -80,12 +80,12 @@ static //function : Initialize //purpose : //======================================================================= - void BRepTopAdaptor_TopolTool::Initialize(const Handle(Adaptor3d_HSurface)& S) + void BRepTopAdaptor_TopolTool::Initialize(const Handle(Adaptor3d_Surface)& S) { - Handle(BRepAdaptor_HSurface) brhs = - Handle(BRepAdaptor_HSurface)::DownCast(S); + Handle(BRepAdaptor_Surface) brhs = + Handle(BRepAdaptor_Surface)::DownCast(S); if (brhs.IsNull()) {throw Standard_ConstructionError();} - TopoDS_Shape s_wnt = ((BRepAdaptor_Surface *)&(brhs->Surface()))->Face(); + TopoDS_Shape s_wnt = brhs->Face(); s_wnt.Orientation(TopAbs_FORWARD); myFace = TopoDS::Face(s_wnt); if(myFClass2d != NULL) { @@ -97,7 +97,7 @@ static myCurves.Clear(); TopExp_Explorer ex(myFace,TopAbs_EDGE); for (; ex.More(); ex.Next()) { - Handle(BRepAdaptor_HCurve2d) aCurve = new BRepAdaptor_HCurve2d + Handle(BRepAdaptor_Curve2d) aCurve = new BRepAdaptor_Curve2d (BRepAdaptor_Curve2d(TopoDS::Edge(ex.Current()),myFace)); myCurves.Append(aCurve); } @@ -107,9 +107,9 @@ static //function : Initialize //purpose : //======================================================================= - void BRepTopAdaptor_TopolTool::Initialize(const Handle(Adaptor2d_HCurve2d)& C) + void BRepTopAdaptor_TopolTool::Initialize(const Handle(Adaptor2d_Curve2d)& C) { - myCurve = Handle(BRepAdaptor_HCurve2d)::DownCast(C); + myCurve = Handle(BRepAdaptor_Curve2d)::DownCast(C); if (myCurve.IsNull()) {throw Standard_ConstructionError();} } //======================================================================= @@ -140,9 +140,9 @@ static //function : Value //purpose : //======================================================================= - Handle(Adaptor2d_HCurve2d) BRepTopAdaptor_TopolTool::Value () + Handle(Adaptor2d_Curve2d) BRepTopAdaptor_TopolTool::Value () { - return Handle(Adaptor2d_HCurve2d)::DownCast(myCIterator.Value()); + return Handle(Adaptor2d_Curve2d)::DownCast(myCIterator.Value()); } //modified by NIZNHY-PKV Tue Mar 27 14:23:40 2001 f //======================================================================= @@ -151,10 +151,8 @@ static //======================================================================= Standard_Address BRepTopAdaptor_TopolTool::Edge () const { - Handle(BRepAdaptor_HCurve2d) aHCurve = - Handle(BRepAdaptor_HCurve2d)::DownCast(myCIterator.Value()); - const BRepAdaptor_Curve2d& aCurve = (const BRepAdaptor_Curve2d&)aHCurve->Curve2d(); - return Standard_Address (& aCurve.Edge()); + Handle(BRepAdaptor_Curve2d) aHCurve = Handle(BRepAdaptor_Curve2d)::DownCast(myCIterator.Value()); + return Standard_Address (&aHCurve->Edge()); } //modified by NIZNHY-PKV Tue Mar 27 14:23:43 2001 t @@ -164,7 +162,7 @@ static //======================================================================= void BRepTopAdaptor_TopolTool::InitVertexIterator () { - myVIterator.Init(((BRepAdaptor_Curve2d *)&(myCurve->Curve2d()))->Edge(),TopAbs_VERTEX); + myVIterator.Init (myCurve->Edge(), TopAbs_VERTEX); } //======================================================================= //function : NextVertex @@ -234,11 +232,10 @@ static //function : Orientation //purpose : //======================================================================= - TopAbs_Orientation BRepTopAdaptor_TopolTool::Orientation (const Handle(Adaptor2d_HCurve2d)& C) + TopAbs_Orientation BRepTopAdaptor_TopolTool::Orientation (const Handle(Adaptor2d_Curve2d)& C) { - Handle(BRepAdaptor_HCurve2d) brhc = - Handle(BRepAdaptor_HCurve2d)::DownCast(C); - return ((BRepAdaptor_Curve2d *)&(brhc->Curve2d()))->Edge().Orientation(); + Handle(BRepAdaptor_Curve2d) brhc = Handle(BRepAdaptor_Curve2d)::DownCast(C); + return brhc->Edge().Orientation(); } //======================================================================= //function : Orientation @@ -507,13 +504,15 @@ Standard_Boolean BRepTopAdaptor_TopolTool::Has3d() const //purpose : //======================================================================= -Standard_Real BRepTopAdaptor_TopolTool::Tol3d(const Handle(Adaptor2d_HCurve2d)& C) const +Standard_Real BRepTopAdaptor_TopolTool::Tol3d(const Handle(Adaptor2d_Curve2d)& C) const { - Handle(BRepAdaptor_HCurve2d) brhc = Handle(BRepAdaptor_HCurve2d)::DownCast(C); + Handle(BRepAdaptor_Curve2d) brhc = Handle(BRepAdaptor_Curve2d)::DownCast(C); if (brhc.IsNull()) + { throw Standard_DomainError("BRepTopAdaptor_TopolTool: arc has no 3d representation"); - const BRepAdaptor_Curve2d& brc = (const BRepAdaptor_Curve2d &)brhc->Curve2d(); - const TopoDS_Edge& edge = brc.Edge(); + } + + const TopoDS_Edge& edge = brhc->Edge(); if (edge.IsNull()) throw Standard_DomainError("BRepTopAdaptor_TopolTool: arc has no 3d representation"); return BRep_Tool::Tolerance(edge); diff --git a/src/BRepTopAdaptor/BRepTopAdaptor_TopolTool.hxx b/src/BRepTopAdaptor/BRepTopAdaptor_TopolTool.hxx index e95e588c3f..64bd6f7797 100644 --- a/src/BRepTopAdaptor/BRepTopAdaptor_TopolTool.hxx +++ b/src/BRepTopAdaptor/BRepTopAdaptor_TopolTool.hxx @@ -17,29 +17,22 @@ #ifndef _BRepTopAdaptor_TopolTool_HeaderFile #define _BRepTopAdaptor_TopolTool_HeaderFile -#include -#include - +#include +#include +#include #include #include -#include #include #include -#include #include -#include #include #include -#include -class BRepAdaptor_HCurve2d; + class Standard_DomainError; -class Adaptor3d_HSurface; -class Adaptor2d_HCurve2d; class Adaptor3d_HVertex; class gp_Pnt2d; class gp_Pnt; - class BRepTopAdaptor_TopolTool; DEFINE_STANDARD_HANDLE(BRepTopAdaptor_TopolTool, Adaptor3d_TopolTool) @@ -52,19 +45,19 @@ public: Standard_EXPORT BRepTopAdaptor_TopolTool(); - Standard_EXPORT BRepTopAdaptor_TopolTool(const Handle(Adaptor3d_HSurface)& Surface); + Standard_EXPORT BRepTopAdaptor_TopolTool(const Handle(Adaptor3d_Surface)& Surface); Standard_EXPORT virtual void Initialize() Standard_OVERRIDE; - Standard_EXPORT virtual void Initialize (const Handle(Adaptor3d_HSurface)& S) Standard_OVERRIDE; + Standard_EXPORT virtual void Initialize (const Handle(Adaptor3d_Surface)& S) Standard_OVERRIDE; - Standard_EXPORT virtual void Initialize (const Handle(Adaptor2d_HCurve2d)& Curve) Standard_OVERRIDE; + Standard_EXPORT virtual void Initialize (const Handle(Adaptor2d_Curve2d)& Curve) Standard_OVERRIDE; Standard_EXPORT virtual void Init() Standard_OVERRIDE; Standard_EXPORT virtual Standard_Boolean More() Standard_OVERRIDE; - Standard_EXPORT virtual Handle(Adaptor2d_HCurve2d) Value() Standard_OVERRIDE; + Standard_EXPORT virtual Handle(Adaptor2d_Curve2d) Value() Standard_OVERRIDE; Standard_EXPORT virtual void Next() Standard_OVERRIDE; @@ -88,7 +81,7 @@ public: //! a "real" limit of the surface. //! If the orientation is INTERNAL or EXTERNAL, the arc is //! considered as an arc on the surface. - Standard_EXPORT virtual TopAbs_Orientation Orientation (const Handle(Adaptor2d_HCurve2d)& C) Standard_OVERRIDE; + Standard_EXPORT virtual TopAbs_Orientation Orientation (const Handle(Adaptor2d_Curve2d)& C) Standard_OVERRIDE; //! If the function returns the orientation of the arc. //! If the orientation is FORWARD or REVERSED, the arc is @@ -108,7 +101,7 @@ public: Standard_EXPORT virtual Standard_Boolean Has3d() const Standard_OVERRIDE; //! returns 3d tolerance of the arc C - Standard_EXPORT virtual Standard_Real Tol3d (const Handle(Adaptor2d_HCurve2d)& C) const Standard_OVERRIDE; + Standard_EXPORT virtual Standard_Real Tol3d (const Handle(Adaptor2d_Curve2d)& C) const Standard_OVERRIDE; //! returns 3d tolerance of the vertex V Standard_EXPORT virtual Standard_Real Tol3d (const Handle(Adaptor3d_HVertex)& V) const Standard_OVERRIDE; @@ -146,7 +139,7 @@ private: TopExp_Explorer myVIterator; TopoDS_Face myFace; Standard_Address myFClass2d; - Handle(BRepAdaptor_HCurve2d) myCurve; + Handle(BRepAdaptor_Curve2d) myCurve; TColStd_ListOfTransient myCurves; TColStd_ListIteratorOfListOfTransient myCIterator; Standard_Real myU0; diff --git a/src/BiTgte/BiTgte_CurveOnEdge.cxx b/src/BiTgte/BiTgte_CurveOnEdge.cxx index e11288421e..d3dc87b552 100644 --- a/src/BiTgte/BiTgte_CurveOnEdge.cxx +++ b/src/BiTgte/BiTgte_CurveOnEdge.cxx @@ -14,10 +14,9 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. - -#include #include -#include + +#include #include #include #include @@ -39,6 +38,8 @@ #include #include +IMPLEMENT_STANDARD_RTTIEXT(BiTgte_CurveOnEdge, Adaptor3d_Curve) + //======================================================================= //function : BiTgte_CurveOnEdge //purpose : @@ -160,7 +161,7 @@ void BiTgte_CurveOnEdge::Intervals(TColStd_Array1OfReal&, //purpose : //======================================================================= -Handle(Adaptor3d_HCurve) BiTgte_CurveOnEdge::Trim(const Standard_Real, +Handle(Adaptor3d_Curve) BiTgte_CurveOnEdge::Trim(const Standard_Real, const Standard_Real, const Standard_Real) const { diff --git a/src/BiTgte/BiTgte_CurveOnEdge.hxx b/src/BiTgte/BiTgte_CurveOnEdge.hxx index 7c327d0c94..1c2c0c8793 100644 --- a/src/BiTgte/BiTgte_CurveOnEdge.hxx +++ b/src/BiTgte/BiTgte_CurveOnEdge.hxx @@ -35,7 +35,6 @@ class Standard_OutOfRange; class Standard_NoSuchObject; class Standard_DomainError; class TopoDS_Edge; -class Adaptor3d_HCurve; class gp_Pnt; class gp_Vec; class gp_Lin; @@ -46,15 +45,14 @@ class gp_Parab; class Geom_BezierCurve; class Geom_BSplineCurve; +DEFINE_STANDARD_HANDLE(BiTgte_CurveOnEdge, Adaptor3d_Curve) //! private class used to create a filler rolling on //! an edge. class BiTgte_CurveOnEdge : public Adaptor3d_Curve { + DEFINE_STANDARD_RTTIEXT(BiTgte_CurveOnEdge, Adaptor3d_Curve) public: - - DEFINE_STANDARD_ALLOC - Standard_EXPORT BiTgte_CurveOnEdge(); @@ -83,7 +81,7 @@ public: //! parameters and . is used to //! test for 3d points confusion. //! If >= - Standard_EXPORT Handle(Adaptor3d_HCurve) Trim (const Standard_Real First, const Standard_Real Last, const Standard_Real Tol) const Standard_OVERRIDE; + Standard_EXPORT Handle(Adaptor3d_Curve) Trim (const Standard_Real First, const Standard_Real Last, const Standard_Real Tol) const Standard_OVERRIDE; Standard_EXPORT Standard_Boolean IsClosed() const Standard_OVERRIDE; @@ -156,19 +154,8 @@ public: Standard_EXPORT Handle(Geom_BSplineCurve) BSpline() const Standard_OVERRIDE; - - - -protected: - - - - - private: - - TopoDS_Edge myEdge; TopoDS_Edge myEonF; Handle(Geom_Curve) myCurv; @@ -176,13 +163,6 @@ private: GeomAbs_CurveType myType; gp_Circ myCirc; - }; - - - - - - #endif // _BiTgte_CurveOnEdge_HeaderFile diff --git a/src/BiTgte/BiTgte_CurveOnVertex.cxx b/src/BiTgte/BiTgte_CurveOnVertex.cxx index 2bdf0a204e..0678454615 100644 --- a/src/BiTgte/BiTgte_CurveOnVertex.cxx +++ b/src/BiTgte/BiTgte_CurveOnVertex.cxx @@ -14,10 +14,9 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. - -#include #include -#include + +#include #include #include #include @@ -35,6 +34,8 @@ #include #include +IMPLEMENT_STANDARD_RTTIEXT(BiTgte_CurveOnVertex, Adaptor3d_Curve) + //======================================================================= //function : BiTgte_CurveOnVertex //purpose : @@ -132,7 +133,7 @@ void BiTgte_CurveOnVertex::Intervals(TColStd_Array1OfReal&, //purpose : //======================================================================= -Handle(Adaptor3d_HCurve) BiTgte_CurveOnVertex::Trim(const Standard_Real, +Handle(Adaptor3d_Curve) BiTgte_CurveOnVertex::Trim(const Standard_Real, const Standard_Real, const Standard_Real) const diff --git a/src/BiTgte/BiTgte_CurveOnVertex.hxx b/src/BiTgte/BiTgte_CurveOnVertex.hxx index 41a56bf383..e72e2f6f1d 100644 --- a/src/BiTgte/BiTgte_CurveOnVertex.hxx +++ b/src/BiTgte/BiTgte_CurveOnVertex.hxx @@ -34,7 +34,6 @@ class Standard_NoSuchObject; class Standard_DomainError; class TopoDS_Edge; class TopoDS_Vertex; -class Adaptor3d_HCurve; class gp_Pnt; class gp_Vec; class gp_Lin; @@ -45,15 +44,14 @@ class gp_Parab; class Geom_BezierCurve; class Geom_BSplineCurve; +DEFINE_STANDARD_HANDLE(BiTgte_CurveOnVertex, Adaptor3d_Curve) //! private class used to create a filler rolling on //! an edge. class BiTgte_CurveOnVertex : public Adaptor3d_Curve { + DEFINE_STANDARD_RTTIEXT(BiTgte_CurveOnVertex, Adaptor3d_Curve) public: - - DEFINE_STANDARD_ALLOC - Standard_EXPORT BiTgte_CurveOnVertex(); @@ -82,7 +80,7 @@ public: //! parameters and . is used to //! test for 3d points confusion. //! If >= - Standard_EXPORT Handle(Adaptor3d_HCurve) Trim (const Standard_Real First, const Standard_Real Last, const Standard_Real Tol) const Standard_OVERRIDE; + Standard_EXPORT Handle(Adaptor3d_Curve) Trim (const Standard_Real First, const Standard_Real Last, const Standard_Real Tol) const Standard_OVERRIDE; Standard_EXPORT Standard_Boolean IsClosed() const Standard_OVERRIDE; @@ -155,30 +153,12 @@ public: Standard_EXPORT Handle(Geom_BSplineCurve) BSpline() const Standard_OVERRIDE; - - - -protected: - - - - - private: - - Standard_Real myFirst; Standard_Real myLast; gp_Pnt myPnt; - }; - - - - - - #endif // _BiTgte_CurveOnVertex_HeaderFile diff --git a/src/BiTgte/BiTgte_HCurveOnEdge.hxx b/src/BiTgte/BiTgte_HCurveOnEdge.hxx deleted file mode 100644 index 1e63fac4ec..0000000000 --- a/src/BiTgte/BiTgte_HCurveOnEdge.hxx +++ /dev/null @@ -1,97 +0,0 @@ -// Created on: 1996-12-16 -// Created by: Bruno DUMORTIER -// Copyright (c) 1996-1999 Matra Datavision -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - -#ifndef _BiTgte_HCurveOnEdge_HeaderFile -#define _BiTgte_HCurveOnEdge_HeaderFile - -#include -#include - -#include -#include -class Standard_OutOfRange; -class Standard_NoSuchObject; -class Standard_DomainError; -class BiTgte_CurveOnEdge; -class Adaptor3d_Curve; - - -class BiTgte_HCurveOnEdge; -DEFINE_STANDARD_HANDLE(BiTgte_HCurveOnEdge, Adaptor3d_HCurve) - - -class BiTgte_HCurveOnEdge : public Adaptor3d_HCurve -{ - -public: - - - //! Creates an empty GenHCurve. - Standard_EXPORT BiTgte_HCurveOnEdge(); - - //! Creates a GenHCurve from a Curve - Standard_EXPORT BiTgte_HCurveOnEdge(const BiTgte_CurveOnEdge& C); - - //! Sets the field of the GenHCurve. - Standard_EXPORT void Set (const BiTgte_CurveOnEdge& C); - - //! Returns the curve used to create the GenHCurve. - //! This is redefined from HCurve, cannot be inline. - Standard_EXPORT const Adaptor3d_Curve& Curve() const Standard_OVERRIDE; - - //! Returns the curve used to create the GenHCurve. - //! This is redefined from HCurve, cannot be inline. - Standard_EXPORT Adaptor3d_Curve& GetCurve() Standard_OVERRIDE; - - //! Returns the curve used to create the GenHCurve. - BiTgte_CurveOnEdge& ChangeCurve(); - - - - - DEFINE_STANDARD_RTTI_INLINE(BiTgte_HCurveOnEdge,Adaptor3d_HCurve) - -protected: - - - BiTgte_CurveOnEdge myCurve; - - -private: - - - - -}; - -#define TheCurve BiTgte_CurveOnEdge -#define TheCurve_hxx -#define Adaptor3d_GenHCurve BiTgte_HCurveOnEdge -#define Adaptor3d_GenHCurve_hxx -#define Handle_Adaptor3d_GenHCurve Handle(BiTgte_HCurveOnEdge) - -#include - -#undef TheCurve -#undef TheCurve_hxx -#undef Adaptor3d_GenHCurve -#undef Adaptor3d_GenHCurve_hxx -#undef Handle_Adaptor3d_GenHCurve - - - - -#endif // _BiTgte_HCurveOnEdge_HeaderFile diff --git a/src/BiTgte/BiTgte_HCurveOnEdge_0.cxx b/src/BiTgte/BiTgte_HCurveOnEdge_0.cxx deleted file mode 100644 index 86bb4d886c..0000000000 --- a/src/BiTgte/BiTgte_HCurveOnEdge_0.cxx +++ /dev/null @@ -1,42 +0,0 @@ -// Created on: 1996-12-16 -// Created by: Bruno DUMORTIER -// Copyright (c) 1996-1999 Matra Datavision -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - -#include - -#include - -#include -#include -#include -#include -#include - - - - - - - - - - -#define TheCurve BiTgte_CurveOnEdge -#define TheCurve_hxx -#define Adaptor3d_GenHCurve BiTgte_HCurveOnEdge -#define Adaptor3d_GenHCurve_hxx -#define Handle_Adaptor3d_GenHCurve Handle(BiTgte_HCurveOnEdge) -#include - diff --git a/src/BiTgte/BiTgte_HCurveOnVertex.hxx b/src/BiTgte/BiTgte_HCurveOnVertex.hxx deleted file mode 100644 index 4b2087584e..0000000000 --- a/src/BiTgte/BiTgte_HCurveOnVertex.hxx +++ /dev/null @@ -1,97 +0,0 @@ -// Created on: 1996-12-16 -// Created by: Bruno DUMORTIER -// Copyright (c) 1996-1999 Matra Datavision -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - -#ifndef _BiTgte_HCurveOnVertex_HeaderFile -#define _BiTgte_HCurveOnVertex_HeaderFile - -#include -#include - -#include -#include -class Standard_OutOfRange; -class Standard_NoSuchObject; -class Standard_DomainError; -class BiTgte_CurveOnVertex; -class Adaptor3d_Curve; - - -class BiTgte_HCurveOnVertex; -DEFINE_STANDARD_HANDLE(BiTgte_HCurveOnVertex, Adaptor3d_HCurve) - - -class BiTgte_HCurveOnVertex : public Adaptor3d_HCurve -{ - -public: - - - //! Creates an empty GenHCurve. - Standard_EXPORT BiTgte_HCurveOnVertex(); - - //! Creates a GenHCurve from a Curve - Standard_EXPORT BiTgte_HCurveOnVertex(const BiTgte_CurveOnVertex& C); - - //! Sets the field of the GenHCurve. - Standard_EXPORT void Set (const BiTgte_CurveOnVertex& C); - - //! Returns the curve used to create the GenHCurve. - //! This is redefined from HCurve, cannot be inline. - Standard_EXPORT const Adaptor3d_Curve& Curve() const Standard_OVERRIDE; - - //! Returns the curve used to create the GenHCurve. - //! This is redefined from HCurve, cannot be inline. - Standard_EXPORT Adaptor3d_Curve& GetCurve() Standard_OVERRIDE; - - //! Returns the curve used to create the GenHCurve. - BiTgte_CurveOnVertex& ChangeCurve(); - - - - - DEFINE_STANDARD_RTTI_INLINE(BiTgte_HCurveOnVertex,Adaptor3d_HCurve) - -protected: - - - BiTgte_CurveOnVertex myCurve; - - -private: - - - - -}; - -#define TheCurve BiTgte_CurveOnVertex -#define TheCurve_hxx -#define Adaptor3d_GenHCurve BiTgte_HCurveOnVertex -#define Adaptor3d_GenHCurve_hxx -#define Handle_Adaptor3d_GenHCurve Handle(BiTgte_HCurveOnVertex) - -#include - -#undef TheCurve -#undef TheCurve_hxx -#undef Adaptor3d_GenHCurve -#undef Adaptor3d_GenHCurve_hxx -#undef Handle_Adaptor3d_GenHCurve - - - - -#endif // _BiTgte_HCurveOnVertex_HeaderFile diff --git a/src/BiTgte/BiTgte_HCurveOnVertex_0.cxx b/src/BiTgte/BiTgte_HCurveOnVertex_0.cxx deleted file mode 100644 index 6829ca6628..0000000000 --- a/src/BiTgte/BiTgte_HCurveOnVertex_0.cxx +++ /dev/null @@ -1,42 +0,0 @@ -// Created on: 1996-12-16 -// Created by: Bruno DUMORTIER -// Copyright (c) 1996-1999 Matra Datavision -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - -#include - -#include - -#include -#include -#include -#include -#include - - - - - - - - - - -#define TheCurve BiTgte_CurveOnVertex -#define TheCurve_hxx -#define Adaptor3d_GenHCurve BiTgte_HCurveOnVertex -#define Adaptor3d_GenHCurve_hxx -#define Handle_Adaptor3d_GenHCurve Handle(BiTgte_HCurveOnVertex) -#include - diff --git a/src/BiTgte/FILES b/src/BiTgte/FILES index 09c5167eb7..479b892fb4 100644 --- a/src/BiTgte/FILES +++ b/src/BiTgte/FILES @@ -5,7 +5,3 @@ BiTgte_CurveOnEdge.cxx BiTgte_CurveOnEdge.hxx BiTgte_CurveOnVertex.cxx BiTgte_CurveOnVertex.hxx -BiTgte_HCurveOnEdge.hxx -BiTgte_HCurveOnEdge_0.cxx -BiTgte_HCurveOnVertex.hxx -BiTgte_HCurveOnVertex_0.cxx diff --git a/src/Blend/Blend_CSWalking.gxx b/src/Blend/Blend_CSWalking.gxx index a53ba3374b..812cfbc382 100644 --- a/src/Blend/Blend_CSWalking.gxx +++ b/src/Blend/Blend_CSWalking.gxx @@ -16,7 +16,7 @@ #include #include #include -#include +#include #include #ifdef OCCT_DEBUG diff --git a/src/Blend/Blend_CSWalking_3.gxx b/src/Blend/Blend_CSWalking_3.gxx index bfee7a00da..77db2ccefa 100644 --- a/src/Blend/Blend_CSWalking_3.gxx +++ b/src/Blend/Blend_CSWalking_3.gxx @@ -75,7 +75,7 @@ Standard_Boolean Blend_CSWalking::Recadre(Blend_FuncInv& FuncInv, } TheArc thearc = Iter->Value(); - Handle(Adaptor2d_HCurve2d) thecur; + Handle(Adaptor2d_Curve2d) thecur; if (OnFirst) { thecur = TheBlendTool::CurveOnSurf(thearc,surf1); } diff --git a/src/Blend/Blend_FuncInv.cxx b/src/Blend/Blend_FuncInv.cxx index 30b18b0a2e..ab3b984453 100644 --- a/src/Blend/Blend_FuncInv.cxx +++ b/src/Blend/Blend_FuncInv.cxx @@ -13,7 +13,7 @@ // commercial license or contractual agreement. -#include +#include #include #include diff --git a/src/Blend/Blend_FuncInv.hxx b/src/Blend/Blend_FuncInv.hxx index 76fdf015c0..d48137bf9d 100644 --- a/src/Blend/Blend_FuncInv.hxx +++ b/src/Blend/Blend_FuncInv.hxx @@ -27,8 +27,6 @@ #include #include class math_Matrix; -class Adaptor2d_HCurve2d; - //! Deferred class for a function used to compute a blending //! surface between two surfaces, using a guide line. @@ -75,7 +73,7 @@ public: //! to be found. If is set to Standard_True, //! the curve will be on the first surface, otherwise the //! curve is on the second one. - Standard_EXPORT virtual void Set (const Standard_Boolean OnFirst, const Handle(Adaptor2d_HCurve2d)& COnSurf) = 0; + Standard_EXPORT virtual void Set (const Standard_Boolean OnFirst, const Handle(Adaptor2d_Curve2d)& COnSurf) = 0; //! Returns in the vector Tolerance the parametric tolerance //! for each of the 4 variables; diff --git a/src/Blend/Blend_SurfCurvFuncInv.cxx b/src/Blend/Blend_SurfCurvFuncInv.cxx index 8325265463..f0be071b72 100644 --- a/src/Blend/Blend_SurfCurvFuncInv.cxx +++ b/src/Blend/Blend_SurfCurvFuncInv.cxx @@ -15,7 +15,7 @@ // commercial license or contractual agreement. -#include +#include #include #include diff --git a/src/Blend/Blend_SurfCurvFuncInv.hxx b/src/Blend/Blend_SurfCurvFuncInv.hxx index fbca08937e..c2c4344b01 100644 --- a/src/Blend/Blend_SurfCurvFuncInv.hxx +++ b/src/Blend/Blend_SurfCurvFuncInv.hxx @@ -27,8 +27,6 @@ #include #include class math_Matrix; -class Adaptor2d_HCurve2d; - //! Deferred class for a function used to compute a //! blending surface between a surface and a curve, using @@ -73,7 +71,7 @@ public: Standard_EXPORT virtual Standard_Boolean Values (const math_Vector& X, math_Vector& F, math_Matrix& D) = 0; //! Set the Point on which a solution has to be found. - Standard_EXPORT virtual void Set (const Handle(Adaptor2d_HCurve2d)& Rst) = 0; + Standard_EXPORT virtual void Set (const Handle(Adaptor2d_Curve2d)& Rst) = 0; //! Returns in the vector Tolerance the parametric tolerance //! for each of the 3 variables; diff --git a/src/Blend/Blend_Walking.gxx b/src/Blend/Blend_Walking.gxx index f173c81b93..d2113e2beb 100644 --- a/src/Blend/Blend_Walking.gxx +++ b/src/Blend/Blend_Walking.gxx @@ -18,7 +18,7 @@ #include #include -#include +#include #include #include #include diff --git a/src/Blend/Blend_Walking_1.gxx b/src/Blend/Blend_Walking_1.gxx index 16373be067..d7f65c7689 100644 --- a/src/Blend/Blend_Walking_1.gxx +++ b/src/Blend/Blend_Walking_1.gxx @@ -16,7 +16,7 @@ Blend_Walking::Blend_Walking(const TheSurface& Surf1, const TheSurface& Surf2, const Handle(TheTopolTool)& Domain1, const Handle(TheTopolTool)& Domain2, - const Handle(ChFiDS_HElSpine)& HGuide): + const Handle(ChFiDS_ElSpine)& HGuide): sol(1,4),surf1(Surf1),surf2(Surf2), ToCorrectOnRst1(Standard_False),ToCorrectOnRst2(Standard_False), done(Standard_False), diff --git a/src/Blend/Blend_Walking_3.gxx b/src/Blend/Blend_Walking_3.gxx index 52056fd2bb..41b669a3f9 100644 --- a/src/Blend/Blend_Walking_3.gxx +++ b/src/Blend/Blend_Walking_3.gxx @@ -90,7 +90,7 @@ Standard_Boolean Blend_Walking::Recadre(Blend_FuncInv& FuncInv, math_Vector toler(1,4),infb(1,4),supb(1,4),valsol(1,4); - Handle(Adaptor2d_HCurve2d) thecur; + Handle(Adaptor2d_Curve2d) thecur; Handle(TheTopolTool) Iter; if (OnFirst) Iter = recdomain1; @@ -220,7 +220,7 @@ Standard_Boolean Blend_Walking::Recadre(Blend_FuncInv& FuncInv, // Recadrage eventuelle pour le cas periodique if (periodic) { - Handle(Adaptor3d_HSurface) surf; + Handle(Adaptor3d_Surface) surf; if (OnFirst) surf = surf2; else surf = surf1; @@ -409,7 +409,7 @@ void Blend_Walking::Transition(const Standard_Boolean OnFirst, CSLib::Normal(d1u, d1v, 1.e-9, stat, thenormal); if (stat == CSLib_Defined) normale.SetXYZ(thenormal.XYZ()); else { - Handle(Adaptor3d_HSurface) surf; + Handle(Adaptor3d_Surface) surf; if (OnFirst) surf = surf1; else surf = surf2; Standard_Integer iu, iv; diff --git a/src/Blend/Blend_Walking_4.gxx b/src/Blend/Blend_Walking_4.gxx index a83a177d3c..acd895f0ce 100644 --- a/src/Blend/Blend_Walking_4.gxx +++ b/src/Blend/Blend_Walking_4.gxx @@ -331,7 +331,7 @@ void Blend_Walking::InternalPerform(Blend_Function& Func, const Standard_Real TolProd = 1.e-5; Standard_Real SavedParams [2]; Standard_Boolean SameDirs [2] = {Standard_False, Standard_False}; - ChFiDS_ElSpine& theElSpine = hguide->ChangeCurve(); + ChFiDS_ElSpine& theElSpine = *hguide; SavedParams[0] = theElSpine.GetSavedFirstParameter(); SavedParams[1] = theElSpine.GetSavedLastParameter(); for (Standard_Integer ind = 0; ind < 2; ind++) @@ -767,7 +767,7 @@ Standard_Boolean Blend_Walking::CorrectExtremityOnOneRst(const Standard_Integer { const Standard_Real TolAng = 0.001; //bug OCC25701 - ChFiDS_ElSpine& theElSpine = hguide->ChangeCurve(); + ChFiDS_ElSpine& theElSpine = *hguide; if (theElSpine.NbVertices() == 0) return Standard_False; @@ -866,7 +866,7 @@ Standard_Boolean Blend_Walking::CorrectExtremityOnOneRst(const Standard_Integer //////////////////////////////////////////////////////////////////////// //Project the point on the surface 2 - Extrema_ExtPS projonsurf(PntOnPlane, AnotherSurf->Surface(), + Extrema_ExtPS projonsurf(PntOnPlane, *AnotherSurf, Precision::PConfusion(), Precision::PConfusion(), Extrema_ExtFlag_MIN); if (projonsurf.IsDone()) diff --git a/src/BlendFunc/BlendFunc.cxx b/src/BlendFunc/BlendFunc.cxx index f8a7741560..d6cfb7ff9d 100644 --- a/src/BlendFunc/BlendFunc.cxx +++ b/src/BlendFunc/BlendFunc.cxx @@ -18,7 +18,7 @@ // 30/12/1996 PMN Ajout de GetMinimalWeight // 23/09/1997 PMN Supprimme GetCircle et GetTol (passe dans GeomFill) -#include +#include #include #include #include @@ -166,7 +166,7 @@ GeomAbs_Shape BlendFunc::NextShape (const GeomAbs_Shape S) //purpose : //======================================================================= -Standard_Boolean BlendFunc::ComputeNormal (const Handle(Adaptor3d_HSurface)& Surf, +Standard_Boolean BlendFunc::ComputeNormal (const Handle(Adaptor3d_Surface)& Surf, const gp_Pnt2d& p2d, gp_Vec& Normal) { const Standard_Integer MaxOrder=3; @@ -210,7 +210,7 @@ Standard_Boolean BlendFunc::ComputeNormal (const Handle(Adaptor3d_HSurface)& Sur //purpose : //======================================================================= -Standard_Boolean BlendFunc::ComputeDNormal (const Handle(Adaptor3d_HSurface)& Surf, +Standard_Boolean BlendFunc::ComputeDNormal (const Handle(Adaptor3d_Surface)& Surf, const gp_Pnt2d& p2d, gp_Vec& Normal, gp_Vec& DNu, gp_Vec& DNv) { diff --git a/src/BlendFunc/BlendFunc.hxx b/src/BlendFunc/BlendFunc.hxx index 898b7dc623..7c3b2720d0 100644 --- a/src/BlendFunc/BlendFunc.hxx +++ b/src/BlendFunc/BlendFunc.hxx @@ -17,19 +17,13 @@ #ifndef _BlendFunc_HeaderFile #define _BlendFunc_HeaderFile -#include -#include -#include - +#include #include -#include -#include #include #include #include #include -#include -class Adaptor3d_HSurface; + class gp_Pnt2d; class gp_Vec; class BlendFunc_ConstRad; @@ -69,9 +63,9 @@ public: //! Used to obtain the next level of continuity. Standard_EXPORT static GeomAbs_Shape NextShape (const GeomAbs_Shape S); - Standard_EXPORT static Standard_Boolean ComputeNormal (const Handle(Adaptor3d_HSurface)& Surf, const gp_Pnt2d& p2d, gp_Vec& Normal); + Standard_EXPORT static Standard_Boolean ComputeNormal (const Handle(Adaptor3d_Surface)& Surf, const gp_Pnt2d& p2d, gp_Vec& Normal); - Standard_EXPORT static Standard_Boolean ComputeDNormal (const Handle(Adaptor3d_HSurface)& Surf, const gp_Pnt2d& p2d, gp_Vec& Normal, gp_Vec& DNu, gp_Vec& DNv); + Standard_EXPORT static Standard_Boolean ComputeDNormal (const Handle(Adaptor3d_Surface)& Surf, const gp_Pnt2d& p2d, gp_Vec& Normal, gp_Vec& DNu, gp_Vec& DNv); diff --git a/src/BlendFunc/BlendFunc_CSCircular.cxx b/src/BlendFunc/BlendFunc_CSCircular.cxx index 659446b712..8800769567 100644 --- a/src/BlendFunc/BlendFunc_CSCircular.cxx +++ b/src/BlendFunc/BlendFunc_CSCircular.cxx @@ -18,8 +18,8 @@ // + Utilisation de GeomFill::GetCircle dans Section. // Modified 23/06/1997 PMN : Pb de division par 0. -#include -#include +#include +#include #include #include #include @@ -45,9 +45,9 @@ //purpose : //======================================================================= -BlendFunc_CSCircular::BlendFunc_CSCircular(const Handle(Adaptor3d_HSurface)& S, - const Handle(Adaptor3d_HCurve)& C, - const Handle(Adaptor3d_HCurve)& CGuide, +BlendFunc_CSCircular::BlendFunc_CSCircular(const Handle(Adaptor3d_Surface)& S, + const Handle(Adaptor3d_Curve)& C, + const Handle(Adaptor3d_Curve)& CGuide, const Handle(Law_Function)& L) : surf(S),curv(C),guide(CGuide),law(L),istangent(Standard_True), //prmc, dprmc, istangent, ray, choix, normtg, diff --git a/src/BlendFunc/BlendFunc_CSCircular.hxx b/src/BlendFunc/BlendFunc_CSCircular.hxx index f2b4082989..a5c7f800de 100644 --- a/src/BlendFunc/BlendFunc_CSCircular.hxx +++ b/src/BlendFunc/BlendFunc_CSCircular.hxx @@ -17,17 +17,11 @@ #ifndef _BlendFunc_CSCircular_HeaderFile #define _BlendFunc_CSCircular_HeaderFile -#include -#include -#include - +#include #include #include -#include -#include #include #include -#include #include #include #include @@ -39,19 +33,12 @@ #include #include #include -class Adaptor3d_HSurface; -class Adaptor3d_HCurve; + class Law_Function; class math_Matrix; -class gp_Pnt; -class gp_Pnt2d; -class gp_Vec; -class gp_Vec2d; class gp_Circ; class Blend_Point; - - class BlendFunc_CSCircular : public Blend_CSFunction { public: @@ -68,7 +55,7 @@ public: //! below : //! t is the current parameter on the guide line. //! Pguide = C(L(t)); Nguide = CGuide'(t)/||CGuide'(t)|| - Standard_EXPORT BlendFunc_CSCircular(const Handle(Adaptor3d_HSurface)& S, const Handle(Adaptor3d_HCurve)& C, const Handle(Adaptor3d_HCurve)& CGuide, const Handle(Law_Function)& L); + Standard_EXPORT BlendFunc_CSCircular(const Handle(Adaptor3d_Surface)& S, const Handle(Adaptor3d_Curve)& C, const Handle(Adaptor3d_Curve)& CGuide, const Handle(Law_Function)& L); Standard_EXPORT virtual Standard_Integer NbVariables() const Standard_OVERRIDE; @@ -198,9 +185,9 @@ private: - Handle(Adaptor3d_HSurface) surf; - Handle(Adaptor3d_HCurve) curv; - Handle(Adaptor3d_HCurve) guide; + Handle(Adaptor3d_Surface) surf; + Handle(Adaptor3d_Curve) curv; + Handle(Adaptor3d_Curve) guide; Handle(Law_Function) law; gp_Pnt pts; gp_Pnt ptc; diff --git a/src/BlendFunc/BlendFunc_CSConstRad.cxx b/src/BlendFunc/BlendFunc_CSConstRad.cxx index 2085da07b8..6d85ff649e 100644 --- a/src/BlendFunc/BlendFunc_CSConstRad.cxx +++ b/src/BlendFunc/BlendFunc_CSConstRad.cxx @@ -17,8 +17,8 @@ // Modified 10/09/1996 PMN Ajout de (Nb)Intervalles, IsRationnal // + Utilisation de GeomFill::GetCircle dans Section. -#include -#include +#include +#include #include #include #include @@ -40,9 +40,9 @@ //function : BlendFunc_CSConstRad //purpose : //======================================================================= -BlendFunc_CSConstRad::BlendFunc_CSConstRad(const Handle(Adaptor3d_HSurface)& S, - const Handle(Adaptor3d_HCurve)& C, - const Handle(Adaptor3d_HCurve)& CG) : +BlendFunc_CSConstRad::BlendFunc_CSConstRad(const Handle(Adaptor3d_Surface)& S, + const Handle(Adaptor3d_Curve)& C, + const Handle(Adaptor3d_Curve)& CG) : surf(S),curv(C),guide(CG), prmc(0.0), istangent(Standard_True), ray(0.0), diff --git a/src/BlendFunc/BlendFunc_CSConstRad.hxx b/src/BlendFunc/BlendFunc_CSConstRad.hxx index c4f01e3ce0..24ca3f43d1 100644 --- a/src/BlendFunc/BlendFunc_CSConstRad.hxx +++ b/src/BlendFunc/BlendFunc_CSConstRad.hxx @@ -17,17 +17,11 @@ #ifndef _BlendFunc_CSConstRad_HeaderFile #define _BlendFunc_CSConstRad_HeaderFile -#include -#include -#include - +#include #include #include -#include -#include #include #include -#include #include #include #include @@ -39,18 +33,11 @@ #include #include #include -class Adaptor3d_HSurface; -class Adaptor3d_HCurve; + class math_Matrix; -class gp_Pnt; -class gp_Pnt2d; -class gp_Vec; -class gp_Vec2d; class gp_Circ; class Blend_Point; - - class BlendFunc_CSConstRad : public Blend_CSFunction { public: @@ -58,7 +45,7 @@ public: DEFINE_STANDARD_ALLOC - Standard_EXPORT BlendFunc_CSConstRad(const Handle(Adaptor3d_HSurface)& S, const Handle(Adaptor3d_HCurve)& C, const Handle(Adaptor3d_HCurve)& CGuide); + Standard_EXPORT BlendFunc_CSConstRad(const Handle(Adaptor3d_Surface)& S, const Handle(Adaptor3d_Curve)& C, const Handle(Adaptor3d_Curve)& CGuide); //! returns the number of equations of the function (3). Standard_EXPORT Standard_Integer NbEquations() const Standard_OVERRIDE; @@ -185,9 +172,9 @@ private: - Handle(Adaptor3d_HSurface) surf; - Handle(Adaptor3d_HCurve) curv; - Handle(Adaptor3d_HCurve) guide; + Handle(Adaptor3d_Surface) surf; + Handle(Adaptor3d_Curve) curv; + Handle(Adaptor3d_Curve) guide; gp_Pnt pts; gp_Pnt ptc; gp_Pnt2d pt2d; diff --git a/src/BlendFunc/BlendFunc_ChAsym.cxx b/src/BlendFunc/BlendFunc_ChAsym.cxx index 81104d0d73..845e939ba2 100644 --- a/src/BlendFunc/BlendFunc_ChAsym.cxx +++ b/src/BlendFunc/BlendFunc_ChAsym.cxx @@ -15,8 +15,8 @@ // commercial license or contractual agreement. -#include -#include +#include +#include #include #include #include @@ -35,9 +35,9 @@ //function : BlendFunc_ChAsym //purpose : //======================================================================= -BlendFunc_ChAsym::BlendFunc_ChAsym(const Handle(Adaptor3d_HSurface)& S1, - const Handle(Adaptor3d_HSurface)& S2, - const Handle(Adaptor3d_HCurve)& C) : +BlendFunc_ChAsym::BlendFunc_ChAsym(const Handle(Adaptor3d_Surface)& S1, + const Handle(Adaptor3d_Surface)& S2, + const Handle(Adaptor3d_Curve)& C) : surf1(S1),surf2(S2), curv(C), tcurv(C), param(0), diff --git a/src/BlendFunc/BlendFunc_ChAsym.hxx b/src/BlendFunc/BlendFunc_ChAsym.hxx index d0bb8af9c1..701d8de768 100644 --- a/src/BlendFunc/BlendFunc_ChAsym.hxx +++ b/src/BlendFunc/BlendFunc_ChAsym.hxx @@ -17,18 +17,12 @@ #ifndef _BlendFunc_ChAsym_HeaderFile #define _BlendFunc_ChAsym_HeaderFile -#include -#include -#include - -#include +#include #include #include #include #include -#include #include -#include #include #include #include @@ -37,17 +31,11 @@ #include #include #include -class Adaptor3d_HSurface; -class Adaptor3d_HCurve; + class math_Matrix; -class gp_Pnt; -class gp_Vec; -class gp_Vec2d; class gp_Lin; class Blend_Point; - - class BlendFunc_ChAsym : public Blend_Function { public: @@ -55,7 +43,7 @@ public: DEFINE_STANDARD_ALLOC - Standard_EXPORT BlendFunc_ChAsym(const Handle(Adaptor3d_HSurface)& S1, const Handle(Adaptor3d_HSurface)& S2, const Handle(Adaptor3d_HCurve)& C); + Standard_EXPORT BlendFunc_ChAsym(const Handle(Adaptor3d_Surface)& S1, const Handle(Adaptor3d_Surface)& S2, const Handle(Adaptor3d_Curve)& C); //! returns the number of equations of the function. Standard_EXPORT Standard_Integer NbEquations() const Standard_OVERRIDE; @@ -185,10 +173,10 @@ private: - Handle(Adaptor3d_HSurface) surf1; - Handle(Adaptor3d_HSurface) surf2; - Handle(Adaptor3d_HCurve) curv; - Handle(Adaptor3d_HCurve) tcurv; + Handle(Adaptor3d_Surface) surf1; + Handle(Adaptor3d_Surface) surf2; + Handle(Adaptor3d_Curve) curv; + Handle(Adaptor3d_Curve) tcurv; Standard_Real param; Standard_Real dist1; Standard_Real angle; diff --git a/src/BlendFunc/BlendFunc_ChAsymInv.cxx b/src/BlendFunc/BlendFunc_ChAsymInv.cxx index b3afa5168b..3ef8b19449 100644 --- a/src/BlendFunc/BlendFunc_ChAsymInv.cxx +++ b/src/BlendFunc/BlendFunc_ChAsymInv.cxx @@ -15,9 +15,9 @@ // commercial license or contractual agreement. -#include -#include -#include +#include +#include +#include #include #include #include @@ -27,9 +27,9 @@ //function : BlendFunc_ChAsymInv //purpose : //======================================================================= -BlendFunc_ChAsymInv::BlendFunc_ChAsymInv(const Handle(Adaptor3d_HSurface)& S1, - const Handle(Adaptor3d_HSurface)& S2, - const Handle(Adaptor3d_HCurve)& C) : +BlendFunc_ChAsymInv::BlendFunc_ChAsymInv(const Handle(Adaptor3d_Surface)& S1, + const Handle(Adaptor3d_Surface)& S2, + const Handle(Adaptor3d_Curve)& C) : surf1(S1),surf2(S2), dist1(RealLast()), angle(RealLast()), @@ -73,7 +73,7 @@ Standard_Integer BlendFunc_ChAsymInv::NbEquations () const //======================================================================= void BlendFunc_ChAsymInv::Set(const Standard_Boolean OnFirst, - const Handle(Adaptor2d_HCurve2d)& C) + const Handle(Adaptor2d_Curve2d)& C) { first = OnFirst; csurf = C; diff --git a/src/BlendFunc/BlendFunc_ChAsymInv.hxx b/src/BlendFunc/BlendFunc_ChAsymInv.hxx index 93539be24e..df4c03e952 100644 --- a/src/BlendFunc/BlendFunc_ChAsymInv.hxx +++ b/src/BlendFunc/BlendFunc_ChAsymInv.hxx @@ -17,22 +17,10 @@ #ifndef _BlendFunc_ChAsymInv_HeaderFile #define _BlendFunc_ChAsymInv_HeaderFile -#include -#include -#include - -#include -#include -#include +#include #include #include #include -class Adaptor3d_HSurface; -class Adaptor3d_HCurve; -class Adaptor2d_HCurve2d; -class math_Matrix; - - class BlendFunc_ChAsymInv : public Blend_FuncInv { @@ -41,9 +29,9 @@ public: DEFINE_STANDARD_ALLOC - Standard_EXPORT BlendFunc_ChAsymInv(const Handle(Adaptor3d_HSurface)& S1, const Handle(Adaptor3d_HSurface)& S2, const Handle(Adaptor3d_HCurve)& C); + Standard_EXPORT BlendFunc_ChAsymInv(const Handle(Adaptor3d_Surface)& S1, const Handle(Adaptor3d_Surface)& S2, const Handle(Adaptor3d_Curve)& C); - Standard_EXPORT void Set (const Standard_Boolean OnFirst, const Handle(Adaptor2d_HCurve2d)& COnSurf) Standard_OVERRIDE; + Standard_EXPORT void Set (const Standard_Boolean OnFirst, const Handle(Adaptor2d_Curve2d)& COnSurf) Standard_OVERRIDE; Standard_EXPORT void GetTolerance (math_Vector& Tolerance, const Standard_Real Tol) const Standard_OVERRIDE; @@ -93,13 +81,13 @@ private: - Handle(Adaptor3d_HSurface) surf1; - Handle(Adaptor3d_HSurface) surf2; + Handle(Adaptor3d_Surface) surf1; + Handle(Adaptor3d_Surface) surf2; Standard_Real dist1; Standard_Real angle; Standard_Real tgang; - Handle(Adaptor3d_HCurve) curv; - Handle(Adaptor2d_HCurve2d) csurf; + Handle(Adaptor3d_Curve) curv; + Handle(Adaptor2d_Curve2d) csurf; Standard_Integer choix; Standard_Boolean first; math_Vector FX; diff --git a/src/BlendFunc/BlendFunc_ChamfInv.cxx b/src/BlendFunc/BlendFunc_ChamfInv.cxx index 762d72ef76..6a235fbfac 100644 --- a/src/BlendFunc/BlendFunc_ChamfInv.cxx +++ b/src/BlendFunc/BlendFunc_ChamfInv.cxx @@ -15,9 +15,9 @@ // commercial license or contractual agreement. -#include -#include -#include +#include +#include +#include #include #include #include @@ -28,9 +28,9 @@ //purpose : //======================================================================= -BlendFunc_ChamfInv::BlendFunc_ChamfInv(const Handle(Adaptor3d_HSurface)& S1, - const Handle(Adaptor3d_HSurface)& S2, - const Handle(Adaptor3d_HCurve)& C) +BlendFunc_ChamfInv::BlendFunc_ChamfInv(const Handle(Adaptor3d_Surface)& S1, + const Handle(Adaptor3d_Surface)& S2, + const Handle(Adaptor3d_Curve)& C) : BlendFunc_GenChamfInv(S1,S2,C), corde1(surf1,curv),corde2(surf2,curv) { diff --git a/src/BlendFunc/BlendFunc_ChamfInv.hxx b/src/BlendFunc/BlendFunc_ChamfInv.hxx index d0faafc74f..daa36f1122 100644 --- a/src/BlendFunc/BlendFunc_ChamfInv.hxx +++ b/src/BlendFunc/BlendFunc_ChamfInv.hxx @@ -17,23 +17,13 @@ #ifndef _BlendFunc_ChamfInv_HeaderFile #define _BlendFunc_ChamfInv_HeaderFile -#include -#include -#include - -#include -#include +#include #include #include #include -#include -class Adaptor3d_HSurface; -class Adaptor3d_HCurve; -class Adaptor2d_HCurve2d; + class math_Matrix; - - //! Class for a function used to compute a chamfer with two constant distances //! on a surface's boundary class BlendFunc_ChamfInv : public BlendFunc_GenChamfInv @@ -43,7 +33,7 @@ public: DEFINE_STANDARD_ALLOC - Standard_EXPORT BlendFunc_ChamfInv(const Handle(Adaptor3d_HSurface)& S1, const Handle(Adaptor3d_HSurface)& S2, const Handle(Adaptor3d_HCurve)& C); + Standard_EXPORT BlendFunc_ChamfInv(const Handle(Adaptor3d_Surface)& S1, const Handle(Adaptor3d_Surface)& S2, const Handle(Adaptor3d_Curve)& C); Standard_EXPORT Standard_Boolean IsSolution (const math_Vector& Sol, const Standard_Real Tol) Standard_OVERRIDE; diff --git a/src/BlendFunc/BlendFunc_Chamfer.cxx b/src/BlendFunc/BlendFunc_Chamfer.cxx index 8e7c7a47e2..a53d2eceb3 100644 --- a/src/BlendFunc/BlendFunc_Chamfer.cxx +++ b/src/BlendFunc/BlendFunc_Chamfer.cxx @@ -17,8 +17,8 @@ // Modified : 20/08/96 PMN Ajout des methodes (Nb)Intervals et IsRationnal // Modified : 30/12/96 PMN Ajout GetMinimalWeight, GetSectionSize; -#include -#include +#include +#include #include #include #include @@ -36,9 +36,9 @@ //purpose : //======================================================================= -BlendFunc_Chamfer::BlendFunc_Chamfer(const Handle(Adaptor3d_HSurface)& S1, - const Handle(Adaptor3d_HSurface)& S2, - const Handle(Adaptor3d_HCurve)& CG) +BlendFunc_Chamfer::BlendFunc_Chamfer(const Handle(Adaptor3d_Surface)& S1, + const Handle(Adaptor3d_Surface)& S2, + const Handle(Adaptor3d_Curve)& CG) : BlendFunc_GenChamfer(S1,S2,CG), corde1(S1,CG),corde2(S2,CG) { diff --git a/src/BlendFunc/BlendFunc_Chamfer.hxx b/src/BlendFunc/BlendFunc_Chamfer.hxx index bce30b50ff..13a1701564 100644 --- a/src/BlendFunc/BlendFunc_Chamfer.hxx +++ b/src/BlendFunc/BlendFunc_Chamfer.hxx @@ -17,15 +17,9 @@ #ifndef _BlendFunc_Chamfer_HeaderFile #define _BlendFunc_Chamfer_HeaderFile -#include -#include -#include - -#include -#include +#include #include #include -#include #include #include #include @@ -34,8 +28,7 @@ #include #include #include -class Adaptor3d_HSurface; -class Adaptor3d_HCurve; + class math_Matrix; class gp_Pnt; class gp_Vec; @@ -43,8 +36,6 @@ class gp_Vec2d; class gp_Lin; class Blend_Point; - - //! Class for a function used to compute a "ordinary" chamfer: //! when distances from spine to surfaces are constant class BlendFunc_Chamfer : public BlendFunc_GenChamfer @@ -54,7 +45,7 @@ public: DEFINE_STANDARD_ALLOC - Standard_EXPORT BlendFunc_Chamfer(const Handle(Adaptor3d_HSurface)& S1, const Handle(Adaptor3d_HSurface)& S2, const Handle(Adaptor3d_HCurve)& CG); + Standard_EXPORT BlendFunc_Chamfer(const Handle(Adaptor3d_Surface)& S1, const Handle(Adaptor3d_Surface)& S2, const Handle(Adaptor3d_Curve)& CG); //! computes the values of the Functions for the //! variable . diff --git a/src/BlendFunc/BlendFunc_ConstRad.cxx b/src/BlendFunc/BlendFunc_ConstRad.cxx index c58cf723ed..d5cfef6406 100644 --- a/src/BlendFunc/BlendFunc_ConstRad.cxx +++ b/src/BlendFunc/BlendFunc_ConstRad.cxx @@ -18,8 +18,8 @@ // Optimisation, use of GetCircle // Modified 20/02/1998 PMN Singular surfaces management -#include -#include +#include +#include #include #include #include @@ -47,9 +47,9 @@ //purpose : //======================================================================= -BlendFunc_ConstRad::BlendFunc_ConstRad(const Handle(Adaptor3d_HSurface)& S1, - const Handle(Adaptor3d_HSurface)& S2, - const Handle(Adaptor3d_HCurve)& C) +BlendFunc_ConstRad::BlendFunc_ConstRad(const Handle(Adaptor3d_Surface)& S1, + const Handle(Adaptor3d_Surface)& S2, + const Handle(Adaptor3d_Curve)& C) : surf1(S1),surf2(S2), curv(C), tcurv(C), diff --git a/src/BlendFunc/BlendFunc_ConstRad.hxx b/src/BlendFunc/BlendFunc_ConstRad.hxx index 314535a077..d374daa1c0 100644 --- a/src/BlendFunc/BlendFunc_ConstRad.hxx +++ b/src/BlendFunc/BlendFunc_ConstRad.hxx @@ -17,16 +17,10 @@ #ifndef _BlendFunc_ConstRad_HeaderFile #define _BlendFunc_ConstRad_HeaderFile -#include -#include -#include - +#include #include -#include #include #include -#include -#include #include #include #include @@ -40,18 +34,12 @@ #include #include #include -class Adaptor3d_HSurface; -class Adaptor3d_HCurve; + class math_Matrix; -class gp_Pnt; -class gp_Vec; -class gp_Vec2d; class gp_Circ; class Blend_Point; class gp_Ax1; - - class BlendFunc_ConstRad : public Blend_Function { public: @@ -59,7 +47,7 @@ public: DEFINE_STANDARD_ALLOC - Standard_EXPORT BlendFunc_ConstRad(const Handle(Adaptor3d_HSurface)& S1, const Handle(Adaptor3d_HSurface)& S2, const Handle(Adaptor3d_HCurve)& C); + Standard_EXPORT BlendFunc_ConstRad(const Handle(Adaptor3d_Surface)& S1, const Handle(Adaptor3d_Surface)& S2, const Handle(Adaptor3d_Curve)& C); //! returns the number of equations of the function. Standard_EXPORT Standard_Integer NbEquations() const Standard_OVERRIDE; @@ -191,10 +179,10 @@ private: Standard_EXPORT Standard_Boolean ComputeValues (const math_Vector& X, const Standard_Integer Order, const Standard_Boolean ByParam = Standard_False, const Standard_Real Param = 0); - Handle(Adaptor3d_HSurface) surf1; - Handle(Adaptor3d_HSurface) surf2; - Handle(Adaptor3d_HCurve) curv; - Handle(Adaptor3d_HCurve) tcurv; + Handle(Adaptor3d_Surface) surf1; + Handle(Adaptor3d_Surface) surf2; + Handle(Adaptor3d_Curve) curv; + Handle(Adaptor3d_Curve) tcurv; gp_Pnt pts1; gp_Pnt pts2; Standard_Boolean istangent; diff --git a/src/BlendFunc/BlendFunc_ConstRadInv.cxx b/src/BlendFunc/BlendFunc_ConstRadInv.cxx index 41df2e9831..eb1c15eb68 100644 --- a/src/BlendFunc/BlendFunc_ConstRadInv.cxx +++ b/src/BlendFunc/BlendFunc_ConstRadInv.cxx @@ -15,9 +15,9 @@ // commercial license or contractual agreement. -#include -#include -#include +#include +#include +#include #include #include #include @@ -26,9 +26,9 @@ #define Eps 1.e-15 -BlendFunc_ConstRadInv::BlendFunc_ConstRadInv(const Handle(Adaptor3d_HSurface)& S1, - const Handle(Adaptor3d_HSurface)& S2, - const Handle(Adaptor3d_HCurve)& C) +BlendFunc_ConstRadInv::BlendFunc_ConstRadInv(const Handle(Adaptor3d_Surface)& S1, + const Handle(Adaptor3d_Surface)& S2, + const Handle(Adaptor3d_Curve)& C) : surf1(S1), surf2(S2), curv(C), @@ -79,7 +79,7 @@ void BlendFunc_ConstRadInv::Set(const Standard_Real R, } void BlendFunc_ConstRadInv::Set(const Standard_Boolean OnFirst, - const Handle(Adaptor2d_HCurve2d)& C) + const Handle(Adaptor2d_Curve2d)& C) { first = OnFirst; csurf = C; diff --git a/src/BlendFunc/BlendFunc_ConstRadInv.hxx b/src/BlendFunc/BlendFunc_ConstRadInv.hxx index 3fec90efe8..1b143d2061 100644 --- a/src/BlendFunc/BlendFunc_ConstRadInv.hxx +++ b/src/BlendFunc/BlendFunc_ConstRadInv.hxx @@ -17,22 +17,12 @@ #ifndef _BlendFunc_ConstRadInv_HeaderFile #define _BlendFunc_ConstRadInv_HeaderFile -#include -#include -#include - -#include -#include -#include +#include #include #include -class Adaptor3d_HSurface; -class Adaptor3d_HCurve; -class Adaptor2d_HCurve2d; + class math_Matrix; - - class BlendFunc_ConstRadInv : public Blend_FuncInv { public: @@ -40,9 +30,9 @@ public: DEFINE_STANDARD_ALLOC - Standard_EXPORT BlendFunc_ConstRadInv(const Handle(Adaptor3d_HSurface)& S1, const Handle(Adaptor3d_HSurface)& S2, const Handle(Adaptor3d_HCurve)& C); + Standard_EXPORT BlendFunc_ConstRadInv(const Handle(Adaptor3d_Surface)& S1, const Handle(Adaptor3d_Surface)& S2, const Handle(Adaptor3d_Curve)& C); - Standard_EXPORT void Set (const Standard_Boolean OnFirst, const Handle(Adaptor2d_HCurve2d)& COnSurf) Standard_OVERRIDE; + Standard_EXPORT void Set (const Standard_Boolean OnFirst, const Handle(Adaptor2d_Curve2d)& COnSurf) Standard_OVERRIDE; Standard_EXPORT void GetTolerance (math_Vector& Tolerance, const Standard_Real Tol) const Standard_OVERRIDE; @@ -86,10 +76,10 @@ private: - Handle(Adaptor3d_HSurface) surf1; - Handle(Adaptor3d_HSurface) surf2; - Handle(Adaptor3d_HCurve) curv; - Handle(Adaptor2d_HCurve2d) csurf; + Handle(Adaptor3d_Surface) surf1; + Handle(Adaptor3d_Surface) surf2; + Handle(Adaptor3d_Curve) curv; + Handle(Adaptor2d_Curve2d) csurf; Standard_Real ray1; Standard_Real ray2; Standard_Integer choix; diff --git a/src/BlendFunc/BlendFunc_ConstThroat.cxx b/src/BlendFunc/BlendFunc_ConstThroat.cxx index f81925dc0a..3300f17951 100644 --- a/src/BlendFunc/BlendFunc_ConstThroat.cxx +++ b/src/BlendFunc/BlendFunc_ConstThroat.cxx @@ -12,8 +12,8 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#include -#include +#include +#include #include #include #include @@ -35,9 +35,9 @@ //purpose : //======================================================================= -BlendFunc_ConstThroat::BlendFunc_ConstThroat(const Handle(Adaptor3d_HSurface)& S1, - const Handle(Adaptor3d_HSurface)& S2, - const Handle(Adaptor3d_HCurve)& C) +BlendFunc_ConstThroat::BlendFunc_ConstThroat(const Handle(Adaptor3d_Surface)& S1, + const Handle(Adaptor3d_Surface)& S2, + const Handle(Adaptor3d_Curve)& C) : BlendFunc_GenChamfer(S1,S2,C), istangent(Standard_False), param(0.0), diff --git a/src/BlendFunc/BlendFunc_ConstThroat.hxx b/src/BlendFunc/BlendFunc_ConstThroat.hxx index 18c9eaefc6..2a278df399 100644 --- a/src/BlendFunc/BlendFunc_ConstThroat.hxx +++ b/src/BlendFunc/BlendFunc_ConstThroat.hxx @@ -15,14 +15,8 @@ #ifndef _BlendFunc_ConstThroat_HeaderFile #define _BlendFunc_ConstThroat_HeaderFile -#include -#include -#include - -#include -#include +#include #include -#include #include #include #include @@ -31,16 +25,11 @@ #include #include #include -class Adaptor3d_HSurface; -class Adaptor3d_HCurve; + class math_Matrix; -class gp_Pnt; -class gp_Vec; -class gp_Vec2d; class gp_Lin; class Blend_Point; - //! Class for a function used to compute a symmetric chamfer //! with constant throat that is the height of isosceles triangle in section class BlendFunc_ConstThroat : public BlendFunc_GenChamfer @@ -50,9 +39,9 @@ public: DEFINE_STANDARD_ALLOC - Standard_EXPORT BlendFunc_ConstThroat(const Handle(Adaptor3d_HSurface)& S1, - const Handle(Adaptor3d_HSurface)& S2, - const Handle(Adaptor3d_HCurve)& C); + Standard_EXPORT BlendFunc_ConstThroat(const Handle(Adaptor3d_Surface)& S1, + const Handle(Adaptor3d_Surface)& S2, + const Handle(Adaptor3d_Curve)& C); //! computes the values of the Functions for the diff --git a/src/BlendFunc/BlendFunc_ConstThroatInv.cxx b/src/BlendFunc/BlendFunc_ConstThroatInv.cxx index 73a5b2d3e7..00458a028c 100644 --- a/src/BlendFunc/BlendFunc_ConstThroatInv.cxx +++ b/src/BlendFunc/BlendFunc_ConstThroatInv.cxx @@ -13,9 +13,9 @@ // commercial license or contractual agreement. -#include -#include -#include +#include +#include +#include #include #include #include @@ -26,9 +26,9 @@ //purpose : //======================================================================= -BlendFunc_ConstThroatInv::BlendFunc_ConstThroatInv(const Handle(Adaptor3d_HSurface)& S1, - const Handle(Adaptor3d_HSurface)& S2, - const Handle(Adaptor3d_HCurve)& C) +BlendFunc_ConstThroatInv::BlendFunc_ConstThroatInv(const Handle(Adaptor3d_Surface)& S1, + const Handle(Adaptor3d_Surface)& S2, + const Handle(Adaptor3d_Curve)& C) : BlendFunc_GenChamfInv(S1,S2,C), Throat(0.0), param(0.0), diff --git a/src/BlendFunc/BlendFunc_ConstThroatInv.hxx b/src/BlendFunc/BlendFunc_ConstThroatInv.hxx index 9837a4a3c5..f9523c07c9 100644 --- a/src/BlendFunc/BlendFunc_ConstThroatInv.hxx +++ b/src/BlendFunc/BlendFunc_ConstThroatInv.hxx @@ -15,22 +15,12 @@ #ifndef _BlendFunc_ConstThroatInv_HeaderFile #define _BlendFunc_ConstThroatInv_HeaderFile -#include -#include -#include - -#include -#include +#include #include #include -#include -class Adaptor3d_HSurface; -class Adaptor3d_HCurve; -class Adaptor2d_HCurve2d; + class math_Matrix; - - //! Class for a function used to compute a ConstThroat chamfer on a surface's boundary class BlendFunc_ConstThroatInv : public BlendFunc_GenChamfInv { @@ -39,7 +29,7 @@ public: DEFINE_STANDARD_ALLOC - Standard_EXPORT BlendFunc_ConstThroatInv(const Handle(Adaptor3d_HSurface)& S1, const Handle(Adaptor3d_HSurface)& S2, const Handle(Adaptor3d_HCurve)& C); + Standard_EXPORT BlendFunc_ConstThroatInv(const Handle(Adaptor3d_Surface)& S1, const Handle(Adaptor3d_Surface)& S2, const Handle(Adaptor3d_Curve)& C); Standard_EXPORT Standard_Boolean IsSolution (const math_Vector& Sol, const Standard_Real Tol) Standard_OVERRIDE; diff --git a/src/BlendFunc/BlendFunc_ConstThroatWithPenetration.cxx b/src/BlendFunc/BlendFunc_ConstThroatWithPenetration.cxx index 105df68471..67ab7531c4 100644 --- a/src/BlendFunc/BlendFunc_ConstThroatWithPenetration.cxx +++ b/src/BlendFunc/BlendFunc_ConstThroatWithPenetration.cxx @@ -12,8 +12,8 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#include -#include +#include +#include #include #include #include @@ -36,9 +36,9 @@ //======================================================================= BlendFunc_ConstThroatWithPenetration:: -BlendFunc_ConstThroatWithPenetration(const Handle(Adaptor3d_HSurface)& S1, - const Handle(Adaptor3d_HSurface)& S2, - const Handle(Adaptor3d_HCurve)& C) +BlendFunc_ConstThroatWithPenetration(const Handle(Adaptor3d_Surface)& S1, + const Handle(Adaptor3d_Surface)& S2, + const Handle(Adaptor3d_Curve)& C) : BlendFunc_ConstThroat(S1,S2,C) { } diff --git a/src/BlendFunc/BlendFunc_ConstThroatWithPenetration.hxx b/src/BlendFunc/BlendFunc_ConstThroatWithPenetration.hxx index 90f9e2fad5..be3ef783cb 100644 --- a/src/BlendFunc/BlendFunc_ConstThroatWithPenetration.hxx +++ b/src/BlendFunc/BlendFunc_ConstThroatWithPenetration.hxx @@ -15,14 +15,8 @@ #ifndef _BlendFunc_ConstThroatWithPenetration_HeaderFile #define _BlendFunc_ConstThroatWithPenetration_HeaderFile -#include -#include -#include - -#include -#include +#include #include -#include #include #include #include @@ -31,16 +25,11 @@ #include #include #include -class Adaptor3d_HSurface; -class Adaptor3d_HCurve; + class math_Matrix; -class gp_Pnt; -class gp_Vec; -class gp_Vec2d; class gp_Lin; class Blend_Point; - //! Class for a function used to compute a chamfer with constant throat: //! the section of chamfer is right-angled triangle, //! the first of two surfaces (where is the top of the chamfer) @@ -55,9 +44,9 @@ public: DEFINE_STANDARD_ALLOC - Standard_EXPORT BlendFunc_ConstThroatWithPenetration(const Handle(Adaptor3d_HSurface)& S1, - const Handle(Adaptor3d_HSurface)& S2, - const Handle(Adaptor3d_HCurve)& C); + Standard_EXPORT BlendFunc_ConstThroatWithPenetration(const Handle(Adaptor3d_Surface)& S1, + const Handle(Adaptor3d_Surface)& S2, + const Handle(Adaptor3d_Curve)& C); //! computes the values of the Functions for the diff --git a/src/BlendFunc/BlendFunc_ConstThroatWithPenetrationInv.cxx b/src/BlendFunc/BlendFunc_ConstThroatWithPenetrationInv.cxx index 28e854ef7d..28865578f0 100644 --- a/src/BlendFunc/BlendFunc_ConstThroatWithPenetrationInv.cxx +++ b/src/BlendFunc/BlendFunc_ConstThroatWithPenetrationInv.cxx @@ -13,9 +13,9 @@ // commercial license or contractual agreement. -#include -#include -#include +#include +#include +#include #include #include #include @@ -27,9 +27,9 @@ //======================================================================= BlendFunc_ConstThroatWithPenetrationInv:: -BlendFunc_ConstThroatWithPenetrationInv(const Handle(Adaptor3d_HSurface)& S1, - const Handle(Adaptor3d_HSurface)& S2, - const Handle(Adaptor3d_HCurve)& C) +BlendFunc_ConstThroatWithPenetrationInv(const Handle(Adaptor3d_Surface)& S1, + const Handle(Adaptor3d_Surface)& S2, + const Handle(Adaptor3d_Curve)& C) : BlendFunc_ConstThroatInv(S1,S2,C) { } diff --git a/src/BlendFunc/BlendFunc_ConstThroatWithPenetrationInv.hxx b/src/BlendFunc/BlendFunc_ConstThroatWithPenetrationInv.hxx index a11c9cf5fc..066d02d584 100644 --- a/src/BlendFunc/BlendFunc_ConstThroatWithPenetrationInv.hxx +++ b/src/BlendFunc/BlendFunc_ConstThroatWithPenetrationInv.hxx @@ -15,22 +15,12 @@ #ifndef _BlendFunc_ConstThroatWithPenetrationInv_HeaderFile #define _BlendFunc_ConstThroatWithPenetrationInv_HeaderFile -#include -#include -#include - -#include -#include +#include #include #include -#include -class Adaptor3d_HSurface; -class Adaptor3d_HCurve; -class Adaptor2d_HCurve2d; + class math_Matrix; - - //! Class for a function used to compute a ConstThroatWithPenetration chamfer //! on a surface's boundary class BlendFunc_ConstThroatWithPenetrationInv : public BlendFunc_ConstThroatInv @@ -40,9 +30,9 @@ public: DEFINE_STANDARD_ALLOC - Standard_EXPORT BlendFunc_ConstThroatWithPenetrationInv(const Handle(Adaptor3d_HSurface)& S1, - const Handle(Adaptor3d_HSurface)& S2, - const Handle(Adaptor3d_HCurve)& C); + Standard_EXPORT BlendFunc_ConstThroatWithPenetrationInv(const Handle(Adaptor3d_Surface)& S1, + const Handle(Adaptor3d_Surface)& S2, + const Handle(Adaptor3d_Curve)& C); Standard_EXPORT Standard_Boolean IsSolution (const math_Vector& Sol, const Standard_Real Tol) Standard_OVERRIDE; diff --git a/src/BlendFunc/BlendFunc_Corde.cxx b/src/BlendFunc/BlendFunc_Corde.cxx index 7a7216bd2a..d423b3f41c 100644 --- a/src/BlendFunc/BlendFunc_Corde.cxx +++ b/src/BlendFunc/BlendFunc_Corde.cxx @@ -15,8 +15,8 @@ // commercial license or contractual agreement. -#include -#include +#include +#include #include #include #include @@ -33,8 +33,8 @@ //function : BlendFunc_Corde //purpose : //======================================================================= -BlendFunc_Corde::BlendFunc_Corde(const Handle(Adaptor3d_HSurface)& S, - const Handle(Adaptor3d_HCurve)& CG) +BlendFunc_Corde::BlendFunc_Corde(const Handle(Adaptor3d_Surface)& S, + const Handle(Adaptor3d_Curve)& CG) : surf(S), guide(CG), dis(0.0), diff --git a/src/BlendFunc/BlendFunc_Corde.hxx b/src/BlendFunc/BlendFunc_Corde.hxx index 95aaafbb28..6a9c2766f0 100644 --- a/src/BlendFunc/BlendFunc_Corde.hxx +++ b/src/BlendFunc/BlendFunc_Corde.hxx @@ -17,25 +17,14 @@ #ifndef _BlendFunc_Corde_HeaderFile #define _BlendFunc_Corde_HeaderFile -#include -#include -#include - +#include #include #include -#include #include #include -#include #include -class Adaptor3d_HSurface; -class Adaptor3d_HCurve; -class Standard_DomainError; -class math_Matrix; -class gp_Pnt; -class gp_Vec; -class gp_Vec2d; +class math_Matrix; //! This function calculates point (pts) on the curve of //! intersection between the normal to a curve (guide) @@ -49,7 +38,7 @@ public: DEFINE_STANDARD_ALLOC - Standard_EXPORT BlendFunc_Corde(const Handle(Adaptor3d_HSurface)& S, const Handle(Adaptor3d_HCurve)& CGuide); + Standard_EXPORT BlendFunc_Corde(const Handle(Adaptor3d_Surface)& S, const Handle(Adaptor3d_Curve)& CGuide); Standard_EXPORT void SetParam (const Standard_Real Param); @@ -107,8 +96,8 @@ private: - Handle(Adaptor3d_HSurface) surf; - Handle(Adaptor3d_HCurve) guide; + Handle(Adaptor3d_Surface) surf; + Handle(Adaptor3d_Curve) guide; gp_Pnt pts; gp_Pnt2d pt2d; Standard_Real dis; diff --git a/src/BlendFunc/BlendFunc_EvolRad.cxx b/src/BlendFunc/BlendFunc_EvolRad.cxx index 1cdd0fef7c..de4ec608a2 100644 --- a/src/BlendFunc/BlendFunc_EvolRad.cxx +++ b/src/BlendFunc/BlendFunc_EvolRad.cxx @@ -15,8 +15,8 @@ // commercial license or contractual agreement. -#include -#include +#include +#include #include #include #include @@ -102,9 +102,9 @@ static void FusionneIntervalles(const TColStd_Array1OfReal& I1, //purpose : //======================================================================= -BlendFunc_EvolRad::BlendFunc_EvolRad(const Handle(Adaptor3d_HSurface)& S1, - const Handle(Adaptor3d_HSurface)& S2, - const Handle(Adaptor3d_HCurve)& C, +BlendFunc_EvolRad::BlendFunc_EvolRad(const Handle(Adaptor3d_Surface)& S1, + const Handle(Adaptor3d_Surface)& S2, + const Handle(Adaptor3d_Curve)& C, const Handle(Law_Function)& Law) : surf1(S1),surf2(S2), diff --git a/src/BlendFunc/BlendFunc_EvolRad.hxx b/src/BlendFunc/BlendFunc_EvolRad.hxx index d4b72321fc..c632bf7e76 100644 --- a/src/BlendFunc/BlendFunc_EvolRad.hxx +++ b/src/BlendFunc/BlendFunc_EvolRad.hxx @@ -17,16 +17,10 @@ #ifndef _BlendFunc_EvolRad_HeaderFile #define _BlendFunc_EvolRad_HeaderFile -#include -#include -#include - +#include #include -#include #include #include -#include -#include #include #include #include @@ -40,18 +34,12 @@ #include #include #include -class Adaptor3d_HSurface; -class Adaptor3d_HCurve; + class Law_Function; class math_Matrix; -class gp_Pnt; -class gp_Vec; -class gp_Vec2d; class gp_Circ; class Blend_Point; - - class BlendFunc_EvolRad : public Blend_Function { public: @@ -59,7 +47,7 @@ public: DEFINE_STANDARD_ALLOC - Standard_EXPORT BlendFunc_EvolRad(const Handle(Adaptor3d_HSurface)& S1, const Handle(Adaptor3d_HSurface)& S2, const Handle(Adaptor3d_HCurve)& C, const Handle(Law_Function)& Law); + Standard_EXPORT BlendFunc_EvolRad(const Handle(Adaptor3d_Surface)& S1, const Handle(Adaptor3d_Surface)& S2, const Handle(Adaptor3d_Curve)& C, const Handle(Law_Function)& Law); //! returns the number of equations of the function. Standard_EXPORT Standard_Integer NbEquations() const Standard_OVERRIDE; @@ -188,10 +176,10 @@ private: Standard_EXPORT Standard_Boolean ComputeValues (const math_Vector& X, const Standard_Integer Order, const Standard_Boolean ByParam = Standard_False, const Standard_Real Param = 0); - Handle(Adaptor3d_HSurface) surf1; - Handle(Adaptor3d_HSurface) surf2; - Handle(Adaptor3d_HCurve) curv; - Handle(Adaptor3d_HCurve) tcurv; + Handle(Adaptor3d_Surface) surf1; + Handle(Adaptor3d_Surface) surf2; + Handle(Adaptor3d_Curve) curv; + Handle(Adaptor3d_Curve) tcurv; Handle(Law_Function) fevol; Handle(Law_Function) tevol; gp_Pnt pts1; diff --git a/src/BlendFunc/BlendFunc_EvolRadInv.cxx b/src/BlendFunc/BlendFunc_EvolRadInv.cxx index 9c25e0ecc4..4bbe7d009a 100644 --- a/src/BlendFunc/BlendFunc_EvolRadInv.cxx +++ b/src/BlendFunc/BlendFunc_EvolRadInv.cxx @@ -15,9 +15,9 @@ // commercial license or contractual agreement. -#include -#include -#include +#include +#include +#include #include #include #include @@ -27,9 +27,9 @@ #define Eps 1.e-15 -BlendFunc_EvolRadInv::BlendFunc_EvolRadInv(const Handle(Adaptor3d_HSurface)& S1, - const Handle(Adaptor3d_HSurface)& S2, - const Handle(Adaptor3d_HCurve)& C, +BlendFunc_EvolRadInv::BlendFunc_EvolRadInv(const Handle(Adaptor3d_Surface)& S1, + const Handle(Adaptor3d_Surface)& S2, + const Handle(Adaptor3d_Curve)& C, const Handle(Law_Function)& Law) : surf1(S1),surf2(S2),curv(C) { @@ -75,7 +75,7 @@ void BlendFunc_EvolRadInv::Set(const Standard_Integer Choix) } void BlendFunc_EvolRadInv::Set(const Standard_Boolean OnFirst, - const Handle(Adaptor2d_HCurve2d)& C) + const Handle(Adaptor2d_Curve2d)& C) { first = OnFirst; csurf = C; diff --git a/src/BlendFunc/BlendFunc_EvolRadInv.hxx b/src/BlendFunc/BlendFunc_EvolRadInv.hxx index f4f6e25d1c..0bf11f56d6 100644 --- a/src/BlendFunc/BlendFunc_EvolRadInv.hxx +++ b/src/BlendFunc/BlendFunc_EvolRadInv.hxx @@ -17,23 +17,13 @@ #ifndef _BlendFunc_EvolRadInv_HeaderFile #define _BlendFunc_EvolRadInv_HeaderFile -#include -#include -#include - -#include -#include -#include +#include #include #include -class Adaptor3d_HSurface; -class Adaptor3d_HCurve; -class Adaptor2d_HCurve2d; + class Law_Function; class math_Matrix; - - class BlendFunc_EvolRadInv : public Blend_FuncInv { public: @@ -41,9 +31,9 @@ public: DEFINE_STANDARD_ALLOC - Standard_EXPORT BlendFunc_EvolRadInv(const Handle(Adaptor3d_HSurface)& S1, const Handle(Adaptor3d_HSurface)& S2, const Handle(Adaptor3d_HCurve)& C, const Handle(Law_Function)& Law); + Standard_EXPORT BlendFunc_EvolRadInv(const Handle(Adaptor3d_Surface)& S1, const Handle(Adaptor3d_Surface)& S2, const Handle(Adaptor3d_Curve)& C, const Handle(Law_Function)& Law); - Standard_EXPORT void Set (const Standard_Boolean OnFirst, const Handle(Adaptor2d_HCurve2d)& COnSurf); + Standard_EXPORT void Set (const Standard_Boolean OnFirst, const Handle(Adaptor2d_Curve2d)& COnSurf); Standard_EXPORT void GetTolerance (math_Vector& Tolerance, const Standard_Real Tol) const; @@ -87,10 +77,10 @@ private: - Handle(Adaptor3d_HSurface) surf1; - Handle(Adaptor3d_HSurface) surf2; - Handle(Adaptor3d_HCurve) curv; - Handle(Adaptor2d_HCurve2d) csurf; + Handle(Adaptor3d_Surface) surf1; + Handle(Adaptor3d_Surface) surf2; + Handle(Adaptor3d_Curve) curv; + Handle(Adaptor2d_Curve2d) csurf; Handle(Law_Function) fevol; Standard_Real sg1; Standard_Real sg2; diff --git a/src/BlendFunc/BlendFunc_GenChamfInv.cxx b/src/BlendFunc/BlendFunc_GenChamfInv.cxx index 1dc057abd1..7ddfe41456 100644 --- a/src/BlendFunc/BlendFunc_GenChamfInv.cxx +++ b/src/BlendFunc/BlendFunc_GenChamfInv.cxx @@ -13,9 +13,9 @@ // commercial license or contractual agreement. -#include -#include -#include +#include +#include +#include #include #include #include @@ -26,9 +26,9 @@ //function : BlendFunc_GenChamfInv //purpose : //======================================================================= -BlendFunc_GenChamfInv::BlendFunc_GenChamfInv(const Handle(Adaptor3d_HSurface)& S1, - const Handle(Adaptor3d_HSurface)& S2, - const Handle(Adaptor3d_HCurve)& C) +BlendFunc_GenChamfInv::BlendFunc_GenChamfInv(const Handle(Adaptor3d_Surface)& S1, + const Handle(Adaptor3d_Surface)& S2, + const Handle(Adaptor3d_Curve)& C) : surf1(S1), surf2(S2), curv(C), @@ -52,7 +52,7 @@ Standard_Integer BlendFunc_GenChamfInv::NbEquations () const //purpose : //======================================================================= -void BlendFunc_GenChamfInv::Set(const Standard_Boolean OnFirst, const Handle(Adaptor2d_HCurve2d)& C) +void BlendFunc_GenChamfInv::Set(const Standard_Boolean OnFirst, const Handle(Adaptor2d_Curve2d)& C) { first = OnFirst; csurf = C; diff --git a/src/BlendFunc/BlendFunc_GenChamfInv.hxx b/src/BlendFunc/BlendFunc_GenChamfInv.hxx index 2d0ada5f93..f7a5842794 100644 --- a/src/BlendFunc/BlendFunc_GenChamfInv.hxx +++ b/src/BlendFunc/BlendFunc_GenChamfInv.hxx @@ -15,23 +15,13 @@ #ifndef _BlendFunc_GenChamfInv_HeaderFile #define _BlendFunc_GenChamfInv_HeaderFile -#include -#include -#include - -#include -#include +#include #include #include #include -#include -class Adaptor3d_HSurface; -class Adaptor3d_HCurve; -class Adaptor2d_HCurve2d; + class math_Matrix; - - //! Deferred class for a function used to compute a general chamfer on a surface's boundary class BlendFunc_GenChamfInv : public Blend_FuncInv { @@ -39,12 +29,12 @@ public: DEFINE_STANDARD_ALLOC - Standard_EXPORT BlendFunc_GenChamfInv(const Handle(Adaptor3d_HSurface)& S1, - const Handle(Adaptor3d_HSurface)& S2, - const Handle(Adaptor3d_HCurve)& C); + Standard_EXPORT BlendFunc_GenChamfInv(const Handle(Adaptor3d_Surface)& S1, + const Handle(Adaptor3d_Surface)& S2, + const Handle(Adaptor3d_Curve)& C); Standard_EXPORT virtual void Set (const Standard_Boolean OnFirst, - const Handle(Adaptor2d_HCurve2d)& COnSurf) Standard_OVERRIDE; + const Handle(Adaptor2d_Curve2d)& COnSurf) Standard_OVERRIDE; Standard_EXPORT void GetTolerance (math_Vector& Tolerance, const Standard_Real Tol) const Standard_OVERRIDE; @@ -72,10 +62,10 @@ public: protected: - Handle(Adaptor3d_HSurface) surf1; - Handle(Adaptor3d_HSurface) surf2; - Handle(Adaptor3d_HCurve) curv; - Handle(Adaptor2d_HCurve2d) csurf; + Handle(Adaptor3d_Surface) surf1; + Handle(Adaptor3d_Surface) surf2; + Handle(Adaptor3d_Curve) curv; + Handle(Adaptor2d_Curve2d) csurf; Standard_Integer choix; Standard_Boolean first; diff --git a/src/BlendFunc/BlendFunc_GenChamfer.cxx b/src/BlendFunc/BlendFunc_GenChamfer.cxx index e3d571da9e..3280009a97 100644 --- a/src/BlendFunc/BlendFunc_GenChamfer.cxx +++ b/src/BlendFunc/BlendFunc_GenChamfer.cxx @@ -12,8 +12,8 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#include -#include +#include +#include #include #include #include @@ -31,9 +31,9 @@ //function : BlendFunc_GenChamfer //purpose : //======================================================================= -BlendFunc_GenChamfer::BlendFunc_GenChamfer(const Handle(Adaptor3d_HSurface)& S1, - const Handle(Adaptor3d_HSurface)& S2, - const Handle(Adaptor3d_HCurve)& CG) +BlendFunc_GenChamfer::BlendFunc_GenChamfer(const Handle(Adaptor3d_Surface)& S1, + const Handle(Adaptor3d_Surface)& S2, + const Handle(Adaptor3d_Curve)& CG) : surf1(S1), surf2(S2), curv(CG), diff --git a/src/BlendFunc/BlendFunc_GenChamfer.hxx b/src/BlendFunc/BlendFunc_GenChamfer.hxx index 250ca161b1..e7534c5518 100644 --- a/src/BlendFunc/BlendFunc_GenChamfer.hxx +++ b/src/BlendFunc/BlendFunc_GenChamfer.hxx @@ -15,15 +15,9 @@ #ifndef _BlendFunc_GenChamfer_HeaderFile #define _BlendFunc_GenChamfer_HeaderFile -#include -#include -#include - -#include -#include +#include #include #include -#include #include #include #include @@ -32,17 +26,11 @@ #include #include #include -class Adaptor3d_HSurface; -class Adaptor3d_HCurve; + class math_Matrix; -class gp_Pnt; -class gp_Vec; -class gp_Vec2d; class gp_Lin; class Blend_Point; - - //! Deferred class for a function used to compute a general chamfer class BlendFunc_GenChamfer : public Blend_Function { @@ -50,9 +38,9 @@ public: DEFINE_STANDARD_ALLOC - Standard_EXPORT BlendFunc_GenChamfer(const Handle(Adaptor3d_HSurface)& S1, - const Handle(Adaptor3d_HSurface)& S2, - const Handle(Adaptor3d_HCurve)& CG); + Standard_EXPORT BlendFunc_GenChamfer(const Handle(Adaptor3d_Surface)& S1, + const Handle(Adaptor3d_Surface)& S2, + const Handle(Adaptor3d_Curve)& CG); //! returns the number of equations of the function. Standard_EXPORT Standard_Integer NbEquations() const Standard_OVERRIDE; @@ -178,9 +166,9 @@ public: protected: - Handle(Adaptor3d_HSurface) surf1; - Handle(Adaptor3d_HSurface) surf2; - Handle(Adaptor3d_HCurve) curv; + Handle(Adaptor3d_Surface) surf1; + Handle(Adaptor3d_Surface) surf2; + Handle(Adaptor3d_Curve) curv; Standard_Integer choix; Standard_Real tol; Standard_Real distmin; diff --git a/src/BlendFunc/BlendFunc_Ruled.cxx b/src/BlendFunc/BlendFunc_Ruled.cxx index 70cb80ec52..e16ba980b5 100644 --- a/src/BlendFunc/BlendFunc_Ruled.cxx +++ b/src/BlendFunc/BlendFunc_Ruled.cxx @@ -15,8 +15,8 @@ // commercial license or contractual agreement. -#include -#include +#include +#include #include #include #include @@ -31,9 +31,9 @@ #include #include -BlendFunc_Ruled::BlendFunc_Ruled(const Handle(Adaptor3d_HSurface)& S1, - const Handle(Adaptor3d_HSurface)& S2, - const Handle(Adaptor3d_HCurve)& C) : +BlendFunc_Ruled::BlendFunc_Ruled(const Handle(Adaptor3d_Surface)& S1, + const Handle(Adaptor3d_Surface)& S2, + const Handle(Adaptor3d_Curve)& C) : surf1(S1),surf2(S2),curv(C), istangent(Standard_True), diff --git a/src/BlendFunc/BlendFunc_Ruled.hxx b/src/BlendFunc/BlendFunc_Ruled.hxx index 2f0d39b241..b0e8d56356 100644 --- a/src/BlendFunc/BlendFunc_Ruled.hxx +++ b/src/BlendFunc/BlendFunc_Ruled.hxx @@ -17,17 +17,11 @@ #ifndef _BlendFunc_Ruled_HeaderFile #define _BlendFunc_Ruled_HeaderFile -#include -#include -#include - +#include #include -#include #include #include -#include #include -#include #include #include #include @@ -36,17 +30,11 @@ #include #include #include -class Adaptor3d_HSurface; -class Adaptor3d_HCurve; + class math_Matrix; -class gp_Pnt; -class gp_Vec; -class gp_Vec2d; class Blend_Point; class gp_Ax1; - - class BlendFunc_Ruled : public Blend_Function { public: @@ -54,7 +42,7 @@ public: DEFINE_STANDARD_ALLOC - Standard_EXPORT BlendFunc_Ruled(const Handle(Adaptor3d_HSurface)& S1, const Handle(Adaptor3d_HSurface)& S2, const Handle(Adaptor3d_HCurve)& C); + Standard_EXPORT BlendFunc_Ruled(const Handle(Adaptor3d_Surface)& S1, const Handle(Adaptor3d_Surface)& S2, const Handle(Adaptor3d_Curve)& C); //! returns the number of equations of the function. Standard_EXPORT Standard_Integer NbEquations() const Standard_OVERRIDE; @@ -174,9 +162,9 @@ private: - Handle(Adaptor3d_HSurface) surf1; - Handle(Adaptor3d_HSurface) surf2; - Handle(Adaptor3d_HCurve) curv; + Handle(Adaptor3d_Surface) surf1; + Handle(Adaptor3d_Surface) surf2; + Handle(Adaptor3d_Curve) curv; gp_Pnt pts1; gp_Pnt pts2; Standard_Boolean istangent; diff --git a/src/BlendFunc/BlendFunc_RuledInv.cxx b/src/BlendFunc/BlendFunc_RuledInv.cxx index 5f83a451b3..a2a2486480 100644 --- a/src/BlendFunc/BlendFunc_RuledInv.cxx +++ b/src/BlendFunc/BlendFunc_RuledInv.cxx @@ -15,16 +15,16 @@ // commercial license or contractual agreement. -#include -#include -#include +#include +#include +#include #include #include #include -BlendFunc_RuledInv::BlendFunc_RuledInv(const Handle(Adaptor3d_HSurface)& S1, - const Handle(Adaptor3d_HSurface)& S2, - const Handle(Adaptor3d_HCurve)& C) +BlendFunc_RuledInv::BlendFunc_RuledInv(const Handle(Adaptor3d_Surface)& S1, + const Handle(Adaptor3d_Surface)& S2, + const Handle(Adaptor3d_Curve)& C) : surf1(S1), surf2(S2), curv(C), @@ -33,7 +33,7 @@ BlendFunc_RuledInv::BlendFunc_RuledInv(const Handle(Adaptor3d_HSurface)& S1, } void BlendFunc_RuledInv::Set(const Standard_Boolean OnFirst, - const Handle(Adaptor2d_HCurve2d)& C) + const Handle(Adaptor2d_Curve2d)& C) { first = OnFirst; csurf = C; diff --git a/src/BlendFunc/BlendFunc_RuledInv.hxx b/src/BlendFunc/BlendFunc_RuledInv.hxx index 68cd079eb4..3761cf66f0 100644 --- a/src/BlendFunc/BlendFunc_RuledInv.hxx +++ b/src/BlendFunc/BlendFunc_RuledInv.hxx @@ -17,22 +17,12 @@ #ifndef _BlendFunc_RuledInv_HeaderFile #define _BlendFunc_RuledInv_HeaderFile -#include -#include -#include - -#include +#include #include #include -#include -#include -class Adaptor3d_HSurface; -class Adaptor3d_HCurve; -class Adaptor2d_HCurve2d; + class math_Matrix; - - class BlendFunc_RuledInv : public Blend_FuncInv { public: @@ -40,9 +30,9 @@ public: DEFINE_STANDARD_ALLOC - Standard_EXPORT BlendFunc_RuledInv(const Handle(Adaptor3d_HSurface)& S1, const Handle(Adaptor3d_HSurface)& S2, const Handle(Adaptor3d_HCurve)& C); + Standard_EXPORT BlendFunc_RuledInv(const Handle(Adaptor3d_Surface)& S1, const Handle(Adaptor3d_Surface)& S2, const Handle(Adaptor3d_Curve)& C); - Standard_EXPORT void Set (const Standard_Boolean OnFirst, const Handle(Adaptor2d_HCurve2d)& COnSurf) Standard_OVERRIDE; + Standard_EXPORT void Set (const Standard_Boolean OnFirst, const Handle(Adaptor2d_Curve2d)& COnSurf) Standard_OVERRIDE; Standard_EXPORT void GetTolerance (math_Vector& Tolerance, const Standard_Real Tol) const Standard_OVERRIDE; @@ -84,10 +74,10 @@ private: - Handle(Adaptor3d_HSurface) surf1; - Handle(Adaptor3d_HSurface) surf2; - Handle(Adaptor3d_HCurve) curv; - Handle(Adaptor2d_HCurve2d) csurf; + Handle(Adaptor3d_Surface) surf1; + Handle(Adaptor3d_Surface) surf2; + Handle(Adaptor3d_Curve) curv; + Handle(Adaptor2d_Curve2d) csurf; Standard_Boolean first; diff --git a/src/BndLib/BndLib_AddSurface.cxx b/src/BndLib/BndLib_AddSurface.cxx index d55bddd3d6..15c18ea833 100644 --- a/src/BndLib/BndLib_AddSurface.cxx +++ b/src/BndLib/BndLib_AddSurface.cxx @@ -16,7 +16,7 @@ // Modified by skv - Fri Aug 27 12:29:04 2004 OCC6503 -#include +#include #include #include #include @@ -322,8 +322,8 @@ void BndLib_AddSurface::Add(const Adaptor3d_Surface& S, } case GeomAbs_OffsetSurface: { - Handle(Adaptor3d_HSurface) HS = S.BasisSurface(); - Add (HS->Surface(),UMin,UMax,VMin,VMax,Tol,B); + Handle(Adaptor3d_Surface) HS = S.BasisSurface(); + Add (*HS,UMin,UMax,VMin,VMax,Tol,B); B.Enlarge(S.OffsetValue()); B.Enlarge(Tol); break; diff --git a/src/ChFi3d/ChFi3d.cxx b/src/ChFi3d/ChFi3d.cxx index a557965e24..3397f9012d 100644 --- a/src/ChFi3d/ChFi3d.cxx +++ b/src/ChFi3d/ChFi3d.cxx @@ -31,7 +31,7 @@ #include #include #include -#include +#include #include #include #include @@ -174,8 +174,8 @@ Standard_Boolean ChFi3d::IsTangentFaces(const TopoDS_Edge& theEdge, // Computation of the number of samples on the edge. BRepAdaptor_Surface aBAS1(theFace1); BRepAdaptor_Surface aBAS2(theFace2); - Handle(BRepAdaptor_HSurface) aBAHS1 = new BRepAdaptor_HSurface(aBAS1); - Handle(BRepAdaptor_HSurface) aBAHS2 = new BRepAdaptor_HSurface(aBAS2); + Handle(BRepAdaptor_Surface) aBAHS1 = new BRepAdaptor_Surface(aBAS1); + Handle(BRepAdaptor_Surface) aBAHS2 = new BRepAdaptor_Surface(aBAS2); Handle(BRepTopAdaptor_TopolTool) aTool1 = new BRepTopAdaptor_TopolTool(aBAHS1); Handle(BRepTopAdaptor_TopolTool) aTool2 = new BRepTopAdaptor_TopolTool(aBAHS2); Standard_Integer aNbSamples1 = aTool1->NbSamples(); diff --git a/src/ChFi3d/ChFi3d_Builder.cxx b/src/ChFi3d/ChFi3d_Builder.cxx index 0e6dca7d3c..03444145c8 100644 --- a/src/ChFi3d/ChFi3d_Builder.cxx +++ b/src/ChFi3d/ChFi3d_Builder.cxx @@ -15,8 +15,8 @@ // commercial license or contractual agreement. -#include -#include +#include +#include #include #include #include @@ -28,8 +28,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include @@ -38,7 +38,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/ChFi3d/ChFi3d_Builder.hxx b/src/ChFi3d/ChFi3d_Builder.hxx index d07ad09b60..e2ef5bc894 100644 --- a/src/ChFi3d/ChFi3d_Builder.hxx +++ b/src/ChFi3d/ChFi3d_Builder.hxx @@ -17,50 +17,38 @@ #ifndef _ChFi3d_Builder_HeaderFile #define _ChFi3d_Builder_HeaderFile -#include -#include -#include - -#include -#include +#include +#include #include -#include +#include #include -#include +#include #include +#include +#include +#include +#include +#include #include #include #include -#include -#include -#include -#include #include -#include #include -#include - class TopOpeBRepDS_HDataStructure; class TopOpeBRepBuild_HBuilder; class Standard_OutOfRange; class Standard_NoSuchObject; class Standard_ConstructionError; -class TopoDS_Shape; class TopoDS_Edge; class ChFiDS_Spine; class TopoDS_Vertex; class Geom_Surface; class ChFiDS_SurfData; -class ChFiDS_HElSpine; -class BRepAdaptor_HSurface; class Adaptor3d_TopolTool; -class BRepAdaptor_HCurve2d; class BRepBlend_Line; -class Adaptor3d_HSurface; class Blend_Function; class Blend_FuncInv; -class Adaptor2d_HCurve2d; class Blend_SurfRstFunction; class Blend_SurfPointFuncInv; class Blend_SurfCurvFuncInv; @@ -207,9 +195,9 @@ public: ChFiDS_SequenceOfSurfData& SetData, const Handle(ChFiDS_Spine)& Spine, const Standard_Integer Iedge, - const Handle(Adaptor3d_HSurface)& S1, + const Handle(Adaptor3d_Surface)& S1, const Handle(Adaptor3d_TopolTool)& I1, - const Handle(Adaptor3d_HSurface)& S2, + const Handle(Adaptor3d_Surface)& S2, const Handle(Adaptor3d_TopolTool)& I2, Standard_Boolean& Intf, Standard_Boolean& Intl); @@ -227,12 +215,12 @@ protected: Standard_EXPORT virtual void SimulKPart (const Handle(ChFiDS_SurfData)& SD) const = 0; Standard_EXPORT virtual Standard_Boolean SimulSurf (Handle(ChFiDS_SurfData)& Data, - const Handle(ChFiDS_HElSpine)& Guide, + const Handle(ChFiDS_ElSpine)& Guide, const Handle(ChFiDS_Spine)& Spine, const Standard_Integer Choix, - const Handle(BRepAdaptor_HSurface)& S1, + const Handle(BRepAdaptor_Surface)& S1, const Handle(Adaptor3d_TopolTool)& I1, - const Handle(BRepAdaptor_HSurface)& S2, + const Handle(BRepAdaptor_Surface)& S2, const Handle(Adaptor3d_TopolTool)& I2, const Standard_Real TolGuide, Standard_Real& First, @@ -247,16 +235,16 @@ protected: Standard_Integer& Intl) = 0; Standard_EXPORT virtual void SimulSurf (Handle(ChFiDS_SurfData)& Data, - const Handle(ChFiDS_HElSpine)& Guide, + const Handle(ChFiDS_ElSpine)& Guide, const Handle(ChFiDS_Spine)& Spine, const Standard_Integer Choix, - const Handle(BRepAdaptor_HSurface)& S1, + const Handle(BRepAdaptor_Surface)& S1, const Handle(Adaptor3d_TopolTool)& I1, - const Handle(BRepAdaptor_HCurve2d)& PC1, - const Handle(BRepAdaptor_HSurface)& Sref1, - const Handle(BRepAdaptor_HCurve2d)& PCref1, + const Handle(BRepAdaptor_Curve2d)& PC1, + const Handle(BRepAdaptor_Surface)& Sref1, + const Handle(BRepAdaptor_Curve2d)& PCref1, Standard_Boolean& Decroch1, - const Handle(BRepAdaptor_HSurface)& S2, + const Handle(BRepAdaptor_Surface)& S2, const Handle(Adaptor3d_TopolTool)& I2, const TopAbs_Orientation Or2, const Standard_Real Fleche, @@ -272,17 +260,17 @@ protected: const math_Vector& Soldep); Standard_EXPORT virtual void SimulSurf (Handle(ChFiDS_SurfData)& Data, - const Handle(ChFiDS_HElSpine)& Guide, + const Handle(ChFiDS_ElSpine)& Guide, const Handle(ChFiDS_Spine)& Spine, const Standard_Integer Choix, - const Handle(BRepAdaptor_HSurface)& S1, + const Handle(BRepAdaptor_Surface)& S1, const Handle(Adaptor3d_TopolTool)& I1, const TopAbs_Orientation Or1, - const Handle(BRepAdaptor_HSurface)& S2, + const Handle(BRepAdaptor_Surface)& S2, const Handle(Adaptor3d_TopolTool)& I2, - const Handle(BRepAdaptor_HCurve2d)& PC2, - const Handle(BRepAdaptor_HSurface)& Sref2, - const Handle(BRepAdaptor_HCurve2d)& PCref2, + const Handle(BRepAdaptor_Curve2d)& PC2, + const Handle(BRepAdaptor_Surface)& Sref2, + const Handle(BRepAdaptor_Curve2d)& PCref2, Standard_Boolean& Decroch2, const Standard_Real Fleche, const Standard_Real TolGuide, @@ -297,21 +285,21 @@ protected: const math_Vector& Soldep); Standard_EXPORT virtual void SimulSurf (Handle(ChFiDS_SurfData)& Data, - const Handle(ChFiDS_HElSpine)& Guide, + const Handle(ChFiDS_ElSpine)& Guide, const Handle(ChFiDS_Spine)& Spine, const Standard_Integer Choix, - const Handle(BRepAdaptor_HSurface)& S1, + const Handle(BRepAdaptor_Surface)& S1, const Handle(Adaptor3d_TopolTool)& I1, - const Handle(BRepAdaptor_HCurve2d)& PC1, - const Handle(BRepAdaptor_HSurface)& Sref1, - const Handle(BRepAdaptor_HCurve2d)& PCref1, + const Handle(BRepAdaptor_Curve2d)& PC1, + const Handle(BRepAdaptor_Surface)& Sref1, + const Handle(BRepAdaptor_Curve2d)& PCref1, Standard_Boolean& Decroch1, const TopAbs_Orientation Or1, - const Handle(BRepAdaptor_HSurface)& S2, + const Handle(BRepAdaptor_Surface)& S2, const Handle(Adaptor3d_TopolTool)& I2, - const Handle(BRepAdaptor_HCurve2d)& PC2, - const Handle(BRepAdaptor_HSurface)& Sref2, - const Handle(BRepAdaptor_HCurve2d)& PCref2, + const Handle(BRepAdaptor_Curve2d)& PC2, + const Handle(BRepAdaptor_Surface)& Sref2, + const Handle(BRepAdaptor_Curve2d)& PCref2, Standard_Boolean& Decroch2, const TopAbs_Orientation Or2, const Standard_Real Fleche, @@ -328,12 +316,12 @@ protected: const math_Vector& Soldep); Standard_EXPORT Standard_Boolean SimulData (Handle(ChFiDS_SurfData)& Data, - const Handle(ChFiDS_HElSpine)& Guide, - const Handle(ChFiDS_HElSpine)& AdditionalGuide, + const Handle(ChFiDS_ElSpine)& Guide, + const Handle(ChFiDS_ElSpine)& AdditionalGuide, Handle(BRepBlend_Line)& Lin, - const Handle(Adaptor3d_HSurface)& S1, + const Handle(Adaptor3d_Surface)& S1, const Handle(Adaptor3d_TopolTool)& I1, - const Handle(Adaptor3d_HSurface)& S2, + const Handle(Adaptor3d_Surface)& S2, const Handle(Adaptor3d_TopolTool)& I2, Blend_Function& Func, Blend_FuncInv& FInv, @@ -352,12 +340,12 @@ protected: const Standard_Boolean RecOnS2 = Standard_False); Standard_EXPORT Standard_Boolean SimulData (Handle(ChFiDS_SurfData)& Data, - const Handle(ChFiDS_HElSpine)& HGuide, + const Handle(ChFiDS_ElSpine)& HGuide, Handle(BRepBlend_Line)& Lin, - const Handle(Adaptor3d_HSurface)& S1, + const Handle(Adaptor3d_Surface)& S1, const Handle(Adaptor3d_TopolTool)& I1, - const Handle(Adaptor3d_HSurface)& S2, - const Handle(Adaptor2d_HCurve2d)& PC2, + const Handle(Adaptor3d_Surface)& S2, + const Handle(Adaptor2d_Curve2d)& PC2, const Handle(Adaptor3d_TopolTool)& I2, Standard_Boolean& Decroch, Blend_SurfRstFunction& Func, @@ -380,14 +368,14 @@ protected: const Standard_Boolean RecRst); Standard_EXPORT Standard_Boolean SimulData (Handle(ChFiDS_SurfData)& Data, - const Handle(ChFiDS_HElSpine)& HGuide, + const Handle(ChFiDS_ElSpine)& HGuide, Handle(BRepBlend_Line)& Lin, - const Handle(Adaptor3d_HSurface)& S1, - const Handle(Adaptor2d_HCurve2d)& PC1, + const Handle(Adaptor3d_Surface)& S1, + const Handle(Adaptor2d_Curve2d)& PC1, const Handle(Adaptor3d_TopolTool)& I1, Standard_Boolean& Decroch1, - const Handle(Adaptor3d_HSurface)& S2, - const Handle(Adaptor2d_HCurve2d)& PC2, + const Handle(Adaptor3d_Surface)& S2, + const Handle(Adaptor2d_Curve2d)& PC2, const Handle(Adaptor3d_TopolTool)& I2, Standard_Boolean& Decroch2, Blend_RstRstFunction& Func, @@ -430,8 +418,8 @@ protected: Standard_EXPORT void Trunc (const Handle(ChFiDS_SurfData)& SD, const Handle(ChFiDS_Spine)& Spine, - const Handle(Adaptor3d_HSurface)& S1, - const Handle(Adaptor3d_HSurface)& S2, + const Handle(Adaptor3d_Surface)& S1, + const Handle(Adaptor3d_Surface)& S2, const Standard_Integer iedge, const Standard_Boolean isfirst, const Standard_Integer cntlFiOnS); @@ -440,15 +428,15 @@ protected: const Standard_Boolean Simul, ChFiDS_SequenceOfSurfData& SeqSD, Handle(ChFiDS_SurfData)& SD, - const Handle(ChFiDS_HElSpine)& Guide, + const Handle(ChFiDS_ElSpine)& Guide, const Handle(ChFiDS_Spine)& Spine, - const Handle(BRepAdaptor_HSurface)& HS1, - const Handle(BRepAdaptor_HSurface)& HS3, + const Handle(BRepAdaptor_Surface)& HS1, + const Handle(BRepAdaptor_Surface)& HS3, const gp_Pnt2d& P1, const gp_Pnt2d& P3, const Handle(Adaptor3d_TopolTool)& I1, - const Handle(BRepAdaptor_HSurface)& HS2, - const Handle(BRepAdaptor_HSurface)& HS4, + const Handle(BRepAdaptor_Surface)& HS2, + const Handle(BRepAdaptor_Surface)& HS4, const gp_Pnt2d& P2, const gp_Pnt2d& P4, const Handle(Adaptor3d_TopolTool)& I2, const Standard_Real MaxStep, @@ -464,19 +452,19 @@ protected: math_Vector& Soldep, Standard_Integer& Intf, Standard_Integer& Intl, - Handle(BRepAdaptor_HSurface)& Surf1, - Handle(BRepAdaptor_HSurface)& Surf2); + Handle(BRepAdaptor_Surface)& Surf1, + Handle(BRepAdaptor_Surface)& Surf2); //! Method, implemented in the inheritants, calculating //! elements of construction of the surface (fillet or //! chamfer). Standard_EXPORT virtual Standard_Boolean PerformSurf (ChFiDS_SequenceOfSurfData& Data, - const Handle(ChFiDS_HElSpine)& Guide, + const Handle(ChFiDS_ElSpine)& Guide, const Handle(ChFiDS_Spine)& Spine, const Standard_Integer Choix, - const Handle(BRepAdaptor_HSurface)& S1, + const Handle(BRepAdaptor_Surface)& S1, const Handle(Adaptor3d_TopolTool)& I1, - const Handle(BRepAdaptor_HSurface)& S2, + const Handle(BRepAdaptor_Surface)& S2, const Handle(Adaptor3d_TopolTool)& I2, const Standard_Real MaxStep, const Standard_Real Fleche, @@ -496,16 +484,16 @@ protected: //! the elements of construction of the surface (fillet //! or chamfer) contact edge/face. Standard_EXPORT virtual void PerformSurf (ChFiDS_SequenceOfSurfData& Data, - const Handle(ChFiDS_HElSpine)& Guide, + const Handle(ChFiDS_ElSpine)& Guide, const Handle(ChFiDS_Spine)& Spine, const Standard_Integer Choix, - const Handle(BRepAdaptor_HSurface)& S1, + const Handle(BRepAdaptor_Surface)& S1, const Handle(Adaptor3d_TopolTool)& I1, - const Handle(BRepAdaptor_HCurve2d)& PC1, - const Handle(BRepAdaptor_HSurface)& Sref1, - const Handle(BRepAdaptor_HCurve2d)& PCref1, + const Handle(BRepAdaptor_Curve2d)& PC1, + const Handle(BRepAdaptor_Surface)& Sref1, + const Handle(BRepAdaptor_Curve2d)& PCref1, Standard_Boolean& Decroch1, - const Handle(BRepAdaptor_HSurface)& S2, + const Handle(BRepAdaptor_Surface)& S2, const Handle(Adaptor3d_TopolTool)& I2, const TopAbs_Orientation Or2, const Standard_Real MaxStep, @@ -525,17 +513,17 @@ protected: //! the elements of construction of the surface (fillet //! or chamfer) contact edge/face. Standard_EXPORT virtual void PerformSurf (ChFiDS_SequenceOfSurfData& Data, - const Handle(ChFiDS_HElSpine)& Guide, + const Handle(ChFiDS_ElSpine)& Guide, const Handle(ChFiDS_Spine)& Spine, const Standard_Integer Choix, - const Handle(BRepAdaptor_HSurface)& S1, + const Handle(BRepAdaptor_Surface)& S1, const Handle(Adaptor3d_TopolTool)& I1, const TopAbs_Orientation Or1, - const Handle(BRepAdaptor_HSurface)& S2, + const Handle(BRepAdaptor_Surface)& S2, const Handle(Adaptor3d_TopolTool)& I2, - const Handle(BRepAdaptor_HCurve2d)& PC2, - const Handle(BRepAdaptor_HSurface)& Sref2, - const Handle(BRepAdaptor_HCurve2d)& PCref2, + const Handle(BRepAdaptor_Curve2d)& PC2, + const Handle(BRepAdaptor_Surface)& Sref2, + const Handle(BRepAdaptor_Curve2d)& PCref2, Standard_Boolean& Decroch2, const Standard_Real MaxStep, const Standard_Real Fleche, @@ -554,21 +542,21 @@ protected: //! the elements of construction of the surface (fillet //! or chamfer) contact edge/edge. Standard_EXPORT virtual void PerformSurf (ChFiDS_SequenceOfSurfData& Data, - const Handle(ChFiDS_HElSpine)& Guide, + const Handle(ChFiDS_ElSpine)& Guide, const Handle(ChFiDS_Spine)& Spine, const Standard_Integer Choix, - const Handle(BRepAdaptor_HSurface)& S1, + const Handle(BRepAdaptor_Surface)& S1, const Handle(Adaptor3d_TopolTool)& I1, - const Handle(BRepAdaptor_HCurve2d)& PC1, - const Handle(BRepAdaptor_HSurface)& Sref1, - const Handle(BRepAdaptor_HCurve2d)& PCref1, + const Handle(BRepAdaptor_Curve2d)& PC1, + const Handle(BRepAdaptor_Surface)& Sref1, + const Handle(BRepAdaptor_Curve2d)& PCref1, Standard_Boolean& Decroch1, const TopAbs_Orientation Or1, - const Handle(BRepAdaptor_HSurface)& S2, + const Handle(BRepAdaptor_Surface)& S2, const Handle(Adaptor3d_TopolTool)& I2, - const Handle(BRepAdaptor_HCurve2d)& PC2, - const Handle(BRepAdaptor_HSurface)& Sref2, - const Handle(BRepAdaptor_HCurve2d)& PCref2, + const Handle(BRepAdaptor_Curve2d)& PC2, + const Handle(BRepAdaptor_Surface)& Sref2, + const Handle(BRepAdaptor_Curve2d)& PCref2, Standard_Boolean& Decroch2, const TopAbs_Orientation Or2, const Standard_Real MaxStep, @@ -602,10 +590,10 @@ protected: const ChFiDS_ListOfStripe& LS) = 0; Standard_EXPORT virtual Standard_Boolean PerformFirstSection (const Handle(ChFiDS_Spine)& S, - const Handle(ChFiDS_HElSpine)& HGuide, + const Handle(ChFiDS_ElSpine)& HGuide, const Standard_Integer Choix, - Handle(BRepAdaptor_HSurface)& S1, - Handle(BRepAdaptor_HSurface)& S2, + Handle(BRepAdaptor_Surface)& S1, + Handle(BRepAdaptor_Surface)& S2, const Handle(Adaptor3d_TopolTool)& I1, const Handle(Adaptor3d_TopolTool)& I2, const Standard_Real Par, @@ -625,12 +613,12 @@ protected: //! Calculates a Line of contact face/face. Standard_EXPORT Standard_Boolean ComputeData (Handle(ChFiDS_SurfData)& Data, - const Handle(ChFiDS_HElSpine)& Guide, + const Handle(ChFiDS_ElSpine)& Guide, const Handle(ChFiDS_Spine)& Spine, Handle(BRepBlend_Line)& Lin, - const Handle(Adaptor3d_HSurface)& S1, + const Handle(Adaptor3d_Surface)& S1, const Handle(Adaptor3d_TopolTool)& I1, - const Handle(Adaptor3d_HSurface)& S2, + const Handle(Adaptor3d_Surface)& S2, const Handle(Adaptor3d_TopolTool)& I2, Blend_Function& Func, Blend_FuncInv& FInv, @@ -655,12 +643,12 @@ protected: //! Calculates a Line of contact edge/face. Standard_EXPORT Standard_Boolean ComputeData (Handle(ChFiDS_SurfData)& Data, - const Handle(ChFiDS_HElSpine)& HGuide, + const Handle(ChFiDS_ElSpine)& HGuide, Handle(BRepBlend_Line)& Lin, - const Handle(Adaptor3d_HSurface)& S1, + const Handle(Adaptor3d_Surface)& S1, const Handle(Adaptor3d_TopolTool)& I1, - const Handle(Adaptor3d_HSurface)& S2, - const Handle(Adaptor2d_HCurve2d)& PC2, + const Handle(Adaptor3d_Surface)& S2, + const Handle(Adaptor2d_Curve2d)& PC2, const Handle(Adaptor3d_TopolTool)& I2, Standard_Boolean& Decroch, Blend_SurfRstFunction& Func, @@ -683,14 +671,14 @@ protected: //! Calculates a Line of contact edge/edge. Standard_EXPORT Standard_Boolean ComputeData (Handle(ChFiDS_SurfData)& Data, - const Handle(ChFiDS_HElSpine)& HGuide, + const Handle(ChFiDS_ElSpine)& HGuide, Handle(BRepBlend_Line)& Lin, - const Handle(Adaptor3d_HSurface)& S1, - const Handle(Adaptor2d_HCurve2d)& PC1, + const Handle(Adaptor3d_Surface)& S1, + const Handle(Adaptor2d_Curve2d)& PC1, const Handle(Adaptor3d_TopolTool)& I1, Standard_Boolean& Decroch1, - const Handle(Adaptor3d_HSurface)& S2, - const Handle(Adaptor2d_HCurve2d)& PC2, + const Handle(Adaptor3d_Surface)& S2, + const Handle(Adaptor2d_Curve2d)& PC2, const Handle(Adaptor3d_TopolTool)& I2, Standard_Boolean& Decroch2, Blend_RstRstFunction& Func, @@ -716,8 +704,8 @@ protected: Standard_EXPORT Standard_Boolean CompleteData (Handle(ChFiDS_SurfData)& Data, Blend_Function& Func, Handle(BRepBlend_Line)& Lin, - const Handle(Adaptor3d_HSurface)& S1, - const Handle(Adaptor3d_HSurface)& S2, + const Handle(Adaptor3d_Surface)& S1, + const Handle(Adaptor3d_Surface)& S2, const TopAbs_Orientation Or1, const Standard_Boolean Gd1, const Standard_Boolean Gd2, @@ -728,23 +716,23 @@ protected: Standard_EXPORT Standard_Boolean CompleteData (Handle(ChFiDS_SurfData)& Data, Blend_SurfRstFunction& Func, Handle(BRepBlend_Line)& Lin, - const Handle(Adaptor3d_HSurface)& S1, - const Handle(Adaptor3d_HSurface)& S2, + const Handle(Adaptor3d_Surface)& S1, + const Handle(Adaptor3d_Surface)& S2, const TopAbs_Orientation Or, const Standard_Boolean Reversed); Standard_EXPORT Standard_Boolean CompleteData (Handle(ChFiDS_SurfData)& Data, Blend_RstRstFunction& Func, Handle(BRepBlend_Line)& Lin, - const Handle(Adaptor3d_HSurface)& S1, - const Handle(Adaptor3d_HSurface)& S2, + const Handle(Adaptor3d_Surface)& S1, + const Handle(Adaptor3d_Surface)& S2, const TopAbs_Orientation Or); Standard_EXPORT Standard_Boolean StoreData (Handle(ChFiDS_SurfData)& Data, const AppBlend_Approx& Approx, const Handle(BRepBlend_Line)& Lin, - const Handle(Adaptor3d_HSurface)& S1, - const Handle(Adaptor3d_HSurface)& S2, + const Handle(Adaptor3d_Surface)& S1, + const Handle(Adaptor3d_Surface)& S2, const TopAbs_Orientation Or1, const Standard_Boolean Gd1, const Standard_Boolean Gd2, @@ -754,9 +742,9 @@ protected: Standard_EXPORT Standard_Boolean CompleteData (Handle(ChFiDS_SurfData)& Data, const Handle(Geom_Surface)& Surfcoin, - const Handle(Adaptor3d_HSurface)& S1, + const Handle(Adaptor3d_Surface)& S1, const Handle(Geom2d_Curve)& PC1, - const Handle(Adaptor3d_HSurface)& S2, + const Handle(Adaptor3d_Surface)& S2, const Handle(Geom2d_Curve)& PC2, const TopAbs_Orientation Or, const Standard_Boolean On1, @@ -798,7 +786,7 @@ private: const TopoDS_Edge& E1, const TopoDS_Vertex& V) const; - Standard_EXPORT void PerformSetOfSurfOnElSpine (const Handle(ChFiDS_HElSpine)& ES, + Standard_EXPORT void PerformSetOfSurfOnElSpine (const Handle(ChFiDS_ElSpine)& ES, Handle(ChFiDS_Stripe)& St, Handle(BRepTopAdaptor_TopolTool)& It1, Handle(BRepTopAdaptor_TopolTool)& It2, @@ -833,28 +821,28 @@ private: Standard_EXPORT Standard_Boolean MoreSurfdata (const Standard_Integer Index) const; Standard_EXPORT Standard_Boolean StartSol (const Handle(ChFiDS_Spine)& Spine, - Handle(BRepAdaptor_HSurface)& HS, + Handle(BRepAdaptor_Surface)& HS, gp_Pnt2d& P, - Handle(BRepAdaptor_HCurve2d)& HC, + Handle(BRepAdaptor_Curve2d)& HC, Standard_Real& W, const Handle(ChFiDS_SurfData)& SD, const Standard_Boolean isFirst, const Standard_Integer OnS, - Handle(BRepAdaptor_HSurface)& HSref, - Handle(BRepAdaptor_HCurve2d)& HCref, + Handle(BRepAdaptor_Surface)& HSref, + Handle(BRepAdaptor_Curve2d)& HCref, Standard_Boolean& RecP, Standard_Boolean& RecS, Standard_Boolean& RecRst, Standard_Boolean& C1Obst, - Handle(BRepAdaptor_HSurface)& HSbis, + Handle(BRepAdaptor_Surface)& HSbis, gp_Pnt2d& Pbis, const Standard_Boolean Decroch, const TopoDS_Vertex& Vref) const; Standard_EXPORT void StartSol (const Handle(ChFiDS_Stripe)& S, - const Handle(ChFiDS_HElSpine)& HGuide, - Handle(BRepAdaptor_HSurface)& HS1, - Handle(BRepAdaptor_HSurface)& HS2, + const Handle(ChFiDS_ElSpine)& HGuide, + Handle(BRepAdaptor_Surface)& HS1, + Handle(BRepAdaptor_Surface)& HS2, Handle(BRepTopAdaptor_TopolTool)& I1, Handle(BRepTopAdaptor_TopolTool)& I2, gp_Pnt2d& P1, @@ -863,8 +851,8 @@ private: Standard_EXPORT void ConexFaces (const Handle(ChFiDS_Spine)& Sp, const Standard_Integer IEdge, - Handle(BRepAdaptor_HSurface)& HS1, - Handle(BRepAdaptor_HSurface)& HS2) const; + Handle(BRepAdaptor_Surface)& HS1, + Handle(BRepAdaptor_Surface)& HS2) const; TopoDS_Shape myShape; diff --git a/src/ChFi3d/ChFi3d_Builder_0.cxx b/src/ChFi3d/ChFi3d_Builder_0.cxx index de2ff457de..0babefe4bd 100644 --- a/src/ChFi3d/ChFi3d_Builder_0.cxx +++ b/src/ChFi3d/ChFi3d_Builder_0.cxx @@ -62,11 +62,11 @@ #include #include #include -#include +#include #include #include -#include -#include +#include +#include #include #include @@ -78,8 +78,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include @@ -172,8 +172,8 @@ extern void ChFi3d_SettraceDRAWSPINE(const Standard_Boolean b); #include -#include -#include +#include +#include #include //======================================================================= @@ -225,21 +225,21 @@ void ChFi3d_Boite(const gp_Pnt2d& p1,const gp_Pnt2d& p2, //function : EnlargeBox and its friends. //purpose : //======================================================================= -static Handle(Adaptor3d_HSurface) Geometry(TopOpeBRepDS_DataStructure& DStr, +static Handle(Adaptor3d_Surface) Geometry(TopOpeBRepDS_DataStructure& DStr, const Standard_Integer ind) { - if(ind == 0) return Handle(Adaptor3d_HSurface)(); + if(ind == 0) return Handle(Adaptor3d_Surface)(); if(ind > 0) { TopoDS_Face F = TopoDS::Face(DStr.Shape(ind)); - if(F.IsNull()) return Handle(Adaptor3d_HSurface)(); - Handle(BRepAdaptor_HSurface) HS = new BRepAdaptor_HSurface(); - HS->ChangeSurface().Initialize(F,0); + if(F.IsNull()) return Handle(Adaptor3d_Surface)(); + Handle(BRepAdaptor_Surface) HS = new BRepAdaptor_Surface(); + HS->Initialize(F,0); return HS; } else{ Handle(Geom_Surface) S = DStr.Surface(-ind).Surface(); - if(S.IsNull()) return Handle(Adaptor3d_HSurface)(); - return new GeomAdaptor_HSurface(S); + if(S.IsNull()) return Handle(Adaptor3d_Surface)(); + return new GeomAdaptor_Surface(S); } } //======================================================================= @@ -274,7 +274,7 @@ void ChFi3d_EnlargeBox(const Handle(Geom_Curve)& C, //function : ChFi3d_EnlargeBox //purpose : //======================================================================= -void ChFi3d_EnlargeBox(const Handle(Adaptor3d_HSurface)& S, +void ChFi3d_EnlargeBox(const Handle(Adaptor3d_Surface)& S, const Handle(Geom2d_Curve)& PC, const Standard_Real wd, const Standard_Real wf, @@ -331,8 +331,8 @@ void ChFi3d_EnlargeBox(TopOpeBRepDS_DataStructure& DStr, const Handle(Geom2d_Curve)& pcs2 = fi2.PCurveOnSurf(); const Handle(Geom_Curve)& c3d1 = DStr.Curve(fi1.LineIndex()).Curve(); const Handle(Geom_Curve)& c3d2 = DStr.Curve(fi2.LineIndex()).Curve(); - Handle(Adaptor3d_HSurface) F1 = Geometry(DStr,sd->IndexOfS1()); - Handle(Adaptor3d_HSurface) F2 = Geometry(DStr,sd->IndexOfS2()); + Handle(Adaptor3d_Surface) F1 = Geometry(DStr,sd->IndexOfS1()); + Handle(Adaptor3d_Surface) F2 = Geometry(DStr,sd->IndexOfS2()); Standard_Real p1 = fi1.Parameter(isfirst); if(!c3d1.IsNull()) b1.Add(c3d1->Value(p1)); if(!pcs1.IsNull()) { @@ -629,8 +629,8 @@ void ChFi3d_BoundSrf(GeomAdaptor_Surface& S, //function : ChFi3d_InterPlaneEdge //purpose : //======================================================================= -Standard_Boolean ChFi3d_InterPlaneEdge (const Handle(Adaptor3d_HSurface)& Plan, - const Handle(Adaptor3d_HCurve)& C, +Standard_Boolean ChFi3d_InterPlaneEdge (const Handle(Adaptor3d_Surface)& Plan, + const Handle(Adaptor3d_Curve)& C, Standard_Real& W, const Standard_Boolean Sens, const Standard_Real tolc) @@ -710,7 +710,7 @@ void ChFi3d_ExtrSpineCarac(const TopOpeBRepDS_DataStructure& DStr, const Handle(ChFiDS_Spine)& sp = cd->Spine(); Handle(ChFiDS_FilSpine) fsp = Handle(ChFiDS_FilSpine)::DownCast(sp); nbelspine=sp->NbEdges(); - Handle(ChFiDS_HElSpine) hels; + Handle(ChFiDS_ElSpine) hels; if (nbelspine==1) hels = sp->ElSpine(1); else hels = sp->ElSpine(p); if(fsp->IsConstant()) { R = fsp->Radius(); } @@ -1173,8 +1173,8 @@ void ChFi3d_ReparamPcurv(const Standard_Real Uf, //purpose : Calculation of the pcurve corresponding to a line of intersection // 3d. Should be called only in analytic cases. //======================================================================= -void ChFi3d_ProjectPCurv(const Handle(Adaptor3d_HCurve)& HCg, - const Handle(Adaptor3d_HSurface)& HSg, +void ChFi3d_ProjectPCurv(const Handle(Adaptor3d_Curve)& HCg, + const Handle(Adaptor3d_Surface)& HSg, Handle(Geom2d_Curve)& Pcurv, const Standard_Real tol, Standard_Real& tolreached) @@ -1229,9 +1229,9 @@ void ChFi3d_ProjectPCurv(const Handle(Adaptor3d_HCurve)& HCg, //function : CheckSameParameter //purpose : Controls a posteriori that sameparameter worked well //======================================================================= -Standard_Boolean ChFi3d_CheckSameParameter (const Handle(Adaptor3d_HCurve)& C3d, +Standard_Boolean ChFi3d_CheckSameParameter (const Handle(Adaptor3d_Curve)& C3d, Handle(Geom2d_Curve)& Pcurv, - const Handle(Adaptor3d_HSurface)& S, + const Handle(Adaptor3d_Surface)& S, const Standard_Real tol3d, Standard_Real& tolreached) { @@ -1263,9 +1263,9 @@ Standard_Boolean ChFi3d_CheckSameParameter (const Handle(Adaptor3d_HCurve)& C3 //function : SameParameter //purpose : Encapsulation of Sameparameter //======================================================================= -Standard_Boolean ChFi3d_SameParameter(const Handle(Adaptor3d_HCurve)& C3d, +Standard_Boolean ChFi3d_SameParameter(const Handle(Adaptor3d_Curve)& C3d, Handle(Geom2d_Curve)& Pcurv, - const Handle(Adaptor3d_HSurface)& S, + const Handle(Adaptor3d_Surface)& S, const Standard_Real tol3d, Standard_Real& tolreached) { @@ -1290,8 +1290,8 @@ Standard_Boolean ChFi3d_SameParameter(const Handle(Geom_Curve)& C3d, const Standard_Real tol3d, Standard_Real& tolreached) { - /*szv:static*/ Handle(GeomAdaptor_HSurface) hs(new GeomAdaptor_HSurface(S)); - /*szv:static*/ Handle(GeomAdaptor_HCurve) hc(new GeomAdaptor_HCurve(C3d,Pardeb,Parfin)); + /*szv:static*/ Handle(GeomAdaptor_Surface) hs(new GeomAdaptor_Surface(S)); + /*szv:static*/ Handle(GeomAdaptor_Curve) hc(new GeomAdaptor_Curve(C3d,Pardeb,Parfin)); return ChFi3d_SameParameter(hc,Pcurv,hs,tol3d,tolreached); } //======================================================================= @@ -1300,11 +1300,11 @@ Standard_Boolean ChFi3d_SameParameter(const Handle(Geom_Curve)& C3d, // to guarantee the same range and parameters as of the // reference 3D curve. //======================================================================= -void ChFi3d_ComputePCurv(const Handle(Adaptor3d_HCurve)& C3d, +void ChFi3d_ComputePCurv(const Handle(Adaptor3d_Curve)& C3d, const gp_Pnt2d& UV1, const gp_Pnt2d& UV2, Handle(Geom2d_Curve)& Pcurv, - const Handle(Adaptor3d_HSurface)& S, + const Handle(Adaptor3d_Surface)& S, const Standard_Real Pardeb, const Standard_Real Parfin, const Standard_Real tol3d, @@ -1331,8 +1331,8 @@ void ChFi3d_ComputePCurv(const Handle(Geom_Curve)& C3d, Standard_Real& tolreached, const Standard_Boolean reverse) { - Handle(Adaptor3d_HSurface) hs(new GeomAdaptor_HSurface(S)); - Handle(Adaptor3d_HCurve) hc(new GeomAdaptor_HCurve(C3d,Pardeb,Parfin)); + Handle(Adaptor3d_Surface) hs(new GeomAdaptor_Surface(S)); + Handle(Adaptor3d_Curve) hc(new GeomAdaptor_Curve(C3d,Pardeb,Parfin)); ChFi3d_ComputePCurv(hc,UV1,UV2,Pcurv,hs,Pardeb,Parfin,tol3d,tolreached,reverse); } //======================================================================= @@ -1395,7 +1395,7 @@ void ChFi3d_ComputePCurv(const gp_Pnt2d& UV1, //function : ChFi3d_mkbound //purpose : //======================================================================= -Handle(GeomFill_Boundary) ChFi3d_mkbound(const Handle(Adaptor3d_HSurface)& Fac, +Handle(GeomFill_Boundary) ChFi3d_mkbound(const Handle(Adaptor3d_Surface)& Fac, Handle(Geom2d_Curve)& curv, const Standard_Integer sens1, const gp_Pnt2d& pfac1, @@ -1417,7 +1417,7 @@ Handle(GeomFill_Boundary) ChFi3d_mkbound(const Handle(Adaptor3d_HSurface)& Fac, //function : ChFi3d_mkbound //purpose : //======================================================================= -Handle(GeomFill_Boundary) ChFi3d_mkbound(const Handle(Adaptor3d_HSurface)& Surf, +Handle(GeomFill_Boundary) ChFi3d_mkbound(const Handle(Adaptor3d_Surface)& Surf, Handle(Geom2d_Curve)& curv, const Standard_Integer sens1, const gp_Pnt2d& p1, @@ -1444,14 +1444,14 @@ Handle(GeomFill_Boundary) ChFi3d_mkbound(const Handle(Geom_Surface)& s, const Standard_Real ta, const Standard_Boolean isfreeboundary) { - Handle(Adaptor3d_HSurface) HS = new GeomAdaptor_HSurface(s); + Handle(Adaptor3d_Surface) HS = new GeomAdaptor_Surface(s); return ChFi3d_mkbound(HS,p1,p2,t3d,ta,isfreeboundary); } //======================================================================= //function : ChFi3d_mkbound //purpose : //======================================================================= -Handle(GeomFill_Boundary) ChFi3d_mkbound(const Handle(Adaptor3d_HSurface)& HS, +Handle(GeomFill_Boundary) ChFi3d_mkbound(const Handle(Adaptor3d_Surface)& HS, const gp_Pnt2d& p1, const gp_Pnt2d& p2, const Standard_Real t3d, @@ -1468,16 +1468,16 @@ Handle(GeomFill_Boundary) ChFi3d_mkbound(const Handle(Adaptor3d_HSurface)& HS, //function : ChFi3d_mkbound //purpose : //======================================================================= -Handle(GeomFill_Boundary) ChFi3d_mkbound(const Handle(Adaptor3d_HSurface)& HS, +Handle(GeomFill_Boundary) ChFi3d_mkbound(const Handle(Adaptor3d_Surface)& HS, const Handle(Geom2d_Curve)& curv, const Standard_Real t3d, const Standard_Real ta, const Standard_Boolean isfreeboundary) { - Handle(Geom2dAdaptor_HCurve) HC = new Geom2dAdaptor_HCurve(curv); + Handle(Geom2dAdaptor_Curve) HC = new Geom2dAdaptor_Curve(curv); Adaptor3d_CurveOnSurface COnS(HC,HS); if (isfreeboundary) { - Handle(Adaptor3d_HCurveOnSurface) HCOnS = new Adaptor3d_HCurveOnSurface(COnS); + Handle(Adaptor3d_CurveOnSurface) HCOnS = new Adaptor3d_CurveOnSurface(COnS); return new GeomFill_SimpleBound(HCOnS,t3d,ta); } return new GeomFill_BoundWithSurf(COnS,t3d,ta); @@ -1486,7 +1486,7 @@ Handle(GeomFill_Boundary) ChFi3d_mkbound(const Handle(Adaptor3d_HSurface)& HS, //function : ChFi3d_mkbound //purpose : //======================================================================= -Handle(GeomFill_Boundary) ChFi3d_mkbound(const Handle(Adaptor3d_HSurface)& Fac, +Handle(GeomFill_Boundary) ChFi3d_mkbound(const Handle(Adaptor3d_Surface)& Fac, Handle(Geom2d_Curve)& curv, const gp_Pnt2d& p1, const gp_Pnt2d& p2, @@ -1533,7 +1533,7 @@ Handle(Geom2d_Curve) ChFi3d_BuildPCurve(const gp_Pnt2d& p1, //function : ChFi3d_BuildPCurve //purpose : //======================================================================= -Handle(Geom2d_Curve) ChFi3d_BuildPCurve(const Handle(Adaptor3d_HSurface)& Surf, +Handle(Geom2d_Curve) ChFi3d_BuildPCurve(const Handle(Adaptor3d_Surface)& Surf, const gp_Pnt2d& p1, const gp_Vec2d& v1, const gp_Pnt2d& p2, @@ -1565,7 +1565,7 @@ Handle(Geom2d_Curve) ChFi3d_BuildPCurve(const Handle(Adaptor3d_HSurface)& Surf, //function : ChFi3d_BuildPCurve //purpose : //======================================================================= -Handle(Geom2d_Curve) ChFi3d_BuildPCurve(const Handle(Adaptor3d_HSurface)& Surf, +Handle(Geom2d_Curve) ChFi3d_BuildPCurve(const Handle(Adaptor3d_Surface)& Surf, const gp_Pnt2d& p1, const gp_Vec& v1, const gp_Pnt2d& p2, @@ -1620,8 +1620,8 @@ void ChFi3d_ComputeArete(const ChFiDS_CommonPoint& P1, // IFlag=0 pcurve et courbe 3d // IFlag>0 pcurve (parametrage impose si IFlag=2) { - /*szv:static*/ Handle(GeomAdaptor_HSurface) hs(new GeomAdaptor_HSurface()); - /*szv:static*/ Handle(GeomAdaptor_HCurve) hc(new GeomAdaptor_HCurve()); + /*szv:static*/ Handle(GeomAdaptor_Surface) hs(new GeomAdaptor_Surface()); + /*szv:static*/ Handle(GeomAdaptor_Curve) hc(new GeomAdaptor_Curve()); tolreached = tol3d; @@ -1645,9 +1645,9 @@ void ChFi3d_ComputeArete(const ChFiDS_CommonPoint& P1, } } if(IFlag != 1) { - hs->ChangeSurface().Load(Surf); - hc->ChangeCurve().Load(C3d,Pardeb,Parfin); - const Handle(Adaptor3d_HCurve)& aHCurve = hc; // to avoid ambiguity + hs->Load(Surf); + hc->Load(C3d,Pardeb,Parfin); + const Handle(Adaptor3d_Curve)& aHCurve = hc; // to avoid ambiguity ChFi3d_ComputePCurv(aHCurve,UV1,UV2,Pcurv,hs,Pardeb,Parfin,tol3d,tolreached,Standard_False); } else{ @@ -1675,9 +1675,9 @@ void ChFi3d_ComputeArete(const ChFiDS_CommonPoint& P1, } } if(IFlag != 1) { - hs->ChangeSurface().Load(Surf); - hc->ChangeCurve().Load(C3d,Pardeb,Parfin); - const Handle(Adaptor3d_HCurve)& aHCurve = hc; // to avoid ambiguity + hs->Load(Surf); + hc->Load(C3d,Pardeb,Parfin); + const Handle(Adaptor3d_Curve)& aHCurve = hc; // to avoid ambiguity ChFi3d_ComputePCurv(aHCurve,UV1,UV2,Pcurv,hs,Pardeb,Parfin,tol3d,tolreached,Standard_False); } else{ @@ -1702,7 +1702,7 @@ void ChFi3d_ComputeArete(const ChFiDS_CommonPoint& P1, C1.Initialize(P2.Arc()); gp_Vec Vv2; C1.D1(P2.ParameterOnArc(),Pp,Vv2); - hs->ChangeSurface().Load(Surf); + hs->Load(Surf); Pcurv = ChFi3d_BuildPCurve(hs,UV1,Vv1,UV2,Vv2,Standard_True); // There are some cases when PCurve constructed in this way // leaves the surface, in particular if it results from an @@ -1726,11 +1726,11 @@ void ChFi3d_ComputeArete(const ChFiDS_CommonPoint& P1, } } Geom2dAdaptor_Curve AC(Pcurv); - Handle(Geom2dAdaptor_HCurve) AHC = - new Geom2dAdaptor_HCurve(AC); + Handle(Geom2dAdaptor_Curve) AHC = + new Geom2dAdaptor_Curve(AC); GeomAdaptor_Surface AS(Surf); - Handle(GeomAdaptor_HSurface) AHS = - new GeomAdaptor_HSurface(AS); + Handle(GeomAdaptor_Surface) AHS = + new GeomAdaptor_Surface(AS); Adaptor3d_CurveOnSurface Cs(AHC,AHS); Pardeb = Cs.FirstParameter(); Parfin = Cs.LastParameter(); @@ -1738,8 +1738,8 @@ void ChFi3d_ComputeArete(const ChFiDS_CommonPoint& P1, GeomLib::BuildCurve3d(tol3d,Cs,Pardeb,Parfin,C3d,tolreached,avtol); } else { - hs->ChangeSurface().Load(Surf); - hc->ChangeCurve().Load(C3d,Pardeb,Parfin); + hs->Load(Surf); + hc->Load(C3d,Pardeb,Parfin); ChFi3d_ProjectPCurv(hc,hs,Pcurv,tol3d,tolreached); gp_Pnt2d p2d = Pcurv->Value(Pardeb); if(!UV1.IsEqual(p2d,Precision::PConfusion())) { @@ -1826,13 +1826,13 @@ Standard_EXPORT void ChFi3d_FilCommonPoint(const BRepBlend_Extremity& SP, if (SP.NbPointOnRst() != 0) { // An arc, and/or a vertex is loaded const BRepBlend_PointOnRst& PR = SP.PointOnRst(1); - Handle(BRepAdaptor_HCurve2d) - Harc = Handle(BRepAdaptor_HCurve2d)::DownCast(PR.Arc()); + Handle(BRepAdaptor_Curve2d) + Harc = Handle(BRepAdaptor_Curve2d)::DownCast(PR.Arc()); if(!Harc.IsNull()) { Standard_Real DistF, DistL, LeParamAmoi; Standard_Integer Index_min; - TopoDS_Edge E = Harc->ChangeCurve2d().Edge(); + TopoDS_Edge E = Harc->Edge(); TopoDS_Vertex V[2]; TopExp::Vertices(E, V[0], V[1]); @@ -2900,7 +2900,7 @@ TopoDS_Edge ChFi3d_EdgeFromV1(const TopoDS_Vertex& V1, //purpose : Comme son nom l indique. //======================================================================= -Standard_Real ChFi3d_ConvTol2dToTol3d(const Handle(Adaptor3d_HSurface)& S, +Standard_Real ChFi3d_ConvTol2dToTol3d(const Handle(Adaptor3d_Surface)& S, const Standard_Real tol2d) { Standard_Real ures = S->UResolution(1.e-7); @@ -2915,9 +2915,9 @@ Standard_Real ChFi3d_ConvTol2dToTol3d(const Handle(Adaptor3d_HSurface)& S, // parametrization of surfaces is not homogenous. //======================================================================= -Standard_Real ChFi3d_EvalTolReached(const Handle(Adaptor3d_HSurface)& S1, +Standard_Real ChFi3d_EvalTolReached(const Handle(Adaptor3d_Surface)& S1, const Handle(Geom2d_Curve)& pc1, - const Handle(Adaptor3d_HSurface)& S2, + const Handle(Adaptor3d_Surface)& S2, const Handle(Geom2d_Curve)& pc2, const Handle(Geom_Curve)& C) { @@ -2952,20 +2952,20 @@ Standard_Real ChFi3d_EvalTolReached(const Handle(Adaptor3d_HSurface)& S1, //function : trsfsurf //purpose : //======================================================================= -Handle(Geom_Surface) trsfsurf(const Handle(Adaptor3d_HSurface)& HS, +Handle(Geom_Surface) trsfsurf(const Handle(Adaptor3d_Surface)& HS, Handle(Adaptor3d_TopolTool)& /*dom*/) { //Pour l utilisation des domaines voir avec BUBUCH!! Handle(Geom_Surface) res; - Handle(BRepAdaptor_HSurface) hbs = Handle(BRepAdaptor_HSurface)::DownCast(HS); - Handle(GeomAdaptor_HSurface) hgs = Handle(GeomAdaptor_HSurface)::DownCast(HS); + Handle(BRepAdaptor_Surface) hbs = Handle(BRepAdaptor_Surface)::DownCast(HS); + Handle(GeomAdaptor_Surface) hgs = Handle(GeomAdaptor_Surface)::DownCast(HS); if(!hbs.IsNull()) { - res = hbs->ChangeSurface().Surface().Surface(); - gp_Trsf trsf = hbs->ChangeSurface().Trsf(); + res = hbs->Surface().Surface(); + gp_Trsf trsf = hbs->Trsf(); res = Handle(Geom_Surface)::DownCast(res->Transformed(trsf)); } else if(!hgs.IsNull()) { - res = hgs->ChangeSurface().Surface(); + res = hgs->Surface(); } Handle(Geom_RectangularTrimmedSurface) tr = Handle(Geom_RectangularTrimmedSurface)::DownCast(res); @@ -2987,7 +2987,7 @@ Handle(Geom_Surface) trsfsurf(const Handle(Adaptor3d_HSurface)& HS, } res = new Geom_RectangularTrimmedSurface(res,U1,U2,V1,V2); } - // Handle(GeomAdaptor_HSurface) temp = new GeomAdaptor_HSurface(res,U1,U2,V1,V2); + // Handle(GeomAdaptor_Surface) temp = new GeomAdaptor_Surface(res,U1,U2,V1,V2); // dom = new Adaptor3d_TopolTool(temp); return res; } @@ -3024,8 +3024,8 @@ static void CurveCleaner(Handle(Geom_BSplineCurve)& BS, // means that the resulting curve is restricted by // boundaries of input surfaces (eap 30 May occ354) //======================================================================= -Standard_Boolean ChFi3d_ComputeCurves(const Handle(Adaptor3d_HSurface)& S1, - const Handle(Adaptor3d_HSurface)& S2, +Standard_Boolean ChFi3d_ComputeCurves(const Handle(Adaptor3d_Surface)& S1, + const Handle(Adaptor3d_Surface)& S2, const TColStd_Array1OfReal& Pardeb, const TColStd_Array1OfReal& Parfin, Handle(Geom_Curve)& C3d, @@ -3138,8 +3138,8 @@ Standard_Boolean ChFi3d_ComputeCurves(const Handle(Adaptor3d_HSurface)& S1, } } if(!c1line) ElCLib::AdjustPeriodic(0.,2*M_PI,Precision::Angular(),Udeb,Ufin); - Handle(GeomAdaptor_HCurve) HC = new GeomAdaptor_HCurve(); - HC->ChangeCurve().Load(C3d,Udeb,Ufin); + Handle(GeomAdaptor_Curve) HC = new GeomAdaptor_Curve(); + HC->Load(C3d,Udeb,Ufin); ChFi3d_ProjectPCurv(HC,S1,Pc1,tol3d,tolr1); if(S1->GetType() == GeomAbs_Cylinder) { Standard_Real x,y; @@ -3175,8 +3175,8 @@ Standard_Boolean ChFi3d_ComputeCurves(const Handle(Adaptor3d_HSurface)& S1, Udeb = - Udeb; Ufin = - Ufin; } - Handle(GeomAdaptor_HCurve) HC = new GeomAdaptor_HCurve(); - HC->ChangeCurve().Load(C3d,Udeb,Ufin); + Handle(GeomAdaptor_Curve) HC = new GeomAdaptor_Curve(); + HC->Load(C3d,Udeb,Ufin); ChFi3d_ProjectPCurv(HC,S1,Pc1,tol3d,tolr1); ChFi3d_ProjectPCurv(HC,S2,Pc2,tol3d,tolr2); C3d = new Geom_TrimmedCurve(C3d,Udeb,Ufin); @@ -3511,8 +3511,8 @@ Standard_Boolean ChFi3d_ComputeCurves(const Handle(Adaptor3d_HSurface)& S1, // //======================================================================= -Standard_Boolean ChFi3d_IntCS(const Handle(Adaptor3d_HSurface)& S, - const Handle(Adaptor3d_HCurve)& C, +Standard_Boolean ChFi3d_IntCS(const Handle(Adaptor3d_Surface)& S, + const Handle(Adaptor3d_Curve)& C, gp_Pnt2d& p2dS, Standard_Real& wc) { @@ -3575,8 +3575,8 @@ Standard_Boolean ChFi3d_IntCS(const Handle(Adaptor3d_HSurface)& S, void ChFi3d_ComputesIntPC (const ChFiDS_FaceInterference& Fi1, const ChFiDS_FaceInterference& Fi2, - const Handle(GeomAdaptor_HSurface)& HS1, - const Handle(GeomAdaptor_HSurface)& HS2, + const Handle(GeomAdaptor_Surface)& HS1, + const Handle(GeomAdaptor_Surface)& HS2, Standard_Real& UInt1, Standard_Real& UInt2) { @@ -3590,8 +3590,8 @@ void ChFi3d_ComputesIntPC (const ChFiDS_FaceInterference& Fi1, //======================================================================= void ChFi3d_ComputesIntPC (const ChFiDS_FaceInterference& Fi1, const ChFiDS_FaceInterference& Fi2, - const Handle(GeomAdaptor_HSurface)& HS1, - const Handle(GeomAdaptor_HSurface)& HS2, + const Handle(GeomAdaptor_Surface)& HS1, + const Handle(GeomAdaptor_Surface)& HS2, Standard_Real& UInt1, Standard_Real& UInt2, gp_Pnt& P) @@ -3610,13 +3610,13 @@ void ChFi3d_ComputesIntPC (const ChFiDS_FaceInterference& Fi1, // recalculation of the extremums Standard_Real delt1 = Min(0.1,0.05*(Fi1.LastParameter() - Fi1.FirstParameter())); - Handle(Geom2dAdaptor_HCurve) hc2d1 = - new Geom2dAdaptor_HCurve(Fi1.PCurveOnSurf(),UInt1-delt1,UInt1+delt1); + Handle(Geom2dAdaptor_Curve) hc2d1 = + new Geom2dAdaptor_Curve(Fi1.PCurveOnSurf(),UInt1-delt1,UInt1+delt1); Adaptor3d_CurveOnSurface cons1(hc2d1,HS1); Standard_Real delt2 = Min(0.1,0.05*(Fi2.LastParameter() - Fi2.FirstParameter())); - Handle(Geom2dAdaptor_HCurve) hc2d2 = - new Geom2dAdaptor_HCurve(Fi2.PCurveOnSurf(),UInt2-delt2,UInt2+delt2); + Handle(Geom2dAdaptor_Curve) hc2d2 = + new Geom2dAdaptor_Curve(Fi2.PCurveOnSurf(),UInt2-delt2,UInt2+delt2); Adaptor3d_CurveOnSurface cons2(hc2d2,HS2); Extrema_LocateExtCC ext(cons1,cons2,UInt1,UInt2); if(ext.IsDone()) { @@ -3639,7 +3639,7 @@ void ChFi3d_ComputesIntPC (const ChFiDS_FaceInterference& Fi1, // SurfData Fd1 and trims it to allow the intersection computation //======================================================================= -Handle(GeomAdaptor_HSurface) ChFi3d_BoundSurf(TopOpeBRepDS_DataStructure& DStr, +Handle(GeomAdaptor_Surface) ChFi3d_BoundSurf(TopOpeBRepDS_DataStructure& DStr, const Handle(ChFiDS_SurfData)& Fd1, const Standard_Integer& IFaCo1, const Standard_Integer& IFaArc1) @@ -3649,8 +3649,8 @@ Handle(GeomAdaptor_HSurface) ChFi3d_BoundSurf(TopOpeBRepDS_DataStructure& DSt // They are preserver here as an option in case it will be necessary to set // more restrictive limits (with intersection points as additional argument). - Handle(GeomAdaptor_HSurface) HS1 = new GeomAdaptor_HSurface(); - GeomAdaptor_Surface& S1 = HS1->ChangeSurface(); + Handle(GeomAdaptor_Surface) HS1 = new GeomAdaptor_Surface(); + GeomAdaptor_Surface& S1 = *HS1; S1.Load(DStr.Surface(Fd1->Surf()).Surface()); if ((IFaCo1 == 0)||(IFaArc1 == 0)) @@ -3917,7 +3917,7 @@ static Standard_Boolean GoodExt(const Handle(Geom_Curve)& C, //purpose : //======================================================================= Standard_EXPORT -void ChFi3d_PerformElSpine(Handle(ChFiDS_HElSpine)& HES, +void ChFi3d_PerformElSpine(Handle(ChFiDS_ElSpine)& HES, Handle(ChFiDS_Spine)& Spine, const GeomAbs_Shape continuity, const Standard_Real tol, @@ -3937,7 +3937,7 @@ void ChFi3d_PerformElSpine(Handle(ChFiDS_HElSpine)& HES, TopoDS_Edge E, Eold; TopoDS_Vertex V; // - ChFiDS_ElSpine& ES = HES->ChangeCurve(); + ChFiDS_ElSpine& ES = *HES; WF = ES.FirstParameter(); WL = ES.LastParameter(); Wrefdeb = WF; diff --git a/src/ChFi3d/ChFi3d_Builder_0.hxx b/src/ChFi3d/ChFi3d_Builder_0.hxx index 14a6fa669b..e3655b03c9 100644 --- a/src/ChFi3d/ChFi3d_Builder_0.hxx +++ b/src/ChFi3d/ChFi3d_Builder_0.hxx @@ -26,7 +26,7 @@ #include #include #include -#include +#include #include #include #include @@ -51,12 +51,12 @@ #include #include #include -#include +#include #include -#include -#include -#include -#include +#include +#include +#include +#include #include #include #include @@ -101,7 +101,7 @@ void ChFi3d_EnlargeBox(const Handle(Geom_Curve)& C, Bnd_Box& box1, Bnd_Box& box2); -void ChFi3d_EnlargeBox(const Handle(Adaptor3d_HSurface)& S, +void ChFi3d_EnlargeBox(const Handle(Adaptor3d_Surface)& S, const Handle(Geom2d_Curve)& PC, const Standard_Real wd, const Standard_Real wf, @@ -152,8 +152,8 @@ void ChFi3d_BoundSrf(GeomAdaptor_Surface& S, const Standard_Real vmax, const Standard_Boolean checknaturalbounds = Standard_True); -Standard_Boolean ChFi3d_InterPlaneEdge (const Handle(Adaptor3d_HSurface)& Plan, - const Handle(Adaptor3d_HCurve)& C, +Standard_Boolean ChFi3d_InterPlaneEdge (const Handle(Adaptor3d_Surface)& Plan, + const Handle(Adaptor3d_Curve)& C, Standard_Real& W, const Standard_Boolean Sens, const Standard_Real tolc); @@ -183,7 +183,7 @@ Handle(Geom_BezierCurve) ChFi3d_Spine(const gp_Pnt& pd, const Standard_Real R); Handle(GeomFill_Boundary) ChFi3d_mkbound -(const Handle(Adaptor3d_HSurface)& Fac, +(const Handle(Adaptor3d_Surface)& Fac, Handle(Geom2d_Curve)& curv, const Standard_Integer sens1, const gp_Pnt2d& pfac1, @@ -195,7 +195,7 @@ Handle(GeomFill_Boundary) ChFi3d_mkbound const Standard_Real ta); Handle(GeomFill_Boundary) ChFi3d_mkbound -(const Handle(Adaptor3d_HSurface)& Surf, +(const Handle(Adaptor3d_Surface)& Surf, Handle(Geom2d_Curve)& curv, const Standard_Integer sens1, const gp_Pnt2d& p1, @@ -215,7 +215,7 @@ Handle(GeomFill_Boundary) ChFi3d_mkbound const Standard_Boolean isfreeboundary = Standard_False); Handle(GeomFill_Boundary) ChFi3d_mkbound -(const Handle(Adaptor3d_HSurface)& HS, +(const Handle(Adaptor3d_Surface)& HS, const gp_Pnt2d& p1, const gp_Pnt2d& p2, const Standard_Real t3d, @@ -223,14 +223,14 @@ Handle(GeomFill_Boundary) ChFi3d_mkbound const Standard_Boolean isfreeboundary = Standard_False); Handle(GeomFill_Boundary) ChFi3d_mkbound -(const Handle(Adaptor3d_HSurface)& HS, +(const Handle(Adaptor3d_Surface)& HS, const Handle(Geom2d_Curve)& curv, const Standard_Real t3d, const Standard_Real ta, const Standard_Boolean isfreeboundary = Standard_False); Handle(GeomFill_Boundary) ChFi3d_mkbound -(const Handle(Adaptor3d_HSurface)& Fac, +(const Handle(Adaptor3d_Surface)& Fac, Handle(Geom2d_Curve)& curv, const gp_Pnt2d& p1, const gp_Pnt2d& p2, @@ -252,7 +252,7 @@ Handle(Geom2d_Curve) ChFi3d_BuildPCurve const Standard_Boolean redresse = Standard_True); Handle(Geom2d_Curve) ChFi3d_BuildPCurve -(const Handle(Adaptor3d_HSurface)& Surf, +(const Handle(Adaptor3d_Surface)& Surf, const gp_Pnt2d& p1, const gp_Vec& v1, const gp_Pnt2d& p2, @@ -260,7 +260,7 @@ Handle(Geom2d_Curve) ChFi3d_BuildPCurve const Standard_Boolean redresse = Standard_False); Handle(Geom2d_Curve) ChFi3d_BuildPCurve -(const Handle(Adaptor3d_HSurface)& Surf, +(const Handle(Adaptor3d_Surface)& Surf, const gp_Pnt2d& p1, const gp_Vec2d& v1, const gp_Pnt2d& p2, @@ -268,15 +268,15 @@ Handle(Geom2d_Curve) ChFi3d_BuildPCurve const Standard_Boolean redresse = Standard_False); Standard_Boolean ChFi3d_CheckSameParameter -(const Handle(Adaptor3d_HCurve)& C3d, +(const Handle(Adaptor3d_Curve)& C3d, Handle(Geom2d_Curve)& Pcurv, - const Handle(Adaptor3d_HSurface)& S, + const Handle(Adaptor3d_Surface)& S, const Standard_Real tol3d, Standard_Real& tolreached); -Standard_Boolean ChFi3d_SameParameter(const Handle(Adaptor3d_HCurve)& C3d, +Standard_Boolean ChFi3d_SameParameter(const Handle(Adaptor3d_Curve)& C3d, Handle(Geom2d_Curve)& Pcurv, - const Handle(Adaptor3d_HSurface)& S, + const Handle(Adaptor3d_Surface)& S, const Standard_Real tol3d, Standard_Real& tolreached); @@ -299,11 +299,11 @@ void ChFi3d_ComputePCurv(const Handle(Geom_Curve)& C3d, Standard_Real& tolreached, const Standard_Boolean reverse = Standard_False); -void ChFi3d_ComputePCurv(const Handle(Adaptor3d_HCurve)& C3d, +void ChFi3d_ComputePCurv(const Handle(Adaptor3d_Curve)& C3d, const gp_Pnt2d& UV1, const gp_Pnt2d& UV2, Handle(Geom2d_Curve)& Pcurv, - const Handle(Adaptor3d_HSurface)& S, + const Handle(Adaptor3d_Surface)& S, const Standard_Real Pardeb, const Standard_Real Parfin, const Standard_Real tol3d, @@ -349,8 +349,8 @@ Standard_Boolean ChFi3d_IsInFront(TopOpeBRepDS_DataStructure& DStr, const Standard_Boolean Check2dDistance = Standard_False, const Standard_Boolean enlarge = Standard_False); -void ChFi3d_ProjectPCurv(const Handle(Adaptor3d_HCurve)& HCg, - const Handle(Adaptor3d_HSurface)& HSg, +void ChFi3d_ProjectPCurv(const Handle(Adaptor3d_Curve)& HCg, + const Handle(Adaptor3d_Surface)& HSg, Handle(Geom2d_Curve)& Pcurv, const Standard_Real tol3d, Standard_Real& tolreached) ; @@ -430,11 +430,11 @@ TopoDS_Edge ChFi3d_EdgeFromV1(const TopoDS_Vertex& V1, const Handle(ChFiDS_Stripe)& CD, Standard_Integer& sens); -Standard_Real ChFi3d_ConvTol2dToTol3d(const Handle(Adaptor3d_HSurface)& S, +Standard_Real ChFi3d_ConvTol2dToTol3d(const Handle(Adaptor3d_Surface)& S, const Standard_Real tol2d); -Standard_Boolean ChFi3d_ComputeCurves(const Handle(Adaptor3d_HSurface)& S1, - const Handle(Adaptor3d_HSurface)& S2, +Standard_Boolean ChFi3d_ComputeCurves(const Handle(Adaptor3d_Surface)& S1, + const Handle(Adaptor3d_Surface)& S2, const TColStd_Array1OfReal& Pardeb, const TColStd_Array1OfReal& Parfin, Handle(Geom_Curve)& C3d, @@ -446,27 +446,27 @@ Standard_Boolean ChFi3d_ComputeCurves(const Handle(Adaptor3d_HSurface)& S1, const Standard_Boolean wholeCurv = Standard_True); -Standard_Boolean ChFi3d_IntCS(const Handle(Adaptor3d_HSurface)& S, - const Handle(Adaptor3d_HCurve)& C, +Standard_Boolean ChFi3d_IntCS(const Handle(Adaptor3d_Surface)& S, + const Handle(Adaptor3d_Curve)& C, gp_Pnt2d& p2dS, Standard_Real& wc); void ChFi3d_ComputesIntPC (const ChFiDS_FaceInterference& Fi1, const ChFiDS_FaceInterference& Fi2, - const Handle(GeomAdaptor_HSurface)& HS1, - const Handle(GeomAdaptor_HSurface)& HS2, + const Handle(GeomAdaptor_Surface)& HS1, + const Handle(GeomAdaptor_Surface)& HS2, Standard_Real& UInt1, Standard_Real& UInt2); void ChFi3d_ComputesIntPC (const ChFiDS_FaceInterference& Fi1, const ChFiDS_FaceInterference& Fi2, - const Handle(GeomAdaptor_HSurface)& HS1, - const Handle(GeomAdaptor_HSurface)& HS2, + const Handle(GeomAdaptor_Surface)& HS1, + const Handle(GeomAdaptor_Surface)& HS2, Standard_Real& UInt1, Standard_Real& UInt2, gp_Pnt& P); -Handle(GeomAdaptor_HSurface) ChFi3d_BoundSurf(TopOpeBRepDS_DataStructure& DStr, +Handle(GeomAdaptor_Surface) ChFi3d_BoundSurf(TopOpeBRepDS_DataStructure& DStr, const Handle(ChFiDS_SurfData)& Fd1, const Standard_Integer& IFaCo1, const Standard_Integer& IFaArc1); @@ -502,14 +502,14 @@ void ChFi3d_TrimCurve(const Handle(Geom_Curve)& gc, const gp_Pnt& LastP, Handle(Geom_TrimmedCurve)& gtc); -Standard_EXPORT void ChFi3d_PerformElSpine(Handle(ChFiDS_HElSpine)& HES, +Standard_EXPORT void ChFi3d_PerformElSpine(Handle(ChFiDS_ElSpine)& HES, Handle(ChFiDS_Spine)& Spine, const GeomAbs_Shape continuity, const Standard_Real tol, const Standard_Boolean IsOffset = Standard_False); TopoDS_Face ChFi3d_EnlargeFace(const Handle(ChFiDS_Spine)& Spine, - const Handle(BRepAdaptor_HSurface)& HS, + const Handle(BRepAdaptor_Surface)& HS, const Standard_Real Tol ); @@ -523,9 +523,9 @@ void ChFi3d_cherche_element( const TopoDS_Vertex & V, TopoDS_Edge & E , TopoDS_Vertex & Vtx ); -Standard_Real ChFi3d_EvalTolReached(const Handle(Adaptor3d_HSurface)& S1, +Standard_Real ChFi3d_EvalTolReached(const Handle(Adaptor3d_Surface)& S1, const Handle(Geom2d_Curve)& pc1, - const Handle(Adaptor3d_HSurface)& S2, + const Handle(Adaptor3d_Surface)& S2, const Handle(Geom2d_Curve)& pc2, const Handle(Geom_Curve)& C); diff --git a/src/ChFi3d/ChFi3d_Builder_1.cxx b/src/ChFi3d/ChFi3d_Builder_1.cxx index dc71bc39ef..8897fb1f5a 100644 --- a/src/ChFi3d/ChFi3d_Builder_1.cxx +++ b/src/ChFi3d/ChFi3d_Builder_1.cxx @@ -15,8 +15,8 @@ // commercial license or contractual agreement. -#include -#include +#include +#include #include #include #include @@ -28,8 +28,7 @@ #include #include #include -#include -#include +#include #include #include #include @@ -41,7 +40,7 @@ #include #include #include -#include +#include #include #include #include @@ -627,15 +626,15 @@ Standard_Boolean ChFi3d_Builder::FaceTangency(const TopoDS_Edge& E0, //======================================================================= static Standard_Boolean TangentExtremity(const TopoDS_Vertex& V, const TopoDS_Edge& E, - const Handle(BRepAdaptor_HSurface)& hs1, - const Handle(BRepAdaptor_HSurface)& hs2, + const Handle(BRepAdaptor_Surface)& hs1, + const Handle(BRepAdaptor_Surface)& hs2, // const Standard_Real t3d, const Standard_Real tang) { - TopoDS_Face f1 = hs1->ChangeSurface().Face(); + TopoDS_Face f1 = hs1->Face(); TopAbs_Orientation O1 = f1.Orientation(); f1.Orientation(TopAbs_FORWARD); - TopoDS_Face f2 = hs2->ChangeSurface().Face(); + TopoDS_Face f2 = hs2->Face(); TopAbs_Orientation O2 = f2.Orientation(); f2.Orientation(TopAbs_FORWARD); TopoDS_Edge e1 = E, e2 = E; @@ -649,7 +648,7 @@ static Standard_Boolean TangentExtremity(const TopoDS_Vertex& V, gp_Vec n1, n2;// gp_Pnt pt1,pt2; Handle(Geom2d_Curve) pc1 = BRep_Tool::CurveOnSurface(e1,f1,f,l); pc1->Value(p1).Coord(u,v); - BRepLProp_SLProps theProp1(hs1->ChangeSurface(), u, v, 1, Eps); + BRepLProp_SLProps theProp1 (*hs1, u, v, 1, Eps); if (theProp1.IsNormalDefined()) { n1.SetXYZ(theProp1.Normal().XYZ()); if (O1 == TopAbs_REVERSED) n1.Reverse(); @@ -659,7 +658,7 @@ static Standard_Boolean TangentExtremity(const TopoDS_Vertex& V, Handle(Geom2d_Curve) pc2 = BRep_Tool::CurveOnSurface(e2,f2,f,l); pc2->Value(p2).Coord(u,v); - BRepLProp_SLProps theProp2(hs2->ChangeSurface(), u, v, 1, Eps); + BRepLProp_SLProps theProp2 (*hs2, u, v, 1, Eps); if (theProp2.IsNormalDefined()) { n2.SetXYZ(theProp2.Normal().XYZ()); if(O2 == TopAbs_REVERSED) n2.Reverse(); @@ -681,8 +680,8 @@ static Standard_Boolean TangentOnVertex(const TopoDS_Vertex& V, TopoDS_Face ff1,ff2; ChFi3d_conexfaces(E,ff1,ff2,EFMap); if(ff1.IsNull() || ff2.IsNull()) return 0; - Handle(BRepAdaptor_HSurface) S1 = new (BRepAdaptor_HSurface)(ff1); - Handle(BRepAdaptor_HSurface) S2 = new (BRepAdaptor_HSurface)(ff2); + Handle(BRepAdaptor_Surface) S1 = new (BRepAdaptor_Surface)(ff1); + Handle(BRepAdaptor_Surface) S2 = new (BRepAdaptor_Surface)(ff2); return TangentExtremity(V, E, S1, S2, tang); } @@ -702,7 +701,7 @@ void ChFi3d_Builder::PerformExtremity (const Handle(ChFiDS_Spine)& Spine) TopoDS_Vertex V; ChFiDS_State sst; Standard_Integer iedge; - Handle(BRepAdaptor_HSurface) hs1,hs2; + Handle(BRepAdaptor_Surface) hs1,hs2; if(ii == 1){ sst = Spine->FirstStatus(); iedge = 1; diff --git a/src/ChFi3d/ChFi3d_Builder_2.cxx b/src/ChFi3d/ChFi3d_Builder_2.cxx index 083113283a..f25c810173 100644 --- a/src/ChFi3d/ChFi3d_Builder_2.cxx +++ b/src/ChFi3d/ChFi3d_Builder_2.cxx @@ -15,8 +15,8 @@ // commercial license or contractual agreement. -#include -#include +#include +#include #include #include #include @@ -28,9 +28,7 @@ #include #include #include -#include -#include -#include +#include #include #include #include @@ -48,7 +46,7 @@ #include #include #include -#include +#include #include #include #include @@ -68,8 +66,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include @@ -129,7 +127,7 @@ extern void ChFi3d_ResultChron(OSD_Chronometer & ch, Standard_Real& time); //==================================================================== static void ChFi3d_CoupeParPlan (const ChFiDS_CommonPoint & compoint1, const ChFiDS_CommonPoint & compoint2, - Handle(GeomAdaptor_HSurface)& HConge, + Handle(GeomAdaptor_Surface)& HConge, const gp_Pnt2d & UV1, const gp_Pnt2d & UV2, const Standard_Real tol3d, @@ -160,7 +158,7 @@ static void ChFi3d_CoupeParPlan (const ChFiDS_CommonPoint & compoint1, Standard_Real scal; scal=Abs(nor.Dot(tgt2)); if (scal<0.01) { - Handle(GeomAdaptor_HSurface) HPlan=new GeomAdaptor_HSurface(Plan); + Handle(GeomAdaptor_Surface) HPlan=new GeomAdaptor_Surface(Plan); Handle(Geom2d_Curve) C2dint2; TColStd_Array1OfReal Pdeb(1,4),Pfin(1,4); GeomAdaptor_Surface AS(Plan); @@ -212,9 +210,9 @@ static Standard_Boolean SortieTangente(const ChFiDS_CommonPoint& CP, //======================================================================= static Standard_Boolean BonVoisin(const gp_Pnt& Point, - Handle(BRepAdaptor_HSurface)& HS, + Handle(BRepAdaptor_Surface)& HS, TopoDS_Face& F, - Handle(GeomAdaptor_HSurface)& plane, + Handle(GeomAdaptor_Surface)& plane, const TopoDS_Edge& cured, Standard_Real& XDep, Standard_Real& YDep, @@ -225,7 +223,7 @@ static Standard_Boolean BonVoisin(const gp_Pnt& Point, Standard_Real winter, Uf, Ul; gp_Pnt papp = HS->Value(XDep, YDep); Standard_Real dist = RealLast(); - Handle(BRepAdaptor_HCurve) hc = new BRepAdaptor_HCurve(); + Handle(BRepAdaptor_Curve) hc = new BRepAdaptor_Curve(); Handle(Geom2d_Curve) PC; Standard_Boolean found = 0; @@ -233,8 +231,8 @@ static Standard_Boolean BonVoisin(const gp_Pnt& Point, for(Ex.Init(F,TopAbs_EDGE); Ex.More(); Ex.Next()){ const TopoDS_Edge& ecur = TopoDS::Edge(Ex.Current()); if(!ecur.IsSame(cured)){ - hc->ChangeCurve().Initialize(ecur); - Standard_Real tolc = hc->ChangeCurve().Resolution(tolesp); + hc->Initialize(ecur); + Standard_Real tolc = hc->Resolution(tolesp); if(ChFi3d_InterPlaneEdge(plane,hc,winter,1,tolc)){ gp_Pnt np = hc->Value(winter); Standard_Real ndist = np.SquareDistance(papp); @@ -257,7 +255,7 @@ static Standard_Boolean BonVoisin(const gp_Pnt& Point, TopoDS_Edge newe = ecur; newe.Orientation(TopAbs_FORWARD); dist = ndist; - HS->ChangeSurface().Initialize(ff); + HS->Initialize(ff); if(isclosed && !isreallyclosed){ TopoDS_Face fff = ff; fff.Orientation(TopAbs_FORWARD); @@ -586,15 +584,15 @@ CallPerformSurf(Handle(ChFiDS_Stripe)& Stripe, const Standard_Boolean Simul, ChFiDS_SequenceOfSurfData& SeqSD, Handle(ChFiDS_SurfData)& SD, - const Handle(ChFiDS_HElSpine)& HGuide, + const Handle(ChFiDS_ElSpine)& HGuide, const Handle(ChFiDS_Spine)& Spine, - const Handle(BRepAdaptor_HSurface)& HS1, - const Handle(BRepAdaptor_HSurface)& HS3, + const Handle(BRepAdaptor_Surface)& HS1, + const Handle(BRepAdaptor_Surface)& HS3, const gp_Pnt2d& pp1, const gp_Pnt2d& pp3, const Handle(Adaptor3d_TopolTool)& It1, - const Handle(BRepAdaptor_HSurface)& HS2, - const Handle(BRepAdaptor_HSurface)& HS4, + const Handle(BRepAdaptor_Surface)& HS2, + const Handle(BRepAdaptor_Surface)& HS4, const gp_Pnt2d& pp2, const gp_Pnt2d& pp4, const Handle(Adaptor3d_TopolTool)& It2, @@ -611,22 +609,22 @@ CallPerformSurf(Handle(ChFiDS_Stripe)& Stripe, math_Vector& Soldep, Standard_Integer& intf, Standard_Integer& intl, - Handle(BRepAdaptor_HSurface)& Surf1, - Handle(BRepAdaptor_HSurface)& Surf2) + Handle(BRepAdaptor_Surface)& Surf1, + Handle(BRepAdaptor_Surface)& Surf2) { #ifdef OCCT_DEBUG OSD_Chronometer ch1; #endif - Handle(BRepAdaptor_HSurface) HSon1, HSon2; + Handle(BRepAdaptor_Surface) HSon1, HSon2; HSon1 = HS1; HSon2 = HS2; // Definition of the domain of path It1, It2 - It1->Initialize((const Handle(Adaptor3d_HSurface)&)HSon1); - It2->Initialize((const Handle(Adaptor3d_HSurface)&)HSon2); + It1->Initialize((const Handle(Adaptor3d_Surface)&)HSon1); + It2->Initialize((const Handle(Adaptor3d_Surface)&)HSon2); - TopAbs_Orientation Or1 = HS1->ChangeSurface().Face().Orientation(); - TopAbs_Orientation Or2 = HS2->ChangeSurface().Face().Orientation(); + TopAbs_Orientation Or1 = HS1->Face().Orientation(); + TopAbs_Orientation Or2 = HS2->Face().Orientation(); Standard_Integer Choix = ChFi3d::NextSide(Or1,Or2, Stripe->OrientationOnFace1(), @@ -664,15 +662,15 @@ CallPerformSurf(Handle(ChFiDS_Stripe)& Stripe, Standard_Boolean reprise = Standard_False; if (! HS3.IsNull()) { HSon1 = HS3; - It1->Initialize((const Handle(Adaptor3d_HSurface)&)HS3); - Or1 = HS3->ChangeSurface().Face().Orientation(); + It1->Initialize((const Handle(Adaptor3d_Surface)&)HS3); + Or1 = HS3->Face().Orientation(); Soldep(1) = pp3.X(); Soldep(2) = pp3.Y(); reprise = Standard_True; } else if (! HS4.IsNull()) { HSon2 = HS4; - It2->Initialize((const Handle(Adaptor3d_HSurface)&)HS4); - Or2 = HS4->ChangeSurface().Face().Orientation(); + It2->Initialize((const Handle(Adaptor3d_Surface)&)HS4); + Or2 = HS4->Face().Orientation(); Soldep(3) = pp4.X(); Soldep(4) = pp4.Y(); reprise = Standard_True; } @@ -751,13 +749,13 @@ Standard_Boolean ChFi3d_Builder::StripeOrientations void ChFi3d_Builder::ConexFaces (const Handle(ChFiDS_Spine)& Spine, const Standard_Integer IEdge, - Handle(BRepAdaptor_HSurface)& HS1, - Handle(BRepAdaptor_HSurface)& HS2) const + Handle(BRepAdaptor_Surface)& HS1, + Handle(BRepAdaptor_Surface)& HS2) const { - if(HS1.IsNull()) HS1 = new BRepAdaptor_HSurface (); - if(HS2.IsNull()) HS2 = new BRepAdaptor_HSurface (); - BRepAdaptor_Surface& Sb1 = HS1->ChangeSurface(); - BRepAdaptor_Surface& Sb2 = HS2->ChangeSurface(); + if(HS1.IsNull()) HS1 = new BRepAdaptor_Surface (); + if(HS2.IsNull()) HS2 = new BRepAdaptor_Surface (); + BRepAdaptor_Surface& Sb1 = *HS1; + BRepAdaptor_Surface& Sb2 = *HS2; TopoDS_Face ff1,ff2; TopoDS_Edge anEdge = Spine->Edges(IEdge); @@ -781,9 +779,9 @@ void ChFi3d_Builder::ConexFaces (const Handle(ChFiDS_Spine)& Spine, //======================================================================= void ChFi3d_Builder::StartSol(const Handle(ChFiDS_Stripe)& Stripe, - const Handle(ChFiDS_HElSpine)& HGuide, - Handle(BRepAdaptor_HSurface)& HS1, - Handle(BRepAdaptor_HSurface)& HS2, + const Handle(ChFiDS_ElSpine)& HGuide, + Handle(BRepAdaptor_Surface)& HS1, + Handle(BRepAdaptor_Surface)& HS2, Handle(BRepTopAdaptor_TopolTool)& I1, Handle(BRepTopAdaptor_TopolTool)& I2, gp_Pnt2d& P1, @@ -791,7 +789,7 @@ void ChFi3d_Builder::StartSol(const Handle(ChFiDS_Stripe)& Stripe, Standard_Real& First) const { Handle(ChFiDS_Spine)& Spine = Stripe->ChangeSpine(); - ChFiDS_ElSpine& els = HGuide->ChangeCurve(); + ChFiDS_ElSpine& els = *HGuide; Standard_Integer nbed = Spine->NbEdges(); Standard_Integer nbessaimax = 3*nbed; if (nbessaimax < 10) nbessaimax = 10; @@ -830,8 +828,8 @@ void ChFi3d_Builder::StartSol(const Handle(ChFiDS_Stripe)& Stripe, cured = Spine->Edges(iedge); TolE = BRep_Tool::Tolerance(cured); ConexFaces(Spine,iedge,HS1,HS2); - f1 = HS1->ChangeSurface().Face(); - f2 = HS2->ChangeSurface().Face(); + f1 = HS1->Face(); + f2 = HS2->Face(); Or1 = f1.Orientation(); Or2 = f2.Orientation(); Choix = ChFi3d::NextSide(Or1,Or2, @@ -847,7 +845,7 @@ void ChFi3d_Builder::StartSol(const Handle(ChFiDS_Stripe)& Stripe, f1forward.Orientation(TopAbs_FORWARD); f2forward.Orientation(TopAbs_FORWARD); PC = BRep_Tool::CurveOnSurface(cured,f1forward,Uf,Ul); - I1->Initialize((const Handle(Adaptor3d_HSurface)&)HS1); + I1->Initialize((const Handle(Adaptor3d_Surface)&)HS1); PC->D1(woned, P1, derive); // There are ponts on the border, and internal points are found if (derive.Magnitude() > Precision::PConfusion()) { @@ -871,7 +869,7 @@ void ChFi3d_Builder::StartSol(const Handle(ChFiDS_Stripe)& Stripe, if(f1.IsSame(f2)) cured.Orientation(TopAbs_REVERSED); PC = BRep_Tool::CurveOnSurface(cured,f2forward,Uf,Ul); P2 = PC->Value(woned); - const Handle(Adaptor3d_HSurface)& HSon2 = HS2; // to avoid ambiguity + const Handle(Adaptor3d_Surface)& HSon2 = HS2; // to avoid ambiguity I2->Initialize(HSon2); SolDep(1) = P1.X(); SolDep(2) = P1.Y(); @@ -897,8 +895,8 @@ void ChFi3d_Builder::StartSol(const Handle(ChFiDS_Stripe)& Stripe, iedge = Spine->Index(w); cured = Spine->Edges(iedge); ConexFaces(Spine,iedge,HS1,HS2); - f1 = HS1->ChangeSurface().Face(); - f2 = HS2->ChangeSurface().Face(); + f1 = HS1->Face(); + f2 = HS2->Face(); Or1 = f1.Orientation(); Or2 = f2.Orientation(); Choix = ChFi3d::NextSide(Or1,Or2, @@ -914,8 +912,8 @@ void ChFi3d_Builder::StartSol(const Handle(ChFiDS_Stripe)& Stripe, P1 = PC->Value(woned); PC = BRep_Tool::CurveOnSurface(cured,f2forward,Uf,Ul); P2 = PC->Value(woned); - const Handle(Adaptor3d_HSurface)& HSon1 = HS1; // to avoid ambiguity - const Handle(Adaptor3d_HSurface)& HSon2 = HS2; // to avoid ambiguity + const Handle(Adaptor3d_Surface)& HSon1 = HS1; // to avoid ambiguity + const Handle(Adaptor3d_Surface)& HSon2 = HS2; // to avoid ambiguity I1->Initialize(HSon1); I2->Initialize(HSon2); SolDep(1) = P1.X(); SolDep(2) = P1.Y(); @@ -932,7 +930,7 @@ void ChFi3d_Builder::StartSol(const Handle(ChFiDS_Stripe)& Stripe, gp_Vec V; HGuide->D1(w,P,V); Handle(Geom_Plane) pl = new Geom_Plane(P,V); - Handle(GeomAdaptor_HSurface) plane = new GeomAdaptor_HSurface(pl); + Handle(GeomAdaptor_Surface) plane = new GeomAdaptor_Surface(pl); Standard_Boolean bonvoisin = 1, found = 0; Standard_Integer NbChangement; @@ -947,16 +945,16 @@ void ChFi3d_Builder::StartSol(const Handle(ChFiDS_Stripe)& Stripe, SolDep(3),SolDep(4), myEFMap, tolesp); } if(bonvoisin){ - f1 = HS1->ChangeSurface().Face(); - f2 = HS2->ChangeSurface().Face(); + f1 = HS1->Face(); + f2 = HS2->Face(); Or1 = f1.Orientation(); Or2 = f2.Orientation(); Choix = ChFi3d::NextSide(Or1,Or2, Stripe->OrientationOnFace1(), Stripe->OrientationOnFace2(), RC); - const Handle(Adaptor3d_HSurface)& HSon1new = HS1; // to avoid ambiguity - const Handle(Adaptor3d_HSurface)& HSon2new = HS2; // to avoid ambiguity + const Handle(Adaptor3d_Surface)& HSon1new = HS1; // to avoid ambiguity + const Handle(Adaptor3d_Surface)& HSon2new = HS2; // to avoid ambiguity I1->Initialize(HSon1new); I2->Initialize(HSon2new); if(PerformFirstSection(Spine,HGuide,Choix,HS1,HS2, @@ -981,7 +979,7 @@ void ChFi3d_Builder::StartSol(const Handle(ChFiDS_Stripe)& Stripe, //======================================================================= static void ChFi3d_BuildPlane (TopOpeBRepDS_DataStructure& DStr, - Handle(BRepAdaptor_HSurface)& HS, + Handle(BRepAdaptor_Surface)& HS, gp_Pnt2d& pons, const Handle(ChFiDS_SurfData)& SD, const Standard_Boolean isfirst, @@ -997,14 +995,14 @@ static void ChFi3d_BuildPlane (TopOpeBRepDS_DataStructure& DStr, Hc = BRep_Tool::CurveOnSurface (SD->Vertex(isfirst,ons).Arc(),F,u,v); Hc->Value(SD->Vertex(isfirst,ons).ParameterOnArc()).Coord(u,v); - BRepLProp_SLProps theProp(HS->ChangeSurface(), u, v, 1, 1.e-12); + BRepLProp_SLProps theProp (*HS, u, v, 1, 1.e-12); if (theProp.IsNormalDefined()) { P = theProp.Value(); Handle(Geom_Plane) Pln = new Geom_Plane(P, theProp.Normal()); TopoDS_Face NewF = BRepLib_MakeFace(Pln, Precision::Confusion()); NewF.Orientation(F.Orientation()); pons.SetCoord(0.,0.); - HS->ChangeSurface().Initialize(NewF); + HS->Initialize(NewF); return; // everything is good ! } } @@ -1029,20 +1027,20 @@ static void ChFi3d_BuildPlane (TopOpeBRepDS_DataStructure& DStr, Standard_Boolean ChFi3d_Builder::StartSol(const Handle(ChFiDS_Spine)& Spine, - Handle(BRepAdaptor_HSurface)& HS, // New face + Handle(BRepAdaptor_Surface)& HS, // New face gp_Pnt2d& pons,// " Localization - Handle(BRepAdaptor_HCurve2d)& HC, // Representation of the obstacle + Handle(BRepAdaptor_Curve2d)& HC, // Representation of the obstacle Standard_Real& W, const Handle(ChFiDS_SurfData)& SD, const Standard_Boolean isfirst, const Standard_Integer ons, - Handle(BRepAdaptor_HSurface)& HSref, // The other representation - Handle(BRepAdaptor_HCurve2d)& HCref, // of the obstacle + Handle(BRepAdaptor_Surface)& HSref, // The other representation + Handle(BRepAdaptor_Curve2d)& HCref, // of the obstacle Standard_Boolean& RecP, Standard_Boolean& RecS, Standard_Boolean& RecRst, Standard_Boolean& c1obstacle, - Handle(BRepAdaptor_HSurface)& HSBis, // Face of support + Handle(BRepAdaptor_Surface)& HSBis, // Face of support gp_Pnt2d& PBis, // and its point const Standard_Boolean decroch, const TopoDS_Vertex& Vref) const @@ -1055,7 +1053,7 @@ ChFi3d_Builder::StartSol(const Handle(ChFiDS_Spine)& Spine, Standard_Real Uf,Ul; TopoDS_Face F = TopoDS::Face(DStr.Shape(SD->Index(ons))); - if(!HSref.IsNull()) Fref = HSref->ChangeSurface().Face(); + if(!HSref.IsNull()) Fref = HSref->Face(); const ChFiDS_CommonPoint& CP = SD->Vertex(isfirst,ons); HSBis.Nullify(); @@ -1075,7 +1073,7 @@ ChFi3d_Builder::StartSol(const Handle(ChFiDS_Spine)& Spine, else isExtend = (tns-ts > 100*tolesp); if (isExtend && !CP.Point().IsEqual(CPbis.Point(), 0) ) { // the state is preserved and False is returned (extension by the expected plane). - HS->ChangeSurface().Initialize(F); + HS->Initialize(F); pc = SD->Interference(ons).PCurveOnFace(); // The 2nd point is given by its trace on the support surface RecS = Standard_False; @@ -1089,7 +1087,7 @@ ChFi3d_Builder::StartSol(const Handle(ChFiDS_Spine)& Spine, //The edge is changed, the parameter is updated and //eventually the support face and(or) the reference face. TopoDS_Vertex VCP = CP.Vertex(); - TopoDS_Edge EHC = HC->ChangeCurve2d().Edge(); + TopoDS_Edge EHC = HC->Edge(); //One starts by searching in Fref another edge referencing VCP. TopExp_Explorer ex1,ex2; TopoDS_Edge newedge, edgereg; @@ -1146,7 +1144,7 @@ ChFi3d_Builder::StartSol(const Handle(ChFiDS_Spine)& Spine, else if(!edgereg.IsNull()){ // the reference edge and face are changed. Fref = facereg; - HSref->ChangeSurface().Initialize(Fref); + HSref->Initialize(Fref); for(ex1.Init(facereg,TopAbs_EDGE); ex1.More() && newedge.IsNull(); ex1.Next()){ const TopoDS_Edge& cured = TopoDS::Edge(ex1.Current()); if(!cured.IsSame(edgereg)){ @@ -1173,9 +1171,9 @@ ChFi3d_Builder::StartSol(const Handle(ChFiDS_Spine)& Spine, throw Standard_Failure("StartSol : chain is not possible, new obstacle not found"); } else{ - HS->ChangeSurface().Initialize(Fv); + HS->Initialize(Fv); W = BRep_Tool::Parameter(VCP,newedge); - HCref->ChangeCurve2d().Initialize(newedge,Fref); + HCref->Initialize(newedge,Fref); TopoDS_Face newface = Fv; newface.Orientation(TopAbs_FORWARD); TopExp_Explorer ex; @@ -1185,7 +1183,7 @@ ChFi3d_Builder::StartSol(const Handle(ChFiDS_Spine)& Spine, break; } } - HC->ChangeCurve2d().Initialize(newedge,Fv); + HC->Initialize(newedge,Fv); pons = HC->Value(W); } RecP = c1obstacle = 1; @@ -1204,7 +1202,7 @@ ChFi3d_Builder::StartSol(const Handle(ChFiDS_Spine)& Spine, if (CP.IsOnArc()){ const TopoDS_Edge& E = CP.Arc(); if(decroch){ - HS->ChangeSurface().Initialize(Fref); + HS->Initialize(Fref); W = CP.ParameterOnArc(); pc = BRep_Tool::CurveOnSurface(E,Fref,Uf,Ul); pons = pc->Value(W); @@ -1212,7 +1210,7 @@ ChFi3d_Builder::StartSol(const Handle(ChFiDS_Spine)& Spine, return 1; } if (SearchFace(Spine,CP,F,Fv)){ - HS->ChangeSurface().Initialize(Fv); + HS->Initialize(Fv); RecS = 1; if (CP.IsVertex()) { // One goes directly by the Vertex @@ -1222,9 +1220,9 @@ ChFi3d_Builder::StartSol(const Handle(ChFiDS_Spine)& Spine, Nb = SearchFaceOnV(CP, F, myVEMap, myEFMap, Fv, aux); pons = BRep_Tool::Parameters(CP.Vertex(), Fv); - HS->ChangeSurface().Initialize(Fv); + HS->Initialize(Fv); if (Nb >=2) { - HSBis = new (BRepAdaptor_HSurface)(aux); + HSBis = new (BRepAdaptor_Surface)(aux); PBis = BRep_Tool::Parameters(CP.Vertex(), aux); } return 1; @@ -1244,7 +1242,7 @@ ChFi3d_Builder::StartSol(const Handle(ChFiDS_Spine)& Spine, // In cas of Tangent output, the current face becomes the support face if (SortieTangente(CP, F, SD, ons, 0.1)) { pc = BRep_Tool::CurveOnSurface(CP.Arc(),F,Uf,Ul); - HSBis = new (BRepAdaptor_HSurface)(F); + HSBis = new (BRepAdaptor_Surface)(F); PBis = pc->Value(CP.ParameterOnArc()); } @@ -1272,10 +1270,10 @@ ChFi3d_Builder::StartSol(const Handle(ChFiDS_Spine)& Spine, } } if(c1obstacle){ - HS->ChangeSurface().Initialize(Fv); - HSref->ChangeSurface().Initialize(F); + HS->Initialize(Fv); + HSref->Initialize(F); W = CP.ParameterOnArc(); - HC = new BRepAdaptor_HCurve2d(); + HC = new BRepAdaptor_Curve2d(); TopoDS_Edge newedge; TopoDS_Face newface = Fv; newface.Orientation(TopAbs_FORWARD); @@ -1286,15 +1284,15 @@ ChFi3d_Builder::StartSol(const Handle(ChFiDS_Spine)& Spine, break; } } - HC->ChangeCurve2d().Initialize(newedge,Fv); + HC->Initialize(newedge,Fv); pons = HC->Value(W); - HCref->ChangeCurve2d().Initialize(E,F); + HCref->Initialize(E,F); if(CP.IsVertex()) RecP = 1; else RecRst = 1; return 1; } else{ - HS->ChangeSurface().Initialize(F); + HS->Initialize(F); W = CP.ParameterOnArc(); pc = BRep_Tool::CurveOnSurface(E,F,Uf,Ul); pons = pc->Value(W); @@ -1302,7 +1300,7 @@ ChFi3d_Builder::StartSol(const Handle(ChFiDS_Spine)& Spine, } } else{ // there is no neighbor face, the state is preserved and False is returned. - HS->ChangeSurface().Initialize(F); + HS->Initialize(F); W = CP.ParameterOnArc(); pc = BRep_Tool::CurveOnSurface(E,F,Uf,Ul); pons = pc->Value(W); @@ -1310,7 +1308,7 @@ ChFi3d_Builder::StartSol(const Handle(ChFiDS_Spine)& Spine, } } else{ - HS->ChangeSurface().Initialize(F); + HS->Initialize(F); const ChFiDS_FaceInterference& FI = SD->Interference(ons); if(FI.PCurveOnFace().IsNull()) pons = SD->Get2dPoints(isfirst,ons); else pons = FI.PCurveOnFace()->Value(FI.Parameter(isfirst)); @@ -1628,7 +1626,7 @@ static void ChFi3d_MakeExtremities(Handle(ChFiDS_Stripe)& Stripe, Value(SDdeb->InterferenceOnS2().FirstParameter()); // The intersection of the fillet by a plane is attempted - Handle(GeomAdaptor_HSurface) HConge=ChFi3d_BoundSurf(DStr,SDdeb,1,2); + Handle(GeomAdaptor_Surface) HConge=ChFi3d_BoundSurf(DStr,SDdeb,1,2); ChFi3d_CoupeParPlan(cpdeb1,cpdeb2,HConge,UV1,UV2, tol3d,tol2d,C3d,Stripe->ChangeFirstPCurve(),tolreached, Pardeb,Parfin,plane); @@ -1690,7 +1688,7 @@ static void ChFi3d_MakeExtremities(Handle(ChFiDS_Stripe)& Stripe, Value(SDfin->InterferenceOnS2().LastParameter()); // Intersection of the fillet by a plane is attempted - Handle(GeomAdaptor_HSurface) HConge=ChFi3d_BoundSurf(DStr,SDfin,1,2); + Handle(GeomAdaptor_Surface) HConge=ChFi3d_BoundSurf(DStr,SDfin,1,2); ChFi3d_CoupeParPlan(cpfin1,cpfin2,HConge,UV1,UV2, tol3d,tol2d,C3d,Stripe->ChangeLastPCurve(),tolreached, Pardeb,Parfin,plane); @@ -1855,7 +1853,7 @@ static void InsertBefore (Handle(ChFiDS_Stripe)& Stripe, //======================================================================= void ChFi3d_Builder::PerformSetOfSurfOnElSpine -(const Handle(ChFiDS_HElSpine)& HGuide, +(const Handle(ChFiDS_ElSpine)& HGuide, Handle(ChFiDS_Stripe)& Stripe, Handle(BRepTopAdaptor_TopolTool)& It1, Handle(BRepTopAdaptor_TopolTool)& It2, @@ -1870,9 +1868,9 @@ void ChFi3d_Builder::PerformSetOfSurfOnElSpine //gp_Vec d1gui; //( HGuide->Curve() ).D1(HGuide->FirstParameter(),ptgui,d1gui); - ChFiDS_ElSpine& Guide = HGuide->ChangeCurve(); + ChFiDS_ElSpine& Guide = *HGuide; - Handle(ChFiDS_HElSpine) OffsetHGuide; + Handle(ChFiDS_ElSpine) OffsetHGuide; Handle(ChFiDS_Spine)& Spine = Stripe->ChangeSpine(); if (Spine->Mode() == ChFiDS_ConstThroatWithPenetrationChamfer) { @@ -1881,7 +1879,7 @@ void ChFi3d_Builder::PerformSetOfSurfOnElSpine ChFiDS_ListIteratorOfListOfHElSpine ILES(ll), ILES_offset(ll_offset); for ( ; ILES.More(); ILES.Next(),ILES_offset.Next()) { - const Handle(ChFiDS_HElSpine)& aHElSpine = ILES.Value(); + const Handle(ChFiDS_ElSpine)& aHElSpine = ILES.Value(); if (aHElSpine == HGuide) OffsetHGuide = ILES_offset.Value(); } @@ -1899,8 +1897,8 @@ void ChFi3d_Builder::PerformSetOfSurfOnElSpine Guide.LastParameter (wl+prab*(wl-wf)); if (!OffsetHGuide.IsNull()) { - OffsetHGuide->ChangeCurve().FirstParameter(wf-prab*(wl-wf)); - OffsetHGuide->ChangeCurve().LastParameter (wl+prab*(wl-wf)); + OffsetHGuide->FirstParameter(wf-prab*(wl-wf)); + OffsetHGuide->LastParameter (wl+prab*(wl-wf)); } } //Handle(ChFiDS_Spine)& Spine = Stripe->ChangeSpine(); @@ -1914,14 +1912,14 @@ void ChFi3d_Builder::PerformSetOfSurfOnElSpine Handle(ChFiDS_SurfData) raf = Guide.Next(); RemoveSD(Stripe,ref,raf); - Handle(BRepAdaptor_HSurface) HS1 = new BRepAdaptor_HSurface(); - Handle(BRepAdaptor_HSurface) HS2 = new BRepAdaptor_HSurface(); - Handle(BRepAdaptor_HSurface) HS3, HS4; - Handle(BRepAdaptor_HSurface) HSref1 = new BRepAdaptor_HSurface(); - Handle(BRepAdaptor_HSurface) HSref2 = new BRepAdaptor_HSurface(); - Handle(BRepAdaptor_HCurve2d) HC1,HC2; - Handle(BRepAdaptor_HCurve2d) HCref1 = new BRepAdaptor_HCurve2d(); - Handle(BRepAdaptor_HCurve2d) HCref2 = new BRepAdaptor_HCurve2d(); + Handle(BRepAdaptor_Surface) HS1 = new BRepAdaptor_Surface(); + Handle(BRepAdaptor_Surface) HS2 = new BRepAdaptor_Surface(); + Handle(BRepAdaptor_Surface) HS3, HS4; + Handle(BRepAdaptor_Surface) HSref1 = new BRepAdaptor_Surface(); + Handle(BRepAdaptor_Surface) HSref2 = new BRepAdaptor_Surface(); + Handle(BRepAdaptor_Curve2d) HC1,HC2; + Handle(BRepAdaptor_Curve2d) HCref1 = new BRepAdaptor_Curve2d(); + Handle(BRepAdaptor_Curve2d) HCref2 = new BRepAdaptor_Curve2d(); Standard_Boolean decroch1 = Standard_False, decroch2 = Standard_False; Standard_Boolean RecP1 = Standard_False, RecS1 = Standard_False, RecRst1 = Standard_False, obstacleon1 = Standard_False; Standard_Boolean RecP2 = Standard_False, RecS2 = Standard_False, RecRst2 = Standard_False, obstacleon2 = Standard_False; @@ -1963,10 +1961,10 @@ void ChFi3d_Builder::PerformSetOfSurfOnElSpine Guide.LastParameter (First * 1.1);//Extension to help rsnld. if (!OffsetHGuide.IsNull()) { - OffsetHGuide->ChangeCurve().SaveFirstParameter(); - OffsetHGuide->ChangeCurve().FirstParameter(Last); - OffsetHGuide->ChangeCurve().SaveLastParameter(); - OffsetHGuide->ChangeCurve().LastParameter (First * 1.1);//Extension to help rsnld. + OffsetHGuide->SaveFirstParameter(); + OffsetHGuide->FirstParameter(Last); + OffsetHGuide->SaveLastParameter(); + OffsetHGuide->LastParameter (First * 1.1);//Extension to help rsnld. } } } @@ -2007,13 +2005,13 @@ void ChFi3d_Builder::PerformSetOfSurfOnElSpine { Guide.FirstParameter(wf); if (!OffsetHGuide.IsNull()) - OffsetHGuide->ChangeCurve().FirstParameter(wf); + OffsetHGuide->FirstParameter(wf); } else { Guide.LastParameter(wl); if (!OffsetHGuide.IsNull()) - OffsetHGuide->ChangeCurve().LastParameter(wl); + OffsetHGuide->LastParameter(wl); } } } @@ -2053,7 +2051,7 @@ void ChFi3d_Builder::PerformSetOfSurfOnElSpine intf = 4; Guide.FirstParameter(wfsav); if (!OffsetHGuide.IsNull()) - OffsetHGuide->ChangeCurve().FirstParameter(wfsav); + OffsetHGuide->FirstParameter(wfsav); } if(wl - lastedlastp > -tolesp){ if(Spine->LastStatus() == ChFiDS_OnSame) intl = 2; @@ -2063,7 +2061,7 @@ void ChFi3d_Builder::PerformSetOfSurfOnElSpine intl = 4; Guide.LastParameter(wlsav); if (!OffsetHGuide.IsNull()) - OffsetHGuide->ChangeCurve().LastParameter(wlsav); + OffsetHGuide->LastParameter(wlsav); } } if(intf && !forward) Vref = Spine->FirstVertex(); @@ -2099,21 +2097,21 @@ void ChFi3d_Builder::PerformSetOfSurfOnElSpine { Guide.FirstParameter(wf); if (!OffsetHGuide.IsNull()) - OffsetHGuide->ChangeCurve().FirstParameter(wf); + OffsetHGuide->FirstParameter(wf); } else { Guide.LastParameter(wl); if (!OffsetHGuide.IsNull()) - OffsetHGuide->ChangeCurve().LastParameter(wl); + OffsetHGuide->LastParameter(wl); } } else throw Standard_Failure("PerformSetOfSurfOnElSpine : Chaining is impossible."); } // Definition of the domain of patch It1, It2 - const Handle(Adaptor3d_HSurface)& HSon1 = HS1; // to avoid ambiguity - const Handle(Adaptor3d_HSurface)& HSon2 = HS2; // to avoid ambiguity + const Handle(Adaptor3d_Surface)& HSon1 = HS1; // to avoid ambiguity + const Handle(Adaptor3d_Surface)& HSon2 = HS2; // to avoid ambiguity It1->Initialize(HSon1); It2->Initialize(HSon2); @@ -2123,8 +2121,8 @@ void ChFi3d_Builder::PerformSetOfSurfOnElSpine SeqSD.Append(SD); if(obstacleon1 && obstacleon2){ - TopAbs_Orientation Or1 = HSref1->ChangeSurface().Face().Orientation(); - TopAbs_Orientation Or2 = HSref2->ChangeSurface().Face().Orientation(); + TopAbs_Orientation Or1 = HSref1->Face().Orientation(); + TopAbs_Orientation Or2 = HSref2->Face().Orientation(); Standard_Integer Choix = ChFi3d::NextSide(Or1,Or2, Stripe->OrientationOnFace1(), Stripe->OrientationOnFace2(), @@ -2156,12 +2154,12 @@ void ChFi3d_Builder::PerformSetOfSurfOnElSpine ChFi3d_ResultChron(ch1,t_performsurf); //result perf for PerformSurf #endif } - SD->ChangeIndexOfS1(DStr.AddShape(HS1->ChangeSurface().Face())); - SD->ChangeIndexOfS2(DStr.AddShape(HS2->ChangeSurface().Face())); + SD->ChangeIndexOfS1(DStr.AddShape(HS1->Face())); + SD->ChangeIndexOfS2(DStr.AddShape(HS2->Face())); } else if (obstacleon1){ - TopAbs_Orientation Or1 = HSref1->ChangeSurface().Face().Orientation(); - TopAbs_Orientation Or2 = HS2->ChangeSurface().Face().Orientation(); + TopAbs_Orientation Or1 = HSref1->Face().Orientation(); + TopAbs_Orientation Or2 = HS2->Face().Orientation(); Standard_Integer Choix = ChFi3d::NextSide(Or1,Or2, Stripe->OrientationOnFace1(), Stripe->OrientationOnFace2(), @@ -2185,13 +2183,13 @@ void ChFi3d_Builder::PerformSetOfSurfOnElSpine ChFi3d_ResultChron(ch1,t_performsurf);//result perf for PerformSurf #endif } - SD->ChangeIndexOfS1(DStr.AddShape(HS1->ChangeSurface().Face())); - SD->ChangeIndexOfS2(DStr.AddShape(HS2->ChangeSurface().Face())); + SD->ChangeIndexOfS1(DStr.AddShape(HS1->Face())); + SD->ChangeIndexOfS2(DStr.AddShape(HS2->Face())); decroch2 = 0; } else if (obstacleon2){ - TopAbs_Orientation Or1 = HS1->ChangeSurface().Face().Orientation(); - TopAbs_Orientation Or2 = HSref2->ChangeSurface().Face().Orientation(); + TopAbs_Orientation Or1 = HS1->Face().Orientation(); + TopAbs_Orientation Or2 = HSref2->Face().Orientation(); Standard_Integer Choix = ChFi3d::NextSide(Or1,Or2, Stripe->OrientationOnFace1(), Stripe->OrientationOnFace2(), @@ -2213,8 +2211,8 @@ void ChFi3d_Builder::PerformSetOfSurfOnElSpine ChFi3d_ResultChron(ch1,t_performsurf); //result perf for PerformSurf #endif } - SD->ChangeIndexOfS1(DStr.AddShape(HS1->ChangeSurface().Face())); - SD->ChangeIndexOfS2(DStr.AddShape(HS2->ChangeSurface().Face())); + SD->ChangeIndexOfS1(DStr.AddShape(HS1->Face())); + SD->ChangeIndexOfS2(DStr.AddShape(HS2->Face())); decroch1 = 0; } else{ @@ -2251,10 +2249,10 @@ void ChFi3d_Builder::PerformSetOfSurfOnElSpine if(forward) { for (ii=1; ii<=SeqSD.Length(); ii++) { SD = SeqSD(ii); - SD->ChangeIndexOfS1(DStr.AddShape(HS1->ChangeSurface().Face())); - if(obstacleon1) SD->SetIndexOfC1(DStr.AddShape(HC1->ChangeCurve2d().Edge())); - SD->ChangeIndexOfS2(DStr.AddShape(HS2->ChangeSurface().Face())); - if(obstacleon2) SD->SetIndexOfC2(DStr.AddShape(HC2->ChangeCurve2d().Edge())); + SD->ChangeIndexOfS1(DStr.AddShape(HS1->Face())); + if(obstacleon1) SD->SetIndexOfC1(DStr.AddShape(HC1->Edge())); + SD->ChangeIndexOfS2(DStr.AddShape(HS2->Face())); + if(obstacleon2) SD->SetIndexOfC2(DStr.AddShape(HC2->Edge())); InsertAfter (Stripe, refbis, SD); refbis = SD; } @@ -2262,10 +2260,10 @@ void ChFi3d_Builder::PerformSetOfSurfOnElSpine else { for (ii=SeqSD.Length(); ii>=1; ii--) { SD = SeqSD(ii); - SD->ChangeIndexOfS1(DStr.AddShape(HS1->ChangeSurface().Face())); - if(obstacleon1) SD->SetIndexOfC1(DStr.AddShape(HC1->ChangeCurve2d().Edge())); - SD->ChangeIndexOfS2(DStr.AddShape(HS2->ChangeSurface().Face())); - if(obstacleon2) SD->SetIndexOfC2(DStr.AddShape(HC2->ChangeCurve2d().Edge())); + SD->ChangeIndexOfS1(DStr.AddShape(HS1->Face())); + if(obstacleon1) SD->SetIndexOfC1(DStr.AddShape(HC1->Edge())); + SD->ChangeIndexOfS2(DStr.AddShape(HS2->Face())); + if(obstacleon2) SD->SetIndexOfC2(DStr.AddShape(HC2->Edge())); InsertBefore(Stripe,refbis,SD); refbis = SD; } @@ -2343,8 +2341,8 @@ void ChFi3d_Builder::PerformSetOfSurfOnElSpine Guide.LastParameter (wlsav); if (!OffsetHGuide.IsNull()) { - OffsetHGuide->ChangeCurve().FirstParameter(wfsav); - OffsetHGuide->ChangeCurve().LastParameter (wlsav); + OffsetHGuide->FirstParameter(wfsav); + OffsetHGuide->LastParameter (wlsav); } } @@ -2360,7 +2358,7 @@ void ChFi3d_Builder::PerformSetOfKPart(Handle(ChFiDS_Stripe)& Stripe, { TopOpeBRepDS_DataStructure& DStr = myDS->ChangeDS(); Handle(ChFiDS_Spine)& Spine = Stripe->ChangeSpine(); - Handle(BRepAdaptor_HSurface) HS1,HS2; + Handle(BRepAdaptor_Surface) HS1,HS2; TopAbs_Orientation Or1,Or2,RefOr1,RefOr2; Standard_Integer RefChoix; @@ -2384,13 +2382,13 @@ void ChFi3d_Builder::PerformSetOfKPart(Handle(ChFiDS_Stripe)& Stripe, Standard_Boolean intf = Standard_False, intl = Standard_False; ChFiDS_ElSpine anElSpine, anOffsetElSpine; - Handle(ChFiDS_HElSpine) CurrentHE = new ChFiDS_HElSpine(anElSpine); - Handle(ChFiDS_HElSpine) CurrentOffsetHE = new ChFiDS_HElSpine(anOffsetElSpine); + Handle(ChFiDS_ElSpine) CurrentHE = new ChFiDS_ElSpine(anElSpine); + Handle(ChFiDS_ElSpine) CurrentOffsetHE = new ChFiDS_ElSpine(anOffsetElSpine); Spine->D1(Spine->FirstParameter(),PFirst,TFirst); - CurrentHE->ChangeCurve().FirstParameter(Spine->FirstParameter()); - CurrentHE->ChangeCurve().SetFirstPointAndTgt(PFirst,TFirst); - CurrentOffsetHE->ChangeCurve().FirstParameter(Spine->FirstParameter()); - CurrentOffsetHE->ChangeCurve().SetFirstPointAndTgt(PFirst,TFirst); + CurrentHE->FirstParameter(Spine->FirstParameter()); + CurrentHE->SetFirstPointAndTgt(PFirst,TFirst); + CurrentOffsetHE->FirstParameter(Spine->FirstParameter()); + CurrentOffsetHE->SetFirstPointAndTgt(PFirst,TFirst); Standard_Boolean YaKPart = Standard_False; Standard_Integer iedgelastkpart = 0; @@ -2405,14 +2403,14 @@ void ChFi3d_Builder::PerformSetOfKPart(Handle(ChFiDS_Stripe)& Stripe, ConexFaces(Spine,iedge,HS1,HS2); - if (ChFi3d_KParticular(Spine,iedge,HS1->ChangeSurface(),HS2->ChangeSurface())) { + if (ChFi3d_KParticular (Spine, iedge, *HS1, *HS2)) { intf = ((iedge == 1) && !Spine->IsPeriodic()); intl = ((iedge == Spine->NbEdges()) && !Spine->IsPeriodic()); - Or1 = HS1->ChangeSurface().Face().Orientation(); - Or2 = HS2->ChangeSurface().Face().Orientation(); + Or1 = HS1->Face().Orientation(); + Or2 = HS2->Face().Orientation(); ChFi3d::NextSide(Or1,Or2,RefOr1,RefOr2,RefChoix); - const Handle(Adaptor3d_HSurface)& HSon1 = HS1; // to avoid ambiguity - const Handle(Adaptor3d_HSurface)& HSon2 = HS2; // to avoid ambiguity + const Handle(Adaptor3d_Surface)& HSon1 = HS1; // to avoid ambiguity + const Handle(Adaptor3d_Surface)& HSon2 = HS2; // to avoid ambiguity It1->Initialize(HSon1); It2->Initialize(HSon2); @@ -2495,47 +2493,47 @@ void ChFi3d_Builder::PerformSetOfKPart(Handle(ChFiDS_Stripe)& Stripe, // start section -> first KPart // update of extension. Spine->SetFirstTgt(Min(0.,WFirst)); - CurrentHE->ChangeCurve().LastParameter (WFirst); - CurrentHE->ChangeCurve().SetLastPointAndTgt(PFirst,TFirst); + CurrentHE->LastParameter (WFirst); + CurrentHE->SetLastPointAndTgt(PFirst,TFirst); Spine->AppendElSpine(CurrentHE); - CurrentHE->ChangeCurve().ChangeNext() = LSD.Value(j); - CurrentHE = new ChFiDS_HElSpine(); + CurrentHE->ChangeNext() = LSD.Value(j); + CurrentHE = new ChFiDS_ElSpine(); - CurrentOffsetHE->ChangeCurve().LastParameter (WFirst); - CurrentOffsetHE->ChangeCurve().SetLastPointAndTgt(PFirst,TFirst); + CurrentOffsetHE->LastParameter (WFirst); + CurrentOffsetHE->SetLastPointAndTgt(PFirst,TFirst); Spine->AppendOffsetElSpine(CurrentOffsetHE); - CurrentOffsetHE->ChangeCurve().ChangeNext() = LSD.Value(j); - CurrentOffsetHE = new ChFiDS_HElSpine(); + CurrentOffsetHE->ChangeNext() = LSD.Value(j); + CurrentOffsetHE = new ChFiDS_ElSpine(); } - CurrentHE->ChangeCurve().FirstParameter(WLast); - CurrentHE->ChangeCurve().SetFirstPointAndTgt(PLast,TLast); - CurrentHE->ChangeCurve().ChangePrevious() = LSD.Value(j); - CurrentOffsetHE->ChangeCurve().FirstParameter(WLast); - CurrentOffsetHE->ChangeCurve().SetFirstPointAndTgt(PLast,TLast); - CurrentOffsetHE->ChangeCurve().ChangePrevious() = LSD.Value(j); + CurrentHE->FirstParameter(WLast); + CurrentHE->SetFirstPointAndTgt(PLast,TLast); + CurrentHE->ChangePrevious() = LSD.Value(j); + CurrentOffsetHE->FirstParameter(WLast); + CurrentOffsetHE->SetFirstPointAndTgt(PLast,TLast); + CurrentOffsetHE->ChangePrevious() = LSD.Value(j); YaKPart = Standard_True; } else { if (WFirst - CurrentHE->FirstParameter() > tolesp) { // section between two KPart - CurrentHE->ChangeCurve().LastParameter(WFirst); - CurrentHE->ChangeCurve().SetLastPointAndTgt(PFirst,TFirst); + CurrentHE->LastParameter(WFirst); + CurrentHE->SetLastPointAndTgt(PFirst,TFirst); Spine->AppendElSpine(CurrentHE); - CurrentHE->ChangeCurve().ChangeNext() = LSD.Value(j); - CurrentHE = new ChFiDS_HElSpine(); + CurrentHE->ChangeNext() = LSD.Value(j); + CurrentHE = new ChFiDS_ElSpine(); - CurrentOffsetHE->ChangeCurve().LastParameter(WFirst); - CurrentOffsetHE->ChangeCurve().SetLastPointAndTgt(PFirst,TFirst); + CurrentOffsetHE->LastParameter(WFirst); + CurrentOffsetHE->SetLastPointAndTgt(PFirst,TFirst); Spine->AppendOffsetElSpine(CurrentOffsetHE); - CurrentOffsetHE->ChangeCurve().ChangeNext() = LSD.Value(j); - CurrentOffsetHE = new ChFiDS_HElSpine(); + CurrentOffsetHE->ChangeNext() = LSD.Value(j); + CurrentOffsetHE = new ChFiDS_ElSpine(); } - CurrentHE->ChangeCurve().FirstParameter(WLast); - CurrentHE->ChangeCurve().SetFirstPointAndTgt(PLast,TLast); - CurrentHE->ChangeCurve().ChangePrevious() = LSD.Value(j); - CurrentOffsetHE->ChangeCurve().FirstParameter(WLast); - CurrentOffsetHE->ChangeCurve().SetFirstPointAndTgt(PLast,TLast); - CurrentOffsetHE->ChangeCurve().ChangePrevious() = LSD.Value(j); + CurrentHE->FirstParameter(WLast); + CurrentHE->SetFirstPointAndTgt(PLast,TLast); + CurrentHE->ChangePrevious() = LSD.Value(j); + CurrentOffsetHE->FirstParameter(WLast); + CurrentOffsetHE->SetFirstPointAndTgt(PLast,TLast); + CurrentOffsetHE->ChangePrevious() = LSD.Value(j); } } if(!li.IsEmpty()) myEVIMap.Bind(Spine->Edges(iedge),li); @@ -2548,14 +2546,14 @@ void ChFi3d_Builder::PerformSetOfKPart(Handle(ChFiDS_Stripe)& Stripe, if(Spine->IsPeriodic()){ if(WEndPeriodic - WLast > tolesp){ - CurrentHE->ChangeCurve().LastParameter(WEndPeriodic); - CurrentHE->ChangeCurve().SetLastPointAndTgt(PEndPeriodic,TEndPeriodic); - if(!YaKPart) CurrentHE->ChangeCurve().SetPeriodic(Standard_True); + CurrentHE->LastParameter(WEndPeriodic); + CurrentHE->SetLastPointAndTgt(PEndPeriodic,TEndPeriodic); + if(!YaKPart) CurrentHE->SetPeriodic(Standard_True); Spine->AppendElSpine(CurrentHE); - CurrentOffsetHE->ChangeCurve().LastParameter(WEndPeriodic); - CurrentOffsetHE->ChangeCurve().SetLastPointAndTgt(PEndPeriodic,TEndPeriodic); - if(!YaKPart) CurrentOffsetHE->ChangeCurve().SetPeriodic(Standard_True); + CurrentOffsetHE->LastParameter(WEndPeriodic); + CurrentOffsetHE->SetLastPointAndTgt(PEndPeriodic,TEndPeriodic); + if(!YaKPart) CurrentOffsetHE->SetPeriodic(Standard_True); Spine->AppendOffsetElSpine(CurrentOffsetHE); } } @@ -2564,12 +2562,12 @@ void ChFi3d_Builder::PerformSetOfKPart(Handle(ChFiDS_Stripe)& Stripe, Spine->SetLastTgt(Max(Spine->LastParameter(Spine->NbEdges()), WLast)); if (Spine->LastParameter() - WLast > tolesp) { - CurrentHE->ChangeCurve().LastParameter(Spine->LastParameter()); - CurrentHE->ChangeCurve().SetLastPointAndTgt(PLast,TLast); + CurrentHE->LastParameter(Spine->LastParameter()); + CurrentHE->SetLastPointAndTgt(PLast,TLast); Spine->AppendElSpine(CurrentHE); - CurrentOffsetHE->ChangeCurve().LastParameter(Spine->LastParameter()); - CurrentOffsetHE->ChangeCurve().SetLastPointAndTgt(PLast,TLast); + CurrentOffsetHE->LastParameter(Spine->LastParameter()); + CurrentOffsetHE->SetLastPointAndTgt(PLast,TLast); Spine->AppendOffsetElSpine(CurrentOffsetHE); } } @@ -2701,12 +2699,12 @@ void ChFi3d_Builder::PerformSetOfKGen(Handle(ChFiDS_Stripe)& Stripe, // A contour of filling is constructed Handle(Geom2d_Curve) PC1 = intf1.PCurveOnFace(); Handle(Geom2d_Curve) PC2 = intf2.PCurveOnFace(); - Handle(BRepAdaptor_HSurface) S1 = new BRepAdaptor_HSurface(); + Handle(BRepAdaptor_Surface) S1 = new BRepAdaptor_Surface(); TopoDS_Face F1 = TopoDS::Face(DStr.Shape(cursurf1)); - S1->ChangeSurface().Initialize(F1); - Handle(BRepAdaptor_HSurface) S2 = new BRepAdaptor_HSurface(); + S1->Initialize(F1); + Handle(BRepAdaptor_Surface) S2 = new BRepAdaptor_Surface(); TopoDS_Face F2 = TopoDS::Face(DStr.Shape(cursurf2)); - S2->ChangeSurface().Initialize(F2); + S2->Initialize(F2); Handle(GeomFill_Boundary) Bdeb,Bfin,Bon1,Bon2; Standard_Boolean pointuon1 = 0, pointuon2 = 0; if(tw1){ @@ -2951,10 +2949,9 @@ void ChFi3d_Builder::PerformSetOfKGen(Handle(ChFiDS_Stripe)& Stripe, } // The connections edge/new faces are updated. for (ILES.Initialize(ll) ; ILES.More(); ILES.Next()) { - const Handle(ChFiDS_HElSpine)& curhels = ILES.Value(); - const ChFiDS_ElSpine& curels = curhels->ChangeCurve(); - Standard_Real WF = curels.FirstParameter(); - Standard_Real WL = curels.LastParameter(); + const Handle(ChFiDS_ElSpine)& curhels = ILES.Value(); + Standard_Real WF = curhels->FirstParameter(); + Standard_Real WL = curhels->LastParameter(); Standard_Integer IF,IL; Standard_Real nwf = WF, nwl = WL; Standard_Real period = 0.; @@ -3000,11 +2997,11 @@ void ChFi3d_Builder::PerformSetOfKGen(Handle(ChFiDS_Stripe)& Stripe, if(periodic) wi = ElCLib::InPeriod(wi,WF,WF+period); gp_Pnt pv = Spine->Value(wi); #ifdef OCCT_DEBUG - gp_Pnt pelsapp = curels.Value(wi); + gp_Pnt pelsapp = curhels->Value(wi); Standard_Real distinit = pv.Distance(pelsapp); std::cout<<"distance psp/papp : "< -#include +#include +#include #include #include #include @@ -35,8 +35,6 @@ #include #include #include -#include -#include #include #include #include @@ -59,7 +57,7 @@ #include #include #include -#include +#include #include #include #include @@ -72,8 +70,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include @@ -111,7 +109,7 @@ #include #include #include -#include +#include static Standard_Integer IndexOfConge = 0; #endif @@ -425,9 +423,9 @@ static void UpdateLine(Handle(BRepBlend_Line)& Line, Standard_Boolean ChFi3d_Builder::CompleteData (Handle(ChFiDS_SurfData)& Data, const Handle(Geom_Surface)& Surfcoin, - const Handle(Adaptor3d_HSurface)& S1, + const Handle(Adaptor3d_Surface)& S1, const Handle(Geom2d_Curve)& PC1, - const Handle(Adaptor3d_HSurface)& S2, + const Handle(Adaptor3d_Surface)& S2, const Handle(Geom2d_Curve)& PC2, const TopAbs_Orientation Or, const Standard_Boolean On1, @@ -469,7 +467,7 @@ Standard_Boolean ChFi3d_Builder::CompleteData Handle(Geom2d_Curve) c2dtrim; Standard_Real tolreached = 1.e-5; if(!PC1.IsNull()){ - Handle(GeomAdaptor_HCurve) hcS1 = new GeomAdaptor_HCurve(Crv3d1); + Handle(GeomAdaptor_Curve) hcS1 = new GeomAdaptor_Curve(Crv3d1); c2dtrim = new Geom2d_TrimmedCurve(PC1,UFirst,ULast); ChFi3d_SameParameter(hcS1,c2dtrim,S1,tolapp3d,tolreached); c2dtrim->Value(w).Coord(x,y); @@ -494,7 +492,7 @@ Standard_Boolean ChFi3d_Builder::CompleteData PCurveOnSurf = new Geom2d_Line(lfil2); TopAbs_Orientation tra2 = TopAbs_FORWARD; if(!PC2.IsNull()){ - Handle(GeomAdaptor_HCurve) hcS2 = new GeomAdaptor_HCurve(Crv3d2); + Handle(GeomAdaptor_Curve) hcS2 = new GeomAdaptor_Curve(Crv3d2); c2dtrim = new Geom2d_TrimmedCurve(PC2,UFirst,ULast); ChFi3d_SameParameter(hcS2,c2dtrim,S2,tolapp3d,tolreached); c2dtrim->Value(w).Coord(x,y); @@ -530,8 +528,8 @@ Standard_Boolean ChFi3d_Builder::CompleteData (Handle(ChFiDS_SurfData)& Data, Blend_Function& Func, Handle(BRepBlend_Line)& lin, - const Handle(Adaptor3d_HSurface)& S1, - const Handle(Adaptor3d_HSurface)& S2, + const Handle(Adaptor3d_Surface)& S1, + const Handle(Adaptor3d_Surface)& S2, const TopAbs_Orientation Or1, const Standard_Boolean Gd1, const Standard_Boolean Gd2, @@ -572,8 +570,8 @@ Standard_Boolean ChFi3d_Builder::CompleteData (Handle(ChFiDS_SurfData)& Data, Blend_SurfRstFunction& Func, Handle(BRepBlend_Line)& lin, - const Handle(Adaptor3d_HSurface)& S1, - const Handle(Adaptor3d_HSurface)& S2, + const Handle(Adaptor3d_Surface)& S1, + const Handle(Adaptor3d_Surface)& S2, const TopAbs_Orientation Or, const Standard_Boolean Reversed) { @@ -610,8 +608,8 @@ Standard_Boolean ChFi3d_Builder::CompleteData (Handle(ChFiDS_SurfData)& Data, Blend_RstRstFunction& Func, Handle(BRepBlend_Line)& lin, - const Handle(Adaptor3d_HSurface)& S1, - const Handle(Adaptor3d_HSurface)& S2, + const Handle(Adaptor3d_Surface)& S1, + const Handle(Adaptor3d_Surface)& S2, const TopAbs_Orientation Or) { Handle(BRepBlend_AppFuncRstRst) TheFunc @@ -646,8 +644,8 @@ Standard_Boolean ChFi3d_Builder::CompleteData Standard_Boolean ChFi3d_Builder::StoreData(Handle(ChFiDS_SurfData)& Data, const AppBlend_Approx& approx, const Handle(BRepBlend_Line)& lin, - const Handle(Adaptor3d_HSurface)& S1, - const Handle(Adaptor3d_HSurface)& S2, + const Handle(Adaptor3d_Surface)& S1, + const Handle(Adaptor3d_Surface)& S2, const TopAbs_Orientation Or1, const Standard_Boolean Gd1, const Standard_Boolean Gd2, @@ -656,9 +654,9 @@ Standard_Boolean ChFi3d_Builder::StoreData(Handle(ChFiDS_SurfData)& Data, const Standard_Boolean Reversed) { // Small control tools. - static Handle(GeomAdaptor_HCurve) checkcurve; - if(checkcurve.IsNull()) checkcurve = new GeomAdaptor_HCurve(); - GeomAdaptor_Curve& chc = checkcurve->ChangeCurve(); + static Handle(GeomAdaptor_Curve) checkcurve; + if(checkcurve.IsNull()) checkcurve = new GeomAdaptor_Curve(); + GeomAdaptor_Curve& chc = *checkcurve; Standard_Real tolget3d, tolget2d, tolaux, tolC1, tolcheck; Standard_Real tolC2 = 0.; approx.TolReached(tolget3d, tolget2d); @@ -751,10 +749,10 @@ Standard_Boolean ChFi3d_Builder::StoreData(Handle(ChFiDS_SurfData)& Data, Surf->Bounds(UFirst,ULast,VFirst,VLast); BRepAdaptor_Curve2d brc; BRepAdaptor_Curve CArc; - Handle(BRepAdaptor_HSurface) - BS1 = Handle(BRepAdaptor_HSurface)::DownCast(S1); - Handle(BRepAdaptor_HSurface) - BS2 = Handle(BRepAdaptor_HSurface)::DownCast(S2); + Handle(BRepAdaptor_Surface) + BS1 = Handle(BRepAdaptor_Surface)::DownCast(S1); + Handle(BRepAdaptor_Surface) + BS2 = Handle(BRepAdaptor_Surface)::DownCast(S2); Geom2dAPI_ProjectPointOnCurve projector; Standard_Real Uon1 = UFirst, Uon2 = ULast; @@ -787,7 +785,7 @@ Standard_Boolean ChFi3d_Builder::StoreData(Handle(ChFiDS_SurfData)& Data, Standard_Real uarc,utg; if(Gd1){ - TopoDS_Face forwfac = BS1->ChangeSurface().Face(); + TopoDS_Face forwfac = BS1->Face(); forwfac.Orientation(TopAbs_FORWARD); brc.Initialize(Data->VertexFirstOnS1().Arc(),forwfac); ChFiDS_CommonPoint& V = Data->ChangeVertexFirstOnS1(); @@ -799,7 +797,7 @@ Standard_Boolean ChFi3d_Builder::StoreData(Handle(ChFiDS_SurfData)& Data, } else pppdeb = VFirst; if(Gf1){ - TopoDS_Face forwfac = BS1->ChangeSurface().Face(); + TopoDS_Face forwfac = BS1->Face(); forwfac.Orientation(TopAbs_FORWARD); ChFiDS_CommonPoint& V = Data->ChangeVertexLastOnS1(); brc.Initialize(V.Arc(),forwfac); @@ -839,7 +837,7 @@ Standard_Boolean ChFi3d_Builder::StoreData(Handle(ChFiDS_SurfData)& Data, Standard_Integer Index2OfCurve = DStr.AddCurve(TopOpeBRepDS_Curve(Crv3d2,tolC2)); if(Gd2){ - TopoDS_Face forwfac = BS2->ChangeSurface().Face(); + TopoDS_Face forwfac = BS2->Face(); forwfac.Orientation(TopAbs_FORWARD); brc.Initialize(Data->VertexFirstOnS2().Arc(),forwfac); ChFiDS_CommonPoint& V = Data->ChangeVertexFirstOnS2(); @@ -851,7 +849,7 @@ Standard_Boolean ChFi3d_Builder::StoreData(Handle(ChFiDS_SurfData)& Data, } else pppdeb = VFirst; if(Gf2){ - TopoDS_Face forwfac = BS2->ChangeSurface().Face(); + TopoDS_Face forwfac = BS2->Face(); forwfac.Orientation(TopAbs_FORWARD); brc.Initialize(Data->VertexLastOnS2().Arc(),forwfac); ChFiDS_CommonPoint& V = Data->ChangeVertexLastOnS2(); @@ -879,7 +877,7 @@ Standard_Boolean ChFi3d_Builder::StoreData(Handle(ChFiDS_SurfData)& Data, // the orientation of the fillet in relation to the faces is evaluated, - Handle(Adaptor3d_HSurface) Sref = S1; + Handle(Adaptor3d_Surface) Sref = S1; PCurveOnFace = Fint1.PCurveOnFace(); if(Reversed){ Sref = S2; PCurveOnFace = Fint2.PCurveOnFace(); } @@ -961,12 +959,12 @@ Standard_Boolean ChFi3d_Builder::StoreData(Handle(ChFiDS_SurfData)& Data, Standard_Boolean ChFi3d_Builder::ComputeData (Handle(ChFiDS_SurfData)& Data, - const Handle(ChFiDS_HElSpine)& HGuide, + const Handle(ChFiDS_ElSpine)& HGuide, Handle(BRepBlend_Line)& Lin, - const Handle(Adaptor3d_HSurface)& S1, + const Handle(Adaptor3d_Surface)& S1, const Handle(Adaptor3d_TopolTool)& I1, - const Handle(Adaptor3d_HSurface)& S2, - const Handle(Adaptor2d_HCurve2d)& PC2, + const Handle(Adaptor3d_Surface)& S2, + const Handle(Adaptor2d_Curve2d)& PC2, const Handle(Adaptor3d_TopolTool)& I2, Standard_Boolean& Decroch, Blend_SurfRstFunction& Func, @@ -1089,14 +1087,14 @@ Standard_Boolean ChFi3d_Builder::ComputeData Standard_Boolean ChFi3d_Builder::ComputeData (Handle(ChFiDS_SurfData)& Data, - const Handle(ChFiDS_HElSpine)& HGuide, + const Handle(ChFiDS_ElSpine)& HGuide, Handle(BRepBlend_Line)& Lin, - const Handle(Adaptor3d_HSurface)& S1, - const Handle(Adaptor2d_HCurve2d)& PC1, + const Handle(Adaptor3d_Surface)& S1, + const Handle(Adaptor2d_Curve2d)& PC1, const Handle(Adaptor3d_TopolTool)& I1, Standard_Boolean& Decroch1, - const Handle(Adaptor3d_HSurface)& S2, - const Handle(Adaptor2d_HCurve2d)& PC2, + const Handle(Adaptor3d_Surface)& S2, + const Handle(Adaptor2d_Curve2d)& PC2, const Handle(Adaptor3d_TopolTool)& I2, Standard_Boolean& Decroch2, Blend_RstRstFunction& Func, @@ -1226,12 +1224,12 @@ Standard_Boolean ChFi3d_Builder::ComputeData Standard_Boolean ChFi3d_Builder::SimulData (Handle(ChFiDS_SurfData)& /*Data*/, - const Handle(ChFiDS_HElSpine)& HGuide, + const Handle(ChFiDS_ElSpine)& HGuide, Handle(BRepBlend_Line)& Lin, - const Handle(Adaptor3d_HSurface)& S1, + const Handle(Adaptor3d_Surface)& S1, const Handle(Adaptor3d_TopolTool)& I1, - const Handle(Adaptor3d_HSurface)& S2, - const Handle(Adaptor2d_HCurve2d)& PC2, + const Handle(Adaptor3d_Surface)& S2, + const Handle(Adaptor2d_Curve2d)& PC2, const Handle(Adaptor3d_TopolTool)& I2, Standard_Boolean& Decroch, Blend_SurfRstFunction& Func, @@ -1348,14 +1346,14 @@ Standard_Boolean ChFi3d_Builder::SimulData Standard_Boolean ChFi3d_Builder::SimulData (Handle(ChFiDS_SurfData)& /*Data*/, - const Handle(ChFiDS_HElSpine)& HGuide, + const Handle(ChFiDS_ElSpine)& HGuide, Handle(BRepBlend_Line)& Lin, - const Handle(Adaptor3d_HSurface)& S1, - const Handle(Adaptor2d_HCurve2d)& PC1, + const Handle(Adaptor3d_Surface)& S1, + const Handle(Adaptor2d_Curve2d)& PC1, const Handle(Adaptor3d_TopolTool)& I1, Standard_Boolean& Decroch1, - const Handle(Adaptor3d_HSurface)& S2, - const Handle(Adaptor2d_HCurve2d)& PC2, + const Handle(Adaptor3d_Surface)& S2, + const Handle(Adaptor2d_Curve2d)& PC2, const Handle(Adaptor3d_TopolTool)& I2, Standard_Boolean& Decroch2, Blend_RstRstFunction& Func, @@ -1482,12 +1480,12 @@ Standard_Boolean ChFi3d_Builder::SimulData Standard_Boolean ChFi3d_Builder::ComputeData (Handle(ChFiDS_SurfData)& Data, - const Handle(ChFiDS_HElSpine)& HGuide, + const Handle(ChFiDS_ElSpine)& HGuide, const Handle(ChFiDS_Spine)& Spine, Handle(BRepBlend_Line)& Lin, - const Handle(Adaptor3d_HSurface)& S1, + const Handle(Adaptor3d_Surface)& S1, const Handle(Adaptor3d_TopolTool)& I1, - const Handle(Adaptor3d_HSurface)& S2, + const Handle(Adaptor3d_Surface)& S2, const Handle(Adaptor3d_TopolTool)& I2, Blend_Function& Func, Blend_FuncInv& FInv, @@ -1511,7 +1509,7 @@ Standard_Boolean ChFi3d_Builder::ComputeData const Standard_Boolean RecOnS2) { //Get offset guide if exists - Handle(ChFiDS_HElSpine) OffsetHGuide; + Handle(ChFiDS_ElSpine) OffsetHGuide; if (!Spine.IsNull() && Spine->Mode() == ChFiDS_ConstThroatWithPenetrationChamfer) { @@ -1520,7 +1518,7 @@ Standard_Boolean ChFi3d_Builder::ComputeData ChFiDS_ListIteratorOfListOfHElSpine ILES(ll), ILES_offset(ll_offset); for ( ; ILES.More(); ILES.Next(),ILES_offset.Next()) { - const Handle(ChFiDS_HElSpine)& aHElSpine = ILES.Value(); + const Handle(ChFiDS_ElSpine)& aHElSpine = ILES.Value(); if (aHElSpine == HGuide) OffsetHGuide = ILES_offset.Value(); } @@ -1533,10 +1531,10 @@ Standard_Boolean ChFi3d_Builder::ComputeData //The eventual faces are restored to test the jump of edge. TopoDS_Face F1, F2; - Handle(BRepAdaptor_HSurface) HS = Handle(BRepAdaptor_HSurface)::DownCast(S1); - if(!HS.IsNull()) F1 = HS->ChangeSurface().Face(); - HS = Handle(BRepAdaptor_HSurface)::DownCast(S2); - if(!HS.IsNull()) F2 = HS->ChangeSurface().Face(); + Handle(BRepAdaptor_Surface) HS = Handle(BRepAdaptor_Surface)::DownCast(S1); + if(!HS.IsNull()) F1 = HS->Face(); + HS = Handle(BRepAdaptor_Surface)::DownCast(S2); + if(!HS.IsNull()) F2 = HS->Face(); // Path framing variables Standard_Real TolGuide=tolguide, TolEsp = tolesp; @@ -1652,14 +1650,14 @@ Standard_Boolean ChFi3d_Builder::ComputeData if(HGuide->IsPeriodic() && Inside) { SpFirst = Lin->Point(1).Parameter(); SpLast = SpFirst + HGuide->Period(); - HGuide->ChangeCurve().FirstParameter(SpFirst); - HGuide->ChangeCurve().LastParameter (SpLast ); - HGuide->ChangeCurve().SetOrigin(SpFirst); + HGuide->FirstParameter(SpFirst); + HGuide->LastParameter (SpLast ); + HGuide->SetOrigin(SpFirst); if (!OffsetHGuide.IsNull()) { - OffsetHGuide->ChangeCurve().FirstParameter(SpFirst); - OffsetHGuide->ChangeCurve().LastParameter (SpLast ); - OffsetHGuide->ChangeCurve().SetOrigin(SpFirst); + OffsetHGuide->FirstParameter(SpFirst); + OffsetHGuide->LastParameter (SpLast ); + OffsetHGuide->SetOrigin(SpFirst); } } Standard_Boolean complmnt = Standard_True; @@ -2119,12 +2117,12 @@ Standard_Boolean ChFi3d_Builder::ComputeData Standard_Boolean ChFi3d_Builder::SimulData (Handle(ChFiDS_SurfData)& /*Data*/, - const Handle(ChFiDS_HElSpine)& HGuide, - const Handle(ChFiDS_HElSpine)& AdditionalHGuide, + const Handle(ChFiDS_ElSpine)& HGuide, + const Handle(ChFiDS_ElSpine)& AdditionalHGuide, Handle(BRepBlend_Line)& Lin, - const Handle(Adaptor3d_HSurface)& S1, + const Handle(Adaptor3d_Surface)& S1, const Handle(Adaptor3d_TopolTool)& I1, - const Handle(Adaptor3d_HSurface)& S2, + const Handle(Adaptor3d_Surface)& S2, const Handle(Adaptor3d_TopolTool)& I2, Blend_Function& Func, Blend_FuncInv& FInv, @@ -2201,12 +2199,12 @@ Standard_Boolean ChFi3d_Builder::SimulData if(HGuide->IsPeriodic()) { SpFirst = Lin->Point(1).Parameter(); SpLast = SpFirst + HGuide->Period(); - HGuide->ChangeCurve().FirstParameter(SpFirst); - HGuide->ChangeCurve().LastParameter (SpLast ); + HGuide->FirstParameter(SpFirst); + HGuide->LastParameter (SpLast ); if (!AdditionalHGuide.IsNull()) { - AdditionalHGuide->ChangeCurve().FirstParameter(SpFirst); - AdditionalHGuide->ChangeCurve().LastParameter (SpLast ); + AdditionalHGuide->FirstParameter(SpFirst); + AdditionalHGuide->LastParameter (SpLast ); } } Standard_Boolean complmnt = Standard_True; diff --git a/src/ChFi3d/ChFi3d_Builder_C1.cxx b/src/ChFi3d/ChFi3d_Builder_C1.cxx index 85fce5cff6..2118ac4eb6 100644 --- a/src/ChFi3d/ChFi3d_Builder_C1.cxx +++ b/src/ChFi3d/ChFi3d_Builder_C1.cxx @@ -17,10 +17,9 @@ // Modified by skv - Mon Jun 7 18:38:57 2004 OCC5898 // Modified by skv - Thu Aug 21 11:55:58 2008 OCC20222 -#include +#include #include -#include -#include +#include #include #include #include @@ -34,9 +33,6 @@ #include #include #include -#include -#include -#include #include #include #include @@ -50,7 +46,7 @@ #include #include #include -#include +#include #include #include #include @@ -69,7 +65,7 @@ #include #include #include -#include +#include #include #include #include @@ -83,8 +79,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include @@ -183,9 +179,9 @@ static Standard_Real recadre(const Standard_Real p, // parameter in FaceInterference. //======================================================================= -static Standard_Boolean Update(const Handle(Adaptor3d_HSurface)& fb, - const Handle(Adaptor2d_HCurve2d)& pcfb, - const Handle(Adaptor3d_HSurface)& surf, +static Standard_Boolean Update(const Handle(Adaptor3d_Surface)& fb, + const Handle(Adaptor2d_Curve2d)& pcfb, + const Handle(Adaptor3d_Surface)& surf, ChFiDS_FaceInterference& fi, ChFiDS_CommonPoint& cp, gp_Pnt2d& p2dbout, @@ -196,7 +192,7 @@ static Standard_Boolean Update(const Handle(Adaptor3d_HSurface)& fb, { Adaptor3d_CurveOnSurface c1(pcfb,fb); Handle(Geom2d_Curve) pc = fi.PCurveOnSurf(); - Handle(Geom2dAdaptor_HCurve) hpc = new Geom2dAdaptor_HCurve(pc); + Handle(Geom2dAdaptor_Curve) hpc = new Geom2dAdaptor_Curve(pc); Adaptor3d_CurveOnSurface c2(hpc,surf); Extrema_LocateExtCC ext(c1,c2,pared,wop); if (ext.IsDone()) { @@ -225,8 +221,8 @@ static Standard_Boolean Update(const Handle(Adaptor3d_HSurface)& fb, // and //======================================================================= -static Standard_Boolean Update(const Handle(Adaptor3d_HSurface)& fb, - const Handle(Adaptor3d_HCurve)& ct, +static Standard_Boolean Update(const Handle(Adaptor3d_Surface)& fb, + const Handle(Adaptor3d_Curve)& ct, ChFiDS_FaceInterference& fi, ChFiDS_CommonPoint& cp, gp_Pnt2d& p2dbout, @@ -308,8 +304,8 @@ static Standard_Boolean Update(const Handle(Adaptor3d_HSurface)& fb, // is a corner vertex //======================================================================= -static Standard_Boolean IntersUpdateOnSame(Handle(GeomAdaptor_HSurface)& HGs, - Handle(BRepAdaptor_HSurface)& HBs, +static Standard_Boolean IntersUpdateOnSame(Handle(GeomAdaptor_Surface)& HGs, + Handle(BRepAdaptor_Surface)& HBs, const Handle(Geom_Curve)& c3dFI, const TopoDS_Face& Fop, const TopoDS_Face& Fprol, @@ -327,9 +323,9 @@ static Standard_Boolean IntersUpdateOnSame(Handle(GeomAdaptor_HSurface)& HGs, // extended end or if the end is sharp. Standard_Real uf = FIop.FirstParameter(); Standard_Real ul = FIop.LastParameter(); - Handle(GeomAdaptor_HCurve) Hc3df; - if (c3dFI->IsPeriodic()) Hc3df = new GeomAdaptor_HCurve(c3dFI); - else Hc3df = new GeomAdaptor_HCurve(c3dFI,uf,ul); + Handle(GeomAdaptor_Curve) Hc3df; + if (c3dFI->IsPeriodic()) Hc3df = new GeomAdaptor_Curve(c3dFI); + else Hc3df = new GeomAdaptor_Curve(c3dFI,uf,ul); if ( Update(HBs,Hc3df,FIop,CPop,FprolUV,isFirst,c3dU) ) return Standard_True; @@ -338,7 +334,7 @@ static Standard_Boolean IntersUpdateOnSame(Handle(GeomAdaptor_HSurface)& HGs, return Standard_False; Handle(Geom2d_Curve) gpcprol = BRep_Tool::CurveOnSurface(Eprol,Fprol,uf,ul); - Handle(Geom2dAdaptor_HCurve) pcprol = new Geom2dAdaptor_HCurve(gpcprol); + Handle(Geom2dAdaptor_Curve) pcprol = new Geom2dAdaptor_Curve(gpcprol); Standard_Real partemp = BRep_Tool::Parameter(Vtx,Eprol); return @@ -352,9 +348,9 @@ static Standard_Boolean IntersUpdateOnSame(Handle(GeomAdaptor_HSurface)& HGs, // face at end. //======================================================================= -static Standard_Boolean Update(const Handle(Adaptor3d_HSurface)& face, - const Handle(Adaptor2d_HCurve2d)& edonface, - const Handle(Adaptor3d_HSurface)& surf, +static Standard_Boolean Update(const Handle(Adaptor3d_Surface)& face, + const Handle(Adaptor2d_Curve2d)& edonface, + const Handle(Adaptor3d_Surface)& surf, ChFiDS_FaceInterference& fi, ChFiDS_CommonPoint& cp, const Standard_Boolean isfirst) @@ -369,7 +365,7 @@ static Standard_Boolean Update(const Handle(Adaptor3d_HSurface)& face, Standard_Real delta = 0.1 * ( l - f ); f = Max(f-delta,pc->FirstParameter()); l = Min(l+delta,pc->LastParameter()); - Handle(Geom2dAdaptor_HCurve) hpc = new Geom2dAdaptor_HCurve(pc,f,l); + Handle(Geom2dAdaptor_Curve) hpc = new Geom2dAdaptor_Curve(pc,f,l); Adaptor3d_CurveOnSurface c2(hpc,surf); Extrema_LocateExtCC ext(c1,c2,pared,parltg); @@ -615,12 +611,12 @@ void ChFi3d_Builder::PerformOneCorner(const Standard_Integer Index, else Arcspine = spine->Edges(spine->NbEdges()); TopAbs_Orientation OArcprolv = TopAbs_FORWARD, OArcprolop = TopAbs_FORWARD; Standard_Integer ICurve; - Handle(BRepAdaptor_HSurface) HBs = new BRepAdaptor_HSurface(); - Handle(BRepAdaptor_HSurface) HBad = new BRepAdaptor_HSurface(); - Handle(BRepAdaptor_HSurface) HBop = new BRepAdaptor_HSurface(); - BRepAdaptor_Surface& Bs = HBs->ChangeSurface(); - BRepAdaptor_Surface& Bad = HBad->ChangeSurface(); - BRepAdaptor_Surface& Bop = HBop->ChangeSurface(); + Handle(BRepAdaptor_Surface) HBs = new BRepAdaptor_Surface(); + Handle(BRepAdaptor_Surface) HBad = new BRepAdaptor_Surface(); + Handle(BRepAdaptor_Surface) HBop = new BRepAdaptor_Surface(); + BRepAdaptor_Surface& Bs = *HBs; + BRepAdaptor_Surface& Bad = *HBad; + BRepAdaptor_Surface& Bop = *HBop; Handle(Geom_Curve) Cc; Handle(Geom2d_Curve) Pc,Ps; Standard_Real Ubid,Vbid;//,mu,Mu,mv,Mv; @@ -757,8 +753,8 @@ void ChFi3d_Builder::PerformOneCorner(const Standard_Integer Index, //its opposite (point on arc). Standard_Real wop = Fd->ChangeInterference(IFadArc).Parameter(isfirst); Handle(Geom_Curve) c3df; - Handle(GeomAdaptor_HSurface) - HGs = new GeomAdaptor_HSurface(DStr.Surface(Fd->Surf()).Surface()); + Handle(GeomAdaptor_Surface) + HGs = new GeomAdaptor_Surface(DStr.Surface(Fd->Surf()).Surface()); gp_Pnt2d p2dbout; if (onsame) { @@ -769,8 +765,8 @@ void ChFi3d_Builder::PerformOneCorner(const Standard_Integer Index, inters = IntersUpdateOnSame (HGs,HBs,c3df,Fop,Fv,Arcprol,Vtx,isfirst,10*tolesp, // in FiopArc,CPopArc,p2dbout,wop); // out - Handle(BRepAdaptor_HCurve2d) pced = new BRepAdaptor_HCurve2d(); - pced->ChangeCurve2d().Initialize(CPadArc.Arc(),Fv); + Handle(BRepAdaptor_Curve2d) pced = new BRepAdaptor_Curve2d(); + pced->Initialize(CPadArc.Arc(),Fv); // in the case of degenerated Fi, parameter difference can be even negative (eap, occ293) if ((FiadArc.LastParameter() - FiadArc.FirstParameter()) > 10*tolesp) Update(HBs,pced,HGs,FiadArc,CPadArc,isfirst); @@ -789,10 +785,10 @@ void ChFi3d_Builder::PerformOneCorner(const Standard_Integer Index, return; } Bs.Initialize(Fv); - Handle(BRepAdaptor_HCurve2d) pced = new BRepAdaptor_HCurve2d(); - pced->ChangeCurve2d().Initialize(CV1.Arc(),Fv); + Handle(BRepAdaptor_Curve2d) pced = new BRepAdaptor_Curve2d(); + pced->Initialize(CV1.Arc(),Fv); Update(HBs,pced,HGs,Fd->ChangeInterferenceOnS1(),CV1,isfirst); - pced->ChangeCurve2d().Initialize(CV2.Arc(),Fv); + pced->Initialize(CV2.Arc(),Fv); Update(HBs,pced,HGs,Fd->ChangeInterferenceOnS2(),CV2,isfirst); } @@ -1692,12 +1688,12 @@ void ChFi3d_Builder::PerformIntersectionAtEnd(const Standard_Integer Index) PerformMoreThreeCorner (Index,1); return; } - Handle(GeomAdaptor_HSurface) HGs = ChFi3d_BoundSurf(DStr,Fd,1,2); + Handle(GeomAdaptor_Surface) HGs = ChFi3d_BoundSurf(DStr,Fd,1,2); ChFiDS_FaceInterference Fi1 = Fd->InterferenceOnS1(); ChFiDS_FaceInterference Fi2 = Fd->InterferenceOnS2(); - GeomAdaptor_Surface& Gs = HGs->ChangeSurface(); - Handle(BRepAdaptor_HSurface) HBs = new BRepAdaptor_HSurface(); - BRepAdaptor_Surface& Bs = HBs->ChangeSurface(); + GeomAdaptor_Surface& Gs = *HGs; + Handle(BRepAdaptor_Surface) HBs = new BRepAdaptor_Surface(); + BRepAdaptor_Surface& Bs = *HBs; Handle(Geom_Curve) Cc; Handle(Geom2d_Curve) Pc,Ps; Standard_Real Ubid,Vbid; @@ -2236,9 +2232,9 @@ void ChFi3d_Builder::PerformIntersectionAtEnd(const Standard_Integer Index) Ubid=Utrim; Vbid=Vtrim; } - Handle(GeomAdaptor_HCurve) HC = - new GeomAdaptor_HCurve(C,Ubid,Vbid); - GeomAdaptor_Curve & Cad =HC->ChangeCurve(); + Handle(GeomAdaptor_Curve) HC = + new GeomAdaptor_Curve(C,Ubid,Vbid); + GeomAdaptor_Curve & Cad = *HC; inters.Perform(HC, HGs); if ( !prolface[nn] && ( !inters.IsDone() || (inters.NbPoints()==0) )) { // extend surface of conge @@ -2309,8 +2305,8 @@ void ChFi3d_Builder::PerformIntersectionAtEnd(const Standard_Integer Index) inters.Perform(HC, HGs); trouve=inters.IsDone()&&inters.NbPoints()!=0; // eap occ293, eval tolex on finally trimmed curves -// Handle(GeomAdaptor_HSurface) H1=new GeomAdaptor_HSurface(Sfacemoins1); -// Handle(GeomAdaptor_HSurface) H2=new GeomAdaptor_HSurface(Sface); +// Handle(GeomAdaptor_Surface) H1=new GeomAdaptor_Surface(Sfacemoins1); +// Handle(GeomAdaptor_Surface) H2=new GeomAdaptor_Surface(Sface); // tolex=ChFi3d_EvalTolReached(H1,C2dint1,H2,C2dint2,cint); tolex = InterSS.TolReached3d(); } @@ -2739,12 +2735,12 @@ void ChFi3d_Builder::PerformIntersectionAtEnd(const Standard_Integer Index) Ct=new Geom_TrimmedCurve (csau,par1,par2); if (oneintersection1||oneintersection2) tolex=10*BRep_Tool::Tolerance(edgesau); if (extend) { - Handle(GeomAdaptor_HSurface) H1, H2; - H1=new GeomAdaptor_HSurface(Sfacemoins1); + Handle(GeomAdaptor_Surface) H1, H2; + H1=new GeomAdaptor_Surface(Sfacemoins1); if (Sface.IsNull()) tolex = Max (tolex, ChFi3d_EvalTolReached(H1,C2dint1,H1,C2dint1,Ct)); else { - H2=new GeomAdaptor_HSurface(Sface); + H2=new GeomAdaptor_Surface(Sface); tolex = Max (tolex, ChFi3d_EvalTolReached(H1,C2dint1,H2,C2dint2,Ct)); } } @@ -3145,8 +3141,8 @@ void ChFi3d_Builder::PerformMoreSurfdata(const Standard_Integer Index) Handle(Geom_Curve) aCint1; Handle(Geom2d_Curve) aPCint11; Handle(Geom2d_Curve) aPCint12; - Handle(GeomAdaptor_HSurface) H1 = new GeomAdaptor_HSurface(aSurfPrev); - Handle(GeomAdaptor_HSurface) H2 = new GeomAdaptor_HSurface(aSurf); + Handle(GeomAdaptor_Surface) H1 = new GeomAdaptor_Surface(aSurfPrev); + Handle(GeomAdaptor_Surface) H2 = new GeomAdaptor_Surface(aSurf); Standard_Real aTolex1=0.; Standard_Integer i; gp_Pnt aPext1; @@ -3254,8 +3250,8 @@ void ChFi3d_Builder::PerformMoreSurfdata(const Standard_Integer Index) if (!anInterSS2.IsDone()) return; - H1 = new GeomAdaptor_HSurface(aSurfPrev); - H2 = new GeomAdaptor_HSurface(aSurf); + H1 = new GeomAdaptor_Surface(aSurfPrev); + H2 = new GeomAdaptor_Surface(aSurf); isFound = Standard_False; @@ -3809,12 +3805,12 @@ void ChFi3d_Builder::IntersectMoreCorner(const Standard_Integer Index) TopAbs_Orientation OArcprolbis = TopAbs_FORWARD; TopAbs_Orientation OArcprolv = TopAbs_FORWARD, OArcprolop = TopAbs_FORWARD; Standard_Integer ICurve; - Handle(BRepAdaptor_HSurface) HBs = new BRepAdaptor_HSurface(); - Handle(BRepAdaptor_HSurface) HBad = new BRepAdaptor_HSurface(); - Handle(BRepAdaptor_HSurface) HBop = new BRepAdaptor_HSurface(); - BRepAdaptor_Surface& Bs = HBs->ChangeSurface(); - BRepAdaptor_Surface& Bad = HBad->ChangeSurface(); - BRepAdaptor_Surface& Bop = HBop->ChangeSurface(); + Handle(BRepAdaptor_Surface) HBs = new BRepAdaptor_Surface(); + Handle(BRepAdaptor_Surface) HBad = new BRepAdaptor_Surface(); + Handle(BRepAdaptor_Surface) HBop = new BRepAdaptor_Surface(); + BRepAdaptor_Surface& Bs = *HBs; + BRepAdaptor_Surface& Bad = *HBad; + BRepAdaptor_Surface& Bop = *HBop; Handle(Geom_Curve) Cc; Handle(Geom2d_Curve) Pc,Ps; Standard_Real Ubid,Vbid;//,mu,Mu,mv,Mv; @@ -3949,8 +3945,8 @@ void ChFi3d_Builder::IntersectMoreCorner(const Standard_Integer Index) // of its opposing vertex (point on arc). Standard_Real wop = Fd->ChangeInterference(IFadArc).Parameter(isfirst); Handle(Geom_Curve) c3df; - Handle(GeomAdaptor_HSurface) - HGs = new GeomAdaptor_HSurface(DStr.Surface(Fd->Surf()).Surface()); + Handle(GeomAdaptor_Surface) + HGs = new GeomAdaptor_Surface(DStr.Surface(Fd->Surf()).Surface()); gp_Pnt2d p2dbout; { @@ -3960,12 +3956,12 @@ void ChFi3d_Builder::IntersectMoreCorner(const Standard_Integer Index) c3df = DStr.Curve(FiopArc.LineIndex()).Curve(); Standard_Real uf = FiopArc.FirstParameter(); Standard_Real ul = FiopArc.LastParameter(); - Handle(GeomAdaptor_HCurve) Hc3df; + Handle(GeomAdaptor_Curve) Hc3df; if(c3df->IsPeriodic()){ - Hc3df = new GeomAdaptor_HCurve(c3df); + Hc3df = new GeomAdaptor_Curve(c3df); } else{ - Hc3df = new GeomAdaptor_HCurve(c3df,uf,ul); + Hc3df = new GeomAdaptor_Curve(c3df,uf,ul); } inters = Update(HBs,Hc3df,FiopArc,CPopArc,p2dbout,isfirst,wop); // Modified by Sergey KHROMOV - Fri Dec 21 18:08:27 2001 Begin @@ -3975,13 +3971,13 @@ void ChFi3d_Builder::IntersectMoreCorner(const Standard_Integer Index) // Arcprol is an edge of tangency, ultimate adjustment by an extrema curve/curve is attempted. Standard_Real ff,ll; Handle(Geom2d_Curve) gpcprol = BRep_Tool::CurveOnSurface(Arcprol,Fv,ff,ll); - Handle(Geom2dAdaptor_HCurve) pcprol = new Geom2dAdaptor_HCurve(gpcprol); + Handle(Geom2dAdaptor_Curve) pcprol = new Geom2dAdaptor_Curve(gpcprol); Standard_Real partemp = BRep_Tool::Parameter(Vtx,Arcprol); inters = Update(HBs,pcprol,HGs,FiopArc,CPopArc,p2dbout, isfirst,partemp,wop,10*tolesp); } - Handle(BRepAdaptor_HCurve2d) pced = new BRepAdaptor_HCurve2d(); - pced->ChangeCurve2d().Initialize(CPadArc.Arc(),Fv); + Handle(BRepAdaptor_Curve2d) pced = new BRepAdaptor_Curve2d(); + pced->Initialize(CPadArc.Arc(),Fv); Update(HBs,pced,HGs,FiadArc,CPadArc,isfirst); } #ifdef OCCT_DEBUG diff --git a/src/ChFi3d/ChFi3d_Builder_C2.cxx b/src/ChFi3d/ChFi3d_Builder_C2.cxx index 12397fddf3..a61a85c00d 100644 --- a/src/ChFi3d/ChFi3d_Builder_C2.cxx +++ b/src/ChFi3d/ChFi3d_Builder_C2.cxx @@ -15,9 +15,9 @@ // commercial license or contractual agreement. -#include -#include -#include +#include +#include +#include #include #include #include @@ -30,9 +30,6 @@ #include #include #include -#include -#include -#include #include #include #include @@ -42,7 +39,7 @@ #include #include #include -#include +#include #include #include #include @@ -50,13 +47,13 @@ #include #include #include -#include +#include #include #include #include #include -#include -#include +#include +#include #include #include #include @@ -97,11 +94,11 @@ static void Reduce(const Standard_Real& p1, const Standard_Real& p2, - Handle(GeomAdaptor_HSurface)& hs1, - Handle(GeomAdaptor_HSurface)& hs2) + Handle(GeomAdaptor_Surface)& hs1, + Handle(GeomAdaptor_Surface)& hs2) { - GeomAdaptor_Surface& s1 = hs1->ChangeSurface(); - GeomAdaptor_Surface& s2 = hs2->ChangeSurface(); + GeomAdaptor_Surface& s1 = *hs1; + GeomAdaptor_Surface& s2 = *hs2; const Handle(Geom_Surface)& surf = s1.Surface(); Standard_Real ud,uf,vd,vf; surf->Bounds(ud,uf,vd,vf); @@ -118,9 +115,9 @@ static void Reduce(const Standard_Real& p1, static void Reduce(const Standard_Real& p1, const Standard_Real& p2, - Handle(GeomAdaptor_HCurve)& hc) + Handle(GeomAdaptor_Curve)& hc) { - GeomAdaptor_Curve& c = hc->ChangeCurve(); + GeomAdaptor_Curve& c = *hc; Standard_Real f = c.FirstParameter(); Standard_Real l = c.LastParameter(); Standard_Real milmoins = 0.51*f+0.49*l, milplus = 0.49*f+0.51*l; @@ -249,7 +246,7 @@ Standard_Boolean ChFi3d_Builder::PerformTwoCornerbyInter(const Standard_Integer pivot = CP1.Arc(); Standard_Real parCP1 = CP1.ParameterOnArc(); Standard_Real parCP2 = CP2.ParameterOnArc(); - Handle(BRepAdaptor_HCurve) Hpivot = new BRepAdaptor_HCurve(pivot); + Handle(BRepAdaptor_Curve) Hpivot = new BRepAdaptor_Curve(pivot); if (!pivot.IsSame(CP2.Arc())){ Handle(Geom_Curve) csau; Standard_Real ubid,vbid; @@ -288,7 +285,7 @@ Standard_Boolean ChFi3d_Builder::PerformTwoCornerbyInter(const Standard_Integer return done; } - Handle(GeomAdaptor_HSurface) HS1, HS2; + Handle(GeomAdaptor_Surface) HS1, HS2; HS1 = ChFi3d_BoundSurf (DStr,Fd1,IFaCo1,IFaArc1); HS2 = ChFi3d_BoundSurf (DStr,Fd2,IFaCo2,IFaArc2); @@ -307,7 +304,7 @@ Standard_Boolean ChFi3d_Builder::PerformTwoCornerbyInter(const Standard_Integer Pardeb(1)= UV.X(); Pardeb(2)=UV.Y(); UV = Fd2->Interference(IFaCo2).PCurveOnSurf()->Value(UIntPC2); Pardeb(3)= UV.X(); Pardeb(4)=UV.Y(); - gp_Pnt PFaCo = HS1->Surface().Value(Pardeb(1),Pardeb(2)); + gp_Pnt PFaCo = HS1->Value(Pardeb(1),Pardeb(2)); // Side arc, calculation of Parfin. Standard_Real UIntArc1 = Fd1->Interference(IFaArc1).Parameter(isfirst1); @@ -410,7 +407,7 @@ Standard_Boolean ChFi3d_Builder::PerformTwoCornerbyInter(const Standard_Integer } Handle(ChFiDS_Stripe) BigCD, SmaCD; Handle(ChFiDS_SurfData) BigFD, SmaFD; - Handle(GeomAdaptor_HSurface) BigHS, SmaHS; + Handle(GeomAdaptor_Surface) BigHS, SmaHS; Standard_Integer IFaCoBig, IFaCoSma, IFaArcBig, IFaArcSma; Standard_Boolean isfirstBig, isfirstSma; Standard_Real UIntPCBig, UIntPCSma; @@ -452,8 +449,8 @@ Standard_Boolean ChFi3d_Builder::PerformTwoCornerbyInter(const Standard_Integer // Parfin (parameters of point PMil) const ChFiDS_FaceInterference& FiArcSma = SmaFD->Interference(IFaArcSma); Handle(Geom_Curve) ctg = DStr.Curve(FiArcSma.LineIndex()).Curve(); - Handle(GeomAdaptor_HCurve) Hctg = new GeomAdaptor_HCurve(); - GeomAdaptor_Curve& bid = Hctg->ChangeCurve(); + Handle(GeomAdaptor_Curve) Hctg = new GeomAdaptor_Curve(); + GeomAdaptor_Curve& bid = *Hctg; Standard_Real temp,wi; if (isfirstSma) { @@ -560,7 +557,7 @@ Standard_Boolean ChFi3d_Builder::PerformTwoCornerbyInter(const Standard_Integer // The intersection curve surface is tried again, now with representation // pcurve on face of the curve to be sure. TopoDS_Face F = TopoDS::Face(DStr.Shape(SmaFD->Index(IFaArcSma))); - Handle(BRepAdaptor_HSurface) HF = new BRepAdaptor_HSurface(F); + Handle(BRepAdaptor_Surface) HF = new BRepAdaptor_Surface(F); Standard_Real fsma = FiArcSma.FirstParameter(); Standard_Real lsma = FiArcSma.LastParameter(); Standard_Real deltSma = 0.05 * (lsma - fsma); @@ -571,10 +568,10 @@ Standard_Boolean ChFi3d_Builder::PerformTwoCornerbyInter(const Standard_Integer done=Standard_False; return done; } - Handle(Geom2dAdaptor_HCurve) c2df = - new Geom2dAdaptor_HCurve(SmaFD->Interference(IFaArcSma).PCurveOnFace(),fsma,lsma); + Handle(Geom2dAdaptor_Curve) c2df = + new Geom2dAdaptor_Curve(SmaFD->Interference(IFaArcSma).PCurveOnFace(),fsma,lsma); Adaptor3d_CurveOnSurface consf(c2df,HF); - Handle(Adaptor3d_HCurveOnSurface) Hconsf = new Adaptor3d_HCurveOnSurface(consf); + Handle(Adaptor3d_CurveOnSurface) Hconsf = new Adaptor3d_CurveOnSurface(consf); if(!ChFi3d_IntCS(BigHS,Hconsf,UVi,wi)) { #ifdef OCCT_DEBUG std::cout<<"bevel : failed inter C S"<ChangeSurface(),uu1,uu2,vv1,vv2,Standard_True); + ChFi3d_BoundFac (*HF, uu1, uu2, vv1, vv2, Standard_True); if (!ChFi3d_ComputeCurves(HF,BigHS,Pardeb,Parfin,Gc, PGc1,PGc2,tolesp,tol2d,tolreached)) { diff --git a/src/ChFi3d/ChFi3d_Builder_CnCrn.cxx b/src/ChFi3d/ChFi3d_Builder_CnCrn.cxx index e8087c1cd7..2bf88ee47c 100644 --- a/src/ChFi3d/ChFi3d_Builder_CnCrn.cxx +++ b/src/ChFi3d/ChFi3d_Builder_CnCrn.cxx @@ -35,10 +35,9 @@ // consecutives // Traitement des coins -#include +#include #include -#include -#include +#include #include #include #include @@ -51,8 +50,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include @@ -64,7 +63,7 @@ #include #include #include -#include +#include #include #include #include @@ -80,7 +79,7 @@ #include #include #include -#include +#include #include #include #include @@ -88,7 +87,7 @@ #include #include #include -#include +#include #include #include #include @@ -494,7 +493,7 @@ static void CalculDroite(const gp_Pnt2d & p2d1, //purpose : calcule a batten between curves 2d curv2d1 and curv2d2 at points p2d1 and p2d2 //======================================================================= -static void CalculBatten (const Handle (GeomAdaptor_HSurface) ASurf, +static void CalculBatten (const Handle (GeomAdaptor_Surface) ASurf, const TopoDS_Face Face , const Standard_Real xdir, const Standard_Real ydir, @@ -719,8 +718,8 @@ static void PerformTwoCornerSameExt(TopOpeBRepDS_DataStructure& DStr, Parfin(1)= pfi12.X();Parfin(2) = pfi12.Y(); Parfin(3)= pfi22.X();Parfin(4) = pfi22.Y(); - Handle(GeomAdaptor_HSurface) HS1= ChFi3d_BoundSurf(DStr,Fd1,1,2); - Handle(GeomAdaptor_HSurface) HS2= ChFi3d_BoundSurf(DStr,Fd2,1,2); + Handle(GeomAdaptor_Surface) HS1= ChFi3d_BoundSurf(DStr,Fd1,1,2); + Handle(GeomAdaptor_Surface) HS2= ChFi3d_BoundSurf(DStr,Fd2,1,2); trouve=Standard_False; if (ChFi3d_ComputeCurves(HS1,HS2,Pardeb,Parfin,cint, C2dint1,C2dint2,1.e-4,1.e-5,tol)){ @@ -2064,8 +2063,8 @@ void ChFi3d_Builder::PerformMoreThreeCorner(const Standard_Integer Jndex, Calcul_P2dOnSurf(CD.Value(ic),jf.Value(ic),i.Value(ic,icplus),p.Value(ic,icplus),p2d2); // if (i[ic][icplus]!= i[ic][icmoins]) std::cout<<"probleme surface"<Value(p.Value(icplus,ic)); - Asurf = new GeomAdaptor_HSurface(BRep_Tool::Surface(TopoDS::Face(Fvive.Value(ic,icplus)))); + Asurf = new GeomAdaptor_Surface(BRep_Tool::Surface(TopoDS::Face(Fvive.Value(ic,icplus)))); Standard_Real tolu,tolv,ratio; - tolu=Asurf->Surface().UResolution(1.e-3); - tolv=Asurf->Surface().VResolution(1.e-3); + tolu=Asurf->UResolution(1.e-3); + tolv=Asurf->VResolution(1.e-3); if (tolu>tolv) ratio=tolu/tolv; else ratio=tolv/tolu; @@ -2351,10 +2350,10 @@ void ChFi3d_Builder::PerformMoreThreeCorner(const Standard_Integer Jndex, } // construction of borders for Plate - Handle (Geom2dAdaptor_HCurve) Acurv=new Geom2dAdaptor_HCurve(pcurve); + Handle (Geom2dAdaptor_Curve) Acurv=new Geom2dAdaptor_Curve(pcurve); Adaptor3d_CurveOnSurface CurvOnS (Acurv,Asurf); - Handle(Adaptor3d_HCurveOnSurface) HCons = - new Adaptor3d_HCurveOnSurface(CurvOnS); + Handle(Adaptor3d_CurveOnSurface) HCons = + new Adaptor3d_CurveOnSurface(CurvOnS); // constraints G1 are set if edges ic and icplus are not both alive @@ -2483,12 +2482,12 @@ void ChFi3d_Builder::PerformMoreThreeCorner(const Standard_Integer Jndex, indpoint2= DStr.AddPoint(tpoint2); ind=indpoint2; } - Handle (GeomAdaptor_HSurface) Asurf; - Asurf = new GeomAdaptor_HSurface(BRep_Tool::Surface + Handle (GeomAdaptor_Surface) Asurf; + Asurf = new GeomAdaptor_Surface(BRep_Tool::Surface (TopoDS::Face(Fproj.Value(nb)))); - Handle (Geom2dAdaptor_HCurve) Acurv=new Geom2dAdaptor_HCurve(proj2d); + Handle (Geom2dAdaptor_Curve) Acurv=new Geom2dAdaptor_Curve(proj2d); Adaptor3d_CurveOnSurface CurvOnS (Acurv,Asurf); - Handle(Adaptor3d_HCurveOnSurface) HCons =new Adaptor3d_HCurveOnSurface(CurvOnS); + Handle(Adaptor3d_CurveOnSurface) HCons =new Adaptor3d_CurveOnSurface(CurvOnS); Order.SetValue(n3d,1); Handle(GeomPlate_CurveConstraint) Cont = new GeomPlate_CurveConstraint(HCons,Order.Value(n3d),10,tolesp,angular,0.1); @@ -2596,12 +2595,12 @@ void ChFi3d_Builder::PerformMoreThreeCorner(const Standard_Integer Jndex, } ufirst=ctrim->FirstParameter(); ulast=ctrim->LastParameter(); - Handle (GeomAdaptor_HSurface) Asurf; - Asurf = new GeomAdaptor_HSurface(BRep_Tool::Surface + Handle (GeomAdaptor_Surface) Asurf; + Asurf = new GeomAdaptor_Surface(BRep_Tool::Surface (TopoDS::Face(Fvive.Value(ic,icplus)))); - Handle (Geom2dAdaptor_HCurve) Acurv=new Geom2dAdaptor_HCurve(ctrim2d); + Handle (Geom2dAdaptor_Curve) Acurv=new Geom2dAdaptor_Curve(ctrim2d); Adaptor3d_CurveOnSurface CurvOnS (Acurv,Asurf); - Handle(Adaptor3d_HCurveOnSurface) HCons =new Adaptor3d_HCurveOnSurface(CurvOnS); + Handle(Adaptor3d_CurveOnSurface) HCons =new Adaptor3d_CurveOnSurface(CurvOnS); Order.SetValue(n3d,0); Handle(GeomPlate_CurveConstraint) Cont = new GeomPlate_CurveConstraint(HCons,Order.Value(n3d),10,tolesp,angular,0.1); diff --git a/src/ChFi3d/ChFi3d_Builder_NotImp.cxx b/src/ChFi3d/ChFi3d_Builder_NotImp.cxx index f7b8237f99..21038bf9df 100644 --- a/src/ChFi3d/ChFi3d_Builder_NotImp.cxx +++ b/src/ChFi3d/ChFi3d_Builder_NotImp.cxx @@ -15,8 +15,8 @@ // commercial license or contractual agreement. -#include -#include +#include +#include #include #include #include @@ -26,13 +26,13 @@ #include #include #include -#include -#include +#include +#include #include #include #include #include -#include +#include #include #include #include @@ -54,16 +54,16 @@ //purpose : //======================================================================= void ChFi3d_Builder::SimulSurf(Handle(ChFiDS_SurfData)& , - const Handle(ChFiDS_HElSpine)& , + const Handle(ChFiDS_ElSpine)& , const Handle(ChFiDS_Spine)& , const Standard_Integer , - const Handle(BRepAdaptor_HSurface)& , + const Handle(BRepAdaptor_Surface)& , const Handle(Adaptor3d_TopolTool)& , - const Handle(BRepAdaptor_HCurve2d)& , - const Handle(BRepAdaptor_HSurface)& , - const Handle(BRepAdaptor_HCurve2d)& , + const Handle(BRepAdaptor_Curve2d)& , + const Handle(BRepAdaptor_Surface)& , + const Handle(BRepAdaptor_Curve2d)& , Standard_Boolean& , - const Handle(BRepAdaptor_HSurface)& , + const Handle(BRepAdaptor_Surface)& , const Handle(Adaptor3d_TopolTool)& , const TopAbs_Orientation , const Standard_Real , @@ -87,17 +87,17 @@ void ChFi3d_Builder::SimulSurf(Handle(ChFiDS_SurfData)& , //======================================================================= void ChFi3d_Builder::SimulSurf(Handle(ChFiDS_SurfData)& , - const Handle(ChFiDS_HElSpine)& , + const Handle(ChFiDS_ElSpine)& , const Handle(ChFiDS_Spine)& , const Standard_Integer , - const Handle(BRepAdaptor_HSurface)& , + const Handle(BRepAdaptor_Surface)& , const Handle(Adaptor3d_TopolTool)& , const TopAbs_Orientation , - const Handle(BRepAdaptor_HSurface)& , + const Handle(BRepAdaptor_Surface)& , const Handle(Adaptor3d_TopolTool)& , - const Handle(BRepAdaptor_HCurve2d)& , - const Handle(BRepAdaptor_HSurface)& , - const Handle(BRepAdaptor_HCurve2d)& , + const Handle(BRepAdaptor_Curve2d)& , + const Handle(BRepAdaptor_Surface)& , + const Handle(BRepAdaptor_Curve2d)& , Standard_Boolean& , const Standard_Real , const Standard_Real , @@ -121,21 +121,21 @@ void ChFi3d_Builder::SimulSurf(Handle(ChFiDS_SurfData)& , //======================================================================= void ChFi3d_Builder::SimulSurf(Handle(ChFiDS_SurfData)& , - const Handle(ChFiDS_HElSpine)& , + const Handle(ChFiDS_ElSpine)& , const Handle(ChFiDS_Spine)& , const Standard_Integer , - const Handle(BRepAdaptor_HSurface)& , + const Handle(BRepAdaptor_Surface)& , const Handle(Adaptor3d_TopolTool)& , - const Handle(BRepAdaptor_HCurve2d)& , - const Handle(BRepAdaptor_HSurface)& , - const Handle(BRepAdaptor_HCurve2d)& , + const Handle(BRepAdaptor_Curve2d)& , + const Handle(BRepAdaptor_Surface)& , + const Handle(BRepAdaptor_Curve2d)& , Standard_Boolean& , const TopAbs_Orientation , - const Handle(BRepAdaptor_HSurface)& , + const Handle(BRepAdaptor_Surface)& , const Handle(Adaptor3d_TopolTool)& , - const Handle(BRepAdaptor_HCurve2d)& , - const Handle(BRepAdaptor_HSurface)& , - const Handle(BRepAdaptor_HCurve2d)& , + const Handle(BRepAdaptor_Curve2d)& , + const Handle(BRepAdaptor_Surface)& , + const Handle(BRepAdaptor_Curve2d)& , Standard_Boolean& , const TopAbs_Orientation , const Standard_Real , @@ -162,16 +162,16 @@ void ChFi3d_Builder::SimulSurf(Handle(ChFiDS_SurfData)& , //======================================================================= void ChFi3d_Builder::PerformSurf(ChFiDS_SequenceOfSurfData& , - const Handle(ChFiDS_HElSpine)& , + const Handle(ChFiDS_ElSpine)& , const Handle(ChFiDS_Spine)& , const Standard_Integer , - const Handle(BRepAdaptor_HSurface)& , + const Handle(BRepAdaptor_Surface)& , const Handle(Adaptor3d_TopolTool)& , - const Handle(BRepAdaptor_HCurve2d)& , - const Handle(BRepAdaptor_HSurface)& , - const Handle(BRepAdaptor_HCurve2d)& , + const Handle(BRepAdaptor_Curve2d)& , + const Handle(BRepAdaptor_Surface)& , + const Handle(BRepAdaptor_Curve2d)& , Standard_Boolean& , - const Handle(BRepAdaptor_HSurface)& , + const Handle(BRepAdaptor_Surface)& , const Handle(Adaptor3d_TopolTool)& , const TopAbs_Orientation , const Standard_Real , @@ -196,17 +196,17 @@ void ChFi3d_Builder::PerformSurf(ChFiDS_SequenceOfSurfData& , //======================================================================= void ChFi3d_Builder::PerformSurf(ChFiDS_SequenceOfSurfData& , - const Handle(ChFiDS_HElSpine)& , + const Handle(ChFiDS_ElSpine)& , const Handle(ChFiDS_Spine)& , const Standard_Integer , - const Handle(BRepAdaptor_HSurface)& , + const Handle(BRepAdaptor_Surface)& , const Handle(Adaptor3d_TopolTool)& , const TopAbs_Orientation , - const Handle(BRepAdaptor_HSurface)& , + const Handle(BRepAdaptor_Surface)& , const Handle(Adaptor3d_TopolTool)& , - const Handle(BRepAdaptor_HCurve2d)& , - const Handle(BRepAdaptor_HSurface)& , - const Handle(BRepAdaptor_HCurve2d)& , + const Handle(BRepAdaptor_Curve2d)& , + const Handle(BRepAdaptor_Surface)& , + const Handle(BRepAdaptor_Curve2d)& , Standard_Boolean& , const Standard_Real , const Standard_Real , @@ -235,21 +235,21 @@ void ChFi3d_Builder::PerformSurf(ChFiDS_SequenceOfSurfData& , //======================================================================= void ChFi3d_Builder::PerformSurf(ChFiDS_SequenceOfSurfData& , - const Handle(ChFiDS_HElSpine)& , + const Handle(ChFiDS_ElSpine)& , const Handle(ChFiDS_Spine)& , const Standard_Integer , - const Handle(BRepAdaptor_HSurface)& , + const Handle(BRepAdaptor_Surface)& , const Handle(Adaptor3d_TopolTool)& , - const Handle(BRepAdaptor_HCurve2d)& , - const Handle(BRepAdaptor_HSurface)& , - const Handle(BRepAdaptor_HCurve2d)& , + const Handle(BRepAdaptor_Curve2d)& , + const Handle(BRepAdaptor_Surface)& , + const Handle(BRepAdaptor_Curve2d)& , Standard_Boolean& , const TopAbs_Orientation , - const Handle(BRepAdaptor_HSurface)& , + const Handle(BRepAdaptor_Surface)& , const Handle(Adaptor3d_TopolTool)& , - const Handle(BRepAdaptor_HCurve2d)& , - const Handle(BRepAdaptor_HSurface)& , - const Handle(BRepAdaptor_HCurve2d)& , + const Handle(BRepAdaptor_Curve2d)& , + const Handle(BRepAdaptor_Surface)& , + const Handle(BRepAdaptor_Curve2d)& , Standard_Boolean& , const TopAbs_Orientation , const Standard_Real , diff --git a/src/ChFi3d/ChFi3d_Builder_SpKP.cxx b/src/ChFi3d/ChFi3d_Builder_SpKP.cxx index 9c995cf003..06a4f585af 100644 --- a/src/ChFi3d/ChFi3d_Builder_SpKP.cxx +++ b/src/ChFi3d/ChFi3d_Builder_SpKP.cxx @@ -15,8 +15,8 @@ // commercial license or contractual agreement. -#include -#include +#include +#include #include #include #include @@ -28,15 +28,15 @@ #include #include #include -#include -#include -#include +#include +#include +#include #include #include #include #include #include -#include +#include #include #include #include @@ -48,7 +48,7 @@ #include #include #include -#include +#include #include #include #include @@ -57,7 +57,7 @@ #include #include #include -#include +#include #include #include #include @@ -260,8 +260,8 @@ static Standard_Real ParamOnSpine(const TopOpeBRepDS_DataStructure& DStr, gp_Pln nlp(PP,gp_Dir(VV)); Handle(Geom_Plane) pln = new Geom_Plane(nlp); - Handle(GeomAdaptor_HSurface) - plan = new GeomAdaptor_HSurface(GeomAdaptor_Surface(pln)); + Handle(GeomAdaptor_Surface) + plan = new GeomAdaptor_Surface(GeomAdaptor_Surface(pln)); // intersection plane spine. Standard_Boolean found = Standard_False; @@ -277,8 +277,8 @@ static Standard_Real ParamOnSpine(const TopOpeBRepDS_DataStructure& DStr, pok = 1; return Nl; } - Handle(BRepAdaptor_HCurve) HE = new BRepAdaptor_HCurve(); - BRepAdaptor_Curve& CE = HE->ChangeCurve(); + Handle(BRepAdaptor_Curve) HE = new BRepAdaptor_Curve(); + BRepAdaptor_Curve& CE = *HE; while (!found && !fini) { TopAbs_Orientation O = Spine->Edges(ii).Orientation(); @@ -346,8 +346,8 @@ static Standard_Boolean YaUnVoisin(const Handle(ChFiDS_Spine)& Spine, void ChFi3d_Builder::Trunc(const Handle(ChFiDS_SurfData)& SD, const Handle(ChFiDS_Spine)& Spine, - const Handle(Adaptor3d_HSurface)& S1, - const Handle(Adaptor3d_HSurface)& S2, + const Handle(Adaptor3d_Surface)& S1, + const Handle(Adaptor3d_Surface)& S2, const Standard_Integer iedge, const Standard_Boolean isfirst, const Standard_Integer cntlFiOnS) @@ -400,17 +400,17 @@ void ChFi3d_Builder::Trunc(const Handle(ChFiDS_SurfData)& SD, if(dis1 >= 0.1*dis2) tron = Standard_True; Standard_Integer ivois; if(!tron && YaUnVoisin(Spine,iedge,ivois,isfirst)) { - Handle(BRepAdaptor_HSurface) BS1 = Handle(BRepAdaptor_HSurface)::DownCast(S1); - Handle(BRepAdaptor_HSurface) BS2 = Handle(BRepAdaptor_HSurface)::DownCast(S2); + Handle(BRepAdaptor_Surface) BS1 = Handle(BRepAdaptor_Surface)::DownCast(S1); + Handle(BRepAdaptor_Surface) BS2 = Handle(BRepAdaptor_Surface)::DownCast(S2); if(!BS1.IsNull() && !BS2.IsNull()) { TopoDS_Face FBID; - TopoDS_Face F1 = BS1->ChangeSurface().Face(); - TopoDS_Face F2 = BS2->ChangeSurface().Face(); + TopoDS_Face F1 = BS1->Face(); + TopoDS_Face F2 = BS2->Face(); const ChFiDS_CommonPoint& cp1 = SD->Vertex(isfirst,1); const ChFiDS_CommonPoint& cp2 = SD->Vertex(isfirst,2); if(!((cp1.IsOnArc() && SearchFace(Spine,cp1,F1,FBID)) || (cp2.IsOnArc() && SearchFace(Spine,cp2,F2,FBID)))) { - tron = ChFi3d_KParticular(Spine,ivois,BS1->ChangeSurface(),BS2->ChangeSurface()); + tron = ChFi3d_KParticular (Spine, ivois, *BS1, *BS2); } } } @@ -603,9 +603,9 @@ static void FillSD (TopOpeBRepDS_DataStructure& DStr, for(;trouve;) { const HatchGen_PointOnElement& PEtemp = pPH->Point(LeType); IE = PEtemp.Index(); - Handle(BRepAdaptor_HCurve2d) HE = Handle(BRepAdaptor_HCurve2d)::DownCast(M(IE)); + Handle(BRepAdaptor_Curve2d) HE = Handle(BRepAdaptor_Curve2d)::DownCast(M(IE)); if(!HE.IsNull()) { - const TopoDS_Edge& Etemp = HE->ChangeCurve2d().Edge(); + const TopoDS_Edge& Etemp = HE->Edge(); TopExp::Vertices(Etemp,V1,V2); } else { @@ -628,10 +628,10 @@ static void FillSD (TopOpeBRepDS_DataStructure& DStr, } const HatchGen_PointOnElement& PE = pPH->Point(LeType); Standard_Integer IE = PE.Index(); - Handle(BRepAdaptor_HCurve2d) - HE = Handle(BRepAdaptor_HCurve2d)::DownCast(M(IE)); + Handle(BRepAdaptor_Curve2d) + HE = Handle(BRepAdaptor_Curve2d)::DownCast(M(IE)); if(HE.IsNull()) return; - const TopoDS_Edge& E = HE->ChangeCurve2d().Edge(); + const TopoDS_Edge& E = HE->Edge(); if (PE.Position() != TopAbs_INTERNAL) { TopAbs_Orientation O = CD->Interference(ons).Transition(); @@ -665,9 +665,9 @@ Standard_Boolean ChFi3d_Builder::SplitKPart ChFiDS_SequenceOfSurfData& SetData, const Handle(ChFiDS_Spine)& Spine, const Standard_Integer Iedge, - const Handle(Adaptor3d_HSurface)& S1, + const Handle(Adaptor3d_Surface)& S1, const Handle(Adaptor3d_TopolTool)& I1, - const Handle(Adaptor3d_HSurface)& S2, + const Handle(Adaptor3d_Surface)& S2, const Handle(Adaptor3d_TopolTool)& I2, Standard_Boolean& intf, Standard_Boolean& intl) @@ -689,13 +689,12 @@ Standard_Boolean ChFi3d_Builder::SplitKPart if (!C1.IsNull()) { ll1.Load(C1); for(I1->Init(); I1->More(); I1->Next()) { - Handle(BRepAdaptor_HCurve2d) - Bc = Handle(BRepAdaptor_HCurve2d)::DownCast(I1->Value()); - Handle(Geom2dAdaptor_HCurve) - Gc = Handle(Geom2dAdaptor_HCurve)::DownCast(I1->Value()); - if(Bc.IsNull()) ie = H1.AddElement(Gc->ChangeCurve2d(),TopAbs_FORWARD); - else ie = H1.AddElement(Bc->ChangeCurve2d(), - Bc->ChangeCurve2d().Edge().Orientation()); + Handle(BRepAdaptor_Curve2d) + Bc = Handle(BRepAdaptor_Curve2d)::DownCast(I1->Value()); + Handle(Geom2dAdaptor_Curve) + Gc = Handle(Geom2dAdaptor_Curve)::DownCast(I1->Value()); + if(Bc.IsNull()) ie = H1.AddElement (*Gc, TopAbs_FORWARD); + else ie = H1.AddElement (*Bc, Bc->Edge().Orientation()); M1.Bind(ie,I1->Value()); } iH1 = H1.Trim(ll1); @@ -715,13 +714,12 @@ Standard_Boolean ChFi3d_Builder::SplitKPart if (!C2.IsNull()) { ll2.Load(C2); for(I2->Init(); I2->More(); I2->Next()) { - Handle(BRepAdaptor_HCurve2d) - Bc = Handle(BRepAdaptor_HCurve2d)::DownCast(I2->Value()); - Handle(Geom2dAdaptor_HCurve) - Gc = Handle(Geom2dAdaptor_HCurve)::DownCast(I2->Value()); - if(Bc.IsNull()) ie = H2.AddElement(Gc->ChangeCurve2d(),TopAbs_FORWARD); - else ie = H2.AddElement(Bc->ChangeCurve2d(), - Bc->ChangeCurve2d().Edge().Orientation()); + Handle(BRepAdaptor_Curve2d) + Bc = Handle(BRepAdaptor_Curve2d)::DownCast(I2->Value()); + Handle(Geom2dAdaptor_Curve) + Gc = Handle(Geom2dAdaptor_Curve)::DownCast(I2->Value()); + if(Bc.IsNull()) ie = H2.AddElement (*Gc, TopAbs_FORWARD); + else ie = H2.AddElement (*Bc, Bc->Edge().Orientation()); M2.Bind(ie,I2->Value()); } iH2 = H2.Trim(ll2); @@ -749,11 +747,11 @@ Standard_Boolean ChFi3d_Builder::SplitKPart // Return faces. TopoDS_Face F1, F2; - Handle(BRepAdaptor_HSurface) - bhs = Handle(BRepAdaptor_HSurface)::DownCast(S1); - if(!bhs.IsNull()) F1 = bhs->ChangeSurface().Face(); - bhs = Handle(BRepAdaptor_HSurface)::DownCast(S2); - if(!bhs.IsNull()) F2 = bhs->ChangeSurface().Face(); + Handle(BRepAdaptor_Surface) + bhs = Handle(BRepAdaptor_Surface)::DownCast(S1); + if(!bhs.IsNull()) F1 = bhs->Face(); + bhs = Handle(BRepAdaptor_Surface)::DownCast(S2); + if(!bhs.IsNull()) F2 = bhs->Face(); TopoDS_Face FBID; // Restriction of SurfDatas by cut lines. diff --git a/src/ChFi3d/ChFi3d_ChBuilder.cxx b/src/ChFi3d/ChFi3d_ChBuilder.cxx index 912441c93d..29bdbac19d 100644 --- a/src/ChFi3d/ChFi3d_ChBuilder.cxx +++ b/src/ChFi3d/ChFi3d_ChBuilder.cxx @@ -19,8 +19,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include @@ -39,7 +39,7 @@ #include #include #include -#include +#include #include #include #include @@ -50,7 +50,7 @@ #include #include #include -#include +#include #include #include #include @@ -729,12 +729,12 @@ void ChFi3d_ChBuilder::SimulKPart(const Handle(ChFiDS_SurfData)& SD ) const Standard_Boolean ChFi3d_ChBuilder::SimulSurf(Handle(ChFiDS_SurfData)& Data, - const Handle(ChFiDS_HElSpine)& HGuide, + const Handle(ChFiDS_ElSpine)& HGuide, const Handle(ChFiDS_Spine)& Spine, const Standard_Integer Choix, - const Handle(BRepAdaptor_HSurface)& S1, + const Handle(BRepAdaptor_Surface)& S1, const Handle(Adaptor3d_TopolTool)& I1, - const Handle(BRepAdaptor_HSurface)& S2, + const Handle(BRepAdaptor_Surface)& S2, const Handle(Adaptor3d_TopolTool)& I2, const Standard_Real TolGuide, Standard_Real& First, @@ -781,7 +781,7 @@ ChFi3d_ChBuilder::SimulSurf(Handle(ChFiDS_SurfData)& Data, if(intl) Last = chsp->LastParameter(chsp->NbEdges()); - Handle(ChFiDS_HElSpine) OffsetHGuide; + Handle(ChFiDS_ElSpine) OffsetHGuide; if (chsp->IsChamfer() == ChFiDS_Sym) { Standard_Real dis; @@ -850,14 +850,14 @@ ChFi3d_ChBuilder::SimulSurf(Handle(ChFiDS_SurfData)& Data, Standard_Boolean ok = Standard_False; const ChFiDS_CommonPoint& cp1 = Data->VertexFirstOnS1(); if(cp1.IsOnArc()){ - TopoDS_Face F1 = S1->ChangeSurface().Face(); + TopoDS_Face F1 = S1->Face(); TopoDS_Face bid; intf = !SearchFace(Spine,cp1,F1,bid); ok = intf != 0; } const ChFiDS_CommonPoint& cp2 = Data->VertexFirstOnS2(); if(cp2.IsOnArc() && !ok){ - TopoDS_Face F2 = S2->ChangeSurface().Face(); + TopoDS_Face F2 = S2->Face(); TopoDS_Face bid; intf = !SearchFace(Spine,cp2,F2,bid); } @@ -866,14 +866,14 @@ ChFi3d_ChBuilder::SimulSurf(Handle(ChFiDS_SurfData)& Data, Standard_Boolean ok = Standard_False; const ChFiDS_CommonPoint& cp1 = Data->VertexLastOnS1(); if(cp1.IsOnArc()){ - TopoDS_Face F1 = S1->ChangeSurface().Face(); + TopoDS_Face F1 = S1->Face(); TopoDS_Face bid; intl = !SearchFace(Spine,cp1,F1,bid); ok = intl != 0; } const ChFiDS_CommonPoint& cp2 = Data->VertexLastOnS2(); if(cp2.IsOnArc() && !ok){ - TopoDS_Face F2 = S2->ChangeSurface().Face(); + TopoDS_Face F2 = S2->Face(); TopoDS_Face bid; intl = !SearchFace(Spine,cp2,F2,bid); } @@ -907,7 +907,7 @@ ChFi3d_ChBuilder::SimulSurf(Handle(ChFiDS_SurfData)& Data, ChFiDS_ListIteratorOfListOfHElSpine ILES(ll), ILES_offset(ll_offset); for ( ; ILES.More(); ILES.Next(),ILES_offset.Next()) { - const Handle(ChFiDS_HElSpine)& aHElSpine = ILES.Value(); + const Handle(ChFiDS_ElSpine)& aHElSpine = ILES.Value(); if (aHElSpine == HGuide) OffsetHGuide = ILES_offset.Value(); } @@ -965,14 +965,14 @@ ChFi3d_ChBuilder::SimulSurf(Handle(ChFiDS_SurfData)& Data, Standard_Boolean ok = Standard_False; const ChFiDS_CommonPoint& cp1 = Data->VertexFirstOnS1(); if(cp1.IsOnArc()){ - TopoDS_Face F1 = S1->ChangeSurface().Face(); + TopoDS_Face F1 = S1->Face(); TopoDS_Face bid; intf = !SearchFace(Spine,cp1,F1,bid); ok = intf != 0; } const ChFiDS_CommonPoint& cp2 = Data->VertexFirstOnS2(); if(cp2.IsOnArc() && !ok){ - TopoDS_Face F2 = S2->ChangeSurface().Face(); + TopoDS_Face F2 = S2->Face(); TopoDS_Face bid; intf = !SearchFace(Spine,cp2,F2,bid); } @@ -981,14 +981,14 @@ ChFi3d_ChBuilder::SimulSurf(Handle(ChFiDS_SurfData)& Data, Standard_Boolean ok = Standard_False; const ChFiDS_CommonPoint& cp1 = Data->VertexLastOnS1(); if(cp1.IsOnArc()){ - TopoDS_Face F1 = S1->ChangeSurface().Face(); + TopoDS_Face F1 = S1->Face(); TopoDS_Face bid; intl = !SearchFace(Spine,cp1,F1,bid); ok = intl != 0; } const ChFiDS_CommonPoint& cp2 = Data->VertexLastOnS2(); if(cp2.IsOnArc() && !ok){ - TopoDS_Face F2 = S2->ChangeSurface().Face(); + TopoDS_Face F2 = S2->Face(); TopoDS_Face bid; intl = !SearchFace(Spine,cp2,F2,bid); } @@ -1050,14 +1050,14 @@ ChFi3d_ChBuilder::SimulSurf(Handle(ChFiDS_SurfData)& Data, Standard_Boolean ok = Standard_False; const ChFiDS_CommonPoint& cp1 = Data->VertexFirstOnS1(); if(cp1.IsOnArc()){ - TopoDS_Face F1 = S1->ChangeSurface().Face(); + TopoDS_Face F1 = S1->Face(); TopoDS_Face bid; intf = !SearchFace(Spine,cp1,F1,bid); ok = intf != 0; } const ChFiDS_CommonPoint& cp2 = Data->VertexFirstOnS2(); if(cp2.IsOnArc() && !ok){ - TopoDS_Face F2 = S2->ChangeSurface().Face(); + TopoDS_Face F2 = S2->Face(); TopoDS_Face bid; intf = !SearchFace(Spine,cp2,F2,bid); } @@ -1067,14 +1067,14 @@ ChFi3d_ChBuilder::SimulSurf(Handle(ChFiDS_SurfData)& Data, Standard_Boolean ok = Standard_False; const ChFiDS_CommonPoint& cp1 = Data->VertexLastOnS1(); if(cp1.IsOnArc()){ - TopoDS_Face F1 = S1->ChangeSurface().Face(); + TopoDS_Face F1 = S1->Face(); TopoDS_Face bid; intl = !SearchFace(Spine,cp1,F1,bid); ok = intl != 0; } const ChFiDS_CommonPoint& cp2 = Data->VertexLastOnS2(); if(cp2.IsOnArc() && !ok){ - TopoDS_Face F2 = S2->ChangeSurface().Face(); + TopoDS_Face F2 = S2->Face(); TopoDS_Face bid; intl = !SearchFace(Spine,cp2,F2,bid); } @@ -1084,16 +1084,16 @@ ChFi3d_ChBuilder::SimulSurf(Handle(ChFiDS_SurfData)& Data, } void ChFi3d_ChBuilder::SimulSurf(Handle(ChFiDS_SurfData)& , - const Handle(ChFiDS_HElSpine)& , + const Handle(ChFiDS_ElSpine)& , const Handle(ChFiDS_Spine)& , const Standard_Integer , - const Handle(BRepAdaptor_HSurface)& , + const Handle(BRepAdaptor_Surface)& , const Handle(Adaptor3d_TopolTool)& , - const Handle(BRepAdaptor_HCurve2d)& , - const Handle(BRepAdaptor_HSurface)& , - const Handle(BRepAdaptor_HCurve2d)& , + const Handle(BRepAdaptor_Curve2d)& , + const Handle(BRepAdaptor_Surface)& , + const Handle(BRepAdaptor_Curve2d)& , Standard_Boolean& , - const Handle(BRepAdaptor_HSurface)& , + const Handle(BRepAdaptor_Surface)& , const Handle(Adaptor3d_TopolTool)& , const TopAbs_Orientation , const Standard_Real , @@ -1111,17 +1111,17 @@ void ChFi3d_ChBuilder::SimulSurf(Handle(ChFiDS_SurfData)& , throw Standard_Failure("SimulSurf Not Implemented"); } void ChFi3d_ChBuilder::SimulSurf(Handle(ChFiDS_SurfData)& , - const Handle(ChFiDS_HElSpine)& , + const Handle(ChFiDS_ElSpine)& , const Handle(ChFiDS_Spine)& , const Standard_Integer , - const Handle(BRepAdaptor_HSurface)& , + const Handle(BRepAdaptor_Surface)& , const Handle(Adaptor3d_TopolTool)& , const TopAbs_Orientation , - const Handle(BRepAdaptor_HSurface)& , + const Handle(BRepAdaptor_Surface)& , const Handle(Adaptor3d_TopolTool)& , - const Handle(BRepAdaptor_HCurve2d)& , - const Handle(BRepAdaptor_HSurface)& , - const Handle(BRepAdaptor_HCurve2d)& , + const Handle(BRepAdaptor_Curve2d)& , + const Handle(BRepAdaptor_Surface)& , + const Handle(BRepAdaptor_Curve2d)& , Standard_Boolean& , const Standard_Real , const Standard_Real , @@ -1138,21 +1138,21 @@ void ChFi3d_ChBuilder::SimulSurf(Handle(ChFiDS_SurfData)& , throw Standard_Failure("SimulSurf Not Implemented"); } void ChFi3d_ChBuilder::SimulSurf(Handle(ChFiDS_SurfData)& , - const Handle(ChFiDS_HElSpine)& , + const Handle(ChFiDS_ElSpine)& , const Handle(ChFiDS_Spine)& , const Standard_Integer , - const Handle(BRepAdaptor_HSurface)& , + const Handle(BRepAdaptor_Surface)& , const Handle(Adaptor3d_TopolTool)& , - const Handle(BRepAdaptor_HCurve2d)& , - const Handle(BRepAdaptor_HSurface)& , - const Handle(BRepAdaptor_HCurve2d)& , + const Handle(BRepAdaptor_Curve2d)& , + const Handle(BRepAdaptor_Surface)& , + const Handle(BRepAdaptor_Curve2d)& , Standard_Boolean& , const TopAbs_Orientation , - const Handle(BRepAdaptor_HSurface)& , + const Handle(BRepAdaptor_Surface)& , const Handle(Adaptor3d_TopolTool)& , - const Handle(BRepAdaptor_HCurve2d)& , - const Handle(BRepAdaptor_HSurface)& , - const Handle(BRepAdaptor_HCurve2d)& , + const Handle(BRepAdaptor_Curve2d)& , + const Handle(BRepAdaptor_Surface)& , + const Handle(BRepAdaptor_Curve2d)& , Standard_Boolean& , const TopAbs_Orientation , const Standard_Real , @@ -1178,10 +1178,10 @@ void ChFi3d_ChBuilder::SimulSurf(Handle(ChFiDS_SurfData)& , Standard_Boolean ChFi3d_ChBuilder::PerformFirstSection (const Handle(ChFiDS_Spine)& Spine, - const Handle(ChFiDS_HElSpine)& HGuide, + const Handle(ChFiDS_ElSpine)& HGuide, const Standard_Integer Choix, - Handle(BRepAdaptor_HSurface)& S1, - Handle(BRepAdaptor_HSurface)& S2, + Handle(BRepAdaptor_Surface)& S1, + Handle(BRepAdaptor_Surface)& S2, const Handle(Adaptor3d_TopolTool)& I1, const Handle(Adaptor3d_TopolTool)& I2, const Standard_Real Par, @@ -1223,8 +1223,8 @@ Standard_Boolean ChFi3d_ChBuilder::PerformFirstSection gp_Pnt pt1, pt2, ptgui; gp_XYZ temp; - ( HGuide->Curve() ).D1(Par,ptgui,d1gui); - // ptgui = (S1->Surface()).Value(SolDep(1),SolDep(2)); + HGuide->D1(Par,ptgui,d1gui); + // ptgui = S1->Value(SolDep(1),SolDep(2)); pFunc->Set(Par); pFunc->Tangent(SolDep(1),SolDep(2),SolDep(3),SolDep(4),TgF,TgL,tmp1,tmp2); @@ -1255,9 +1255,9 @@ Standard_Boolean ChFi3d_ChBuilder::PerformFirstSection Standard_Real tol = tolesp*1.e2; // Standard_Real u,v; - Extrema_GenLocateExtPS proj1(S1->Surface(), tol, tol); + Extrema_GenLocateExtPS proj1(*S1, tol, tol); proj1.Perform(pt1, SolDep(1), SolDep(2)); - Extrema_GenLocateExtPS proj2(S2->Surface(), tol, tol); + Extrema_GenLocateExtPS proj2(*S2, tol, tol); proj2.Perform(pt2, SolDep(3), SolDep(4)); if( proj1.IsDone() ){ @@ -1286,13 +1286,13 @@ Standard_Boolean ChFi3d_ChBuilder::PerformFirstSection } else { - Handle(ChFiDS_HElSpine) OffsetHGuide; + Handle(ChFiDS_ElSpine) OffsetHGuide; ChFiDS_ListOfHElSpine& ll = Spine->ChangeElSpines(); ChFiDS_ListOfHElSpine& ll_offset = Spine->ChangeOffsetElSpines(); ChFiDS_ListIteratorOfListOfHElSpine ILES(ll), ILES_offset(ll_offset); for ( ; ILES.More(); ILES.Next(),ILES_offset.Next()) { - const Handle(ChFiDS_HElSpine)& aHElSpine = ILES.Value(); + const Handle(ChFiDS_ElSpine)& aHElSpine = ILES.Value(); if (aHElSpine == HGuide) OffsetHGuide = ILES_offset.Value(); } @@ -1313,8 +1313,8 @@ Standard_Boolean ChFi3d_ChBuilder::PerformFirstSection gp_Pnt pt1, pt2, ptgui; gp_XYZ temp; - ( HGuide->Curve() ).D1(Par,ptgui,d1gui); - // ptgui = (S1->Surface()).Value(SolDep(1),SolDep(2)); + HGuide->D1(Par,ptgui,d1gui); + // ptgui = S1->Value(SolDep(1),SolDep(2)); pFunc->Set(Par); pFunc->Tangent(SolDep(1),SolDep(2),SolDep(3),SolDep(4),TgF,TgL,tmp1,tmp2); @@ -1362,9 +1362,9 @@ Standard_Boolean ChFi3d_ChBuilder::PerformFirstSection Standard_Real tol = tolesp*1.e2; // Standard_Real u,v; - Extrema_GenLocateExtPS proj1(S1->Surface(), tol, tol); + Extrema_GenLocateExtPS proj1(*S1, tol, tol); proj1.Perform(pt1, SolDep(1), SolDep(2)); - Extrema_GenLocateExtPS proj2(S2->Surface(), tol, tol); + Extrema_GenLocateExtPS proj2(*S2, tol, tol); proj2.Perform(pt2, SolDep(3), SolDep(4)); if( proj1.IsDone() ){ @@ -1392,8 +1392,8 @@ Standard_Boolean ChFi3d_ChBuilder::PerformFirstSection gp_Pnt pt1, pt2, ptgui; gp_XYZ temp; - ( HGuide->Curve() ).D1(Par,ptgui,d1gui); - // ptgui = (S1->Surface()).Value(SolDep(1),SolDep(2)); + HGuide->D1(Par,ptgui,d1gui); + // ptgui = S1->Value(SolDep(1),SolDep(2)); Func.Set(Par); Func.Tangent(SolDep(1),SolDep(2),SolDep(3),SolDep(4),TgF,TgL,tmp1,tmp2); @@ -1431,9 +1431,9 @@ Standard_Boolean ChFi3d_ChBuilder::PerformFirstSection Standard_Real tol = tolesp*1.e2; // Standard_Real u,v; - Extrema_GenLocateExtPS proj1(S1->Surface(), tol, tol); + Extrema_GenLocateExtPS proj1(*S1, tol, tol); proj1.Perform(pt1, SolDep(1), SolDep(2)); - Extrema_GenLocateExtPS proj2(S2->Surface(), tol, tol); + Extrema_GenLocateExtPS proj2(*S2, tol, tol); proj2.Perform(pt2, SolDep(3), SolDep(4)); if( proj1.IsDone() ){ (proj1.Point()).Parameter(SolDep(1),SolDep(2)); @@ -1455,12 +1455,12 @@ Standard_Boolean ChFi3d_ChBuilder::PerformFirstSection Standard_Boolean ChFi3d_ChBuilder::PerformSurf(ChFiDS_SequenceOfSurfData& SeqData, - const Handle(ChFiDS_HElSpine)& HGuide, + const Handle(ChFiDS_ElSpine)& HGuide, const Handle(ChFiDS_Spine)& Spine, const Standard_Integer Choix, - const Handle(BRepAdaptor_HSurface)& S1, + const Handle(BRepAdaptor_Surface)& S1, const Handle(Adaptor3d_TopolTool)& I1, - const Handle(BRepAdaptor_HSurface)& S2, + const Handle(BRepAdaptor_Surface)& S2, const Handle(Adaptor3d_TopolTool)& I2, const Standard_Real MaxStep, const Standard_Real Fleche, @@ -1486,7 +1486,7 @@ ChFi3d_ChBuilder::PerformSurf(ChFiDS_SequenceOfSurfData& SeqData, Standard_Boolean gd1,gd2,gf1,gf2; Handle(BRepBlend_Line) lin; - TopAbs_Orientation Or = S1->ChangeSurface().Face().Orientation(); + TopAbs_Orientation Or = S1->Face().Orientation(); Standard_Real PFirst = First; if(intf) First = chsp->FirstParameter(1); if(intl) Last = chsp->LastParameter(chsp->NbEdges()); @@ -1543,13 +1543,13 @@ ChFi3d_ChBuilder::PerformSurf(ChFiDS_SequenceOfSurfData& SeqData, } else { - Handle(ChFiDS_HElSpine) OffsetHGuide; + Handle(ChFiDS_ElSpine) OffsetHGuide; ChFiDS_ListOfHElSpine& ll = Spine->ChangeElSpines(); ChFiDS_ListOfHElSpine& ll_offset = Spine->ChangeOffsetElSpines(); ChFiDS_ListIteratorOfListOfHElSpine ILES(ll), ILES_offset(ll_offset); for ( ; ILES.More(); ILES.Next(),ILES_offset.Next()) { - const Handle(ChFiDS_HElSpine)& aHElSpine = ILES.Value(); + const Handle(ChFiDS_ElSpine)& aHElSpine = ILES.Value(); if (aHElSpine == HGuide) OffsetHGuide = ILES_offset.Value(); } @@ -1599,16 +1599,16 @@ ChFi3d_ChBuilder::PerformSurf(ChFiDS_SequenceOfSurfData& SeqData, } void ChFi3d_ChBuilder::PerformSurf(ChFiDS_SequenceOfSurfData& , - const Handle(ChFiDS_HElSpine)& , + const Handle(ChFiDS_ElSpine)& , const Handle(ChFiDS_Spine)& , const Standard_Integer , - const Handle(BRepAdaptor_HSurface)& , + const Handle(BRepAdaptor_Surface)& , const Handle(Adaptor3d_TopolTool)& , - const Handle(BRepAdaptor_HCurve2d)& , - const Handle(BRepAdaptor_HSurface)& , - const Handle(BRepAdaptor_HCurve2d)& , + const Handle(BRepAdaptor_Curve2d)& , + const Handle(BRepAdaptor_Surface)& , + const Handle(BRepAdaptor_Curve2d)& , Standard_Boolean& , - const Handle(BRepAdaptor_HSurface)& , + const Handle(BRepAdaptor_Surface)& , const Handle(Adaptor3d_TopolTool)& , const TopAbs_Orientation , const Standard_Real , @@ -1627,17 +1627,17 @@ void ChFi3d_ChBuilder::PerformSurf(ChFiDS_SequenceOfSurfData& , throw Standard_Failure("PerformSurf Not Implemented"); } void ChFi3d_ChBuilder::PerformSurf(ChFiDS_SequenceOfSurfData& , - const Handle(ChFiDS_HElSpine)& , + const Handle(ChFiDS_ElSpine)& , const Handle(ChFiDS_Spine)& , const Standard_Integer , - const Handle(BRepAdaptor_HSurface)& , + const Handle(BRepAdaptor_Surface)& , const Handle(Adaptor3d_TopolTool)& , const TopAbs_Orientation , - const Handle(BRepAdaptor_HSurface)& , + const Handle(BRepAdaptor_Surface)& , const Handle(Adaptor3d_TopolTool)& , - const Handle(BRepAdaptor_HCurve2d)& , - const Handle(BRepAdaptor_HSurface)& , - const Handle(BRepAdaptor_HCurve2d)& , + const Handle(BRepAdaptor_Curve2d)& , + const Handle(BRepAdaptor_Surface)& , + const Handle(BRepAdaptor_Curve2d)& , Standard_Boolean& , const Standard_Real , const Standard_Real , @@ -1656,21 +1656,21 @@ void ChFi3d_ChBuilder::PerformSurf(ChFiDS_SequenceOfSurfData& , } void ChFi3d_ChBuilder::PerformSurf(ChFiDS_SequenceOfSurfData& , - const Handle(ChFiDS_HElSpine)& , + const Handle(ChFiDS_ElSpine)& , const Handle(ChFiDS_Spine)& , const Standard_Integer , - const Handle(BRepAdaptor_HSurface)& , + const Handle(BRepAdaptor_Surface)& , const Handle(Adaptor3d_TopolTool)& , - const Handle(BRepAdaptor_HCurve2d)& , - const Handle(BRepAdaptor_HSurface)& , - const Handle(BRepAdaptor_HCurve2d)& , + const Handle(BRepAdaptor_Curve2d)& , + const Handle(BRepAdaptor_Surface)& , + const Handle(BRepAdaptor_Curve2d)& , Standard_Boolean& , const TopAbs_Orientation , - const Handle(BRepAdaptor_HSurface)& , + const Handle(BRepAdaptor_Surface)& , const Handle(Adaptor3d_TopolTool)& , - const Handle(BRepAdaptor_HCurve2d)& , - const Handle(BRepAdaptor_HSurface)& , - const Handle(BRepAdaptor_HCurve2d)& , + const Handle(BRepAdaptor_Curve2d)& , + const Handle(BRepAdaptor_Surface)& , + const Handle(BRepAdaptor_Curve2d)& , Standard_Boolean& , const TopAbs_Orientation , const Standard_Real , diff --git a/src/ChFi3d/ChFi3d_ChBuilder.hxx b/src/ChFi3d/ChFi3d_ChBuilder.hxx index c358c0c62b..fb64eebf35 100644 --- a/src/ChFi3d/ChFi3d_ChBuilder.hxx +++ b/src/ChFi3d/ChFi3d_ChBuilder.hxx @@ -17,33 +17,27 @@ #ifndef _ChFi3d_ChBuilder_HeaderFile #define _ChFi3d_ChBuilder_HeaderFile -#include -#include -#include - +#include +#include #include -#include -#include -#include #include #include #include +#include +#include +#include #include #include #include -#include -#include + class Standard_ConstructionError; class Standard_DomainError; class TopoDS_Shape; class TopoDS_Edge; class TopoDS_Face; class ChFiDS_SurfData; -class ChFiDS_HElSpine; class ChFiDS_Spine; -class BRepAdaptor_HSurface; class Adaptor3d_TopolTool; -class BRepAdaptor_HCurve2d; class TopoDS_Vertex; class ChFiDS_Stripe; @@ -153,16 +147,16 @@ public: const Standard_Integer IS) const; Standard_EXPORT virtual void SimulSurf (Handle(ChFiDS_SurfData)& Data, - const Handle(ChFiDS_HElSpine)& Guide, + const Handle(ChFiDS_ElSpine)& Guide, const Handle(ChFiDS_Spine)& Spine, const Standard_Integer Choix, - const Handle(BRepAdaptor_HSurface)& S1, + const Handle(BRepAdaptor_Surface)& S1, const Handle(Adaptor3d_TopolTool)& I1, - const Handle(BRepAdaptor_HCurve2d)& PC1, - const Handle(BRepAdaptor_HSurface)& Sref1, - const Handle(BRepAdaptor_HCurve2d)& PCref1, + const Handle(BRepAdaptor_Curve2d)& PC1, + const Handle(BRepAdaptor_Surface)& Sref1, + const Handle(BRepAdaptor_Curve2d)& PCref1, Standard_Boolean& Decroch1, - const Handle(BRepAdaptor_HSurface)& S2, + const Handle(BRepAdaptor_Surface)& S2, const Handle(Adaptor3d_TopolTool)& I2, const TopAbs_Orientation Or2, const Standard_Real Fleche, @@ -178,17 +172,17 @@ public: const math_Vector& Soldep) Standard_OVERRIDE; Standard_EXPORT virtual void SimulSurf (Handle(ChFiDS_SurfData)& Data, - const Handle(ChFiDS_HElSpine)& Guide, + const Handle(ChFiDS_ElSpine)& Guide, const Handle(ChFiDS_Spine)& Spine, const Standard_Integer Choix, - const Handle(BRepAdaptor_HSurface)& S1, + const Handle(BRepAdaptor_Surface)& S1, const Handle(Adaptor3d_TopolTool)& I1, const TopAbs_Orientation Or1, - const Handle(BRepAdaptor_HSurface)& S2, + const Handle(BRepAdaptor_Surface)& S2, const Handle(Adaptor3d_TopolTool)& I2, - const Handle(BRepAdaptor_HCurve2d)& PC2, - const Handle(BRepAdaptor_HSurface)& Sref2, - const Handle(BRepAdaptor_HCurve2d)& PCref2, + const Handle(BRepAdaptor_Curve2d)& PC2, + const Handle(BRepAdaptor_Surface)& Sref2, + const Handle(BRepAdaptor_Curve2d)& PCref2, Standard_Boolean& Decroch2, const Standard_Real Fleche, const Standard_Real TolGuide, @@ -203,21 +197,21 @@ public: const math_Vector& Soldep) Standard_OVERRIDE; Standard_EXPORT virtual void SimulSurf (Handle(ChFiDS_SurfData)& Data, - const Handle(ChFiDS_HElSpine)& Guide, + const Handle(ChFiDS_ElSpine)& Guide, const Handle(ChFiDS_Spine)& Spine, const Standard_Integer Choix, - const Handle(BRepAdaptor_HSurface)& S1, + const Handle(BRepAdaptor_Surface)& S1, const Handle(Adaptor3d_TopolTool)& I1, - const Handle(BRepAdaptor_HCurve2d)& PC1, - const Handle(BRepAdaptor_HSurface)& Sref1, - const Handle(BRepAdaptor_HCurve2d)& PCref1, + const Handle(BRepAdaptor_Curve2d)& PC1, + const Handle(BRepAdaptor_Surface)& Sref1, + const Handle(BRepAdaptor_Curve2d)& PCref1, Standard_Boolean& Decroch1, const TopAbs_Orientation Or1, - const Handle(BRepAdaptor_HSurface)& S2, + const Handle(BRepAdaptor_Surface)& S2, const Handle(Adaptor3d_TopolTool)& I2, - const Handle(BRepAdaptor_HCurve2d)& PC2, - const Handle(BRepAdaptor_HSurface)& Sref2, - const Handle(BRepAdaptor_HCurve2d)& PCref2, + const Handle(BRepAdaptor_Curve2d)& PC2, + const Handle(BRepAdaptor_Surface)& Sref2, + const Handle(BRepAdaptor_Curve2d)& PCref2, Standard_Boolean& Decroch2, const TopAbs_Orientation Or2, const Standard_Real Fleche, @@ -237,12 +231,12 @@ public: //! the elements of construction of the surface (fillet //! or chamfer). Standard_EXPORT virtual Standard_Boolean PerformSurf (ChFiDS_SequenceOfSurfData& Data, - const Handle(ChFiDS_HElSpine)& Guide, + const Handle(ChFiDS_ElSpine)& Guide, const Handle(ChFiDS_Spine)& Spine, const Standard_Integer Choix, - const Handle(BRepAdaptor_HSurface)& S1, + const Handle(BRepAdaptor_Surface)& S1, const Handle(Adaptor3d_TopolTool)& I1, - const Handle(BRepAdaptor_HSurface)& S2, + const Handle(BRepAdaptor_Surface)& S2, const Handle(Adaptor3d_TopolTool)& I2, const Standard_Real MaxStep, const Standard_Real Fleche, @@ -262,16 +256,16 @@ public: //! the elements of construction of the surface (fillet //! or chamfer) contact edge/face. Standard_EXPORT virtual void PerformSurf (ChFiDS_SequenceOfSurfData& Data, - const Handle(ChFiDS_HElSpine)& Guide, + const Handle(ChFiDS_ElSpine)& Guide, const Handle(ChFiDS_Spine)& Spine, const Standard_Integer Choix, - const Handle(BRepAdaptor_HSurface)& S1, + const Handle(BRepAdaptor_Surface)& S1, const Handle(Adaptor3d_TopolTool)& I1, - const Handle(BRepAdaptor_HCurve2d)& PC1, - const Handle(BRepAdaptor_HSurface)& Sref1, - const Handle(BRepAdaptor_HCurve2d)& PCref1, + const Handle(BRepAdaptor_Curve2d)& PC1, + const Handle(BRepAdaptor_Surface)& Sref1, + const Handle(BRepAdaptor_Curve2d)& PCref1, Standard_Boolean& Decroch1, - const Handle(BRepAdaptor_HSurface)& S2, + const Handle(BRepAdaptor_Surface)& S2, const Handle(Adaptor3d_TopolTool)& I2, const TopAbs_Orientation Or2, const Standard_Real MaxStep, @@ -291,17 +285,17 @@ public: //! the elements of construction of the surface (fillet //! or chamfer) contact edge/face. Standard_EXPORT virtual void PerformSurf (ChFiDS_SequenceOfSurfData& Data, - const Handle(ChFiDS_HElSpine)& Guide, + const Handle(ChFiDS_ElSpine)& Guide, const Handle(ChFiDS_Spine)& Spine, const Standard_Integer Choix, - const Handle(BRepAdaptor_HSurface)& S1, + const Handle(BRepAdaptor_Surface)& S1, const Handle(Adaptor3d_TopolTool)& I1, const TopAbs_Orientation Or1, - const Handle(BRepAdaptor_HSurface)& S2, + const Handle(BRepAdaptor_Surface)& S2, const Handle(Adaptor3d_TopolTool)& I2, - const Handle(BRepAdaptor_HCurve2d)& PC2, - const Handle(BRepAdaptor_HSurface)& Sref2, - const Handle(BRepAdaptor_HCurve2d)& PCref2, + const Handle(BRepAdaptor_Curve2d)& PC2, + const Handle(BRepAdaptor_Surface)& Sref2, + const Handle(BRepAdaptor_Curve2d)& PCref2, Standard_Boolean& Decroch2, const Standard_Real MaxStep, const Standard_Real Fleche, @@ -320,21 +314,21 @@ public: //! the elements of construction of the surface (fillet //! or chamfer) contact edge/edge. Standard_EXPORT virtual void PerformSurf (ChFiDS_SequenceOfSurfData& Data, - const Handle(ChFiDS_HElSpine)& Guide, + const Handle(ChFiDS_ElSpine)& Guide, const Handle(ChFiDS_Spine)& Spine, const Standard_Integer Choix, - const Handle(BRepAdaptor_HSurface)& S1, + const Handle(BRepAdaptor_Surface)& S1, const Handle(Adaptor3d_TopolTool)& I1, - const Handle(BRepAdaptor_HCurve2d)& PC1, - const Handle(BRepAdaptor_HSurface)& Sref1, - const Handle(BRepAdaptor_HCurve2d)& PCref1, + const Handle(BRepAdaptor_Curve2d)& PC1, + const Handle(BRepAdaptor_Surface)& Sref1, + const Handle(BRepAdaptor_Curve2d)& PCref1, Standard_Boolean& Decroch1, const TopAbs_Orientation Or1, - const Handle(BRepAdaptor_HSurface)& S2, + const Handle(BRepAdaptor_Surface)& S2, const Handle(Adaptor3d_TopolTool)& I2, - const Handle(BRepAdaptor_HCurve2d)& PC2, - const Handle(BRepAdaptor_HSurface)& Sref2, - const Handle(BRepAdaptor_HCurve2d)& PCref2, + const Handle(BRepAdaptor_Curve2d)& PC2, + const Handle(BRepAdaptor_Surface)& Sref2, + const Handle(BRepAdaptor_Curve2d)& PCref2, Standard_Boolean& Decroch2, const TopAbs_Orientation Or2, const Standard_Real MaxStep, @@ -360,12 +354,12 @@ protected: Standard_EXPORT void SimulKPart (const Handle(ChFiDS_SurfData)& SD) const Standard_OVERRIDE; Standard_EXPORT Standard_Boolean SimulSurf (Handle(ChFiDS_SurfData)& Data, - const Handle(ChFiDS_HElSpine)& Guide, + const Handle(ChFiDS_ElSpine)& Guide, const Handle(ChFiDS_Spine)& Spine, const Standard_Integer Choix, - const Handle(BRepAdaptor_HSurface)& S1, + const Handle(BRepAdaptor_Surface)& S1, const Handle(Adaptor3d_TopolTool)& I1, - const Handle(BRepAdaptor_HSurface)& S2, + const Handle(BRepAdaptor_Surface)& S2, const Handle(Adaptor3d_TopolTool)& I2, const Standard_Real TolGuide, Standard_Real& First, @@ -380,10 +374,10 @@ protected: Standard_Integer& Intl) Standard_OVERRIDE; Standard_EXPORT Standard_Boolean PerformFirstSection (const Handle(ChFiDS_Spine)& S, - const Handle(ChFiDS_HElSpine)& HGuide, + const Handle(ChFiDS_ElSpine)& HGuide, const Standard_Integer Choix, - Handle(BRepAdaptor_HSurface)& S1, - Handle(BRepAdaptor_HSurface)& S2, + Handle(BRepAdaptor_Surface)& S1, + Handle(BRepAdaptor_Surface)& S2, const Handle(Adaptor3d_TopolTool)& I1, const Handle(Adaptor3d_TopolTool)& I2, const Standard_Real Par, diff --git a/src/ChFi3d/ChFi3d_ChBuilder_C2.cxx b/src/ChFi3d/ChFi3d_ChBuilder_C2.cxx index 6f28b112d2..f21f2ada1a 100644 --- a/src/ChFi3d/ChFi3d_ChBuilder_C2.cxx +++ b/src/ChFi3d/ChFi3d_ChBuilder_C2.cxx @@ -16,10 +16,10 @@ #include -#include -#include +#include +#include #include -#include +#include #include #include #include diff --git a/src/ChFi3d/ChFi3d_ChBuilder_C3.cxx b/src/ChFi3d/ChFi3d_ChBuilder_C3.cxx index ecfc88f81d..f7f731f6c7 100644 --- a/src/ChFi3d/ChFi3d_ChBuilder_C3.cxx +++ b/src/ChFi3d/ChFi3d_ChBuilder_C3.cxx @@ -17,15 +17,15 @@ #include #include -#include -#include +#include +#include #include #include #include #include #include #include -#include +#include #include #include #include @@ -37,7 +37,7 @@ #include #include #include -#include +#include #include #include #include @@ -46,8 +46,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include @@ -120,12 +120,12 @@ static Standard_Boolean CoPlanar(const gp_Pnt PntA, // it to allow the intersection computation //======================================================================= -static Handle(GeomAdaptor_HSurface) BoundSurf(const Handle(Geom_Surface)& S, +static Handle(GeomAdaptor_Surface) BoundSurf(const Handle(Geom_Surface)& S, const gp_Pnt2d& Pdeb, const gp_Pnt2d& Pfin) { - Handle(GeomAdaptor_HSurface) HS = new GeomAdaptor_HSurface(); - GeomAdaptor_Surface& GAS = HS->ChangeSurface(); + Handle(GeomAdaptor_Surface) HS = new GeomAdaptor_Surface(); + GeomAdaptor_Surface& GAS = *HS; GAS.Load(S); Standard_Real uu1,uu2,vv1,vv2; @@ -174,7 +174,7 @@ static Standard_Boolean ComputeIntersection(TopOpeBRepDS_DataStructure& DStr, // take the surface of the pivot SurfData and trim it to allow // the intersection computation if it's an analytic surface - Handle(GeomAdaptor_HSurface) HS1; + Handle(GeomAdaptor_Surface) HS1; HS1 = ChFi3d_BoundSurf(DStr,SD,1,2); const Handle(Geom_Surface)& gpl = DStr.Surface(SDCoin->Surf()).Surface(); @@ -211,7 +211,7 @@ static Standard_Boolean ComputeIntersection(TopOpeBRepDS_DataStructure& DStr, // Trims the chamfer surface to allow the intersection computation // and computes a GeomAdaptor_Surface for using the ComputeCurves // function - Handle(GeomAdaptor_HSurface) HS2; + Handle(GeomAdaptor_Surface) HS2; HS2 = BoundSurf(gpl,ptcoindeb,cpf2); // compute the intersection curves and pcurves @@ -351,12 +351,12 @@ void ChFi3d_ChBuilder::PerformThreeCorner(const Standard_Integer Jndex) // On construit les HSurfaces et autres outils qui vont bien. // ---------------------------------------------------------- - Handle(BRepAdaptor_HSurface) Fac = new BRepAdaptor_HSurface(face[pivot]); - Handle(GeomAdaptor_HSurface) - bidsurf = new GeomAdaptor_HSurface(Fac->ChangeSurface().Surface()); + Handle(BRepAdaptor_Surface) Fac = new BRepAdaptor_Surface(face[pivot]); + Handle(GeomAdaptor_Surface) + bidsurf = new GeomAdaptor_Surface(Fac->Surface()); Handle(Adaptor3d_TopolTool) IFac = new Adaptor3d_TopolTool(bidsurf); - Handle(GeomAdaptor_HSurface) Surf = ChFi3d_BoundSurf (DStr,fdpiv,jf[pivot][deb],jf[pivot][fin]); + Handle(GeomAdaptor_Surface) Surf = ChFi3d_BoundSurf (DStr,fdpiv,jf[pivot][deb],jf[pivot][fin]); Handle(Adaptor3d_TopolTool) ISurf = new Adaptor3d_TopolTool(Surf); // Creation of a new Stripe for the corner @@ -368,12 +368,12 @@ void ChFi3d_ChBuilder::PerformThreeCorner(const Standard_Integer Jndex) // Pour plus de surete, on verifie les intersections des pcurves des chanfreins sur leur // face commune - Handle(GeomAdaptor_HSurface) HSdeb - = new GeomAdaptor_HSurface( GeomAdaptor_Surface(DStr.Surface(fddeb->Surf()).Surface()) ); - Handle(GeomAdaptor_HSurface) HSfin - = new GeomAdaptor_HSurface( GeomAdaptor_Surface(DStr.Surface(fdfin->Surf()).Surface()) ); - Handle(GeomAdaptor_HSurface) HSpiv - = new GeomAdaptor_HSurface( GeomAdaptor_Surface(DStr.Surface(fdpiv->Surf()).Surface()) ); + Handle(GeomAdaptor_Surface) HSdeb + = new GeomAdaptor_Surface( GeomAdaptor_Surface(DStr.Surface(fddeb->Surf()).Surface()) ); + Handle(GeomAdaptor_Surface) HSfin + = new GeomAdaptor_Surface( GeomAdaptor_Surface(DStr.Surface(fdfin->Surf()).Surface()) ); + Handle(GeomAdaptor_Surface) HSpiv + = new GeomAdaptor_Surface( GeomAdaptor_Surface(DStr.Surface(fdpiv->Surf()).Surface()) ); gp_Pnt2d p2d[4]; gp_Pnt p3d[4], PSom; @@ -557,12 +557,12 @@ void ChFi3d_ChBuilder::PerformThreeCorner(const Standard_Integer Jndex) else if (nbl == 1) { ChFi3d_TrimCurve(inter.Line(1),p3d[pivot],p3dface,gcface); - Handle(GeomAdaptor_HCurve) gac = new GeomAdaptor_HCurve(); - gac->ChangeCurve().Load(gcface); - Handle(GeomAdaptor_HSurface) gas = new GeomAdaptor_HSurface; - gas->ChangeSurface().Load(gpl); - Handle(BRepAdaptor_HSurface) gaf = new BRepAdaptor_HSurface; - gaf->ChangeSurface().Initialize(face[pivot]); + Handle(GeomAdaptor_Curve) gac = new GeomAdaptor_Curve(); + gac->Load(gcface); + Handle(GeomAdaptor_Surface) gas = new GeomAdaptor_Surface; + gas->Load(gpl); + Handle(BRepAdaptor_Surface) gaf = new BRepAdaptor_Surface; + gaf->Initialize(face[pivot]); Standard_Real tolr; ChFi3d_ProjectPCurv(gac,gaf,facepc1,tolesp,tolr); diff --git a/src/ChFi3d/ChFi3d_FilBuilder.cxx b/src/ChFi3d/ChFi3d_FilBuilder.cxx index 1f9573c049..6cd7d73b26 100644 --- a/src/ChFi3d/ChFi3d_FilBuilder.cxx +++ b/src/ChFi3d/ChFi3d_FilBuilder.cxx @@ -18,8 +18,8 @@ #include #include -#include -#include +#include +#include #include #include #include @@ -41,7 +41,7 @@ #include #include #include -#include +#include #include #include #include @@ -52,7 +52,7 @@ #include #include #include -#include +#include #include #include #include @@ -92,7 +92,7 @@ static Standard_Real MaxRad(const Handle(ChFiDS_FilSpine)& fsp, return (fsp->MaxRadFromSeqAndLaws()); /* - Handle(ChFiDS_HElSpine) HGuide = fsp->ElSpine(IE); + Handle(ChFiDS_ElSpine) HGuide = fsp->ElSpine(IE); Standard_Real la = HGuide->LastParameter(), fi = HGuide->FirstParameter(); Standard_Real longueur = la - fi, temp, w; //#ifndef OCCT_DEBUG @@ -110,7 +110,7 @@ static Standard_Real MaxRad(const Handle(ChFiDS_FilSpine)& fsp, */ } -static void SimulParams(const Handle(ChFiDS_HElSpine)& HGuide, +static void SimulParams(const Handle(ChFiDS_ElSpine)& HGuide, const Handle(ChFiDS_FilSpine)& fsp, Standard_Real& MaxStep, Standard_Real& Fleche) @@ -602,12 +602,12 @@ void ChFi3d_FilBuilder::SimulKPart(const Handle(ChFiDS_SurfData)& SD) const Standard_Boolean ChFi3d_FilBuilder::SimulSurf(Handle(ChFiDS_SurfData)& Data, - const Handle(ChFiDS_HElSpine)& HGuide, + const Handle(ChFiDS_ElSpine)& HGuide, const Handle(ChFiDS_Spine)& Spine, const Standard_Integer Choix, - const Handle(BRepAdaptor_HSurface)& S1, + const Handle(BRepAdaptor_Surface)& S1, const Handle(Adaptor3d_TopolTool)& I1, - const Handle(BRepAdaptor_HSurface)& S2, + const Handle(BRepAdaptor_Surface)& S2, const Handle(Adaptor3d_TopolTool)& I2, const Standard_Real TolGuide, Standard_Real& First, @@ -625,7 +625,7 @@ ChFi3d_FilBuilder::SimulSurf(Handle(ChFiDS_SurfData)& Data, if(fsp.IsNull()) throw Standard_ConstructionError("SimulSurf : this is not the spine of the fillet"); Handle(BRepBlend_Line) lin; #ifdef OCCT_DEBUG -// TopAbs_Orientation Or = S1->ChangeSurface().Face().Orientation(); +// TopAbs_Orientation Or = S1->Face().Orientation(); #endif // Flexible parameters!!! Standard_Real locfleche, MaxStep; @@ -633,7 +633,7 @@ ChFi3d_FilBuilder::SimulSurf(Handle(ChFiDS_SurfData)& Data, Handle(ChFiDS_SecHArray1) sec; gp_Pnt2d pf1,pl1,pf2,pl2; - Handle(ChFiDS_HElSpine) EmptyHGuide; + Handle(ChFiDS_ElSpine) EmptyHGuide; Standard_Real PFirst = First; if(intf) First = fsp->FirstParameter(1); @@ -707,14 +707,14 @@ ChFi3d_FilBuilder::SimulSurf(Handle(ChFiDS_SurfData)& Data, Standard_Boolean ok = Standard_False; const ChFiDS_CommonPoint& cp1 = Data->VertexFirstOnS1(); if(cp1.IsOnArc()){ - TopoDS_Face F1 = S1->ChangeSurface().Face(); + TopoDS_Face F1 = S1->Face(); TopoDS_Face bid; intf = !SearchFace(Spine,cp1,F1,bid); ok = intf != 0; } const ChFiDS_CommonPoint& cp2 = Data->VertexFirstOnS2(); if(cp2.IsOnArc() && !ok){ - TopoDS_Face F2 = S2->ChangeSurface().Face(); + TopoDS_Face F2 = S2->Face(); TopoDS_Face bid; intf = !SearchFace(Spine,cp2,F2,bid); } @@ -723,14 +723,14 @@ ChFi3d_FilBuilder::SimulSurf(Handle(ChFiDS_SurfData)& Data, Standard_Boolean ok = 0; const ChFiDS_CommonPoint& cp1 = Data->VertexLastOnS1(); if(cp1.IsOnArc()){ - TopoDS_Face F1 = S1->ChangeSurface().Face(); + TopoDS_Face F1 = S1->Face(); TopoDS_Face bid; intl = !SearchFace(Spine,cp1,F1,bid); ok = intl != 0; } const ChFiDS_CommonPoint& cp2 = Data->VertexLastOnS2(); if(cp2.IsOnArc() && !ok){ - TopoDS_Face F2 = S2->ChangeSurface().Face(); + TopoDS_Face F2 = S2->Face(); TopoDS_Face bid; intl = !SearchFace(Spine,cp2,F2,bid); } @@ -744,16 +744,16 @@ ChFi3d_FilBuilder::SimulSurf(Handle(ChFiDS_SurfData)& Data, //======================================================================= void ChFi3d_FilBuilder::SimulSurf(Handle(ChFiDS_SurfData)& Data, - const Handle(ChFiDS_HElSpine)& HGuide, + const Handle(ChFiDS_ElSpine)& HGuide, const Handle(ChFiDS_Spine)& Spine, const Standard_Integer Choix, - const Handle(BRepAdaptor_HSurface)& HS1, + const Handle(BRepAdaptor_Surface)& HS1, const Handle(Adaptor3d_TopolTool)& I1, - const Handle(BRepAdaptor_HCurve2d)& PC1, - const Handle(BRepAdaptor_HSurface)& HSref1, - const Handle(BRepAdaptor_HCurve2d)& PCref1, + const Handle(BRepAdaptor_Curve2d)& PC1, + const Handle(BRepAdaptor_Surface)& HSref1, + const Handle(BRepAdaptor_Curve2d)& PCref1, Standard_Boolean& Decroch1, - const Handle(BRepAdaptor_HSurface)& HS2, + const Handle(BRepAdaptor_Surface)& HS2, const Handle(Adaptor3d_TopolTool)& I2, const TopAbs_Orientation Or2, const Standard_Real /*Fleche*/, @@ -782,8 +782,8 @@ void ChFi3d_FilBuilder::SimulSurf(Handle(ChFiDS_SurfData)& Data, if(fsp->IsConstant()){ BRepBlend_SurfRstConstRad func(HS2,HS1,PC1,HGuide); func.Set(HSref1,PCref1); - Handle(Adaptor3d_HCurveOnSurface) HC = new Adaptor3d_HCurveOnSurface(); - HC->ChangeCurve().Load(PC1, HS1); + Handle(Adaptor3d_CurveOnSurface) HC = new Adaptor3d_CurveOnSurface(); + HC->Load(PC1, HS1); BRepBlend_SurfCurvConstRadInv finvc(HS2,HC,HGuide); BRepBlend_SurfPointConstRadInv finvp(HS2,HGuide); BRepBlend_ConstRadInv finv(HS2,HSref1,HGuide); @@ -824,8 +824,8 @@ void ChFi3d_FilBuilder::SimulSurf(Handle(ChFiDS_SurfData)& Data, } else { BRepBlend_SurfRstEvolRad func(HS2,HS1,PC1,HGuide,fsp->Law(HGuide)); - Handle(Adaptor3d_HCurveOnSurface) HC = new Adaptor3d_HCurveOnSurface(); - HC->ChangeCurve().Load(PC1, HS1); + Handle(Adaptor3d_CurveOnSurface) HC = new Adaptor3d_CurveOnSurface(); + HC->Load(PC1, HS1); BRepBlend_SurfCurvEvolRadInv finvc(HS2,HC,HGuide,fsp->Law(HGuide)); BRepBlend_SurfPointEvolRadInv finvp(HS2,HGuide,fsp->Law(HGuide)); BRepBlend_EvolRadInv finv(HS2,HSref1,HGuide,fsp->Law(HGuide)); @@ -878,17 +878,17 @@ void ChFi3d_FilBuilder::SimulSurf(Handle(ChFiDS_SurfData)& Data, //======================================================================= void ChFi3d_FilBuilder::SimulSurf(Handle(ChFiDS_SurfData)& Data, - const Handle(ChFiDS_HElSpine)& HGuide, + const Handle(ChFiDS_ElSpine)& HGuide, const Handle(ChFiDS_Spine)& Spine, const Standard_Integer Choix, - const Handle(BRepAdaptor_HSurface)& HS1, + const Handle(BRepAdaptor_Surface)& HS1, const Handle(Adaptor3d_TopolTool)& I1, const TopAbs_Orientation Or1, - const Handle(BRepAdaptor_HSurface)& HS2, + const Handle(BRepAdaptor_Surface)& HS2, const Handle(Adaptor3d_TopolTool)& I2, - const Handle(BRepAdaptor_HCurve2d)& PC2, - const Handle(BRepAdaptor_HSurface)& HSref2, - const Handle(BRepAdaptor_HCurve2d)& PCref2, + const Handle(BRepAdaptor_Curve2d)& PC2, + const Handle(BRepAdaptor_Surface)& HSref2, + const Handle(BRepAdaptor_Curve2d)& PCref2, Standard_Boolean& Decroch2, const Standard_Real /*Arrow*/, const Standard_Real TolGuide, @@ -916,8 +916,8 @@ void ChFi3d_FilBuilder::SimulSurf(Handle(ChFiDS_SurfData)& Data, if(fsp->IsConstant()){ BRepBlend_SurfRstConstRad func(HS1,HS2,PC2,HGuide); func.Set(HSref2,PCref2); - Handle(Adaptor3d_HCurveOnSurface) HC = new Adaptor3d_HCurveOnSurface(); - HC->ChangeCurve().Load(PC2, HS2); + Handle(Adaptor3d_CurveOnSurface) HC = new Adaptor3d_CurveOnSurface(); + HC->Load(PC2, HS2); BRepBlend_SurfCurvConstRadInv finvc(HS1,HC,HGuide); BRepBlend_SurfPointConstRadInv finvp(HS1,HGuide); BRepBlend_ConstRadInv finv(HS1,HSref2,HGuide); @@ -956,8 +956,8 @@ void ChFi3d_FilBuilder::SimulSurf(Handle(ChFiDS_SurfData)& Data, } else { BRepBlend_SurfRstEvolRad func(HS1,HS2,PC2,HGuide,fsp->Law(HGuide)); - Handle(Adaptor3d_HCurveOnSurface) HC = new Adaptor3d_HCurveOnSurface(); - HC->ChangeCurve().Load(PC2, HS2); + Handle(Adaptor3d_CurveOnSurface) HC = new Adaptor3d_CurveOnSurface(); + HC->Load(PC2, HS2); BRepBlend_SurfCurvEvolRadInv finvc(HS1,HC,HGuide,fsp->Law(HGuide)); BRepBlend_SurfPointEvolRadInv finvp(HS1,HGuide,fsp->Law(HGuide)); BRepBlend_EvolRadInv finv(HS1,HSref2,HGuide,fsp->Law(HGuide)); @@ -1012,21 +1012,21 @@ void ChFi3d_FilBuilder::SimulSurf(Handle(ChFiDS_SurfData)& Data, //======================================================================= void ChFi3d_FilBuilder::SimulSurf(Handle(ChFiDS_SurfData)& Data, - const Handle(ChFiDS_HElSpine)& HGuide, + const Handle(ChFiDS_ElSpine)& HGuide, const Handle(ChFiDS_Spine)& Spine, const Standard_Integer Choix, - const Handle(BRepAdaptor_HSurface)& HS1, + const Handle(BRepAdaptor_Surface)& HS1, const Handle(Adaptor3d_TopolTool)& I1, - const Handle(BRepAdaptor_HCurve2d)& PC1, - const Handle(BRepAdaptor_HSurface)& HSref1, - const Handle(BRepAdaptor_HCurve2d)& PCref1, + const Handle(BRepAdaptor_Curve2d)& PC1, + const Handle(BRepAdaptor_Surface)& HSref1, + const Handle(BRepAdaptor_Curve2d)& PCref1, Standard_Boolean& Decroch1, const TopAbs_Orientation Or1, - const Handle(BRepAdaptor_HSurface)& HS2, + const Handle(BRepAdaptor_Surface)& HS2, const Handle(Adaptor3d_TopolTool)& I2, - const Handle(BRepAdaptor_HCurve2d)& PC2, - const Handle(BRepAdaptor_HSurface)& HSref2, - const Handle(BRepAdaptor_HCurve2d)& PCref2, + const Handle(BRepAdaptor_Curve2d)& PC2, + const Handle(BRepAdaptor_Surface)& HSref2, + const Handle(BRepAdaptor_Curve2d)& PCref2, Standard_Boolean& Decroch2, const TopAbs_Orientation Or2, const Standard_Real /*Fleche*/, @@ -1058,10 +1058,10 @@ void ChFi3d_FilBuilder::SimulSurf(Handle(ChFiDS_SurfData)& Data, if(fsp->IsConstant()){ BRepBlend_RstRstConstRad func(HS1, PC1, HS2, PC2, HGuide); func.Set(HSref1, PCref1, HSref2, PCref2); - Handle(Adaptor3d_HCurveOnSurface) HC1 = new Adaptor3d_HCurveOnSurface(); - HC1->ChangeCurve().Load(PC1, HS1); - Handle(Adaptor3d_HCurveOnSurface) HC2 = new Adaptor3d_HCurveOnSurface(); - HC2->ChangeCurve().Load(PC2, HS2); + Handle(Adaptor3d_CurveOnSurface) HC1 = new Adaptor3d_CurveOnSurface(); + HC1->Load(PC1, HS1); + Handle(Adaptor3d_CurveOnSurface) HC2 = new Adaptor3d_CurveOnSurface(); + HC2->Load(PC2, HS2); BRepBlend_SurfCurvConstRadInv finv1(HSref1, HC2, HGuide); BRepBlend_CurvPointRadInv finvp1(HGuide, HC2); BRepBlend_SurfCurvConstRadInv finv2(HSref2, HC1, HGuide); @@ -1106,10 +1106,10 @@ void ChFi3d_FilBuilder::SimulSurf(Handle(ChFiDS_SurfData)& Data, else { BRepBlend_RstRstEvolRad func(HS1,PC1, HS2, PC2, HGuide, fsp->Law(HGuide)); func.Set(HSref1, PCref1, HSref2, PCref2); - Handle(Adaptor3d_HCurveOnSurface) HC1 = new Adaptor3d_HCurveOnSurface(); - HC1->ChangeCurve().Load(PC1, HS1); - Handle(Adaptor3d_HCurveOnSurface) HC2 = new Adaptor3d_HCurveOnSurface(); - HC2->ChangeCurve().Load(PC2, HS2); + Handle(Adaptor3d_CurveOnSurface) HC1 = new Adaptor3d_CurveOnSurface(); + HC1->Load(PC1, HS1); + Handle(Adaptor3d_CurveOnSurface) HC2 = new Adaptor3d_CurveOnSurface(); + HC2->Load(PC2, HS2); BRepBlend_SurfCurvEvolRadInv finv1(HSref1, HC2, HGuide, fsp->Law(HGuide)); BRepBlend_CurvPointRadInv finvp1(HGuide, HC2); @@ -1181,10 +1181,10 @@ void ChFi3d_FilBuilder::SimulSurf(Handle(ChFiDS_SurfData)& Data, Standard_Boolean ChFi3d_FilBuilder::PerformFirstSection (const Handle(ChFiDS_Spine)& Spine, - const Handle(ChFiDS_HElSpine)& HGuide, + const Handle(ChFiDS_ElSpine)& HGuide, const Standard_Integer Choix, - Handle(BRepAdaptor_HSurface)& S1, - Handle(BRepAdaptor_HSurface)& S2, + Handle(BRepAdaptor_Surface)& S1, + Handle(BRepAdaptor_Surface)& S2, const Handle(Adaptor3d_TopolTool)& I1, const Handle(Adaptor3d_TopolTool)& I2, const Standard_Real Par, @@ -1220,12 +1220,12 @@ Standard_Boolean ChFi3d_FilBuilder::PerformFirstSection Standard_Boolean ChFi3d_FilBuilder::PerformSurf(ChFiDS_SequenceOfSurfData& SeqData, - const Handle(ChFiDS_HElSpine)& HGuide, + const Handle(ChFiDS_ElSpine)& HGuide, const Handle(ChFiDS_Spine)& Spine, const Standard_Integer Choix, - const Handle(BRepAdaptor_HSurface)& S1, + const Handle(BRepAdaptor_Surface)& S1, const Handle(Adaptor3d_TopolTool)& I1, - const Handle(BRepAdaptor_HSurface)& S2, + const Handle(BRepAdaptor_Surface)& S2, const Handle(Adaptor3d_TopolTool)& I2, const Standard_Real MaxStep, const Standard_Real Fleche, @@ -1249,7 +1249,7 @@ ChFi3d_FilBuilder::PerformSurf(ChFiDS_SequenceOfSurfData& SeqData, if(fsp.IsNull()) throw Standard_ConstructionError("PerformSurf : this is not the spine of a fillet"); Standard_Boolean gd1,gd2,gf1,gf2, maybesingular; Handle(BRepBlend_Line) lin; - TopAbs_Orientation Or = S1->ChangeSurface().Face().Orientation(); + TopAbs_Orientation Or = S1->Face().Orientation(); Standard_Real PFirst = First; if(intf) First = fsp->FirstParameter(1); if(intl) Last = fsp->LastParameter(fsp->NbEdges()); @@ -1332,16 +1332,16 @@ ChFi3d_FilBuilder::PerformSurf(ChFiDS_SequenceOfSurfData& SeqData, //======================================================================= void ChFi3d_FilBuilder::PerformSurf(ChFiDS_SequenceOfSurfData& SeqData, - const Handle(ChFiDS_HElSpine)& HGuide, + const Handle(ChFiDS_ElSpine)& HGuide, const Handle(ChFiDS_Spine)& Spine, const Standard_Integer Choix, - const Handle(BRepAdaptor_HSurface)& HS1, + const Handle(BRepAdaptor_Surface)& HS1, const Handle(Adaptor3d_TopolTool)& I1, - const Handle(BRepAdaptor_HCurve2d)& PC1, - const Handle(BRepAdaptor_HSurface)& HSref1, - const Handle(BRepAdaptor_HCurve2d)& PCref1, + const Handle(BRepAdaptor_Curve2d)& PC1, + const Handle(BRepAdaptor_Surface)& HSref1, + const Handle(BRepAdaptor_Curve2d)& PCref1, Standard_Boolean& Decroch1, - const Handle(BRepAdaptor_HSurface)& HS2, + const Handle(BRepAdaptor_Surface)& HS2, const Handle(Adaptor3d_TopolTool)& I2, const TopAbs_Orientation Or2, const Standard_Real MaxStep, @@ -1367,8 +1367,8 @@ void ChFi3d_FilBuilder::PerformSurf(ChFiDS_SequenceOfSurfData& SeqData if(fsp->IsConstant()){ BRepBlend_SurfRstConstRad func(HS2,HS1,PC1,HGuide); func.Set(HSref1,PCref1); - Handle(Adaptor3d_HCurveOnSurface) HC = new Adaptor3d_HCurveOnSurface(); - HC->ChangeCurve().Load(PC1, HS1); + Handle(Adaptor3d_CurveOnSurface) HC = new Adaptor3d_CurveOnSurface(); + HC->Load(PC1, HS1); BRepBlend_SurfCurvConstRadInv finvc(HS2,HC,HGuide); BRepBlend_SurfPointConstRadInv finvp(HS2,HGuide); BRepBlend_ConstRadInv finv(HS2,HSref1,HGuide); @@ -1392,7 +1392,7 @@ void ChFi3d_FilBuilder::PerformSurf(ChFiDS_SequenceOfSurfData& SeqData Spine->SetErrorStatus(ChFiDS_WalkingFailure); throw Standard_Failure("PerformSurf : Failed processing!"); } - TopAbs_Orientation Or = HS2->ChangeSurface().Face().Orientation(); + TopAbs_Orientation Or = HS2->Face().Orientation(); done = CompleteData(Data,func,lin,HS1,HS2,Or,1); if(!done) throw Standard_Failure("PerformSurf : Failed approximation!"); maybesingular = (func.GetMinimalDistance()<=100*tolapp3d); @@ -1400,8 +1400,8 @@ void ChFi3d_FilBuilder::PerformSurf(ChFiDS_SequenceOfSurfData& SeqData else { BRepBlend_SurfRstEvolRad func(HS2,HS1,PC1,HGuide,fsp->Law(HGuide)); func.Set(HSref1,PCref1); - Handle(Adaptor3d_HCurveOnSurface) HC = new Adaptor3d_HCurveOnSurface(); - HC->ChangeCurve().Load(PC1, HS1); + Handle(Adaptor3d_CurveOnSurface) HC = new Adaptor3d_CurveOnSurface(); + HC->Load(PC1, HS1); BRepBlend_SurfCurvEvolRadInv finvc(HS2,HC,HGuide,fsp->Law(HGuide)); BRepBlend_SurfPointEvolRadInv finvp(HS2,HGuide,fsp->Law(HGuide)); BRepBlend_EvolRadInv finv(HS2,HSref1,HGuide,fsp->Law(HGuide)); @@ -1422,7 +1422,7 @@ void ChFi3d_FilBuilder::PerformSurf(ChFiDS_SequenceOfSurfData& SeqData Spine->SetErrorStatus(ChFiDS_WalkingFailure); throw Standard_Failure("PerformSurf : Failed processing!"); } - TopAbs_Orientation Or = HS2->ChangeSurface().Face().Orientation(); + TopAbs_Orientation Or = HS2->Face().Orientation(); done = CompleteData(Data,func,lin,HS1,HS2,Or,1); if(!done) throw Standard_Failure("PerformSurf : Failed approximation!"); maybesingular = (func.GetMinimalDistance()<=100*tolapp3d); @@ -1436,17 +1436,17 @@ void ChFi3d_FilBuilder::PerformSurf(ChFiDS_SequenceOfSurfData& SeqData //======================================================================= void ChFi3d_FilBuilder::PerformSurf(ChFiDS_SequenceOfSurfData& SeqData, - const Handle(ChFiDS_HElSpine)& HGuide, + const Handle(ChFiDS_ElSpine)& HGuide, const Handle(ChFiDS_Spine)& Spine, const Standard_Integer Choix, - const Handle(BRepAdaptor_HSurface)& HS1, + const Handle(BRepAdaptor_Surface)& HS1, const Handle(Adaptor3d_TopolTool)& I1, const TopAbs_Orientation Or1, - const Handle(BRepAdaptor_HSurface)& HS2, + const Handle(BRepAdaptor_Surface)& HS2, const Handle(Adaptor3d_TopolTool)& I2, - const Handle(BRepAdaptor_HCurve2d)& PC2, - const Handle(BRepAdaptor_HSurface)& HSref2, - const Handle(BRepAdaptor_HCurve2d)& PCref2, + const Handle(BRepAdaptor_Curve2d)& PC2, + const Handle(BRepAdaptor_Surface)& HSref2, + const Handle(BRepAdaptor_Curve2d)& PCref2, Standard_Boolean& Decroch2, const Standard_Real MaxStep, const Standard_Real Fleche, @@ -1471,8 +1471,8 @@ void ChFi3d_FilBuilder::PerformSurf(ChFiDS_SequenceOfSurfData& SeqData if(fsp->IsConstant()){ BRepBlend_SurfRstConstRad func(HS1,HS2,PC2,HGuide); func.Set(HSref2,PCref2); - Handle(Adaptor3d_HCurveOnSurface) HC = new Adaptor3d_HCurveOnSurface(); - HC->ChangeCurve().Load(PC2, HS2); + Handle(Adaptor3d_CurveOnSurface) HC = new Adaptor3d_CurveOnSurface(); + HC->Load(PC2, HS2); BRepBlend_SurfCurvConstRadInv finvc(HS1,HC,HGuide); BRepBlend_SurfPointConstRadInv finvp(HS1,HGuide); BRepBlend_ConstRadInv finv(HS1,HSref2,HGuide); @@ -1496,7 +1496,7 @@ void ChFi3d_FilBuilder::PerformSurf(ChFiDS_SequenceOfSurfData& SeqData Spine->SetErrorStatus(ChFiDS_WalkingFailure); throw Standard_Failure("PerformSurf : Failed processing!"); } - TopAbs_Orientation Or = HS1->ChangeSurface().Face().Orientation(); + TopAbs_Orientation Or = HS1->Face().Orientation(); done = CompleteData(Data,func,lin,HS1,HS2,Or,0); if(!done) throw Standard_Failure("PerformSurf : Failed approximation!"); maybesingular = (func.GetMinimalDistance()<=100*tolapp3d); @@ -1504,8 +1504,8 @@ void ChFi3d_FilBuilder::PerformSurf(ChFiDS_SequenceOfSurfData& SeqData else { BRepBlend_SurfRstEvolRad func(HS1,HS2,PC2,HGuide,fsp->Law(HGuide)); func.Set(HSref2,PCref2); - Handle(Adaptor3d_HCurveOnSurface) HC = new Adaptor3d_HCurveOnSurface(); - HC->ChangeCurve().Load(PC2, HS2); + Handle(Adaptor3d_CurveOnSurface) HC = new Adaptor3d_CurveOnSurface(); + HC->Load(PC2, HS2); BRepBlend_SurfCurvEvolRadInv finvc(HS1,HC,HGuide,fsp->Law(HGuide)); BRepBlend_SurfPointEvolRadInv finvp(HS1,HGuide,fsp->Law(HGuide)); BRepBlend_EvolRadInv finv(HS1,HSref2,HGuide,fsp->Law(HGuide)); @@ -1527,7 +1527,7 @@ void ChFi3d_FilBuilder::PerformSurf(ChFiDS_SequenceOfSurfData& SeqData Spine->SetErrorStatus(ChFiDS_WalkingFailure); throw Standard_Failure("PerformSurf : Failed processing!"); } - TopAbs_Orientation Or = HS1->ChangeSurface().Face().Orientation(); + TopAbs_Orientation Or = HS1->Face().Orientation(); done = CompleteData(Data,func,lin,HS1,HS2,Or,0); if(!done) throw Standard_Failure("PerformSurf : Failed approximation!"); maybesingular = (func.GetMinimalDistance()<=100*tolapp3d); @@ -1546,21 +1546,21 @@ void ChFi3d_FilBuilder::PerformSurf(ChFiDS_SequenceOfSurfData& SeqData //======================================================================= void ChFi3d_FilBuilder::PerformSurf(ChFiDS_SequenceOfSurfData& SeqData, - const Handle(ChFiDS_HElSpine)& HGuide, + const Handle(ChFiDS_ElSpine)& HGuide, const Handle(ChFiDS_Spine)& Spine, const Standard_Integer Choix, - const Handle(BRepAdaptor_HSurface)& HS1, + const Handle(BRepAdaptor_Surface)& HS1, const Handle(Adaptor3d_TopolTool)& I1, - const Handle(BRepAdaptor_HCurve2d)& PC1, - const Handle(BRepAdaptor_HSurface)& HSref1, - const Handle(BRepAdaptor_HCurve2d)& PCref1, + const Handle(BRepAdaptor_Curve2d)& PC1, + const Handle(BRepAdaptor_Surface)& HSref1, + const Handle(BRepAdaptor_Curve2d)& PCref1, Standard_Boolean& Decroch1, const TopAbs_Orientation Or1, - const Handle(BRepAdaptor_HSurface)& HS2, + const Handle(BRepAdaptor_Surface)& HS2, const Handle(Adaptor3d_TopolTool)& I2, - const Handle(BRepAdaptor_HCurve2d)& PC2, - const Handle(BRepAdaptor_HSurface)& HSref2, - const Handle(BRepAdaptor_HCurve2d)& PCref2, + const Handle(BRepAdaptor_Curve2d)& PC2, + const Handle(BRepAdaptor_Surface)& HSref2, + const Handle(BRepAdaptor_Curve2d)& PCref2, Standard_Boolean& Decroch2, const TopAbs_Orientation Or2, const Standard_Real MaxStep, @@ -1587,10 +1587,10 @@ void ChFi3d_FilBuilder::PerformSurf(ChFiDS_SequenceOfSurfData& SeqData if(fsp->IsConstant()){ BRepBlend_RstRstConstRad func(HS1, PC1, HS2, PC2, HGuide); func.Set(HSref1, PCref1, HSref2, PCref2); - Handle(Adaptor3d_HCurveOnSurface) HC1 = new Adaptor3d_HCurveOnSurface(); - HC1->ChangeCurve().Load(PC1, HS1); - Handle(Adaptor3d_HCurveOnSurface) HC2 = new Adaptor3d_HCurveOnSurface(); - HC2->ChangeCurve().Load(PC2, HS2); + Handle(Adaptor3d_CurveOnSurface) HC1 = new Adaptor3d_CurveOnSurface(); + HC1->Load(PC1, HS1); + Handle(Adaptor3d_CurveOnSurface) HC2 = new Adaptor3d_CurveOnSurface(); + HC2->Load(PC2, HS2); BRepBlend_SurfCurvConstRadInv finv1(HSref1, HC2, HGuide); BRepBlend_CurvPointRadInv finvp1(HGuide, HC2); BRepBlend_SurfCurvConstRadInv finv2(HSref2, HC1, HGuide); @@ -1619,7 +1619,7 @@ void ChFi3d_FilBuilder::PerformSurf(ChFiDS_SequenceOfSurfData& SeqData Spine->SetErrorStatus(ChFiDS_WalkingFailure); throw Standard_Failure("PerformSurf : Failed processing!"); } - TopAbs_Orientation Or = HS1->ChangeSurface().Face().Orientation(); + TopAbs_Orientation Or = HS1->Face().Orientation(); done = CompleteData(Data, func, lin, HS1, HS2, Or); if(!done) throw Standard_Failure("PerformSurf : Failed approximation!"); maybesingular = (func.GetMinimalDistance()<=100*tolapp3d); @@ -1627,10 +1627,10 @@ void ChFi3d_FilBuilder::PerformSurf(ChFiDS_SequenceOfSurfData& SeqData else { BRepBlend_RstRstEvolRad func(HS1,PC1, HS2, PC2, HGuide, fsp->Law(HGuide)); func.Set(HSref1, PCref1, HSref2, PCref2); - Handle(Adaptor3d_HCurveOnSurface) HC1 = new Adaptor3d_HCurveOnSurface(); - HC1->ChangeCurve().Load(PC1, HS1); - Handle(Adaptor3d_HCurveOnSurface) HC2 = new Adaptor3d_HCurveOnSurface(); - HC2->ChangeCurve().Load(PC2, HS2); + Handle(Adaptor3d_CurveOnSurface) HC1 = new Adaptor3d_CurveOnSurface(); + HC1->Load(PC1, HS1); + Handle(Adaptor3d_CurveOnSurface) HC2 = new Adaptor3d_CurveOnSurface(); + HC2->Load(PC2, HS2); BRepBlend_SurfCurvEvolRadInv finv1(HSref1, HC2, HGuide, fsp->Law(HGuide)); BRepBlend_CurvPointRadInv finvp1(HGuide, HC2); @@ -1662,7 +1662,7 @@ void ChFi3d_FilBuilder::PerformSurf(ChFiDS_SequenceOfSurfData& SeqData Spine->SetErrorStatus(ChFiDS_WalkingFailure); throw Standard_Failure("PerformSurf : Failed processing!"); } - TopAbs_Orientation Or = HS1->ChangeSurface().Face().Orientation(); + TopAbs_Orientation Or = HS1->Face().Orientation(); done = CompleteData(Data, func, lin, HS1, HS2, Or); if(!done) throw Standard_Failure("PerformSurf : Failed approximation!"); maybesingular = (func.GetMinimalDistance()<=100*tolapp3d); diff --git a/src/ChFi3d/ChFi3d_FilBuilder.hxx b/src/ChFi3d/ChFi3d_FilBuilder.hxx index 58fed1fb13..382c87d463 100644 --- a/src/ChFi3d/ChFi3d_FilBuilder.hxx +++ b/src/ChFi3d/ChFi3d_FilBuilder.hxx @@ -17,36 +17,29 @@ #ifndef _ChFi3d_FilBuilder_HeaderFile #define _ChFi3d_FilBuilder_HeaderFile -#include -#include -#include - +#include +#include #include #include #include -#include -#include -#include +#include +#include #include +#include #include #include #include -#include -#include -class TopoDS_Shape; -class TopoDS_Edge; -class Law_Function; -class TopoDS_Vertex; + +class Adaptor3d_TopolTool; +class BRepBlend_Line; class gp_XY; class ChFiDS_SurfData; -class ChFiDS_HElSpine; class ChFiDS_Spine; -class BRepAdaptor_HSurface; -class Adaptor3d_TopolTool; -class BRepAdaptor_HCurve2d; -class BRepBlend_Line; class ChFiDS_Stripe; - +class Law_Function; +class TopoDS_Edge; +class TopoDS_Shape; +class TopoDS_Vertex; //! Tool of construction of fillets 3d on edges (on a solid). class ChFi3d_FilBuilder : public ChFi3d_Builder @@ -136,25 +129,25 @@ protected: Standard_EXPORT void SimulKPart (const Handle(ChFiDS_SurfData)& SD) const Standard_OVERRIDE; - Standard_EXPORT Standard_Boolean SimulSurf (Handle(ChFiDS_SurfData)& Data, const Handle(ChFiDS_HElSpine)& Guide, const Handle(ChFiDS_Spine)& Spine, const Standard_Integer Choix, const Handle(BRepAdaptor_HSurface)& S1, const Handle(Adaptor3d_TopolTool)& I1, const Handle(BRepAdaptor_HSurface)& S2, const Handle(Adaptor3d_TopolTool)& I2, const Standard_Real TolGuide, Standard_Real& First, Standard_Real& Last, const Standard_Boolean Inside, const Standard_Boolean Appro, const Standard_Boolean Forward, const Standard_Boolean RecOnS1, const Standard_Boolean RecOnS2, const math_Vector& Soldep, Standard_Integer& Intf, Standard_Integer& Intl) Standard_OVERRIDE; + Standard_EXPORT Standard_Boolean SimulSurf (Handle(ChFiDS_SurfData)& Data, const Handle(ChFiDS_ElSpine)& Guide, const Handle(ChFiDS_Spine)& Spine, const Standard_Integer Choix, const Handle(BRepAdaptor_Surface)& S1, const Handle(Adaptor3d_TopolTool)& I1, const Handle(BRepAdaptor_Surface)& S2, const Handle(Adaptor3d_TopolTool)& I2, const Standard_Real TolGuide, Standard_Real& First, Standard_Real& Last, const Standard_Boolean Inside, const Standard_Boolean Appro, const Standard_Boolean Forward, const Standard_Boolean RecOnS1, const Standard_Boolean RecOnS2, const math_Vector& Soldep, Standard_Integer& Intf, Standard_Integer& Intl) Standard_OVERRIDE; - Standard_EXPORT virtual void SimulSurf (Handle(ChFiDS_SurfData)& Data, const Handle(ChFiDS_HElSpine)& Guide, const Handle(ChFiDS_Spine)& Spine, const Standard_Integer Choix, const Handle(BRepAdaptor_HSurface)& S1, const Handle(Adaptor3d_TopolTool)& I1, const Handle(BRepAdaptor_HCurve2d)& PC1, const Handle(BRepAdaptor_HSurface)& Sref1, const Handle(BRepAdaptor_HCurve2d)& PCref1, Standard_Boolean& Decroch1, const Handle(BRepAdaptor_HSurface)& S2, const Handle(Adaptor3d_TopolTool)& I2, const TopAbs_Orientation Or2, const Standard_Real Fleche, const Standard_Real TolGuide, Standard_Real& First, Standard_Real& Last, const Standard_Boolean Inside, const Standard_Boolean Appro, const Standard_Boolean Forward, const Standard_Boolean RecP, const Standard_Boolean RecS, const Standard_Boolean RecRst, const math_Vector& Soldep) Standard_OVERRIDE; + Standard_EXPORT virtual void SimulSurf (Handle(ChFiDS_SurfData)& Data, const Handle(ChFiDS_ElSpine)& Guide, const Handle(ChFiDS_Spine)& Spine, const Standard_Integer Choix, const Handle(BRepAdaptor_Surface)& S1, const Handle(Adaptor3d_TopolTool)& I1, const Handle(BRepAdaptor_Curve2d)& PC1, const Handle(BRepAdaptor_Surface)& Sref1, const Handle(BRepAdaptor_Curve2d)& PCref1, Standard_Boolean& Decroch1, const Handle(BRepAdaptor_Surface)& S2, const Handle(Adaptor3d_TopolTool)& I2, const TopAbs_Orientation Or2, const Standard_Real Fleche, const Standard_Real TolGuide, Standard_Real& First, Standard_Real& Last, const Standard_Boolean Inside, const Standard_Boolean Appro, const Standard_Boolean Forward, const Standard_Boolean RecP, const Standard_Boolean RecS, const Standard_Boolean RecRst, const math_Vector& Soldep) Standard_OVERRIDE; - Standard_EXPORT virtual void SimulSurf (Handle(ChFiDS_SurfData)& Data, const Handle(ChFiDS_HElSpine)& Guide, const Handle(ChFiDS_Spine)& Spine, const Standard_Integer Choix, const Handle(BRepAdaptor_HSurface)& S1, const Handle(Adaptor3d_TopolTool)& I1, const TopAbs_Orientation Or1, const Handle(BRepAdaptor_HSurface)& S2, const Handle(Adaptor3d_TopolTool)& I2, const Handle(BRepAdaptor_HCurve2d)& PC2, const Handle(BRepAdaptor_HSurface)& Sref2, const Handle(BRepAdaptor_HCurve2d)& PCref2, Standard_Boolean& Decroch2, const Standard_Real Fleche, const Standard_Real TolGuide, Standard_Real& First, Standard_Real& Last, const Standard_Boolean Inside, const Standard_Boolean Appro, const Standard_Boolean Forward, const Standard_Boolean RecP, const Standard_Boolean RecS, const Standard_Boolean RecRst, const math_Vector& Soldep) Standard_OVERRIDE; + Standard_EXPORT virtual void SimulSurf (Handle(ChFiDS_SurfData)& Data, const Handle(ChFiDS_ElSpine)& Guide, const Handle(ChFiDS_Spine)& Spine, const Standard_Integer Choix, const Handle(BRepAdaptor_Surface)& S1, const Handle(Adaptor3d_TopolTool)& I1, const TopAbs_Orientation Or1, const Handle(BRepAdaptor_Surface)& S2, const Handle(Adaptor3d_TopolTool)& I2, const Handle(BRepAdaptor_Curve2d)& PC2, const Handle(BRepAdaptor_Surface)& Sref2, const Handle(BRepAdaptor_Curve2d)& PCref2, Standard_Boolean& Decroch2, const Standard_Real Fleche, const Standard_Real TolGuide, Standard_Real& First, Standard_Real& Last, const Standard_Boolean Inside, const Standard_Boolean Appro, const Standard_Boolean Forward, const Standard_Boolean RecP, const Standard_Boolean RecS, const Standard_Boolean RecRst, const math_Vector& Soldep) Standard_OVERRIDE; - Standard_EXPORT virtual void SimulSurf (Handle(ChFiDS_SurfData)& Data, const Handle(ChFiDS_HElSpine)& Guide, const Handle(ChFiDS_Spine)& Spine, const Standard_Integer Choix, const Handle(BRepAdaptor_HSurface)& S1, const Handle(Adaptor3d_TopolTool)& I1, const Handle(BRepAdaptor_HCurve2d)& PC1, const Handle(BRepAdaptor_HSurface)& Sref1, const Handle(BRepAdaptor_HCurve2d)& PCref1, Standard_Boolean& Decroch1, const TopAbs_Orientation Or1, const Handle(BRepAdaptor_HSurface)& S2, const Handle(Adaptor3d_TopolTool)& I2, const Handle(BRepAdaptor_HCurve2d)& PC2, const Handle(BRepAdaptor_HSurface)& Sref2, const Handle(BRepAdaptor_HCurve2d)& PCref2, Standard_Boolean& Decroch2, const TopAbs_Orientation Or2, const Standard_Real Fleche, const Standard_Real TolGuide, Standard_Real& First, Standard_Real& Last, const Standard_Boolean Inside, const Standard_Boolean Appro, const Standard_Boolean Forward, const Standard_Boolean RecP1, const Standard_Boolean RecRst1, const Standard_Boolean RecP2, const Standard_Boolean RecRst2, const math_Vector& Soldep) Standard_OVERRIDE; + Standard_EXPORT virtual void SimulSurf (Handle(ChFiDS_SurfData)& Data, const Handle(ChFiDS_ElSpine)& Guide, const Handle(ChFiDS_Spine)& Spine, const Standard_Integer Choix, const Handle(BRepAdaptor_Surface)& S1, const Handle(Adaptor3d_TopolTool)& I1, const Handle(BRepAdaptor_Curve2d)& PC1, const Handle(BRepAdaptor_Surface)& Sref1, const Handle(BRepAdaptor_Curve2d)& PCref1, Standard_Boolean& Decroch1, const TopAbs_Orientation Or1, const Handle(BRepAdaptor_Surface)& S2, const Handle(Adaptor3d_TopolTool)& I2, const Handle(BRepAdaptor_Curve2d)& PC2, const Handle(BRepAdaptor_Surface)& Sref2, const Handle(BRepAdaptor_Curve2d)& PCref2, Standard_Boolean& Decroch2, const TopAbs_Orientation Or2, const Standard_Real Fleche, const Standard_Real TolGuide, Standard_Real& First, Standard_Real& Last, const Standard_Boolean Inside, const Standard_Boolean Appro, const Standard_Boolean Forward, const Standard_Boolean RecP1, const Standard_Boolean RecRst1, const Standard_Boolean RecP2, const Standard_Boolean RecRst2, const math_Vector& Soldep) Standard_OVERRIDE; - Standard_EXPORT Standard_Boolean PerformFirstSection (const Handle(ChFiDS_Spine)& S, const Handle(ChFiDS_HElSpine)& HGuide, const Standard_Integer Choix, Handle(BRepAdaptor_HSurface)& S1, Handle(BRepAdaptor_HSurface)& S2, const Handle(Adaptor3d_TopolTool)& I1, const Handle(Adaptor3d_TopolTool)& I2, const Standard_Real Par, math_Vector& SolDep, TopAbs_State& Pos1, TopAbs_State& Pos2) const Standard_OVERRIDE; + Standard_EXPORT Standard_Boolean PerformFirstSection (const Handle(ChFiDS_Spine)& S, const Handle(ChFiDS_ElSpine)& HGuide, const Standard_Integer Choix, Handle(BRepAdaptor_Surface)& S1, Handle(BRepAdaptor_Surface)& S2, const Handle(Adaptor3d_TopolTool)& I1, const Handle(Adaptor3d_TopolTool)& I2, const Standard_Real Par, math_Vector& SolDep, TopAbs_State& Pos1, TopAbs_State& Pos2) const Standard_OVERRIDE; //! Method calculates the elements of construction of the //! fillet (constant or evolutive). - Standard_EXPORT Standard_Boolean PerformSurf (ChFiDS_SequenceOfSurfData& SeqData, const Handle(ChFiDS_HElSpine)& Guide, const Handle(ChFiDS_Spine)& Spine, const Standard_Integer Choix, const Handle(BRepAdaptor_HSurface)& S1, const Handle(Adaptor3d_TopolTool)& I1, const Handle(BRepAdaptor_HSurface)& S2, const Handle(Adaptor3d_TopolTool)& I2, const Standard_Real MaxStep, const Standard_Real Fleche, const Standard_Real TolGuide, Standard_Real& First, Standard_Real& Last, const Standard_Boolean Inside, const Standard_Boolean Appro, const Standard_Boolean Forward, const Standard_Boolean RecOnS1, const Standard_Boolean RecOnS2, const math_Vector& Soldep, Standard_Integer& Intf, Standard_Integer& Intl) Standard_OVERRIDE; + Standard_EXPORT Standard_Boolean PerformSurf (ChFiDS_SequenceOfSurfData& SeqData, const Handle(ChFiDS_ElSpine)& Guide, const Handle(ChFiDS_Spine)& Spine, const Standard_Integer Choix, const Handle(BRepAdaptor_Surface)& S1, const Handle(Adaptor3d_TopolTool)& I1, const Handle(BRepAdaptor_Surface)& S2, const Handle(Adaptor3d_TopolTool)& I2, const Standard_Real MaxStep, const Standard_Real Fleche, const Standard_Real TolGuide, Standard_Real& First, Standard_Real& Last, const Standard_Boolean Inside, const Standard_Boolean Appro, const Standard_Boolean Forward, const Standard_Boolean RecOnS1, const Standard_Boolean RecOnS2, const math_Vector& Soldep, Standard_Integer& Intf, Standard_Integer& Intl) Standard_OVERRIDE; - Standard_EXPORT virtual void PerformSurf (ChFiDS_SequenceOfSurfData& SeqData, const Handle(ChFiDS_HElSpine)& Guide, const Handle(ChFiDS_Spine)& Spine, const Standard_Integer Choix, const Handle(BRepAdaptor_HSurface)& S1, const Handle(Adaptor3d_TopolTool)& I1, const Handle(BRepAdaptor_HCurve2d)& PC1, const Handle(BRepAdaptor_HSurface)& Sref1, const Handle(BRepAdaptor_HCurve2d)& PCref1, Standard_Boolean& Decroch1, const Handle(BRepAdaptor_HSurface)& S2, const Handle(Adaptor3d_TopolTool)& I2, const TopAbs_Orientation Or2, const Standard_Real MaxStep, const Standard_Real Fleche, const Standard_Real TolGuide, Standard_Real& First, Standard_Real& Last, const Standard_Boolean Inside, const Standard_Boolean Appro, const Standard_Boolean Forward, const Standard_Boolean RecP, const Standard_Boolean RecS, const Standard_Boolean RecRst, const math_Vector& Soldep) Standard_OVERRIDE; + Standard_EXPORT virtual void PerformSurf (ChFiDS_SequenceOfSurfData& SeqData, const Handle(ChFiDS_ElSpine)& Guide, const Handle(ChFiDS_Spine)& Spine, const Standard_Integer Choix, const Handle(BRepAdaptor_Surface)& S1, const Handle(Adaptor3d_TopolTool)& I1, const Handle(BRepAdaptor_Curve2d)& PC1, const Handle(BRepAdaptor_Surface)& Sref1, const Handle(BRepAdaptor_Curve2d)& PCref1, Standard_Boolean& Decroch1, const Handle(BRepAdaptor_Surface)& S2, const Handle(Adaptor3d_TopolTool)& I2, const TopAbs_Orientation Or2, const Standard_Real MaxStep, const Standard_Real Fleche, const Standard_Real TolGuide, Standard_Real& First, Standard_Real& Last, const Standard_Boolean Inside, const Standard_Boolean Appro, const Standard_Boolean Forward, const Standard_Boolean RecP, const Standard_Boolean RecS, const Standard_Boolean RecRst, const math_Vector& Soldep) Standard_OVERRIDE; - Standard_EXPORT virtual void PerformSurf (ChFiDS_SequenceOfSurfData& SeqData, const Handle(ChFiDS_HElSpine)& Guide, const Handle(ChFiDS_Spine)& Spine, const Standard_Integer Choix, const Handle(BRepAdaptor_HSurface)& S1, const Handle(Adaptor3d_TopolTool)& I1, const TopAbs_Orientation Or1, const Handle(BRepAdaptor_HSurface)& S2, const Handle(Adaptor3d_TopolTool)& I2, const Handle(BRepAdaptor_HCurve2d)& PC2, const Handle(BRepAdaptor_HSurface)& Sref2, const Handle(BRepAdaptor_HCurve2d)& PCref2, Standard_Boolean& Decroch2, const Standard_Real MaxStep, const Standard_Real Fleche, const Standard_Real TolGuide, Standard_Real& First, Standard_Real& Last, const Standard_Boolean Inside, const Standard_Boolean Appro, const Standard_Boolean Forward, const Standard_Boolean RecP, const Standard_Boolean RecS, const Standard_Boolean RecRst, const math_Vector& Soldep) Standard_OVERRIDE; + Standard_EXPORT virtual void PerformSurf (ChFiDS_SequenceOfSurfData& SeqData, const Handle(ChFiDS_ElSpine)& Guide, const Handle(ChFiDS_Spine)& Spine, const Standard_Integer Choix, const Handle(BRepAdaptor_Surface)& S1, const Handle(Adaptor3d_TopolTool)& I1, const TopAbs_Orientation Or1, const Handle(BRepAdaptor_Surface)& S2, const Handle(Adaptor3d_TopolTool)& I2, const Handle(BRepAdaptor_Curve2d)& PC2, const Handle(BRepAdaptor_Surface)& Sref2, const Handle(BRepAdaptor_Curve2d)& PCref2, Standard_Boolean& Decroch2, const Standard_Real MaxStep, const Standard_Real Fleche, const Standard_Real TolGuide, Standard_Real& First, Standard_Real& Last, const Standard_Boolean Inside, const Standard_Boolean Appro, const Standard_Boolean Forward, const Standard_Boolean RecP, const Standard_Boolean RecS, const Standard_Boolean RecRst, const math_Vector& Soldep) Standard_OVERRIDE; - Standard_EXPORT virtual void PerformSurf (ChFiDS_SequenceOfSurfData& Data, const Handle(ChFiDS_HElSpine)& Guide, const Handle(ChFiDS_Spine)& Spine, const Standard_Integer Choix, const Handle(BRepAdaptor_HSurface)& S1, const Handle(Adaptor3d_TopolTool)& I1, const Handle(BRepAdaptor_HCurve2d)& PC1, const Handle(BRepAdaptor_HSurface)& Sref1, const Handle(BRepAdaptor_HCurve2d)& PCref1, Standard_Boolean& Decroch1, const TopAbs_Orientation Or1, const Handle(BRepAdaptor_HSurface)& S2, const Handle(Adaptor3d_TopolTool)& I2, const Handle(BRepAdaptor_HCurve2d)& PC2, const Handle(BRepAdaptor_HSurface)& Sref2, const Handle(BRepAdaptor_HCurve2d)& PCref2, Standard_Boolean& Decroch2, const TopAbs_Orientation Or2, const Standard_Real MaxStep, const Standard_Real Fleche, const Standard_Real TolGuide, Standard_Real& First, Standard_Real& Last, const Standard_Boolean Inside, const Standard_Boolean Appro, const Standard_Boolean Forward, const Standard_Boolean RecP1, const Standard_Boolean RecRst1, const Standard_Boolean RecP2, const Standard_Boolean RecRst2, const math_Vector& Soldep) Standard_OVERRIDE; + Standard_EXPORT virtual void PerformSurf (ChFiDS_SequenceOfSurfData& Data, const Handle(ChFiDS_ElSpine)& Guide, const Handle(ChFiDS_Spine)& Spine, const Standard_Integer Choix, const Handle(BRepAdaptor_Surface)& S1, const Handle(Adaptor3d_TopolTool)& I1, const Handle(BRepAdaptor_Curve2d)& PC1, const Handle(BRepAdaptor_Surface)& Sref1, const Handle(BRepAdaptor_Curve2d)& PCref1, Standard_Boolean& Decroch1, const TopAbs_Orientation Or1, const Handle(BRepAdaptor_Surface)& S2, const Handle(Adaptor3d_TopolTool)& I2, const Handle(BRepAdaptor_Curve2d)& PC2, const Handle(BRepAdaptor_Surface)& Sref2, const Handle(BRepAdaptor_Curve2d)& PCref2, Standard_Boolean& Decroch2, const TopAbs_Orientation Or2, const Standard_Real MaxStep, const Standard_Real Fleche, const Standard_Real TolGuide, Standard_Real& First, Standard_Real& Last, const Standard_Boolean Inside, const Standard_Boolean Appro, const Standard_Boolean Forward, const Standard_Boolean RecP1, const Standard_Boolean RecRst1, const Standard_Boolean RecP2, const Standard_Boolean RecRst2, const math_Vector& Soldep) Standard_OVERRIDE; //! Method to split an singular SurfData in several non //! singular SurfData.. diff --git a/src/ChFi3d/ChFi3d_FilBuilder_C2.cxx b/src/ChFi3d/ChFi3d_FilBuilder_C2.cxx index fc219ee55b..8b7aa491a9 100644 --- a/src/ChFi3d/ChFi3d_FilBuilder_C2.cxx +++ b/src/ChFi3d/ChFi3d_FilBuilder_C2.cxx @@ -16,14 +16,14 @@ #include -#include +#include #include #include #include #include -#include -#include -#include +#include +#include +#include #include #include #include @@ -37,7 +37,7 @@ #include #include #include -#include +#include #include #include #include @@ -49,13 +49,13 @@ #include #include #include -#include +#include #include #include #include #include -#include -#include +#include +#include #include #include #include @@ -342,25 +342,25 @@ void ChFi3d_FilBuilder::PerformTwoCorner(const Standard_Integer Index) if(CP1.IsOnArc()&& CP2.IsOnArc()){ yapiv = (pivot.IsSame(CP2.Arc())); } - Handle(BRepAdaptor_HCurve) Hpivot; + Handle(BRepAdaptor_Curve) Hpivot; Standard_Boolean sameparam = Standard_False; Standard_Real parCP1 = 0., parCP2 = 0.; if(yapiv) { - Hpivot = new BRepAdaptor_HCurve(pivot); + Hpivot = new BRepAdaptor_Curve(pivot); parCP1 = CP1.ParameterOnArc(); parCP2 = CP2.ParameterOnArc(); gp_Pnt tst1 = Hpivot->Value(parCP1); gp_Pnt tst2 = Hpivot->Value(parCP2); sameparam = tst1.Distance(tst2) <= tolesp; } - Handle(BRepAdaptor_HSurface) HFaCo = new BRepAdaptor_HSurface(); - Handle(BRepAdaptor_HSurface) HFaPiv; - Handle(BRepAdaptor_HSurface) HBRS1 = new BRepAdaptor_HSurface(); - Handle(BRepAdaptor_HSurface) HBRS2 = new BRepAdaptor_HSurface(); + Handle(BRepAdaptor_Surface) HFaCo = new BRepAdaptor_Surface(); + Handle(BRepAdaptor_Surface) HFaPiv; + Handle(BRepAdaptor_Surface) HBRS1 = new BRepAdaptor_Surface(); + Handle(BRepAdaptor_Surface) HBRS2 = new BRepAdaptor_Surface(); - BRepAdaptor_Surface& BRS1 = HBRS1->ChangeSurface(); - BRepAdaptor_Surface& BRS2 = HBRS2->ChangeSurface(); - BRepAdaptor_Surface& BRFaCo = HFaCo->ChangeSurface(); + BRepAdaptor_Surface& BRS1 = *HBRS1; + BRepAdaptor_Surface& BRS2 = *HBRS2; + BRepAdaptor_Surface& BRFaCo = *HFaCo; BRFaCo.Initialize(FaCo); TopoDS_Face FF1,FF2,F,FaPiv; @@ -517,8 +517,7 @@ void ChFi3d_FilBuilder::PerformTwoCorner(const Standard_Integer Index) fil.Init(Bfac,B2,B1,1); } else { - Handle(Adaptor3d_HCurve) HPivTrim = Hpivot->ChangeCurve(). - Trim(Min(parCP1,parCP2),Max(parCP1,parCP2),tolesp); + Handle(Adaptor3d_Curve) HPivTrim = Hpivot->Trim(Min(parCP1,parCP2),Max(parCP1,parCP2),tolesp); Bpiv = new GeomFill_SimpleBound(HPivTrim,tolesp,2.e-4); fil.Init(Bfac,B2,Bpiv,B1,1); BRepAdaptor_Curve2d pcpivot; @@ -761,7 +760,7 @@ void ChFi3d_FilBuilder::PerformTwoCorner(const Standard_Integer Index) gp_Pnt2d ppcosam = sdsam->Interference(ifacosam).PCurveOnSurf()->Value(uintpcsam); Handle(Geom_Surface) surfsam = DStr.Surface(sdsam->Surf()).Surface(); - Handle(GeomAdaptor_HSurface) Hsurfsam = new GeomAdaptor_HSurface(surfsam); + Handle(GeomAdaptor_Surface) Hsurfsam = new GeomAdaptor_Surface(surfsam); Handle(Geom2d_Curve) pcsurfsam; Bsam = ChFi3d_mkbound(Hsurfsam,pcsurfsam,ppopsam,ppcosam,tolesp,2.e-4); Standard_Real upcopdif = sddif->Interference(ifaopdif).Parameter(isfirstdif); @@ -770,7 +769,7 @@ void ChFi3d_FilBuilder::PerformTwoCorner(const Standard_Integer Index) gp_Pnt2d ppcodif = sddif->Interference(ifacodif).PCurveOnSurf()->Value(uintpcdif); Handle(Geom_Surface) surfdif = DStr.Surface(sddif->Surf()).Surface(); - Handle(GeomAdaptor_HSurface) Hsurfdif = new GeomAdaptor_HSurface(surfdif); + Handle(GeomAdaptor_Surface) Hsurfdif = new GeomAdaptor_Surface(surfdif); Handle(Geom2d_Curve) pcsurfdif; Bdif = ChFi3d_mkbound(Hsurfdif,pcsurfdif,ppcodif,ppopdif,tolesp,2.e-4); gp_Pnt2d ppfacsam,ppfacdif; @@ -798,8 +797,8 @@ void ChFi3d_FilBuilder::PerformTwoCorner(const Standard_Integer Index) ////////////////// BRepAdaptor_Curve CArcFac(Arcopdif); CArcFac.D1(cpopdif.ParameterOnArc(),PPfacdif,VVfacdif); - Handle(BRepAdaptor_HSurface) HBRFopsam = new BRepAdaptor_HSurface(); - BRepAdaptor_Surface& BRFopsam = HBRFopsam->ChangeSurface(); + Handle(BRepAdaptor_Surface) HBRFopsam = new BRepAdaptor_Surface(); + BRepAdaptor_Surface& BRFopsam = *HBRFopsam; BRFopsam.Initialize(Fopsam,Standard_False); Handle(Geom2d_Curve) pcFopsam = ChFi3d_BuildPCurve(HBRFopsam, ppfacsam,VVfacsam, @@ -860,7 +859,7 @@ void ChFi3d_FilBuilder::PerformTwoCorner(const Standard_Integer Index) corner->ChangeFirstPCurve(),P1deb,P2deb, tolesp,tol2d,tolreached,0); Standard_Real tolr1; - Handle(GeomAdaptor_HCurve) HC3d = new GeomAdaptor_HCurve(C3d); + Handle(GeomAdaptor_Curve) HC3d = new GeomAdaptor_Curve(C3d); ChFi3d_SameParameter(HC3d,pcFopsam,HBRFopsam,tolesp,tolr1); tolreached = Max(tolreached,tolr1); TopOpeBRepDS_Curve Tcurv1(C3d,tolreached); @@ -891,7 +890,7 @@ void ChFi3d_FilBuilder::PerformTwoCorner(const Standard_Integer Index) corner->ChangeLastPCurve(),P1fin,P2fin, tolesp,tol2d,tolreached,0); Standard_Real tolr2; - HC3d->ChangeCurve().Load(C3d); + HC3d->Load(C3d); ChFi3d_SameParameter(HC3d,pcsurfdif,Hsurfdif,tolesp,tolr2); tolreached = Max(tolreached,tolr2); TopOpeBRepDS_Curve Tcurv2(C3d,tolreached); diff --git a/src/ChFi3d/ChFi3d_FilBuilder_C3.cxx b/src/ChFi3d/ChFi3d_FilBuilder_C3.cxx index 0c67d2ad4a..46370db8b8 100644 --- a/src/ChFi3d/ChFi3d_FilBuilder_C3.cxx +++ b/src/ChFi3d/ChFi3d_FilBuilder_C3.cxx @@ -16,12 +16,12 @@ #include -#include +#include #include #include -#include -#include -#include +#include +#include +#include #include #include #include @@ -35,7 +35,7 @@ #include #include #include -#include +#include #include #include #include @@ -50,14 +50,14 @@ #include #include #include -#include +#include #include #include #include #include #include -#include -#include +#include +#include #include #include #include @@ -397,7 +397,7 @@ void ChFi3d_FilBuilder::PerformThreeCorner(const Standard_Integer Jndex) // ---------------------------------------------------------- TopAbs_Orientation OFac = face[pivot].Orientation(); - Handle(BRepAdaptor_HSurface) Fac = new BRepAdaptor_HSurface(face[pivot]); + Handle(BRepAdaptor_Surface) Fac = new BRepAdaptor_Surface(face[pivot]); gp_Pnt2d ppp1,ppp2; const ChFiDS_FaceInterference& bid1 = CD[pivot]->SetOfSurfData()-> Value(i[pivot][deb])->InterferenceOnS1(); @@ -432,12 +432,12 @@ void ChFi3d_FilBuilder::PerformThreeCorner(const Standard_Integer Jndex) Value(i[pivot][deb])->Surf())).Surface()); } - Handle(GeomAdaptor_HSurface) Surf = new GeomAdaptor_HSurface(gasurf); + Handle(GeomAdaptor_Surface) Surf = new GeomAdaptor_Surface(gasurf); // Handle(BRepTopAdaptor_TopolTool) IFac = new BRepTopAdaptor_TopolTool(Fac); // Try to not classify on the face for cases of reentering fillets which naturally depass // the border. - Handle(GeomAdaptor_HSurface) - bidsurf = new GeomAdaptor_HSurface(Fac->ChangeSurface().Surface()); + Handle(GeomAdaptor_Surface) + bidsurf = new GeomAdaptor_Surface(Fac->ChangeSurface().Surface()); Handle(Adaptor3d_TopolTool) IFac = new Adaptor3d_TopolTool(bidsurf); // end of the attempt. @@ -554,10 +554,10 @@ void ChFi3d_FilBuilder::PerformThreeCorner(const Standard_Integer Jndex) } else locfleche = radpondere * (WLast - WFirst) * fleche; Standard_Real pasmax = (WLast-WFirst)*0.05; - Handle(ChFiDS_HElSpine) cornerspine = new ChFiDS_HElSpine(); - cornerspine->ChangeCurve().SetCurve(spinecoin); - cornerspine->ChangeCurve().FirstParameter(WFirst - pasmax); - cornerspine->ChangeCurve().LastParameter(WLast + pasmax); + Handle(ChFiDS_ElSpine) cornerspine = new ChFiDS_ElSpine(); + cornerspine->SetCurve(spinecoin); + cornerspine->FirstParameter(WFirst - pasmax); + cornerspine->LastParameter(WLast + pasmax); // Just to confuse Compute that should not require this // in this exact case ... Handle(ChFiDS_Spine) NullSpine; diff --git a/src/ChFiDS/ChFiDS_ElSpine.cxx b/src/ChFiDS/ChFiDS_ElSpine.cxx index 1a8b547b51..a2866fffa9 100644 --- a/src/ChFiDS/ChFiDS_ElSpine.cxx +++ b/src/ChFiDS/ChFiDS_ElSpine.cxx @@ -15,7 +15,7 @@ // commercial license or contractual agreement. -#include +#include #include #include #include @@ -35,6 +35,8 @@ #include #include +IMPLEMENT_STANDARD_RTTIEXT(ChFiDS_ElSpine, Adaptor3d_Curve) + //======================================================================= //function : ChFiDS_ElSpine //purpose : @@ -126,7 +128,7 @@ void ChFiDS_ElSpine::Intervals(TColStd_Array1OfReal& T,const GeomAbs_Shape S) co //purpose : //======================================================================= -Handle(Adaptor3d_HCurve) ChFiDS_ElSpine::Trim(const Standard_Real First, +Handle(Adaptor3d_Curve) ChFiDS_ElSpine::Trim(const Standard_Real First, const Standard_Real Last, const Standard_Real Tol) const { diff --git a/src/ChFiDS/ChFiDS_ElSpine.hxx b/src/ChFiDS/ChFiDS_ElSpine.hxx index e98953965a..9dfc5a0146 100644 --- a/src/ChFiDS/ChFiDS_ElSpine.hxx +++ b/src/ChFiDS/ChFiDS_ElSpine.hxx @@ -36,7 +36,6 @@ class ChFiDS_SurfData; class Standard_OutOfRange; class Standard_NoSuchObject; class Standard_DomainError; -class Adaptor3d_HCurve; class gp_Pnt; class gp_Vec; class gp_Ax1; @@ -49,15 +48,14 @@ class gp_Parab; class Geom_BezierCurve; class Geom_BSplineCurve; +DEFINE_STANDARD_HANDLE(ChFiDS_ElSpine, Adaptor3d_Curve) //! Elementary Spine for cheminements and approximations. class ChFiDS_ElSpine : public Adaptor3d_Curve { + DEFINE_STANDARD_RTTIEXT(ChFiDS_ElSpine, Adaptor3d_Curve) public: - DEFINE_STANDARD_ALLOC - - Standard_EXPORT ChFiDS_ElSpine(); Standard_EXPORT virtual Standard_Real FirstParameter() const Standard_OVERRIDE; @@ -77,7 +75,7 @@ public: //! Returns a curve equivalent of between //! parameters and . is used to //! test for 3d points confusion. - Standard_EXPORT virtual Handle(Adaptor3d_HCurve) Trim (const Standard_Real First, const Standard_Real Last, const Standard_Real Tol) const Standard_OVERRIDE; + Standard_EXPORT virtual Handle(Adaptor3d_Curve) Trim (const Standard_Real First, const Standard_Real Last, const Standard_Real Tol) const Standard_OVERRIDE; Standard_EXPORT virtual Standard_Real Resolution (const Standard_Real R3d) const Standard_OVERRIDE; @@ -147,19 +145,8 @@ public: Standard_EXPORT Handle(Geom_BSplineCurve) BSpline() const Standard_OVERRIDE; - - - -protected: - - - - - private: - - GeomAdaptor_Curve curve; gp_Pnt ptfirst; gp_Pnt ptlast; @@ -175,13 +162,6 @@ private: Standard_Real pfirstsav; Standard_Real plastsav; - }; - - - - - - #endif // _ChFiDS_ElSpine_HeaderFile diff --git a/src/ChFiDS/ChFiDS_FilSpine.cxx b/src/ChFiDS/ChFiDS_FilSpine.cxx index 78dc1f614c..9506dc44b3 100644 --- a/src/ChFiDS/ChFiDS_FilSpine.cxx +++ b/src/ChFiDS/ChFiDS_FilSpine.cxx @@ -16,7 +16,7 @@ #include -#include +#include #include #include #include @@ -186,7 +186,7 @@ void ChFiDS_FilSpine::SetRadius(const gp_XY& UandR, if (splitdone) { ChFiDS_ListIteratorOfListOfHElSpine It(elspines); Law_ListIteratorOfLaws Itl(laws); - Handle(ChFiDS_HElSpine) Els = It.Value(); + Handle(ChFiDS_ElSpine) Els = It.Value(); if (Els->IsPeriodic()) Itl.Value() = ComputeLaw(Els); else{ for (; It.More(); It.Next(), Itl.Next()) { @@ -357,7 +357,7 @@ Standard_Real ChFiDS_FilSpine::Radius()const //purpose : //======================================================================= -void ChFiDS_FilSpine::AppendElSpine(const Handle(ChFiDS_HElSpine)& Els) +void ChFiDS_FilSpine::AppendElSpine(const Handle(ChFiDS_ElSpine)& Els) { ChFiDS_Spine::AppendElSpine(Els); AppendLaw(Els); @@ -368,7 +368,7 @@ void ChFiDS_FilSpine::AppendElSpine(const Handle(ChFiDS_HElSpine)& Els) //purpose : //======================================================================= -void ChFiDS_FilSpine::AppendLaw(const Handle(ChFiDS_HElSpine)& Els) +void ChFiDS_FilSpine::AppendLaw(const Handle(ChFiDS_ElSpine)& Els) { Handle(Law_Composite) l = ComputeLaw(Els); laws.Append(l); @@ -484,7 +484,7 @@ static void mklaw(Law_Laws& res, //======================================================================= Handle(Law_Composite) ChFiDS_FilSpine::ComputeLaw -(const Handle(ChFiDS_HElSpine)& Els) +(const Handle(ChFiDS_ElSpine)& Els) { Standard_Real tol3d = Precision::Confusion(); Standard_Real deb,fin,curdeb,curfin; @@ -709,7 +709,7 @@ Handle(Law_Composite) ChFiDS_FilSpine::ComputeLaw //purpose : //======================================================================= -Handle(Law_Composite) ChFiDS_FilSpine::Law(const Handle(ChFiDS_HElSpine)& Els) const +Handle(Law_Composite) ChFiDS_FilSpine::Law(const Handle(ChFiDS_ElSpine)& Els) const { ChFiDS_ListIteratorOfListOfHElSpine Itsp(elspines); Law_ListIteratorOfLaws Itl(laws); @@ -735,7 +735,7 @@ Handle(Law_Function)& ChFiDS_FilSpine::ChangeLaw(const TopoDS_Edge& E) if (IsConstant(IE)) { throw Standard_DomainError("ChFiDS_FilSpine::ChangeLaw : no law on constant edges"); } - Handle(ChFiDS_HElSpine) hsp = ElSpine(IE); + Handle(ChFiDS_ElSpine) hsp = ElSpine(IE); Standard_Real w = 0.5*(FirstParameter(IE) + LastParameter(IE)); Handle(Law_Composite) lc = Law(hsp); return lc->ChangeElementaryLaw(w); diff --git a/src/ChFiDS/ChFiDS_FilSpine.hxx b/src/ChFiDS/ChFiDS_FilSpine.hxx index 6d1355b0b2..6bc4bcfd6a 100644 --- a/src/ChFiDS/ChFiDS_FilSpine.hxx +++ b/src/ChFiDS/ChFiDS_FilSpine.hxx @@ -17,22 +17,16 @@ #ifndef _ChFiDS_FilSpine_HeaderFile #define _ChFiDS_FilSpine_HeaderFile -#include -#include - -#include -#include #include -#include -#include -#include +#include +#include +#include + class TopoDS_Edge; class TopoDS_Vertex; class gp_XY; class Law_Function; class Law_Composite; -class ChFiDS_HElSpine; - class ChFiDS_FilSpine; DEFINE_STANDARD_HANDLE(ChFiDS_FilSpine, ChFiDS_Spine) @@ -92,9 +86,9 @@ public: //! all along the edge E. Standard_EXPORT Standard_Real Radius (const TopoDS_Edge& E) const; - Standard_EXPORT virtual void AppendElSpine (const Handle(ChFiDS_HElSpine)& Els) Standard_OVERRIDE; + Standard_EXPORT virtual void AppendElSpine (const Handle(ChFiDS_ElSpine)& Els) Standard_OVERRIDE; - Standard_EXPORT Handle(Law_Composite) Law (const Handle(ChFiDS_HElSpine)& Els) const; + Standard_EXPORT Handle(Law_Composite) Law (const Handle(ChFiDS_ElSpine)& Els) const; //! returns the elementary law Standard_EXPORT Handle(Law_Function)& ChangeLaw (const TopoDS_Edge& E); @@ -115,9 +109,9 @@ protected: private: - Standard_EXPORT Handle(Law_Composite) ComputeLaw (const Handle(ChFiDS_HElSpine)& Els); + Standard_EXPORT Handle(Law_Composite) ComputeLaw (const Handle(ChFiDS_ElSpine)& Els); - Standard_EXPORT void AppendLaw (const Handle(ChFiDS_HElSpine)& Els); + Standard_EXPORT void AppendLaw (const Handle(ChFiDS_ElSpine)& Els); TColgp_SequenceOfXY parandrad; Law_Laws laws; diff --git a/src/ChFiDS/ChFiDS_HElSpine.hxx b/src/ChFiDS/ChFiDS_HElSpine.hxx deleted file mode 100644 index 721e81012d..0000000000 --- a/src/ChFiDS/ChFiDS_HElSpine.hxx +++ /dev/null @@ -1,97 +0,0 @@ -// Created on: 1993-11-17 -// Created by: Isabelle GRIGNON -// Copyright (c) 1993-1999 Matra Datavision -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - -#ifndef _ChFiDS_HElSpine_HeaderFile -#define _ChFiDS_HElSpine_HeaderFile - -#include -#include - -#include -#include -class Standard_OutOfRange; -class Standard_NoSuchObject; -class Standard_DomainError; -class ChFiDS_ElSpine; -class Adaptor3d_Curve; - - -class ChFiDS_HElSpine; -DEFINE_STANDARD_HANDLE(ChFiDS_HElSpine, Adaptor3d_HCurve) - - -class ChFiDS_HElSpine : public Adaptor3d_HCurve -{ - -public: - - - //! Creates an empty GenHCurve. - Standard_EXPORT ChFiDS_HElSpine(); - - //! Creates a GenHCurve from a Curve - Standard_EXPORT ChFiDS_HElSpine(const ChFiDS_ElSpine& C); - - //! Sets the field of the GenHCurve. - Standard_EXPORT void Set (const ChFiDS_ElSpine& C); - - //! Returns the curve used to create the GenHCurve. - //! This is redefined from HCurve, cannot be inline. - Standard_EXPORT const Adaptor3d_Curve& Curve() const Standard_OVERRIDE; - - //! Returns the curve used to create the GenHCurve. - //! This is redefined from HCurve, cannot be inline. - Standard_EXPORT Adaptor3d_Curve& GetCurve() Standard_OVERRIDE; - - //! Returns the curve used to create the GenHCurve. - ChFiDS_ElSpine& ChangeCurve(); - - - - - DEFINE_STANDARD_RTTI_INLINE(ChFiDS_HElSpine,Adaptor3d_HCurve) - -protected: - - - ChFiDS_ElSpine myCurve; - - -private: - - - - -}; - -#define TheCurve ChFiDS_ElSpine -#define TheCurve_hxx -#define Adaptor3d_GenHCurve ChFiDS_HElSpine -#define Adaptor3d_GenHCurve_hxx -#define Handle_Adaptor3d_GenHCurve Handle(ChFiDS_HElSpine) - -#include - -#undef TheCurve -#undef TheCurve_hxx -#undef Adaptor3d_GenHCurve -#undef Adaptor3d_GenHCurve_hxx -#undef Handle_Adaptor3d_GenHCurve - - - - -#endif // _ChFiDS_HElSpine_HeaderFile diff --git a/src/ChFiDS/ChFiDS_HElSpine_0.cxx b/src/ChFiDS/ChFiDS_HElSpine_0.cxx deleted file mode 100644 index 8ccca9237d..0000000000 --- a/src/ChFiDS/ChFiDS_HElSpine_0.cxx +++ /dev/null @@ -1,42 +0,0 @@ -// Created on: 1993-11-17 -// Created by: Isabelle GRIGNON -// Copyright (c) 1993-1999 Matra Datavision -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - -#include - -#include - -#include -#include -#include -#include -#include - - - - - - - - - - -#define TheCurve ChFiDS_ElSpine -#define TheCurve_hxx -#define Adaptor3d_GenHCurve ChFiDS_HElSpine -#define Adaptor3d_GenHCurve_hxx -#define Handle_Adaptor3d_GenHCurve Handle(ChFiDS_HElSpine) -#include - diff --git a/src/ChFiDS/ChFiDS_ListOfHElSpine.hxx b/src/ChFiDS/ChFiDS_ListOfHElSpine.hxx index e301dfb7fa..920744a072 100644 --- a/src/ChFiDS/ChFiDS_ListOfHElSpine.hxx +++ b/src/ChFiDS/ChFiDS_ListOfHElSpine.hxx @@ -17,11 +17,11 @@ #ifndef ChFiDS_ListOfHElSpine_HeaderFile #define ChFiDS_ListOfHElSpine_HeaderFile -#include +#include #include -typedef NCollection_List ChFiDS_ListOfHElSpine; -typedef NCollection_List::Iterator ChFiDS_ListIteratorOfListOfHElSpine; +typedef NCollection_List ChFiDS_ListOfHElSpine; +typedef NCollection_List::Iterator ChFiDS_ListIteratorOfListOfHElSpine; #endif diff --git a/src/ChFiDS/ChFiDS_Spine.cxx b/src/ChFiDS/ChFiDS_Spine.cxx index 75fb7b10bf..7b721c21a5 100644 --- a/src/ChFiDS/ChFiDS_Spine.cxx +++ b/src/ChFiDS/ChFiDS_Spine.cxx @@ -19,7 +19,7 @@ #include #include #include -#include +#include #include #include #include @@ -97,7 +97,7 @@ ChFiDS_Spine::ChFiDS_Spine(const Standard_Real Tol) //purpose : //======================================================================= -void ChFiDS_Spine::AppendElSpine(const Handle(ChFiDS_HElSpine)& Els) +void ChFiDS_Spine::AppendElSpine(const Handle(ChFiDS_ElSpine)& Els) { elspines.Append(Els); } @@ -107,7 +107,7 @@ void ChFiDS_Spine::AppendElSpine(const Handle(ChFiDS_HElSpine)& Els) //purpose : //======================================================================= -void ChFiDS_Spine::AppendOffsetElSpine(const Handle(ChFiDS_HElSpine)& Els) +void ChFiDS_Spine::AppendOffsetElSpine(const Handle(ChFiDS_ElSpine)& Els) { offset_elspines.Append(Els); } @@ -117,19 +117,19 @@ void ChFiDS_Spine::AppendOffsetElSpine(const Handle(ChFiDS_HElSpine)& Els) //purpose : //======================================================================= -Handle(ChFiDS_HElSpine) ChFiDS_Spine::ElSpine(const TopoDS_Edge& E) const +Handle(ChFiDS_ElSpine) ChFiDS_Spine::ElSpine(const TopoDS_Edge& E) const { return ElSpine(Index(E)); } -Handle(ChFiDS_HElSpine) ChFiDS_Spine::ElSpine(const Standard_Integer IE) const +Handle(ChFiDS_ElSpine) ChFiDS_Spine::ElSpine(const Standard_Integer IE) const { Standard_Real wmil = 0.5 * (FirstParameter(IE) + LastParameter(IE)); if(IsPeriodic()) wmil = ElCLib::InPeriod(wmil,FirstParameter(),LastParameter()); return ElSpine(wmil); } -Handle(ChFiDS_HElSpine) ChFiDS_Spine::ElSpine(const Standard_Real W) const +Handle(ChFiDS_ElSpine) ChFiDS_Spine::ElSpine(const Standard_Real W) const { if (elspines.Extent() == 1) return elspines.First(); @@ -137,12 +137,12 @@ Handle(ChFiDS_HElSpine) ChFiDS_Spine::ElSpine(const Standard_Real W) const { ChFiDS_ListIteratorOfListOfHElSpine It(elspines); for (; It.More(); It.Next()) { - Handle(ChFiDS_HElSpine) cur = It.Value(); + Handle(ChFiDS_ElSpine) cur = It.Value(); Standard_Real uf = cur->FirstParameter(); Standard_Real ul = cur->LastParameter(); if(uf <= W && W <= ul) return cur; } - return Handle(ChFiDS_HElSpine)(); + return Handle(ChFiDS_ElSpine)(); } } diff --git a/src/ChFiDS/ChFiDS_Spine.hxx b/src/ChFiDS/ChFiDS_Spine.hxx index 0e2a41388e..ffc6be8785 100644 --- a/src/ChFiDS/ChFiDS_Spine.hxx +++ b/src/ChFiDS/ChFiDS_Spine.hxx @@ -17,26 +17,20 @@ #ifndef _ChFiDS_Spine_HeaderFile #define _ChFiDS_Spine_HeaderFile -#include -#include - #include -#include -#include -#include -#include -#include -#include -#include #include #include -#include -#include #include #include +#include +#include +#include #include +#include +#include +#include + class TopoDS_Edge; -class ChFiDS_HElSpine; class gp_Lin; class gp_Circ; class TopoDS_Vertex; @@ -108,15 +102,15 @@ public: //! section of free border or forms a closed contour void SetLastStatus (const ChFiDS_State S); - Standard_EXPORT virtual void AppendElSpine (const Handle(ChFiDS_HElSpine)& Els); + Standard_EXPORT virtual void AppendElSpine (const Handle(ChFiDS_ElSpine)& Els); - Standard_EXPORT virtual void AppendOffsetElSpine (const Handle(ChFiDS_HElSpine)& Els); + Standard_EXPORT virtual void AppendOffsetElSpine (const Handle(ChFiDS_ElSpine)& Els); - Standard_EXPORT Handle(ChFiDS_HElSpine) ElSpine (const Standard_Integer IE) const; + Standard_EXPORT Handle(ChFiDS_ElSpine) ElSpine (const Standard_Integer IE) const; - Standard_EXPORT Handle(ChFiDS_HElSpine) ElSpine (const TopoDS_Edge& E) const; + Standard_EXPORT Handle(ChFiDS_ElSpine) ElSpine (const TopoDS_Edge& E) const; - Standard_EXPORT Handle(ChFiDS_HElSpine) ElSpine (const Standard_Real W) const; + Standard_EXPORT Handle(ChFiDS_ElSpine) ElSpine (const Standard_Real W) const; Standard_EXPORT ChFiDS_ListOfHElSpine& ChangeElSpines(); diff --git a/src/ChFiDS/FILES b/src/ChFiDS/FILES index cee9b7aba5..c4ea1e706f 100644 --- a/src/ChFiDS/FILES +++ b/src/ChFiDS/FILES @@ -15,8 +15,6 @@ ChFiDS_FaceInterference.lxx ChFiDS_FilSpine.cxx ChFiDS_FilSpine.hxx ChFiDS_HData.hxx -ChFiDS_HElSpine.hxx -ChFiDS_HElSpine_0.cxx ChFiDS_IndexedDataMapOfVertexListOfStripe.hxx ChFiDS_ListIteratorOfListOfHElSpine.hxx ChFiDS_ListIteratorOfListOfStripe.hxx diff --git a/src/ChFiKPart/ChFiKPart_ComputeData.cxx b/src/ChFiKPart/ChFiKPart_ComputeData.cxx index efd8213bfe..1071c71b20 100644 --- a/src/ChFiKPart/ChFiKPart_ComputeData.cxx +++ b/src/ChFiKPart/ChFiKPart_ComputeData.cxx @@ -15,8 +15,8 @@ // commercial license or contractual agreement. -#include -#include +#include +#include #include #include #include @@ -84,7 +84,7 @@ #include //#include -//#include +//#include //======================================================================= //function : Compute //purpose : @@ -92,8 +92,8 @@ Standard_Boolean ChFiKPart_ComputeData::Compute (TopOpeBRepDS_DataStructure& DStr, Handle(ChFiDS_SurfData)& Data, - const Handle(Adaptor3d_HSurface)& S1, - const Handle(Adaptor3d_HSurface)& S2, + const Handle(Adaptor3d_Surface)& S1, + const Handle(Adaptor3d_Surface)& S2, const TopAbs_Orientation Or1, const TopAbs_Orientation Or2, const Handle(ChFiDS_Spine)& Sp, @@ -115,10 +115,10 @@ // Return orientations. TopAbs_Orientation OrFace1 = TopAbs_FORWARD, OrFace2 = TopAbs_FORWARD; - Handle(BRepAdaptor_HSurface) HS = Handle(BRepAdaptor_HSurface)::DownCast(S1); - if (!HS.IsNull()) OrFace1 = HS->ChangeSurface().Face().Orientation(); - HS = Handle(BRepAdaptor_HSurface)::DownCast(S2); - if (!HS.IsNull()) OrFace2 = HS->ChangeSurface().Face().Orientation(); + Handle(BRepAdaptor_Surface) HS = Handle(BRepAdaptor_Surface)::DownCast(S1); + if (!HS.IsNull()) OrFace1 = HS->Face().Orientation(); + HS = Handle(BRepAdaptor_Surface)::DownCast(S2); + if (!HS.IsNull()) OrFace2 = HS->Face().Orientation(); if(!Spine.IsNull()){ Standard_Real Radius = Spine->Radius(Iedge); @@ -343,8 +343,8 @@ Standard_Boolean ChFiKPart_ComputeData::ComputeCorner (TopOpeBRepDS_DataStructure& DStr, const Handle(ChFiDS_SurfData)& Data, - const Handle(Adaptor3d_HSurface)& S1, - const Handle(Adaptor3d_HSurface)& S2, + const Handle(Adaptor3d_Surface)& S1, + const Handle(Adaptor3d_Surface)& S2, const TopAbs_Orientation OrFace1, const TopAbs_Orientation, const TopAbs_Orientation Or1, @@ -408,8 +408,8 @@ Standard_Boolean ChFiKPart_ComputeData::ComputeCorner Standard_Boolean ChFiKPart_ComputeData::ComputeCorner (TopOpeBRepDS_DataStructure& DStr, const Handle(ChFiDS_SurfData)& Data, - const Handle(Adaptor3d_HSurface)& S1, - const Handle(Adaptor3d_HSurface)& S2, + const Handle(Adaptor3d_Surface)& S1, + const Handle(Adaptor3d_Surface)& S2, const TopAbs_Orientation OrFace1, const TopAbs_Orientation OrFace2, const TopAbs_Orientation Or1, @@ -430,9 +430,9 @@ Standard_Boolean ChFiKPart_ComputeData::ComputeCorner Standard_Boolean ChFiKPart_ComputeData::ComputeCorner (TopOpeBRepDS_DataStructure& DStr, const Handle(ChFiDS_SurfData)& Data, - const Handle(Adaptor3d_HSurface)& S, - const Handle(Adaptor3d_HSurface)& S1, - const Handle(Adaptor3d_HSurface)& S2, + const Handle(Adaptor3d_Surface)& S, + const Handle(Adaptor3d_Surface)& S1, + const Handle(Adaptor3d_Surface)& S2, const TopAbs_Orientation OfS, const TopAbs_Orientation OS, const TopAbs_Orientation OS1, diff --git a/src/ChFiKPart/ChFiKPart_ComputeData.hxx b/src/ChFiKPart/ChFiKPart_ComputeData.hxx index 7c14d98f12..4d2e111f7c 100644 --- a/src/ChFiKPart/ChFiKPart_ComputeData.hxx +++ b/src/ChFiKPart/ChFiKPart_ComputeData.hxx @@ -17,17 +17,11 @@ #ifndef _ChFiKPart_ComputeData_HeaderFile #define _ChFiKPart_ComputeData_HeaderFile -#include -#include -#include - -#include +#include #include -#include -#include + class TopOpeBRepDS_DataStructure; class ChFiDS_SurfData; -class Adaptor3d_HSurface; class ChFiDS_Spine; class gp_Pnt2d; @@ -49,16 +43,16 @@ public: //! Computes a simple fillet in several particular //! cases. - Standard_EXPORT static Standard_Boolean Compute (TopOpeBRepDS_DataStructure& DStr, Handle(ChFiDS_SurfData)& Data, const Handle(Adaptor3d_HSurface)& S1, const Handle(Adaptor3d_HSurface)& S2, const TopAbs_Orientation Or1, const TopAbs_Orientation Or2, const Handle(ChFiDS_Spine)& Sp, const Standard_Integer Iedge); + Standard_EXPORT static Standard_Boolean Compute (TopOpeBRepDS_DataStructure& DStr, Handle(ChFiDS_SurfData)& Data, const Handle(Adaptor3d_Surface)& S1, const Handle(Adaptor3d_Surface)& S2, const TopAbs_Orientation Or1, const TopAbs_Orientation Or2, const Handle(ChFiDS_Spine)& Sp, const Standard_Integer Iedge); //! Computes a toric or spheric corner fillet. - Standard_EXPORT static Standard_Boolean ComputeCorner (TopOpeBRepDS_DataStructure& DStr, const Handle(ChFiDS_SurfData)& Data, const Handle(Adaptor3d_HSurface)& S1, const Handle(Adaptor3d_HSurface)& S2, const TopAbs_Orientation OrFace1, const TopAbs_Orientation OrFace2, const TopAbs_Orientation Or1, const TopAbs_Orientation Or2, const Standard_Real minRad, const Standard_Real majRad, const gp_Pnt2d& P1S1, const gp_Pnt2d& P2S1, const gp_Pnt2d& P1S2, const gp_Pnt2d& P2S2); + Standard_EXPORT static Standard_Boolean ComputeCorner (TopOpeBRepDS_DataStructure& DStr, const Handle(ChFiDS_SurfData)& Data, const Handle(Adaptor3d_Surface)& S1, const Handle(Adaptor3d_Surface)& S2, const TopAbs_Orientation OrFace1, const TopAbs_Orientation OrFace2, const TopAbs_Orientation Or1, const TopAbs_Orientation Or2, const Standard_Real minRad, const Standard_Real majRad, const gp_Pnt2d& P1S1, const gp_Pnt2d& P2S1, const gp_Pnt2d& P1S2, const gp_Pnt2d& P2S2); //! Computes spheric corner fillet with non iso pcurve on S2. - Standard_EXPORT static Standard_Boolean ComputeCorner (TopOpeBRepDS_DataStructure& DStr, const Handle(ChFiDS_SurfData)& Data, const Handle(Adaptor3d_HSurface)& S1, const Handle(Adaptor3d_HSurface)& S2, const TopAbs_Orientation OrFace1, const TopAbs_Orientation OrFace2, const TopAbs_Orientation Or1, const TopAbs_Orientation Or2, const Standard_Real Rad, const gp_Pnt2d& PS1, const gp_Pnt2d& P1S2, const gp_Pnt2d& P2S2); + Standard_EXPORT static Standard_Boolean ComputeCorner (TopOpeBRepDS_DataStructure& DStr, const Handle(ChFiDS_SurfData)& Data, const Handle(Adaptor3d_Surface)& S1, const Handle(Adaptor3d_Surface)& S2, const TopAbs_Orientation OrFace1, const TopAbs_Orientation OrFace2, const TopAbs_Orientation Or1, const TopAbs_Orientation Or2, const Standard_Real Rad, const gp_Pnt2d& PS1, const gp_Pnt2d& P1S2, const gp_Pnt2d& P2S2); //! Computes a toric corner rotule. - Standard_EXPORT static Standard_Boolean ComputeCorner (TopOpeBRepDS_DataStructure& DStr, const Handle(ChFiDS_SurfData)& Data, const Handle(Adaptor3d_HSurface)& S, const Handle(Adaptor3d_HSurface)& S1, const Handle(Adaptor3d_HSurface)& S2, const TopAbs_Orientation OfS, const TopAbs_Orientation OS, const TopAbs_Orientation OS1, const TopAbs_Orientation OS2, const Standard_Real Radius); + Standard_EXPORT static Standard_Boolean ComputeCorner (TopOpeBRepDS_DataStructure& DStr, const Handle(ChFiDS_SurfData)& Data, const Handle(Adaptor3d_Surface)& S, const Handle(Adaptor3d_Surface)& S1, const Handle(Adaptor3d_Surface)& S2, const TopAbs_Orientation OfS, const TopAbs_Orientation OS, const TopAbs_Orientation OS1, const TopAbs_Orientation OS2, const Standard_Real Radius); diff --git a/src/ChFiKPart/ChFiKPart_ComputeData_CS.cxx b/src/ChFiKPart/ChFiKPart_ComputeData_CS.cxx index 93ff9eef89..e412047077 100644 --- a/src/ChFiKPart/ChFiKPart_ComputeData_CS.cxx +++ b/src/ChFiKPart/ChFiKPart_ComputeData_CS.cxx @@ -22,8 +22,8 @@ #include -void ChFiKPart_CornerSpine(const Handle(Adaptor3d_HSurface)& S1, - const Handle(Adaptor3d_HSurface)& S2, +void ChFiKPart_CornerSpine(const Handle(Adaptor3d_Surface)& S1, + const Handle(Adaptor3d_Surface)& S2, const gp_Pnt2d& P1S1, const gp_Pnt2d& /*P2S1*/, const gp_Pnt2d& P1S2, diff --git a/src/ChFiKPart/ChFiKPart_ComputeData_CS.hxx b/src/ChFiKPart/ChFiKPart_ComputeData_CS.hxx index 9407c69fd0..6f1c1dd1bb 100644 --- a/src/ChFiKPart/ChFiKPart_ComputeData_CS.hxx +++ b/src/ChFiKPart/ChFiKPart_ComputeData_CS.hxx @@ -14,7 +14,7 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#include +#include #include #include #include @@ -23,8 +23,8 @@ #define ChFiKPart_ComputeData_CS_HeaderFile -void ChFiKPart_CornerSpine(const Handle(Adaptor3d_HSurface)& S1, - const Handle(Adaptor3d_HSurface)& S2, +void ChFiKPart_CornerSpine(const Handle(Adaptor3d_Surface)& S1, + const Handle(Adaptor3d_Surface)& S2, const gp_Pnt2d& P1S1, const gp_Pnt2d& P2S1, const gp_Pnt2d& P1S2, diff --git a/src/ChFiKPart/ChFiKPart_ComputeData_ChAsymPlnCon.cxx b/src/ChFiKPart/ChFiKPart_ComputeData_ChAsymPlnCon.cxx index af36c56713..508edc3602 100644 --- a/src/ChFiKPart/ChFiKPart_ComputeData_ChAsymPlnCon.cxx +++ b/src/ChFiKPart/ChFiKPart_ComputeData_ChAsymPlnCon.cxx @@ -15,7 +15,7 @@ // commercial license or contractual agreement. -#include +#include #include #include #include diff --git a/src/ChFiKPart/ChFiKPart_ComputeData_ChAsymPlnCyl.cxx b/src/ChFiKPart/ChFiKPart_ComputeData_ChAsymPlnCyl.cxx index dd5168c579..66dd749286 100644 --- a/src/ChFiKPart/ChFiKPart_ComputeData_ChAsymPlnCyl.cxx +++ b/src/ChFiKPart/ChFiKPart_ComputeData_ChAsymPlnCyl.cxx @@ -15,7 +15,7 @@ // commercial license or contractual agreement. -#include +#include #include #include #include diff --git a/src/ChFiKPart/ChFiKPart_ComputeData_ChAsymPlnPln.cxx b/src/ChFiKPart/ChFiKPart_ComputeData_ChAsymPlnPln.cxx index 831f3e6a9c..2b8b0c6804 100644 --- a/src/ChFiKPart/ChFiKPart_ComputeData_ChAsymPlnPln.cxx +++ b/src/ChFiKPart/ChFiKPart_ComputeData_ChAsymPlnPln.cxx @@ -15,7 +15,7 @@ // commercial license or contractual agreement. -#include +#include #include #include #include diff --git a/src/ChFiKPart/ChFiKPart_ComputeData_ChPlnCon.cxx b/src/ChFiKPart/ChFiKPart_ComputeData_ChPlnCon.cxx index 7388f9adb6..06d8495a18 100644 --- a/src/ChFiKPart/ChFiKPart_ComputeData_ChPlnCon.cxx +++ b/src/ChFiKPart/ChFiKPart_ComputeData_ChPlnCon.cxx @@ -15,7 +15,7 @@ // commercial license or contractual agreement. -#include +#include #include #include #include diff --git a/src/ChFiKPart/ChFiKPart_ComputeData_ChPlnCyl.cxx b/src/ChFiKPart/ChFiKPart_ComputeData_ChPlnCyl.cxx index 3f5ee31726..d25517b695 100644 --- a/src/ChFiKPart/ChFiKPart_ComputeData_ChPlnCyl.cxx +++ b/src/ChFiKPart/ChFiKPart_ComputeData_ChPlnCyl.cxx @@ -15,7 +15,7 @@ // commercial license or contractual agreement. -#include +#include #include #include #include diff --git a/src/ChFiKPart/ChFiKPart_ComputeData_ChPlnPln.cxx b/src/ChFiKPart/ChFiKPart_ComputeData_ChPlnPln.cxx index ec66eb3f28..eff926a9bb 100644 --- a/src/ChFiKPart/ChFiKPart_ComputeData_ChPlnPln.cxx +++ b/src/ChFiKPart/ChFiKPart_ComputeData_ChPlnPln.cxx @@ -15,7 +15,7 @@ // commercial license or contractual agreement. -#include +#include #include #include #include diff --git a/src/ChFiKPart/ChFiKPart_ComputeData_Fcts.cxx b/src/ChFiKPart/ChFiKPart_ComputeData_Fcts.cxx index 0165d0b71d..dd6e85c150 100644 --- a/src/ChFiKPart/ChFiKPart_ComputeData_Fcts.cxx +++ b/src/ChFiKPart/ChFiKPart_ComputeData_Fcts.cxx @@ -29,8 +29,8 @@ #include -#include -#include +#include +#include @@ -88,8 +88,8 @@ void ChFiKPart_ProjPC(const GeomAdaptor_Curve& Cg, Handle(Geom2d_Curve)& Pcurv) { if (Sg.GetType() < GeomAbs_BezierSurface) { - Handle(GeomAdaptor_HCurve) HCg = new GeomAdaptor_HCurve(Cg); - Handle(GeomAdaptor_HSurface) HSg = new GeomAdaptor_HSurface(Sg); + Handle(GeomAdaptor_Curve) HCg = new GeomAdaptor_Curve(Cg); + Handle(GeomAdaptor_Surface) HSg = new GeomAdaptor_Surface(Sg); ProjLib_ProjectedCurve Projc (HSg,HCg); switch (Projc.GetType()) { case GeomAbs_Line : diff --git a/src/ChFiKPart/ChFiKPart_ComputeData_FilPlnCon.cxx b/src/ChFiKPart/ChFiKPart_ComputeData_FilPlnCon.cxx index ab707e082f..ca0df400fb 100644 --- a/src/ChFiKPart/ChFiKPart_ComputeData_FilPlnCon.cxx +++ b/src/ChFiKPart/ChFiKPart_ComputeData_FilPlnCon.cxx @@ -15,7 +15,7 @@ // commercial license or contractual agreement. -#include +#include #include #include #include diff --git a/src/ChFiKPart/ChFiKPart_ComputeData_FilPlnCyl.cxx b/src/ChFiKPart/ChFiKPart_ComputeData_FilPlnCyl.cxx index 6405767fc3..4090e7a9ba 100644 --- a/src/ChFiKPart/ChFiKPart_ComputeData_FilPlnCyl.cxx +++ b/src/ChFiKPart/ChFiKPart_ComputeData_FilPlnCyl.cxx @@ -15,7 +15,7 @@ // commercial license or contractual agreement. -#include +#include #include #include #include diff --git a/src/ChFiKPart/ChFiKPart_ComputeData_FilPlnPln.cxx b/src/ChFiKPart/ChFiKPart_ComputeData_FilPlnPln.cxx index cf7a499565..096dc16dd7 100644 --- a/src/ChFiKPart/ChFiKPart_ComputeData_FilPlnPln.cxx +++ b/src/ChFiKPart/ChFiKPart_ComputeData_FilPlnPln.cxx @@ -15,7 +15,7 @@ // commercial license or contractual agreement. -#include +#include #include #include #include diff --git a/src/ChFiKPart/ChFiKPart_ComputeData_Rotule.cxx b/src/ChFiKPart/ChFiKPart_ComputeData_Rotule.cxx index 40c38ad21d..2e12faab80 100644 --- a/src/ChFiKPart/ChFiKPart_ComputeData_Rotule.cxx +++ b/src/ChFiKPart/ChFiKPart_ComputeData_Rotule.cxx @@ -15,7 +15,7 @@ // commercial license or contractual agreement. -#include +#include #include #include #include diff --git a/src/ChFiKPart/ChFiKPart_ComputeData_Sphere.cxx b/src/ChFiKPart/ChFiKPart_ComputeData_Sphere.cxx index 55e74015e3..e5ec4776af 100644 --- a/src/ChFiKPart/ChFiKPart_ComputeData_Sphere.cxx +++ b/src/ChFiKPart/ChFiKPart_ComputeData_Sphere.cxx @@ -15,7 +15,7 @@ // commercial license or contractual agreement. -#include +#include #include #include #include @@ -47,8 +47,8 @@ //======================================================================= Standard_Boolean ChFiKPart_Sphere(TopOpeBRepDS_DataStructure& DStr, const Handle(ChFiDS_SurfData)& Data, - const Handle(Adaptor3d_HSurface)& S1, - const Handle(Adaptor3d_HSurface)& S2, + const Handle(Adaptor3d_Surface)& S1, + const Handle(Adaptor3d_Surface)& S2, const TopAbs_Orientation OrFace1, const TopAbs_Orientation /*OrFace2*/, const TopAbs_Orientation Or1, diff --git a/src/ChFiKPart/ChFiKPart_ComputeData_Sphere.hxx b/src/ChFiKPart/ChFiKPart_ComputeData_Sphere.hxx index dfc5e5de4d..a21740fe34 100644 --- a/src/ChFiKPart/ChFiKPart_ComputeData_Sphere.hxx +++ b/src/ChFiKPart/ChFiKPart_ComputeData_Sphere.hxx @@ -20,8 +20,8 @@ Standard_Boolean ChFiKPart_Sphere (TopOpeBRepDS_DataStructure& DStr, const Handle(ChFiDS_SurfData)& Data, - const Handle(Adaptor3d_HSurface)& S1, - const Handle(Adaptor3d_HSurface)& S2, + const Handle(Adaptor3d_Surface)& S1, + const Handle(Adaptor3d_Surface)& S2, const TopAbs_Orientation OrFace1, const TopAbs_Orientation OrFace2, const TopAbs_Orientation Or1, diff --git a/src/ChFiKPart/ChFiKPart_RstMap.hxx b/src/ChFiKPart/ChFiKPart_RstMap.hxx index 6a4f60d18b..094a46cf5c 100644 --- a/src/ChFiKPart/ChFiKPart_RstMap.hxx +++ b/src/ChFiKPart/ChFiKPart_RstMap.hxx @@ -18,12 +18,12 @@ #define ChFiKPart_RstMap_HeaderFile #include -#include +#include #include #include -typedef NCollection_DataMap ChFiKPart_RstMap; -typedef NCollection_DataMap::Iterator ChFiKPart_DataMapIteratorOfRstMap; +typedef NCollection_DataMap ChFiKPart_RstMap; +typedef NCollection_DataMap::Iterator ChFiKPart_DataMapIteratorOfRstMap; #endif diff --git a/src/Contap/Contap_ArcFunction.cxx b/src/Contap/Contap_ArcFunction.cxx index d23ec05e3c..7b1dd96759 100644 --- a/src/Contap/Contap_ArcFunction.cxx +++ b/src/Contap/Contap_ArcFunction.cxx @@ -15,8 +15,8 @@ // commercial license or contractual agreement. -#include -#include +#include +#include #include #include #include @@ -34,7 +34,7 @@ myCosAng(0.0) } -void Contap_ArcFunction::Set(const Handle(Adaptor3d_HSurface)& S) +void Contap_ArcFunction::Set(const Handle(Adaptor3d_Surface)& S) { mySurf = S; Standard_Integer i; diff --git a/src/Contap/Contap_ArcFunction.hxx b/src/Contap/Contap_ArcFunction.hxx index c121888564..a9acd69523 100644 --- a/src/Contap/Contap_ArcFunction.hxx +++ b/src/Contap/Contap_ArcFunction.hxx @@ -17,26 +17,13 @@ #ifndef _Contap_ArcFunction_HeaderFile #define _Contap_ArcFunction_HeaderFile -#include -#include -#include - -#include +#include #include #include #include #include #include #include -#include -#include -class Adaptor2d_HCurve2d; -class Adaptor3d_HSurface; -class gp_Dir; -class gp_Pnt; -class IntSurf_Quadric; - - class Contap_ArcFunction : public math_FunctionWithDerivative { @@ -47,7 +34,7 @@ public: Standard_EXPORT Contap_ArcFunction(); - Standard_EXPORT void Set (const Handle(Adaptor3d_HSurface)& S); + Standard_EXPORT void Set (const Handle(Adaptor3d_Surface)& S); void Set (const gp_Dir& Direction); @@ -57,7 +44,7 @@ public: void Set (const gp_Pnt& Eye, const Standard_Real Angle); - void Set (const Handle(Adaptor2d_HCurve2d)& A); + void Set (const Handle(Adaptor2d_Curve2d)& A); Standard_EXPORT Standard_Boolean Value (const Standard_Real X, Standard_Real& F) Standard_OVERRIDE; @@ -74,7 +61,7 @@ public: Standard_EXPORT const IntSurf_Quadric& Quadric() const; //! Returns mySurf field - const Handle(Adaptor3d_HSurface)& Surface() const; + const Handle(Adaptor3d_Surface)& Surface() const; //! Returns the point, which has been computed //! while the last calling Value() method @@ -91,8 +78,8 @@ private: - Handle(Adaptor2d_HCurve2d) myArc; - Handle(Adaptor3d_HSurface) mySurf; + Handle(Adaptor2d_Curve2d) myArc; + Handle(Adaptor3d_Surface) mySurf; Standard_Real myMean; Contap_TFunction myType; gp_Dir myDir; diff --git a/src/Contap/Contap_ArcFunction.lxx b/src/Contap/Contap_ArcFunction.lxx index 91c9a32051..bb946f320e 100644 --- a/src/Contap/Contap_ArcFunction.lxx +++ b/src/Contap/Contap_ArcFunction.lxx @@ -42,7 +42,7 @@ inline void Contap_ArcFunction::Set(const gp_Pnt& Eye) myEye = Eye; } -inline void Contap_ArcFunction::Set(const Handle(Adaptor2d_HCurve2d)& A) +inline void Contap_ArcFunction::Set(const Handle(Adaptor2d_Curve2d)& A) { myArc = A; seqpt.Clear(); @@ -54,7 +54,7 @@ inline const gp_Pnt& Contap_ArcFunction::Valpoint return seqpt(Index); } -inline const Handle(Adaptor3d_HSurface)& Contap_ArcFunction::Surface() const +inline const Handle(Adaptor3d_Surface)& Contap_ArcFunction::Surface() const { return(mySurf); } diff --git a/src/Contap/Contap_Contour.cxx b/src/Contap/Contap_Contour.cxx index 69da6b95c5..870e38fe9b 100644 --- a/src/Contap/Contap_Contour.cxx +++ b/src/Contap/Contap_Contour.cxx @@ -15,7 +15,7 @@ // commercial license or contractual agreement. -#include +#include #include #include #include @@ -79,7 +79,7 @@ done(Standard_False),modeset(Standard_True) } -Contap_Contour::Contap_Contour (const Handle(Adaptor3d_HSurface)& Surf, +Contap_Contour::Contap_Contour (const Handle(Adaptor3d_Surface)& Surf, const Handle(Adaptor3d_TopolTool)& Domain, const gp_Vec& Direction) : @@ -89,7 +89,7 @@ done(Standard_False),modeset(Standard_True) } -Contap_Contour::Contap_Contour (const Handle(Adaptor3d_HSurface)& Surf, +Contap_Contour::Contap_Contour (const Handle(Adaptor3d_Surface)& Surf, const Handle(Adaptor3d_TopolTool)& Domain, const gp_Vec& Direction, const Standard_Real Angle) : @@ -100,7 +100,7 @@ done(Standard_False),modeset(Standard_True) } -Contap_Contour::Contap_Contour (const Handle(Adaptor3d_HSurface)& Surf, +Contap_Contour::Contap_Contour (const Handle(Adaptor3d_Surface)& Surf, const Handle(Adaptor3d_TopolTool)& Domain, const gp_Pnt& Eye) : @@ -138,7 +138,7 @@ void Contap_Contour::Init (const gp_Pnt& Eye) } -void Contap_Contour::Perform (const Handle(Adaptor3d_HSurface)& Surf, +void Contap_Contour::Perform (const Handle(Adaptor3d_Surface)& Surf, const Handle(Adaptor3d_TopolTool)& Domain) { if (!modeset) {throw Standard_ConstructionError();} @@ -166,7 +166,7 @@ void Contap_Contour::Perform (const Handle(Adaptor3d_HSurface)& Surf, } -void Contap_Contour::Perform (const Handle(Adaptor3d_HSurface)& Surf, +void Contap_Contour::Perform (const Handle(Adaptor3d_Surface)& Surf, const Handle(Adaptor3d_TopolTool)& Domain, const gp_Vec& Direction) @@ -175,7 +175,7 @@ void Contap_Contour::Perform (const Handle(Adaptor3d_HSurface)& Surf, Perform(Surf,Domain); } -void Contap_Contour::Perform (const Handle(Adaptor3d_HSurface)& Surf, +void Contap_Contour::Perform (const Handle(Adaptor3d_Surface)& Surf, const Handle(Adaptor3d_TopolTool)& Domain, const gp_Vec& Direction, const Standard_Real Angle) @@ -186,7 +186,7 @@ void Contap_Contour::Perform (const Handle(Adaptor3d_HSurface)& Surf, } -void Contap_Contour::Perform (const Handle(Adaptor3d_HSurface)& Surf, +void Contap_Contour::Perform (const Handle(Adaptor3d_Surface)& Surf, const Handle(Adaptor3d_TopolTool)& Domain, const gp_Pnt& Eye) @@ -235,7 +235,7 @@ static void ProcessSegments (const Contap_TheSearch&, //-- Recherche des portions utiles sur les lignes -static void Recadre(const Handle(Adaptor3d_HSurface)& myHS1, +static void Recadre(const Handle(Adaptor3d_Surface)& myHS1, Standard_Real& u1, Standard_Real& v1) { Standard_Real f,l,lmf; @@ -282,7 +282,7 @@ static void Recadre(const Handle(Adaptor3d_HSurface)& myHS1, static void LineConstructor(Contap_TheSequenceOfLine& slin, const Handle(Adaptor3d_TopolTool)& Domain, Contap_Line& L, - const Handle(Adaptor3d_HSurface)& Surf) { + const Handle(Adaptor3d_Surface)& Surf) { //-- ------------------------------------------------------------ //-- on decoupe la ligne en portions entre 2 vertex @@ -478,7 +478,7 @@ static void KeepInsidePoints(const Contap_TheSearchInside& solins, Standard_Real U,V,paramproj; gp_Pnt2d toproj,Ptproj; Standard_Boolean projok,tokeep; - const Handle(Adaptor3d_HSurface)& Surf = Func.Surface(); + const Handle(Adaptor3d_Surface)& Surf = Func.Surface(); Nbp = solins.NbPoints(); for (indp=1; indp <= Nbp; indp++) { @@ -487,7 +487,7 @@ static void KeepInsidePoints(const Contap_TheSearchInside& solins, pti.Parameters(U,V); toproj = gp_Pnt2d(U,V); for (inda = 1; inda <= Nba; inda++) { - const Handle(Adaptor2d_HCurve2d)& thearc = solrst.Segment(inda).Curve(); + const Handle(Adaptor2d_Curve2d)& thearc = solrst.Segment(inda).Curve(); projok = Contap_HContTool::Project(thearc,toproj,paramproj,Ptproj); if (projok) { gp_Pnt pprojete = Adaptor3d_HSurfaceTool::Value(Surf,Ptproj.X(),Ptproj.Y()); @@ -530,14 +530,14 @@ static void ComputeTangency (const Contap_TheSearch& solrst, gp_Pnt2d pt2d; IntSurf_PathPoint PPoint; - const Handle(Adaptor3d_HSurface)& Surf = Func.Surface(); + const Handle(Adaptor3d_Surface)& Surf = Func.Surface(); for (i=1; i<= NbPoints; i++) { if (Destination(i) == 0) { const Contap_ThePathPointOfTheSearch& PStart = solrst.Point(i); - const Handle(Adaptor2d_HCurve2d)& thearc = PStart.Arc(); + const Handle(Adaptor2d_Curve2d)& thearc = PStart.Arc(); theparam = PStart.Parameter(); gp_Pnt2d Ptoproj=Contap_HCurve2dTool::Value(thearc,theparam); //-- lbr le 15 mai 97 @@ -546,7 +546,7 @@ static void ComputeTangency (const Contap_TheSearch& solrst, for(Standard_Integer restriction=1; SurUneRestrictionSolution==Standard_False && restriction<=solrst.NbSegments(); restriction++) { - const Handle(Adaptor2d_HCurve2d)& thearcsol = solrst.Segment(restriction).Curve(); + const Handle(Adaptor2d_Curve2d)& thearcsol = solrst.Segment(restriction).Curve(); Standard_Real paramproj; gp_Pnt2d pproj; Standard_Boolean projok = Contap_HContTool::Project(thearcsol,Ptoproj,paramproj,pproj); @@ -582,7 +582,7 @@ static void ComputeTangency (const Contap_TheSearch& solrst, if (!PStart2.IsNew()) { const Handle(Adaptor3d_HVertex)& vtx2 = PStart2.Vertex(); if (Domain->Identical(vtx,vtx2)) { - const Handle(Adaptor2d_HCurve2d)& thearc2 = PStart2.Arc(); + const Handle(Adaptor2d_Curve2d)& thearc2 = PStart2.Arc(); theparam = PStart2.Parameter(); arcorien = Domain->Orientation(thearc2); ispassing = ispassing && (arcorien == TopAbs_INTERNAL || @@ -676,7 +676,7 @@ static void ComputeTangency (const Contap_TheSearch& solrst, if (!PStart2.IsNew()) { const Handle(Adaptor3d_HVertex)& vtx2 = PStart2.Vertex(); if (Domain->Identical(PStart.Vertex(),vtx2)) { - const Handle(Adaptor2d_HCurve2d)& thearc2 = PStart2.Arc(); + const Handle(Adaptor2d_Curve2d)& thearc2 = PStart2.Arc(); theparam = PStart2.Parameter(); arcorien = Domain->Orientation(thearc2); @@ -745,7 +745,7 @@ static void ComputeTangency (const Contap_TheSearch& solrst, for (k=i; k <=NbPoints ; k++) { if (Destination(k)==seqlength + 1) { theparam = solrst.Point(k).Parameter(); - const Handle(Adaptor2d_HCurve2d)& thearc2 = solrst.Point(k).Arc(); + const Handle(Adaptor2d_Curve2d)& thearc2 = solrst.Point(k).Arc(); arcorien = Domain->Orientation(thearc2); if (arcorien == TopAbs_FORWARD || @@ -865,7 +865,7 @@ void ProcessSegments (const Contap_TheSearch& solrst, Standard_Integer nbedg = solrst.NbSegments(); Standard_Integer Nblines,Nbpts; - Handle(Adaptor2d_HCurve2d) arcRef; + Handle(Adaptor2d_Curve2d) arcRef; Contap_Point ptvtx; Contap_ThePathPointOfTheSearch PStartf,PStartl; @@ -1022,9 +1022,9 @@ void ComputeInternalPointsOnRstr return; } - const Handle(Adaptor2d_HCurve2d)& thearc = Line.Arc(); + const Handle(Adaptor2d_Curve2d)& thearc = Line.Arc(); - const Handle(Adaptor3d_HSurface)& Surf = SFunc.Surface(); + const Handle(Adaptor3d_Surface)& Surf = SFunc.Surface(); Contap_TFunction TypeFunc(SFunc.FunctionType()); Standard_Integer Nbpnts = Contap_HContTool::NbSamplesOnArc(thearc); @@ -1173,7 +1173,7 @@ void ComputeInternalPoints } Standard_Integer Nbpnts = Line.NbPnts(); - const Handle(Adaptor3d_HSurface)& Surf = SFunc.Surface(); + const Handle(Adaptor3d_Surface)& Surf = SFunc.Surface(); Contap_TFunction TypeFunc(SFunc.FunctionType()); toler(1) = ureso; //-- Trop long !!! Adaptor3d_HSurfaceTool::UResolution(Surf,SFunc.Tolerance()); @@ -1388,7 +1388,7 @@ void Contap_Contour::Perform // Standard_Real TolArc = 1.e-5; Standard_Real TolArc = Precision::Confusion(); - const Handle(Adaptor3d_HSurface)& Surf = mySFunc.Surface(); + const Handle(Adaptor3d_Surface)& Surf = mySFunc.Surface(); Standard_Real EpsU = Adaptor3d_HSurfaceTool::UResolution(Surf,Precision::Confusion()); Standard_Real EpsV = Adaptor3d_HSurfaceTool::VResolution(Surf,Precision::Confusion()); @@ -1418,7 +1418,7 @@ void Contap_Contour::Perform Box1OK = Standard_False; } else { - BndLib_AddSurface::Add(Surf->Surface(),1e-8,B1); + BndLib_AddSurface::Add (*Surf, 1e-8, B1); } Standard_Real x0,y0,z0,x1,y1,z1,dx,dy,dz; if(Box1OK) { @@ -1469,7 +1469,7 @@ void Contap_Contour::Perform //IFV begin if(solrst.NbSegments() <= 0) { if(mySFunc.FunctionType() == Contap_ContourStd) { - const Handle(Adaptor3d_HSurface)& SurfToCheck = mySFunc.Surface(); + const Handle(Adaptor3d_Surface)& SurfToCheck = mySFunc.Surface(); if(Adaptor3d_HSurfaceTool::GetType(SurfToCheck) == GeomAbs_Torus) { gp_Torus aTor = Adaptor3d_HSurfaceTool::Torus(SurfToCheck); gp_Dir aTorDir = aTor.Axis().Direction(); @@ -1534,7 +1534,7 @@ void Contap_Contour::Perform ptdeb.SetParameter(1.0); const Contap_ThePathPointOfTheSearch& PStart = solrst.Point(i); - const Handle(Adaptor2d_HCurve2d)& currentarc = PStart.Arc(); + const Handle(Adaptor2d_Curve2d)& currentarc = PStart.Arc(); currentparam = PStart.Parameter(); if (!iwline->IsTangentAtBegining()) { @@ -1581,7 +1581,7 @@ void Contap_Contour::Perform ptfin.SetValue(PPoint.Value(),U,V); ptfin.SetParameter((Standard_Real)(Nbpts)); const Contap_ThePathPointOfTheSearch& PStart = solrst.Point(i); - const Handle(Adaptor2d_HCurve2d)& currentarc = PStart.Arc(); + const Handle(Adaptor2d_Curve2d)& currentarc = PStart.Arc(); currentparam = PStart.Parameter(); if (!iwline->IsTangentAtEnd()) { @@ -1675,7 +1675,7 @@ void Contap_Contour::Perform Standard_Boolean projok; for (k=1; k<=Nblines;k++) { if (slin(k).TypeContour() == Contap_Restriction) { - const Handle(Adaptor2d_HCurve2d)& thearc = slin(k).Arc(); + const Handle(Adaptor2d_Curve2d)& thearc = slin(k).Arc(); Standard_Real paramproj; gp_Pnt2d Ptproj; projok = Contap_HContTool::Project(thearc,toproj,paramproj,Ptproj); @@ -1737,7 +1737,7 @@ void Contap_Contour::Perform } static Standard_Boolean FindLine(Contap_Line& Line, - const Handle(Adaptor3d_HSurface)& Surf, + const Handle(Adaptor3d_Surface)& Surf, const gp_Pnt2d& Pt2d, gp_Pnt& Ptref, Standard_Real& Paramin, @@ -1780,7 +1780,7 @@ static Standard_Boolean FindLine(Contap_Line& Line, static void PutPointsOnLine (const Contap_TheSearch& solrst, - const Handle(Adaptor3d_HSurface)& Surf, + const Handle(Adaptor3d_Surface)& Surf, Contap_TheSequenceOfLine& slin) { @@ -1806,7 +1806,7 @@ static void PutPointsOnLine (const Contap_TheSearch& solrst, for (i=1; i<= NbPoints; i++) { const Contap_ThePathPointOfTheSearch& PStart = solrst.Point(i); - const Handle(Adaptor2d_HCurve2d)& thearc = PStart.Arc(); + const Handle(Adaptor2d_Curve2d)& thearc = PStart.Arc(); theparam = PStart.Parameter(); Contap_HCurve2dTool::D1(thearc,theparam,pt2d,d2d); @@ -1862,7 +1862,7 @@ IntSurf_TypeTrans ComputeTransitionOngpLine (Contap_SurfFunction& SFunc, const gp_Lin& L) { - const Handle(Adaptor3d_HSurface)& Surf=SFunc.Surface(); + const Handle(Adaptor3d_Surface)& Surf=SFunc.Surface(); GeomAbs_SurfaceType typS = Adaptor3d_HSurfaceTool::GetType(Surf); gp_Pnt P; gp_Vec T; @@ -1892,7 +1892,7 @@ IntSurf_TypeTrans ComputeTransitionOngpCircle (Contap_SurfFunction& SFunc, const gp_Circ& C) { - const Handle(Adaptor3d_HSurface)& Surf=SFunc.Surface(); + const Handle(Adaptor3d_Surface)& Surf=SFunc.Surface(); GeomAbs_SurfaceType typS = Adaptor3d_HSurfaceTool::GetType(Surf); gp_Pnt P; gp_Vec T; @@ -1931,7 +1931,7 @@ void Contap_Contour::PerformAna(const Handle(Adaptor3d_TopolTool)& Domain) //gp_Lin linsol; Contap_ContAna contana; Contap_Line theline; - const Handle(Adaptor3d_HSurface)& Surf = mySFunc.Surface(); + const Handle(Adaptor3d_Surface)& Surf = mySFunc.Surface(); Contap_TFunction TypeFunc(mySFunc.FunctionType()); Standard_Boolean PerformSolRst = Standard_True; diff --git a/src/Contap/Contap_Contour.hxx b/src/Contap/Contap_Contour.hxx index d888a45d90..6075b26a8d 100644 --- a/src/Contap/Contap_Contour.hxx +++ b/src/Contap/Contap_Contour.hxx @@ -17,29 +17,16 @@ #ifndef _Contap_Contour_HeaderFile #define _Contap_Contour_HeaderFile -#include -#include -#include - -#include +#include #include #include #include #include #include -#include -#include -class StdFail_NotDone; -class Standard_OutOfRange; -class Standard_ConstructionError; + class gp_Vec; class gp_Pnt; -class Adaptor3d_HSurface; class Adaptor3d_TopolTool; -class Contap_Line; -class Contap_SurfFunction; - - class Contap_Contour { @@ -57,25 +44,25 @@ public: Standard_EXPORT Contap_Contour(const gp_Pnt& Eye); //! Creates the contour in a given direction. - Standard_EXPORT Contap_Contour(const Handle(Adaptor3d_HSurface)& Surf, const Handle(Adaptor3d_TopolTool)& Domain, const gp_Vec& Direction); + Standard_EXPORT Contap_Contour(const Handle(Adaptor3d_Surface)& Surf, const Handle(Adaptor3d_TopolTool)& Domain, const gp_Vec& Direction); //! Creates the contour in a given direction. - Standard_EXPORT Contap_Contour(const Handle(Adaptor3d_HSurface)& Surf, const Handle(Adaptor3d_TopolTool)& Domain, const gp_Vec& Direction, const Standard_Real Angle); + Standard_EXPORT Contap_Contour(const Handle(Adaptor3d_Surface)& Surf, const Handle(Adaptor3d_TopolTool)& Domain, const gp_Vec& Direction, const Standard_Real Angle); //! Creates the contour for a perspective view. - Standard_EXPORT Contap_Contour(const Handle(Adaptor3d_HSurface)& Surf, const Handle(Adaptor3d_TopolTool)& Domain, const gp_Pnt& Eye); + Standard_EXPORT Contap_Contour(const Handle(Adaptor3d_Surface)& Surf, const Handle(Adaptor3d_TopolTool)& Domain, const gp_Pnt& Eye); //! Creates the contour in a given direction. - Standard_EXPORT void Perform (const Handle(Adaptor3d_HSurface)& Surf, const Handle(Adaptor3d_TopolTool)& Domain); + Standard_EXPORT void Perform (const Handle(Adaptor3d_Surface)& Surf, const Handle(Adaptor3d_TopolTool)& Domain); //! Creates the contour in a given direction. - Standard_EXPORT void Perform (const Handle(Adaptor3d_HSurface)& Surf, const Handle(Adaptor3d_TopolTool)& Domain, const gp_Vec& Direction); + Standard_EXPORT void Perform (const Handle(Adaptor3d_Surface)& Surf, const Handle(Adaptor3d_TopolTool)& Domain, const gp_Vec& Direction); //! Creates the contour in a given direction. - Standard_EXPORT void Perform (const Handle(Adaptor3d_HSurface)& Surf, const Handle(Adaptor3d_TopolTool)& Domain, const gp_Vec& Direction, const Standard_Real Angle); + Standard_EXPORT void Perform (const Handle(Adaptor3d_Surface)& Surf, const Handle(Adaptor3d_TopolTool)& Domain, const gp_Vec& Direction, const Standard_Real Angle); //! Creates the contour for a perspective view. - Standard_EXPORT void Perform (const Handle(Adaptor3d_HSurface)& Surf, const Handle(Adaptor3d_TopolTool)& Domain, const gp_Pnt& Eye); + Standard_EXPORT void Perform (const Handle(Adaptor3d_Surface)& Surf, const Handle(Adaptor3d_TopolTool)& Domain, const gp_Pnt& Eye); Standard_EXPORT void Init (const gp_Vec& Direction); diff --git a/src/Contap/Contap_HContTool.cxx b/src/Contap/Contap_HContTool.cxx index 9ea6c4088d..a5032f1f56 100644 --- a/src/Contap/Contap_HContTool.cxx +++ b/src/Contap/Contap_HContTool.cxx @@ -15,8 +15,8 @@ // commercial license or contractual agreement. -#include -#include +#include +#include #include #include #include @@ -27,7 +27,7 @@ static Standard_Real uinf,vinf,usup,vsup; Standard_Integer Contap_HContTool::NbSamplesV -(const Handle(Adaptor3d_HSurface)& S, +(const Handle(Adaptor3d_Surface)& S, const Standard_Real , const Standard_Real ) { @@ -74,7 +74,7 @@ Standard_Integer Contap_HContTool::NbSamplesV } Standard_Integer Contap_HContTool::NbSamplesU -(const Handle(Adaptor3d_HSurface)& S, +(const Handle(Adaptor3d_Surface)& S, const Standard_Real , const Standard_Real ) { @@ -125,7 +125,7 @@ Standard_Integer Contap_HContTool::NbSamplesU } Standard_Integer Contap_HContTool::NbSamplePoints -(const Handle(Adaptor3d_HSurface)& S) +(const Handle(Adaptor3d_Surface)& S) { uinf = S->FirstUParameter(); usup = S->LastUParameter(); @@ -172,7 +172,7 @@ Standard_Integer Contap_HContTool::NbSamplePoints return 5; } -void Contap_HContTool::SamplePoint (const Handle(Adaptor3d_HSurface)& S, +void Contap_HContTool::SamplePoint (const Handle(Adaptor3d_Surface)& S, const Standard_Integer Index, Standard_Real& U, Standard_Real& V ) @@ -219,7 +219,7 @@ void Contap_HContTool::SamplePoint (const Handle(Adaptor3d_HSurface)& S, Standard_Integer Contap_HContTool::NbSamplesOnArc -(const Handle(Adaptor2d_HCurve2d)& A) { +(const Handle(Adaptor2d_Curve2d)& A) { GeomAbs_CurveType CurveType = A->GetType(); @@ -249,7 +249,7 @@ Standard_Integer Contap_HContTool::NbSamplesOnArc } -void Contap_HContTool::Bounds(const Handle(Adaptor2d_HCurve2d)& A, +void Contap_HContTool::Bounds(const Handle(Adaptor2d_Curve2d)& A, Standard_Real& Ufirst, Standard_Real& Ulast) { @@ -258,7 +258,7 @@ void Contap_HContTool::Bounds(const Handle(Adaptor2d_HCurve2d)& A, } -Standard_Boolean Contap_HContTool::Project (const Handle(Adaptor2d_HCurve2d)& C, +Standard_Boolean Contap_HContTool::Project (const Handle(Adaptor2d_Curve2d)& C, const gp_Pnt2d& P, Standard_Real& Paramproj, gp_Pnt2d& Ptproj) @@ -270,7 +270,7 @@ Standard_Boolean Contap_HContTool::Project (const Handle(Adaptor2d_HCurve2d)& C, Standard_Real Tol = 1.e-5; Standard_Real Dist2; - Extrema_EPCOfExtPC2d extrema(P,C->Curve2d(),Nbu,epsX,Tol); + Extrema_EPCOfExtPC2d extrema (P, *C, Nbu, epsX, Tol); if (!extrema.IsDone()) { return Standard_False; } @@ -293,14 +293,14 @@ Standard_Boolean Contap_HContTool::Project (const Handle(Adaptor2d_HCurve2d)& C, Standard_Real Contap_HContTool::Tolerance (const Handle(Adaptor3d_HVertex)& V, - const Handle(Adaptor2d_HCurve2d)& C) + const Handle(Adaptor2d_Curve2d)& C) { // return BRepAdaptor2d_Curve2dTool::Resolution(C,BRep_Tool::Tolerance(V)); return V->Resolution(C); } Standard_Real Contap_HContTool::Parameter (const Handle(Adaptor3d_HVertex)& V, - const Handle(Adaptor2d_HCurve2d)& C) + const Handle(Adaptor2d_Curve2d)& C) { // return BRep_Tool::Parameter(V,C.Edge()); return V->Parameter(C); @@ -309,17 +309,17 @@ Standard_Real Contap_HContTool::Parameter (const Handle(Adaptor3d_HVertex)& V, Standard_Boolean Contap_HContTool::HasBeenSeen -(const Handle(Adaptor2d_HCurve2d)&) +(const Handle(Adaptor2d_Curve2d)&) { return Standard_False; } -Standard_Integer Contap_HContTool::NbPoints(const Handle(Adaptor2d_HCurve2d)&) +Standard_Integer Contap_HContTool::NbPoints(const Handle(Adaptor2d_Curve2d)&) { return 0; } -void Contap_HContTool::Value(const Handle(Adaptor2d_HCurve2d)&, +void Contap_HContTool::Value(const Handle(Adaptor2d_Curve2d)&, const Standard_Integer, gp_Pnt&, Standard_Real&, @@ -328,26 +328,26 @@ void Contap_HContTool::Value(const Handle(Adaptor2d_HCurve2d)&, throw Standard_OutOfRange(); } -Standard_Boolean Contap_HContTool::IsVertex(const Handle(Adaptor2d_HCurve2d)&, +Standard_Boolean Contap_HContTool::IsVertex(const Handle(Adaptor2d_Curve2d)&, const Standard_Integer) { return Standard_False; } -void Contap_HContTool::Vertex(const Handle(Adaptor2d_HCurve2d)&, +void Contap_HContTool::Vertex(const Handle(Adaptor2d_Curve2d)&, const Standard_Integer, Handle(Adaptor3d_HVertex)&) { throw Standard_OutOfRange(); } -Standard_Integer Contap_HContTool::NbSegments(const Handle(Adaptor2d_HCurve2d)&) +Standard_Integer Contap_HContTool::NbSegments(const Handle(Adaptor2d_Curve2d)&) { return 0; } Standard_Boolean Contap_HContTool::HasFirstPoint -(const Handle(Adaptor2d_HCurve2d)&, +(const Handle(Adaptor2d_Curve2d)&, const Standard_Integer, Standard_Integer&) { @@ -355,7 +355,7 @@ Standard_Boolean Contap_HContTool::HasFirstPoint } Standard_Boolean Contap_HContTool::HasLastPoint -(const Handle(Adaptor2d_HCurve2d)&, +(const Handle(Adaptor2d_Curve2d)&, const Standard_Integer, Standard_Integer&) { @@ -363,7 +363,7 @@ Standard_Boolean Contap_HContTool::HasLastPoint } Standard_Boolean Contap_HContTool::IsAllSolution -(const Handle(Adaptor2d_HCurve2d)&) +(const Handle(Adaptor2d_Curve2d)&) { return Standard_False; diff --git a/src/Contap/Contap_HContTool.hxx b/src/Contap/Contap_HContTool.hxx index 6868bc7e0e..30ee9fa018 100644 --- a/src/Contap/Contap_HContTool.hxx +++ b/src/Contap/Contap_HContTool.hxx @@ -17,15 +17,9 @@ #ifndef _Contap_HContTool_HeaderFile #define _Contap_HContTool_HeaderFile -#include -#include -#include +#include +#include -#include -#include -#include -class Adaptor3d_HSurface; -class Adaptor2d_HCurve2d; class gp_Pnt2d; class Adaptor3d_HVertex; class gp_Pnt; @@ -40,31 +34,31 @@ public: DEFINE_STANDARD_ALLOC - Standard_EXPORT static Standard_Integer NbSamplesU (const Handle(Adaptor3d_HSurface)& S, const Standard_Real u1, const Standard_Real u2); + Standard_EXPORT static Standard_Integer NbSamplesU (const Handle(Adaptor3d_Surface)& S, const Standard_Real u1, const Standard_Real u2); - Standard_EXPORT static Standard_Integer NbSamplesV (const Handle(Adaptor3d_HSurface)& S, const Standard_Real v1, const Standard_Real v2); + Standard_EXPORT static Standard_Integer NbSamplesV (const Handle(Adaptor3d_Surface)& S, const Standard_Real v1, const Standard_Real v2); - Standard_EXPORT static Standard_Integer NbSamplePoints (const Handle(Adaptor3d_HSurface)& S); + Standard_EXPORT static Standard_Integer NbSamplePoints (const Handle(Adaptor3d_Surface)& S); - Standard_EXPORT static void SamplePoint (const Handle(Adaptor3d_HSurface)& S, const Standard_Integer Index, Standard_Real& U, Standard_Real& V); + Standard_EXPORT static void SamplePoint (const Handle(Adaptor3d_Surface)& S, const Standard_Integer Index, Standard_Real& U, Standard_Real& V); //! Returns True if all the intersection point and edges //! are known on the Arc. //! The intersection point are given as vertices. //! The intersection edges are given as intervals between //! two vertices. - Standard_EXPORT static Standard_Boolean HasBeenSeen (const Handle(Adaptor2d_HCurve2d)& C); + Standard_EXPORT static Standard_Boolean HasBeenSeen (const Handle(Adaptor2d_Curve2d)& C); //! returns the number of points which is used to make //! a sample on the arc. this number is a function of //! the Surface and the CurveOnSurface complexity. - Standard_EXPORT static Standard_Integer NbSamplesOnArc (const Handle(Adaptor2d_HCurve2d)& A); + Standard_EXPORT static Standard_Integer NbSamplesOnArc (const Handle(Adaptor2d_Curve2d)& A); //! Returns the parametric limits on the arc C. //! These limits must be finite : they are either //! the real limits of the arc, for a finite arc, //! or a bounding box for an infinite arc. - Standard_EXPORT static void Bounds (const Handle(Adaptor2d_HCurve2d)& C, Standard_Real& Ufirst, Standard_Real& Ulast); + Standard_EXPORT static void Bounds (const Handle(Adaptor2d_Curve2d)& C, Standard_Real& Ufirst, Standard_Real& Ulast); //! Projects the point P on the arc C. //! If the methods returns Standard_True, the projection is @@ -72,36 +66,36 @@ public: //! of the projected point, Ptproj is the projected Point. //! If the method returns Standard_False, Param proj and Ptproj //! are not significant. - Standard_EXPORT static Standard_Boolean Project (const Handle(Adaptor2d_HCurve2d)& C, const gp_Pnt2d& P, Standard_Real& Paramproj, gp_Pnt2d& Ptproj); + Standard_EXPORT static Standard_Boolean Project (const Handle(Adaptor2d_Curve2d)& C, const gp_Pnt2d& P, Standard_Real& Paramproj, gp_Pnt2d& Ptproj); //! Returns the parametric tolerance used to consider //! that the vertex and another point meet, i-e //! if Abs(parameter(Vertex) - parameter(OtherPnt))<= //! Tolerance, the points are "merged". - Standard_EXPORT static Standard_Real Tolerance (const Handle(Adaptor3d_HVertex)& V, const Handle(Adaptor2d_HCurve2d)& C); + Standard_EXPORT static Standard_Real Tolerance (const Handle(Adaptor3d_HVertex)& V, const Handle(Adaptor2d_Curve2d)& C); //! Returns the parameter of the vertex V on the arc A. - Standard_EXPORT static Standard_Real Parameter (const Handle(Adaptor3d_HVertex)& V, const Handle(Adaptor2d_HCurve2d)& C); + Standard_EXPORT static Standard_Real Parameter (const Handle(Adaptor3d_HVertex)& V, const Handle(Adaptor2d_Curve2d)& C); //! Returns the number of intersection points on the arc A. - Standard_EXPORT static Standard_Integer NbPoints (const Handle(Adaptor2d_HCurve2d)& C); + Standard_EXPORT static Standard_Integer NbPoints (const Handle(Adaptor2d_Curve2d)& C); //! Returns the value (Pt), the tolerance (Tol), and //! the parameter (U) on the arc A , of the intersection //! point of range Index. - Standard_EXPORT static void Value (const Handle(Adaptor2d_HCurve2d)& C, const Standard_Integer Index, gp_Pnt& Pt, Standard_Real& Tol, Standard_Real& U); + Standard_EXPORT static void Value (const Handle(Adaptor2d_Curve2d)& C, const Standard_Integer Index, gp_Pnt& Pt, Standard_Real& Tol, Standard_Real& U); //! Returns True if the intersection point of range Index //! corresponds with a vertex on the arc A. - Standard_EXPORT static Standard_Boolean IsVertex (const Handle(Adaptor2d_HCurve2d)& C, const Standard_Integer Index); + Standard_EXPORT static Standard_Boolean IsVertex (const Handle(Adaptor2d_Curve2d)& C, const Standard_Integer Index); //! When IsVertex returns True, this method returns the //! vertex on the arc A. - Standard_EXPORT static void Vertex (const Handle(Adaptor2d_HCurve2d)& C, const Standard_Integer Index, Handle(Adaptor3d_HVertex)& V); + Standard_EXPORT static void Vertex (const Handle(Adaptor2d_Curve2d)& C, const Standard_Integer Index, Handle(Adaptor3d_HVertex)& V); //! returns the number of part of A solution of the //! of intersection problem. - Standard_EXPORT static Standard_Integer NbSegments (const Handle(Adaptor2d_HCurve2d)& C); + Standard_EXPORT static Standard_Integer NbSegments (const Handle(Adaptor2d_Curve2d)& C); //! Returns True when the segment of range Index is not //! open at the left side. In that case, IndFirst is the @@ -109,7 +103,7 @@ public: //! of the one which defines the left bound of the segment. //! Otherwise, the method has to return False, and IndFirst //! has no meaning. - Standard_EXPORT static Standard_Boolean HasFirstPoint (const Handle(Adaptor2d_HCurve2d)& C, const Standard_Integer Index, Standard_Integer& IndFirst); + Standard_EXPORT static Standard_Boolean HasFirstPoint (const Handle(Adaptor2d_Curve2d)& C, const Standard_Integer Index, Standard_Integer& IndFirst); //! Returns True when the segment of range Index is not //! open at the right side. In that case, IndLast is the @@ -117,11 +111,11 @@ public: //! of the one which defines the right bound of the segment. //! Otherwise, the method has to return False, and IndLast //! has no meaning. - Standard_EXPORT static Standard_Boolean HasLastPoint (const Handle(Adaptor2d_HCurve2d)& C, const Standard_Integer Index, Standard_Integer& IndLast); + Standard_EXPORT static Standard_Boolean HasLastPoint (const Handle(Adaptor2d_Curve2d)& C, const Standard_Integer Index, Standard_Integer& IndLast); //! Returns True when the whole restriction is solution //! of the intersection problem. - Standard_EXPORT static Standard_Boolean IsAllSolution (const Handle(Adaptor2d_HCurve2d)& C); + Standard_EXPORT static Standard_Boolean IsAllSolution (const Handle(Adaptor2d_Curve2d)& C); diff --git a/src/Contap/Contap_HCurve2dTool.cxx b/src/Contap/Contap_HCurve2dTool.cxx index aa005d841f..7eaf179b94 100644 --- a/src/Contap/Contap_HCurve2dTool.cxx +++ b/src/Contap/Contap_HCurve2dTool.cxx @@ -15,7 +15,7 @@ // commercial license or contractual agreement. -#include +#include #include #include #include @@ -26,7 +26,7 @@ #include //============================================================ -Standard_Integer Contap_HCurve2dTool::NbSamples (const Handle(Adaptor2d_HCurve2d)& C, +Standard_Integer Contap_HCurve2dTool::NbSamples (const Handle(Adaptor2d_Curve2d)& C, const Standard_Real U0, const Standard_Real U1) { diff --git a/src/Contap/Contap_HCurve2dTool.hxx b/src/Contap/Contap_HCurve2dTool.hxx index ecd4ecd073..33c6069c5e 100644 --- a/src/Contap/Contap_HCurve2dTool.hxx +++ b/src/Contap/Contap_HCurve2dTool.hxx @@ -37,7 +37,6 @@ class Standard_OutOfRange; class Standard_NoSuchObject; class Standard_DomainError; -class Adaptor2d_HCurve2d; class gp_Pnt2d; class gp_Vec2d; class Geom2d_BezierCurve; @@ -52,54 +51,54 @@ public: DEFINE_STANDARD_ALLOC - static Standard_Real FirstParameter (const Handle(Adaptor2d_HCurve2d)& C); + static Standard_Real FirstParameter (const Handle(Adaptor2d_Curve2d)& C); - static Standard_Real LastParameter (const Handle(Adaptor2d_HCurve2d)& C); + static Standard_Real LastParameter (const Handle(Adaptor2d_Curve2d)& C); - static GeomAbs_Shape Continuity (const Handle(Adaptor2d_HCurve2d)& C); + static GeomAbs_Shape Continuity (const Handle(Adaptor2d_Curve2d)& C); //! Returns the number of intervals for continuity //! . May be one if Continuity(myclass) >= - static Standard_Integer NbIntervals (const Handle(Adaptor2d_HCurve2d)& C, const GeomAbs_Shape S); + static Standard_Integer NbIntervals (const Handle(Adaptor2d_Curve2d)& C, const GeomAbs_Shape S); //! Stores in the parameters bounding the intervals //! of continuity . //! //! The array must provide enough room to accommodate //! for the parameters. i.e. T.Length() > NbIntervals() - static void Intervals (const Handle(Adaptor2d_HCurve2d)& C, TColStd_Array1OfReal& T, const GeomAbs_Shape S); + static void Intervals (const Handle(Adaptor2d_Curve2d)& C, TColStd_Array1OfReal& T, const GeomAbs_Shape S); - static Standard_Boolean IsClosed (const Handle(Adaptor2d_HCurve2d)& C); + static Standard_Boolean IsClosed (const Handle(Adaptor2d_Curve2d)& C); - static Standard_Boolean IsPeriodic (const Handle(Adaptor2d_HCurve2d)& C); + static Standard_Boolean IsPeriodic (const Handle(Adaptor2d_Curve2d)& C); - static Standard_Real Period (const Handle(Adaptor2d_HCurve2d)& C); + static Standard_Real Period (const Handle(Adaptor2d_Curve2d)& C); //! Computes the point of parameter U on the curve. - static gp_Pnt2d Value (const Handle(Adaptor2d_HCurve2d)& C, const Standard_Real U); + static gp_Pnt2d Value (const Handle(Adaptor2d_Curve2d)& C, const Standard_Real U); //! Computes the point of parameter U on the curve. - static void D0 (const Handle(Adaptor2d_HCurve2d)& C, const Standard_Real U, gp_Pnt2d& P); + static void D0 (const Handle(Adaptor2d_Curve2d)& C, const Standard_Real U, gp_Pnt2d& P); //! Computes the point of parameter U on the curve with its //! first derivative. //! Raised if the continuity of the current interval //! is not C1. - static void D1 (const Handle(Adaptor2d_HCurve2d)& C, const Standard_Real U, gp_Pnt2d& P, gp_Vec2d& V); + static void D1 (const Handle(Adaptor2d_Curve2d)& C, const Standard_Real U, gp_Pnt2d& P, gp_Vec2d& V); //! Returns the point P of parameter U, the first and second //! derivatives V1 and V2. //! Raised if the continuity of the current interval //! is not C2. - static void D2 (const Handle(Adaptor2d_HCurve2d)& C, const Standard_Real U, gp_Pnt2d& P, gp_Vec2d& V1, gp_Vec2d& V2); + static void D2 (const Handle(Adaptor2d_Curve2d)& C, const Standard_Real U, gp_Pnt2d& P, gp_Vec2d& V1, gp_Vec2d& V2); //! Returns the point P of parameter U, the first, the second //! and the third derivative. //! Raised if the continuity of the current interval //! is not C3. - static void D3 (const Handle(Adaptor2d_HCurve2d)& C, const Standard_Real U, gp_Pnt2d& P, gp_Vec2d& V1, gp_Vec2d& V2, gp_Vec2d& V3); + static void D3 (const Handle(Adaptor2d_Curve2d)& C, const Standard_Real U, gp_Pnt2d& P, gp_Vec2d& V1, gp_Vec2d& V2, gp_Vec2d& V3); //! The returned vector gives the value of the derivative for the @@ -107,32 +106,32 @@ public: //! Raised if the continuity of the current interval //! is not CN. //! Raised if N < 1. - static gp_Vec2d DN (const Handle(Adaptor2d_HCurve2d)& C, const Standard_Real U, const Standard_Integer N); + static gp_Vec2d DN (const Handle(Adaptor2d_Curve2d)& C, const Standard_Real U, const Standard_Integer N); //! Returns the parametric resolution corresponding //! to the real space resolution . - static Standard_Real Resolution (const Handle(Adaptor2d_HCurve2d)& C, const Standard_Real R3d); + static Standard_Real Resolution (const Handle(Adaptor2d_Curve2d)& C, const Standard_Real R3d); //! Returns the type of the curve in the current //! interval : Line, Circle, Ellipse, Hyperbola, //! Parabola, BezierCurve, BSplineCurve, OtherCurve. - static GeomAbs_CurveType GetType (const Handle(Adaptor2d_HCurve2d)& C); + static GeomAbs_CurveType GetType (const Handle(Adaptor2d_Curve2d)& C); - static gp_Lin2d Line (const Handle(Adaptor2d_HCurve2d)& C); + static gp_Lin2d Line (const Handle(Adaptor2d_Curve2d)& C); - static gp_Circ2d Circle (const Handle(Adaptor2d_HCurve2d)& C); + static gp_Circ2d Circle (const Handle(Adaptor2d_Curve2d)& C); - static gp_Elips2d Ellipse (const Handle(Adaptor2d_HCurve2d)& C); + static gp_Elips2d Ellipse (const Handle(Adaptor2d_Curve2d)& C); - static gp_Hypr2d Hyperbola (const Handle(Adaptor2d_HCurve2d)& C); + static gp_Hypr2d Hyperbola (const Handle(Adaptor2d_Curve2d)& C); - static gp_Parab2d Parabola (const Handle(Adaptor2d_HCurve2d)& C); + static gp_Parab2d Parabola (const Handle(Adaptor2d_Curve2d)& C); - static Handle(Geom2d_BezierCurve) Bezier (const Handle(Adaptor2d_HCurve2d)& C); + static Handle(Geom2d_BezierCurve) Bezier (const Handle(Adaptor2d_Curve2d)& C); - static Handle(Geom2d_BSplineCurve) BSpline (const Handle(Adaptor2d_HCurve2d)& C); + static Handle(Geom2d_BSplineCurve) BSpline (const Handle(Adaptor2d_Curve2d)& C); - Standard_EXPORT static Standard_Integer NbSamples (const Handle(Adaptor2d_HCurve2d)& C, const Standard_Real U0, const Standard_Real U1); + Standard_EXPORT static Standard_Integer NbSamples (const Handle(Adaptor2d_Curve2d)& C, const Standard_Real U0, const Standard_Real U1); diff --git a/src/Contap/Contap_HCurve2dTool.lxx b/src/Contap/Contap_HCurve2dTool.lxx index a25cae31f2..d27ba44abf 100644 --- a/src/Contap/Contap_HCurve2dTool.lxx +++ b/src/Contap/Contap_HCurve2dTool.lxx @@ -14,7 +14,7 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#include +#include #include #include @@ -33,59 +33,59 @@ #include //============================================================ -inline Standard_Real Contap_HCurve2dTool::FirstParameter (const Handle(Adaptor2d_HCurve2d)& C) { +inline Standard_Real Contap_HCurve2dTool::FirstParameter (const Handle(Adaptor2d_Curve2d)& C) { return(C->FirstParameter()); } //============================================================ -inline Standard_Real Contap_HCurve2dTool::LastParameter (const Handle(Adaptor2d_HCurve2d)& C) { +inline Standard_Real Contap_HCurve2dTool::LastParameter (const Handle(Adaptor2d_Curve2d)& C) { return(C->LastParameter()); } //============================================================ -inline GeomAbs_Shape Contap_HCurve2dTool::Continuity (const Handle(Adaptor2d_HCurve2d)& C) { +inline GeomAbs_Shape Contap_HCurve2dTool::Continuity (const Handle(Adaptor2d_Curve2d)& C) { return(C->Continuity()); } //============================================================ -inline Standard_Integer Contap_HCurve2dTool::NbIntervals(const Handle(Adaptor2d_HCurve2d)& C,const GeomAbs_Shape Sh) { +inline Standard_Integer Contap_HCurve2dTool::NbIntervals(const Handle(Adaptor2d_Curve2d)& C,const GeomAbs_Shape Sh) { return(C->NbIntervals(Sh)); } //============================================================ -inline void Contap_HCurve2dTool::Intervals(const Handle(Adaptor2d_HCurve2d)& C, +inline void Contap_HCurve2dTool::Intervals(const Handle(Adaptor2d_Curve2d)& C, TColStd_Array1OfReal& Tab, const GeomAbs_Shape Sh) { C->Intervals(Tab,Sh); } //============================================================ -inline Standard_Boolean Contap_HCurve2dTool::IsClosed(const Handle(Adaptor2d_HCurve2d)& C) { +inline Standard_Boolean Contap_HCurve2dTool::IsClosed(const Handle(Adaptor2d_Curve2d)& C) { return(C->IsClosed()); } //============================================================ -inline Standard_Boolean Contap_HCurve2dTool::IsPeriodic(const Handle(Adaptor2d_HCurve2d)& C) { +inline Standard_Boolean Contap_HCurve2dTool::IsPeriodic(const Handle(Adaptor2d_Curve2d)& C) { return(C->IsPeriodic()); } //============================================================ -inline Standard_Real Contap_HCurve2dTool::Period(const Handle(Adaptor2d_HCurve2d)& C) { +inline Standard_Real Contap_HCurve2dTool::Period(const Handle(Adaptor2d_Curve2d)& C) { return(C->Period()); } //============================================================ -inline gp_Pnt2d Contap_HCurve2dTool::Value (const Handle(Adaptor2d_HCurve2d)& C, +inline gp_Pnt2d Contap_HCurve2dTool::Value (const Handle(Adaptor2d_Curve2d)& C, const Standard_Real U) { return(C->Value(U)); } //============================================================ -inline void Contap_HCurve2dTool::D0(const Handle(Adaptor2d_HCurve2d)& C, +inline void Contap_HCurve2dTool::D0(const Handle(Adaptor2d_Curve2d)& C, const Standard_Real U, gp_Pnt2d& P) { C->D0(U,P); } //============================================================ -inline void Contap_HCurve2dTool::D1 (const Handle(Adaptor2d_HCurve2d)& C, +inline void Contap_HCurve2dTool::D1 (const Handle(Adaptor2d_Curve2d)& C, const Standard_Real U, gp_Pnt2d& P, gp_Vec2d& T) { C->D1(U,P,T); } //============================================================ -inline void Contap_HCurve2dTool::D2 (const Handle(Adaptor2d_HCurve2d)& C, +inline void Contap_HCurve2dTool::D2 (const Handle(Adaptor2d_Curve2d)& C, const Standard_Real U, gp_Pnt2d& P, gp_Vec2d& T, @@ -94,7 +94,7 @@ inline void Contap_HCurve2dTool::D2 (const Handle(Adaptor2d_HCurve2d)& C, C->D2(U,P,T,N); } //============================================================ -inline void Contap_HCurve2dTool::D3 (const Handle(Adaptor2d_HCurve2d)& C, +inline void Contap_HCurve2dTool::D3 (const Handle(Adaptor2d_Curve2d)& C, const Standard_Real U, gp_Pnt2d& P, gp_Vec2d& V1, @@ -104,47 +104,47 @@ inline void Contap_HCurve2dTool::D3 (const Handle(Adaptor2d_HCurve2d)& C, C->D3(U,P,V1,V2,V3); } //============================================================ -inline gp_Vec2d Contap_HCurve2dTool::DN (const Handle(Adaptor2d_HCurve2d)& C, +inline gp_Vec2d Contap_HCurve2dTool::DN (const Handle(Adaptor2d_Curve2d)& C, const Standard_Real U, const Standard_Integer N) { return(C->DN(U,N)); } //============================================================ -inline Standard_Real Contap_HCurve2dTool::Resolution(const Handle(Adaptor2d_HCurve2d)& C, +inline Standard_Real Contap_HCurve2dTool::Resolution(const Handle(Adaptor2d_Curve2d)& C, const Standard_Real R3d) { return(C->Resolution(R3d)); } //============================================================ -inline GeomAbs_CurveType Contap_HCurve2dTool::GetType(const Handle(Adaptor2d_HCurve2d)& C) { +inline GeomAbs_CurveType Contap_HCurve2dTool::GetType(const Handle(Adaptor2d_Curve2d)& C) { return(C->GetType()); } //============================================================ -inline gp_Lin2d Contap_HCurve2dTool::Line (const Handle(Adaptor2d_HCurve2d)& C) { +inline gp_Lin2d Contap_HCurve2dTool::Line (const Handle(Adaptor2d_Curve2d)& C) { return(C->Line()); } //============================================================ -inline gp_Circ2d Contap_HCurve2dTool::Circle (const Handle(Adaptor2d_HCurve2d)& C) { +inline gp_Circ2d Contap_HCurve2dTool::Circle (const Handle(Adaptor2d_Curve2d)& C) { return(C->Circle()); } //============================================================ -inline gp_Elips2d Contap_HCurve2dTool::Ellipse (const Handle(Adaptor2d_HCurve2d)& C) { +inline gp_Elips2d Contap_HCurve2dTool::Ellipse (const Handle(Adaptor2d_Curve2d)& C) { return(C->Ellipse()); } //============================================================ -inline gp_Parab2d Contap_HCurve2dTool::Parabola (const Handle(Adaptor2d_HCurve2d)& C) { +inline gp_Parab2d Contap_HCurve2dTool::Parabola (const Handle(Adaptor2d_Curve2d)& C) { return(C->Parabola()); } //============================================================ -inline gp_Hypr2d Contap_HCurve2dTool::Hyperbola (const Handle(Adaptor2d_HCurve2d)& C) { +inline gp_Hypr2d Contap_HCurve2dTool::Hyperbola (const Handle(Adaptor2d_Curve2d)& C) { return(C->Hyperbola()); } //============================================================ -inline Handle(Geom2d_BezierCurve) Contap_HCurve2dTool::Bezier (const Handle(Adaptor2d_HCurve2d)& C) { +inline Handle(Geom2d_BezierCurve) Contap_HCurve2dTool::Bezier (const Handle(Adaptor2d_Curve2d)& C) { return(C->Bezier()); } //============================================================ -inline Handle(Geom2d_BSplineCurve) Contap_HCurve2dTool::BSpline (const Handle(Adaptor2d_HCurve2d)& C) { +inline Handle(Geom2d_BSplineCurve) Contap_HCurve2dTool::BSpline (const Handle(Adaptor2d_Curve2d)& C) { return(C->BSpline()); } //============================================================ diff --git a/src/Contap/Contap_Line.cxx b/src/Contap/Contap_Line.cxx index 0a3e8d685a..187f6b4b49 100644 --- a/src/Contap/Contap_Line.cxx +++ b/src/Contap/Contap_Line.cxx @@ -15,7 +15,7 @@ // commercial license or contractual agreement. -#include +#include #include #include #include @@ -79,7 +79,7 @@ void Contap_Line::SetValue(const gp_Circ& C) typL = Contap_Circle; } -void Contap_Line::SetValue(const Handle(Adaptor2d_HCurve2d)& A) +void Contap_Line::SetValue(const Handle(Adaptor2d_Curve2d)& A) { thearc = A; typL = Contap_Restriction; @@ -98,7 +98,7 @@ IntSurf_TypeTrans Contap_Line::TransitionOnS() const { return(Trans); } -const Handle(Adaptor2d_HCurve2d)& Contap_Line::Arc () const +const Handle(Adaptor2d_Curve2d)& Contap_Line::Arc () const { if (typL != Contap_Restriction) {throw Standard_DomainError();} return thearc; diff --git a/src/Contap/Contap_Line.hxx b/src/Contap/Contap_Line.hxx index 1f4796ac7e..9c6b12ec1f 100644 --- a/src/Contap/Contap_Line.hxx +++ b/src/Contap/Contap_Line.hxx @@ -31,7 +31,6 @@ #include #include class IntSurf_LineOn2S; -class Adaptor2d_HCurve2d; class Standard_DomainError; class Standard_OutOfRange; class IntSurf_PntOn2S; @@ -64,7 +63,7 @@ public: Standard_EXPORT void SetValue (const gp_Circ& C); - Standard_EXPORT void SetValue (const Handle(Adaptor2d_HCurve2d)& A); + Standard_EXPORT void SetValue (const Handle(Adaptor2d_Curve2d)& A); Standard_EXPORT void Add (const Contap_Point& P); @@ -85,7 +84,7 @@ public: gp_Circ Circle() const; - Standard_EXPORT const Handle(Adaptor2d_HCurve2d)& Arc() const; + Standard_EXPORT const Handle(Adaptor2d_Curve2d)& Arc() const; //! Set The Tansition of the line. Standard_EXPORT void SetTransitionOnS (const IntSurf_TypeTrans T); @@ -110,7 +109,7 @@ private: IntSurf_TypeTrans Trans; Handle(IntSurf_LineOn2S) curv; Handle(Contap_TheHSequenceOfPoint) svtx; - Handle(Adaptor2d_HCurve2d) thearc; + Handle(Adaptor2d_Curve2d) thearc; Contap_IType typL; gp_Pnt pt; gp_Dir dir1; diff --git a/src/Contap/Contap_Point.cxx b/src/Contap/Contap_Point.cxx index 372925f812..2549c34b62 100644 --- a/src/Contap/Contap_Point.cxx +++ b/src/Contap/Contap_Point.cxx @@ -15,7 +15,7 @@ // commercial license or contractual agreement. -#include +#include #include #include #include diff --git a/src/Contap/Contap_Point.hxx b/src/Contap/Contap_Point.hxx index 12bb7786fe..0038bf75fb 100644 --- a/src/Contap/Contap_Point.hxx +++ b/src/Contap/Contap_Point.hxx @@ -25,7 +25,7 @@ #include #include #include -class Adaptor2d_HCurve2d; + class Adaptor3d_HVertex; class Standard_DomainError; class gp_Pnt; @@ -64,7 +64,7 @@ public: //! Sets the value of the arc and of the parameter on //! this arc of the point. - void SetArc (const Handle(Adaptor2d_HCurve2d)& A, const Standard_Real Param, const IntSurf_Transition& TLine, const IntSurf_Transition& TArc); + void SetArc (const Handle(Adaptor2d_Curve2d)& A, const Standard_Real Param, const IntSurf_Transition& TLine, const IntSurf_Transition& TArc); void SetMultiple(); @@ -88,7 +88,7 @@ public: //! Returns the arc of restriction containing the //! vertex. - const Handle(Adaptor2d_HCurve2d)& Arc() const; + const Handle(Adaptor2d_Curve2d)& Arc() const; //! Returns the parameter of the point on the //! arc returned by the method Arc(). @@ -137,7 +137,7 @@ private: Standard_Real vparam; Standard_Real paraline; Standard_Boolean onarc; - Handle(Adaptor2d_HCurve2d) arc; + Handle(Adaptor2d_Curve2d) arc; IntSurf_Transition traline; IntSurf_Transition traarc; Standard_Real prmarc; diff --git a/src/Contap/Contap_Point.lxx b/src/Contap/Contap_Point.lxx index 81cdd64f7a..bbce861e7c 100644 --- a/src/Contap/Contap_Point.lxx +++ b/src/Contap/Contap_Point.lxx @@ -40,7 +40,7 @@ inline void Contap_Point::SetVertex(const Handle(Adaptor3d_HVertex)& V) { vtx = V; } -inline void Contap_Point::SetArc (const Handle(Adaptor2d_HCurve2d)& A, +inline void Contap_Point::SetArc (const Handle(Adaptor2d_Curve2d)& A, const Standard_Real Param, const IntSurf_Transition& TLine, const IntSurf_Transition& TArc) { @@ -94,7 +94,7 @@ inline Standard_Boolean Contap_Point::IsOnArc () const{ return onarc; } -inline const Handle(Adaptor2d_HCurve2d)& Contap_Point::Arc () const { +inline const Handle(Adaptor2d_Curve2d)& Contap_Point::Arc () const { if (!onarc) {throw Standard_DomainError();} return arc; diff --git a/src/Contap/Contap_SurfFunction.cxx b/src/Contap/Contap_SurfFunction.cxx index 819f626a4a..a09efd2c4c 100644 --- a/src/Contap/Contap_SurfFunction.cxx +++ b/src/Contap/Contap_SurfFunction.cxx @@ -16,7 +16,7 @@ // jag 940616 Tolpetit = 1.e-16 -#include +#include #include #include #include @@ -46,7 +46,7 @@ Contap_SurfFunction::Contap_SurfFunction (): { } -void Contap_SurfFunction::Set(const Handle(Adaptor3d_HSurface)& S) +void Contap_SurfFunction::Set(const Handle(Adaptor3d_Surface)& S) { mySurf = S; Standard_Integer i; diff --git a/src/Contap/Contap_SurfFunction.hxx b/src/Contap/Contap_SurfFunction.hxx index 60a1662b20..9539a3bfbe 100644 --- a/src/Contap/Contap_SurfFunction.hxx +++ b/src/Contap/Contap_SurfFunction.hxx @@ -17,22 +17,15 @@ #ifndef _Contap_SurfFunction_HeaderFile #define _Contap_SurfFunction_HeaderFile -#include -#include -#include - -#include +#include #include #include #include #include #include -#include #include -#include #include -class Adaptor3d_HSurface; -class StdFail_UndefinedDerivative; + class gp_Pnt; class gp_Dir; class math_Matrix; @@ -53,7 +46,7 @@ public: Standard_EXPORT Contap_SurfFunction(); - Standard_EXPORT void Set (const Handle(Adaptor3d_HSurface)& S); + Standard_EXPORT void Set (const Handle(Adaptor3d_Surface)& S); void Set (const gp_Pnt& Eye); @@ -104,10 +97,10 @@ public: Standard_Real Angle() const; - const Handle(Adaptor3d_HSurface)& Surface() const; + const Handle(Adaptor3d_Surface)& Surface() const; //! Method is entered for compatibility with IntPatch_TheSurfFunction. - const Handle(Adaptor3d_HSurface)& PSurface() const + const Handle(Adaptor3d_Surface)& PSurface() const { return Surface(); } @@ -123,7 +116,7 @@ private: - Handle(Adaptor3d_HSurface) mySurf; + Handle(Adaptor3d_Surface) mySurf; Standard_Real myMean; Contap_TFunction myType; gp_Dir myDir; diff --git a/src/Contap/Contap_SurfFunction.lxx b/src/Contap/Contap_SurfFunction.lxx index c3762ff39f..21120f78c7 100644 --- a/src/Contap/Contap_SurfFunction.lxx +++ b/src/Contap/Contap_SurfFunction.lxx @@ -80,7 +80,7 @@ inline const gp_Dir2d& Contap_SurfFunction::Direction2d() return d2d; } -inline const Handle(Adaptor3d_HSurface)& Contap_SurfFunction::Surface() const +inline const Handle(Adaptor3d_Surface)& Contap_SurfFunction::Surface() const { return mySurf; } diff --git a/src/Contap/Contap_SurfProps.cxx b/src/Contap/Contap_SurfProps.cxx index bd5dbffb21..81deb40646 100644 --- a/src/Contap/Contap_SurfProps.cxx +++ b/src/Contap/Contap_SurfProps.cxx @@ -15,7 +15,7 @@ // commercial license or contractual agreement. -#include +#include #include #include #include @@ -26,7 +26,7 @@ //function : Normale //purpose : //======================================================================= -void Contap_SurfProps::Normale(const Handle(Adaptor3d_HSurface)& S, +void Contap_SurfProps::Normale(const Handle(Adaptor3d_Surface)& S, const Standard_Real U, const Standard_Real V, gp_Pnt& P, @@ -131,7 +131,7 @@ void Contap_SurfProps::Normale(const Handle(Adaptor3d_HSurface)& S, //purpose : //======================================================================= -void Contap_SurfProps::DerivAndNorm(const Handle(Adaptor3d_HSurface)& S, +void Contap_SurfProps::DerivAndNorm(const Handle(Adaptor3d_Surface)& S, const Standard_Real U, const Standard_Real V, gp_Pnt& P, @@ -231,7 +231,7 @@ void Contap_SurfProps::DerivAndNorm(const Handle(Adaptor3d_HSurface)& S, //purpose : //======================================================================= -void Contap_SurfProps::NormAndDn(const Handle(Adaptor3d_HSurface)& S, +void Contap_SurfProps::NormAndDn(const Handle(Adaptor3d_Surface)& S, const Standard_Real U, const Standard_Real V, gp_Pnt& P, diff --git a/src/Contap/Contap_SurfProps.hxx b/src/Contap/Contap_SurfProps.hxx index 516444b154..33233975eb 100644 --- a/src/Contap/Contap_SurfProps.hxx +++ b/src/Contap/Contap_SurfProps.hxx @@ -17,16 +17,11 @@ #ifndef _Contap_SurfProps_HeaderFile #define _Contap_SurfProps_HeaderFile -#include -#include -#include +#include -#include -class Adaptor3d_HSurface; class gp_Pnt; class gp_Vec; - //! Internal tool used to compute the normal and its //! derivatives. class Contap_SurfProps @@ -38,15 +33,15 @@ public: //! Computes the point

, and normal vector on //! at parameters U,V. - Standard_EXPORT static void Normale (const Handle(Adaptor3d_HSurface)& S, const Standard_Real U, const Standard_Real V, gp_Pnt& P, gp_Vec& N); + Standard_EXPORT static void Normale (const Handle(Adaptor3d_Surface)& S, const Standard_Real U, const Standard_Real V, gp_Pnt& P, gp_Vec& N); //! Computes the point

, and normal vector on //! at parameters U,V. - Standard_EXPORT static void DerivAndNorm (const Handle(Adaptor3d_HSurface)& S, const Standard_Real U, const Standard_Real V, gp_Pnt& P, gp_Vec& d1u, gp_Vec& d1v, gp_Vec& N); + Standard_EXPORT static void DerivAndNorm (const Handle(Adaptor3d_Surface)& S, const Standard_Real U, const Standard_Real V, gp_Pnt& P, gp_Vec& d1u, gp_Vec& d1v, gp_Vec& N); //! Computes the point

, normal vector , and its //! derivatives and on at parameters U,V. - Standard_EXPORT static void NormAndDn (const Handle(Adaptor3d_HSurface)& S, const Standard_Real U, const Standard_Real V, gp_Pnt& P, gp_Vec& N, gp_Vec& Dnu, gp_Vec& Dnv); + Standard_EXPORT static void NormAndDn (const Handle(Adaptor3d_Surface)& S, const Standard_Real U, const Standard_Real V, gp_Pnt& P, gp_Vec& N, gp_Vec& Dnu, gp_Vec& Dnv); diff --git a/src/Contap/Contap_TheIWalking.hxx b/src/Contap/Contap_TheIWalking.hxx index 88b6935986..c264ee3a06 100644 --- a/src/Contap/Contap_TheIWalking.hxx +++ b/src/Contap/Contap_TheIWalking.hxx @@ -17,13 +17,8 @@ #ifndef _Contap_TheIWalking_HeaderFile #define _Contap_TheIWalking_HeaderFile -#include -#include -#include - -#include +#include #include -#include #include #include #include @@ -34,21 +29,17 @@ #include #include #include -#include #include #include #include -class StdFail_NotDone; -class Standard_OutOfRange; + class IntSurf_PathPoint; class IntSurf_PathPointTool; class IntSurf_InteriorPoint; class IntSurf_InteriorPointTool; -class Adaptor3d_HSurface; class Adaptor3d_HSurfaceTool; class Contap_SurfFunction; class Contap_TheIWLineOfTheIWalking; -class IntSurf_PntOn2S; class math_FunctionSetRoot; class Contap_TheIWalking @@ -81,11 +72,11 @@ public: //! Searches a set of polylines starting on a point of Pnts1 //! or Pnts2. //! Each point on a resulting polyline verifies F(u,v)=0 - Standard_EXPORT void Perform (const IntSurf_SequenceOfPathPoint& Pnts1, const IntSurf_SequenceOfInteriorPoint& Pnts2, Contap_SurfFunction& Func, const Handle(Adaptor3d_HSurface)& S, const Standard_Boolean Reversed = Standard_False); + Standard_EXPORT void Perform (const IntSurf_SequenceOfPathPoint& Pnts1, const IntSurf_SequenceOfInteriorPoint& Pnts2, Contap_SurfFunction& Func, const Handle(Adaptor3d_Surface)& S, const Standard_Boolean Reversed = Standard_False); //! Searches a set of polylines starting on a point of Pnts1. //! Each point on a resulting polyline verifies F(u,v)=0 - Standard_EXPORT void Perform (const IntSurf_SequenceOfPathPoint& Pnts1, Contap_SurfFunction& Func, const Handle(Adaptor3d_HSurface)& S, const Standard_Boolean Reversed = Standard_False); + Standard_EXPORT void Perform (const IntSurf_SequenceOfPathPoint& Pnts1, Contap_SurfFunction& Func, const Handle(Adaptor3d_Surface)& S, const Standard_Boolean Reversed = Standard_False); //! Returns true if the calculus was successful. Standard_Boolean IsDone() const; @@ -203,8 +194,8 @@ private: #define ThePointOfLoopTool_hxx #define ThePOLIterator IntSurf_SequenceOfInteriorPoint #define ThePOLIterator_hxx -#define ThePSurface Handle(Adaptor3d_HSurface) -#define ThePSurface_hxx +#define ThePSurface Handle(Adaptor3d_Surface) +#define ThePSurface_hxx #define ThePSurfaceTool Adaptor3d_HSurfaceTool #define ThePSurfaceTool_hxx #define TheIWFunction Contap_SurfFunction diff --git a/src/Contap/Contap_TheIWalking_0.cxx b/src/Contap/Contap_TheIWalking_0.cxx index 9345921ca2..b36dc19036 100644 --- a/src/Contap/Contap_TheIWalking_0.cxx +++ b/src/Contap/Contap_TheIWalking_0.cxx @@ -22,7 +22,7 @@ #include #include #include -#include +#include #include #include #include @@ -41,8 +41,8 @@ #define ThePointOfLoopTool_hxx #define ThePOLIterator IntSurf_SequenceOfInteriorPoint #define ThePOLIterator_hxx -#define ThePSurface Handle(Adaptor3d_HSurface) -#define ThePSurface_hxx +#define ThePSurface Handle(Adaptor3d_Surface) +#define ThePSurface_hxx #define ThePSurfaceTool Adaptor3d_HSurfaceTool #define ThePSurfaceTool_hxx #define TheIWFunction Contap_SurfFunction diff --git a/src/Contap/Contap_ThePathPointOfTheSearch.hxx b/src/Contap/Contap_ThePathPointOfTheSearch.hxx index ce66077734..cb3e0910ac 100644 --- a/src/Contap/Contap_ThePathPointOfTheSearch.hxx +++ b/src/Contap/Contap_ThePathPointOfTheSearch.hxx @@ -17,20 +17,13 @@ #ifndef _Contap_ThePathPointOfTheSearch_HeaderFile #define _Contap_ThePathPointOfTheSearch_HeaderFile -#include -#include -#include - +#include #include -#include -#include + class Adaptor3d_HVertex; -class Adaptor2d_HCurve2d; class Standard_DomainError; class gp_Pnt; - - class Contap_ThePathPointOfTheSearch { public: @@ -40,13 +33,13 @@ public: Standard_EXPORT Contap_ThePathPointOfTheSearch(); - Standard_EXPORT Contap_ThePathPointOfTheSearch(const gp_Pnt& P, const Standard_Real Tol, const Handle(Adaptor3d_HVertex)& V, const Handle(Adaptor2d_HCurve2d)& A, const Standard_Real Parameter); + Standard_EXPORT Contap_ThePathPointOfTheSearch(const gp_Pnt& P, const Standard_Real Tol, const Handle(Adaptor3d_HVertex)& V, const Handle(Adaptor2d_Curve2d)& A, const Standard_Real Parameter); - Standard_EXPORT Contap_ThePathPointOfTheSearch(const gp_Pnt& P, const Standard_Real Tol, const Handle(Adaptor2d_HCurve2d)& A, const Standard_Real Parameter); + Standard_EXPORT Contap_ThePathPointOfTheSearch(const gp_Pnt& P, const Standard_Real Tol, const Handle(Adaptor2d_Curve2d)& A, const Standard_Real Parameter); - void SetValue (const gp_Pnt& P, const Standard_Real Tol, const Handle(Adaptor3d_HVertex)& V, const Handle(Adaptor2d_HCurve2d)& A, const Standard_Real Parameter); + void SetValue (const gp_Pnt& P, const Standard_Real Tol, const Handle(Adaptor3d_HVertex)& V, const Handle(Adaptor2d_Curve2d)& A, const Standard_Real Parameter); - void SetValue (const gp_Pnt& P, const Standard_Real Tol, const Handle(Adaptor2d_HCurve2d)& A, const Standard_Real Parameter); + void SetValue (const gp_Pnt& P, const Standard_Real Tol, const Handle(Adaptor2d_Curve2d)& A, const Standard_Real Parameter); const gp_Pnt& Value() const; @@ -56,7 +49,7 @@ public: const Handle(Adaptor3d_HVertex)& Vertex() const; - const Handle(Adaptor2d_HCurve2d)& Arc() const; + const Handle(Adaptor2d_Curve2d)& Arc() const; Standard_Real Parameter() const; @@ -77,7 +70,7 @@ private: Standard_Real tol; Standard_Boolean isnew; Handle(Adaptor3d_HVertex) vtx; - Handle(Adaptor2d_HCurve2d) arc; + Handle(Adaptor2d_Curve2d) arc; Standard_Real param; @@ -85,8 +78,8 @@ private: #define TheVertex Handle(Adaptor3d_HVertex) #define TheVertex_hxx -#define TheArc Handle(Adaptor2d_HCurve2d) -#define TheArc_hxx +#define TheArc Handle(Adaptor2d_Curve2d) +#define TheArc_hxx #define IntStart_PathPoint Contap_ThePathPointOfTheSearch #define IntStart_PathPoint_hxx diff --git a/src/Contap/Contap_ThePathPointOfTheSearch_0.cxx b/src/Contap/Contap_ThePathPointOfTheSearch_0.cxx index c0c0fbb6a4..de4b2bb6a8 100644 --- a/src/Contap/Contap_ThePathPointOfTheSearch_0.cxx +++ b/src/Contap/Contap_ThePathPointOfTheSearch_0.cxx @@ -17,15 +17,15 @@ #include #include -#include +#include #include #include #define TheVertex Handle(Adaptor3d_HVertex) #define TheVertex_hxx -#define TheArc Handle(Adaptor2d_HCurve2d) -#define TheArc_hxx +#define TheArc Handle(Adaptor2d_Curve2d) +#define TheArc_hxx #define IntStart_PathPoint Contap_ThePathPointOfTheSearch #define IntStart_PathPoint_hxx #include diff --git a/src/Contap/Contap_TheSearch.hxx b/src/Contap/Contap_TheSearch.hxx index 8809d0f6f7..f9b082905e 100644 --- a/src/Contap/Contap_TheSearch.hxx +++ b/src/Contap/Contap_TheSearch.hxx @@ -30,7 +30,6 @@ class StdFail_NotDone; class Standard_OutOfRange; class Standard_ConstructionError; class Adaptor3d_HVertex; -class Adaptor2d_HCurve2d; class Contap_HCurve2dTool; class Contap_HContTool; class Adaptor3d_TopolTool; @@ -108,8 +107,8 @@ private: #define TheVertex Handle(Adaptor3d_HVertex) #define TheVertex_hxx -#define TheArc Handle(Adaptor2d_HCurve2d) -#define TheArc_hxx +#define TheArc Handle(Adaptor2d_Curve2d) +#define TheArc_hxx #define TheArcTool Contap_HCurve2dTool #define TheArcTool_hxx #define TheSOBTool Contap_HContTool diff --git a/src/Contap/Contap_TheSearchInside.hxx b/src/Contap/Contap_TheSearchInside.hxx index 0b069372fd..706a727b51 100644 --- a/src/Contap/Contap_TheSearchInside.hxx +++ b/src/Contap/Contap_TheSearchInside.hxx @@ -17,25 +17,15 @@ #ifndef _Contap_TheSearchInside_HeaderFile #define _Contap_TheSearchInside_HeaderFile -#include -#include -#include - -#include +#include #include -#include -#include -class StdFail_NotDone; -class Standard_OutOfRange; -class Adaptor3d_HSurface; + class Adaptor3d_HSurfaceTool; class Adaptor3d_TopolTool; class Contap_HContTool; class Contap_SurfFunction; class IntSurf_InteriorPoint; - - class Contap_TheSearchInside { public: @@ -45,11 +35,11 @@ public: Standard_EXPORT Contap_TheSearchInside(); - Standard_EXPORT Contap_TheSearchInside(Contap_SurfFunction& F, const Handle(Adaptor3d_HSurface)& Surf, const Handle(Adaptor3d_TopolTool)& T, const Standard_Real Epsilon); + Standard_EXPORT Contap_TheSearchInside(Contap_SurfFunction& F, const Handle(Adaptor3d_Surface)& Surf, const Handle(Adaptor3d_TopolTool)& T, const Standard_Real Epsilon); - Standard_EXPORT void Perform (Contap_SurfFunction& F, const Handle(Adaptor3d_HSurface)& Surf, const Handle(Adaptor3d_TopolTool)& T, const Standard_Real Epsilon); + Standard_EXPORT void Perform (Contap_SurfFunction& F, const Handle(Adaptor3d_Surface)& Surf, const Handle(Adaptor3d_TopolTool)& T, const Standard_Real Epsilon); - Standard_EXPORT void Perform (Contap_SurfFunction& F, const Handle(Adaptor3d_HSurface)& Surf, const Standard_Real UStart, const Standard_Real VStart); + Standard_EXPORT void Perform (Contap_SurfFunction& F, const Handle(Adaptor3d_Surface)& Surf, const Standard_Real UStart, const Standard_Real VStart); Standard_Boolean IsDone() const; @@ -84,8 +74,8 @@ private: }; -#define ThePSurface Handle(Adaptor3d_HSurface) -#define ThePSurface_hxx +#define ThePSurface Handle(Adaptor3d_Surface) +#define ThePSurface_hxx #define ThePSurfaceTool Adaptor3d_HSurfaceTool #define ThePSurfaceTool_hxx #define Handle_TheTopolTool Handle(Adaptor3d_TopolTool) diff --git a/src/Contap/Contap_TheSearchInside_0.cxx b/src/Contap/Contap_TheSearchInside_0.cxx index f7289c4702..96baf7af99 100644 --- a/src/Contap/Contap_TheSearchInside_0.cxx +++ b/src/Contap/Contap_TheSearchInside_0.cxx @@ -18,7 +18,7 @@ #include #include -#include +#include #include #include #include @@ -26,8 +26,8 @@ #include -#define ThePSurface Handle(Adaptor3d_HSurface) -#define ThePSurface_hxx +#define ThePSurface Handle(Adaptor3d_Surface) +#define ThePSurface_hxx #define ThePSurfaceTool Adaptor3d_HSurfaceTool #define ThePSurfaceTool_hxx #define Handle_TheTopolTool Handle(Adaptor3d_TopolTool) diff --git a/src/Contap/Contap_TheSearch_0.cxx b/src/Contap/Contap_TheSearch_0.cxx index ca23e32721..20e3b56e9b 100644 --- a/src/Contap/Contap_TheSearch_0.cxx +++ b/src/Contap/Contap_TheSearch_0.cxx @@ -20,7 +20,7 @@ #include #include #include -#include +#include #include #include #include @@ -32,8 +32,8 @@ #define TheVertex Handle(Adaptor3d_HVertex) #define TheVertex_hxx -#define TheArc Handle(Adaptor2d_HCurve2d) -#define TheArc_hxx +#define TheArc Handle(Adaptor2d_Curve2d) +#define TheArc_hxx #define TheArcTool Contap_HCurve2dTool #define TheArcTool_hxx #define TheSOBTool Contap_HContTool diff --git a/src/Contap/Contap_TheSegmentOfTheSearch.hxx b/src/Contap/Contap_TheSegmentOfTheSearch.hxx index 409255b306..b3158ad827 100644 --- a/src/Contap/Contap_TheSegmentOfTheSearch.hxx +++ b/src/Contap/Contap_TheSegmentOfTheSearch.hxx @@ -17,19 +17,13 @@ #ifndef _Contap_TheSegmentOfTheSearch_HeaderFile #define _Contap_TheSegmentOfTheSearch_HeaderFile -#include -#include -#include - -#include +#include #include -class Adaptor2d_HCurve2d; + class Standard_DomainError; class Adaptor3d_HVertex; class Contap_ThePathPointOfTheSearch; - - class Contap_TheSegmentOfTheSearch { public: @@ -41,7 +35,7 @@ public: Standard_EXPORT Contap_TheSegmentOfTheSearch(); //! Defines the concerned arc. - void SetValue (const Handle(Adaptor2d_HCurve2d)& A); + void SetValue (const Handle(Adaptor2d_Curve2d)& A); //! Defines the first point or the last point, //! depending on the value of the boolean First. @@ -49,7 +43,7 @@ public: //! Returns the geometric curve on the surface 's domain //! which is solution. - const Handle(Adaptor2d_HCurve2d)& Curve() const; + const Handle(Adaptor2d_Curve2d)& Curve() const; //! Returns True if there is a vertex (ThePathPoint) defining //! the lowest valid parameter on the arc. @@ -78,7 +72,7 @@ private: - Handle(Adaptor2d_HCurve2d) arc; + Handle(Adaptor2d_Curve2d) arc; Standard_Boolean hasfp; Contap_ThePathPointOfTheSearch thefp; Standard_Boolean haslp; @@ -89,8 +83,8 @@ private: #define TheVertex Handle(Adaptor3d_HVertex) #define TheVertex_hxx -#define TheArc Handle(Adaptor2d_HCurve2d) -#define TheArc_hxx +#define TheArc Handle(Adaptor2d_Curve2d) +#define TheArc_hxx #define ThePathPoint Contap_ThePathPointOfTheSearch #define ThePathPoint_hxx #define IntStart_Segment Contap_TheSegmentOfTheSearch diff --git a/src/Contap/Contap_TheSegmentOfTheSearch_0.cxx b/src/Contap/Contap_TheSegmentOfTheSearch_0.cxx index f8477f0a40..ef238f8ebe 100644 --- a/src/Contap/Contap_TheSegmentOfTheSearch_0.cxx +++ b/src/Contap/Contap_TheSegmentOfTheSearch_0.cxx @@ -16,7 +16,7 @@ #include -#include +#include #include #include #include @@ -24,8 +24,8 @@ #define TheVertex Handle(Adaptor3d_HVertex) #define TheVertex_hxx -#define TheArc Handle(Adaptor2d_HCurve2d) -#define TheArc_hxx +#define TheArc Handle(Adaptor2d_Curve2d) +#define TheArc_hxx #define ThePathPoint Contap_ThePathPointOfTheSearch #define ThePathPoint_hxx #define IntStart_Segment Contap_TheSegmentOfTheSearch diff --git a/src/DBRep/DBRep_DrawableShape.cxx b/src/DBRep/DBRep_DrawableShape.cxx index 5b144cd67a..a68f49f7e4 100644 --- a/src/DBRep/DBRep_DrawableShape.cxx +++ b/src/DBRep/DBRep_DrawableShape.cxx @@ -15,7 +15,7 @@ // commercial license or contractual agreement. -#include +#include #include #include #include @@ -35,7 +35,7 @@ #include #include #include -#include +#include #include #include #include @@ -666,7 +666,7 @@ void DBRep_DrawableShape::DrawOn(Draw_Display& dis) const l = f + mySize; } - Handle(Adaptor3d_HCurve) HC = C.Trim(f, l, Precision::Confusion()); + Handle(Adaptor3d_Curve) HC = C.Trim(f, l, Precision::Confusion()); GeomAbs_CurveType CurvType = HC->GetType(); Standard_Integer intrv, nbintv = HC->NbIntervals(GeomAbs_CN); @@ -706,7 +706,7 @@ void DBRep_DrawableShape::DrawOn(Draw_Display& dis) const for (j = 1; j <= myDiscret/2; j++) { Handle(DBRep_Edge) aLocaLEdge(E); PlotCount = 0; - PlotEdge (dis, aLocaLEdge , HC->Curve(), t, step*2., halt); + PlotEdge (dis, aLocaLEdge, *HC, t, step*2., halt); t += step*2.; } break; diff --git a/src/DNaming/DNaming_BooleanOperationDriver.cxx b/src/DNaming/DNaming_BooleanOperationDriver.cxx index 6f6db1d58c..3caacfaffd 100644 --- a/src/DNaming/DNaming_BooleanOperationDriver.cxx +++ b/src/DNaming/DNaming_BooleanOperationDriver.cxx @@ -14,7 +14,7 @@ // commercial license or contractual agreement. -#include +#include #include #include #include @@ -192,7 +192,7 @@ static TopAbs_ShapeEnum ShapeType(const TopoDS_Shape& theShape) { //===================================================================== static Standard_Boolean IsValidSurfType(const TopoDS_Face& theFace) { BRepAdaptor_Surface anAdapt(theFace); - Handle( Adaptor3d_HCurve ) aBasisCurve; + Handle( Adaptor3d_Curve ) aBasisCurve; const GeomAbs_SurfaceType& aType = anAdapt.GetType(); if(aType == GeomAbs_Sphere) return Standard_True; diff --git a/src/Draft/Draft_Modification_1.cxx b/src/Draft/Draft_Modification_1.cxx index d31e0c8869..b2941a5134 100644 --- a/src/Draft/Draft_Modification_1.cxx +++ b/src/Draft/Draft_Modification_1.cxx @@ -15,7 +15,7 @@ // commercial license or contractual agreement. #include -#include +#include #include #include #include @@ -36,7 +36,7 @@ #include #include #include -#include +#include #include #include #include @@ -57,8 +57,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include @@ -590,7 +590,7 @@ Standard_Boolean Draft_Modification::Propagate () } if (Vinf.MoreEdge()) { Handle(Geom_Curve) C2 = BRep_Tool::Curve(Vinf.Edge(), Loc,f,l); - Handle(GeomAdaptor_HCurve) HCur; + Handle(GeomAdaptor_Curve) HCur; gp_Vec Direc; C2 = Handle(Geom_Curve)::DownCast (C2->Transformed(Loc.Transformation())); @@ -599,12 +599,12 @@ Standard_Boolean Draft_Modification::Propagate () } if (C->DynamicType() == STANDARD_TYPE(Geom_Line)) { Direc = Handle(Geom_Line)::DownCast(C)->Lin().Direction(); - HCur = new GeomAdaptor_HCurve(C2); + HCur = new GeomAdaptor_Curve(C2); } else if (C2->DynamicType() == STANDARD_TYPE(Geom_Line)) { Direc = Handle(Geom_Line)::DownCast(C2)->Lin().Direction(); - HCur = new GeomAdaptor_HCurve(C); + HCur = new GeomAdaptor_Curve(C); } else { badShape = EK; @@ -626,9 +626,7 @@ Standard_Boolean Draft_Modification::Propagate () break; default : { - S2 = new Geom_SurfaceOfLinearExtrusion(HCur->ChangeCurve(). - Curve(), - Direc); + S2 = new Geom_SurfaceOfLinearExtrusion (HCur->Curve(), Direc); } break; } @@ -1335,13 +1333,13 @@ void Draft_Modification::Perform () // Calculate new vertices. - Handle(GeomAdaptor_HCurve) HAC = new GeomAdaptor_HCurve; - Handle(GeomAdaptor_HSurface) HAS = new GeomAdaptor_HSurface; + Handle(GeomAdaptor_Curve) HAC = new GeomAdaptor_Curve; + Handle(GeomAdaptor_Surface) HAS = new GeomAdaptor_Surface; for (Standard_Integer ii = 1; ii <= myVMap.Extent(); ii++) { - GeomAdaptor_Curve AC; - GeomAdaptor_Surface AS; + GeomAdaptor_Curve& AC = *HAC; + GeomAdaptor_Surface& AS = *HAS; const TopoDS_Vertex& TVV = myVMap.FindKey(ii); Draft_VertexInfo& Vinf = myVMap.ChangeFromIndex(ii); @@ -1424,12 +1422,7 @@ void Draft_Modification::Perform () } IntCurveSurface_HInter myintcs; - HAC->Set(AC); - HAS->Set(AS); - myintcs.Perform(HAC,HAS); - - if (!myintcs.IsDone()) { errStat = Draft_VertexRecomputation; badShape = TVV; @@ -2158,16 +2151,14 @@ static Standard_Real SmartParameter(Draft_EdgeInfo& Einf, NewC2d = BCurve; } Einf.ChangeFirstPC() = NewC2d; - Handle( Geom2dAdaptor_HCurve ) hcur = new Geom2dAdaptor_HCurve( NewC2d ); - Handle( GeomAdaptor_HSurface ) hsur = new GeomAdaptor_HSurface( S1 ); + Handle( Geom2dAdaptor_Curve ) hcur = new Geom2dAdaptor_Curve( NewC2d ); + Handle( GeomAdaptor_Surface ) hsur = new GeomAdaptor_Surface( S1 ); Adaptor3d_CurveOnSurface cons( hcur, hsur ); - Handle( Adaptor3d_HCurveOnSurface ) hcons = new Adaptor3d_HCurveOnSurface( cons ); - Handle( GeomAdaptor_HSurface ) hsur2 = new GeomAdaptor_HSurface( S2 ); - ProjLib_CompProjectedCurve ProjCurve( hsur2, hcons, Tol, Tol ); - Handle(ProjLib_HCompProjectedCurve) HProjector = new ProjLib_HCompProjectedCurve(); - HProjector->Set( ProjCurve ); + Handle( Adaptor3d_CurveOnSurface ) hcons = new Adaptor3d_CurveOnSurface( cons ); + Handle( GeomAdaptor_Surface ) hsur2 = new GeomAdaptor_Surface( S2 ); + Handle(ProjLib_HCompProjectedCurve) HProjector = new ProjLib_HCompProjectedCurve (hsur2, hcons, Tol, Tol); Standard_Real Udeb, Ufin; - ProjCurve.Bounds(1, Udeb, Ufin); + HProjector->Bounds(1, Udeb, Ufin); Standard_Integer MaxSeg = 20 + HProjector->NbIntervals(GeomAbs_C3); Approx_CurveOnSurface appr(HProjector, hsur2, Udeb, Ufin, Tol); appr.Perform(MaxSeg, 10, GeomAbs_C1, Standard_False, Standard_False); diff --git a/src/DrawTrSurf/DrawTrSurf_BSplineSurface.cxx b/src/DrawTrSurf/DrawTrSurf_BSplineSurface.cxx index d265ff020b..37987f38fe 100644 --- a/src/DrawTrSurf/DrawTrSurf_BSplineSurface.cxx +++ b/src/DrawTrSurf/DrawTrSurf_BSplineSurface.cxx @@ -21,7 +21,7 @@ #include #include #include -#include +#include #include #include #include @@ -124,8 +124,8 @@ void DrawTrSurf_BSplineSurface::DrawOn (Draw_Display& dis) const { if (knotsIsos) { Standard_Integer first, last; - Handle(GeomAdaptor_HSurface) HS = new GeomAdaptor_HSurface(); - HS->ChangeSurface().Load(surf); + Handle(GeomAdaptor_Surface) HS = new GeomAdaptor_Surface(); + HS->Load(surf); Adaptor3d_IsoCurve C(HS); diff --git a/src/DrawTrSurf/DrawTrSurf_Surface.cxx b/src/DrawTrSurf/DrawTrSurf_Surface.cxx index dee629db2f..87b44ef105 100644 --- a/src/DrawTrSurf/DrawTrSurf_Surface.cxx +++ b/src/DrawTrSurf/DrawTrSurf_Surface.cxx @@ -19,7 +19,7 @@ #include #include #include -#include +#include #include #include #include @@ -170,8 +170,8 @@ void DrawTrSurf_Surface::DrawOn (Draw_Display& dis, } - Handle(GeomAdaptor_HSurface) HS = new GeomAdaptor_HSurface(); - HS->ChangeSurface().Load(surf,UFirst,ULast,VFirst,VLast); + Handle(GeomAdaptor_Surface) HS = new GeomAdaptor_Surface(); + HS->Load(surf,UFirst,ULast,VFirst,VLast); Adaptor3d_IsoCurve C(HS); diff --git a/src/Extrema/Extrema_ExtPExtS.cxx b/src/Extrema/Extrema_ExtPExtS.cxx index bd8a0ec159..73f71a2c7a 100644 --- a/src/Extrema/Extrema_ExtPExtS.cxx +++ b/src/Extrema/Extrema_ExtPExtS.cxx @@ -17,7 +17,7 @@ #include #include #include -#include +#include #include #include #include @@ -33,16 +33,16 @@ #include #include #include -#include +#include IMPLEMENT_STANDARD_RTTIEXT(Extrema_ExtPExtS,Standard_Transient) -static gp_Ax2 GetPosition (const Handle(Adaptor3d_HCurve)& C); +static gp_Ax2 GetPosition (const Handle(Adaptor3d_Curve)& C); static void PerformExtPElC (Extrema_ExtPElC& E, const gp_Pnt& P, - const Handle(Adaptor3d_HCurve)& C, + const Handle(Adaptor3d_Curve)& C, const Standard_Real Tol); static Standard_Boolean @@ -51,7 +51,7 @@ static Standard_Boolean const gp_Dir& theSurfaceDirection) ; static gp_Pnt GetValue(const Standard_Real U, - const Handle(Adaptor3d_HCurve)& C); + const Handle(Adaptor3d_Curve)& C); //======================================================================= //function : Project //purpose : Returns the projection of a point on a plane @@ -164,7 +164,7 @@ Extrema_ExtPExtS::Extrema_ExtPExtS() //============================================================================= Extrema_ExtPExtS::Extrema_ExtPExtS (const gp_Pnt& theP, - const Handle(GeomAdaptor_HSurfaceOfLinearExtrusion)& theS, + const Handle(GeomAdaptor_SurfaceOfLinearExtrusion)& theS, const Standard_Real theUmin, const Standard_Real theUsup, const Standard_Real theVmin, @@ -199,7 +199,7 @@ Extrema_ExtPExtS::Extrema_ExtPExtS (const gp_Pnt& //============================================================================= Extrema_ExtPExtS::Extrema_ExtPExtS (const gp_Pnt& theP, - const Handle(GeomAdaptor_HSurfaceOfLinearExtrusion)& theS, + const Handle(GeomAdaptor_SurfaceOfLinearExtrusion)& theS, const Standard_Real theTolU, const Standard_Real theTolV) : myuinf(theS->FirstUParameter()), @@ -233,7 +233,7 @@ Extrema_ExtPExtS::Extrema_ExtPExtS (const gp_Pnt& //purpose : //======================================================================= -void Extrema_ExtPExtS::Initialize (const Handle(GeomAdaptor_HSurfaceOfLinearExtrusion)& theS, +void Extrema_ExtPExtS::Initialize (const Handle(GeomAdaptor_SurfaceOfLinearExtrusion)& theS, const Standard_Real theUinf, const Standard_Real theUsup, const Standard_Real theVinf, @@ -253,9 +253,9 @@ void Extrema_ExtPExtS::Initialize (const Handle(GeomAdaptor_HSurfaceOfLinearExtr myDone = Standard_False; myNbExt = 0; - Handle(Adaptor3d_HCurve) anACurve = theS->BasisCurve(); + Handle(Adaptor3d_Curve) anACurve = theS->BasisCurve(); - myF.Initialize (theS->ChangeSurface()); + myF.Initialize (*theS); myC = anACurve; myS = theS; myPosition = GetPosition(myC); @@ -265,7 +265,7 @@ void Extrema_ExtPExtS::Initialize (const Handle(GeomAdaptor_HSurfaceOfLinearExtr if (!myIsAnalyticallyComputable) { - myExtPS.Initialize (theS->ChangeSurface(), + myExtPS.Initialize (*theS, 32, 32, theUinf, @@ -496,7 +496,7 @@ const Extrema_POnSurf& Extrema_ExtPExtS::Point (const Standard_Integer N) const //============================================================================= -static gp_Ax2 GetPosition (const Handle(Adaptor3d_HCurve)& C) +static gp_Ax2 GetPosition (const Handle(Adaptor3d_Curve)& C) { switch (C->GetType()) { case GeomAbs_Line: { @@ -525,7 +525,7 @@ static gp_Ax2 GetPosition (const Handle(Adaptor3d_HCurve)& C) static void PerformExtPElC (Extrema_ExtPElC& E, const gp_Pnt& P, - const Handle(Adaptor3d_HCurve)& C, + const Handle(Adaptor3d_Curve)& C, const Standard_Real Tol) { switch (C->GetType()) { @@ -582,7 +582,7 @@ static Standard_Boolean IsCaseAnalyticallyComputable //======================================================================= static gp_Pnt GetValue(const Standard_Real U, - const Handle(Adaptor3d_HCurve)& C) + const Handle(Adaptor3d_Curve)& C) { switch (C->GetType()) { case GeomAbs_Line: @@ -606,7 +606,7 @@ static gp_Pnt GetValue(const Standard_Real U, //#ifdef OCCT_DEBUG //static Standard_Real GetU(const gp_Vec& vec, // const gp_Pnt& P, -// const Handle(Adaptor3d_HCurve)& C) +// const Handle(Adaptor3d_Curve)& C) //{ // switch (C->GetType()) { // case GeomAbs_Line: diff --git a/src/Extrema/Extrema_ExtPExtS.hxx b/src/Extrema/Extrema_ExtPExtS.hxx index 67b50a54f7..5701ee1ed3 100644 --- a/src/Extrema/Extrema_ExtPExtS.hxx +++ b/src/Extrema/Extrema_ExtPExtS.hxx @@ -17,28 +17,13 @@ #ifndef _Extrema_ExtPExtS_HeaderFile #define _Extrema_ExtPExtS_HeaderFile -#include -#include - -#include -#include -#include -#include #include -#include -#include +#include #include -#include -class Adaptor3d_HCurve; -class GeomAdaptor_HSurfaceOfLinearExtrusion; -class StdFail_NotDone; -class Standard_OutOfRange; -class gp_Pnt; -class Extrema_POnSurf; -class gp_Ax2; +#include +#include +#include - -class Extrema_ExtPExtS; DEFINE_STANDARD_HANDLE(Extrema_ExtPExtS, Standard_Transient) //! It calculates all the extremum (minimum and @@ -54,14 +39,14 @@ public: //! It calculates all the distances between a point //! from gp and a Surface. - Standard_EXPORT Extrema_ExtPExtS(const gp_Pnt& P, const Handle(GeomAdaptor_HSurfaceOfLinearExtrusion)& S, const Standard_Real Umin, const Standard_Real Usup, const Standard_Real Vmin, const Standard_Real Vsup, const Standard_Real TolU, const Standard_Real TolV); + Standard_EXPORT Extrema_ExtPExtS(const gp_Pnt& P, const Handle(GeomAdaptor_SurfaceOfLinearExtrusion)& S, const Standard_Real Umin, const Standard_Real Usup, const Standard_Real Vmin, const Standard_Real Vsup, const Standard_Real TolU, const Standard_Real TolV); //! It calculates all the distances between a point //! from gp and a Surface. - Standard_EXPORT Extrema_ExtPExtS(const gp_Pnt& P, const Handle(GeomAdaptor_HSurfaceOfLinearExtrusion)& S, const Standard_Real TolU, const Standard_Real TolV); + Standard_EXPORT Extrema_ExtPExtS(const gp_Pnt& P, const Handle(GeomAdaptor_SurfaceOfLinearExtrusion)& S, const Standard_Real TolU, const Standard_Real TolV); //! Initializes the fields of the algorithm. - Standard_EXPORT void Initialize (const Handle(GeomAdaptor_HSurfaceOfLinearExtrusion)& S, const Standard_Real Uinf, const Standard_Real Usup, const Standard_Real Vinf, const Standard_Real Vsup, const Standard_Real TolU, const Standard_Real TolV); + Standard_EXPORT void Initialize (const Handle(GeomAdaptor_SurfaceOfLinearExtrusion)& S, const Standard_Real Uinf, const Standard_Real Usup, const Standard_Real Vinf, const Standard_Real Vsup, const Standard_Real TolU, const Standard_Real TolV); Standard_EXPORT void Perform (const gp_Pnt& P); @@ -99,8 +84,8 @@ private: Standard_Real myvsup; Standard_Real mytolv; Extrema_FuncPSNorm myF; - Handle(Adaptor3d_HCurve) myC; - Handle(GeomAdaptor_HSurfaceOfLinearExtrusion) myS; + Handle(Adaptor3d_Curve) myC; + Handle(GeomAdaptor_SurfaceOfLinearExtrusion) myS; gp_Vec myDirection; gp_Ax2 myPosition; Extrema_GenExtPS myExtPS; diff --git a/src/Extrema/Extrema_ExtPRevS.cxx b/src/Extrema/Extrema_ExtPRevS.cxx index c7388416fc..4f9c1f212b 100644 --- a/src/Extrema/Extrema_ExtPRevS.cxx +++ b/src/Extrema/Extrema_ExtPRevS.cxx @@ -15,8 +15,8 @@ // commercial license or contractual agreement. -#include -#include +#include +#include #include #include #include @@ -39,7 +39,7 @@ IMPLEMENT_STANDARD_RTTIEXT(Extrema_ExtPRevS,Standard_Transient) static gp_Ax2 GetPosition (const GeomAdaptor_SurfaceOfRevolution& S)//const Handle(Adaptor_HCurve)& C) { - Handle(Adaptor3d_HCurve) C = S.BasisCurve(); + Handle(Adaptor3d_Curve) C = S.BasisCurve(); switch (C->GetType()) { @@ -81,7 +81,7 @@ static gp_Ax2 GetPosition (const GeomAdaptor_SurfaceOfRevolution& S)//const Hand static Standard_Boolean HasSingularity(const GeomAdaptor_SurfaceOfRevolution& S) { - const Handle(Adaptor3d_HCurve) C = S.BasisCurve(); + const Handle(Adaptor3d_Curve) C = S.BasisCurve(); gp_Dir N = S.AxeOfRevolution().Direction(); gp_Pnt P = S.AxeOfRevolution().Location(); @@ -102,7 +102,7 @@ static Standard_Boolean HasSingularity(const GeomAdaptor_SurfaceOfRevolution& S) static void PerformExtPElC (Extrema_ExtPElC& E, const gp_Pnt& P, - const Handle(Adaptor3d_HCurve)& C, + const Handle(Adaptor3d_Curve)& C, const Standard_Real Tol) { switch (C->GetType()) { @@ -227,7 +227,7 @@ Extrema_ExtPRevS::Extrema_ExtPRevS() //======================================================================= Extrema_ExtPRevS::Extrema_ExtPRevS (const gp_Pnt& theP, - const Handle(GeomAdaptor_HSurfaceOfRevolution)& theS, + const Handle(GeomAdaptor_SurfaceOfRevolution)& theS, const Standard_Real theUmin, const Standard_Real theUsup, const Standard_Real theVmin, @@ -251,7 +251,7 @@ Extrema_ExtPRevS::Extrema_ExtPRevS (const gp_Pnt& //======================================================================= Extrema_ExtPRevS::Extrema_ExtPRevS (const gp_Pnt& theP, - const Handle(GeomAdaptor_HSurfaceOfRevolution)& theS, + const Handle(GeomAdaptor_SurfaceOfRevolution)& theS, const Standard_Real theTolU, const Standard_Real theTolV) { @@ -270,7 +270,7 @@ Extrema_ExtPRevS::Extrema_ExtPRevS (const gp_Pnt& //purpose : //======================================================================= -void Extrema_ExtPRevS::Initialize (const Handle(GeomAdaptor_HSurfaceOfRevolution)& theS, +void Extrema_ExtPRevS::Initialize (const Handle(GeomAdaptor_SurfaceOfRevolution)& theS, const Standard_Real theUmin, const Standard_Real theUsup, const Standard_Real theVmin, @@ -286,12 +286,12 @@ void Extrema_ExtPRevS::Initialize (const Handle(GeomAdaptor_HSurfaceOfRevolution myNbExt = 0; myIsAnalyticallyComputable = Standard_False; - Handle(Adaptor3d_HCurve) anACurve = theS->BasisCurve(); + Handle(Adaptor3d_Curve) anACurve = theS->BasisCurve(); if (myS != theS) { myS = theS; - myPosition = GetPosition (theS->ChangeSurface()); + myPosition = GetPosition (*theS); myIsAnalyticallyComputable = IsCaseAnalyticallyComputable (anACurve->GetType(), myPosition, theS->AxeOfRevolution()); } @@ -300,12 +300,12 @@ void Extrema_ExtPRevS::Initialize (const Handle(GeomAdaptor_HSurfaceOfRevolution { Standard_Integer aNbu = 32, aNbv = 32; - if (HasSingularity (theS->ChangeSurface())) + if (HasSingularity (*theS)) { aNbv = 100; } - myExtPS.Initialize (theS->ChangeSurface(), + myExtPS.Initialize (*theS, aNbu, aNbv, theUmin, @@ -334,7 +334,7 @@ void Extrema_ExtPRevS::Perform(const gp_Pnt& P) return; } - Handle(Adaptor3d_HCurve) anACurve = myS->BasisCurve(); + Handle(Adaptor3d_Curve) anACurve = myS->BasisCurve(); gp_Ax1 Ax = myS->AxeOfRevolution(); gp_Vec Dir = Ax.Direction(), Z = myPosition.Direction(); @@ -406,7 +406,7 @@ void Extrema_ExtPRevS::Perform(const gp_Pnt& P) } V = newV; - if ( !IsExtremum (U, V, P, &(myS->ChangeSurface()), E, Dist2, + if ( !IsExtremum (U, V, P, myS.get(), E, Dist2, Standard_True, anExt.IsMin(i))) { continue; } @@ -432,7 +432,7 @@ void Extrema_ExtPRevS::Perform(const gp_Pnt& P) } V = newV; - if ( !IsExtremum (U, V, P, &(myS->ChangeSurface()), E, Dist2, + if ( !IsExtremum (U, V, P, myS.get(), E, Dist2, Standard_False, anExt.IsMin(i))) continue; } else { E = myS->Value(U,V); @@ -479,7 +479,7 @@ void Extrema_ExtPRevS::Perform(const gp_Pnt& P) } V = newV; - if ( !IsExtremum (U, V, P, &(myS->ChangeSurface()), E, Dist2, + if ( !IsExtremum (U, V, P, myS.get(), E, Dist2, Standard_True, anExt.IsMin(i))) continue; } else if (V < myvinf) { // if ( !IsExtremum (U, V = myvinf, P, myS, E, Dist2, @@ -502,7 +502,7 @@ void Extrema_ExtPRevS::Perform(const gp_Pnt& P) } V = newV; - if ( !IsExtremum (U, V, P, &(myS->ChangeSurface()), E, Dist2, + if ( !IsExtremum (U, V, P, myS.get(), E, Dist2, Standard_False, anExt.IsMin(i))) continue; } else { E = myS->Value(U,V); diff --git a/src/Extrema/Extrema_ExtPRevS.hxx b/src/Extrema/Extrema_ExtPRevS.hxx index e6d069d8ac..405436cfeb 100644 --- a/src/Extrema/Extrema_ExtPRevS.hxx +++ b/src/Extrema/Extrema_ExtPRevS.hxx @@ -17,24 +17,11 @@ #ifndef _Extrema_ExtPRevS_HeaderFile #define _Extrema_ExtPRevS_HeaderFile -#include -#include - -#include +#include #include #include -#include -#include #include -#include -class GeomAdaptor_HSurfaceOfRevolution; -class StdFail_NotDone; -class Standard_OutOfRange; -class gp_Pnt; -class Extrema_POnSurf; - -class Extrema_ExtPRevS; DEFINE_STANDARD_HANDLE(Extrema_ExtPRevS, Standard_Transient) //! It calculates all the extremum (minimum and @@ -50,13 +37,13 @@ public: //! It calculates all the distances between a point //! from gp and a SurfacePtr from Adaptor3d. - Standard_EXPORT Extrema_ExtPRevS(const gp_Pnt& P, const Handle(GeomAdaptor_HSurfaceOfRevolution)& S, const Standard_Real Umin, const Standard_Real Usup, const Standard_Real Vmin, const Standard_Real Vsup, const Standard_Real TolU, const Standard_Real TolV); + Standard_EXPORT Extrema_ExtPRevS(const gp_Pnt& P, const Handle(GeomAdaptor_SurfaceOfRevolution)& S, const Standard_Real Umin, const Standard_Real Usup, const Standard_Real Vmin, const Standard_Real Vsup, const Standard_Real TolU, const Standard_Real TolV); //! It calculates all the distances between a point //! from gp and a SurfacePtr from Adaptor3d. - Standard_EXPORT Extrema_ExtPRevS(const gp_Pnt& P, const Handle(GeomAdaptor_HSurfaceOfRevolution)& S, const Standard_Real TolU, const Standard_Real TolV); + Standard_EXPORT Extrema_ExtPRevS(const gp_Pnt& P, const Handle(GeomAdaptor_SurfaceOfRevolution)& S, const Standard_Real TolU, const Standard_Real TolV); - Standard_EXPORT void Initialize (const Handle(GeomAdaptor_HSurfaceOfRevolution)& S, const Standard_Real Umin, const Standard_Real Usup, const Standard_Real Vmin, const Standard_Real Vsup, const Standard_Real TolU, const Standard_Real TolV); + Standard_EXPORT void Initialize (const Handle(GeomAdaptor_SurfaceOfRevolution)& S, const Standard_Real Umin, const Standard_Real Usup, const Standard_Real Vmin, const Standard_Real Vsup, const Standard_Real TolU, const Standard_Real TolV); Standard_EXPORT void Perform (const gp_Pnt& P); @@ -85,7 +72,7 @@ protected: private: - Handle(GeomAdaptor_HSurfaceOfRevolution) myS; + Handle(GeomAdaptor_SurfaceOfRevolution) myS; Standard_Real myvinf; Standard_Real myvsup; Standard_Real mytolv; diff --git a/src/Extrema/Extrema_ExtPS.cxx b/src/Extrema/Extrema_ExtPS.cxx index 4c5046b29f..ba8da723a5 100644 --- a/src/Extrema/Extrema_ExtPS.cxx +++ b/src/Extrema/Extrema_ExtPS.cxx @@ -14,8 +14,8 @@ //----------------------------------------------------------------- -#include -#include +#include +#include #include #include #include @@ -301,7 +301,7 @@ void Extrema_ExtPS::Perform(const gp_Pnt& thePoint) { if (myExtPExtS.IsNull()) { - Handle(GeomAdaptor_HSurfaceOfLinearExtrusion) aS (new GeomAdaptor_HSurfaceOfLinearExtrusion ( + Handle(GeomAdaptor_SurfaceOfLinearExtrusion) aS (new GeomAdaptor_SurfaceOfLinearExtrusion ( GeomAdaptor_SurfaceOfLinearExtrusion (myS->BasisCurve(), myS->Direction()))); myExtPExtS = new Extrema_ExtPExtS (thePoint, aS, myuinf, myusup, myvinf, myvsup, mytolu, mytolv); @@ -327,7 +327,7 @@ void Extrema_ExtPS::Perform(const gp_Pnt& thePoint) { if (myExtPRevS.IsNull()) { - Handle(GeomAdaptor_HSurfaceOfRevolution) aS (new GeomAdaptor_HSurfaceOfRevolution ( + Handle(GeomAdaptor_SurfaceOfRevolution) aS (new GeomAdaptor_SurfaceOfRevolution ( GeomAdaptor_SurfaceOfRevolution (myS->BasisCurve(), myS->AxeOfRevolution()))); myExtPRevS = new Extrema_ExtPRevS (thePoint, aS, myuinf, myusup, myvinf, myvsup, mytolu, mytolv); diff --git a/src/Extrema/Extrema_GenExtCS.cxx b/src/Extrema/Extrema_GenExtCS.cxx index 0034bb5ac9..c9aa59c18a 100644 --- a/src/Extrema/Extrema_GenExtCS.cxx +++ b/src/Extrema/Extrema_GenExtCS.cxx @@ -17,9 +17,9 @@ #include #include -#include +#include +#include #include -#include #include #include #include @@ -90,15 +90,15 @@ static void GetSurfMaxParamVals (const Adaptor3d_Surface& theS, if (theS.GetType() == GeomAbs_SurfaceOfExtrusion) { - theUmax = GetCurvMaxParamVal (theS.BasisCurve()->Curve()); + theUmax = GetCurvMaxParamVal (*theS.BasisCurve()); } else if (theS.GetType() == GeomAbs_SurfaceOfRevolution) { - theVmax = GetCurvMaxParamVal (theS.BasisCurve()->Curve()); + theVmax = GetCurvMaxParamVal (*theS.BasisCurve()); } else if (theS.GetType() == GeomAbs_OffsetSurface) { - GetSurfMaxParamVals (theS.BasisSurface()->Surface(), theUmax, theVmax); + GetSurfMaxParamVals (*theS.BasisSurface(), theUmax, theVmax); } } diff --git a/src/Extrema/Extrema_GenExtPS.cxx b/src/Extrema/Extrema_GenExtPS.cxx index 5114c045a3..df2f888e17 100644 --- a/src/Extrema/Extrema_GenExtPS.cxx +++ b/src/Extrema/Extrema_GenExtPS.cxx @@ -16,15 +16,14 @@ // Modified by skv - Thu Sep 30 15:21:07 2004 OCC593 +#include + #include -#include -#include #include #include #include #include #include -#include #include #include #include @@ -363,8 +362,10 @@ void Extrema_GenExtPS::GetGridPoints( const Adaptor3d_Surface& theSurf) { //creation parametric points for BSpline and Bezier surfaces //with taking into account of Degree and NbKnots of BSpline or Bezier geometry - if(theSurf.GetType() == GeomAbs_OffsetSurface) - GetGridPoints(theSurf.BasisSurface()->Surface()); + if (theSurf.GetType() == GeomAbs_OffsetSurface) + { + GetGridPoints (*theSurf.BasisSurface()); + } //parametric points for BSpline surfaces else if( theSurf.GetType() == GeomAbs_BSplineSurface) { @@ -399,9 +400,9 @@ void Extrema_GenExtPS::GetGridPoints( const Adaptor3d_Surface& theSurf) { Handle(TColStd_HArray1OfReal) anArrKnots; Standard_Integer aDegree = 0; - if(theSurf.BasisCurve()->Curve().GetType() == GeomAbs_BSplineCurve) + if(theSurf.BasisCurve()->GetType() == GeomAbs_BSplineCurve) { - Handle(Geom_BSplineCurve) aBspl = theSurf.BasisCurve()->Curve().BSpline(); + Handle(Geom_BSplineCurve) aBspl = theSurf.BasisCurve()->BSpline(); if(!aBspl.IsNull()) { anArrKnots = new TColStd_HArray1OfReal(1,aBspl->NbKnots()); @@ -411,9 +412,9 @@ void Extrema_GenExtPS::GetGridPoints( const Adaptor3d_Surface& theSurf) } } - if(theSurf.BasisCurve()->Curve().GetType() == GeomAbs_BezierCurve) + if(theSurf.BasisCurve()->GetType() == GeomAbs_BezierCurve) { - Handle(Geom_BezierCurve) aBez = theSurf.BasisCurve()->Curve().Bezier(); + Handle(Geom_BezierCurve) aBez = theSurf.BasisCurve()->Bezier(); if(!aBez.IsNull()) { anArrKnots = new TColStd_HArray1OfReal(1,2); diff --git a/src/FilletSurf/FilletSurf_InternalBuilder.cxx b/src/FilletSurf/FilletSurf_InternalBuilder.cxx index 5d53443837..ba089a19f3 100644 --- a/src/FilletSurf/FilletSurf_InternalBuilder.cxx +++ b/src/FilletSurf/FilletSurf_InternalBuilder.cxx @@ -12,12 +12,13 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. +#include #include #include -#include -#include -#include +#include +#include +#include #include #include #include @@ -29,7 +30,7 @@ #include #include #include -#include +#include #include #include #include @@ -39,7 +40,6 @@ #include #include #include -#include #include #include #include @@ -49,8 +49,7 @@ #include #include #include -#include -#include +#include #include #include #include @@ -73,7 +72,7 @@ static Standard_Boolean isinlist(const TopoDS_Shape& E, return 0; } -static Standard_Boolean IntPlanEdge(Handle(BRepAdaptor_HCurve)& Ed, +static Standard_Boolean IntPlanEdge(Handle(BRepAdaptor_Curve)& Ed, const gp_Pln& P, Standard_Real& w, const Standard_Real tol3d) @@ -83,8 +82,8 @@ static Standard_Boolean IntPlanEdge(Handle(BRepAdaptor_HCurve)& Ed, Standard_Real l = Ed->LastParameter(); gp_Pnt Or = P.Location(); Handle(Geom_Plane) Pln = new Geom_Plane(P); - Handle(GeomAdaptor_HSurface) - Plan = new GeomAdaptor_HSurface(GeomAdaptor_Surface(Pln)); + Handle(GeomAdaptor_Surface) + Plan = new GeomAdaptor_Surface(GeomAdaptor_Surface(Pln)); IntCurveSurface_HInter Intersection; Standard_Integer nbp ,iip; @@ -141,12 +140,11 @@ static Standard_Boolean ComputeEdgeParameter(const Handle(ChFiDS_Spine)& Spin Standard_Real& ped, const Standard_Real tol3d) { - Handle(ChFiDS_HElSpine) Guide = Spine->ElSpine(ind); + Handle(ChFiDS_ElSpine) Guide = Spine->ElSpine(ind); gp_Pnt P; gp_Vec V; Guide->D1(pelsp,P,V); gp_Pln pln(P,V); - Handle(BRepAdaptor_HCurve) ed = new BRepAdaptor_HCurve(); - ed->ChangeCurve() = Spine->CurrentElementarySpine(ind); + Handle(BRepAdaptor_Curve) ed = new BRepAdaptor_Curve (Spine->CurrentElementarySpine(ind)); return IntPlanEdge(ed,pln,ped,tol3d); } @@ -258,15 +256,15 @@ Standard_Integer FilletSurf_InternalBuilder::Add(const TopTools_ListOfShape& E, } //ElSpine is immediately constructed - Handle(ChFiDS_HElSpine) hels = new ChFiDS_HElSpine(); + Handle(ChFiDS_ElSpine) hels = new ChFiDS_ElSpine(); gp_Vec TFirst,TLast; gp_Pnt PFirst,PLast; sp->D1(sp->FirstParameter(),PFirst,TFirst); sp->D1(sp->LastParameter(),PLast,TLast); - hels->ChangeCurve().FirstParameter(sp->FirstParameter()); - hels->ChangeCurve().SetFirstPointAndTgt(PFirst,TFirst); - hels->ChangeCurve().LastParameter(sp->LastParameter()); - hels->ChangeCurve().SetLastPointAndTgt(PLast,TLast); + hels->FirstParameter(sp->FirstParameter()); + hels->SetFirstPointAndTgt(PFirst,TFirst); + hels->LastParameter(sp->LastParameter()); + hels->SetLastPointAndTgt(PLast,TLast); ChFi3d_PerformElSpine(hels,sp,myConti,tolesp); sp->AppendElSpine(hels); sp->SplitDone(Standard_True); @@ -302,12 +300,12 @@ void FilletSurf_InternalBuilder::Perform() Standard_Boolean FilletSurf_InternalBuilder::PerformSurf(ChFiDS_SequenceOfSurfData& SeqData, - const Handle(ChFiDS_HElSpine)& Guide, + const Handle(ChFiDS_ElSpine)& Guide, const Handle(ChFiDS_Spine)& Spine, const Standard_Integer Choix, - const Handle(BRepAdaptor_HSurface)& S1, + const Handle(BRepAdaptor_Surface)& S1, const Handle(Adaptor3d_TopolTool)& I1, - const Handle(BRepAdaptor_HSurface)& S2, + const Handle(BRepAdaptor_Surface)& S2, const Handle(Adaptor3d_TopolTool)& I2, const Standard_Real MaxStep, const Standard_Real Fleche, @@ -327,11 +325,11 @@ Standard_Boolean Handle(ChFiDS_FilSpine) fsp = Handle(ChFiDS_FilSpine)::DownCast(Spine); if(fsp.IsNull()) throw Standard_ConstructionError("PerformSurf : this is not the spine of a fillet"); Handle(BRepBlend_Line) lin; - TopAbs_Orientation Or = S1->ChangeSurface().Face().Orientation(); + TopAbs_Orientation Or = S1->Face().Orientation(); if(!fsp->IsConstant()) throw Standard_ConstructionError("PerformSurf : no variable radiuses"); // Standard_Boolean maybesingular; //pour scinder les Surfdata singulieres - Handle(ChFiDS_HElSpine) EmptyGuide; + Handle(ChFiDS_ElSpine) EmptyGuide; BRepBlend_ConstRad Func(S1,S2,Guide); BRepBlend_ConstRadInv FInv(S1,S2,Guide); @@ -377,14 +375,14 @@ Standard_Boolean Intf = 0; const ChFiDS_CommonPoint& cpf1 = Data->VertexFirstOnS1(); if(cpf1.IsOnArc()){ - TopoDS_Face F1 = S1->ChangeSurface().Face(); + TopoDS_Face F1 = S1->Face(); TopoDS_Face bid; Intf = !SearchFace(Spine,cpf1,F1,bid); ok = Intf != 0; } const ChFiDS_CommonPoint& cpf2 = Data->VertexFirstOnS2(); if(cpf2.IsOnArc() && !ok){ - TopoDS_Face F2 = S2->ChangeSurface().Face(); + TopoDS_Face F2 = S2->Face(); TopoDS_Face bid; Intf = !SearchFace(Spine,cpf2,F2,bid); } @@ -393,14 +391,14 @@ Standard_Boolean ok = Standard_False; const ChFiDS_CommonPoint& cpl1 = Data->VertexLastOnS1(); if(cpl1.IsOnArc()){ - TopoDS_Face F1 = S1->ChangeSurface().Face(); + TopoDS_Face F1 = S1->Face(); TopoDS_Face bid; Intl = !SearchFace(Spine,cpl1,F1,bid); ok = Intl != 0; } const ChFiDS_CommonPoint& cpl2 = Data->VertexLastOnS2(); if(cpl2.IsOnArc() && !ok){ - TopoDS_Face F2 = S2->ChangeSurface().Face(); + TopoDS_Face F2 = S2->Face(); TopoDS_Face bid; Intl = !SearchFace(Spine,cpl2,F2,bid); } @@ -412,17 +410,17 @@ Standard_Boolean return Standard_True; } -void FilletSurf_InternalBuilder::PerformSurf (ChFiDS_SequenceOfSurfData& , const Handle(ChFiDS_HElSpine)& , const Handle(ChFiDS_Spine)& , const Standard_Integer , const Handle(BRepAdaptor_HSurface)& , const Handle(Adaptor3d_TopolTool)& , const Handle(BRepAdaptor_HCurve2d)& , const Handle(BRepAdaptor_HSurface)& , const Handle(BRepAdaptor_HCurve2d)& , Standard_Boolean& , const Handle(BRepAdaptor_HSurface)& , const Handle(Adaptor3d_TopolTool)& , const TopAbs_Orientation , const Standard_Real , const Standard_Real , const Standard_Real , Standard_Real& , Standard_Real& , const Standard_Boolean , const Standard_Boolean , const Standard_Boolean , const Standard_Boolean , const Standard_Boolean , const Standard_Boolean , const math_Vector& ) +void FilletSurf_InternalBuilder::PerformSurf (ChFiDS_SequenceOfSurfData& , const Handle(ChFiDS_ElSpine)& , const Handle(ChFiDS_Spine)& , const Standard_Integer , const Handle(BRepAdaptor_Surface)& , const Handle(Adaptor3d_TopolTool)& , const Handle(BRepAdaptor_Curve2d)& , const Handle(BRepAdaptor_Surface)& , const Handle(BRepAdaptor_Curve2d)& , Standard_Boolean& , const Handle(BRepAdaptor_Surface)& , const Handle(Adaptor3d_TopolTool)& , const TopAbs_Orientation , const Standard_Real , const Standard_Real , const Standard_Real , Standard_Real& , Standard_Real& , const Standard_Boolean , const Standard_Boolean , const Standard_Boolean , const Standard_Boolean , const Standard_Boolean , const Standard_Boolean , const math_Vector& ) { throw Standard_DomainError("BlendFunc_CSConstRad::Section : Not implemented"); } -void FilletSurf_InternalBuilder::PerformSurf (ChFiDS_SequenceOfSurfData& , const Handle(ChFiDS_HElSpine)& , const Handle(ChFiDS_Spine)& , const Standard_Integer , const Handle(BRepAdaptor_HSurface)& , const Handle(Adaptor3d_TopolTool)& , const TopAbs_Orientation , const Handle(BRepAdaptor_HSurface)& , const Handle(Adaptor3d_TopolTool)& , const Handle(BRepAdaptor_HCurve2d)& , const Handle(BRepAdaptor_HSurface)& , const Handle(BRepAdaptor_HCurve2d)& , Standard_Boolean& , const Standard_Real , const Standard_Real , const Standard_Real , Standard_Real& , Standard_Real& , const Standard_Boolean , const Standard_Boolean , const Standard_Boolean , const Standard_Boolean , const Standard_Boolean , const Standard_Boolean , const math_Vector& ) +void FilletSurf_InternalBuilder::PerformSurf (ChFiDS_SequenceOfSurfData& , const Handle(ChFiDS_ElSpine)& , const Handle(ChFiDS_Spine)& , const Standard_Integer , const Handle(BRepAdaptor_Surface)& , const Handle(Adaptor3d_TopolTool)& , const TopAbs_Orientation , const Handle(BRepAdaptor_Surface)& , const Handle(Adaptor3d_TopolTool)& , const Handle(BRepAdaptor_Curve2d)& , const Handle(BRepAdaptor_Surface)& , const Handle(BRepAdaptor_Curve2d)& , Standard_Boolean& , const Standard_Real , const Standard_Real , const Standard_Real , Standard_Real& , Standard_Real& , const Standard_Boolean , const Standard_Boolean , const Standard_Boolean , const Standard_Boolean , const Standard_Boolean , const Standard_Boolean , const math_Vector& ) { throw Standard_DomainError("BlendFunc_CSConstRad::Section : Not implemented"); } -void FilletSurf_InternalBuilder::PerformSurf (ChFiDS_SequenceOfSurfData& , const Handle(ChFiDS_HElSpine)& , const Handle(ChFiDS_Spine)& , const Standard_Integer , const Handle(BRepAdaptor_HSurface)& , const Handle(Adaptor3d_TopolTool)& , const Handle(BRepAdaptor_HCurve2d)& , const Handle(BRepAdaptor_HSurface)& , const Handle(BRepAdaptor_HCurve2d)& , Standard_Boolean& , const TopAbs_Orientation , const Handle(BRepAdaptor_HSurface)& , const Handle(Adaptor3d_TopolTool)& , const Handle(BRepAdaptor_HCurve2d)& , const Handle(BRepAdaptor_HSurface)& , const Handle(BRepAdaptor_HCurve2d)& , Standard_Boolean& , const TopAbs_Orientation , const Standard_Real , const Standard_Real , const Standard_Real , Standard_Real& , Standard_Real& , const Standard_Boolean , const Standard_Boolean , const Standard_Boolean , const Standard_Boolean , const Standard_Boolean , const Standard_Boolean , const Standard_Boolean , const math_Vector& ) +void FilletSurf_InternalBuilder::PerformSurf (ChFiDS_SequenceOfSurfData& , const Handle(ChFiDS_ElSpine)& , const Handle(ChFiDS_Spine)& , const Standard_Integer , const Handle(BRepAdaptor_Surface)& , const Handle(Adaptor3d_TopolTool)& , const Handle(BRepAdaptor_Curve2d)& , const Handle(BRepAdaptor_Surface)& , const Handle(BRepAdaptor_Curve2d)& , Standard_Boolean& , const TopAbs_Orientation , const Handle(BRepAdaptor_Surface)& , const Handle(Adaptor3d_TopolTool)& , const Handle(BRepAdaptor_Curve2d)& , const Handle(BRepAdaptor_Surface)& , const Handle(BRepAdaptor_Curve2d)& , Standard_Boolean& , const TopAbs_Orientation , const Standard_Real , const Standard_Real , const Standard_Real , Standard_Real& , Standard_Real& , const Standard_Boolean , const Standard_Boolean , const Standard_Boolean , const Standard_Boolean , const Standard_Boolean , const Standard_Boolean , const Standard_Boolean , const math_Vector& ) { throw Standard_DomainError("BlendFunc_CSConstRad::Section : Not implemented"); } diff --git a/src/FilletSurf/FilletSurf_InternalBuilder.hxx b/src/FilletSurf/FilletSurf_InternalBuilder.hxx index 9a122f434e..cd61b6d8c7 100644 --- a/src/FilletSurf/FilletSurf_InternalBuilder.hxx +++ b/src/FilletSurf/FilletSurf_InternalBuilder.hxx @@ -17,32 +17,25 @@ #ifndef _FilletSurf_InternalBuilder_HeaderFile #define _FilletSurf_InternalBuilder_HeaderFile -#include -#include -#include - +#include +#include +#include #include #include -#include -#include #include -#include #include #include #include #include -class TopoDS_Shape; -class ChFiDS_HElSpine; -class ChFiDS_Spine; -class BRepAdaptor_HSurface; + class Adaptor3d_TopolTool; -class BRepAdaptor_HCurve2d; +class ChFiDS_Spine; class Geom_Surface; -class TopoDS_Face; class Geom_Curve; class Geom2d_Curve; class Geom_TrimmedCurve; - +class TopoDS_Shape; +class TopoDS_Face; //! This class is private. It is used by the class Builder //! from FilletSurf. It computes geometric information about fillets. @@ -126,13 +119,13 @@ protected: //! This method calculates the elements of construction of the //! fillet (constant or evolutive). - Standard_EXPORT virtual Standard_Boolean PerformSurf (ChFiDS_SequenceOfSurfData& SeqData, const Handle(ChFiDS_HElSpine)& Guide, const Handle(ChFiDS_Spine)& Spine, const Standard_Integer Choix, const Handle(BRepAdaptor_HSurface)& S1, const Handle(Adaptor3d_TopolTool)& I1, const Handle(BRepAdaptor_HSurface)& S2, const Handle(Adaptor3d_TopolTool)& I2, const Standard_Real MaxStep, const Standard_Real Fleche, const Standard_Real TolGuide, Standard_Real& First, Standard_Real& Last, const Standard_Boolean Inside, const Standard_Boolean Appro, const Standard_Boolean Forward, const Standard_Boolean RecOnS1, const Standard_Boolean RecOnS2, const math_Vector& Soldep, Standard_Integer& Intf, Standard_Integer& Intl) Standard_OVERRIDE; + Standard_EXPORT virtual Standard_Boolean PerformSurf (ChFiDS_SequenceOfSurfData& SeqData, const Handle(ChFiDS_ElSpine)& Guide, const Handle(ChFiDS_Spine)& Spine, const Standard_Integer Choix, const Handle(BRepAdaptor_Surface)& S1, const Handle(Adaptor3d_TopolTool)& I1, const Handle(BRepAdaptor_Surface)& S2, const Handle(Adaptor3d_TopolTool)& I2, const Standard_Real MaxStep, const Standard_Real Fleche, const Standard_Real TolGuide, Standard_Real& First, Standard_Real& Last, const Standard_Boolean Inside, const Standard_Boolean Appro, const Standard_Boolean Forward, const Standard_Boolean RecOnS1, const Standard_Boolean RecOnS2, const math_Vector& Soldep, Standard_Integer& Intf, Standard_Integer& Intl) Standard_OVERRIDE; - Standard_EXPORT virtual void PerformSurf (ChFiDS_SequenceOfSurfData& SeqData, const Handle(ChFiDS_HElSpine)& Guide, const Handle(ChFiDS_Spine)& Spine, const Standard_Integer Choix, const Handle(BRepAdaptor_HSurface)& S1, const Handle(Adaptor3d_TopolTool)& I1, const Handle(BRepAdaptor_HCurve2d)& PC1, const Handle(BRepAdaptor_HSurface)& Sref1, const Handle(BRepAdaptor_HCurve2d)& PCref1, Standard_Boolean& Decroch1, const Handle(BRepAdaptor_HSurface)& S2, const Handle(Adaptor3d_TopolTool)& I2, const TopAbs_Orientation Or2, const Standard_Real MaxStep, const Standard_Real Fleche, const Standard_Real TolGuide, Standard_Real& First, Standard_Real& Last, const Standard_Boolean Inside, const Standard_Boolean Appro, const Standard_Boolean Forward, const Standard_Boolean RecP, const Standard_Boolean RecS, const Standard_Boolean RecRst, const math_Vector& Soldep) Standard_OVERRIDE; + Standard_EXPORT virtual void PerformSurf (ChFiDS_SequenceOfSurfData& SeqData, const Handle(ChFiDS_ElSpine)& Guide, const Handle(ChFiDS_Spine)& Spine, const Standard_Integer Choix, const Handle(BRepAdaptor_Surface)& S1, const Handle(Adaptor3d_TopolTool)& I1, const Handle(BRepAdaptor_Curve2d)& PC1, const Handle(BRepAdaptor_Surface)& Sref1, const Handle(BRepAdaptor_Curve2d)& PCref1, Standard_Boolean& Decroch1, const Handle(BRepAdaptor_Surface)& S2, const Handle(Adaptor3d_TopolTool)& I2, const TopAbs_Orientation Or2, const Standard_Real MaxStep, const Standard_Real Fleche, const Standard_Real TolGuide, Standard_Real& First, Standard_Real& Last, const Standard_Boolean Inside, const Standard_Boolean Appro, const Standard_Boolean Forward, const Standard_Boolean RecP, const Standard_Boolean RecS, const Standard_Boolean RecRst, const math_Vector& Soldep) Standard_OVERRIDE; - Standard_EXPORT virtual void PerformSurf (ChFiDS_SequenceOfSurfData& SeqData, const Handle(ChFiDS_HElSpine)& Guide, const Handle(ChFiDS_Spine)& Spine, const Standard_Integer Choix, const Handle(BRepAdaptor_HSurface)& S1, const Handle(Adaptor3d_TopolTool)& I1, const TopAbs_Orientation Or1, const Handle(BRepAdaptor_HSurface)& S2, const Handle(Adaptor3d_TopolTool)& I2, const Handle(BRepAdaptor_HCurve2d)& PC2, const Handle(BRepAdaptor_HSurface)& Sref2, const Handle(BRepAdaptor_HCurve2d)& PCref2, Standard_Boolean& Decroch2, const Standard_Real MaxStep, const Standard_Real Fleche, const Standard_Real TolGuide, Standard_Real& First, Standard_Real& Last, const Standard_Boolean Inside, const Standard_Boolean Appro, const Standard_Boolean Forward, const Standard_Boolean RecP, const Standard_Boolean RecS, const Standard_Boolean RecRst, const math_Vector& Soldep) Standard_OVERRIDE; + Standard_EXPORT virtual void PerformSurf (ChFiDS_SequenceOfSurfData& SeqData, const Handle(ChFiDS_ElSpine)& Guide, const Handle(ChFiDS_Spine)& Spine, const Standard_Integer Choix, const Handle(BRepAdaptor_Surface)& S1, const Handle(Adaptor3d_TopolTool)& I1, const TopAbs_Orientation Or1, const Handle(BRepAdaptor_Surface)& S2, const Handle(Adaptor3d_TopolTool)& I2, const Handle(BRepAdaptor_Curve2d)& PC2, const Handle(BRepAdaptor_Surface)& Sref2, const Handle(BRepAdaptor_Curve2d)& PCref2, Standard_Boolean& Decroch2, const Standard_Real MaxStep, const Standard_Real Fleche, const Standard_Real TolGuide, Standard_Real& First, Standard_Real& Last, const Standard_Boolean Inside, const Standard_Boolean Appro, const Standard_Boolean Forward, const Standard_Boolean RecP, const Standard_Boolean RecS, const Standard_Boolean RecRst, const math_Vector& Soldep) Standard_OVERRIDE; - Standard_EXPORT virtual void PerformSurf (ChFiDS_SequenceOfSurfData& Data, const Handle(ChFiDS_HElSpine)& Guide, const Handle(ChFiDS_Spine)& Spine, const Standard_Integer Choix, const Handle(BRepAdaptor_HSurface)& S1, const Handle(Adaptor3d_TopolTool)& I1, const Handle(BRepAdaptor_HCurve2d)& PC1, const Handle(BRepAdaptor_HSurface)& Sref1, const Handle(BRepAdaptor_HCurve2d)& PCref1, Standard_Boolean& Decroch1, const TopAbs_Orientation Or1, const Handle(BRepAdaptor_HSurface)& S2, const Handle(Adaptor3d_TopolTool)& I2, const Handle(BRepAdaptor_HCurve2d)& PC2, const Handle(BRepAdaptor_HSurface)& Sref2, const Handle(BRepAdaptor_HCurve2d)& PCref2, Standard_Boolean& Decroch2, const TopAbs_Orientation Or2, const Standard_Real MaxStep, const Standard_Real Fleche, const Standard_Real TolGuide, Standard_Real& First, Standard_Real& Last, const Standard_Boolean Inside, const Standard_Boolean Appro, const Standard_Boolean Forward, const Standard_Boolean RecP1, const Standard_Boolean RecRst1, const Standard_Boolean RecP2, const Standard_Boolean RecRst2, const math_Vector& Soldep) Standard_OVERRIDE; + Standard_EXPORT virtual void PerformSurf (ChFiDS_SequenceOfSurfData& Data, const Handle(ChFiDS_ElSpine)& Guide, const Handle(ChFiDS_Spine)& Spine, const Standard_Integer Choix, const Handle(BRepAdaptor_Surface)& S1, const Handle(Adaptor3d_TopolTool)& I1, const Handle(BRepAdaptor_Curve2d)& PC1, const Handle(BRepAdaptor_Surface)& Sref1, const Handle(BRepAdaptor_Curve2d)& PCref1, Standard_Boolean& Decroch1, const TopAbs_Orientation Or1, const Handle(BRepAdaptor_Surface)& S2, const Handle(Adaptor3d_TopolTool)& I2, const Handle(BRepAdaptor_Curve2d)& PC2, const Handle(BRepAdaptor_Surface)& Sref2, const Handle(BRepAdaptor_Curve2d)& PCref2, Standard_Boolean& Decroch2, const TopAbs_Orientation Or2, const Standard_Real MaxStep, const Standard_Real Fleche, const Standard_Real TolGuide, Standard_Real& First, Standard_Real& Last, const Standard_Boolean Inside, const Standard_Boolean Appro, const Standard_Boolean Forward, const Standard_Boolean RecP1, const Standard_Boolean RecRst1, const Standard_Boolean RecP2, const Standard_Boolean RecRst2, const math_Vector& Soldep) Standard_OVERRIDE; diff --git a/src/Geom2dAdaptor/FILES b/src/Geom2dAdaptor/FILES index da677fad04..6cfc9c4674 100644 --- a/src/Geom2dAdaptor/FILES +++ b/src/Geom2dAdaptor/FILES @@ -2,8 +2,3 @@ Geom2dAdaptor.cxx Geom2dAdaptor.hxx Geom2dAdaptor_Curve.cxx Geom2dAdaptor_Curve.hxx -Geom2dAdaptor_Curve.lxx -Geom2dAdaptor_GHCurve.hxx -Geom2dAdaptor_GHCurve_0.cxx -Geom2dAdaptor_HCurve.cxx -Geom2dAdaptor_HCurve.hxx diff --git a/src/Geom2dAdaptor/Geom2dAdaptor.hxx b/src/Geom2dAdaptor/Geom2dAdaptor.hxx index 0b46d198c6..44d5be4764 100644 --- a/src/Geom2dAdaptor/Geom2dAdaptor.hxx +++ b/src/Geom2dAdaptor/Geom2dAdaptor.hxx @@ -23,10 +23,6 @@ class Geom2d_Curve; class Adaptor2d_Curve2d; -class Geom2dAdaptor_Curve; -class Geom2dAdaptor_GHCurve; -class Geom2dAdaptor_HCurve; - //! this package contains the geometric definition of //! 2d curves compatible with the Adaptor package @@ -44,30 +40,6 @@ public: //! cannot process the OtherCurves. Standard_EXPORT static Handle(Geom2d_Curve) MakeCurve (const Adaptor2d_Curve2d& HC); - - - -protected: - - - - - -private: - - - - -friend class Geom2dAdaptor_Curve; -friend class Geom2dAdaptor_GHCurve; -friend class Geom2dAdaptor_HCurve; - }; - - - - - - #endif // _Geom2dAdaptor_HeaderFile diff --git a/src/Geom2dAdaptor/Geom2dAdaptor_Curve.cxx b/src/Geom2dAdaptor/Geom2dAdaptor_Curve.cxx index 63bb4420f1..2220bb3c65 100644 --- a/src/Geom2dAdaptor/Geom2dAdaptor_Curve.cxx +++ b/src/Geom2dAdaptor/Geom2dAdaptor_Curve.cxx @@ -21,8 +21,9 @@ #define No_Standard_RangeError #define No_Standard_OutOfRange +#include -#include +#include #include #include #include @@ -37,8 +38,6 @@ #include #include #include -#include -#include #include #include #include @@ -64,6 +63,7 @@ //#include static const Standard_Real PosTol = Precision::PConfusion() / 2; +IMPLEMENT_STANDARD_RTTIEXT(Geom2dAdaptor_Curve, Adaptor2d_Curve2d) //======================================================================= //function : LocalContinuity @@ -233,7 +233,7 @@ void Geom2dAdaptor_Curve::load(const Handle(Geom2d_Curve)& C, Handle(Geom2d_OffsetCurve) anOffsetCurve = Handle(Geom2d_OffsetCurve)::DownCast(myCurve); // Create nested adaptor for base curve Handle(Geom2d_Curve) aBaseCurve = anOffsetCurve->BasisCurve(); - Handle(Geom2dAdaptor_HCurve) aBaseAdaptor = new Geom2dAdaptor_HCurve(aBaseCurve); + Handle(Geom2dAdaptor_Curve) aBaseAdaptor = new Geom2dAdaptor_Curve(aBaseCurve); myNestedEvaluator = new Geom2dEvaluator_OffsetCurve(aBaseAdaptor, anOffsetCurve->Offset()); } else { @@ -508,13 +508,13 @@ void Geom2dAdaptor_Curve::Intervals(TColStd_Array1OfReal& T, //purpose : //======================================================================= -Handle(Adaptor2d_HCurve2d) Geom2dAdaptor_Curve::Trim +Handle(Adaptor2d_Curve2d) Geom2dAdaptor_Curve::Trim (const Standard_Real First, const Standard_Real Last, // const Standard_Real Tol) const const Standard_Real ) const { - Handle(Geom2dAdaptor_HCurve) HE = new Geom2dAdaptor_HCurve(myCurve,First,Last); + Handle(Geom2dAdaptor_Curve) HE = new Geom2dAdaptor_Curve(myCurve,First,Last); return HE; } diff --git a/src/Geom2dAdaptor/Geom2dAdaptor_Curve.hxx b/src/Geom2dAdaptor/Geom2dAdaptor_Curve.hxx index 5697aca449..0c668ec6d4 100644 --- a/src/Geom2dAdaptor/Geom2dAdaptor_Curve.hxx +++ b/src/Geom2dAdaptor/Geom2dAdaptor_Curve.hxx @@ -17,27 +17,19 @@ #ifndef _Geom2dAdaptor_Curve_HeaderFile #define _Geom2dAdaptor_Curve_HeaderFile -#include -#include -#include - -#include -#include -#include #include -#include -#include -#include -#include +#include +#include #include +#include +#include +#include +#include +#include +#include -class Geom2d_Curve; -class Adaptor2d_HCurve2d; -class Standard_NoSuchObject; -class Standard_ConstructionError; class Standard_OutOfRange; class Standard_DomainError; -class gp_Pnt2d; class gp_Vec2d; class gp_Lin2d; class gp_Circ2d; @@ -47,7 +39,6 @@ class gp_Parab2d; class Geom2d_BezierCurve; class Geom2d_BSplineCurve; - //! An interface between the services provided by any //! curve from the package Geom2d and those required //! of the curve by algorithms which use it. @@ -57,32 +48,39 @@ class Geom2d_BSplineCurve; //! thread-safe and parallel evaluations need to be prevented. class Geom2dAdaptor_Curve : public Adaptor2d_Curve2d { + DEFINE_STANDARD_RTTIEXT(Geom2dAdaptor_Curve, Adaptor2d_Curve2d) public: - DEFINE_STANDARD_ALLOC - - Standard_EXPORT Geom2dAdaptor_Curve(); Standard_EXPORT Geom2dAdaptor_Curve(const Handle(Geom2d_Curve)& C); - //! ConstructionError is raised if Ufirst>Ulast + //! Standard_ConstructionError is raised if Ufirst>Ulast Standard_EXPORT Geom2dAdaptor_Curve(const Handle(Geom2d_Curve)& C, const Standard_Real UFirst, const Standard_Real ULast); //! Reset currently loaded curve (undone Load()). Standard_EXPORT void Reset(); - void Load (const Handle(Geom2d_Curve)& C); - - //! ConstructionError is raised if Ufirst>Ulast - void Load (const Handle(Geom2d_Curve)& C, const Standard_Real UFirst, const Standard_Real ULast); - - const Handle(Geom2d_Curve)& Curve() const; - - Standard_Real FirstParameter() const Standard_OVERRIDE; - - Standard_Real LastParameter() const Standard_OVERRIDE; - + void Load (const Handle(Geom2d_Curve)& theCurve) + { + if (theCurve.IsNull()) { throw Standard_NullObject(); } + load (theCurve, theCurve->FirstParameter(), theCurve->LastParameter()); + } + + //! Standard_ConstructionError is raised if theUFirst>theULast + void Load (const Handle(Geom2d_Curve)& theCurve, const Standard_Real theUFirst, const Standard_Real theULast) + { + if (theCurve.IsNull()) { throw Standard_NullObject(); } + if (theUFirst > theULast) { throw Standard_ConstructionError(); } + load (theCurve, theUFirst, theULast); + } + + const Handle(Geom2d_Curve)& Curve() const { return myCurve; } + + virtual Standard_Real FirstParameter() const Standard_OVERRIDE { return myFirst; } + + virtual Standard_Real LastParameter() const Standard_OVERRIDE { return myLast; } + Standard_EXPORT GeomAbs_Shape Continuity() const Standard_OVERRIDE; //! If necessary, breaks the curve in intervals of @@ -101,7 +99,7 @@ public: //! parameters and . is used to //! test for 3d points confusion. //! If >= - Standard_EXPORT Handle(Adaptor2d_HCurve2d) Trim (const Standard_Real First, const Standard_Real Last, const Standard_Real Tol) const Standard_OVERRIDE; + Standard_EXPORT Handle(Adaptor2d_Curve2d) Trim (const Standard_Real First, const Standard_Real Last, const Standard_Real Tol) const Standard_OVERRIDE; Standard_EXPORT Standard_Boolean IsClosed() const Standard_OVERRIDE; @@ -145,9 +143,9 @@ public: //! returns the parametric resolution Standard_EXPORT Standard_Real Resolution (const Standard_Real Ruv) const Standard_OVERRIDE; - - GeomAbs_CurveType GetType() const Standard_OVERRIDE; - + + virtual GeomAbs_CurveType GetType() const Standard_OVERRIDE { return myTypeCurve; } + Standard_EXPORT gp_Lin2d Line() const Standard_OVERRIDE; Standard_EXPORT gp_Circ2d Circle() const Standard_OVERRIDE; @@ -172,15 +170,6 @@ public: Standard_EXPORT Handle(Geom2d_BSplineCurve) BSpline() const Standard_OVERRIDE; - - - -protected: - - - - - private: Standard_EXPORT GeomAbs_Shape LocalContinuity (const Standard_Real U1, const Standard_Real U2) const; @@ -194,6 +183,7 @@ private: //! \param theParameter the value on the knot axis which identifies the caching span void RebuildCache (const Standard_Real theParameter) const; +private: Handle(Geom2d_Curve) myCurve; GeomAbs_CurveType myTypeCurve; @@ -204,14 +194,8 @@ private: mutable Handle(BSplCLib_Cache) myCurveCache; ///< Cached data for B-spline or Bezier curve Handle(Geom2dEvaluator_Curve) myNestedEvaluator; ///< Calculates value of offset curve - }; - -#include - - - - +DEFINE_STANDARD_HANDLE(Geom2dAdaptor_Curve, Adaptor2d_Curve2d) #endif // _Geom2dAdaptor_Curve_HeaderFile diff --git a/src/Geom2dAdaptor/Geom2dAdaptor_Curve.lxx b/src/Geom2dAdaptor/Geom2dAdaptor_Curve.lxx deleted file mode 100644 index ca8371705d..0000000000 --- a/src/Geom2dAdaptor/Geom2dAdaptor_Curve.lxx +++ /dev/null @@ -1,88 +0,0 @@ -// Created on: 1993-06-04 -// Created by: Bruno DUMORTIER -// Copyright (c) 1993-1999 Matra Datavision -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - -#include -#include -#include -#include - -//======================================================================= -//function : FirstParameter -//purpose : -//======================================================================= - -inline Standard_Real Geom2dAdaptor_Curve::FirstParameter() const -{ - return myFirst; -} - -//======================================================================= -//function : LastParameter -//purpose : -//======================================================================= - -inline Standard_Real Geom2dAdaptor_Curve::LastParameter() const -{ - return myLast; -} - -//======================================================================= -//function : Curve -//purpose : -//======================================================================= - -inline const Handle(Geom2d_Curve)& Geom2dAdaptor_Curve::Curve() const -{ - return myCurve; -} - -//======================================================================= -//function : GetType -//purpose : -//======================================================================= - -inline GeomAbs_CurveType Geom2dAdaptor_Curve::GetType() const -{ - return myTypeCurve; -} - -//======================================================================= -//function : Load -//purpose : -//======================================================================= - -inline void Geom2dAdaptor_Curve::Load(const Handle(Geom2d_Curve)& C) -{ - if ( C.IsNull()) throw Standard_NullObject(); - - load(C,C->FirstParameter(),C->LastParameter()); -} - -//======================================================================= -//function : Load -//purpose : -//======================================================================= - -inline void Geom2dAdaptor_Curve::Load(const Handle(Geom2d_Curve)& C, - const Standard_Real UFirst, - const Standard_Real ULast) -{ - if ( C.IsNull()) throw Standard_NullObject(); - - if ( UFirst > ULast) throw Standard_ConstructionError(); - - load(C,UFirst,ULast); -} diff --git a/src/Geom2dAdaptor/Geom2dAdaptor_GHCurve.hxx b/src/Geom2dAdaptor/Geom2dAdaptor_GHCurve.hxx deleted file mode 100644 index d1c7611c1f..0000000000 --- a/src/Geom2dAdaptor/Geom2dAdaptor_GHCurve.hxx +++ /dev/null @@ -1,93 +0,0 @@ -// Created on: 1993-06-03 -// Created by: Bruno DUMORTIER -// Copyright (c) 1993-1999 Matra Datavision -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - -#ifndef _Geom2dAdaptor_GHCurve_HeaderFile -#define _Geom2dAdaptor_GHCurve_HeaderFile - -#include -#include - -#include -#include -class Standard_OutOfRange; -class Standard_NoSuchObject; -class Standard_DomainError; -class Geom2dAdaptor_Curve; -class Adaptor2d_Curve2d; - - -class Geom2dAdaptor_GHCurve; -DEFINE_STANDARD_HANDLE(Geom2dAdaptor_GHCurve, Adaptor2d_HCurve2d) - - -class Geom2dAdaptor_GHCurve : public Adaptor2d_HCurve2d -{ - -public: - - - //! Creates an empty GenHCurve2d. - Standard_EXPORT Geom2dAdaptor_GHCurve(); - - //! Creates a GenHCurve2d from a Curve - Standard_EXPORT Geom2dAdaptor_GHCurve(const Geom2dAdaptor_Curve& C); - - //! Sets the field of the GenHCurve2d. - Standard_EXPORT void Set (const Geom2dAdaptor_Curve& C); - - //! Returns the curve used to create the GenHCurve2d. - //! This is redefined from HCurve2d, cannot be inline. - Standard_EXPORT const Adaptor2d_Curve2d& Curve2d() const Standard_OVERRIDE; - - //! Returns the curve used to create the GenHCurve. - Geom2dAdaptor_Curve& ChangeCurve2d(); - - - - - DEFINE_STANDARD_RTTI_INLINE(Geom2dAdaptor_GHCurve,Adaptor2d_HCurve2d) - -protected: - - - Geom2dAdaptor_Curve myCurve; - - -private: - - - - -}; - -#define TheCurve Geom2dAdaptor_Curve -#define TheCurve_hxx -#define Adaptor2d_GenHCurve2d Geom2dAdaptor_GHCurve -#define Adaptor2d_GenHCurve2d_hxx -#define Handle_Adaptor2d_GenHCurve2d Handle(Geom2dAdaptor_GHCurve) - -#include - -#undef TheCurve -#undef TheCurve_hxx -#undef Adaptor2d_GenHCurve2d -#undef Adaptor2d_GenHCurve2d_hxx -#undef Handle_Adaptor2d_GenHCurve2d - - - - -#endif // _Geom2dAdaptor_GHCurve_HeaderFile diff --git a/src/Geom2dAdaptor/Geom2dAdaptor_GHCurve_0.cxx b/src/Geom2dAdaptor/Geom2dAdaptor_GHCurve_0.cxx deleted file mode 100644 index b81f02eb4b..0000000000 --- a/src/Geom2dAdaptor/Geom2dAdaptor_GHCurve_0.cxx +++ /dev/null @@ -1,42 +0,0 @@ -// Created on: 1993-06-03 -// Created by: Bruno DUMORTIER -// Copyright (c) 1993-1999 Matra Datavision -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - -#include - -#include - -#include -#include -#include -#include -#include - - - - - - - - - - -#define TheCurve Geom2dAdaptor_Curve -#define TheCurve_hxx -#define Adaptor2d_GenHCurve2d Geom2dAdaptor_GHCurve -#define Adaptor2d_GenHCurve2d_hxx -#define Handle_Adaptor2d_GenHCurve2d Handle(Geom2dAdaptor_GHCurve) -#include - diff --git a/src/Geom2dAdaptor/Geom2dAdaptor_HCurve.cxx b/src/Geom2dAdaptor/Geom2dAdaptor_HCurve.cxx deleted file mode 100644 index 87cbfc8332..0000000000 --- a/src/Geom2dAdaptor/Geom2dAdaptor_HCurve.cxx +++ /dev/null @@ -1,65 +0,0 @@ -// Created on: 1995-08-25 -// Created by: Remi LEQUETTE -// Copyright (c) 1995-1999 Matra Datavision -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - - -#include -#include -#include -#include -#include - -IMPLEMENT_STANDARD_RTTIEXT(Geom2dAdaptor_HCurve,Geom2dAdaptor_GHCurve) - -//======================================================================= -//function : Geom2dAdaptor_HCurve -//purpose : -//======================================================================= -Geom2dAdaptor_HCurve::Geom2dAdaptor_HCurve() -{ -} - -//======================================================================= -//function : Geom2dAdaptor_HCurve -//purpose : -//======================================================================= - -Geom2dAdaptor_HCurve::Geom2dAdaptor_HCurve(const Geom2dAdaptor_Curve& AS) : -Geom2dAdaptor_GHCurve(AS) -{ -} - -//======================================================================= -//function : Geom2dAdaptor_HCurve -//purpose : -//======================================================================= - -Geom2dAdaptor_HCurve::Geom2dAdaptor_HCurve(const Handle(Geom2d_Curve)& S) -{ - ChangeCurve2d().Load(S); -} - -//======================================================================= -//function : Geom2dAdaptor_HCurve -//purpose : -//======================================================================= - -Geom2dAdaptor_HCurve::Geom2dAdaptor_HCurve(const Handle(Geom2d_Curve)& S, - const Standard_Real UFirst, - const Standard_Real ULast) -{ - ChangeCurve2d().Load(S,UFirst,ULast); -} - diff --git a/src/Geom2dAdaptor/Geom2dAdaptor_HCurve.hxx b/src/Geom2dAdaptor/Geom2dAdaptor_HCurve.hxx deleted file mode 100644 index f32b1c832f..0000000000 --- a/src/Geom2dAdaptor/Geom2dAdaptor_HCurve.hxx +++ /dev/null @@ -1,74 +0,0 @@ -// Created on: 1995-08-25 -// Created by: Remi LEQUETTE -// Copyright (c) 1995-1999 Matra Datavision -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - -#ifndef _Geom2dAdaptor_HCurve_HeaderFile -#define _Geom2dAdaptor_HCurve_HeaderFile - -#include -#include - -#include -#include -class Standard_ConstructionError; -class Geom2dAdaptor_Curve; -class Geom2d_Curve; - - -class Geom2dAdaptor_HCurve; -DEFINE_STANDARD_HANDLE(Geom2dAdaptor_HCurve, Geom2dAdaptor_GHCurve) - -//! Provides an interface between the services provided by any -//! curve from the package Geom2d and those required -//! of the curve by algorithms, which use it. -class Geom2dAdaptor_HCurve : public Geom2dAdaptor_GHCurve -{ - -public: - - - Standard_EXPORT Geom2dAdaptor_HCurve(); - - Standard_EXPORT Geom2dAdaptor_HCurve(const Geom2dAdaptor_Curve& AS); - - Standard_EXPORT Geom2dAdaptor_HCurve(const Handle(Geom2d_Curve)& S); - - //! ConstructionError is raised if UFirst>ULast or VFirst>VLast - Standard_EXPORT Geom2dAdaptor_HCurve(const Handle(Geom2d_Curve)& S, const Standard_Real UFirst, const Standard_Real ULast); - - - - - DEFINE_STANDARD_RTTIEXT(Geom2dAdaptor_HCurve,Geom2dAdaptor_GHCurve) - -protected: - - - - -private: - - - - -}; - - - - - - - -#endif // _Geom2dAdaptor_HCurve_HeaderFile diff --git a/src/Geom2dConvert/Geom2dConvert_ApproxCurve.cxx b/src/Geom2dConvert/Geom2dConvert_ApproxCurve.cxx index ebc3b87f04..91c29f42c0 100644 --- a/src/Geom2dConvert/Geom2dConvert_ApproxCurve.cxx +++ b/src/Geom2dConvert/Geom2dConvert_ApproxCurve.cxx @@ -14,14 +14,14 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. +#include -#include +#include #include #include #include #include -#include -#include +#include #include #include #include @@ -36,7 +36,7 @@ class Geom2dConvert_ApproxCurve_Eval : public AdvApprox_EvaluatorFunction { public: - Geom2dConvert_ApproxCurve_Eval (const Handle(Adaptor2d_HCurve2d)& theFunc, + Geom2dConvert_ApproxCurve_Eval (const Handle(Adaptor2d_Curve2d)& theFunc, Standard_Real First, Standard_Real Last) : fonct(theFunc) { StartEndSav[0] = First; StartEndSav[1] = Last; } @@ -48,7 +48,7 @@ class Geom2dConvert_ApproxCurve_Eval : public AdvApprox_EvaluatorFunction Standard_Integer *ErrorCode); private: - Handle(Adaptor2d_HCurve2d) fonct; + Handle(Adaptor2d_Curve2d) fonct; Standard_Real StartEndSav[2]; }; @@ -105,11 +105,11 @@ void Geom2dConvert_ApproxCurve_Eval::Evaluate (Standard_Integer *Dimension, Geom2dConvert_ApproxCurve::Geom2dConvert_ApproxCurve(const Handle(Geom2d_Curve)& Curve,const Standard_Real Tol2d,const GeomAbs_Shape Order,const Standard_Integer MaxSegments,const Standard_Integer MaxDegree) { - Handle(Geom2dAdaptor_HCurve) HCurve = new Geom2dAdaptor_HCurve (Curve); + Handle(Geom2dAdaptor_Curve) HCurve = new Geom2dAdaptor_Curve (Curve); Approximate(HCurve, Tol2d, Order, MaxSegments, MaxDegree); } -Geom2dConvert_ApproxCurve::Geom2dConvert_ApproxCurve(const Handle(Adaptor2d_HCurve2d)& Curve, +Geom2dConvert_ApproxCurve::Geom2dConvert_ApproxCurve(const Handle(Adaptor2d_Curve2d)& Curve, const Standard_Real Tol2d, const GeomAbs_Shape Order, const Standard_Integer MaxSegments, @@ -118,7 +118,7 @@ Geom2dConvert_ApproxCurve::Geom2dConvert_ApproxCurve(const Handle(Adaptor2d_HCur Approximate(Curve, Tol2d, Order, MaxSegments, MaxDegree); } -void Geom2dConvert_ApproxCurve::Approximate(const Handle(Adaptor2d_HCurve2d)& theCurve, +void Geom2dConvert_ApproxCurve::Approximate(const Handle(Adaptor2d_Curve2d)& theCurve, const Standard_Real theTol2d, const GeomAbs_Shape theOrder, const Standard_Integer theMaxSegments, diff --git a/src/Geom2dConvert/Geom2dConvert_ApproxCurve.hxx b/src/Geom2dConvert/Geom2dConvert_ApproxCurve.hxx index 643782c668..41f23678bd 100644 --- a/src/Geom2dConvert/Geom2dConvert_ApproxCurve.hxx +++ b/src/Geom2dConvert/Geom2dConvert_ApproxCurve.hxx @@ -17,20 +17,13 @@ #ifndef _Geom2dConvert_ApproxCurve_HeaderFile #define _Geom2dConvert_ApproxCurve_HeaderFile -#include -#include -#include - -#include -#include +#include #include -#include #include + class Geom2d_BSplineCurve; class Standard_OutOfRange; class Geom2d_Curve; -class Adaptor2d_HCurve2d; - //! A framework to convert a 2D curve to a BSpline. //! This is done by approximation within a given tolerance. @@ -57,7 +50,7 @@ public: //! - the maximum number of segments allowed MaxSegments //! - the highest degree MaxDegree which the //! polynomial defining the BSpline is allowed to have. - Standard_EXPORT Geom2dConvert_ApproxCurve(const Handle(Adaptor2d_HCurve2d)& Curve, const Standard_Real Tol2d, const GeomAbs_Shape Order, const Standard_Integer MaxSegments, const Standard_Integer MaxDegree); + Standard_EXPORT Geom2dConvert_ApproxCurve(const Handle(Adaptor2d_Curve2d)& Curve, const Standard_Real Tol2d, const GeomAbs_Shape Order, const Standard_Integer MaxSegments, const Standard_Integer MaxDegree); //! Returns the 2D BSpline curve resulting from the //! approximation algorithm. @@ -93,7 +86,7 @@ private: //! Converts a curve to B-spline - Standard_EXPORT void Approximate (const Handle(Adaptor2d_HCurve2d)& theCurve, const Standard_Real theTol3d, const GeomAbs_Shape theOrder, const Standard_Integer theMaxSegments, const Standard_Integer theMaxDegree); + Standard_EXPORT void Approximate (const Handle(Adaptor2d_Curve2d)& theCurve, const Standard_Real theTol3d, const GeomAbs_Shape theOrder, const Standard_Integer theMaxSegments, const Standard_Integer theMaxDegree); Standard_Boolean myIsDone; diff --git a/src/Geom2dEvaluator/Geom2dEvaluator_OffsetCurve.cxx b/src/Geom2dEvaluator/Geom2dEvaluator_OffsetCurve.cxx index 56864c1ed5..88e3421484 100644 --- a/src/Geom2dEvaluator/Geom2dEvaluator_OffsetCurve.cxx +++ b/src/Geom2dEvaluator/Geom2dEvaluator_OffsetCurve.cxx @@ -14,7 +14,7 @@ #include #include -#include +#include #include @@ -30,7 +30,7 @@ Geom2dEvaluator_OffsetCurve::Geom2dEvaluator_OffsetCurve( } Geom2dEvaluator_OffsetCurve::Geom2dEvaluator_OffsetCurve( - const Handle(Geom2dAdaptor_HCurve)& theBase, + const Handle(Geom2dAdaptor_Curve)& theBase, const Standard_Real theOffset) : Geom2dEvaluator_Curve(), myBaseAdaptor(theBase), diff --git a/src/Geom2dEvaluator/Geom2dEvaluator_OffsetCurve.hxx b/src/Geom2dEvaluator/Geom2dEvaluator_OffsetCurve.hxx index 64e400f285..356a89e9fc 100644 --- a/src/Geom2dEvaluator/Geom2dEvaluator_OffsetCurve.hxx +++ b/src/Geom2dEvaluator/Geom2dEvaluator_OffsetCurve.hxx @@ -16,10 +16,9 @@ #define _Geom2dEvaluator_OffsetCurve_HeaderFile #include +#include #include -class Geom2dAdaptor_HCurve; - //! Allows to calculate values and derivatives for offset curves in 2D class Geom2dEvaluator_OffsetCurve : public Geom2dEvaluator_Curve { @@ -30,7 +29,7 @@ public: const Standard_Real theOffset); //! Initialize evaluator by curve adaptor Standard_EXPORT Geom2dEvaluator_OffsetCurve( - const Handle(Geom2dAdaptor_HCurve)& theBase, + const Handle(Geom2dAdaptor_Curve)& theBase, const Standard_Real theOffset); //! Change the offset value @@ -85,7 +84,7 @@ private: private: Handle(Geom2d_Curve) myBaseCurve; - Handle(Geom2dAdaptor_HCurve) myBaseAdaptor; + Handle(Geom2dAdaptor_Curve) myBaseAdaptor; Standard_Real myOffset; ///< offset value }; diff --git a/src/Geom2dGcc/Geom2dGcc_Circ2d2TanOnGeo.cxx b/src/Geom2dGcc/Geom2dGcc_Circ2d2TanOnGeo.cxx index da11146c0f..56637117fa 100644 --- a/src/Geom2dGcc/Geom2dGcc_Circ2d2TanOnGeo.cxx +++ b/src/Geom2dGcc/Geom2dGcc_Circ2d2TanOnGeo.cxx @@ -37,7 +37,7 @@ #include #include #include -#include +#include #include #include #include @@ -95,7 +95,7 @@ Geom2dGcc_Circ2d2TanOnGeo (const GccEnt_QualifiedCirc& Qualified1 , if (Bis.IsDone()) { Geom2dInt_TheIntConicCurveOfGInter Intp; Standard_Integer nbsolution = Bis.NbSolutions(); - Handle(Geom2dAdaptor_HCurve) HCu2 = new Geom2dAdaptor_HCurve(OnCurv); + Handle(Geom2dAdaptor_Curve) HCu2 = new Geom2dAdaptor_Curve(OnCurv); Adaptor2d_OffsetCurve Cu2(HCu2,0.); firstparam = Max(Cu2.FirstParameter(),thefirst); lastparam = Min(Cu2.LastParameter(),thelast); @@ -323,7 +323,7 @@ parcen3(1, aNbSolMAX) Standard_Real Tol2 = Tol1; Geom2dInt_TheIntConicCurveOfGInter Intp; Standard_Integer nbsolution = Bis.NbSolutions(); - Handle(Geom2dAdaptor_HCurve) HCu2 = new Geom2dAdaptor_HCurve(OnCurv); + Handle(Geom2dAdaptor_Curve) HCu2 = new Geom2dAdaptor_Curve(OnCurv); Adaptor2d_OffsetCurve C2(HCu2,0.); firstparam = Max(C2.FirstParameter(),thefirst); lastparam = Min(C2.LastParameter(),thelast); @@ -501,7 +501,7 @@ parcen3(1, aNbSolMAX) Standard_Real Tol2 = Tol1; Geom2dInt_TheIntConicCurveOfGInter Intp; Standard_Integer nbsolution = Bis.NbSolutions(); - Handle(Geom2dAdaptor_HCurve) HCu2 = new Geom2dAdaptor_HCurve(OnCurv); + Handle(Geom2dAdaptor_Curve) HCu2 = new Geom2dAdaptor_Curve(OnCurv); Adaptor2d_OffsetCurve C2(HCu2,0.); firstparam = Max(C2.FirstParameter(),thefirst); lastparam = Min(C2.LastParameter(),thelast); @@ -649,7 +649,7 @@ parcen3(1, aNbSolMAX) Standard_Real Tol2 = Tol1; Geom2dInt_TheIntConicCurveOfGInter Intp; Standard_Integer nbsolution = Bis.NbSolutions(); - Handle(Geom2dAdaptor_HCurve) HCu2 = new Geom2dAdaptor_HCurve(OnCurv); + Handle(Geom2dAdaptor_Curve) HCu2 = new Geom2dAdaptor_Curve(OnCurv); Adaptor2d_OffsetCurve C2(HCu2,0.); firstparam = Max(C2.FirstParameter(),thefirst); lastparam = Min(C2.LastParameter(),thelast); @@ -810,7 +810,7 @@ parcen3(1, aNbSolMAX) Standard_Real Tol1 = Abs(Tolerance); Standard_Real Tol2 = Tol1; Geom2dInt_TheIntConicCurveOfGInter Intp; - Handle(Geom2dAdaptor_HCurve) HCu2 = new Geom2dAdaptor_HCurve(OnCurv); + Handle(Geom2dAdaptor_Curve) HCu2 = new Geom2dAdaptor_Curve(OnCurv); Adaptor2d_OffsetCurve C2(HCu2,0.); firstparam = Max(C2.FirstParameter(),thefirst); lastparam = Min(C2.LastParameter(),thelast); @@ -938,7 +938,7 @@ parcen3(1, aNbSolMAX) Standard_Real Tol1 = Abs(Tolerance); Standard_Real Tol2 = Tol1; Geom2dInt_TheIntConicCurveOfGInter Intp; - Handle(Geom2dAdaptor_HCurve) HCu2 = new Geom2dAdaptor_HCurve(OnCurv); + Handle(Geom2dAdaptor_Curve) HCu2 = new Geom2dAdaptor_Curve(OnCurv); Adaptor2d_OffsetCurve Cu2(HCu2,0.); firstparam = Max(Cu2.FirstParameter(),thefirst); lastparam = Min(Cu2.LastParameter(),thelast); diff --git a/src/Geom2dGcc/Geom2dGcc_Circ2d2TanRadGeo.cxx b/src/Geom2dGcc/Geom2dGcc_Circ2d2TanRadGeo.cxx index 7796d07912..a4f665a139 100644 --- a/src/Geom2dGcc/Geom2dGcc_Circ2d2TanRadGeo.cxx +++ b/src/Geom2dGcc/Geom2dGcc_Circ2d2TanRadGeo.cxx @@ -18,7 +18,7 @@ #include #include #include -#include +#include #include #include #include @@ -182,7 +182,7 @@ pararg2(1,aNbSolMAX) gp_Lin2d Line(Point,L1.Direction()); // ligne avec deport. IntRes2d_Domain D1; for (Standard_Integer jcote2 = 1; jcote2 <= nbrcote2 && NbrSol < aNbSolMAX; jcote2++) { - Handle(Geom2dAdaptor_HCurve) HCu2 = new Geom2dAdaptor_HCurve(Cu2); + Handle(Geom2dAdaptor_Curve) HCu2 = new Geom2dAdaptor_Curve(Cu2); //Adaptor2d_OffsetCurve C2(HCu2,cote2(jcote2)); Adaptor2d_OffsetCurve C2(HCu2, -cote2(jcote2)); firstparam = Max(C2.FirstParameter(),thefirst); @@ -367,7 +367,7 @@ pararg2(1,aNbSolMAX) ElCLib::Value(2.*M_PI,Circ),2.*M_PI,Tol); D1.SetEquivalentParameters(0.,2.*M_PI); for (Standard_Integer jcote2 = 1 ; jcote2 <= nbrcote2 ; jcote2++) { - Handle(Geom2dAdaptor_HCurve) HCu2 = new Geom2dAdaptor_HCurve(Cu2); + Handle(Geom2dAdaptor_Curve) HCu2 = new Geom2dAdaptor_Curve(Cu2); //Adaptor2d_OffsetCurve C2(HCu2,cote2(jcote2)); Adaptor2d_OffsetCurve C2(HCu2, -cote2(jcote2)); firstparam = Max(C2.FirstParameter(),thefirst); @@ -500,7 +500,7 @@ pararg2(1,aNbSolMAX) D1.SetEquivalentParameters(0.,M_PI+M_PI); Geom2dInt_TheIntConicCurveOfGInter Intp; for (Standard_Integer jcote1 = 1; jcote1 <= nbrcote1 && NbrSol < aNbSolMAX; jcote1++) { - Handle(Geom2dAdaptor_HCurve) HCu1 = new Geom2dAdaptor_HCurve(Cu1); + Handle(Geom2dAdaptor_Curve) HCu1 = new Geom2dAdaptor_Curve(Cu1); //Adaptor2d_OffsetCurve Cu2(HCu1,cote1(jcote1)); Adaptor2d_OffsetCurve Cu2(HCu1,-cote1(jcote1)); firstparam = Max(Cu2.FirstParameter(),thefirst); @@ -834,7 +834,7 @@ pararg2(1,aNbSolMAX) } Geom2dInt_GInter Intp; for (Standard_Integer jcote1 = 1 ; jcote1 <= nbrcote1 ; jcote1++) { - Handle(Geom2dAdaptor_HCurve) HCu1 = new Geom2dAdaptor_HCurve(Cu1); + Handle(Geom2dAdaptor_Curve) HCu1 = new Geom2dAdaptor_Curve(Cu1); //Adaptor2d_OffsetCurve C1(HCu1,cote1(jcote1)); Adaptor2d_OffsetCurve C1(HCu1, -cote1(jcote1)); #ifdef OCCT_DEBUG @@ -844,7 +844,7 @@ pararg2(1,aNbSolMAX) C1.Value(lastparam),lastparam,Tol); #endif for (Standard_Integer jcote2 = 1; jcote2 <= nbrcote2 && NbrSol < aNbSolMAX; jcote2++) { - Handle(Geom2dAdaptor_HCurve) HCu2 = new Geom2dAdaptor_HCurve(Cu2); + Handle(Geom2dAdaptor_Curve) HCu2 = new Geom2dAdaptor_Curve(Cu2); //Adaptor2d_OffsetCurve C2(HCu2,cote2(jcote2)); Adaptor2d_OffsetCurve C2(HCu2, -cote2(jcote2)); #ifdef OCCT_DEBUG diff --git a/src/Geom2dGcc/Geom2dGcc_Circ2dTanOnRadGeo.cxx b/src/Geom2dGcc/Geom2dGcc_Circ2dTanOnRadGeo.cxx index 863a144290..fdfb1845d4 100644 --- a/src/Geom2dGcc/Geom2dGcc_Circ2dTanOnRadGeo.cxx +++ b/src/Geom2dGcc/Geom2dGcc_Circ2dTanOnRadGeo.cxx @@ -27,7 +27,7 @@ #include #include #include -#include +#include #include #include #include @@ -124,7 +124,7 @@ parcen3(1,aNbSolMAX) IntRes2d_Domain D1; Geom2dInt_TheIntConicCurveOfGInter Intp; for (Standard_Integer jcote1 = 1 ; jcote1 <= nbrcote1 ; jcote1++) { - Handle(Geom2dAdaptor_HCurve) HCu1 = new Geom2dAdaptor_HCurve(Cu1); + Handle(Geom2dAdaptor_Curve) HCu1 = new Geom2dAdaptor_Curve(Cu1); //Adaptor2d_OffsetCurve C2(HCu1,Coef(jcote1)); Adaptor2d_OffsetCurve C2(HCu1, -Coef(jcote1)); firstparam = Max(C2.FirstParameter(),thefirst); @@ -238,7 +238,7 @@ parcen3(1,aNbSolMAX) D1.SetEquivalentParameters(0.,2.*M_PI); Geom2dInt_TheIntConicCurveOfGInter Intp; for (Standard_Integer jcote1 = 1 ; jcote1 <= nbrcote1 ; jcote1++) { - Handle(Geom2dAdaptor_HCurve) HCu1 = new Geom2dAdaptor_HCurve(Cu1); + Handle(Geom2dAdaptor_Curve) HCu1 = new Geom2dAdaptor_Curve(Cu1); //Adaptor2d_OffsetCurve C2(HCu1,cote1(jcote1)); Adaptor2d_OffsetCurve C2(HCu1, -cote1(jcote1)); firstparam = Max(C2.FirstParameter(),thefirst); @@ -594,14 +594,14 @@ parcen3(1,aNbSolMAX) } Geom2dInt_GInter Intp; for (Standard_Integer jcote1 = 1 ; jcote1 <= nbrcote1 ; jcote1++) { - Handle(Geom2dAdaptor_HCurve) HCu1 = new Geom2dAdaptor_HCurve(Cu1); + Handle(Geom2dAdaptor_Curve) HCu1 = new Geom2dAdaptor_Curve(Cu1); //Adaptor2d_OffsetCurve C1(HCu1,cote1(jcote1)); Adaptor2d_OffsetCurve C1(HCu1, -cote1(jcote1)); firstparam = Max(C1.FirstParameter(),thefirst); lastparam = Min(C1.LastParameter(),thelast); IntRes2d_Domain D1(C1.Value(firstparam), firstparam, Tol, C1.Value(lastparam), lastparam, Tol); - Handle(Geom2dAdaptor_HCurve) HOnCurv = new Geom2dAdaptor_HCurve(OnCurv); + Handle(Geom2dAdaptor_Curve) HOnCurv = new Geom2dAdaptor_Curve(OnCurv); Adaptor2d_OffsetCurve C2(HOnCurv); firstparam = Max(C2.FirstParameter(),thefirst); lastparam = Min(C2.LastParameter(),thelast); diff --git a/src/GeomAPI/GeomAPI.cxx b/src/GeomAPI/GeomAPI.cxx index 24ab87a5fc..0a9c72be9f 100644 --- a/src/GeomAPI/GeomAPI.cxx +++ b/src/GeomAPI/GeomAPI.cxx @@ -19,7 +19,7 @@ #include #include #include -#include +#include #include #include #include @@ -31,8 +31,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include @@ -49,9 +49,9 @@ Handle(Geom2d_Curve) GeomAPI::To2d(const Handle(Geom_Curve)& C, const gp_Pln& P) { Handle(Geom2d_Curve) result; - Handle(GeomAdaptor_HCurve) HC = new GeomAdaptor_HCurve(C); + Handle(GeomAdaptor_Curve) HC = new GeomAdaptor_Curve(C); Handle(Geom_Plane) Plane = new Geom_Plane(P); - Handle(GeomAdaptor_HSurface) HS = new GeomAdaptor_HSurface(Plane); + Handle(GeomAdaptor_Surface) HS = new GeomAdaptor_Surface(Plane); ProjLib_ProjectedCurve Proj(HS,HC); @@ -73,10 +73,10 @@ Handle(Geom2d_Curve) GeomAPI::To2d(const Handle(Geom_Curve)& C, Handle(Geom_Curve) GeomAPI::To3d(const Handle(Geom2d_Curve)& C, const gp_Pln& P) { - Handle(Geom2dAdaptor_HCurve) AHC = new Geom2dAdaptor_HCurve(C); + Handle(Geom2dAdaptor_Curve) AHC = new Geom2dAdaptor_Curve(C); Handle(Geom_Plane) ThePlane = new Geom_Plane(P); - Handle(GeomAdaptor_HSurface) AHS = new GeomAdaptor_HSurface(ThePlane); + Handle(GeomAdaptor_Surface) AHS = new GeomAdaptor_Surface(ThePlane); Adaptor3d_CurveOnSurface COS(AHC,AHS); return GeomAdaptor::MakeCurve(COS); diff --git a/src/GeomAPI/GeomAPI_IntCS.cxx b/src/GeomAPI/GeomAPI_IntCS.cxx index 8f4e4c7a52..85c38de8e4 100644 --- a/src/GeomAPI/GeomAPI_IntCS.cxx +++ b/src/GeomAPI/GeomAPI_IntCS.cxx @@ -18,8 +18,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include @@ -58,10 +58,10 @@ void GeomAPI_IntCS::Perform(const Handle(Geom_Curve)& C, { myCurve = C; - Handle(GeomAdaptor_HCurve) HC = - new GeomAdaptor_HCurve(C); - Handle(GeomAdaptor_HSurface) HS = - new GeomAdaptor_HSurface(S); + Handle(GeomAdaptor_Curve) HC = + new GeomAdaptor_Curve(C); + Handle(GeomAdaptor_Surface) HS = + new GeomAdaptor_Surface(S); myIntCS.Perform(HC, HS); } diff --git a/src/GeomAdaptor/FILES b/src/GeomAdaptor/FILES index 26f7c52d81..a66a1411ff 100644 --- a/src/GeomAdaptor/FILES +++ b/src/GeomAdaptor/FILES @@ -2,24 +2,8 @@ GeomAdaptor.cxx GeomAdaptor.hxx GeomAdaptor_Curve.cxx GeomAdaptor_Curve.hxx -GeomAdaptor_Curve.lxx -GeomAdaptor_GHCurve.hxx -GeomAdaptor_GHCurve_0.cxx -GeomAdaptor_GHSurface.hxx -GeomAdaptor_GHSurface_0.cxx -GeomAdaptor_HCurve.cxx -GeomAdaptor_HCurve.hxx -GeomAdaptor_HCurve.lxx -GeomAdaptor_HSurface.cxx -GeomAdaptor_HSurface.hxx -GeomAdaptor_HSurface.lxx -GeomAdaptor_HSurfaceOfLinearExtrusion_0.cxx -GeomAdaptor_HSurfaceOfLinearExtrusion.hxx -GeomAdaptor_HSurfaceOfRevolution_0.cxx -GeomAdaptor_HSurfaceOfRevolution.hxx GeomAdaptor_Surface.cxx GeomAdaptor_Surface.hxx -GeomAdaptor_Surface.lxx GeomAdaptor_SurfaceOfLinearExtrusion.cxx GeomAdaptor_SurfaceOfLinearExtrusion.hxx GeomAdaptor_SurfaceOfRevolution.cxx diff --git a/src/GeomAdaptor/GeomAdaptor.cxx b/src/GeomAdaptor/GeomAdaptor.cxx index 94df9a8a46..48e801974c 100644 --- a/src/GeomAdaptor/GeomAdaptor.cxx +++ b/src/GeomAdaptor/GeomAdaptor.cxx @@ -14,10 +14,9 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. +#include #include -#include -#include #include #include #include @@ -40,7 +39,6 @@ #include #include #include -#include //======================================================================= //function : MakeCurve @@ -138,16 +136,16 @@ Handle(Geom_Surface) GeomAdaptor::MakeSurface(const Adaptor3d_Surface& HS, case GeomAbs_SurfaceOfRevolution: S = new Geom_SurfaceOfRevolution - (GeomAdaptor::MakeCurve(HS.BasisCurve()->Curve()),HS.AxeOfRevolution()); + (GeomAdaptor::MakeCurve(*HS.BasisCurve()),HS.AxeOfRevolution()); break; case GeomAbs_SurfaceOfExtrusion: S = new Geom_SurfaceOfLinearExtrusion - (GeomAdaptor::MakeCurve(HS.BasisCurve()->Curve()),HS.Direction()); + (GeomAdaptor::MakeCurve(*HS.BasisCurve()),HS.Direction()); break; case GeomAbs_OffsetSurface: - S = new Geom_OffsetSurface(GeomAdaptor::MakeSurface(HS.BasisSurface()->Surface()), + S = new Geom_OffsetSurface(GeomAdaptor::MakeSurface (*HS.BasisSurface()), HS.OffsetValue()); break; diff --git a/src/GeomAdaptor/GeomAdaptor.hxx b/src/GeomAdaptor/GeomAdaptor.hxx index ea704a03f3..64a4f3d7bf 100644 --- a/src/GeomAdaptor/GeomAdaptor.hxx +++ b/src/GeomAdaptor/GeomAdaptor.hxx @@ -25,13 +25,6 @@ class Geom_Curve; class Adaptor3d_Curve; class Geom_Surface; class Adaptor3d_Surface; -class GeomAdaptor_Curve; -class GeomAdaptor_Surface; -class GeomAdaptor_GHSurface; -class GeomAdaptor_HSurface; -class GeomAdaptor_GHCurve; -class GeomAdaptor_HCurve; - //! this package contains the geometric definition of //! curve and surface necessary to use algorithmes. @@ -54,33 +47,6 @@ public: Standard_EXPORT static Handle(Geom_Surface) MakeSurface (const Adaptor3d_Surface& theS, const Standard_Boolean theTrimFlag = Standard_True); - - - -protected: - - - - - -private: - - - - -friend class GeomAdaptor_Curve; -friend class GeomAdaptor_Surface; -friend class GeomAdaptor_GHSurface; -friend class GeomAdaptor_HSurface; -friend class GeomAdaptor_GHCurve; -friend class GeomAdaptor_HCurve; - }; - - - - - - #endif // _GeomAdaptor_HeaderFile diff --git a/src/GeomAdaptor/GeomAdaptor_Curve.cxx b/src/GeomAdaptor/GeomAdaptor_Curve.cxx index 390673cc31..6d8bfae812 100644 --- a/src/GeomAdaptor/GeomAdaptor_Curve.cxx +++ b/src/GeomAdaptor/GeomAdaptor_Curve.cxx @@ -21,8 +21,9 @@ #define No_Standard_RangeError #define No_Standard_OutOfRange +#include -#include +#include #include #include #include @@ -36,8 +37,6 @@ #include #include #include -#include -#include #include #include #include @@ -62,6 +61,7 @@ //#include static const Standard_Real PosTol = Precision::PConfusion() / 2; +IMPLEMENT_STANDARD_RTTIEXT(GeomAdaptor_Curve, Adaptor3d_Curve) //======================================================================= //function : LocalContinuity @@ -187,7 +187,7 @@ void GeomAdaptor_Curve::load(const Handle(Geom_Curve)& C, Handle(Geom_OffsetCurve) anOffsetCurve = Handle(Geom_OffsetCurve)::DownCast(myCurve); // Create nested adaptor for base curve Handle(Geom_Curve) aBaseCurve = anOffsetCurve->BasisCurve(); - Handle(GeomAdaptor_HCurve) aBaseAdaptor = new GeomAdaptor_HCurve(aBaseCurve); + Handle(GeomAdaptor_Curve) aBaseAdaptor = new GeomAdaptor_Curve(aBaseCurve); myNestedEvaluator = new GeomEvaluator_OffsetCurve( aBaseAdaptor, anOffsetCurve->Offset(), anOffsetCurve->Direction()); } @@ -509,11 +509,11 @@ void GeomAdaptor_Curve::Intervals(TColStd_Array1OfReal& T, //purpose : //======================================================================= -Handle(Adaptor3d_HCurve) GeomAdaptor_Curve::Trim(const Standard_Real First, +Handle(Adaptor3d_Curve) GeomAdaptor_Curve::Trim(const Standard_Real First, const Standard_Real Last, const Standard_Real /*Tol*/) const { - return Handle(GeomAdaptor_HCurve)(new GeomAdaptor_HCurve(myCurve,First,Last)); + return Handle(GeomAdaptor_Curve)(new GeomAdaptor_Curve(myCurve,First,Last)); } diff --git a/src/GeomAdaptor/GeomAdaptor_Curve.hxx b/src/GeomAdaptor/GeomAdaptor_Curve.hxx index 8ca553f6b1..894623beba 100644 --- a/src/GeomAdaptor/GeomAdaptor_Curve.hxx +++ b/src/GeomAdaptor/GeomAdaptor_Curve.hxx @@ -17,38 +17,15 @@ #ifndef _GeomAdaptor_Curve_HeaderFile #define _GeomAdaptor_Curve_HeaderFile -#include -#include -#include - -#include -#include -#include #include +#include +#include #include -#include -#include -#include #include +#include +#include -class Geom_Curve; -class Adaptor3d_HCurve; -class Standard_NoSuchObject; -class Standard_ConstructionError; -class Standard_OutOfRange; -class Standard_DomainError; -class GeomAdaptor_Surface; -class gp_Pnt; -class gp_Vec; -class gp_Lin; -class gp_Circ; -class gp_Elips; -class gp_Hypr; -class gp_Parab; -class Geom_BezierCurve; -class Geom_BSplineCurve; -class Geom_OffsetCurve; - +DEFINE_STANDARD_HANDLE(GeomAdaptor_Curve, Adaptor3d_Curve) //! This class provides an interface between the services provided by any //! curve from the package Geom and those required of the curve by algorithms which use it. @@ -59,35 +36,51 @@ class Geom_OffsetCurve; //! thread-safe and parallel evaluations need to be prevented. class GeomAdaptor_Curve : public Adaptor3d_Curve { + DEFINE_STANDARD_RTTIEXT(GeomAdaptor_Curve, Adaptor3d_Curve) public: - DEFINE_STANDARD_ALLOC + GeomAdaptor_Curve() : myTypeCurve (GeomAbs_OtherCurve), myFirst (0.0), myLast (0.0) {} - - GeomAdaptor_Curve(); - - GeomAdaptor_Curve(const Handle(Geom_Curve)& C); - - //! ConstructionError is raised if Ufirst>Ulast - GeomAdaptor_Curve(const Handle(Geom_Curve)& C, const Standard_Real UFirst, const Standard_Real ULast); + GeomAdaptor_Curve (const Handle(Geom_Curve)& theCurve) + { + Load (theCurve); + } - //! Reset currently loaded curve (undone Load()). - Standard_EXPORT void Reset(); + //! Standard_ConstructionError is raised if theUFirst>theULast + GeomAdaptor_Curve (const Handle(Geom_Curve)& theCurve, + const Standard_Real theUFirst, + const Standard_Real theULast) + { + Load (theCurve, theUFirst, theULast); + } - void Load (const Handle(Geom_Curve)& C); - - //! ConstructionError is raised if Ufirst>Ulast - void Load (const Handle(Geom_Curve)& C, const Standard_Real UFirst, const Standard_Real ULast); - + //! Reset currently loaded curve (undone Load()). + Standard_EXPORT void Reset(); + + void Load (const Handle(Geom_Curve)& theCurve) + { + if (theCurve.IsNull()) { throw Standard_NullObject(); } + load (theCurve, theCurve->FirstParameter(), theCurve->LastParameter()); + } + + //! Standard_ConstructionError is raised if theUFirst>theULast + void Load (const Handle(Geom_Curve)& theCurve, + const Standard_Real theUFirst, + const Standard_Real theULast) + { + if (theCurve.IsNull()) { throw Standard_NullObject(); } + if (theUFirst > theULast) { throw Standard_ConstructionError(); } + load (theCurve, theUFirst, theULast); + } //! Provides a curve inherited from Hcurve from Adaptor. //! This is inherited to provide easy to use constructors. - const Handle(Geom_Curve)& Curve() const; - - Standard_Real FirstParameter() const Standard_OVERRIDE; - - Standard_Real LastParameter() const Standard_OVERRIDE; - + const Handle(Geom_Curve)& Curve() const { return myCurve; } + + virtual Standard_Real FirstParameter() const Standard_OVERRIDE { return myFirst; } + + virtual Standard_Real LastParameter() const Standard_OVERRIDE { return myLast; } + Standard_EXPORT GeomAbs_Shape Continuity() const Standard_OVERRIDE; //! Returns the number of intervals for continuity @@ -105,7 +98,7 @@ public: //! parameters and . is used to //! test for 3d points confusion. //! If >= - Standard_EXPORT Handle(Adaptor3d_HCurve) Trim (const Standard_Real First, const Standard_Real Last, const Standard_Real Tol) const Standard_OVERRIDE; + Standard_EXPORT Handle(Adaptor3d_Curve) Trim (const Standard_Real First, const Standard_Real Last, const Standard_Real Tol) const Standard_OVERRIDE; Standard_EXPORT Standard_Boolean IsClosed() const Standard_OVERRIDE; @@ -160,9 +153,9 @@ public: //! returns the parametric resolution Standard_EXPORT Standard_Real Resolution (const Standard_Real R3d) const Standard_OVERRIDE; - - GeomAbs_CurveType GetType() const Standard_OVERRIDE; - + + virtual GeomAbs_CurveType GetType() const Standard_OVERRIDE { return myTypeCurve; } + Standard_EXPORT gp_Lin Line() const Standard_OVERRIDE; Standard_EXPORT gp_Circ Circle() const Standard_OVERRIDE; @@ -215,13 +208,6 @@ public: friend class GeomAdaptor_Surface; - -protected: - - - - - private: Standard_EXPORT GeomAbs_Shape LocalContinuity (const Standard_Real U1, const Standard_Real U2) const; @@ -235,6 +221,7 @@ private: //! \param theParameter the value on the knot axis which identifies the caching span void RebuildCache (const Standard_Real theParameter) const; +private: Handle(Geom_Curve) myCurve; GeomAbs_CurveType myTypeCurve; @@ -245,14 +232,6 @@ private: mutable Handle(BSplCLib_Cache) myCurveCache; ///< Cached data for B-spline or Bezier curve Handle(GeomEvaluator_Curve) myNestedEvaluator; ///< Calculates value of offset curve - }; - -#include - - - - - #endif // _GeomAdaptor_Curve_HeaderFile diff --git a/src/GeomAdaptor/GeomAdaptor_Curve.lxx b/src/GeomAdaptor/GeomAdaptor_Curve.lxx deleted file mode 100644 index 21bf1df758..0000000000 --- a/src/GeomAdaptor/GeomAdaptor_Curve.lxx +++ /dev/null @@ -1,124 +0,0 @@ -// Created on: 1993-04-29 -// Created by: Bruno DUMORTIER -// Copyright (c) 1993-1999 Matra Datavision -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - -#include -#include -#include -#include - - -//======================================================================= -//function : GeomAdaptor_Curve -//purpose : -//======================================================================= - -inline GeomAdaptor_Curve::GeomAdaptor_Curve() - : myTypeCurve(GeomAbs_OtherCurve), - myFirst(0.), - myLast(0.) -{ -} - -//======================================================================= -//function : GeomAdaptor_Curve -//purpose : -//======================================================================= - -inline GeomAdaptor_Curve::GeomAdaptor_Curve(const Handle(Geom_Curve)& C) -{ - Load(C); -} - -//======================================================================= -//function : GeomAdaptor_Curve -//purpose : -//======================================================================= - -inline GeomAdaptor_Curve::GeomAdaptor_Curve(const Handle(Geom_Curve)& C, - const Standard_Real UFirst, - const Standard_Real ULast) -{ - Load(C,UFirst,ULast); -} - -//======================================================================= -//function : Load -//purpose : -//======================================================================= - -inline void GeomAdaptor_Curve::Load(const Handle(Geom_Curve)& C) -{ - if ( C.IsNull()) throw Standard_NullObject(); - - load(C,C->FirstParameter(),C->LastParameter()); -} - -//======================================================================= -//function : Load -//purpose : -//======================================================================= - -inline void GeomAdaptor_Curve::Load(const Handle(Geom_Curve)& C, - const Standard_Real UFirst, - const Standard_Real ULast) -{ - if ( C.IsNull()) throw Standard_NullObject(); - - if ( UFirst > ULast) throw Standard_ConstructionError(); - - load(C,UFirst,ULast); -} - - -//======================================================================= -//function : FirstParameter -//purpose : -//======================================================================= - -inline Standard_Real GeomAdaptor_Curve::FirstParameter() const -{ - return myFirst; -} - -//======================================================================= -//function : LastParameter -//purpose : -//======================================================================= - -inline Standard_Real GeomAdaptor_Curve::LastParameter() const -{ - return myLast; -} - -//======================================================================= -//function : Curve -//purpose : -//======================================================================= - -inline const Handle(Geom_Curve)& GeomAdaptor_Curve::Curve() const -{ - return myCurve; -} - -//======================================================================= -//function : GetType -//purpose : -//======================================================================= - -inline GeomAbs_CurveType GeomAdaptor_Curve::GetType() const -{ - return myTypeCurve; -} diff --git a/src/GeomAdaptor/GeomAdaptor_GHCurve.hxx b/src/GeomAdaptor/GeomAdaptor_GHCurve.hxx deleted file mode 100644 index 592a0135a0..0000000000 --- a/src/GeomAdaptor/GeomAdaptor_GHCurve.hxx +++ /dev/null @@ -1,97 +0,0 @@ -// Created on: 1992-10-08 -// Created by: Isabelle GRIGNON -// Copyright (c) 1992-1999 Matra Datavision -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - -#ifndef _GeomAdaptor_GHCurve_HeaderFile -#define _GeomAdaptor_GHCurve_HeaderFile - -#include -#include - -#include -#include -class Standard_OutOfRange; -class Standard_NoSuchObject; -class Standard_DomainError; -class GeomAdaptor_Curve; -class Adaptor3d_Curve; - - -class GeomAdaptor_GHCurve; -DEFINE_STANDARD_HANDLE(GeomAdaptor_GHCurve, Adaptor3d_HCurve) - - -class GeomAdaptor_GHCurve : public Adaptor3d_HCurve -{ - -public: - - - //! Creates an empty GenHCurve. - Standard_EXPORT GeomAdaptor_GHCurve(); - - //! Creates a GenHCurve from a Curve - Standard_EXPORT GeomAdaptor_GHCurve(const GeomAdaptor_Curve& C); - - //! Sets the field of the GenHCurve. - Standard_EXPORT void Set (const GeomAdaptor_Curve& C); - - //! Returns the curve used to create the GenHCurve. - //! This is redefined from HCurve, cannot be inline. - Standard_EXPORT const Adaptor3d_Curve& Curve() const Standard_OVERRIDE; - - //! Returns the curve used to create the GenHCurve. - //! This is redefined from HCurve, cannot be inline. - Standard_EXPORT Adaptor3d_Curve& GetCurve() Standard_OVERRIDE; - - //! Returns the curve used to create the GenHCurve. - GeomAdaptor_Curve& ChangeCurve(); - - - - - DEFINE_STANDARD_RTTI_INLINE(GeomAdaptor_GHCurve,Adaptor3d_HCurve) - -protected: - - - GeomAdaptor_Curve myCurve; - - -private: - - - - -}; - -#define TheCurve GeomAdaptor_Curve -#define TheCurve_hxx -#define Adaptor3d_GenHCurve GeomAdaptor_GHCurve -#define Adaptor3d_GenHCurve_hxx -#define Handle_Adaptor3d_GenHCurve Handle(GeomAdaptor_GHCurve) - -#include - -#undef TheCurve -#undef TheCurve_hxx -#undef Adaptor3d_GenHCurve -#undef Adaptor3d_GenHCurve_hxx -#undef Handle_Adaptor3d_GenHCurve - - - - -#endif // _GeomAdaptor_GHCurve_HeaderFile diff --git a/src/GeomAdaptor/GeomAdaptor_GHCurve_0.cxx b/src/GeomAdaptor/GeomAdaptor_GHCurve_0.cxx deleted file mode 100644 index f801291d06..0000000000 --- a/src/GeomAdaptor/GeomAdaptor_GHCurve_0.cxx +++ /dev/null @@ -1,42 +0,0 @@ -// Created on: 1992-10-08 -// Created by: Isabelle GRIGNON -// Copyright (c) 1992-1999 Matra Datavision -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - -#include - -#include - -#include -#include -#include -#include -#include - - - - - - - - - - -#define TheCurve GeomAdaptor_Curve -#define TheCurve_hxx -#define Adaptor3d_GenHCurve GeomAdaptor_GHCurve -#define Adaptor3d_GenHCurve_hxx -#define Handle_Adaptor3d_GenHCurve Handle(GeomAdaptor_GHCurve) -#include - diff --git a/src/GeomAdaptor/GeomAdaptor_GHSurface.hxx b/src/GeomAdaptor/GeomAdaptor_GHSurface.hxx deleted file mode 100644 index de1cf857d4..0000000000 --- a/src/GeomAdaptor/GeomAdaptor_GHSurface.hxx +++ /dev/null @@ -1,93 +0,0 @@ -// Created on: 1992-10-08 -// Created by: Isabelle GRIGNON -// Copyright (c) 1992-1999 Matra Datavision -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - -#ifndef _GeomAdaptor_GHSurface_HeaderFile -#define _GeomAdaptor_GHSurface_HeaderFile - -#include -#include - -#include -#include -class Standard_OutOfRange; -class Standard_NoSuchObject; -class Standard_DomainError; -class GeomAdaptor_Surface; -class Adaptor3d_Surface; - - -class GeomAdaptor_GHSurface; -DEFINE_STANDARD_HANDLE(GeomAdaptor_GHSurface, Adaptor3d_HSurface) - - -class GeomAdaptor_GHSurface : public Adaptor3d_HSurface -{ - -public: - - - //! Creates an empty GenHSurface. - Standard_EXPORT GeomAdaptor_GHSurface(); - - //! Creates a GenHSurface from a Surface. - Standard_EXPORT GeomAdaptor_GHSurface(const GeomAdaptor_Surface& S); - - //! Sets the field of the GenHSurface. - Standard_EXPORT void Set (const GeomAdaptor_Surface& S); - - //! Returns a reference to the Surface inside the HSurface. - //! This is redefined from HSurface, cannot be inline. - Standard_EXPORT const Adaptor3d_Surface& Surface() const Standard_OVERRIDE; - - //! Returns the surface used to create the GenHSurface. - GeomAdaptor_Surface& ChangeSurface(); - - - - - DEFINE_STANDARD_RTTI_INLINE(GeomAdaptor_GHSurface,Adaptor3d_HSurface) - -protected: - - - GeomAdaptor_Surface mySurf; - - -private: - - - - -}; - -#define TheSurface GeomAdaptor_Surface -#define TheSurface_hxx -#define Adaptor3d_GenHSurface GeomAdaptor_GHSurface -#define Adaptor3d_GenHSurface_hxx -#define Handle_Adaptor3d_GenHSurface Handle(GeomAdaptor_GHSurface) - -#include - -#undef TheSurface -#undef TheSurface_hxx -#undef Adaptor3d_GenHSurface -#undef Adaptor3d_GenHSurface_hxx -#undef Handle_Adaptor3d_GenHSurface - - - - -#endif // _GeomAdaptor_GHSurface_HeaderFile diff --git a/src/GeomAdaptor/GeomAdaptor_GHSurface_0.cxx b/src/GeomAdaptor/GeomAdaptor_GHSurface_0.cxx deleted file mode 100644 index d83348187b..0000000000 --- a/src/GeomAdaptor/GeomAdaptor_GHSurface_0.cxx +++ /dev/null @@ -1,42 +0,0 @@ -// Created on: 1992-10-08 -// Created by: Isabelle GRIGNON -// Copyright (c) 1992-1999 Matra Datavision -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - -#include - -#include - -#include -#include -#include -#include -#include - - - - - - - - - - -#define TheSurface GeomAdaptor_Surface -#define TheSurface_hxx -#define Adaptor3d_GenHSurface GeomAdaptor_GHSurface -#define Adaptor3d_GenHSurface_hxx -#define Handle_Adaptor3d_GenHSurface Handle(GeomAdaptor_GHSurface) -#include - diff --git a/src/GeomAdaptor/GeomAdaptor_HCurve.cxx b/src/GeomAdaptor/GeomAdaptor_HCurve.cxx deleted file mode 100644 index 0f5f5b186c..0000000000 --- a/src/GeomAdaptor/GeomAdaptor_HCurve.cxx +++ /dev/null @@ -1,24 +0,0 @@ -// Created on: 1995-08-25 -// Created by: Remi LEQUETTE -// Copyright (c) 1995-1999 Matra Datavision -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - - -#include -#include -#include -#include -#include - -IMPLEMENT_STANDARD_RTTIEXT(GeomAdaptor_HCurve,GeomAdaptor_GHCurve) \ No newline at end of file diff --git a/src/GeomAdaptor/GeomAdaptor_HCurve.hxx b/src/GeomAdaptor/GeomAdaptor_HCurve.hxx deleted file mode 100644 index 72515486b0..0000000000 --- a/src/GeomAdaptor/GeomAdaptor_HCurve.hxx +++ /dev/null @@ -1,75 +0,0 @@ -// Created on: 1995-08-25 -// Created by: Remi LEQUETTE -// Copyright (c) 1995-1999 Matra Datavision -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - -#ifndef _GeomAdaptor_HCurve_HeaderFile -#define _GeomAdaptor_HCurve_HeaderFile - -#include -#include - -#include -#include -class Standard_ConstructionError; -class GeomAdaptor_Curve; -class Geom_Curve; - - -class GeomAdaptor_HCurve; -DEFINE_STANDARD_HANDLE(GeomAdaptor_HCurve, GeomAdaptor_GHCurve) - -//! An interface between the services provided by any -//! curve from the package Geom and those required of -//! the curve by algorithms which use it. -class GeomAdaptor_HCurve : public GeomAdaptor_GHCurve -{ - -public: - - - GeomAdaptor_HCurve(); - - GeomAdaptor_HCurve(const GeomAdaptor_Curve& AS); - - GeomAdaptor_HCurve(const Handle(Geom_Curve)& S); - - //! ConstructionError is raised if UFirst>ULast or VFirst>VLast - GeomAdaptor_HCurve(const Handle(Geom_Curve)& S, const Standard_Real UFirst, const Standard_Real ULast); - - - - - DEFINE_STANDARD_RTTIEXT(GeomAdaptor_HCurve,GeomAdaptor_GHCurve) - -protected: - - - - -private: - - - - -}; - - -#include - - - - - -#endif // _GeomAdaptor_HCurve_HeaderFile diff --git a/src/GeomAdaptor/GeomAdaptor_HCurve.lxx b/src/GeomAdaptor/GeomAdaptor_HCurve.lxx deleted file mode 100644 index a56e575947..0000000000 --- a/src/GeomAdaptor/GeomAdaptor_HCurve.lxx +++ /dev/null @@ -1,56 +0,0 @@ -// Created on: 1995-08-25 -// Created by: Remi LEQUETTE -// Copyright (c) 1995-1999 Matra Datavision -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - -//======================================================================= -//function : GeomAdaptor_HCurve -//purpose : -//======================================================================= - -inline GeomAdaptor_HCurve::GeomAdaptor_HCurve() -{ -} - -//======================================================================= -//function : GeomAdaptor_HCurve -//purpose : -//======================================================================= - -inline GeomAdaptor_HCurve::GeomAdaptor_HCurve(const GeomAdaptor_Curve& AS) : -GeomAdaptor_GHCurve(AS) -{ -} - -//======================================================================= -//function : GeomAdaptor_HCurve -//purpose : -//======================================================================= - -inline GeomAdaptor_HCurve::GeomAdaptor_HCurve(const Handle(Geom_Curve)& S) -{ - ChangeCurve().Load(S); -} - -//======================================================================= -//function : GeomAdaptor_HCurve -//purpose : -//======================================================================= - -inline GeomAdaptor_HCurve::GeomAdaptor_HCurve(const Handle(Geom_Curve)& S, - const Standard_Real UFirst, - const Standard_Real ULast) -{ - ChangeCurve().Load(S,UFirst,ULast); -} diff --git a/src/GeomAdaptor/GeomAdaptor_HSurface.cxx b/src/GeomAdaptor/GeomAdaptor_HSurface.cxx deleted file mode 100644 index e34063a04d..0000000000 --- a/src/GeomAdaptor/GeomAdaptor_HSurface.cxx +++ /dev/null @@ -1,24 +0,0 @@ -// Created on: 1995-08-25 -// Created by: Remi LEQUETTE -// Copyright (c) 1995-1999 Matra Datavision -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - - -#include -#include -#include -#include -#include - -IMPLEMENT_STANDARD_RTTIEXT(GeomAdaptor_HSurface,GeomAdaptor_GHSurface) \ No newline at end of file diff --git a/src/GeomAdaptor/GeomAdaptor_HSurface.hxx b/src/GeomAdaptor/GeomAdaptor_HSurface.hxx deleted file mode 100644 index f621d590aa..0000000000 --- a/src/GeomAdaptor/GeomAdaptor_HSurface.hxx +++ /dev/null @@ -1,76 +0,0 @@ -// Created on: 1995-08-25 -// Created by: Remi LEQUETTE -// Copyright (c) 1995-1999 Matra Datavision -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - -#ifndef _GeomAdaptor_HSurface_HeaderFile -#define _GeomAdaptor_HSurface_HeaderFile - -#include -#include - -#include -#include -class Standard_ConstructionError; -class GeomAdaptor_Surface; -class Geom_Surface; - - -class GeomAdaptor_HSurface; -DEFINE_STANDARD_HANDLE(GeomAdaptor_HSurface, GeomAdaptor_GHSurface) - -//! An interface between the services provided by any -//! surface from the package Geom and those required -//! of the surface by algorithms which use it. -//! Provides a surface handled by reference. -class GeomAdaptor_HSurface : public GeomAdaptor_GHSurface -{ - -public: - - - GeomAdaptor_HSurface(); - - GeomAdaptor_HSurface(const GeomAdaptor_Surface& AS); - - GeomAdaptor_HSurface(const Handle(Geom_Surface)& S); - - //! ConstructionError is raised if UFirst>ULast or VFirst>VLast - GeomAdaptor_HSurface(const Handle(Geom_Surface)& S, const Standard_Real UFirst, const Standard_Real ULast, const Standard_Real VFirst, const Standard_Real VLast, const Standard_Real TolU = 0.0, const Standard_Real TolV = 0.0); - - - - - DEFINE_STANDARD_RTTIEXT(GeomAdaptor_HSurface,GeomAdaptor_GHSurface) - -protected: - - - - -private: - - - - -}; - - -#include - - - - - -#endif // _GeomAdaptor_HSurface_HeaderFile diff --git a/src/GeomAdaptor/GeomAdaptor_HSurface.lxx b/src/GeomAdaptor/GeomAdaptor_HSurface.lxx deleted file mode 100644 index 1543843705..0000000000 --- a/src/GeomAdaptor/GeomAdaptor_HSurface.lxx +++ /dev/null @@ -1,60 +0,0 @@ -// Created on: 1995-08-25 -// Created by: Remi LEQUETTE -// Copyright (c) 1995-1999 Matra Datavision -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - -//======================================================================= -//function : GeomAdaptor_HSurface -//purpose : -//======================================================================= - -inline GeomAdaptor_HSurface::GeomAdaptor_HSurface() -{ -} - -//======================================================================= -//function : GeomAdaptor_HSurface -//purpose : -//======================================================================= - -inline GeomAdaptor_HSurface::GeomAdaptor_HSurface(const GeomAdaptor_Surface& AS) : -GeomAdaptor_GHSurface(AS) -{ -} - -//======================================================================= -//function : GeomAdaptor_HSurface -//purpose : -//======================================================================= - -inline GeomAdaptor_HSurface::GeomAdaptor_HSurface(const Handle(Geom_Surface)& S) -{ - ChangeSurface().Load(S); -} - -//======================================================================= -//function : GeomAdaptor_HSurface -//purpose : -//======================================================================= - -inline GeomAdaptor_HSurface::GeomAdaptor_HSurface(const Handle(Geom_Surface)& S, - const Standard_Real UFirst, - const Standard_Real ULast, - const Standard_Real VFirst, - const Standard_Real VLast, - const Standard_Real TolU, - const Standard_Real TolV) -{ - ChangeSurface().Load(S,UFirst,ULast,VFirst,VLast,TolU,TolV); -} diff --git a/src/GeomAdaptor/GeomAdaptor_HSurfaceOfLinearExtrusion.hxx b/src/GeomAdaptor/GeomAdaptor_HSurfaceOfLinearExtrusion.hxx deleted file mode 100644 index a6ffd43a74..0000000000 --- a/src/GeomAdaptor/GeomAdaptor_HSurfaceOfLinearExtrusion.hxx +++ /dev/null @@ -1,93 +0,0 @@ -// Created on: 1992-10-08 -// Created by: Isabelle GRIGNON -// Copyright (c) 1992-1999 Matra Datavision -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - -#ifndef _GeomAdaptor_HSurfaceOfLinearExtrusion_HeaderFile -#define _GeomAdaptor_HSurfaceOfLinearExtrusion_HeaderFile - -#include -#include - -#include -#include -class Standard_OutOfRange; -class Standard_NoSuchObject; -class Standard_DomainError; -class GeomAdaptor_SurfaceOfLinearExtrusion; -class Adaptor3d_Surface; - - -class GeomAdaptor_HSurfaceOfLinearExtrusion; -DEFINE_STANDARD_HANDLE(GeomAdaptor_HSurfaceOfLinearExtrusion, Adaptor3d_HSurface) - - -class GeomAdaptor_HSurfaceOfLinearExtrusion : public Adaptor3d_HSurface -{ - -public: - - - //! Creates an empty GenHSurface. - Standard_EXPORT GeomAdaptor_HSurfaceOfLinearExtrusion(); - - //! Creates a GenHSurface from a Surface. - Standard_EXPORT GeomAdaptor_HSurfaceOfLinearExtrusion(const GeomAdaptor_SurfaceOfLinearExtrusion& S); - - //! Sets the field of the GenHSurface. - Standard_EXPORT void Set (const GeomAdaptor_SurfaceOfLinearExtrusion& S); - - //! Returns a reference to the Surface inside the HSurface. - //! This is redefined from HSurface, cannot be inline. - Standard_EXPORT const Adaptor3d_Surface& Surface() const Standard_OVERRIDE; - - //! Returns the surface used to create the GenHSurface. - GeomAdaptor_SurfaceOfLinearExtrusion& ChangeSurface(); - - - - - DEFINE_STANDARD_RTTI_INLINE(GeomAdaptor_HSurfaceOfLinearExtrusion,Adaptor3d_HSurface) - -protected: - - - GeomAdaptor_SurfaceOfLinearExtrusion mySurf; - - -private: - - - - -}; - -#define TheSurface GeomAdaptor_SurfaceOfLinearExtrusion -#define TheSurface_hxx -#define Adaptor3d_GenHSurface GeomAdaptor_HSurfaceOfLinearExtrusion -#define Adaptor3d_GenHSurface_hxx -#define Handle_Adaptor3d_GenHSurface Handle(GeomAdaptor_HSurfaceOfLinearExtrusion) - -#include - -#undef TheSurface -#undef TheSurface_hxx -#undef Adaptor3d_GenHSurface -#undef Adaptor3d_GenHSurface_hxx -#undef Handle_Adaptor3d_GenHSurface - - - - -#endif // _GeomAdaptor_HSurfaceOfLinearExtrusion_HeaderFile diff --git a/src/GeomAdaptor/GeomAdaptor_HSurfaceOfLinearExtrusion_0.cxx b/src/GeomAdaptor/GeomAdaptor_HSurfaceOfLinearExtrusion_0.cxx deleted file mode 100644 index 647780fb66..0000000000 --- a/src/GeomAdaptor/GeomAdaptor_HSurfaceOfLinearExtrusion_0.cxx +++ /dev/null @@ -1,35 +0,0 @@ -// Created on: 1992-10-08 -// Created by: Isabelle GRIGNON -// Copyright (c) 1992-1999 Matra Datavision -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - -#include - -#include - -#include -#include -#include -#include -#include - - - -#define TheSurface GeomAdaptor_SurfaceOfLinearExtrusion -#define TheSurface_hxx -#define Adaptor3d_GenHSurface GeomAdaptor_HSurfaceOfLinearExtrusion -#define Adaptor3d_GenHSurface_hxx -#define Handle_Adaptor3d_GenHSurface Handle(GeomAdaptor_HSurfaceOfLinearExtrusion) -#include - diff --git a/src/GeomAdaptor/GeomAdaptor_HSurfaceOfRevolution.hxx b/src/GeomAdaptor/GeomAdaptor_HSurfaceOfRevolution.hxx deleted file mode 100644 index b6387ea1ff..0000000000 --- a/src/GeomAdaptor/GeomAdaptor_HSurfaceOfRevolution.hxx +++ /dev/null @@ -1,93 +0,0 @@ -// Created on: 1992-10-08 -// Created by: Isabelle GRIGNON -// Copyright (c) 1992-1999 Matra Datavision -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - -#ifndef _GeomAdaptor_HSurfaceOfRevolution_HeaderFile -#define _GeomAdaptor_HSurfaceOfRevolution_HeaderFile - -#include -#include - -#include -#include -class Standard_OutOfRange; -class Standard_NoSuchObject; -class Standard_DomainError; -class GeomAdaptor_SurfaceOfRevolution; -class Adaptor3d_Surface; - - -class GeomAdaptor_HSurfaceOfRevolution; -DEFINE_STANDARD_HANDLE(GeomAdaptor_HSurfaceOfRevolution, Adaptor3d_HSurface) - - -class GeomAdaptor_HSurfaceOfRevolution : public Adaptor3d_HSurface -{ - -public: - - - //! Creates an empty GenHSurface. - Standard_EXPORT GeomAdaptor_HSurfaceOfRevolution(); - - //! Creates a GenHSurface from a Surface. - Standard_EXPORT GeomAdaptor_HSurfaceOfRevolution(const GeomAdaptor_SurfaceOfRevolution& S); - - //! Sets the field of the GenHSurface. - Standard_EXPORT void Set (const GeomAdaptor_SurfaceOfRevolution& S); - - //! Returns a reference to the Surface inside the HSurface. - //! This is redefined from HSurface, cannot be inline. - Standard_EXPORT const Adaptor3d_Surface& Surface() const Standard_OVERRIDE; - - //! Returns the surface used to create the GenHSurface. - GeomAdaptor_SurfaceOfRevolution& ChangeSurface(); - - - - - DEFINE_STANDARD_RTTI_INLINE(GeomAdaptor_HSurfaceOfRevolution,Adaptor3d_HSurface) - -protected: - - - GeomAdaptor_SurfaceOfRevolution mySurf; - - -private: - - - - -}; - -#define TheSurface GeomAdaptor_SurfaceOfRevolution -#define TheSurface_hxx -#define Adaptor3d_GenHSurface GeomAdaptor_HSurfaceOfRevolution -#define Adaptor3d_GenHSurface_hxx -#define Handle_Adaptor3d_GenHSurface Handle(GeomAdaptor_HSurfaceOfRevolution) - -#include - -#undef TheSurface -#undef TheSurface_hxx -#undef Adaptor3d_GenHSurface -#undef Adaptor3d_GenHSurface_hxx -#undef Handle_Adaptor3d_GenHSurface - - - - -#endif // _GeomAdaptor_HSurfaceOfRevolution_HeaderFile diff --git a/src/GeomAdaptor/GeomAdaptor_HSurfaceOfRevolution_0.cxx b/src/GeomAdaptor/GeomAdaptor_HSurfaceOfRevolution_0.cxx deleted file mode 100644 index 86278861d9..0000000000 --- a/src/GeomAdaptor/GeomAdaptor_HSurfaceOfRevolution_0.cxx +++ /dev/null @@ -1,35 +0,0 @@ -// Created on: 1992-10-08 -// Created by: Isabelle GRIGNON -// Copyright (c) 1992-1999 Matra Datavision -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - -#include - -#include - -#include -#include -#include -#include -#include - - - -#define TheSurface GeomAdaptor_SurfaceOfRevolution -#define TheSurface_hxx -#define Adaptor3d_GenHSurface GeomAdaptor_HSurfaceOfRevolution -#define Adaptor3d_GenHSurface_hxx -#define Handle_Adaptor3d_GenHSurface Handle(GeomAdaptor_HSurfaceOfRevolution) -#include - diff --git a/src/GeomAdaptor/GeomAdaptor_Surface.cxx b/src/GeomAdaptor/GeomAdaptor_Surface.cxx index 621220dae0..27d058aefc 100644 --- a/src/GeomAdaptor/GeomAdaptor_Surface.cxx +++ b/src/GeomAdaptor/GeomAdaptor_Surface.cxx @@ -21,8 +21,10 @@ #define No_Standard_RangeError #define No_Standard_OutOfRange -#include -#include +#include + +#include +#include #include #include #include @@ -40,9 +42,6 @@ #include #include #include -#include -#include -#include #include #include #include @@ -70,6 +69,8 @@ static const Standard_Real PosTol = Precision::PConfusion()*0.5; +IMPLEMENT_STANDARD_RTTIEXT(GeomAdaptor_Surface, Adaptor3d_Surface) + //======================================================================= //function : LocalContinuity //purpose : @@ -161,7 +162,7 @@ void GeomAdaptor_Surface::load(const Handle(Geom_Surface)& S, Handle(Geom_SurfaceOfRevolution)::DownCast(mySurface); // Create nested adaptor for base curve Handle(Geom_Curve) aBaseCurve = myRevSurf->BasisCurve(); - Handle(Adaptor3d_HCurve) aBaseAdaptor = new GeomAdaptor_HCurve(aBaseCurve); + Handle(Adaptor3d_Curve) aBaseAdaptor = new GeomAdaptor_Curve(aBaseCurve); // Create corresponding evaluator myNestedEvaluator = new GeomEvaluator_SurfaceOfRevolution (aBaseAdaptor, myRevSurf->Direction(), myRevSurf->Location()); @@ -173,7 +174,7 @@ void GeomAdaptor_Surface::load(const Handle(Geom_Surface)& S, Handle(Geom_SurfaceOfLinearExtrusion)::DownCast(mySurface); // Create nested adaptor for base curve Handle(Geom_Curve) aBaseCurve = myExtSurf->BasisCurve(); - Handle(Adaptor3d_HCurve) aBaseAdaptor = new GeomAdaptor_HCurve(aBaseCurve); + Handle(Adaptor3d_Curve) aBaseAdaptor = new GeomAdaptor_Curve(aBaseCurve); // Create corresponding evaluator myNestedEvaluator = new GeomEvaluator_SurfaceOfExtrusion (aBaseAdaptor, myExtSurf->Direction()); @@ -192,8 +193,8 @@ void GeomAdaptor_Surface::load(const Handle(Geom_Surface)& S, Handle(Geom_OffsetSurface) myOffSurf = Handle(Geom_OffsetSurface)::DownCast(mySurface); // Create nested adaptor for base surface Handle(Geom_Surface) aBaseSurf = myOffSurf->BasisSurface(); - Handle(GeomAdaptor_HSurface) aBaseAdaptor = - new GeomAdaptor_HSurface(aBaseSurf, myUFirst, myULast, myVFirst, myVLast, myTolU, myTolV); + Handle(GeomAdaptor_Surface) aBaseAdaptor = + new GeomAdaptor_Surface(aBaseSurf, myUFirst, myULast, myVFirst, myVLast, myTolU, myTolV); myNestedEvaluator = new GeomEvaluator_OffsetSurface( aBaseAdaptor, myOffSurf->Offset(), myOffSurf->OsculatingSurface()); } @@ -555,12 +556,12 @@ void GeomAdaptor_Surface::VIntervals(TColStd_Array1OfReal& T, const GeomAbs_Shap //purpose : //======================================================================= -Handle(Adaptor3d_HSurface) GeomAdaptor_Surface::UTrim(const Standard_Real First, +Handle(Adaptor3d_Surface) GeomAdaptor_Surface::UTrim(const Standard_Real First, const Standard_Real Last , const Standard_Real Tol ) const { - return Handle(GeomAdaptor_HSurface) - (new GeomAdaptor_HSurface(mySurface,First,Last,myVFirst,myVLast,Tol,myTolV)); + return Handle(GeomAdaptor_Surface) + (new GeomAdaptor_Surface(mySurface,First,Last,myVFirst,myVLast,Tol,myTolV)); } //======================================================================= @@ -568,12 +569,12 @@ Handle(Adaptor3d_HSurface) GeomAdaptor_Surface::UTrim(const Standard_Real First, //purpose : //======================================================================= -Handle(Adaptor3d_HSurface) GeomAdaptor_Surface::VTrim(const Standard_Real First, +Handle(Adaptor3d_Surface) GeomAdaptor_Surface::VTrim(const Standard_Real First, const Standard_Real Last , const Standard_Real Tol ) const { - return Handle(GeomAdaptor_HSurface) - (new GeomAdaptor_HSurface(mySurface,myUFirst,myULast,First,Last,myTolU,Tol)); + return Handle(GeomAdaptor_Surface) + (new GeomAdaptor_Surface(mySurface,myUFirst,myULast,First,Last,myTolU,Tol)); } //======================================================================= @@ -1333,7 +1334,7 @@ gp_Dir GeomAdaptor_Surface::Direction() const //purpose : //======================================================================= -Handle(Adaptor3d_HCurve) GeomAdaptor_Surface::BasisCurve() const +Handle(Adaptor3d_Curve) GeomAdaptor_Surface::BasisCurve() const { Handle(Geom_Curve) C; if (mySurfaceType == GeomAbs_SurfaceOfExtrusion) @@ -1342,7 +1343,7 @@ Handle(Adaptor3d_HCurve) GeomAdaptor_Surface::BasisCurve() const C = Handle(Geom_SurfaceOfRevolution)::DownCast (mySurface)->BasisCurve(); else throw Standard_NoSuchObject("GeomAdaptor_Surface::BasisCurve"); - return Handle(GeomAdaptor_HCurve)(new GeomAdaptor_HCurve(C)); + return Handle(GeomAdaptor_Curve)(new GeomAdaptor_Curve(C)); } //======================================================================= @@ -1350,11 +1351,11 @@ Handle(Adaptor3d_HCurve) GeomAdaptor_Surface::BasisCurve() const //purpose : //======================================================================= -Handle(Adaptor3d_HSurface) GeomAdaptor_Surface::BasisSurface() const +Handle(Adaptor3d_Surface) GeomAdaptor_Surface::BasisSurface() const { if (mySurfaceType != GeomAbs_OffsetSurface) throw Standard_NoSuchObject("GeomAdaptor_Surface::BasisSurface"); - return new GeomAdaptor_HSurface + return new GeomAdaptor_Surface (Handle(Geom_OffsetSurface)::DownCast (mySurface)->BasisSurface(), myUFirst,myULast,myVFirst,myVLast); } diff --git a/src/GeomAdaptor/GeomAdaptor_Surface.hxx b/src/GeomAdaptor/GeomAdaptor_Surface.hxx index 2f0d4838c3..725bcfb6b5 100644 --- a/src/GeomAdaptor/GeomAdaptor_Surface.hxx +++ b/src/GeomAdaptor/GeomAdaptor_Surface.hxx @@ -17,38 +17,15 @@ #ifndef _GeomAdaptor_Surface_HeaderFile #define _GeomAdaptor_Surface_HeaderFile -#include -#include -#include - -#include -#include -#include #include +#include #include -#include -#include -#include #include -class Geom_Surface; -class Standard_NoSuchObject; -class Standard_OutOfRange; -class Standard_ConstructionError; -class Standard_DomainError; -class Adaptor3d_HSurface; -class gp_Pnt; -class gp_Vec; -class gp_Pln; -class gp_Cylinder; -class gp_Cone; -class gp_Sphere; -class gp_Torus; -class Geom_BezierSurface; -class Geom_BSplineSurface; -class gp_Ax1; -class gp_Dir; -class Adaptor3d_HCurve; +#include +#include +#include +DEFINE_STANDARD_HANDLE(GeomAdaptor_Surface, Adaptor3d_Surface) //! An interface between the services provided by any //! surface from the package Geom and those required @@ -60,33 +37,61 @@ class Adaptor3d_HCurve; //! thread-safe and parallel evaluations need to be prevented. class GeomAdaptor_Surface : public Adaptor3d_Surface { + DEFINE_STANDARD_RTTIEXT(GeomAdaptor_Surface, Adaptor3d_Surface) public: - DEFINE_STANDARD_ALLOC + GeomAdaptor_Surface() + : myUFirst(0.), myULast(0.), + myVFirst(0.), myVLast (0.), + myTolU(0.), myTolV(0.), + mySurfaceType (GeomAbs_OtherSurface) {} + + GeomAdaptor_Surface(const Handle(Geom_Surface)& theSurf) + : myTolU(0.), myTolV(0.) + { + Load (theSurf); + } + + //! Standard_ConstructionError is raised if UFirst>ULast or VFirst>VLast + GeomAdaptor_Surface (const Handle(Geom_Surface)& theSurf, + const Standard_Real theUFirst, const Standard_Real theULast, + const Standard_Real theVFirst, const Standard_Real theVLast, + const Standard_Real theTolU = 0.0, const Standard_Real theTolV = 0.0) + { + Load (theSurf, theUFirst, theULast, theVFirst, theVLast, theTolU, theTolV); + } + + void Load (const Handle(Geom_Surface)& theSurf) + { + if (theSurf.IsNull()) { throw Standard_NullObject("GeomAdaptor_Surface::Load"); } + + Standard_Real aU1, aU2, aV1, aV2; + theSurf->Bounds (aU1, aU2, aV1, aV2); + load (theSurf, aU1, aU2, aV1, aV2); + } + + //! Standard_ConstructionError is raised if theUFirst>theULast or theVFirst>theVLast + void Load (const Handle(Geom_Surface)& theSurf, + const Standard_Real theUFirst, const Standard_Real theULast, + const Standard_Real theVFirst, const Standard_Real theVLast, + const Standard_Real theTolU = 0.0, const Standard_Real theTolV = 0.0) + { + if (theSurf.IsNull()) { throw Standard_NullObject("GeomAdaptor_Surface::Load"); } + if (theUFirst > theULast || theVFirst > theVLast) { throw Standard_ConstructionError("GeomAdaptor_Surface::Load"); } + + load (theSurf, theUFirst, theULast, theVFirst, theVLast, theTolU, theTolV); + } + + const Handle(Geom_Surface)& Surface() const { return mySurface; } + + virtual Standard_Real FirstUParameter() const Standard_OVERRIDE { return myUFirst; } + + virtual Standard_Real LastUParameter() const Standard_OVERRIDE { return myULast; } + + virtual Standard_Real FirstVParameter() const Standard_OVERRIDE { return myVFirst; } + + virtual Standard_Real LastVParameter() const Standard_OVERRIDE { return myVLast; } - - GeomAdaptor_Surface(); - - GeomAdaptor_Surface(const Handle(Geom_Surface)& S); - - //! ConstructionError is raised if UFirst>ULast or VFirst>VLast - GeomAdaptor_Surface(const Handle(Geom_Surface)& S, const Standard_Real UFirst, const Standard_Real ULast, const Standard_Real VFirst, const Standard_Real VLast, const Standard_Real TolU = 0.0, const Standard_Real TolV = 0.0); - - void Load (const Handle(Geom_Surface)& S); - - //! ConstructionError is raised if UFirst>ULast or VFirst>VLast - void Load (const Handle(Geom_Surface)& S, const Standard_Real UFirst, const Standard_Real ULast, const Standard_Real VFirst, const Standard_Real VLast, const Standard_Real TolU = 0.0, const Standard_Real TolV = 0.0); - - const Handle(Geom_Surface)& Surface() const; - - Standard_Real FirstUParameter() const Standard_OVERRIDE; - - Standard_Real LastUParameter() const Standard_OVERRIDE; - - Standard_Real FirstVParameter() const Standard_OVERRIDE; - - Standard_Real LastVParameter() const Standard_OVERRIDE; - Standard_EXPORT GeomAbs_Shape UContinuity() const Standard_OVERRIDE; Standard_EXPORT GeomAbs_Shape VContinuity() const Standard_OVERRIDE; @@ -112,13 +117,13 @@ public: //! parameters and . is used to //! test for 3d points confusion. //! If >= - Standard_EXPORT Handle(Adaptor3d_HSurface) UTrim (const Standard_Real First, const Standard_Real Last, const Standard_Real Tol) const Standard_OVERRIDE; + Standard_EXPORT Handle(Adaptor3d_Surface) UTrim (const Standard_Real First, const Standard_Real Last, const Standard_Real Tol) const Standard_OVERRIDE; //! Returns a surface trimmed in the V direction between //! parameters and . is used to //! test for 3d points confusion. //! If >= - Standard_EXPORT Handle(Adaptor3d_HSurface) VTrim (const Standard_Real First, const Standard_Real Last, const Standard_Real Tol) const Standard_OVERRIDE; + Standard_EXPORT Handle(Adaptor3d_Surface) VTrim (const Standard_Real First, const Standard_Real Last, const Standard_Real Tol) const Standard_OVERRIDE; Standard_EXPORT Standard_Boolean IsUClosed() const Standard_OVERRIDE; @@ -187,8 +192,8 @@ public: //! Cone, Sphere, Torus, BezierSurface, //! BSplineSurface, SurfaceOfRevolution, //! SurfaceOfExtrusion, OtherSurface - GeomAbs_SurfaceType GetType() const Standard_OVERRIDE; - + virtual GeomAbs_SurfaceType GetType() const Standard_OVERRIDE { return mySurfaceType; } + Standard_EXPORT gp_Pln Plane() const Standard_OVERRIDE; Standard_EXPORT gp_Cylinder Cylinder() const Standard_OVERRIDE; @@ -233,24 +238,14 @@ public: Standard_EXPORT gp_Dir Direction() const Standard_OVERRIDE; - Standard_EXPORT Handle(Adaptor3d_HCurve) BasisCurve() const Standard_OVERRIDE; + Standard_EXPORT Handle(Adaptor3d_Curve) BasisCurve() const Standard_OVERRIDE; - Standard_EXPORT Handle(Adaptor3d_HSurface) BasisSurface() const Standard_OVERRIDE; + Standard_EXPORT Handle(Adaptor3d_Surface) BasisSurface() const Standard_OVERRIDE; Standard_EXPORT Standard_Real OffsetValue() const Standard_OVERRIDE; - - - -protected: - - - - - private: - Standard_EXPORT void Span (const Standard_Integer Side, const Standard_Integer Ideb, const Standard_Integer Ifin, Standard_Integer& OutIdeb, Standard_Integer& OutIfin, const Standard_Integer FKIndx, const Standard_Integer LKIndx) const; Standard_EXPORT Standard_Boolean IfUVBound (const Standard_Real U, const Standard_Real V, Standard_Integer& Ideb, Standard_Integer& Ifin, Standard_Integer& IVdeb, Standard_Integer& IVfin, const Standard_Integer USide, const Standard_Integer VSide) const; @@ -262,6 +257,7 @@ private: //! \param theV second parameter to identify the span for caching Standard_EXPORT void RebuildCache (const Standard_Real theU, const Standard_Real theV) const; +private: Handle(Geom_Surface) mySurface; Standard_Real myUFirst; @@ -279,11 +275,4 @@ protected: Handle(GeomEvaluator_Surface) myNestedEvaluator; ///< Calculates values of nested complex surfaces (offset surface, surface of extrusion or revolution) }; - -#include - - - - - #endif // _GeomAdaptor_Surface_HeaderFile diff --git a/src/GeomAdaptor/GeomAdaptor_Surface.lxx b/src/GeomAdaptor/GeomAdaptor_Surface.lxx deleted file mode 100644 index af7644ed0f..0000000000 --- a/src/GeomAdaptor/GeomAdaptor_Surface.lxx +++ /dev/null @@ -1,152 +0,0 @@ -// Created on: 1993-05-18 -// Created by: Bruno DUMORTIER -// Copyright (c) 1993-1999 Matra Datavision -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - -#include -#include -#include - -//======================================================================= -//function : GeomAdaptor_Surface -//purpose : -//======================================================================= - -inline GeomAdaptor_Surface::GeomAdaptor_Surface() - : myUFirst(0.), - myULast(0.), - myVFirst(0.), - myVLast (0.), - myTolU(0.), - myTolV(0.), - mySurfaceType(GeomAbs_OtherSurface) -{ -} - -//======================================================================= -//function : GeomAdaptor_Surface -//purpose : -//======================================================================= - -inline GeomAdaptor_Surface::GeomAdaptor_Surface(const Handle(Geom_Surface)& S) - : myTolU(0.), myTolV(0.) -{ - Load(S); -} - -//======================================================================= -//function : GeomAdaptor_Surface -//purpose : -//======================================================================= - -inline GeomAdaptor_Surface::GeomAdaptor_Surface(const Handle(Geom_Surface)& S, - const Standard_Real UFirst, - const Standard_Real ULast, - const Standard_Real VFirst, - const Standard_Real VLast, - const Standard_Real TolU, - const Standard_Real TolV) -{ - Load(S,UFirst,ULast,VFirst,VLast,TolU,TolV); -} - -//======================================================================= -//function : Load -//purpose : -//======================================================================= - -inline void GeomAdaptor_Surface::Load(const Handle(Geom_Surface)& S) -{ - if ( S.IsNull()) throw Standard_NullObject("GeomAdaptor_Surface::Load"); - - Standard_Real U1,U2,V1,V2; - S->Bounds(U1,U2,V1,V2); - load(S,U1,U2,V1,V2); -} - -//======================================================================= -//function : Load -//purpose : -//======================================================================= - -inline void GeomAdaptor_Surface::Load(const Handle(Geom_Surface)& S, - const Standard_Real UFirst, - const Standard_Real ULast, - const Standard_Real VFirst, - const Standard_Real VLast, - const Standard_Real TolU, - const Standard_Real TolV) -{ - if ( S.IsNull()) throw Standard_NullObject("GeomAdaptor_Surface::Load"); - - if(UFirst>ULast || VFirst>VLast) - throw Standard_ConstructionError("GeomAdaptor_Surface::Load"); - - load(S,UFirst,ULast,VFirst,VLast,TolU,TolV); -} - - -//======================================================================= -//function : Surface -//purpose : -//======================================================================= - -inline const Handle(Geom_Surface)& GeomAdaptor_Surface::Surface() const { - return mySurface; -} - -//======================================================================= -//function : FirstUParameter -//purpose : -//======================================================================= - -inline Standard_Real GeomAdaptor_Surface::FirstUParameter() const { - return myUFirst; -} - -//======================================================================= -//function : LastUParameter -//purpose : -//======================================================================= - -inline Standard_Real GeomAdaptor_Surface::LastUParameter() const { - return myULast; -} - -//======================================================================= -//function : FirstVParameter -//purpose : -//======================================================================= - -inline Standard_Real GeomAdaptor_Surface::FirstVParameter() const { - return myVFirst; -} - -//======================================================================= -//function : LastVParameter -//purpose : -//======================================================================= - -inline Standard_Real GeomAdaptor_Surface::LastVParameter() const { - return myVLast; -} - -//======================================================================= -//function : GetType -//purpose : -//======================================================================= - -inline GeomAbs_SurfaceType GeomAdaptor_Surface::GetType() const { - return mySurfaceType; -} diff --git a/src/GeomAdaptor/GeomAdaptor_SurfaceOfLinearExtrusion.cxx b/src/GeomAdaptor/GeomAdaptor_SurfaceOfLinearExtrusion.cxx index 9c64c3c1eb..d196c8e908 100644 --- a/src/GeomAdaptor/GeomAdaptor_SurfaceOfLinearExtrusion.cxx +++ b/src/GeomAdaptor/GeomAdaptor_SurfaceOfLinearExtrusion.cxx @@ -16,11 +16,14 @@ #include -#include -#include +#include +#include +#include #include #include +IMPLEMENT_STANDARD_RTTIEXT(GeomAdaptor_SurfaceOfLinearExtrusion, GeomAdaptor_Surface) + //======================================================================= //function : GeomAdaptor_SurfaceOfLinearExtrusion //purpose : @@ -35,7 +38,7 @@ GeomAdaptor_SurfaceOfLinearExtrusion::GeomAdaptor_SurfaceOfLinearExtrusion() //======================================================================= GeomAdaptor_SurfaceOfLinearExtrusion::GeomAdaptor_SurfaceOfLinearExtrusion -(const Handle(Adaptor3d_HCurve)& C) +(const Handle(Adaptor3d_Curve)& C) : myHaveDir(Standard_False) { Load(C); @@ -47,7 +50,7 @@ GeomAdaptor_SurfaceOfLinearExtrusion::GeomAdaptor_SurfaceOfLinearExtrusion //======================================================================= GeomAdaptor_SurfaceOfLinearExtrusion::GeomAdaptor_SurfaceOfLinearExtrusion -(const Handle(Adaptor3d_HCurve)& C, +(const Handle(Adaptor3d_Curve)& C, const gp_Dir& V) : myHaveDir(Standard_False) { @@ -60,7 +63,7 @@ GeomAdaptor_SurfaceOfLinearExtrusion::GeomAdaptor_SurfaceOfLinearExtrusion //purpose : //======================================================================= -void GeomAdaptor_SurfaceOfLinearExtrusion::Load(const Handle(Adaptor3d_HCurve)& C) +void GeomAdaptor_SurfaceOfLinearExtrusion::Load(const Handle(Adaptor3d_Curve)& C) { myBasisCurve = C; if (myHaveDir) @@ -191,13 +194,13 @@ void GeomAdaptor_SurfaceOfLinearExtrusion::VIntervals //purpose : //======================================================================= -Handle(Adaptor3d_HSurface) GeomAdaptor_SurfaceOfLinearExtrusion::VTrim +Handle(Adaptor3d_Surface) GeomAdaptor_SurfaceOfLinearExtrusion::VTrim (const Standard_Real First, const Standard_Real Last, const Standard_Real Tol) const { - Handle(Adaptor3d_HCurve) HC = BasisCurve()->Trim(First,Last,Tol); - Handle(GeomAdaptor_HSurfaceOfLinearExtrusion) HR = new GeomAdaptor_HSurfaceOfLinearExtrusion( + Handle(Adaptor3d_Curve) HC = BasisCurve()->Trim(First,Last,Tol); + Handle(GeomAdaptor_SurfaceOfLinearExtrusion) HR = new GeomAdaptor_SurfaceOfLinearExtrusion( GeomAdaptor_SurfaceOfLinearExtrusion(HC, myDirection)); return HR; } @@ -207,12 +210,12 @@ Handle(Adaptor3d_HSurface) GeomAdaptor_SurfaceOfLinearExtrusion::VTrim //purpose : //======================================================================= -Handle(Adaptor3d_HSurface) GeomAdaptor_SurfaceOfLinearExtrusion::UTrim +Handle(Adaptor3d_Surface) GeomAdaptor_SurfaceOfLinearExtrusion::UTrim (const Standard_Real , const Standard_Real , const Standard_Real ) const { - Handle(GeomAdaptor_HSurfaceOfLinearExtrusion) HR = new GeomAdaptor_HSurfaceOfLinearExtrusion( + Handle(GeomAdaptor_SurfaceOfLinearExtrusion) HR = new GeomAdaptor_SurfaceOfLinearExtrusion( GeomAdaptor_SurfaceOfLinearExtrusion(myBasisCurve, myDirection)); return HR; } @@ -530,7 +533,7 @@ gp_Dir GeomAdaptor_SurfaceOfLinearExtrusion::Direction() const //purpose : //======================================================================= -Handle(Adaptor3d_HCurve) GeomAdaptor_SurfaceOfLinearExtrusion::BasisCurve() const +Handle(Adaptor3d_Curve) GeomAdaptor_SurfaceOfLinearExtrusion::BasisCurve() const { return myBasisCurve; } diff --git a/src/GeomAdaptor/GeomAdaptor_SurfaceOfLinearExtrusion.hxx b/src/GeomAdaptor/GeomAdaptor_SurfaceOfLinearExtrusion.hxx index c67e10f8e9..f5e28e909a 100644 --- a/src/GeomAdaptor/GeomAdaptor_SurfaceOfLinearExtrusion.hxx +++ b/src/GeomAdaptor/GeomAdaptor_SurfaceOfLinearExtrusion.hxx @@ -17,19 +17,13 @@ #ifndef _GeomAdaptor_SurfaceOfLinearExtrusion_HeaderFile #define _GeomAdaptor_SurfaceOfLinearExtrusion_HeaderFile -#include -#include -#include - #include #include -class Adaptor3d_HCurve; class Standard_OutOfRange; class Standard_NoSuchObject; class Standard_DomainError; class gp_Dir; -class Adaptor3d_HSurface; class gp_Pnt; class gp_Vec; class gp_Pln; @@ -41,6 +35,7 @@ class Geom_BezierSurface; class Geom_BSplineSurface; class gp_Ax1; +DEFINE_STANDARD_HANDLE(GeomAdaptor_SurfaceOfLinearExtrusion, GeomAdaptor_Surface) //! Generalised cylinder. This surface is obtained by sweeping a curve in a given //! direction. The parametrization range for the parameter U is defined @@ -51,21 +46,19 @@ class gp_Ax1; //! The continuity of the surface is CN in the V direction. class GeomAdaptor_SurfaceOfLinearExtrusion : public GeomAdaptor_Surface { + DEFINE_STANDARD_RTTIEXT(GeomAdaptor_SurfaceOfLinearExtrusion, GeomAdaptor_Surface) public: - DEFINE_STANDARD_ALLOC - - Standard_EXPORT GeomAdaptor_SurfaceOfLinearExtrusion(); //! The Curve is loaded. - Standard_EXPORT GeomAdaptor_SurfaceOfLinearExtrusion(const Handle(Adaptor3d_HCurve)& C); + Standard_EXPORT GeomAdaptor_SurfaceOfLinearExtrusion(const Handle(Adaptor3d_Curve)& C); //! Thew Curve and the Direction are loaded. - Standard_EXPORT GeomAdaptor_SurfaceOfLinearExtrusion(const Handle(Adaptor3d_HCurve)& C, const gp_Dir& V); + Standard_EXPORT GeomAdaptor_SurfaceOfLinearExtrusion(const Handle(Adaptor3d_Curve)& C, const gp_Dir& V); //! Changes the Curve - Standard_EXPORT void Load (const Handle(Adaptor3d_HCurve)& C); + Standard_EXPORT void Load (const Handle(Adaptor3d_Curve)& C); //! Changes the Direction Standard_EXPORT void Load (const gp_Dir& V); @@ -104,13 +97,13 @@ public: //! parameters and . is used to //! test for 3d points confusion. //! If >= - Standard_EXPORT Handle(Adaptor3d_HSurface) UTrim (const Standard_Real First, const Standard_Real Last, const Standard_Real Tol) const Standard_OVERRIDE; + Standard_EXPORT Handle(Adaptor3d_Surface) UTrim (const Standard_Real First, const Standard_Real Last, const Standard_Real Tol) const Standard_OVERRIDE; //! Returns a surface trimmed in the V direction between //! parameters and . is used to //! test for 3d points confusion. //! If >= - Standard_EXPORT Handle(Adaptor3d_HSurface) VTrim (const Standard_Real First, const Standard_Real Last, const Standard_Real Tol) const Standard_OVERRIDE; + Standard_EXPORT Handle(Adaptor3d_Surface) VTrim (const Standard_Real First, const Standard_Real Last, const Standard_Real Tol) const Standard_OVERRIDE; Standard_EXPORT Standard_Boolean IsUClosed() const Standard_OVERRIDE; @@ -164,27 +157,12 @@ public: Standard_EXPORT gp_Dir Direction() const Standard_OVERRIDE; - Standard_EXPORT Handle(Adaptor3d_HCurve) BasisCurve() const Standard_OVERRIDE; - - - - -protected: - - - - + Standard_EXPORT Handle(Adaptor3d_Curve) BasisCurve() const Standard_OVERRIDE; private: - Handle(Adaptor3d_HCurve) myBasisCurve; ///< extruded curve + Handle(Adaptor3d_Curve) myBasisCurve; ///< extruded curve gp_Dir myDirection; ///< direction of extrusion Standard_Boolean myHaveDir; ///< whether the direction of extrusion is initialized }; - - - - - - #endif // _GeomAdaptor_SurfaceOfLinearExtrusion_HeaderFile diff --git a/src/GeomAdaptor/GeomAdaptor_SurfaceOfRevolution.cxx b/src/GeomAdaptor/GeomAdaptor_SurfaceOfRevolution.cxx index ccbf50aceb..b2bc4336c2 100644 --- a/src/GeomAdaptor/GeomAdaptor_SurfaceOfRevolution.cxx +++ b/src/GeomAdaptor/GeomAdaptor_SurfaceOfRevolution.cxx @@ -16,12 +16,14 @@ #include -#include +#include #include -#include +#include #include #include +IMPLEMENT_STANDARD_RTTIEXT(GeomAdaptor_SurfaceOfRevolution, GeomAdaptor_Surface) + //======================================================================= //function : GeomAdaptor_SurfaceOfRevolution //purpose : @@ -36,7 +38,7 @@ GeomAdaptor_SurfaceOfRevolution::GeomAdaptor_SurfaceOfRevolution() //======================================================================= GeomAdaptor_SurfaceOfRevolution::GeomAdaptor_SurfaceOfRevolution( - const Handle(Adaptor3d_HCurve)& C) + const Handle(Adaptor3d_Curve)& C) : myHaveAxis(Standard_False) { Load(C); @@ -48,7 +50,7 @@ GeomAdaptor_SurfaceOfRevolution::GeomAdaptor_SurfaceOfRevolution( //======================================================================= GeomAdaptor_SurfaceOfRevolution::GeomAdaptor_SurfaceOfRevolution( - const Handle(Adaptor3d_HCurve)& C, + const Handle(Adaptor3d_Curve)& C, const gp_Ax1& V) : myHaveAxis(Standard_False) { @@ -61,7 +63,7 @@ GeomAdaptor_SurfaceOfRevolution::GeomAdaptor_SurfaceOfRevolution( //purpose : //======================================================================= -void GeomAdaptor_SurfaceOfRevolution::Load(const Handle(Adaptor3d_HCurve)& C) +void GeomAdaptor_SurfaceOfRevolution::Load(const Handle(Adaptor3d_Curve)& C) { myBasisCurve = C; if (myHaveAxis) @@ -268,7 +270,7 @@ void GeomAdaptor_SurfaceOfRevolution::VIntervals(TColStd_Array1OfReal& T, //purpose : //======================================================================= -Handle(Adaptor3d_HSurface) GeomAdaptor_SurfaceOfRevolution::UTrim (const Standard_Real First, const Standard_Real Last, const Standard_Real Tol) const +Handle(Adaptor3d_Surface) GeomAdaptor_SurfaceOfRevolution::UTrim (const Standard_Real First, const Standard_Real Last, const Standard_Real Tol) const { const Standard_Real Eps = Precision::PConfusion(); (void )Eps; (void )First; (void )Last; (void )Tol; @@ -276,7 +278,7 @@ Handle(Adaptor3d_HSurface) GeomAdaptor_SurfaceOfRevolution::UTrim (const Standar ( Abs(First) > Eps || Abs(Last - 2.*M_PI) > Eps, "GeomAdaptor_SurfaceOfRevolution : UTrim : Parameters out of range"); - Handle(GeomAdaptor_HSurfaceOfRevolution) HR = new GeomAdaptor_HSurfaceOfRevolution( + Handle(GeomAdaptor_SurfaceOfRevolution) HR = new GeomAdaptor_SurfaceOfRevolution( GeomAdaptor_SurfaceOfRevolution(myBasisCurve, myAxis)); return HR; } @@ -287,13 +289,13 @@ Handle(Adaptor3d_HSurface) GeomAdaptor_SurfaceOfRevolution::UTrim (const Standar //purpose : //======================================================================= -Handle(Adaptor3d_HSurface) GeomAdaptor_SurfaceOfRevolution::VTrim +Handle(Adaptor3d_Surface) GeomAdaptor_SurfaceOfRevolution::VTrim (const Standard_Real First, const Standard_Real Last, const Standard_Real Tol) const { - Handle(Adaptor3d_HCurve) HC = BasisCurve()->Trim(First,Last,Tol); - Handle(GeomAdaptor_HSurfaceOfRevolution) HR = new GeomAdaptor_HSurfaceOfRevolution( + Handle(Adaptor3d_Curve) HC = BasisCurve()->Trim(First,Last,Tol); + Handle(GeomAdaptor_SurfaceOfRevolution) HR = new GeomAdaptor_SurfaceOfRevolution( GeomAdaptor_SurfaceOfRevolution(HC, myAxis)); return HR; } @@ -672,7 +674,7 @@ const gp_Ax3& GeomAdaptor_SurfaceOfRevolution::Axis() const //purpose : //======================================================================= -Handle(Adaptor3d_HCurve) GeomAdaptor_SurfaceOfRevolution::BasisCurve() const +Handle(Adaptor3d_Curve) GeomAdaptor_SurfaceOfRevolution::BasisCurve() const { return myBasisCurve; } diff --git a/src/GeomAdaptor/GeomAdaptor_SurfaceOfRevolution.hxx b/src/GeomAdaptor/GeomAdaptor_SurfaceOfRevolution.hxx index 405d1a94af..a41b151871 100644 --- a/src/GeomAdaptor/GeomAdaptor_SurfaceOfRevolution.hxx +++ b/src/GeomAdaptor/GeomAdaptor_SurfaceOfRevolution.hxx @@ -17,20 +17,13 @@ #ifndef _GeomAdaptor_SurfaceOfRevolution_HeaderFile #define _GeomAdaptor_SurfaceOfRevolution_HeaderFile -#include -#include -#include - #include #include #include -class Adaptor3d_HCurve; class Standard_OutOfRange; class Standard_NoSuchObject; class Standard_DomainError; -class gp_Ax1; -class Adaptor3d_HSurface; class gp_Pnt; class gp_Vec; class gp_Pln; @@ -40,9 +33,9 @@ class gp_Sphere; class gp_Torus; class Geom_BezierSurface; class Geom_BSplineSurface; -class gp_Ax3; class gp_Dir; +DEFINE_STANDARD_HANDLE(GeomAdaptor_SurfaceOfRevolution, GeomAdaptor_Surface) //! This class defines a complete surface of revolution. //! The surface is obtained by rotating a curve a complete revolution @@ -62,21 +55,19 @@ class gp_Dir; //! the degree of continuity of the referenced curve. class GeomAdaptor_SurfaceOfRevolution : public GeomAdaptor_Surface { + DEFINE_STANDARD_RTTIEXT(GeomAdaptor_SurfaceOfRevolution, GeomAdaptor_Surface) public: - DEFINE_STANDARD_ALLOC - - Standard_EXPORT GeomAdaptor_SurfaceOfRevolution(); //! The Curve is loaded. - Standard_EXPORT GeomAdaptor_SurfaceOfRevolution(const Handle(Adaptor3d_HCurve)& C); + Standard_EXPORT GeomAdaptor_SurfaceOfRevolution(const Handle(Adaptor3d_Curve)& C); //! The Curve and the Direction are loaded. - Standard_EXPORT GeomAdaptor_SurfaceOfRevolution(const Handle(Adaptor3d_HCurve)& C, const gp_Ax1& V); + Standard_EXPORT GeomAdaptor_SurfaceOfRevolution(const Handle(Adaptor3d_Curve)& C, const gp_Ax1& V); //! Changes the Curve - Standard_EXPORT void Load (const Handle(Adaptor3d_HCurve)& C); + Standard_EXPORT void Load (const Handle(Adaptor3d_Curve)& C); //! Changes the Direction Standard_EXPORT void Load (const gp_Ax1& V); @@ -117,13 +108,13 @@ public: //! parameters and . is used to //! test for 3d points confusion. //! If >= - Standard_EXPORT Handle(Adaptor3d_HSurface) UTrim (const Standard_Real First, const Standard_Real Last, const Standard_Real Tol) const Standard_OVERRIDE; + Standard_EXPORT Handle(Adaptor3d_Surface) UTrim (const Standard_Real First, const Standard_Real Last, const Standard_Real Tol) const Standard_OVERRIDE; //! Returns a surface trimmed in the V direction between //! parameters and . is used to //! test for 3d points confusion. //! If >= - Standard_EXPORT Handle(Adaptor3d_HSurface) VTrim (const Standard_Real First, const Standard_Real Last, const Standard_Real Tol) const Standard_OVERRIDE; + Standard_EXPORT Handle(Adaptor3d_Surface) VTrim (const Standard_Real First, const Standard_Real Last, const Standard_Real Tol) const Standard_OVERRIDE; Standard_EXPORT Standard_Boolean IsUClosed() const Standard_OVERRIDE; @@ -179,28 +170,13 @@ public: Standard_EXPORT const gp_Ax3& Axis() const; - Standard_EXPORT Handle(Adaptor3d_HCurve) BasisCurve() const Standard_OVERRIDE; - - - - -protected: - - - - + Standard_EXPORT Handle(Adaptor3d_Curve) BasisCurve() const Standard_OVERRIDE; private: - Handle(Adaptor3d_HCurve) myBasisCurve; ///< revolved curve + Handle(Adaptor3d_Curve) myBasisCurve; ///< revolved curve gp_Ax1 myAxis; ///< axis of revolution Standard_Boolean myHaveAxis; ///< whether axis of revolution is initialized gp_Ax3 myAxeRev; ///< auxiliary trihedron according to the curve position }; - - - - - - #endif // _GeomAdaptor_SurfaceOfRevolution_HeaderFile diff --git a/src/GeomConvert/GeomConvert_ApproxCurve.cxx b/src/GeomConvert/GeomConvert_ApproxCurve.cxx index 9167e7c36c..4bdc187ddc 100644 --- a/src/GeomConvert/GeomConvert_ApproxCurve.cxx +++ b/src/GeomConvert/GeomConvert_ApproxCurve.cxx @@ -15,12 +15,12 @@ // commercial license or contractual agreement. -#include +#include #include #include #include #include -#include +#include #include #include #include @@ -37,7 +37,7 @@ class GeomConvert_ApproxCurve_Eval : public AdvApprox_EvaluatorFunction { public: - GeomConvert_ApproxCurve_Eval (const Handle(Adaptor3d_HCurve)& theFunc, + GeomConvert_ApproxCurve_Eval (const Handle(Adaptor3d_Curve)& theFunc, Standard_Real First, Standard_Real Last) : fonct(theFunc) { StartEndSav[0] = First; StartEndSav[1] = Last; } @@ -49,7 +49,7 @@ class GeomConvert_ApproxCurve_Eval : public AdvApprox_EvaluatorFunction Standard_Integer *ErrorCode); private: - Handle(Adaptor3d_HCurve) fonct; + Handle(Adaptor3d_Curve) fonct; Standard_Real StartEndSav[2]; }; @@ -106,17 +106,17 @@ void GeomConvert_ApproxCurve_Eval::Evaluate (Standard_Integer *Dimension, GeomConvert_ApproxCurve::GeomConvert_ApproxCurve(const Handle(Geom_Curve)& Curve,const Standard_Real Tol3d,const GeomAbs_Shape Order,const Standard_Integer MaxSegments,const Standard_Integer MaxDegree) { - Handle(GeomAdaptor_HCurve) HCurve = new GeomAdaptor_HCurve (Curve); + Handle(GeomAdaptor_Curve) HCurve = new GeomAdaptor_Curve (Curve); Approximate(HCurve, Tol3d, Order, MaxSegments, MaxDegree); } -GeomConvert_ApproxCurve::GeomConvert_ApproxCurve(const Handle(Adaptor3d_HCurve)& Curve,const Standard_Real Tol3d,const GeomAbs_Shape Order,const Standard_Integer MaxSegments,const Standard_Integer MaxDegree) +GeomConvert_ApproxCurve::GeomConvert_ApproxCurve(const Handle(Adaptor3d_Curve)& Curve,const Standard_Real Tol3d,const GeomAbs_Shape Order,const Standard_Integer MaxSegments,const Standard_Integer MaxDegree) { Approximate(Curve, Tol3d, Order, MaxSegments, MaxDegree); } void GeomConvert_ApproxCurve::Approximate( - const Handle(Adaptor3d_HCurve)& theCurve, + const Handle(Adaptor3d_Curve)& theCurve, const Standard_Real theTol3d, const GeomAbs_Shape theOrder, const Standard_Integer theMaxSegments, diff --git a/src/GeomConvert/GeomConvert_ApproxCurve.hxx b/src/GeomConvert/GeomConvert_ApproxCurve.hxx index 42dcade59a..da6079a2eb 100644 --- a/src/GeomConvert/GeomConvert_ApproxCurve.hxx +++ b/src/GeomConvert/GeomConvert_ApproxCurve.hxx @@ -17,21 +17,14 @@ #ifndef _GeomConvert_ApproxCurve_HeaderFile #define _GeomConvert_ApproxCurve_HeaderFile -#include -#include -#include - -#include -#include +#include #include -#include #include + class Geom_BSplineCurve; class Standard_OutOfRange; class Standard_ConstructionError; class Geom_Curve; -class Adaptor3d_HCurve; - //! A framework to convert a 3D curve to a 3D BSpline. //! This is done by approximation to a BSpline curve within a given tolerance. @@ -60,7 +53,7 @@ public: //! MaxSegments allowed in the resulting BSpline curve, and //! - the highest degree MaxDeg which the //! polynomial defining the BSpline curve may have. - Standard_EXPORT GeomConvert_ApproxCurve(const Handle(Adaptor3d_HCurve)& Curve, const Standard_Real Tol3d, const GeomAbs_Shape Order, const Standard_Integer MaxSegments, const Standard_Integer MaxDegree); + Standard_EXPORT GeomConvert_ApproxCurve(const Handle(Adaptor3d_Curve)& Curve, const Standard_Real Tol3d, const GeomAbs_Shape Order, const Standard_Integer MaxSegments, const Standard_Integer MaxDegree); //! Returns the BSpline curve resulting from the approximation algorithm. Standard_EXPORT Handle(Geom_BSplineCurve) Curve() const; @@ -95,7 +88,7 @@ private: //! Converts a curve to B-spline - Standard_EXPORT void Approximate (const Handle(Adaptor3d_HCurve)& theCurve, const Standard_Real theTol3d, const GeomAbs_Shape theOrder, const Standard_Integer theMaxSegments, const Standard_Integer theMaxDegree); + Standard_EXPORT void Approximate (const Handle(Adaptor3d_Curve)& theCurve, const Standard_Real theTol3d, const GeomAbs_Shape theOrder, const Standard_Integer theMaxSegments, const Standard_Integer theMaxDegree); Standard_Boolean myIsDone; diff --git a/src/GeomConvert/GeomConvert_ApproxSurface.cxx b/src/GeomConvert/GeomConvert_ApproxSurface.cxx index fa2599b7d4..bcff1d586a 100644 --- a/src/GeomConvert/GeomConvert_ApproxSurface.cxx +++ b/src/GeomConvert/GeomConvert_ApproxSurface.cxx @@ -12,14 +12,14 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. +#include -#include +#include #include #include #include #include -#include -#include +#include #include #include #include @@ -31,7 +31,7 @@ class GeomConvert_ApproxSurface_Eval : public AdvApp2Var_EvaluatorFunc2Var public: - GeomConvert_ApproxSurface_Eval (const Handle(Adaptor3d_HSurface)& theAdaptor) + GeomConvert_ApproxSurface_Eval (const Handle(Adaptor3d_Surface)& theAdaptor) : myAdaptor (theAdaptor) {} virtual void Evaluate (Standard_Integer* theDimension, @@ -48,7 +48,7 @@ public: private: - mutable Handle(Adaptor3d_HSurface) myAdaptor; + mutable Handle(Adaptor3d_Surface) myAdaptor; }; @@ -298,11 +298,11 @@ GeomConvert_ApproxSurface::GeomConvert_ApproxSurface(const Handle(Geom_Surface)& const Standard_Integer MaxSegments, const Standard_Integer PrecisCode) { - Handle(Adaptor3d_HSurface) aSurfAdaptor = new GeomAdaptor_HSurface (Surf); + Handle(Adaptor3d_Surface) aSurfAdaptor = new GeomAdaptor_Surface (Surf); Approximate(aSurfAdaptor, Tol3d, UContinuity, VContinuity, MaxDegU, MaxDegV, MaxSegments, PrecisCode); } -GeomConvert_ApproxSurface::GeomConvert_ApproxSurface(const Handle(Adaptor3d_HSurface)& Surf, +GeomConvert_ApproxSurface::GeomConvert_ApproxSurface(const Handle(Adaptor3d_Surface)& Surf, const Standard_Real Tol3d, const GeomAbs_Shape UContinuity, const GeomAbs_Shape VContinuity, @@ -314,7 +314,7 @@ GeomConvert_ApproxSurface::GeomConvert_ApproxSurface(const Handle(Adaptor3d_HSur Approximate(Surf, Tol3d, UContinuity, VContinuity, MaxDegU, MaxDegV, MaxSegments, PrecisCode); } -void GeomConvert_ApproxSurface::Approximate(const Handle(Adaptor3d_HSurface)& theSurf, +void GeomConvert_ApproxSurface::Approximate(const Handle(Adaptor3d_Surface)& theSurf, const Standard_Real theTol3d, const GeomAbs_Shape theUContinuity, const GeomAbs_Shape theVContinuity, diff --git a/src/GeomConvert/GeomConvert_ApproxSurface.hxx b/src/GeomConvert/GeomConvert_ApproxSurface.hxx index 2a4a11c7f9..30f5c68e35 100644 --- a/src/GeomConvert/GeomConvert_ApproxSurface.hxx +++ b/src/GeomConvert/GeomConvert_ApproxSurface.hxx @@ -17,20 +17,12 @@ #ifndef _GeomConvert_ApproxSurface_HeaderFile #define _GeomConvert_ApproxSurface_HeaderFile -#include -#include -#include - -#include -#include +#include #include -#include #include -class Geom_BSplineSurface; -class Standard_OutOfRange; -class Geom_Surface; -class Adaptor3d_HSurface; +class Geom_BSplineSurface; +class Geom_Surface; //! A framework to convert a surface to a BSpline //! surface. This is done by approximation to a BSpline @@ -66,7 +58,7 @@ public: //! - the maximum number of segments MaxSegments //! allowed in the resulting BSpline curve //! - the index of precision PrecisCode. - Standard_EXPORT GeomConvert_ApproxSurface(const Handle(Adaptor3d_HSurface)& Surf, const Standard_Real Tol3d, const GeomAbs_Shape UContinuity, const GeomAbs_Shape VContinuity, const Standard_Integer MaxDegU, const Standard_Integer MaxDegV, const Standard_Integer MaxSegments, const Standard_Integer PrecisCode); + Standard_EXPORT GeomConvert_ApproxSurface(const Handle(Adaptor3d_Surface)& Surf, const Standard_Real Tol3d, const GeomAbs_Shape UContinuity, const GeomAbs_Shape VContinuity, const Standard_Integer MaxDegU, const Standard_Integer MaxDegV, const Standard_Integer MaxSegments, const Standard_Integer PrecisCode); //! Returns the BSpline surface resulting from the approximation algorithm. Standard_EXPORT Handle(Geom_BSplineSurface) Surface() const; @@ -101,7 +93,7 @@ private: //! Converts a surface to B-spline - Standard_EXPORT void Approximate (const Handle(Adaptor3d_HSurface)& theSurf, const Standard_Real theTol3d, const GeomAbs_Shape theUContinuity, const GeomAbs_Shape theVContinuity, const Standard_Integer theMaxDegU, const Standard_Integer theMaxDegV, const Standard_Integer theMaxSegments, const Standard_Integer thePrecisCode); + Standard_EXPORT void Approximate (const Handle(Adaptor3d_Surface)& theSurf, const Standard_Real theTol3d, const GeomAbs_Shape theUContinuity, const GeomAbs_Shape theVContinuity, const Standard_Integer theMaxDegU, const Standard_Integer theMaxDegV, const Standard_Integer theMaxSegments, const Standard_Integer thePrecisCode); Standard_Boolean myIsDone; diff --git a/src/GeomEvaluator/GeomEvaluator_OffsetCurve.cxx b/src/GeomEvaluator/GeomEvaluator_OffsetCurve.cxx index 48094553c6..d01328ba5d 100644 --- a/src/GeomEvaluator/GeomEvaluator_OffsetCurve.cxx +++ b/src/GeomEvaluator/GeomEvaluator_OffsetCurve.cxx @@ -14,7 +14,7 @@ #include -#include +#include #include @@ -32,7 +32,7 @@ GeomEvaluator_OffsetCurve::GeomEvaluator_OffsetCurve( } GeomEvaluator_OffsetCurve::GeomEvaluator_OffsetCurve( - const Handle(GeomAdaptor_HCurve)& theBase, + const Handle(GeomAdaptor_Curve)& theBase, const Standard_Real theOffset, const gp_Dir& theDirection) : GeomEvaluator_Curve(), diff --git a/src/GeomEvaluator/GeomEvaluator_OffsetCurve.hxx b/src/GeomEvaluator/GeomEvaluator_OffsetCurve.hxx index 28bdeaccb4..1e894ce3b0 100644 --- a/src/GeomEvaluator/GeomEvaluator_OffsetCurve.hxx +++ b/src/GeomEvaluator/GeomEvaluator_OffsetCurve.hxx @@ -16,11 +16,10 @@ #define _GeomEvaluator_OffsetCurve_HeaderFile #include +#include #include #include -class GeomAdaptor_HCurve; - //! Allows to calculate values and derivatives for offset curves in 3D class GeomEvaluator_OffsetCurve : public GeomEvaluator_Curve { @@ -32,7 +31,7 @@ public: const gp_Dir& theDirection); //! Initialize evaluator by curve adaptor Standard_EXPORT GeomEvaluator_OffsetCurve( - const Handle(GeomAdaptor_HCurve)& theBase, + const Handle(GeomAdaptor_Curve)& theBase, const Standard_Real theOffset, const gp_Dir& theDirection); @@ -112,7 +111,7 @@ private: private: Handle(Geom_Curve) myBaseCurve; - Handle(GeomAdaptor_HCurve) myBaseAdaptor; + Handle(GeomAdaptor_Curve) myBaseAdaptor; Standard_Real myOffset; ///< offset value gp_Dir myOffsetDir; ///< offset direction diff --git a/src/GeomEvaluator/GeomEvaluator_OffsetSurface.cxx b/src/GeomEvaluator/GeomEvaluator_OffsetSurface.cxx index b115be3f47..daff962129 100644 --- a/src/GeomEvaluator/GeomEvaluator_OffsetSurface.cxx +++ b/src/GeomEvaluator/GeomEvaluator_OffsetSurface.cxx @@ -14,13 +14,12 @@ #include -#include #include #include #include #include #include -#include +#include #include #include #include @@ -44,7 +43,7 @@ const Standard_Real the_D1MagTol = 1.e-9; static Standard_Boolean shiftPoint (const Standard_Real theUStart, const Standard_Real theVStart, Standard_Real& theU, Standard_Real& theV, const Handle(Geom_Surface)& theSurf, - const Handle(GeomAdaptor_HSurface)& theAdaptor, + const Handle(GeomAdaptor_Surface)& theAdaptor, const gp_Vec& theD1U, const gp_Vec& theD1V) { // Get parametric bounds and closure status @@ -249,7 +248,7 @@ GeomEvaluator_OffsetSurface::GeomEvaluator_OffsetSurface( } GeomEvaluator_OffsetSurface::GeomEvaluator_OffsetSurface( - const Handle(GeomAdaptor_HSurface)& theBase, + const Handle(GeomAdaptor_Surface)& theBase, const Standard_Real theOffset, const Handle(Geom_OsculatingSurface)& theOscSurf) : GeomEvaluator_Surface(), @@ -891,11 +890,11 @@ Standard_Boolean GeomEvaluator_OffsetSurface::ReplaceDerivative( // Calculate step along non-zero derivative Standard_Real aStep; - Handle(Adaptor3d_HSurface) aSurfAdapt; + Handle(Adaptor3d_Surface) aSurfAdapt; if (!myBaseAdaptor.IsNull()) aSurfAdapt = myBaseAdaptor; else - aSurfAdapt = new GeomAdaptor_HSurface(myBaseSurf); + aSurfAdapt = new GeomAdaptor_Surface(myBaseSurf); if (isReplaceDV) { aStep = Precision::Confusion() * theDU.Magnitude(); diff --git a/src/GeomEvaluator/GeomEvaluator_OffsetSurface.hxx b/src/GeomEvaluator/GeomEvaluator_OffsetSurface.hxx index c888f0a6c0..b6e6cb7d9d 100644 --- a/src/GeomEvaluator/GeomEvaluator_OffsetSurface.hxx +++ b/src/GeomEvaluator/GeomEvaluator_OffsetSurface.hxx @@ -15,13 +15,11 @@ #ifndef _GeomEvaluator_OffsetSurface_HeaderFile #define _GeomEvaluator_OffsetSurface_HeaderFile +#include #include - #include #include -class GeomAdaptor_HSurface; - //! Allows to calculate values and derivatives for offset surfaces class GeomEvaluator_OffsetSurface : public GeomEvaluator_Surface { @@ -33,7 +31,7 @@ public: const Handle(Geom_OsculatingSurface)& theOscSurf = Handle(Geom_OsculatingSurface)()); //! Initialize evaluator by surface adaptor Standard_EXPORT GeomEvaluator_OffsetSurface( - const Handle(GeomAdaptor_HSurface)& theBase, + const Handle(GeomAdaptor_Surface)& theBase, const Standard_Real theOffset, const Handle(Geom_OsculatingSurface)& theOscSurf = Handle(Geom_OsculatingSurface)()); @@ -119,7 +117,7 @@ private: private: Handle(Geom_Surface) myBaseSurf; - Handle(GeomAdaptor_HSurface) myBaseAdaptor; + Handle(GeomAdaptor_Surface) myBaseAdaptor; Standard_Real myOffset; ///< offset value Handle(Geom_OsculatingSurface) myOscSurf; ///< auxiliary osculating surface diff --git a/src/GeomEvaluator/GeomEvaluator_SurfaceOfExtrusion.cxx b/src/GeomEvaluator/GeomEvaluator_SurfaceOfExtrusion.cxx index 4e71fcd08a..b6a65e3e61 100644 --- a/src/GeomEvaluator/GeomEvaluator_SurfaceOfExtrusion.cxx +++ b/src/GeomEvaluator/GeomEvaluator_SurfaceOfExtrusion.cxx @@ -14,7 +14,7 @@ #include -#include +#include IMPLEMENT_STANDARD_RTTIEXT(GeomEvaluator_SurfaceOfExtrusion,GeomEvaluator_Surface) @@ -27,7 +27,7 @@ GeomEvaluator_SurfaceOfExtrusion::GeomEvaluator_SurfaceOfExtrusion( } GeomEvaluator_SurfaceOfExtrusion::GeomEvaluator_SurfaceOfExtrusion( - const Handle(Adaptor3d_HCurve)& theBase, const gp_Dir& theExtrusionDir) + const Handle(Adaptor3d_Curve)& theBase, const gp_Dir& theExtrusionDir) : GeomEvaluator_Surface(), myBaseAdaptor(theBase), myDirection(theExtrusionDir) diff --git a/src/GeomEvaluator/GeomEvaluator_SurfaceOfExtrusion.hxx b/src/GeomEvaluator/GeomEvaluator_SurfaceOfExtrusion.hxx index 252f5f1c2c..8b2a08c81c 100644 --- a/src/GeomEvaluator/GeomEvaluator_SurfaceOfExtrusion.hxx +++ b/src/GeomEvaluator/GeomEvaluator_SurfaceOfExtrusion.hxx @@ -15,13 +15,11 @@ #ifndef _GeomEvaluator_SurfaceOfExtrusion_HeaderFile #define _GeomEvaluator_SurfaceOfExtrusion_HeaderFile +#include #include - #include #include -class Adaptor3d_HCurve; - //! Allows to calculate values and derivatives for surfaces of linear extrusion class GeomEvaluator_SurfaceOfExtrusion : public GeomEvaluator_Surface { @@ -30,7 +28,7 @@ public: Standard_EXPORT GeomEvaluator_SurfaceOfExtrusion(const Handle(Geom_Curve)& theBase, const gp_Dir& theExtrusionDir); //! Initialize evaluator by surface adaptor - Standard_EXPORT GeomEvaluator_SurfaceOfExtrusion(const Handle(Adaptor3d_HCurve)& theBase, + Standard_EXPORT GeomEvaluator_SurfaceOfExtrusion(const Handle(Adaptor3d_Curve)& theBase, const gp_Dir& theExtrusionDir); ///! Changes the direction of extrusion @@ -72,7 +70,7 @@ private: private: Handle(Geom_Curve) myBaseCurve; - Handle(Adaptor3d_HCurve) myBaseAdaptor; + Handle(Adaptor3d_Curve) myBaseAdaptor; gp_Dir myDirection; }; diff --git a/src/GeomEvaluator/GeomEvaluator_SurfaceOfRevolution.cxx b/src/GeomEvaluator/GeomEvaluator_SurfaceOfRevolution.cxx index 995be65de2..fbce3b0a5b 100644 --- a/src/GeomEvaluator/GeomEvaluator_SurfaceOfRevolution.cxx +++ b/src/GeomEvaluator/GeomEvaluator_SurfaceOfRevolution.cxx @@ -14,8 +14,9 @@ #include -#include +#include #include +#include IMPLEMENT_STANDARD_RTTIEXT(GeomEvaluator_SurfaceOfRevolution,GeomEvaluator_Surface) @@ -30,7 +31,7 @@ GeomEvaluator_SurfaceOfRevolution::GeomEvaluator_SurfaceOfRevolution( } GeomEvaluator_SurfaceOfRevolution::GeomEvaluator_SurfaceOfRevolution( - const Handle(Adaptor3d_HCurve)& theBase, + const Handle(Adaptor3d_Curve)& theBase, const gp_Dir& theRevolDir, const gp_Pnt& theRevolLoc) : GeomEvaluator_Surface(), diff --git a/src/GeomEvaluator/GeomEvaluator_SurfaceOfRevolution.hxx b/src/GeomEvaluator/GeomEvaluator_SurfaceOfRevolution.hxx index 172f242035..97085349a4 100644 --- a/src/GeomEvaluator/GeomEvaluator_SurfaceOfRevolution.hxx +++ b/src/GeomEvaluator/GeomEvaluator_SurfaceOfRevolution.hxx @@ -15,15 +15,13 @@ #ifndef _GeomEvaluator_SurfaceOfRevolution_HeaderFile #define _GeomEvaluator_SurfaceOfRevolution_HeaderFile +#include #include - #include #include #include #include -class Adaptor3d_HCurve; - //! Allows to calculate values and derivatives for surfaces of revolution class GeomEvaluator_SurfaceOfRevolution : public GeomEvaluator_Surface { @@ -33,7 +31,7 @@ public: const gp_Dir& theRevolDir, const gp_Pnt& theRevolLoc); //! Initialize evaluator by adaptor of the revolved curve, the axis of revolution and the location - Standard_EXPORT GeomEvaluator_SurfaceOfRevolution(const Handle(Adaptor3d_HCurve)& theBase, + Standard_EXPORT GeomEvaluator_SurfaceOfRevolution(const Handle(Adaptor3d_Curve)& theBase, const gp_Dir& theRevolDir, const gp_Pnt& theRevolLoc); @@ -77,7 +75,7 @@ public: private: Handle(Geom_Curve) myBaseCurve; - Handle(Adaptor3d_HCurve) myBaseAdaptor; + Handle(Adaptor3d_Curve) myBaseAdaptor; gp_Ax1 myRotAxis; }; diff --git a/src/GeomFill/GeomFill_BoundWithSurf.cxx b/src/GeomFill/GeomFill_BoundWithSurf.cxx index 9de8c03737..0ae0e2af78 100644 --- a/src/GeomFill/GeomFill_BoundWithSurf.cxx +++ b/src/GeomFill/GeomFill_BoundWithSurf.cxx @@ -14,11 +14,11 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. - -#include -#include -#include #include + +#include +#include +#include #include #include #include @@ -94,8 +94,8 @@ gp_Vec GeomFill_BoundWithSurf::Norm(const Standard_Real U) const if (!HasNormals()) throw Standard_Failure("BoundWithSurf Norm : pas de contrainte"); -// Handle(Adaptor3d_HSurface)& S = myConS.GetSurface(); -// Handle(Adaptor2d_HCurve2d)& C2d = myConS.GetCurve(); +// Handle(Adaptor3d_Surface)& S = myConS.GetSurface(); +// Handle(Adaptor2d_Curve2d)& C2d = myConS.GetCurve(); Standard_Real x,y; Standard_Real w = U; if(!myPar.IsNull()) w = myPar->Value(U); @@ -120,8 +120,8 @@ void GeomFill_BoundWithSurf::D1Norm(const Standard_Real U, { if (!HasNormals()) throw Standard_Failure("BoundWithSurf Norm : pas de contrainte"); -// Handle(Adaptor3d_HSurface)& S = myConS.GetSurface(); -// Handle(Adaptor2d_HCurve2d)& C2d = myConS.GetCurve(); +// Handle(Adaptor3d_Surface)& S = myConS.GetSurface(); +// Handle(Adaptor2d_Curve2d)& C2d = myConS.GetCurve(); gp_Pnt2d P2d; gp_Vec2d V2d; Standard_Real x,y,dx,dy; diff --git a/src/GeomFill/GeomFill_BoundWithSurf.hxx b/src/GeomFill/GeomFill_BoundWithSurf.hxx index b8e6005e32..0f627fb33a 100644 --- a/src/GeomFill/GeomFill_BoundWithSurf.hxx +++ b/src/GeomFill/GeomFill_BoundWithSurf.hxx @@ -67,12 +67,12 @@ public: //! Handle(Geom_Surface) mySurface = ... ; //! Handle(Geom2d_Curve) myParamCurve = ... ; //! // where myParamCurve is a 2D curve in the parametric space of the surface mySurface - //! Handle(GeomAdaptor_HSurface) + //! Handle(GeomAdaptor_Surface) //! Surface = new - //! GeomAdaptor_HSurface(mySurface); - //! Handle(Geom2dAdaptor_HCurve) + //! GeomAdaptor_Surface(mySurface); + //! Handle(Geom2dAdaptor_Curve) //! ParamCurve = new - //! Geom2dAdaptor_HCurve(myParamCurve); + //! Geom2dAdaptor_Curve(myParamCurve); //! CurveOnSurf = Adaptor3d_CurveOnSurface(ParamCurve,Surface); //! The boundary is then constructed with the CurveOnSurf object: //! Standard_Real Tol = ... ; diff --git a/src/GeomFill/GeomFill_CircularBlendFunc.cxx b/src/GeomFill/GeomFill_CircularBlendFunc.cxx index 2685adb251..63b711cb9c 100644 --- a/src/GeomFill/GeomFill_CircularBlendFunc.cxx +++ b/src/GeomFill/GeomFill_CircularBlendFunc.cxx @@ -15,7 +15,7 @@ // commercial license or contractual agreement. -#include +#include #include #include #include @@ -29,7 +29,7 @@ IMPLEMENT_STANDARD_RTTIEXT(GeomFill_CircularBlendFunc,Approx_SweepFunction) #if DRAW -#include +#include #include #include static Standard_Integer NbSections = 0; @@ -108,9 +108,9 @@ static void GeomFillFusInt(const TColStd_Array1OfReal& I1, GeomFill_CircularBlendFunc:: -GeomFill_CircularBlendFunc(const Handle(Adaptor3d_HCurve)& Path, - const Handle(Adaptor3d_HCurve)& Curve1, - const Handle(Adaptor3d_HCurve)& Curve2, +GeomFill_CircularBlendFunc(const Handle(Adaptor3d_Curve)& Path, + const Handle(Adaptor3d_Curve)& Curve1, + const Handle(Adaptor3d_Curve)& Curve2, const Standard_Real Radius, const Standard_Boolean Polynomial) : maxang(RealFirst()), @@ -145,7 +145,7 @@ void GeomFill_CircularBlendFunc::Discret() Standard_Real TLast = myPath->LastParameter(), T; Standard_Integer ii; Standard_Real L1, L2, L; - Handle(Adaptor3d_HCurve) C; + Handle(Adaptor3d_Curve) C; gp_Pnt P1, P2, P3, Center; gp_Vec DCenter; @@ -171,7 +171,7 @@ void GeomFill_CircularBlendFunc::Discret() Standard_Real Fleche = 1.e-2 * L; Standard_Real Angle, Cosa, Percent; GCPnts_QuasiUniformDeflection Samp; - Samp.Initialize(C->GetCurve(), Fleche); + Samp.Initialize (*C, Fleche); myBary.SetCoord(0.,0.,0.); gp_Vec ns1, ns2; diff --git a/src/GeomFill/GeomFill_CircularBlendFunc.hxx b/src/GeomFill/GeomFill_CircularBlendFunc.hxx index 4efc38a704..06c5a849bc 100644 --- a/src/GeomFill/GeomFill_CircularBlendFunc.hxx +++ b/src/GeomFill/GeomFill_CircularBlendFunc.hxx @@ -33,7 +33,7 @@ #include #include #include -class Adaptor3d_HCurve; + class Standard_OutOfRange; class gp_Pnt; @@ -58,7 +58,7 @@ public: //! parameterisation matches the circle one. -- //! ChFi3d_Polynomial corresponds to a polynomial -- //! representation of circles. - Standard_EXPORT GeomFill_CircularBlendFunc(const Handle(Adaptor3d_HCurve)& Path, const Handle(Adaptor3d_HCurve)& Curve1, const Handle(Adaptor3d_HCurve)& Curve2, const Standard_Real Radius, const Standard_Boolean Polynomial = Standard_False); + Standard_EXPORT GeomFill_CircularBlendFunc(const Handle(Adaptor3d_Curve)& Path, const Handle(Adaptor3d_Curve)& Curve1, const Handle(Adaptor3d_Curve)& Curve2, const Standard_Real Radius, const Standard_Boolean Polynomial = Standard_False); //! compute the section for v = param Standard_EXPORT virtual Standard_Boolean D0 (const Standard_Real Param, const Standard_Real First, const Standard_Real Last, TColgp_Array1OfPnt& Poles, TColgp_Array1OfPnt2d& Poles2d, TColStd_Array1OfReal& Weigths) Standard_OVERRIDE; @@ -149,12 +149,12 @@ private: Standard_Real maxang; Standard_Real minang; Standard_Real distmin; - Handle(Adaptor3d_HCurve) myPath; - Handle(Adaptor3d_HCurve) myCurve1; - Handle(Adaptor3d_HCurve) myCurve2; - Handle(Adaptor3d_HCurve) myTPath; - Handle(Adaptor3d_HCurve) myTCurve1; - Handle(Adaptor3d_HCurve) myTCurve2; + Handle(Adaptor3d_Curve) myPath; + Handle(Adaptor3d_Curve) myCurve1; + Handle(Adaptor3d_Curve) myCurve2; + Handle(Adaptor3d_Curve) myTPath; + Handle(Adaptor3d_Curve) myTCurve1; + Handle(Adaptor3d_Curve) myTCurve2; Standard_Integer myDegree; Standard_Integer myNbKnots; Standard_Integer myNbPoles; diff --git a/src/GeomFill/GeomFill_ConstantBiNormal.cxx b/src/GeomFill/GeomFill_ConstantBiNormal.cxx index d3a31f7e84..1873a29388 100644 --- a/src/GeomFill/GeomFill_ConstantBiNormal.cxx +++ b/src/GeomFill/GeomFill_ConstantBiNormal.cxx @@ -15,7 +15,7 @@ // commercial license or contractual agreement. -#include +#include #include #include #include @@ -66,7 +66,7 @@ GeomFill_ConstantBiNormal::GeomFill_ConstantBiNormal(const gp_Dir& BiNormal) : B return copy; } - void GeomFill_ConstantBiNormal::SetCurve(const Handle(Adaptor3d_HCurve)& C) + void GeomFill_ConstantBiNormal::SetCurve(const Handle(Adaptor3d_Curve)& C) { GeomFill_TrihedronLaw::SetCurve(C); if (! C.IsNull()) { diff --git a/src/GeomFill/GeomFill_ConstantBiNormal.hxx b/src/GeomFill/GeomFill_ConstantBiNormal.hxx index 6ef463f926..0ee97db4a9 100644 --- a/src/GeomFill/GeomFill_ConstantBiNormal.hxx +++ b/src/GeomFill/GeomFill_ConstantBiNormal.hxx @@ -32,7 +32,6 @@ class Standard_OutOfRange; class Standard_ConstructionError; class gp_Dir; class GeomFill_TrihedronLaw; -class Adaptor3d_HCurve; class gp_Vec; @@ -50,7 +49,7 @@ public: Standard_EXPORT virtual Handle(GeomFill_TrihedronLaw) Copy() const Standard_OVERRIDE; - Standard_EXPORT virtual void SetCurve (const Handle(Adaptor3d_HCurve)& C) Standard_OVERRIDE; + Standard_EXPORT virtual void SetCurve (const Handle(Adaptor3d_Curve)& C) Standard_OVERRIDE; //! Computes Triedrhon on curve at parameter Standard_EXPORT virtual Standard_Boolean D0 (const Standard_Real Param, gp_Vec& Tangent, gp_Vec& Normal, gp_Vec& BiNormal) Standard_OVERRIDE; diff --git a/src/GeomFill/GeomFill_CorrectedFrenet.cxx b/src/GeomFill/GeomFill_CorrectedFrenet.cxx index 4bf7413036..c57cf49535 100644 --- a/src/GeomFill/GeomFill_CorrectedFrenet.cxx +++ b/src/GeomFill/GeomFill_CorrectedFrenet.cxx @@ -14,15 +14,15 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. +#include -#include +#include #include #include #include #include #include #include -#include #include #include #include @@ -96,7 +96,7 @@ static void draw(const Handle(Law_Function)& law) static Standard_Real ComputeTorsion(const Standard_Real Param, - const Handle(Adaptor3d_HCurve)& aCurve) + const Handle(Adaptor3d_Curve)& aCurve) { Standard_Real Torsion; @@ -200,7 +200,7 @@ static void smoothlaw(Handle(Law_BSpline)& Law, // Function : FindPlane // Purpose : //=============================================================== -static Standard_Boolean FindPlane ( const Handle(Adaptor3d_HCurve)& theC, +static Standard_Boolean FindPlane ( const Handle(Adaptor3d_Curve)& theC, Handle( Geom_Plane )& theP ) { Standard_Boolean found = Standard_True; @@ -337,7 +337,7 @@ Handle(GeomFill_TrihedronLaw) GeomFill_CorrectedFrenet::Copy() const return copy; } - void GeomFill_CorrectedFrenet::SetCurve(const Handle(Adaptor3d_HCurve)& C) + void GeomFill_CorrectedFrenet::SetCurve(const Handle(Adaptor3d_Curve)& C) { GeomFill_TrihedronLaw::SetCurve(C); diff --git a/src/GeomFill/GeomFill_CorrectedFrenet.hxx b/src/GeomFill/GeomFill_CorrectedFrenet.hxx index 1e72e48c37..34182ce651 100644 --- a/src/GeomFill/GeomFill_CorrectedFrenet.hxx +++ b/src/GeomFill/GeomFill_CorrectedFrenet.hxx @@ -38,8 +38,6 @@ class Standard_OutOfRange; class Standard_ConstructionError; class GeomFill_TrihedronLaw; class gp_Vec; -class Adaptor3d_HCurve; - class GeomFill_CorrectedFrenet; DEFINE_STANDARD_HANDLE(GeomFill_CorrectedFrenet, GeomFill_TrihedronLaw) @@ -58,7 +56,7 @@ public: Standard_EXPORT virtual Handle(GeomFill_TrihedronLaw) Copy() const Standard_OVERRIDE; - Standard_EXPORT virtual void SetCurve (const Handle(Adaptor3d_HCurve)& C) Standard_OVERRIDE; + Standard_EXPORT virtual void SetCurve (const Handle(Adaptor3d_Curve)& C) Standard_OVERRIDE; Standard_EXPORT virtual void SetInterval (const Standard_Real First, const Standard_Real Last) Standard_OVERRIDE; diff --git a/src/GeomFill/GeomFill_CurveAndTrihedron.cxx b/src/GeomFill/GeomFill_CurveAndTrihedron.cxx index 92f516afc4..fce6abc5b3 100644 --- a/src/GeomFill/GeomFill_CurveAndTrihedron.cxx +++ b/src/GeomFill/GeomFill_CurveAndTrihedron.cxx @@ -14,9 +14,9 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. - -#include #include + +#include #include #include #include @@ -63,14 +63,14 @@ Handle(GeomFill_LocationLaw) GeomFill_CurveAndTrihedron::Copy() const //Function: SetCurve //Purpose : //================================================================== - void GeomFill_CurveAndTrihedron::SetCurve(const Handle(Adaptor3d_HCurve)& C) + void GeomFill_CurveAndTrihedron::SetCurve(const Handle(Adaptor3d_Curve)& C) { myCurve = C; myTrimmed = C; myLaw->SetCurve(C); } - const Handle(Adaptor3d_HCurve)& GeomFill_CurveAndTrihedron::GetCurve() const + const Handle(Adaptor3d_Curve)& GeomFill_CurveAndTrihedron::GetCurve() const { return myCurve; } diff --git a/src/GeomFill/GeomFill_CurveAndTrihedron.hxx b/src/GeomFill/GeomFill_CurveAndTrihedron.hxx index ce4ef70296..88039b96e8 100644 --- a/src/GeomFill/GeomFill_CurveAndTrihedron.hxx +++ b/src/GeomFill/GeomFill_CurveAndTrihedron.hxx @@ -32,7 +32,6 @@ #include #include class GeomFill_TrihedronLaw; -class Adaptor3d_HCurve; class Standard_OutOfRange; class gp_Mat; class GeomFill_LocationLaw; @@ -58,9 +57,9 @@ public: Standard_EXPORT GeomFill_CurveAndTrihedron(const Handle(GeomFill_TrihedronLaw)& Trihedron); - Standard_EXPORT virtual void SetCurve (const Handle(Adaptor3d_HCurve)& C) Standard_OVERRIDE; + Standard_EXPORT virtual void SetCurve (const Handle(Adaptor3d_Curve)& C) Standard_OVERRIDE; - Standard_EXPORT virtual const Handle(Adaptor3d_HCurve)& GetCurve() const Standard_OVERRIDE; + Standard_EXPORT virtual const Handle(Adaptor3d_Curve)& GetCurve() const Standard_OVERRIDE; //! Set a transformation Matrix like the law M(t) become //! Mat * M(t) @@ -144,8 +143,8 @@ private: Standard_Boolean WithTrans; Handle(GeomFill_TrihedronLaw) myLaw; - Handle(Adaptor3d_HCurve) myCurve; - Handle(Adaptor3d_HCurve) myTrimmed; + Handle(Adaptor3d_Curve) myCurve; + Handle(Adaptor3d_Curve) myTrimmed; gp_Pnt Point; gp_Vec V1; gp_Vec V2; diff --git a/src/GeomFill/GeomFill_Darboux.cxx b/src/GeomFill/GeomFill_Darboux.cxx index 6dbe852e72..9aa6e2f518 100644 --- a/src/GeomFill/GeomFill_Darboux.cxx +++ b/src/GeomFill/GeomFill_Darboux.cxx @@ -14,18 +14,16 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. +#include -#include +#include #include #include -#include -#include -#include +#include +#include #include #include -#include #include -#include #include #include #include @@ -65,12 +63,12 @@ static gp_Vec DDeriv(const gp_Vec& F, const gp_Vec& DF, const gp_Vec& D2F) //function : NormalD0 //purpose : computes Normal to Surface //======================================================================= -static void NormalD0(const Standard_Real U, const Standard_Real V, const Handle(Adaptor3d_HSurface)& Surf, gp_Dir& Normal, Standard_Integer& OrderU, Standard_Integer& OrderV) +static void NormalD0(const Standard_Real U, const Standard_Real V, const Handle(Adaptor3d_Surface)& Surf, gp_Dir& Normal, Standard_Integer& OrderU, Standard_Integer& OrderV) { // gp_Vec D1U,D1V,D2U,D2V,DUV; gp_Vec D1U,D1V; - GeomAbs_Shape Cont = (Surf->Surface().UContinuity() < Surf->Surface().VContinuity()) ? - (Surf->Surface().UContinuity()) : (Surf->Surface().VContinuity()); + GeomAbs_Shape Cont = (Surf->UContinuity() < Surf->VContinuity()) ? + (Surf->UContinuity()) : (Surf->VContinuity()); OrderU = OrderV = 0; #ifdef CHECK if (Cont == GeomAbs_C0) throw Geom_UndefinedValue(); @@ -91,10 +89,10 @@ static void NormalD0(const Standard_Real U, const Standard_Real V, const Handle( TColgp_Array2OfVec DerSurf(0,MaxOrder+1,0,MaxOrder+1); Standard_Integer i,j;//OrderU,OrderV; Standard_Real Umin,Umax,Vmin,Vmax; - Umin = Surf->Surface().FirstUParameter(); - Umax = Surf->Surface().LastUParameter(); - Vmin = Surf->Surface().FirstVParameter(); - Vmax = Surf->Surface().LastVParameter(); + Umin = Surf->FirstUParameter(); + Umax = Surf->LastUParameter(); + Vmin = Surf->FirstVParameter(); + Vmax = Surf->LastVParameter(); for(i=1;i<=MaxOrder+1;i++){ DerSurf.SetValue(i,0,Surf->DN(U,V,i,0)); } @@ -131,7 +129,7 @@ static void NormalD0(const Standard_Real U, const Standard_Real V, const Handle( //purpose : computes Normal to Surface and its first derivative //======================================================================= static void NormalD1 (const Standard_Real U, const Standard_Real V, - const Handle(Adaptor3d_HSurface)& Surf, gp_Dir& Normal, + const Handle(Adaptor3d_Surface)& Surf, gp_Dir& Normal, gp_Vec& D1UNormal, gp_Vec& D1VNormal) { #ifdef CHECK @@ -158,10 +156,10 @@ static void NormalD1 (const Standard_Real U, const Standard_Real V, TColgp_Array2OfVec DerSurf(0,MaxOrder+2,0,MaxOrder+2); Standard_Integer i,j; Standard_Real Umin,Umax,Vmin,Vmax; - Umin = Surf->Surface().FirstUParameter(); - Umax = Surf->Surface().LastUParameter(); - Vmin = Surf->Surface().FirstVParameter(); - Vmax = Surf->Surface().LastVParameter(); + Umin = Surf->FirstUParameter(); + Umax = Surf->LastUParameter(); + Vmin = Surf->FirstVParameter(); + Vmax = Surf->LastVParameter(); DerSurf.SetValue(1, 0, D1UNormal); DerSurf.SetValue(0, 1, D1VNormal); @@ -193,7 +191,7 @@ static void NormalD1 (const Standard_Real U, const Standard_Real V, //purpose : computes Normal to Surface and its first and second derivatives //======================================================================= static void NormalD2 (const Standard_Real U, const Standard_Real V, - const Handle(Adaptor3d_HSurface)& Surf, gp_Dir& Normal, + const Handle(Adaptor3d_Surface)& Surf, gp_Dir& Normal, gp_Vec& D1UNormal, gp_Vec& D1VNormal, gp_Vec& D2UNormal, gp_Vec& D2VNormal, gp_Vec& D2UVNormal) { @@ -222,10 +220,10 @@ static void NormalD2 (const Standard_Real U, const Standard_Real V, Standard_Integer i,j; Standard_Real Umin,Umax,Vmin,Vmax; - Umin = Surf->Surface().FirstUParameter(); - Umax = Surf->Surface().LastUParameter(); - Vmin = Surf->Surface().FirstVParameter(); - Vmax = Surf->Surface().LastVParameter(); + Umin = Surf->FirstUParameter(); + Umax = Surf->LastUParameter(); + Vmin = Surf->FirstVParameter(); + Vmax = Surf->LastVParameter(); DerSurf.SetValue(1, 0, D1UNormal); DerSurf.SetValue(0, 1, D1VNormal); @@ -276,8 +274,8 @@ Handle(GeomFill_TrihedronLaw) GeomFill_Darboux::Copy() const gp_Vec2d D2d; gp_Pnt S; gp_Vec dS_du, dS_dv; - Handle(Adaptor2d_HCurve2d) myCurve2d = Adaptor3d_CurveOnSurfacePtr(&(myTrimmed->Curve()))->GetCurve(); - Handle(Adaptor3d_HSurface) mySupport = Adaptor3d_CurveOnSurfacePtr(&(myTrimmed->Curve()))->GetSurface(); + Handle(Adaptor2d_Curve2d) myCurve2d = Adaptor3d_CurveOnSurfacePtr(myTrimmed.get())->GetCurve(); + Handle(Adaptor3d_Surface) mySupport = Adaptor3d_CurveOnSurfacePtr(myTrimmed.get())->GetSurface(); Standard_Integer OrderU, OrderV; myCurve2d->D1(Param, C2d, D2d); @@ -309,8 +307,8 @@ Handle(GeomFill_TrihedronLaw) GeomFill_Darboux::Copy() const gp_Vec2d D2d, D2_2d; gp_Pnt S; gp_Vec dS_du, dS_dv, d2S_du, d2S_dv, d2S_duv, F, DF; - Handle(Adaptor2d_HCurve2d) myCurve2d = Adaptor3d_CurveOnSurfacePtr(&(myTrimmed->Curve()))->GetCurve(); - Handle(Adaptor3d_HSurface) mySupport = Adaptor3d_CurveOnSurfacePtr(&(myTrimmed->Curve()))->GetSurface(); + Handle(Adaptor2d_Curve2d) myCurve2d = Adaptor3d_CurveOnSurfacePtr(myTrimmed.get())->GetCurve(); + Handle(Adaptor3d_Surface) mySupport = Adaptor3d_CurveOnSurfacePtr(myTrimmed.get())->GetSurface(); // Standard_Integer Order; myCurve2d->D2(Param, C2d, D2d, D2_2d); mySupport->D2(C2d.X(), C2d.Y(), S, dS_du, dS_dv, @@ -349,8 +347,8 @@ Handle(GeomFill_TrihedronLaw) GeomFill_Darboux::Copy() const gp_Pnt S; gp_Vec dS_du, dS_dv, d2S_du, d2S_dv, d2S_duv, d3S_du, d3S_dv, d3S_duuv, d3S_duvv, F, DF, D2F; - Handle(Adaptor2d_HCurve2d) myCurve2d = Adaptor3d_CurveOnSurfacePtr(&(myTrimmed->Curve()))->GetCurve(); - Handle(Adaptor3d_HSurface) mySupport = Adaptor3d_CurveOnSurfacePtr(&(myTrimmed->Curve()))->GetSurface(); + Handle(Adaptor2d_Curve2d) myCurve2d = Adaptor3d_CurveOnSurfacePtr(myTrimmed.get())->GetCurve(); + Handle(Adaptor3d_Surface) mySupport = Adaptor3d_CurveOnSurfacePtr(myTrimmed.get())->GetSurface(); // Standard_Integer Order; myCurve2d->D3(Param, C2d, D2d, D2_2d, D3_2d); mySupport->D3(C2d.X(), C2d.Y(), S, dS_du, dS_dv, diff --git a/src/GeomFill/GeomFill_DiscreteTrihedron.cxx b/src/GeomFill/GeomFill_DiscreteTrihedron.cxx index 47a085c7ee..06c4f97bf2 100755 --- a/src/GeomFill/GeomFill_DiscreteTrihedron.cxx +++ b/src/GeomFill/GeomFill_DiscreteTrihedron.cxx @@ -13,10 +13,10 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. - -#include -#include #include + +#include +#include #include #include #include @@ -61,7 +61,7 @@ Handle(GeomFill_TrihedronLaw) GeomFill_DiscreteTrihedron::Copy() const //purpose : //======================================================================= -void GeomFill_DiscreteTrihedron::SetCurve(const Handle(Adaptor3d_HCurve)& C) +void GeomFill_DiscreteTrihedron::SetCurve(const Handle(Adaptor3d_Curve)& C) { GeomFill_TrihedronLaw::SetCurve(C); if (! C.IsNull()) { diff --git a/src/GeomFill/GeomFill_DiscreteTrihedron.hxx b/src/GeomFill/GeomFill_DiscreteTrihedron.hxx index 45fa17a4d1..3fe9dfbde4 100644 --- a/src/GeomFill/GeomFill_DiscreteTrihedron.hxx +++ b/src/GeomFill/GeomFill_DiscreteTrihedron.hxx @@ -32,7 +32,6 @@ class GeomFill_Frenet; class Standard_OutOfRange; class Standard_ConstructionError; class GeomFill_TrihedronLaw; -class Adaptor3d_HCurve; class gp_Vec; @@ -55,7 +54,7 @@ public: Standard_EXPORT void Init(); - Standard_EXPORT virtual void SetCurve (const Handle(Adaptor3d_HCurve)& C) Standard_OVERRIDE; + Standard_EXPORT virtual void SetCurve (const Handle(Adaptor3d_Curve)& C) Standard_OVERRIDE; //! compute Trihedron on curve at parameter Standard_EXPORT virtual Standard_Boolean D0 (const Standard_Real Param, gp_Vec& Tangent, gp_Vec& Normal, gp_Vec& BiNormal) Standard_OVERRIDE; diff --git a/src/GeomFill/GeomFill_DraftTrihedron.cxx b/src/GeomFill/GeomFill_DraftTrihedron.cxx index 2f3b7496e5..d260c364ce 100644 --- a/src/GeomFill/GeomFill_DraftTrihedron.cxx +++ b/src/GeomFill/GeomFill_DraftTrihedron.cxx @@ -14,10 +14,10 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. - -#include -#include #include + +#include +#include #include #include #include diff --git a/src/GeomFill/GeomFill_Frenet.cxx b/src/GeomFill/GeomFill_Frenet.cxx index 5ca4c9eec0..b29509fa22 100644 --- a/src/GeomFill/GeomFill_Frenet.cxx +++ b/src/GeomFill/GeomFill_Frenet.cxx @@ -14,11 +14,11 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. +#include -#include +#include #include #include -#include #include #include #include @@ -117,7 +117,7 @@ Handle(GeomFill_TrihedronLaw) GeomFill_Frenet::Copy() const //purpose : //======================================================================= - void GeomFill_Frenet::SetCurve(const Handle(Adaptor3d_HCurve)& C) + void GeomFill_Frenet::SetCurve(const Handle(Adaptor3d_Curve)& C) { GeomFill_TrihedronLaw::SetCurve(C); if (! C.IsNull()) { diff --git a/src/GeomFill/GeomFill_Frenet.hxx b/src/GeomFill/GeomFill_Frenet.hxx index 954950ace0..2aa6cc921d 100644 --- a/src/GeomFill/GeomFill_Frenet.hxx +++ b/src/GeomFill/GeomFill_Frenet.hxx @@ -31,7 +31,6 @@ class Standard_OutOfRange; class Standard_ConstructionError; class GeomFill_TrihedronLaw; -class Adaptor3d_HCurve; class gp_Vec; @@ -51,7 +50,7 @@ public: Standard_EXPORT void Init(); - Standard_EXPORT virtual void SetCurve (const Handle(Adaptor3d_HCurve)& C) Standard_OVERRIDE; + Standard_EXPORT virtual void SetCurve (const Handle(Adaptor3d_Curve)& C) Standard_OVERRIDE; //! compute Triedrhon on curve at parameter Standard_EXPORT virtual Standard_Boolean D0 (const Standard_Real Param, gp_Vec& Tangent, gp_Vec& Normal, gp_Vec& BiNormal) Standard_OVERRIDE; diff --git a/src/GeomFill/GeomFill_FunctionDraft.cxx b/src/GeomFill/GeomFill_FunctionDraft.cxx index 711010e80e..49aa485ee8 100644 --- a/src/GeomFill/GeomFill_FunctionDraft.cxx +++ b/src/GeomFill/GeomFill_FunctionDraft.cxx @@ -15,10 +15,10 @@ // commercial license or contractual agreement. -#include -#include -#include -#include +#include +#include +#include +#include #include #include #include @@ -37,7 +37,7 @@ // Purpose : Initialisation de la section et de la surface d'arret //******************************************************* GeomFill_FunctionDraft::GeomFill_FunctionDraft - (const Handle(Adaptor3d_HSurface)& S, const Handle(Adaptor3d_HCurve)& C) + (const Handle(Adaptor3d_Surface)& S, const Handle(Adaptor3d_Curve)& C) { TheCurve = C ; TheSurface = S; @@ -131,7 +131,7 @@ GeomFill_FunctionDraft::GeomFill_FunctionDraft // Function : DerivT // Purpose : calcul of the first derivative from t //******************************************************* - Standard_Boolean GeomFill_FunctionDraft::DerivT(const Handle(Adaptor3d_HCurve)& C, + Standard_Boolean GeomFill_FunctionDraft::DerivT(const Handle(Adaptor3d_Curve)& C, const Standard_Real Param, const Standard_Real W, const gp_Vec & dN, @@ -155,7 +155,7 @@ GeomFill_FunctionDraft::GeomFill_FunctionDraft // Function : Deriv2T // Purpose : calcul of the second derivatice from t //******************************************************* - Standard_Boolean GeomFill_FunctionDraft::Deriv2T(const Handle(Adaptor3d_HCurve)& C, + Standard_Boolean GeomFill_FunctionDraft::Deriv2T(const Handle(Adaptor3d_Curve)& C, const Standard_Real Param, const Standard_Real W, const gp_Vec & d2N, diff --git a/src/GeomFill/GeomFill_FunctionDraft.hxx b/src/GeomFill/GeomFill_FunctionDraft.hxx index fe94b134b8..51893919e9 100644 --- a/src/GeomFill/GeomFill_FunctionDraft.hxx +++ b/src/GeomFill/GeomFill_FunctionDraft.hxx @@ -17,17 +17,10 @@ #ifndef _GeomFill_FunctionDraft_HeaderFile #define _GeomFill_FunctionDraft_HeaderFile -#include -#include -#include - +#include #include -#include -#include #include -#include -class Adaptor3d_HCurve; -class Adaptor3d_HSurface; + class math_Matrix; class gp_Vec; class GeomFill_Tensor; @@ -41,7 +34,7 @@ public: DEFINE_STANDARD_ALLOC - Standard_EXPORT GeomFill_FunctionDraft(const Handle(Adaptor3d_HSurface)& S, const Handle(Adaptor3d_HCurve)& C); + Standard_EXPORT GeomFill_FunctionDraft(const Handle(Adaptor3d_Surface)& S, const Handle(Adaptor3d_Curve)& C); //! returns the number of variables of the function. Standard_EXPORT virtual Standard_Integer NbVariables() const Standard_OVERRIDE; @@ -69,11 +62,11 @@ public: //! returns the values of the T derivatives for //! the parameter Param . - Standard_EXPORT Standard_Boolean DerivT (const Handle(Adaptor3d_HCurve)& C, const Standard_Real Param, const Standard_Real W, const gp_Vec& dN, const Standard_Real teta, math_Vector& F); + Standard_EXPORT Standard_Boolean DerivT (const Handle(Adaptor3d_Curve)& C, const Standard_Real Param, const Standard_Real W, const gp_Vec& dN, const Standard_Real teta, math_Vector& F); //! returns the values of the T2 derivatives for //! the parameter Param . - Standard_EXPORT Standard_Boolean Deriv2T (const Handle(Adaptor3d_HCurve)& C, const Standard_Real Param, const Standard_Real W, const gp_Vec& d2N, const Standard_Real teta, math_Vector& F); + Standard_EXPORT Standard_Boolean Deriv2T (const Handle(Adaptor3d_Curve)& C, const Standard_Real Param, const Standard_Real W, const gp_Vec& d2N, const Standard_Real teta, math_Vector& F); //! returns the values of the TX derivatives for //! the parameter Param . @@ -96,8 +89,8 @@ private: - Handle(Adaptor3d_HCurve) TheCurve; - Handle(Adaptor3d_HSurface) TheSurface; + Handle(Adaptor3d_Curve) TheCurve; + Handle(Adaptor3d_Surface) TheSurface; }; diff --git a/src/GeomFill/GeomFill_FunctionGuide.cxx b/src/GeomFill/GeomFill_FunctionGuide.cxx index e9e73de7dc..517cb6728e 100644 --- a/src/GeomFill/GeomFill_FunctionGuide.cxx +++ b/src/GeomFill/GeomFill_FunctionGuide.cxx @@ -14,15 +14,15 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. +#include -#include +#include #include #include #include #include #include -#include -#include +#include #include #include #include @@ -50,7 +50,7 @@ //============================================== GeomFill_FunctionGuide::GeomFill_FunctionGuide (const Handle(GeomFill_SectionLaw)& S, - const Handle(Adaptor3d_HCurve)& C, + const Handle(Adaptor3d_Curve)& C, const Standard_Real Param) : TheGuide(C), TheLaw(S), diff --git a/src/GeomFill/GeomFill_FunctionGuide.hxx b/src/GeomFill/GeomFill_FunctionGuide.hxx index aecf55b815..0904c69587 100644 --- a/src/GeomFill/GeomFill_FunctionGuide.hxx +++ b/src/GeomFill/GeomFill_FunctionGuide.hxx @@ -27,7 +27,8 @@ #include #include #include -class Adaptor3d_HCurve; + +class Adaptor3d_Curve; class GeomFill_SectionLaw; class Geom_Curve; class Geom_Surface; @@ -45,7 +46,7 @@ public: DEFINE_STANDARD_ALLOC - Standard_EXPORT GeomFill_FunctionGuide(const Handle(GeomFill_SectionLaw)& S, const Handle(Adaptor3d_HCurve)& Guide, const Standard_Real ParamOnLaw = 0.0); + Standard_EXPORT GeomFill_FunctionGuide(const Handle(GeomFill_SectionLaw)& S, const Handle(Adaptor3d_Curve)& Guide, const Standard_Real ParamOnLaw = 0.0); Standard_EXPORT void SetParam (const Standard_Real Param, const gp_Pnt& Centre, const gp_XYZ& Dir, const gp_XYZ& XDir); @@ -102,7 +103,7 @@ private: Standard_EXPORT void DSDT (const Standard_Real U, const Standard_Real V, const gp_XYZ& DCentre, const gp_XYZ& DDir, gp_Vec& DSDT) const; - Handle(Adaptor3d_HCurve) TheGuide; + Handle(Adaptor3d_Curve) TheGuide; Handle(GeomFill_SectionLaw) TheLaw; Standard_Boolean isconst; Handle(Geom_Curve) TheCurve; diff --git a/src/GeomFill/GeomFill_GuideTrihedronAC.cxx b/src/GeomFill/GeomFill_GuideTrihedronAC.cxx index 89556fad32..7f197c9a0f 100644 --- a/src/GeomFill/GeomFill_GuideTrihedronAC.cxx +++ b/src/GeomFill/GeomFill_GuideTrihedronAC.cxx @@ -16,10 +16,9 @@ // Creted: Tue Jun 23 15:39:24 1998 #include -#include #include #include -#include +#include #include #include #include @@ -39,7 +38,7 @@ IMPLEMENT_STANDARD_RTTIEXT(GeomFill_GuideTrihedronAC,GeomFill_TrihedronWithGuide //function : GuideTrihedron //purpose : Constructor //======================================================================= -GeomFill_GuideTrihedronAC::GeomFill_GuideTrihedronAC(const Handle(Adaptor3d_HCurve) & guide) +GeomFill_GuideTrihedronAC::GeomFill_GuideTrihedronAC(const Handle(Adaptor3d_Curve) & guide) { myCurve.Nullify(); myGuide = guide; @@ -56,7 +55,7 @@ GeomFill_GuideTrihedronAC::GeomFill_GuideTrihedronAC(const Handle(Adaptor3d_HCur //purpose : calculation of trihedron //======================================================================= - Handle(Adaptor3d_HCurve) GeomFill_GuideTrihedronAC::Guide()const + Handle(Adaptor3d_Curve) GeomFill_GuideTrihedronAC::Guide()const { return myGuide; } @@ -72,7 +71,7 @@ GeomFill_GuideTrihedronAC::GeomFill_GuideTrihedronAC(const Handle(Adaptor3d_HCur { Standard_Real s = myCurveAC->GetSParameter(Param); // abscisse curviligne <=> Param Standard_Real OrigG = Orig1 + s*(Orig2-Orig1); // abscisse curv sur le guide (cas multi-edges) - Standard_Real tG = myGuideAC->GetUParameter(myGuide->GetCurve(), OrigG, 1); // param <=> s sur theGuide + Standard_Real tG = myGuideAC->GetUParameter (*myGuide, OrigG, 1); // param <=> s sur theGuide gp_Pnt P, PG; gp_Vec To, B; @@ -110,7 +109,7 @@ GeomFill_GuideTrihedronAC::GeomFill_GuideTrihedronAC(const Handle(Adaptor3d_HCur // parametre <=> s sur theGuide OrigG = Orig1 + s*(Orig2-Orig1); // parametre <=> s sur theGuide - tG = myGuideAC->GetUParameter(myGuide->GetCurve(), OrigG, 1); + tG = myGuideAC->GetUParameter (*myGuide, OrigG, 1); gp_Pnt P, PG; gp_Vec To, DTo, TG, B, BPrim; @@ -178,8 +177,7 @@ GeomFill_GuideTrihedronAC::GeomFill_GuideTrihedronAC(const Handle(Adaptor3d_HCur Standard_Real s = myCurveAC->GetSParameter(Param); // parametre <=> s sur theGuide Standard_Real OrigG = Orig1 + s*(Orig2-Orig1); - Standard_Real tG = myGuideAC->GetUParameter(myGuide->GetCurve(), - OrigG, 1); + Standard_Real tG = myGuideAC->GetUParameter (*myGuide, OrigG, 1); gp_Pnt P,PG; gp_Vec TG,DTG; @@ -294,7 +292,7 @@ GeomFill_GuideTrihedronAC::GeomFill_GuideTrihedronAC(const Handle(Adaptor3d_HCur //function : SetCurve //purpose : //======================================================================= - void GeomFill_GuideTrihedronAC::SetCurve(const Handle(Adaptor3d_HCurve)& C) + void GeomFill_GuideTrihedronAC::SetCurve(const Handle(Adaptor3d_Curve)& C) { myCurve = C; myTrimmed = C; @@ -347,7 +345,7 @@ GeomFill_GuideTrihedronAC::GeomFill_GuideTrihedronAC(const Handle(Adaptor3d_HCur Nb = Seq.Length(); for (ii=1; ii<=Nb; ii++) { - TT(ii) = myCurveAC->GetUParameter(myCurve->GetCurve(), Seq(ii), 1); + TT(ii) = myCurveAC->GetUParameter (*myCurve, Seq(ii), 1); } } @@ -368,9 +366,9 @@ void GeomFill_GuideTrihedronAC::SetInterval(const Standard_Real First, // myCurveAC->Trim(Sf, Sl, UTol); U = Orig1 + Sf*(Orig2-Orig1); - Sf = myGuideAC->GetUParameter(myGuide->GetCurve(), U, 1); + Sf = myGuideAC->GetUParameter(*myGuide, U, 1); U = Orig1 + Sl*(Orig2-Orig1); - Sl = myGuideAC->GetUParameter(myGuide->GetCurve(), U, 1); + Sl = myGuideAC->GetUParameter(*myGuide, U, 1); myTrimG = myGuide->Trim(Sf, Sl, UTol); } diff --git a/src/GeomFill/GeomFill_GuideTrihedronAC.hxx b/src/GeomFill/GeomFill_GuideTrihedronAC.hxx index 76fdb09326..08e7c58f17 100644 --- a/src/GeomFill/GeomFill_GuideTrihedronAC.hxx +++ b/src/GeomFill/GeomFill_GuideTrihedronAC.hxx @@ -27,7 +27,6 @@ #include #include class Approx_CurvlinFunc; -class Adaptor3d_HCurve; class Standard_OutOfRange; class Standard_ConstructionError; class GeomFill_TrihedronLaw; @@ -45,13 +44,13 @@ class GeomFill_GuideTrihedronAC : public GeomFill_TrihedronWithGuide public: - Standard_EXPORT GeomFill_GuideTrihedronAC(const Handle(Adaptor3d_HCurve)& guide); + Standard_EXPORT GeomFill_GuideTrihedronAC(const Handle(Adaptor3d_Curve)& guide); - Standard_EXPORT virtual void SetCurve (const Handle(Adaptor3d_HCurve)& C) Standard_OVERRIDE; + Standard_EXPORT virtual void SetCurve (const Handle(Adaptor3d_Curve)& C) Standard_OVERRIDE; Standard_EXPORT virtual Handle(GeomFill_TrihedronLaw) Copy() const Standard_OVERRIDE; - Standard_EXPORT virtual Handle(Adaptor3d_HCurve) Guide() const Standard_OVERRIDE; + Standard_EXPORT virtual Handle(Adaptor3d_Curve) Guide() const Standard_OVERRIDE; Standard_EXPORT virtual Standard_Boolean D0 (const Standard_Real Param, gp_Vec& Tangent, gp_Vec& Normal, gp_Vec& BiNormal) Standard_OVERRIDE; @@ -108,7 +107,7 @@ private: Standard_Real Lguide; Handle(Approx_CurvlinFunc) myCurveAC; Standard_Real L; - Handle(Adaptor3d_HCurve) myCurve; + Handle(Adaptor3d_Curve) myCurve; Standard_Real UTol; Standard_Real STol; Standard_Real Orig1; diff --git a/src/GeomFill/GeomFill_GuideTrihedronPlan.cxx b/src/GeomFill/GeomFill_GuideTrihedronPlan.cxx index 4b4e4b2d65..9c168e4644 100644 --- a/src/GeomFill/GeomFill_GuideTrihedronPlan.cxx +++ b/src/GeomFill/GeomFill_GuideTrihedronPlan.cxx @@ -14,15 +14,14 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. +#include #include -#include #include #include -#include -#include +#include +#include #include -#include #include #include #include @@ -78,7 +77,7 @@ static void InGoodPeriod(const Standard_Real Prec, //function : GuideTrihedronPlan //purpose : Constructor //======================================================================= -GeomFill_GuideTrihedronPlan::GeomFill_GuideTrihedronPlan (const Handle(Adaptor3d_HCurve)& theGuide) : +GeomFill_GuideTrihedronPlan::GeomFill_GuideTrihedronPlan (const Handle(Adaptor3d_Curve)& theGuide) : X(1,1), XTol(1,1), Inf(1,1), Sup(1,1), @@ -113,7 +112,7 @@ GeomFill_GuideTrihedronPlan::GeomFill_GuideTrihedronPlan (const Handle(Adaptor3d Handle(Geom_Plane) Plan; - Handle(GeomAdaptor_HSurface) Pl; + Handle(GeomAdaptor_Surface) Pl; IntCurveSurface_IntersectionPoint PInt; IntCurveSurface_HInter Int; frenet->SetCurve(myCurve); @@ -139,7 +138,7 @@ GeomFill_GuideTrihedronPlan::GeomFill_GuideTrihedronPlan (const Handle(Adaptor3d myCurve->D0(t, P); frenet->D0(t, Tangent, Normal, BiNormal); Plan = new (Geom_Plane) (P, Tangent); - Pl = new(GeomAdaptor_HSurface) (Plan); + Pl = new(GeomAdaptor_Surface) (Plan); Int.Perform(myTrimG, Pl); // intersection plan / guide if (Int.NbPoints() == 0) { @@ -198,7 +197,7 @@ GeomFill_GuideTrihedronPlan::GeomFill_GuideTrihedronPlan (const Handle(Adaptor3d //function : SetCurve //purpose : calculation of trihedron //======================================================================= -void GeomFill_GuideTrihedronPlan::SetCurve(const Handle(Adaptor3d_HCurve)& C) +void GeomFill_GuideTrihedronPlan::SetCurve(const Handle(Adaptor3d_Curve)& C) { myCurve = C; if (!myCurve.IsNull()) Init(); @@ -209,7 +208,7 @@ void GeomFill_GuideTrihedronPlan::SetCurve(const Handle(Adaptor3d_HCurve)& C) //purpose : calculation of trihedron //======================================================================= - Handle(Adaptor3d_HCurve) GeomFill_GuideTrihedronPlan::Guide()const + Handle(Adaptor3d_Curve) GeomFill_GuideTrihedronPlan::Guide()const { return myGuide; } @@ -394,7 +393,7 @@ void GeomFill_GuideTrihedronPlan::SetCurve(const Handle(Adaptor3d_HCurve)& C) /* // plan ortho a Tangent pour trouver la pt Pprime sur le guide Handle(Geom_Plane) Plan = new (Geom_Plane)(P, Tangent); - Handle(GeomAdaptor_HSurface) Pl= new(GeomAdaptor_HSurface)(Plan); + Handle(GeomAdaptor_Surface) Pl= new(GeomAdaptor_Surface)(Plan); Standard_Integer Iter = 50; diff --git a/src/GeomFill/GeomFill_GuideTrihedronPlan.hxx b/src/GeomFill/GeomFill_GuideTrihedronPlan.hxx index 6b4227fc69..bd670ed3ce 100644 --- a/src/GeomFill/GeomFill_GuideTrihedronPlan.hxx +++ b/src/GeomFill/GeomFill_GuideTrihedronPlan.hxx @@ -29,7 +29,7 @@ #include #include #include -class Adaptor3d_HCurve; + class GeomFill_Frenet; class Standard_OutOfRange; class Standard_ConstructionError; @@ -48,9 +48,9 @@ class GeomFill_GuideTrihedronPlan : public GeomFill_TrihedronWithGuide public: - Standard_EXPORT GeomFill_GuideTrihedronPlan(const Handle(Adaptor3d_HCurve)& theGuide); + Standard_EXPORT GeomFill_GuideTrihedronPlan(const Handle(Adaptor3d_Curve)& theGuide); - Standard_EXPORT virtual void SetCurve (const Handle(Adaptor3d_HCurve)& thePath) Standard_OVERRIDE; + Standard_EXPORT virtual void SetCurve (const Handle(Adaptor3d_Curve)& thePath) Standard_OVERRIDE; Standard_EXPORT virtual Handle(GeomFill_TrihedronLaw) Copy() const Standard_OVERRIDE; @@ -58,7 +58,7 @@ public: //! Returns PipeOk (default implementation) Standard_EXPORT virtual GeomFill_PipeError ErrorStatus() const Standard_OVERRIDE; - Standard_EXPORT virtual Handle(Adaptor3d_HCurve) Guide() const Standard_OVERRIDE; + Standard_EXPORT virtual Handle(Adaptor3d_Curve) Guide() const Standard_OVERRIDE; Standard_EXPORT virtual Standard_Boolean D0 (const Standard_Real Param, gp_Vec& Tangent, gp_Vec& Normal, gp_Vec& BiNormal) Standard_OVERRIDE; @@ -115,8 +115,8 @@ private: Standard_EXPORT void InitX (const Standard_Real Param); - Handle(Adaptor3d_HCurve) myTrimmed; - Handle(Adaptor3d_HCurve) myCurve; + Handle(Adaptor3d_Curve) myTrimmed; + Handle(Adaptor3d_Curve) myCurve; Handle(TColgp_HArray2OfPnt2d) Pole; math_Vector X; math_Vector XTol; diff --git a/src/GeomFill/GeomFill_LocationDraft.cxx b/src/GeomFill/GeomFill_LocationDraft.cxx index 7df92bbc1c..b2a874dc26 100644 --- a/src/GeomFill/GeomFill_LocationDraft.cxx +++ b/src/GeomFill/GeomFill_LocationDraft.cxx @@ -14,16 +14,16 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. +#include -#include -#include +#include +#include #include #include -#include -#include +#include +#include #include #include -#include #include #include #include @@ -105,7 +105,7 @@ GeomFill_LocationDraft::GeomFill_LocationDraft //Purpose : Calcul des poles sur la surfaces d'arret (intersection // entre la generatrice et la surface en myNbPts points de la section) //================================================================== - void GeomFill_LocationDraft::SetCurve(const Handle(Adaptor3d_HCurve)& C) + void GeomFill_LocationDraft::SetCurve(const Handle(Adaptor3d_Curve)& C) { myCurve = C; myTrimmed = C; @@ -118,7 +118,7 @@ GeomFill_LocationDraft::GeomFill_LocationDraft //Function: SetStopSurf //Purpose : //================================================================== - void GeomFill_LocationDraft::SetStopSurf(const Handle(Adaptor3d_HSurface)& Surf) + void GeomFill_LocationDraft::SetStopSurf(const Handle(Adaptor3d_Surface)& Surf) { mySurf = Surf; Prepare(); @@ -171,7 +171,7 @@ GeomFill_LocationDraft::GeomFill_LocationDraft L = new (Geom_Line) (P, D); IntCurveSurface_HInter Int; // intersection surface / generatrice - Handle(GeomAdaptor_HCurve) AC = new (GeomAdaptor_HCurve) (L); + Handle(GeomAdaptor_Curve) AC = new (GeomAdaptor_Curve) (L); Int.Perform(AC, mySurf); // calcul de l'intersection if (Int.NbPoints() > 0) // il y a au moins 1 intersection @@ -201,7 +201,7 @@ GeomFill_LocationDraft::GeomFill_LocationDraft //Function: GetCurve //Purpose : return the path //================================================================== - const Handle(Adaptor3d_HCurve)& GeomFill_LocationDraft::GetCurve() const + const Handle(Adaptor3d_Curve)& GeomFill_LocationDraft::GetCurve() const { return myCurve; } @@ -263,7 +263,7 @@ GeomFill_LocationDraft::GeomFill_LocationDraft D = Cos(myAngle)*B + Sin(myAngle)*N; Handle(Geom_Line) L = new (Geom_Line) (P, D); - Handle(GeomAdaptor_HCurve) G = new (GeomAdaptor_HCurve) (L); + Handle(GeomAdaptor_Curve) G = new (GeomAdaptor_Curve) (L); Standard_Real t1,t2,Paramt1,t2Param; Standard_Real U0=0,V0=0,W0=0; @@ -375,7 +375,7 @@ GeomFill_LocationDraft::GeomFill_LocationDraft D = Cos(myAngle)*B + Sin(myAngle)*N; Handle(Geom_Line) L = new (Geom_Line) (P, D); - Handle(GeomAdaptor_HCurve) G = new (GeomAdaptor_HCurve) (L); + Handle(GeomAdaptor_Curve) G = new (GeomAdaptor_Curve) (L); Standard_Real t1,t2,Paramt1,t2Param; Standard_Real U0=0,V0=0,W0=0; @@ -513,7 +513,7 @@ GeomFill_LocationDraft::GeomFill_LocationDraft D = Cos(myAngle) * B + Sin(myAngle) * N; Handle(Geom_Line) L = new (Geom_Line) (P, D); - Handle(GeomAdaptor_HCurve) G = new (GeomAdaptor_HCurve) (L); + Handle(GeomAdaptor_Curve) G = new (GeomAdaptor_Curve) (L); Standard_Real t1,t2,Paramt1,t2Param; Standard_Real U0=0,V0=0,W0=0; diff --git a/src/GeomFill/GeomFill_LocationDraft.hxx b/src/GeomFill/GeomFill_LocationDraft.hxx index 970bd91bcb..50125a75a9 100644 --- a/src/GeomFill/GeomFill_LocationDraft.hxx +++ b/src/GeomFill/GeomFill_LocationDraft.hxx @@ -17,9 +17,7 @@ #ifndef _GeomFill_LocationDraft_HeaderFile #define _GeomFill_LocationDraft_HeaderFile -#include -#include - +#include #include #include #include @@ -31,22 +29,12 @@ #include #include #include + class GeomFill_DraftTrihedron; -class Adaptor3d_HSurface; -class Adaptor3d_HCurve; -class Standard_NotImplemented; -class Standard_OutOfRange; -class gp_Dir; -class gp_Mat; class GeomFill_LocationLaw; -class gp_Vec; -class gp_Pnt; - -class GeomFill_LocationDraft; DEFINE_STANDARD_HANDLE(GeomFill_LocationDraft, GeomFill_LocationLaw) - class GeomFill_LocationDraft : public GeomFill_LocationLaw { @@ -55,13 +43,13 @@ public: Standard_EXPORT GeomFill_LocationDraft(const gp_Dir& Direction, const Standard_Real Angle); - Standard_EXPORT void SetStopSurf (const Handle(Adaptor3d_HSurface)& Surf); + Standard_EXPORT void SetStopSurf (const Handle(Adaptor3d_Surface)& Surf); Standard_EXPORT void SetAngle (const Standard_Real Angle); - Standard_EXPORT virtual void SetCurve (const Handle(Adaptor3d_HCurve)& C) Standard_OVERRIDE; + Standard_EXPORT virtual void SetCurve (const Handle(Adaptor3d_Curve)& C) Standard_OVERRIDE; - Standard_EXPORT virtual const Handle(Adaptor3d_HCurve)& GetCurve() const Standard_OVERRIDE; + Standard_EXPORT virtual const Handle(Adaptor3d_Curve)& GetCurve() const Standard_OVERRIDE; Standard_EXPORT virtual void SetTrsf (const gp_Mat& Transfo) Standard_OVERRIDE; @@ -173,9 +161,9 @@ private: gp_Mat Trans; Handle(GeomFill_DraftTrihedron) myLaw; - Handle(Adaptor3d_HSurface) mySurf; - Handle(Adaptor3d_HCurve) myCurve; - Handle(Adaptor3d_HCurve) myTrimmed; + Handle(Adaptor3d_Surface) mySurf; + Handle(Adaptor3d_Curve) myCurve; + Handle(Adaptor3d_Curve) myTrimmed; gp_Dir myDir; Standard_Real myAngle; Standard_Integer myNbPts; diff --git a/src/GeomFill/GeomFill_LocationGuide.cxx b/src/GeomFill/GeomFill_LocationGuide.cxx index 68fab385b7..81848896c3 100644 --- a/src/GeomFill/GeomFill_LocationGuide.cxx +++ b/src/GeomFill/GeomFill_LocationGuide.cxx @@ -14,9 +14,9 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. +#include -#include -#include +#include #include #include #include @@ -27,10 +27,9 @@ #include #include #include -#include -#include +#include +#include #include -#include #include #include #include @@ -79,7 +78,7 @@ static void TraceRevol(const Standard_Real t, const Standard_Real s, const Handle(GeomFill_TrihedronWithGuide)& Law, const Handle(GeomFill_SectionLaw)& Section, - const Handle(Adaptor3d_HCurve)& Curve, + const Handle(Adaptor3d_Curve)& Curve, const gp_Mat& Trans) { @@ -232,7 +231,7 @@ static void InGoodPeriod(const Standard_Real Prec, Standard_Real CurAngle = PrecAngle, a1/*, a2*/; gp_Pnt2d p1,p2; Handle(Geom_SurfaceOfRevolution) Revol; // surface de revolution - Handle(GeomAdaptor_HSurface) Pl; // = Revol + Handle(GeomAdaptor_Surface) Pl; // = Revol Handle(Geom_TrimmedCurve) S; IntCurveSurface_IntersectionPoint PInt; // intersection guide/Revol Handle(TColStd_HArray1OfInteger) Mult; @@ -342,7 +341,7 @@ static void InGoodPeriod(const Standard_Real Prec, Revol = new(Geom_SurfaceOfRevolution) (S, Ax); GeomAdaptor_Surface GArevol(Revol); - Extrema_ExtCS DistMini(myGuide->Curve(), GArevol, + Extrema_ExtCS DistMini(*myGuide, GArevol, Precision::Confusion(), Precision::Confusion()); Extrema_POnCurv Pc; Extrema_POnSurf Ps; @@ -538,7 +537,7 @@ static void InGoodPeriod(const Standard_Real Prec, //Purpose : Calcul des poles sur la surface d'arret (intersection // courbe guide / surface de revolution en myNbPts points) //================================================================== - void GeomFill_LocationGuide::SetCurve(const Handle(Adaptor3d_HCurve)& C) + void GeomFill_LocationGuide::SetCurve(const Handle(Adaptor3d_Curve)& C) { Standard_Real LastAngle; myCurve = C; @@ -557,7 +556,7 @@ static void InGoodPeriod(const Standard_Real Prec, //Function: GetCurve //Purpose : return the trajectoire //================================================================== - const Handle(Adaptor3d_HCurve)& GeomFill_LocationGuide::GetCurve() const + const Handle(Adaptor3d_Curve)& GeomFill_LocationGuide::GetCurve() const { return myCurve; } @@ -1342,7 +1341,7 @@ void GeomFill_LocationGuide::Resolution (const Standard_Integer , //Function : Guide //Purpose : //================================================================== - Handle(Adaptor3d_HCurve) GeomFill_LocationGuide::Guide() const + Handle(Adaptor3d_Curve) GeomFill_LocationGuide::Guide() const { return myGuide; } diff --git a/src/GeomFill/GeomFill_LocationGuide.hxx b/src/GeomFill/GeomFill_LocationGuide.hxx index 2b18fdf04d..0486dc8852 100644 --- a/src/GeomFill/GeomFill_LocationGuide.hxx +++ b/src/GeomFill/GeomFill_LocationGuide.hxx @@ -35,7 +35,6 @@ #include class GeomFill_TrihedronWithGuide; class GeomFill_SectionLaw; -class Adaptor3d_HCurve; class Standard_NotImplemented; class Standard_ConstructionError; class Standard_OutOfRange; @@ -62,9 +61,9 @@ public: Standard_EXPORT void EraseRotation(); - Standard_EXPORT virtual void SetCurve (const Handle(Adaptor3d_HCurve)& C) Standard_OVERRIDE; + Standard_EXPORT virtual void SetCurve (const Handle(Adaptor3d_Curve)& C) Standard_OVERRIDE; - Standard_EXPORT virtual const Handle(Adaptor3d_HCurve)& GetCurve() const Standard_OVERRIDE; + Standard_EXPORT virtual const Handle(Adaptor3d_Curve)& GetCurve() const Standard_OVERRIDE; Standard_EXPORT virtual void SetTrsf (const gp_Mat& Transfo) Standard_OVERRIDE; @@ -164,7 +163,7 @@ public: Standard_EXPORT Handle(Geom_Curve) Section() const; - Standard_EXPORT Handle(Adaptor3d_HCurve) Guide() const; + Standard_EXPORT Handle(Adaptor3d_Curve) Guide() const; Standard_EXPORT void SetOrigine (const Standard_Real Param1, const Standard_Real Param2); @@ -190,9 +189,9 @@ private: Handle(GeomFill_TrihedronWithGuide) myLaw; Handle(GeomFill_SectionLaw) mySec; - Handle(Adaptor3d_HCurve) myCurve; - Handle(Adaptor3d_HCurve) myGuide; - Handle(Adaptor3d_HCurve) myTrimmed; + Handle(Adaptor3d_Curve) myCurve; + Handle(Adaptor3d_Curve) myGuide; + Handle(Adaptor3d_Curve) myTrimmed; Standard_Integer myNbPts; Standard_Boolean rotation; Standard_Real OrigParam1; diff --git a/src/GeomFill/GeomFill_LocationLaw.cxx b/src/GeomFill/GeomFill_LocationLaw.cxx index 72d7474888..137d056cf1 100644 --- a/src/GeomFill/GeomFill_LocationLaw.cxx +++ b/src/GeomFill/GeomFill_LocationLaw.cxx @@ -14,9 +14,9 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. - -#include #include + +#include #include #include #include diff --git a/src/GeomFill/GeomFill_LocationLaw.hxx b/src/GeomFill/GeomFill_LocationLaw.hxx index 2c49e659a3..870589e8f3 100644 --- a/src/GeomFill/GeomFill_LocationLaw.hxx +++ b/src/GeomFill/GeomFill_LocationLaw.hxx @@ -17,26 +17,19 @@ #ifndef _GeomFill_LocationLaw_HeaderFile #define _GeomFill_LocationLaw_HeaderFile -#include -#include - -#include -#include -#include +#include +#include +#include #include #include -#include -#include -#include #include + class Standard_NotImplemented; class Standard_OutOfRange; -class Adaptor3d_HCurve; class gp_Mat; class gp_Vec; class gp_Pnt; - class GeomFill_LocationLaw; DEFINE_STANDARD_HANDLE(GeomFill_LocationLaw, Standard_Transient) @@ -49,9 +42,9 @@ class GeomFill_LocationLaw : public Standard_Transient public: - Standard_EXPORT virtual void SetCurve (const Handle(Adaptor3d_HCurve)& C) = 0; + Standard_EXPORT virtual void SetCurve (const Handle(Adaptor3d_Curve)& C) = 0; - Standard_EXPORT virtual const Handle(Adaptor3d_HCurve)& GetCurve() const = 0; + Standard_EXPORT virtual const Handle(Adaptor3d_Curve)& GetCurve() const = 0; //! Set a transformation Matrix like the law M(t) become //! Mat * M(t) diff --git a/src/GeomFill/GeomFill_Pipe.cxx b/src/GeomFill/GeomFill_Pipe.cxx index 34cf45d944..6a25780047 100644 --- a/src/GeomFill/GeomFill_Pipe.cxx +++ b/src/GeomFill/GeomFill_Pipe.cxx @@ -22,13 +22,14 @@ // dans Init(Path, FirstSect, LastSect) : // il faut placer les 2 sections au debut de la trajectoire +#include + #include -#include -#include +#include #include #include #include -#include +#include #include #include #include @@ -45,8 +46,7 @@ #include #include #include -#include -#include +#include #include #include #include @@ -61,7 +61,6 @@ #include #include #include -#include #include #include #include @@ -305,12 +304,12 @@ GeomFill_Pipe::GeomFill_Pipe(const Handle(Geom_Curve)& Path, : myIsDone(Standard_False),myExchUV(Standard_False),myKPart(Standard_False) { Init(); - Handle(GeomAdaptor_HCurve) AdpPath = - new GeomAdaptor_HCurve( Path); - Handle(GeomAdaptor_HCurve) AdpCurve1 = - new GeomAdaptor_HCurve( Curve1); - Handle(GeomAdaptor_HCurve) AdpCurve2 = - new GeomAdaptor_HCurve( Curve2); + Handle(GeomAdaptor_Curve) AdpPath = + new GeomAdaptor_Curve( Path); + Handle(GeomAdaptor_Curve) AdpCurve1 = + new GeomAdaptor_Curve( Curve1); + Handle(GeomAdaptor_Curve) AdpCurve2 = + new GeomAdaptor_Curve( Curve2); Init(AdpPath, AdpCurve1, AdpCurve2, Radius); } @@ -321,9 +320,9 @@ GeomFill_Pipe::GeomFill_Pipe(const Handle(Geom_Curve)& Path, //purpose : //======================================================================= -GeomFill_Pipe::GeomFill_Pipe(const Handle(Adaptor3d_HCurve)& Path, - const Handle(Adaptor3d_HCurve)& Curve1, - const Handle(Adaptor3d_HCurve)& Curve2, +GeomFill_Pipe::GeomFill_Pipe(const Handle(Adaptor3d_Curve)& Path, + const Handle(Adaptor3d_Curve)& Curve1, + const Handle(Adaptor3d_Curve)& Curve2, const Standard_Real Radius) : myIsDone(Standard_False),myExchUV(Standard_False),myKPart(Standard_False) { @@ -341,7 +340,7 @@ GeomFill_Pipe::GeomFill_Pipe(const Handle(Adaptor3d_HCurve)& Path, //======================================================================= GeomFill_Pipe::GeomFill_Pipe(const Handle(Geom_Curve)& Path, - const Handle(Adaptor3d_HCurve)& Guide, + const Handle(Adaptor3d_Curve)& Guide, const Handle(Geom_Curve)& FirstSect, const Standard_Boolean byACR, const Standard_Boolean rotat) @@ -363,7 +362,7 @@ GeomFill_Pipe::GeomFill_Pipe(const Handle(Geom_Curve)& Path, //======================================================================= void GeomFill_Pipe::Init(const Handle(Geom_Curve)& Path, - const Handle(Adaptor3d_HCurve)& Guide, + const Handle(Adaptor3d_Curve)& Guide, const Handle(Geom_Curve)& FirstSect, const Standard_Boolean byACR, const Standard_Boolean rotat) @@ -374,7 +373,7 @@ void GeomFill_Pipe::Init(const Handle(Geom_Curve)& Path, // triedre : AC pour absc. curv. ou P pour plan ortho { Standard_Real angle; - myAdpPath = new (GeomAdaptor_HCurve) + myAdpPath = new (GeomAdaptor_Curve) (Handle(Geom_Curve)::DownCast(Path->Copy())); Handle (GeomFill_TrihedronWithGuide) TLaw; @@ -451,7 +450,7 @@ void GeomFill_Pipe::Init(const Handle(Geom_Curve)& Path, myRadius = Radius; // Nouvelle methode - myAdpPath = new (GeomAdaptor_HCurve) (Path); + myAdpPath = new (GeomAdaptor_Curve) (Path); Handle(Geom_Circle) C = new (Geom_Circle) (gp::XOY(), Radius); C->Rotate(gp::OZ(),M_PI/2.); @@ -482,7 +481,7 @@ void GeomFill_Pipe::Init(const Handle(Geom_Curve)& Path, { Handle(Geom_Curve) Sect; Handle(GeomFill_TrihedronLaw) TLaw; - myAdpPath = new (GeomAdaptor_HCurve) + myAdpPath = new (GeomAdaptor_Curve) (Handle(Geom_Curve)::DownCast(Path->Copy())); Standard_Real param = Path->FirstParameter(); @@ -605,9 +604,9 @@ void GeomFill_Pipe::Init(const Handle(Geom2d_Curve)& Path, Handle(Geom_Curve) Sect; Handle(GeomFill_TrihedronLaw) TLaw = new (GeomFill_Darboux)(); myAdpPath = - new Adaptor3d_HCurveOnSurface(Adaptor3d_CurveOnSurface( - new Geom2dAdaptor_HCurve(Path), - new GeomAdaptor_HSurface(Support))); + new Adaptor3d_CurveOnSurface(Adaptor3d_CurveOnSurface( + new Geom2dAdaptor_Curve(Path), + new GeomAdaptor_Surface(Support))); myLoc = new (GeomFill_CurveAndTrihedron) (TLaw); myLoc->SetCurve(myAdpPath); @@ -640,7 +639,7 @@ void GeomFill_Pipe::Init(const Handle(Geom_Curve)& Path, Init(); Handle(Geom_Curve) Sect; - myAdpPath = new (GeomAdaptor_HCurve) + myAdpPath = new (GeomAdaptor_Curve) (Handle(Geom_Curve)::DownCast(Path->Copy())); gp_Vec V; V.SetXYZ(Direction.XYZ()); @@ -679,7 +678,7 @@ void GeomFill_Pipe::Init(const Handle(Geom_Curve)& Path, Handle(GeomFill_TrihedronLaw) TLaw; TLaw = new (GeomFill_CorrectedFrenet) (); - myAdpPath = new (GeomAdaptor_HCurve) + myAdpPath = new (GeomAdaptor_Curve) (Handle(Geom_Curve)::DownCast(Path->Copy())); if (!TLaw.IsNull()) { myLoc = new (GeomFill_CurveAndTrihedron) (TLaw); @@ -747,7 +746,7 @@ void GeomFill_Pipe::Init(const Handle(Geom_Curve)& Path, last = Path->LastParameter(); Handle(GeomFill_TrihedronLaw) TLaw; TLaw = new (GeomFill_CorrectedFrenet) (); - myAdpPath = new (GeomAdaptor_HCurve) + myAdpPath = new (GeomAdaptor_Curve) (Handle(Geom_Curve)::DownCast(Path->Copy())); if (!TLaw.IsNull()) { @@ -785,9 +784,9 @@ void GeomFill_Pipe::Init(const Handle(Geom_Curve)& Path, //purpose : //======================================================================= -void GeomFill_Pipe::Init(const Handle(Adaptor3d_HCurve)& Path, - const Handle(Adaptor3d_HCurve)& Curve1, - const Handle(Adaptor3d_HCurve)& Curve2, +void GeomFill_Pipe::Init(const Handle(Adaptor3d_Curve)& Path, + const Handle(Adaptor3d_Curve)& Curve1, + const Handle(Adaptor3d_Curve)& Curve2, const Standard_Real Radius) { myType = 4; diff --git a/src/GeomFill/GeomFill_Pipe.hxx b/src/GeomFill/GeomFill_Pipe.hxx index 9f7122d712..5598b70274 100644 --- a/src/GeomFill/GeomFill_Pipe.hxx +++ b/src/GeomFill/GeomFill_Pipe.hxx @@ -17,26 +17,18 @@ #ifndef _GeomFill_Pipe_HeaderFile #define _GeomFill_Pipe_HeaderFile -#include -#include -#include - -#include -#include -#include +#include #include -#include #include -class Adaptor3d_HCurve; +#include + class Geom_Surface; class GeomFill_LocationLaw; class GeomFill_SectionLaw; -class Standard_ConstructionError; class Geom_Curve; class Geom2d_Curve; class gp_Dir; - //! Describes functions to construct pipes. A pipe is built by //! sweeping a curve (the section) along another curve (the path). //! The Pipe class provides the following types of construction: @@ -134,7 +126,7 @@ public: //! Create a pipe with a constant radius with 2 //! guide-line. - Standard_EXPORT GeomFill_Pipe(const Handle(Adaptor3d_HCurve)& Path, const Handle(Adaptor3d_HCurve)& Curve1, const Handle(Adaptor3d_HCurve)& Curve2, const Standard_Real Radius); + Standard_EXPORT GeomFill_Pipe(const Handle(Adaptor3d_Curve)& Path, const Handle(Adaptor3d_Curve)& Curve1, const Handle(Adaptor3d_Curve)& Curve2, const Standard_Real Radius); //! Create a pipe with a constant section and with 1 //! guide-line. @@ -174,7 +166,7 @@ public: //! obtained by applying to the curve Si the geometric //! transformation which transforms coordinate system //! T1 into coordinate system Ti. - Standard_EXPORT GeomFill_Pipe(const Handle(Geom_Curve)& Path, const Handle(Adaptor3d_HCurve)& Guide, const Handle(Geom_Curve)& FirstSect, const Standard_Boolean ByACR, const Standard_Boolean rotat); + Standard_EXPORT GeomFill_Pipe(const Handle(Geom_Curve)& Path, const Handle(Adaptor3d_Curve)& Guide, const Handle(Geom_Curve)& FirstSect, const Standard_Boolean ByACR, const Standard_Boolean rotat); Standard_EXPORT void Init (const Handle(Geom_Curve)& Path, const Standard_Real Radius); @@ -190,7 +182,7 @@ public: //! Create a pipe with a constant radius with 2 //! guide-line. - Standard_EXPORT void Init (const Handle(Adaptor3d_HCurve)& Path, const Handle(Adaptor3d_HCurve)& Curve1, const Handle(Adaptor3d_HCurve)& Curve2, const Standard_Real Radius); + Standard_EXPORT void Init (const Handle(Adaptor3d_Curve)& Path, const Handle(Adaptor3d_Curve)& Curve1, const Handle(Adaptor3d_Curve)& Curve2, const Standard_Real Radius); //! Initializes this pipe algorithm to build the following surface: @@ -201,7 +193,7 @@ public: //! LastSect along the path Path. //! Use the function Perform to build the surface. //! Note: a description of the resulting surface is given under Constructors. - Standard_EXPORT void Init (const Handle(Geom_Curve)& Path, const Handle(Adaptor3d_HCurve)& Guide, const Handle(Geom_Curve)& FirstSect, const Standard_Boolean ByACR, const Standard_Boolean rotat); + Standard_EXPORT void Init (const Handle(Geom_Curve)& Path, const Handle(Adaptor3d_Curve)& Guide, const Handle(Geom_Curve)& FirstSect, const Standard_Boolean ByACR, const Standard_Boolean rotat); //! Builds the pipe defined at the time of initialization of this //! algorithm. A description of the resulting surface is given under Constructors. @@ -283,9 +275,9 @@ private: Standard_Boolean myIsDone; Standard_Real myRadius; Standard_Real myError; - Handle(Adaptor3d_HCurve) myAdpPath; - Handle(Adaptor3d_HCurve) myAdpFirstSect; - Handle(Adaptor3d_HCurve) myAdpLastSect; + Handle(Adaptor3d_Curve) myAdpPath; + Handle(Adaptor3d_Curve) myAdpFirstSect; + Handle(Adaptor3d_Curve) myAdpLastSect; Handle(Geom_Surface) mySurface; Handle(GeomFill_LocationLaw) myLoc; Handle(GeomFill_SectionLaw) mySec; diff --git a/src/GeomFill/GeomFill_PlanFunc.cxx b/src/GeomFill/GeomFill_PlanFunc.cxx index c0bf9fb5e3..5c854e6d90 100644 --- a/src/GeomFill/GeomFill_PlanFunc.cxx +++ b/src/GeomFill/GeomFill_PlanFunc.cxx @@ -15,14 +15,14 @@ // commercial license or contractual agreement. -#include +#include #include #include #include GeomFill_PlanFunc::GeomFill_PlanFunc(const gp_Pnt& theP, const gp_Vec& theV, - const Handle(Adaptor3d_HCurve)& theC) : + const Handle(Adaptor3d_Curve)& theC) : myCurve(theC) { myPnt = theP.XYZ(); diff --git a/src/GeomFill/GeomFill_PlanFunc.hxx b/src/GeomFill/GeomFill_PlanFunc.hxx index e82dd3e109..f0cc19ef03 100644 --- a/src/GeomFill/GeomFill_PlanFunc.hxx +++ b/src/GeomFill/GeomFill_PlanFunc.hxx @@ -26,7 +26,7 @@ #include #include #include -class Adaptor3d_HCurve; + class gp_Pnt; class gp_Vec; @@ -39,7 +39,7 @@ public: DEFINE_STANDARD_ALLOC - Standard_EXPORT GeomFill_PlanFunc(const gp_Pnt& P, const gp_Vec& V, const Handle(Adaptor3d_HCurve)& C); + Standard_EXPORT GeomFill_PlanFunc(const gp_Pnt& P, const gp_Vec& V, const Handle(Adaptor3d_Curve)& C); //! computes the value of the function for the variable . //! Returns True if the calculation were successfully done, @@ -81,7 +81,7 @@ private: gp_XYZ myVec; gp_XYZ V; gp_Pnt G; - Handle(Adaptor3d_HCurve) myCurve; + Handle(Adaptor3d_Curve) myCurve; }; diff --git a/src/GeomFill/GeomFill_SectionPlacement.cxx b/src/GeomFill/GeomFill_SectionPlacement.cxx index fabc9b4038..163429828c 100644 --- a/src/GeomFill/GeomFill_SectionPlacement.cxx +++ b/src/GeomFill/GeomFill_SectionPlacement.cxx @@ -15,7 +15,7 @@ // commercial license or contractual agreement. -#include +#include #include #include #include @@ -30,7 +30,7 @@ #include #include #include -#include +#include #include #include #include @@ -402,7 +402,7 @@ SetLocation(const Handle(GeomFill_LocationLaw)& L) //=============================================================== void GeomFill_SectionPlacement::Perform(const Standard_Real Tol) { - Handle(Adaptor3d_HCurve) Path; + Handle(Adaptor3d_Curve) Path; Path = myLaw->GetCurve(); Perform(Path, Tol); } @@ -411,7 +411,7 @@ void GeomFill_SectionPlacement::Perform(const Standard_Real Tol) // Function :Perform // Purpose : Recherche automatique //=============================================================== -void GeomFill_SectionPlacement::Perform(const Handle(Adaptor3d_HCurve)& Path, +void GeomFill_SectionPlacement::Perform(const Handle(Adaptor3d_Curve)& Path, const Standard_Real Tol) { Standard_Real IntTol = 1.e-5; @@ -419,8 +419,8 @@ void GeomFill_SectionPlacement::Perform(const Handle(Adaptor3d_HCurve)& Path, if (myIsPoint) { - Extrema_ExtPC Projector(myPoint, Path->Curve(), Precision::Confusion()); - DistMini( Projector, Path->Curve(), Dist, PathParam ); + Extrema_ExtPC Projector(myPoint, *Path, Precision::Confusion()); + DistMini( Projector, *Path, Dist, PathParam ); AngleMax = M_PI/2; } else @@ -433,7 +433,7 @@ void GeomFill_SectionPlacement::Perform(const Handle(Adaptor3d_HCurve)& Path, gp_Vec VRef, dp1; VRef.SetXYZ(TheAxe.Direction().XYZ()); - Tangente( Path->Curve(), PathParam, PonPath, dp1); + Tangente (*Path, PathParam, PonPath, dp1); PonSec = myAdpSection.Value(SecParam); Dist = PonPath.Distance(PonSec); if (Dist > Tol) { // On Cherche un meilleur point sur la section @@ -474,8 +474,8 @@ void GeomFill_SectionPlacement::Perform(const Handle(Adaptor3d_HCurve)& Path, // (1.2) Intersection Plan-courbe gp_Ax3 axe (TheAxe.Location(), TheAxe.Direction()); Handle(Geom_Plane) plan = new (Geom_Plane)(axe); - Handle(GeomAdaptor_HSurface) adplan = - new (GeomAdaptor_HSurface)(plan); + Handle(GeomAdaptor_Surface) adplan = + new (GeomAdaptor_Surface)(plan); IntCurveSurface_HInter Intersector; Intersector.Perform(Path, adplan); if (Intersector.IsDone()) @@ -514,7 +514,7 @@ void GeomFill_SectionPlacement::Perform(const Handle(Adaptor3d_HCurve)& Path, else { PathParam = Path->LastParameter(); - Tangente( Path->Curve(), PathParam, PonPath, dp1); + Tangente (*Path, PathParam, PonPath, dp1); PonSec = myAdpSection.Value(SecParam); Dist = PonPath.Distance(PonSec); if (Dist > Tol) { // On Cherche un meilleur point sur la section @@ -561,8 +561,8 @@ void GeomFill_SectionPlacement::Perform(const Handle(Adaptor3d_HCurve)& Path, // (1.2) Intersection Plan-courbe gp_Ax3 axe (TheAxe.Location(), TheAxe.Direction()); Handle(Geom_Plane) plan = new (Geom_Plane)(axe); - Handle(GeomAdaptor_HSurface) adplan = - new (GeomAdaptor_HSurface)(plan); + Handle(GeomAdaptor_Surface) adplan = + new (GeomAdaptor_Surface)(plan); IntCurveSurface_HInter Intersector; Intersector.Perform(Path, adplan); if (Intersector.IsDone()) { @@ -618,7 +618,7 @@ void GeomFill_SectionPlacement::Perform(const Handle(Adaptor3d_HCurve)& Path, } Trouve = (Dist <= Tol); if (!Trouve) { - Tangente( Path->Curve(), Path->LastParameter(), P, dp1); + Tangente (*Path, Path->LastParameter(), P, dp1); alpha = EvalAngle(VRef, dp1); myExt.Perform(P); if ( myExt.IsDone() ) { @@ -638,7 +638,7 @@ void GeomFill_SectionPlacement::Perform(const Handle(Adaptor3d_HCurve)& Path, // (2.2) Distance courbe-courbe if (!Trouve) { - Extrema_ExtCC Ext(Path->Curve(), myAdpSection, + Extrema_ExtCC Ext(*Path, myAdpSection, Path->FirstParameter(), Path->LastParameter(), myAdpSection.FirstParameter(), myAdpSection.LastParameter(), @@ -649,7 +649,7 @@ void GeomFill_SectionPlacement::Perform(const Handle(Adaptor3d_HCurve)& Path, for (ii=1; ii<=Ext.NbExt(); ii++) { distaux = sqrt (Ext.SquareDistance(ii)); Ext.Points(ii, P1, P2); - Tangente(Path->Curve(), P1.Parameter(), P, dp1); + Tangente (*Path, P1.Parameter(), P, dp1); alpha = EvalAngle(VRef, dp1); if (Choix(distaux, alpha)) { Trouve = Standard_True; @@ -666,7 +666,7 @@ void GeomFill_SectionPlacement::Perform(const Handle(Adaptor3d_HCurve)& Path, // Si l'on a toujours rien, on essai une distance point/path // c'est la derniere chance. Extrema_ExtPC PExt; - PExt.Initialize(Path->Curve(), + PExt.Initialize (*Path, Path->FirstParameter(), Path->LastParameter(), Precision::Confusion()); @@ -674,9 +674,9 @@ void GeomFill_SectionPlacement::Perform(const Handle(Adaptor3d_HCurve)& Path, if ( PExt.IsDone() ) { // modified for OCC13595 Tue Oct 17 15:00:08 2006.BEGIN // DistMini(PExt, myAdpSection, distaux, taux); - DistMini(PExt, Path->Curve(), distaux, taux); + DistMini(PExt, *Path, distaux, taux); // modified for OCC13595 Tue Oct 17 15:00:11 2006.END - Tangente(Path->Curve(), taux, P, dp1); + Tangente (*Path, taux, P, dp1); alpha = EvalAngle(VRef, dp1); if (Choix(distaux, alpha)) { Dist = distaux; @@ -702,7 +702,7 @@ void GeomFill_SectionPlacement::Perform(const Standard_Real Param, const Standard_Real Tol) { done = Standard_True; - Handle(Adaptor3d_HCurve) Path; + Handle(Adaptor3d_Curve) Path; Path = myLaw->GetCurve(); PathParam = Param; @@ -722,7 +722,7 @@ void GeomFill_SectionPlacement::Perform(const Standard_Real Param, gp_Vec VRef, dp1; VRef.SetXYZ(TheAxe.Direction().XYZ()); - Tangente( Path->Curve(), PathParam, PonPath, dp1); + Tangente (*Path, PathParam, PonPath, dp1); PonSec = myAdpSection.Value(SecParam); Dist = PonPath.Distance(PonSec); if (Dist > Tol) { // On Cherche un meilleur point sur la section diff --git a/src/GeomFill/GeomFill_SectionPlacement.hxx b/src/GeomFill/GeomFill_SectionPlacement.hxx index 82132e4a94..0845552894 100644 --- a/src/GeomFill/GeomFill_SectionPlacement.hxx +++ b/src/GeomFill/GeomFill_SectionPlacement.hxx @@ -31,7 +31,6 @@ class GeomFill_LocationLaw; class Geom_Curve; class StdFail_NotDone; class Geom_Geometry; -class Adaptor3d_HCurve; class gp_Trsf; class gp_Mat; class gp_Vec; @@ -52,7 +51,7 @@ public: Standard_EXPORT void Perform (const Standard_Real Tol); - Standard_EXPORT void Perform (const Handle(Adaptor3d_HCurve)& Path, const Standard_Real Tol); + Standard_EXPORT void Perform (const Handle(Adaptor3d_Curve)& Path, const Standard_Real Tol); Standard_EXPORT void Perform (const Standard_Real ParamOnPath, const Standard_Real Tol); diff --git a/src/GeomFill/GeomFill_SimpleBound.cxx b/src/GeomFill/GeomFill_SimpleBound.cxx index e2261cbcd6..ec99dfd41c 100644 --- a/src/GeomFill/GeomFill_SimpleBound.cxx +++ b/src/GeomFill/GeomFill_SimpleBound.cxx @@ -15,7 +15,7 @@ // commercial license or contractual agreement. -#include +#include #include #include #include @@ -31,7 +31,7 @@ IMPLEMENT_STANDARD_RTTIEXT(GeomFill_SimpleBound,GeomFill_Boundary) //purpose : //======================================================================= GeomFill_SimpleBound::GeomFill_SimpleBound -(const Handle(Adaptor3d_HCurve)& Curve, +(const Handle(Adaptor3d_Curve)& Curve, const Standard_Real Tol3d, const Standard_Real Tolang) : GeomFill_Boundary(Tol3d,Tolang), myC3d(Curve) @@ -79,7 +79,7 @@ void GeomFill_SimpleBound::Reparametrize(const Standard_Real First, const Standard_Real DL, const Standard_Boolean Rev) { - Handle(Law_BSpline) curve = Law::Reparametrize(myC3d->Curve(), + Handle(Law_BSpline) curve = Law::Reparametrize(*myC3d, First,Last, HasDF,HasDL,DF,DL, Rev,30); diff --git a/src/GeomFill/GeomFill_SimpleBound.hxx b/src/GeomFill/GeomFill_SimpleBound.hxx index 44b7300dd4..34546d60f3 100644 --- a/src/GeomFill/GeomFill_SimpleBound.hxx +++ b/src/GeomFill/GeomFill_SimpleBound.hxx @@ -23,7 +23,7 @@ #include #include #include -class Adaptor3d_HCurve; + class Law_Function; class gp_Pnt; class gp_Vec; @@ -57,17 +57,17 @@ public: //! The adapted curve is created in one of the following ways: //! - First sequence: //! Handle(Geom_Curve) myCurve = ... ; - //! Handle(GeomAdaptor_HCurve) + //! Handle(GeomAdaptor_Curve) //! Curve = new - //! GeomAdaptor_HCurve(myCurve); + //! GeomAdaptor_Curve(myCurve); //! - Second sequence: //! // Step 1 //! Handle(Geom_Curve) myCurve = ... ; //! GeomAdaptor_Curve Crv (myCurve); //! // Step 2 - //! Handle(GeomAdaptor_HCurve) + //! Handle(GeomAdaptor_Curve) //! Curve = new - //! GeomAdaptor_HCurve(Crv); + //! GeomAdaptor_Curve(Crv); //! You use the second part of this sequence if you already //! have the adapted curve Crv. //! The boundary is then constructed with the Curve object: @@ -75,7 +75,7 @@ public: //! Standard_Real dummy = 0. ; //! myBoundary = GeomFill_SimpleBound //! (Curve,Tol,dummy); - Standard_EXPORT GeomFill_SimpleBound(const Handle(Adaptor3d_HCurve)& Curve, const Standard_Real Tol3d, const Standard_Real Tolang); + Standard_EXPORT GeomFill_SimpleBound(const Handle(Adaptor3d_Curve)& Curve, const Standard_Real Tol3d, const Standard_Real Tolang); Standard_EXPORT gp_Pnt Value (const Standard_Real U) const Standard_OVERRIDE; @@ -100,7 +100,7 @@ protected: private: - Handle(Adaptor3d_HCurve) myC3d; + Handle(Adaptor3d_Curve) myC3d; Handle(Law_Function) myPar; diff --git a/src/GeomFill/GeomFill_SnglrFunc.cxx b/src/GeomFill/GeomFill_SnglrFunc.cxx index 07ecd327cf..825758bff5 100644 --- a/src/GeomFill/GeomFill_SnglrFunc.cxx +++ b/src/GeomFill/GeomFill_SnglrFunc.cxx @@ -15,7 +15,7 @@ // commercial license or contractual agreement. -#include +#include #include #include #include @@ -24,7 +24,7 @@ #include #include -GeomFill_SnglrFunc::GeomFill_SnglrFunc(const Handle(Adaptor3d_HCurve)& HC) : +GeomFill_SnglrFunc::GeomFill_SnglrFunc(const Handle(Adaptor3d_Curve)& HC) : myHCurve(HC), ratio(1) { } diff --git a/src/GeomFill/GeomFill_SnglrFunc.hxx b/src/GeomFill/GeomFill_SnglrFunc.hxx index 1da26832b5..69d9f7df65 100644 --- a/src/GeomFill/GeomFill_SnglrFunc.hxx +++ b/src/GeomFill/GeomFill_SnglrFunc.hxx @@ -28,7 +28,7 @@ #include #include #include -class Adaptor3d_HCurve; + class Standard_OutOfRange; class Standard_DomainError; class gp_Pnt; @@ -43,7 +43,7 @@ public: DEFINE_STANDARD_ALLOC - Standard_EXPORT GeomFill_SnglrFunc(const Handle(Adaptor3d_HCurve)& HC); + Standard_EXPORT GeomFill_SnglrFunc(const Handle(Adaptor3d_Curve)& HC); Standard_EXPORT void SetRatio (const Standard_Real Ratio); @@ -120,7 +120,7 @@ private: - Handle(Adaptor3d_HCurve) myHCurve; + Handle(Adaptor3d_Curve) myHCurve; Standard_Real ratio; diff --git a/src/GeomFill/GeomFill_SweepSectionGenerator.cxx b/src/GeomFill/GeomFill_SweepSectionGenerator.cxx index 8ef5ccd291..ba5535c1d8 100644 --- a/src/GeomFill/GeomFill_SweepSectionGenerator.cxx +++ b/src/GeomFill/GeomFill_SweepSectionGenerator.cxx @@ -15,7 +15,7 @@ // commercial license or contractual agreement. -#include +#include #include #include #include @@ -106,9 +106,9 @@ GeomFill_SweepSectionGenerator::GeomFill_SweepSectionGenerator //======================================================================= GeomFill_SweepSectionGenerator::GeomFill_SweepSectionGenerator - (const Handle(Adaptor3d_HCurve)& Path, - const Handle(Adaptor3d_HCurve)& Curve1, - const Handle(Adaptor3d_HCurve)& Curve2, + (const Handle(Adaptor3d_Curve)& Path, + const Handle(Adaptor3d_Curve)& Curve1, + const Handle(Adaptor3d_Curve)& Curve2, const Standard_Real Radius) { Init(Path,Curve1,Curve2,Radius); @@ -245,16 +245,16 @@ void GeomFill_SweepSectionGenerator::Init //======================================================================= void GeomFill_SweepSectionGenerator::Init - (const Handle(Adaptor3d_HCurve)& Path, - const Handle(Adaptor3d_HCurve)& Curve1, - const Handle(Adaptor3d_HCurve)& Curve2, + (const Handle(Adaptor3d_Curve)& Path, + const Handle(Adaptor3d_Curve)& Curve1, + const Handle(Adaptor3d_Curve)& Curve2, const Standard_Real Radius) { myIsDone = Standard_False; myRadius = Radius; myType = 0; - Handle(Geom_Curve) CC = GeomAdaptor::MakeCurve(Path->Curve()); + Handle(Geom_Curve) CC = GeomAdaptor::MakeCurve(*Path); myPath = GeomConvert::CurveToBSplineCurve(CC); myAdpPath = Path; myAdpFirstSect = Curve1; diff --git a/src/GeomFill/GeomFill_SweepSectionGenerator.hxx b/src/GeomFill/GeomFill_SweepSectionGenerator.hxx index 8f27199d89..fc2096f6c4 100644 --- a/src/GeomFill/GeomFill_SweepSectionGenerator.hxx +++ b/src/GeomFill/GeomFill_SweepSectionGenerator.hxx @@ -17,14 +17,8 @@ #ifndef _GeomFill_SweepSectionGenerator_HeaderFile #define _GeomFill_SweepSectionGenerator_HeaderFile -#include -#include -#include - +#include #include -#include -#include -#include #include #include #include @@ -32,8 +26,8 @@ #include #include #include + class Geom_BSplineCurve; -class Adaptor3d_HCurve; class Standard_RangeError; class Geom_Curve; class gp_Trsf; @@ -66,7 +60,7 @@ public: //! Create a pipe with a constant radius with 2 //! guide-line. - Standard_EXPORT GeomFill_SweepSectionGenerator(const Handle(Adaptor3d_HCurve)& Path, const Handle(Adaptor3d_HCurve)& Curve1, const Handle(Adaptor3d_HCurve)& Curve2, const Standard_Real Radius); + Standard_EXPORT GeomFill_SweepSectionGenerator(const Handle(Adaptor3d_Curve)& Path, const Handle(Adaptor3d_Curve)& Curve1, const Handle(Adaptor3d_Curve)& Curve2, const Standard_Real Radius); Standard_EXPORT void Init (const Handle(Geom_Curve)& Path, const Standard_Real Radius); @@ -76,7 +70,7 @@ public: Standard_EXPORT void Init (const Handle(Geom_Curve)& Path, const Handle(Geom_Curve)& Curve1, const Handle(Geom_Curve)& Curve2, const Standard_Real Radius); - Standard_EXPORT void Init (const Handle(Adaptor3d_HCurve)& Path, const Handle(Adaptor3d_HCurve)& Curve1, const Handle(Adaptor3d_HCurve)& Curve2, const Standard_Real Radius); + Standard_EXPORT void Init (const Handle(Adaptor3d_Curve)& Path, const Handle(Adaptor3d_Curve)& Curve1, const Handle(Adaptor3d_Curve)& Curve2, const Standard_Real Radius); Standard_EXPORT void Perform (const Standard_Boolean Polynomial = Standard_False); @@ -118,9 +112,9 @@ private: Handle(Geom_BSplineCurve) myPath; Handle(Geom_BSplineCurve) myFirstSect; Handle(Geom_BSplineCurve) myLastSect; - Handle(Adaptor3d_HCurve) myAdpPath; - Handle(Adaptor3d_HCurve) myAdpFirstSect; - Handle(Adaptor3d_HCurve) myAdpLastSect; + Handle(Adaptor3d_Curve) myAdpPath; + Handle(Adaptor3d_Curve) myAdpFirstSect; + Handle(Adaptor3d_Curve) myAdpLastSect; gp_Ax1 myCircPathAxis; Standard_Real myRadius; Standard_Boolean myIsDone; diff --git a/src/GeomFill/GeomFill_TrihedronLaw.cxx b/src/GeomFill/GeomFill_TrihedronLaw.cxx index 15dce3645c..1a62448f68 100644 --- a/src/GeomFill/GeomFill_TrihedronLaw.cxx +++ b/src/GeomFill/GeomFill_TrihedronLaw.cxx @@ -15,7 +15,7 @@ // commercial license or contractual agreement. -#include +#include #include #include #include @@ -24,7 +24,7 @@ IMPLEMENT_STANDARD_RTTIEXT(GeomFill_TrihedronLaw,Standard_Transient) -void GeomFill_TrihedronLaw::SetCurve(const Handle(Adaptor3d_HCurve)& C) +void GeomFill_TrihedronLaw::SetCurve(const Handle(Adaptor3d_Curve)& C) { myCurve = C; myTrimmed = myCurve; diff --git a/src/GeomFill/GeomFill_TrihedronLaw.hxx b/src/GeomFill/GeomFill_TrihedronLaw.hxx index 3140cc055a..8bcdcd2782 100644 --- a/src/GeomFill/GeomFill_TrihedronLaw.hxx +++ b/src/GeomFill/GeomFill_TrihedronLaw.hxx @@ -17,17 +17,11 @@ #ifndef _GeomFill_TrihedronLaw_HeaderFile #define _GeomFill_TrihedronLaw_HeaderFile -#include -#include - -#include +#include #include -#include -#include -#include #include #include -class Adaptor3d_HCurve; + class Standard_OutOfRange; class Standard_NotImplemented; class gp_Vec; @@ -43,7 +37,7 @@ class GeomFill_TrihedronLaw : public Standard_Transient public: - Standard_EXPORT virtual void SetCurve (const Handle(Adaptor3d_HCurve)& C); + Standard_EXPORT virtual void SetCurve (const Handle(Adaptor3d_Curve)& C); Standard_EXPORT virtual Handle(GeomFill_TrihedronLaw) Copy() const = 0; @@ -106,8 +100,8 @@ public: protected: - Handle(Adaptor3d_HCurve) myCurve; - Handle(Adaptor3d_HCurve) myTrimmed; + Handle(Adaptor3d_Curve) myCurve; + Handle(Adaptor3d_Curve) myTrimmed; private: diff --git a/src/GeomFill/GeomFill_TrihedronWithGuide.cxx b/src/GeomFill/GeomFill_TrihedronWithGuide.cxx index a9c3edca84..3f9c68be1f 100644 --- a/src/GeomFill/GeomFill_TrihedronWithGuide.cxx +++ b/src/GeomFill/GeomFill_TrihedronWithGuide.cxx @@ -15,7 +15,7 @@ // commercial license or contractual agreement. -#include +#include #include #include #include @@ -24,7 +24,7 @@ IMPLEMENT_STANDARD_RTTIEXT(GeomFill_TrihedronWithGuide,GeomFill_TrihedronLaw) -Handle(Adaptor3d_HCurve) GeomFill_TrihedronWithGuide::Guide()const +Handle(Adaptor3d_Curve) GeomFill_TrihedronWithGuide::Guide()const { return myGuide; } diff --git a/src/GeomFill/GeomFill_TrihedronWithGuide.hxx b/src/GeomFill/GeomFill_TrihedronWithGuide.hxx index afd0954f76..ad10e7f09a 100644 --- a/src/GeomFill/GeomFill_TrihedronWithGuide.hxx +++ b/src/GeomFill/GeomFill_TrihedronWithGuide.hxx @@ -23,7 +23,7 @@ #include #include #include -class Adaptor3d_HCurve; + class Standard_OutOfRange; class Standard_NotImplemented; class gp_Pnt; @@ -39,7 +39,7 @@ class GeomFill_TrihedronWithGuide : public GeomFill_TrihedronLaw public: - Standard_EXPORT virtual Handle(Adaptor3d_HCurve) Guide() const = 0; + Standard_EXPORT virtual Handle(Adaptor3d_Curve) Guide() const = 0; Standard_EXPORT virtual void Origine (const Standard_Real Param1, const Standard_Real Param2) = 0; @@ -55,8 +55,8 @@ public: protected: - Handle(Adaptor3d_HCurve) myGuide; - Handle(Adaptor3d_HCurve) myTrimG; + Handle(Adaptor3d_Curve) myGuide; + Handle(Adaptor3d_Curve) myTrimG; gp_Pnt myCurPointOnGuide; diff --git a/src/GeomInt/GeomInt_IntSS.cxx b/src/GeomInt/GeomInt_IntSS.cxx index 0e2d7c9bcc..d78024a950 100644 --- a/src/GeomInt/GeomInt_IntSS.cxx +++ b/src/GeomInt/GeomInt_IntSS.cxx @@ -17,7 +17,7 @@ #include #include -#include +#include //======================================================================= //function : Perform @@ -30,11 +30,11 @@ void GeomInt_IntSS::Perform(const Handle(Geom_Surface)& S1, const Standard_Boolean ApproxS1, const Standard_Boolean ApproxS2) { - myHS1 = new GeomAdaptor_HSurface(S1); + myHS1 = new GeomAdaptor_Surface(S1); if (S1==S2) myHS2 = myHS1; else - myHS2 = new GeomAdaptor_HSurface(S2); + myHS2 = new GeomAdaptor_Surface(S2); InternalPerform(Tol,Approx,ApproxS1,ApproxS2,Standard_False,0.,0.,0.,0.); } @@ -51,11 +51,11 @@ void GeomInt_IntSS::Perform(const Handle(Geom_Surface)& S1, const Standard_Boolean ApproxS1, const Standard_Boolean ApproxS2) { - myHS1 = new GeomAdaptor_HSurface(S1); + myHS1 = new GeomAdaptor_Surface(S1); if (S1==S2) myHS2 = myHS1; else - myHS2 = new GeomAdaptor_HSurface(S2); + myHS2 = new GeomAdaptor_Surface(S2); InternalPerform(Tol,Approx,ApproxS1,ApproxS2,Standard_True,U1,V1,U2,V2); } diff --git a/src/GeomInt/GeomInt_IntSS.hxx b/src/GeomInt/GeomInt_IntSS.hxx index 40ed65331b..42201856fc 100644 --- a/src/GeomInt/GeomInt_IntSS.hxx +++ b/src/GeomInt/GeomInt_IntSS.hxx @@ -17,22 +17,15 @@ #ifndef _GeomInt_IntSS_HeaderFile #define _GeomInt_IntSS_HeaderFile -#include -#include -#include - #include +#include #include #include #include #include -#include -#include #include #include -class GeomAdaptor_HSurface; -class StdFail_NotDone; -class Standard_OutOfRange; + class Geom_Surface; class Geom_Curve; class Geom2d_Curve; @@ -42,8 +35,6 @@ class Bnd_Box2d; class Adaptor3d_TopolTool; class IntPatch_WLine; - - class GeomInt_IntSS { public: @@ -60,13 +51,13 @@ public: Standard_EXPORT void Perform (const Handle(Geom_Surface)& S1, const Handle(Geom_Surface)& S2, const Standard_Real Tol, const Standard_Boolean Approx = Standard_True, const Standard_Boolean ApproxS1 = Standard_False, const Standard_Boolean ApproxS2 = Standard_False); //! intersection of adapted surfaces - void Perform (const Handle(GeomAdaptor_HSurface)& HS1, const Handle(GeomAdaptor_HSurface)& HS2, const Standard_Real Tol, const Standard_Boolean Approx = Standard_True, const Standard_Boolean ApproxS1 = Standard_False, const Standard_Boolean ApproxS2 = Standard_False); + void Perform (const Handle(GeomAdaptor_Surface)& HS1, const Handle(GeomAdaptor_Surface)& HS2, const Standard_Real Tol, const Standard_Boolean Approx = Standard_True, const Standard_Boolean ApproxS1 = Standard_False, const Standard_Boolean ApproxS2 = Standard_False); //! general intersection using a starting point Standard_EXPORT void Perform (const Handle(Geom_Surface)& S1, const Handle(Geom_Surface)& S2, const Standard_Real Tol, const Standard_Real U1, const Standard_Real V1, const Standard_Real U2, const Standard_Real V2, const Standard_Boolean Approx = Standard_True, const Standard_Boolean ApproxS1 = Standard_False, const Standard_Boolean ApproxS2 = Standard_False); //! intersection of adapted surfaces using a starting point - void Perform (const Handle(GeomAdaptor_HSurface)& HS1, const Handle(GeomAdaptor_HSurface)& HS2, const Standard_Real Tol, const Standard_Real U1, const Standard_Real V1, const Standard_Real U2, const Standard_Real V2, const Standard_Boolean Approx = Standard_True, const Standard_Boolean ApproxS1 = Standard_False, const Standard_Boolean ApproxS2 = Standard_False); + void Perform (const Handle(GeomAdaptor_Surface)& HS1, const Handle(GeomAdaptor_Surface)& HS2, const Standard_Real Tol, const Standard_Real U1, const Standard_Real V1, const Standard_Real U2, const Standard_Real V2, const Standard_Boolean Approx = Standard_True, const Standard_Boolean ApproxS1 = Standard_False, const Standard_Boolean ApproxS2 = Standard_False); Standard_Boolean IsDone() const; @@ -101,7 +92,7 @@ public: Standard_EXPORT void TolFixTangents (Standard_Real& aTolCheck, Standard_Real& aTolAngCheck); //! converts RLine to Geom(2d)_Curve. - Standard_EXPORT static void TreatRLine (const Handle(IntPatch_RLine)& theRL, const Handle(GeomAdaptor_HSurface)& theHS1, const Handle(GeomAdaptor_HSurface)& theHS2, Handle(Geom_Curve)& theC3d, Handle(Geom2d_Curve)& theC2d1, Handle(Geom2d_Curve)& theC2d2, Standard_Real& theTolReached); + Standard_EXPORT static void TreatRLine (const Handle(IntPatch_RLine)& theRL, const Handle(GeomAdaptor_Surface)& theHS1, const Handle(GeomAdaptor_Surface)& theHS2, Handle(Geom_Curve)& theC3d, Handle(Geom2d_Curve)& theC2d1, Handle(Geom2d_Curve)& theC2d2, Standard_Real& theTolReached); //! creates 2D-curve on given surface from given 3D-curve Standard_EXPORT static void BuildPCurves (const Standard_Real f, const Standard_Real l, Standard_Real& Tol, const Handle(Geom_Surface)& S, const Handle(Geom_Curve)& C, Handle(Geom2d_Curve)& C2d); @@ -132,8 +123,8 @@ private: IntPatch_Intersection myIntersector; GeomInt_LineConstructor myLConstruct; - Handle(GeomAdaptor_HSurface) myHS1; - Handle(GeomAdaptor_HSurface) myHS2; + Handle(GeomAdaptor_Surface) myHS1; + Handle(GeomAdaptor_Surface) myHS2; Standard_Integer myNbrestr; TColGeom_SequenceOfCurve sline; TColGeom2d_SequenceOfCurve slineS1; diff --git a/src/GeomInt/GeomInt_IntSS.lxx b/src/GeomInt/GeomInt_IntSS.lxx index 6cd30cdd69..bb80020e69 100644 --- a/src/GeomInt/GeomInt_IntSS.lxx +++ b/src/GeomInt/GeomInt_IntSS.lxx @@ -53,8 +53,8 @@ inline GeomInt_IntSS::GeomInt_IntSS () //function : Perform //purpose : Intersection of Adapted surfaces //======================================================================= - inline void GeomInt_IntSS::Perform(const Handle(GeomAdaptor_HSurface)& HS1, - const Handle(GeomAdaptor_HSurface)& HS2, + inline void GeomInt_IntSS::Perform(const Handle(GeomAdaptor_Surface)& HS1, + const Handle(GeomAdaptor_Surface)& HS2, const Standard_Real Tol, const Standard_Boolean Approx, const Standard_Boolean ApproxS1, @@ -69,8 +69,8 @@ inline GeomInt_IntSS::GeomInt_IntSS () //function : Perform //purpose : Intersection of Adapted surfaces with a Starting Point //======================================================================= - inline void GeomInt_IntSS::Perform(const Handle(GeomAdaptor_HSurface)& HS1, - const Handle(GeomAdaptor_HSurface)& HS2, + inline void GeomInt_IntSS::Perform(const Handle(GeomAdaptor_Surface)& HS1, + const Handle(GeomAdaptor_Surface)& HS2, const Standard_Real Tol, const Standard_Real U1, const Standard_Real V1, const Standard_Real U2, const Standard_Real V2, diff --git a/src/GeomInt/GeomInt_IntSS_1.cxx b/src/GeomInt/GeomInt_IntSS_1.cxx index 12a1dbc2d1..c0637caee8 100644 --- a/src/GeomInt/GeomInt_IntSS_1.cxx +++ b/src/GeomInt/GeomInt_IntSS_1.cxx @@ -24,10 +24,11 @@ #include #include #include +#include #include #include #include -#include +#include #include #include #include @@ -95,15 +96,15 @@ //function : GetQuadric //purpose : //======================================================================= - static void GetQuadric(const Handle(GeomAdaptor_HSurface)& HS1, IntSurf_Quadric& quad1) + static void GetQuadric(const Handle(GeomAdaptor_Surface)& HS1, IntSurf_Quadric& quad1) { - switch (HS1->Surface().GetType()) + switch (HS1->GetType()) { - case GeomAbs_Plane: quad1.SetValue(HS1->Surface().Plane()); break; - case GeomAbs_Cylinder: quad1.SetValue(HS1->Surface().Cylinder()); break; - case GeomAbs_Cone: quad1.SetValue(HS1->Surface().Cone()); break; - case GeomAbs_Sphere: quad1.SetValue(HS1->Surface().Sphere()); break; - case GeomAbs_Torus: quad1.SetValue(HS1->Surface().Torus()); break; + case GeomAbs_Plane: quad1.SetValue(HS1->Plane()); break; + case GeomAbs_Cylinder: quad1.SetValue(HS1->Cylinder()); break; + case GeomAbs_Cone: quad1.SetValue(HS1->Cone()); break; + case GeomAbs_Sphere: quad1.SetValue(HS1->Sphere()); break; + case GeomAbs_Torus: quad1.SetValue(HS1->Torus()); break; default: throw Standard_ConstructionError("GeomInt_IntSS::MakeCurve"); } } @@ -112,8 +113,8 @@ //function : Parameters //purpose : //======================================================================= - static void Parameters( const Handle(GeomAdaptor_HSurface)& HS1, - const Handle(GeomAdaptor_HSurface)& HS2, + static void Parameters( const Handle(GeomAdaptor_Surface)& HS1, + const Handle(GeomAdaptor_Surface)& HS2, const gp_Pnt& Ptref, Standard_Real& U1, Standard_Real& V1, @@ -225,8 +226,8 @@ static void IntersectCurveAndBoundary(const Handle(Geom2d_Curve)& theC2d, //function : isDegenerated //purpose : Check if theAHC2d corresponds to a degenerated edge. //======================================================================= -static Standard_Boolean isDegenerated(const Handle(GeomAdaptor_HSurface)& theGAHS, - const Handle(Adaptor2d_HCurve2d)& theAHC2d, +static Standard_Boolean isDegenerated(const Handle(GeomAdaptor_Surface)& theGAHS, + const Handle(Adaptor2d_Curve2d)& theAHC2d, const Standard_Real theFirstPar, const Standard_Real theLastPar) { @@ -277,8 +278,8 @@ void GeomInt_IntSS::MakeCurve(const Standard_Integer Index, myApprox2=ApproxS2; myTolApprox=0.0000001; // - aS1=myHS1->ChangeSurface().Surface(); - aS2=myHS2->ChangeSurface().Surface(); + aS1=myHS1->Surface(); + aS2=myHS2->Surface(); // Handle(IntPatch_Line) L = myIntersector.Line(Index); typl = L->ArcType(); @@ -330,7 +331,7 @@ void GeomInt_IntSS::MakeCurve(const Standard_Integer Index, // if(myApprox1) { Handle (Geom2d_Curve) C2d; - BuildPCurves(fprm, lprm, Tolpc, myHS1->ChangeSurface().Surface(), newc, C2d); + BuildPCurves(fprm, lprm, Tolpc, myHS1->Surface(), newc, C2d); if(Tolpc>myTolReached2d || myTolReached2d==0.) { myTolReached2d=Tolpc; } @@ -342,7 +343,7 @@ void GeomInt_IntSS::MakeCurve(const Standard_Integer Index, // if(myApprox2) { Handle (Geom2d_Curve) C2d; - BuildPCurves(fprm,lprm,Tolpc,myHS2->ChangeSurface().Surface(),newc,C2d); + BuildPCurves(fprm,lprm,Tolpc,myHS2->Surface(),newc,C2d); if(Tolpc>myTolReached2d || myTolReached2d==0.) { myTolReached2d=Tolpc; } @@ -355,8 +356,8 @@ void GeomInt_IntSS::MakeCurve(const Standard_Integer Index, } // if (!Precision::IsNegativeInfinite(fprm) && !Precision::IsPositiveInfinite(lprm)) else { - GeomAbs_SurfaceType typS1 = myHS1->Surface().GetType(); - GeomAbs_SurfaceType typS2 = myHS2->Surface().GetType(); + GeomAbs_SurfaceType typS1 = myHS1->GetType(); + GeomAbs_SurfaceType typS2 = myHS2->GetType(); if( typS1 == GeomAbs_SurfaceOfExtrusion || typS1 == GeomAbs_OffsetSurface || typS1 == GeomAbs_SurfaceOfRevolution || @@ -438,7 +439,7 @@ void GeomInt_IntSS::MakeCurve(const Standard_Integer Index, //// if(myApprox1) { Handle (Geom2d_Curve) C2d; - BuildPCurves(fprm,lprm,Tolpc,myHS1->ChangeSurface().Surface(),newc,C2d); + BuildPCurves(fprm,lprm,Tolpc,myHS1->Surface(),newc,C2d); if(Tolpc>myTolReached2d || myTolReached2d==0.) { myTolReached2d=Tolpc; } @@ -450,7 +451,7 @@ void GeomInt_IntSS::MakeCurve(const Standard_Integer Index, // if(myApprox2) { Handle (Geom2d_Curve) C2d; - BuildPCurves(fprm,lprm,Tolpc,myHS2->ChangeSurface().Surface(),newc,C2d); + BuildPCurves(fprm,lprm,Tolpc,myHS2->Surface(),newc,C2d); if(Tolpc>myTolReached2d || myTolReached2d==0) { myTolReached2d=Tolpc; } @@ -474,7 +475,7 @@ void GeomInt_IntSS::MakeCurve(const Standard_Integer Index, if(myApprox1) { Handle (Geom2d_Curve) C2d; - BuildPCurves(fprm,lprm,Tolpc,myHS1->ChangeSurface().Surface(),newc,C2d); + BuildPCurves(fprm,lprm,Tolpc,myHS1->Surface(),newc,C2d); if(Tolpc>myTolReached2d || myTolReached2d==0) { myTolReached2d=Tolpc; } @@ -486,7 +487,7 @@ void GeomInt_IntSS::MakeCurve(const Standard_Integer Index, if(myApprox2) { Handle (Geom2d_Curve) C2d; - BuildPCurves(fprm,lprm,Tolpc,myHS2->ChangeSurface().Surface(),newc,C2d); + BuildPCurves(fprm,lprm,Tolpc,myHS2->Surface(),newc,C2d); if(Tolpc>myTolReached2d || myTolReached2d==0) { myTolReached2d=Tolpc; } @@ -517,7 +518,7 @@ void GeomInt_IntSS::MakeCurve(const Standard_Integer Index, //============================================== if(myApprox1) { Handle (Geom2d_Curve) C2d; - BuildPCurves(fprm, lprm, Tolpc, myHS1->ChangeSurface().Surface(), newc, C2d); + BuildPCurves(fprm, lprm, Tolpc, myHS1->Surface(), newc, C2d); if(Tolpc>myTolReached2d || myTolReached2d==0) { myTolReached2d=Tolpc; } @@ -529,7 +530,7 @@ void GeomInt_IntSS::MakeCurve(const Standard_Integer Index, if(myApprox2) { Handle (Geom2d_Curve) C2d; - BuildPCurves(fprm, lprm, Tolpc,myHS2->ChangeSurface().Surface(), newc, C2d); + BuildPCurves(fprm, lprm, Tolpc,myHS2->Surface(), newc, C2d); if(Tolpc>myTolReached2d || myTolReached2d==0) { myTolReached2d=Tolpc; } @@ -626,8 +627,8 @@ void GeomInt_IntSS::MakeCurve(const Standard_Integer Index, //-- Si une des surfaces est un plan , on approxime en 2d //-- sur cette surface et on remonte les points 2d en 3d. GeomAbs_SurfaceType typs1, typs2; - typs1 = myHS1->Surface().GetType(); - typs2 = myHS2->Surface().GetType(); + typs1 = myHS1->GetType(); + typs2 = myHS2->GetType(); // if(typs1 == GeomAbs_Plane) { theapp3d.Perform(myHS1, myHS2, WL, Standard_False, @@ -701,7 +702,7 @@ void GeomInt_IntSS::MakeCurve(const Standard_Integer Index, TColgp_Array1OfPnt tpoles(1,nbpoles); mbspc.Curve(1,tpoles2d); - const gp_Pln& Pln = myHS1->Surface().Plane(); + const gp_Pln& Pln = myHS1->Plane(); // Standard_Integer ik; for(ik = 1; ik<= nbpoles; ik++) { @@ -764,7 +765,7 @@ void GeomInt_IntSS::MakeCurve(const Standard_Integer Index, TColgp_Array1OfPnt2d tpoles2d(1,nbpoles); TColgp_Array1OfPnt tpoles(1,nbpoles); mbspc.Curve((myApprox1==Standard_True)? 2 : 1,tpoles2d); - const gp_Pln& Pln = myHS2->Surface().Plane(); + const gp_Pln& Pln = myHS2->Plane(); // Standard_Integer ik; for(ik = 1; ik<= nbpoles; ik++) { @@ -984,15 +985,15 @@ void GeomInt_IntSS::MakeCurve(const Standard_Integer Index, //purpose : Approx of Restriction line //======================================================================= void GeomInt_IntSS::TreatRLine(const Handle(IntPatch_RLine)& theRL, - const Handle(GeomAdaptor_HSurface)& theHS1, - const Handle(GeomAdaptor_HSurface)& theHS2, + const Handle(GeomAdaptor_Surface)& theHS1, + const Handle(GeomAdaptor_Surface)& theHS2, Handle(Geom_Curve)& theC3d, Handle(Geom2d_Curve)& theC2d1, Handle(Geom2d_Curve)& theC2d2, Standard_Real& theTolReached) { - Handle(GeomAdaptor_HSurface) aGAHS; - Handle(Adaptor2d_HCurve2d) anAHC2d; + Handle(GeomAdaptor_Surface) aGAHS; + Handle(Adaptor2d_Curve2d) anAHC2d; Standard_Real tf, tl; gp_Lin2d aL; // It is assumed that 2d curve is 2d line (rectangular surface domain) @@ -1001,7 +1002,7 @@ void GeomInt_IntSS::TreatRLine(const Handle(IntPatch_RLine)& theRL, aGAHS = theHS1; anAHC2d = theRL->ArcOnS1(); theRL->ParamOnS1(tf, tl); - theC2d1 = Geom2dAdaptor::MakeCurve(anAHC2d->Curve2d()); + theC2d1 = Geom2dAdaptor::MakeCurve (*anAHC2d); tf = Max(tf, theC2d1->FirstParameter()); tl = Min(tl, theC2d1->LastParameter()); theC2d1 = new Geom2d_TrimmedCurve(theC2d1, tf, tl); @@ -1011,7 +1012,7 @@ void GeomInt_IntSS::TreatRLine(const Handle(IntPatch_RLine)& theRL, aGAHS = theHS2; anAHC2d = theRL->ArcOnS2(); theRL->ParamOnS2(tf, tl); - theC2d2 = Geom2dAdaptor::MakeCurve(anAHC2d->Curve2d()); + theC2d2 = Geom2dAdaptor::MakeCurve (*anAHC2d); tf = Max(tf, theC2d2->FirstParameter()); tl = Min(tl, theC2d2->LastParameter()); theC2d2 = new Geom2d_TrimmedCurve(theC2d2, tf, tl); @@ -1041,13 +1042,13 @@ void GeomInt_IntSS::TreatRLine(const Handle(IntPatch_RLine)& theRL, Standard_Real aTol = Precision::Confusion(); if(theRL->IsArcOnS1()) { - Handle(Geom_Surface) aS = GeomAdaptor::MakeSurface(theHS2->Surface()); + Handle(Geom_Surface) aS = GeomAdaptor::MakeSurface (*theHS2); BuildPCurves (tf, tl, aTol, aS, theC3d, theC2d2); } if(theRL->IsArcOnS2()) { - Handle(Geom_Surface) aS = GeomAdaptor::MakeSurface(theHS1->Surface()); + Handle(Geom_Surface) aS = GeomAdaptor::MakeSurface (*theHS1); BuildPCurves (tf, tl, aTol, aS, theC3d, theC2d1); } diff --git a/src/GeomInt/GeomInt_LineConstructor.cxx b/src/GeomInt/GeomInt_LineConstructor.cxx index 6419effe4c..036bd653a0 100644 --- a/src/GeomInt/GeomInt_LineConstructor.cxx +++ b/src/GeomInt/GeomInt_LineConstructor.cxx @@ -16,11 +16,11 @@ #include -#include +#include #include #include #include -#include +#include #include #include #include @@ -87,13 +87,13 @@ private: }; //------------ -static void Parameters(const Handle(GeomAdaptor_HSurface)& myHS1, +static void Parameters(const Handle(GeomAdaptor_Surface)& myHS1, const gp_Pnt& Ptref, Standard_Real& U1, Standard_Real& V1); -static void Parameters(const Handle(GeomAdaptor_HSurface)& myHS1, - const Handle(GeomAdaptor_HSurface)& myHS2, +static void Parameters(const Handle(GeomAdaptor_Surface)& myHS1, + const Handle(GeomAdaptor_Surface)& myHS2, const gp_Pnt& Ptref, Standard_Real& U1, Standard_Real& V1, @@ -105,8 +105,8 @@ static void GLinePoint(const IntPatch_IType typl, const Standard_Real aT, gp_Pnt& aP); -static void AdjustPeriodic(const Handle(GeomAdaptor_HSurface)& myHS1, - const Handle(GeomAdaptor_HSurface)& myHS2, +static void AdjustPeriodic(const Handle(GeomAdaptor_Surface)& myHS1, + const Handle(GeomAdaptor_Surface)& myHS2, Standard_Real& u1, Standard_Real& v1, Standard_Real& u2, @@ -273,8 +273,8 @@ void GeomInt_LineConstructor::Perform(const Handle(IntPatch_Line)& L) if (aNbParts > 1) { Standard_Boolean bCond; GeomAbs_SurfaceType aST1, aST2; - aST1 = myHS1->Surface().GetType(); - aST2 = myHS2->Surface().GetType(); + aST1 = myHS1->GetType(); + aST2 = myHS2->GetType(); // bCond=Standard_False; if (aST1==GeomAbs_Plane) { @@ -659,8 +659,8 @@ void GeomInt_LineConstructor::TreatCircle(const Handle(IntPatch_Line)& theLine, //function : AdjustPeriodic //purpose : //======================================================================= -void AdjustPeriodic(const Handle(GeomAdaptor_HSurface)& myHS1, - const Handle(GeomAdaptor_HSurface)& myHS2, +void AdjustPeriodic(const Handle(GeomAdaptor_Surface)& myHS1, + const Handle(GeomAdaptor_Surface)& myHS2, Standard_Real& u1, Standard_Real& v1, Standard_Real& u2, @@ -750,8 +750,8 @@ void AdjustPeriodic(const Handle(GeomAdaptor_HSurface)& myHS1, //function : Parameters //purpose : //======================================================================= -void Parameters(const Handle(GeomAdaptor_HSurface)& myHS1, - const Handle(GeomAdaptor_HSurface)& myHS2, +void Parameters(const Handle(GeomAdaptor_Surface)& myHS1, + const Handle(GeomAdaptor_Surface)& myHS2, const gp_Pnt& Ptref, Standard_Real& U1, Standard_Real& V1, @@ -766,29 +766,29 @@ void Parameters(const Handle(GeomAdaptor_HSurface)& myHS1, //function : Parameter //purpose : //======================================================================= -void Parameters(const Handle(GeomAdaptor_HSurface)& myHS1, +void Parameters(const Handle(GeomAdaptor_Surface)& myHS1, const gp_Pnt& Ptref, Standard_Real& U1, Standard_Real& V1) { IntSurf_Quadric quad1; // - switch (myHS1->Surface().GetType()) + switch (myHS1->GetType()) { case GeomAbs_Plane: - quad1.SetValue(myHS1->Surface().Plane()); + quad1.SetValue(myHS1->Plane()); break; case GeomAbs_Cylinder: - quad1.SetValue(myHS1->Surface().Cylinder()); + quad1.SetValue(myHS1->Cylinder()); break; case GeomAbs_Cone: - quad1.SetValue(myHS1->Surface().Cone()); + quad1.SetValue(myHS1->Cone()); break; case GeomAbs_Sphere: - quad1.SetValue(myHS1->Surface().Sphere()); + quad1.SetValue(myHS1->Sphere()); break; case GeomAbs_Torus: - quad1.SetValue(myHS1->Surface().Torus()); + quad1.SetValue(myHS1->Torus()); break; default: throw Standard_ConstructionError("GeomInt_LineConstructor::Parameters"); diff --git a/src/GeomInt/GeomInt_LineConstructor.hxx b/src/GeomInt/GeomInt_LineConstructor.hxx index 52355954f6..1a3471640f 100644 --- a/src/GeomInt/GeomInt_LineConstructor.hxx +++ b/src/GeomInt/GeomInt_LineConstructor.hxx @@ -17,20 +17,11 @@ #ifndef _GeomInt_LineConstructor_HeaderFile #define _GeomInt_LineConstructor_HeaderFile -#include -#include -#include - -#include +#include #include -#include -#include -class Adaptor3d_TopolTool; -class GeomAdaptor_HSurface; -class StdFail_NotDone; -class Standard_OutOfRange; -class IntPatch_Line; +class Adaptor3d_TopolTool; +class IntPatch_Line; //! Splits given Line. class GeomInt_LineConstructor @@ -47,7 +38,7 @@ public: //! Initializes me by two surfaces and corresponding //! tools which represent boundaries of surfaces - void Load (const Handle(Adaptor3d_TopolTool)& D1, const Handle(Adaptor3d_TopolTool)& D2, const Handle(GeomAdaptor_HSurface)& S1, const Handle(GeomAdaptor_HSurface)& S2); + void Load (const Handle(Adaptor3d_TopolTool)& D1, const Handle(Adaptor3d_TopolTool)& D2, const Handle(GeomAdaptor_Surface)& S1, const Handle(GeomAdaptor_Surface)& S2); //! Splits line @@ -85,8 +76,8 @@ private: TColStd_SequenceOfReal seqp; Handle(Adaptor3d_TopolTool) myDom1; Handle(Adaptor3d_TopolTool) myDom2; - Handle(GeomAdaptor_HSurface) myHS1; - Handle(GeomAdaptor_HSurface) myHS2; + Handle(GeomAdaptor_Surface) myHS1; + Handle(GeomAdaptor_Surface) myHS2; }; diff --git a/src/GeomInt/GeomInt_LineConstructor.lxx b/src/GeomInt/GeomInt_LineConstructor.lxx index 1eb3fe5cb9..8ded6e64af 100644 --- a/src/GeomInt/GeomInt_LineConstructor.lxx +++ b/src/GeomInt/GeomInt_LineConstructor.lxx @@ -34,8 +34,8 @@ inline GeomInt_LineConstructor::GeomInt_LineConstructor () inline void GeomInt_LineConstructor::Load (const Handle(Adaptor3d_TopolTool)& D1, const Handle(Adaptor3d_TopolTool)& D2, - const Handle(GeomAdaptor_HSurface)& S1, - const Handle(GeomAdaptor_HSurface)& S2) + const Handle(GeomAdaptor_Surface)& S1, + const Handle(GeomAdaptor_Surface)& S2) { myDom1 = D1; myDom2 = D2; diff --git a/src/GeomInt/GeomInt_LineTool.cxx b/src/GeomInt/GeomInt_LineTool.cxx index 63a26f1316..de5b9a8147 100644 --- a/src/GeomInt/GeomInt_LineTool.cxx +++ b/src/GeomInt/GeomInt_LineTool.cxx @@ -14,11 +14,9 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#include #include #include -#include #include #include #include @@ -31,6 +29,8 @@ #include #include +#include + namespace { class ProjectPointOnSurf @@ -409,8 +409,8 @@ Standard_Real GeomInt_LineTool::LastParameter (const Handle(IntPatch_Line)& L) //======================================================================= Standard_Boolean GeomInt_LineTool:: DecompositionOfWLine( const Handle(IntPatch_WLine)& theWLine, - const Handle(GeomAdaptor_HSurface)& theSurface1, - const Handle(GeomAdaptor_HSurface)& theSurface2, + const Handle(GeomAdaptor_Surface)& theSurface1, + const Handle(GeomAdaptor_Surface)& theSurface2, const Standard_Real aTolSum, const GeomInt_LineConstructor& theLConstructor, IntPatch_SequenceOfLine& theNewLines) @@ -455,11 +455,11 @@ Standard_Boolean GeomInt_LineTool:: nblines = 0; aTol = Precision::Confusion(); // - aSurf1 = theSurface1->ChangeSurface().Surface(); + aSurf1 = theSurface1->Surface(); aSurf1->Bounds(umin, umax, vmin, vmax); aPrj1.Init(aSurf1, umin, umax, vmin, vmax); // - aSurf2 = theSurface2->ChangeSurface().Surface(); + aSurf2 = theSurface2->Surface(); aSurf2->Bounds(umin, umax, vmin, vmax); aPrj2.Init(aSurf2, umin, umax, vmin, vmax); // @@ -472,8 +472,8 @@ Standard_Boolean GeomInt_LineTool:: // whether aPoint is on boundary or not // for(i=0; i<2; i++) {// exploration Surface 1,2 - Handle(GeomAdaptor_HSurface) aGASurface = (!i) ? theSurface1 : theSurface2; - aGASurface->ChangeSurface().Surface()->Bounds(umin, umax, vmin, vmax); + Handle(GeomAdaptor_Surface) aGASurface = (!i) ? theSurface1 : theSurface2; + aGASurface->Surface()->Bounds(umin, umax, vmin, vmax); // for(j=0; j<2; j++) {// exploration of coordinate U,V Standard_Boolean isperiodic; @@ -585,7 +585,7 @@ Standard_Boolean GeomInt_LineTool:: // for(surfit = 0; surfit < 2; ++surfit) { - Handle(GeomAdaptor_HSurface) aGASurface = (!surfit) ? theSurface1 : theSurface2; + Handle(GeomAdaptor_Surface) aGASurface = (!surfit) ? theSurface1 : theSurface2; umin = aGASurface->FirstUParameter(); umax = aGASurface->LastUParameter(); @@ -778,7 +778,7 @@ Standard_Boolean GeomInt_LineTool:: Standard_Real aCriteria =aTolSum;// BRep_Tool::Tolerance(theFace1) + BRep_Tool::Tolerance(theFace2); //GeomAPI_ProjectPointOnSurf& aProjector = (surfit == 0) ? aPrj2 : aPrj1; ProjectPointOnSurf& aProjector = (surfit == 0) ? aPrj2 : aPrj1; - Handle(GeomAdaptor_HSurface) aSurface = (surfit == 0) ? theSurface1 : theSurface2; + Handle(GeomAdaptor_Surface) aSurface = (surfit == 0) ? theSurface1 : theSurface2; gp_Pnt aP3d = aSurface->Value(anewpoint.X(), anewpoint.Y()); aProjector.Perform(aP3d); diff --git a/src/GeomInt/GeomInt_LineTool.hxx b/src/GeomInt/GeomInt_LineTool.hxx index e99eb472fb..dafe7af4de 100644 --- a/src/GeomInt/GeomInt_LineTool.hxx +++ b/src/GeomInt/GeomInt_LineTool.hxx @@ -17,19 +17,12 @@ #ifndef _GeomInt_LineTool_HeaderFile #define _GeomInt_LineTool_HeaderFile -#include -#include -#include - -#include -#include +#include #include #include -class IntPatch_Line; + class IntPatch_Point; class IntPatch_WLine; -class GeomAdaptor_HSurface; - class GeomInt_LineTool { @@ -48,8 +41,8 @@ public: Standard_EXPORT static Standard_Boolean DecompositionOfWLine( const Handle(IntPatch_WLine)& theWLine, - const Handle(GeomAdaptor_HSurface)& theSurface1, - const Handle(GeomAdaptor_HSurface)& theSurface2, + const Handle(GeomAdaptor_Surface)& theSurface1, + const Handle(GeomAdaptor_Surface)& theSurface2, const Standard_Real aTolSum, const GeomInt_LineConstructor& theLConstructor, IntPatch_SequenceOfLine& theNewLines); diff --git a/src/GeomInt/GeomInt_TheFunctionOfTheInt2SOfThePrmPrmSvSurfacesOfWLApprox.hxx b/src/GeomInt/GeomInt_TheFunctionOfTheInt2SOfThePrmPrmSvSurfacesOfWLApprox.hxx index 48afa7844e..aaae630909 100644 --- a/src/GeomInt/GeomInt_TheFunctionOfTheInt2SOfThePrmPrmSvSurfacesOfWLApprox.hxx +++ b/src/GeomInt/GeomInt_TheFunctionOfTheInt2SOfThePrmPrmSvSurfacesOfWLApprox.hxx @@ -17,37 +17,26 @@ #ifndef _GeomInt_TheFunctionOfTheInt2SOfThePrmPrmSvSurfacesOfWLApprox_HeaderFile #define _GeomInt_TheFunctionOfTheInt2SOfThePrmPrmSvSurfacesOfWLApprox_HeaderFile -#include -#include -#include - -#include +#include #include -#include -#include #include #include #include -#include #include #include #include #include -class StdFail_UndefinedDerivative; -class Standard_ConstructionError; -class Adaptor3d_HSurface; + class Adaptor3d_HSurfaceTool; class math_Matrix; - - class GeomInt_TheFunctionOfTheInt2SOfThePrmPrmSvSurfacesOfWLApprox : public math_FunctionSetWithDerivatives { public: DEFINE_STANDARD_ALLOC - Standard_EXPORT GeomInt_TheFunctionOfTheInt2SOfThePrmPrmSvSurfacesOfWLApprox(const Handle(Adaptor3d_HSurface)& S1, const Handle(Adaptor3d_HSurface)& S2); + Standard_EXPORT GeomInt_TheFunctionOfTheInt2SOfThePrmPrmSvSurfacesOfWLApprox(const Handle(Adaptor3d_Surface)& S1, const Handle(Adaptor3d_Surface)& S2); Standard_EXPORT Standard_Integer NbVariables() const; @@ -74,9 +63,9 @@ public: gp_Dir2d DirectionOnS2() const; - const Handle(Adaptor3d_HSurface)& AuxillarSurface1() const; + const Handle(Adaptor3d_Surface)& AuxillarSurface1() const; - const Handle(Adaptor3d_HSurface)& AuxillarSurface2() const; + const Handle(Adaptor3d_Surface)& AuxillarSurface2() const; @@ -118,8 +107,8 @@ private: }; -#define ThePSurface Handle(Adaptor3d_HSurface) -#define ThePSurface_hxx +#define ThePSurface Handle(Adaptor3d_Surface) +#define ThePSurface_hxx #define ThePSurfaceTool Adaptor3d_HSurfaceTool #define ThePSurfaceTool_hxx #define IntImp_ZerParFunc GeomInt_TheFunctionOfTheInt2SOfThePrmPrmSvSurfacesOfWLApprox diff --git a/src/GeomInt/GeomInt_TheFunctionOfTheInt2SOfThePrmPrmSvSurfacesOfWLApprox_0.cxx b/src/GeomInt/GeomInt_TheFunctionOfTheInt2SOfThePrmPrmSvSurfacesOfWLApprox_0.cxx index 1cef2346b1..aa30d6858e 100644 --- a/src/GeomInt/GeomInt_TheFunctionOfTheInt2SOfThePrmPrmSvSurfacesOfWLApprox_0.cxx +++ b/src/GeomInt/GeomInt_TheFunctionOfTheInt2SOfThePrmPrmSvSurfacesOfWLApprox_0.cxx @@ -18,13 +18,13 @@ #include #include -#include +#include #include #include -#define ThePSurface Handle(Adaptor3d_HSurface) -#define ThePSurface_hxx +#define ThePSurface Handle(Adaptor3d_Surface) +#define ThePSurface_hxx #define ThePSurfaceTool Adaptor3d_HSurfaceTool #define ThePSurfaceTool_hxx #define IntImp_ZerParFunc GeomInt_TheFunctionOfTheInt2SOfThePrmPrmSvSurfacesOfWLApprox diff --git a/src/GeomInt/GeomInt_TheImpPrmSvSurfacesOfWLApprox.hxx b/src/GeomInt/GeomInt_TheImpPrmSvSurfacesOfWLApprox.hxx index 3d9bdffddd..3ebdca58fa 100644 --- a/src/GeomInt/GeomInt_TheImpPrmSvSurfacesOfWLApprox.hxx +++ b/src/GeomInt/GeomInt_TheImpPrmSvSurfacesOfWLApprox.hxx @@ -17,29 +17,19 @@ #ifndef _GeomInt_TheImpPrmSvSurfacesOfWLApprox_HeaderFile #define _GeomInt_TheImpPrmSvSurfacesOfWLApprox_HeaderFile -#include -#include -#include - +#include #include #include #include #include -#include #include #include -#include -class Adaptor3d_HSurface; + class Adaptor3d_HSurfaceTool; class IntSurf_Quadric; class IntSurf_QuadricTool; class IntPatch_WLine; class GeomInt_TheZerImpFuncOfTheImpPrmSvSurfacesOfWLApprox; -class gp_Pnt; -class gp_Vec; -class gp_Vec2d; - - class GeomInt_TheImpPrmSvSurfacesOfWLApprox : public ApproxInt_SvSurfaces { @@ -48,9 +38,9 @@ public: DEFINE_STANDARD_ALLOC - Standard_EXPORT GeomInt_TheImpPrmSvSurfacesOfWLApprox(const Handle(Adaptor3d_HSurface)& Surf1, const IntSurf_Quadric& Surf2); + Standard_EXPORT GeomInt_TheImpPrmSvSurfacesOfWLApprox(const Handle(Adaptor3d_Surface)& Surf1, const IntSurf_Quadric& Surf2); - Standard_EXPORT GeomInt_TheImpPrmSvSurfacesOfWLApprox(const IntSurf_Quadric& Surf1, const Handle(Adaptor3d_HSurface)& Surf2); + Standard_EXPORT GeomInt_TheImpPrmSvSurfacesOfWLApprox(const IntSurf_Quadric& Surf1, const Handle(Adaptor3d_Surface)& Surf2); //! returns True if Tg,Tguv1 Tguv2 can be computed. Standard_EXPORT Standard_Boolean Compute (Standard_Real& u1, Standard_Real& v1, Standard_Real& u2, Standard_Real& v2, diff --git a/src/GeomInt/GeomInt_TheImpPrmSvSurfacesOfWLApprox_0.cxx b/src/GeomInt/GeomInt_TheImpPrmSvSurfacesOfWLApprox_0.cxx index 1a93d83684..fcba5eb933 100644 --- a/src/GeomInt/GeomInt_TheImpPrmSvSurfacesOfWLApprox_0.cxx +++ b/src/GeomInt/GeomInt_TheImpPrmSvSurfacesOfWLApprox_0.cxx @@ -16,7 +16,7 @@ #include -#include +#include #include #include #include @@ -27,8 +27,8 @@ #include -#define ThePSurface Handle(Adaptor3d_HSurface) -#define ThePSurface_hxx +#define ThePSurface Handle(Adaptor3d_Surface) +#define ThePSurface_hxx #define ThePSurfaceTool Adaptor3d_HSurfaceTool #define ThePSurfaceTool_hxx #define TheISurface IntSurf_Quadric diff --git a/src/GeomInt/GeomInt_TheInt2SOfThePrmPrmSvSurfacesOfWLApprox.hxx b/src/GeomInt/GeomInt_TheInt2SOfThePrmPrmSvSurfacesOfWLApprox.hxx index d1323e8702..d666fb7e29 100644 --- a/src/GeomInt/GeomInt_TheInt2SOfThePrmPrmSvSurfacesOfWLApprox.hxx +++ b/src/GeomInt/GeomInt_TheInt2SOfThePrmPrmSvSurfacesOfWLApprox.hxx @@ -17,31 +17,18 @@ #ifndef _GeomInt_TheInt2SOfThePrmPrmSvSurfacesOfWLApprox_HeaderFile #define _GeomInt_TheInt2SOfThePrmPrmSvSurfacesOfWLApprox_HeaderFile -#include -#include -#include - -#include +#include #include #include #include #include -#include #include #include -class StdFail_NotDone; -class Standard_DomainError; -class Standard_ConstructionError; -class StdFail_UndefinedDerivative; -class Adaptor3d_HSurface; + class Adaptor3d_HSurfaceTool; class GeomInt_TheFunctionOfTheInt2SOfThePrmPrmSvSurfacesOfWLApprox; class math_FunctionSetRoot; class IntSurf_PntOn2S; -class gp_Dir; -class gp_Dir2d; - - class GeomInt_TheInt2SOfThePrmPrmSvSurfacesOfWLApprox { @@ -50,7 +37,7 @@ public: DEFINE_STANDARD_ALLOC //! compute the solution point with the close point - Standard_EXPORT GeomInt_TheInt2SOfThePrmPrmSvSurfacesOfWLApprox(const TColStd_Array1OfReal& Param, const Handle(Adaptor3d_HSurface)& S1, const Handle(Adaptor3d_HSurface)& S2, const Standard_Real TolTangency); + Standard_EXPORT GeomInt_TheInt2SOfThePrmPrmSvSurfacesOfWLApprox(const TColStd_Array1OfReal& Param, const Handle(Adaptor3d_Surface)& S1, const Handle(Adaptor3d_Surface)& S2, const Standard_Real TolTangency); //! initialize the parameters to compute the solution point //! it 's possible to write to optimize: @@ -62,7 +49,7 @@ public: //! param(3)=... //! inter.Perform(Param,rsnld); //! } - Standard_EXPORT GeomInt_TheInt2SOfThePrmPrmSvSurfacesOfWLApprox(const Handle(Adaptor3d_HSurface)& S1, const Handle(Adaptor3d_HSurface)& S2, const Standard_Real TolTangency); + Standard_EXPORT GeomInt_TheInt2SOfThePrmPrmSvSurfacesOfWLApprox(const Handle(Adaptor3d_Surface)& S1, const Handle(Adaptor3d_Surface)& S2, const Standard_Real TolTangency); //! returns the best constant isoparametric to find //! the next intersection's point +stores the solution @@ -148,8 +135,8 @@ private: }; -#define ThePSurface Handle(Adaptor3d_HSurface) -#define ThePSurface_hxx +#define ThePSurface Handle(Adaptor3d_Surface) +#define ThePSurface_hxx #define ThePSurfaceTool Adaptor3d_HSurfaceTool #define ThePSurfaceTool_hxx #define IntImp_TheFunction GeomInt_TheFunctionOfTheInt2SOfThePrmPrmSvSurfacesOfWLApprox diff --git a/src/GeomInt/GeomInt_TheInt2SOfThePrmPrmSvSurfacesOfWLApprox_0.cxx b/src/GeomInt/GeomInt_TheInt2SOfThePrmPrmSvSurfacesOfWLApprox_0.cxx index 2b64f7437c..d3fae817ea 100644 --- a/src/GeomInt/GeomInt_TheInt2SOfThePrmPrmSvSurfacesOfWLApprox_0.cxx +++ b/src/GeomInt/GeomInt_TheInt2SOfThePrmPrmSvSurfacesOfWLApprox_0.cxx @@ -20,7 +20,7 @@ #include #include #include -#include +#include #include #include #include @@ -29,8 +29,8 @@ #include -#define ThePSurface Handle(Adaptor3d_HSurface) -#define ThePSurface_hxx +#define ThePSurface Handle(Adaptor3d_Surface) +#define ThePSurface_hxx #define ThePSurfaceTool Adaptor3d_HSurfaceTool #define ThePSurfaceTool_hxx #define IntImp_TheFunction GeomInt_TheFunctionOfTheInt2SOfThePrmPrmSvSurfacesOfWLApprox diff --git a/src/GeomInt/GeomInt_ThePrmPrmSvSurfacesOfWLApprox.hxx b/src/GeomInt/GeomInt_ThePrmPrmSvSurfacesOfWLApprox.hxx index 5c292fe41b..940c7bae4f 100644 --- a/src/GeomInt/GeomInt_ThePrmPrmSvSurfacesOfWLApprox.hxx +++ b/src/GeomInt/GeomInt_ThePrmPrmSvSurfacesOfWLApprox.hxx @@ -17,28 +17,18 @@ #ifndef _GeomInt_ThePrmPrmSvSurfacesOfWLApprox_HeaderFile #define _GeomInt_ThePrmPrmSvSurfacesOfWLApprox_HeaderFile -#include -#include -#include - +#include #include #include #include #include -#include #include #include -#include -class Adaptor3d_HSurface; + class Adaptor3d_HSurfaceTool; class IntPatch_WLine; class GeomInt_TheInt2SOfThePrmPrmSvSurfacesOfWLApprox; class GeomInt_TheFunctionOfTheInt2SOfThePrmPrmSvSurfacesOfWLApprox; -class gp_Pnt; -class gp_Vec; -class gp_Vec2d; - - class GeomInt_ThePrmPrmSvSurfacesOfWLApprox : public ApproxInt_SvSurfaces { @@ -47,7 +37,7 @@ public: DEFINE_STANDARD_ALLOC - Standard_EXPORT GeomInt_ThePrmPrmSvSurfacesOfWLApprox(const Handle(Adaptor3d_HSurface)& Surf1, const Handle(Adaptor3d_HSurface)& Surf2); + Standard_EXPORT GeomInt_ThePrmPrmSvSurfacesOfWLApprox(const Handle(Adaptor3d_Surface)& Surf1, const Handle(Adaptor3d_Surface)& Surf2); //! returns True if Tg,Tguv1 Tguv2 can be computed. Standard_EXPORT Standard_Boolean Compute (Standard_Real& u1, Standard_Real& v1, Standard_Real& u2, Standard_Real& v2, diff --git a/src/GeomInt/GeomInt_ThePrmPrmSvSurfacesOfWLApprox_0.cxx b/src/GeomInt/GeomInt_ThePrmPrmSvSurfacesOfWLApprox_0.cxx index bf36effce5..b7b7e0c9c9 100644 --- a/src/GeomInt/GeomInt_ThePrmPrmSvSurfacesOfWLApprox_0.cxx +++ b/src/GeomInt/GeomInt_ThePrmPrmSvSurfacesOfWLApprox_0.cxx @@ -16,7 +16,7 @@ #include -#include +#include #include #include #include @@ -26,8 +26,8 @@ #include -#define ThePSurface Handle(Adaptor3d_HSurface) -#define ThePSurface_hxx +#define ThePSurface Handle(Adaptor3d_Surface) +#define ThePSurface_hxx #define ThePSurfaceTool Adaptor3d_HSurfaceTool #define ThePSurfaceTool_hxx #define Handle_TheLine Handle(IntPatch_WLine) diff --git a/src/GeomInt/GeomInt_TheZerImpFuncOfTheImpPrmSvSurfacesOfWLApprox.hxx b/src/GeomInt/GeomInt_TheZerImpFuncOfTheImpPrmSvSurfacesOfWLApprox.hxx index de973e31a5..2ccdb87244 100644 --- a/src/GeomInt/GeomInt_TheZerImpFuncOfTheImpPrmSvSurfacesOfWLApprox.hxx +++ b/src/GeomInt/GeomInt_TheZerImpFuncOfTheImpPrmSvSurfacesOfWLApprox.hxx @@ -17,30 +17,17 @@ #ifndef _GeomInt_TheZerImpFuncOfTheImpPrmSvSurfacesOfWLApprox_HeaderFile #define _GeomInt_TheZerImpFuncOfTheImpPrmSvSurfacesOfWLApprox_HeaderFile -#include -#include -#include - -#include -#include +#include #include -#include #include #include #include -#include #include -class StdFail_UndefinedDerivative; -class Adaptor3d_HSurface; + class Adaptor3d_HSurfaceTool; class IntSurf_Quadric; class IntSurf_QuadricTool; class math_Matrix; -class gp_Pnt; -class gp_Vec; -class gp_Dir2d; - - class GeomInt_TheZerImpFuncOfTheImpPrmSvSurfacesOfWLApprox : public math_FunctionSetWithDerivatives { @@ -51,11 +38,11 @@ public: Standard_EXPORT GeomInt_TheZerImpFuncOfTheImpPrmSvSurfacesOfWLApprox(); - Standard_EXPORT GeomInt_TheZerImpFuncOfTheImpPrmSvSurfacesOfWLApprox(const Handle(Adaptor3d_HSurface)& PS, const IntSurf_Quadric& IS); + Standard_EXPORT GeomInt_TheZerImpFuncOfTheImpPrmSvSurfacesOfWLApprox(const Handle(Adaptor3d_Surface)& PS, const IntSurf_Quadric& IS); Standard_EXPORT GeomInt_TheZerImpFuncOfTheImpPrmSvSurfacesOfWLApprox(const IntSurf_Quadric& IS); - void Set (const Handle(Adaptor3d_HSurface)& PS); + void Set (const Handle(Adaptor3d_Surface)& PS); void SetImplicitSurface (const IntSurf_Quadric& IS); @@ -85,7 +72,7 @@ public: const gp_Dir2d& Direction2d(); - const Handle(Adaptor3d_HSurface)& PSurface() const; + const Handle(Adaptor3d_Surface)& PSurface() const; const IntSurf_Quadric& ISurface() const; @@ -123,8 +110,8 @@ private: }; -#define ThePSurface Handle(Adaptor3d_HSurface) -#define ThePSurface_hxx +#define ThePSurface Handle(Adaptor3d_Surface) +#define ThePSurface_hxx #define ThePSurfaceTool Adaptor3d_HSurfaceTool #define ThePSurfaceTool_hxx #define TheISurface IntSurf_Quadric diff --git a/src/GeomInt/GeomInt_TheZerImpFuncOfTheImpPrmSvSurfacesOfWLApprox_0.cxx b/src/GeomInt/GeomInt_TheZerImpFuncOfTheImpPrmSvSurfacesOfWLApprox_0.cxx index f87256f752..7ff1e80f23 100644 --- a/src/GeomInt/GeomInt_TheZerImpFuncOfTheImpPrmSvSurfacesOfWLApprox_0.cxx +++ b/src/GeomInt/GeomInt_TheZerImpFuncOfTheImpPrmSvSurfacesOfWLApprox_0.cxx @@ -17,7 +17,7 @@ #include #include -#include +#include #include #include #include @@ -27,8 +27,8 @@ #include -#define ThePSurface Handle(Adaptor3d_HSurface) -#define ThePSurface_hxx +#define ThePSurface Handle(Adaptor3d_Surface) +#define ThePSurface_hxx #define ThePSurfaceTool Adaptor3d_HSurfaceTool #define ThePSurfaceTool_hxx #define TheISurface IntSurf_Quadric diff --git a/src/GeomInt/GeomInt_WLApprox.hxx b/src/GeomInt/GeomInt_WLApprox.hxx index 943efd5ee3..436c3a28b7 100644 --- a/src/GeomInt/GeomInt_WLApprox.hxx +++ b/src/GeomInt/GeomInt_WLApprox.hxx @@ -17,21 +17,13 @@ #ifndef _GeomInt_WLApprox_HeaderFile #define _GeomInt_WLApprox_HeaderFile -#include -#include -#include - +#include #include #include #include #include -#include -#include -#include #include -class Standard_OutOfRange; -class StdFail_NotDone; -class Adaptor3d_HSurface; + class Adaptor3d_HSurfaceTool; class IntSurf_Quadric; class IntSurf_QuadricTool; @@ -79,7 +71,7 @@ public: Standard_EXPORT GeomInt_WLApprox(); - Standard_EXPORT void Perform (const Handle(Adaptor3d_HSurface)& Surf1, const Handle(Adaptor3d_HSurface)& Surf2, const Handle(IntPatch_WLine)& aLine, const Standard_Boolean ApproxXYZ = Standard_True, const Standard_Boolean ApproxU1V1 = Standard_True, const Standard_Boolean ApproxU2V2 = Standard_True, const Standard_Integer indicemin = 0, const Standard_Integer indicemax = 0); + Standard_EXPORT void Perform (const Handle(Adaptor3d_Surface)& Surf1, const Handle(Adaptor3d_Surface)& Surf2, const Handle(IntPatch_WLine)& aLine, const Standard_Boolean ApproxXYZ = Standard_True, const Standard_Boolean ApproxU1V1 = Standard_True, const Standard_Boolean ApproxU2V2 = Standard_True, const Standard_Integer indicemin = 0, const Standard_Integer indicemax = 0); Standard_EXPORT void Perform (const Handle(IntPatch_WLine)& aLine, const Standard_Boolean ApproxXYZ = Standard_True, const Standard_Boolean ApproxU1V1 = Standard_True, const Standard_Boolean ApproxU2V2 = Standard_True, const Standard_Integer indicemin = 0, const Standard_Integer indicemax = 0); @@ -114,7 +106,7 @@ protected: private: - Standard_EXPORT void Perform (const IntSurf_Quadric& Surf1, const Handle(Adaptor3d_HSurface)& Surf2, const Handle(IntPatch_WLine)& aLine, const Standard_Boolean ApproxXYZ, const Standard_Boolean ApproxU1V1, const Standard_Boolean ApproxU2V2, const Standard_Integer indicemin, const Standard_Integer indicemax, const Standard_Boolean isTheQuadFirst); + Standard_EXPORT void Perform (const IntSurf_Quadric& Surf1, const Handle(Adaptor3d_Surface)& Surf2, const Handle(IntPatch_WLine)& aLine, const Standard_Boolean ApproxXYZ, const Standard_Boolean ApproxU1V1, const Standard_Boolean ApproxU2V2, const Standard_Integer indicemin, const Standard_Integer indicemax, const Standard_Boolean isTheQuadFirst); Standard_EXPORT void UpdateTolReached(); diff --git a/src/GeomInt/GeomInt_WLApprox_0.cxx b/src/GeomInt/GeomInt_WLApprox_0.cxx index e0f0261610..964bb57f74 100644 --- a/src/GeomInt/GeomInt_WLApprox_0.cxx +++ b/src/GeomInt/GeomInt_WLApprox_0.cxx @@ -18,7 +18,7 @@ #include #include -#include +#include #include #include #include @@ -37,8 +37,8 @@ #include -#define ThePSurface Handle(Adaptor3d_HSurface) -#define ThePSurface_hxx +#define ThePSurface Handle(Adaptor3d_Surface) +#define ThePSurface_hxx #define ThePSurfaceTool Adaptor3d_HSurfaceTool #define ThePSurfaceTool_hxx #define TheISurface IntSurf_Quadric diff --git a/src/GeomLib/GeomLib.cxx b/src/GeomLib/GeomLib.cxx index f357273633..32f0aa711b 100644 --- a/src/GeomLib/GeomLib.cxx +++ b/src/GeomLib/GeomLib.cxx @@ -41,11 +41,12 @@ // Purpose: // Declarations: -#include +#include + +#include #include #include -#include -#include +#include #include #include #include @@ -65,8 +66,6 @@ #include #include #include -#include -#include #include #include #include @@ -85,12 +84,10 @@ #include #include #include -#include #include #include #include #include -#include #include #include #include @@ -1032,7 +1029,7 @@ class GeomLib_CurveOnSurfaceEvaluator : public AdvApprox_EvaluatorFunction Standard_Real FirstParam; Standard_Real LastParam; - Handle(Adaptor3d_HCurve) TrimCurve; + Handle(Adaptor3d_Curve) TrimCurve; }; void GeomLib_CurveOnSurfaceEvaluator::Evaluate (Standard_Integer *,/*Dimension*/ @@ -1098,18 +1095,15 @@ void GeomLib::BuildCurve3d(const Standard_Real Tolerance, MaxDeviation = 0.0e0 ; AverageDeviation = 0.0e0 ; - Handle(GeomAdaptor_HSurface) geom_adaptor_surface_ptr (Handle(GeomAdaptor_HSurface)::DownCast(Curve.GetSurface()) ); - Handle(Geom2dAdaptor_HCurve) geom_adaptor_curve_ptr (Handle(Geom2dAdaptor_HCurve)::DownCast(Curve.GetCurve()) ); + Handle(GeomAdaptor_Surface) geom_adaptor_surface_ptr (Handle(GeomAdaptor_Surface)::DownCast(Curve.GetSurface()) ); + Handle(Geom2dAdaptor_Curve) geom_adaptor_curve_ptr (Handle(Geom2dAdaptor_Curve)::DownCast(Curve.GetCurve()) ); if (! geom_adaptor_curve_ptr.IsNull() && ! geom_adaptor_surface_ptr.IsNull()) { Handle(Geom_Plane) P ; - const GeomAdaptor_Surface & geom_surface = - * (GeomAdaptor_Surface *) &geom_adaptor_surface_ptr->Surface() ; + const GeomAdaptor_Surface& geom_surface = *geom_adaptor_surface_ptr; - Handle(Geom_RectangularTrimmedSurface) RT = - Handle(Geom_RectangularTrimmedSurface):: - DownCast(geom_surface.Surface()); + Handle(Geom_RectangularTrimmedSurface) RT = Handle(Geom_RectangularTrimmedSurface)::DownCast(geom_surface.Surface()); if ( RT.IsNull()) { P = Handle(Geom_Plane)::DownCast(geom_surface.Surface()); } @@ -1121,8 +1115,7 @@ void GeomLib::BuildCurve3d(const Standard_Real Tolerance, if (! P.IsNull()) { // compute the 3d curve gp_Ax2 axes = P->Position().Ax2(); - const Geom2dAdaptor_Curve & geom2d_curve = - * (Geom2dAdaptor_Curve *) & geom_adaptor_curve_ptr->Curve2d() ; + const Geom2dAdaptor_Curve& geom2d_curve = *geom_adaptor_curve_ptr; NewCurvePtr = GeomLib::To3d(axes, geom2d_curve.Curve()); @@ -1130,7 +1123,7 @@ void GeomLib::BuildCurve3d(const Standard_Real Tolerance, } - Handle(Adaptor2d_HCurve2d) TrimmedC2D = geom_adaptor_curve_ptr->Trim (FirstParameter, LastParameter, Precision::PConfusion()); + Handle(Adaptor2d_Curve2d) TrimmedC2D = geom_adaptor_curve_ptr->Trim (FirstParameter, LastParameter, Precision::PConfusion()); Standard_Boolean isU, isForward; Standard_Real aParam; @@ -2799,7 +2792,7 @@ static Standard_Boolean CompareWeightPoles(const TColgp_Array1OfPnt& thePoles1, //function : isIsoLine //purpose : //============================================================================= -Standard_Boolean GeomLib::isIsoLine (const Handle(Adaptor2d_HCurve2d) theC2D, +Standard_Boolean GeomLib::isIsoLine (const Handle(Adaptor2d_Curve2d) theC2D, Standard_Boolean& theIsU, Standard_Real& theParam, Standard_Boolean& theIsForward) @@ -2879,8 +2872,8 @@ Standard_Boolean GeomLib::isIsoLine (const Handle(Adaptor2d_HCurve2d) theC2D, //function : buildC3dOnIsoLine //purpose : //============================================================================= -Handle(Geom_Curve) GeomLib::buildC3dOnIsoLine (const Handle(Adaptor2d_HCurve2d) theC2D, - const Handle(Adaptor3d_HSurface) theSurf, +Handle(Geom_Curve) GeomLib::buildC3dOnIsoLine (const Handle(Adaptor2d_Curve2d) theC2D, + const Handle(Adaptor3d_Surface) theSurf, const Standard_Real theFirst, const Standard_Real theLast, const Standard_Real theTolerance, @@ -2889,7 +2882,7 @@ Handle(Geom_Curve) GeomLib::buildC3dOnIsoLine (const Handle(Adaptor2d_HCurve2d) const Standard_Boolean theIsForward) { // Convert adapter to the appropriate type. - Handle(GeomAdaptor_HSurface) aGeomAdapter = Handle(GeomAdaptor_HSurface)::DownCast(theSurf); + Handle(GeomAdaptor_Surface) aGeomAdapter = Handle(GeomAdaptor_Surface)::DownCast(theSurf); if (aGeomAdapter.IsNull()) return Handle(Geom_Curve)(); @@ -2897,7 +2890,7 @@ Handle(Geom_Curve) GeomLib::buildC3dOnIsoLine (const Handle(Adaptor2d_HCurve2d) return Handle(Geom_Curve)(); // Extract isoline - Handle(Geom_Surface) aSurf = aGeomAdapter->ChangeSurface().Surface(); + Handle(Geom_Surface) aSurf = aGeomAdapter->Surface(); Handle(Geom_Curve) aC3d; gp_Pnt2d aF2d = theC2D->Value(theC2D->FirstParameter()); diff --git a/src/GeomLib/GeomLib.hxx b/src/GeomLib/GeomLib.hxx index 0b017ad18a..107ba82174 100644 --- a/src/GeomLib/GeomLib.hxx +++ b/src/GeomLib/GeomLib.hxx @@ -17,25 +17,18 @@ #ifndef _GeomLib_HeaderFile #define _GeomLib_HeaderFile -#include -#include -#include - -#include +#include #include -#include -#include #include #include #include #include + class Geom_Curve; class gp_Ax2; class Geom2d_Curve; class gp_GTrsf2d; class Adaptor3d_CurveOnSurface; -class Adaptor2d_HCurve2d; -class Adaptor3d_HSurface; class Geom_BoundedCurve; class gp_Pnt; class gp_Vec; @@ -56,6 +49,7 @@ class GeomLib_Tool; class GeomLib_PolyFunc; class GeomLib_LogSample; +typedef class Adaptor2d_Curve2d Adaptor2d_Curve2d; //! Geom Library. This package provides an //! implementation of functions for basic computation @@ -232,7 +226,7 @@ public: //! @param theParam Line parameter. //! @param theIsForward Flag indicating forward parameterization on a isoline. //! @return Standard_True when 2d curve is a line and Standard_False otherwise. - Standard_EXPORT static Standard_Boolean isIsoLine (const Handle(Adaptor2d_HCurve2d) theC2D, + Standard_EXPORT static Standard_Boolean isIsoLine (const Handle(Adaptor2d_Curve2d) theC2D, Standard_Boolean& theIsU, Standard_Real& theParam, Standard_Boolean& theIsForward); @@ -244,8 +238,8 @@ public: //! @param theParam Line parameter. //! @param theIsForward Flag indicating forward parameterization on a isoline. //! @return Standard_True when 3d curve is built and Standard_False otherwise. - Standard_EXPORT static Handle(Geom_Curve) buildC3dOnIsoLine (const Handle(Adaptor2d_HCurve2d) theC2D, - const Handle(Adaptor3d_HSurface) theSurf, + Standard_EXPORT static Handle(Geom_Curve) buildC3dOnIsoLine (const Handle(Adaptor2d_Curve2d) theC2D, + const Handle(Adaptor3d_Surface) theSurf, const Standard_Real theFirst, const Standard_Real theLast, const Standard_Real theTolerance, diff --git a/src/GeomLib/GeomLib_CheckCurveOnSurface.cxx b/src/GeomLib/GeomLib_CheckCurveOnSurface.cxx index 571eb875b7..a282ce2a60 100644 --- a/src/GeomLib/GeomLib_CheckCurveOnSurface.cxx +++ b/src/GeomLib/GeomLib_CheckCurveOnSurface.cxx @@ -12,18 +12,19 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#include +#include + +#include #include #include -#include +#include #include #include #include #include -#include +#include #include -#include -#include +#include #include #include #include @@ -261,8 +262,8 @@ public: //identificator of the current interval in mySubIntervals array) cell of //myArrOfDist and myArrOfParam arrays. const GeomAdaptor_Curve anAC(myCurve3D); - const Handle(Adaptor2d_HCurve2d) anAd2dC = new Geom2dAdaptor_GHCurve(myCurve2D); - const Handle(Adaptor3d_HSurface) anAdS = new GeomAdaptor_HSurface(mySurface); + const Handle(Adaptor2d_Curve2d) anAd2dC = new Geom2dAdaptor_Curve(myCurve2D); + const Handle(Adaptor3d_Surface) anAdS = new GeomAdaptor_Surface(mySurface); const Adaptor3d_CurveOnSurface anACS(anAd2dC, anAdS); diff --git a/src/GeomPlate/GeomPlate_Array1OfHCurve.hxx b/src/GeomPlate/GeomPlate_Array1OfHCurve.hxx index c42abfb118..4d3ed1d0d1 100644 --- a/src/GeomPlate/GeomPlate_Array1OfHCurve.hxx +++ b/src/GeomPlate/GeomPlate_Array1OfHCurve.hxx @@ -17,10 +17,10 @@ #ifndef GeomPlate_Array1OfHCurve_HeaderFile #define GeomPlate_Array1OfHCurve_HeaderFile -#include +#include #include -typedef NCollection_Array1 GeomPlate_Array1OfHCurve; +typedef NCollection_Array1 GeomPlate_Array1OfHCurve; #endif diff --git a/src/GeomPlate/GeomPlate_BuildPlateSurface.cxx b/src/GeomPlate/GeomPlate_BuildPlateSurface.cxx index 75a3f5c3ee..a135f7b2b9 100644 --- a/src/GeomPlate/GeomPlate_BuildPlateSurface.cxx +++ b/src/GeomPlate/GeomPlate_BuildPlateSurface.cxx @@ -14,8 +14,10 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#include -#include +#include + +#include +#include #include #include #include @@ -31,11 +33,9 @@ #include #include #include -#include #include #include #include -#include #include #include #include @@ -257,25 +257,25 @@ static void TrierTab(Handle(TColStd_HArray1OfInteger)& Tab) //--------------------------------------------------------- // Function : ProjectCurve //--------------------------------------------------------- -Handle(Geom2d_Curve) GeomPlate_BuildPlateSurface::ProjectCurve(const Handle(Adaptor3d_HCurve)& Curv) +Handle(Geom2d_Curve) GeomPlate_BuildPlateSurface::ProjectCurve(const Handle(Adaptor3d_Curve)& Curv) { // Project a curve on a plane Handle(Geom2d_Curve) Curve2d ; - Handle(GeomAdaptor_HSurface) hsur = new GeomAdaptor_HSurface(mySurfInit); + Handle(GeomAdaptor_Surface) hsur = new GeomAdaptor_Surface(mySurfInit); gp_Pnt2d P2d; - ProjLib_CompProjectedCurve Projector(hsur, Curv, myTol3d/10, myTol3d/10); + Handle(ProjLib_HCompProjectedCurve) HProjector = new ProjLib_HCompProjectedCurve (hsur, Curv, myTol3d/10, myTol3d/10); Standard_Real UdebCheck, UfinCheck, ProjUdeb, ProjUfin; UdebCheck = Curv->FirstParameter(); UfinCheck = Curv->LastParameter(); - Projector.Bounds( 1, ProjUdeb, ProjUfin ); + HProjector->Bounds( 1, ProjUdeb, ProjUfin ); - if (Projector.NbCurves() != 1 || + if (HProjector->NbCurves() != 1 || Abs( UdebCheck -ProjUdeb ) > Precision::PConfusion() || Abs( UfinCheck -ProjUfin ) > Precision::PConfusion()) { - if (Projector.IsSinglePnt(1, P2d)) + if (HProjector->IsSinglePnt(1, P2d)) { // solution in a point TColgp_Array1OfPnt2d poles(1, 2); @@ -294,10 +294,7 @@ Handle(Geom2d_Curve) GeomPlate_BuildPlateSurface::ProjectCurve(const Handle(Ada GeomAbs_Shape Continuity = GeomAbs_C1; Standard_Integer MaxDegree = 10, MaxSeg; Standard_Real Udeb, Ufin; - Handle(ProjLib_HCompProjectedCurve) HProjector = - new ProjLib_HCompProjectedCurve(); - HProjector->Set(Projector); - Projector.Bounds(1, Udeb, Ufin); + HProjector->Bounds(1, Udeb, Ufin); MaxSeg = 20 + HProjector->NbIntervals(GeomAbs_C3); Approx_CurveOnSurface appr(HProjector, hsur, Udeb, Ufin, myTol3d); @@ -317,18 +314,15 @@ Handle(Geom2d_Curve) GeomPlate_BuildPlateSurface::ProjectCurve(const Handle(Ada //--------------------------------------------------------- // Function : ProjectedCurve //--------------------------------------------------------- -Handle(Adaptor2d_HCurve2d) GeomPlate_BuildPlateSurface::ProjectedCurve( Handle(Adaptor3d_HCurve)& Curv) +Handle(Adaptor2d_Curve2d) GeomPlate_BuildPlateSurface::ProjectedCurve( Handle(Adaptor3d_Curve)& Curv) { // Projection of a curve on the initial surface - Handle(GeomAdaptor_HSurface) hsur = new GeomAdaptor_HSurface(mySurfInit); + Handle(GeomAdaptor_Surface) hsur = new GeomAdaptor_Surface(mySurfInit); - ProjLib_CompProjectedCurve Projector(hsur, Curv, myTolU/10, myTolV/10); - Handle(ProjLib_HCompProjectedCurve) HProjector = - new ProjLib_HCompProjectedCurve(); - - if (Projector.NbCurves() != 1) { - + Handle(ProjLib_HCompProjectedCurve) HProjector = new ProjLib_HCompProjectedCurve (hsur, Curv, myTolU/10, myTolV/10); + if (HProjector->NbCurves() != 1) + { HProjector.Nullify(); // No continuous solution #ifdef OCCT_DEBUG std::cout << "BuildPlateSurace :: No continuous projection" << std::endl; @@ -339,15 +333,12 @@ Handle(Adaptor2d_HCurve2d) GeomPlate_BuildPlateSurface::ProjectedCurve( Handle( Standard_Real First1,Last1,First2,Last2; First1=Curv->FirstParameter(); Last1 =Curv->LastParameter(); - Projector.Bounds(1,First2,Last2); + HProjector->Bounds(1,First2,Last2); if (Abs(First1-First2) <= Max(myTolU,myTolV) && Abs(Last1-Last2) <= Max(myTolU,myTolV)) { - - HProjector->Set(Projector); - HProjector = Handle(ProjLib_HCompProjectedCurve):: - DownCast(HProjector->Trim(First2,Last2,Precision::PConfusion())); + HProjector = Handle(ProjLib_HCompProjectedCurve)::DownCast(HProjector->Trim(First2,Last2,Precision::PConfusion())); } else { @@ -1608,8 +1599,8 @@ void GeomPlate_BuildPlateSurface::ComputeSurfInit(const Message_ProgressRange& t (Handle( Geom_RectangularTrimmedSurface )::DownCast(mySurfInit))->BasisSurface(); Standard_Real Ratio = 0., R1 = 2., R2 = 0.6; //R1 = 3, R2 = 0.5;//R1 = 1.4, R2 = 0.8; //R1 = 5., R2 = 0.2; - Handle( GeomAdaptor_HSurface ) hsur = - new GeomAdaptor_HSurface( InitPlane ); + Handle( GeomAdaptor_Surface ) hsur = + new GeomAdaptor_Surface( InitPlane ); Standard_Integer NbPoint = 20; // gp_Pnt P; // gp_Vec DerC, DerCproj, DU, DV; @@ -1623,11 +1614,8 @@ void GeomPlate_BuildPlateSurface::ComputeSurfInit(const Message_ProgressRange& t Standard_Real LastPar = myLinCont->Value(i)->LastParameter(); Standard_Real Uif = (LastPar - FirstPar)/(NbPoint); - Handle( Adaptor3d_HCurve ) Curve = myLinCont->Value(i)->Curve3d(); - ProjLib_CompProjectedCurve Projector( hsur, Curve, myTol3d, myTol3d ); - Handle( ProjLib_HCompProjectedCurve ) ProjCurve = - new ProjLib_HCompProjectedCurve(); - ProjCurve->Set( Projector ); + Handle( Adaptor3d_Curve ) Curve = myLinCont->Value(i)->Curve3d(); + Handle( ProjLib_HCompProjectedCurve ) ProjCurve = new ProjLib_HCompProjectedCurve (hsur, Curve, myTol3d, myTol3d); Adaptor3d_CurveOnSurface AProj(ProjCurve, hsur); gp_Pnt P; @@ -1890,13 +1878,13 @@ Intersect(Handle(GeomPlate_HArray1OfSequenceOfReal)& PntInter, gp_Vec vec, vecU, vecV, N; if (myLinCont->Value(i)->Order() == 0) { - Handle( Adaptor3d_HCurve ) theCurve = myLinCont->Value(i)->Curve3d(); + Handle( Adaptor3d_Curve ) theCurve = myLinCont->Value(i)->Curve3d(); theCurve->D1( int2d.ParamOnFirst(), P1, vec ); myLinCont->Value(j)->D1( int2d.ParamOnSecond(), P2, vecU, vecV ); } else { - Handle( Adaptor3d_HCurve ) theCurve = myLinCont->Value(j)->Curve3d(); + Handle( Adaptor3d_Curve ) theCurve = myLinCont->Value(j)->Curve3d(); theCurve->D1( int2d.ParamOnSecond(), P2, vec ); myLinCont->Value(i)->D1( int2d.ParamOnFirst(), P1, vecU, vecV ); } diff --git a/src/GeomPlate/GeomPlate_BuildPlateSurface.hxx b/src/GeomPlate/GeomPlate_BuildPlateSurface.hxx index 67a0cc545a..ca21ce79ed 100644 --- a/src/GeomPlate/GeomPlate_BuildPlateSurface.hxx +++ b/src/GeomPlate/GeomPlate_BuildPlateSurface.hxx @@ -44,9 +44,6 @@ class GeomPlate_PointConstraint; class gp_Pnt2d; class gp_Pnt; class Geom2d_Curve; -class Adaptor3d_HCurve; -class Adaptor2d_HCurve2d; - //! This class provides an algorithm for constructing such a plate surface that @@ -213,9 +210,9 @@ private: Standard_EXPORT gp_Pnt2d ProjectPoint (const gp_Pnt& P); - Standard_EXPORT Handle(Geom2d_Curve) ProjectCurve (const Handle(Adaptor3d_HCurve)& Curv); + Standard_EXPORT Handle(Geom2d_Curve) ProjectCurve (const Handle(Adaptor3d_Curve)& Curv); - Standard_EXPORT Handle(Adaptor2d_HCurve2d) ProjectedCurve (Handle(Adaptor3d_HCurve)& Curv); + Standard_EXPORT Handle(Adaptor2d_Curve2d) ProjectedCurve (Handle(Adaptor3d_Curve)& Curv); Standard_EXPORT void ComputeSurfInit(const Message_ProgressRange& theProgress); diff --git a/src/GeomPlate/GeomPlate_CurveConstraint.cxx b/src/GeomPlate/GeomPlate_CurveConstraint.cxx index 4b8dbf1cd3..752cacc7ff 100644 --- a/src/GeomPlate/GeomPlate_CurveConstraint.cxx +++ b/src/GeomPlate/GeomPlate_CurveConstraint.cxx @@ -18,19 +18,19 @@ // ne traite que les GeomAdaptor_Surface; // plus de reference a BRepAdaptor -#include -#include -#include -#include +#include +#include +#include +#include #include -#include +#include #include #include #include #include #include -#include -#include +#include +#include #include #include #include @@ -65,7 +65,7 @@ GeomPlate_CurveConstraint :: GeomPlate_CurveConstraint () //--------------------------------------------------------- // Constructeurs avec courbe sur surface //--------------------------------------------------------- -GeomPlate_CurveConstraint :: GeomPlate_CurveConstraint (const Handle(Adaptor3d_HCurve)& Boundary, +GeomPlate_CurveConstraint :: GeomPlate_CurveConstraint (const Handle(Adaptor3d_Curve)& Boundary, const Standard_Integer Tang, const Standard_Integer NPt, const Standard_Real TolDist, @@ -85,7 +85,7 @@ myTolCurv(TolCurv) myConstG1=Standard_True; myConstG2=Standard_True; - myFrontiere = Handle(Adaptor3d_HCurveOnSurface)::DownCast(Boundary); + myFrontiere = Handle(Adaptor3d_CurveOnSurface)::DownCast(Boundary); if (myFrontiere.IsNull()) { @@ -94,15 +94,14 @@ myTolCurv(TolCurv) else { Handle(Geom_Surface) Surf; - Handle(GeomAdaptor_HSurface) GS1 = Handle(GeomAdaptor_HSurface):: - DownCast(myFrontiere->ChangeCurve().GetSurface()); + Handle(GeomAdaptor_Surface) GS1 = Handle(GeomAdaptor_Surface)::DownCast(myFrontiere->GetSurface()); if (!GS1.IsNull()) { - Surf=GS1->ChangeSurface().Surface(); + Surf=GS1->Surface(); } else { - // Handle(BRepAdaptor_HSurface) BS1; - // BS1=Handle(BRepAdaptor_HSurface)::DownCast(myFrontiere-> + // Handle(BRepAdaptor_Surface) BS1; + // BS1=Handle(BRepAdaptor_Surface)::DownCast(myFrontiere-> // ChangeCurve().GetSurface()); // Surf = BRep_Tool::Surface(BS1->ChangeSurface().Face()); throw Standard_Failure( @@ -154,7 +153,7 @@ Standard_Real GeomPlate_CurveConstraint :: Length() const {// GCPnts_AbscissaPoint A(myFrontiere->Curve(),AP.Length(myFrontiere->Curve())/2,myFrontiere->FirstParameter()); // Standard_Real toto=A.Parameter(); //std::cout<GetCurve()); +return AP.Length (*myFrontiere); } else @@ -162,7 +161,7 @@ return AP.Length(myFrontiere->GetCurve()); // Standard_Real toto=A.Parameter(); //std::cout<GetCurve()); + return AP.Length (*my3dCurve); } @@ -176,8 +175,8 @@ void GeomPlate_CurveConstraint :: D0(const Standard_Real U,gp_Pnt& P) const { gp_Pnt2d P2d; if (my3dCurve.IsNull()) - { P2d = myFrontiere->ChangeCurve().GetCurve()->Value(U); - myFrontiere->ChangeCurve().GetSurface()->D0(P2d.Coord(1),P2d.Coord(2),P); + { P2d = myFrontiere->GetCurve()->Value(U); + myFrontiere->GetSurface()->D0(P2d.Coord(1),P2d.Coord(2),P); } else my3dCurve->D0(U,P); @@ -191,8 +190,8 @@ void GeomPlate_CurveConstraint :: D1(const Standard_Real U, if (!my3dCurve.IsNull()) throw Standard_Failure("GeomPlate_CurveConstraint.cxx : Curve must be on a Surface"); - P2d = myFrontiere->ChangeCurve().GetCurve()->Value(U); - myFrontiere->ChangeCurve().GetSurface()->D1(P2d.Coord(1),P2d.Coord(2),P,V1,V2); + P2d = myFrontiere->GetCurve()->Value(U); + myFrontiere->GetSurface()->D1(P2d.Coord(1),P2d.Coord(2),P,V1,V2); } @@ -206,8 +205,8 @@ void GeomPlate_CurveConstraint :: D2(const Standard_Real U, if (!my3dCurve.IsNull()) throw Standard_Failure("GeomPlate_CurveConstraint.cxx : Curve must be on a Surface"); - P2d = myFrontiere->ChangeCurve().GetCurve()->Value(U); - myFrontiere->ChangeCurve().GetSurface()->D2(P2d.Coord(1),P2d.Coord(2),P,V1,V2,V3,V4,V5); + P2d = myFrontiere->GetCurve()->Value(U); + myFrontiere->GetSurface()->D2(P2d.Coord(1),P2d.Coord(2),P,V1,V2,V3,V4,V5); } //--------------------------------------------------------- @@ -293,14 +292,14 @@ void GeomPlate_CurveConstraint :: SetCurve2dOnSurf (const Handle(Geom2d_Curve) & //--------------------------------------------------------- // Fonction : ProjectedCurve //--------------------------------------------------------- -Handle(Adaptor2d_HCurve2d) GeomPlate_CurveConstraint :: ProjectedCurve () const +Handle(Adaptor2d_Curve2d) GeomPlate_CurveConstraint :: ProjectedCurve () const { return myHCurve2d; } //--------------------------------------------------------- // Fonction : SetProjectedCurve //--------------------------------------------------------- -void GeomPlate_CurveConstraint :: SetProjectedCurve (const Handle(Adaptor2d_HCurve2d) &Curve, +void GeomPlate_CurveConstraint :: SetProjectedCurve (const Handle(Adaptor2d_Curve2d) &Curve, const Standard_Real TolU,const Standard_Real TolV) { myHCurve2d=Curve; myTolU=TolU; @@ -310,9 +309,9 @@ void GeomPlate_CurveConstraint :: SetProjectedCurve (const Handle(Adaptor2d_HCur //--------------------------------------------------------- // Fonction : Curve3d //--------------------------------------------------------- -Handle(Adaptor3d_HCurve) GeomPlate_CurveConstraint :: Curve3d () const +Handle(Adaptor3d_Curve) GeomPlate_CurveConstraint :: Curve3d () const { if (my3dCurve.IsNull()) - return Handle(Adaptor3d_HCurve) (myFrontiere); + return Handle(Adaptor3d_Curve) (myFrontiere); else return my3dCurve; } @@ -350,7 +349,7 @@ myOrder = Order; GeomLProp_SLProps &GeomPlate_CurveConstraint::LPropSurf(const Standard_Real U) { if (myFrontiere.IsNull()) throw Standard_Failure("GeomPlate_CurveConstraint.cxx : Curve must be on a Surface"); - gp_Pnt2d P2d= myFrontiere->ChangeCurve().GetCurve()->Value(U); + gp_Pnt2d P2d= myFrontiere->GetCurve()->Value(U); myLProp.SetParameters(P2d.X(),P2d.Y()); return myLProp; } diff --git a/src/GeomPlate/GeomPlate_CurveConstraint.hxx b/src/GeomPlate/GeomPlate_CurveConstraint.hxx index e1d7c76124..b8438c0493 100644 --- a/src/GeomPlate/GeomPlate_CurveConstraint.hxx +++ b/src/GeomPlate/GeomPlate_CurveConstraint.hxx @@ -17,25 +17,16 @@ #ifndef _GeomPlate_CurveConstraint_HeaderFile #define _GeomPlate_CurveConstraint_HeaderFile -#include -#include - -#include -#include +#include #include -#include -#include -class Adaptor3d_HCurveOnSurface; -class Adaptor3d_HCurve; + class Geom2d_Curve; -class Adaptor2d_HCurve2d; class Law_Function; class Standard_ConstructionError; class GeomLProp_SLProps; class gp_Pnt; class gp_Vec; - class GeomPlate_CurveConstraint; DEFINE_STANDARD_HANDLE(GeomPlate_CurveConstraint, Standard_Transient) @@ -60,7 +51,7 @@ public: //! TolCurv is the maximum error to satisfy for G2 constraints //! These errors can be replaced by laws of criterion. //! Raises ConstructionError if Order is not -1 , 0, 1, 2 - Standard_EXPORT GeomPlate_CurveConstraint(const Handle(Adaptor3d_HCurve)& Boundary, const Standard_Integer Order, const Standard_Integer NPt = 10, const Standard_Real TolDist = 0.0001, const Standard_Real TolAng = 0.01, const Standard_Real TolCurv = 0.1); + Standard_EXPORT GeomPlate_CurveConstraint(const Handle(Adaptor3d_Curve)& Boundary, const Standard_Integer Order, const Standard_Integer NPt = 10, const Standard_Real TolDist = 0.0001, const Standard_Real TolAng = 0.01, const Standard_Real TolCurv = 0.1); //! Allows you to set the order of continuity required for //! the constraints: G0, G1, and G2, controlled @@ -132,7 +123,7 @@ public: Standard_EXPORT void D2 (const Standard_Real U, gp_Pnt& P, gp_Vec& V1, gp_Vec& V2, gp_Vec& V3, gp_Vec& V4, gp_Vec& V5) const; - Standard_EXPORT Handle(Adaptor3d_HCurve) Curve3d() const; + Standard_EXPORT Handle(Adaptor3d_Curve) Curve3d() const; //! loads a 2d curve associated the surface resulting of the constraints Standard_EXPORT void SetCurve2dOnSurf (const Handle(Geom2d_Curve)& Curve2d); @@ -142,11 +133,11 @@ public: //! loads a 2d curve resulting from the normal projection of //! the curve on the initial surface - Standard_EXPORT void SetProjectedCurve (const Handle(Adaptor2d_HCurve2d)& Curve2d, const Standard_Real TolU, const Standard_Real TolV); + Standard_EXPORT void SetProjectedCurve (const Handle(Adaptor2d_Curve2d)& Curve2d, const Standard_Real TolU, const Standard_Real TolV); //! Returns the projected curve resulting from the normal projection of the //! curve on the initial surface - Standard_EXPORT Handle(Adaptor2d_HCurve2d) ProjectedCurve() const; + Standard_EXPORT Handle(Adaptor2d_Curve2d) ProjectedCurve() const; @@ -156,13 +147,13 @@ public: protected: - Handle(Adaptor3d_HCurveOnSurface) myFrontiere; + Handle(Adaptor3d_CurveOnSurface) myFrontiere; Standard_Integer myNbPoints; Standard_Integer myOrder; - Handle(Adaptor3d_HCurve) my3dCurve; + Handle(Adaptor3d_Curve) my3dCurve; Standard_Integer myTang; Handle(Geom2d_Curve) my2dCurve; - Handle(Adaptor2d_HCurve2d) myHCurve2d; + Handle(Adaptor2d_Curve2d) myHCurve2d; Handle(Law_Function) myG0Crit; Handle(Law_Function) myG1Crit; Handle(Law_Function) myG2Crit; @@ -176,18 +167,6 @@ protected: Standard_Real myTolU; Standard_Real myTolV; - -private: - - - - }; - - - - - - #endif // _GeomPlate_CurveConstraint_HeaderFile diff --git a/src/GeomPlate/GeomPlate_HArray1OfHCurve.hxx b/src/GeomPlate/GeomPlate_HArray1OfHCurve.hxx index 28c8931b12..4899757c68 100644 --- a/src/GeomPlate/GeomPlate_HArray1OfHCurve.hxx +++ b/src/GeomPlate/GeomPlate_HArray1OfHCurve.hxx @@ -17,7 +17,7 @@ #ifndef GeomPlate_HArray1OfHCurve_HeaderFile #define GeomPlate_HArray1OfHCurve_HeaderFile -#include +#include #include #include diff --git a/src/GeomProjLib/GeomProjLib.cxx b/src/GeomProjLib/GeomProjLib.cxx index 4dd52f1328..365dc0d058 100644 --- a/src/GeomProjLib/GeomProjLib.cxx +++ b/src/GeomProjLib/GeomProjLib.cxx @@ -16,6 +16,8 @@ // Modified by skv - Wed Aug 11 17:26:03 2004 OCC6272 +#include + #include #include #include @@ -38,10 +40,7 @@ #include #include #include -#include -#include #include -#include #include #include #include @@ -97,8 +96,8 @@ Handle(Geom2d_Curve) GeomProjLib::Curve2d(const Handle(Geom_Curve)& C, VDeb, VFin); - Handle(GeomAdaptor_HSurface) HS = new GeomAdaptor_HSurface(AS); - Handle(GeomAdaptor_HCurve) HC = new GeomAdaptor_HCurve(AC); + Handle(GeomAdaptor_Surface) HS = new GeomAdaptor_Surface(AS); + Handle(GeomAdaptor_Curve) HC = new GeomAdaptor_Curve(AC); ProjLib_ProjectedCurve Proj(HS,HC,Tolerance); @@ -281,7 +280,7 @@ Handle(Geom_Curve) GeomProjLib::Project( const Handle(Geom_Curve)& C, if ( AS.GetType() == GeomAbs_Plane) { ProjLib_ProjectOnPlane Proj( AS.Plane().Position()); - Handle(GeomAdaptor_HCurve) HC = new GeomAdaptor_HCurve(AC); + Handle(GeomAdaptor_Curve) HC = new GeomAdaptor_Curve(AC); Proj.Load(HC,Precision::PApproximation()); switch ( Proj.GetType()) { @@ -327,8 +326,8 @@ Handle(Geom_Curve) GeomProjLib::Project( const Handle(Geom_Curve)& C, } else { - Handle(GeomAdaptor_HSurface) HS = new GeomAdaptor_HSurface(AS); - Handle(GeomAdaptor_HCurve) HC = new GeomAdaptor_HCurve(AC); + Handle(GeomAdaptor_Surface) HS = new GeomAdaptor_Surface(AS); + Handle(GeomAdaptor_Curve) HC = new GeomAdaptor_Curve(AC); // Standard_Real Tol = Precision::Approximation(); // Standard_Real TolU = Precision::PApproximation(); // Standard_Real TolV = Precision::PApproximation(); @@ -339,7 +338,7 @@ Handle(Geom_Curve) GeomProjLib::Project( const Handle(Geom_Curve)& C, Standard_Real f,l; Proj.Bounds(1,f,l); - Handle(Adaptor2d_HCurve2d) HC2d = Proj.Trim(f,l,TolU); + Handle(Adaptor2d_Curve2d) HC2d = Proj.Trim(f,l,TolU); Approx_CurveOnSurface Approx(HC2d, HS, f, l, Tol); Approx.Perform(16, 14, GeomAbs_C2, Standard_True); @@ -363,7 +362,7 @@ Handle(Geom_Curve) GeomProjLib::ProjectOnPlane const Standard_Boolean KeepParametrization) { GeomAdaptor_Curve AC(Curve); - Handle(GeomAdaptor_HCurve) HC = new GeomAdaptor_HCurve(AC); + Handle(GeomAdaptor_Curve) HC = new GeomAdaptor_Curve(AC); ProjLib_ProjectOnPlane Proj(Plane->Position(), Dir); Proj.Load(HC,Precision::Approximation(), KeepParametrization); diff --git a/src/GeometryTest/GeometryTest_CurveCommands.cxx b/src/GeometryTest/GeometryTest_CurveCommands.cxx index 4a48303eca..e9ef56af0e 100644 --- a/src/GeometryTest/GeometryTest_CurveCommands.cxx +++ b/src/GeometryTest/GeometryTest_CurveCommands.cxx @@ -81,14 +81,14 @@ #include #include -#include -#include +#include +#include #include -#include -#include +#include +#include #include -#include +#include #include #include @@ -103,7 +103,7 @@ #include #include -#include +#include #include #include #include @@ -115,7 +115,7 @@ #include #include #include -#include +#include #include #include #include @@ -128,7 +128,7 @@ #include #include #include -#include +#include #include #include #include @@ -284,8 +284,8 @@ static Standard_Integer gproject(Draw_Interpretor& di, Standard_Integer n, const Handle(Geom_Surface) Sur = DrawTrSurf::GetSurface(a[ONE+1]); if (Cur.IsNull() || Sur.IsNull()) return 1; - Handle(GeomAdaptor_HCurve) hcur = new GeomAdaptor_HCurve(Cur); - Handle(GeomAdaptor_HSurface) hsur = new GeomAdaptor_HSurface(Sur); + Handle(GeomAdaptor_Curve) hcur = new GeomAdaptor_Curve(Cur); + Handle(GeomAdaptor_Surface) hsur = new GeomAdaptor_Surface(Sur); Standard_Real myTol3d = 1.e-6; @@ -293,16 +293,15 @@ static Standard_Integer gproject(Draw_Interpretor& di, Standard_Integer n, const Standard_Integer myMaxDegree = 14, myMaxSeg = 16; - ProjLib_CompProjectedCurve Projector(hsur, hcur, myTol3d/10, myTol3d/10); - Handle(ProjLib_HCompProjectedCurve) HProjector = new ProjLib_HCompProjectedCurve(); - HProjector->Set(Projector); + Handle(ProjLib_HCompProjectedCurve) HProjector = new ProjLib_HCompProjectedCurve (hsur, hcur, myTol3d/10, myTol3d/10); + ProjLib_CompProjectedCurve& Projector = *HProjector; Standard_Integer k; Standard_Real Udeb, Ufin, UIso, VIso; Standard_Boolean Only2d, Only3d; gp_Pnt2d P2d, Pdeb, Pfin; gp_Pnt P; - Handle(Adaptor2d_HCurve2d) HPCur; + Handle(Adaptor2d_Curve2d) HPCur; Handle(Geom2d_Curve) PCur2d; // Only for isoparametric projection for(k = 1; k <= Projector.NbCurves(); k++){ @@ -334,7 +333,7 @@ static Standard_Integer gproject(Draw_Interpretor& di, Standard_Integer n, const } else Dir = gp_Dir2d(0, 1); PCur2d = new Geom2d_TrimmedCurve(new Geom2d_Line(gp_Pnt2d(UIso, 0), Dir), Udeb, Ufin); - HPCur = new Geom2dAdaptor_HCurve(PCur2d); + HPCur = new Geom2dAdaptor_Curve(PCur2d); Only3d = Standard_True; } else if(Projector.IsVIso(k, VIso)) { @@ -350,7 +349,7 @@ static Standard_Integer gproject(Draw_Interpretor& di, Standard_Integer n, const } else Dir = gp_Dir2d(1, 0); PCur2d = new Geom2d_TrimmedCurve(new Geom2d_Line(gp_Pnt2d(0, VIso), Dir), Udeb, Ufin); - HPCur = new Geom2dAdaptor_HCurve(PCur2d); + HPCur = new Geom2dAdaptor_Curve(PCur2d); Only3d = Standard_True; } else HPCur = HProjector; @@ -359,7 +358,7 @@ static Standard_Integer gproject(Draw_Interpretor& di, Standard_Integer n, const Only2d = Standard_True; if(Only2d && Only3d) { - Handle(Geom_Curve) OutCur = new Geom_TrimmedCurve(GeomAdaptor::MakeCurve(hcur->Curve()), Ufin, Udeb); + Handle(Geom_Curve) OutCur = new Geom_TrimmedCurve (GeomAdaptor::MakeCurve (*hcur), Ufin, Udeb); DrawTrSurf::Set(temp, OutCur); DrawTrSurf::Set(temp1, PCur2d); di<Curve()), - Ufin, Udeb); + Handle(Geom_Curve) OutCur = new Geom_TrimmedCurve (GeomAdaptor::MakeCurve (*hcur), Ufin, Udeb); DrawTrSurf::Set(temp, OutCur); } else { @@ -936,7 +933,7 @@ static Standard_Integer crvpoints (Draw_Interpretor& di, Standard_Integer /*n*/, Standard_Integer i, nbp; Standard_Real defl; - Handle(Adaptor3d_HCurve) aHCurve; + Handle(Adaptor3d_Curve) aHCurve; Handle(Geom_Curve) C = DrawTrSurf::GetCurve(a[2]); if (C.IsNull()) { @@ -948,16 +945,16 @@ static Standard_Integer crvpoints (Draw_Interpretor& di, Standard_Integer /*n*/, return 1; } BRepAdaptor_CompCurve aCompCurve(aWire); - aHCurve = new BRepAdaptor_HCompCurve(aCompCurve); + aHCurve = new BRepAdaptor_CompCurve(aCompCurve); } else { - aHCurve = new GeomAdaptor_HCurve(C); + aHCurve = new GeomAdaptor_Curve(C); } defl = Draw::Atof(a[3]); - GCPnts_QuasiUniformDeflection PntGen(aHCurve->Curve(), defl); + GCPnts_QuasiUniformDeflection PntGen (*aHCurve, defl); if(!PntGen.IsDone()) { di << "Points generation failed\n"; @@ -994,7 +991,7 @@ static Standard_Integer crvpoints (Draw_Interpretor& di, Standard_Integer /*n*/, Standard_Integer imax = 0; //check deviation - ComputeDeviation(aHCurve->Curve(), aPnts, dmax, ufmax, ulmax, imax); + ComputeDeviation (*aHCurve, aPnts, dmax, ufmax, ulmax, imax); di << "Max defl: " << dmax << " " << ufmax << " " << ulmax << " " << imax << "\n"; return 0; @@ -1010,7 +1007,7 @@ static Standard_Integer crvtpoints (Draw_Interpretor& di, Standard_Integer n, co Standard_Integer i, nbp, aMinPntsNb = 2; Standard_Real defl, angle = Precision::Angular(); - Handle(Adaptor3d_HCurve) aHCurve; + Handle(Adaptor3d_Curve) aHCurve; Handle(Geom_Curve) C = DrawTrSurf::GetCurve(a[2]); if (C.IsNull()) { @@ -1022,11 +1019,11 @@ static Standard_Integer crvtpoints (Draw_Interpretor& di, Standard_Integer n, co return 1; } BRepAdaptor_CompCurve aCompCurve(aWire); - aHCurve = new BRepAdaptor_HCompCurve(aCompCurve); + aHCurve = new BRepAdaptor_CompCurve(aCompCurve); } else { - aHCurve = new GeomAdaptor_HCurve(C); + aHCurve = new GeomAdaptor_Curve(C); } defl = Draw::Atof(a[3]); @@ -1036,7 +1033,7 @@ static Standard_Integer crvtpoints (Draw_Interpretor& di, Standard_Integer n, co if(n > 5) aMinPntsNb = Draw::Atoi (a[5]); - GCPnts_TangentialDeflection PntGen(aHCurve->Curve(), angle, defl, aMinPntsNb); + GCPnts_TangentialDeflection PntGen (*aHCurve, angle, defl, aMinPntsNb); nbp = PntGen.NbPoints(); di << "Nb points : " << nbp << "\n"; @@ -1068,7 +1065,7 @@ static Standard_Integer crvtpoints (Draw_Interpretor& di, Standard_Integer n, co Standard_Integer imax = 0; //check deviation - ComputeDeviation(aHCurve->Curve(), aPnts, dmax, ufmax, ulmax, imax); + ComputeDeviation (*aHCurve, aPnts, dmax, ufmax, ulmax, imax); // di << "Max defl: " << dmax << " " << ufmax << " " << ulmax << " " << imax << "\n"; @@ -1457,7 +1454,7 @@ static Standard_Integer surfpoints (Draw_Interpretor& /*di*/, Standard_Integer / Handle(Geom_Surface) S = DrawTrSurf::GetSurface(a[2]); defl = Draw::Atof(a[3]); - Handle(GeomAdaptor_HSurface) AS = new GeomAdaptor_HSurface(S); + Handle(GeomAdaptor_Surface) AS = new GeomAdaptor_Surface(S); Handle(Adaptor3d_TopolTool) aTopTool = new Adaptor3d_TopolTool(AS); @@ -1558,7 +1555,7 @@ static Standard_Integer intersection (Draw_Interpretor& di, Standard_Boolean useStart = Standard_True, useBnd = Standard_True; Standard_Integer ista1=0,ista2=0,ibnd1=0,ibnd2=0; Standard_Real UVsta[4]; - Handle(GeomAdaptor_HSurface) AS1,AS2; + Handle(GeomAdaptor_Surface) AS1,AS2; // if (n <= 9) // user starting point @@ -1592,8 +1589,8 @@ static Standard_Integer intersection (Draw_Interpretor& di, for (Standard_Integer i=ibnd1; i <= ibnd2; i++) UVbnd[i-ibnd1] = Draw::Atof(a[i]); - AS1 = new GeomAdaptor_HSurface(GS1,UVbnd[0],UVbnd[1],UVbnd[2],UVbnd[3]); - AS2 = new GeomAdaptor_HSurface(GS2,UVbnd[4],UVbnd[5],UVbnd[6],UVbnd[7]); + AS1 = new GeomAdaptor_Surface(GS1,UVbnd[0],UVbnd[1],UVbnd[2],UVbnd[3]); + AS2 = new GeomAdaptor_Surface(GS2,UVbnd[4],UVbnd[5],UVbnd[6],UVbnd[7]); } // diff --git a/src/GeomliteTest/GeomliteTest_API2dCommands.cxx b/src/GeomliteTest/GeomliteTest_API2dCommands.cxx index a0a69ca9e5..de4a62da60 100644 --- a/src/GeomliteTest/GeomliteTest_API2dCommands.cxx +++ b/src/GeomliteTest/GeomliteTest_API2dCommands.cxx @@ -44,7 +44,7 @@ #include #include #include -#include +#include #include #include diff --git a/src/GeomliteTest/GeomliteTest_CurveCommands.cxx b/src/GeomliteTest/GeomliteTest_CurveCommands.cxx index 74a90ba054..804b62ac23 100644 --- a/src/GeomliteTest/GeomliteTest_CurveCommands.cxx +++ b/src/GeomliteTest/GeomliteTest_CurveCommands.cxx @@ -50,7 +50,6 @@ #include #include #include -#include #include #include @@ -101,17 +100,14 @@ #include #include -#include #include -#include -#include +#include #include #include #include #include -#include -#include +#include #include #include @@ -125,9 +121,9 @@ class CurveEvaluator : public AppCont_Function { public: - Handle(Adaptor3d_HCurve) myCurve; + Handle(Adaptor3d_Curve) myCurve; - CurveEvaluator(const Handle(Adaptor3d_HCurve)& C) + CurveEvaluator(const Handle(Adaptor3d_Curve)& C) : myCurve(C) { myNbPnt = 1; @@ -1549,8 +1545,8 @@ static Standard_Integer approxcurveonsurf(Draw_Interpretor& di, Standard_Integer Handle(Geom2d_Curve) curve2d = DrawTrSurf::GetCurve2d(a[2]); Handle(Geom_Surface) Surf = DrawTrSurf::GetSurface(a[3]); - Handle(Geom2dAdaptor_HCurve) A2d = new (Geom2dAdaptor_HCurve)(curve2d); - Handle(GeomAdaptor_HSurface) AS = new (GeomAdaptor_HSurface)(Surf); + Handle(Geom2dAdaptor_Curve) A2d = new (Geom2dAdaptor_Curve)(curve2d); + Handle(GeomAdaptor_Surface) AS = new (GeomAdaptor_Surface)(Surf); Approx_CurveOnSurface App(A2d, AS, A2d->FirstParameter(), A2d->LastParameter(), Tol); App.Perform(MaxSeg, MaxDeg, Continuity, Standard_True, Standard_False); @@ -1681,7 +1677,7 @@ static Standard_Integer approxcurve(Draw_Interpretor& di, Standard_Integer n, co } else if (Case == 3) { - Handle(Adaptor3d_HCurve) HACur = new GeomAdaptor_HCurve(curve); + Handle(Adaptor3d_Curve) HACur = new GeomAdaptor_Curve(curve); Approx_CurvilinearParameter appr(HACur, Tol, Continuity, MaxDeg, MaxSeg); if(appr.HasResult()) { //appr.Dump(std::cout); @@ -1693,8 +1689,8 @@ static Standard_Integer approxcurve(Draw_Interpretor& di, Standard_Integer n, co } } else if (Case == 4) { - Handle(Adaptor2d_HCurve2d) HACur2d = new Geom2dAdaptor_HCurve(curve2d); - Handle(Adaptor3d_HSurface) HASur = new GeomAdaptor_HSurface(surface); + Handle(Adaptor2d_Curve2d) HACur2d = new Geom2dAdaptor_Curve(curve2d); + Handle(Adaptor3d_Surface) HASur = new GeomAdaptor_Surface(surface); Approx_CurvilinearParameter appr(HACur2d, HASur, Tol, Continuity, MaxDeg, MaxSeg); if(appr.HasResult()) { //appr.Dump(std::cout); @@ -1707,10 +1703,10 @@ static Standard_Integer approxcurve(Draw_Interpretor& di, Standard_Integer n, co } else if (Case == 5) { - Handle(Adaptor2d_HCurve2d) HACur2d = new Geom2dAdaptor_HCurve(curve2d); - Handle(Adaptor3d_HSurface) HASur = new GeomAdaptor_HSurface(surface); - Handle(Adaptor2d_HCurve2d) HACur2d2 = new Geom2dAdaptor_HCurve(curve2d2); - Handle(Adaptor3d_HSurface) HASur2 = new GeomAdaptor_HSurface(surface2); + Handle(Adaptor2d_Curve2d) HACur2d = new Geom2dAdaptor_Curve(curve2d); + Handle(Adaptor3d_Surface) HASur = new GeomAdaptor_Surface(surface); + Handle(Adaptor2d_Curve2d) HACur2d2 = new Geom2dAdaptor_Curve(curve2d2); + Handle(Adaptor3d_Surface) HASur2 = new GeomAdaptor_Surface(surface2); Approx_CurvilinearParameter appr(HACur2d, HASur, HACur2d2, HASur2, Tol, Continuity, MaxDeg, MaxSeg); if(appr.HasResult()) { //appr.Dump(std::cout); @@ -1769,7 +1765,7 @@ static Standard_Integer fitcurve(Draw_Interpretor& di, Standard_Integer n, const } } - Handle(GeomAdaptor_HCurve) aGAC = new GeomAdaptor_HCurve(GC); + Handle(GeomAdaptor_Curve) aGAC = new GeomAdaptor_Curve(GC); CurveEvaluator aCE(aGAC); diff --git a/src/GeomliteTest/GeomliteTest_SurfaceCommands.cxx b/src/GeomliteTest/GeomliteTest_SurfaceCommands.cxx index 2ad175db9d..62caa72ca2 100644 --- a/src/GeomliteTest/GeomliteTest_SurfaceCommands.cxx +++ b/src/GeomliteTest/GeomliteTest_SurfaceCommands.cxx @@ -47,7 +47,6 @@ #include #include -#include #include #include diff --git a/src/HLRBRep/HLRBRep_BSurfaceTool.cxx b/src/HLRBRep/HLRBRep_BSurfaceTool.cxx index 9965d37ad7..8575c7d497 100644 --- a/src/HLRBRep/HLRBRep_BSurfaceTool.cxx +++ b/src/HLRBRep/HLRBRep_BSurfaceTool.cxx @@ -13,15 +13,15 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. +#include -#include -#include +#include +#include #include #include #include #include #include -#include #include #include diff --git a/src/HLRBRep/HLRBRep_BSurfaceTool.hxx b/src/HLRBRep/HLRBRep_BSurfaceTool.hxx index 47c5168a8e..b5c0c8996f 100644 --- a/src/HLRBRep/HLRBRep_BSurfaceTool.hxx +++ b/src/HLRBRep/HLRBRep_BSurfaceTool.hxx @@ -17,15 +17,9 @@ #ifndef _HLRBRep_BSurfaceTool_HeaderFile #define _HLRBRep_BSurfaceTool_HeaderFile -#include -#include -#include - -#include -#include +#include #include #include -#include #include #include #include @@ -36,16 +30,12 @@ #include #include #include -class Standard_NoSuchObject; -class Standard_OutOfRange; + class BRepAdaptor_Surface; -class Adaptor3d_HSurface; class gp_Pnt; class gp_Vec; class Geom_BezierSurface; class Geom_BSplineSurface; -class Adaptor3d_HCurve; - class HLRBRep_BSurfaceTool @@ -72,10 +62,10 @@ public: static void VIntervals (const BRepAdaptor_Surface& S, TColStd_Array1OfReal& T, const GeomAbs_Shape Sh); //! If >= - static Handle(Adaptor3d_HSurface) UTrim (const BRepAdaptor_Surface& S, const Standard_Real First, const Standard_Real Last, const Standard_Real Tol); + static Handle(Adaptor3d_Surface) UTrim (const BRepAdaptor_Surface& S, const Standard_Real First, const Standard_Real Last, const Standard_Real Tol); //! If >= - static Handle(Adaptor3d_HSurface) VTrim (const BRepAdaptor_Surface& S, const Standard_Real First, const Standard_Real Last, const Standard_Real Tol); + static Handle(Adaptor3d_Surface) VTrim (const BRepAdaptor_Surface& S, const Standard_Real First, const Standard_Real Last, const Standard_Real Tol); static Standard_Boolean IsUClosed (const BRepAdaptor_Surface& S); @@ -145,7 +135,7 @@ public: static gp_Dir Direction (const BRepAdaptor_Surface& S); - static Handle(Adaptor3d_HCurve) BasisCurve (const BRepAdaptor_Surface& S); + static Handle(Adaptor3d_Curve) BasisCurve (const BRepAdaptor_Surface& S); static gp_Ax1 Axis (const BRepAdaptor_Surface& S); diff --git a/src/HLRBRep/HLRBRep_BSurfaceTool.lxx b/src/HLRBRep/HLRBRep_BSurfaceTool.lxx index c017226706..65d4903dd8 100644 --- a/src/HLRBRep/HLRBRep_BSurfaceTool.lxx +++ b/src/HLRBRep/HLRBRep_BSurfaceTool.lxx @@ -24,8 +24,8 @@ #include #include #include -#include -#include +#include +#include #include //======================================================================= @@ -112,7 +112,7 @@ HLRBRep_BSurfaceTool::VIntervals(const BRepAdaptor_Surface& Surf, //purpose : //======================================================================= -inline Handle(Adaptor3d_HSurface) +inline Handle(Adaptor3d_Surface) HLRBRep_BSurfaceTool::UTrim(const BRepAdaptor_Surface& Surf, const Standard_Real F, const Standard_Real L, @@ -124,7 +124,7 @@ HLRBRep_BSurfaceTool::UTrim(const BRepAdaptor_Surface& Surf, //purpose : //======================================================================= -inline Handle(Adaptor3d_HSurface) +inline Handle(Adaptor3d_Surface) HLRBRep_BSurfaceTool::VTrim(const BRepAdaptor_Surface& Surf, const Standard_Real F, const Standard_Real L, @@ -388,7 +388,7 @@ HLRBRep_BSurfaceTool::Direction(const BRepAdaptor_Surface& S) //purpose : //======================================================================= -inline Handle(Adaptor3d_HCurve) +inline Handle(Adaptor3d_Curve) HLRBRep_BSurfaceTool::BasisCurve(const BRepAdaptor_Surface& S) { return(S.BasisCurve()); } diff --git a/src/HLRBRep/HLRBRep_SurfaceTool.cxx b/src/HLRBRep/HLRBRep_SurfaceTool.cxx index 8f9eb91f7f..1b66c45be2 100644 --- a/src/HLRBRep/HLRBRep_SurfaceTool.cxx +++ b/src/HLRBRep/HLRBRep_SurfaceTool.cxx @@ -13,15 +13,15 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. +#include -#include -#include +#include +#include #include #include #include #include #include -#include #include #include diff --git a/src/HLRBRep/HLRBRep_SurfaceTool.hxx b/src/HLRBRep/HLRBRep_SurfaceTool.hxx index 117842d08d..cf3e2a274a 100644 --- a/src/HLRBRep/HLRBRep_SurfaceTool.hxx +++ b/src/HLRBRep/HLRBRep_SurfaceTool.hxx @@ -17,16 +17,10 @@ #ifndef _HLRBRep_SurfaceTool_HeaderFile #define _HLRBRep_SurfaceTool_HeaderFile -#include -#include -#include - -#include -#include -#include +#include +#include #include #include -#include #include #include #include @@ -37,16 +31,11 @@ #include #include #include -class Standard_NoSuchObject; -class Standard_OutOfRange; -class Adaptor3d_HSurface; + class gp_Pnt; class gp_Vec; class Geom_BezierSurface; class Geom_BSplineSurface; -class Adaptor3d_HCurve; - - class HLRBRep_SurfaceTool { @@ -72,10 +61,10 @@ public: static void VIntervals (const Standard_Address S, TColStd_Array1OfReal& T, const GeomAbs_Shape Sh); //! If >= - static Handle(Adaptor3d_HSurface) UTrim (const Standard_Address S, const Standard_Real First, const Standard_Real Last, const Standard_Real Tol); + static Handle(Adaptor3d_Surface) UTrim (const Standard_Address S, const Standard_Real First, const Standard_Real Last, const Standard_Real Tol); //! If >= - static Handle(Adaptor3d_HSurface) VTrim (const Standard_Address S, const Standard_Real First, const Standard_Real Last, const Standard_Real Tol); + static Handle(Adaptor3d_Surface) VTrim (const Standard_Address S, const Standard_Real First, const Standard_Real Last, const Standard_Real Tol); static Standard_Boolean IsUClosed (const Standard_Address S); @@ -125,9 +114,9 @@ public: static gp_Dir Direction (const Standard_Address S); - static Handle(Adaptor3d_HCurve) BasisCurve (const Standard_Address S); + static Handle(Adaptor3d_Curve) BasisCurve (const Standard_Address S); - static Handle(Adaptor3d_HSurface) BasisSurface (const Standard_Address S); + static Handle(Adaptor3d_Surface) BasisSurface (const Standard_Address S); static Standard_Real OffsetValue (const Standard_Address S); diff --git a/src/HLRBRep/HLRBRep_SurfaceTool.lxx b/src/HLRBRep/HLRBRep_SurfaceTool.lxx index 332039ec6e..dedcf2b758 100644 --- a/src/HLRBRep/HLRBRep_SurfaceTool.lxx +++ b/src/HLRBRep/HLRBRep_SurfaceTool.lxx @@ -24,8 +24,8 @@ #include #include #include -#include -#include +#include +#include #include inline Standard_Real HLRBRep_SurfaceTool::FirstUParameter(const Standard_Address Surf){ return ((BRepAdaptor_Surface *)Surf)->FirstUParameter(); } @@ -56,14 +56,14 @@ inline void HLRBRep_SurfaceTool::VIntervals(const Standard_Address Surf, } -inline Handle(Adaptor3d_HSurface) HLRBRep_SurfaceTool::UTrim(const Standard_Address Surf, +inline Handle(Adaptor3d_Surface) HLRBRep_SurfaceTool::UTrim(const Standard_Address Surf, const Standard_Real F, const Standard_Real L, const Standard_Real Tol) { return ((BRepAdaptor_Surface *)Surf)->UTrim(F,L,Tol); } -inline Handle(Adaptor3d_HSurface) HLRBRep_SurfaceTool::VTrim(const Standard_Address Surf, +inline Handle(Adaptor3d_Surface) HLRBRep_SurfaceTool::VTrim(const Standard_Address Surf, const Standard_Real F, const Standard_Real L, const Standard_Real Tol) { @@ -227,11 +227,11 @@ inline gp_Dir HLRBRep_SurfaceTool::Direction(const Standard_Address S) { return(((BRepAdaptor_Surface *)S)->Direction()); } -inline Handle(Adaptor3d_HCurve) HLRBRep_SurfaceTool::BasisCurve(const Standard_Address S) { +inline Handle(Adaptor3d_Curve) HLRBRep_SurfaceTool::BasisCurve(const Standard_Address S) { return(((BRepAdaptor_Surface *)S)->BasisCurve()); } -inline Handle(Adaptor3d_HSurface) HLRBRep_SurfaceTool::BasisSurface(const Standard_Address S) { +inline Handle(Adaptor3d_Surface) HLRBRep_SurfaceTool::BasisSurface(const Standard_Address S) { return(((BRepAdaptor_Surface *)S)->BasisSurface()); } diff --git a/src/HLRBRep/HLRBRep_ThePolygonOfInterCSurf.hxx b/src/HLRBRep/HLRBRep_ThePolygonOfInterCSurf.hxx index 404e023142..2206eddd2d 100644 --- a/src/HLRBRep/HLRBRep_ThePolygonOfInterCSurf.hxx +++ b/src/HLRBRep/HLRBRep_ThePolygonOfInterCSurf.hxx @@ -50,56 +50,51 @@ public: Standard_EXPORT HLRBRep_ThePolygonOfInterCSurf(const gp_Lin& Curve, const TColStd_Array1OfReal& Upars); //! Give the bounding box of the polygon. - const Bnd_Box& Bounding() const; - - Standard_Real DeflectionOverEstimation() const; - - void SetDeflectionOverEstimation (const Standard_Real x); - - void Closed (const Standard_Boolean clos); - - Standard_Boolean Closed() const; - + const Bnd_Box& Bounding() const { return TheBnd; } + + Standard_Real DeflectionOverEstimation() const { return TheDeflection; } + + void SetDeflectionOverEstimation (const Standard_Real x) + { + TheDeflection = x; + TheBnd.Enlarge (TheDeflection); + } + + void Closed (const Standard_Boolean flag) { ClosedPolygon = flag; } + + Standard_Boolean Closed() const { return Standard_False; } // -- Voir si le cas Closed est traitable + //! Give the number of Segments in the polyline. - Standard_Integer NbSegments() const; - + Standard_Integer NbSegments() const { return NbPntIn - 1; } + //! Give the point of range Index in the Polygon. - const gp_Pnt& BeginOfSeg (const Standard_Integer Index) const; - + const gp_Pnt& BeginOfSeg (const Standard_Integer theIndex) const { return ThePnts (theIndex); } + //! Give the point of range Index in the Polygon. - const gp_Pnt& EndOfSeg (const Standard_Integer Index) const; - + const gp_Pnt& EndOfSeg (const Standard_Integer theIndex) const { return ThePnts (theIndex + 1); } + //! Returns the parameter (On the curve) //! of the first point of the Polygon - Standard_Real InfParameter() const; - + Standard_Real InfParameter() const { return Binf; } + //! Returns the parameter (On the curve) //! of the last point of the Polygon - Standard_Real SupParameter() const; - + Standard_Real SupParameter() const { return Bsup; } + //! Give an approximation of the parameter on the curve //! according to the discretization of the Curve. Standard_EXPORT Standard_Real ApproxParamOnCurve (const Standard_Integer Index, const Standard_Real ParamOnLine) const; Standard_EXPORT void Dump() const; - - - protected: - Standard_EXPORT void Init (const gp_Lin& Curve); - + Standard_EXPORT void Init (const gp_Lin& Curve, const TColStd_Array1OfReal& Upars); - - - private: - - Bnd_Box TheBnd; Standard_Real TheDeflection; Standard_Integer NbPntIn; @@ -109,26 +104,6 @@ private: Standard_Real Bsup; Handle(TColStd_HArray1OfReal) myParams; - }; -#define TheCurve gp_Lin -#define TheCurve_hxx -#define TheCurveTool HLRBRep_LineTool -#define TheCurveTool_hxx -#define IntCurveSurface_Polygon HLRBRep_ThePolygonOfInterCSurf -#define IntCurveSurface_Polygon_hxx - -#include - -#undef TheCurve -#undef TheCurve_hxx -#undef TheCurveTool -#undef TheCurveTool_hxx -#undef IntCurveSurface_Polygon -#undef IntCurveSurface_Polygon_hxx - - - - #endif // _HLRBRep_ThePolygonOfInterCSurf_HeaderFile diff --git a/src/HLRTopoBRep/HLRTopoBRep_DSFiller.cxx b/src/HLRTopoBRep/HLRTopoBRep_DSFiller.cxx index 51c0e5676a..ea0a8477ca 100644 --- a/src/HLRTopoBRep/HLRTopoBRep_DSFiller.cxx +++ b/src/HLRTopoBRep/HLRTopoBRep_DSFiller.cxx @@ -26,7 +26,6 @@ #include #include #include -#include #include #include #include @@ -86,7 +85,7 @@ void HLRTopoBRep_DSFiller::Insert (const TopoDS_Shape& S, TopoDS_Face S1 = TopoDS::Face(ex.Current()); S1.Orientation(TopAbs_FORWARD); Handle(BRepTopAdaptor_TopolTool) Domain; - Handle(Adaptor3d_HSurface) Surface; + Handle(Adaptor3d_Surface) Surface; if(MST.IsBound(S1)) { BRepTopAdaptor_Tool& BRT = MST.ChangeFind(S1); Domain = BRT.GetTopolTool(); @@ -152,7 +151,7 @@ void HLRTopoBRep_DSFiller::InsertFace (const Standard_Integer /*FI*/, if (Line.TypeContour() == Contap_Restriction) { // OutLine on restriction - TopoDS_Edge E = (*(BRepAdaptor_Curve2d*)&(Line.Arc()->Curve2d())).Edge(); + TopoDS_Edge E = (*(BRepAdaptor_Curve2d*)(Line.Arc().get())).Edge(); OutL.Append(E); TopExp::Vertices(E,VF,VL); // insert the Internal points. @@ -510,8 +509,7 @@ HLRTopoBRep_DSFiller::MakeVertex (const Contap_Point& P, else { // if on arc, insert in the DS if (P.IsOnArc()) { - const TopoDS_Edge& E = - (*(BRepAdaptor_Curve2d*)&((P.Arc())->Curve2d())).Edge(); + const TopoDS_Edge& E = (*(BRepAdaptor_Curve2d*)(P.Arc().get())).Edge(); Standard_Real Par = P.ParameterOnArc(); const gp_Pnt& P3d = P.Value(); diff --git a/src/IMeshData/IMeshData_Face.hxx b/src/IMeshData/IMeshData_Face.hxx index f86a9d767f..711da8344d 100644 --- a/src/IMeshData/IMeshData_Face.hxx +++ b/src/IMeshData/IMeshData_Face.hxx @@ -23,7 +23,7 @@ #include #include #include -#include +#include class IMeshData_Wire; class TopoDS_Wire; @@ -53,7 +53,7 @@ public: const Standard_Integer theIndex) const = 0; //! Returns face's surface. - const Handle(BRepAdaptor_HSurface)& GetSurface() const + const Handle(BRepAdaptor_Surface)& GetSurface() const { return mySurface; } @@ -82,12 +82,12 @@ protected: : IMeshData_TessellatedShape(theFace) { BRepAdaptor_Surface aSurfAdaptor(GetFace(), Standard_False); - mySurface = new BRepAdaptor_HSurface(aSurfAdaptor); + mySurface = new BRepAdaptor_Surface(aSurfAdaptor); } private: - mutable Handle(BRepAdaptor_HSurface) mySurface; + mutable Handle(BRepAdaptor_Surface) mySurface; }; #endif \ No newline at end of file diff --git a/src/IVtkOCC/IVtkOCC_ShapeMesher.hxx b/src/IVtkOCC/IVtkOCC_ShapeMesher.hxx index 3c522f50f2..e2327d128d 100644 --- a/src/IVtkOCC/IVtkOCC_ShapeMesher.hxx +++ b/src/IVtkOCC/IVtkOCC_ShapeMesher.hxx @@ -16,7 +16,7 @@ #ifndef __IVTKOCC_SHAPEMESHER_H__ #define __IVTKOCC_SHAPEMESHER_H__ -#include +#include #include #include #include diff --git a/src/IntCurveSurface/FILES b/src/IntCurveSurface/FILES index 60750d90de..e40e709727 100644 --- a/src/IntCurveSurface/FILES +++ b/src/IntCurveSurface/FILES @@ -11,7 +11,6 @@ IntCurveSurface_IntersectionPoint.lxx IntCurveSurface_IntersectionSegment.cxx IntCurveSurface_IntersectionSegment.hxx IntCurveSurface_Polygon.gxx -IntCurveSurface_Polygon.lxx IntCurveSurface_PolygonTool.gxx IntCurveSurface_PolygonTool.lxx IntCurveSurface_Polyhedron.gxx diff --git a/src/IntCurveSurface/IntCurveSurface_HInter.hxx b/src/IntCurveSurface/IntCurveSurface_HInter.hxx index e4e949f389..99fd746b07 100644 --- a/src/IntCurveSurface/IntCurveSurface_HInter.hxx +++ b/src/IntCurveSurface/IntCurveSurface_HInter.hxx @@ -17,17 +17,13 @@ #ifndef _IntCurveSurface_HInter_HeaderFile #define _IntCurveSurface_HInter_HeaderFile -#include -#include -#include - +#include +#include #include -#include #include #include -class Adaptor3d_HCurve; + class IntCurveSurface_TheHCurveTool; -class Adaptor3d_HSurface; class Adaptor3d_HSurfaceTool; class IntCurveSurface_ThePolygonOfHInter; class IntCurveSurface_ThePolygonToolOfHInter; @@ -47,8 +43,6 @@ class gp_Hypr; class IntAna_IntConicQuad; class Bnd_Box; - - class IntCurveSurface_HInter : public IntCurveSurface_Intersection { public: @@ -61,29 +55,29 @@ public: //! Compute the Intersection between the curve and the //! surface - Standard_EXPORT void Perform (const Handle(Adaptor3d_HCurve)& Curve, const Handle(Adaptor3d_HSurface)& Surface); + Standard_EXPORT void Perform (const Handle(Adaptor3d_Curve)& Curve, const Handle(Adaptor3d_Surface)& Surface); //! Compute the Intersection between the curve and //! the surface. The Curve is already sampled and //! its polygon : is given. - Standard_EXPORT void Perform (const Handle(Adaptor3d_HCurve)& Curve, const IntCurveSurface_ThePolygonOfHInter& Polygon, const Handle(Adaptor3d_HSurface)& Surface); + Standard_EXPORT void Perform (const Handle(Adaptor3d_Curve)& Curve, const IntCurveSurface_ThePolygonOfHInter& Polygon, const Handle(Adaptor3d_Surface)& Surface); //! Compute the Intersection between the curve and //! the surface. The Curve is already sampled and //! its polygon : is given. The Surface is //! also sampled and is given. - Standard_EXPORT void Perform (const Handle(Adaptor3d_HCurve)& Curve, const IntCurveSurface_ThePolygonOfHInter& ThePolygon, const Handle(Adaptor3d_HSurface)& Surface, const IntCurveSurface_ThePolyhedronOfHInter& Polyhedron); + Standard_EXPORT void Perform (const Handle(Adaptor3d_Curve)& Curve, const IntCurveSurface_ThePolygonOfHInter& ThePolygon, const Handle(Adaptor3d_Surface)& Surface, const IntCurveSurface_ThePolyhedronOfHInter& Polyhedron); //! Compute the Intersection between the curve and //! the surface. The Curve is already sampled and //! its polygon : is given. The Surface is //! also sampled and is given. - Standard_EXPORT void Perform (const Handle(Adaptor3d_HCurve)& Curve, const IntCurveSurface_ThePolygonOfHInter& ThePolygon, const Handle(Adaptor3d_HSurface)& Surface, const IntCurveSurface_ThePolyhedronOfHInter& Polyhedron, Bnd_BoundSortBox& BndBSB); + Standard_EXPORT void Perform (const Handle(Adaptor3d_Curve)& Curve, const IntCurveSurface_ThePolygonOfHInter& ThePolygon, const Handle(Adaptor3d_Surface)& Surface, const IntCurveSurface_ThePolyhedronOfHInter& Polyhedron, Bnd_BoundSortBox& BndBSB); //! Compute the Intersection between the curve and //! the surface. The Surface is already sampled and //! its polyhedron : is given. - Standard_EXPORT void Perform (const Handle(Adaptor3d_HCurve)& Curve, const Handle(Adaptor3d_HSurface)& Surface, const IntCurveSurface_ThePolyhedronOfHInter& Polyhedron); + Standard_EXPORT void Perform (const Handle(Adaptor3d_Curve)& Curve, const Handle(Adaptor3d_Surface)& Surface, const IntCurveSurface_ThePolyhedronOfHInter& Polyhedron); @@ -93,31 +87,31 @@ protected: //! Compute the Intersection between the curve and the //! surface - Standard_EXPORT void Perform (const Handle(Adaptor3d_HCurve)& Curve, const Handle(Adaptor3d_HSurface)& Surface, const Standard_Real U0, const Standard_Real V0, const Standard_Real U1, const Standard_Real V1); + Standard_EXPORT void Perform (const Handle(Adaptor3d_Curve)& Curve, const Handle(Adaptor3d_Surface)& Surface, const Standard_Real U0, const Standard_Real V0, const Standard_Real U1, const Standard_Real V1); - Standard_EXPORT void InternalPerformCurveQuadric (const Handle(Adaptor3d_HCurve)& Curve, const Handle(Adaptor3d_HSurface)& Surface); + Standard_EXPORT void InternalPerformCurveQuadric (const Handle(Adaptor3d_Curve)& Curve, const Handle(Adaptor3d_Surface)& Surface); - Standard_EXPORT void InternalPerform (const Handle(Adaptor3d_HCurve)& Curve, const IntCurveSurface_ThePolygonOfHInter& Polygon, const Handle(Adaptor3d_HSurface)& Surface, const IntCurveSurface_ThePolyhedronOfHInter& Polyhedron, const Standard_Real U1, const Standard_Real V1, const Standard_Real U2, const Standard_Real V2); + Standard_EXPORT void InternalPerform (const Handle(Adaptor3d_Curve)& Curve, const IntCurveSurface_ThePolygonOfHInter& Polygon, const Handle(Adaptor3d_Surface)& Surface, const IntCurveSurface_ThePolyhedronOfHInter& Polyhedron, const Standard_Real U1, const Standard_Real V1, const Standard_Real U2, const Standard_Real V2); - Standard_EXPORT void InternalPerform (const Handle(Adaptor3d_HCurve)& Curve, const IntCurveSurface_ThePolygonOfHInter& Polygon, const Handle(Adaptor3d_HSurface)& Surface, const IntCurveSurface_ThePolyhedronOfHInter& Polyhedron, const Standard_Real U1, const Standard_Real V1, const Standard_Real U2, const Standard_Real V2, Bnd_BoundSortBox& BSB); + Standard_EXPORT void InternalPerform (const Handle(Adaptor3d_Curve)& Curve, const IntCurveSurface_ThePolygonOfHInter& Polygon, const Handle(Adaptor3d_Surface)& Surface, const IntCurveSurface_ThePolyhedronOfHInter& Polyhedron, const Standard_Real U1, const Standard_Real V1, const Standard_Real U2, const Standard_Real V2, Bnd_BoundSortBox& BSB); - Standard_EXPORT void InternalPerform (const Handle(Adaptor3d_HCurve)& Curve, const IntCurveSurface_ThePolygonOfHInter& Polygon, const Handle(Adaptor3d_HSurface)& Surface, const Standard_Real U1, const Standard_Real V1, const Standard_Real U2, const Standard_Real V2); + Standard_EXPORT void InternalPerform (const Handle(Adaptor3d_Curve)& Curve, const IntCurveSurface_ThePolygonOfHInter& Polygon, const Handle(Adaptor3d_Surface)& Surface, const Standard_Real U1, const Standard_Real V1, const Standard_Real U2, const Standard_Real V2); - Standard_EXPORT void PerformConicSurf (const gp_Lin& Line, const Handle(Adaptor3d_HCurve)& Curve, const Handle(Adaptor3d_HSurface)& Surface, const Standard_Real U1, const Standard_Real V1, const Standard_Real U2, const Standard_Real V2); + Standard_EXPORT void PerformConicSurf (const gp_Lin& Line, const Handle(Adaptor3d_Curve)& Curve, const Handle(Adaptor3d_Surface)& Surface, const Standard_Real U1, const Standard_Real V1, const Standard_Real U2, const Standard_Real V2); - Standard_EXPORT void PerformConicSurf (const gp_Circ& Circle, const Handle(Adaptor3d_HCurve)& Curve, const Handle(Adaptor3d_HSurface)& Surface, const Standard_Real U1, const Standard_Real V1, const Standard_Real U2, const Standard_Real V2); + Standard_EXPORT void PerformConicSurf (const gp_Circ& Circle, const Handle(Adaptor3d_Curve)& Curve, const Handle(Adaptor3d_Surface)& Surface, const Standard_Real U1, const Standard_Real V1, const Standard_Real U2, const Standard_Real V2); - Standard_EXPORT void PerformConicSurf (const gp_Elips& Ellipse, const Handle(Adaptor3d_HCurve)& Curve, const Handle(Adaptor3d_HSurface)& Surface, const Standard_Real U1, const Standard_Real V1, const Standard_Real U2, const Standard_Real V2); + Standard_EXPORT void PerformConicSurf (const gp_Elips& Ellipse, const Handle(Adaptor3d_Curve)& Curve, const Handle(Adaptor3d_Surface)& Surface, const Standard_Real U1, const Standard_Real V1, const Standard_Real U2, const Standard_Real V2); - Standard_EXPORT void PerformConicSurf (const gp_Parab& Parab, const Handle(Adaptor3d_HCurve)& Curve, const Handle(Adaptor3d_HSurface)& Surface, const Standard_Real U1, const Standard_Real V1, const Standard_Real U2, const Standard_Real V2); + Standard_EXPORT void PerformConicSurf (const gp_Parab& Parab, const Handle(Adaptor3d_Curve)& Curve, const Handle(Adaptor3d_Surface)& Surface, const Standard_Real U1, const Standard_Real V1, const Standard_Real U2, const Standard_Real V2); - Standard_EXPORT void PerformConicSurf (const gp_Hypr& Hyper, const Handle(Adaptor3d_HCurve)& Curve, const Handle(Adaptor3d_HSurface)& Surface, const Standard_Real U1, const Standard_Real V1, const Standard_Real U2, const Standard_Real V2); + Standard_EXPORT void PerformConicSurf (const gp_Hypr& Hyper, const Handle(Adaptor3d_Curve)& Curve, const Handle(Adaptor3d_Surface)& Surface, const Standard_Real U1, const Standard_Real V1, const Standard_Real U2, const Standard_Real V2); - Standard_EXPORT void AppendIntAna (const Handle(Adaptor3d_HCurve)& Curve, const Handle(Adaptor3d_HSurface)& Surface, const IntAna_IntConicQuad& InterAna); + Standard_EXPORT void AppendIntAna (const Handle(Adaptor3d_Curve)& Curve, const Handle(Adaptor3d_Surface)& Surface, const IntAna_IntConicQuad& InterAna); - Standard_EXPORT void AppendPoint (const Handle(Adaptor3d_HCurve)& Curve, const Standard_Real w, const Handle(Adaptor3d_HSurface)& Surface, const Standard_Real u, const Standard_Real v); + Standard_EXPORT void AppendPoint (const Handle(Adaptor3d_Curve)& Curve, const Standard_Real w, const Handle(Adaptor3d_Surface)& Surface, const Standard_Real u, const Standard_Real v); - Standard_EXPORT void AppendSegment (const Handle(Adaptor3d_HCurve)& Curve, const Standard_Real u0, const Standard_Real u1, const Handle(Adaptor3d_HSurface)& Surface); + Standard_EXPORT void AppendSegment (const Handle(Adaptor3d_Curve)& Curve, const Standard_Real u0, const Standard_Real u1, const Handle(Adaptor3d_Surface)& Surface); @@ -125,9 +119,9 @@ protected: private: - Standard_EXPORT void DoSurface (const Handle(Adaptor3d_HSurface)& surface, const Standard_Real u0, const Standard_Real u1, const Standard_Real v0, const Standard_Real v1, TColgp_Array2OfPnt& pntsOnSurface, Bnd_Box& boxSurface, Standard_Real& gap); + Standard_EXPORT void DoSurface (const Handle(Adaptor3d_Surface)& surface, const Standard_Real u0, const Standard_Real u1, const Standard_Real v0, const Standard_Real v1, TColgp_Array2OfPnt& pntsOnSurface, Bnd_Box& boxSurface, Standard_Real& gap); - Standard_EXPORT void DoNewBounds (const Handle(Adaptor3d_HSurface)& surface, const Standard_Real u0, const Standard_Real u1, const Standard_Real v0, const Standard_Real v1, const TColgp_Array2OfPnt& pntsOnSurface, const TColStd_Array1OfReal& X, const TColStd_Array1OfReal& Y, const TColStd_Array1OfReal& Z, TColStd_Array1OfReal& Bounds); + Standard_EXPORT void DoNewBounds (const Handle(Adaptor3d_Surface)& surface, const Standard_Real u0, const Standard_Real u1, const Standard_Real v0, const Standard_Real v1, const TColgp_Array2OfPnt& pntsOnSurface, const TColStd_Array1OfReal& X, const TColStd_Array1OfReal& Y, const TColStd_Array1OfReal& Z, TColStd_Array1OfReal& Bounds); diff --git a/src/IntCurveSurface/IntCurveSurface_HInter_0.cxx b/src/IntCurveSurface/IntCurveSurface_HInter_0.cxx index ed0ade756f..5e494e72fb 100644 --- a/src/IntCurveSurface/IntCurveSurface_HInter_0.cxx +++ b/src/IntCurveSurface/IntCurveSurface_HInter_0.cxx @@ -16,9 +16,9 @@ #include -#include +#include #include -#include +#include #include #include #include @@ -39,12 +39,12 @@ #include -#define TheCurve Handle(Adaptor3d_HCurve) -#define TheCurve_hxx +#define TheCurve Handle(Adaptor3d_Curve) +#define TheCurve_hxx #define TheCurveTool IntCurveSurface_TheHCurveTool #define TheCurveTool_hxx -#define TheSurface Handle(Adaptor3d_HSurface) -#define TheSurface_hxx +#define TheSurface Handle(Adaptor3d_Surface) +#define TheSurface_hxx #define TheSurfaceTool Adaptor3d_HSurfaceTool #define TheSurfaceTool_hxx #define IntCurveSurface_ThePolygon IntCurveSurface_ThePolygonOfHInter diff --git a/src/IntCurveSurface/IntCurveSurface_Inter.gxx b/src/IntCurveSurface/IntCurveSurface_Inter.gxx index 49b88d9e7c..3624a2f857 100644 --- a/src/IntCurveSurface/IntCurveSurface_Inter.gxx +++ b/src/IntCurveSurface/IntCurveSurface_Inter.gxx @@ -66,8 +66,8 @@ #include #include #include -#include -#include +#include +#include #include @@ -872,7 +872,7 @@ void IntCurveSurface_Inter::InternalPerform(const TheCurve& curve, InternalPerform(curve,polygon,surface,polyhedron,U1,V1,U2,V2); } else { - Handle(Adaptor3d_HSurface) aS = TheSurfaceTool::UTrim(surface, U1, U2, 1.e-9); + Handle(Adaptor3d_Surface) aS = TheSurfaceTool::UTrim(surface, U1, U2, 1.e-9); aS = aS->VTrim(V1, V2, 1.e-9); Handle(Adaptor3d_TopolTool) aTopTool = new Adaptor3d_TopolTool(aS); Standard_Real defl = 0.1; @@ -1515,7 +1515,7 @@ void EstLimForInfExtr(const gp_Lin& Line, NoIntersection = Standard_False; - Handle(Adaptor3d_HSurface) aBasSurf; + Handle(Adaptor3d_Surface) aBasSurf; if(IsOffSurf) aBasSurf = TheSurfaceTool::BasisSurface(surface); @@ -1581,7 +1581,7 @@ void EstLimForInfExtr(const gp_Lin& Line, TheSurfaceTool::D0(surface, u0, v0, aP); gp_Pln aRefPln(aP, aDirOfExt); - Handle(Adaptor3d_HCurve) aBasCurv; + Handle(Adaptor3d_Curve) aBasCurv; if(IsOffSurf) aBasCurv = aBasSurf->BasisCurve(); else aBasCurv = TheSurfaceTool::BasisCurve(surface); @@ -1787,7 +1787,7 @@ void EstLimForInfRevl(const gp_Lin& Line, if (! V1inf && !V2inf) return; } - Handle(Adaptor3d_HCurve) aBasisCurve = TheSurfaceTool::BasisCurve(surface); + Handle(Adaptor3d_Curve) aBasisCurve = TheSurfaceTool::BasisCurve(surface); gp_Ax1 aRevAx = TheSurfaceTool::AxeOfRevolution(surface); gp_Vec aXVec = aRevAx.Direction(); Standard_Real aTolAng = Precision::Angular(); @@ -1884,7 +1884,7 @@ void EstLimForInfOffs(const gp_Lin& Line, NoIntersection = Standard_False; - const Handle(Adaptor3d_HSurface)& aBasSurf = TheSurfaceTool::BasisSurface(surface); + const Handle(Adaptor3d_Surface)& aBasSurf = TheSurfaceTool::BasisSurface(surface); Standard_Real anOffVal = TheSurfaceTool::OffsetValue(surface); GeomAbs_SurfaceType aTypeOfBasSurf = aBasSurf->GetType(); diff --git a/src/IntCurveSurface/IntCurveSurface_Polygon.lxx b/src/IntCurveSurface/IntCurveSurface_Polygon.lxx deleted file mode 100644 index 846895e442..0000000000 --- a/src/IntCurveSurface/IntCurveSurface_Polygon.lxx +++ /dev/null @@ -1,59 +0,0 @@ -// Created on: 1993-06-03 -// Created by: Laurent BUCHARD -// Copyright (c) 1993-1999 Matra Datavision -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - -//====================================================================== -inline const Bnd_Box& IntCurveSurface_Polygon::Bounding(void) const { - return(TheBnd); -} -//====================================================================== -inline Standard_Real IntCurveSurface_Polygon::DeflectionOverEstimation() const { - return(TheDeflection); -} -//====================================================================== -inline void IntCurveSurface_Polygon::SetDeflectionOverEstimation - (const Standard_Real x) { - TheDeflection = x; - TheBnd.Enlarge(TheDeflection); -} -//====================================================================== -inline void IntCurveSurface_Polygon::Closed(const Standard_Boolean flag) { - ClosedPolygon = flag; -} -//====================================================================== -inline Standard_Boolean IntCurveSurface_Polygon::Closed(void) const { - return(Standard_False); //-- Voir si le cas Closed est traitable -} -//====================================================================== -inline Standard_Integer IntCurveSurface_Polygon::NbSegments(void) const { - return(NbPntIn-1); -} -//====================================================================== -inline const gp_Pnt& IntCurveSurface_Polygon::BeginOfSeg(const Standard_Integer Index) const { - return ThePnts(Index); -} -//====================================================================== -inline const gp_Pnt& IntCurveSurface_Polygon::EndOfSeg(const Standard_Integer TheIndex) const { - return ThePnts(TheIndex+1); -} -//====================================================================== -inline Standard_Real IntCurveSurface_Polygon::InfParameter() const { - return(Binf); -} -//====================================================================== -inline Standard_Real IntCurveSurface_Polygon::SupParameter() const { - return(Bsup); -} -//====================================================================== diff --git a/src/IntCurveSurface/IntCurveSurface_TheCSFunctionOfHInter.hxx b/src/IntCurveSurface/IntCurveSurface_TheCSFunctionOfHInter.hxx index 6e83ac6339..1225ddf462 100644 --- a/src/IntCurveSurface/IntCurveSurface_TheCSFunctionOfHInter.hxx +++ b/src/IntCurveSurface/IntCurveSurface_TheCSFunctionOfHInter.hxx @@ -17,24 +17,15 @@ #ifndef _IntCurveSurface_TheCSFunctionOfHInter_HeaderFile #define _IntCurveSurface_TheCSFunctionOfHInter_HeaderFile -#include -#include -#include - +#include +#include #include -#include #include -#include -#include #include -class Adaptor3d_HSurface; -class Adaptor3d_HCurve; + class Adaptor3d_HSurfaceTool; class IntCurveSurface_TheHCurveTool; class math_Matrix; -class gp_Pnt; - - class IntCurveSurface_TheCSFunctionOfHInter : public math_FunctionSetWithDerivatives { @@ -43,7 +34,7 @@ public: DEFINE_STANDARD_ALLOC - Standard_EXPORT IntCurveSurface_TheCSFunctionOfHInter(const Handle(Adaptor3d_HSurface)& S, const Handle(Adaptor3d_HCurve)& C); + Standard_EXPORT IntCurveSurface_TheCSFunctionOfHInter(const Handle(Adaptor3d_Surface)& S, const Handle(Adaptor3d_Curve)& C); Standard_EXPORT Standard_Integer NbVariables() const; @@ -59,9 +50,9 @@ public: Standard_EXPORT Standard_Real Root() const; - Standard_EXPORT const Handle(Adaptor3d_HSurface)& AuxillarSurface() const; + Standard_EXPORT const Handle(Adaptor3d_Surface)& AuxillarSurface() const; - Standard_EXPORT const Handle(Adaptor3d_HCurve)& AuxillarCurve() const; + Standard_EXPORT const Handle(Adaptor3d_Curve)& AuxillarCurve() const; @@ -76,8 +67,8 @@ private: - Handle(Adaptor3d_HSurface) surface; - Handle(Adaptor3d_HCurve) curve; + Handle(Adaptor3d_Surface) surface; + Handle(Adaptor3d_Curve) curve; gp_Pnt p; Standard_Real f; diff --git a/src/IntCurveSurface/IntCurveSurface_TheCSFunctionOfHInter_0.cxx b/src/IntCurveSurface/IntCurveSurface_TheCSFunctionOfHInter_0.cxx index d3eaac4b7f..3c9780a8e0 100644 --- a/src/IntCurveSurface/IntCurveSurface_TheCSFunctionOfHInter_0.cxx +++ b/src/IntCurveSurface/IntCurveSurface_TheCSFunctionOfHInter_0.cxx @@ -16,20 +16,20 @@ #include -#include -#include +#include +#include #include #include #include #include -#define ThePSurface Handle(Adaptor3d_HSurface) -#define ThePSurface_hxx +#define ThePSurface Handle(Adaptor3d_Surface) +#define ThePSurface_hxx #define ThePSurfaceTool Adaptor3d_HSurfaceTool #define ThePSurfaceTool_hxx -#define TheCurve Handle(Adaptor3d_HCurve) -#define TheCurve_hxx +#define TheCurve Handle(Adaptor3d_Curve) +#define TheCurve_hxx #define TheCurveTool IntCurveSurface_TheHCurveTool #define TheCurveTool_hxx #define IntImp_ZerCSParFunc IntCurveSurface_TheCSFunctionOfHInter diff --git a/src/IntCurveSurface/IntCurveSurface_TheExactHInter.hxx b/src/IntCurveSurface/IntCurveSurface_TheExactHInter.hxx index c6168a841a..a2b6f2c6dc 100644 --- a/src/IntCurveSurface/IntCurveSurface_TheExactHInter.hxx +++ b/src/IntCurveSurface/IntCurveSurface_TheExactHInter.hxx @@ -17,24 +17,13 @@ #ifndef _IntCurveSurface_TheExactHInter_HeaderFile #define _IntCurveSurface_TheExactHInter_HeaderFile -#include -#include -#include - -#include +#include #include -#include -class StdFail_NotDone; -class Standard_DomainError; -class Adaptor3d_HSurface; + class Adaptor3d_HSurfaceTool; -class Adaptor3d_HCurve; class IntCurveSurface_TheHCurveTool; class IntCurveSurface_TheCSFunctionOfHInter; class math_FunctionSetRoot; -class gp_Pnt; - - class IntCurveSurface_TheExactHInter { diff --git a/src/IntCurveSurface/IntCurveSurface_TheExactHInter_0.cxx b/src/IntCurveSurface/IntCurveSurface_TheExactHInter_0.cxx index bf96e16edb..fcac3f65a2 100644 --- a/src/IntCurveSurface/IntCurveSurface_TheExactHInter_0.cxx +++ b/src/IntCurveSurface/IntCurveSurface_TheExactHInter_0.cxx @@ -18,21 +18,21 @@ #include #include -#include +#include #include -#include +#include #include #include #include #include -#define ThePSurface Handle(Adaptor3d_HSurface) -#define ThePSurface_hxx +#define ThePSurface Handle(Adaptor3d_Surface) +#define ThePSurface_hxx #define ThePSurfaceTool Adaptor3d_HSurfaceTool #define ThePSurfaceTool_hxx -#define TheCurve Handle(Adaptor3d_HCurve) -#define TheCurve_hxx +#define TheCurve Handle(Adaptor3d_Curve) +#define TheCurve_hxx #define TheCurveTool IntCurveSurface_TheHCurveTool #define TheCurveTool_hxx #define TheFunction IntCurveSurface_TheCSFunctionOfHInter diff --git a/src/IntCurveSurface/IntCurveSurface_TheHCurveTool.hxx b/src/IntCurveSurface/IntCurveSurface_TheHCurveTool.hxx index fc3e4db536..0d37f26eb3 100644 --- a/src/IntCurveSurface/IntCurveSurface_TheHCurveTool.hxx +++ b/src/IntCurveSurface/IntCurveSurface_TheHCurveTool.hxx @@ -17,15 +17,9 @@ #ifndef _IntCurveSurface_TheHCurveTool_HeaderFile #define _IntCurveSurface_TheHCurveTool_HeaderFile -#include -#include -#include - -#include +#include #include -#include #include -#include #include #include #include @@ -38,7 +32,6 @@ class Standard_OutOfRange; class Standard_NoSuchObject; class Standard_DomainError; -class Adaptor3d_HCurve; class gp_Pnt; class gp_Vec; class Geom_BezierCurve; @@ -53,54 +46,54 @@ public: DEFINE_STANDARD_ALLOC - static Standard_Real FirstParameter (const Handle(Adaptor3d_HCurve)& C); + static Standard_Real FirstParameter (const Handle(Adaptor3d_Curve)& C); - static Standard_Real LastParameter (const Handle(Adaptor3d_HCurve)& C); + static Standard_Real LastParameter (const Handle(Adaptor3d_Curve)& C); - static GeomAbs_Shape Continuity (const Handle(Adaptor3d_HCurve)& C); + static GeomAbs_Shape Continuity (const Handle(Adaptor3d_Curve)& C); //! Returns the number of intervals for continuity //! . May be one if Continuity(myclass) >= - static Standard_Integer NbIntervals (const Handle(Adaptor3d_HCurve)& C, const GeomAbs_Shape S); + static Standard_Integer NbIntervals (const Handle(Adaptor3d_Curve)& C, const GeomAbs_Shape S); //! Stores in the parameters bounding the intervals //! of continuity . //! //! The array must provide enough room to accommodate //! for the parameters. i.e. T.Length() > NbIntervals() - static void Intervals (const Handle(Adaptor3d_HCurve)& C, TColStd_Array1OfReal& T, const GeomAbs_Shape S); + static void Intervals (const Handle(Adaptor3d_Curve)& C, TColStd_Array1OfReal& T, const GeomAbs_Shape S); - static Standard_Boolean IsClosed (const Handle(Adaptor3d_HCurve)& C); + static Standard_Boolean IsClosed (const Handle(Adaptor3d_Curve)& C); - static Standard_Boolean IsPeriodic (const Handle(Adaptor3d_HCurve)& C); + static Standard_Boolean IsPeriodic (const Handle(Adaptor3d_Curve)& C); - static Standard_Real Period (const Handle(Adaptor3d_HCurve)& C); + static Standard_Real Period (const Handle(Adaptor3d_Curve)& C); //! Computes the point of parameter U on the curve. - static gp_Pnt Value (const Handle(Adaptor3d_HCurve)& C, const Standard_Real U); + static gp_Pnt Value (const Handle(Adaptor3d_Curve)& C, const Standard_Real U); //! Computes the point of parameter U on the curve. - static void D0 (const Handle(Adaptor3d_HCurve)& C, const Standard_Real U, gp_Pnt& P); + static void D0 (const Handle(Adaptor3d_Curve)& C, const Standard_Real U, gp_Pnt& P); //! Computes the point of parameter U on the curve with its //! first derivative. //! Raised if the continuity of the current interval //! is not C1. - static void D1 (const Handle(Adaptor3d_HCurve)& C, const Standard_Real U, gp_Pnt& P, gp_Vec& V); + static void D1 (const Handle(Adaptor3d_Curve)& C, const Standard_Real U, gp_Pnt& P, gp_Vec& V); //! Returns the point P of parameter U, the first and second //! derivatives V1 and V2. //! Raised if the continuity of the current interval //! is not C2. - static void D2 (const Handle(Adaptor3d_HCurve)& C, const Standard_Real U, gp_Pnt& P, gp_Vec& V1, gp_Vec& V2); + static void D2 (const Handle(Adaptor3d_Curve)& C, const Standard_Real U, gp_Pnt& P, gp_Vec& V1, gp_Vec& V2); //! Returns the point P of parameter U, the first, the second //! and the third derivative. //! Raised if the continuity of the current interval //! is not C3. - static void D3 (const Handle(Adaptor3d_HCurve)& C, const Standard_Real U, gp_Pnt& P, gp_Vec& V1, gp_Vec& V2, gp_Vec& V3); + static void D3 (const Handle(Adaptor3d_Curve)& C, const Standard_Real U, gp_Pnt& P, gp_Vec& V1, gp_Vec& V2, gp_Vec& V3); //! The returned vector gives the value of the derivative for the @@ -108,34 +101,34 @@ public: //! Raised if the continuity of the current interval //! is not CN. //! Raised if N < 1. - static gp_Vec DN (const Handle(Adaptor3d_HCurve)& C, const Standard_Real U, const Standard_Integer N); + static gp_Vec DN (const Handle(Adaptor3d_Curve)& C, const Standard_Real U, const Standard_Integer N); //! Returns the parametric resolution corresponding //! to the real space resolution . - static Standard_Real Resolution (const Handle(Adaptor3d_HCurve)& C, const Standard_Real R3d); + static Standard_Real Resolution (const Handle(Adaptor3d_Curve)& C, const Standard_Real R3d); //! Returns the type of the curve in the current //! interval : Line, Circle, Ellipse, Hyperbola, //! Parabola, BezierCurve, BSplineCurve, OtherCurve. - static GeomAbs_CurveType GetType (const Handle(Adaptor3d_HCurve)& C); + static GeomAbs_CurveType GetType (const Handle(Adaptor3d_Curve)& C); - static gp_Lin Line (const Handle(Adaptor3d_HCurve)& C); + static gp_Lin Line (const Handle(Adaptor3d_Curve)& C); - static gp_Circ Circle (const Handle(Adaptor3d_HCurve)& C); + static gp_Circ Circle (const Handle(Adaptor3d_Curve)& C); - static gp_Elips Ellipse (const Handle(Adaptor3d_HCurve)& C); + static gp_Elips Ellipse (const Handle(Adaptor3d_Curve)& C); - static gp_Hypr Hyperbola (const Handle(Adaptor3d_HCurve)& C); + static gp_Hypr Hyperbola (const Handle(Adaptor3d_Curve)& C); - static gp_Parab Parabola (const Handle(Adaptor3d_HCurve)& C); + static gp_Parab Parabola (const Handle(Adaptor3d_Curve)& C); - static Handle(Geom_BezierCurve) Bezier (const Handle(Adaptor3d_HCurve)& C); + static Handle(Geom_BezierCurve) Bezier (const Handle(Adaptor3d_Curve)& C); - static Handle(Geom_BSplineCurve) BSpline (const Handle(Adaptor3d_HCurve)& C); + static Handle(Geom_BSplineCurve) BSpline (const Handle(Adaptor3d_Curve)& C); - Standard_EXPORT static Standard_Integer NbSamples (const Handle(Adaptor3d_HCurve)& C, const Standard_Real U0, const Standard_Real U1); + Standard_EXPORT static Standard_Integer NbSamples (const Handle(Adaptor3d_Curve)& C, const Standard_Real U0, const Standard_Real U1); - Standard_EXPORT static void SamplePars (const Handle(Adaptor3d_HCurve)& C, const Standard_Real U0, const Standard_Real U1, const Standard_Real Defl, const Standard_Integer NbMin, Handle(TColStd_HArray1OfReal)& Pars); + Standard_EXPORT static void SamplePars (const Handle(Adaptor3d_Curve)& C, const Standard_Real U0, const Standard_Real U1, const Standard_Real Defl, const Standard_Integer NbMin, Handle(TColStd_HArray1OfReal)& Pars); @@ -154,8 +147,8 @@ private: }; -#define CurveGen Handle(Adaptor3d_HCurve) -#define CurveGen_hxx +#define CurveGen Handle(Adaptor3d_Curve) +#define CurveGen_hxx #define IntCurveSurface_HCurveTool IntCurveSurface_TheHCurveTool #define IntCurveSurface_HCurveTool_hxx diff --git a/src/IntCurveSurface/IntCurveSurface_TheHCurveTool_0.cxx b/src/IntCurveSurface/IntCurveSurface_TheHCurveTool_0.cxx index 0a90d5665d..3e49b63fbc 100644 --- a/src/IntCurveSurface/IntCurveSurface_TheHCurveTool_0.cxx +++ b/src/IntCurveSurface/IntCurveSurface_TheHCurveTool_0.cxx @@ -19,15 +19,15 @@ #include #include #include -#include +#include #include #include #include #include -#define CurveGen Handle(Adaptor3d_HCurve) -#define CurveGen_hxx +#define CurveGen Handle(Adaptor3d_Curve) +#define CurveGen_hxx #define IntCurveSurface_HCurveTool IntCurveSurface_TheHCurveTool #define IntCurveSurface_HCurveTool_hxx #include diff --git a/src/IntCurveSurface/IntCurveSurface_ThePolygonOfHInter.hxx b/src/IntCurveSurface/IntCurveSurface_ThePolygonOfHInter.hxx index 59311806b3..84733f8eb8 100644 --- a/src/IntCurveSurface/IntCurveSurface_ThePolygonOfHInter.hxx +++ b/src/IntCurveSurface/IntCurveSurface_ThePolygonOfHInter.hxx @@ -17,25 +17,16 @@ #ifndef _IntCurveSurface_ThePolygonOfHInter_HeaderFile #define _IntCurveSurface_ThePolygonOfHInter_HeaderFile -#include -#include -#include - +#include #include -#include -#include #include -#include #include #include class Standard_OutOfRange; -class Adaptor3d_HCurve; class IntCurveSurface_TheHCurveTool; class Bnd_Box; class gp_Pnt; - - class IntCurveSurface_ThePolygonOfHInter { public: @@ -43,63 +34,58 @@ public: DEFINE_STANDARD_ALLOC - Standard_EXPORT IntCurveSurface_ThePolygonOfHInter(const Handle(Adaptor3d_HCurve)& Curve, const Standard_Integer NbPnt); + Standard_EXPORT IntCurveSurface_ThePolygonOfHInter(const Handle(Adaptor3d_Curve)& Curve, const Standard_Integer NbPnt); - Standard_EXPORT IntCurveSurface_ThePolygonOfHInter(const Handle(Adaptor3d_HCurve)& Curve, const Standard_Real U1, const Standard_Real U2, const Standard_Integer NbPnt); + Standard_EXPORT IntCurveSurface_ThePolygonOfHInter(const Handle(Adaptor3d_Curve)& Curve, const Standard_Real U1, const Standard_Real U2, const Standard_Integer NbPnt); - Standard_EXPORT IntCurveSurface_ThePolygonOfHInter(const Handle(Adaptor3d_HCurve)& Curve, const TColStd_Array1OfReal& Upars); + Standard_EXPORT IntCurveSurface_ThePolygonOfHInter(const Handle(Adaptor3d_Curve)& Curve, const TColStd_Array1OfReal& Upars); //! Give the bounding box of the polygon. - const Bnd_Box& Bounding() const; - - Standard_Real DeflectionOverEstimation() const; - - void SetDeflectionOverEstimation (const Standard_Real x); - - void Closed (const Standard_Boolean clos); - - Standard_Boolean Closed() const; - + const Bnd_Box& Bounding() const { return TheBnd; } + + Standard_Real DeflectionOverEstimation() const { return TheDeflection; } + + void SetDeflectionOverEstimation (const Standard_Real x) + { + TheDeflection = x; + TheBnd.Enlarge (TheDeflection); + } + + void Closed (const Standard_Boolean flag) { ClosedPolygon = flag; } + + Standard_Boolean Closed() const { return Standard_False; } // -- Voir si le cas Closed est traitable + //! Give the number of Segments in the polyline. - Standard_Integer NbSegments() const; - + Standard_Integer NbSegments() const { return NbPntIn - 1; } + //! Give the point of range Index in the Polygon. - const gp_Pnt& BeginOfSeg (const Standard_Integer Index) const; - + const gp_Pnt& BeginOfSeg (const Standard_Integer theIndex) const { return ThePnts (theIndex); } + //! Give the point of range Index in the Polygon. - const gp_Pnt& EndOfSeg (const Standard_Integer Index) const; - + const gp_Pnt& EndOfSeg (const Standard_Integer theIndex) const { return ThePnts (theIndex + 1); } + //! Returns the parameter (On the curve) //! of the first point of the Polygon - Standard_Real InfParameter() const; + Standard_Real InfParameter() const { return Binf; } //! Returns the parameter (On the curve) //! of the last point of the Polygon - Standard_Real SupParameter() const; - + Standard_Real SupParameter() const { return Bsup; } + //! Give an approximation of the parameter on the curve //! according to the discretization of the Curve. Standard_EXPORT Standard_Real ApproxParamOnCurve (const Standard_Integer Index, const Standard_Real ParamOnLine) const; Standard_EXPORT void Dump() const; - - - protected: + Standard_EXPORT void Init (const Handle(Adaptor3d_Curve)& Curve); - Standard_EXPORT void Init (const Handle(Adaptor3d_HCurve)& Curve); - - Standard_EXPORT void Init (const Handle(Adaptor3d_HCurve)& Curve, const TColStd_Array1OfReal& Upars); - - - + Standard_EXPORT void Init (const Handle(Adaptor3d_Curve)& Curve, const TColStd_Array1OfReal& Upars); private: - - Bnd_Box TheBnd; Standard_Real TheDeflection; Standard_Integer NbPntIn; @@ -109,26 +95,6 @@ private: Standard_Real Bsup; Handle(TColStd_HArray1OfReal) myParams; - }; -#define TheCurve Handle(Adaptor3d_HCurve) -#define TheCurve_hxx -#define TheCurveTool IntCurveSurface_TheHCurveTool -#define TheCurveTool_hxx -#define IntCurveSurface_Polygon IntCurveSurface_ThePolygonOfHInter -#define IntCurveSurface_Polygon_hxx - -#include - -#undef TheCurve -#undef TheCurve_hxx -#undef TheCurveTool -#undef TheCurveTool_hxx -#undef IntCurveSurface_Polygon -#undef IntCurveSurface_Polygon_hxx - - - - #endif // _IntCurveSurface_ThePolygonOfHInter_HeaderFile diff --git a/src/IntCurveSurface/IntCurveSurface_ThePolygonOfHInter_0.cxx b/src/IntCurveSurface/IntCurveSurface_ThePolygonOfHInter_0.cxx index 1f5f568b53..6ea6bb6c2d 100644 --- a/src/IntCurveSurface/IntCurveSurface_ThePolygonOfHInter_0.cxx +++ b/src/IntCurveSurface/IntCurveSurface_ThePolygonOfHInter_0.cxx @@ -17,14 +17,14 @@ #include #include -#include +#include #include #include #include -#define TheCurve Handle(Adaptor3d_HCurve) -#define TheCurve_hxx +#define TheCurve Handle(Adaptor3d_Curve) +#define TheCurve_hxx #define TheCurveTool IntCurveSurface_TheHCurveTool #define TheCurveTool_hxx #define IntCurveSurface_Polygon IntCurveSurface_ThePolygonOfHInter diff --git a/src/IntCurveSurface/IntCurveSurface_ThePolyhedronOfHInter.hxx b/src/IntCurveSurface/IntCurveSurface_ThePolyhedronOfHInter.hxx index 2d1e8e86f7..ddd6e3ef1f 100644 --- a/src/IntCurveSurface/IntCurveSurface_ThePolyhedronOfHInter.hxx +++ b/src/IntCurveSurface/IntCurveSurface_ThePolyhedronOfHInter.hxx @@ -17,25 +17,13 @@ #ifndef _IntCurveSurface_ThePolyhedronOfHInter_HeaderFile #define _IntCurveSurface_ThePolyhedronOfHInter_HeaderFile -#include -#include -#include - -#include +#include #include #include -#include -#include -#include #include -class Standard_OutOfRange; -class Adaptor3d_HSurface; + class Adaptor3d_HSurfaceTool; -class gp_Pnt; class Bnd_Box; -class gp_XYZ; - - class IntCurveSurface_ThePolyhedronOfHInter { @@ -44,9 +32,9 @@ public: DEFINE_STANDARD_ALLOC - Standard_EXPORT IntCurveSurface_ThePolyhedronOfHInter(const Handle(Adaptor3d_HSurface)& Surface, const Standard_Integer nbdU, const Standard_Integer nbdV, const Standard_Real U1, const Standard_Real V1, const Standard_Real U2, const Standard_Real V2); + Standard_EXPORT IntCurveSurface_ThePolyhedronOfHInter(const Handle(Adaptor3d_Surface)& Surface, const Standard_Integer nbdU, const Standard_Integer nbdV, const Standard_Real U1, const Standard_Real V1, const Standard_Real U2, const Standard_Real V2); - Standard_EXPORT IntCurveSurface_ThePolyhedronOfHInter(const Handle(Adaptor3d_HSurface)& Surface, const TColStd_Array1OfReal& Upars, const TColStd_Array1OfReal& Vpars); + Standard_EXPORT IntCurveSurface_ThePolyhedronOfHInter(const Handle(Adaptor3d_Surface)& Surface, const TColStd_Array1OfReal& Upars, const TColStd_Array1OfReal& Vpars); Standard_EXPORT void Destroy(); ~IntCurveSurface_ThePolyhedronOfHInter() @@ -56,7 +44,7 @@ public: Standard_EXPORT void DeflectionOverEstimation (const Standard_Real flec); - Standard_EXPORT Standard_Real DeflectionOnTriangle (const Handle(Adaptor3d_HSurface)& Surface, const Standard_Integer Index) const; + Standard_EXPORT Standard_Real DeflectionOnTriangle (const Handle(Adaptor3d_Surface)& Surface, const Standard_Integer Index) const; Standard_EXPORT void UMinSingularity (const Standard_Boolean Sing); @@ -147,9 +135,9 @@ public: protected: - Standard_EXPORT void Init (const Handle(Adaptor3d_HSurface)& Surface, const Standard_Real U1, const Standard_Real V1, const Standard_Real U2, const Standard_Real V2); + Standard_EXPORT void Init (const Handle(Adaptor3d_Surface)& Surface, const Standard_Real U1, const Standard_Real V1, const Standard_Real U2, const Standard_Real V2); - Standard_EXPORT void Init (const Handle(Adaptor3d_HSurface)& Surface, const TColStd_Array1OfReal& Upars, const TColStd_Array1OfReal& Vpars); + Standard_EXPORT void Init (const Handle(Adaptor3d_Surface)& Surface, const TColStd_Array1OfReal& Upars, const TColStd_Array1OfReal& Vpars); @@ -159,7 +147,7 @@ private: //! This method computes and returns a deflection of isoline //! of given parameter on Surface. - Standard_EXPORT Standard_Real ComputeBorderDeflection (const Handle(Adaptor3d_HSurface)& Surface, const Standard_Real Parameter, const Standard_Real PMin, const Standard_Real PMax, const Standard_Boolean isUIso) const; + Standard_EXPORT Standard_Real ComputeBorderDeflection (const Handle(Adaptor3d_Surface)& Surface, const Standard_Real Parameter, const Standard_Real PMin, const Standard_Real PMax, const Standard_Boolean isUIso) const; Standard_Integer nbdeltaU; @@ -180,8 +168,8 @@ private: }; -#define ThePSurface Handle(Adaptor3d_HSurface) -#define ThePSurface_hxx +#define ThePSurface Handle(Adaptor3d_Surface) +#define ThePSurface_hxx #define ThePSurfaceTool Adaptor3d_HSurfaceTool #define ThePSurfaceTool_hxx #define IntCurveSurface_Polyhedron IntCurveSurface_ThePolyhedronOfHInter diff --git a/src/IntCurveSurface/IntCurveSurface_ThePolyhedronOfHInter_0.cxx b/src/IntCurveSurface/IntCurveSurface_ThePolyhedronOfHInter_0.cxx index a0a510dcc6..6b317f49f7 100644 --- a/src/IntCurveSurface/IntCurveSurface_ThePolyhedronOfHInter_0.cxx +++ b/src/IntCurveSurface/IntCurveSurface_ThePolyhedronOfHInter_0.cxx @@ -17,15 +17,15 @@ #include #include -#include +#include #include #include #include #include -#define ThePSurface Handle(Adaptor3d_HSurface) -#define ThePSurface_hxx +#define ThePSurface Handle(Adaptor3d_Surface) +#define ThePSurface_hxx #define ThePSurfaceTool Adaptor3d_HSurfaceTool #define ThePSurfaceTool_hxx #define IntCurveSurface_Polyhedron IntCurveSurface_ThePolyhedronOfHInter diff --git a/src/IntCurveSurface/IntCurveSurface_TheQuadCurvExactHInter.hxx b/src/IntCurveSurface/IntCurveSurface_TheQuadCurvExactHInter.hxx index 67aeb09d94..bcc2233045 100644 --- a/src/IntCurveSurface/IntCurveSurface_TheQuadCurvExactHInter.hxx +++ b/src/IntCurveSurface/IntCurveSurface_TheQuadCurvExactHInter.hxx @@ -17,22 +17,14 @@ #ifndef _IntCurveSurface_TheQuadCurvExactHInter_HeaderFile #define _IntCurveSurface_TheQuadCurvExactHInter_HeaderFile -#include -#include -#include - -#include +#include +#include #include -#include -#include -class Adaptor3d_HSurface; + class Adaptor3d_HSurfaceTool; -class Adaptor3d_HCurve; class IntCurveSurface_TheHCurveTool; class IntCurveSurface_TheQuadCurvFuncOfTheQuadCurvExactHInter; - - class IntCurveSurface_TheQuadCurvExactHInter { public: @@ -42,7 +34,7 @@ public: //! Provides the signed distance function : Q(w) //! and its first derivative dQ(w)/dw - Standard_EXPORT IntCurveSurface_TheQuadCurvExactHInter(const Handle(Adaptor3d_HSurface)& S, const Handle(Adaptor3d_HCurve)& C); + Standard_EXPORT IntCurveSurface_TheQuadCurvExactHInter(const Handle(Adaptor3d_Surface)& S, const Handle(Adaptor3d_Curve)& C); Standard_EXPORT Standard_Boolean IsDone() const; @@ -56,31 +48,13 @@ public: //! a segment on the curve. Standard_EXPORT void Intervals (const Standard_Integer Index, Standard_Real& U1, Standard_Real& U2) const; - - - -protected: - - - - - private: - - Standard_Integer nbpnts; TColStd_SequenceOfReal pnts; Standard_Integer nbintv; TColStd_SequenceOfReal intv; - }; - - - - - - #endif // _IntCurveSurface_TheQuadCurvExactHInter_HeaderFile diff --git a/src/IntCurveSurface/IntCurveSurface_TheQuadCurvExactHInter_0.cxx b/src/IntCurveSurface/IntCurveSurface_TheQuadCurvExactHInter_0.cxx index 9d847ca3c7..4116a056ff 100644 --- a/src/IntCurveSurface/IntCurveSurface_TheQuadCurvExactHInter_0.cxx +++ b/src/IntCurveSurface/IntCurveSurface_TheQuadCurvExactHInter_0.cxx @@ -16,19 +16,19 @@ #include -#include +#include #include -#include +#include #include #include -#define TheSurface Handle(Adaptor3d_HSurface) -#define TheSurface_hxx +#define TheSurface Handle(Adaptor3d_Surface) +#define TheSurface_hxx #define TheSurfaceTool Adaptor3d_HSurfaceTool #define TheSurfaceTool_hxx -#define TheCurve Handle(Adaptor3d_HCurve) -#define TheCurve_hxx +#define TheCurve Handle(Adaptor3d_Curve) +#define TheCurve_hxx #define TheCurveTool IntCurveSurface_TheHCurveTool #define TheCurveTool_hxx #define IntCurveSurface_TheQuadCurvFunc IntCurveSurface_TheQuadCurvFuncOfTheQuadCurvExactHInter diff --git a/src/IntCurveSurface/IntCurveSurface_TheQuadCurvFuncOfTheQuadCurvExactHInter.hxx b/src/IntCurveSurface/IntCurveSurface_TheQuadCurvFuncOfTheQuadCurvExactHInter.hxx index 89eaced154..550d1870c4 100644 --- a/src/IntCurveSurface/IntCurveSurface_TheQuadCurvFuncOfTheQuadCurvExactHInter.hxx +++ b/src/IntCurveSurface/IntCurveSurface_TheQuadCurvFuncOfTheQuadCurvExactHInter.hxx @@ -17,20 +17,13 @@ #ifndef _IntCurveSurface_TheQuadCurvFuncOfTheQuadCurvExactHInter_HeaderFile #define _IntCurveSurface_TheQuadCurvFuncOfTheQuadCurvExactHInter_HeaderFile -#include -#include -#include - +#include #include #include -#include -#include -class Adaptor3d_HCurve; + class IntSurf_Quadric; class IntCurveSurface_TheHCurveTool; - - class IntCurveSurface_TheQuadCurvFuncOfTheQuadCurvExactHInter : public math_FunctionWithDerivative { public: @@ -39,7 +32,7 @@ public: //! Create the function. - Standard_EXPORT IntCurveSurface_TheQuadCurvFuncOfTheQuadCurvExactHInter(const IntSurf_Quadric& Q, const Handle(Adaptor3d_HCurve)& C); + Standard_EXPORT IntCurveSurface_TheQuadCurvFuncOfTheQuadCurvExactHInter(const IntSurf_Quadric& Q, const Handle(Adaptor3d_Curve)& C); //! Computes the value of the signed distance between //! the implicit surface and the point at parameter @@ -70,7 +63,7 @@ private: IntSurf_Quadric myQuadric; - Handle(Adaptor3d_HCurve) myCurve; + Handle(Adaptor3d_Curve) myCurve; }; diff --git a/src/IntCurveSurface/IntCurveSurface_TheQuadCurvFuncOfTheQuadCurvExactHInter_0.cxx b/src/IntCurveSurface/IntCurveSurface_TheQuadCurvFuncOfTheQuadCurvExactHInter_0.cxx index 18b7970c58..0b5add0770 100644 --- a/src/IntCurveSurface/IntCurveSurface_TheQuadCurvFuncOfTheQuadCurvExactHInter_0.cxx +++ b/src/IntCurveSurface/IntCurveSurface_TheQuadCurvFuncOfTheQuadCurvExactHInter_0.cxx @@ -16,15 +16,15 @@ #include -#include +#include #include #include #define TheQuadric IntSurf_Quadric #define TheQuadric_hxx -#define TheCurve Handle(Adaptor3d_HCurve) -#define TheCurve_hxx +#define TheCurve Handle(Adaptor3d_Curve) +#define TheCurve_hxx #define TheCurveTool IntCurveSurface_TheHCurveTool #define TheCurveTool_hxx #define IntCurveSurface_QuadricCurveFunc IntCurveSurface_TheQuadCurvFuncOfTheQuadCurvExactHInter diff --git a/src/IntCurvesFace/IntCurvesFace_Intersector.cxx b/src/IntCurvesFace/IntCurvesFace_Intersector.cxx index f2c974b5be..5ae6228f2d 100644 --- a/src/IntCurvesFace/IntCurvesFace_Intersector.cxx +++ b/src/IntCurvesFace/IntCurvesFace_Intersector.cxx @@ -16,20 +16,20 @@ #define OPTIMISATION 1 -#include +#include + +#include #include #include #include -#include +#include #include #include #include #include -#include #include #include #include -#include #include #include #include @@ -44,7 +44,7 @@ #include #include // -static void ComputeSamplePars(const Handle(Adaptor3d_HSurface)& Hsurface, +static void ComputeSamplePars(const Handle(Adaptor3d_Surface)& Hsurface, const Standard_Integer nbsu, const Standard_Integer nbsv, Handle(TColStd_HArray1OfReal)& UPars, @@ -142,7 +142,7 @@ IntCurvesFace_Intersector::IntCurvesFace_Intersector(const TopoDS_Face& Face, BRepAdaptor_Surface surface; face = Face; surface.Initialize(Face, aRestr); - Hsurface = new BRepAdaptor_HSurface(surface); + Hsurface = new BRepAdaptor_Surface(surface); myTopolTool = new BRepTopAdaptor_TopolTool(Hsurface); GeomAbs_SurfaceType SurfaceType = Adaptor3d_HSurfaceTool::GetType(Hsurface); @@ -356,7 +356,7 @@ void IntCurvesFace_Intersector::Perform(const gp_Lin& L, IntCurveSurface_HInter HICS; Handle(Geom_Line) geomline = new Geom_Line(L); GeomAdaptor_Curve LL(geomline); - Handle(GeomAdaptor_HCurve) HLL = new GeomAdaptor_HCurve(LL); + Handle(GeomAdaptor_Curve) HLL = new GeomAdaptor_Curve(LL); Standard_Real parinf=ParMin; Standard_Real parsup=ParMax; // @@ -422,7 +422,7 @@ void IntCurvesFace_Intersector::Perform(const gp_Lin& L, //function : Perform //purpose : //======================================================================= -void IntCurvesFace_Intersector::Perform(const Handle(Adaptor3d_HCurve)& HCu, +void IntCurvesFace_Intersector::Perform(const Handle(Adaptor3d_Curve)& HCu, const Standard_Real ParMin, const Standard_Real ParMax) { diff --git a/src/IntCurvesFace/IntCurvesFace_Intersector.hxx b/src/IntCurvesFace/IntCurvesFace_Intersector.hxx index 245e5c3af0..ec4f4c756c 100644 --- a/src/IntCurvesFace/IntCurvesFace_Intersector.hxx +++ b/src/IntCurvesFace/IntCurvesFace_Intersector.hxx @@ -17,32 +17,23 @@ #ifndef _IntCurvesFace_Intersector_HeaderFile #define _IntCurvesFace_Intersector_HeaderFile -#include -#include -#include - -#include +#include +#include #include #include -#include -#include #include -#include #include #include #include + class BRepTopAdaptor_TopolTool; -class BRepAdaptor_HSurface; class TopoDS_Face; class gp_Lin; -class Adaptor3d_HCurve; class gp_Pnt; class IntCurveSurface_HInter; class gp_Pnt2d; class Bnd_Box; - - class IntCurvesFace_Intersector { public: @@ -78,7 +69,7 @@ public: //! same method for a HCurve from Adaptor3d. //! PInf an PSup can also be - and + INF. - Standard_EXPORT void Perform (const Handle(Adaptor3d_HCurve)& HCu, const Standard_Real PInf, const Standard_Real PSup); + Standard_EXPORT void Perform (const Handle(Adaptor3d_Curve)& HCu, const Standard_Real PInf, const Standard_Real PSup); //! Return the surface type Standard_EXPORT GeomAbs_SurfaceType SurfaceType() const; @@ -155,7 +146,7 @@ private: Handle(BRepTopAdaptor_TopolTool) myTopolTool; - Handle(BRepAdaptor_HSurface) Hsurface; + Handle(BRepAdaptor_Surface) Hsurface; Standard_Real Tol; IntCurveSurface_SequenceOfPnt SeqPnt; TColStd_SequenceOfInteger mySeqState; diff --git a/src/IntCurvesFace/IntCurvesFace_ShapeIntersector.cxx b/src/IntCurvesFace/IntCurvesFace_ShapeIntersector.cxx index 5db1246c85..d99f3fd3ce 100644 --- a/src/IntCurvesFace/IntCurvesFace_ShapeIntersector.cxx +++ b/src/IntCurvesFace/IntCurvesFace_ShapeIntersector.cxx @@ -14,15 +14,15 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. +#include -#include +#include #include #include #include #include #include #include -#include #include #include #include @@ -159,7 +159,7 @@ void IntCurvesFace_ShapeIntersector::PerformNearest(const gp_Lin& L, SortResult(); } //-- ================================================================================ -void IntCurvesFace_ShapeIntersector::Perform(const Handle(Adaptor3d_HCurve)& HCu, +void IntCurvesFace_ShapeIntersector::Perform(const Handle(Adaptor3d_Curve)& HCu, const Standard_Real ParMin, const Standard_Real ParMax) { done = Standard_False; diff --git a/src/IntCurvesFace/IntCurvesFace_ShapeIntersector.hxx b/src/IntCurvesFace/IntCurvesFace_ShapeIntersector.hxx index 5800be35fc..6853605d7a 100644 --- a/src/IntCurvesFace/IntCurvesFace_ShapeIntersector.hxx +++ b/src/IntCurvesFace/IntCurvesFace_ShapeIntersector.hxx @@ -30,14 +30,13 @@ #include #include #include + +class Adaptor3d_Curve; class TopoDS_Shape; class gp_Lin; -class Adaptor3d_HCurve; class gp_Pnt; class TopoDS_Face; - - class IntCurvesFace_ShapeIntersector { public: @@ -71,7 +70,7 @@ public: //! same method for a HCurve from Adaptor3d. //! PInf an PSup can also be - and + INF. - Standard_EXPORT void Perform (const Handle(Adaptor3d_HCurve)& HCu, const Standard_Real PInf, const Standard_Real PSup); + Standard_EXPORT void Perform (const Handle(Adaptor3d_Curve)& HCu, const Standard_Real PInf, const Standard_Real PSup); //! True is returned when the intersection have been computed. Standard_Boolean IsDone() const; diff --git a/src/IntPatch/IntPatch_ALineToWLine.cxx b/src/IntPatch/IntPatch_ALineToWLine.cxx index cfe8227d7f..7055727a44 100644 --- a/src/IntPatch/IntPatch_ALineToWLine.cxx +++ b/src/IntPatch/IntPatch_ALineToWLine.cxx @@ -16,7 +16,7 @@ #include -#include +#include #include #include #include @@ -67,8 +67,8 @@ static void AddVertexPoint(Handle(IntSurf_LineOn2S)& theLine, // theSingularSurfaceID contains the ID of surface with // special point (0 - none, 1 - theS1, 2 - theS2) //======================================================================= -static IntPatch_SpecPntType IsPoleOrSeam(const Handle(Adaptor3d_HSurface)& theS1, - const Handle(Adaptor3d_HSurface)& theS2, +static IntPatch_SpecPntType IsPoleOrSeam(const Handle(Adaptor3d_Surface)& theS1, + const Handle(Adaptor3d_Surface)& theS2, const IntSurf_PntOn2S& thePIsoRef, Handle(IntSurf_LineOn2S)& theLine, IntPatch_Point &theVertex, @@ -138,8 +138,8 @@ static IntPatch_SpecPntType IsPoleOrSeam(const Handle(Adaptor3d_HSurface)& theS1 //function : IntPatch_ALineToWLine //purpose : //======================================================================= -IntPatch_ALineToWLine::IntPatch_ALineToWLine(const Handle(Adaptor3d_HSurface)& theS1, - const Handle(Adaptor3d_HSurface)& theS2, +IntPatch_ALineToWLine::IntPatch_ALineToWLine(const Handle(Adaptor3d_Surface)& theS1, + const Handle(Adaptor3d_Surface)& theS2, const Standard_Integer theNbPoints) : myS1(theS1), myS2(theS2), diff --git a/src/IntPatch/IntPatch_ALineToWLine.hxx b/src/IntPatch/IntPatch_ALineToWLine.hxx index 5ac9c729d6..cb736d261b 100644 --- a/src/IntPatch/IntPatch_ALineToWLine.hxx +++ b/src/IntPatch/IntPatch_ALineToWLine.hxx @@ -17,13 +17,10 @@ #ifndef _IntPatch_ALineToWLine_HeaderFile #define _IntPatch_ALineToWLine_HeaderFile +#include #include #include -#include -#include -#include -class Adaptor3d_HSurface; class IntPatch_ALine; class IntSurf_PntOn2S; @@ -34,8 +31,8 @@ public: DEFINE_STANDARD_ALLOC //! Constructor - Standard_EXPORT IntPatch_ALineToWLine(const Handle(Adaptor3d_HSurface)& theS1, - const Handle(Adaptor3d_HSurface)& theS2, + Standard_EXPORT IntPatch_ALineToWLine(const Handle(Adaptor3d_Surface)& theS1, + const Handle(Adaptor3d_Surface)& theS2, const Standard_Integer theNbPoints = 200); Standard_EXPORT void SetTolOpenDomain (const Standard_Real aT); @@ -96,8 +93,8 @@ protected: private: - Handle(Adaptor3d_HSurface) myS1; - Handle(Adaptor3d_HSurface) myS2; + Handle(Adaptor3d_Surface) myS1; + Handle(Adaptor3d_Surface) myS2; IntSurf_Quadric myQuad1; IntSurf_Quadric myQuad2; diff --git a/src/IntPatch/IntPatch_ArcFunction.cxx b/src/IntPatch/IntPatch_ArcFunction.cxx index 3a8dc8840a..57f91e048f 100644 --- a/src/IntPatch/IntPatch_ArcFunction.cxx +++ b/src/IntPatch/IntPatch_ArcFunction.cxx @@ -15,8 +15,8 @@ // commercial license or contractual agreement. -#include -#include +#include +#include #include #include #include diff --git a/src/IntPatch/IntPatch_ArcFunction.hxx b/src/IntPatch/IntPatch_ArcFunction.hxx index bf83dd7f29..d460f177e7 100644 --- a/src/IntPatch/IntPatch_ArcFunction.hxx +++ b/src/IntPatch/IntPatch_ArcFunction.hxx @@ -17,23 +17,10 @@ #ifndef _IntPatch_ArcFunction_HeaderFile #define _IntPatch_ArcFunction_HeaderFile -#include -#include -#include - +#include #include -#include #include #include -#include -#include -#include -class Adaptor2d_HCurve2d; -class Adaptor3d_HSurface; -class IntSurf_Quadric; -class gp_Pnt; - - class IntPatch_ArcFunction : public math_FunctionWithDerivative { @@ -46,9 +33,9 @@ public: void SetQuadric (const IntSurf_Quadric& Q); - void Set (const Handle(Adaptor2d_HCurve2d)& A); + void Set (const Handle(Adaptor2d_Curve2d)& A); - void Set (const Handle(Adaptor3d_HSurface)& S); + void Set (const Handle(Adaptor3d_Surface)& S); Standard_EXPORT Standard_Boolean Value (const Standard_Real X, Standard_Real& F) Standard_OVERRIDE; @@ -64,9 +51,9 @@ public: const IntSurf_Quadric& Quadric() const; - const Handle(Adaptor2d_HCurve2d)& Arc() const; + const Handle(Adaptor2d_Curve2d)& Arc() const; - const Handle(Adaptor3d_HSurface)& Surface() const; + const Handle(Adaptor3d_Surface)& Surface() const; //! Returns the point, which has been computed //! while the last calling Value() method @@ -84,8 +71,8 @@ private: - Handle(Adaptor2d_HCurve2d) myArc; - Handle(Adaptor3d_HSurface) mySurf; + Handle(Adaptor2d_Curve2d) myArc; + Handle(Adaptor3d_Surface) mySurf; IntSurf_Quadric myQuad; gp_Pnt ptsol; TColgp_SequenceOfPnt seqpt; diff --git a/src/IntPatch/IntPatch_ArcFunction.lxx b/src/IntPatch/IntPatch_ArcFunction.lxx index 314eff9bab..9d686b92da 100644 --- a/src/IntPatch/IntPatch_ArcFunction.lxx +++ b/src/IntPatch/IntPatch_ArcFunction.lxx @@ -19,13 +19,13 @@ inline const gp_Pnt& IntPatch_ArcFunction::Valpoint (const Standard_Integer Inde return seqpt(Index); } -inline void IntPatch_ArcFunction::Set(const Handle(Adaptor2d_HCurve2d)& A) +inline void IntPatch_ArcFunction::Set(const Handle(Adaptor2d_Curve2d)& A) { myArc = A; seqpt.Clear(); } -inline void IntPatch_ArcFunction::Set(const Handle(Adaptor3d_HSurface)& S) +inline void IntPatch_ArcFunction::Set(const Handle(Adaptor3d_Surface)& S) { mySurf = S; seqpt.Clear(); @@ -42,12 +42,12 @@ inline const IntSurf_Quadric& IntPatch_ArcFunction::Quadric() const return(myQuad); } -inline const Handle(Adaptor2d_HCurve2d)& IntPatch_ArcFunction::Arc() const +inline const Handle(Adaptor2d_Curve2d)& IntPatch_ArcFunction::Arc() const { return(myArc); } -inline const Handle(Adaptor3d_HSurface)& IntPatch_ArcFunction::Surface() const +inline const Handle(Adaptor3d_Surface)& IntPatch_ArcFunction::Surface() const { return(mySurf); } diff --git a/src/IntPatch/IntPatch_CSFunction.cxx b/src/IntPatch/IntPatch_CSFunction.cxx index 20fb5335c8..9369370425 100644 --- a/src/IntPatch/IntPatch_CSFunction.cxx +++ b/src/IntPatch/IntPatch_CSFunction.cxx @@ -13,8 +13,8 @@ // commercial license or contractual agreement. -#include -#include +#include +#include #include #include #include @@ -30,13 +30,13 @@ #endif -#define SURFACE1 (*((Handle(Adaptor3d_HSurface) *)(surface1))) -#define SURFACE2 (*((Handle(Adaptor3d_HSurface) *)(surface2))) -#define CURVE (*((Handle(Adaptor2d_HCurve2d) *)(curve))) +#define SURFACE1 (*((Handle(Adaptor3d_Surface) *)(surface1))) +#define SURFACE2 (*((Handle(Adaptor3d_Surface) *)(surface2))) +#define CURVE (*((Handle(Adaptor2d_Curve2d) *)(curve))) -IntPatch_CSFunction::IntPatch_CSFunction(const Handle(Adaptor3d_HSurface)& S1, - const Handle(Adaptor2d_HCurve2d)& C, - const Handle(Adaptor3d_HSurface)& S2) +IntPatch_CSFunction::IntPatch_CSFunction(const Handle(Adaptor3d_Surface)& S1, + const Handle(Adaptor2d_Curve2d)& C, + const Handle(Adaptor3d_Surface)& S2) { surface1 = (Standard_Address)(&S1); surface2 = (Standard_Address)(&S2); @@ -124,10 +124,10 @@ const gp_Pnt& IntPatch_CSFunction::Point() const { return p;} Standard_Real IntPatch_CSFunction::Root() const { return f;} -const Handle(Adaptor3d_HSurface)& IntPatch_CSFunction::AuxillarSurface() const { +const Handle(Adaptor3d_Surface)& IntPatch_CSFunction::AuxillarSurface() const { return SURFACE1;} -const Handle(Adaptor2d_HCurve2d)& IntPatch_CSFunction::AuxillarCurve() const { +const Handle(Adaptor2d_Curve2d)& IntPatch_CSFunction::AuxillarCurve() const { return CURVE;} #undef SURFACE1 diff --git a/src/IntPatch/IntPatch_CSFunction.hxx b/src/IntPatch/IntPatch_CSFunction.hxx index 8b194f9c5c..b363da3f73 100644 --- a/src/IntPatch/IntPatch_CSFunction.hxx +++ b/src/IntPatch/IntPatch_CSFunction.hxx @@ -17,22 +17,12 @@ #ifndef _IntPatch_CSFunction_HeaderFile #define _IntPatch_CSFunction_HeaderFile -#include -#include -#include - -#include -#include -#include +#include +#include #include -#include -#include #include -class Adaptor3d_HSurface; -class Adaptor2d_HCurve2d; -class math_Matrix; -class gp_Pnt; +class math_Matrix; //! this function is associated to the intersection between //! a curve on surface and a surface . @@ -45,7 +35,7 @@ public: //! S1 is the surface on which the intersection is searched. //! C is a curve on the surface S2. - Standard_EXPORT IntPatch_CSFunction(const Handle(Adaptor3d_HSurface)& S1, const Handle(Adaptor2d_HCurve2d)& C, const Handle(Adaptor3d_HSurface)& S2); + Standard_EXPORT IntPatch_CSFunction(const Handle(Adaptor3d_Surface)& S1, const Handle(Adaptor2d_Curve2d)& C, const Handle(Adaptor3d_Surface)& S2); Standard_EXPORT Standard_Integer NbVariables() const; @@ -61,9 +51,9 @@ public: Standard_EXPORT Standard_Real Root() const; - Standard_EXPORT const Handle(Adaptor3d_HSurface)& AuxillarSurface() const; + Standard_EXPORT const Handle(Adaptor3d_Surface)& AuxillarSurface() const; - Standard_EXPORT const Handle(Adaptor2d_HCurve2d)& AuxillarCurve() const; + Standard_EXPORT const Handle(Adaptor2d_Curve2d)& AuxillarCurve() const; diff --git a/src/IntPatch/IntPatch_CurvIntSurf.hxx b/src/IntPatch/IntPatch_CurvIntSurf.hxx index 918f747bee..0448130231 100644 --- a/src/IntPatch/IntPatch_CurvIntSurf.hxx +++ b/src/IntPatch/IntPatch_CurvIntSurf.hxx @@ -17,24 +17,12 @@ #ifndef _IntPatch_CurvIntSurf_HeaderFile #define _IntPatch_CurvIntSurf_HeaderFile -#include -#include -#include - -#include +#include #include -#include -class StdFail_NotDone; -class Standard_DomainError; -class Adaptor3d_HSurface; + class Adaptor3d_HSurfaceTool; -class Adaptor2d_HCurve2d; class IntPatch_HCurve2dTool; -class IntPatch_CSFunction; class math_FunctionSetRoot; -class gp_Pnt; - - class IntPatch_CurvIntSurf { diff --git a/src/IntPatch/IntPatch_CurvIntSurf_0.cxx b/src/IntPatch/IntPatch_CurvIntSurf_0.cxx index e92725a973..0ed03b6d54 100644 --- a/src/IntPatch/IntPatch_CurvIntSurf_0.cxx +++ b/src/IntPatch/IntPatch_CurvIntSurf_0.cxx @@ -18,21 +18,21 @@ #include #include -#include +#include #include -#include +#include #include #include #include #include -#define ThePSurface Handle(Adaptor3d_HSurface) -#define ThePSurface_hxx +#define ThePSurface Handle(Adaptor3d_Surface) +#define ThePSurface_hxx #define ThePSurfaceTool Adaptor3d_HSurfaceTool #define ThePSurfaceTool_hxx -#define TheCurve Handle(Adaptor2d_HCurve2d) -#define TheCurve_hxx +#define TheCurve Handle(Adaptor2d_Curve2d) +#define TheCurve_hxx #define TheCurveTool IntPatch_HCurve2dTool #define TheCurveTool_hxx #define TheFunction IntPatch_CSFunction diff --git a/src/IntPatch/IntPatch_HCurve2dTool.cxx b/src/IntPatch/IntPatch_HCurve2dTool.cxx index 1c1df23e51..e00814391e 100644 --- a/src/IntPatch/IntPatch_HCurve2dTool.cxx +++ b/src/IntPatch/IntPatch_HCurve2dTool.cxx @@ -15,7 +15,7 @@ // commercial license or contractual agreement. -#include +#include #include #include #include @@ -29,7 +29,7 @@ #include //============================================================ -Standard_Integer IntPatch_HCurve2dTool::NbSamples (const Handle(Adaptor2d_HCurve2d)& C, +Standard_Integer IntPatch_HCurve2dTool::NbSamples (const Handle(Adaptor2d_Curve2d)& C, const Standard_Real U0, const Standard_Real U1) { diff --git a/src/IntPatch/IntPatch_HCurve2dTool.hxx b/src/IntPatch/IntPatch_HCurve2dTool.hxx index 3df188d10b..496636389c 100644 --- a/src/IntPatch/IntPatch_HCurve2dTool.hxx +++ b/src/IntPatch/IntPatch_HCurve2dTool.hxx @@ -37,7 +37,6 @@ class Standard_OutOfRange; class Standard_NoSuchObject; class Standard_DomainError; -class Adaptor2d_HCurve2d; class gp_Pnt2d; class gp_Vec2d; class Geom2d_BezierCurve; @@ -52,54 +51,54 @@ public: DEFINE_STANDARD_ALLOC - static Standard_Real FirstParameter (const Handle(Adaptor2d_HCurve2d)& C); + static Standard_Real FirstParameter (const Handle(Adaptor2d_Curve2d)& C); - static Standard_Real LastParameter (const Handle(Adaptor2d_HCurve2d)& C); + static Standard_Real LastParameter (const Handle(Adaptor2d_Curve2d)& C); - static GeomAbs_Shape Continuity (const Handle(Adaptor2d_HCurve2d)& C); + static GeomAbs_Shape Continuity (const Handle(Adaptor2d_Curve2d)& C); //! Returns the number of intervals for continuity //! . May be one if Continuity(myclass) >= - static Standard_Integer NbIntervals (const Handle(Adaptor2d_HCurve2d)& C, const GeomAbs_Shape S); + static Standard_Integer NbIntervals (const Handle(Adaptor2d_Curve2d)& C, const GeomAbs_Shape S); //! Stores in the parameters bounding the intervals //! of continuity . //! //! The array must provide enough room to accommodate //! for the parameters. i.e. T.Length() > NbIntervals() - static void Intervals (const Handle(Adaptor2d_HCurve2d)& C, TColStd_Array1OfReal& T, const GeomAbs_Shape S); + static void Intervals (const Handle(Adaptor2d_Curve2d)& C, TColStd_Array1OfReal& T, const GeomAbs_Shape S); - static Standard_Boolean IsClosed (const Handle(Adaptor2d_HCurve2d)& C); + static Standard_Boolean IsClosed (const Handle(Adaptor2d_Curve2d)& C); - static Standard_Boolean IsPeriodic (const Handle(Adaptor2d_HCurve2d)& C); + static Standard_Boolean IsPeriodic (const Handle(Adaptor2d_Curve2d)& C); - static Standard_Real Period (const Handle(Adaptor2d_HCurve2d)& C); + static Standard_Real Period (const Handle(Adaptor2d_Curve2d)& C); //! Computes the point of parameter U on the curve. - static gp_Pnt2d Value (const Handle(Adaptor2d_HCurve2d)& C, const Standard_Real U); + static gp_Pnt2d Value (const Handle(Adaptor2d_Curve2d)& C, const Standard_Real U); //! Computes the point of parameter U on the curve. - static void D0 (const Handle(Adaptor2d_HCurve2d)& C, const Standard_Real U, gp_Pnt2d& P); + static void D0 (const Handle(Adaptor2d_Curve2d)& C, const Standard_Real U, gp_Pnt2d& P); //! Computes the point of parameter U on the curve with its //! first derivative. //! Raised if the continuity of the current interval //! is not C1. - static void D1 (const Handle(Adaptor2d_HCurve2d)& C, const Standard_Real U, gp_Pnt2d& P, gp_Vec2d& V); + static void D1 (const Handle(Adaptor2d_Curve2d)& C, const Standard_Real U, gp_Pnt2d& P, gp_Vec2d& V); //! Returns the point P of parameter U, the first and second //! derivatives V1 and V2. //! Raised if the continuity of the current interval //! is not C2. - static void D2 (const Handle(Adaptor2d_HCurve2d)& C, const Standard_Real U, gp_Pnt2d& P, gp_Vec2d& V1, gp_Vec2d& V2); + static void D2 (const Handle(Adaptor2d_Curve2d)& C, const Standard_Real U, gp_Pnt2d& P, gp_Vec2d& V1, gp_Vec2d& V2); //! Returns the point P of parameter U, the first, the second //! and the third derivative. //! Raised if the continuity of the current interval //! is not C3. - static void D3 (const Handle(Adaptor2d_HCurve2d)& C, const Standard_Real U, gp_Pnt2d& P, gp_Vec2d& V1, gp_Vec2d& V2, gp_Vec2d& V3); + static void D3 (const Handle(Adaptor2d_Curve2d)& C, const Standard_Real U, gp_Pnt2d& P, gp_Vec2d& V1, gp_Vec2d& V2, gp_Vec2d& V3); //! The returned vector gives the value of the derivative for the @@ -107,32 +106,32 @@ public: //! Raised if the continuity of the current interval //! is not CN. //! Raised if N < 1. - static gp_Vec2d DN (const Handle(Adaptor2d_HCurve2d)& C, const Standard_Real U, const Standard_Integer N); + static gp_Vec2d DN (const Handle(Adaptor2d_Curve2d)& C, const Standard_Real U, const Standard_Integer N); //! Returns the parametric resolution corresponding //! to the real space resolution . - static Standard_Real Resolution (const Handle(Adaptor2d_HCurve2d)& C, const Standard_Real R3d); + static Standard_Real Resolution (const Handle(Adaptor2d_Curve2d)& C, const Standard_Real R3d); //! Returns the type of the curve in the current //! interval : Line, Circle, Ellipse, Hyperbola, //! Parabola, BezierCurve, BSplineCurve, OtherCurve. - static GeomAbs_CurveType GetType (const Handle(Adaptor2d_HCurve2d)& C); + static GeomAbs_CurveType GetType (const Handle(Adaptor2d_Curve2d)& C); - static gp_Lin2d Line (const Handle(Adaptor2d_HCurve2d)& C); + static gp_Lin2d Line (const Handle(Adaptor2d_Curve2d)& C); - static gp_Circ2d Circle (const Handle(Adaptor2d_HCurve2d)& C); + static gp_Circ2d Circle (const Handle(Adaptor2d_Curve2d)& C); - static gp_Elips2d Ellipse (const Handle(Adaptor2d_HCurve2d)& C); + static gp_Elips2d Ellipse (const Handle(Adaptor2d_Curve2d)& C); - static gp_Hypr2d Hyperbola (const Handle(Adaptor2d_HCurve2d)& C); + static gp_Hypr2d Hyperbola (const Handle(Adaptor2d_Curve2d)& C); - static gp_Parab2d Parabola (const Handle(Adaptor2d_HCurve2d)& C); + static gp_Parab2d Parabola (const Handle(Adaptor2d_Curve2d)& C); - static Handle(Geom2d_BezierCurve) Bezier (const Handle(Adaptor2d_HCurve2d)& C); + static Handle(Geom2d_BezierCurve) Bezier (const Handle(Adaptor2d_Curve2d)& C); - static Handle(Geom2d_BSplineCurve) BSpline (const Handle(Adaptor2d_HCurve2d)& C); + static Handle(Geom2d_BSplineCurve) BSpline (const Handle(Adaptor2d_Curve2d)& C); - Standard_EXPORT static Standard_Integer NbSamples (const Handle(Adaptor2d_HCurve2d)& C, const Standard_Real U0, const Standard_Real U1); + Standard_EXPORT static Standard_Integer NbSamples (const Handle(Adaptor2d_Curve2d)& C, const Standard_Real U0, const Standard_Real U1); diff --git a/src/IntPatch/IntPatch_HCurve2dTool.lxx b/src/IntPatch/IntPatch_HCurve2dTool.lxx index 0348595864..b7ee6afef1 100644 --- a/src/IntPatch/IntPatch_HCurve2dTool.lxx +++ b/src/IntPatch/IntPatch_HCurve2dTool.lxx @@ -29,63 +29,63 @@ #include -#include +#include //============================================================ -inline Standard_Real IntPatch_HCurve2dTool::FirstParameter (const Handle(Adaptor2d_HCurve2d)& C) { +inline Standard_Real IntPatch_HCurve2dTool::FirstParameter (const Handle(Adaptor2d_Curve2d)& C) { return(C->FirstParameter()); } //============================================================ -inline Standard_Real IntPatch_HCurve2dTool::LastParameter (const Handle(Adaptor2d_HCurve2d)& C) { +inline Standard_Real IntPatch_HCurve2dTool::LastParameter (const Handle(Adaptor2d_Curve2d)& C) { return(C->LastParameter()); } //============================================================ -inline GeomAbs_Shape IntPatch_HCurve2dTool::Continuity (const Handle(Adaptor2d_HCurve2d)& C) { +inline GeomAbs_Shape IntPatch_HCurve2dTool::Continuity (const Handle(Adaptor2d_Curve2d)& C) { return(C->Continuity()); } //============================================================ -inline Standard_Integer IntPatch_HCurve2dTool::NbIntervals(const Handle(Adaptor2d_HCurve2d)& C,const GeomAbs_Shape Sh) { +inline Standard_Integer IntPatch_HCurve2dTool::NbIntervals(const Handle(Adaptor2d_Curve2d)& C,const GeomAbs_Shape Sh) { return(C->NbIntervals(Sh)); } //============================================================ -inline void IntPatch_HCurve2dTool::Intervals(const Handle(Adaptor2d_HCurve2d)& C, +inline void IntPatch_HCurve2dTool::Intervals(const Handle(Adaptor2d_Curve2d)& C, TColStd_Array1OfReal& Tab, const GeomAbs_Shape Sh) { C->Intervals(Tab,Sh); } //============================================================ -inline Standard_Boolean IntPatch_HCurve2dTool::IsClosed(const Handle(Adaptor2d_HCurve2d)& C) { +inline Standard_Boolean IntPatch_HCurve2dTool::IsClosed(const Handle(Adaptor2d_Curve2d)& C) { return(C->IsClosed()); } //============================================================ -inline Standard_Boolean IntPatch_HCurve2dTool::IsPeriodic(const Handle(Adaptor2d_HCurve2d)& C) { +inline Standard_Boolean IntPatch_HCurve2dTool::IsPeriodic(const Handle(Adaptor2d_Curve2d)& C) { return(C->IsPeriodic()); } //============================================================ -inline Standard_Real IntPatch_HCurve2dTool::Period(const Handle(Adaptor2d_HCurve2d)& C) { +inline Standard_Real IntPatch_HCurve2dTool::Period(const Handle(Adaptor2d_Curve2d)& C) { return(C->Period()); } //============================================================ -inline gp_Pnt2d IntPatch_HCurve2dTool::Value (const Handle(Adaptor2d_HCurve2d)& C, +inline gp_Pnt2d IntPatch_HCurve2dTool::Value (const Handle(Adaptor2d_Curve2d)& C, const Standard_Real U) { return(C->Value(U)); } //============================================================ -inline void IntPatch_HCurve2dTool::D0(const Handle(Adaptor2d_HCurve2d)& C, +inline void IntPatch_HCurve2dTool::D0(const Handle(Adaptor2d_Curve2d)& C, const Standard_Real U, gp_Pnt2d& P) { C->D0(U,P); } //============================================================ -inline void IntPatch_HCurve2dTool::D1 (const Handle(Adaptor2d_HCurve2d)& C, +inline void IntPatch_HCurve2dTool::D1 (const Handle(Adaptor2d_Curve2d)& C, const Standard_Real U, gp_Pnt2d& P, gp_Vec2d& T) { C->D1(U,P,T); } //============================================================ -inline void IntPatch_HCurve2dTool::D2 (const Handle(Adaptor2d_HCurve2d)& C, +inline void IntPatch_HCurve2dTool::D2 (const Handle(Adaptor2d_Curve2d)& C, const Standard_Real U, gp_Pnt2d& P, gp_Vec2d& T, @@ -93,7 +93,7 @@ inline void IntPatch_HCurve2dTool::D2 (const Handle(Adaptor2d_HCurve2d)& C, C->D2(U,P,T,N); } //============================================================ -inline void IntPatch_HCurve2dTool::D3 (const Handle(Adaptor2d_HCurve2d)& C, +inline void IntPatch_HCurve2dTool::D3 (const Handle(Adaptor2d_Curve2d)& C, const Standard_Real U, gp_Pnt2d& P, gp_Vec2d& V1, @@ -102,46 +102,46 @@ inline void IntPatch_HCurve2dTool::D3 (const Handle(Adaptor2d_HCurve2d)& C, C->D3(U,P,V1,V2,V3); } //============================================================ -inline gp_Vec2d IntPatch_HCurve2dTool::DN (const Handle(Adaptor2d_HCurve2d)& C, +inline gp_Vec2d IntPatch_HCurve2dTool::DN (const Handle(Adaptor2d_Curve2d)& C, const Standard_Real U, const Standard_Integer N) { return(C->DN(U,N)); } //============================================================ -inline Standard_Real IntPatch_HCurve2dTool::Resolution(const Handle(Adaptor2d_HCurve2d)& C, +inline Standard_Real IntPatch_HCurve2dTool::Resolution(const Handle(Adaptor2d_Curve2d)& C, const Standard_Real R3d) { return(C->Resolution(R3d)); } //============================================================ -inline GeomAbs_CurveType IntPatch_HCurve2dTool::GetType(const Handle(Adaptor2d_HCurve2d)& C) { +inline GeomAbs_CurveType IntPatch_HCurve2dTool::GetType(const Handle(Adaptor2d_Curve2d)& C) { return(C->GetType()); } //============================================================ -inline gp_Lin2d IntPatch_HCurve2dTool::Line (const Handle(Adaptor2d_HCurve2d)& C) { +inline gp_Lin2d IntPatch_HCurve2dTool::Line (const Handle(Adaptor2d_Curve2d)& C) { return(C->Line()); } //============================================================ -inline gp_Circ2d IntPatch_HCurve2dTool::Circle (const Handle(Adaptor2d_HCurve2d)& C) { +inline gp_Circ2d IntPatch_HCurve2dTool::Circle (const Handle(Adaptor2d_Curve2d)& C) { return(C->Circle()); } //============================================================ -inline gp_Elips2d IntPatch_HCurve2dTool::Ellipse (const Handle(Adaptor2d_HCurve2d)& C) { +inline gp_Elips2d IntPatch_HCurve2dTool::Ellipse (const Handle(Adaptor2d_Curve2d)& C) { return(C->Ellipse()); } //============================================================ -inline gp_Parab2d IntPatch_HCurve2dTool::Parabola (const Handle(Adaptor2d_HCurve2d)& C) { +inline gp_Parab2d IntPatch_HCurve2dTool::Parabola (const Handle(Adaptor2d_Curve2d)& C) { return(C->Parabola()); } //============================================================ -inline gp_Hypr2d IntPatch_HCurve2dTool::Hyperbola (const Handle(Adaptor2d_HCurve2d)& C) { +inline gp_Hypr2d IntPatch_HCurve2dTool::Hyperbola (const Handle(Adaptor2d_Curve2d)& C) { return(C->Hyperbola()); } //============================================================ -inline Handle(Geom2d_BezierCurve) IntPatch_HCurve2dTool::Bezier (const Handle(Adaptor2d_HCurve2d)& C) { +inline Handle(Geom2d_BezierCurve) IntPatch_HCurve2dTool::Bezier (const Handle(Adaptor2d_Curve2d)& C) { return(C->Bezier()); } //============================================================ -inline Handle(Geom2d_BSplineCurve) IntPatch_HCurve2dTool::BSpline (const Handle(Adaptor2d_HCurve2d)& C) { +inline Handle(Geom2d_BSplineCurve) IntPatch_HCurve2dTool::BSpline (const Handle(Adaptor2d_Curve2d)& C) { return(C->BSpline()); } //============================================================ diff --git a/src/IntPatch/IntPatch_HInterTool.cxx b/src/IntPatch/IntPatch_HInterTool.cxx index 7ad540c811..595ee4f2ca 100644 --- a/src/IntPatch/IntPatch_HInterTool.cxx +++ b/src/IntPatch/IntPatch_HInterTool.cxx @@ -15,8 +15,8 @@ // commercial license or contractual agreement. -#include -#include +#include +#include #include #include #include @@ -35,7 +35,7 @@ IntPatch_HInterTool::IntPatch_HInterTool() : { } -Standard_Integer IntPatch_HInterTool::NbSamplesV (const Handle(Adaptor3d_HSurface)& S, +Standard_Integer IntPatch_HInterTool::NbSamplesV (const Handle(Adaptor3d_Surface)& S, const Standard_Real, const Standard_Real) { switch (S->GetType()) @@ -64,7 +64,7 @@ Standard_Integer IntPatch_HInterTool::NbSamplesV (const Handle(Adaptor3d_HSurfac return 10; } -Standard_Integer IntPatch_HInterTool::NbSamplesU (const Handle(Adaptor3d_HSurface)& S, +Standard_Integer IntPatch_HInterTool::NbSamplesU (const Handle(Adaptor3d_Surface)& S, const Standard_Real, const Standard_Real) { switch (S->GetType()) @@ -92,7 +92,7 @@ Standard_Integer IntPatch_HInterTool::NbSamplesU (const Handle(Adaptor3d_HSurfac return 10; } -Standard_Integer IntPatch_HInterTool::NbSamplePoints (const Handle(Adaptor3d_HSurface)& S) +Standard_Integer IntPatch_HInterTool::NbSamplePoints (const Handle(Adaptor3d_Surface)& S) { uinf = S->FirstUParameter(); usup = S->LastUParameter(); @@ -134,7 +134,7 @@ Standard_Integer IntPatch_HInterTool::NbSamplePoints (const Handle(Adaptor3d_HSu return(m); } -void IntPatch_HInterTool::SamplePoint (const Handle(Adaptor3d_HSurface)& S, +void IntPatch_HInterTool::SamplePoint (const Handle(Adaptor3d_Surface)& S, const Standard_Integer Index, Standard_Real& U, Standard_Real& V ) const @@ -192,7 +192,7 @@ void IntPatch_HInterTool::SamplePoint (const Handle(Adaptor3d_HSurface)& S, } -Standard_Integer IntPatch_HInterTool::NbSamplesOnArc (const Handle(Adaptor2d_HCurve2d)& A) +Standard_Integer IntPatch_HInterTool::NbSamplesOnArc (const Handle(Adaptor2d_Curve2d)& A) { GeomAbs_CurveType CurveType = A->GetType(); @@ -222,7 +222,7 @@ Standard_Integer IntPatch_HInterTool::NbSamplesOnArc (const Handle(Adaptor2d_HCu return(nbsOnC); } -void IntPatch_HInterTool::Bounds(const Handle(Adaptor2d_HCurve2d)& A, +void IntPatch_HInterTool::Bounds(const Handle(Adaptor2d_Curve2d)& A, Standard_Real& Ufirst, Standard_Real& Ulast) { @@ -230,7 +230,7 @@ void IntPatch_HInterTool::Bounds(const Handle(Adaptor2d_HCurve2d)& A, Ulast = A->LastParameter(); } -Standard_Boolean IntPatch_HInterTool::Project (const Handle(Adaptor2d_HCurve2d)& C, +Standard_Boolean IntPatch_HInterTool::Project (const Handle(Adaptor2d_Curve2d)& C, const gp_Pnt2d& P, Standard_Real& Paramproj, gp_Pnt2d& Ptproj) @@ -240,7 +240,7 @@ Standard_Boolean IntPatch_HInterTool::Project (const Handle(Adaptor2d_HCurve2d)& Standard_Real Tol = 1.e-5; Standard_Real Dist2; - Extrema_EPCOfExtPC2d extrema(P,C->Curve2d(),Nbu,epsX,Tol); + Extrema_EPCOfExtPC2d extrema(P,*C,Nbu,epsX,Tol); if (!extrema.IsDone()) { return Standard_False; } @@ -262,28 +262,28 @@ Standard_Boolean IntPatch_HInterTool::Project (const Handle(Adaptor2d_HCurve2d)& } Standard_Real IntPatch_HInterTool::Tolerance (const Handle(Adaptor3d_HVertex)& V, - const Handle(Adaptor2d_HCurve2d)& C) + const Handle(Adaptor2d_Curve2d)& C) { return V->Resolution(C); } Standard_Real IntPatch_HInterTool::Parameter (const Handle(Adaptor3d_HVertex)& V, - const Handle(Adaptor2d_HCurve2d)& C) + const Handle(Adaptor2d_Curve2d)& C) { return V->Parameter(C); } -Standard_Boolean IntPatch_HInterTool::HasBeenSeen(const Handle(Adaptor2d_HCurve2d)&) +Standard_Boolean IntPatch_HInterTool::HasBeenSeen(const Handle(Adaptor2d_Curve2d)&) { return Standard_False; } -Standard_Integer IntPatch_HInterTool::NbPoints(const Handle(Adaptor2d_HCurve2d)&) +Standard_Integer IntPatch_HInterTool::NbPoints(const Handle(Adaptor2d_Curve2d)&) { return 0; } -void IntPatch_HInterTool::Value(const Handle(Adaptor2d_HCurve2d)&, +void IntPatch_HInterTool::Value(const Handle(Adaptor2d_Curve2d)&, const Standard_Integer, gp_Pnt&, Standard_Real&, @@ -292,39 +292,39 @@ void IntPatch_HInterTool::Value(const Handle(Adaptor2d_HCurve2d)&, throw Standard_OutOfRange(); } -Standard_Boolean IntPatch_HInterTool::IsVertex(const Handle(Adaptor2d_HCurve2d)&, +Standard_Boolean IntPatch_HInterTool::IsVertex(const Handle(Adaptor2d_Curve2d)&, const Standard_Integer) { return Standard_False; } -void IntPatch_HInterTool::Vertex(const Handle(Adaptor2d_HCurve2d)&, +void IntPatch_HInterTool::Vertex(const Handle(Adaptor2d_Curve2d)&, const Standard_Integer, Handle(Adaptor3d_HVertex)&) { throw Standard_OutOfRange(); } -Standard_Integer IntPatch_HInterTool::NbSegments(const Handle(Adaptor2d_HCurve2d)&) +Standard_Integer IntPatch_HInterTool::NbSegments(const Handle(Adaptor2d_Curve2d)&) { return 0; } -Standard_Boolean IntPatch_HInterTool::HasFirstPoint (const Handle(Adaptor2d_HCurve2d)&, +Standard_Boolean IntPatch_HInterTool::HasFirstPoint (const Handle(Adaptor2d_Curve2d)&, const Standard_Integer, Standard_Integer&) { throw Standard_OutOfRange(); } -Standard_Boolean IntPatch_HInterTool::HasLastPoint (const Handle(Adaptor2d_HCurve2d)&, +Standard_Boolean IntPatch_HInterTool::HasLastPoint (const Handle(Adaptor2d_Curve2d)&, const Standard_Integer, Standard_Integer&) { throw Standard_OutOfRange(); } -Standard_Boolean IntPatch_HInterTool::IsAllSolution (const Handle(Adaptor2d_HCurve2d)&) +Standard_Boolean IntPatch_HInterTool::IsAllSolution (const Handle(Adaptor2d_Curve2d)&) { return Standard_False; } diff --git a/src/IntPatch/IntPatch_HInterTool.hxx b/src/IntPatch/IntPatch_HInterTool.hxx index f5387936c3..f66a48d671 100644 --- a/src/IntPatch/IntPatch_HInterTool.hxx +++ b/src/IntPatch/IntPatch_HInterTool.hxx @@ -17,20 +17,13 @@ #ifndef _IntPatch_HInterTool_HeaderFile #define _IntPatch_HInterTool_HeaderFile -#include -#include -#include +#include +#include -#include -#include -#include -class Adaptor3d_HSurface; -class Adaptor2d_HCurve2d; class gp_Pnt2d; class Adaptor3d_HVertex; class gp_Pnt; - //! Tool for the intersection between 2 surfaces. //! Regroupe pour l instant les methodes hors Adaptor3d... class IntPatch_HInterTool @@ -42,39 +35,39 @@ public: Standard_EXPORT IntPatch_HInterTool(); - static Standard_Boolean SingularOnUMin (const Handle(Adaptor3d_HSurface)& S); + static Standard_Boolean SingularOnUMin (const Handle(Adaptor3d_Surface)& S); - static Standard_Boolean SingularOnUMax (const Handle(Adaptor3d_HSurface)& S); + static Standard_Boolean SingularOnUMax (const Handle(Adaptor3d_Surface)& S); - static Standard_Boolean SingularOnVMin (const Handle(Adaptor3d_HSurface)& S); + static Standard_Boolean SingularOnVMin (const Handle(Adaptor3d_Surface)& S); - static Standard_Boolean SingularOnVMax (const Handle(Adaptor3d_HSurface)& S); + static Standard_Boolean SingularOnVMax (const Handle(Adaptor3d_Surface)& S); - Standard_EXPORT static Standard_Integer NbSamplesU (const Handle(Adaptor3d_HSurface)& S, const Standard_Real u1, const Standard_Real u2); + Standard_EXPORT static Standard_Integer NbSamplesU (const Handle(Adaptor3d_Surface)& S, const Standard_Real u1, const Standard_Real u2); - Standard_EXPORT static Standard_Integer NbSamplesV (const Handle(Adaptor3d_HSurface)& S, const Standard_Real v1, const Standard_Real v2); + Standard_EXPORT static Standard_Integer NbSamplesV (const Handle(Adaptor3d_Surface)& S, const Standard_Real v1, const Standard_Real v2); - Standard_EXPORT Standard_Integer NbSamplePoints (const Handle(Adaptor3d_HSurface)& S); + Standard_EXPORT Standard_Integer NbSamplePoints (const Handle(Adaptor3d_Surface)& S); - Standard_EXPORT void SamplePoint (const Handle(Adaptor3d_HSurface)& S, const Standard_Integer Index, Standard_Real& U, Standard_Real& V) const; + Standard_EXPORT void SamplePoint (const Handle(Adaptor3d_Surface)& S, const Standard_Integer Index, Standard_Real& U, Standard_Real& V) const; //! Returns True if all the intersection point and edges //! are known on the Arc. //! The intersection point are given as vertices. //! The intersection edges are given as intervals between //! two vertices. - Standard_EXPORT static Standard_Boolean HasBeenSeen (const Handle(Adaptor2d_HCurve2d)& C); + Standard_EXPORT static Standard_Boolean HasBeenSeen (const Handle(Adaptor2d_Curve2d)& C); //! returns the number of points which is used to make //! a sample on the arc. this number is a function of //! the Surface and the CurveOnSurface complexity. - Standard_EXPORT static Standard_Integer NbSamplesOnArc (const Handle(Adaptor2d_HCurve2d)& A); + Standard_EXPORT static Standard_Integer NbSamplesOnArc (const Handle(Adaptor2d_Curve2d)& A); //! Returns the parametric limits on the arc C. //! These limits must be finite : they are either //! the real limits of the arc, for a finite arc, //! or a bounding box for an infinite arc. - Standard_EXPORT static void Bounds (const Handle(Adaptor2d_HCurve2d)& C, Standard_Real& Ufirst, Standard_Real& Ulast); + Standard_EXPORT static void Bounds (const Handle(Adaptor2d_Curve2d)& C, Standard_Real& Ufirst, Standard_Real& Ulast); //! Projects the point P on the arc C. //! If the methods returns Standard_True, the projection is @@ -82,36 +75,36 @@ public: //! of the projected point, Ptproj is the projected Point. //! If the method returns Standard_False, Param proj and Ptproj //! are not significant. - Standard_EXPORT static Standard_Boolean Project (const Handle(Adaptor2d_HCurve2d)& C, const gp_Pnt2d& P, Standard_Real& Paramproj, gp_Pnt2d& Ptproj); + Standard_EXPORT static Standard_Boolean Project (const Handle(Adaptor2d_Curve2d)& C, const gp_Pnt2d& P, Standard_Real& Paramproj, gp_Pnt2d& Ptproj); //! Returns the parametric tolerance used to consider //! that the vertex and another point meet, i-e //! if Abs(parameter(Vertex) - parameter(OtherPnt))<= //! Tolerance, the points are "merged". - Standard_EXPORT static Standard_Real Tolerance (const Handle(Adaptor3d_HVertex)& V, const Handle(Adaptor2d_HCurve2d)& C); + Standard_EXPORT static Standard_Real Tolerance (const Handle(Adaptor3d_HVertex)& V, const Handle(Adaptor2d_Curve2d)& C); //! Returns the parameter of the vertex V on the arc A. - Standard_EXPORT static Standard_Real Parameter (const Handle(Adaptor3d_HVertex)& V, const Handle(Adaptor2d_HCurve2d)& C); + Standard_EXPORT static Standard_Real Parameter (const Handle(Adaptor3d_HVertex)& V, const Handle(Adaptor2d_Curve2d)& C); //! Returns the number of intersection points on the arc A. - Standard_EXPORT static Standard_Integer NbPoints (const Handle(Adaptor2d_HCurve2d)& C); + Standard_EXPORT static Standard_Integer NbPoints (const Handle(Adaptor2d_Curve2d)& C); //! Returns the value (Pt), the tolerance (Tol), and //! the parameter (U) on the arc A , of the intersection //! point of range Index. - Standard_EXPORT static void Value (const Handle(Adaptor2d_HCurve2d)& C, const Standard_Integer Index, gp_Pnt& Pt, Standard_Real& Tol, Standard_Real& U); + Standard_EXPORT static void Value (const Handle(Adaptor2d_Curve2d)& C, const Standard_Integer Index, gp_Pnt& Pt, Standard_Real& Tol, Standard_Real& U); //! Returns True if the intersection point of range Index //! corresponds with a vertex on the arc A. - Standard_EXPORT static Standard_Boolean IsVertex (const Handle(Adaptor2d_HCurve2d)& C, const Standard_Integer Index); + Standard_EXPORT static Standard_Boolean IsVertex (const Handle(Adaptor2d_Curve2d)& C, const Standard_Integer Index); //! When IsVertex returns True, this method returns the //! vertex on the arc A. - Standard_EXPORT static void Vertex (const Handle(Adaptor2d_HCurve2d)& C, const Standard_Integer Index, Handle(Adaptor3d_HVertex)& V); + Standard_EXPORT static void Vertex (const Handle(Adaptor2d_Curve2d)& C, const Standard_Integer Index, Handle(Adaptor3d_HVertex)& V); //! returns the number of part of A solution of the //! of intersection problem. - Standard_EXPORT static Standard_Integer NbSegments (const Handle(Adaptor2d_HCurve2d)& C); + Standard_EXPORT static Standard_Integer NbSegments (const Handle(Adaptor2d_Curve2d)& C); //! Returns True when the segment of range Index is not //! open at the left side. In that case, IndFirst is the @@ -119,7 +112,7 @@ public: //! of the one which defines the left bound of the segment. //! Otherwise, the method has to return False, and IndFirst //! has no meaning. - Standard_EXPORT static Standard_Boolean HasFirstPoint (const Handle(Adaptor2d_HCurve2d)& C, const Standard_Integer Index, Standard_Integer& IndFirst); + Standard_EXPORT static Standard_Boolean HasFirstPoint (const Handle(Adaptor2d_Curve2d)& C, const Standard_Integer Index, Standard_Integer& IndFirst); //! Returns True when the segment of range Index is not //! open at the right side. In that case, IndLast is the @@ -127,11 +120,11 @@ public: //! of the one which defines the right bound of the segment. //! Otherwise, the method has to return False, and IndLast //! has no meaning. - Standard_EXPORT static Standard_Boolean HasLastPoint (const Handle(Adaptor2d_HCurve2d)& C, const Standard_Integer Index, Standard_Integer& IndLast); + Standard_EXPORT static Standard_Boolean HasLastPoint (const Handle(Adaptor2d_Curve2d)& C, const Standard_Integer Index, Standard_Integer& IndLast); //! Returns True when the whole restriction is solution //! of the intersection problem. - Standard_EXPORT static Standard_Boolean IsAllSolution (const Handle(Adaptor2d_HCurve2d)& C); + Standard_EXPORT static Standard_Boolean IsAllSolution (const Handle(Adaptor2d_Curve2d)& C); diff --git a/src/IntPatch/IntPatch_HInterTool.lxx b/src/IntPatch/IntPatch_HInterTool.lxx index e5e4157f09..d638ad6c81 100644 --- a/src/IntPatch/IntPatch_HInterTool.lxx +++ b/src/IntPatch/IntPatch_HInterTool.lxx @@ -14,22 +14,22 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -inline Standard_Boolean IntPatch_HInterTool::SingularOnUMin (const Handle(Adaptor3d_HSurface)& ) +inline Standard_Boolean IntPatch_HInterTool::SingularOnUMin (const Handle(Adaptor3d_Surface)& ) { return Standard_False; } -inline Standard_Boolean IntPatch_HInterTool::SingularOnUMax (const Handle(Adaptor3d_HSurface)& ) +inline Standard_Boolean IntPatch_HInterTool::SingularOnUMax (const Handle(Adaptor3d_Surface)& ) { return Standard_False; } -inline Standard_Boolean IntPatch_HInterTool::SingularOnVMin (const Handle(Adaptor3d_HSurface)& ) +inline Standard_Boolean IntPatch_HInterTool::SingularOnVMin (const Handle(Adaptor3d_Surface)& ) { return Standard_False; } -inline Standard_Boolean IntPatch_HInterTool::SingularOnVMax (const Handle(Adaptor3d_HSurface)& ) +inline Standard_Boolean IntPatch_HInterTool::SingularOnVMax (const Handle(Adaptor3d_Surface)& ) { return Standard_False; } diff --git a/src/IntPatch/IntPatch_ImpImpIntersection.cxx b/src/IntPatch/IntPatch_ImpImpIntersection.cxx index 863a83bcb7..d200621511 100644 --- a/src/IntPatch/IntPatch_ImpImpIntersection.cxx +++ b/src/IntPatch/IntPatch_ImpImpIntersection.cxx @@ -15,8 +15,8 @@ // commercial license or contractual agreement. -#include -#include +#include +#include #include #include #include diff --git a/src/IntPatch/IntPatch_ImpImpIntersection.hxx b/src/IntPatch/IntPatch_ImpImpIntersection.hxx index 989cfa2922..4954470cf9 100644 --- a/src/IntPatch/IntPatch_ImpImpIntersection.hxx +++ b/src/IntPatch/IntPatch_ImpImpIntersection.hxx @@ -17,25 +17,12 @@ #ifndef _IntPatch_ImpImpIntersection_HeaderFile #define _IntPatch_ImpImpIntersection_HeaderFile -#include -#include -#include - -#include +#include #include #include #include -#include -#include -class StdFail_NotDone; -class Standard_OutOfRange; -class Standard_DomainError; -class Standard_ConstructionError; -class Adaptor3d_HSurface; -class Adaptor3d_TopolTool; -class IntPatch_Point; -class IntPatch_Line; +class Adaptor3d_TopolTool; //! Implementation of the intersection between two //! quadric patches : Plane, Cone, Cylinder or Sphere. @@ -69,7 +56,7 @@ public: //! When intersection result returns IntPatch_RLine and another //! IntPatch_Line (not restriction) we (in case of theIsReqToKeepRLine==TRUE) //! will always keep both lines even if they are coincided. - Standard_EXPORT IntPatch_ImpImpIntersection(const Handle(Adaptor3d_HSurface)& S1, const Handle(Adaptor3d_TopolTool)& D1, const Handle(Adaptor3d_HSurface)& S2, const Handle(Adaptor3d_TopolTool)& D2, const Standard_Real TolArc, const Standard_Real TolTang, const Standard_Boolean theIsReqToKeepRLine = Standard_False); + Standard_EXPORT IntPatch_ImpImpIntersection(const Handle(Adaptor3d_Surface)& S1, const Handle(Adaptor3d_TopolTool)& D1, const Handle(Adaptor3d_Surface)& S2, const Handle(Adaptor3d_TopolTool)& D2, const Standard_Real TolArc, const Standard_Real TolTang, const Standard_Boolean theIsReqToKeepRLine = Standard_False); //! Flag theIsReqToKeepRLine has been entered only for //! compatibility with TopOpeBRep package. It shall be deleted @@ -77,9 +64,9 @@ public: //! When intersection result returns IntPatch_RLine and another //! IntPatch_Line (not restriction) we (in case of theIsReqToKeepRLine==TRUE) //! will always keep both lines even if they are coincided. - Standard_EXPORT void Perform (const Handle(Adaptor3d_HSurface)& S1, + Standard_EXPORT void Perform (const Handle(Adaptor3d_Surface)& S1, const Handle(Adaptor3d_TopolTool)& D1, - const Handle(Adaptor3d_HSurface)& S2, + const Handle(Adaptor3d_Surface)& S2, const Handle(Adaptor3d_TopolTool)& D2, const Standard_Real TolArc, const Standard_Real TolTang, diff --git a/src/IntPatch/IntPatch_ImpImpIntersection_0.gxx b/src/IntPatch/IntPatch_ImpImpIntersection_0.gxx index ffa1914434..f7ed7583f0 100644 --- a/src/IntPatch/IntPatch_ImpImpIntersection_0.gxx +++ b/src/IntPatch/IntPatch_ImpImpIntersection_0.gxx @@ -31,8 +31,8 @@ #include -static void PutPointsOnLine(const Handle(Adaptor3d_HSurface)& S1, - const Handle(Adaptor3d_HSurface)& S2, +static void PutPointsOnLine(const Handle(Adaptor3d_Surface)& S1, + const Handle(Adaptor3d_Surface)& S2, const IntPatch_SequenceOfPathPointOfTheSOnBounds&, const IntPatch_SequenceOfLine&, const Standard_Boolean, @@ -77,7 +77,7 @@ static Standard_Boolean FindLine(gp_Pnt& Psurf, gp_Vec& Vtgtint, Standard_Integer& theLineIdx, Standard_Integer OnlyThisLine, - const Handle(Adaptor2d_HCurve2d)& thearc, + const Handle(Adaptor2d_Curve2d)& thearc, Standard_Real& theparameteronarc, gp_Pnt& thepointonarc, const IntSurf_Quadric& QuadSurf1, @@ -101,7 +101,7 @@ static void ProcessRLine (IntPatch_SequenceOfLine&, Standard_Boolean IntersectionWithAnArc(gp_Pnt& PSurf, const Handle(IntPatch_ALine)& alin, Standard_Real& para, - const Handle(Adaptor2d_HCurve2d)& thearc, + const Handle(Adaptor2d_Curve2d)& thearc, Standard_Real& _theparameteronarc, gp_Pnt& thepointonarc, const IntSurf_Quadric& QuadSurf, @@ -262,8 +262,8 @@ Standard_Boolean IntersectionWithAnArc(gp_Pnt& PSurf, //-- ====================================================================== -static void Recadre(const Handle(Adaptor3d_HSurface)& myHS1, - const Handle(Adaptor3d_HSurface)& myHS2, +static void Recadre(const Handle(Adaptor3d_Surface)& myHS1, + const Handle(Adaptor3d_Surface)& myHS2, Standard_Real& u1, Standard_Real& v1, Standard_Real& u2, @@ -361,8 +361,8 @@ static void Recadre(const Handle(Adaptor3d_HSurface)& myHS1, //function : PutPointsOnLine //purpose : //======================================================================= -void PutPointsOnLine(const Handle(Adaptor3d_HSurface)& S1, - const Handle(Adaptor3d_HSurface)& S2, +void PutPointsOnLine(const Handle(Adaptor3d_Surface)& S1, + const Handle(Adaptor3d_Surface)& S2, const IntPatch_SequenceOfPathPointOfTheSOnBounds& listpnt, const IntPatch_SequenceOfLine& slin, const Standard_Boolean OnFirst, @@ -398,7 +398,7 @@ void PutPointsOnLine(const Handle(Adaptor3d_HSurface)& S1, IntSurf_Transition Transline,Transarc; - Handle(Adaptor2d_HCurve2d) currentarc; + Handle(Adaptor2d_Curve2d) currentarc; Handle(Adaptor3d_HVertex) vtx,vtxbis; IntPatch_Point solpnt; @@ -627,7 +627,7 @@ Standard_Boolean MultiplePoint (const IntPatch_SequenceOfPathPointOfTheSOnBound IntPatch_Point intpt; - Handle(Adaptor2d_HCurve2d) currentarc; + Handle(Adaptor2d_Curve2d) currentarc; Handle(Adaptor3d_HVertex) vtx,vtxbis; Standard_Integer nbpnt = listpnt.Length(); @@ -800,7 +800,7 @@ Standard_Boolean PointOnSecondDom (const IntPatch_SequenceOfPathPointOfTheSOnBou IntSurf_Transition Transline,Transarc; IntPatch_Point intpt; - Handle(Adaptor2d_HCurve2d) currentarc; + Handle(Adaptor2d_Curve2d) currentarc; Handle(Adaptor3d_HVertex) vtx,vtxbis; gp_Pnt ptbid; gp_Vec Vtgrst; @@ -931,7 +931,7 @@ Standard_Boolean FindLine(gp_Pnt& Psurf, gp_Vec& Vtgtint, Standard_Integer& theLineIdx, Standard_Integer OnlyThisLine, - const Handle(Adaptor2d_HCurve2d)& thearc, + const Handle(Adaptor2d_Curve2d)& thearc, Standard_Real& theparameteronarc, gp_Pnt& thepointonarc, const IntSurf_Quadric& QuadSurf1, @@ -1330,7 +1330,7 @@ void ProcessSegments (const IntPatch_SequenceOfSegmentOfTheSOnBounds& listedg, Standard_Integer nbedg = listedg.Length(); Standard_Integer Nblines,Nbpts; - Handle(Adaptor2d_HCurve2d) arcRef; + Handle(Adaptor2d_Curve2d) arcRef; IntPatch_Point ptvtx, newptvtx; Handle(IntPatch_RLine) rline; //-- On fait rline = new ... par la suite @@ -1502,7 +1502,7 @@ void ProcessSegments (const IntPatch_SequenceOfSegmentOfTheSOnBounds& listedg, } tgline.SetLinearForm(d2d.X(),d1u,d2d.Y(),d1v); if (ptvtx.IsOnDomS1()) { - const Handle(Adaptor2d_HCurve2d)& thearc = ptvtx.ArcOnS1(); + const Handle(Adaptor2d_Curve2d)& thearc = ptvtx.ArcOnS1(); thearc->D1(ptvtx.ParameterOnArc1(),p2d,d2d); Quad1.D1(p2d.X(),p2d.Y(),valpt,d1u,d1v); tgarc.SetLinearForm(d2d.X(),d1u,d2d.Y(),d1v); @@ -1518,7 +1518,7 @@ void ProcessSegments (const IntPatch_SequenceOfSegmentOfTheSOnBounds& listedg, TRest,TArc); } if (ptvtx.IsOnDomS2()) { - const Handle(Adaptor2d_HCurve2d)& thearc = ptvtx.ArcOnS2(); + const Handle(Adaptor2d_Curve2d)& thearc = ptvtx.ArcOnS2(); thearc->D1(ptvtx.ParameterOnArc2(),p2d,d2d); Quad2.D1(p2d.X(),p2d.Y(),valpt,d1u,d1v); tgarc.SetLinearForm(d2d.X(),d1u,d2d.Y(),d1v); @@ -1568,7 +1568,7 @@ void ProcessSegments (const IntPatch_SequenceOfSegmentOfTheSOnBounds& listedg, } tgline.SetLinearForm(d2d.X(),d1u,d2d.Y(),d1v); if (ptvtx.IsOnDomS1()) { - const Handle(Adaptor2d_HCurve2d)& thearc = ptvtx.ArcOnS1(); + const Handle(Adaptor2d_Curve2d)& thearc = ptvtx.ArcOnS1(); thearc->D1(ptvtx.ParameterOnArc1(),p2d,d2d); Quad1.D1(p2d.X(),p2d.Y(),valpt,d1u,d1v); tgarc.SetLinearForm(d2d.X(),d1u,d2d.Y(),d1v); @@ -1584,7 +1584,7 @@ void ProcessSegments (const IntPatch_SequenceOfSegmentOfTheSOnBounds& listedg, TRest,TArc); } if (ptvtx.IsOnDomS2()) { - const Handle(Adaptor2d_HCurve2d)& thearc = ptvtx.ArcOnS2(); + const Handle(Adaptor2d_Curve2d)& thearc = ptvtx.ArcOnS2(); thearc->D1(ptvtx.ParameterOnArc2(),p2d,d2d); Quad2.D1(p2d.X(),p2d.Y(),valpt,d1u,d1v); tgarc.SetLinearForm(d2d.X(),d1u,d2d.Y(),d1v); @@ -1767,7 +1767,7 @@ static Standard_Boolean IsRLineGood(const IntSurf_Quadric& Quad1, gp_Pnt aPMid; if(theRLine->IsArcOnS1()) { - const Handle(Adaptor2d_HCurve2d)& anAC2d = theRLine->ArcOnS1(); + const Handle(Adaptor2d_Curve2d)& anAC2d = theRLine->ArcOnS1(); const Standard_Real aParF = anAC2d->FirstParameter(), aParL = anAC2d->LastParameter(); gp_Pnt2d aP2d(anAC2d->Value(0.5*(aParF+aParL))); @@ -1775,7 +1775,7 @@ static Standard_Boolean IsRLineGood(const IntSurf_Quadric& Quad1, } else { - const Handle(Adaptor2d_HCurve2d)& anAC2d = theRLine->ArcOnS2(); + const Handle(Adaptor2d_Curve2d)& anAC2d = theRLine->ArcOnS2(); const Standard_Real aParF = anAC2d->FirstParameter(), aParL = anAC2d->LastParameter(); gp_Pnt2d aP2d(anAC2d->Value(0.5*(aParF+aParL))); @@ -1800,8 +1800,8 @@ static Standard_Boolean IsRLineGood(const IntSurf_Quadric& Quad1, void ProcessRLine (IntPatch_SequenceOfLine& slin, -// const Handle(Adaptor3d_HSurface)& Surf1, -// const Handle(Adaptor3d_HSurface)& Surf2, +// const Handle(Adaptor3d_Surface)& Surf1, +// const Handle(Adaptor3d_Surface)& Surf2, const IntSurf_Quadric& Quad1, const IntSurf_Quadric& Quad2, const Standard_Real _TolArc, @@ -1820,7 +1820,7 @@ void ProcessRLine (IntPatch_SequenceOfLine& slin, Standard_Boolean OnFirst = Standard_False,project = Standard_False,keeppoint = Standard_False; - Handle(Adaptor2d_HCurve2d) arcref; + Handle(Adaptor2d_Curve2d) arcref; Standard_Real paramproj,paramf,paraml; TColgp_SequenceOfPnt seq_Pnt3d; @@ -2002,7 +2002,7 @@ void ProcessRLine (IntPatch_SequenceOfLine& slin, Quad1.D1(p2d.X(),p2d.Y(),valpt,d1u,d1v); tgrest.SetLinearForm(d2d.X(),d1u,d2d.Y(),d1v); - const Handle(Adaptor2d_HCurve2d)& thearc = Ptvtx.ArcOnS2(); + const Handle(Adaptor2d_Curve2d)& thearc = Ptvtx.ArcOnS2(); thearc->D1(Ptvtx.ParameterOnArc2(),p2d,d2d); Quad2.D1(p2d.X(),p2d.Y(),valpt,d1u,d1v); tgarc.SetLinearForm(d2d.X(),d1u,d2d.Y(),d1v); @@ -2022,7 +2022,7 @@ void ProcessRLine (IntPatch_SequenceOfLine& slin, Quad2.D1(p2d.X(),p2d.Y(),valpt,d1u,d1v); tgrest.SetLinearForm(d2d.X(),d1u,d2d.Y(),d1v); - const Handle(Adaptor2d_HCurve2d)& thearc = Ptvtx.ArcOnS1(); + const Handle(Adaptor2d_Curve2d)& thearc = Ptvtx.ArcOnS1(); thearc->D1(Ptvtx.ParameterOnArc1(),p2d,d2d); Quad1.D1(p2d.X(),p2d.Y(),valpt,d1u,d1v); tgarc.SetLinearForm(d2d.X(),d1u,d2d.Y(),d1v); diff --git a/src/IntPatch/IntPatch_ImpImpIntersection_2.gxx b/src/IntPatch/IntPatch_ImpImpIntersection_2.gxx index f8924fe575..d2f25895cd 100644 --- a/src/IntPatch/IntPatch_ImpImpIntersection_2.gxx +++ b/src/IntPatch/IntPatch_ImpImpIntersection_2.gxx @@ -17,7 +17,7 @@ #include static - Standard_Integer SetQuad(const Handle(Adaptor3d_HSurface)& theS, + Standard_Integer SetQuad(const Handle(Adaptor3d_Surface)& theS, GeomAbs_SurfaceType& theTS, IntSurf_Quadric& theQuad); @@ -37,9 +37,9 @@ oppo(Standard_False) //purpose : //======================================================================= IntPatch_ImpImpIntersection::IntPatch_ImpImpIntersection - (const Handle(Adaptor3d_HSurface)& S1, + (const Handle(Adaptor3d_Surface)& S1, const Handle(Adaptor3d_TopolTool)& D1, - const Handle(Adaptor3d_HSurface)& S2, + const Handle(Adaptor3d_Surface)& S2, const Handle(Adaptor3d_TopolTool)& D2, const Standard_Real TolArc, const Standard_Real TolTang, @@ -51,9 +51,9 @@ IntPatch_ImpImpIntersection::IntPatch_ImpImpIntersection //function : Perform //purpose : //======================================================================= -void IntPatch_ImpImpIntersection::Perform(const Handle(Adaptor3d_HSurface)& S1, +void IntPatch_ImpImpIntersection::Perform(const Handle(Adaptor3d_Surface)& S1, const Handle(Adaptor3d_TopolTool)& D1, - const Handle(Adaptor3d_HSurface)& S2, + const Handle(Adaptor3d_Surface)& S2, const Handle(Adaptor3d_TopolTool)& D2, const Standard_Real TolArc, const Standard_Real TolTang, @@ -112,7 +112,7 @@ void IntPatch_ImpImpIntersection::Perform(const Handle(Adaptor3d_HSurface)& S1, case 21: { // Plane/Cylinder Standard_Real VMin, VMax, H; // - const Handle(Adaptor3d_HSurface)& aSCyl = bReverse ? S1 : S2; + const Handle(Adaptor3d_Surface)& aSCyl = bReverse ? S1 : S2; VMin = aSCyl->FirstVParameter(); VMax = aSCyl->LastVParameter(); H = (Precision::IsNegativeInfinite(VMin) || @@ -546,7 +546,7 @@ void IntPatch_ImpImpIntersection::Perform(const Handle(Adaptor3d_HSurface)& S1, //function : SetQuad //purpose : //======================================================================= -Standard_Integer SetQuad(const Handle(Adaptor3d_HSurface)& theS, +Standard_Integer SetQuad(const Handle(Adaptor3d_Surface)& theS, GeomAbs_SurfaceType& theTS, IntSurf_Quadric& theQuad) { diff --git a/src/IntPatch/IntPatch_ImpPrmIntersection.cxx b/src/IntPatch/IntPatch_ImpPrmIntersection.cxx index e96e62a73c..de22e875f0 100644 --- a/src/IntPatch/IntPatch_ImpPrmIntersection.cxx +++ b/src/IntPatch/IntPatch_ImpPrmIntersection.cxx @@ -16,7 +16,7 @@ #include -#include +#include #include #include #include @@ -33,6 +33,7 @@ #include #include #include +#include #include #include #include @@ -47,8 +48,8 @@ static Standard_Boolean DecomposeResult(const Handle(IntPatch_PointLine)& theLin const Standard_Boolean IsReversed, const IntSurf_Quadric& theQuad, const Handle(Adaptor3d_TopolTool)& thePDomain, - const Handle(Adaptor3d_HSurface)& theQSurf, - const Handle(Adaptor3d_HSurface)& theOtherSurf, + const Handle(Adaptor3d_Surface)& theQSurf, + const Handle(Adaptor3d_Surface)& theOtherSurf, const Standard_Real theArcTol, const Standard_Real theTolTang, IntPatch_SequenceOfLine& theLines); @@ -57,7 +58,7 @@ static IntSurf_SequenceOfPathPoint& seqpdep, const Handle(Adaptor3d_TopolTool)& Domain, IntPatch_TheSurfFunction& Func, - const Handle(Adaptor3d_HSurface)& PSurf, + const Handle(Adaptor3d_Surface)& PSurf, TColStd_Array1OfInteger& Destination); static void Recadre(const Standard_Boolean , @@ -74,7 +75,7 @@ static static Standard_Boolean IsCoincide(IntPatch_TheSurfFunction& theFunc, const Handle(IntPatch_PointLine)& theLine, - const Handle(Adaptor2d_HCurve2d)& theArc, + const Handle(Adaptor2d_Curve2d)& theArc, const Standard_Boolean isTheSurface1Using, const Standard_Real theToler3D, const Standard_Real theToler2D, @@ -84,7 +85,7 @@ static //function : IsSeamOrPole //purpose : //======================================================================= -static IntPatch_SpecPntType IsSeamOrPole(const Handle(Adaptor3d_HSurface)& theQSurf, +static IntPatch_SpecPntType IsSeamOrPole(const Handle(Adaptor3d_Surface)& theQSurf, const Handle(IntSurf_LineOn2S)& theLine, const Standard_Boolean IsReversed, const Standard_Integer theRefIndex, @@ -189,9 +190,9 @@ IntPatch_ImpPrmIntersection::IntPatch_ImpPrmIntersection () //======================================================================= IntPatch_ImpPrmIntersection::IntPatch_ImpPrmIntersection - (const Handle(Adaptor3d_HSurface)& Surf1, + (const Handle(Adaptor3d_Surface)& Surf1, const Handle(Adaptor3d_TopolTool)& D1, - const Handle(Adaptor3d_HSurface)& Surf2, + const Handle(Adaptor3d_Surface)& Surf2, const Handle(Adaptor3d_TopolTool)& D2, const Standard_Real TolArc, const Standard_Real TolTang, @@ -227,14 +228,14 @@ void ComputeTangency (const IntPatch_TheSOnBounds& solrst, IntSurf_SequenceOfPathPoint& seqpdep, const Handle(Adaptor3d_TopolTool)& Domain, IntPatch_TheSurfFunction& Func, - const Handle(Adaptor3d_HSurface)& PSurf, + const Handle(Adaptor3d_Surface)& PSurf, TColStd_Array1OfInteger& Destination) { Standard_Integer i,k, NbPoints, seqlength; Standard_Real theparam,test; Standard_Boolean fairpt, ispassing; TopAbs_Orientation arcorien,vtxorien; - Handle(Adaptor2d_HCurve2d) thearc; + Handle(Adaptor2d_Curve2d) thearc; Handle(Adaptor3d_HVertex) vtx,vtxbis; //Standard_Boolean ispassing; IntPatch_ThePathPointOfTheSOnBounds PStart; @@ -484,9 +485,9 @@ void Recadre(const Standard_Boolean , //function : Perform //purpose : //======================================================================= -void IntPatch_ImpPrmIntersection::Perform (const Handle(Adaptor3d_HSurface)& Surf1, +void IntPatch_ImpPrmIntersection::Perform (const Handle(Adaptor3d_Surface)& Surf1, const Handle(Adaptor3d_TopolTool)& D1, - const Handle(Adaptor3d_HSurface)& Surf2, + const Handle(Adaptor3d_Surface)& Surf2, const Handle(Adaptor3d_TopolTool)& D2, const Standard_Real TolArc, const Standard_Real TolTang, @@ -517,7 +518,7 @@ void IntPatch_ImpPrmIntersection::Perform (const Handle(Adaptor3d_HSurface)& Sur gp_Pnt2d p2d; gp_Vec2d d2d; - Handle(Adaptor2d_HCurve2d) currentarc; + Handle(Adaptor2d_Curve2d) currentarc; GeomAbs_SurfaceType typeS1, typeS2; IntSurf_Quadric Quad; IntPatch_TheSurfFunction Func; @@ -1360,7 +1361,7 @@ void IntPatch_ImpPrmIntersection::Perform (const Handle(Adaptor3d_HSurface)& Sur gp_Pnt ptpoly; IntSurf_PntOn2S p2s; Handle(IntSurf_LineOn2S) Thelin = new IntSurf_LineOn2S (); - Handle(Adaptor2d_HCurve2d) arcsegm = thesegm.Curve(); + Handle(Adaptor2d_Curve2d) arcsegm = thesegm.Curve(); Standard_Integer nbsample = 100; if (!reversed) { @@ -1496,8 +1497,8 @@ void IntPatch_ImpPrmIntersection::Perform (const Handle(Adaptor3d_HSurface)& Sur // after (higher indices) - only Walking-line. const Standard_Real aTol3d = Max(Func.Tolerance(), TolTang); - const Handle(Adaptor3d_HSurface)& aQSurf = (reversed) ? Surf2 : Surf1; - const Handle(Adaptor3d_HSurface)& anOtherSurf = (reversed) ? Surf1 : Surf2; + const Handle(Adaptor3d_Surface)& aQSurf = (reversed) ? Surf2 : Surf1; + const Handle(Adaptor3d_Surface)& anOtherSurf = (reversed) ? Surf1 : Surf2; for (Standard_Integer i = 1; i <= slin.Length(); i++) { @@ -1510,10 +1511,10 @@ void IntPatch_ImpPrmIntersection::Perform (const Handle(Adaptor3d_HSurface)& Sur break; } - const Handle(Adaptor2d_HCurve2d)& anArc = aRL1->IsArcOnS1() ? + const Handle(Adaptor2d_Curve2d)& anArc = aRL1->IsArcOnS1() ? aRL1->ArcOnS1() : aRL1->ArcOnS2(); - if(anArc->Curve2d().GetType() != GeomAbs_Line) + if(anArc->GetType() != GeomAbs_Line) { //Restriction line must be isoline. //Other cases are not supported by @@ -1534,10 +1535,10 @@ void IntPatch_ImpPrmIntersection::Perform (const Handle(Adaptor3d_HSurface)& Sur if(!aRL2.IsNull()) { - const Handle(Adaptor2d_HCurve2d)& anArc2 = aRL2->IsArcOnS1() ? + const Handle(Adaptor2d_Curve2d)& anArc2 = aRL2->IsArcOnS1() ? aRL2->ArcOnS1() : aRL2->ArcOnS2(); - if(anArc2->Curve2d().GetType() != GeomAbs_Line) + if(anArc2->GetType() != GeomAbs_Line) { //Restriction line must be isoline. //Other cases are not supported by @@ -1550,7 +1551,7 @@ void IntPatch_ImpPrmIntersection::Perform (const Handle(Adaptor3d_HSurface)& Sur //aDir can be equal to one of following four values only //(because Reastriction line is boundary of rectangular surface): //either {0, 1} or {0, -1} or {1, 0} or {-1, 0}. - const gp_Dir2d aDir = anArc->Curve2d().Line().Direction(); + const gp_Dir2d aDir = anArc->Line().Direction(); Standard_Real aTol2d = anOtherSurf->UResolution(aTol3d), aPeriod = anOtherSurf->IsVPeriodic() ? anOtherSurf->VPeriod() : 0.0; @@ -1573,7 +1574,7 @@ void IntPatch_ImpPrmIntersection::Perform (const Handle(Adaptor3d_HSurface)& Sur } else {//Restriction-Restriction - const Handle(Adaptor2d_HCurve2d)& anArc2 = aRL2->IsArcOnS1() ? + const Handle(Adaptor2d_Curve2d)& anArc2 = aRL2->IsArcOnS1() ? aRL2->ArcOnS1() : aRL2->ArcOnS2(); @@ -1818,7 +1819,7 @@ static inline void Correct2DBounds(const Standard_Real UF, static void AdjustLine(Handle(IntSurf_LineOn2S)& Line, const Standard_Boolean IsReversed, - const Handle(Adaptor3d_HSurface)& QSurf, + const Handle(Adaptor3d_Surface)& QSurf, const Standard_Real TOL2D) { Standard_Real VF = QSurf->FirstVParameter(); @@ -2344,11 +2345,11 @@ static void PutIntVertices(const Handle(IntPatch_PointLine)& Line, //In fact, aRLine is always on the parametric surface. //If (theIsReversed == TRUE) then (U1, V1) - point on //parametric surface, otherwise - point on quadric. - const Handle(Adaptor2d_HCurve2d)& anArc = aRLine->IsArcOnS1() ? + const Handle(Adaptor2d_Curve2d)& anArc = aRLine->IsArcOnS1() ? aRLine->ArcOnS1() : aRLine->ArcOnS2(); - const gp_Lin2d aLin(anArc->Curve2d().Line()); + const gp_Lin2d aLin(anArc->Line()); gp_Pnt2d aPSurf; if(theIsReversed) @@ -2500,7 +2501,7 @@ static Standard_Boolean IsPointOnBoundary(const Standard_Real theToler2D, //purpose : Can change values of theNewLine (by adding the computed point on boundary, // which parameter will be adjusted) and theIsOnBoundary variables. //======================================================================= -static void DetectOfBoundaryAchievement(const Handle(Adaptor3d_HSurface)& theQSurf, // quadric +static void DetectOfBoundaryAchievement(const Handle(Adaptor3d_Surface)& theQSurf, // quadric const Standard_Boolean theIsReversed, const Handle(IntSurf_LineOn2S)& theSourceLine, const Standard_Integer thePointIndex, @@ -2584,8 +2585,8 @@ static Standard_Boolean DecomposeResult(const Handle(IntPatch_PointLine)& theLin const Standard_Boolean IsReversed, const IntSurf_Quadric& theQuad, const Handle(Adaptor3d_TopolTool)& thePDomain, - const Handle(Adaptor3d_HSurface)& theQSurf, //quadric - const Handle(Adaptor3d_HSurface)& thePSurf, //parametric + const Handle(Adaptor3d_Surface)& theQSurf, //quadric + const Handle(Adaptor3d_Surface)& thePSurf, //parametric const Standard_Real theArcTol, const Standard_Real theTolTang, IntPatch_SequenceOfLine& theLines) @@ -2595,10 +2596,10 @@ static Standard_Boolean DecomposeResult(const Handle(IntPatch_PointLine)& theLin const Handle(IntPatch_RLine)& aRL = Handle(IntPatch_RLine)::DownCast(theLine); if(!aRL.IsNull()) { - const Handle(Adaptor2d_HCurve2d)& anArc = aRL->IsArcOnS1() ? + const Handle(Adaptor2d_Curve2d)& anArc = aRL->IsArcOnS1() ? aRL->ArcOnS1() : aRL->ArcOnS2(); - if(anArc->Curve2d().GetType() != GeomAbs_Line) + if(anArc->GetType() != GeomAbs_Line) { //Restriction line must be isoline. //Other cases are not supported by @@ -3054,7 +3055,7 @@ static Standard_Boolean DecomposeResult(const Handle(IntPatch_PointLine)& theLin PutIntVertices(aRLine,sline,IsReversed,aVLine,theArcTol); } - const Handle(Adaptor2d_HCurve2d)& anArc = aRLine->IsArcOnS1() ? + const Handle(Adaptor2d_Curve2d)& anArc = aRLine->IsArcOnS1() ? aRLine->ArcOnS1() : aRLine->ArcOnS2(); @@ -3064,7 +3065,7 @@ static Standard_Boolean DecomposeResult(const Handle(IntPatch_PointLine)& theLin const IntSurf_PntOn2S &aRFirst = sline->Value(1), &aRLast = sline->Value(sline->NbPoints()); - const gp_Lin2d aLin(anArc->Curve2d().Line()); + const gp_Lin2d aLin(anArc->Line()); for(Standard_Integer aFLIndex = 0; aFLIndex < 2; aFLIndex++) { @@ -3163,7 +3164,7 @@ static Standard_Boolean CheckSegmSegm(const Standard_Real theRefParF, //======================================================================= Standard_Boolean IsCoincide(IntPatch_TheSurfFunction& theFunc, const Handle(IntPatch_PointLine)& theLine, - const Handle(Adaptor2d_HCurve2d)& theArc, + const Handle(Adaptor2d_Curve2d)& theArc, const Standard_Boolean isTheSurface1Using, //Surf1 is parametric? const Standard_Real theToler3D, const Standard_Real theToler2D, @@ -3174,9 +3175,9 @@ Standard_Boolean IsCoincide(IntPatch_TheSurfFunction& theFunc, if(theLine->ArcType() == IntPatch_Restriction) {//Restriction-restriction processing const Handle(IntPatch_RLine)& aRL2 = Handle(IntPatch_RLine)::DownCast(theLine); - const Handle(Adaptor2d_HCurve2d)& anArc = aRL2->IsArcOnS1() ? aRL2->ArcOnS1() : aRL2->ArcOnS2(); + const Handle(Adaptor2d_Curve2d)& anArc = aRL2->IsArcOnS1() ? aRL2->ArcOnS1() : aRL2->ArcOnS2(); - if(anArc->Curve2d().GetType() != GeomAbs_Line) + if(anArc->GetType() != GeomAbs_Line) { //Restriction line must be isoline. //Other cases are not supported by @@ -3185,8 +3186,8 @@ Standard_Boolean IsCoincide(IntPatch_TheSurfFunction& theFunc, return Standard_False; } - const gp_Lin2d aLin1(theArc->Curve2d().Line()), - aLin2(anArc->Curve2d().Line()); + const gp_Lin2d aLin1(theArc->Line()), + aLin2(anArc->Line()); if(!aLin1.Direction().IsParallel(aLin2.Direction(), Precision::Angular())) { @@ -3194,7 +3195,7 @@ Standard_Boolean IsCoincide(IntPatch_TheSurfFunction& theFunc, } const Standard_Real aDist = - theArc->Curve2d().Line().Distance(anArc->Curve2d().Line()); + theArc->Line().Distance(anArc->Line()); if((aDist < theToler2D) || (Abs(aDist - thePeriod) < theToler2D)) { const Standard_Real aRf = theArc->FirstParameter(), @@ -3223,7 +3224,7 @@ Standard_Boolean IsCoincide(IntPatch_TheSurfFunction& theFunc, const Standard_Integer aNbPnts = theLine->NbPnts(); const Standard_Real aUAf = theArc->FirstParameter(), aUAl = theArc->LastParameter(); - const gp_Lin2d anArcLin(theArc->Curve2d().Line()); + const gp_Lin2d anArcLin(theArc->Line()); math_Vector aX(1, 2), aVal(1, 1); diff --git a/src/IntPatch/IntPatch_ImpPrmIntersection.hxx b/src/IntPatch/IntPatch_ImpPrmIntersection.hxx index 664118537b..9907ea80c0 100644 --- a/src/IntPatch/IntPatch_ImpPrmIntersection.hxx +++ b/src/IntPatch/IntPatch_ImpPrmIntersection.hxx @@ -17,26 +17,13 @@ #ifndef _IntPatch_ImpPrmIntersection_HeaderFile #define _IntPatch_ImpPrmIntersection_HeaderFile -#include -#include -#include - -#include +#include #include #include #include #include -#include -#include -class StdFail_NotDone; -class Standard_OutOfRange; -class Standard_DomainError; -class Standard_ConstructionError; -class Adaptor3d_HSurface; -class Adaptor3d_TopolTool; -class IntPatch_Point; -class IntPatch_Line; +class Adaptor3d_TopolTool; //! Implementation of the intersection between a natural //! quadric patch : Plane, Cone, Cylinder or Sphere and @@ -50,12 +37,12 @@ public: Standard_EXPORT IntPatch_ImpPrmIntersection(); - Standard_EXPORT IntPatch_ImpPrmIntersection(const Handle(Adaptor3d_HSurface)& Surf1, const Handle(Adaptor3d_TopolTool)& D1, const Handle(Adaptor3d_HSurface)& Surf2, const Handle(Adaptor3d_TopolTool)& D2, const Standard_Real TolArc, const Standard_Real TolTang, const Standard_Real Fleche, const Standard_Real Pas); + Standard_EXPORT IntPatch_ImpPrmIntersection(const Handle(Adaptor3d_Surface)& Surf1, const Handle(Adaptor3d_TopolTool)& D1, const Handle(Adaptor3d_Surface)& Surf2, const Handle(Adaptor3d_TopolTool)& D2, const Standard_Real TolArc, const Standard_Real TolTang, const Standard_Real Fleche, const Standard_Real Pas); //! to search for solution from the given point Standard_EXPORT void SetStartPoint (const Standard_Real U, const Standard_Real V); - Standard_EXPORT void Perform (const Handle(Adaptor3d_HSurface)& Surf1, const Handle(Adaptor3d_TopolTool)& D1, const Handle(Adaptor3d_HSurface)& Surf2, const Handle(Adaptor3d_TopolTool)& D2, const Standard_Real TolArc, const Standard_Real TolTang, const Standard_Real Fleche, const Standard_Real Pas); + Standard_EXPORT void Perform (const Handle(Adaptor3d_Surface)& Surf1, const Handle(Adaptor3d_TopolTool)& D1, const Handle(Adaptor3d_Surface)& Surf2, const Handle(Adaptor3d_TopolTool)& D2, const Standard_Real TolArc, const Standard_Real TolTang, const Standard_Real Fleche, const Standard_Real Pas); //! Returns true if the calculus was succesfull. Standard_Boolean IsDone() const; diff --git a/src/IntPatch/IntPatch_Intersection.cxx b/src/IntPatch/IntPatch_Intersection.cxx index 89b8e1b361..89df1f0e5d 100644 --- a/src/IntPatch/IntPatch_Intersection.cxx +++ b/src/IntPatch/IntPatch_Intersection.cxx @@ -15,7 +15,7 @@ #include #include -#include +#include #include #include #include @@ -28,8 +28,8 @@ #include #include -#include -#include +#include +#include #include #include #include @@ -61,9 +61,9 @@ IntPatch_Intersection::IntPatch_Intersection () //====================================================================== // function: IntPatch_Intersection //====================================================================== -IntPatch_Intersection::IntPatch_Intersection(const Handle(Adaptor3d_HSurface)& S1, +IntPatch_Intersection::IntPatch_Intersection(const Handle(Adaptor3d_Surface)& S1, const Handle(Adaptor3d_TopolTool)& D1, - const Handle(Adaptor3d_HSurface)& S2, + const Handle(Adaptor3d_Surface)& S2, const Handle(Adaptor3d_TopolTool)& D2, const Standard_Real TolArc, const Standard_Real TolTang) @@ -89,7 +89,7 @@ IntPatch_Intersection::IntPatch_Intersection(const Handle(Adaptor3d_HSurface)& //====================================================================== // function: IntPatch_Intersection //====================================================================== -IntPatch_Intersection::IntPatch_Intersection(const Handle(Adaptor3d_HSurface)& S1, +IntPatch_Intersection::IntPatch_Intersection(const Handle(Adaptor3d_Surface)& S1, const Handle(Adaptor3d_TopolTool)& D1, const Standard_Real TolArc, const Standard_Real TolTang) @@ -133,7 +133,7 @@ void IntPatch_Intersection::SetTolerances(const Standard_Real TolArc, //====================================================================== // function: Perform //====================================================================== -void IntPatch_Intersection::Perform(const Handle(Adaptor3d_HSurface)& S1, +void IntPatch_Intersection::Perform(const Handle(Adaptor3d_Surface)& S1, const Handle(Adaptor3d_TopolTool)& D1, const Standard_Real TolArc, const Standard_Real TolTang) @@ -163,12 +163,12 @@ void IntPatch_Intersection::Perform(const Handle(Adaptor3d_HSurface)& S1, { gp_Dir aDirection = S1->Direction(); gp_Ax3 anAxis(gp::Origin(), aDirection); - Handle(Adaptor3d_HCurve) aBasisCurve = S1->BasisCurve(); + Handle(Adaptor3d_Curve) aBasisCurve = S1->BasisCurve(); ProjLib_ProjectOnPlane Projector(anAxis); Projector.Load(aBasisCurve, Precision::Confusion()); - Handle(GeomAdaptor_HCurve) aProjCurve = Projector.GetResult(); + Handle(GeomAdaptor_Curve) aProjCurve = Projector.GetResult(); Handle(Geom_Plane) aPlane = new Geom_Plane(anAxis); - Handle(GeomAdaptor_HSurface) aGAHsurf = new GeomAdaptor_HSurface(aPlane); + Handle(GeomAdaptor_Surface) aGAHsurf = new GeomAdaptor_Surface(aPlane); ProjLib_ProjectedCurve aProjectedCurve(aGAHsurf, aProjCurve); Handle(Geom2d_Curve) aPCurve; ProjLib::MakePCurveOfType(aProjectedCurve, aPCurve); @@ -216,10 +216,10 @@ void IntPatch_Intersection::Perform(const Handle(Adaptor3d_HSurface)& S1, #include #include #include -#include +#include #include #include -#include +#include #include #include #include @@ -234,7 +234,7 @@ void IntPatch_Intersection::Perform(const Handle(Adaptor3d_HSurface)& S1, //=============================================================== //function: FUN_GetMinMaxXYZPnt //=============================================================== -static void FUN_GetMinMaxXYZPnt( const Handle(Adaptor3d_HSurface)& S, +static void FUN_GetMinMaxXYZPnt( const Handle(Adaptor3d_Surface)& S, gp_Pnt& pMin, gp_Pnt& pMax ) { const Standard_Real DU = 0.25 * Abs(S->LastUParameter() - S->FirstUParameter()); @@ -260,13 +260,13 @@ static void FUN_GetMinMaxXYZPnt( const Handle(Adaptor3d_HSurface)& S, //========================================================================== static void FUN_TrimInfSurf(const gp_Pnt& Pmin, const gp_Pnt& Pmax, - const Handle(Adaptor3d_HSurface)& InfSurf, + const Handle(Adaptor3d_Surface)& InfSurf, const Standard_Real& AlternativeTrimPrm, - Handle(Adaptor3d_HSurface)& TrimS) + Handle(Adaptor3d_Surface)& TrimS) { Standard_Real TP = AlternativeTrimPrm; - Extrema_ExtPS ext1(Pmin, InfSurf->Surface(), 1.e-7, 1.e-7); - Extrema_ExtPS ext2(Pmax, InfSurf->Surface(), 1.e-7, 1.e-7); + Extrema_ExtPS ext1(Pmin, *InfSurf, 1.e-7, 1.e-7); + Extrema_ExtPS ext2(Pmax, *InfSurf, 1.e-7, 1.e-7); if(ext1.IsDone() || ext2.IsDone()) { Standard_Real Umax = -1.e+100, Umin = 1.e+100, Vmax = -1.e+100, Vmin = 1.e+100, cU, cV; @@ -303,7 +303,7 @@ static void FUN_TrimInfSurf(const gp_Pnt& Pmin, const Standard_Boolean Usup = Precision::IsPositiveInfinite(InfSurf->LastUParameter()); const Standard_Boolean Vinf = Precision::IsNegativeInfinite(InfSurf->FirstVParameter()); const Standard_Boolean Vsup = Precision::IsPositiveInfinite(InfSurf->LastVParameter()); - Handle(Adaptor3d_HSurface) TmpSS; + Handle(Adaptor3d_Surface) TmpSS; Standard_Integer IsTrimed = 0; const Standard_Real tp = 1000.0 * TP; if(Vinf && Vsup) { TrimS = InfSurf->VTrim(-tp, tp, 1.0e-7); IsTrimed = 1; } @@ -467,9 +467,9 @@ static void FUN_GetViso(const Handle(Geom_Surface)& GS, //================================================================================ //function: FUN_PL_Intersection //================================================================================ -static void FUN_PL_Intersection(const Handle(Adaptor3d_HSurface)& S1, +static void FUN_PL_Intersection(const Handle(Adaptor3d_Surface)& S1, const GeomAbs_SurfaceType& T1, - const Handle(Adaptor3d_HSurface)& S2, + const Handle(Adaptor3d_Surface)& S2, const GeomAbs_SurfaceType& T2, Standard_Boolean& IsOk, TColgp_SequenceOfPnt& SP, @@ -481,8 +481,8 @@ static void FUN_PL_Intersection(const Handle(Adaptor3d_HSurface)& S1, Standard_Boolean isoS1isLine[2] = {0, 0}; Standard_Boolean isoS2isLine[2] = {0, 0}; Handle(Geom_Curve) C1, C2; - const GeomAdaptor_Surface & gas1 = *(GeomAdaptor_Surface*)(&(S1->Surface())); - const GeomAdaptor_Surface & gas2 = *(GeomAdaptor_Surface*)(&(S2->Surface())); + const GeomAdaptor_Surface & gas1 = *(GeomAdaptor_Surface*)(S1.get()); + const GeomAdaptor_Surface & gas2 = *(GeomAdaptor_Surface*)(S2.get()); const Handle(Geom_Surface) gs1 = gas1.Surface(); const Handle(Geom_Surface) gs2 = gas2.Surface(); Standard_Real MS1[2], MS2[2]; @@ -673,16 +673,16 @@ static void FUN_NewFirstLast(const GeomAbs_CurveType& ga_ct, //================================================================================ //function: FUN_TrimBothSurf //================================================================================ -static void FUN_TrimBothSurf(const Handle(Adaptor3d_HSurface)& S1, +static void FUN_TrimBothSurf(const Handle(Adaptor3d_Surface)& S1, const GeomAbs_SurfaceType& T1, - const Handle(Adaptor3d_HSurface)& S2, + const Handle(Adaptor3d_Surface)& S2, const GeomAbs_SurfaceType& T2, const Standard_Real& TV, - Handle(Adaptor3d_HSurface)& NS1, - Handle(Adaptor3d_HSurface)& NS2) + Handle(Adaptor3d_Surface)& NS1, + Handle(Adaptor3d_Surface)& NS2) { - const GeomAdaptor_Surface & gas1 = *(GeomAdaptor_Surface*)(&(S1->Surface())); - const GeomAdaptor_Surface & gas2 = *(GeomAdaptor_Surface*)(&(S2->Surface())); + const GeomAdaptor_Surface & gas1 = *(GeomAdaptor_Surface*)(S1.get()); + const GeomAdaptor_Surface & gas2 = *(GeomAdaptor_Surface*)(S2.get()); const Handle(Geom_Surface) gs1 = gas1.Surface(); const Handle(Geom_Surface) gs2 = gas2.Surface(); const Standard_Real UM1 = 0.5 * (S1->LastUParameter() + S1->FirstUParameter()); @@ -728,7 +728,7 @@ static void FUN_TrimBothSurf(const Handle(Adaptor3d_HSurface)& S1, { if(TrmV1) { - Handle(Adaptor3d_HSurface) TS = NS1; + Handle(Adaptor3d_Surface) TS = NS1; NS1 = TS->UTrim(U1S1, U2S1, 1.0e-7); } else NS1 = S1->UTrim(U1S1, U2S1, 1.0e-7); @@ -737,7 +737,7 @@ static void FUN_TrimBothSurf(const Handle(Adaptor3d_HSurface)& S1, { if(TrmV2) { - Handle(Adaptor3d_HSurface) TS = NS2; + Handle(Adaptor3d_Surface) TS = NS2; NS2 = TS->UTrim(U1S2, U2S2, 1.0e-7); } else NS2 = S2->UTrim(U1S2, U2S2, 1.0e-7); @@ -748,9 +748,9 @@ static void FUN_TrimBothSurf(const Handle(Adaptor3d_HSurface)& S1, //function : Perform //purpose : //======================================================================= -void IntPatch_Intersection::Perform(const Handle(Adaptor3d_HSurface)& theS1, +void IntPatch_Intersection::Perform(const Handle(Adaptor3d_Surface)& theS1, const Handle(Adaptor3d_TopolTool)& theD1, - const Handle(Adaptor3d_HSurface)& theS2, + const Handle(Adaptor3d_Surface)& theS2, const Handle(Adaptor3d_TopolTool)& theD2, const Standard_Real TolArc, const Standard_Real TolTang, @@ -785,9 +785,9 @@ void IntPatch_Intersection::Perform(const Handle(Adaptor3d_HSurface)& theS1, GeomAbs_SurfaceType aCTType; Standard_Boolean bToCheck; // - const Handle(Adaptor3d_HSurface)& aCTSurf = + const Handle(Adaptor3d_Surface)& aCTSurf = (typs1 == GeomAbs_Cone || typs1 == GeomAbs_Torus) ? theS1 : theS2; - const Handle(Adaptor3d_HSurface)& aGeomSurf = + const Handle(Adaptor3d_Surface)& aGeomSurf = (typs1 == GeomAbs_Cone || typs1 == GeomAbs_Torus) ? theS2 : theS1; // aCTType = aCTSurf->GetType(); @@ -1006,9 +1006,9 @@ void IntPatch_Intersection::Perform(const Handle(Adaptor3d_HSurface)& theS1, //function : Perform //purpose : //======================================================================= -void IntPatch_Intersection::Perform(const Handle(Adaptor3d_HSurface)& theS1, +void IntPatch_Intersection::Perform(const Handle(Adaptor3d_Surface)& theS1, const Handle(Adaptor3d_TopolTool)& theD1, - const Handle(Adaptor3d_HSurface)& theS2, + const Handle(Adaptor3d_Surface)& theS2, const Handle(Adaptor3d_TopolTool)& theD2, const Standard_Real TolArc, const Standard_Real TolTang, @@ -1044,9 +1044,9 @@ void IntPatch_Intersection::Perform(const Handle(Adaptor3d_HSurface)& theS1, GeomAbs_SurfaceType aCTType; Standard_Boolean bToCheck; // - const Handle(Adaptor3d_HSurface)& aCTSurf = + const Handle(Adaptor3d_Surface)& aCTSurf = (typs1 == GeomAbs_Cone || typs1 == GeomAbs_Torus) ? theS1 : theS2; - const Handle(Adaptor3d_HSurface)& aGeomSurf = + const Handle(Adaptor3d_Surface)& aGeomSurf = (typs1 == GeomAbs_Cone || typs1 == GeomAbs_Torus) ? theS2 : theS1; // aCTType = aCTSurf->GetType(); @@ -1243,9 +1243,9 @@ void IntPatch_Intersection::Perform(const Handle(Adaptor3d_HSurface)& theS1, //function : ParamParamPerfom //purpose : //======================================================================= -void IntPatch_Intersection::ParamParamPerfom(const Handle(Adaptor3d_HSurface)& theS1, +void IntPatch_Intersection::ParamParamPerfom(const Handle(Adaptor3d_Surface)& theS1, const Handle(Adaptor3d_TopolTool)& theD1, - const Handle(Adaptor3d_HSurface)& theS2, + const Handle(Adaptor3d_Surface)& theS2, const Handle(Adaptor3d_TopolTool)& theD2, const Standard_Real TolArc, const Standard_Real TolTang, @@ -1273,7 +1273,7 @@ void IntPatch_Intersection::ParamParamPerfom(const Handle(Adaptor3d_HSurface)& const Standard_Real MU = Max(Abs(theS2->FirstUParameter()),Abs(theS2->LastUParameter())); const Standard_Real MV = Max(Abs(theS2->FirstVParameter()),Abs(theS2->LastVParameter())); const Standard_Real AP = Max(MU, MV); - Handle(Adaptor3d_HSurface) SS; + Handle(Adaptor3d_Surface) SS; FUN_TrimInfSurf(pMinXYZ, pMaxXYZ, theS1, AP, SS); interpp.Perform(SS,theD1,theS2,theD2,TolTang,TolArc,myFleche,myUVMaxStep); } @@ -1283,7 +1283,7 @@ void IntPatch_Intersection::ParamParamPerfom(const Handle(Adaptor3d_HSurface)& const Standard_Real MU = Max(Abs(theS1->FirstUParameter()),Abs(theS1->LastUParameter())); const Standard_Real MV = Max(Abs(theS1->FirstVParameter()),Abs(theS1->LastVParameter())); const Standard_Real AP = Max(MU, MV); - Handle(Adaptor3d_HSurface) SS; + Handle(Adaptor3d_Surface) SS; FUN_TrimInfSurf(pMinXYZ, pMaxXYZ, theS2, AP, SS); interpp.Perform(theS1, theD1, SS, theD2,TolTang, TolArc,myFleche,myUVMaxStep); } @@ -1321,8 +1321,8 @@ void IntPatch_Intersection::ParamParamPerfom(const Handle(Adaptor3d_HSurface)& }// 'COLLINEAR LINES' else { - Handle(Adaptor3d_HSurface) nS1 = theS1; - Handle(Adaptor3d_HSurface) nS2 = theS2; + Handle(Adaptor3d_Surface) nS1 = theS1; + Handle(Adaptor3d_Surface) nS2 = theS2; FUN_TrimBothSurf(theS1,typs1,theS2,typs2,1.e+8,nS1,nS2); interpp.Perform(nS1,theD1,nS2,theD2,TolTang,TolArc,myFleche,myUVMaxStep); }// 'NON - COLLINEAR LINES' @@ -1352,9 +1352,9 @@ void IntPatch_Intersection::ParamParamPerfom(const Handle(Adaptor3d_HSurface)& ////function : GeomGeomPerfom //purpose : //======================================================================= -void IntPatch_Intersection::GeomGeomPerfom(const Handle(Adaptor3d_HSurface)& theS1, +void IntPatch_Intersection::GeomGeomPerfom(const Handle(Adaptor3d_Surface)& theS1, const Handle(Adaptor3d_TopolTool)& theD1, - const Handle(Adaptor3d_HSurface)& theS2, + const Handle(Adaptor3d_Surface)& theS2, const Handle(Adaptor3d_TopolTool)& theD2, const Standard_Real TolArc, const Standard_Real TolTang, @@ -1483,9 +1483,9 @@ void IntPatch_Intersection::GeomGeomPerfom(const Handle(Adaptor3d_HSurface)& the //purpose : //======================================================================= void IntPatch_Intersection:: - GeomParamPerfom(const Handle(Adaptor3d_HSurface)& theS1, + GeomParamPerfom(const Handle(Adaptor3d_Surface)& theS1, const Handle(Adaptor3d_TopolTool)& theD1, - const Handle(Adaptor3d_HSurface)& theS2, + const Handle(Adaptor3d_Surface)& theS2, const Handle(Adaptor3d_TopolTool)& theD2, const Standard_Boolean isNotAnalitical, const GeomAbs_SurfaceType typs1, @@ -1527,8 +1527,8 @@ void IntPatch_Intersection:: } else { - Handle(Adaptor3d_HSurface) nS1 = theS1; - Handle(Adaptor3d_HSurface) nS2 = theS2; + Handle(Adaptor3d_Surface) nS1 = theS1; + Handle(Adaptor3d_Surface) nS2 = theS2; FUN_TrimBothSurf(theS1,typs1,theS2,typs2,1.e+5,nS1,nS2); interip.Perform(nS1,theD1,nS2,theD2,myTolArc,myTolTang,myFleche,myUVMaxStep); } @@ -1562,9 +1562,9 @@ void IntPatch_Intersection:: } } -void IntPatch_Intersection::Perform(const Handle(Adaptor3d_HSurface)& S1, +void IntPatch_Intersection::Perform(const Handle(Adaptor3d_Surface)& S1, const Handle(Adaptor3d_TopolTool)& D1, - const Handle(Adaptor3d_HSurface)& S2, + const Handle(Adaptor3d_Surface)& S2, const Handle(Adaptor3d_TopolTool)& D2, const Standard_Real U1, const Standard_Real V1, @@ -1653,8 +1653,8 @@ void IntPatch_Intersection::Perform(const Handle(Adaptor3d_HSurface)& S1, #ifdef DUMPOFIntPatch_Intersection -void IntPatch_Intersection__MAJ_R(Handle(Adaptor2d_HCurve2d) *R1, - Handle(Adaptor2d_HCurve2d) *, +void IntPatch_Intersection__MAJ_R(Handle(Adaptor2d_Curve2d) *R1, + Handle(Adaptor2d_Curve2d) *, int *NR1, int *, Standard_Integer nbR1, @@ -1679,9 +1679,9 @@ void IntPatch_Intersection__MAJ_R(Handle(Adaptor2d_HCurve2d) *R1, #endif void IntPatch_Intersection::Dump(const Standard_Integer /*Mode*/, - const Handle(Adaptor3d_HSurface)& /*S1*/, + const Handle(Adaptor3d_Surface)& /*S1*/, const Handle(Adaptor3d_TopolTool)& /*D1*/, - const Handle(Adaptor3d_HSurface)& /*S2*/, + const Handle(Adaptor3d_Surface)& /*S2*/, const Handle(Adaptor3d_TopolTool)& /*D2*/) const { #ifdef DUMPOFIntPatch_Intersection @@ -1690,7 +1690,7 @@ void IntPatch_Intersection::Dump(const Standard_Integer /*Mode*/, //-- construction de la liste des restrictions & vertex //-- int NR1[MAXR],NR2[MAXR]; - Handle(Adaptor2d_HCurve2d) R1[MAXR],R2[MAXR]; + Handle(Adaptor2d_Curve2d) R1[MAXR],R2[MAXR]; Standard_Integer nbR1=0,nbR2=0; for(D1->Init();D1->More() && nbR1Next()) { R1[nbR1]=D1->Value(); diff --git a/src/IntPatch/IntPatch_Intersection.hxx b/src/IntPatch/IntPatch_Intersection.hxx index 5c5780e25b..ba0d25ea13 100644 --- a/src/IntPatch/IntPatch_Intersection.hxx +++ b/src/IntPatch/IntPatch_Intersection.hxx @@ -17,25 +17,13 @@ #ifndef _IntPatch_Intersection_HeaderFile #define _IntPatch_Intersection_HeaderFile -#include -#include -#include - -#include +#include #include #include -#include #include #include -#include -class StdFail_NotDone; -class Standard_OutOfRange; -class Standard_DomainError; -class Standard_ConstructionError; -class Adaptor3d_HSurface; + class Adaptor3d_TopolTool; -class IntPatch_Point; -class IntPatch_Line; //! This class provides a generic algorithm to intersect @@ -49,9 +37,9 @@ public: Standard_EXPORT IntPatch_Intersection(); - Standard_EXPORT IntPatch_Intersection(const Handle(Adaptor3d_HSurface)& S1, const Handle(Adaptor3d_TopolTool)& D1, const Handle(Adaptor3d_HSurface)& S2, const Handle(Adaptor3d_TopolTool)& D2, const Standard_Real TolArc, const Standard_Real TolTang); + Standard_EXPORT IntPatch_Intersection(const Handle(Adaptor3d_Surface)& S1, const Handle(Adaptor3d_TopolTool)& D1, const Handle(Adaptor3d_Surface)& S2, const Handle(Adaptor3d_TopolTool)& D2, const Standard_Real TolArc, const Standard_Real TolTang); - Standard_EXPORT IntPatch_Intersection(const Handle(Adaptor3d_HSurface)& S1, const Handle(Adaptor3d_TopolTool)& D1, const Standard_Real TolArc, const Standard_Real TolTang); + Standard_EXPORT IntPatch_Intersection(const Handle(Adaptor3d_Surface)& S1, const Handle(Adaptor3d_TopolTool)& D1, const Standard_Real TolArc, const Standard_Real TolTang); //! Set the tolerances used by the algorithms: //! --- Implicit - Parametric @@ -84,7 +72,7 @@ public: //! after deleting TopOpeBRep. //! If theIsReqToPostWLProc == FALSE, then we will work with Walking-line //! obtained after intersection algorithm directly (wothout any post-processing). - Standard_EXPORT void Perform (const Handle(Adaptor3d_HSurface)& S1, const Handle(Adaptor3d_TopolTool)& D1, const Handle(Adaptor3d_HSurface)& S2, const Handle(Adaptor3d_TopolTool)& D2, const Standard_Real TolArc, const Standard_Real TolTang, const Standard_Boolean isGeomInt = Standard_True, const Standard_Boolean theIsReqToKeepRLine = Standard_False, const Standard_Boolean theIsReqToPostWLProc = Standard_True); + Standard_EXPORT void Perform (const Handle(Adaptor3d_Surface)& S1, const Handle(Adaptor3d_TopolTool)& D1, const Handle(Adaptor3d_Surface)& S2, const Handle(Adaptor3d_TopolTool)& D2, const Standard_Real TolArc, const Standard_Real TolTang, const Standard_Boolean isGeomInt = Standard_True, const Standard_Boolean theIsReqToKeepRLine = Standard_False, const Standard_Boolean theIsReqToPostWLProc = Standard_True); //! If isGeomInt == Standard_False, then method //! Param-Param intersection will be used. @@ -99,13 +87,13 @@ public: //! after deleting TopOpeBRep. //! If theIsReqToPostWLProc == FALSE, then we will work with Walking-line //! obtained after intersection algorithm directly (without any post-processing). - Standard_EXPORT void Perform (const Handle(Adaptor3d_HSurface)& S1, const Handle(Adaptor3d_TopolTool)& D1, const Handle(Adaptor3d_HSurface)& S2, const Handle(Adaptor3d_TopolTool)& D2, const Standard_Real TolArc, const Standard_Real TolTang, IntSurf_ListOfPntOn2S& LOfPnts, const Standard_Boolean isGeomInt = Standard_True, const Standard_Boolean theIsReqToKeepRLine = Standard_False, const Standard_Boolean theIsReqToPostWLProc = Standard_True); + Standard_EXPORT void Perform (const Handle(Adaptor3d_Surface)& S1, const Handle(Adaptor3d_TopolTool)& D1, const Handle(Adaptor3d_Surface)& S2, const Handle(Adaptor3d_TopolTool)& D2, const Standard_Real TolArc, const Standard_Real TolTang, IntSurf_ListOfPntOn2S& LOfPnts, const Standard_Boolean isGeomInt = Standard_True, const Standard_Boolean theIsReqToKeepRLine = Standard_False, const Standard_Boolean theIsReqToPostWLProc = Standard_True); //! Perform with start point - Standard_EXPORT void Perform (const Handle(Adaptor3d_HSurface)& S1, const Handle(Adaptor3d_TopolTool)& D1, const Handle(Adaptor3d_HSurface)& S2, const Handle(Adaptor3d_TopolTool)& D2, const Standard_Real U1, const Standard_Real V1, const Standard_Real U2, const Standard_Real V2, const Standard_Real TolArc, const Standard_Real TolTang); + Standard_EXPORT void Perform (const Handle(Adaptor3d_Surface)& S1, const Handle(Adaptor3d_TopolTool)& D1, const Handle(Adaptor3d_Surface)& S2, const Handle(Adaptor3d_TopolTool)& D2, const Standard_Real U1, const Standard_Real V1, const Standard_Real U2, const Standard_Real V2, const Standard_Real TolArc, const Standard_Real TolTang); //! Uses for finding self-intersected surfaces. - Standard_EXPORT void Perform (const Handle(Adaptor3d_HSurface)& S1, const Handle(Adaptor3d_TopolTool)& D1, const Standard_Real TolArc, const Standard_Real TolTang); + Standard_EXPORT void Perform (const Handle(Adaptor3d_Surface)& S1, const Handle(Adaptor3d_TopolTool)& D1, const Standard_Real TolArc, const Standard_Real TolTang); //! Returns True if the calculus was successful. Standard_Boolean IsDone() const; @@ -143,7 +131,7 @@ public: //! Dump of each result line. //! Mode for more accurate dumps. - Standard_EXPORT void Dump (const Standard_Integer Mode, const Handle(Adaptor3d_HSurface)& S1, const Handle(Adaptor3d_TopolTool)& D1, const Handle(Adaptor3d_HSurface)& S2, const Handle(Adaptor3d_TopolTool)& D2) const; + Standard_EXPORT void Dump (const Standard_Integer Mode, const Handle(Adaptor3d_Surface)& S1, const Handle(Adaptor3d_TopolTool)& D1, const Handle(Adaptor3d_Surface)& S2, const Handle(Adaptor3d_TopolTool)& D2) const; @@ -157,7 +145,7 @@ protected: private: - Standard_EXPORT void ParamParamPerfom (const Handle(Adaptor3d_HSurface)& S1, const Handle(Adaptor3d_TopolTool)& D1, const Handle(Adaptor3d_HSurface)& S2, const Handle(Adaptor3d_TopolTool)& D2, const Standard_Real TolArc, const Standard_Real TolTang, IntSurf_ListOfPntOn2S& LOfPnts, const GeomAbs_SurfaceType typs1, const GeomAbs_SurfaceType typs2); + Standard_EXPORT void ParamParamPerfom (const Handle(Adaptor3d_Surface)& S1, const Handle(Adaptor3d_TopolTool)& D1, const Handle(Adaptor3d_Surface)& S2, const Handle(Adaptor3d_TopolTool)& D2, const Standard_Real TolArc, const Standard_Real TolTang, IntSurf_ListOfPntOn2S& LOfPnts, const GeomAbs_SurfaceType typs1, const GeomAbs_SurfaceType typs2); //! Flag theIsReqToKeepRLine has been entered only for //! compatibility with TopOpeBRep package. It shall be deleted @@ -165,9 +153,9 @@ private: //! When intersection result returns IntPatch_RLine and another //! IntPatch_Line (not restriction) we (in case of theIsReqToKeepRLine==TRUE) //! will always keep both lines even if they are coincided. - Standard_EXPORT void GeomGeomPerfom (const Handle(Adaptor3d_HSurface)& S1, const Handle(Adaptor3d_TopolTool)& D1, const Handle(Adaptor3d_HSurface)& S2, const Handle(Adaptor3d_TopolTool)& D2, const Standard_Real TolArc, const Standard_Real TolTang, IntSurf_ListOfPntOn2S& LOfPnts, const GeomAbs_SurfaceType typs1, const GeomAbs_SurfaceType typs2, const Standard_Boolean theIsReqToKeepRLine); + Standard_EXPORT void GeomGeomPerfom (const Handle(Adaptor3d_Surface)& S1, const Handle(Adaptor3d_TopolTool)& D1, const Handle(Adaptor3d_Surface)& S2, const Handle(Adaptor3d_TopolTool)& D2, const Standard_Real TolArc, const Standard_Real TolTang, IntSurf_ListOfPntOn2S& LOfPnts, const GeomAbs_SurfaceType typs1, const GeomAbs_SurfaceType typs2, const Standard_Boolean theIsReqToKeepRLine); - Standard_EXPORT void GeomParamPerfom (const Handle(Adaptor3d_HSurface)& S1, const Handle(Adaptor3d_TopolTool)& D1, const Handle(Adaptor3d_HSurface)& S2, const Handle(Adaptor3d_TopolTool)& D2, const Standard_Boolean isNotAnalitical, const GeomAbs_SurfaceType typs1, const GeomAbs_SurfaceType typs2); + Standard_EXPORT void GeomParamPerfom (const Handle(Adaptor3d_Surface)& S1, const Handle(Adaptor3d_TopolTool)& D1, const Handle(Adaptor3d_Surface)& S2, const Handle(Adaptor3d_TopolTool)& D2, const Standard_Boolean isNotAnalitical, const GeomAbs_SurfaceType typs1, const GeomAbs_SurfaceType typs2); Standard_Boolean done; diff --git a/src/IntPatch/IntPatch_LineConstructor.cxx b/src/IntPatch/IntPatch_LineConstructor.cxx index f061752332..1432dd06b6 100644 --- a/src/IntPatch/IntPatch_LineConstructor.cxx +++ b/src/IntPatch/IntPatch_LineConstructor.cxx @@ -15,8 +15,8 @@ // commercial license or contractual agreement. -#include -#include +#include +#include #include #include #include @@ -46,8 +46,8 @@ //purpose : //======================================================================= -static void Recadre(const Handle(Adaptor3d_HSurface)& myHS1, - const Handle(Adaptor3d_HSurface)& myHS2, +static void Recadre(const Handle(Adaptor3d_Surface)& myHS1, + const Handle(Adaptor3d_Surface)& myHS2, Standard_Real& u1, Standard_Real& v1, Standard_Real& u2, @@ -136,8 +136,8 @@ static void Recadre(const Handle(Adaptor3d_HSurface)& myHS1, //purpose : //======================================================================= -static void Parameters(const Handle(Adaptor3d_HSurface)& myHS1, - const Handle(Adaptor3d_HSurface)& myHS2, +static void Parameters(const Handle(Adaptor3d_Surface)& myHS1, + const Handle(Adaptor3d_Surface)& myHS2, const gp_Pnt& Ptref, Standard_Real& U1, Standard_Real& V1, @@ -145,43 +145,43 @@ static void Parameters(const Handle(Adaptor3d_HSurface)& myHS1, Standard_Real& V2) { IntSurf_Quadric quad1,quad2; - GeomAbs_SurfaceType typs = myHS1->Surface().GetType(); + GeomAbs_SurfaceType typs = myHS1->GetType(); switch (typs) { case GeomAbs_Plane: - quad1.SetValue(myHS1->Surface().Plane()); + quad1.SetValue(myHS1->Plane()); break; case GeomAbs_Cylinder: - quad1.SetValue(myHS1->Surface().Cylinder()); + quad1.SetValue(myHS1->Cylinder()); break; case GeomAbs_Cone: - quad1.SetValue(myHS1->Surface().Cone()); + quad1.SetValue(myHS1->Cone()); break; case GeomAbs_Sphere: - quad1.SetValue(myHS1->Surface().Sphere()); + quad1.SetValue(myHS1->Sphere()); break; case GeomAbs_Torus: - quad1.SetValue(myHS1->Surface().Torus()); + quad1.SetValue(myHS1->Torus()); break; default: throw Standard_ConstructionError("IntPatch_IntSS::MakeCurve"); } - typs = myHS2->Surface().GetType(); + typs = myHS2->GetType(); switch (typs) { case GeomAbs_Plane: - quad2.SetValue(myHS2->Surface().Plane()); + quad2.SetValue(myHS2->Plane()); break; case GeomAbs_Cylinder: - quad2.SetValue(myHS2->Surface().Cylinder()); + quad2.SetValue(myHS2->Cylinder()); break; case GeomAbs_Cone: - quad2.SetValue(myHS2->Surface().Cone()); + quad2.SetValue(myHS2->Cone()); break; case GeomAbs_Sphere: - quad2.SetValue(myHS2->Surface().Sphere()); + quad2.SetValue(myHS2->Sphere()); break; case GeomAbs_Torus: - quad2.SetValue(myHS2->Surface().Torus()); + quad2.SetValue(myHS2->Torus()); break; default: throw Standard_ConstructionError("IntPatch_IntSS::MakeCurve"); @@ -824,7 +824,7 @@ static Standard_Boolean TestWLineIsARLine(const IntPatch_SequenceOfLine& slinref for (Standard_Integer is=0; is<2; is++) { Standard_Boolean onFirst = is==0; if((onFirst && rlin->IsArcOnS1()) || (!onFirst && rlin->IsArcOnS2())) { - Handle(Adaptor2d_HCurve2d) arc; + Handle(Adaptor2d_Curve2d) arc; Standard_Real u,v,u1,v1; if (onFirst) { arc = rlin->ArcOnS1(); @@ -840,7 +840,7 @@ static Standard_Boolean TestWLineIsARLine(const IntPatch_SequenceOfLine& slinref u = (u+u1)*0.5; v = (v+v1)*0.5; } - const Adaptor2d_Curve2d& C2d=arc->Curve2d(); + const Adaptor2d_Curve2d& C2d = *arc; gp_Pnt2d PObt,P2d(u,v); Standard_Real par= Geom2dInt_TheProjPCurOfGInter::FindParameter(C2d,P2d,1e-7); PObt=C2d.Value(par); @@ -861,9 +861,9 @@ static Standard_Boolean TestWLineIsARLine(const IntPatch_SequenceOfLine& slinref static Standard_Boolean TestIfWLineIsRestriction(const IntPatch_SequenceOfLine& slinref, const Handle(IntPatch_WLine)& wlin, - const Handle(Adaptor3d_HSurface)& S1, + const Handle(Adaptor3d_Surface)& S1, const Handle(Adaptor3d_TopolTool)&D1, - const Handle(Adaptor3d_HSurface)& S2, + const Handle(Adaptor3d_Surface)& S2, const Handle(Adaptor3d_TopolTool)&D2, Standard_Real TolArc) { @@ -914,8 +914,8 @@ static Standard_Boolean TestIfWLineIsRestriction(const IntPatch_SequenceOfLine& static Standard_Boolean ProjectOnArc(const Standard_Real u, const Standard_Real v, - const Handle(Adaptor2d_HCurve2d)& arc, - const Handle(Adaptor3d_HSurface)& surf, + const Handle(Adaptor2d_Curve2d)& arc, + const Handle(Adaptor3d_Surface)& surf, const Standard_Real TolArc, Standard_Real& par, Standard_Real& dist) @@ -924,7 +924,7 @@ static Standard_Boolean ProjectOnArc(const Standard_Real u, gp_Vec ad1u, ad1v; surf->D1(u,v,aPbid,ad1u,ad1v); Standard_Real tol2d = ComputeParametricTolerance(TolArc,ad1u,ad1v); - const Adaptor2d_Curve2d& C2d=arc->Curve2d(); + const Adaptor2d_Curve2d& C2d = *arc; gp_Pnt2d aP(u,v),aPprj; par=Geom2dInt_TheProjPCurOfGInter::FindParameter(C2d,aP,1e-7); aPprj=C2d.Value(par); @@ -939,9 +939,9 @@ static Standard_Boolean ProjectOnArc(const Standard_Real u, static void TestWLineToRLine(const IntPatch_SequenceOfLine& slinref, IntPatch_SequenceOfLine& slin, - const Handle(Adaptor3d_HSurface)& mySurf1, + const Handle(Adaptor3d_Surface)& mySurf1, const Handle(Adaptor3d_TopolTool)& myDom1, - const Handle(Adaptor3d_HSurface)& mySurf2, + const Handle(Adaptor3d_Surface)& mySurf2, const Handle(Adaptor3d_TopolTool)& myDom2, const Standard_Real TolArc) { @@ -967,7 +967,7 @@ static void TestWLineToRLine(const IntPatch_SequenceOfLine& slinref, typedef void (IntSurf_PntOn2S::* PiParOnS)(Standard_Real&,Standard_Real&) const; typedef Standard_Boolean (IntPatch_Point::* PQuery)() const; - typedef const Handle(Adaptor2d_HCurve2d)& (IntPatch_Point::* PArcOnS)() const; + typedef const Handle(Adaptor2d_Curve2d)& (IntPatch_Point::* PArcOnS)() const; typedef Standard_Real (IntPatch_Point::* PParOnArc)() const; // cycle for both surfaces @@ -980,7 +980,7 @@ static void TestWLineToRLine(const IntPatch_SequenceOfLine& slinref, PQuery pIsOnDomS; PArcOnS pArcOnS; PParOnArc pParOnArc; - Handle(Adaptor3d_HSurface) surf; + Handle(Adaptor3d_Surface) surf; Handle(Adaptor3d_TopolTool) aDomain; if (onFirst) { piParOnS = &IntSurf_PntOn2S::ParametersOnS1; @@ -1003,14 +1003,14 @@ static void TestWLineToRLine(const IntPatch_SequenceOfLine& slinref, Standard_Real utst,vtst; TColStd_Array1OfReal paramsResolved(1,nbvtx); TColStd_Array1OfTransient arcsResolved(1,nbvtx); - arcsResolved.Init(Handle(Adaptor2d_HCurve2d)()); + arcsResolved.Init(Handle(Adaptor2d_Curve2d)()); for (iv=1; iv <= nbvtx; iv++) { if (!(WLine->Vertex(iv).*pIsOnDomS)()) { Standard_Integer ip = (Standard_Integer) WLine->Vertex(iv).ParameterOnLine(); (WLine->Point(ip).*piParOnS)(utst,vtst); Standard_Real distmin=RealLast(); for (aDomain->Init(); aDomain->More(); aDomain->Next()) { - const Handle(Adaptor2d_HCurve2d)& arc = aDomain->Value(); + const Handle(Adaptor2d_Curve2d)& arc = aDomain->Value(); Standard_Real par,dist; if (ProjectOnArc(utst,vtst,arc,surf,TolArc,par,dist) && dist < distmin) { arcsResolved(iv) = arc; @@ -1026,36 +1026,36 @@ static void TestWLineToRLine(const IntPatch_SequenceOfLine& slinref, Standard_Integer i; for (i=1; i <= indicesV1.Length(); i++) { iv = indicesV1(i); - Handle(Adaptor2d_HCurve2d) arc; + Handle(Adaptor2d_Curve2d) arc; if ((WLine->Vertex(iv).*pIsOnDomS)()) arc = (WLine->Vertex(iv).*pArcOnS)(); - else arc = Handle(Adaptor2d_HCurve2d)::DownCast (arcsResolved(iv)); + else arc = Handle(Adaptor2d_Curve2d)::DownCast (arcsResolved(iv)); if (!arc.IsNull()) mapArcsV1.Add(arc); } for (i=1; i <= indicesV2.Length(); i++) { iv = indicesV2(i); - Handle(Adaptor2d_HCurve2d) arc; + Handle(Adaptor2d_Curve2d) arc; if ((WLine->Vertex(iv).*pIsOnDomS)()) arc = (WLine->Vertex(iv).*pArcOnS)(); - else arc = Handle(Adaptor2d_HCurve2d)::DownCast (arcsResolved(iv)); + else arc = Handle(Adaptor2d_Curve2d)::DownCast (arcsResolved(iv)); if (!arc.IsNull() && mapArcsV1.Contains(arc)) mapArcs.Add(arc); } // for each common arc for (Standard_Integer ia=1; ia <= mapArcs.Extent(); ia++) { - const Handle(Adaptor2d_HCurve2d) arc (Handle(Adaptor2d_HCurve2d)::DownCast (mapArcs(ia))); + const Handle(Adaptor2d_Curve2d) arc (Handle(Adaptor2d_Curve2d)::DownCast (mapArcs(ia))); // get end vertices of wline linked with this arc Standard_Integer iv1=0,iv2=0; for (i=1; i <= indicesV1.Length() && iv1==0; i++) { iv = indicesV1(i); - Handle(Adaptor2d_HCurve2d) arc1; + Handle(Adaptor2d_Curve2d) arc1; if ((WLine->Vertex(iv).*pIsOnDomS)()) arc1 = (WLine->Vertex(iv).*pArcOnS)(); - else arc1 = Handle(Adaptor2d_HCurve2d)::DownCast (arcsResolved(iv)); + else arc1 = Handle(Adaptor2d_Curve2d)::DownCast (arcsResolved(iv)); if (!arc1.IsNull() && arc1 == arc) iv1 = iv; } for (i=1; i <= indicesV2.Length() && iv2==0; i++) { iv = indicesV2(i); - Handle(Adaptor2d_HCurve2d) arc1; + Handle(Adaptor2d_Curve2d) arc1; if ((WLine->Vertex(iv).*pIsOnDomS)()) arc1 = (WLine->Vertex(iv).*pArcOnS)(); - else arc1 = Handle(Adaptor2d_HCurve2d)::DownCast (arcsResolved(iv)); + else arc1 = Handle(Adaptor2d_Curve2d)::DownCast (arcsResolved(iv)); if (!arc1.IsNull() && arc1 == arc) iv2 = iv; } if (!iv1 || !iv2) { @@ -1182,9 +1182,9 @@ static void TestWLineToRLine(const IntPatch_SequenceOfLine& slinref, void IntPatch_LineConstructor::Perform(const IntPatch_SequenceOfLine& slinref, const Handle(IntPatch_Line)& L, - const Handle(Adaptor3d_HSurface)& mySurf1, + const Handle(Adaptor3d_Surface)& mySurf1, const Handle(Adaptor3d_TopolTool)& myDom1, - const Handle(Adaptor3d_HSurface)& mySurf2, + const Handle(Adaptor3d_Surface)& mySurf2, const Handle(Adaptor3d_TopolTool)& myDom2, const Standard_Real TolArc) { diff --git a/src/IntPatch/IntPatch_LineConstructor.hxx b/src/IntPatch/IntPatch_LineConstructor.hxx index 7a2039f327..2b57b241ef 100644 --- a/src/IntPatch/IntPatch_LineConstructor.hxx +++ b/src/IntPatch/IntPatch_LineConstructor.hxx @@ -17,17 +17,10 @@ #ifndef _IntPatch_LineConstructor_HeaderFile #define _IntPatch_LineConstructor_HeaderFile -#include -#include -#include - +#include #include -#include -#include -class IntPatch_Line; -class Adaptor3d_HSurface; -class Adaptor3d_TopolTool; +class Adaptor3d_TopolTool; //! The intersections algorithms compute the intersection //! on two surfaces and return the intersections lines as @@ -41,7 +34,7 @@ public: Standard_EXPORT IntPatch_LineConstructor(const Standard_Integer mode); - Standard_EXPORT void Perform (const IntPatch_SequenceOfLine& SL, const Handle(IntPatch_Line)& L, const Handle(Adaptor3d_HSurface)& S1, const Handle(Adaptor3d_TopolTool)& D1, const Handle(Adaptor3d_HSurface)& S2, const Handle(Adaptor3d_TopolTool)& D2, const Standard_Real Tol); + Standard_EXPORT void Perform (const IntPatch_SequenceOfLine& SL, const Handle(IntPatch_Line)& L, const Handle(Adaptor3d_Surface)& S1, const Handle(Adaptor3d_TopolTool)& D1, const Handle(Adaptor3d_Surface)& S2, const Handle(Adaptor3d_TopolTool)& D2, const Standard_Real Tol); Standard_EXPORT Standard_Integer NbLines() const; diff --git a/src/IntPatch/IntPatch_Point.cxx b/src/IntPatch/IntPatch_Point.cxx index 228c84f6ef..3286b1e45b 100644 --- a/src/IntPatch/IntPatch_Point.cxx +++ b/src/IntPatch/IntPatch_Point.cxx @@ -15,7 +15,7 @@ // commercial license or contractual agreement. -#include +#include #include #include #include @@ -53,7 +53,7 @@ void IntPatch_Point::SetVertex(const Standard_Boolean OnFirst, const Handle(Adap } void IntPatch_Point::SetArc (const Standard_Boolean OnFirst, - const Handle(Adaptor2d_HCurve2d)& A, + const Handle(Adaptor2d_Curve2d)& A, const Standard_Real Param, const IntSurf_Transition& TLine, const IntSurf_Transition& TArc) diff --git a/src/IntPatch/IntPatch_Point.hxx b/src/IntPatch/IntPatch_Point.hxx index a113afd5aa..fcf06f2bcf 100644 --- a/src/IntPatch/IntPatch_Point.hxx +++ b/src/IntPatch/IntPatch_Point.hxx @@ -25,7 +25,7 @@ #include #include #include -#include +#include class Adaptor3d_HVertex; class Standard_DomainError; @@ -81,7 +81,7 @@ public: //! If OnFirst is True, the point is on the domain of the //! first patch, otherwise the point is on the domain of the //! second surface. - Standard_EXPORT void SetArc (const Standard_Boolean OnFirst, const Handle(Adaptor2d_HCurve2d)& A, const Standard_Real Param, const IntSurf_Transition& TLine, const IntSurf_Transition& TArc); + Standard_EXPORT void SetArc (const Standard_Boolean OnFirst, const Handle(Adaptor2d_Curve2d)& A, const Standard_Real Param, const IntSurf_Transition& TLine, const IntSurf_Transition& TArc); //! Sets (or unsets) the point as a point on several //! intersection line. @@ -133,7 +133,7 @@ public: //! vertex. //! The exception DomainError is raised if //! IsOnDomS1 returns False. - const Handle(Adaptor2d_HCurve2d)& ArcOnS1() const; + const Handle(Adaptor2d_Curve2d)& ArcOnS1() const; //! Returns the transition of the point on the //! intersection line with the arc on S1. @@ -172,7 +172,7 @@ public: //! vertex. //! The exception DomainError is raised if //! IsOnDomS2 returns False. - const Handle(Adaptor2d_HCurve2d)& ArcOnS2() const; + const Handle(Adaptor2d_Curve2d)& ArcOnS2() const; //! Returns the transition of the point on the //! intersection line with the arc on S2. @@ -229,14 +229,14 @@ private: Standard_Boolean onS1; Standard_Boolean vtxonS1; Handle(Adaptor3d_HVertex) vS1; - Handle(Adaptor2d_HCurve2d) arcS1; + Handle(Adaptor2d_Curve2d) arcS1; IntSurf_Transition traline1; IntSurf_Transition tra1; Standard_Real prm1; Standard_Boolean onS2; Standard_Boolean vtxonS2; Handle(Adaptor3d_HVertex) vS2; - Handle(Adaptor2d_HCurve2d) arcS2; + Handle(Adaptor2d_Curve2d) arcS2; IntSurf_Transition traline2; IntSurf_Transition tra2; Standard_Real prm2; diff --git a/src/IntPatch/IntPatch_Point.lxx b/src/IntPatch/IntPatch_Point.lxx index 48793d43c4..efc1cf415b 100644 --- a/src/IntPatch/IntPatch_Point.lxx +++ b/src/IntPatch/IntPatch_Point.lxx @@ -124,7 +124,7 @@ inline const Handle(Adaptor3d_HVertex)& IntPatch_Point::VertexOnS1 () const } -inline const Handle(Adaptor2d_HCurve2d)& IntPatch_Point::ArcOnS1 () const +inline const Handle(Adaptor2d_Curve2d)& IntPatch_Point::ArcOnS1 () const { if (!onS1) {throw Standard_DomainError();} return arcS1; @@ -171,7 +171,7 @@ inline const Handle(Adaptor3d_HVertex)& IntPatch_Point::VertexOnS2 () const } -inline const Handle(Adaptor2d_HCurve2d)& IntPatch_Point::ArcOnS2 () const +inline const Handle(Adaptor2d_Curve2d)& IntPatch_Point::ArcOnS2 () const { if (!onS2) {throw Standard_DomainError();} return arcS2; diff --git a/src/IntPatch/IntPatch_PointLine.cxx b/src/IntPatch/IntPatch_PointLine.cxx index fe7862da28..17acdbf071 100644 --- a/src/IntPatch/IntPatch_PointLine.cxx +++ b/src/IntPatch/IntPatch_PointLine.cxx @@ -16,7 +16,7 @@ #include -#include +#include #include #include @@ -45,8 +45,8 @@ IntPatch_PointLine::IntPatch_PointLine (const Standard_Boolean Tang) : // Returns negative value if computation is not possible //======================================================================= Standard_Real IntPatch_PointLine:: - CurvatureRadiusOfIntersLine(const Handle(Adaptor3d_HSurface)& theS1, - const Handle(Adaptor3d_HSurface)& theS2, + CurvatureRadiusOfIntersLine(const Handle(Adaptor3d_Surface)& theS1, + const Handle(Adaptor3d_Surface)& theS2, const IntSurf_PntOn2S& theUVPoint) { const Standard_Real aSmallValue = 1.0/Precision::Infinite(); diff --git a/src/IntPatch/IntPatch_PointLine.hxx b/src/IntPatch/IntPatch_PointLine.hxx index 1852a86dc2..964e8f28d2 100644 --- a/src/IntPatch/IntPatch_PointLine.hxx +++ b/src/IntPatch/IntPatch_PointLine.hxx @@ -17,15 +17,14 @@ #ifndef _IntPatch_PointLine_HeaderFile #define _IntPatch_PointLine_HeaderFile +#include #include -#include class gp_Pnt; class gp_Pnt2d; class IntSurf_PntOn2S; class IntSurf_LineOn2S; class IntPatch_Point; -class Adaptor3d_HSurface; DEFINE_STANDARD_HANDLE(IntPatch_PointLine, IntPatch_Line) @@ -84,8 +83,8 @@ public: //! the intersection line in given point. //! Returns negative value if computation is not possible. Standard_EXPORT static Standard_Real - CurvatureRadiusOfIntersLine(const Handle(Adaptor3d_HSurface)& theS1, - const Handle(Adaptor3d_HSurface)& theS2, + CurvatureRadiusOfIntersLine(const Handle(Adaptor3d_Surface)& theS1, + const Handle(Adaptor3d_Surface)& theS2, const IntSurf_PntOn2S& theUVPoint); DEFINE_STANDARD_RTTIEXT(IntPatch_PointLine,IntPatch_Line) diff --git a/src/IntPatch/IntPatch_PolyArc.cxx b/src/IntPatch/IntPatch_PolyArc.cxx index 83d9436bb0..3a46f03294 100644 --- a/src/IntPatch/IntPatch_PolyArc.cxx +++ b/src/IntPatch/IntPatch_PolyArc.cxx @@ -15,7 +15,7 @@ // commercial license or contractual agreement. -#include +#include #include #include #include @@ -32,7 +32,7 @@ inline void MinMax (const Standard_Real a1, const Standard_Real a2, } } -IntPatch_PolyArc::IntPatch_PolyArc(const Handle(Adaptor2d_HCurve2d)& Line , +IntPatch_PolyArc::IntPatch_PolyArc(const Handle(Adaptor2d_Curve2d)& Line , const Standard_Integer NbSample, const Standard_Real aPdeb, const Standard_Real aPfin, diff --git a/src/IntPatch/IntPatch_PolyArc.hxx b/src/IntPatch/IntPatch_PolyArc.hxx index 9957305de6..e4add5697c 100644 --- a/src/IntPatch/IntPatch_PolyArc.hxx +++ b/src/IntPatch/IntPatch_PolyArc.hxx @@ -28,7 +28,6 @@ #include #include class Standard_ConstructionError; -class Adaptor2d_HCurve2d; class Bnd_Box2d; class gp_Pnt2d; @@ -44,7 +43,7 @@ public: //! Creates the polygon of the arc A on the surface S. //! The arc is limited by the parameters Pfirst and Plast. //! None of these parameters can be infinite. - Standard_EXPORT IntPatch_PolyArc(const Handle(Adaptor2d_HCurve2d)& A, const Standard_Integer NbSample, const Standard_Real Pfirst, const Standard_Real Plast, const Bnd_Box2d& BoxOtherPolygon); + Standard_EXPORT IntPatch_PolyArc(const Handle(Adaptor2d_Curve2d)& A, const Standard_Integer NbSample, const Standard_Real Pfirst, const Standard_Real Plast, const Bnd_Box2d& BoxOtherPolygon); Standard_EXPORT virtual Standard_Boolean Closed() const Standard_OVERRIDE; diff --git a/src/IntPatch/IntPatch_Polyhedron.cxx b/src/IntPatch/IntPatch_Polyhedron.cxx index c0d9da535a..db03fc2da9 100644 --- a/src/IntPatch/IntPatch_Polyhedron.cxx +++ b/src/IntPatch/IntPatch_Polyhedron.cxx @@ -15,7 +15,7 @@ // commercial license or contractual agreement. -#include +#include #include #include #include @@ -37,7 +37,7 @@ #define NBMAXUV 30 //================================================================================ -static Standard_Integer NbPOnU (const Handle(Adaptor3d_HSurface)& S) +static Standard_Integer NbPOnU (const Handle(Adaptor3d_Surface)& S) { const Standard_Real u0 = S->FirstUParameter(); const Standard_Real u1 = S->LastUParameter(); @@ -45,7 +45,7 @@ static Standard_Integer NbPOnU (const Handle(Adaptor3d_HSurface)& S) return (nbpu>NBMAXUV? NBMAXUV : nbpu); } //================================================================================ -static Standard_Integer NbPOnV (const Handle(Adaptor3d_HSurface)& S) +static Standard_Integer NbPOnV (const Handle(Adaptor3d_Surface)& S) { const Standard_Real v0 = S->FirstVParameter(); const Standard_Real v1 = S->LastVParameter(); @@ -69,7 +69,7 @@ void IntPatch_Polyhedron::Destroy() //function : IntPatch_Polyhedron //purpose : //======================================================================= -IntPatch_Polyhedron::IntPatch_Polyhedron (const Handle(Adaptor3d_HSurface)& Surface) +IntPatch_Polyhedron::IntPatch_Polyhedron (const Handle(Adaptor3d_Surface)& Surface) : TheDeflection(Epsilon(100.)), nbdeltaU(NbPOnU(Surface)), nbdeltaV(NbPOnV(Surface)), @@ -126,7 +126,7 @@ IntPatch_Polyhedron::IntPatch_Polyhedron (const Handle(Adaptor3d_HSurface)& Surf //function : IntPatch_Polyhedron //purpose : //======================================================================= -IntPatch_Polyhedron::IntPatch_Polyhedron (const Handle(Adaptor3d_HSurface)& Surface, +IntPatch_Polyhedron::IntPatch_Polyhedron (const Handle(Adaptor3d_Surface)& Surface, const Standard_Integer nbu, const Standard_Integer nbv) : TheDeflection(Epsilon(100.)), @@ -188,7 +188,7 @@ IntPatch_Polyhedron::IntPatch_Polyhedron (const Handle(Adaptor3d_HSurface)& Surf //======================================================================= Standard_Real IntPatch_Polyhedron::DeflectionOnTriangle - (const Handle(Adaptor3d_HSurface)& Surface, + (const Handle(Adaptor3d_Surface)& Surface, const Standard_Integer Triang) const { Standard_Integer i1,i2,i3; diff --git a/src/IntPatch/IntPatch_Polyhedron.hxx b/src/IntPatch/IntPatch_Polyhedron.hxx index e7be738665..96d0b9f081 100644 --- a/src/IntPatch/IntPatch_Polyhedron.hxx +++ b/src/IntPatch/IntPatch_Polyhedron.hxx @@ -17,22 +17,9 @@ #ifndef _IntPatch_Polyhedron_HeaderFile #define _IntPatch_Polyhedron_HeaderFile -#include -#include -#include - +#include #include #include -#include -#include -#include -#include -class Standard_OutOfRange; -class Adaptor3d_HSurface; -class gp_Pnt; -class Bnd_Box; -class gp_XYZ; - //! This class provides a linear approximation of the PSurface. //! preview a constructor on a zone of a surface @@ -45,9 +32,9 @@ public: //! MaTriangle constructor with an double array of pnt for the //! representation of a double array of triangles. - Standard_EXPORT IntPatch_Polyhedron(const Handle(Adaptor3d_HSurface)& Surface, const Standard_Integer nbdU, const Standard_Integer nbdV); + Standard_EXPORT IntPatch_Polyhedron(const Handle(Adaptor3d_Surface)& Surface, const Standard_Integer nbdU, const Standard_Integer nbdV); - Standard_EXPORT IntPatch_Polyhedron(const Handle(Adaptor3d_HSurface)& Surface); + Standard_EXPORT IntPatch_Polyhedron(const Handle(Adaptor3d_Surface)& Surface); Standard_EXPORT void Destroy(); ~IntPatch_Polyhedron() @@ -55,11 +42,11 @@ public: Destroy(); } - Standard_EXPORT void Perform (const Handle(Adaptor3d_HSurface)& Surface, const Standard_Integer nbdU, const Standard_Integer nbdV); + Standard_EXPORT void Perform (const Handle(Adaptor3d_Surface)& Surface, const Standard_Integer nbdU, const Standard_Integer nbdV); Standard_EXPORT void DeflectionOverEstimation (const Standard_Real flec); - Standard_EXPORT Standard_Real DeflectionOnTriangle (const Handle(Adaptor3d_HSurface)& Surface, const Standard_Integer Index) const; + Standard_EXPORT Standard_Real DeflectionOnTriangle (const Handle(Adaptor3d_Surface)& Surface, const Standard_Integer Index) const; Standard_EXPORT void UMinSingularity (const Standard_Boolean Sing); diff --git a/src/IntPatch/IntPatch_PrmPrmIntersection.cxx b/src/IntPatch/IntPatch_PrmPrmIntersection.cxx index 111dd36c24..5a81a59c4c 100644 --- a/src/IntPatch/IntPatch_PrmPrmIntersection.cxx +++ b/src/IntPatch/IntPatch_PrmPrmIntersection.cxx @@ -17,7 +17,7 @@ // modified by Edward AGAPOV (eap) Tue Jan 22 12:29:55 2002 // modified by Oleg FEDYAED (ofv) Fri Nov 29 16:08:02 2002 -#include +#include #include #include #include @@ -53,8 +53,8 @@ static void SectionPointToParameters(const Intf_SectionPoint& Sp, static -void AdjustOnPeriodic(const Handle(Adaptor3d_HSurface)& Surf1, - const Handle(Adaptor3d_HSurface)& Surf2, +void AdjustOnPeriodic(const Handle(Adaptor3d_Surface)& Surf1, + const Handle(Adaptor3d_Surface)& Surf2, IntPatch_SequenceOfLine& aSLin); static @@ -70,8 +70,8 @@ static void AddWLine(IntPatch_SequenceOfLine &theLines, const Handle(IntPatch_WLine) &theWLine, const Standard_Real Deflection); -static void SeveralWlinesProcessing(const Handle(Adaptor3d_HSurface)& theSurf1, - const Handle(Adaptor3d_HSurface)& theSurf2, +static void SeveralWlinesProcessing(const Handle(Adaptor3d_Surface)& theSurf1, + const Handle(Adaptor3d_Surface)& theSurf2, const IntPatch_SequenceOfLine& theSLin, const Standard_Real* const thePeriodsArr, const IntSurf_TypeTrans theTrans1, @@ -114,10 +114,10 @@ static void SeveralWlinesProcessing(const Handle(Adaptor3d_HSurface)& theSurf1, const gp_Pnt2d aPTS1(aU1, aV1), aPTS2(aU2, aV2); Standard_Real tDistance = cPV.Distance(tPV); - Standard_Real uRs1 = theSurf1->Surface().UResolution(tDistance); - Standard_Real vRs1 = theSurf1->Surface().VResolution(tDistance); - Standard_Real uRs2 = theSurf2->Surface().UResolution(tDistance); - Standard_Real vRs2 = theSurf2->Surface().VResolution(tDistance); + Standard_Real uRs1 = theSurf1->UResolution(tDistance); + Standard_Real vRs1 = theSurf1->VResolution(tDistance); + Standard_Real uRs2 = theSurf2->UResolution(tDistance); + Standard_Real vRs2 = theSurf2->VResolution(tDistance); Standard_Real RmaxS1 = Max(uRs1,vRs1); Standard_Real RmaxS2 = Max(uRs2,vRs2); @@ -312,7 +312,7 @@ IntPatch_PrmPrmIntersection::IntPatch_PrmPrmIntersection() // function : Perform // purpose : //================================================================================== -void IntPatch_PrmPrmIntersection::Perform (const Handle(Adaptor3d_HSurface)& Surf1, +void IntPatch_PrmPrmIntersection::Perform (const Handle(Adaptor3d_Surface)& Surf1, const Handle(Adaptor3d_TopolTool)& D1, const Standard_Real TolTangency, const Standard_Real Epsilon, @@ -327,10 +327,10 @@ void IntPatch_PrmPrmIntersection::Perform (const Handle(Adaptor3d_HSurface)& S // function : Perform // purpose : //================================================================================== -void IntPatch_PrmPrmIntersection::Perform (const Handle(Adaptor3d_HSurface)& Surf1, +void IntPatch_PrmPrmIntersection::Perform (const Handle(Adaptor3d_Surface)& Surf1, const IntPatch_Polyhedron& Poly1, const Handle(Adaptor3d_TopolTool)& D1, - const Handle(Adaptor3d_HSurface)& Surf2, + const Handle(Adaptor3d_Surface)& Surf2, const Handle(Adaptor3d_TopolTool)& D2, const Standard_Real TolTangency, const Standard_Real Epsilon, @@ -345,9 +345,9 @@ void IntPatch_PrmPrmIntersection::Perform (const Handle(Adaptor3d_HSurface)& S // function : Perform // purpose : //================================================================================== -void IntPatch_PrmPrmIntersection::Perform (const Handle(Adaptor3d_HSurface)& Surf1, +void IntPatch_PrmPrmIntersection::Perform (const Handle(Adaptor3d_Surface)& Surf1, const Handle(Adaptor3d_TopolTool)& D1, - const Handle(Adaptor3d_HSurface)& Surf2, + const Handle(Adaptor3d_Surface)& Surf2, const IntPatch_Polyhedron& Poly2, const Handle(Adaptor3d_TopolTool)& D2, const Standard_Real TolTangency, @@ -363,10 +363,10 @@ void IntPatch_PrmPrmIntersection::Perform (const Handle(Adaptor3d_HSurface)& S // function : Perform // purpose : //================================================================================== -void IntPatch_PrmPrmIntersection::Perform (const Handle(Adaptor3d_HSurface)& Surf1, +void IntPatch_PrmPrmIntersection::Perform (const Handle(Adaptor3d_Surface)& Surf1, const IntPatch_Polyhedron& Poly1, const Handle(Adaptor3d_TopolTool)& D1, - const Handle(Adaptor3d_HSurface)& Surf2, + const Handle(Adaptor3d_Surface)& Surf2, const IntPatch_Polyhedron& Poly2, const Handle(Adaptor3d_TopolTool)& D2, const Standard_Real TolTangency, @@ -787,7 +787,7 @@ void IntPatch_PrmPrmIntersection::Perform (const Handle(Adaptor3d_HSurface)& // function : Perform // purpose : //================================================================================== -void IntPatch_PrmPrmIntersection::Perform (const Handle(Adaptor3d_HSurface)& Surf1, +void IntPatch_PrmPrmIntersection::Perform (const Handle(Adaptor3d_Surface)& Surf1, const IntPatch_Polyhedron& Poly1, const Handle(Adaptor3d_TopolTool)& D1, const Standard_Real TolTangency, @@ -1236,8 +1236,8 @@ void IntPatch_PrmPrmIntersection::Perform (const Handle(Adaptor3d_HSurface)& // function : NewLine // purpose : //================================================================================== -Handle(IntPatch_Line) IntPatch_PrmPrmIntersection::NewLine (const Handle(Adaptor3d_HSurface)& Surf1, - const Handle(Adaptor3d_HSurface)& Surf2, +Handle(IntPatch_Line) IntPatch_PrmPrmIntersection::NewLine (const Handle(Adaptor3d_Surface)& Surf1, + const Handle(Adaptor3d_Surface)& Surf2, const Standard_Integer NumLine, const Standard_Integer Low, const Standard_Integer High, @@ -1557,9 +1557,9 @@ void IntPatch_PrmPrmIntersection::Remplit(const Standard_Integer a, //function : Perform //purpose : //======================================================================= -void IntPatch_PrmPrmIntersection::Perform (const Handle(Adaptor3d_HSurface)& Surf1, +void IntPatch_PrmPrmIntersection::Perform (const Handle(Adaptor3d_Surface)& Surf1, const Handle(Adaptor3d_TopolTool)& D1, - const Handle(Adaptor3d_HSurface)& Surf2, + const Handle(Adaptor3d_Surface)& Surf2, const Handle(Adaptor3d_TopolTool)& D2, const Standard_Real TolTangency, const Standard_Real Epsilon, @@ -1847,9 +1847,9 @@ void IntPatch_PrmPrmIntersection::Perform (const Handle(Adaptor3d_HSurface)& //function : Perform //purpose : //======================================================================= -void IntPatch_PrmPrmIntersection::Perform(const Handle(Adaptor3d_HSurface)& Surf1, +void IntPatch_PrmPrmIntersection::Perform(const Handle(Adaptor3d_Surface)& Surf1, const Handle(Adaptor3d_TopolTool)& D1, - const Handle(Adaptor3d_HSurface)& Surf2, + const Handle(Adaptor3d_Surface)& Surf2, const Handle(Adaptor3d_TopolTool)& D2, const Standard_Real U1Depart, const Standard_Real V1Depart, @@ -1994,8 +1994,8 @@ void IntPatch_PrmPrmIntersection::Perform(const Handle(Adaptor3d_HSurface)& S // function : AdjustOnPeriodic // purpose : //================================================================================== -void AdjustOnPeriodic(const Handle(Adaptor3d_HSurface)& Surf1, - const Handle(Adaptor3d_HSurface)& Surf2, +void AdjustOnPeriodic(const Handle(Adaptor3d_Surface)& Surf1, + const Handle(Adaptor3d_Surface)& Surf2, IntPatch_SequenceOfLine& aSLin) { Standard_Boolean bIsPeriodic[4], bModified, bIsNull, bIsPeriod; @@ -2134,9 +2134,9 @@ IntSurf_PntOn2S MakeNewPoint(const IntSurf_PntOn2S& replacePnt, // function : Perform // purpose : base SS Int. function //================================================================================== -void IntPatch_PrmPrmIntersection::Perform (const Handle(Adaptor3d_HSurface)& Surf1, +void IntPatch_PrmPrmIntersection::Perform (const Handle(Adaptor3d_Surface)& Surf1, const Handle(Adaptor3d_TopolTool)& D1, - const Handle(Adaptor3d_HSurface)& Surf2, + const Handle(Adaptor3d_Surface)& Surf2, const Handle(Adaptor3d_TopolTool)& D2, const Standard_Real TolTangency, const Standard_Real Epsilon, @@ -3050,10 +3050,10 @@ private: // purpose : //================================================================================== void IntPatch_PrmPrmIntersection::PointDepart(Handle(IntSurf_LineOn2S)& LineOn2S, - const Handle(Adaptor3d_HSurface)& S1, + const Handle(Adaptor3d_Surface)& S1, const Standard_Integer SU_1, const Standard_Integer SV_1, - const Handle(Adaptor3d_HSurface)& S2, + const Handle(Adaptor3d_Surface)& S2, const Standard_Integer SU_2, const Standard_Integer SV_2) const { diff --git a/src/IntPatch/IntPatch_PrmPrmIntersection.hxx b/src/IntPatch/IntPatch_PrmPrmIntersection.hxx index da2c8c6e84..99890e4d80 100644 --- a/src/IntPatch/IntPatch_PrmPrmIntersection.hxx +++ b/src/IntPatch/IntPatch_PrmPrmIntersection.hxx @@ -17,25 +17,15 @@ #ifndef _IntPatch_PrmPrmIntersection_HeaderFile #define _IntPatch_PrmPrmIntersection_HeaderFile -#include -#include -#include - -#include +#include #include -#include #include -#include -class Standard_OutOfRange; -class StdFail_NotDone; -class Adaptor3d_HSurface; -class IntPatch_Polyhedron; + class Adaptor3d_TopolTool; -class IntPatch_Line; +class IntPatch_Polyhedron; class IntPatch_PrmPrmIntersection_T3Bits; class IntSurf_LineOn2S; - //! Implementation of the Intersection between two //! bi-parametrised surfaces. //! @@ -56,29 +46,29 @@ public: //! Performs the intersection between and //! . Associated Polyhedrons //! and are given. - Standard_EXPORT void Perform (const Handle(Adaptor3d_HSurface)& Caro1, const IntPatch_Polyhedron& Polyhedron1, const Handle(Adaptor3d_TopolTool)& Domain1, const Handle(Adaptor3d_HSurface)& Caro2, const IntPatch_Polyhedron& Polyhedron2, const Handle(Adaptor3d_TopolTool)& Domain2, const Standard_Real TolTangency, const Standard_Real Epsilon, const Standard_Real Deflection, const Standard_Real Increment); + Standard_EXPORT void Perform (const Handle(Adaptor3d_Surface)& Caro1, const IntPatch_Polyhedron& Polyhedron1, const Handle(Adaptor3d_TopolTool)& Domain1, const Handle(Adaptor3d_Surface)& Caro2, const IntPatch_Polyhedron& Polyhedron2, const Handle(Adaptor3d_TopolTool)& Domain2, const Standard_Real TolTangency, const Standard_Real Epsilon, const Standard_Real Deflection, const Standard_Real Increment); - Standard_EXPORT void Perform (const Handle(Adaptor3d_HSurface)& Caro1, const IntPatch_Polyhedron& Polyhedron1, const Handle(Adaptor3d_TopolTool)& Domain1, const Standard_Real TolTangency, const Standard_Real Epsilon, const Standard_Real Deflection, const Standard_Real Increment); + Standard_EXPORT void Perform (const Handle(Adaptor3d_Surface)& Caro1, const IntPatch_Polyhedron& Polyhedron1, const Handle(Adaptor3d_TopolTool)& Domain1, const Standard_Real TolTangency, const Standard_Real Epsilon, const Standard_Real Deflection, const Standard_Real Increment); //! Performs the intersection between and //! . The method computes the polyhedron on //! each surface. - Standard_EXPORT void Perform (const Handle(Adaptor3d_HSurface)& Caro1, const Handle(Adaptor3d_TopolTool)& Domain1, const Handle(Adaptor3d_HSurface)& Caro2, const Handle(Adaptor3d_TopolTool)& Domain2, const Standard_Real TolTangency, const Standard_Real Epsilon, const Standard_Real Deflection, const Standard_Real Increment, const Standard_Boolean ClearFlag = Standard_True); + Standard_EXPORT void Perform (const Handle(Adaptor3d_Surface)& Caro1, const Handle(Adaptor3d_TopolTool)& Domain1, const Handle(Adaptor3d_Surface)& Caro2, const Handle(Adaptor3d_TopolTool)& Domain2, const Standard_Real TolTangency, const Standard_Real Epsilon, const Standard_Real Deflection, const Standard_Real Increment, const Standard_Boolean ClearFlag = Standard_True); //! Performs the intersection between and //! . The method computes the polyhedron on //! each surface. - Standard_EXPORT void Perform (const Handle(Adaptor3d_HSurface)& Caro1, const Handle(Adaptor3d_TopolTool)& Domain1, const Handle(Adaptor3d_HSurface)& Caro2, const Handle(Adaptor3d_TopolTool)& Domain2, const Standard_Real TolTangency, const Standard_Real Epsilon, const Standard_Real Deflection, const Standard_Real Increment, IntSurf_ListOfPntOn2S& ListOfPnts); + Standard_EXPORT void Perform (const Handle(Adaptor3d_Surface)& Caro1, const Handle(Adaptor3d_TopolTool)& Domain1, const Handle(Adaptor3d_Surface)& Caro2, const Handle(Adaptor3d_TopolTool)& Domain2, const Standard_Real TolTangency, const Standard_Real Epsilon, const Standard_Real Deflection, const Standard_Real Increment, IntSurf_ListOfPntOn2S& ListOfPnts); //! Performs the intersection between and //! . The method computes the polyhedron on //! each surface. - Standard_EXPORT void Perform (const Handle(Adaptor3d_HSurface)& Caro1, const Handle(Adaptor3d_TopolTool)& Domain1, const Handle(Adaptor3d_HSurface)& Caro2, const Handle(Adaptor3d_TopolTool)& Domain2, const Standard_Real U1, const Standard_Real V1, const Standard_Real U2, const Standard_Real V2, const Standard_Real TolTangency, const Standard_Real Epsilon, const Standard_Real Deflection, const Standard_Real Increment); + Standard_EXPORT void Perform (const Handle(Adaptor3d_Surface)& Caro1, const Handle(Adaptor3d_TopolTool)& Domain1, const Handle(Adaptor3d_Surface)& Caro2, const Handle(Adaptor3d_TopolTool)& Domain2, const Standard_Real U1, const Standard_Real V1, const Standard_Real U2, const Standard_Real V2, const Standard_Real TolTangency, const Standard_Real Epsilon, const Standard_Real Deflection, const Standard_Real Increment); //! Performs the intersection between and //! . The method computes the polyhedron on //! each surface. - Standard_EXPORT void Perform (const Handle(Adaptor3d_HSurface)& Caro1, const Handle(Adaptor3d_TopolTool)& Domain1, const Standard_Real TolTangency, const Standard_Real Epsilon, const Standard_Real Deflection, const Standard_Real Increment); + Standard_EXPORT void Perform (const Handle(Adaptor3d_Surface)& Caro1, const Handle(Adaptor3d_TopolTool)& Domain1, const Standard_Real TolTangency, const Standard_Real Epsilon, const Standard_Real Deflection, const Standard_Real Increment); //! Performs the intersection between and //! . @@ -86,7 +76,7 @@ public: //! The polyhedron which approximates , //! is given. The other one is //! computed. - Standard_EXPORT void Perform (const Handle(Adaptor3d_HSurface)& Caro1, const Handle(Adaptor3d_TopolTool)& Domain1, const Handle(Adaptor3d_HSurface)& Caro2, const IntPatch_Polyhedron& Polyhedron2, const Handle(Adaptor3d_TopolTool)& Domain2, const Standard_Real TolTangency, const Standard_Real Epsilon, const Standard_Real Deflection, const Standard_Real Increment); + Standard_EXPORT void Perform (const Handle(Adaptor3d_Surface)& Caro1, const Handle(Adaptor3d_TopolTool)& Domain1, const Handle(Adaptor3d_Surface)& Caro2, const IntPatch_Polyhedron& Polyhedron2, const Handle(Adaptor3d_TopolTool)& Domain2, const Standard_Real TolTangency, const Standard_Real Epsilon, const Standard_Real Deflection, const Standard_Real Increment); //! Performs the intersection between and //! . @@ -94,7 +84,7 @@ public: //! The polyhedron which approximates , //! is given. The other one is //! computed. - Standard_EXPORT void Perform (const Handle(Adaptor3d_HSurface)& Caro1, const IntPatch_Polyhedron& Polyhedron1, const Handle(Adaptor3d_TopolTool)& Domain1, const Handle(Adaptor3d_HSurface)& Caro2, const Handle(Adaptor3d_TopolTool)& Domain2, const Standard_Real TolTangency, const Standard_Real Epsilon, const Standard_Real Deflection, const Standard_Real Increment); + Standard_EXPORT void Perform (const Handle(Adaptor3d_Surface)& Caro1, const IntPatch_Polyhedron& Polyhedron1, const Handle(Adaptor3d_TopolTool)& Domain1, const Handle(Adaptor3d_Surface)& Caro2, const Handle(Adaptor3d_TopolTool)& Domain2, const Standard_Real TolTangency, const Standard_Real Epsilon, const Standard_Real Deflection, const Standard_Real Increment); //! Returns true if the calculus was succesfull. Standard_Boolean IsDone() const; @@ -121,7 +111,7 @@ public: //! //! An exception is raised if Index<=0 or Index>NbLine. //! or if IsDone returns False - Standard_EXPORT Handle(IntPatch_Line) NewLine (const Handle(Adaptor3d_HSurface)& Caro1, const Handle(Adaptor3d_HSurface)& Caro2, const Standard_Integer IndexLine, const Standard_Integer LowPoint, const Standard_Integer HighPoint, const Standard_Integer NbPoints) const; + Standard_EXPORT Handle(IntPatch_Line) NewLine (const Handle(Adaptor3d_Surface)& Caro1, const Handle(Adaptor3d_Surface)& Caro2, const Standard_Integer IndexLine, const Standard_Integer LowPoint, const Standard_Integer HighPoint, const Standard_Integer NbPoints) const; Standard_Integer GrilleInteger (const Standard_Integer ix, const Standard_Integer iy, const Standard_Integer iz) const; @@ -139,7 +129,7 @@ public: Standard_Integer CodeReject (const Standard_Real x1, const Standard_Real y1, const Standard_Real z1, const Standard_Real x2, const Standard_Real y2, const Standard_Real z2, const Standard_Real x3, const Standard_Real y3, const Standard_Real z3) const; - Standard_EXPORT void PointDepart (Handle(IntSurf_LineOn2S)& LineOn2S, const Handle(Adaptor3d_HSurface)& S1, const Standard_Integer SU1, const Standard_Integer SV1, const Handle(Adaptor3d_HSurface)& S2, const Standard_Integer SU2, const Standard_Integer SV2) const; + Standard_EXPORT void PointDepart (Handle(IntSurf_LineOn2S)& LineOn2S, const Handle(Adaptor3d_Surface)& S1, const Standard_Integer SU1, const Standard_Integer SV1, const Handle(Adaptor3d_Surface)& S2, const Standard_Integer SU2, const Standard_Integer SV2) const; diff --git a/src/IntPatch/IntPatch_RLine.cxx b/src/IntPatch/IntPatch_RLine.cxx index cb348911c2..b1d83940ff 100644 --- a/src/IntPatch/IntPatch_RLine.cxx +++ b/src/IntPatch/IntPatch_RLine.cxx @@ -15,7 +15,7 @@ // commercial license or contractual agreement. -#include +#include #include #include #include @@ -110,12 +110,12 @@ void IntPatch_RLine::ParamOnS2(Standard_Real& a,Standard_Real& b) const { } -void IntPatch_RLine::SetArcOnS1(const Handle(Adaptor2d_HCurve2d)& A) { +void IntPatch_RLine::SetArcOnS1(const Handle(Adaptor2d_Curve2d)& A) { theArcOnS1 = A; onS1=Standard_True; } -void IntPatch_RLine::SetArcOnS2(const Handle(Adaptor2d_HCurve2d)& A) { +void IntPatch_RLine::SetArcOnS2(const Handle(Adaptor2d_Curve2d)& A) { theArcOnS2 = A; onS2=Standard_True; } diff --git a/src/IntPatch/IntPatch_RLine.hxx b/src/IntPatch/IntPatch_RLine.hxx index 84321b0f52..690fc8bff7 100644 --- a/src/IntPatch/IntPatch_RLine.hxx +++ b/src/IntPatch/IntPatch_RLine.hxx @@ -28,7 +28,7 @@ #include #include #include -class Adaptor2d_HCurve2d; + class Standard_DomainError; class Standard_OutOfRange; class IntPatch_Point; @@ -86,19 +86,19 @@ public: //! the second patch. Standard_Boolean IsArcOnS2() const; - Standard_EXPORT void SetArcOnS1 (const Handle(Adaptor2d_HCurve2d)& A); + Standard_EXPORT void SetArcOnS1 (const Handle(Adaptor2d_Curve2d)& A); - Standard_EXPORT void SetArcOnS2 (const Handle(Adaptor2d_HCurve2d)& A); + Standard_EXPORT void SetArcOnS2 (const Handle(Adaptor2d_Curve2d)& A); Standard_EXPORT void SetParamOnS1 (const Standard_Real p1, const Standard_Real p2); Standard_EXPORT void SetParamOnS2 (Standard_Real& p1, Standard_Real& p2); //! Returns the concerned arc. - const Handle(Adaptor2d_HCurve2d)& ArcOnS1() const; + const Handle(Adaptor2d_Curve2d)& ArcOnS1() const; //! Returns the concerned arc. - const Handle(Adaptor2d_HCurve2d)& ArcOnS2() const; + const Handle(Adaptor2d_Curve2d)& ArcOnS2() const; Standard_EXPORT void ParamOnS1 (Standard_Real& p1, Standard_Real& p2) const; @@ -199,8 +199,8 @@ protected: private: - Handle(Adaptor2d_HCurve2d) theArcOnS1; - Handle(Adaptor2d_HCurve2d) theArcOnS2; + Handle(Adaptor2d_Curve2d) theArcOnS1; + Handle(Adaptor2d_Curve2d) theArcOnS2; Standard_Boolean onS1; Standard_Boolean onS2; Standard_Real ParamInf1; diff --git a/src/IntPatch/IntPatch_RLine.lxx b/src/IntPatch/IntPatch_RLine.lxx index c79178bebd..e51bae0207 100644 --- a/src/IntPatch/IntPatch_RLine.lxx +++ b/src/IntPatch/IntPatch_RLine.lxx @@ -19,18 +19,18 @@ #include -inline const Handle(Adaptor2d_HCurve2d)& IntPatch_RLine::ArcOnS1() const +inline const Handle(Adaptor2d_Curve2d)& IntPatch_RLine::ArcOnS1() const { return theArcOnS1; } -inline const Handle(Adaptor2d_HCurve2d)& IntPatch_RLine::ArcOnS2() const +inline const Handle(Adaptor2d_Curve2d)& IntPatch_RLine::ArcOnS2() const { return theArcOnS2; } -//-- Il faut mettre cet include ici , car l include fait un define Handle(Adaptor2d_HCurve2d) ... -//-- et en fin de fichier un undef Handle(Adaptor2d_HCurve2d) ... +//-- Il faut mettre cet include ici , car l include fait un define Handle(Adaptor2d_Curve2d) ... +//-- et en fin de fichier un undef Handle(Adaptor2d_Curve2d) ... inline void IntPatch_RLine::AddVertex (const IntPatch_Point& thePnt, const Standard_Boolean theIsPrepend) diff --git a/src/IntPatch/IntPatch_RstInt.cxx b/src/IntPatch/IntPatch_RstInt.cxx index b37d85816d..5946bc943d 100644 --- a/src/IntPatch/IntPatch_RstInt.cxx +++ b/src/IntPatch/IntPatch_RstInt.cxx @@ -25,8 +25,8 @@ //-- - Pour rester coherent avec cette facon de faire, //-- Chercher(Nbvtx++). -#include -#include +#include +#include #include #include #include @@ -109,7 +109,7 @@ inline Standard_Real Tol3d (const Handle(Adaptor3d_HVertex)& vtx, : tolDef); } -inline Standard_Real Tol3d (const Handle(Adaptor2d_HCurve2d)& arc, +inline Standard_Real Tol3d (const Handle(Adaptor2d_Curve2d)& arc, const Handle(Adaptor3d_TopolTool)& Domain, const Standard_Real tolDef = 0.) { @@ -119,8 +119,8 @@ inline Standard_Real Tol3d (const Handle(Adaptor2d_HCurve2d)& arc, } static Standard_Boolean CoincideOnArc(const gp_Pnt& Ptsommet, - const Handle(Adaptor2d_HCurve2d)& A, - const Handle(Adaptor3d_HSurface)& Surf, + const Handle(Adaptor2d_Curve2d)& A, + const Handle(Adaptor3d_Surface)& Surf, const Standard_Real Toler, const Handle(Adaptor3d_TopolTool)& Domain, Handle(Adaptor3d_HVertex)& Vtx) @@ -235,7 +235,7 @@ static void GetLinePoint2d (const Handle(IntPatch_Line)& L, } static Standard_Boolean FindParameter(const Handle(IntPatch_Line)& L, - const Handle(Adaptor3d_HSurface)& OtherSurf, + const Handle(Adaptor3d_Surface)& OtherSurf, const Standard_Real Tol, const gp_Pnt& Ptsom, const gp_Pnt2d& Ptsom2d, @@ -366,9 +366,9 @@ inline Standard_Boolean ArePnt2dEqual(const gp_Pnt2d& p1, const gp_Pnt2d& p2, //======================================================================= void IntPatch_RstInt::PutVertexOnLine (const Handle(IntPatch_Line)& L, - const Handle(Adaptor3d_HSurface)& Surf, + const Handle(Adaptor3d_Surface)& Surf, const Handle(Adaptor3d_TopolTool)& Domain, - const Handle(Adaptor3d_HSurface)& OtherSurf, + const Handle(Adaptor3d_Surface)& OtherSurf, const Standard_Boolean OnFirst, const Standard_Real Tol) { @@ -404,7 +404,7 @@ void IntPatch_RstInt::PutVertexOnLine (const Handle(IntPatch_Line)& L, IntPatch_Point Sommet, ptline; Handle(Adaptor3d_HVertex) vtxarc,vtxline; - Handle(Adaptor2d_HCurve2d) arc; + Handle(Adaptor2d_Curve2d) arc; Standard_Boolean VtxOnArc, duplicate, found; IntSurf_Transition transarc,transline; @@ -447,8 +447,8 @@ void IntPatch_RstInt::PutVertexOnLine (const Handle(IntPatch_Line)& L, //-- il faut dans ce cas considerer la restriction -- //-- la restriction decalee de +-2PI -- //------------------------------------------------------------------------ - const Handle(Adaptor3d_HSurface)& Surf1 = (OnFirst ? Surf : OtherSurf); - const Handle(Adaptor3d_HSurface)& Surf2 = (OnFirst ? OtherSurf : Surf); + const Handle(Adaptor3d_Surface)& Surf1 = (OnFirst ? Surf : OtherSurf); + const Handle(Adaptor3d_Surface)& Surf2 = (OnFirst ? OtherSurf : Surf); GeomAbs_SurfaceType TypeS1 = Surf1->GetType(); GeomAbs_SurfaceType TypeS2 = Surf2->GetType(); Standard_Boolean SurfaceIsPeriodic = Standard_False; @@ -509,7 +509,7 @@ void IntPatch_RstInt::PutVertexOnLine (const Handle(IntPatch_Line)& L, Standard_Real aXmin, aYmin, aXmax, aYmax; BPLin.Get(aXmin, aYmin, aXmax, aYmax); - gp_Lin2d aLin = arc->Curve2d().Line(); + gp_Lin2d aLin = arc->Line(); const gp_Pnt2d& aLoc = aLin.Location(); const gp_Dir2d& aDir = aLin.Direction(); diff --git a/src/IntPatch/IntPatch_RstInt.hxx b/src/IntPatch/IntPatch_RstInt.hxx index 885abd2aa3..7f3c4ab52a 100644 --- a/src/IntPatch/IntPatch_RstInt.hxx +++ b/src/IntPatch/IntPatch_RstInt.hxx @@ -17,18 +17,12 @@ #ifndef _IntPatch_RstInt_HeaderFile #define _IntPatch_RstInt_HeaderFile -#include -#include -#include +#include -#include -#include class Standard_DomainError; class IntPatch_Line; -class Adaptor3d_HSurface; class Adaptor3d_TopolTool; - //! trouver les points d intersection entre la ligne de //! cheminement et les arcs de restriction class IntPatch_RstInt @@ -39,9 +33,9 @@ public: Standard_EXPORT static void PutVertexOnLine (const Handle(IntPatch_Line)& L, - const Handle(Adaptor3d_HSurface)& Surf, + const Handle(Adaptor3d_Surface)& Surf, const Handle(Adaptor3d_TopolTool)& Domain, - const Handle(Adaptor3d_HSurface)& OtherSurf, + const Handle(Adaptor3d_Surface)& OtherSurf, const Standard_Boolean OnFirst, const Standard_Real Tol); diff --git a/src/IntPatch/IntPatch_SpecialPoints.cxx b/src/IntPatch/IntPatch_SpecialPoints.cxx index 60eb578dd9..f0ea9388c5 100644 --- a/src/IntPatch/IntPatch_SpecialPoints.cxx +++ b/src/IntPatch/IntPatch_SpecialPoints.cxx @@ -15,7 +15,7 @@ #include -#include +#include #include #include #include @@ -34,8 +34,8 @@ class FuncPreciseSeam: public math_FunctionSetWithDerivatives { public: - FuncPreciseSeam(const Handle(Adaptor3d_HSurface)& theQSurf, // quadric - const Handle(Adaptor3d_HSurface)& thePSurf, // another surface + FuncPreciseSeam(const Handle(Adaptor3d_Surface)& theQSurf, // quadric + const Handle(Adaptor3d_Surface)& thePSurf, // another surface const Standard_Boolean isTheUSeam, const Standard_Real theIsoParameter): myQSurf(theQSurf), @@ -131,8 +131,8 @@ protected: FuncPreciseSeam operator=(FuncPreciseSeam&); private: - const Handle(Adaptor3d_HSurface)& myQSurf; - const Handle(Adaptor3d_HSurface)& myPSurf; + const Handle(Adaptor3d_Surface)& myQSurf; + const Handle(Adaptor3d_Surface)& myPSurf; //! 1 for U-coordinate, 0 - for V one. const Standard_Integer mySeamCoordInd; @@ -164,7 +164,7 @@ static inline void GetTangent(const Standard_Real theConeSemiAngle, // Returns the foot of projection (theProjPt) and its parameters // on theSurf. //======================================================================= -static Standard_Boolean IsPointOnSurface(const Handle(Adaptor3d_HSurface)& theSurf, +static Standard_Boolean IsPointOnSurface(const Handle(Adaptor3d_Surface)& theSurf, const gp_Pnt& thePt, const Standard_Real theTol, gp_Pnt& theProjPt, @@ -183,7 +183,7 @@ static Standard_Boolean IsPointOnSurface(const Handle(Adaptor3d_HSurface)& theSu case GeomAbs_SurfaceOfExtrusion: case GeomAbs_SurfaceOfRevolution: { - Extrema_ExtPS anExtr(thePt, theSurf->Surface(), theSurf->UResolution(theTol), + Extrema_ExtPS anExtr(thePt, *theSurf, theSurf->UResolution(theTol), theSurf->VResolution(theTol), Extrema_ExtFlag_MIN); if(!anExtr.IsDone() || (anExtr.NbExt() < 1)) { @@ -218,7 +218,7 @@ static Standard_Boolean IsPointOnSurface(const Handle(Adaptor3d_HSurface)& theSu break; default: { - Extrema_GenLocateExtPS anExtr(theSurf->Surface()); + Extrema_GenLocateExtPS anExtr (*theSurf); anExtr.Perform(thePt, theUpar, theVpar); if(!anExtr.IsDone() || (anExtr.SquareDistance() > theTol*theTol)) { @@ -243,8 +243,8 @@ static Standard_Boolean IsPointOnSurface(const Handle(Adaptor3d_HSurface)& theSu // thePSurf is another surface to intersect. //======================================================================= Standard_Boolean IntPatch_SpecialPoints:: - AddCrossUVIsoPoint(const Handle(Adaptor3d_HSurface)& theQSurf, - const Handle(Adaptor3d_HSurface)& thePSurf, + AddCrossUVIsoPoint(const Handle(Adaptor3d_Surface)& theQSurf, + const Handle(Adaptor3d_Surface)& thePSurf, const IntSurf_PntOn2S& theRefPt, const Standard_Real theTol, IntSurf_PntOn2S& theAddedPoint, @@ -268,7 +268,7 @@ Standard_Boolean IntPatch_SpecialPoints:: theQSurf->D0(aUquad, aVquad, aPQuad); - Extrema_GenLocateExtPS anExtr(thePSurf->Surface()); + Extrema_GenLocateExtPS anExtr (*thePSurf); anExtr.Perform(aPQuad, aU0, aV0); if(!anExtr.IsDone()) @@ -300,8 +300,8 @@ Standard_Boolean IntPatch_SpecialPoints:: // thePSurf is another surface to intersect. //======================================================================= Standard_Boolean IntPatch_SpecialPoints:: - AddPointOnUorVIso(const Handle(Adaptor3d_HSurface)& theQSurf, - const Handle(Adaptor3d_HSurface)& thePSurf, + AddPointOnUorVIso(const Handle(Adaptor3d_Surface)& theQSurf, + const Handle(Adaptor3d_Surface)& thePSurf, const IntSurf_PntOn2S& theRefPt, const Standard_Boolean theIsU, const Standard_Real theIsoParameter, @@ -780,8 +780,8 @@ Standard_Integer IntPatch_SpecialPoints::GetTangentToIntLineForCone(const Standa // Returns TRUE, if the pole is an intersection point. //======================================================================= Standard_Boolean IntPatch_SpecialPoints:: - AddSingularPole(const Handle(Adaptor3d_HSurface)& theQSurf, - const Handle(Adaptor3d_HSurface)& thePSurf, + AddSingularPole(const Handle(Adaptor3d_Surface)& theQSurf, + const Handle(Adaptor3d_Surface)& thePSurf, const IntSurf_PntOn2S& thePtIso, IntPatch_Point& theVertex, IntSurf_PntOn2S& theAddedPoint, @@ -951,8 +951,8 @@ to the inters. curve. In this case @U_{q}@ must be recomputed. */ //======================================================================= Standard_Boolean IntPatch_SpecialPoints:: - ContinueAfterSpecialPoint(const Handle(Adaptor3d_HSurface)& theQSurf, - const Handle(Adaptor3d_HSurface)& thePSurf, + ContinueAfterSpecialPoint(const Handle(Adaptor3d_Surface)& theQSurf, + const Handle(Adaptor3d_Surface)& thePSurf, const IntSurf_PntOn2S& theRefPt, const IntPatch_SpecPntType theSPType, const Standard_Real theTol2D, diff --git a/src/IntPatch/IntPatch_SpecialPoints.hxx b/src/IntPatch/IntPatch_SpecialPoints.hxx index 8b32e03daa..485adf9e8f 100644 --- a/src/IntPatch/IntPatch_SpecialPoints.hxx +++ b/src/IntPatch/IntPatch_SpecialPoints.hxx @@ -20,10 +20,9 @@ //! (such as apex of cone, pole of sphere, //! point on surface boundary etc.) in the intersection line. +#include #include -#include -class Adaptor3d_HSurface; class gp_Cone; class gp_Vec; class gp_XYZ; @@ -41,8 +40,8 @@ public: //! second (otherwise, the first) surface while forming //! intersection point IntSurf_PntOn2S. Standard_EXPORT static Standard_Boolean - AddCrossUVIsoPoint(const Handle(Adaptor3d_HSurface)& theQSurf, - const Handle(Adaptor3d_HSurface)& thePSurf, + AddCrossUVIsoPoint(const Handle(Adaptor3d_Surface)& theQSurf, + const Handle(Adaptor3d_Surface)& thePSurf, const IntSurf_PntOn2S& theRefPt, const Standard_Real theTol3d, IntSurf_PntOn2S& theAddedPoint, @@ -61,8 +60,8 @@ public: //! [3] - U- (if V-isoline is considered) or V-parameter //! (if U-isoline is considered) of theQSurf. Standard_EXPORT static Standard_Boolean - AddPointOnUorVIso(const Handle(Adaptor3d_HSurface)& theQSurf, - const Handle(Adaptor3d_HSurface)& thePSurf, + AddPointOnUorVIso(const Handle(Adaptor3d_Surface)& theQSurf, + const Handle(Adaptor3d_Surface)& thePSurf, const IntSurf_PntOn2S& theRefPt, const Standard_Boolean theIsU, const Standard_Real theIsoParameter, @@ -86,8 +85,8 @@ public: //! ATTENTION!!! //! theVertex must be initialized before calling the method . Standard_EXPORT static Standard_Boolean - AddSingularPole(const Handle(Adaptor3d_HSurface)& theQSurf, - const Handle(Adaptor3d_HSurface)& thePSurf, + AddSingularPole(const Handle(Adaptor3d_Surface)& theQSurf, + const Handle(Adaptor3d_Surface)& thePSurf, const IntSurf_PntOn2S& thePtIso, IntPatch_Point& theVertex, IntSurf_PntOn2S& theAddedPoint, @@ -103,8 +102,8 @@ public: //! theNewPoint is not only Output parameter. It is Input/Output one. I.e. //! theNewPoint is reference point together with theRefPt. Standard_EXPORT static Standard_Boolean - ContinueAfterSpecialPoint(const Handle(Adaptor3d_HSurface)& theQSurf, - const Handle(Adaptor3d_HSurface)& thePSurf, + ContinueAfterSpecialPoint(const Handle(Adaptor3d_Surface)& theQSurf, + const Handle(Adaptor3d_Surface)& thePSurf, const IntSurf_PntOn2S& theRefPt, const IntPatch_SpecPntType theSPType, const Standard_Real theTol2D, diff --git a/src/IntPatch/IntPatch_TheIWalking.hxx b/src/IntPatch/IntPatch_TheIWalking.hxx index a58d30c7fa..c5b713d3bc 100644 --- a/src/IntPatch/IntPatch_TheIWalking.hxx +++ b/src/IntPatch/IntPatch_TheIWalking.hxx @@ -17,13 +17,8 @@ #ifndef _IntPatch_TheIWalking_HeaderFile #define _IntPatch_TheIWalking_HeaderFile -#include -#include -#include - -#include +#include #include -#include #include #include #include @@ -38,13 +33,11 @@ #include #include #include -class StdFail_NotDone; -class Standard_OutOfRange; + class IntSurf_PathPoint; class IntSurf_PathPointTool; class IntSurf_InteriorPoint; class IntSurf_InteriorPointTool; -class Adaptor3d_HSurface; class Adaptor3d_HSurfaceTool; class IntPatch_TheSurfFunction; class IntPatch_TheIWLineOfTheIWalking; @@ -81,11 +74,11 @@ public: //! Searches a set of polylines starting on a point of Pnts1 //! or Pnts2. //! Each point on a resulting polyline verifies F(u,v)=0 - Standard_EXPORT void Perform (const IntSurf_SequenceOfPathPoint& Pnts1, const IntSurf_SequenceOfInteriorPoint& Pnts2, IntPatch_TheSurfFunction& Func, const Handle(Adaptor3d_HSurface)& S, const Standard_Boolean Reversed = Standard_False); + Standard_EXPORT void Perform (const IntSurf_SequenceOfPathPoint& Pnts1, const IntSurf_SequenceOfInteriorPoint& Pnts2, IntPatch_TheSurfFunction& Func, const Handle(Adaptor3d_Surface)& S, const Standard_Boolean Reversed = Standard_False); //! Searches a set of polylines starting on a point of Pnts1. //! Each point on a resulting polyline verifies F(u,v)=0 - Standard_EXPORT void Perform (const IntSurf_SequenceOfPathPoint& Pnts1, IntPatch_TheSurfFunction& Func, const Handle(Adaptor3d_HSurface)& S, const Standard_Boolean Reversed = Standard_False); + Standard_EXPORT void Perform (const IntSurf_SequenceOfPathPoint& Pnts1, IntPatch_TheSurfFunction& Func, const Handle(Adaptor3d_Surface)& S, const Standard_Boolean Reversed = Standard_False); //! Returns true if the calculus was successful. Standard_Boolean IsDone() const; @@ -204,8 +197,8 @@ private: #define ThePointOfLoopTool_hxx #define ThePOLIterator IntSurf_SequenceOfInteriorPoint #define ThePOLIterator_hxx -#define ThePSurface Handle(Adaptor3d_HSurface) -#define ThePSurface_hxx +#define ThePSurface Handle(Adaptor3d_Surface) +#define ThePSurface_hxx #define ThePSurfaceTool Adaptor3d_HSurfaceTool #define ThePSurfaceTool_hxx #define TheIWFunction IntPatch_TheSurfFunction diff --git a/src/IntPatch/IntPatch_TheIWalking_0.cxx b/src/IntPatch/IntPatch_TheIWalking_0.cxx index 37a04a065b..7605adabd9 100644 --- a/src/IntPatch/IntPatch_TheIWalking_0.cxx +++ b/src/IntPatch/IntPatch_TheIWalking_0.cxx @@ -22,7 +22,7 @@ #include #include #include -#include +#include #include #include #include @@ -41,8 +41,8 @@ #define ThePointOfLoopTool_hxx #define ThePOLIterator IntSurf_SequenceOfInteriorPoint #define ThePOLIterator_hxx -#define ThePSurface Handle(Adaptor3d_HSurface) -#define ThePSurface_hxx +#define ThePSurface Handle(Adaptor3d_Surface) +#define ThePSurface_hxx #define ThePSurfaceTool Adaptor3d_HSurfaceTool #define ThePSurfaceTool_hxx #define TheIWFunction IntPatch_TheSurfFunction diff --git a/src/IntPatch/IntPatch_ThePathPointOfTheSOnBounds.hxx b/src/IntPatch/IntPatch_ThePathPointOfTheSOnBounds.hxx index cd752eedf1..d1b11dcf25 100644 --- a/src/IntPatch/IntPatch_ThePathPointOfTheSOnBounds.hxx +++ b/src/IntPatch/IntPatch_ThePathPointOfTheSOnBounds.hxx @@ -17,20 +17,13 @@ #ifndef _IntPatch_ThePathPointOfTheSOnBounds_HeaderFile #define _IntPatch_ThePathPointOfTheSOnBounds_HeaderFile -#include -#include -#include - +#include #include -#include -#include + class Adaptor3d_HVertex; -class Adaptor2d_HCurve2d; class Standard_DomainError; class gp_Pnt; - - class IntPatch_ThePathPointOfTheSOnBounds { public: @@ -40,13 +33,13 @@ public: Standard_EXPORT IntPatch_ThePathPointOfTheSOnBounds(); - Standard_EXPORT IntPatch_ThePathPointOfTheSOnBounds(const gp_Pnt& P, const Standard_Real Tol, const Handle(Adaptor3d_HVertex)& V, const Handle(Adaptor2d_HCurve2d)& A, const Standard_Real Parameter); + Standard_EXPORT IntPatch_ThePathPointOfTheSOnBounds(const gp_Pnt& P, const Standard_Real Tol, const Handle(Adaptor3d_HVertex)& V, const Handle(Adaptor2d_Curve2d)& A, const Standard_Real Parameter); - Standard_EXPORT IntPatch_ThePathPointOfTheSOnBounds(const gp_Pnt& P, const Standard_Real Tol, const Handle(Adaptor2d_HCurve2d)& A, const Standard_Real Parameter); + Standard_EXPORT IntPatch_ThePathPointOfTheSOnBounds(const gp_Pnt& P, const Standard_Real Tol, const Handle(Adaptor2d_Curve2d)& A, const Standard_Real Parameter); - void SetValue (const gp_Pnt& P, const Standard_Real Tol, const Handle(Adaptor3d_HVertex)& V, const Handle(Adaptor2d_HCurve2d)& A, const Standard_Real Parameter); + void SetValue (const gp_Pnt& P, const Standard_Real Tol, const Handle(Adaptor3d_HVertex)& V, const Handle(Adaptor2d_Curve2d)& A, const Standard_Real Parameter); - void SetValue (const gp_Pnt& P, const Standard_Real Tol, const Handle(Adaptor2d_HCurve2d)& A, const Standard_Real Parameter); + void SetValue (const gp_Pnt& P, const Standard_Real Tol, const Handle(Adaptor2d_Curve2d)& A, const Standard_Real Parameter); const gp_Pnt& Value() const; @@ -56,7 +49,7 @@ public: const Handle(Adaptor3d_HVertex)& Vertex() const; - const Handle(Adaptor2d_HCurve2d)& Arc() const; + const Handle(Adaptor2d_Curve2d)& Arc() const; Standard_Real Parameter() const; @@ -77,7 +70,7 @@ private: Standard_Real tol; Standard_Boolean isnew; Handle(Adaptor3d_HVertex) vtx; - Handle(Adaptor2d_HCurve2d) arc; + Handle(Adaptor2d_Curve2d) arc; Standard_Real param; @@ -85,8 +78,8 @@ private: #define TheVertex Handle(Adaptor3d_HVertex) #define TheVertex_hxx -#define TheArc Handle(Adaptor2d_HCurve2d) -#define TheArc_hxx +#define TheArc Handle(Adaptor2d_Curve2d) +#define TheArc_hxx #define IntStart_PathPoint IntPatch_ThePathPointOfTheSOnBounds #define IntStart_PathPoint_hxx diff --git a/src/IntPatch/IntPatch_ThePathPointOfTheSOnBounds_0.cxx b/src/IntPatch/IntPatch_ThePathPointOfTheSOnBounds_0.cxx index 0da75f33d8..a5a9d40021 100644 --- a/src/IntPatch/IntPatch_ThePathPointOfTheSOnBounds_0.cxx +++ b/src/IntPatch/IntPatch_ThePathPointOfTheSOnBounds_0.cxx @@ -17,15 +17,15 @@ #include #include -#include +#include #include #include #define TheVertex Handle(Adaptor3d_HVertex) #define TheVertex_hxx -#define TheArc Handle(Adaptor2d_HCurve2d) -#define TheArc_hxx +#define TheArc Handle(Adaptor2d_Curve2d) +#define TheArc_hxx #define IntStart_PathPoint IntPatch_ThePathPointOfTheSOnBounds #define IntStart_PathPoint_hxx #include diff --git a/src/IntPatch/IntPatch_TheSOnBounds.hxx b/src/IntPatch/IntPatch_TheSOnBounds.hxx index 95a58c0595..0aec13e2dd 100644 --- a/src/IntPatch/IntPatch_TheSOnBounds.hxx +++ b/src/IntPatch/IntPatch_TheSOnBounds.hxx @@ -30,7 +30,6 @@ class StdFail_NotDone; class Standard_OutOfRange; class Standard_ConstructionError; class Adaptor3d_HVertex; -class Adaptor2d_HCurve2d; class IntPatch_HCurve2dTool; class IntPatch_HInterTool; class Adaptor3d_TopolTool; @@ -108,8 +107,8 @@ private: #define TheVertex Handle(Adaptor3d_HVertex) #define TheVertex_hxx -#define TheArc Handle(Adaptor2d_HCurve2d) -#define TheArc_hxx +#define TheArc Handle(Adaptor2d_Curve2d) +#define TheArc_hxx #define TheArcTool IntPatch_HCurve2dTool #define TheArcTool_hxx #define TheSOBTool IntPatch_HInterTool diff --git a/src/IntPatch/IntPatch_TheSOnBounds_0.cxx b/src/IntPatch/IntPatch_TheSOnBounds_0.cxx index 53f01649a4..8a08aa4b26 100644 --- a/src/IntPatch/IntPatch_TheSOnBounds_0.cxx +++ b/src/IntPatch/IntPatch_TheSOnBounds_0.cxx @@ -20,7 +20,7 @@ #include #include #include -#include +#include #include #include #include @@ -32,8 +32,8 @@ #define TheVertex Handle(Adaptor3d_HVertex) #define TheVertex_hxx -#define TheArc Handle(Adaptor2d_HCurve2d) -#define TheArc_hxx +#define TheArc Handle(Adaptor2d_Curve2d) +#define TheArc_hxx #define TheArcTool IntPatch_HCurve2dTool #define TheArcTool_hxx #define TheSOBTool IntPatch_HInterTool diff --git a/src/IntPatch/IntPatch_TheSearchInside.hxx b/src/IntPatch/IntPatch_TheSearchInside.hxx index 1e69fd3fa4..1e9350151c 100644 --- a/src/IntPatch/IntPatch_TheSearchInside.hxx +++ b/src/IntPatch/IntPatch_TheSearchInside.hxx @@ -17,24 +17,13 @@ #ifndef _IntPatch_TheSearchInside_HeaderFile #define _IntPatch_TheSearchInside_HeaderFile -#include -#include -#include - -#include +#include #include -#include -#include -class StdFail_NotDone; -class Standard_OutOfRange; -class Adaptor3d_HSurface; + class Adaptor3d_HSurfaceTool; class Adaptor3d_TopolTool; class IntPatch_HInterTool; class IntPatch_TheSurfFunction; -class IntSurf_InteriorPoint; - - class IntPatch_TheSearchInside { @@ -45,11 +34,11 @@ public: Standard_EXPORT IntPatch_TheSearchInside(); - Standard_EXPORT IntPatch_TheSearchInside(IntPatch_TheSurfFunction& F, const Handle(Adaptor3d_HSurface)& Surf, const Handle(Adaptor3d_TopolTool)& T, const Standard_Real Epsilon); + Standard_EXPORT IntPatch_TheSearchInside(IntPatch_TheSurfFunction& F, const Handle(Adaptor3d_Surface)& Surf, const Handle(Adaptor3d_TopolTool)& T, const Standard_Real Epsilon); - Standard_EXPORT void Perform (IntPatch_TheSurfFunction& F, const Handle(Adaptor3d_HSurface)& Surf, const Handle(Adaptor3d_TopolTool)& T, const Standard_Real Epsilon); + Standard_EXPORT void Perform (IntPatch_TheSurfFunction& F, const Handle(Adaptor3d_Surface)& Surf, const Handle(Adaptor3d_TopolTool)& T, const Standard_Real Epsilon); - Standard_EXPORT void Perform (IntPatch_TheSurfFunction& F, const Handle(Adaptor3d_HSurface)& Surf, const Standard_Real UStart, const Standard_Real VStart); + Standard_EXPORT void Perform (IntPatch_TheSurfFunction& F, const Handle(Adaptor3d_Surface)& Surf, const Standard_Real UStart, const Standard_Real VStart); Standard_Boolean IsDone() const; @@ -84,8 +73,8 @@ private: }; -#define ThePSurface Handle(Adaptor3d_HSurface) -#define ThePSurface_hxx +#define ThePSurface Handle(Adaptor3d_Surface) +#define ThePSurface_hxx #define ThePSurfaceTool Adaptor3d_HSurfaceTool #define ThePSurfaceTool_hxx #define Handle_TheTopolTool Handle(Adaptor3d_TopolTool) diff --git a/src/IntPatch/IntPatch_TheSearchInside_0.cxx b/src/IntPatch/IntPatch_TheSearchInside_0.cxx index d8dfea47c9..8bdac08f44 100644 --- a/src/IntPatch/IntPatch_TheSearchInside_0.cxx +++ b/src/IntPatch/IntPatch_TheSearchInside_0.cxx @@ -18,7 +18,7 @@ #include #include -#include +#include #include #include #include @@ -26,8 +26,8 @@ #include -#define ThePSurface Handle(Adaptor3d_HSurface) -#define ThePSurface_hxx +#define ThePSurface Handle(Adaptor3d_Surface) +#define ThePSurface_hxx #define ThePSurfaceTool Adaptor3d_HSurfaceTool #define ThePSurfaceTool_hxx #define Handle_TheTopolTool Handle(Adaptor3d_TopolTool) diff --git a/src/IntPatch/IntPatch_TheSegmentOfTheSOnBounds.hxx b/src/IntPatch/IntPatch_TheSegmentOfTheSOnBounds.hxx index 3ebd144e0f..9d200b6cb1 100644 --- a/src/IntPatch/IntPatch_TheSegmentOfTheSOnBounds.hxx +++ b/src/IntPatch/IntPatch_TheSegmentOfTheSOnBounds.hxx @@ -23,7 +23,7 @@ #include #include -class Adaptor2d_HCurve2d; + class Standard_DomainError; class Adaptor3d_HVertex; class IntPatch_ThePathPointOfTheSOnBounds; @@ -41,7 +41,7 @@ public: Standard_EXPORT IntPatch_TheSegmentOfTheSOnBounds(); //! Defines the concerned arc. - void SetValue (const Handle(Adaptor2d_HCurve2d)& A); + void SetValue (const Handle(Adaptor2d_Curve2d)& A); //! Defines the first point or the last point, //! depending on the value of the boolean First. @@ -49,7 +49,7 @@ public: //! Returns the geometric curve on the surface 's domain //! which is solution. - const Handle(Adaptor2d_HCurve2d)& Curve() const; + const Handle(Adaptor2d_Curve2d)& Curve() const; //! Returns True if there is a vertex (ThePathPoint) defining //! the lowest valid parameter on the arc. @@ -78,7 +78,7 @@ private: - Handle(Adaptor2d_HCurve2d) arc; + Handle(Adaptor2d_Curve2d) arc; Standard_Boolean hasfp; IntPatch_ThePathPointOfTheSOnBounds thefp; Standard_Boolean haslp; @@ -89,8 +89,8 @@ private: #define TheVertex Handle(Adaptor3d_HVertex) #define TheVertex_hxx -#define TheArc Handle(Adaptor2d_HCurve2d) -#define TheArc_hxx +#define TheArc Handle(Adaptor2d_Curve2d) +#define TheArc_hxx #define ThePathPoint IntPatch_ThePathPointOfTheSOnBounds #define ThePathPoint_hxx #define IntStart_Segment IntPatch_TheSegmentOfTheSOnBounds diff --git a/src/IntPatch/IntPatch_TheSegmentOfTheSOnBounds_0.cxx b/src/IntPatch/IntPatch_TheSegmentOfTheSOnBounds_0.cxx index 6a30bffe36..8a7c89d070 100644 --- a/src/IntPatch/IntPatch_TheSegmentOfTheSOnBounds_0.cxx +++ b/src/IntPatch/IntPatch_TheSegmentOfTheSOnBounds_0.cxx @@ -16,7 +16,7 @@ #include -#include +#include #include #include #include @@ -24,8 +24,8 @@ #define TheVertex Handle(Adaptor3d_HVertex) #define TheVertex_hxx -#define TheArc Handle(Adaptor2d_HCurve2d) -#define TheArc_hxx +#define TheArc Handle(Adaptor2d_Curve2d) +#define TheArc_hxx #define ThePathPoint IntPatch_ThePathPointOfTheSOnBounds #define ThePathPoint_hxx #define IntStart_Segment IntPatch_TheSegmentOfTheSOnBounds diff --git a/src/IntPatch/IntPatch_TheSurfFunction.hxx b/src/IntPatch/IntPatch_TheSurfFunction.hxx index 49f1403084..b76bee24af 100644 --- a/src/IntPatch/IntPatch_TheSurfFunction.hxx +++ b/src/IntPatch/IntPatch_TheSurfFunction.hxx @@ -17,30 +17,17 @@ #ifndef _IntPatch_TheSurfFunction_HeaderFile #define _IntPatch_TheSurfFunction_HeaderFile -#include -#include -#include - -#include -#include +#include #include -#include #include #include #include -#include #include -class StdFail_UndefinedDerivative; -class Adaptor3d_HSurface; + class Adaptor3d_HSurfaceTool; class IntSurf_Quadric; class IntSurf_QuadricTool; class math_Matrix; -class gp_Pnt; -class gp_Vec; -class gp_Dir2d; - - class IntPatch_TheSurfFunction : public math_FunctionSetWithDerivatives { @@ -51,11 +38,11 @@ public: Standard_EXPORT IntPatch_TheSurfFunction(); - Standard_EXPORT IntPatch_TheSurfFunction(const Handle(Adaptor3d_HSurface)& PS, const IntSurf_Quadric& IS); + Standard_EXPORT IntPatch_TheSurfFunction(const Handle(Adaptor3d_Surface)& PS, const IntSurf_Quadric& IS); Standard_EXPORT IntPatch_TheSurfFunction(const IntSurf_Quadric& IS); - void Set (const Handle(Adaptor3d_HSurface)& PS); + void Set (const Handle(Adaptor3d_Surface)& PS); void SetImplicitSurface (const IntSurf_Quadric& IS); @@ -85,7 +72,7 @@ public: const gp_Dir2d& Direction2d(); - const Handle(Adaptor3d_HSurface)& PSurface() const; + const Handle(Adaptor3d_Surface)& PSurface() const; const IntSurf_Quadric& ISurface() const; @@ -123,8 +110,8 @@ private: }; -#define ThePSurface Handle(Adaptor3d_HSurface) -#define ThePSurface_hxx +#define ThePSurface Handle(Adaptor3d_Surface) +#define ThePSurface_hxx #define ThePSurfaceTool Adaptor3d_HSurfaceTool #define ThePSurfaceTool_hxx #define TheISurface IntSurf_Quadric diff --git a/src/IntPatch/IntPatch_TheSurfFunction_0.cxx b/src/IntPatch/IntPatch_TheSurfFunction_0.cxx index f522295da5..06160584f6 100644 --- a/src/IntPatch/IntPatch_TheSurfFunction_0.cxx +++ b/src/IntPatch/IntPatch_TheSurfFunction_0.cxx @@ -17,7 +17,7 @@ #include #include -#include +#include #include #include #include @@ -27,8 +27,8 @@ #include -#define ThePSurface Handle(Adaptor3d_HSurface) -#define ThePSurface_hxx +#define ThePSurface Handle(Adaptor3d_Surface) +#define ThePSurface_hxx #define ThePSurfaceTool Adaptor3d_HSurfaceTool #define ThePSurfaceTool_hxx #define TheISurface IntSurf_Quadric diff --git a/src/IntPatch/IntPatch_WLine.cxx b/src/IntPatch/IntPatch_WLine.cxx index a6b52c4ed5..e2d1b72edf 100644 --- a/src/IntPatch/IntPatch_WLine.cxx +++ b/src/IntPatch/IntPatch_WLine.cxx @@ -15,7 +15,7 @@ // commercial license or contractual agreement. -#include +#include #include #include #include @@ -945,12 +945,12 @@ Standard_Boolean IntPatch_WLine::HasArcOnS1() const { return(hasArcOnS1); } -void IntPatch_WLine::SetArcOnS1(const Handle(Adaptor2d_HCurve2d)& A) { +void IntPatch_WLine::SetArcOnS1(const Handle(Adaptor2d_Curve2d)& A) { hasArcOnS1=Standard_True; theArcOnS1=A; } -const Handle(Adaptor2d_HCurve2d)& IntPatch_WLine::GetArcOnS1() const { +const Handle(Adaptor2d_Curve2d)& IntPatch_WLine::GetArcOnS1() const { return(theArcOnS1); } @@ -958,12 +958,12 @@ Standard_Boolean IntPatch_WLine::HasArcOnS2() const { return(hasArcOnS2); } -void IntPatch_WLine::SetArcOnS2(const Handle(Adaptor2d_HCurve2d)& A) { +void IntPatch_WLine::SetArcOnS2(const Handle(Adaptor2d_Curve2d)& A) { hasArcOnS2=Standard_True; theArcOnS2=A; } -const Handle(Adaptor2d_HCurve2d)& IntPatch_WLine::GetArcOnS2() const { +const Handle(Adaptor2d_Curve2d)& IntPatch_WLine::GetArcOnS2() const { return(theArcOnS2); } diff --git a/src/IntPatch/IntPatch_WLine.hxx b/src/IntPatch/IntPatch_WLine.hxx index 78095bb93f..4f26b91ecf 100644 --- a/src/IntPatch/IntPatch_WLine.hxx +++ b/src/IntPatch/IntPatch_WLine.hxx @@ -28,7 +28,7 @@ #include #include #include -class Adaptor2d_HCurve2d; + class Standard_OutOfRange; class Standard_DomainError; class IntPatch_Point; @@ -165,17 +165,17 @@ public: Standard_EXPORT Standard_Real V2Period() const; - Standard_EXPORT void SetArcOnS1 (const Handle(Adaptor2d_HCurve2d)& A); + Standard_EXPORT void SetArcOnS1 (const Handle(Adaptor2d_Curve2d)& A); Standard_EXPORT Standard_Boolean HasArcOnS1() const; - Standard_EXPORT const Handle(Adaptor2d_HCurve2d)& GetArcOnS1() const; + Standard_EXPORT const Handle(Adaptor2d_Curve2d)& GetArcOnS1() const; - Standard_EXPORT void SetArcOnS2 (const Handle(Adaptor2d_HCurve2d)& A); + Standard_EXPORT void SetArcOnS2 (const Handle(Adaptor2d_Curve2d)& A); Standard_EXPORT Standard_Boolean HasArcOnS2() const; - Standard_EXPORT const Handle(Adaptor2d_HCurve2d)& GetArcOnS2() const; + Standard_EXPORT const Handle(Adaptor2d_Curve2d)& GetArcOnS2() const; //! Removes vertices from the line (i.e. cleans svtx member) virtual void ClearVertexes() Standard_OVERRIDE; @@ -237,9 +237,9 @@ private: Standard_Real u2period; Standard_Real v2period; Standard_Boolean hasArcOnS1; - Handle(Adaptor2d_HCurve2d) theArcOnS1; + Handle(Adaptor2d_Curve2d) theArcOnS1; Standard_Boolean hasArcOnS2; - Handle(Adaptor2d_HCurve2d) theArcOnS2; + Handle(Adaptor2d_Curve2d) theArcOnS2; Standard_Boolean myIsPurgerAllowed; //! identifies the way of <*this> creation diff --git a/src/IntPatch/IntPatch_WLineTool.cxx b/src/IntPatch/IntPatch_WLineTool.cxx index ed9c8549c2..b3f90229ba 100644 --- a/src/IntPatch/IntPatch_WLineTool.cxx +++ b/src/IntPatch/IntPatch_WLineTool.cxx @@ -13,7 +13,7 @@ #include -#include +#include #include #include #include @@ -191,7 +191,7 @@ static Handle(IntPatch_WLine) MakeNewWLine(const Handle(IntPatch_WLine) // because walking algorithm should care for closeness to the param space. // Static subfunction in ComputePurgedWLine. //========================================================================= -static void MovePoint(const Handle(Adaptor3d_HSurface) &theS1, +static void MovePoint(const Handle(Adaptor3d_Surface) &theS1, Standard_Real &U1, Standard_Real &V1) { if (U1 < theS1->FirstUParameter()) @@ -214,8 +214,8 @@ static void MovePoint(const Handle(Adaptor3d_HSurface) &theS1, //========================================================================= static Handle(IntPatch_WLine) DeleteOuterPoints(const Handle(IntPatch_WLine) &theWLine, - const Handle(Adaptor3d_HSurface) &theS1, - const Handle(Adaptor3d_HSurface) &theS2, + const Handle(Adaptor3d_Surface) &theS1, + const Handle(Adaptor3d_Surface) &theS2, const Handle(Adaptor3d_TopolTool) &theDom1, const Handle(Adaptor3d_TopolTool) &theDom2) { @@ -392,8 +392,8 @@ static const Standard_Integer aNbSingleBezier = 30; //========================================================================= static Handle(IntPatch_WLine) DeleteByTube(const Handle(IntPatch_WLine) &theWLine, - const Handle(Adaptor3d_HSurface) &theS1, - const Handle(Adaptor3d_HSurface) &theS2) + const Handle(Adaptor3d_Surface) &theS1, + const Handle(Adaptor3d_Surface) &theS2) { // III: Check points for tube criteria: // Workaround to handle case of small amount points after purge. @@ -656,8 +656,8 @@ static Standard_Boolean IsSeamOrBound(const IntSurf_PntOn2S& thePtf, // will be recomputed and returned. //======================================================================= static Standard_Boolean IsIntersectionPoint(const gp_Pnt& thePmid, - const Handle(Adaptor3d_HSurface)& theS1, - const Handle(Adaptor3d_HSurface)& theS2, + const Handle(Adaptor3d_Surface)& theS1, + const Handle(Adaptor3d_Surface)& theS2, const IntSurf_PntOn2S& theRefPt, const Standard_Real theTol, const Standard_Real* const theArrPeriods, @@ -837,8 +837,8 @@ static Standard_Boolean IsOutOfDomain(const Bnd_Box2d& theBoxS1, // (see IntPatch_WLineTool::ExtendTwoWLines) //======================================================================= static IntPatchWT_WLsConnectionType - CheckArgumentsToExtend(const Handle(Adaptor3d_HSurface)& theS1, - const Handle(Adaptor3d_HSurface)& theS2, + CheckArgumentsToExtend(const Handle(Adaptor3d_Surface)& theS1, + const Handle(Adaptor3d_Surface)& theS2, const IntSurf_PntOn2S& thePtWL1, const IntSurf_PntOn2S& thePtWL2, IntSurf_PntOn2S& theNewPoint, @@ -994,8 +994,8 @@ static IntPatchWT_WLsConnectionType //purpose : Check if joining is possible // (see IntPatch_WLineTool::JoinWLines(...)) //======================================================================= -Standard_Boolean CheckArgumentsToJoin(const Handle(Adaptor3d_HSurface)& theS1, - const Handle(Adaptor3d_HSurface)& theS2, +Standard_Boolean CheckArgumentsToJoin(const Handle(Adaptor3d_Surface)& theS1, + const Handle(Adaptor3d_Surface)& theS2, const IntSurf_PntOn2S& thePnt, const gp_Pnt& theP1, const gp_Pnt& theP2, @@ -1045,8 +1045,8 @@ Standard_Boolean CheckArgumentsToJoin(const Handle(Adaptor3d_HSurface)& theS1, //purpose : Performs extending theWLine1 and theWLine2 through their // respecting start point. //======================================================================= -static void ExtendTwoWLFirstFirst(const Handle(Adaptor3d_HSurface)& theS1, - const Handle(Adaptor3d_HSurface)& theS2, +static void ExtendTwoWLFirstFirst(const Handle(Adaptor3d_Surface)& theS1, + const Handle(Adaptor3d_Surface)& theS2, const Handle(IntPatch_WLine)& theWLine1, const Handle(IntPatch_WLine)& theWLine2, const IntSurf_PntOn2S& thePtWL1, @@ -1119,8 +1119,8 @@ static void ExtendTwoWLFirstFirst(const Handle(Adaptor3d_HSurface)& theS1, //purpose : Performs extending theWLine1 through its start point and theWLine2 // through its end point. //======================================================================= -static void ExtendTwoWLFirstLast(const Handle(Adaptor3d_HSurface)& theS1, - const Handle(Adaptor3d_HSurface)& theS2, +static void ExtendTwoWLFirstLast(const Handle(Adaptor3d_Surface)& theS1, + const Handle(Adaptor3d_Surface)& theS2, const Handle(IntPatch_WLine)& theWLine1, const Handle(IntPatch_WLine)& theWLine2, const IntSurf_PntOn2S& thePtWL1, @@ -1191,8 +1191,8 @@ static void ExtendTwoWLFirstLast(const Handle(Adaptor3d_HSurface)& theS1, //purpose : Performs extending theWLine1 through its end point and theWLine2 // through its start point. //======================================================================= -static void ExtendTwoWLLastFirst(const Handle(Adaptor3d_HSurface)& theS1, - const Handle(Adaptor3d_HSurface)& theS2, +static void ExtendTwoWLLastFirst(const Handle(Adaptor3d_Surface)& theS1, + const Handle(Adaptor3d_Surface)& theS2, const Handle(IntPatch_WLine)& theWLine1, const Handle(IntPatch_WLine)& theWLine2, const IntSurf_PntOn2S& thePtWL1, @@ -1259,8 +1259,8 @@ static void ExtendTwoWLLastFirst(const Handle(Adaptor3d_HSurface)& theS1, //function : ExtendTwoWLLastLast //purpose : //======================================================================= -static void ExtendTwoWLLastLast(const Handle(Adaptor3d_HSurface)& theS1, - const Handle(Adaptor3d_HSurface)& theS2, +static void ExtendTwoWLLastLast(const Handle(Adaptor3d_Surface)& theS1, + const Handle(Adaptor3d_Surface)& theS2, const Handle(IntPatch_WLine)& theWLine1, const Handle(IntPatch_WLine)& theWLine2, const IntSurf_PntOn2S& thePtWL1, @@ -1327,8 +1327,8 @@ static void ExtendTwoWLLastLast(const Handle(Adaptor3d_HSurface)& theS1, //========================================================================= Handle(IntPatch_WLine) IntPatch_WLineTool:: ComputePurgedWLine(const Handle(IntPatch_WLine) &theWLine, - const Handle(Adaptor3d_HSurface) &theS1, - const Handle(Adaptor3d_HSurface) &theS2, + const Handle(Adaptor3d_Surface) &theS1, + const Handle(Adaptor3d_Surface) &theS2, const Handle(Adaptor3d_TopolTool) &theDom1, const Handle(Adaptor3d_TopolTool) &theDom2) { @@ -1455,8 +1455,8 @@ Handle(IntPatch_WLine) IntPatch_WLineTool:: //======================================================================= void IntPatch_WLineTool::JoinWLines(IntPatch_SequenceOfLine& theSlin, IntPatch_SequenceOfPoint& theSPnt, - Handle(Adaptor3d_HSurface) theS1, - Handle(Adaptor3d_HSurface) theS2, + Handle(Adaptor3d_Surface) theS1, + Handle(Adaptor3d_Surface) theS2, const Standard_Real theTol3D) { if(theSlin.Length() == 0) @@ -1683,8 +1683,8 @@ void IntPatch_WLineTool::JoinWLines(IntPatch_SequenceOfLine& theSlin, //======================================================================= void IntPatch_WLineTool:: ExtendTwoWLines(IntPatch_SequenceOfLine& theSlin, - const Handle(Adaptor3d_HSurface)& theS1, - const Handle(Adaptor3d_HSurface)& theS2, + const Handle(Adaptor3d_Surface)& theS1, + const Handle(Adaptor3d_Surface)& theS2, const Standard_Real theToler3D, const Standard_Real* const theArrPeriods, const Bnd_Box2d& theBoxS1, diff --git a/src/IntPatch/IntPatch_WLineTool.hxx b/src/IntPatch/IntPatch_WLineTool.hxx index c45bcf66ac..fc29394b4d 100644 --- a/src/IntPatch/IntPatch_WLineTool.hxx +++ b/src/IntPatch/IntPatch_WLineTool.hxx @@ -45,8 +45,8 @@ public: //! of the points is less than 2. Standard_EXPORT static Handle(IntPatch_WLine) ComputePurgedWLine(const Handle(IntPatch_WLine) &theWLine, - const Handle(Adaptor3d_HSurface) &theS1, - const Handle(Adaptor3d_HSurface) &theS2, + const Handle(Adaptor3d_Surface) &theS1, + const Handle(Adaptor3d_Surface) &theS2, const Handle(Adaptor3d_TopolTool) &theDom1, const Handle(Adaptor3d_TopolTool) &theDom2); @@ -59,8 +59,8 @@ public: //! this point will be deleted. Standard_EXPORT static void JoinWLines(IntPatch_SequenceOfLine& theSlin, IntPatch_SequenceOfPoint& theSPnt, - Handle(Adaptor3d_HSurface) theS1, - Handle(Adaptor3d_HSurface) theS2, + Handle(Adaptor3d_Surface) theS1, + Handle(Adaptor3d_Surface) theS2, const Standard_Real theTol3D); //! Extends every line from theSlin (if it is possible) to be started/finished @@ -76,8 +76,8 @@ public: //! theListOfCriticalPoints must contain 3D-points where joining is disabled. Standard_EXPORT static void ExtendTwoWLines(IntPatch_SequenceOfLine& theSlin, - const Handle(Adaptor3d_HSurface)& theS1, - const Handle(Adaptor3d_HSurface)& theS2, + const Handle(Adaptor3d_Surface)& theS1, + const Handle(Adaptor3d_Surface)& theS2, const Standard_Real theToler3D, const Standard_Real* const theArrPeriods, const Bnd_Box2d& theBoxS1, diff --git a/src/IntPolyh/IntPolyh_Intersection.cxx b/src/IntPolyh/IntPolyh_Intersection.cxx index 9662e0ab15..74ab7292c7 100644 --- a/src/IntPolyh/IntPolyh_Intersection.cxx +++ b/src/IntPolyh/IntPolyh_Intersection.cxx @@ -17,7 +17,7 @@ #include -#include +#include #include #include @@ -39,8 +39,8 @@ static Standard_Boolean AnalyzeIntersection(IntPolyh_PMaillageAffinage& theMaill //function : IntPolyh_Intersection //purpose : //======================================================================= -IntPolyh_Intersection::IntPolyh_Intersection(const Handle(Adaptor3d_HSurface)& theS1, - const Handle(Adaptor3d_HSurface)& theS2) +IntPolyh_Intersection::IntPolyh_Intersection(const Handle(Adaptor3d_Surface)& theS1, + const Handle(Adaptor3d_Surface)& theS2) { mySurf1 = theS1; mySurf2 = theS2; @@ -58,10 +58,10 @@ IntPolyh_Intersection::IntPolyh_Intersection(const Handle(Adaptor3d_HSurface)& t //function : IntPolyh_Intersection //purpose : //======================================================================= -IntPolyh_Intersection::IntPolyh_Intersection(const Handle(Adaptor3d_HSurface)& theS1, +IntPolyh_Intersection::IntPolyh_Intersection(const Handle(Adaptor3d_Surface)& theS1, const Standard_Integer theNbSU1, const Standard_Integer theNbSV1, - const Handle(Adaptor3d_HSurface)& theS2, + const Handle(Adaptor3d_Surface)& theS2, const Standard_Integer theNbSU2, const Standard_Integer theNbSV2) { @@ -81,10 +81,10 @@ IntPolyh_Intersection::IntPolyh_Intersection(const Handle(Adaptor3d_HSurface)& t //function : IntPolyh_Intersection //purpose : //======================================================================= -IntPolyh_Intersection::IntPolyh_Intersection(const Handle(Adaptor3d_HSurface)& theS1, +IntPolyh_Intersection::IntPolyh_Intersection(const Handle(Adaptor3d_Surface)& theS1, const TColStd_Array1OfReal& theUPars1, const TColStd_Array1OfReal& theVPars1, - const Handle(Adaptor3d_HSurface)& theS2, + const Handle(Adaptor3d_Surface)& theS2, const TColStd_Array1OfReal& theUPars2, const TColStd_Array1OfReal& theVPars2) { diff --git a/src/IntPolyh/IntPolyh_Intersection.hxx b/src/IntPolyh/IntPolyh_Intersection.hxx index 6c1197e9fa..776f39e1cb 100644 --- a/src/IntPolyh/IntPolyh_Intersection.hxx +++ b/src/IntPolyh/IntPolyh_Intersection.hxx @@ -17,19 +17,13 @@ #ifndef _IntPolyh_Intersection_HeaderFile #define _IntPolyh_Intersection_HeaderFile -#include -#include -#include - +#include #include #include #include #include #include #include -#include -#include -class Adaptor3d_HSurface; //! API algorithm for intersection of two surfaces by intersection //! of their triangulations. @@ -56,27 +50,27 @@ public: //! @name Constructors //! Constructor for intersection of two surfaces with default parameters. //! Performs intersection. - Standard_EXPORT IntPolyh_Intersection(const Handle(Adaptor3d_HSurface)& theS1, - const Handle(Adaptor3d_HSurface)& theS2); + Standard_EXPORT IntPolyh_Intersection(const Handle(Adaptor3d_Surface)& theS1, + const Handle(Adaptor3d_Surface)& theS2); //! Constructor for intersection of two surfaces with the given //! size of the sampling nets: //! - x - for the first surface ; //! - x - for the second surface . //! Performs intersection. - Standard_EXPORT IntPolyh_Intersection(const Handle(Adaptor3d_HSurface)& theS1, + Standard_EXPORT IntPolyh_Intersection(const Handle(Adaptor3d_Surface)& theS1, const Standard_Integer theNbSU1, const Standard_Integer theNbSV1, - const Handle(Adaptor3d_HSurface)& theS2, + const Handle(Adaptor3d_Surface)& theS2, const Standard_Integer theNbSU2, const Standard_Integer theNbSV2); //! Constructor for intersection of two surfaces with the precomputed sampling. //! Performs intersection. - Standard_EXPORT IntPolyh_Intersection(const Handle(Adaptor3d_HSurface)& theS1, + Standard_EXPORT IntPolyh_Intersection(const Handle(Adaptor3d_Surface)& theS1, const TColStd_Array1OfReal& theUPars1, const TColStd_Array1OfReal& theVPars1, - const Handle(Adaptor3d_HSurface)& theS2, + const Handle(Adaptor3d_Surface)& theS2, const TColStd_Array1OfReal& theUPars2, const TColStd_Array1OfReal& theVPars2); @@ -196,8 +190,8 @@ private: //! @name Performing the intersection private: //! @name Fields // Inputs - Handle(Adaptor3d_HSurface) mySurf1; //!< First surface - Handle(Adaptor3d_HSurface) mySurf2; //!< Second surface + Handle(Adaptor3d_Surface) mySurf1; //!< First surface + Handle(Adaptor3d_Surface) mySurf2; //!< Second surface Standard_Integer myNbSU1; //!< Number of samples in U direction for first surface Standard_Integer myNbSV1; //!< Number of samples in V direction for first surface Standard_Integer myNbSU2; //!< Number of samples in U direction for second surface diff --git a/src/IntPolyh/IntPolyh_MaillageAffinage.cxx b/src/IntPolyh/IntPolyh_MaillageAffinage.cxx index bcc580f34a..74666da6a6 100644 --- a/src/IntPolyh/IntPolyh_MaillageAffinage.cxx +++ b/src/IntPolyh/IntPolyh_MaillageAffinage.cxx @@ -23,7 +23,7 @@ // Modified by skv - Thu Sep 25 17:42:42 2003 OCC567 // modified by ofv Thu Apr 8 14:58:13 2004 fip -#include +#include #include #include #include @@ -122,14 +122,14 @@ static const Standard_Boolean Prepend=Standard_False); static - Standard_Boolean IsDegenerated(const Handle(Adaptor3d_HSurface)& aS, + Standard_Boolean IsDegenerated(const Handle(Adaptor3d_Surface)& aS, const Standard_Integer aIndex, const Standard_Real aTol2, Standard_Real& aDegX); static void DegeneratedIndex(const TColStd_Array1OfReal& Xpars, const Standard_Integer aNbX, - const Handle(Adaptor3d_HSurface)& aS, + const Handle(Adaptor3d_Surface)& aS, const Standard_Integer aIsoDirection, Standard_Integer& aI1, Standard_Integer& aI2); @@ -281,8 +281,8 @@ static //purpose : //======================================================================= IntPolyh_MaillageAffinage::IntPolyh_MaillageAffinage - (const Handle(Adaptor3d_HSurface)& Surface1, - const Handle(Adaptor3d_HSurface)& Surface2, + (const Handle(Adaptor3d_Surface)& Surface1, + const Handle(Adaptor3d_Surface)& Surface2, const Standard_Integer ) : MaSurface1(Surface1), @@ -303,10 +303,10 @@ IntPolyh_MaillageAffinage::IntPolyh_MaillageAffinage //purpose : //======================================================================= IntPolyh_MaillageAffinage::IntPolyh_MaillageAffinage - (const Handle(Adaptor3d_HSurface)& Surface1, + (const Handle(Adaptor3d_Surface)& Surface1, const Standard_Integer NbSU1, const Standard_Integer NbSV1, - const Handle(Adaptor3d_HSurface)& Surface2, + const Handle(Adaptor3d_Surface)& Surface2, const Standard_Integer NbSU2, const Standard_Integer NbSV2, const Standard_Integer ) @@ -385,7 +385,7 @@ void IntPolyh_MaillageAffinage::FillArrayOfPnt aNbU=(SurfID==1)? NbSamplesU1 : NbSamplesU2; aNbV=(SurfID==1)? NbSamplesV1 : NbSamplesV2; Bnd_Box& aBox = (SurfID==1) ? MyBox1 : MyBox2; - Handle(Adaptor3d_HSurface)& aS=(SurfID==1)? MaSurface1:MaSurface2; + Handle(Adaptor3d_Surface)& aS=(SurfID==1)? MaSurface1:MaSurface2; IntPolyh_ArrayOfPoints &TPoints=(SurfID==1)? TPoints1:TPoints2; // aJD1=0; @@ -441,7 +441,7 @@ void IntPolyh_MaillageAffinage::FillArrayOfPnt(const Standard_Integer SurfID, const TColStd_Array1OfReal& theVPars, const Standard_Real theDeflTol) { - Handle(Adaptor3d_HSurface) aS = (SurfID == 1) ? MaSurface1 : MaSurface2; + Handle(Adaptor3d_Surface) aS = (SurfID == 1) ? MaSurface1 : MaSurface2; IntPolyh_ArrayOfPoints& TPoints = (SurfID == 1) ? TPoints1 : TPoints2; Standard_Integer aNbU = (SurfID == 1) ? NbSamplesU1 : NbSamplesU2; Standard_Integer aNbV = (SurfID == 1) ? NbSamplesV1 : NbSamplesV2; @@ -505,7 +505,7 @@ void IntPolyh_MaillageAffinage::FillArrayOfPnt const TColStd_Array1OfReal& Vpars, const Standard_Real *theDeflTol) { - Handle(Adaptor3d_HSurface) aS = (SurfID == 1) ? MaSurface1 : MaSurface2; + Handle(Adaptor3d_Surface) aS = (SurfID == 1) ? MaSurface1 : MaSurface2; // Compute the tolerance Standard_Real aTol = theDeflTol != NULL ? * theDeflTol : IntPolyh_Tools::ComputeDeflection(aS, Upars, Vpars); @@ -934,7 +934,7 @@ void IntPolyh_MaillageAffinage::LocalSurfaceRefinement(const Standard_Integer Su void IntPolyh_MaillageAffinage::ComputeDeflections (const Standard_Integer SurfID) { - Handle(Adaptor3d_HSurface) aSurface=(SurfID==1)? MaSurface1:MaSurface2; + Handle(Adaptor3d_Surface) aSurface=(SurfID==1)? MaSurface1:MaSurface2; IntPolyh_ArrayOfPoints &TPoints=(SurfID==1)? TPoints1:TPoints2; IntPolyh_ArrayOfTriangles &TTriangles=(SurfID==1)? TTriangles1:TTriangles2; Standard_Real &FlecheMin=(SurfID==1)? FlecheMin1:FlecheMin2; @@ -959,12 +959,12 @@ void IntPolyh_MaillageAffinage::ComputeDeflections //purpose : Refinement of the triangles depending on the deflection //======================================================================= static - void TrianglesDeflectionsRefinement(const Handle(Adaptor3d_HSurface)& theS1, + void TrianglesDeflectionsRefinement(const Handle(Adaptor3d_Surface)& theS1, IntPolyh_ArrayOfTriangles& theTriangles1, IntPolyh_ArrayOfEdges& theEdges1, IntPolyh_ArrayOfPoints& thePoints1, const Standard_Real theFlecheCritique1, - const Handle(Adaptor3d_HSurface)& theS2, + const Handle(Adaptor3d_Surface)& theS2, IntPolyh_ArrayOfTriangles& theTriangles2, IntPolyh_ArrayOfEdges& theEdges2, IntPolyh_ArrayOfPoints& thePoints2, @@ -1027,7 +1027,7 @@ static // much smaller then the other. //======================================================================= static - void LargeTrianglesDeflectionsRefinement(const Handle(Adaptor3d_HSurface)& theS, + void LargeTrianglesDeflectionsRefinement(const Handle(Adaptor3d_Surface)& theS, IntPolyh_ArrayOfTriangles& theTriangles, IntPolyh_ArrayOfEdges& theEdges, IntPolyh_ArrayOfPoints& thePoints, @@ -2912,7 +2912,7 @@ Standard_Real IntPolyh_MaillageAffinage::GetMaxDeflection(const Standard_Integer //======================================================================= void DegeneratedIndex(const TColStd_Array1OfReal& aXpars, const Standard_Integer aNbX, - const Handle(Adaptor3d_HSurface)& aS, + const Handle(Adaptor3d_Surface)& aS, const Standard_Integer aIsoDirection, Standard_Integer& aI1, Standard_Integer& aI2) @@ -2959,7 +2959,7 @@ void DegeneratedIndex(const TColStd_Array1OfReal& aXpars, //function : IsDegenerated //purpose : //======================================================================= -Standard_Boolean IsDegenerated(const Handle(Adaptor3d_HSurface)& aS, +Standard_Boolean IsDegenerated(const Handle(Adaptor3d_Surface)& aS, const Standard_Integer aIndex, const Standard_Real aTol2, Standard_Real& aDegX) diff --git a/src/IntPolyh/IntPolyh_MaillageAffinage.hxx b/src/IntPolyh/IntPolyh_MaillageAffinage.hxx index dd090b5600..ee3d387104 100644 --- a/src/IntPolyh/IntPolyh_MaillageAffinage.hxx +++ b/src/IntPolyh/IntPolyh_MaillageAffinage.hxx @@ -17,29 +17,19 @@ #ifndef _IntPolyh_MaillageAffinage_HeaderFile #define _IntPolyh_MaillageAffinage_HeaderFile -#include -#include -#include - +#include #include -#include -#include #include #include #include #include -#include #include #include #include #include -class Adaptor3d_HSurface; -class Bnd_Box; -class IntPolyh_Point; -class IntPolyh_StartPoint; -class IntPolyh_Triangle; -class IntPolyh_SectionLine; +class Bnd_Box; +class IntPolyh_StartPoint; //! Low-level algorithm to compute intersection of the surfaces //! by computing the intersection of their triangulations. @@ -50,9 +40,9 @@ public: DEFINE_STANDARD_ALLOC - Standard_EXPORT IntPolyh_MaillageAffinage(const Handle(Adaptor3d_HSurface)& S1, const Standard_Integer NbSU1, const Standard_Integer NbSV1, const Handle(Adaptor3d_HSurface)& S2, const Standard_Integer NbSU2, const Standard_Integer NbSV2, const Standard_Integer PRINT); + Standard_EXPORT IntPolyh_MaillageAffinage(const Handle(Adaptor3d_Surface)& S1, const Standard_Integer NbSU1, const Standard_Integer NbSV1, const Handle(Adaptor3d_Surface)& S2, const Standard_Integer NbSU2, const Standard_Integer NbSV2, const Standard_Integer PRINT); - Standard_EXPORT IntPolyh_MaillageAffinage(const Handle(Adaptor3d_HSurface)& S1, const Handle(Adaptor3d_HSurface)& S2, const Standard_Integer PRINT); + Standard_EXPORT IntPolyh_MaillageAffinage(const Handle(Adaptor3d_Surface)& S1, const Handle(Adaptor3d_Surface)& S2, const Standard_Integer PRINT); //! Makes the sampling of the surface - @@ -204,8 +194,8 @@ protected: private: - Handle(Adaptor3d_HSurface) MaSurface1; - Handle(Adaptor3d_HSurface) MaSurface2; + Handle(Adaptor3d_Surface) MaSurface1; + Handle(Adaptor3d_Surface) MaSurface2; Bnd_Box MyBox1; Bnd_Box MyBox2; Standard_Integer NbSamplesU1; diff --git a/src/IntPolyh/IntPolyh_Point.cxx b/src/IntPolyh/IntPolyh_Point.cxx index a1ac8a9b31..884c8fa7f3 100644 --- a/src/IntPolyh/IntPolyh_Point.cxx +++ b/src/IntPolyh/IntPolyh_Point.cxx @@ -15,7 +15,7 @@ // commercial license or contractual agreement. -#include +#include #include #include @@ -24,7 +24,7 @@ //function : Middle //purpose : //======================================================================= -void IntPolyh_Point::Middle(const Handle(Adaptor3d_HSurface)& MySurface, +void IntPolyh_Point::Middle(const Handle(Adaptor3d_Surface)& MySurface, const IntPolyh_Point & Point1, const IntPolyh_Point & Point2){ myU = (Point1.U()+Point2.U())*0.5; diff --git a/src/IntPolyh/IntPolyh_Point.hxx b/src/IntPolyh/IntPolyh_Point.hxx index cb21bc70d9..c422ad61db 100644 --- a/src/IntPolyh/IntPolyh_Point.hxx +++ b/src/IntPolyh/IntPolyh_Point.hxx @@ -17,14 +17,7 @@ #ifndef _IntPolyh_Point_HeaderFile #define _IntPolyh_Point_HeaderFile -#include -#include -#include - -#include -#include -#include -class Adaptor3d_HSurface; +#include //! The class represents the point on the surface with //! both 3D and 2D points. @@ -125,7 +118,7 @@ public: myPOC = ii; } //! Creates middle point from P1 and P2 and stores it to this - Standard_EXPORT void Middle (const Handle(Adaptor3d_HSurface)& MySurface, const IntPolyh_Point& P1, const IntPolyh_Point& P2); + Standard_EXPORT void Middle (const Handle(Adaptor3d_Surface)& MySurface, const IntPolyh_Point& P1, const IntPolyh_Point& P2); //! Addition Standard_EXPORT IntPolyh_Point Add (const IntPolyh_Point& P1) const; IntPolyh_Point operator + (const IntPolyh_Point& P1) const diff --git a/src/IntPolyh/IntPolyh_Tools.cxx b/src/IntPolyh/IntPolyh_Tools.cxx index 00d342fc1d..6d2ce1e0cc 100644 --- a/src/IntPolyh/IntPolyh_Tools.cxx +++ b/src/IntPolyh/IntPolyh_Tools.cxx @@ -14,7 +14,7 @@ #include -#include +#include #include #include @@ -22,7 +22,7 @@ //function : IsEnlargePossible //purpose : //======================================================================= -void IntPolyh_Tools::IsEnlargePossible(const Handle(Adaptor3d_HSurface)& theSurf, +void IntPolyh_Tools::IsEnlargePossible(const Handle(Adaptor3d_Surface)& theSurf, Standard_Boolean& theUEnlarge, Standard_Boolean& theVEnlarge) { @@ -62,7 +62,7 @@ void IntPolyh_Tools::IsEnlargePossible(const Handle(Adaptor3d_HSurface)& theSurf //function : EnlargeZone //purpose : Enlarges the sampling zone of the surface //======================================================================= -static void EnlargeZone(const Handle(Adaptor3d_HSurface)& theSurf, +static void EnlargeZone(const Handle(Adaptor3d_Surface)& theSurf, Standard_Real &u0, Standard_Real &u1, Standard_Real &v0, @@ -90,7 +90,7 @@ static void EnlargeZone(const Handle(Adaptor3d_HSurface)& theSurf, //function : MakeSampling //purpose : //======================================================================= -void IntPolyh_Tools::MakeSampling(const Handle(Adaptor3d_HSurface)& theSurf, +void IntPolyh_Tools::MakeSampling(const Handle(Adaptor3d_Surface)& theSurf, const Standard_Integer theNbSU, const Standard_Integer theNbSV, const Standard_Boolean theEnlargeZone, @@ -141,7 +141,7 @@ void IntPolyh_Tools::MakeSampling(const Handle(Adaptor3d_HSurface)& theSurf, //function : ComputeDeflection //purpose : //======================================================================= -Standard_Real IntPolyh_Tools::ComputeDeflection(const Handle(Adaptor3d_HSurface)& theSurf, +Standard_Real IntPolyh_Tools::ComputeDeflection(const Handle(Adaptor3d_Surface)& theSurf, const TColStd_Array1OfReal& theUPars, const TColStd_Array1OfReal& theVPars) { @@ -154,7 +154,7 @@ Standard_Real IntPolyh_Tools::ComputeDeflection(const Handle(Adaptor3d_HSurface) //function : FillArrayOfPointNormal //purpose : //======================================================================= -void IntPolyh_Tools::FillArrayOfPointNormal(const Handle(Adaptor3d_HSurface)& theSurf, +void IntPolyh_Tools::FillArrayOfPointNormal(const Handle(Adaptor3d_Surface)& theSurf, const TColStd_Array1OfReal& theUPars, const TColStd_Array1OfReal& theVPars, IntPolyh_ArrayOfPointNormal& thePoints) diff --git a/src/IntPolyh/IntPolyh_Tools.hxx b/src/IntPolyh/IntPolyh_Tools.hxx index 36d646465f..17c66486a8 100644 --- a/src/IntPolyh/IntPolyh_Tools.hxx +++ b/src/IntPolyh/IntPolyh_Tools.hxx @@ -15,17 +15,17 @@ #ifndef _IntPolyh_Tools_HeaderFile #define _IntPolyh_Tools_HeaderFile +#include #include #include -class Adaptor3d_HSurface; //! The class provides tools for surface sampling. class IntPolyh_Tools { public: //! Checks if the surface can be enlarged in U or V direction. - Standard_EXPORT static void IsEnlargePossible(const Handle(Adaptor3d_HSurface)& theSurf, + Standard_EXPORT static void IsEnlargePossible(const Handle(Adaptor3d_Surface)& theSurf, Standard_Boolean& theUEnlarge, Standard_Boolean& theVEnlarge); @@ -35,7 +35,7 @@ public: //! sampling zone on the surface. //! The parameters of the sampling points are stored into //! and arrays. - Standard_EXPORT static void MakeSampling(const Handle(Adaptor3d_HSurface)& theSurf, + Standard_EXPORT static void MakeSampling(const Handle(Adaptor3d_Surface)& theSurf, const Standard_Integer theNbSU, const Standard_Integer theNbSV, const Standard_Boolean theEnlargeZone, @@ -43,13 +43,13 @@ public: TColStd_Array1OfReal& theVPars); //! Computes the deflection tolerance on the surface for the given sampling. - Standard_EXPORT static Standard_Real ComputeDeflection(const Handle(Adaptor3d_HSurface)& theSurf, + Standard_EXPORT static Standard_Real ComputeDeflection(const Handle(Adaptor3d_Surface)& theSurf, const TColStd_Array1OfReal& theUPars, const TColStd_Array1OfReal& theVPars); //! Fills the array with the points (triangulation nodes) on the surface //! and normal directions of the surface in these points. - Standard_EXPORT static void FillArrayOfPointNormal(const Handle(Adaptor3d_HSurface)& theSurf, + Standard_EXPORT static void FillArrayOfPointNormal(const Handle(Adaptor3d_Surface)& theSurf, const TColStd_Array1OfReal& theUPars, const TColStd_Array1OfReal& theVPars, IntPolyh_ArrayOfPointNormal& thePoints); diff --git a/src/IntPolyh/IntPolyh_Triangle.cxx b/src/IntPolyh/IntPolyh_Triangle.cxx index 88b0a5288d..4bbad06ff8 100644 --- a/src/IntPolyh/IntPolyh_Triangle.cxx +++ b/src/IntPolyh/IntPolyh_Triangle.cxx @@ -15,7 +15,7 @@ // commercial license or contractual agreement. -#include +#include #include #include #include @@ -40,7 +40,7 @@ static const Standard_Integer P2, const Standard_Integer P3, IntPolyh_ArrayOfTriangles &TTriangles, - const Handle(Adaptor3d_HSurface)& MySurface, + const Handle(Adaptor3d_Surface)& MySurface, IntPolyh_ArrayOfPoints &TPoints); static void NewEdge(const Standard_Integer P1, @@ -61,7 +61,7 @@ static // barycenter of the triangle in UV space. //======================================================================= Standard_Real - IntPolyh_Triangle::ComputeDeflection(const Handle(Adaptor3d_HSurface)& theSurface, + IntPolyh_Triangle::ComputeDeflection(const Handle(Adaptor3d_Surface)& theSurface, const IntPolyh_ArrayOfPoints& TPoints) { myDeflection = 0.; @@ -218,7 +218,7 @@ void NewTriangle(const Standard_Integer P1, const Standard_Integer P2, const Standard_Integer P3, IntPolyh_ArrayOfTriangles &TTriangles, - const Handle(Adaptor3d_HSurface)& MySurface, + const Handle(Adaptor3d_Surface)& MySurface, IntPolyh_ArrayOfPoints &TPoints) { const Standard_Integer FinTT = TTriangles.NbItems(); TTriangles[FinTT].SetFirstPoint(P1); @@ -270,7 +270,7 @@ void OldEdge(const Standard_Integer EdgeN, //purpose : //======================================================================= void IntPolyh_Triangle::MiddleRefinement(const Standard_Integer NumTri, - const Handle(Adaptor3d_HSurface)& MySurface, + const Handle(Adaptor3d_Surface)& MySurface, IntPolyh_ArrayOfPoints &TPoints, IntPolyh_ArrayOfTriangles &TTriangles, IntPolyh_ArrayOfEdges & TEdges) @@ -567,7 +567,7 @@ void IntPolyh_Triangle::MiddleRefinement(const Standard_Integer NumTri, void IntPolyh_Triangle::MultipleMiddleRefinement(const Standard_Real theRefineCriterion, const Bnd_Box& theBox, const Standard_Integer theTriangleNumber, - const Handle(Adaptor3d_HSurface)& theSurface, + const Handle(Adaptor3d_Surface)& theSurface, IntPolyh_ArrayOfPoints& TPoints, IntPolyh_ArrayOfTriangles& TTriangles, IntPolyh_ArrayOfEdges& TEdges) diff --git a/src/IntPolyh/IntPolyh_Triangle.hxx b/src/IntPolyh/IntPolyh_Triangle.hxx index f27e924b93..1c046104a8 100644 --- a/src/IntPolyh/IntPolyh_Triangle.hxx +++ b/src/IntPolyh/IntPolyh_Triangle.hxx @@ -17,17 +17,12 @@ #ifndef _IntPolyh_Triangle_HeaderFile #define _IntPolyh_Triangle_HeaderFile -#include -#include -#include - -#include -#include +#include #include #include #include #include -class Adaptor3d_HSurface; + class IntPolyh_StartPoint; //! The class represents the triangle built from three IntPolyh points @@ -227,7 +222,7 @@ public: } //! Computes the deflection for the triangle - Standard_EXPORT Standard_Real ComputeDeflection(const Handle(Adaptor3d_HSurface)& theSurface, + Standard_EXPORT Standard_Real ComputeDeflection(const Handle(Adaptor3d_Surface)& theSurface, const IntPolyh_ArrayOfPoints& thePoints); //! Gets the adjacent triangle @@ -237,7 +232,7 @@ public: //! Splits the triangle on two to decrease its deflection Standard_EXPORT void MiddleRefinement(const Standard_Integer theTriangleNumber, - const Handle(Adaptor3d_HSurface)& theSurface, + const Handle(Adaptor3d_Surface)& theSurface, IntPolyh_ArrayOfPoints& TPoints, IntPolyh_ArrayOfTriangles& TTriangles, IntPolyh_ArrayOfEdges& TEdges); @@ -247,7 +242,7 @@ public: Standard_EXPORT void MultipleMiddleRefinement(const Standard_Real theRefineCriterion, const Bnd_Box& theBox, const Standard_Integer theTriangleNumber, - const Handle(Adaptor3d_HSurface)& theSurface, + const Handle(Adaptor3d_Surface)& theSurface, IntPolyh_ArrayOfPoints& TPoints, IntPolyh_ArrayOfTriangles& TTriangles, IntPolyh_ArrayOfEdges& TEdges); diff --git a/src/IntStart/IntStart_SearchOnBoundaries.gxx b/src/IntStart/IntStart_SearchOnBoundaries.gxx index 8ccaf73b1b..bb075d5e95 100644 --- a/src/IntStart/IntStart_SearchOnBoundaries.gxx +++ b/src/IntStart/IntStart_SearchOnBoundaries.gxx @@ -17,9 +17,9 @@ #include #include #include -#include +#include +#include #include -#include #include #include #include @@ -36,7 +36,7 @@ #include #include -#include +#include #include #include //#include @@ -68,7 +68,7 @@ #endif -static Standard_Boolean IsDegenerated(const Handle(Adaptor3d_HCurveOnSurface)& theCurve); +static Standard_Boolean IsDegenerated(const Handle(Adaptor3d_CurveOnSurface)& theCurve); static Standard_Boolean IsDegenerated(const IntSurf_Quadric& theQuadric); static void FindVertex (const TheArc&, @@ -174,7 +174,7 @@ void FindVertex (const TheArc& A, } } -Standard_Boolean IsDegenerated(const Handle(Adaptor3d_HCurveOnSurface)& theCurve) +Standard_Boolean IsDegenerated(const Handle(Adaptor3d_CurveOnSurface)& theCurve) { if (theCurve->GetType() == GeomAbs_Circle) { @@ -389,7 +389,7 @@ void BoundedArc (const TheArc& A, if (TypeQuad != GeomAbs_OtherSurface) //intersection of boundary curve and quadric surface { //Exact solution - Handle(Adaptor3d_HSurface) aSurf = Func.Surface(); + Handle(Adaptor3d_Surface) aSurf = Func.Surface(); Adaptor3d_CurveOnSurface ConS(A, aSurf); GeomAbs_CurveType TypeConS = ConS.GetType(); #ifdef OCCT_DEBUG @@ -440,7 +440,7 @@ void BoundedArc (const TheArc& A, } } #endif - Handle(Adaptor3d_HCurveOnSurface) HConS = new Adaptor3d_HCurveOnSurface(ConS); + Handle(Adaptor3d_CurveOnSurface) HConS = new Adaptor3d_CurveOnSurface(ConS); Handle(Geom_Surface) QuadSurf; switch (TypeQuad) { @@ -472,7 +472,7 @@ void BoundedArc (const TheArc& A, default: break; } - Handle(GeomAdaptor_HSurface) GAHsurf = new GeomAdaptor_HSurface(QuadSurf); + Handle(GeomAdaptor_Surface) GAHsurf = new GeomAdaptor_Surface(QuadSurf); if ((TypeConS == GeomAbs_Line || TypeConS == GeomAbs_Circle || diff --git a/src/IntSurf/IntSurf.cxx b/src/IntSurf/IntSurf.cxx index d1d8e5c2af..3e62392931 100644 --- a/src/IntSurf/IntSurf.cxx +++ b/src/IntSurf/IntSurf.cxx @@ -14,7 +14,7 @@ #include -#include +#include #include #include #include @@ -101,8 +101,8 @@ void IntSurf::MakeTransition (const gp_Vec& TgFirst, //function : SetPeriod //purpose : //======================================================================= -void IntSurf::SetPeriod(const Handle(Adaptor3d_HSurface)& theFirstSurf, - const Handle(Adaptor3d_HSurface)& theSecondSurf, +void IntSurf::SetPeriod(const Handle(Adaptor3d_Surface)& theFirstSurf, + const Handle(Adaptor3d_Surface)& theSecondSurf, Standard_Real theArrOfPeriod[4]) { theArrOfPeriod[0] = theFirstSurf->IsUPeriodic()? theFirstSurf->UPeriod() : 0.0; diff --git a/src/IntSurf/IntSurf.hxx b/src/IntSurf/IntSurf.hxx index 80890c8166..bbda383d8b 100644 --- a/src/IntSurf/IntSurf.hxx +++ b/src/IntSurf/IntSurf.hxx @@ -17,10 +17,8 @@ #ifndef _IntSurf_HeaderFile #define _IntSurf_HeaderFile -#include -#include +#include -class Adaptor3d_HSurface; class IntSurf_Transition; class gp_Dir; class gp_Vec; @@ -53,8 +51,8 @@ public: //! //! If surface is not periodic in correspond direction then //! its period is considered to be equal to 0. - Standard_EXPORT static void SetPeriod(const Handle(Adaptor3d_HSurface)& theFirstSurf, - const Handle(Adaptor3d_HSurface)& theSecondSurf, + Standard_EXPORT static void SetPeriod(const Handle(Adaptor3d_Surface)& theFirstSurf, + const Handle(Adaptor3d_Surface)& theSecondSurf, Standard_Real theArrOfPeriod[4]); diff --git a/src/IntTools/IntTools_BeanFaceIntersector.cxx b/src/IntTools/IntTools_BeanFaceIntersector.cxx index 5bc0d5a946..c69691371b 100644 --- a/src/IntTools/IntTools_BeanFaceIntersector.cxx +++ b/src/IntTools/IntTools_BeanFaceIntersector.cxx @@ -11,14 +11,13 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. +#include #include #include #include #include #include -#include -#include #include #include #include @@ -40,7 +39,6 @@ #include #include #include -#include #include #include #include @@ -582,8 +580,8 @@ void IntTools_BeanFaceIntersector::ComputeAroundExactIntersection() { IntCurveSurface_HInter anExactIntersector; - Handle(BRepAdaptor_HCurve) aCurve = new BRepAdaptor_HCurve(myCurve); - Handle(BRepAdaptor_HSurface) aSurface = new BRepAdaptor_HSurface(mySurface); + Handle(BRepAdaptor_Curve) aCurve = new BRepAdaptor_Curve(myCurve); + Handle(BRepAdaptor_Surface) aSurface = new BRepAdaptor_Surface(mySurface); anExactIntersector.Perform(aCurve, aSurface); @@ -1768,7 +1766,7 @@ Standard_Boolean IntTools_BeanFaceIntersector::ComputeLocalized() { Bnd_Box EBox; - BndLib_Add3dCurve::Add(myCurve.Trim(myFirstParameter, myLastParameter, Precision::PConfusion())->Curve(), myBeanTolerance, EBox); + BndLib_Add3dCurve::Add (*myCurve.Trim(myFirstParameter, myLastParameter, Precision::PConfusion()), myBeanTolerance, EBox); if(EBox.IsOut(FBox)) { for(Standard_Integer i = 1; i <= myRangeManager.Length(); i++) { diff --git a/src/IntTools/IntTools_EdgeFace.cxx b/src/IntTools/IntTools_EdgeFace.cxx index 37bfcec4a8..bdd0887116 100644 --- a/src/IntTools/IntTools_EdgeFace.cxx +++ b/src/IntTools/IntTools_EdgeFace.cxx @@ -13,6 +13,7 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. +#include #include #include @@ -24,8 +25,6 @@ #include #include #include -#include -#include #include #include #include @@ -43,7 +42,6 @@ #include #include #include -#include #include #include #include @@ -418,8 +416,8 @@ Standard_Boolean IntTools_EdgeFace::CheckTouch // modified by NIZHNY-MKK Thu Jul 21 11:35:32 2005.BEGIN IntCurveSurface_HInter anExactIntersector; - Handle(GeomAdaptor_HCurve) aCurve = new GeomAdaptor_HCurve(TheCurve); - Handle(GeomAdaptor_HSurface) aSurface = new GeomAdaptor_HSurface(TheSurface); + Handle(GeomAdaptor_Curve) aCurve = new GeomAdaptor_Curve(TheCurve); + Handle(GeomAdaptor_Surface) aSurface = new GeomAdaptor_Surface(TheSurface); anExactIntersector.Perform(aCurve, aSurface); diff --git a/src/IntTools/IntTools_FClass2d.cxx b/src/IntTools/IntTools_FClass2d.cxx index 49dd72bf3d..0f24cb8e1d 100644 --- a/src/IntTools/IntTools_FClass2d.cxx +++ b/src/IntTools/IntTools_FClass2d.cxx @@ -18,7 +18,7 @@ #include #include #include -#include +#include #include #include #include @@ -113,8 +113,8 @@ void IntTools_FClass2d::Init(const TopoDS_Face& aFace, Toluv=TolUV; Face=aFace; Face.Orientation(TopAbs_FORWARD); - Handle(BRepAdaptor_HSurface) surf = new BRepAdaptor_HSurface(); - surf->ChangeSurface().Initialize(aFace, Standard_False); + Handle(BRepAdaptor_Surface) surf = new BRepAdaptor_Surface(); + surf->Initialize(aFace, Standard_False); // Tole = 0.; Tol=0.; @@ -583,8 +583,8 @@ TopAbs_State IntTools_FClass2d::Perform Standard_Real vv = v; TopAbs_State aStatus = TopAbs_UNKNOWN; - Handle(BRepAdaptor_HSurface) surf = new BRepAdaptor_HSurface(); - surf->ChangeSurface().Initialize( Face, Standard_False ); + Handle(BRepAdaptor_Surface) surf = new BRepAdaptor_Surface(); + surf->Initialize( Face, Standard_False ); const Standard_Boolean IsUPer = surf->IsUPeriodic(); const Standard_Boolean IsVPer = surf->IsVPeriodic(); @@ -727,8 +727,8 @@ TopAbs_State IntTools_FClass2d::TestOnRestriction Standard_Real v=_Puv.Y(); Standard_Real uu = u, vv = v; - Handle(BRepAdaptor_HSurface) surf = new BRepAdaptor_HSurface(); - surf->ChangeSurface().Initialize( Face, Standard_False ); + Handle(BRepAdaptor_Surface) surf = new BRepAdaptor_Surface(); + surf->Initialize( Face, Standard_False ); const Standard_Boolean IsUPer = surf->IsUPeriodic(); const Standard_Boolean IsVPer = surf->IsVPeriodic(); const Standard_Real uperiod = IsUPer ? surf->UPeriod() : 0.0; diff --git a/src/IntTools/IntTools_FaceFace.cxx b/src/IntTools/IntTools_FaceFace.cxx index f2a572f964..6b4047c998 100644 --- a/src/IntTools/IntTools_FaceFace.cxx +++ b/src/IntTools/IntTools_FaceFace.cxx @@ -22,10 +22,11 @@ #include #include #include +#include #include #include #include -#include +#include #include #include #include @@ -56,8 +57,8 @@ #include static - void Parameters(const Handle(GeomAdaptor_HSurface)&, - const Handle(GeomAdaptor_HSurface)&, + void Parameters(const Handle(GeomAdaptor_Surface)&, + const Handle(GeomAdaptor_Surface)&, const gp_Pnt&, Standard_Real&, Standard_Real&, @@ -90,8 +91,8 @@ static Standard_Boolean ApproxWithPCurves(const gp_Cylinder& theCyl, const gp_Sphere& theSph); -static void PerformPlanes(const Handle(GeomAdaptor_HSurface)& theS1, - const Handle(GeomAdaptor_HSurface)& theS2, +static void PerformPlanes(const Handle(GeomAdaptor_Surface)& theS1, + const Handle(GeomAdaptor_Surface)& theS2, const Standard_Real TolF1, const Standard_Real TolF2, const Standard_Real TolAng, @@ -101,22 +102,22 @@ static void PerformPlanes(const Handle(GeomAdaptor_HSurface)& theS1, IntTools_SequenceOfCurves& theSeqOfCurve, Standard_Boolean& theTangentFaces); -static Standard_Boolean ClassifyLin2d(const Handle(GeomAdaptor_HSurface)& theS, +static Standard_Boolean ClassifyLin2d(const Handle(GeomAdaptor_Surface)& theS, const gp_Lin2d& theLin2d, const Standard_Real theTol, Standard_Real& theP1, Standard_Real& theP2); // static - void ApproxParameters(const Handle(GeomAdaptor_HSurface)& aHS1, - const Handle(GeomAdaptor_HSurface)& aHS2, + void ApproxParameters(const Handle(GeomAdaptor_Surface)& aHS1, + const Handle(GeomAdaptor_Surface)& aHS2, Standard_Integer& iDegMin, Standard_Integer& iNbIter, Standard_Integer& iDegMax); static - void Tolerances(const Handle(GeomAdaptor_HSurface)& aHS1, - const Handle(GeomAdaptor_HSurface)& aHS2, + void Tolerances(const Handle(GeomAdaptor_Surface)& aHS1, + const Handle(GeomAdaptor_Surface)& aHS2, Standard_Real& aTolTang); static @@ -165,8 +166,8 @@ IntTools_FaceFace::IntTools_FaceFace() myIsDone=Standard_False; myTangentFaces=Standard_False; // - myHS1 = new GeomAdaptor_HSurface (); - myHS2 = new GeomAdaptor_HSurface (); + myHS1 = new GeomAdaptor_Surface (); + myHS2 = new GeomAdaptor_Surface (); myTolF1 = 0.; myTolF2 = 0.; myTol = 0.; @@ -425,10 +426,10 @@ void IntTools_FaceFace::Perform(const TopoDS_Face& aF1, Standard_Real umin, umax, vmin, vmax; // myContext->UVBounds(myFace1, umin, umax, vmin, vmax); - myHS1->ChangeSurface().Load(S1, umin, umax, vmin, vmax); + myHS1->Load(S1, umin, umax, vmin, vmax); // myContext->UVBounds(myFace2, umin, umax, vmin, vmax); - myHS2->ChangeSurface().Load(S2, umin, umax, vmin, vmax); + myHS2->Load(S2, umin, umax, vmin, vmax); // Standard_Real TolAng = 1.e-8; // @@ -462,11 +463,11 @@ void IntTools_FaceFace::Perform(const TopoDS_Face& aF1, // F1 myContext->UVBounds(myFace1, umin, umax, vmin, vmax); CorrectPlaneBoundaries(umin, umax, vmin, vmax); - myHS1->ChangeSurface().Load(S1, umin, umax, vmin, vmax); + myHS1->Load(S1, umin, umax, vmin, vmax); // F2 myContext->UVBounds(myFace2, umin, umax, vmin, vmax); CorrectSurfaceBoundaries(myFace2, myTol * 2., umin, umax, vmin, vmax); - myHS2->ChangeSurface().Load(S2, umin, umax, vmin, vmax); + myHS2->Load(S2, umin, umax, vmin, vmax); } else if ((aType2==GeomAbs_Plane) && isFace1Quad) { @@ -474,21 +475,21 @@ void IntTools_FaceFace::Perform(const TopoDS_Face& aF1, //F1 myContext->UVBounds(myFace1, umin, umax, vmin, vmax); CorrectSurfaceBoundaries(myFace1, myTol * 2., umin, umax, vmin, vmax); - myHS1->ChangeSurface().Load(S1, umin, umax, vmin, vmax); + myHS1->Load(S1, umin, umax, vmin, vmax); // F2 myContext->UVBounds(myFace2, umin, umax, vmin, vmax); CorrectPlaneBoundaries(umin, umax, vmin, vmax); - myHS2->ChangeSurface().Load(S2, umin, umax, vmin, vmax); + myHS2->Load(S2, umin, umax, vmin, vmax); } else { Standard_Real umin, umax, vmin, vmax; myContext->UVBounds(myFace1, umin, umax, vmin, vmax); CorrectSurfaceBoundaries(myFace1, myTol * 2., umin, umax, vmin, vmax); - myHS1->ChangeSurface().Load(S1, umin, umax, vmin, vmax); + myHS1->Load(S1, umin, umax, vmin, vmax); myContext->UVBounds(myFace2, umin, umax, vmin, vmax); CorrectSurfaceBoundaries(myFace2, myTol * 2., umin, umax, vmin, vmax); - myHS2->ChangeSurface().Load(S2, umin, umax, vmin, vmax); + myHS2->Load(S2, umin, umax, vmin, vmax); } const Handle(IntTools_TopolTool) dom1 = new IntTools_TopolTool(myHS1); @@ -633,8 +634,8 @@ void IntTools_FaceFace::ComputeTolReached3d() // Minimal tangential tolerance for the curve Standard_Real aTolFMax = Max(myTolF1, myTolF2); // - const Handle(Geom_Surface)& aS1 = myHS1->ChangeSurface().Surface(); - const Handle(Geom_Surface)& aS2 = myHS2->ChangeSurface().Surface(); + const Handle(Geom_Surface)& aS1 = myHS1->Surface(); + const Handle(Geom_Surface)& aS2 = myHS2->Surface(); // for (i = 1; i <= aNbLin; ++i) { @@ -819,7 +820,7 @@ void IntTools_FaceFace::MakeCurve(const Standard_Integer Index, if(myApprox1) { Handle (Geom2d_Curve) C2d; GeomInt_IntSS::BuildPCurves(fprm, lprm, Tolpc, - myHS1->ChangeSurface().Surface(), newc, C2d); + myHS1->Surface(), newc, C2d); if (C2d.IsNull()) continue; @@ -830,7 +831,7 @@ void IntTools_FaceFace::MakeCurve(const Standard_Integer Index, if(myApprox2) { Handle (Geom2d_Curve) C2d; GeomInt_IntSS::BuildPCurves(fprm, lprm, Tolpc, - myHS2->ChangeSurface().Surface(), newc, C2d); + myHS2->Surface(), newc, C2d); if (C2d.IsNull()) continue; @@ -987,14 +988,14 @@ void IntTools_FaceFace::MakeCurve(const Standard_Integer Index, if(myApprox1) { Handle (Geom2d_Curve) C2d; GeomInt_IntSS::BuildPCurves(fprm, lprm, Tolpc, - myHS1->ChangeSurface().Surface(), newc, C2d); + myHS1->Surface(), newc, C2d); aCurve.SetFirstCurve2d(C2d); } if(myApprox2) { Handle (Geom2d_Curve) C2d; GeomInt_IntSS::BuildPCurves(fprm,lprm,Tolpc, - myHS2->ChangeSurface().Surface(),newc,C2d); + myHS2->Surface(),newc,C2d); aCurve.SetSecondCurve2d(C2d); } } @@ -1018,14 +1019,14 @@ void IntTools_FaceFace::MakeCurve(const Standard_Integer Index, if(myApprox1) { Handle (Geom2d_Curve) C2d; GeomInt_IntSS::BuildPCurves(fprm,lprm,Tolpc, - myHS1->ChangeSurface().Surface(),newc,C2d); + myHS1->Surface(),newc,C2d); aCurve.SetFirstCurve2d(C2d); } if(myApprox2) { Handle (Geom2d_Curve) C2d; GeomInt_IntSS::BuildPCurves(fprm,lprm,Tolpc, - myHS2->ChangeSurface().Surface(),newc,C2d); + myHS2->Surface(),newc,C2d); aCurve.SetSecondCurve2d(C2d); } // @@ -1056,14 +1057,14 @@ void IntTools_FaceFace::MakeCurve(const Standard_Integer Index, if(myApprox1) { Handle (Geom2d_Curve) C2d; GeomInt_IntSS::BuildPCurves(fprm, lprm, Tolpc, - myHS1->ChangeSurface().Surface(), newc, C2d); + myHS1->Surface(), newc, C2d); aCurve.SetFirstCurve2d(C2d); } if(myApprox2) { Handle (Geom2d_Curve) C2d; GeomInt_IntSS::BuildPCurves(fprm, lprm, Tolpc, - myHS2->ChangeSurface().Surface(), newc, C2d); + myHS2->Surface(), newc, C2d); aCurve.SetSecondCurve2d(C2d); } }// end of if (typl == IntPatch_Circle || typl == IntPatch_Ellipse) @@ -1142,17 +1143,17 @@ void IntTools_FaceFace::MakeCurve(const Standard_Integer Index, tol2d = myTolApprox; GeomAbs_SurfaceType typs1, typs2; - typs1 = myHS1->Surface().GetType(); - typs2 = myHS2->Surface().GetType(); + typs1 = myHS1->GetType(); + typs2 = myHS2->GetType(); Standard_Boolean anWithPC = Standard_True; if(typs1 == GeomAbs_Cylinder && typs2 == GeomAbs_Sphere) { anWithPC = - ApproxWithPCurves(myHS1->Surface().Cylinder(), myHS2->Surface().Sphere()); + ApproxWithPCurves(myHS1->Cylinder(), myHS2->Sphere()); } else if (typs1 == GeomAbs_Sphere && typs2 == GeomAbs_Cylinder) { anWithPC = - ApproxWithPCurves(myHS2->Surface().Cylinder(), myHS1->Surface().Sphere()); + ApproxWithPCurves(myHS2->Cylinder(), myHS1->Sphere()); } // if(!anWithPC) { @@ -1297,7 +1298,7 @@ void IntTools_FaceFace::MakeCurve(const Standard_Integer Index, TColgp_Array1OfPnt tpoles(1,nbpoles); mbspc.Curve(1,tpoles2d); - const gp_Pln& Pln = myHS1->Surface().Plane(); + const gp_Pln& Pln = myHS1->Plane(); // Standard_Integer ik; for(ik = 1; ik<= nbpoles; ik++) { @@ -1376,7 +1377,7 @@ void IntTools_FaceFace::MakeCurve(const Standard_Integer Index, TColgp_Array1OfPnt2d tpoles2d(1,nbpoles); TColgp_Array1OfPnt tpoles(1,nbpoles); mbspc.Curve((myApprox1==Standard_True)? 2 : 1,tpoles2d); - const gp_Pln& Pln = myHS2->Surface().Plane(); + const gp_Pln& Pln = myHS2->Plane(); // Standard_Integer ik; for(ik = 1; ik<= nbpoles; ik++) { @@ -1522,7 +1523,7 @@ void IntTools_FaceFace::MakeCurve(const Standard_Integer Index, Handle(Geom2d_Curve) C2d; Standard_Real aTol = myTolApprox; GeomInt_IntSS::BuildPCurves(fprm, lprm, aTol, - myHS1->ChangeSurface().Surface(), BS, C2d); + myHS1->Surface(), BS, C2d); BS1 = Handle(Geom2d_BSplineCurve)::DownCast(C2d); aCurve.SetFirstCurve2d(BS1); } @@ -1553,7 +1554,7 @@ void IntTools_FaceFace::MakeCurve(const Standard_Integer Index, Handle(Geom2d_Curve) C2d; Standard_Real aTol = myTolApprox; GeomInt_IntSS::BuildPCurves(fprm, lprm, aTol, - myHS2->ChangeSurface().Surface(), BS, C2d); + myHS2->Surface(), BS, C2d); BS2 = Handle(Geom2d_BSplineCurve)::DownCast(C2d); aCurve.SetSecondCurve2d(BS2); } @@ -1682,8 +1683,8 @@ void IntTools_FaceFace::MakeCurve(const Standard_Integer Index, //function : Parameters //purpose : //======================================================================= - void Parameters(const Handle(GeomAdaptor_HSurface)& HS1, - const Handle(GeomAdaptor_HSurface)& HS2, + void Parameters(const Handle(GeomAdaptor_Surface)& HS1, + const Handle(GeomAdaptor_Surface)& HS2, const gp_Pnt& Ptref, Standard_Real& U1, Standard_Real& V1, @@ -1692,44 +1693,44 @@ void IntTools_FaceFace::MakeCurve(const Standard_Integer Index, { IntSurf_Quadric quad1,quad2; - GeomAbs_SurfaceType typs = HS1->Surface().GetType(); + GeomAbs_SurfaceType typs = HS1->GetType(); switch (typs) { case GeomAbs_Plane: - quad1.SetValue(HS1->Surface().Plane()); + quad1.SetValue(HS1->Plane()); break; case GeomAbs_Cylinder: - quad1.SetValue(HS1->Surface().Cylinder()); + quad1.SetValue(HS1->Cylinder()); break; case GeomAbs_Cone: - quad1.SetValue(HS1->Surface().Cone()); + quad1.SetValue(HS1->Cone()); break; case GeomAbs_Sphere: - quad1.SetValue(HS1->Surface().Sphere()); + quad1.SetValue(HS1->Sphere()); break; case GeomAbs_Torus: - quad1.SetValue(HS1->Surface().Torus()); + quad1.SetValue(HS1->Torus()); break; default: throw Standard_ConstructionError("GeomInt_IntSS::MakeCurve"); } - typs = HS2->Surface().GetType(); + typs = HS2->GetType(); switch (typs) { case GeomAbs_Plane: - quad2.SetValue(HS2->Surface().Plane()); + quad2.SetValue(HS2->Plane()); break; case GeomAbs_Cylinder: - quad2.SetValue(HS2->Surface().Cylinder()); + quad2.SetValue(HS2->Cylinder()); break; case GeomAbs_Cone: - quad2.SetValue(HS2->Surface().Cone()); + quad2.SetValue(HS2->Cone()); break; case GeomAbs_Sphere: - quad2.SetValue(HS2->Surface().Sphere()); + quad2.SetValue(HS2->Sphere()); break; case GeomAbs_Torus: - quad2.SetValue(HS2->Surface().Torus()); + quad2.SetValue(HS2->Torus()); break; default: throw Standard_ConstructionError("GeomInt_IntSS::MakeCurve"); @@ -2178,8 +2179,8 @@ Standard_Boolean ApproxWithPCurves(const gp_Cylinder& theCyl, //function : PerformPlanes //purpose : //======================================================================= -void PerformPlanes(const Handle(GeomAdaptor_HSurface)& theS1, - const Handle(GeomAdaptor_HSurface)& theS2, +void PerformPlanes(const Handle(GeomAdaptor_Surface)& theS1, + const Handle(GeomAdaptor_Surface)& theS2, const Standard_Real TolF1, const Standard_Real TolF2, const Standard_Real TolAng, @@ -2190,8 +2191,8 @@ void PerformPlanes(const Handle(GeomAdaptor_HSurface)& theS1, Standard_Boolean& theTangentFaces) { - gp_Pln aPln1 = theS1->Surface().Plane(); - gp_Pln aPln2 = theS2->Surface().Plane(); + gp_Pln aPln1 = theS1->Plane(); + gp_Pln aPln2 = theS2->Plane(); IntAna_QuadQuadGeo aPlnInter(aPln1, aPln2, TolAng, TolTang); @@ -2309,7 +2310,7 @@ static inline Standard_Boolean COINC(const Standard_Real d1, { return (d1 <= tol && d1 >= -tol) && (d2 <= tol && d2 >= -tol); } -Standard_Boolean ClassifyLin2d(const Handle(GeomAdaptor_HSurface)& theS, +Standard_Boolean ClassifyLin2d(const Handle(GeomAdaptor_Surface)& theS, const gp_Lin2d& theLin2d, const Standard_Real theTol, Standard_Real& theP1, @@ -2320,10 +2321,10 @@ Standard_Boolean ClassifyLin2d(const Handle(GeomAdaptor_HSurface)& theS, Standard_Real par[2]; Standard_Integer nbi = 0; - xmin = theS->Surface().FirstUParameter(); - xmax = theS->Surface().LastUParameter(); - ymin = theS->Surface().FirstVParameter(); - ymax = theS->Surface().LastVParameter(); + xmin = theS->FirstUParameter(); + xmax = theS->LastUParameter(); + ymin = theS->FirstVParameter(); + ymax = theS->LastVParameter(); theLin2d.Coefficients(A, B, C); @@ -2444,8 +2445,8 @@ Standard_Boolean ClassifyLin2d(const Handle(GeomAdaptor_HSurface)& theS, //function : ApproxParameters //purpose : //======================================================================= -void ApproxParameters(const Handle(GeomAdaptor_HSurface)& aHS1, - const Handle(GeomAdaptor_HSurface)& aHS2, +void ApproxParameters(const Handle(GeomAdaptor_Surface)& aHS1, + const Handle(GeomAdaptor_Surface)& aHS2, Standard_Integer& iDegMin, Standard_Integer& iDegMax, Standard_Integer& iNbIter) @@ -2458,8 +2459,8 @@ void ApproxParameters(const Handle(GeomAdaptor_HSurface)& aHS1, iDegMin=4; iDegMax=8; // - aTS1=aHS1->Surface().GetType(); - aTS2=aHS2->Surface().GetType(); + aTS1=aHS1->GetType(); + aTS2=aHS2->GetType(); // // Cylinder/Torus if ((aTS1==GeomAbs_Cylinder && aTS2==GeomAbs_Torus) || @@ -2470,8 +2471,8 @@ void ApproxParameters(const Handle(GeomAdaptor_HSurface)& aHS1, // aPC=Precision::Confusion(); // - aCylinder=(aTS1==GeomAbs_Cylinder)? aHS1->Surface().Cylinder() : aHS2->Surface().Cylinder(); - aTorus=(aTS1==GeomAbs_Torus)? aHS1->Surface().Torus() : aHS2->Surface().Torus(); + aCylinder=(aTS1==GeomAbs_Cylinder)? aHS1->Cylinder() : aHS2->Cylinder(); + aTorus=(aTS1==GeomAbs_Torus)? aHS1->Torus() : aHS2->Torus(); // aRC=aCylinder.Radius(); aRT=aTorus.MinorRadius(); @@ -2492,14 +2493,14 @@ void ApproxParameters(const Handle(GeomAdaptor_HSurface)& aHS1, //function : Tolerances //purpose : //======================================================================= -void Tolerances(const Handle(GeomAdaptor_HSurface)& aHS1, - const Handle(GeomAdaptor_HSurface)& aHS2, +void Tolerances(const Handle(GeomAdaptor_Surface)& aHS1, + const Handle(GeomAdaptor_Surface)& aHS2, Standard_Real& aTolTang) { GeomAbs_SurfaceType aTS1, aTS2; // - aTS1=aHS1->Surface().GetType(); - aTS2=aHS2->Surface().GetType(); + aTS1=aHS1->GetType(); + aTS2=aHS2->GetType(); // // Cylinder/Torus if ((aTS1==GeomAbs_Cylinder && aTS2==GeomAbs_Torus) || @@ -2510,8 +2511,8 @@ void Tolerances(const Handle(GeomAdaptor_HSurface)& aHS1, // aPC=Precision::Confusion(); // - aCylinder=(aTS1==GeomAbs_Cylinder)? aHS1->Surface().Cylinder() : aHS2->Surface().Cylinder(); - aTorus=(aTS1==GeomAbs_Torus)? aHS1->Surface().Torus() : aHS2->Surface().Torus(); + aCylinder=(aTS1==GeomAbs_Cylinder)? aHS1->Cylinder() : aHS2->Cylinder(); + aTorus=(aTS1==GeomAbs_Torus)? aHS1->Torus() : aHS2->Torus(); // aRC=aCylinder.Radius(); aRT=aTorus.MinorRadius(); diff --git a/src/IntTools/IntTools_FaceFace.hxx b/src/IntTools/IntTools_FaceFace.hxx index 8e9d5501b7..dc035415cf 100644 --- a/src/IntTools/IntTools_FaceFace.hxx +++ b/src/IntTools/IntTools_FaceFace.hxx @@ -16,25 +16,16 @@ #ifndef _IntTools_FaceFace_HeaderFile #define _IntTools_FaceFace_HeaderFile -#include -#include -#include - -#include -#include +#include #include -#include -#include -#include -#include -#include +#include #include -class GeomAdaptor_HSurface; -class IntTools_Context; -class StdFail_NotDone; -class TopoDS_Face; -class Adaptor3d_TopolTool; +#include +#include +#include +class IntTools_Context; +class Adaptor3d_TopolTool; //! This class provides the intersection of //! face's underlying surfaces. @@ -125,8 +116,8 @@ protected: Standard_Boolean myIsDone; IntPatch_Intersection myIntersector; GeomInt_LineConstructor myLConstruct; - Handle(GeomAdaptor_HSurface) myHS1; - Handle(GeomAdaptor_HSurface) myHS2; + Handle(GeomAdaptor_Surface) myHS1; + Handle(GeomAdaptor_Surface) myHS2; Standard_Integer myNbrestr; Standard_Boolean myApprox; Standard_Boolean myApprox1; diff --git a/src/IntTools/IntTools_TopolTool.cxx b/src/IntTools/IntTools_TopolTool.cxx index bd2e031734..ca5c30a0a3 100644 --- a/src/IntTools/IntTools_TopolTool.cxx +++ b/src/IntTools/IntTools_TopolTool.cxx @@ -12,7 +12,7 @@ // commercial license or contractual agreement. -#include +#include #include #include #include @@ -50,7 +50,7 @@ IntTools_TopolTool::IntTools_TopolTool() // function: Constructor // purpose: // ===================================================================================== -IntTools_TopolTool::IntTools_TopolTool(const Handle(Adaptor3d_HSurface)& theSurface) +IntTools_TopolTool::IntTools_TopolTool(const Handle(Adaptor3d_Surface)& theSurface) { Initialize(theSurface); myNbSmplU = 0; @@ -72,7 +72,7 @@ void IntTools_TopolTool::Initialize() // function: Initialize // purpose: // ===================================================================================== -void IntTools_TopolTool::Initialize(const Handle(Adaptor3d_HSurface)& theSurface) +void IntTools_TopolTool::Initialize(const Handle(Adaptor3d_Surface)& theSurface) { Adaptor3d_TopolTool::Initialize(theSurface); //myS = theSurface; diff --git a/src/IntTools/IntTools_TopolTool.hxx b/src/IntTools/IntTools_TopolTool.hxx index 359383e5d1..b02df09593 100644 --- a/src/IntTools/IntTools_TopolTool.hxx +++ b/src/IntTools/IntTools_TopolTool.hxx @@ -16,14 +16,9 @@ #ifndef _IntTools_TopolTool_HeaderFile #define _IntTools_TopolTool_HeaderFile -#include -#include - -#include -#include #include -class Standard_DomainError; -class Adaptor3d_HSurface; +#include + class gp_Pnt2d; class gp_Pnt; @@ -45,7 +40,7 @@ public: //! Initializes me by surface - Standard_EXPORT IntTools_TopolTool(const Handle(Adaptor3d_HSurface)& theSurface); + Standard_EXPORT IntTools_TopolTool(const Handle(Adaptor3d_Surface)& theSurface); //! Redefined empty initializer @@ -56,7 +51,7 @@ public: //! Initializes me by surface - Standard_EXPORT virtual void Initialize (const Handle(Adaptor3d_HSurface)& theSurface) Standard_OVERRIDE; + Standard_EXPORT virtual void Initialize (const Handle(Adaptor3d_Surface)& theSurface) Standard_OVERRIDE; Standard_EXPORT virtual void ComputeSamplePoints() Standard_OVERRIDE; diff --git a/src/IntTools/IntTools_WLineTool.cxx b/src/IntTools/IntTools_WLineTool.cxx index bcd4f28298..8840fa1453 100644 --- a/src/IntTools/IntTools_WLineTool.cxx +++ b/src/IntTools/IntTools_WLineTool.cxx @@ -21,7 +21,6 @@ #include #include #include -#include #include #include #include @@ -234,8 +233,8 @@ Standard_Boolean IntTools_WLineTool::NotUseSurfacesForApprox(const TopoDS_Face& //purpose : static subfunction in ComputeTangentZones //======================================================================= static -Standard_Boolean CheckTangentZonesExist(const Handle(GeomAdaptor_HSurface)& theSurface1, - const Handle(GeomAdaptor_HSurface)& theSurface2) +Standard_Boolean CheckTangentZonesExist(const Handle(GeomAdaptor_Surface)& theSurface1, + const Handle(GeomAdaptor_Surface)& theSurface2) { if ( ( theSurface1->GetType() != GeomAbs_Torus ) || ( theSurface2->GetType() != GeomAbs_Torus ) ) @@ -264,8 +263,8 @@ Standard_Boolean CheckTangentZonesExist(const Handle(GeomAdaptor_HSurface)& theS //purpose : static subfunction in DecompositionOfWLine //======================================================================= static -Standard_Integer ComputeTangentZones( const Handle(GeomAdaptor_HSurface)& theSurface1, - const Handle(GeomAdaptor_HSurface)& theSurface2, +Standard_Integer ComputeTangentZones( const Handle(GeomAdaptor_Surface)& theSurface1, + const Handle(GeomAdaptor_Surface)& theSurface2, const TopoDS_Face& theFace1, const TopoDS_Face& theFace2, Handle(TColgp_HArray1OfPnt2d)& theResultOnS1, @@ -466,7 +465,7 @@ static Standard_Boolean IsInsideTanZone(const gp_Pnt2d& thePoint, const gp_Pnt2d& theTanZoneCenter, const Standard_Real theZoneRadius, - Handle(GeomAdaptor_HSurface) theGASurface) + Handle(GeomAdaptor_Surface) theGASurface) { Standard_Real aUResolution = theGASurface->UResolution( theZoneRadius ); Standard_Real aVResolution = theGASurface->VResolution( theZoneRadius ); @@ -485,7 +484,7 @@ Standard_Boolean IsInsideTanZone(const gp_Pnt2d& thePoint, static gp_Pnt2d AdjustByNeighbour(const gp_Pnt2d& theaNeighbourPoint, const gp_Pnt2d& theOriginalPoint, - Handle(GeomAdaptor_HSurface) theGASurface) + Handle(GeomAdaptor_Surface) theGASurface) { gp_Pnt2d ap1 = theaNeighbourPoint; gp_Pnt2d ap2 = theOriginalPoint; @@ -666,7 +665,7 @@ Standard_Boolean FindPoint(const gp_Pnt2d& theFirstPoint, const Standard_Real theVmax, const gp_Pnt2d& theTanZoneCenter, const Standard_Real theZoneRadius, - Handle(GeomAdaptor_HSurface) theGASurface, + Handle(GeomAdaptor_Surface) theGASurface, gp_Pnt2d& theNewPoint) { theNewPoint = theLastPoint; @@ -724,8 +723,8 @@ Standard_Boolean FindPoint(const gp_Pnt2d& theFirstPoint, //======================================================================= Standard_Boolean IntTools_WLineTool:: DecompositionOfWLine(const Handle(IntPatch_WLine)& theWLine, - const Handle(GeomAdaptor_HSurface)& theSurface1, - const Handle(GeomAdaptor_HSurface)& theSurface2, + const Handle(GeomAdaptor_Surface)& theSurface1, + const Handle(GeomAdaptor_Surface)& theSurface2, const TopoDS_Face& theFace1, const TopoDS_Face& theFace2, const GeomInt_LineConstructor& theLConstructor, @@ -786,8 +785,8 @@ Standard_Boolean IntTools_WLineTool:: // // Surface for(i = 0; i < 2; ++i) { - Handle(GeomAdaptor_HSurface) aGASurface = (!i) ? theSurface1 : theSurface2; - aGASurface->ChangeSurface().Surface()->Bounds(umin, umax, vmin, vmax); + Handle(GeomAdaptor_Surface) aGASurface = (!i) ? theSurface1 : theSurface2; + aGASurface->Surface()->Bounds(umin, umax, vmin, vmax); if(!i) { aPoint.ParametersOnS1(U, V); } @@ -919,9 +918,9 @@ Standard_Boolean IntTools_WLineTool:: // for(Standard_Integer surfit = 0; surfit < 2; surfit++) { - Handle(GeomAdaptor_HSurface) aGASurface = (surfit == 0) ? theSurface1 : theSurface2; + Handle(GeomAdaptor_Surface) aGASurface = (surfit == 0) ? theSurface1 : theSurface2; Standard_Real umin=0., umax=0., vmin=0., vmax=0.; - aGASurface->ChangeSurface().Surface()->Bounds(umin, umax, vmin, vmax); + aGASurface->Surface()->Bounds(umin, umax, vmin, vmax); Standard_Real U=0., V=0.; if(surfit == 0) @@ -1210,9 +1209,9 @@ Standard_Boolean IntTools_WLineTool:: Standard_Real aCriteria = theTol; GeomAPI_ProjectPointOnSurf& aProjector = (surfit == 0) ? aContext->ProjPS(theFace2) : aContext->ProjPS(theFace1); - Handle(GeomAdaptor_HSurface) aSurface = (surfit == 0) ? theSurface1 : theSurface2; + Handle(GeomAdaptor_Surface) aSurface = (surfit == 0) ? theSurface1 : theSurface2; - Handle(GeomAdaptor_HSurface) aSurfaceOther = (surfit == 0) ? theSurface2 : theSurface1; + Handle(GeomAdaptor_Surface) aSurfaceOther = (surfit == 0) ? theSurface2 : theSurface1; gp_Pnt aP3d = aSurface->Value(anewpoint.X(), anewpoint.Y()); aProjector.Perform(aP3d); @@ -1462,4 +1461,4 @@ Standard_Boolean IntTools_WLineTool:: return Standard_True; } -///////////////////// end of DecompositionOfWLine /////////////////////// \ No newline at end of file +///////////////////// end of DecompositionOfWLine /////////////////////// diff --git a/src/IntTools/IntTools_WLineTool.hxx b/src/IntTools/IntTools_WLineTool.hxx index a031857f8d..e31207bb1a 100644 --- a/src/IntTools/IntTools_WLineTool.hxx +++ b/src/IntTools/IntTools_WLineTool.hxx @@ -14,12 +14,11 @@ #ifndef _IntTools_WLineTool_HeaderFile #define _IntTools_WLineTool_HeaderFile -#include -#include +#include #include #include + class TopoDS_Face; -class GeomAdaptor_HSurface; class GeomInt_LineConstructor; class IntTools_Context; class Adaptor3d_TopolTool; @@ -40,8 +39,8 @@ public: Standard_EXPORT static Standard_Boolean DecompositionOfWLine(const Handle(IntPatch_WLine)& theWLine, - const Handle(GeomAdaptor_HSurface)& theSurface1, - const Handle(GeomAdaptor_HSurface)& theSurface2, + const Handle(GeomAdaptor_Surface)& theSurface1, + const Handle(GeomAdaptor_Surface)& theSurface2, const TopoDS_Face& theFace1, const TopoDS_Face& theFace2, const GeomInt_LineConstructor& theLConstructor, diff --git a/src/IntWalk/IntWalk_PWalking.cxx b/src/IntWalk/IntWalk_PWalking.cxx index e772631af4..2b022876da 100644 --- a/src/IntWalk/IntWalk_PWalking.cxx +++ b/src/IntWalk/IntWalk_PWalking.cxx @@ -13,7 +13,7 @@ // commercial license or contractual agreement. -#include +#include #include #include #include @@ -44,9 +44,9 @@ void IntWalk_PWalking::ComputePasInit(const Standard_Real theDeltaU1, { const Standard_Real aRangePart = 0.01; const Standard_Real Increment = 2.0*pasMax; - const Handle(Adaptor3d_HSurface)& + const Handle(Adaptor3d_Surface)& Caro1 = myIntersectionOn2S.Function().AuxillarSurface1(); - const Handle(Adaptor3d_HSurface)& + const Handle(Adaptor3d_Surface)& Caro2 = myIntersectionOn2S.Function().AuxillarSurface2(); const Standard_Real aDeltaU1=Abs(UM1-Um1); @@ -192,8 +192,8 @@ static Standard_Boolean AdjustToDomain(const Standard_Integer theNbElem, // function : IntWalk_PWalking::IntWalk_PWalking // purpose : //================================================================================== -IntWalk_PWalking::IntWalk_PWalking(const Handle(Adaptor3d_HSurface)& Caro1, - const Handle(Adaptor3d_HSurface)& Caro2, +IntWalk_PWalking::IntWalk_PWalking(const Handle(Adaptor3d_Surface)& Caro1, + const Handle(Adaptor3d_Surface)& Caro2, const Standard_Real TolTangency, const Standard_Real Epsilon, const Standard_Real Deflection, @@ -339,8 +339,8 @@ STATIC_PRECEDENT_INFLEXION(0) // function : IntWalk_PWalking // purpose : //================================================================================== -IntWalk_PWalking::IntWalk_PWalking(const Handle(Adaptor3d_HSurface)& Caro1, - const Handle(Adaptor3d_HSurface)& Caro2, +IntWalk_PWalking::IntWalk_PWalking(const Handle(Adaptor3d_Surface)& Caro1, + const Handle(Adaptor3d_Surface)& Caro2, const Standard_Real TolTangency, const Standard_Real Epsilon, const Standard_Real Deflection, @@ -572,8 +572,8 @@ static Standard_Real SQDistPointSurface(const gp_Pnt &thePnt, // Checks if any point in one surface lie in another surface // (with given tolerance) //================================================================================== -static Standard_Boolean IsTangentExtCheck(const Handle(Adaptor3d_HSurface)& theSurf1, - const Handle(Adaptor3d_HSurface)& theSurf2, +static Standard_Boolean IsTangentExtCheck(const Handle(Adaptor3d_Surface)& theSurf1, + const Handle(Adaptor3d_Surface)& theSurf2, const Standard_Real theU10, const Standard_Real theV10, const Standard_Real theU20, @@ -621,7 +621,7 @@ static Standard_Boolean IsTangentExtCheck(const Handle(Adaptor3d_HSurface)& theS for(Standard_Integer i = 0; i < aNbItems; i++) { gp_Pnt aP(theSurf1->Value(aParUS1[i], aParVS1[i])); - const Standard_Real aSqDist = SQDistPointSurface(aP, theSurf2->Surface(), theU20, theV20); + const Standard_Real aSqDist = SQDistPointSurface(aP, *theSurf2, theU20, theV20); if(aSqDist > aSQToler) return Standard_False; } @@ -629,7 +629,7 @@ static Standard_Boolean IsTangentExtCheck(const Handle(Adaptor3d_HSurface)& theS for(Standard_Integer i = 0; i < aNbItems; i++) { gp_Pnt aP(theSurf2->Value(aParUS2[i], aParVS2[i])); - const Standard_Real aSqDist = SQDistPointSurface(aP, theSurf1->Surface(), theU10, theV10); + const Standard_Real aSqDist = SQDistPointSurface(aP, *theSurf1, theU10, theV10); if(aSqDist > aSQToler) return Standard_False; } @@ -662,8 +662,8 @@ void IntWalk_PWalking::Perform(const TColStd_Array1OfReal& ParDep, done = Standard_False; // // Caro1 and Caro2 - const Handle(Adaptor3d_HSurface)& Caro1 =myIntersectionOn2S.Function().AuxillarSurface1(); - const Handle(Adaptor3d_HSurface)& Caro2 =myIntersectionOn2S.Function().AuxillarSurface2(); + const Handle(Adaptor3d_Surface)& Caro1 =myIntersectionOn2S.Function().AuxillarSurface1(); + const Handle(Adaptor3d_Surface)& Caro2 =myIntersectionOn2S.Function().AuxillarSurface2(); // const Standard_Real UFirst1 = Adaptor3d_HSurfaceTool::FirstUParameter(Caro1); const Standard_Real VFirst1 = Adaptor3d_HSurfaceTool::FirstVParameter(Caro1); @@ -2086,8 +2086,8 @@ Standard_Boolean IntWalk_PWalking::ExtendLineInCommonZone(const IntImp_ConstIsop // theInit should be initialized before function calling. //======================================================================= Standard_Boolean IntWalk_PWalking:: -DistanceMinimizeByGradient( const Handle(Adaptor3d_HSurface)& theASurf1, - const Handle(Adaptor3d_HSurface)& theASurf2, +DistanceMinimizeByGradient( const Handle(Adaptor3d_Surface)& theASurf1, + const Handle(Adaptor3d_Surface)& theASurf2, TColStd_Array1OfReal& theInit, const Standard_Real* theStep0) { @@ -2222,7 +2222,7 @@ DistanceMinimizeByGradient( const Handle(Adaptor3d_HSurface)& theASurf1, // before the function calling. //======================================================================= Standard_Boolean IntWalk_PWalking:: -DistanceMinimizeByExtrema(const Handle(Adaptor3d_HSurface)& theASurf, +DistanceMinimizeByExtrema(const Handle(Adaptor3d_Surface)& theASurf, const gp_Pnt& theP0, Standard_Real& theU0, Standard_Real& theV0, @@ -2279,8 +2279,8 @@ DistanceMinimizeByExtrema(const Handle(Adaptor3d_HSurface)& theASurf, //function : HandleSingleSingularPoint //purpose : //======================================================================= -Standard_Boolean IntWalk_PWalking::HandleSingleSingularPoint(const Handle(Adaptor3d_HSurface)& theASurf1, - const Handle(Adaptor3d_HSurface)& theASurf2, +Standard_Boolean IntWalk_PWalking::HandleSingleSingularPoint(const Handle(Adaptor3d_Surface)& theASurf1, + const Handle(Adaptor3d_Surface)& theASurf2, const Standard_Real the3DTol, TColStd_Array1OfReal &thePnt) { @@ -2341,8 +2341,8 @@ Standard_Boolean IntWalk_PWalking::HandleSingleSingularPoint(const Handle(Adapto //purpose : //======================================================================= Standard_Boolean IntWalk_PWalking:: - SeekPointOnBoundary(const Handle(Adaptor3d_HSurface)& theASurf1, - const Handle(Adaptor3d_HSurface)& theASurf2, + SeekPointOnBoundary(const Handle(Adaptor3d_Surface)& theASurf1, + const Handle(Adaptor3d_Surface)& theASurf2, const Standard_Real theU1, const Standard_Real theV1, const Standard_Real theU2, @@ -2555,8 +2555,8 @@ Standard_Boolean IntWalk_PWalking:: //purpose : //======================================================================= Standard_Boolean IntWalk_PWalking:: -PutToBoundary(const Handle(Adaptor3d_HSurface)& theASurf1, - const Handle(Adaptor3d_HSurface)& theASurf2) +PutToBoundary(const Handle(Adaptor3d_Surface)& theASurf1, + const Handle(Adaptor3d_Surface)& theASurf2) { const Standard_Real aTolMin = Precision::Confusion(); @@ -2768,8 +2768,8 @@ PutToBoundary(const Handle(Adaptor3d_HSurface)& theASurf1, //purpose : //======================================================================= Standard_Boolean IntWalk_PWalking:: -SeekAdditionalPoints( const Handle(Adaptor3d_HSurface)& theASurf1, - const Handle(Adaptor3d_HSurface)& theASurf2, +SeekAdditionalPoints( const Handle(Adaptor3d_Surface)& theASurf1, + const Handle(Adaptor3d_Surface)& theASurf2, const Standard_Integer theMinNbPoints) { const Standard_Real aTol = 1.0e-14; @@ -3026,8 +3026,8 @@ IntWalk_StatusDeflection IntWalk_PWalking::TestDeflection(const IntImp_ConstIso Standard_Real FlecheCourante , Ratio = 1.0; // Caro1 and Caro2 - const Handle(Adaptor3d_HSurface)& Caro1 = myIntersectionOn2S.Function().AuxillarSurface1(); - const Handle(Adaptor3d_HSurface)& Caro2 = myIntersectionOn2S.Function().AuxillarSurface2(); + const Handle(Adaptor3d_Surface)& Caro1 = myIntersectionOn2S.Function().AuxillarSurface1(); + const Handle(Adaptor3d_Surface)& Caro2 = myIntersectionOn2S.Function().AuxillarSurface2(); const IntSurf_PntOn2S& CurrentPoint = myIntersectionOn2S.Point(); //================================================================================== diff --git a/src/IntWalk/IntWalk_PWalking.hxx b/src/IntWalk/IntWalk_PWalking.hxx index fcadb1f242..ccd492f986 100644 --- a/src/IntWalk/IntWalk_PWalking.hxx +++ b/src/IntWalk/IntWalk_PWalking.hxx @@ -17,28 +17,17 @@ #ifndef _IntWalk_PWalking_HeaderFile #define _IntWalk_PWalking_HeaderFile -#include -#include -#include - -#include -#include +#include #include -#include #include #include #include #include #include #include -class IntSurf_LineOn2S; -class Standard_OutOfRange; -class StdFail_NotDone; -class Adaptor3d_HSurface; -class IntSurf_PntOn2S; -class gp_Dir; -class gp_Pnt; +class IntSurf_LineOn2S; +class gp_Pnt; //! This class implements an algorithm to determine the //! intersection between 2 parametrized surfaces, marching from @@ -66,8 +55,8 @@ public: //! border of one of the domains. If an open line //! stops at the middle of a domain, one stops at the tangent point. //! Epsilon is SquareTolerance of points confusion. - Standard_EXPORT IntWalk_PWalking(const Handle(Adaptor3d_HSurface)& Caro1, - const Handle(Adaptor3d_HSurface)& Caro2, + Standard_EXPORT IntWalk_PWalking(const Handle(Adaptor3d_Surface)& Caro1, + const Handle(Adaptor3d_Surface)& Caro2, const Standard_Real TolTangency, const Standard_Real Epsilon, const Standard_Real Deflection, @@ -86,8 +75,8 @@ public: //! border of one of the domains. If an open line //! stops at the middle of a domain, one stops at the tangent point. //! Epsilon is SquareTolerance of points confusion. - Standard_EXPORT IntWalk_PWalking(const Handle(Adaptor3d_HSurface)& Caro1, - const Handle(Adaptor3d_HSurface)& Caro2, + Standard_EXPORT IntWalk_PWalking(const Handle(Adaptor3d_Surface)& Caro1, + const Handle(Adaptor3d_Surface)& Caro2, const Standard_Real TolTangency, const Standard_Real Epsilon, const Standard_Real Deflection, @@ -185,11 +174,11 @@ public: line->RemovePoint(anIdx); } - Standard_EXPORT Standard_Boolean PutToBoundary (const Handle(Adaptor3d_HSurface)& theASurf1, - const Handle(Adaptor3d_HSurface)& theASurf2); + Standard_EXPORT Standard_Boolean PutToBoundary (const Handle(Adaptor3d_Surface)& theASurf1, + const Handle(Adaptor3d_Surface)& theASurf2); - Standard_EXPORT Standard_Boolean SeekAdditionalPoints (const Handle(Adaptor3d_HSurface)& theASurf1, - const Handle(Adaptor3d_HSurface)& theASurf2, + Standard_EXPORT Standard_Boolean SeekAdditionalPoints (const Handle(Adaptor3d_Surface)& theASurf1, + const Handle(Adaptor3d_Surface)& theASurf2, const Standard_Integer theMinNbPoints); Standard_Real MaxStep(Standard_Integer theIndex) @@ -211,8 +200,8 @@ protected: //! Arrays theInit (initial point to be precise) and theStep0 (steps-array) must contain //! four items and must be filled strictly in following order: //! {U-parameter on S1, V-parameter on S1, U-parameter on S2, V-parameter on S2} - Standard_EXPORT Standard_Boolean DistanceMinimizeByGradient(const Handle(Adaptor3d_HSurface)& theASurf1, - const Handle(Adaptor3d_HSurface)& theASurf2, + Standard_EXPORT Standard_Boolean DistanceMinimizeByGradient(const Handle(Adaptor3d_Surface)& theASurf1, + const Handle(Adaptor3d_Surface)& theASurf2, TColStd_Array1OfReal& theInit, const Standard_Real* theStep0 = 0); @@ -221,7 +210,7 @@ protected: //! parameters on theASurf. Their values are changed while algorithm being launched. //! Array theStep0 (steps-array) must contain two items and must be filled strictly in following order: //! {U-parameter, V-parameter} - Standard_EXPORT Standard_Boolean DistanceMinimizeByExtrema (const Handle(Adaptor3d_HSurface)& theASurf, + Standard_EXPORT Standard_Boolean DistanceMinimizeByExtrema (const Handle(Adaptor3d_Surface)& theASurf, const gp_Pnt& theP0, Standard_Real& theU0, Standard_Real& theV0, @@ -238,8 +227,8 @@ protected: //! (in order to obtain correct result after insertion). //! Returns TRUE in case of success adding (i.e. can return FALSE even after //! removing some points). - Standard_EXPORT Standard_Boolean SeekPointOnBoundary (const Handle(Adaptor3d_HSurface)& theASurf1, - const Handle(Adaptor3d_HSurface)& theASurf2, + Standard_EXPORT Standard_Boolean SeekPointOnBoundary (const Handle(Adaptor3d_Surface)& theASurf1, + const Handle(Adaptor3d_Surface)& theASurf2, const Standard_Real theU1, const Standard_Real theV1, const Standard_Real theU2, @@ -248,8 +237,8 @@ protected: // Method to handle single singular point. Sub-method in SeekPointOnBoundary. - Standard_EXPORT Standard_Boolean HandleSingleSingularPoint(const Handle(Adaptor3d_HSurface) &theASurf1, - const Handle(Adaptor3d_HSurface) &theASurf2, + Standard_EXPORT Standard_Boolean HandleSingleSingularPoint(const Handle(Adaptor3d_Surface) &theASurf1, + const Handle(Adaptor3d_Surface) &theASurf2, const Standard_Real the3DTol, TColStd_Array1OfReal &thePnt); diff --git a/src/IntWalk/IntWalk_TheFunctionOfTheInt2S.hxx b/src/IntWalk/IntWalk_TheFunctionOfTheInt2S.hxx index ec8b285b02..c1bbc98356 100644 --- a/src/IntWalk/IntWalk_TheFunctionOfTheInt2S.hxx +++ b/src/IntWalk/IntWalk_TheFunctionOfTheInt2S.hxx @@ -17,30 +17,19 @@ #ifndef _IntWalk_TheFunctionOfTheInt2S_HeaderFile #define _IntWalk_TheFunctionOfTheInt2S_HeaderFile -#include -#include -#include - -#include +#include #include -#include -#include #include #include #include -#include #include #include #include #include -class StdFail_UndefinedDerivative; -class Standard_ConstructionError; -class Adaptor3d_HSurface; + class Adaptor3d_HSurfaceTool; class math_Matrix; - - class IntWalk_TheFunctionOfTheInt2S : public math_FunctionSetWithDerivatives { public: @@ -48,7 +37,7 @@ public: DEFINE_STANDARD_ALLOC - Standard_EXPORT IntWalk_TheFunctionOfTheInt2S(const Handle(Adaptor3d_HSurface)& S1, const Handle(Adaptor3d_HSurface)& S2); + Standard_EXPORT IntWalk_TheFunctionOfTheInt2S(const Handle(Adaptor3d_Surface)& S1, const Handle(Adaptor3d_Surface)& S2); Standard_EXPORT Standard_Integer NbVariables() const; @@ -75,9 +64,9 @@ public: gp_Dir2d DirectionOnS2() const; - const Handle(Adaptor3d_HSurface)& AuxillarSurface1() const; + const Handle(Adaptor3d_Surface)& AuxillarSurface1() const; - const Handle(Adaptor3d_HSurface)& AuxillarSurface2() const; + const Handle(Adaptor3d_Surface)& AuxillarSurface2() const; @@ -119,8 +108,8 @@ private: }; -#define ThePSurface Handle(Adaptor3d_HSurface) -#define ThePSurface_hxx +#define ThePSurface Handle(Adaptor3d_Surface) +#define ThePSurface_hxx #define ThePSurfaceTool Adaptor3d_HSurfaceTool #define ThePSurfaceTool_hxx #define IntImp_ZerParFunc IntWalk_TheFunctionOfTheInt2S diff --git a/src/IntWalk/IntWalk_TheFunctionOfTheInt2S_0.cxx b/src/IntWalk/IntWalk_TheFunctionOfTheInt2S_0.cxx index e3d8deb267..9646f69f43 100644 --- a/src/IntWalk/IntWalk_TheFunctionOfTheInt2S_0.cxx +++ b/src/IntWalk/IntWalk_TheFunctionOfTheInt2S_0.cxx @@ -18,13 +18,13 @@ #include #include -#include +#include #include #include -#define ThePSurface Handle(Adaptor3d_HSurface) -#define ThePSurface_hxx +#define ThePSurface Handle(Adaptor3d_Surface) +#define ThePSurface_hxx #define ThePSurfaceTool Adaptor3d_HSurfaceTool #define ThePSurfaceTool_hxx #define IntImp_ZerParFunc IntWalk_TheFunctionOfTheInt2S diff --git a/src/IntWalk/IntWalk_TheInt2S.hxx b/src/IntWalk/IntWalk_TheInt2S.hxx index 871b490e71..32ca221f82 100644 --- a/src/IntWalk/IntWalk_TheInt2S.hxx +++ b/src/IntWalk/IntWalk_TheInt2S.hxx @@ -17,11 +17,7 @@ #ifndef _IntWalk_TheInt2S_HeaderFile #define _IntWalk_TheInt2S_HeaderFile -#include -#include -#include - -#include +#include #include #include #include @@ -29,19 +25,9 @@ #include #include #include -class StdFail_NotDone; -class Standard_DomainError; -class Standard_ConstructionError; -class StdFail_UndefinedDerivative; -class Adaptor3d_HSurface; + class Adaptor3d_HSurfaceTool; -class IntWalk_TheFunctionOfTheInt2S; class math_FunctionSetRoot; -class IntSurf_PntOn2S; -class gp_Dir; -class gp_Dir2d; - - class IntWalk_TheInt2S { @@ -50,7 +36,7 @@ public: DEFINE_STANDARD_ALLOC //! compute the solution point with the close point - Standard_EXPORT IntWalk_TheInt2S(const TColStd_Array1OfReal& Param, const Handle(Adaptor3d_HSurface)& S1, const Handle(Adaptor3d_HSurface)& S2, const Standard_Real TolTangency); + Standard_EXPORT IntWalk_TheInt2S(const TColStd_Array1OfReal& Param, const Handle(Adaptor3d_Surface)& S1, const Handle(Adaptor3d_Surface)& S2, const Standard_Real TolTangency); //! initialize the parameters to compute the solution point //! it 's possible to write to optimize: @@ -62,7 +48,7 @@ public: //! param(3)=... //! inter.Perform(Param,rsnld); //! } - Standard_EXPORT IntWalk_TheInt2S(const Handle(Adaptor3d_HSurface)& S1, const Handle(Adaptor3d_HSurface)& S2, const Standard_Real TolTangency); + Standard_EXPORT IntWalk_TheInt2S(const Handle(Adaptor3d_Surface)& S1, const Handle(Adaptor3d_Surface)& S2, const Standard_Real TolTangency); //! returns the best constant isoparametric to find //! the next intersection's point +stores the solution @@ -148,8 +134,8 @@ private: }; -#define ThePSurface Handle(Adaptor3d_HSurface) -#define ThePSurface_hxx +#define ThePSurface Handle(Adaptor3d_Surface) +#define ThePSurface_hxx #define ThePSurfaceTool Adaptor3d_HSurfaceTool #define ThePSurfaceTool_hxx #define IntImp_TheFunction IntWalk_TheFunctionOfTheInt2S diff --git a/src/IntWalk/IntWalk_TheInt2S_0.cxx b/src/IntWalk/IntWalk_TheInt2S_0.cxx index 2815fb087b..a9e59f5dcb 100644 --- a/src/IntWalk/IntWalk_TheInt2S_0.cxx +++ b/src/IntWalk/IntWalk_TheInt2S_0.cxx @@ -20,7 +20,7 @@ #include #include #include -#include +#include #include #include #include @@ -29,8 +29,8 @@ #include -#define ThePSurface Handle(Adaptor3d_HSurface) -#define ThePSurface_hxx +#define ThePSurface Handle(Adaptor3d_Surface) +#define ThePSurface_hxx #define ThePSurfaceTool Adaptor3d_HSurfaceTool #define ThePSurfaceTool_hxx #define IntImp_TheFunction IntWalk_TheFunctionOfTheInt2S diff --git a/src/LProp3d/LProp3d_CLProps.hxx b/src/LProp3d/LProp3d_CLProps.hxx index 4a11aeaa29..22eab521dc 100644 --- a/src/LProp3d/LProp3d_CLProps.hxx +++ b/src/LProp3d/LProp3d_CLProps.hxx @@ -16,18 +16,12 @@ #ifndef _LProp3d_CLProps_HeaderFile #define _LProp3d_CLProps_HeaderFile -#include -#include -#include - -#include -#include +#include #include #include #include #include -#include -class Adaptor3d_HCurve; + class LProp_BadContinuity; class Standard_DomainError; class Standard_OutOfRange; @@ -55,12 +49,12 @@ public: //! only the tangent, N should be equal to 1. //! is the linear tolerance (it is used to test //! if a vector is null). - Standard_EXPORT LProp3d_CLProps(const Handle(Adaptor3d_HCurve)& C, const Standard_Integer N, const Standard_Real Resolution); + Standard_EXPORT LProp3d_CLProps(const Handle(Adaptor3d_Curve)& C, const Standard_Integer N, const Standard_Real Resolution); //! Same as previous constructor but here the parameter is //! set to the value . //! All the computations done will be related to and . - Standard_EXPORT LProp3d_CLProps(const Handle(Adaptor3d_HCurve)& C, const Standard_Real U, const Standard_Integer N, const Standard_Real Resolution); + Standard_EXPORT LProp3d_CLProps(const Handle(Adaptor3d_Curve)& C, const Standard_Real U, const Standard_Integer N, const Standard_Real Resolution); //! Same as previous constructor but here the parameter is //! set to the value and the curve is set @@ -76,7 +70,7 @@ public: //! Initializes the local properties of the curve //! for the new curve. - Standard_EXPORT void SetCurve (const Handle(Adaptor3d_HCurve)& C); + Standard_EXPORT void SetCurve (const Handle(Adaptor3d_Curve)& C); //! Returns the Point. Standard_EXPORT const gp_Pnt& Value() const; @@ -123,7 +117,7 @@ private: - Handle(Adaptor3d_HCurve) myCurve; + Handle(Adaptor3d_Curve) myCurve; Standard_Real myU; Standard_Integer myDerOrder; Standard_Real myCN; diff --git a/src/LProp3d/LProp3d_CLProps_0.cxx b/src/LProp3d/LProp3d_CLProps_0.cxx index 55ac3c9f15..53f50480f8 100644 --- a/src/LProp3d/LProp3d_CLProps_0.cxx +++ b/src/LProp3d/LProp3d_CLProps_0.cxx @@ -15,7 +15,7 @@ #include -#include +#include #include #include #include @@ -26,8 +26,8 @@ #include -#define Curve Handle(Adaptor3d_HCurve) -#define Curve_hxx +#define Curve Handle(Adaptor3d_Curve) +#define Curve_hxx #define Vec gp_Vec #define Vec_hxx #define Pnt gp_Pnt diff --git a/src/LProp3d/LProp3d_CurveTool.cxx b/src/LProp3d/LProp3d_CurveTool.cxx index 5b591b5537..49eee2bea5 100644 --- a/src/LProp3d/LProp3d_CurveTool.cxx +++ b/src/LProp3d/LProp3d_CurveTool.cxx @@ -15,7 +15,7 @@ // commercial license or contractual agreement. -#include +#include #include #include #include @@ -24,7 +24,7 @@ //function : Value //purpose : //======================================================================= -void LProp3d_CurveTool::Value(const Handle(Adaptor3d_HCurve)& C, +void LProp3d_CurveTool::Value(const Handle(Adaptor3d_Curve)& C, const Standard_Real U, gp_Pnt& P) { @@ -37,7 +37,7 @@ void LProp3d_CurveTool::Value(const Handle(Adaptor3d_HCurve)& C, //purpose : //======================================================================= -void LProp3d_CurveTool::D1(const Handle(Adaptor3d_HCurve)& C, +void LProp3d_CurveTool::D1(const Handle(Adaptor3d_Curve)& C, const Standard_Real U, gp_Pnt& P, gp_Vec& V1) @@ -51,7 +51,7 @@ void LProp3d_CurveTool::D1(const Handle(Adaptor3d_HCurve)& C, //purpose : //======================================================================= -void LProp3d_CurveTool::D2(const Handle(Adaptor3d_HCurve)& C, +void LProp3d_CurveTool::D2(const Handle(Adaptor3d_Curve)& C, const Standard_Real U, gp_Pnt& P, gp_Vec& V1, @@ -66,7 +66,7 @@ void LProp3d_CurveTool::D2(const Handle(Adaptor3d_HCurve)& C, //purpose : //======================================================================= -void LProp3d_CurveTool::D3(const Handle(Adaptor3d_HCurve)& C, +void LProp3d_CurveTool::D3(const Handle(Adaptor3d_Curve)& C, const Standard_Real U, gp_Pnt& P, gp_Vec& V1, @@ -83,7 +83,7 @@ void LProp3d_CurveTool::D3(const Handle(Adaptor3d_HCurve)& C, //======================================================================= Standard_Integer LProp3d_CurveTool::Continuity - (const Handle(Adaptor3d_HCurve)& C) + (const Handle(Adaptor3d_Curve)& C) { GeomAbs_Shape s = C->Continuity(); switch (s) { @@ -112,7 +112,7 @@ Standard_Integer LProp3d_CurveTool::Continuity //======================================================================= Standard_Real LProp3d_CurveTool::FirstParameter - (const Handle(Adaptor3d_HCurve)& C) + (const Handle(Adaptor3d_Curve)& C) { return C->FirstParameter(); } @@ -124,7 +124,7 @@ Standard_Real LProp3d_CurveTool::FirstParameter //======================================================================= Standard_Real LProp3d_CurveTool::LastParameter - (const Handle(Adaptor3d_HCurve)& C) + (const Handle(Adaptor3d_Curve)& C) { return C->LastParameter(); } diff --git a/src/LProp3d/LProp3d_CurveTool.hxx b/src/LProp3d/LProp3d_CurveTool.hxx index 9c8fb124c9..b538066e83 100644 --- a/src/LProp3d/LProp3d_CurveTool.hxx +++ b/src/LProp3d/LProp3d_CurveTool.hxx @@ -22,7 +22,7 @@ #include #include -class Adaptor3d_HCurve; + class gp_Pnt; class gp_Vec; @@ -36,33 +36,33 @@ public: //! Computes the point

of parameter on the HCurve . - Standard_EXPORT static void Value (const Handle(Adaptor3d_HCurve)& C, const Standard_Real U, gp_Pnt& P); + Standard_EXPORT static void Value (const Handle(Adaptor3d_Curve)& C, const Standard_Real U, gp_Pnt& P); //! Computes the point

and first derivative of //! parameter on the HCurve . - Standard_EXPORT static void D1 (const Handle(Adaptor3d_HCurve)& C, const Standard_Real U, gp_Pnt& P, gp_Vec& V1); + Standard_EXPORT static void D1 (const Handle(Adaptor3d_Curve)& C, const Standard_Real U, gp_Pnt& P, gp_Vec& V1); //! Computes the point

, the first derivative and second //! derivative of parameter on the HCurve . - Standard_EXPORT static void D2 (const Handle(Adaptor3d_HCurve)& C, const Standard_Real U, gp_Pnt& P, gp_Vec& V1, gp_Vec& V2); + Standard_EXPORT static void D2 (const Handle(Adaptor3d_Curve)& C, const Standard_Real U, gp_Pnt& P, gp_Vec& V1, gp_Vec& V2); //! Computes the point

, the first derivative , the //! second derivative and third derivative of //! parameter on the HCurve . - Standard_EXPORT static void D3 (const Handle(Adaptor3d_HCurve)& C, const Standard_Real U, gp_Pnt& P, gp_Vec& V1, gp_Vec& V2, gp_Vec& V3); + Standard_EXPORT static void D3 (const Handle(Adaptor3d_Curve)& C, const Standard_Real U, gp_Pnt& P, gp_Vec& V1, gp_Vec& V2, gp_Vec& V3); //! returns the order of continuity of the HCurve . //! returns 1 : first derivative only is computable //! returns 2 : first and second derivative only are computable. //! returns 3 : first, second and third are computable. - Standard_EXPORT static Standard_Integer Continuity (const Handle(Adaptor3d_HCurve)& C); + Standard_EXPORT static Standard_Integer Continuity (const Handle(Adaptor3d_Curve)& C); //! returns the first parameter bound of the HCurve. - Standard_EXPORT static Standard_Real FirstParameter (const Handle(Adaptor3d_HCurve)& C); + Standard_EXPORT static Standard_Real FirstParameter (const Handle(Adaptor3d_Curve)& C); //! returns the last parameter bound of the HCurve. //! FirstParameter must be less than LastParamenter. - Standard_EXPORT static Standard_Real LastParameter (const Handle(Adaptor3d_HCurve)& C); + Standard_EXPORT static Standard_Real LastParameter (const Handle(Adaptor3d_Curve)& C); diff --git a/src/LProp3d/LProp3d_SLProps.hxx b/src/LProp3d/LProp3d_SLProps.hxx index 6e950ee8fc..b1882a34b9 100644 --- a/src/LProp3d/LProp3d_SLProps.hxx +++ b/src/LProp3d/LProp3d_SLProps.hxx @@ -16,28 +16,8 @@ #ifndef _LProp3d_SLProps_HeaderFile #define _LProp3d_SLProps_HeaderFile -#include -#include -#include - -#include -#include -#include -#include -#include +#include #include -#include -class Adaptor3d_HSurface; -class LProp_BadContinuity; -class Standard_DomainError; -class Standard_OutOfRange; -class LProp_NotDefined; -class LProp3d_SurfaceTool; -class gp_Pnt; -class gp_Vec; -class gp_Dir; - - class LProp3d_SLProps { @@ -56,11 +36,11 @@ public: //! only the tangent, N should be equal to 1. //! is the linear tolerance (it is used to test //! if a vector is null). - Standard_EXPORT LProp3d_SLProps(const Handle(Adaptor3d_HSurface)& S, const Standard_Real U, const Standard_Real V, const Standard_Integer N, const Standard_Real Resolution); + Standard_EXPORT LProp3d_SLProps(const Handle(Adaptor3d_Surface)& S, const Standard_Real U, const Standard_Real V, const Standard_Integer N, const Standard_Real Resolution); //! idem as previous constructor but without setting the value //! of parameters and . - Standard_EXPORT LProp3d_SLProps(const Handle(Adaptor3d_HSurface)& S, const Standard_Integer N, const Standard_Real Resolution); + Standard_EXPORT LProp3d_SLProps(const Handle(Adaptor3d_Surface)& S, const Standard_Integer N, const Standard_Real Resolution); //! idem as previous constructor but without setting the value //! of parameters and and the surface. @@ -69,7 +49,7 @@ public: //! Initializes the local properties of the surface S //! for the new surface. - Standard_EXPORT void SetSurface (const Handle(Adaptor3d_HSurface)& S); + Standard_EXPORT void SetSurface (const Handle(Adaptor3d_Surface)& S); //! Initializes the local properties of the surface S //! for the new parameter values (, ). @@ -143,20 +123,9 @@ public: //! Returns the Gaussian curvature Standard_EXPORT Standard_Real GaussianCurvature(); - - - -protected: - - - - - private: - - - Handle(Adaptor3d_HSurface) mySurf; + Handle(Adaptor3d_Surface) mySurf; Standard_Real myU; Standard_Real myV; Standard_Integer myDerOrder; @@ -182,13 +151,6 @@ private: LProp_Status myNormalStatus; LProp_Status myCurvatureStatus; - }; - - - - - - #endif // _LProp3d_SLProps_HeaderFile diff --git a/src/LProp3d/LProp3d_SLProps_0.cxx b/src/LProp3d/LProp3d_SLProps_0.cxx index ec5d0722fb..8daf03b6db 100644 --- a/src/LProp3d/LProp3d_SLProps_0.cxx +++ b/src/LProp3d/LProp3d_SLProps_0.cxx @@ -15,7 +15,7 @@ #include -#include +#include #include #include #include @@ -26,8 +26,8 @@ #include -#define Surface Handle(Adaptor3d_HSurface) -#define Surface_hxx +#define Surface Handle(Adaptor3d_Surface) +#define Surface_hxx #define Tool LProp3d_SurfaceTool #define Tool_hxx #define LProp_SLProps LProp3d_SLProps diff --git a/src/LProp3d/LProp3d_SurfaceTool.cxx b/src/LProp3d/LProp3d_SurfaceTool.cxx index 6eb5c732f7..5208108b28 100644 --- a/src/LProp3d/LProp3d_SurfaceTool.cxx +++ b/src/LProp3d/LProp3d_SurfaceTool.cxx @@ -15,7 +15,7 @@ // commercial license or contractual agreement. -#include +#include #include #include #include @@ -24,7 +24,7 @@ //function : Value //purpose : //======================================================================= -void LProp3d_SurfaceTool::Value(const Handle(Adaptor3d_HSurface)& S, +void LProp3d_SurfaceTool::Value(const Handle(Adaptor3d_Surface)& S, const Standard_Real U, const Standard_Real V, gp_Pnt& P) @@ -38,7 +38,7 @@ void LProp3d_SurfaceTool::Value(const Handle(Adaptor3d_HSurface)& S, //purpose : //======================================================================= -void LProp3d_SurfaceTool::D1(const Handle(Adaptor3d_HSurface)& S, +void LProp3d_SurfaceTool::D1(const Handle(Adaptor3d_Surface)& S, const Standard_Real U, const Standard_Real V, gp_Pnt& P, @@ -54,7 +54,7 @@ void LProp3d_SurfaceTool::D1(const Handle(Adaptor3d_HSurface)& S, //purpose : //======================================================================= -void LProp3d_SurfaceTool::D2(const Handle(Adaptor3d_HSurface)& S, +void LProp3d_SurfaceTool::D2(const Handle(Adaptor3d_Surface)& S, const Standard_Real U, const Standard_Real V, gp_Pnt& P, @@ -71,7 +71,7 @@ void LProp3d_SurfaceTool::D2(const Handle(Adaptor3d_HSurface)& S, //function : DN //purpose : //======================================================================= -gp_Vec LProp3d_SurfaceTool::DN(const Handle(Adaptor3d_HSurface)& S, +gp_Vec LProp3d_SurfaceTool::DN(const Handle(Adaptor3d_Surface)& S, const Standard_Real U, const Standard_Real V, const Standard_Integer IU, @@ -87,7 +87,7 @@ gp_Vec LProp3d_SurfaceTool::DN(const Handle(Adaptor3d_HSurface)& S, //======================================================================= Standard_Integer LProp3d_SurfaceTool::Continuity - (const Handle(Adaptor3d_HSurface)& S) + (const Handle(Adaptor3d_Surface)& S) { GeomAbs_Shape s = (GeomAbs_Shape) Min(S->UContinuity(),S->VContinuity()); switch (s) { @@ -115,7 +115,7 @@ Standard_Integer LProp3d_SurfaceTool::Continuity //purpose : //======================================================================= -void LProp3d_SurfaceTool::Bounds(const Handle(Adaptor3d_HSurface)& S, +void LProp3d_SurfaceTool::Bounds(const Handle(Adaptor3d_Surface)& S, Standard_Real& U1, Standard_Real& V1, Standard_Real& U2, diff --git a/src/LProp3d/LProp3d_SurfaceTool.hxx b/src/LProp3d/LProp3d_SurfaceTool.hxx index cf36693b4c..82eba7703e 100644 --- a/src/LProp3d/LProp3d_SurfaceTool.hxx +++ b/src/LProp3d/LProp3d_SurfaceTool.hxx @@ -16,17 +16,7 @@ #ifndef _LProp3d_SurfaceTool_HeaderFile #define _LProp3d_SurfaceTool_HeaderFile -#include -#include -#include - -#include -#include -class Adaptor3d_HSurface; -class gp_Pnt; -class gp_Vec; - - +#include class LProp3d_SurfaceTool { @@ -37,25 +27,25 @@ public: //! Computes the point

of parameter and on the //! HSurface . - Standard_EXPORT static void Value (const Handle(Adaptor3d_HSurface)& S, const Standard_Real U, const Standard_Real V, gp_Pnt& P); + Standard_EXPORT static void Value (const Handle(Adaptor3d_Surface)& S, const Standard_Real U, const Standard_Real V, gp_Pnt& P); //! Computes the point

and first derivative of //! parameter and on the HSurface . - Standard_EXPORT static void D1 (const Handle(Adaptor3d_HSurface)& S, const Standard_Real U, const Standard_Real V, gp_Pnt& P, gp_Vec& D1U, gp_Vec& D1V); + Standard_EXPORT static void D1 (const Handle(Adaptor3d_Surface)& S, const Standard_Real U, const Standard_Real V, gp_Pnt& P, gp_Vec& D1U, gp_Vec& D1V); //! Computes the point

, the first derivative and second //! derivative of parameter and on the HSurface . - Standard_EXPORT static void D2 (const Handle(Adaptor3d_HSurface)& S, const Standard_Real U, const Standard_Real V, gp_Pnt& P, gp_Vec& D1U, gp_Vec& D1V, gp_Vec& D2U, gp_Vec& D2V, gp_Vec& DUV); + Standard_EXPORT static void D2 (const Handle(Adaptor3d_Surface)& S, const Standard_Real U, const Standard_Real V, gp_Pnt& P, gp_Vec& D1U, gp_Vec& D1V, gp_Vec& D2U, gp_Vec& D2V, gp_Vec& DUV); - Standard_EXPORT static gp_Vec DN (const Handle(Adaptor3d_HSurface)& S, const Standard_Real U, const Standard_Real V, const Standard_Integer IU, const Standard_Integer IV); + Standard_EXPORT static gp_Vec DN (const Handle(Adaptor3d_Surface)& S, const Standard_Real U, const Standard_Real V, const Standard_Integer IU, const Standard_Integer IV); //! returns the order of continuity of the HSurface . //! returns 1 : first derivative only is computable //! returns 2 : first and second derivative only are computable. - Standard_EXPORT static Standard_Integer Continuity (const Handle(Adaptor3d_HSurface)& S); + Standard_EXPORT static Standard_Integer Continuity (const Handle(Adaptor3d_Surface)& S); //! returns the bounds of the HSurface. - Standard_EXPORT static void Bounds (const Handle(Adaptor3d_HSurface)& S, Standard_Real& U1, Standard_Real& V1, Standard_Real& U2, Standard_Real& V2); + Standard_EXPORT static void Bounds (const Handle(Adaptor3d_Surface)& S, Standard_Real& U1, Standard_Real& V1, Standard_Real& U2, Standard_Real& V2); diff --git a/src/LocOpe/LocOpe.cxx b/src/LocOpe/LocOpe.cxx index 4566afbe00..d47d1ff054 100644 --- a/src/LocOpe/LocOpe.cxx +++ b/src/LocOpe/LocOpe.cxx @@ -14,17 +14,16 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. +#include #include #include #include -#include -#include +#include #include #include #include #include -#include #include #include #include @@ -142,13 +141,13 @@ Standard_Boolean LocOpe::TgtFaces(const TopoDS_Edge& E, TopoDS_Edge e = E; - Handle(BRepAdaptor_HSurface) HS1 = new BRepAdaptor_HSurface(F1); - Handle(BRepAdaptor_HSurface) HS2 = new BRepAdaptor_HSurface(F2); + Handle(BRepAdaptor_Surface) HS1 = new BRepAdaptor_Surface(F1); + Handle(BRepAdaptor_Surface) HS2 = new BRepAdaptor_Surface(F2); e.Orientation(TopAbs_FORWARD); - Handle(BRepAdaptor_HCurve2d) HC2d = new BRepAdaptor_HCurve2d(); - Handle(BRepAdaptor_HCurve2d) HC2d2 = new BRepAdaptor_HCurve2d(); - HC2d->ChangeCurve2d().Initialize(e,F1); - HC2d2->ChangeCurve2d().Initialize(e,F2); + Handle(BRepAdaptor_Curve2d) HC2d = new BRepAdaptor_Curve2d(); + Handle(BRepAdaptor_Curve2d) HC2d2 = new BRepAdaptor_Curve2d(); + HC2d->Initialize(e,F1); + HC2d2->Initialize(e,F2); // Adaptor3d_CurveOnSurface C1(HC2d,HS1); diff --git a/src/LocOpe/LocOpe_CSIntersector.cxx b/src/LocOpe/LocOpe_CSIntersector.cxx index e649213327..6a568c3665 100644 --- a/src/LocOpe/LocOpe_CSIntersector.cxx +++ b/src/LocOpe/LocOpe_CSIntersector.cxx @@ -16,7 +16,7 @@ #include -#include +#include #include #include #include @@ -127,7 +127,7 @@ void LocOpe_CSIntersector::Perform(const LocOpe_SequenceOfCirc& Scir) (LocOpe_SequenceOfPntFace *) new LocOpe_SequenceOfPntFace[myNbelem]; TopExp_Explorer exp(myShape,TopAbs_FACE); - Handle(GeomAdaptor_HCurve) HC = new GeomAdaptor_HCurve (); + Handle(GeomAdaptor_Curve) HC = new GeomAdaptor_Curve (); Standard_Real binf = 0.; Standard_Real bsup = 2.*M_PI; @@ -137,7 +137,7 @@ void LocOpe_CSIntersector::Perform(const LocOpe_SequenceOfCirc& Scir) IntCurvesFace_Intersector theInt(theface,0.); for (Standard_Integer i = 1; i<=myNbelem; i++) { - HC->ChangeCurve().Load(new Geom_Circle(Scir(i))); + HC->Load(new Geom_Circle(Scir(i))); theInt.Perform(HC,binf,bsup); if (theInt.IsDone()) { AddPoints(theInt,(((LocOpe_SequenceOfPntFace*)myPoints)[i-1]),theface); @@ -169,7 +169,7 @@ void LocOpe_CSIntersector::Perform(const TColGeom_SequenceOfCurve& Scur) (LocOpe_SequenceOfPntFace *) new LocOpe_SequenceOfPntFace[myNbelem]; TopExp_Explorer exp(myShape,TopAbs_FACE); - Handle(GeomAdaptor_HCurve) HC = new GeomAdaptor_HCurve (); + Handle(GeomAdaptor_Curve) HC = new GeomAdaptor_Curve (); for (; exp.More(); exp.Next()) { const TopoDS_Face& theface = TopoDS::Face(exp.Current()); IntCurvesFace_Intersector theInt(theface,0.); @@ -177,7 +177,7 @@ void LocOpe_CSIntersector::Perform(const TColGeom_SequenceOfCurve& Scur) if (Scur(i).IsNull()) { continue; } - HC->ChangeCurve().Load(Scur(i)); + HC->Load(Scur(i)); Standard_Real binf = HC->FirstParameter(); Standard_Real bsup = HC->LastParameter(); theInt.Perform(HC,binf,bsup); diff --git a/src/LocOpe/LocOpe_FindEdgesInFace.cxx b/src/LocOpe/LocOpe_FindEdgesInFace.cxx index 1dbc5c91db..98b2061675 100644 --- a/src/LocOpe/LocOpe_FindEdgesInFace.cxx +++ b/src/LocOpe/LocOpe_FindEdgesInFace.cxx @@ -14,9 +14,9 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. +#include #include -#include #include #include #include @@ -29,7 +29,6 @@ #include #include #include -#include #include #include #include @@ -77,7 +76,7 @@ void LocOpe_FindEdgesInFace::Set(const TopoDS_Shape& Sh, return; // pour le moment } - Handle(BRepAdaptor_HSurface) HS = new BRepAdaptor_HSurface(myFace); + Handle(BRepAdaptor_Surface) HS = new BRepAdaptor_Surface(myFace); BRepTopAdaptor_TopolTool TPT(HS); for (exp.Init(myShape,TopAbs_EDGE); exp.More(); exp.Next()) { diff --git a/src/LocOpe/LocOpe_SplitDrafts.cxx b/src/LocOpe/LocOpe_SplitDrafts.cxx index f312ab3755..e0c07a6faa 100644 --- a/src/LocOpe/LocOpe_SplitDrafts.cxx +++ b/src/LocOpe/LocOpe_SplitDrafts.cxx @@ -14,6 +14,7 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. +#include #include #include @@ -29,8 +30,6 @@ #include #include #include -#include -#include #include #include #include @@ -46,7 +45,6 @@ #include #include #include -#include #include #include #include @@ -189,10 +187,8 @@ void LocOpe_SplitDrafts::Perform(const TopoDS_Face& F, GeomInt_IntSS i2s(NewSg,NewSd,Precision::Confusion()); TopTools_MapOfShape theMap; - Handle(GeomAdaptor_HCurve) HAC = new GeomAdaptor_HCurve; - GeomAdaptor_Curve AC; - Handle(GeomAdaptor_HSurface) HAS = new GeomAdaptor_HSurface; - GeomAdaptor_Surface AS; + Handle(GeomAdaptor_Curve) HAC = new GeomAdaptor_Curve; + Handle(GeomAdaptor_Surface) HAS = new GeomAdaptor_Surface; IntCurveSurface_HInter intcs; TopoDS_Wire theW = W; @@ -207,8 +203,7 @@ void LocOpe_SplitDrafts::Perform(const TopoDS_Face& F, throw Standard_ConstructionError("GeomFill_Pipe : Cannot make a surface"); Handle(Geom_Surface) Spl = thePipe.Surface(); - AS.Load(Spl); - HAS->Set(AS); + HAS->Load(Spl); LocOpe_SplitShape splw(W); @@ -218,8 +213,7 @@ void LocOpe_SplitDrafts::Perform(const TopoDS_Face& F, TopLoc_Location Loc; Standard_Real f,l; Handle(Geom_Curve) C = BRep_Tool::Curve(edg,f,l); - AC.Load(C); - HAC->Set(AC); + HAC->Load(C); intcs.Perform(HAC,HAS); if (!intcs.IsDone()) { continue; // voir ce qu`on peut faire de mieux @@ -629,8 +623,7 @@ void LocOpe_SplitDrafts::Perform(const TopoDS_Face& F, // Determination des vertex par intersection sur Plg ou/et Pld - AC.Load(Newc); - HAC->Set(AC); + HAC->Load(Newc); Standard_Integer nbfois = 2; TopoDS_Vertex vtx1,vtx2; Standard_Real p1=0,p2=0; @@ -643,11 +636,11 @@ void LocOpe_SplitDrafts::Perform(const TopoDS_Face& F, for (itl.Initialize(theMapEF(indedgf)); itl.More(); itl.Next()) { if (Contains(myMap(F),itl.Value())) { if (Contains(theLeft,itl.Value())) { - AS.Load(NewSg); + HAS->Load(NewSg); IsLeft = Standard_True; } else { - AS.Load(NewSd); + HAS->Load(NewSd); IsLeft = Standard_False; } @@ -664,14 +657,13 @@ void LocOpe_SplitDrafts::Perform(const TopoDS_Face& F, } else { - AS.Load(NewSg); + HAS->Load(NewSg); } for (Standard_Integer it = 1; it<=nbfois; it++) { if (it == 2) { - AS.Load(NewSd); + HAS->Load(NewSd); } - HAS->Set(AS); intcs.Perform(HAC,HAS); if (!intcs.IsDone()) { diff --git a/src/MAT2d/MAT2d_Circuit.cxx b/src/MAT2d/MAT2d_Circuit.cxx index 2ace415f5e..b16b1e62e5 100644 --- a/src/MAT2d/MAT2d_Circuit.cxx +++ b/src/MAT2d/MAT2d_Circuit.cxx @@ -18,7 +18,7 @@ #include #include #include -#include +#include #include #include #include @@ -271,8 +271,8 @@ Standard_Boolean MAT2d_Circuit::IsSharpCorner(const Handle(Geom2d_Geometry)& Geo if (Direction < 0.) D = -D; - Handle(Geom2dAdaptor_HCurve) HC1 = new Geom2dAdaptor_HCurve(C1); - Handle(Geom2dAdaptor_HCurve) HC2 = new Geom2dAdaptor_HCurve(C2); + Handle(Geom2dAdaptor_Curve) HC1 = new Geom2dAdaptor_Curve(C1); + Handle(Geom2dAdaptor_Curve) HC2 = new Geom2dAdaptor_Curve(C2); Adaptor2d_OffsetCurve OC1(HC1, D, MilC1, C1->LastParameter()); Adaptor2d_OffsetCurve OC2(HC2, D, C2->FirstParameter(), MilC2); Geom2dInt_GInter Intersect; diff --git a/src/ProjLib/FILES b/src/ProjLib/FILES index 91154d127a..792699d48e 100644 --- a/src/ProjLib/FILES +++ b/src/ProjLib/FILES @@ -11,9 +11,7 @@ ProjLib_Cone.hxx ProjLib_Cylinder.cxx ProjLib_Cylinder.hxx ProjLib_HCompProjectedCurve.hxx -ProjLib_HCompProjectedCurve_0.cxx ProjLib_HProjectedCurve.hxx -ProjLib_HProjectedCurve_0.cxx ProjLib_HSequenceOfHSequenceOfPnt.hxx ProjLib_Plane.cxx ProjLib_Plane.hxx diff --git a/src/ProjLib/ProjLib.cxx b/src/ProjLib/ProjLib.cxx index 36ee34ddbc..23ca6495ad 100644 --- a/src/ProjLib/ProjLib.cxx +++ b/src/ProjLib/ProjLib.cxx @@ -48,7 +48,7 @@ #include #include #include -#include +#include //======================================================================= //function : Project @@ -287,7 +287,7 @@ void ProjLib::MakePCurveOfType //purpose : //======================================================================= Standard_Boolean ProjLib::IsAnaSurf - (const Handle(Adaptor3d_HSurface)& theAS) + (const Handle(Adaptor3d_Surface)& theAS) { switch (theAS->GetType()) { diff --git a/src/ProjLib/ProjLib.hxx b/src/ProjLib/ProjLib.hxx index f533479643..3601b5a66b 100644 --- a/src/ProjLib/ProjLib.hxx +++ b/src/ProjLib/ProjLib.hxx @@ -17,9 +17,7 @@ #ifndef _ProjLib_HeaderFile #define _ProjLib_HeaderFile -#include -#include -#include +#include #include class gp_Pnt2d; @@ -55,7 +53,6 @@ class ProjLib_Cylinder; class ProjLib_Cone; class ProjLib_Sphere; class ProjLib_Torus; -class Adaptor3d_HSurface; //! The projLib package first provides projection of //! curves on a plane along a given Direction. The @@ -136,7 +133,7 @@ public: //! Plane, Cylinder, Cone, Sphere, Torus. //! For all other types of surface method returns "false". Standard_EXPORT static Standard_Boolean IsAnaSurf - (const Handle(Adaptor3d_HSurface)& theAS); + (const Handle(Adaptor3d_Surface)& theAS); diff --git a/src/ProjLib/ProjLib_CompProjectedCurve.cxx b/src/ProjLib/ProjLib_CompProjectedCurve.cxx index b03b7a9111..84edacc25b 100644 --- a/src/ProjLib/ProjLib_CompProjectedCurve.cxx +++ b/src/ProjLib/ProjLib_CompProjectedCurve.cxx @@ -17,9 +17,9 @@ #include -#include -#include -#include +#include +#include +#include #include #include #include @@ -42,12 +42,14 @@ #include #include #include -#include +#include #include #include #define FuncTol 1.e-10 +IMPLEMENT_STANDARD_RTTIEXT(ProjLib_CompProjectedCurve, Adaptor2d_Curve2d) + #ifdef OCCT_DEBUG_CHRONO #include @@ -76,8 +78,8 @@ static void ResultChron( OSD_Chronometer & ch, Standard_Real & time) // myPeriodicDir - 0 for U periodicity and 1 for V periodicity. struct SplitDS { - SplitDS(const Handle(Adaptor3d_HCurve) &theCurve, - const Handle(Adaptor3d_HSurface) &theSurface, + SplitDS(const Handle(Adaptor3d_Curve) &theCurve, + const Handle(Adaptor3d_Surface) &theSurface, NCollection_Vector &theSplits) : myCurve(theCurve), mySurface(theSurface), @@ -92,8 +94,8 @@ struct SplitDS // Assignment operator is forbidden. void operator=(const SplitDS &theSplitDS); - const Handle(Adaptor3d_HCurve) myCurve; - const Handle(Adaptor3d_HSurface) mySurface; + const Handle(Adaptor3d_Curve) myCurve; + const Handle(Adaptor3d_Surface) mySurface; NCollection_Vector &mySplits; Standard_Real myPerMinParam; @@ -105,8 +107,8 @@ struct SplitDS }; //! Compute split points in the parameter space of the curve. - static void BuildCurveSplits(const Handle(Adaptor3d_HCurve) &theCurve, - const Handle(Adaptor3d_HSurface) &theSurface, + static void BuildCurveSplits(const Handle(Adaptor3d_Curve) &theCurve, + const Handle(Adaptor3d_Surface) &theSurface, const Standard_Real theTolU, const Standard_Real theTolV, NCollection_Vector &theSplits); @@ -139,8 +141,8 @@ static void d1(const Standard_Real t, const Standard_Real u, const Standard_Real v, gp_Vec2d& V, - const Handle(Adaptor3d_HCurve)& Curve, - const Handle(Adaptor3d_HSurface)& Surface) + const Handle(Adaptor3d_Curve)& Curve, + const Handle(Adaptor3d_Surface)& Surface) { gp_Pnt S, C; gp_Vec DS1_u, DS1_v, DS2_u, DS2_uv, DS2_v, DC1_t; @@ -172,8 +174,8 @@ static void d2(const Standard_Real t, const Standard_Real u, const Standard_Real v, gp_Vec2d& V1, gp_Vec2d& V2, - const Handle(Adaptor3d_HCurve)& Curve, - const Handle(Adaptor3d_HSurface)& Surface) + const Handle(Adaptor3d_Curve)& Curve, + const Handle(Adaptor3d_Surface)& Surface) { gp_Pnt S, C; gp_Vec DS1_u, DS1_v, DS2_u, DS2_uv, DS2_v, @@ -247,8 +249,8 @@ static void d1CurvOnSurf(const Standard_Real t, const Standard_Real u, const Standard_Real v, gp_Vec& V, - const Handle(Adaptor3d_HCurve)& Curve, - const Handle(Adaptor3d_HSurface)& Surface) + const Handle(Adaptor3d_Curve)& Curve, + const Handle(Adaptor3d_Surface)& Surface) { gp_Pnt S, C; gp_Vec2d V2d; @@ -285,8 +287,8 @@ static void d2CurvOnSurf(const Standard_Real t, const Standard_Real u, const Standard_Real v, gp_Vec& V1 , gp_Vec& V2 , - const Handle(Adaptor3d_HCurve)& Curve, - const Handle(Adaptor3d_HSurface)& Surface) + const Handle(Adaptor3d_Curve)& Curve, + const Handle(Adaptor3d_Surface)& Surface) { gp_Pnt S, C; gp_Vec2d V12d,V22d; @@ -369,8 +371,8 @@ static Standard_Boolean ExactBound(gp_Pnt& Sol, const Standard_Real Tol, const Standard_Real TolU, const Standard_Real TolV, - const Handle(Adaptor3d_HCurve)& Curve, - const Handle(Adaptor3d_HSurface)& Surface) + const Handle(Adaptor3d_Curve)& Curve, + const Handle(Adaptor3d_Surface)& Surface) { Standard_Real U0, V0, t, t1, t2, FirstU, LastU, FirstV, LastV; gp_Pnt2d POnS; @@ -442,9 +444,7 @@ static Standard_Boolean ExactBound(gp_Pnt& Sol, gp_Pnt P; P = Seq.Last (); Seq.Remove (Seq.Length ()); - ProjLib_PrjResolve aPrjPS (Curve->Curve (), - Surface->Surface (), - Standard_Integer (P.Z ())); + ProjLib_PrjResolve aPrjPS (*Curve, *Surface, Standard_Integer (P.Z ())); if (Standard_Integer (P.Z ()) == 2) { aPrjPS.Perform (t, P.X (), V0, gp_Pnt2d (Tol, TolV), @@ -482,8 +482,8 @@ static void DichExactBound(gp_Pnt& Sol, const Standard_Real Tol, const Standard_Real TolU, const Standard_Real TolV, - const Handle(Adaptor3d_HCurve)& Curve, - const Handle(Adaptor3d_HSurface)& Surface) + const Handle(Adaptor3d_Curve)& Curve, + const Handle(Adaptor3d_Surface)& Surface) { #ifdef OCCT_DEBUG_CHRONO InitChron(chr_dicho_bound); @@ -493,7 +493,7 @@ static void DichExactBound(gp_Pnt& Sol, gp_Pnt2d POnS; U0 = Sol.Y(); V0 = Sol.Z(); - ProjLib_PrjResolve aPrjPS(Curve->Curve(), Surface->Surface(), 1); + ProjLib_PrjResolve aPrjPS (*Curve, *Surface, 1); Standard_Real aNotSol = NotSol; while (fabs(Sol.X() - aNotSol) > Tol) @@ -526,18 +526,18 @@ static void DichExactBound(gp_Pnt& Sol, static Standard_Boolean InitialPoint(const gp_Pnt& Point, const Standard_Real t, - const Handle(Adaptor3d_HCurve)& C, - const Handle(Adaptor3d_HSurface)& S, + const Handle(Adaptor3d_Curve)& C, + const Handle(Adaptor3d_Surface)& S, const Standard_Real TolU, const Standard_Real TolV, Standard_Real& U, Standard_Real& V) { - ProjLib_PrjResolve aPrjPS(C->Curve(), S->Surface(), 1); + ProjLib_PrjResolve aPrjPS (*C, *S, 1); Standard_Real ParU,ParV; Extrema_ExtPS aExtPS; - aExtPS.Initialize(S->Surface(), S->FirstUParameter(), + aExtPS.Initialize (*S, S->FirstUParameter(), S->LastUParameter(), S->FirstVParameter(), S->LastVParameter(), TolU, TolV); @@ -588,8 +588,8 @@ ProjLib_CompProjectedCurve::ProjLib_CompProjectedCurve() //======================================================================= ProjLib_CompProjectedCurve::ProjLib_CompProjectedCurve - (const Handle(Adaptor3d_HSurface)& theSurface, - const Handle(Adaptor3d_HCurve)& theCurve, + (const Handle(Adaptor3d_Surface)& theSurface, + const Handle(Adaptor3d_Curve)& theCurve, const Standard_Real theTolU, const Standard_Real theTolV) : mySurface (theSurface), @@ -609,8 +609,8 @@ ProjLib_CompProjectedCurve::ProjLib_CompProjectedCurve //======================================================================= ProjLib_CompProjectedCurve::ProjLib_CompProjectedCurve - (const Handle(Adaptor3d_HSurface)& theSurface, - const Handle(Adaptor3d_HCurve)& theCurve, + (const Handle(Adaptor3d_Surface)& theSurface, + const Handle(Adaptor3d_Curve)& theCurve, const Standard_Real theTolU, const Standard_Real theTolV, const Standard_Real theMaxDist) @@ -642,7 +642,7 @@ void ProjLib_CompProjectedCurve::Init() isSplitsComputed = Standard_False; const Standard_Real aTolExt = Precision::PConfusion(); - Extrema_ExtCS CExt(myCurve->Curve(), mySurface->Surface(), aTolExt, aTolExt); + Extrema_ExtCS CExt (*myCurve, *mySurface, aTolExt, aTolExt); if (CExt.IsDone() && CExt.NbExt()) { // Search for the minimum solution. @@ -680,7 +680,7 @@ void ProjLib_CompProjectedCurve::Init() gp_Pnt2d aLowBorder(mySurface->FirstUParameter(),mySurface->FirstVParameter()); gp_Pnt2d aUppBorder(mySurface->LastUParameter(), mySurface->LastVParameter()); gp_Pnt2d aTol(myTolU, myTolV); - ProjLib_PrjResolve aPrjPS(myCurve->Curve(), mySurface->Surface(), 1); + ProjLib_PrjResolve aPrjPS (*myCurve, *mySurface, 1); t = FirstU; Standard_Boolean new_part; @@ -1133,7 +1133,7 @@ void ProjLib_CompProjectedCurve::Init() //purpose : //======================================================================= -void ProjLib_CompProjectedCurve::Load(const Handle(Adaptor3d_HSurface)& S) +void ProjLib_CompProjectedCurve::Load(const Handle(Adaptor3d_Surface)& S) { mySurface = S; } @@ -1143,7 +1143,7 @@ void ProjLib_CompProjectedCurve::Load(const Handle(Adaptor3d_HSurface)& S) //purpose : //======================================================================= -void ProjLib_CompProjectedCurve::Load(const Handle(Adaptor3d_HCurve)& C) +void ProjLib_CompProjectedCurve::Load(const Handle(Adaptor3d_Curve)& C) { myCurve = C; } @@ -1153,7 +1153,7 @@ void ProjLib_CompProjectedCurve::Load(const Handle(Adaptor3d_HCurve)& C) //purpose : //======================================================================= -const Handle(Adaptor3d_HSurface)& ProjLib_CompProjectedCurve::GetSurface() const +const Handle(Adaptor3d_Surface)& ProjLib_CompProjectedCurve::GetSurface() const { return mySurface; } @@ -1164,7 +1164,7 @@ const Handle(Adaptor3d_HSurface)& ProjLib_CompProjectedCurve::GetSurface() const //purpose : //======================================================================= -const Handle(Adaptor3d_HCurve)& ProjLib_CompProjectedCurve::GetCurve() const +const Handle(Adaptor3d_Curve)& ProjLib_CompProjectedCurve::GetCurve() const { return myCurve; } @@ -1337,7 +1337,7 @@ void ProjLib_CompProjectedCurve::D0(const Standard_Real U,gp_Pnt2d& P) const } //End of cubic interpolation - ProjLib_PrjResolve aPrjPS(myCurve->Curve(), mySurface->Surface(), 1); + ProjLib_PrjResolve aPrjPS (*myCurve, *mySurface, 1); aPrjPS.Perform(U, U0, V0, gp_Pnt2d(myTolU, myTolV), gp_Pnt2d(mySurface->FirstUParameter(), mySurface->FirstVParameter()), gp_Pnt2d(mySurface->LastUParameter(), mySurface->LastVParameter())); @@ -1346,7 +1346,7 @@ void ProjLib_CompProjectedCurve::D0(const Standard_Real U,gp_Pnt2d& P) const else { gp_Pnt thePoint = myCurve->Value(U); - Extrema_ExtPS aExtPS(thePoint, mySurface->Surface(), myTolU, myTolV); + Extrema_ExtPS aExtPS(thePoint, *mySurface, myTolU, myTolV); if (aExtPS.IsDone() && aExtPS.NbExt()) { Standard_Integer k, Nend, imin = 1; @@ -1571,7 +1571,7 @@ void ProjLib_CompProjectedCurve::BuildIntervals(const GeomAbs_Shape S) const Standard_Real V; V = (mySequence->Value(i)->Value(j).Z() + mySequence->Value(i)->Value(j +1).Z())/2; - ProjLib_PrjResolve Solver(myCurve->Curve(), mySurface->Surface(), 2); + ProjLib_PrjResolve Solver (*myCurve, *mySurface, 2); gp_Vec2d D; gp_Pnt Triple; @@ -1637,7 +1637,7 @@ void ProjLib_CompProjectedCurve::BuildIntervals(const GeomAbs_Shape S) const Standard_Real U; U = (mySequence->Value(i)->Value(j).Y() + mySequence->Value(i)->Value(j +1).Y())/2; - ProjLib_PrjResolve Solver(myCurve->Curve(), mySurface->Surface(), 3); + ProjLib_PrjResolve Solver (*myCurve, *mySurface, 3); gp_Vec2d D; gp_Pnt Triple; @@ -1734,15 +1734,15 @@ void ProjLib_CompProjectedCurve::BuildIntervals(const GeomAbs_Shape S) const //purpose : //======================================================================= -Handle(Adaptor2d_HCurve2d) ProjLib_CompProjectedCurve::Trim +Handle(Adaptor2d_Curve2d) ProjLib_CompProjectedCurve::Trim (const Standard_Real First, const Standard_Real Last, const Standard_Real Tol) const { Handle(ProjLib_HCompProjectedCurve) HCS = new ProjLib_HCompProjectedCurve(*this); - HCS->ChangeCurve2d().Load(mySurface); - HCS->ChangeCurve2d().Load(myCurve->Trim(First,Last,Tol)); + HCS->Load(mySurface); + HCS->Load(myCurve->Trim(First,Last,Tol)); return HCS; } @@ -1819,8 +1819,8 @@ void ProjLib_CompProjectedCurve::UpdateTripleByTrapCriteria(gp_Pnt &thePoint) co //function : BuildCurveSplits //purpose : //======================================================================= -void BuildCurveSplits(const Handle(Adaptor3d_HCurve) &theCurve, - const Handle(Adaptor3d_HSurface) &theSurface, +void BuildCurveSplits(const Handle(Adaptor3d_Curve) &theCurve, + const Handle(Adaptor3d_Surface) &theSurface, const Standard_Real theTolU, const Standard_Real theTolV, NCollection_Vector &theSplits) @@ -1828,7 +1828,7 @@ void BuildCurveSplits(const Handle(Adaptor3d_HCurve) &theCurve, SplitDS aDS(theCurve, theSurface, theSplits); Extrema_ExtPS anExtPS; - anExtPS.Initialize(theSurface->Surface(), + anExtPS.Initialize(*theSurface, theSurface->FirstUParameter(), theSurface->LastUParameter(), theSurface->FirstVParameter(), theSurface->LastVParameter(), theTolU, theTolV); @@ -1874,12 +1874,12 @@ void SplitOnDirection(SplitDS & theSplitDS) // Create line which is represent periodic border. Handle(Geom2d_Curve) aC2GC = new Geom2d_Line(aStartPnt, aDir); - Handle(Geom2dAdaptor_HCurve) aC = new Geom2dAdaptor_HCurve(aC2GC, 0, aLast2DParam); + Handle(Geom2dAdaptor_Curve) aC = new Geom2dAdaptor_Curve(aC2GC, 0, aLast2DParam); Adaptor3d_CurveOnSurface aCOnS(aC, theSplitDS.mySurface); Extrema_ExtCC anExtCC; anExtCC.SetCurve(1, aCOnS); - anExtCC.SetCurve(2, theSplitDS.myCurve->Curve()); + anExtCC.SetCurve(2, *theSplitDS.myCurve); anExtCC.SetSingleSolutionFlag(Standard_True); // Search only one solution since multiple invocations are needed. anExtCC.SetRange(1, 0, aLast2DParam); theSplitDS.myExtCC = &anExtCC; diff --git a/src/ProjLib/ProjLib_CompProjectedCurve.hxx b/src/ProjLib/ProjLib_CompProjectedCurve.hxx index 2568a53339..d086f7e6d2 100644 --- a/src/ProjLib/ProjLib_CompProjectedCurve.hxx +++ b/src/ProjLib/ProjLib_CompProjectedCurve.hxx @@ -17,49 +17,33 @@ #ifndef _ProjLib_CompProjectedCurve_HeaderFile #define _ProjLib_CompProjectedCurve_HeaderFile -#include -#include -#include - -#include +#include +#include #include -#include #include #include -#include -#include #include #include #include -class Adaptor3d_HSurface; -class Adaptor3d_HCurve; -class Standard_OutOfRange; -class Standard_NoSuchObject; -class Standard_DomainError; -class Standard_NotImplemented; + class gp_Pnt2d; class gp_Vec2d; -class Adaptor2d_HCurve2d; - - class ProjLib_CompProjectedCurve : public Adaptor2d_Curve2d { + DEFINE_STANDARD_RTTIEXT(ProjLib_CompProjectedCurve, Adaptor2d_Curve2d) public: - DEFINE_STANDARD_ALLOC - - Standard_EXPORT ProjLib_CompProjectedCurve(); //! try to find all solutions - Standard_EXPORT ProjLib_CompProjectedCurve(const Handle(Adaptor3d_HSurface)& S, const Handle(Adaptor3d_HCurve)& C, const Standard_Real TolU, const Standard_Real TolV); + Standard_EXPORT ProjLib_CompProjectedCurve(const Handle(Adaptor3d_Surface)& S, const Handle(Adaptor3d_Curve)& C, const Standard_Real TolU, const Standard_Real TolV); //! this constructor tries to optimize the search using the //! assumption that maximum distance between surface and curve less or //! equal then MaxDist. //! if MaxDist < 0 then algorithm works as above. - Standard_EXPORT ProjLib_CompProjectedCurve(const Handle(Adaptor3d_HSurface)& S, const Handle(Adaptor3d_HCurve)& C, const Standard_Real TolU, const Standard_Real TolV, const Standard_Real MaxDist); + Standard_EXPORT ProjLib_CompProjectedCurve(const Handle(Adaptor3d_Surface)& S, const Handle(Adaptor3d_Curve)& C, const Standard_Real TolU, const Standard_Real TolV, const Standard_Real MaxDist); //! computes a set of projected point and determine the //! continuous parts of the projected curves. The points @@ -68,14 +52,14 @@ public: Standard_EXPORT void Init(); //! Changes the surface. - Standard_EXPORT void Load (const Handle(Adaptor3d_HSurface)& S); + Standard_EXPORT void Load (const Handle(Adaptor3d_Surface)& S); //! Changes the curve. - Standard_EXPORT void Load (const Handle(Adaptor3d_HCurve)& C); + Standard_EXPORT void Load (const Handle(Adaptor3d_Curve)& C); - Standard_EXPORT const Handle(Adaptor3d_HSurface)& GetSurface() const; + Standard_EXPORT const Handle(Adaptor3d_Surface)& GetSurface() const; - Standard_EXPORT const Handle(Adaptor3d_HCurve)& GetCurve() const; + Standard_EXPORT const Handle(Adaptor3d_Curve)& GetCurve() const; Standard_EXPORT void GetTolerance (Standard_Real& TolU, Standard_Real& TolV) const; @@ -136,7 +120,7 @@ public: //! parameters and . is used to //! test for 2d points confusion. //! If >= - Standard_EXPORT Handle(Adaptor2d_HCurve2d) Trim (const Standard_Real FirstParam, const Standard_Real LastParam, const Standard_Real Tol) const Standard_OVERRIDE; + Standard_EXPORT Handle(Adaptor2d_Curve2d) Trim (const Standard_Real FirstParam, const Standard_Real LastParam, const Standard_Real Tol) const Standard_OVERRIDE; //! Returns the parameters corresponding to //! S discontinuities. @@ -156,15 +140,6 @@ public: //! Parabola, BezierCurve, BSplineCurve, OtherCurve. Standard_EXPORT GeomAbs_CurveType GetType() const Standard_OVERRIDE; - - - -protected: - - - - - private: //! This method performs check possibility of optimization traps and tries to go out from them. @@ -173,9 +148,10 @@ private: Standard_EXPORT void BuildIntervals (const GeomAbs_Shape S) const; +private: - Handle(Adaptor3d_HSurface) mySurface; - Handle(Adaptor3d_HCurve) myCurve; + Handle(Adaptor3d_Surface) mySurface; + Handle(Adaptor3d_Curve) myCurve; Standard_Integer myNbCurves; Handle(ProjLib_HSequenceOfHSequenceOfPnt) mySequence; Standard_Real myTolU; @@ -188,10 +164,6 @@ private: Handle(TColStd_HArray1OfReal) myTabInt; }; - - - - - +DEFINE_STANDARD_HANDLE(ProjLib_CompProjectedCurve, Adaptor2d_Curve2d) #endif // _ProjLib_CompProjectedCurve_HeaderFile diff --git a/src/ProjLib/ProjLib_ComputeApprox.cxx b/src/ProjLib/ProjLib_ComputeApprox.cxx index 63ee160ebb..4d8269911f 100644 --- a/src/ProjLib/ProjLib_ComputeApprox.cxx +++ b/src/ProjLib/ProjLib_ComputeApprox.cxx @@ -33,8 +33,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include @@ -70,8 +70,8 @@ static inline Standard_Boolean IsEqual(Standard_Real Check,Standard_Real With,St //======================================================================= static gp_Pnt2d Function_Value(const Standard_Real U, - const Handle(Adaptor3d_HCurve)& myCurve, - const Handle(Adaptor3d_HSurface)& mySurface, + const Handle(Adaptor3d_Curve)& myCurve, + const Handle(Adaptor3d_Surface)& mySurface, const Standard_Real U1, const Standard_Real U2, const Standard_Real V1, @@ -149,8 +149,8 @@ static gp_Pnt2d Function_Value(const Standard_Real U, static Standard_Boolean Function_D1( const Standard_Real U, gp_Pnt2d& P, gp_Vec2d& D, - const Handle(Adaptor3d_HCurve)& myCurve, - const Handle(Adaptor3d_HSurface)& mySurface, + const Handle(Adaptor3d_Curve)& myCurve, + const Handle(Adaptor3d_Surface)& mySurface, const Standard_Real U1, const Standard_Real U2, const Standard_Real V1, @@ -202,14 +202,14 @@ static Standard_Boolean Function_D1( const Standard_Real U, //purpose : //======================================================================= static Standard_Real Function_ComputeStep( - const Handle(Adaptor3d_HCurve)& myCurve, + const Handle(Adaptor3d_Curve)& myCurve, const Standard_Real R) { Standard_Real Step0 = .1; Standard_Real W1, W2; W1 = myCurve->FirstParameter(); W2 = myCurve->LastParameter(); - Standard_Real L = GCPnts_AbscissaPoint::Length(myCurve->Curve()); + Standard_Real L = GCPnts_AbscissaPoint::Length (*myCurve); Standard_Integer nbp = RealToInt(L / (R*M_PI_4)) + 1; nbp = Max(nbp, 3); Standard_Real Step = (W2 - W1) / (nbp - 1); @@ -234,8 +234,8 @@ static void Function_SetUVBounds(Standard_Real& myU1, Standard_Real& myV2, Standard_Boolean& UCouture, Standard_Boolean& VCouture, - const Handle(Adaptor3d_HCurve)& myCurve, - const Handle(Adaptor3d_HSurface)& mySurface) + const Handle(Adaptor3d_Curve)& myCurve, + const Handle(Adaptor3d_Surface)& mySurface) { Standard_Real W1, W2, W; gp_Pnt P1, P2, P; @@ -844,8 +844,8 @@ static void Function_SetUVBounds(Standard_Real& myU1, //======================================================================= class ProjLib_Function : public AppCont_Function { - Handle(Adaptor3d_HCurve) myCurve; - Handle(Adaptor3d_HSurface) mySurface; + Handle(Adaptor3d_Curve) myCurve; + Handle(Adaptor3d_Surface) mySurface; Standard_Boolean myIsPeriodic[2]; Standard_Real myPeriod[2]; public : @@ -853,8 +853,8 @@ class ProjLib_Function : public AppCont_Function Standard_Real myU1,myU2,myV1,myV2; Standard_Boolean UCouture,VCouture; - ProjLib_Function(const Handle(Adaptor3d_HCurve)& C, - const Handle(Adaptor3d_HSurface)& S) + ProjLib_Function(const Handle(Adaptor3d_Curve)& C, + const Handle(Adaptor3d_Surface)& S) : myCurve(C), mySurface(S), myU1(0.0), @@ -929,7 +929,7 @@ class ProjLib_Function : public AppCont_Function //purpose : //======================================================================= -static Standard_Real ComputeTolU(const Handle(Adaptor3d_HSurface)& theSurf, +static Standard_Real ComputeTolU(const Handle(Adaptor3d_Surface)& theSurf, const Standard_Real theTolerance) { Standard_Real aTolU = theSurf->UResolution(theTolerance); @@ -946,7 +946,7 @@ static Standard_Real ComputeTolU(const Handle(Adaptor3d_HSurface)& theSurf, //purpose : //======================================================================= -static Standard_Real ComputeTolV(const Handle(Adaptor3d_HSurface)& theSurf, +static Standard_Real ComputeTolV(const Handle(Adaptor3d_Surface)& theSurf, const Standard_Real theTolerance) { Standard_Real aTolV = theSurf->VResolution(theTolerance); @@ -976,8 +976,8 @@ ProjLib_ComputeApprox::ProjLib_ComputeApprox(): //======================================================================= ProjLib_ComputeApprox::ProjLib_ComputeApprox - (const Handle(Adaptor3d_HCurve) & C, - const Handle(Adaptor3d_HSurface) & S, + (const Handle(Adaptor3d_Curve) & C, + const Handle(Adaptor3d_Surface) & S, const Standard_Real Tol): myTolerance(Max(Tol, Precision::PApproximation())), myDegMin(-1), myDegMax(-1), @@ -993,8 +993,8 @@ ProjLib_ComputeApprox::ProjLib_ComputeApprox //======================================================================= void ProjLib_ComputeApprox::Perform - (const Handle(Adaptor3d_HCurve) & C, - const Handle(Adaptor3d_HSurface) & S ) + (const Handle(Adaptor3d_Curve) & C, + const Handle(Adaptor3d_Surface) & S ) { // if the surface is a plane and the curve a BSpline or a BezierCurve, // don`t make an Approx but only the projection of the poles. diff --git a/src/ProjLib/ProjLib_ComputeApprox.hxx b/src/ProjLib/ProjLib_ComputeApprox.hxx index c1aeda678b..24ea449481 100644 --- a/src/ProjLib/ProjLib_ComputeApprox.hxx +++ b/src/ProjLib/ProjLib_ComputeApprox.hxx @@ -17,18 +17,12 @@ #ifndef _ProjLib_ComputeApprox_HeaderFile #define _ProjLib_ComputeApprox_HeaderFile -#include -#include -#include - -#include +#include +#include #include class Geom2d_BSplineCurve; class Geom2d_BezierCurve; -class Adaptor3d_HCurve; -class Adaptor3d_HSurface; - //! Approximate the projection of a 3d curve on an //! analytic surface and stores the result in Approx. @@ -52,12 +46,12 @@ public: //! is the tolerance with which the //! approximation is performed. //! Other parameters for approximation have default values. - Standard_EXPORT ProjLib_ComputeApprox(const Handle(Adaptor3d_HCurve)& C, const Handle(Adaptor3d_HSurface)& S, const Standard_Real Tol); + Standard_EXPORT ProjLib_ComputeApprox(const Handle(Adaptor3d_Curve)& C, const Handle(Adaptor3d_Surface)& S, const Standard_Real Tol); //! Performs projecting. //! In case of approximation current values of parameters are used: //! default values or set by corresponding methods Set... - Standard_EXPORT void Perform(const Handle(Adaptor3d_HCurve)& C, const Handle(Adaptor3d_HSurface)& S); + Standard_EXPORT void Perform(const Handle(Adaptor3d_Curve)& C, const Handle(Adaptor3d_Surface)& S); //! Set tolerance of approximation. //! Default value is Precision::Confusion(). diff --git a/src/ProjLib/ProjLib_ComputeApproxOnPolarSurface.cxx b/src/ProjLib/ProjLib_ComputeApproxOnPolarSurface.cxx index 491e88380e..bd4807b814 100644 --- a/src/ProjLib/ProjLib_ComputeApproxOnPolarSurface.cxx +++ b/src/ProjLib/ProjLib_ComputeApproxOnPolarSurface.cxx @@ -54,12 +54,12 @@ #include #include #include -#include -#include -#include +#include +#include +#include #include -#include -#include +#include +#include #include #include #include @@ -92,9 +92,9 @@ struct aFuncStruct memset(myPeriod, 0, sizeof (myPeriod)); } - Handle(Adaptor3d_HSurface) mySurf; // Surface where to project. - Handle(Adaptor3d_HCurve) myCurve; // Curve to project. - Handle(Adaptor2d_HCurve2d) myInitCurve2d; // Initial 2dcurve projection. + Handle(Adaptor3d_Surface) mySurf; // Surface where to project. + Handle(Adaptor3d_Curve) myCurve; // Curve to project. + Handle(Adaptor2d_Curve2d) myInitCurve2d; // Initial 2dcurve projection. Standard_Real mySqProjOrtTol; // Used to filter non-orthogonal projected point. Standard_Real myTolU; Standard_Real myTolV; @@ -105,7 +105,7 @@ struct aFuncStruct //function : computePeriodicity //purpose : Compute period information on adaptor. //======================================================================= -static void computePeriodicity(const Handle(Adaptor3d_HSurface)& theSurf, +static void computePeriodicity(const Handle(Adaptor3d_Surface)& theSurf, Standard_Real &theUPeriod, Standard_Real &theVPeriod) { @@ -116,7 +116,7 @@ static void computePeriodicity(const Handle(Adaptor3d_HSurface)& theSurf, // Param space may be reduced in case of rectangular trimmed surface, // in this case really trimmed bounds should be set as unperiodic. Standard_Real aTrimF, aTrimL, aBaseF, aBaseL, aDummyF, aDummyL; - Handle(Geom_Surface) aS = GeomAdaptor::MakeSurface(theSurf->Surface(), Standard_False); // Not trim. + Handle(Geom_Surface) aS = GeomAdaptor::MakeSurface (*theSurf, Standard_False); // Not trim. // U param space. if (theSurf->IsUPeriodic()) { @@ -165,7 +165,7 @@ static void computePeriodicity(const Handle(Adaptor3d_HSurface)& theSurf, //purpose : compute functional value in (theU,theV) point //======================================================================= static Standard_Real anOrthogSqValue(const gp_Pnt& aBasePnt, - const Handle(Adaptor3d_HSurface)& Surf, + const Handle(Adaptor3d_Surface)& Surf, const Standard_Real theU, const Standard_Real theV) { @@ -204,10 +204,10 @@ static gp_Pnt2d Function_Value(const Standard_Real theU, Standard_Real aSurfPntDist = aSurfPnt.SquareDistance(p); Standard_Real Uinf, Usup, Vinf, Vsup; - Uinf = theData.mySurf->Surface().FirstUParameter(); - Usup = theData.mySurf->Surface().LastUParameter(); - Vinf = theData.mySurf->Surface().FirstVParameter(); - Vsup = theData.mySurf->Surface().LastVParameter(); + Uinf = theData.mySurf->FirstUParameter(); + Usup = theData.mySurf->LastUParameter(); + Vinf = theData.mySurf->FirstVParameter(); + Vsup = theData.mySurf->LastVParameter(); // Check case when curve is close to co-parametrized isoline on surf. if (Abs (p2d.X() - Uinf) < Precision::PConfusion() || @@ -356,17 +356,17 @@ static gp_Pnt2d Function_Value(const Standard_Real theU, GeomAdaptor_Surface SurfLittle; if (Type == GeomAbs_BSplineSurface) { - Handle(Geom_Surface) GBSS(theData.mySurf->Surface().BSpline()); + Handle(Geom_Surface) GBSS(theData.mySurf->BSpline()); SurfLittle.Load(GBSS, uInfLi, uSupLi, vInfLi, vSupLi); } else if (Type == GeomAbs_BezierSurface) { - Handle(Geom_Surface) GS(theData.mySurf->Surface().Bezier()); + Handle(Geom_Surface) GS(theData.mySurf->Bezier()); SurfLittle.Load(GS, uInfLi, uSupLi, vInfLi, vSupLi); } else if (Type == GeomAbs_OffsetSurface) { - Handle(Geom_Surface) GS = GeomAdaptor::MakeSurface(theData.mySurf->Surface()); + Handle(Geom_Surface) GS = GeomAdaptor::MakeSurface (*theData.mySurf); SurfLittle.Load(GS, uInfLi, uSupLi, vInfLi, vSupLi); } else @@ -429,9 +429,9 @@ class ProjLib_PolarFunction : public AppCont_Function public : - ProjLib_PolarFunction(const Handle(Adaptor3d_HCurve) & C, - const Handle(Adaptor3d_HSurface)& Surf, - const Handle(Adaptor2d_HCurve2d)& InitialCurve2d, + ProjLib_PolarFunction(const Handle(Adaptor3d_Curve) & C, + const Handle(Adaptor3d_Surface)& Surf, + const Handle(Adaptor2d_Curve2d)& InitialCurve2d, const Standard_Real Tol3d) { myNbPnt = 0; @@ -501,9 +501,9 @@ ProjLib_ComputeApproxOnPolarSurface::ProjLib_ComputeApproxOnPolarSurface() //======================================================================= ProjLib_ComputeApproxOnPolarSurface::ProjLib_ComputeApproxOnPolarSurface - (const Handle(Adaptor2d_HCurve2d)& theInitialCurve2d, - const Handle(Adaptor3d_HCurve)& theCurve, - const Handle(Adaptor3d_HSurface)& theSurface, + (const Handle(Adaptor2d_Curve2d)& theInitialCurve2d, + const Handle(Adaptor3d_Curve)& theCurve, + const Handle(Adaptor3d_Surface)& theSurface, const Standard_Real theTolerance3D) : myProjIsDone(Standard_False), myTolerance(theTolerance3D), @@ -523,8 +523,8 @@ ProjLib_ComputeApproxOnPolarSurface::ProjLib_ComputeApproxOnPolarSurface //======================================================================= ProjLib_ComputeApproxOnPolarSurface::ProjLib_ComputeApproxOnPolarSurface - (const Handle(Adaptor3d_HCurve)& theCurve, - const Handle(Adaptor3d_HSurface)& theSurface, + (const Handle(Adaptor3d_Curve)& theCurve, + const Handle(Adaptor3d_Surface)& theSurface, const Standard_Real theTolerance3D) : myProjIsDone(Standard_False), myTolerance(theTolerance3D), @@ -535,7 +535,7 @@ ProjLib_ComputeApproxOnPolarSurface::ProjLib_ComputeApproxOnPolarSurface myBndPnt(AppParCurves_TangencyPoint), myDist(0.) { - const Handle(Adaptor2d_HCurve2d) anInitCurve2d; + const Handle(Adaptor2d_Curve2d) anInitCurve2d; myBSpline = Perform(anInitCurve2d, theCurve, theSurface); } @@ -545,10 +545,10 @@ ProjLib_ComputeApproxOnPolarSurface::ProjLib_ComputeApproxOnPolarSurface //======================================================================= ProjLib_ComputeApproxOnPolarSurface::ProjLib_ComputeApproxOnPolarSurface - (const Handle(Adaptor2d_HCurve2d)& theInitialCurve2d, - const Handle(Adaptor2d_HCurve2d)& theInitialCurve2dBis, - const Handle(Adaptor3d_HCurve)& theCurve, - const Handle(Adaptor3d_HSurface)& theSurface, + (const Handle(Adaptor2d_Curve2d)& theInitialCurve2d, + const Handle(Adaptor2d_Curve2d)& theInitialCurve2dBis, + const Handle(Adaptor3d_Curve)& theCurve, + const Handle(Adaptor3d_Surface)& theSurface, const Standard_Real theTolerance3D) : myProjIsDone(Standard_False), myTolerance(theTolerance3D), @@ -667,9 +667,9 @@ static Handle(Geom2d_BSplineCurve) Concat(Handle(Geom2d_BSplineCurve) C1, //======================================================================= void ProjLib_ComputeApproxOnPolarSurface::Perform -(const Handle(Adaptor3d_HCurve)& Curve, const Handle(Adaptor3d_HSurface)& S) +(const Handle(Adaptor3d_Curve)& Curve, const Handle(Adaptor3d_Surface)& S) { - const Handle(Adaptor2d_HCurve2d) anInitCurve2d; + const Handle(Adaptor2d_Curve2d) anInitCurve2d; myBSpline = Perform(anInitCurve2d, Curve, S); } @@ -679,16 +679,16 @@ void ProjLib_ComputeApproxOnPolarSurface::Perform //======================================================================= Handle(Geom2d_BSplineCurve) ProjLib_ComputeApproxOnPolarSurface::Perform -(const Handle(Adaptor2d_HCurve2d)& InitialCurve2d, - const Handle(Adaptor3d_HCurve)& Curve, - const Handle(Adaptor3d_HSurface)& S) +(const Handle(Adaptor2d_Curve2d)& InitialCurve2d, + const Handle(Adaptor3d_Curve)& Curve, + const Handle(Adaptor3d_Surface)& S) { //OCC217 Standard_Real Tol3d = myTolerance; Standard_Real ParamTol = Precision::PApproximation(); - Handle(Adaptor2d_HCurve2d) AHC2d = InitialCurve2d; - Handle(Adaptor3d_HCurve) AHC = Curve; + Handle(Adaptor2d_Curve2d) AHC2d = InitialCurve2d; + Handle(Adaptor3d_Curve) AHC = Curve; // if the curve 3d is a BSpline with degree C0, it is cut into sections with degree C1 // -> bug cts18237 @@ -706,7 +706,7 @@ Handle(Geom2d_BSplineCurve) ProjLib_ComputeApproxOnPolarSurface::Perform Standard_Real firstinter = Inter.Value(1), secondinter = Inter.Value(2); // initialization 3d GTC = new Geom_TrimmedCurve(BSC, firstinter, secondinter); - AHC = new GeomAdaptor_HCurve(GTC); + AHC = new GeomAdaptor_Curve(GTC); // if there is an initialization curve: // - either this is a BSpline C0, with discontinuity at the same parameters of nodes @@ -787,7 +787,7 @@ Handle(Geom2d_BSplineCurve) ProjLib_ComputeApproxOnPolarSurface::Perform // (lps.IsEqual(lpc, myTolerance))) { G2dTC = new Geom2d_TrimmedCurve(G2dC, firstinter, secondinter); Geom2dAdaptor_Curve G2dAC(G2dTC); - AHC2d = new Geom2dAdaptor_HCurve(G2dAC); + AHC2d = new Geom2dAdaptor_Curve(G2dAC); myProjIsDone = Standard_True; } else { @@ -819,7 +819,7 @@ Handle(Geom2d_BSplineCurve) ProjLib_ComputeApproxOnPolarSurface::Perform ip1inter = Inter.Value(i+1); // general case 3d GTC->SetTrim(iinter, ip1inter); - AHC = new GeomAdaptor_HCurve(GTC); + AHC = new GeomAdaptor_Curve(GTC); // general case 2d if(C2dIsToCompute) { @@ -839,7 +839,7 @@ Handle(Geom2d_BSplineCurve) ProjLib_ComputeApproxOnPolarSurface::Perform // (lps.IsEqual(lpc, myTolerance))) { G2dTC->SetTrim(iinter, ip1inter); Geom2dAdaptor_Curve G2dAC(G2dTC); - AHC2d = new Geom2dAdaptor_HCurve(G2dAC); + AHC2d = new Geom2dAdaptor_Curve(G2dAC); myProjIsDone = Standard_True; } else { @@ -911,10 +911,10 @@ Handle(Geom2d_BSplineCurve) ProjLib_ComputeApproxOnPolarSurface::Perform //purpose : //======================================================================= -Handle(Adaptor2d_HCurve2d) +Handle(Adaptor2d_Curve2d) ProjLib_ComputeApproxOnPolarSurface:: - BuildInitialCurve2d(const Handle(Adaptor3d_HCurve)& Curve, - const Handle(Adaptor3d_HSurface)& Surf) + BuildInitialCurve2d(const Handle(Adaptor3d_Curve)& Curve, + const Handle(Adaptor3d_Surface)& Surf) { // discretize the Curve with quasiuniform deflection // density at least NbOfPnts points @@ -937,7 +937,7 @@ Handle(Adaptor2d_HCurve2d) //Standard_Real Tol3d = 100*myTolerance; // At random Balthazar. Standard_Integer NbOfPnts = 61; - GCPnts_QuasiUniformAbscissa QUA(Curve->GetCurve(),NbOfPnts); + GCPnts_QuasiUniformAbscissa QUA (*Curve,NbOfPnts); NbOfPnts = QUA.NbPoints(); TColgp_Array1OfPnt Pts(1,NbOfPnts); TColStd_Array1OfReal Param(1,NbOfPnts); @@ -953,10 +953,10 @@ Handle(Adaptor2d_HCurve2d) Mult(1) = Mult(NbOfPnts) = 2; Standard_Real Uinf, Usup, Vinf, Vsup; - Uinf = Surf->Surface().FirstUParameter(); - Usup = Surf->Surface().LastUParameter(); - Vinf = Surf->Surface().FirstVParameter(); - Vsup = Surf->Surface().LastVParameter(); + Uinf = Surf->FirstUParameter(); + Usup = Surf->LastUParameter(); + Vinf = Surf->FirstVParameter(); + Vsup = Surf->LastVParameter(); GeomAbs_SurfaceType Type = Surf->GetType(); if((Type != GeomAbs_BSplineSurface) && (Type != GeomAbs_BezierSurface) && (Type != GeomAbs_OffsetSurface)) { @@ -1098,7 +1098,7 @@ Handle(Adaptor2d_HCurve2d) Standard_Boolean areManyZeros = Standard_False; Curve->D0(Param.Value(1), pntproj) ; - Extrema_ExtPS aExtPS(pntproj, Surf->Surface(), TolU, TolV) ; + Extrema_ExtPS aExtPS(pntproj, *Surf, TolU, TolV) ; Standard_Real aMinSqDist = RealLast(); if (aExtPS.IsDone()) { @@ -1113,9 +1113,9 @@ Handle(Adaptor2d_HCurve2d) { TolU = Min(TolU, Precision::PConfusion()); TolV = Min(TolV, Precision::PConfusion()); - aExtPS.Initialize(Surf->Surface(), - Surf->Surface().FirstUParameter(), Surf->Surface().LastUParameter(), - Surf->Surface().FirstVParameter(), Surf->Surface().LastVParameter(), + aExtPS.Initialize(*Surf, + Surf->FirstUParameter(), Surf->LastUParameter(), + Surf->FirstVParameter(), Surf->LastVParameter(), TolU, TolV); aExtPS.Perform(pntproj); } @@ -1173,7 +1173,7 @@ Handle(Adaptor2d_HCurve2d) Standard_Integer indExt = 0; Standard_Integer iT = 1 + (NbOfPnts - 1)/5*i; Curve->D0( Param.Value(iT), pntproj ); - Extrema_ExtPS aTPS( pntproj, Surf->Surface(), TolU, TolV ); + Extrema_ExtPS aTPS( pntproj, *Surf, TolU, TolV ); Dist2Min = 1.e+200; if( aTPS.IsDone() && aTPS.NbExt() >= 1 ) { for( j = 1 ; j <= aTPS.NbExt() ; j++ ) { @@ -1200,7 +1200,7 @@ Handle(Adaptor2d_HCurve2d) for (j = tPp + 1; j <= NbOfPnts; ++j) { Curve->D0( Param.Value(j), pntproj ); - Extrema_ExtPS aTPS( pntproj, Surf->Surface(), TolU, TolV ); + Extrema_ExtPS aTPS( pntproj, *Surf, TolU, TolV ); Dist2Min = RealLast(); if( aTPS.IsDone() && aTPS.NbExt() >= 1 ) { Standard_Integer indExt = 0; @@ -1272,7 +1272,7 @@ Handle(Adaptor2d_HCurve2d) myProjIsDone = Standard_False; Dist2Min = RealLast(); Curve->D0(Param.Value(i), pntproj); - Extrema_GenLocateExtPS aLocateExtPS(Surf->Surface(), TolU, TolV); + Extrema_GenLocateExtPS aLocateExtPS (*Surf, TolU, TolV); aLocateExtPS.Perform(pntproj, U0, V0); if (aLocateExtPS.IsDone()) @@ -1292,7 +1292,7 @@ Handle(Adaptor2d_HCurve2d) } else { - Extrema_ExtPS aGlobalExtr(pntproj, Surf->Surface(), TolU, TolV); + Extrema_ExtPS aGlobalExtr(pntproj, *Surf, TolU, TolV); if (aGlobalExtr.IsDone()) { Standard_Real LocalMinSqDist = RealLast(); @@ -1371,14 +1371,14 @@ Handle(Adaptor2d_HCurve2d) } if(!myProjIsDone && uperiod) { Standard_Real aUinf, aUsup, Uaux; - aUinf = Surf->Surface().FirstUParameter(); - aUsup = Surf->Surface().LastUParameter(); + aUinf = Surf->FirstUParameter(); + aUsup = Surf->LastUParameter(); if((aUsup - U0) > (U0 - aUinf)) Uaux = 2*aUinf - U0 + uperiod; else Uaux = 2*aUsup - U0 - uperiod; - Extrema_GenLocateExtPS locext(Surf->Surface(), TolU, TolV); + Extrema_GenLocateExtPS locext (*Surf, TolU, TolV); locext.Perform(pntproj, Uaux, V0); if (locext.IsDone()) @@ -1402,14 +1402,14 @@ Handle(Adaptor2d_HCurve2d) } if(!myProjIsDone && vperiod) { Standard_Real aVinf, aVsup, Vaux; - aVinf = Surf->Surface().FirstVParameter(); - aVsup = Surf->Surface().LastVParameter(); + aVinf = Surf->FirstVParameter(); + aVsup = Surf->LastVParameter(); if((aVsup - V0) > (V0 - aVinf)) Vaux = 2*aVinf - V0 + vperiod; else Vaux = 2*aVsup - V0 - vperiod; - Extrema_GenLocateExtPS locext(Surf->Surface(), TolU, TolV); + Extrema_GenLocateExtPS locext (*Surf, TolU, TolV); locext.Perform(pntproj, U0, Vaux); if (locext.IsDone()) @@ -1442,7 +1442,7 @@ Handle(Adaptor2d_HCurve2d) else Vaux = 2*Vsup - V0 - vperiod; - Extrema_GenLocateExtPS locext(Surf->Surface(), TolU, TolV); + Extrema_GenLocateExtPS locext (*Surf, TolU, TolV); locext.Perform(pntproj, Uaux, Vaux); if (locext.IsDone()) @@ -1469,7 +1469,7 @@ Handle(Adaptor2d_HCurve2d) } } if(!myProjIsDone) { - Extrema_ExtPS ext(pntproj, Surf->Surface(), TolU, TolV) ; + Extrema_ExtPS ext(pntproj, *Surf, TolU, TolV) ; if (ext.IsDone()) { Dist2Min = ext.SquareDistance(1); Standard_Integer aGoodValue = 1; @@ -1547,7 +1547,7 @@ Handle(Adaptor2d_HCurve2d) myBSpline->Translate(Offset); ////////////////////////////////////////// Geom2dAdaptor_Curve GAC(myBSpline); - Handle(Adaptor2d_HCurve2d) IC2d = new Geom2dAdaptor_HCurve(GAC); + Handle(Adaptor2d_Curve2d) IC2d = new Geom2dAdaptor_Curve(GAC); #ifdef OCCT_DEBUG // char name [100]; // sprintf(name,"%s_%d","build",compteur++); @@ -1559,7 +1559,7 @@ Handle(Adaptor2d_HCurve2d) // Modified by Sergey KHROMOV - Thu Apr 18 10:57:50 2002 Begin // Standard_NoSuchObject_Raise_if(1,"ProjLib_Compu: build echec"); // Modified by Sergey KHROMOV - Thu Apr 18 10:57:51 2002 End - return Handle(Adaptor2d_HCurve2d)(); + return Handle(Adaptor2d_Curve2d)(); } // myProjIsDone = Standard_False; // Modified by Sergey KHROMOV - Thu Apr 18 10:58:01 2002 Begin @@ -1573,9 +1573,9 @@ Handle(Adaptor2d_HCurve2d) //======================================================================= Handle(Geom2d_BSplineCurve) ProjLib_ComputeApproxOnPolarSurface:: - ProjectUsingInitialCurve2d(const Handle(Adaptor3d_HCurve)& Curve, - const Handle(Adaptor3d_HSurface)& Surf, - const Handle(Adaptor2d_HCurve2d)& InitCurve2d) + ProjectUsingInitialCurve2d(const Handle(Adaptor3d_Curve)& Curve, + const Handle(Adaptor3d_Surface)& Surf, + const Handle(Adaptor2d_Curve2d)& InitCurve2d) { //OCC217 Standard_Real Tol3d = myTolerance; @@ -1661,7 +1661,7 @@ Handle(Geom2d_BSplineCurve) myProjIsDone = Standard_False; Dist2Min = IntegerLast(); - Extrema_GenLocateExtPS extrloc(Surf->Surface(), TolU, TolV); + Extrema_GenLocateExtPS extrloc (*Surf, TolU, TolV); extrloc.Perform(BSC->Pole(i), (p11.X()+p22.X())/2, (p11.Y()+p22.Y())/2); if (extrloc.IsDone()) { @@ -1701,7 +1701,7 @@ Handle(Geom2d_BSplineCurve) for(i = 1;i <= Curve->NbPoles();i++) { Dist2Min = IntegerLast(); - Extrema_GenLocateExtPS extrloc(Surf->Surface(), TolU, TolV); + Extrema_GenLocateExtPS extrloc (*Surf, TolU, TolV); extrloc.Perform(BC->Pole(i), 0.5, 0.5); if (extrloc.IsDone()) { @@ -1761,7 +1761,7 @@ Handle(Geom2d_BSplineCurve) myProjIsDone = Standard_False; Dist2Min = IntegerLast(); - Extrema_GenLocateExtPS extrloc(Surf->Surface(), TolU, TolV); + Extrema_GenLocateExtPS extrloc (*Surf, TolU, TolV); extrloc.Perform(BSC->Pole(i), (p11.X()+p22.X())/2, (p11.Y()+p22.Y())/2); if (extrloc.IsDone()) { @@ -1801,7 +1801,7 @@ Handle(Geom2d_BSplineCurve) for(i = 1;i <= Curve->NbPoles();i++) { Dist2Min = IntegerLast(); - Extrema_GenLocateExtPS extrloc(Surf->Surface(), TolU, TolV); + Extrema_GenLocateExtPS extrloc (*Surf, TolU, TolV); extrloc.Perform(BC->Pole(i), 0.5, 0.5); if (extrloc.IsDone()) { @@ -1866,8 +1866,8 @@ Handle(Geom2d_BSplineCurve) DrawTrSurf::Set(Temp,DummyC2d); #endif // DrawTrSurf::Set((Standard_CString ) "bs2d",DummyC2d); - Handle(Geom2dAdaptor_HCurve) DDD = - Handle(Geom2dAdaptor_HCurve)::DownCast(InitCurve2d); + Handle(Geom2dAdaptor_Curve) DDD = + Handle(Geom2dAdaptor_Curve)::DownCast(InitCurve2d); #ifdef DRAW Temp = "initc2d"; diff --git a/src/ProjLib/ProjLib_ComputeApproxOnPolarSurface.hxx b/src/ProjLib/ProjLib_ComputeApproxOnPolarSurface.hxx index 393c8c68db..730fffd67e 100644 --- a/src/ProjLib/ProjLib_ComputeApproxOnPolarSurface.hxx +++ b/src/ProjLib/ProjLib_ComputeApproxOnPolarSurface.hxx @@ -17,19 +17,13 @@ #ifndef _ProjLib_ComputeApproxOnPolarSurface_HeaderFile #define _ProjLib_ComputeApproxOnPolarSurface_HeaderFile -#include -#include -#include - -#include -#include +#include +#include +#include #include + class Geom2d_BSplineCurve; class Geom2d_Curve; -class Adaptor3d_HCurve; -class Adaptor3d_HSurface; -class Adaptor2d_HCurve2d; - //! Approximate the projection of a 3d curve on an //! polar surface and stores the result in Approx. @@ -53,18 +47,18 @@ public: Standard_EXPORT ProjLib_ComputeApproxOnPolarSurface(); //! Constructor, which performs projecting. - Standard_EXPORT ProjLib_ComputeApproxOnPolarSurface(const Handle(Adaptor3d_HCurve)& C, const Handle(Adaptor3d_HSurface)& S, const Standard_Real Tol = 1.0e-4); + Standard_EXPORT ProjLib_ComputeApproxOnPolarSurface(const Handle(Adaptor3d_Curve)& C, const Handle(Adaptor3d_Surface)& S, const Standard_Real Tol = 1.0e-4); //! Constructor, which performs projecting, using initial curve 2d InitCurve2d, which is any rough approximation of result curve. //! Parameter Tol is 3d tolerance of approximation. - Standard_EXPORT ProjLib_ComputeApproxOnPolarSurface(const Handle(Adaptor2d_HCurve2d)& InitCurve2d, const Handle(Adaptor3d_HCurve)& C, const Handle(Adaptor3d_HSurface)& S, const Standard_Real Tol); + Standard_EXPORT ProjLib_ComputeApproxOnPolarSurface(const Handle(Adaptor2d_Curve2d)& InitCurve2d, const Handle(Adaptor3d_Curve)& C, const Handle(Adaptor3d_Surface)& S, const Standard_Real Tol); //! Constructor, which performs projecting, using two initial curves 2d: InitCurve2d and InitCurve2dBis that are any rough approximations of result curves. //! This constructor is used to get two pcurves for seem edge. //! Parameter Tol is 3d tolerance of approximation. - Standard_EXPORT ProjLib_ComputeApproxOnPolarSurface(const Handle(Adaptor2d_HCurve2d)& InitCurve2d, const Handle(Adaptor2d_HCurve2d)& InitCurve2dBis, const Handle(Adaptor3d_HCurve)& C, - const Handle(Adaptor3d_HSurface)& S, const Standard_Real Tol); + Standard_EXPORT ProjLib_ComputeApproxOnPolarSurface(const Handle(Adaptor2d_Curve2d)& InitCurve2d, const Handle(Adaptor2d_Curve2d)& InitCurve2dBis, const Handle(Adaptor3d_Curve)& C, + const Handle(Adaptor3d_Surface)& S, const Standard_Real Tol); //! Set min and max possible degree of result BSpline curve2d, which is got by approximation. @@ -94,21 +88,21 @@ public: //! Method, which performs projecting, using default values of parameters or //! they must be set by corresponding methods before using. - Standard_EXPORT void Perform (const Handle(Adaptor3d_HCurve)& C, const Handle(Adaptor3d_HSurface)& S); + Standard_EXPORT void Perform (const Handle(Adaptor3d_Curve)& C, const Handle(Adaptor3d_Surface)& S); //! Method, which performs projecting, using default values of parameters or //! they must be set by corresponding methods before using. //! Parameter InitCurve2d is any rough estimation of 2d result curve. - Standard_EXPORT Handle(Geom2d_BSplineCurve) Perform (const Handle(Adaptor2d_HCurve2d)& InitCurve2d, const Handle(Adaptor3d_HCurve)& C, const Handle(Adaptor3d_HSurface)& S); + Standard_EXPORT Handle(Geom2d_BSplineCurve) Perform (const Handle(Adaptor2d_Curve2d)& InitCurve2d, const Handle(Adaptor3d_Curve)& C, const Handle(Adaptor3d_Surface)& S); //! Builds initial 2d curve as BSpline with degree = 1 using Extrema algoritm. //! Method is used in method Perform(...). - Standard_EXPORT Handle(Adaptor2d_HCurve2d) BuildInitialCurve2d (const Handle(Adaptor3d_HCurve)& Curve, const Handle(Adaptor3d_HSurface)& S); + Standard_EXPORT Handle(Adaptor2d_Curve2d) BuildInitialCurve2d (const Handle(Adaptor3d_Curve)& Curve, const Handle(Adaptor3d_Surface)& S); //! Method, which performs projecting. //! Method is used in method Perform(...). - Standard_EXPORT Handle(Geom2d_BSplineCurve) ProjectUsingInitialCurve2d (const Handle(Adaptor3d_HCurve)& Curve, const Handle(Adaptor3d_HSurface)& S, const Handle(Adaptor2d_HCurve2d)& InitCurve2d); + Standard_EXPORT Handle(Geom2d_BSplineCurve) ProjectUsingInitialCurve2d (const Handle(Adaptor3d_Curve)& Curve, const Handle(Adaptor3d_Surface)& S, const Handle(Adaptor2d_Curve2d)& InitCurve2d); //! Returns result curve 2d. Standard_EXPORT Handle(Geom2d_BSplineCurve) BSpline() const; diff --git a/src/ProjLib/ProjLib_HCompProjectedCurve.hxx b/src/ProjLib/ProjLib_HCompProjectedCurve.hxx index 33acf0b40f..2017d69f33 100644 --- a/src/ProjLib/ProjLib_HCompProjectedCurve.hxx +++ b/src/ProjLib/ProjLib_HCompProjectedCurve.hxx @@ -17,77 +17,9 @@ #ifndef _ProjLib_HCompProjectedCurve_HeaderFile #define _ProjLib_HCompProjectedCurve_HeaderFile -#include -#include - #include -#include -class Standard_OutOfRange; -class Standard_NoSuchObject; -class Standard_DomainError; -class ProjLib_CompProjectedCurve; -class Adaptor2d_Curve2d; - - -class ProjLib_HCompProjectedCurve; -DEFINE_STANDARD_HANDLE(ProjLib_HCompProjectedCurve, Adaptor2d_HCurve2d) - - -class ProjLib_HCompProjectedCurve : public Adaptor2d_HCurve2d -{ - -public: - - - //! Creates an empty GenHCurve2d. - Standard_EXPORT ProjLib_HCompProjectedCurve(); - - //! Creates a GenHCurve2d from a Curve - Standard_EXPORT ProjLib_HCompProjectedCurve(const ProjLib_CompProjectedCurve& C); - - //! Sets the field of the GenHCurve2d. - Standard_EXPORT void Set (const ProjLib_CompProjectedCurve& C); - - //! Returns the curve used to create the GenHCurve2d. - //! This is redefined from HCurve2d, cannot be inline. - Standard_EXPORT const Adaptor2d_Curve2d& Curve2d() const Standard_OVERRIDE; - - //! Returns the curve used to create the GenHCurve. - ProjLib_CompProjectedCurve& ChangeCurve2d(); - - - - - DEFINE_STANDARD_RTTI_INLINE(ProjLib_HCompProjectedCurve,Adaptor2d_HCurve2d) - -protected: - - - ProjLib_CompProjectedCurve myCurve; - - -private: - - - - -}; - -#define TheCurve ProjLib_CompProjectedCurve -#define TheCurve_hxx -#define Adaptor2d_GenHCurve2d ProjLib_HCompProjectedCurve -#define Adaptor2d_GenHCurve2d_hxx -#define Handle_Adaptor2d_GenHCurve2d Handle(ProjLib_HCompProjectedCurve) - -#include - -#undef TheCurve -#undef TheCurve_hxx -#undef Adaptor2d_GenHCurve2d -#undef Adaptor2d_GenHCurve2d_hxx -#undef Handle_Adaptor2d_GenHCurve2d - - +// alias for porting old code +typedef ProjLib_CompProjectedCurve ProjLib_HCompProjectedCurve; #endif // _ProjLib_HCompProjectedCurve_HeaderFile diff --git a/src/ProjLib/ProjLib_HCompProjectedCurve_0.cxx b/src/ProjLib/ProjLib_HCompProjectedCurve_0.cxx deleted file mode 100644 index 9052a74d33..0000000000 --- a/src/ProjLib/ProjLib_HCompProjectedCurve_0.cxx +++ /dev/null @@ -1,42 +0,0 @@ -// Created on: 1993-08-11 -// Created by: Bruno DUMORTIER -// Copyright (c) 1993-1999 Matra Datavision -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - -#include - -#include - -#include -#include -#include -#include -#include - - - - - - - - - - -#define TheCurve ProjLib_CompProjectedCurve -#define TheCurve_hxx -#define Adaptor2d_GenHCurve2d ProjLib_HCompProjectedCurve -#define Adaptor2d_GenHCurve2d_hxx -#define Handle_Adaptor2d_GenHCurve2d Handle(ProjLib_HCompProjectedCurve) -#include - diff --git a/src/ProjLib/ProjLib_HProjectedCurve.hxx b/src/ProjLib/ProjLib_HProjectedCurve.hxx index 05701d7a2d..6927c125a2 100644 --- a/src/ProjLib/ProjLib_HProjectedCurve.hxx +++ b/src/ProjLib/ProjLib_HProjectedCurve.hxx @@ -17,77 +17,9 @@ #ifndef _ProjLib_HProjectedCurve_HeaderFile #define _ProjLib_HProjectedCurve_HeaderFile -#include -#include - #include -#include -class Standard_OutOfRange; -class Standard_NoSuchObject; -class Standard_DomainError; -class ProjLib_ProjectedCurve; -class Adaptor2d_Curve2d; - - -class ProjLib_HProjectedCurve; -DEFINE_STANDARD_HANDLE(ProjLib_HProjectedCurve, Adaptor2d_HCurve2d) - - -class ProjLib_HProjectedCurve : public Adaptor2d_HCurve2d -{ - -public: - - - //! Creates an empty GenHCurve2d. - Standard_EXPORT ProjLib_HProjectedCurve(); - - //! Creates a GenHCurve2d from a Curve - Standard_EXPORT ProjLib_HProjectedCurve(const ProjLib_ProjectedCurve& C); - - //! Sets the field of the GenHCurve2d. - Standard_EXPORT void Set (const ProjLib_ProjectedCurve& C); - - //! Returns the curve used to create the GenHCurve2d. - //! This is redefined from HCurve2d, cannot be inline. - Standard_EXPORT const Adaptor2d_Curve2d& Curve2d() const Standard_OVERRIDE; - - //! Returns the curve used to create the GenHCurve. - ProjLib_ProjectedCurve& ChangeCurve2d(); - - - - - DEFINE_STANDARD_RTTI_INLINE(ProjLib_HProjectedCurve,Adaptor2d_HCurve2d) - -protected: - - - ProjLib_ProjectedCurve myCurve; - - -private: - - - - -}; - -#define TheCurve ProjLib_ProjectedCurve -#define TheCurve_hxx -#define Adaptor2d_GenHCurve2d ProjLib_HProjectedCurve -#define Adaptor2d_GenHCurve2d_hxx -#define Handle_Adaptor2d_GenHCurve2d Handle(ProjLib_HProjectedCurve) - -#include - -#undef TheCurve -#undef TheCurve_hxx -#undef Adaptor2d_GenHCurve2d -#undef Adaptor2d_GenHCurve2d_hxx -#undef Handle_Adaptor2d_GenHCurve2d - - +// alias for porting old code +typedef ProjLib_ProjectedCurve ProjLib_HProjectedCurve; #endif // _ProjLib_HProjectedCurve_HeaderFile diff --git a/src/ProjLib/ProjLib_HProjectedCurve_0.cxx b/src/ProjLib/ProjLib_HProjectedCurve_0.cxx deleted file mode 100644 index c9d764dd1c..0000000000 --- a/src/ProjLib/ProjLib_HProjectedCurve_0.cxx +++ /dev/null @@ -1,42 +0,0 @@ -// Created on: 1993-08-11 -// Created by: Bruno DUMORTIER -// Copyright (c) 1993-1999 Matra Datavision -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - -#include - -#include - -#include -#include -#include -#include -#include - - - - - - - - - - -#define TheCurve ProjLib_ProjectedCurve -#define TheCurve_hxx -#define Adaptor2d_GenHCurve2d ProjLib_HProjectedCurve -#define Adaptor2d_GenHCurve2d_hxx -#define Handle_Adaptor2d_GenHCurve2d Handle(ProjLib_HProjectedCurve) -#include - diff --git a/src/ProjLib/ProjLib_ProjectOnPlane.cxx b/src/ProjLib/ProjLib_ProjectOnPlane.cxx index 7a876ab7e8..1496e2848d 100644 --- a/src/ProjLib/ProjLib_ProjectOnPlane.cxx +++ b/src/ProjLib/ProjLib_ProjectOnPlane.cxx @@ -34,8 +34,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include @@ -56,7 +56,7 @@ //======================================================================= static gp_Pnt OnPlane_Value(const Standard_Real U, - const Handle(Adaptor3d_HCurve)& aCurvePtr, + const Handle(Adaptor3d_Curve)& aCurvePtr, const gp_Ax3& Pl, const gp_Dir& D) { @@ -82,7 +82,7 @@ static gp_Pnt OnPlane_Value(const Standard_Real U, static gp_Vec OnPlane_DN(const Standard_Real U, const Standard_Integer DerivativeRequest, - const Handle(Adaptor3d_HCurve)& aCurvePtr, + const Handle(Adaptor3d_Curve)& aCurvePtr, const gp_Ax3& Pl, const gp_Dir& D) { @@ -110,7 +110,7 @@ static gp_Vec OnPlane_DN(const Standard_Real U, static Standard_Boolean OnPlane_D1(const Standard_Real U, gp_Pnt& P, gp_Vec& V, - const Handle(Adaptor3d_HCurve)& aCurvePtr, + const Handle(Adaptor3d_Curve)& aCurvePtr, const gp_Ax3& Pl, const gp_Dir& D) { @@ -152,7 +152,7 @@ static Standard_Boolean OnPlane_D2(const Standard_Real U, gp_Pnt& P, gp_Vec& V1, gp_Vec& V2, - const Handle(Adaptor3d_HCurve) & aCurvePtr, + const Handle(Adaptor3d_Curve) & aCurvePtr, const gp_Ax3& Pl, const gp_Dir& D) { @@ -200,7 +200,7 @@ static Standard_Boolean OnPlane_D3(const Standard_Real U, gp_Vec& V1, gp_Vec& V2, gp_Vec& V3, - const Handle(Adaptor3d_HCurve)& aCurvePtr, + const Handle(Adaptor3d_Curve)& aCurvePtr, const gp_Ax3& Pl, const gp_Dir& D) { @@ -251,13 +251,13 @@ static Standard_Boolean OnPlane_D3(const Standard_Real U, class ProjLib_OnPlane : public AppCont_Function { - Handle(Adaptor3d_HCurve) myCurve; + Handle(Adaptor3d_Curve) myCurve; gp_Ax3 myPlane; gp_Dir myDirection; public : - ProjLib_OnPlane(const Handle(Adaptor3d_HCurve)& C, + ProjLib_OnPlane(const Handle(Adaptor3d_Curve)& C, const gp_Ax3& Pl, const gp_Dir& D) : myCurve(C), @@ -309,7 +309,7 @@ public : //purpose : //======================================================================= -static void PerformApprox (const Handle(Adaptor3d_HCurve)& C, +static void PerformApprox (const Handle(Adaptor3d_Curve)& C, const gp_Ax3& Pl, const gp_Dir& D, Handle(Geom_BSplineCurve) &BSplineCurvePtr) @@ -491,7 +491,7 @@ static gp_Vec ProjectVec(const gp_Ax3& ThePlane, //purpose : //======================================================================= -void ProjLib_ProjectOnPlane::Load(const Handle(Adaptor3d_HCurve)& C, +void ProjLib_ProjectOnPlane::Load(const Handle(Adaptor3d_Curve)& C, const Standard_Real Tolerance, const Standard_Boolean KeepParametrization) @@ -502,7 +502,7 @@ void ProjLib_ProjectOnPlane::Load(const Handle(Adaptor3d_HCurve)& C, myTolerance = Tolerance ; Handle(Geom_BSplineCurve) ApproxCurve; - Handle(GeomAdaptor_HCurve) aGAHCurve; + Handle(GeomAdaptor_Curve) aGAHCurve; Handle(Geom_Line) GeomLinePtr; Handle(Geom_Circle) GeomCirclePtr ; @@ -544,7 +544,7 @@ void ProjLib_ProjectOnPlane::Load(const Handle(Adaptor3d_HCurve)& C, // Modified by Sergey KHROMOV - Tue Jan 29 16:57:29 2002 Begin GeomAdaptor_Curve aGACurve(BSP); - myResult = new GeomAdaptor_HCurve(aGACurve); + myResult = new GeomAdaptor_Curve(aGACurve); // Modified by Sergey KHROMOV - Tue Jan 29 16:57:30 2002 End } else if ( Abs( Xc.Magnitude() - 1.) < Precision::Confusion()) { @@ -559,7 +559,7 @@ void ProjLib_ProjectOnPlane::Load(const Handle(Adaptor3d_HCurve)& C, GeomAdaptor_Curve aGACurve(GeomLinePtr, myCurve->FirstParameter(), myCurve->LastParameter() ); - myResult = new GeomAdaptor_HCurve(aGACurve); + myResult = new GeomAdaptor_Curve(aGACurve); // Modified by Sergey KHROMOV - Tue Jan 29 16:57:30 2002 End } else { @@ -583,7 +583,7 @@ void ProjLib_ProjectOnPlane::Load(const Handle(Adaptor3d_HCurve)& C, GeomAdaptor_Curve aGACurve(GeomLinePtr, myFirstPar, myLastPar) ; - myResult = new GeomAdaptor_HCurve(aGACurve); + myResult = new GeomAdaptor_Curve(aGACurve); // Modified by Sergey KHROMOV - Tue Jan 29 16:57:30 2002 End } else { @@ -610,7 +610,7 @@ void ProjLib_ProjectOnPlane::Load(const Handle(Adaptor3d_HCurve)& C, NewCurvePtr->SetKnots(BsplineKnots) ; // Modified by Sergey KHROMOV - Tue Jan 29 16:57:29 2002 Begin GeomAdaptor_Curve aGACurve(NewCurvePtr); - myResult = new GeomAdaptor_HCurve(aGACurve); + myResult = new GeomAdaptor_Curve(aGACurve); // Modified by Sergey KHROMOV - Tue Jan 29 16:57:30 2002 End } } @@ -729,7 +729,7 @@ void ProjLib_ProjectOnPlane::Load(const Handle(Adaptor3d_HCurve)& C, GeomCirclePtr = new Geom_Circle(Circ); // Modified by Sergey KHROMOV - Tue Jan 29 16:57:29 2002 Begin GeomAdaptor_Curve aGACurve(GeomCirclePtr); - myResult = new GeomAdaptor_HCurve(aGACurve); + myResult = new GeomAdaptor_Curve(aGACurve); // Modified by Sergey KHROMOV - Tue Jan 29 16:57:30 2002 End } else if ( Major > Minor) { @@ -739,7 +739,7 @@ void ProjLib_ProjectOnPlane::Load(const Handle(Adaptor3d_HCurve)& C, GeomEllipsePtr = new Geom_Ellipse(Elips); // Modified by Sergey KHROMOV - Tue Jan 29 16:57:29 2002 Begin GeomAdaptor_Curve aGACurve(GeomEllipsePtr); - myResult = new GeomAdaptor_HCurve(aGACurve); + myResult = new GeomAdaptor_Curve(aGACurve); // Modified by Sergey KHROMOV - Tue Jan 29 16:57:30 2002 End } else { @@ -755,7 +755,7 @@ void ProjLib_ProjectOnPlane::Load(const Handle(Adaptor3d_HCurve)& C, PerformApprox(myCurve,myPlane,myDirection,ApproxCurve); // Modified by Sergey KHROMOV - Tue Jan 29 16:57:29 2002 Begin GeomAdaptor_Curve aGACurve(ApproxCurve); - myResult = new GeomAdaptor_HCurve(aGACurve); + myResult = new GeomAdaptor_Curve(aGACurve); // Modified by Sergey KHROMOV - Tue Jan 29 16:57:30 2002 End } else if (GeomCirclePtr || GeomEllipsePtr) @@ -799,7 +799,7 @@ void ProjLib_ProjectOnPlane::Load(const Handle(Adaptor3d_HCurve)& C, GeomLinePtr = new Geom_Line(aLine) ; // Modified by Sergey KHROMOV - Tue Jan 29 16:57:29 2002 Begin GeomAdaptor_Curve aGACurve(GeomLinePtr); - myResult = new GeomAdaptor_HCurve(aGACurve); + myResult = new GeomAdaptor_Curve(aGACurve); // Modified by Sergey KHROMOV - Tue Jan 29 16:57:30 2002 End alocalIsDone = Standard_True; } @@ -811,7 +811,7 @@ void ProjLib_ProjectOnPlane::Load(const Handle(Adaptor3d_HCurve)& C, new Geom_Parabola(aParab) ; // Modified by Sergey KHROMOV - Tue Jan 29 16:57:29 2002 Begin GeomAdaptor_Curve aGACurve(GeomParabolaPtr); - myResult = new GeomAdaptor_HCurve(aGACurve); + myResult = new GeomAdaptor_Curve(aGACurve); // Modified by Sergey KHROMOV - Tue Jan 29 16:57:30 2002 End alocalIsDone = Standard_True; } @@ -822,7 +822,7 @@ void ProjLib_ProjectOnPlane::Load(const Handle(Adaptor3d_HCurve)& C, PerformApprox(myCurve,myPlane,myDirection,ApproxCurve); // Modified by Sergey KHROMOV - Tue Jan 29 16:57:29 2002 Begin GeomAdaptor_Curve aGACurve(ApproxCurve); - myResult = new GeomAdaptor_HCurve(aGACurve); + myResult = new GeomAdaptor_Curve(aGACurve); // Modified by Sergey KHROMOV - Tue Jan 29 16:57:30 2002 End } } @@ -851,7 +851,7 @@ void ProjLib_ProjectOnPlane::Load(const Handle(Adaptor3d_HCurve)& C, new Geom_Hyperbola(Hypr) ; // Modified by Sergey KHROMOV - Tue Jan 29 16:57:29 2002 Begin GeomAdaptor_Curve aGACurve(GeomHyperbolaPtr); - myResult = new GeomAdaptor_HCurve(aGACurve); + myResult = new GeomAdaptor_Curve(aGACurve); // Modified by Sergey KHROMOV - Tue Jan 29 16:57:30 2002 End } else if ( Yc.Magnitude() < Precision::Confusion()) { @@ -862,7 +862,7 @@ void ProjLib_ProjectOnPlane::Load(const Handle(Adaptor3d_HCurve)& C, new Geom_Hyperbola(Hypr) ; // Modified by Sergey KHROMOV - Tue Jan 29 16:57:29 2002 Begin GeomAdaptor_Curve aGACurve(GeomHyperbolaPtr); - myResult = new GeomAdaptor_HCurve(aGACurve); + myResult = new GeomAdaptor_Curve(aGACurve); // Modified by Sergey KHROMOV - Tue Jan 29 16:57:30 2002 End } else if ( Xc.IsNormal(Yc,Precision::Angular())) { @@ -873,7 +873,7 @@ void ProjLib_ProjectOnPlane::Load(const Handle(Adaptor3d_HCurve)& C, new Geom_Hyperbola(Hypr) ; // Modified by Sergey KHROMOV - Tue Jan 29 16:57:29 2002 Begin GeomAdaptor_Curve aGACurve(GeomHyperbolaPtr); - myResult = new GeomAdaptor_HCurve(aGACurve); + myResult = new GeomAdaptor_Curve(aGACurve); // Modified by Sergey KHROMOV - Tue Jan 29 16:57:30 2002 End } else { @@ -882,7 +882,7 @@ void ProjLib_ProjectOnPlane::Load(const Handle(Adaptor3d_HCurve)& C, PerformApprox(myCurve,myPlane,myDirection,ApproxCurve); // Modified by Sergey KHROMOV - Tue Jan 29 16:57:29 2002 Begin GeomAdaptor_Curve aGACurve(ApproxCurve); - myResult = new GeomAdaptor_HCurve(aGACurve); + myResult = new GeomAdaptor_Curve(aGACurve); // Modified by Sergey KHROMOV - Tue Jan 29 16:57:30 2002 End } } @@ -907,7 +907,7 @@ void ProjLib_ProjectOnPlane::Load(const Handle(Adaptor3d_HCurve)& C, // Modified by Sergey KHROMOV - Tue Jan 29 16:57:29 2002 Begin GeomAdaptor_Curve aGACurve(ProjCu); - myResult = new GeomAdaptor_HCurve(aGACurve); + myResult = new GeomAdaptor_Curve(aGACurve); // Modified by Sergey KHROMOV - Tue Jan 29 16:57:30 2002 End } break ; @@ -931,7 +931,7 @@ void ProjLib_ProjectOnPlane::Load(const Handle(Adaptor3d_HCurve)& C, // Modified by Sergey KHROMOV - Tue Jan 29 16:57:29 2002 Begin GeomAdaptor_Curve aGACurve(ProjectedBSplinePtr); - myResult = new GeomAdaptor_HCurve(aGACurve); + myResult = new GeomAdaptor_Curve(aGACurve); // Modified by Sergey KHROMOV - Tue Jan 29 16:57:30 2002 End } break; @@ -943,7 +943,7 @@ void ProjLib_ProjectOnPlane::Load(const Handle(Adaptor3d_HCurve)& C, PerformApprox(myCurve,myPlane,myDirection,ApproxCurve); // Modified by Sergey KHROMOV - Tue Jan 29 16:57:29 2002 Begin GeomAdaptor_Curve aGACurve(ApproxCurve); - myResult = new GeomAdaptor_HCurve(aGACurve); + myResult = new GeomAdaptor_Curve(aGACurve); // Modified by Sergey KHROMOV - Tue Jan 29 16:57:30 2002 End } break; @@ -975,7 +975,7 @@ const gp_Dir& ProjLib_ProjectOnPlane::GetDirection() const //purpose : //======================================================================= -const Handle(Adaptor3d_HCurve)& ProjLib_ProjectOnPlane::GetCurve() const +const Handle(Adaptor3d_Curve)& ProjLib_ProjectOnPlane::GetCurve() const { return myCurve; } @@ -985,7 +985,7 @@ const Handle(Adaptor3d_HCurve)& ProjLib_ProjectOnPlane::GetCurve() const //purpose : //======================================================================= -const Handle(GeomAdaptor_HCurve)& ProjLib_ProjectOnPlane::GetResult() const +const Handle(GeomAdaptor_Curve)& ProjLib_ProjectOnPlane::GetResult() const { return myResult; } @@ -1057,7 +1057,7 @@ void ProjLib_ProjectOnPlane::Intervals(TColStd_Array1OfReal& T, //purpose : //======================================================================= -Handle(Adaptor3d_HCurve) +Handle(Adaptor3d_Curve) ProjLib_ProjectOnPlane::Trim(const Standard_Real First, const Standard_Real Last, const Standard_Real Tolerance) const diff --git a/src/ProjLib/ProjLib_ProjectOnPlane.hxx b/src/ProjLib/ProjLib_ProjectOnPlane.hxx index e3d50ce496..3414d282c3 100644 --- a/src/ProjLib/ProjLib_ProjectOnPlane.hxx +++ b/src/ProjLib/ProjLib_ProjectOnPlane.hxx @@ -17,21 +17,15 @@ #ifndef _ProjLib_ProjectOnPlane_HeaderFile #define _ProjLib_ProjectOnPlane_HeaderFile -#include -#include -#include - +#include #include #include -#include -#include #include +#include #include #include -#include #include -class Adaptor3d_HCurve; -class GeomAdaptor_HCurve; + class Standard_OutOfRange; class Standard_NoSuchObject; class Standard_DomainError; @@ -49,7 +43,6 @@ class gp_Parab; class Geom_BezierCurve; class Geom_BSplineCurve; - //! Class used to project a 3d curve on a plane. The //! result will be a 3d curve. //! @@ -84,15 +77,15 @@ public: //! the parametrization of the initial curve . It //! meens: proj(C(u)) = PC(u) for each u. Otherwize, //! the parametrization may change. - Standard_EXPORT void Load (const Handle(Adaptor3d_HCurve)& C, const Standard_Real Tolerance, const Standard_Boolean KeepParametrization = Standard_True); + Standard_EXPORT void Load (const Handle(Adaptor3d_Curve)& C, const Standard_Real Tolerance, const Standard_Boolean KeepParametrization = Standard_True); Standard_EXPORT const gp_Ax3& GetPlane() const; Standard_EXPORT const gp_Dir& GetDirection() const; - Standard_EXPORT const Handle(Adaptor3d_HCurve)& GetCurve() const; + Standard_EXPORT const Handle(Adaptor3d_Curve)& GetCurve() const; - Standard_EXPORT const Handle(GeomAdaptor_HCurve)& GetResult() const; + Standard_EXPORT const Handle(GeomAdaptor_Curve)& GetResult() const; Standard_EXPORT Standard_Real FirstParameter() const Standard_OVERRIDE; @@ -116,7 +109,7 @@ public: //! parameters and . is used to //! test for 3d points confusion. //! If >= - Standard_EXPORT Handle(Adaptor3d_HCurve) Trim (const Standard_Real First, const Standard_Real Last, const Standard_Real Tol) const Standard_OVERRIDE; + Standard_EXPORT Handle(Adaptor3d_Curve) Trim (const Standard_Real First, const Standard_Real Last, const Standard_Real Tol) const Standard_OVERRIDE; Standard_EXPORT Standard_Boolean IsClosed() const Standard_OVERRIDE; @@ -212,7 +205,7 @@ private: - Handle(Adaptor3d_HCurve) myCurve; + Handle(Adaptor3d_Curve) myCurve; gp_Ax3 myPlane; gp_Dir myDirection; Standard_Boolean myKeepParam; @@ -220,7 +213,7 @@ private: Standard_Real myLastPar; Standard_Real myTolerance; GeomAbs_CurveType myType; - Handle(GeomAdaptor_HCurve) myResult; + Handle(GeomAdaptor_Curve) myResult; Standard_Boolean myIsApprox; diff --git a/src/ProjLib/ProjLib_ProjectOnSurface.cxx b/src/ProjLib/ProjLib_ProjectOnSurface.cxx index d14309a8ad..a20e997a47 100644 --- a/src/ProjLib/ProjLib_ProjectOnSurface.cxx +++ b/src/ProjLib/ProjLib_ProjectOnSurface.cxx @@ -15,8 +15,8 @@ // commercial license or contractual agreement. -#include -#include +#include +#include #include #include #include @@ -37,7 +37,7 @@ //purpose : Evaluate current point of the projected curve //======================================================================= static gp_Pnt OnSurface_Value(const Standard_Real U, - const Handle(Adaptor3d_HCurve)& myCurve, + const Handle(Adaptor3d_Curve)& myCurve, Extrema_ExtPS * myExtPS) { // on essaie de rendre le point solution le plus proche. @@ -69,7 +69,7 @@ static gp_Pnt OnSurface_Value(const Standard_Real U, static Standard_Boolean OnSurface_D1(const Standard_Real , // U, gp_Pnt& , // P, gp_Vec& , // V, - const Handle(Adaptor3d_HCurve)& , // myCurve, + const Handle(Adaptor3d_Curve)& , // myCurve, Extrema_ExtPS *) // myExtPS) { return Standard_False; @@ -86,8 +86,8 @@ class ProjLib_OnSurface : public AppCont_Function { public: - ProjLib_OnSurface(const Handle(Adaptor3d_HCurve) & C, - const Handle(Adaptor3d_HSurface) & S) + ProjLib_OnSurface(const Handle(Adaptor3d_Curve) & C, + const Handle(Adaptor3d_Surface) & S) : myCurve(C) { myNbPnt = 1; @@ -95,7 +95,7 @@ public: Standard_Real U = myCurve->FirstParameter(); gp_Pnt P = myCurve->Value(U); Standard_Real Tol = Precision::PConfusion(); - myExtPS = new Extrema_ExtPS(P,S->Surface(),Tol,Tol); + myExtPS = new Extrema_ExtPS (P, *S, Tol, Tol); } ~ProjLib_OnSurface() { delete myExtPS; } @@ -127,7 +127,7 @@ private: ProjLib_OnSurface& operator= (const ProjLib_OnSurface&); private: - Handle(Adaptor3d_HCurve) myCurve; + Handle(Adaptor3d_Curve) myCurve; Extrema_ExtPS* myExtPS; }; @@ -158,14 +158,14 @@ myIsDone(Standard_False) //======================================================================= ProjLib_ProjectOnSurface::ProjLib_ProjectOnSurface -(const Handle(Adaptor3d_HSurface)& S ) : +(const Handle(Adaptor3d_Surface)& S ) : myTolerance(0.0), myIsDone(Standard_False) { mySurface = S; } -void ProjLib_ProjectOnSurface::Load(const Handle(Adaptor3d_HCurve)& C, +void ProjLib_ProjectOnSurface::Load(const Handle(Adaptor3d_Curve)& C, const Standard_Real Tolerance) { myTolerance = Tolerance ; diff --git a/src/ProjLib/ProjLib_ProjectOnSurface.hxx b/src/ProjLib/ProjLib_ProjectOnSurface.hxx index a88db5fa1f..14726366de 100644 --- a/src/ProjLib/ProjLib_ProjectOnSurface.hxx +++ b/src/ProjLib/ProjLib_ProjectOnSurface.hxx @@ -17,17 +17,10 @@ #ifndef _ProjLib_ProjectOnSurface_HeaderFile #define _ProjLib_ProjectOnSurface_HeaderFile -#include -#include -#include +#include -#include -#include -class Adaptor3d_HCurve; -class Adaptor3d_HSurface; class Geom_BSplineCurve; - //! Project a curve on a surface. The result ( a 3D //! Curve) will be an approximation class ProjLib_ProjectOnSurface @@ -41,16 +34,16 @@ public: Standard_EXPORT ProjLib_ProjectOnSurface(); //! Create a projector normaly to the surface . - Standard_EXPORT ProjLib_ProjectOnSurface(const Handle(Adaptor3d_HSurface)& S); + Standard_EXPORT ProjLib_ProjectOnSurface(const Handle(Adaptor3d_Surface)& S); Standard_EXPORT virtual ~ProjLib_ProjectOnSurface(); //! Set the Surface to . //! To compute the projection, you have to Load the Curve. - Standard_EXPORT void Load (const Handle(Adaptor3d_HSurface)& S); + Standard_EXPORT void Load (const Handle(Adaptor3d_Surface)& S); //! Compute the projection of the curve on the Surface. - Standard_EXPORT void Load (const Handle(Adaptor3d_HCurve)& C, const Standard_Real Tolerance); + Standard_EXPORT void Load (const Handle(Adaptor3d_Curve)& C, const Standard_Real Tolerance); Standard_EXPORT Standard_Boolean IsDone() const; @@ -69,8 +62,8 @@ private: - Handle(Adaptor3d_HCurve) myCurve; - Handle(Adaptor3d_HSurface) mySurface; + Handle(Adaptor3d_Curve) myCurve; + Handle(Adaptor3d_Surface) mySurface; Standard_Real myTolerance; Standard_Boolean myIsDone; Handle(Geom_BSplineCurve) myResult; diff --git a/src/ProjLib/ProjLib_ProjectedCurve.cxx b/src/ProjLib/ProjLib_ProjectedCurve.cxx index 2d5b2a869c..f3617344e8 100644 --- a/src/ProjLib/ProjLib_ProjectedCurve.cxx +++ b/src/ProjLib/ProjLib_ProjectedCurve.cxx @@ -25,8 +25,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include @@ -58,12 +58,15 @@ #include #include #include + +IMPLEMENT_STANDARD_RTTIEXT(ProjLib_ProjectedCurve, Adaptor2d_Curve2d) + //======================================================================= //function : ComputeTolU //purpose : //======================================================================= -static Standard_Real ComputeTolU(const Handle(Adaptor3d_HSurface)& theSurf, +static Standard_Real ComputeTolU(const Handle(Adaptor3d_Surface)& theSurf, const Standard_Real theTolerance) { Standard_Real aTolU = theSurf->UResolution(theTolerance); @@ -80,7 +83,7 @@ static Standard_Real ComputeTolU(const Handle(Adaptor3d_HSurface)& theSurf, //purpose : //======================================================================= -static Standard_Real ComputeTolV(const Handle(Adaptor3d_HSurface)& theSurf, +static Standard_Real ComputeTolV(const Handle(Adaptor3d_Surface)& theSurf, const Standard_Real theTolerance) { Standard_Real aTolV = theSurf->VResolution(theTolerance); @@ -148,7 +151,7 @@ static Standard_Boolean IsoIsDeg (const Adaptor3d_Surface& S, //purpose : //======================================================================= -static void TrimC3d(Handle(Adaptor3d_HCurve)& myCurve, +static void TrimC3d(Handle(Adaptor3d_Curve)& myCurve, Standard_Boolean* IsTrimmed, const Standard_Real dt, const gp_Pnt& Pole, @@ -269,7 +272,7 @@ static void ExtendC2d (Handle(Geom2d_BSplineCurve)& aRes, //purpose : //======================================================================= -static void Project(ProjLib_Projector& P, Handle(Adaptor3d_HCurve)& C) +static void Project(ProjLib_Projector& P, Handle(Adaptor3d_Curve)& C) { GeomAbs_CurveType CType = C->GetType(); switch (CType) { @@ -319,7 +322,7 @@ ProjLib_ProjectedCurve::ProjLib_ProjectedCurve() : //======================================================================= ProjLib_ProjectedCurve::ProjLib_ProjectedCurve -(const Handle(Adaptor3d_HSurface)& S) : +(const Handle(Adaptor3d_Surface)& S) : myTolerance(Precision::Confusion()), myDegMin(-1), myDegMax(-1), myMaxSegments(-1), @@ -336,8 +339,8 @@ ProjLib_ProjectedCurve::ProjLib_ProjectedCurve //======================================================================= ProjLib_ProjectedCurve::ProjLib_ProjectedCurve -(const Handle(Adaptor3d_HSurface)& S, - const Handle(Adaptor3d_HCurve)& C) : +(const Handle(Adaptor3d_Surface)& S, + const Handle(Adaptor3d_Curve)& C) : myTolerance(Precision::Confusion()), myDegMin(-1), myDegMax(-1), myMaxSegments(-1), @@ -355,8 +358,8 @@ ProjLib_ProjectedCurve::ProjLib_ProjectedCurve //======================================================================= ProjLib_ProjectedCurve::ProjLib_ProjectedCurve -(const Handle(Adaptor3d_HSurface)& S, - const Handle(Adaptor3d_HCurve)& C, +(const Handle(Adaptor3d_Surface)& S, + const Handle(Adaptor3d_Curve)& C, const Standard_Real Tol) : myTolerance(Max(Tol, Precision::Confusion())), myDegMin(-1), myDegMax(-1), @@ -374,7 +377,7 @@ ProjLib_ProjectedCurve::ProjLib_ProjectedCurve //purpose : //======================================================================= -void ProjLib_ProjectedCurve::Load(const Handle(Adaptor3d_HSurface)& S) +void ProjLib_ProjectedCurve::Load(const Handle(Adaptor3d_Surface)& S) { mySurface = S ; } @@ -394,7 +397,7 @@ void ProjLib_ProjectedCurve::Load(const Standard_Real theTol) //purpose : //======================================================================= -void ProjLib_ProjectedCurve::Perform(const Handle(Adaptor3d_HCurve)& C) +void ProjLib_ProjectedCurve::Perform(const Handle(Adaptor3d_Curve)& C) { myTolerance = Max(myTolerance, Precision::Confusion()); myCurve = C; @@ -493,7 +496,7 @@ void ProjLib_ProjectedCurve::Perform(const Handle(Adaptor3d_HCurve)& C) l = myCurve->LastParameter(); dt = (l - f) * eps; - const Adaptor3d_Surface& S = mySurface->Surface(); + const Adaptor3d_Surface& S = *mySurface; U1 = S.FirstUParameter(); U2 = S.LastUParameter(); V1 = S.FirstVParameter(); @@ -594,7 +597,7 @@ void ProjLib_ProjectedCurve::Perform(const Handle(Adaptor3d_HCurve)& C) f = f + dt; myCurve = myCurve->Trim(f, l, Precision::Confusion()); // Searching the parameter on the basis curve for surface of revolution - Extrema_ExtPC anExtr(P, mySurface->BasisCurve()->Curve(), myTolerance); + Extrema_ExtPC anExtr(P, *mySurface->BasisCurve(), myTolerance); if (anExtr.IsDone()) { Standard_Real aMinDist = RealLast(); @@ -620,7 +623,7 @@ void ProjLib_ProjectedCurve::Perform(const Handle(Adaptor3d_HCurve)& C) l = l - dt; myCurve = myCurve->Trim(f, l, Precision::Confusion()); // Searching the parameter on the basis curve for surface of revolution - Extrema_ExtPC anExtr(P, mySurface->BasisCurve()->Curve(), myTolerance); + Extrema_ExtPC anExtr(P, *mySurface->BasisCurve(), myTolerance); if (anExtr.IsDone()) { Standard_Real aMinDist = RealLast(); @@ -649,18 +652,16 @@ void ProjLib_ProjectedCurve::Perform(const Handle(Adaptor3d_HCurve)& C) { aMaxDist = myMaxDist; } - ProjLib_CompProjectedCurve Projector(mySurface,myCurve, aTolU, aTolV, aMaxDist); - Handle(ProjLib_HCompProjectedCurve) HProjector = new ProjLib_HCompProjectedCurve(); - HProjector->Set(Projector); + Handle(ProjLib_HCompProjectedCurve) HProjector = new ProjLib_HCompProjectedCurve (mySurface,myCurve, aTolU, aTolV, aMaxDist); // Normalement, dans le cadre de ProjLib, le resultat // doit etre une et une seule courbe !!! // De plus, cette courbe ne doit pas etre Single point - Standard_Integer NbCurves = Projector.NbCurves(); + Standard_Integer NbCurves = HProjector->NbCurves(); Standard_Real Udeb = 0.0,Ufin = 0.0; if (NbCurves > 0) { - Projector.Bounds(1, Udeb, Ufin); + HProjector->Bounds(1, Udeb, Ufin); } else { @@ -939,7 +940,7 @@ void ProjLib_ProjectedCurve::SetMaxDist(const Standard_Real theMaxDist) //purpose : //======================================================================= -const Handle(Adaptor3d_HSurface)& ProjLib_ProjectedCurve::GetSurface() const +const Handle(Adaptor3d_Surface)& ProjLib_ProjectedCurve::GetSurface() const { return mySurface; } @@ -950,7 +951,7 @@ const Handle(Adaptor3d_HSurface)& ProjLib_ProjectedCurve::GetSurface() const //purpose : //======================================================================= -const Handle(Adaptor3d_HCurve)& ProjLib_ProjectedCurve::GetCurve() const +const Handle(Adaptor3d_Curve)& ProjLib_ProjectedCurve::GetCurve() const { return myCurve; } @@ -1312,7 +1313,7 @@ Handle(Geom2d_BSplineCurve) ProjLib_ProjectedCurve::BSpline() const //purpose : //======================================================================= -Handle(Adaptor2d_HCurve2d) ProjLib_ProjectedCurve::Trim +Handle(Adaptor2d_Curve2d) ProjLib_ProjectedCurve::Trim //(const Standard_Real First, // const Standard_Real Last, // const Standard_Real Tolerance) const diff --git a/src/ProjLib/ProjLib_ProjectedCurve.hxx b/src/ProjLib/ProjLib_ProjectedCurve.hxx index c788587cd3..f5c14c74aa 100644 --- a/src/ProjLib/ProjLib_ProjectedCurve.hxx +++ b/src/ProjLib/ProjLib_ProjectedCurve.hxx @@ -17,26 +17,15 @@ #ifndef _ProjLib_ProjectedCurve_HeaderFile #define _ProjLib_ProjectedCurve_HeaderFile -#include -#include -#include - -#include -#include +#include #include -#include -#include -#include -#include -#include +#include #include -class Adaptor3d_HSurface; -class Adaptor3d_HCurve; -class Standard_OutOfRange; -class Standard_NoSuchObject; -class Standard_DomainError; -class Standard_NotImplemented; -class Adaptor2d_HCurve2d; +#include +#include +#include +#include + class gp_Pnt2d; class gp_Vec2d; class gp_Lin2d; @@ -47,6 +36,7 @@ class gp_Parab2d; class Geom2d_BezierCurve; class Geom2d_BSplineCurve; +DEFINE_STANDARD_HANDLE(ProjLib_ProjectedCurve, Adaptor2d_Curve2d) //! Compute the 2d-curve. Try to solve the particular //! case if possible. Otherwize, an approximation is @@ -59,37 +49,36 @@ class Geom2d_BSplineCurve; //! and have nothing to do with distance between the projected curve and the surface. class ProjLib_ProjectedCurve : public Adaptor2d_Curve2d { + DEFINE_STANDARD_RTTIEXT(ProjLib_ProjectedCurve, Adaptor2d_Curve2d) public: - DEFINE_STANDARD_ALLOC - //! Empty constructor, it only sets some initial values for class fields. Standard_EXPORT ProjLib_ProjectedCurve(); //! Constructor with initialisation field mySurface - Standard_EXPORT ProjLib_ProjectedCurve(const Handle(Adaptor3d_HSurface)& S); + Standard_EXPORT ProjLib_ProjectedCurve(const Handle(Adaptor3d_Surface)& S); //! Constructor, which performs projecting. //! If projecting uses approximation, default parameters are used, in particular, 3d tolerance of approximation //! is Precision::Confusion() - Standard_EXPORT ProjLib_ProjectedCurve(const Handle(Adaptor3d_HSurface)& S, const Handle(Adaptor3d_HCurve)& C); + Standard_EXPORT ProjLib_ProjectedCurve(const Handle(Adaptor3d_Surface)& S, const Handle(Adaptor3d_Curve)& C); //! Constructor, which performs projecting. //! If projecting uses approximation, 3d tolerance is Tol, default parameters are used, - Standard_EXPORT ProjLib_ProjectedCurve(const Handle(Adaptor3d_HSurface)& S, const Handle(Adaptor3d_HCurve)& C, const Standard_Real Tol); + Standard_EXPORT ProjLib_ProjectedCurve(const Handle(Adaptor3d_Surface)& S, const Handle(Adaptor3d_Curve)& C, const Standard_Real Tol); //! Changes the tolerance used to project //! the curve on the surface Standard_EXPORT void Load (const Standard_Real Tolerance); //! Changes the Surface. - Standard_EXPORT void Load (const Handle(Adaptor3d_HSurface)& S); + Standard_EXPORT void Load (const Handle(Adaptor3d_Surface)& S); //! Performs projecting for given curve. //! If projecting uses approximation, //! approximation parameters can be set before by corresponding methods //! SetDegree(...), SetMaxSegmets(...), SetBndPnt(...), SetMaxDist(...) - Standard_EXPORT void Perform (const Handle(Adaptor3d_HCurve)& C); + Standard_EXPORT void Perform (const Handle(Adaptor3d_Curve)& C); //! Set min and max possible degree of result BSpline curve2d, which is got by approximation. //! If theDegMin/Max < 0, algorithm uses values that are chosen depending of types curve 3d @@ -112,9 +101,9 @@ public: //! If real distance between curve and surface more then theMaxDist, algorithm stops working. Standard_EXPORT void SetMaxDist(const Standard_Real theMaxDist); - Standard_EXPORT const Handle(Adaptor3d_HSurface)& GetSurface() const; + Standard_EXPORT const Handle(Adaptor3d_Surface)& GetSurface() const; - Standard_EXPORT const Handle(Adaptor3d_HCurve)& GetCurve() const; + Standard_EXPORT const Handle(Adaptor3d_Curve)& GetCurve() const; //! returns the tolerance reached if an approximation //! is Done. @@ -142,7 +131,7 @@ public: //! parameters and . is used to //! test for 3d points confusion. //! If >= - Standard_EXPORT Handle(Adaptor2d_HCurve2d) Trim (const Standard_Real First, const Standard_Real Last, const Standard_Real Tol) const Standard_OVERRIDE; + Standard_EXPORT Handle(Adaptor2d_Curve2d) Trim (const Standard_Real First, const Standard_Real Last, const Standard_Real Tol) const Standard_OVERRIDE; Standard_EXPORT Standard_Boolean IsClosed() const Standard_OVERRIDE; @@ -223,22 +212,11 @@ public: //! myFirst/Last. Standard_EXPORT Handle(Geom2d_BSplineCurve) BSpline() const Standard_OVERRIDE; - - - -protected: - - - - - private: - - Standard_Real myTolerance; - Handle(Adaptor3d_HSurface) mySurface; - Handle(Adaptor3d_HCurve) myCurve; + Handle(Adaptor3d_Surface) mySurface; + Handle(Adaptor3d_Curve) myCurve; ProjLib_Projector myResult; Standard_Integer myDegMin; Standard_Integer myDegMax; @@ -247,10 +225,4 @@ private: AppParCurves_Constraint myBndPnt; }; - - - - - - #endif // _ProjLib_ProjectedCurve_HeaderFile diff --git a/src/PrsDim/PrsDim.cxx b/src/PrsDim/PrsDim.cxx index 169bd59453..013b64465b 100644 --- a/src/PrsDim/PrsDim.cxx +++ b/src/PrsDim/PrsDim.cxx @@ -16,12 +16,12 @@ #include -#include -#include +#include +#include #include #include #include -#include +#include #include #include #include @@ -780,7 +780,7 @@ Standard_Boolean PrsDim::GetPlaneFromFace (const TopoDS_Face& aFace, { Standard_Boolean Result = Standard_False; BRepAdaptor_Surface surf1( aFace ); - Handle( Adaptor3d_HSurface ) surf2; + Handle( Adaptor3d_Surface ) surf2; Standard_Boolean isOffset = Standard_False; Offset = 0.0; @@ -791,7 +791,7 @@ Standard_Boolean PrsDim::GetPlaneFromFace (const TopoDS_Face& aFace, isOffset = Standard_True; } else - surf2 = new BRepAdaptor_HSurface( surf1 ); + surf2 = new BRepAdaptor_Surface( surf1 ); aSurf = surf1.Surface().Surface(); // aSurf->Transform(surf1.Trsf()) ; @@ -805,7 +805,7 @@ Standard_Boolean PrsDim::GetPlaneFromFace (const TopoDS_Face& aFace, } else if (surf2->GetType() == GeomAbs_SurfaceOfExtrusion) { - Handle( Adaptor3d_HCurve ) BasisCurve = surf2->BasisCurve(); + Handle( Adaptor3d_Curve ) BasisCurve = surf2->BasisCurve(); gp_Dir ExtrusionDir = surf2->Direction(); if (BasisCurve->GetType() == GeomAbs_Line) { diff --git a/src/PrsDim/PrsDim_Dimension.cxx b/src/PrsDim/PrsDim_Dimension.cxx index 9ccb1395d5..dbfaa98211 100644 --- a/src/PrsDim/PrsDim_Dimension.cxx +++ b/src/PrsDim/PrsDim_Dimension.cxx @@ -17,7 +17,7 @@ #include #include -#include +#include #include #include #include @@ -1140,7 +1140,7 @@ Standard_Boolean PrsDim_Dimension::InitCircularDimension (const TopoDS_Shape& th Standard_Real aMidU = (aFirstU + aLastU) * 0.5; Standard_Real aMidV = (aFirstV + aLastV) * 0.5; aSurf1.D0 (aMidU, aMidV, aCurPos); - Handle (Adaptor3d_HCurve) aBasisCurve; + Handle (Adaptor3d_Curve) aBasisCurve; Standard_Boolean isExpectedType = Standard_False; if (aSurfType == PrsDim_KOS_Cylinder) { diff --git a/src/QABugs/QABugs_19.cxx b/src/QABugs/QABugs_19.cxx index 319bb6dda8..42053f7e1b 100644 --- a/src/QABugs/QABugs_19.cxx +++ b/src/QABugs/QABugs_19.cxx @@ -3128,7 +3128,6 @@ static Standard_Integer OCC25545 (Draw_Interpretor& di, #include #include #include -#include #include static Standard_Integer OCC25547( Draw_Interpretor& theDI, @@ -3155,7 +3154,7 @@ static Standard_Integer OCC25547( // Test static methods. TopoDS_Face aFace = BRepBuilderAPI_MakeFace(gp_Pln(gp::Origin(), gp::DZ())); BRepAdaptor_Surface aSurf(aFace); - Handle(BRepAdaptor_HSurface) aHSurf = new BRepAdaptor_HSurface(aSurf); + Handle(BRepAdaptor_Surface) aHSurf = new BRepAdaptor_Surface(aSurf); gp_Pnt aPnt; gp_Dir aNormal; @@ -4329,8 +4328,8 @@ static Standard_Integer OCC26313(Draw_Interpretor& di,Standard_Integer n,const c //======================================================================= #include #include -#include -#include +#include +#include #include Standard_Integer OCC26525 (Draw_Interpretor& di, Standard_Integer n, @@ -4381,8 +4380,8 @@ Standard_Integer OCC26525 (Draw_Interpretor& di, aBAC.Initialize(aE); aBAS.Initialize(aF); - Handle(BRepAdaptor_HCurve) aHBAC=new BRepAdaptor_HCurve(aBAC); - Handle(BRepAdaptor_HSurface) aHBAS = new BRepAdaptor_HSurface(aBAS); + Handle(BRepAdaptor_Curve) aHBAC=new BRepAdaptor_Curve(aBAC); + Handle(BRepAdaptor_Surface) aHBAS = new BRepAdaptor_Surface(aBAS); aHInter.Perform(aHBAC, aHBAS); bIsDone=aHInter.IsDone(); diff --git a/src/QABugs/QABugs_20.cxx b/src/QABugs/QABugs_20.cxx index fe724454ed..b0ca49f9cc 100644 --- a/src/QABugs/QABugs_20.cxx +++ b/src/QABugs/QABugs_20.cxx @@ -2815,7 +2815,7 @@ static Standard_Integer OCC29531(Draw_Interpretor&, Standard_Integer, const char //function : OCC29807 //purpose : //======================================================================= -#include +#include #include #include static Standard_Integer OCC29807(Draw_Interpretor& theDI, Standard_Integer theNArg, const char** theArgV) @@ -2840,8 +2840,8 @@ static Standard_Integer OCC29807(Draw_Interpretor& theDI, Standard_Integer theNA const Standard_Real aU2 = Draw::Atof(theArgV[5]); const Standard_Real aV2 = Draw::Atof(theArgV[6]); - const Handle(GeomAdaptor_HSurface) anAS1 = new GeomAdaptor_HSurface(aS1); - const Handle(GeomAdaptor_HSurface) anAS2 = new GeomAdaptor_HSurface(aS2); + const Handle(GeomAdaptor_Surface) anAS1 = new GeomAdaptor_Surface(aS1); + const Handle(GeomAdaptor_Surface) anAS2 = new GeomAdaptor_Surface(aS2); const gp_Pnt aP1 = anAS1->Value(aU1, aV1); const gp_Pnt aP2 = anAS2->Value(aU2, aV2); @@ -3226,15 +3226,15 @@ static Standard_Integer QAEndsWith(Draw_Interpretor& di, Standard_Integer n, con //Class is used in OCC30435 #include -#include +#include class CurveEvaluator : public AppCont_Function { public: - Handle(Adaptor3d_HCurve) myCurve; + Handle(Adaptor3d_Curve) myCurve; - CurveEvaluator(const Handle(Adaptor3d_HCurve)& C) + CurveEvaluator(const Handle(Adaptor3d_Curve)& C) : myCurve(C) { myNbPnt = 1; @@ -3269,7 +3269,7 @@ public: } }; -#include +#include #include #include static Standard_Integer OCC30435(Draw_Interpretor& di, Standard_Integer, const char** a) @@ -3298,7 +3298,7 @@ static Standard_Integer OCC30435(Draw_Interpretor& di, Standard_Integer, const c Standard_Integer maxit = atoi(a[4]); - Handle(GeomAdaptor_HCurve) aGAC = new GeomAdaptor_HCurve(GC); + Handle(GeomAdaptor_Curve) aGAC = new GeomAdaptor_Curve(GC); CurveEvaluator aCE(aGAC); diff --git a/src/QABugs/QABugs_5.cxx b/src/QABugs/QABugs_5.cxx index 00064ae618..58711f460f 100644 --- a/src/QABugs/QABugs_5.cxx +++ b/src/QABugs/QABugs_5.cxx @@ -16,16 +16,16 @@ #include #include -#include +#include #include #include -#include +#include #include #include -#include +#include #include #include -#include +#include #include #include #include @@ -44,10 +44,10 @@ static Standard_Integer OCC6001 (Draw_Interpretor& di, Standard_Integer argc, co return 1; } const char *name = argv[1]; - Handle(Adaptor3d_HCurve) hcurve; + Handle(Adaptor3d_Curve) hcurve; Handle(Geom_Curve) curve = DrawTrSurf::GetCurve(argv[2]); if (!curve.IsNull()) - hcurve = new GeomAdaptor_HCurve(curve); + hcurve = new GeomAdaptor_Curve(curve); else { TopoDS_Shape wire = DBRep::Get(argv[2]); @@ -57,10 +57,10 @@ static Standard_Integer OCC6001 (Draw_Interpretor& di, Standard_Integer argc, co return 1; } BRepAdaptor_CompCurve comp_curve(TopoDS::Wire(wire)); - hcurve = new BRepAdaptor_HCompCurve(comp_curve); + hcurve = new BRepAdaptor_CompCurve(comp_curve); } Handle(Geom_Surface) surf = DrawTrSurf::GetSurface(argv[3]); - Handle(GeomAdaptor_HSurface) hsurf = new GeomAdaptor_HSurface(surf); + Handle(GeomAdaptor_Surface) hsurf = new GeomAdaptor_Surface(surf); IntCurveSurface_HInter inter; inter.Perform(hcurve, hsurf); int nb = inter.NbPoints(); diff --git a/src/SWDRAW/SWDRAW_ShapeAnalysis.cxx b/src/SWDRAW/SWDRAW_ShapeAnalysis.cxx index 6d3ebcded9..a0db2bfc86 100644 --- a/src/SWDRAW/SWDRAW_ShapeAnalysis.cxx +++ b/src/SWDRAW/SWDRAW_ShapeAnalysis.cxx @@ -61,8 +61,8 @@ #include #include #include -#include -#include +#include +#include #include static Standard_Integer tolerance @@ -269,8 +269,8 @@ static Standard_Integer projpcurve } Adaptor3d_CurveOnSurface aCOnS = - Adaptor3d_CurveOnSurface(new BRepAdaptor_HCurve2d(BRepAdaptor_Curve2d(aEdge, aFace)), - new BRepAdaptor_HSurface(BRepAdaptor_Surface(aFace, Standard_False))); + Adaptor3d_CurveOnSurface(new BRepAdaptor_Curve2d(BRepAdaptor_Curve2d(aEdge, aFace)), + new BRepAdaptor_Surface(BRepAdaptor_Surface(aFace, Standard_False))); gp_Pnt aPnt; Standard_Real aParam; diff --git a/src/ShapeAnalysis/ShapeAnalysis_Edge.cxx b/src/ShapeAnalysis/ShapeAnalysis_Edge.cxx index f1bc7821c4..22d0addd5f 100644 --- a/src/ShapeAnalysis/ShapeAnalysis_Edge.cxx +++ b/src/ShapeAnalysis/ShapeAnalysis_Edge.cxx @@ -30,13 +30,13 @@ #include #include #include -#include +#include #include #include #include #include #include -#include +#include #include #include #include @@ -866,8 +866,8 @@ Standard_Boolean ShapeAnalysis_Edge::CheckSameParameter (const TopoDS_Edge& edge DownCast(aS->Transformed(aLoc.Transformation())); // Compute deviation between curves - Handle(Geom2dAdaptor_HCurve) GHPC = new Geom2dAdaptor_HCurve(aPC, f, l); - Handle(GeomAdaptor_HSurface) GAHS = new GeomAdaptor_HSurface(aST); + Handle(Geom2dAdaptor_Curve) GHPC = new Geom2dAdaptor_Curve(aPC, f, l); + Handle(GeomAdaptor_Surface) GAHS = new GeomAdaptor_Surface(aST); Adaptor3d_CurveOnSurface ACS(GHPC, GAHS); if (!ComputeDeviation(aGAC, ACS, SameParameter, maxdev, NbControl - 1)) @@ -884,11 +884,11 @@ Standard_Boolean ShapeAnalysis_Edge::CheckSameParameter (const TopoDS_Edge& edge Handle(Geom2d_Curve) aPC = BRep_Tool::CurveOnPlane(edge, aFaceSurf, aFaceLoc, f, l); if (!aPC.IsNull()) { - Handle(Geom2dAdaptor_HCurve) GHPC = new Geom2dAdaptor_HCurve(aPC, aFirst, aLast); + Handle(Geom2dAdaptor_Curve) GHPC = new Geom2dAdaptor_Curve(aPC, aFirst, aLast); Handle(Geom_Surface) aST = Handle(Geom_Surface)::DownCast(aFaceSurf->Transformed(aFaceLoc.Transformation())); - Handle(GeomAdaptor_HSurface) GAHS = new GeomAdaptor_HSurface(aST); + Handle(GeomAdaptor_Surface) GAHS = new GeomAdaptor_Surface(aST); Adaptor3d_CurveOnSurface ACS(GHPC, GAHS); diff --git a/src/ShapeAnalysis/ShapeAnalysis_Surface.cxx b/src/ShapeAnalysis/ShapeAnalysis_Surface.cxx index df36693333..4098564634 100644 --- a/src/ShapeAnalysis/ShapeAnalysis_Surface.cxx +++ b/src/ShapeAnalysis/ShapeAnalysis_Surface.cxx @@ -45,7 +45,7 @@ #include #include #include -#include +#include #include #include #include @@ -105,7 +105,7 @@ ShapeAnalysis_Surface::ShapeAnalysis_Surface(const Handle(Geom_Surface)& S) : myGap(0.), myUDelt(0.01), myVDelt(0.01), myUCloseVal(-1), myVCloseVal(-1) { mySurf->Bounds(myUF, myUL, myVF, myVL); - myAdSur = new GeomAdaptor_HSurface(mySurf); + myAdSur = new GeomAdaptor_Surface(mySurf); } //======================================================================= @@ -121,7 +121,7 @@ void ShapeAnalysis_Surface::Init(const Handle(Geom_Surface)& S) myNbDeg = -1; myUCloseVal = myVCloseVal = -1; myGap = 0.; mySurf->Bounds(myUF, myUL, myVF, myVL); - myAdSur = new GeomAdaptor_HSurface(mySurf); + myAdSur = new GeomAdaptor_Surface(mySurf); myIsos = Standard_False; myIsoBoxes = Standard_False; myIsoUF.Nullify(); myIsoUL.Nullify(); myIsoVF.Nullify(); myIsoVL.Nullify(); @@ -147,7 +147,7 @@ void ShapeAnalysis_Surface::Init(const Handle(ShapeAnalysis_Surface)& other) //purpose : //======================================================================= -const Handle(GeomAdaptor_HSurface)& ShapeAnalysis_Surface::Adaptor3d() +const Handle(GeomAdaptor_Surface)& ShapeAnalysis_Surface::Adaptor3d() { return myAdSur; } @@ -478,7 +478,7 @@ Standard_Boolean ShapeAnalysis_Surface::IsDegenerated(const gp_Pnt2d &p2d1, Max(pm.Distance(p1), pm.Distance(p2))); if (max3d > tol) return Standard_False; - GeomAdaptor_Surface& SA = Adaptor3d()->ChangeSurface(); + GeomAdaptor_Surface& SA = *Adaptor3d(); Standard_Real RU = SA.UResolution(1.); Standard_Real RV = SA.VResolution(1.); @@ -583,7 +583,7 @@ Standard_Boolean ShapeAnalysis_Surface::IsUClosed(const Standard_Real preci) //Calculs adaptes //#67 rln S4135 - GeomAdaptor_Surface& SurfAdapt = Adaptor3d()->ChangeSurface(); + GeomAdaptor_Surface& SurfAdapt = *Adaptor3d(); GeomAbs_SurfaceType surftype = SurfAdapt.GetType(); if (mySurf->IsKind(STANDARD_TYPE(Geom_RectangularTrimmedSurface))) { @@ -796,7 +796,7 @@ Standard_Boolean ShapeAnalysis_Surface::IsVClosed(const Standard_Real preci) // Calculs adaptes //#67 rln S4135 - GeomAdaptor_Surface& SurfAdapt = Adaptor3d()->ChangeSurface(); + GeomAdaptor_Surface& SurfAdapt = *Adaptor3d(); GeomAbs_SurfaceType surftype = SurfAdapt.GetType(); if (mySurf->IsKind(STANDARD_TYPE(Geom_RectangularTrimmedSurface))) { @@ -982,7 +982,7 @@ Standard_Integer ShapeAnalysis_Surface::SurfaceNewton(const gp_Pnt2d &p2dPrev, const Standard_Real preci, gp_Pnt2d &sol) { - GeomAdaptor_Surface& SurfAdapt = Adaptor3d()->ChangeSurface(); + GeomAdaptor_Surface& SurfAdapt = *Adaptor3d(); Standard_Real uf, ul, vf, vl; Bounds(uf, ul, vf, vl); Standard_Real du = SurfAdapt.UResolution(preci); @@ -1062,7 +1062,7 @@ gp_Pnt2d ShapeAnalysis_Surface::NextValueOfUV(const gp_Pnt2d &p2dPrev, const Standard_Real preci, const Standard_Real maxpreci) { - GeomAdaptor_Surface& SurfAdapt = Adaptor3d()->ChangeSurface(); + GeomAdaptor_Surface& SurfAdapt = *Adaptor3d(); GeomAbs_SurfaceType surftype = SurfAdapt.GetType(); switch (surftype) { @@ -1135,7 +1135,7 @@ gp_Pnt2d ShapeAnalysis_Surface::NextValueOfUV(const gp_Pnt2d &p2dPrev, gp_Pnt2d ShapeAnalysis_Surface::ValueOfUV(const gp_Pnt& P3D, const Standard_Real preci) { - GeomAdaptor_Surface& SurfAdapt = Adaptor3d()->ChangeSurface(); + GeomAdaptor_Surface& SurfAdapt = *Adaptor3d(); Standard_Real S = 0., T = 0.; myGap = -1.; // devra etre calcule Standard_Boolean computed = Standard_True; // a priori @@ -1412,7 +1412,7 @@ Standard_Real ShapeAnalysis_Surface::UVFromIso(const gp_Pnt& P3d, const Standard for (Standard_Integer num = 0; num < 6; num++) { UV = (num < 3); // 0-1-2 : iso-U 3-4-5 : iso-V - if (!(Adaptor3d()->Surface().GetType() == GeomAbs_OffsetSurface)) { + if (!(Adaptor3d()->GetType() == GeomAbs_OffsetSurface)) { const Bnd_Box *anIsoBox = 0; switch (num) { case 0: par = myUF; iso = myIsoUF; anIsoBox = &myBndUF; break; @@ -1470,7 +1470,7 @@ Standard_Real ShapeAnalysis_Surface::UVFromIso(const gp_Pnt& P3d, const Standard //added by rln on 04/12/97 iterational process Standard_Real PrevU = U, PrevV = V; Standard_Integer MaxIters = 5, Iters = 0; - if (!(Adaptor3d()->Surface().GetType() == GeomAbs_OffsetSurface)) { + if (!(Adaptor3d()->GetType() == GeomAbs_OffsetSurface)) { while (((PrevU != UU) || (PrevV != VV)) && (Iters < MaxIters) && (theMin > preci)) { PrevU = UU; PrevV = VV; if (UV) { par = UU; iso = UIso(UU); } diff --git a/src/ShapeAnalysis/ShapeAnalysis_Surface.hxx b/src/ShapeAnalysis/ShapeAnalysis_Surface.hxx index 35584581d5..adf7401966 100644 --- a/src/ShapeAnalysis/ShapeAnalysis_Surface.hxx +++ b/src/ShapeAnalysis/ShapeAnalysis_Surface.hxx @@ -17,29 +17,17 @@ #ifndef _ShapeAnalysis_Surface_HeaderFile #define _ShapeAnalysis_Surface_HeaderFile -#include -#include - #include #include -#include -#include -#include #include #include #include -#include #include #include + class Geom_Surface; -class GeomAdaptor_HSurface; class Geom_Curve; -class gp_Pnt2d; -class gp_Pnt; -class Bnd_Box; - -class ShapeAnalysis_Surface; DEFINE_STANDARD_HANDLE(ShapeAnalysis_Surface, Standard_Transient) //! Complements standard tool Geom_Surface by providing additional @@ -90,10 +78,10 @@ public: //! Returns the Adaptor. //! Creates it if not yet done. - Standard_EXPORT const Handle(GeomAdaptor_HSurface)& Adaptor3d(); + Standard_EXPORT const Handle(GeomAdaptor_Surface)& Adaptor3d(); //! Returns the Adaptor (may be Null if method Adaptor() was not called) - const Handle(GeomAdaptor_HSurface)& TrueAdaptor3d() const; + const Handle(GeomAdaptor_Surface)& TrueAdaptor3d() const; //! Returns 3D distance found by one of the following methods. //! IsDegenerated, DegeneratedValues, ProjectDegenerated @@ -323,7 +311,7 @@ protected: Handle(Geom_Surface) mySurf; - Handle(GeomAdaptor_HSurface) myAdSur; + Handle(GeomAdaptor_Surface) myAdSur; Extrema_ExtPS myExtPS; Standard_Boolean myExtOK; Standard_Integer myNbDeg; diff --git a/src/ShapeAnalysis/ShapeAnalysis_Surface.lxx b/src/ShapeAnalysis/ShapeAnalysis_Surface.lxx index 70eedda074..fdda738b5d 100644 --- a/src/ShapeAnalysis/ShapeAnalysis_Surface.lxx +++ b/src/ShapeAnalysis/ShapeAnalysis_Surface.lxx @@ -12,7 +12,7 @@ // commercial license or contractual agreement. #include -#include +#include //======================================================================= //function : Surface @@ -30,7 +30,7 @@ inline const Handle(Geom_Surface)& ShapeAnalysis_Surface::Surface() const //purpose : //======================================================================= -inline const Handle(GeomAdaptor_HSurface)& ShapeAnalysis_Surface::TrueAdaptor3d() const +inline const Handle(GeomAdaptor_Surface)& ShapeAnalysis_Surface::TrueAdaptor3d() const { return myAdSur; } diff --git a/src/ShapeAnalysis/ShapeAnalysis_TransferParametersProj.cxx b/src/ShapeAnalysis/ShapeAnalysis_TransferParametersProj.cxx index 28f0dc82a3..5aebbf3953 100644 --- a/src/ShapeAnalysis/ShapeAnalysis_TransferParametersProj.cxx +++ b/src/ShapeAnalysis/ShapeAnalysis_TransferParametersProj.cxx @@ -30,11 +30,11 @@ #include #include #include -#include +#include #include #include #include -#include +#include #include #include #include @@ -103,9 +103,9 @@ void ShapeAnalysis_TransferParametersProj::Init(const TopoDS_Edge& E, ShapeAnalysis_Edge sae; if(sae.PCurve (E, F, myCurve2d, f2d, l2d, Standard_False)) { - Handle(Geom2dAdaptor_HCurve) AC2d = new Geom2dAdaptor_HCurve(myCurve2d,f2d,l2d); + Handle(Geom2dAdaptor_Curve) AC2d = new Geom2dAdaptor_Curve(myCurve2d,f2d,l2d); Handle(Geom_Surface) aSurface = BRep_Tool::Surface(F,myLocation); - Handle(GeomAdaptor_HSurface) AdS = new GeomAdaptor_HSurface(aSurface); + Handle(GeomAdaptor_Surface) AdS = new GeomAdaptor_Surface(aSurface); Adaptor3d_CurveOnSurface Ad1(AC2d,AdS); myAC3d = Ad1;//new Adaptor3d_CurveOnSurface(AC2d,AdS); @@ -190,8 +190,8 @@ Standard_Real ShapeAnalysis_TransferParametersProj::PreformSegment(const Standar Standard_Real ppar; if(To2d) { gp_Pnt p1 = myCurve->Value(Param).Transformed(myLocation.Inverted()); - Handle(Adaptor3d_HSurface) AdS = myAC3d.GetSurface(); - Handle(Geom2dAdaptor_HCurve) AC2d = new Geom2dAdaptor_HCurve(myCurve2d,First,Last); + Handle(Adaptor3d_Surface) AdS = myAC3d.GetSurface(); + Handle(Geom2dAdaptor_Curve) AC2d = new Geom2dAdaptor_Curve(myCurve2d,First,Last); Adaptor3d_CurveOnSurface Ad1(AC2d,AdS); projDev = sac.Project(Ad1,p1,myPrecision,pproj,ppar);//pdn linDev = p1.Distance(Ad1.Value(linPar)); @@ -407,8 +407,8 @@ void ShapeAnalysis_TransferParametersProj::TransferRange(TopoDS_Edge& newEdge, Standard_Real first = toGC->First(); Standard_Real last = toGC->Last(); Standard_Real len = last -first; - Handle(Geom2dAdaptor_HCurve) AC2d = new Geom2dAdaptor_HCurve(toGC->PCurve(),first,last); - Handle(GeomAdaptor_HSurface) AdS = new GeomAdaptor_HSurface( toGC->Surface()); + Handle(Geom2dAdaptor_Curve) AC2d = new Geom2dAdaptor_Curve(toGC->PCurve(),first,last); + Handle(GeomAdaptor_Surface) AdS = new GeomAdaptor_Surface( toGC->Surface()); Adaptor3d_CurveOnSurface Ad1(AC2d,AdS); ShapeAnalysis_Curve sac1; diff --git a/src/ShapeAnalysis/ShapeAnalysis_Wire.cxx b/src/ShapeAnalysis/ShapeAnalysis_Wire.cxx index 140f94483e..da17a10097 100644 --- a/src/ShapeAnalysis/ShapeAnalysis_Wire.cxx +++ b/src/ShapeAnalysis/ShapeAnalysis_Wire.cxx @@ -44,13 +44,13 @@ #include #include #include -#include +#include #include #include #include #include #include -#include +#include #include #include #include @@ -940,7 +940,7 @@ Standard_Boolean ShapeAnalysis_Wire::CheckDegenerated (const Standard_Integer nu //added by rln 18/12/97 CSR# CTS18544 entity 13638 //the situation when degenerated edge already exists but flag is not set //(i.e. the parametric space is closed) - GeomAdaptor_Surface& Ads = mySurf->Adaptor3d()->ChangeSurface(); + GeomAdaptor_Surface& Ads = *mySurf->Adaptor3d(); Standard_Real max = Max ( Ads.UResolution(myPrecision), Ads.VResolution(myPrecision) ); if ( p2d1.Distance (p2d2) /*Abs (par1 - par2)*/ <= max + gp::Resolution() ) return Standard_False; @@ -1015,7 +1015,7 @@ Standard_Boolean ShapeAnalysis_Wire::CheckDegenerated (const Standard_Integer nu gp_Pnt2d p1 = C1->Value (ul1); gp_Pnt2d p2 = C2->Value (uf2); myMin2d = myMax2d = p1.Distance (p2); - GeomAdaptor_Surface& SA = mySurf->Adaptor3d()->ChangeSurface(); + GeomAdaptor_Surface& SA = *mySurf->Adaptor3d(); if (myMin2d > (Max (SA.UResolution (myPrecision), SA.VResolution (myPrecision)) + Precision::PConfusion())) myStatus = ShapeExtend::EncodeStatus (ShapeExtend_DONE1); return LastCheckStatus (ShapeExtend_DONE); @@ -1044,8 +1044,8 @@ Standard_Boolean ShapeAnalysis_Wire::CheckDegenerated (const Standard_Integer nu myStatus = ShapeExtend::EncodeStatus (ShapeExtend_FAIL1); return Standard_False; } - Handle(Geom2dAdaptor_HCurve) AC = new Geom2dAdaptor_HCurve(pc,pcuf,pcul); - Handle(GeomAdaptor_HSurface) AS = new GeomAdaptor_HSurface(mySurf->Surface()); + Handle(Geom2dAdaptor_Curve) AC = new Geom2dAdaptor_Curve(pc,pcuf,pcul); + Handle(GeomAdaptor_Surface) AS = new GeomAdaptor_Surface(mySurf->Surface()); Adaptor3d_CurveOnSurface ACS(AC,AS); gp_Pnt cpnt, pcpnt; Standard_Integer nbp = 45; @@ -1300,7 +1300,7 @@ Standard_Boolean ShapeAnalysis_Wire::CheckIntersectingEdges (const Standard_Inte gp_Pnt2d end2 = Crv2->Value ( isForward2 ? a2 : b2 ); //:l0 Standard_Real distab2 = mySurf->Value ( end1 ).SquareDistance ( mySurf->Value ( end2 ) ); //:l0: test like in BRepCheck - GeomAdaptor_Surface& Ads = mySurf->Adaptor3d()->ChangeSurface(); + GeomAdaptor_Surface& Ads = *mySurf->Adaptor3d(); Standard_Real tol2d = 2 * Max ( Ads.UResolution(tol), Ads.VResolution(tol) ); isLacking = ( end1.SquareDistance(end2) >= tol2d * tol2d ); } @@ -1515,7 +1515,7 @@ Standard_Boolean ShapeAnalysis_Wire::CheckLacking (const Standard_Integer num, // test like in BRepCheck Standard_Real tol = Max ( BRep_Tool::Tolerance ( V1 ), BRep_Tool::Tolerance ( V2 ) ); tol = ( Tolerance > gp::Resolution() && Tolerance < tol ? Tolerance : tol ); - GeomAdaptor_Surface& Ads = mySurf->Adaptor3d()->ChangeSurface(); + GeomAdaptor_Surface& Ads = *mySurf->Adaptor3d(); Standard_Real tol2d = 2 * Max ( Ads.UResolution(tol), Ads.VResolution(tol) ); if ( // tol2d < gp::Resolution() || //#2 smh 26.03.99 S4163 Zero divide myMax2d < tol2d * tol2d ) return Standard_False; @@ -1659,12 +1659,12 @@ Standard_Boolean ShapeAnalysis_Wire::CheckNotchedEdges(const Standard_Integer nu if ( Abs ( v2.Angle ( v1 ) ) > 0.1 || p2d1.Distance(p2d2) > Tolerance) return Standard_False; - Handle(Geom2dAdaptor_HCurve) AC2d1 = new Geom2dAdaptor_HCurve(c2d1,a1,b1); - Handle(GeomAdaptor_HSurface) AdS1 = new GeomAdaptor_HSurface(new Geom_Plane(gp_Pln())); + Handle(Geom2dAdaptor_Curve) AC2d1 = new Geom2dAdaptor_Curve(c2d1,a1,b1); + Handle(GeomAdaptor_Surface) AdS1 = new GeomAdaptor_Surface(new Geom_Plane(gp_Pln())); Adaptor3d_CurveOnSurface Ad1(AC2d1,AdS1); - Handle(Geom2dAdaptor_HCurve) AC2d2 = new Geom2dAdaptor_HCurve(c2d2,a2,b2); - Handle(GeomAdaptor_HSurface) AdS2 = new GeomAdaptor_HSurface(new Geom_Plane(gp_Pln())); + Handle(Geom2dAdaptor_Curve) AC2d2 = new Geom2dAdaptor_Curve(c2d2,a2,b2); + Handle(GeomAdaptor_Surface) AdS2 = new GeomAdaptor_Surface(new Geom_Plane(gp_Pln())); Adaptor3d_CurveOnSurface Ad2(AC2d2,AdS2); Adaptor3d_CurveOnSurface longAD, shortAD; diff --git a/src/ShapeConstruct/ShapeConstruct.hxx b/src/ShapeConstruct/ShapeConstruct.hxx index f367053646..d6c943aaf8 100644 --- a/src/ShapeConstruct/ShapeConstruct.hxx +++ b/src/ShapeConstruct/ShapeConstruct.hxx @@ -38,7 +38,6 @@ class TopoDS_Edge; class ShapeConstruct_Curve; class ShapeConstruct_ProjectCurveOnSurface; class ShapeConstruct_CompBezierCurvesToBSplineCurve; -class ShapeConstruct_CompBezierCurves2dToBSplineCurve2d; class ShapeConstruct_MakeTriangulation; @@ -92,32 +91,6 @@ public: //! else - False. Standard_EXPORT static Standard_Boolean JoinCurves (const Handle(Geom2d_Curve)& c2d1, const Handle(Geom2d_Curve)& ac2d2, const TopAbs_Orientation Orient1, const TopAbs_Orientation Orient2, Standard_Real& first1, Standard_Real& last1, Standard_Real& first2, Standard_Real& last2, Handle(Geom2d_Curve)& c2dOut, Standard_Boolean& isRev1, Standard_Boolean& isRev2, const Standard_Boolean isError = Standard_False); - - - -protected: - - - - - -private: - - - - -friend class ShapeConstruct_Curve; -friend class ShapeConstruct_ProjectCurveOnSurface; -friend class ShapeConstruct_CompBezierCurvesToBSplineCurve; -friend class ShapeConstruct_CompBezierCurves2dToBSplineCurve2d; -friend class ShapeConstruct_MakeTriangulation; - }; - - - - - - #endif // _ShapeConstruct_HeaderFile diff --git a/src/ShapeConstruct/ShapeConstruct_Curve.cxx b/src/ShapeConstruct/ShapeConstruct_Curve.cxx index 9180f633b6..995944b561 100644 --- a/src/ShapeConstruct/ShapeConstruct_Curve.cxx +++ b/src/ShapeConstruct/ShapeConstruct_Curve.cxx @@ -20,14 +20,14 @@ #include #include #include -#include +#include #include #include #include #include #include #include -#include +#include #include #include #include @@ -189,7 +189,7 @@ Handle(Geom_BSplineCurve) ShapeConstruct_Curve::ConvertToBSpline (const Handle(G if ( ! bspl.IsNull() ) { newc = bspl; bspl.Nullify(); } try { OCC_CATCH_SIGNALS - Approx_Curve3d Conv ( new GeomAdaptor_HCurve(newc,first,last), + Approx_Curve3d Conv ( new GeomAdaptor_Curve(newc,first,last), prec, GeomAbs_C1, 9, 1000 ); if ( Conv.IsDone() || Conv.HasResult() ) bspl = Conv.Curve(); @@ -262,7 +262,7 @@ Handle(Geom2d_BSplineCurve) ShapeConstruct_Curve::ConvertToBSpline (const Handle if ( ! bspl.IsNull() ) { newc = bspl; bspl.Nullify(); } try { OCC_CATCH_SIGNALS - Approx_Curve2d Conv ( new Geom2dAdaptor_HCurve(newc,first,last), + Approx_Curve2d Conv ( new Geom2dAdaptor_Curve(newc,first,last), first, last, prec, prec, GeomAbs_C1, 9, 1000 ); if ( Conv.IsDone() || Conv.HasResult() ) diff --git a/src/ShapeConstruct/ShapeConstruct_ProjectCurveOnSurface.cxx b/src/ShapeConstruct/ShapeConstruct_ProjectCurveOnSurface.cxx index 374cf3df79..33d6666712 100644 --- a/src/ShapeConstruct/ShapeConstruct_ProjectCurveOnSurface.cxx +++ b/src/ShapeConstruct/ShapeConstruct_ProjectCurveOnSurface.cxx @@ -52,8 +52,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include @@ -437,8 +437,8 @@ Standard_Boolean ShapeConstruct_ProjectCurveOnSurface::PerformByProjLib(Handle(G try { OCC_CATCH_SIGNALS - Handle(GeomAdaptor_HSurface) GAS = mySurf->Adaptor3d(); - Handle(GeomAdaptor_HCurve) GAC = new GeomAdaptor_HCurve (c3d,First,Last); + Handle(GeomAdaptor_Surface) GAS = mySurf->Adaptor3d(); + Handle(GeomAdaptor_Curve) GAC = new GeomAdaptor_Curve (c3d,First,Last); ProjLib_ProjectedCurve Projector(GAS, GAC); switch (Projector.GetType()) @@ -520,7 +520,7 @@ Standard_Boolean ShapeConstruct_ProjectCurveOnSurface::PerformByProjLib(Handle(G Handle(Geom_Curve) ProjOnPlane = GeomProjLib::ProjectOnPlane (c3d, Plane, Plane->Position().Direction(), Standard_True); - Handle(GeomAdaptor_HCurve) HC = new GeomAdaptor_HCurve ( ProjOnPlane ); + Handle(GeomAdaptor_Curve) HC = new GeomAdaptor_Curve ( ProjOnPlane ); ProjLib_ProjectedCurve Proj ( mySurf->Adaptor3d(), HC ); result = Geom2dAdaptor::MakeCurve(Proj); diff --git a/src/ShapeCustom/ShapeCustom_Surface.cxx b/src/ShapeCustom/ShapeCustom_Surface.cxx index aeda99ab02..4cee247e79 100644 --- a/src/ShapeCustom/ShapeCustom_Surface.cxx +++ b/src/ShapeCustom/ShapeCustom_Surface.cxx @@ -14,6 +14,8 @@ //abv 06.01.99 fix of misprint //:p6 abv 26.02.99: make ConvertToPeriodic() return Null if nothing done +#include + #include #include #include @@ -25,7 +27,6 @@ #include #include #include -#include #include #include #include @@ -34,7 +35,6 @@ #include #include #include -#include #include #include #include @@ -316,8 +316,8 @@ Handle(Geom_Surface) ShapeCustom_Surface::ConvertToAnalytical (const Standard_Re // verification //--------------------------------------------------------------------- - Handle(GeomAdaptor_HSurface) NHS = new GeomAdaptor_HSurface (newSurf); - GeomAdaptor_Surface& SurfAdapt = NHS->ChangeSurface(); + Handle(GeomAdaptor_Surface) NHS = new GeomAdaptor_Surface (newSurf); + GeomAdaptor_Surface& SurfAdapt = *NHS; const Standard_Integer NP = 21; Standard_Real S = 0., T = 0.; // U,V deja fait diff --git a/src/ShapeCustom/ShapeCustom_SweptToElementary.cxx b/src/ShapeCustom/ShapeCustom_SweptToElementary.cxx index ffc9b71d12..9d8e744fe9 100644 --- a/src/ShapeCustom/ShapeCustom_SweptToElementary.cxx +++ b/src/ShapeCustom/ShapeCustom_SweptToElementary.cxx @@ -33,7 +33,7 @@ #include #include #include -#include +#include #include #include #include @@ -112,8 +112,8 @@ Standard_Boolean ShapeCustom_SweptToElementary::NewSurface(const TopoDS_Face& F, Handle(Geom_SurfaceOfRevolution) SR = Handle(Geom_SurfaceOfRevolution)::DownCast(SS); Handle(Geom_Curve) bc = SR->BasisCurve(); gp_Ax1 ax1 = SR->Axis(); - Handle(GeomAdaptor_HCurve) HC = new GeomAdaptor_HCurve(); - HC->ChangeCurve().Load(bc,bc->FirstParameter(),bc->LastParameter()); + Handle(GeomAdaptor_Curve) HC = new GeomAdaptor_Curve(); + HC->Load(bc,bc->FirstParameter(),bc->LastParameter()); GeomAdaptor_SurfaceOfRevolution AS(HC,ax1); switch(AS.GetType()){ // skl 18.12.2003 - plane not used, problems in PRO14665.igs @@ -150,8 +150,8 @@ Standard_Boolean ShapeCustom_SweptToElementary::NewSurface(const TopoDS_Face& F, Handle(Geom_SurfaceOfLinearExtrusion)::DownCast(SS); Handle(Geom_Curve) bc = SLE->BasisCurve(); gp_Dir dir = SLE->Direction(); - Handle(GeomAdaptor_HCurve) HC = new GeomAdaptor_HCurve(); - HC->ChangeCurve().Load(bc,bc->FirstParameter(),bc->LastParameter()); + Handle(GeomAdaptor_Curve) HC = new GeomAdaptor_Curve(); + HC->Load(bc,bc->FirstParameter(),bc->LastParameter()); GeomAdaptor_SurfaceOfLinearExtrusion AS(HC,dir); switch(AS.GetType()){ // skl 18.12.2003 - plane not used, problems in ims013.igs diff --git a/src/ShapeFix/ShapeFix.cxx b/src/ShapeFix/ShapeFix.cxx index a2da1062bf..a302efa04f 100644 --- a/src/ShapeFix/ShapeFix.cxx +++ b/src/ShapeFix/ShapeFix.cxx @@ -42,7 +42,7 @@ #include #include #include -#include +#include #include #include #include @@ -52,7 +52,7 @@ #include #include #include -#include +#include #include #include @@ -192,7 +192,7 @@ Standard_Boolean ShapeFix::SameParameter(const TopoDS_Shape& shape, continue; } - Handle(GeomAdaptor_HSurface) AS = new GeomAdaptor_HSurface ( plane ); + Handle(GeomAdaptor_Surface) AS = new GeomAdaptor_Surface ( plane ); for ( TopExp_Explorer ed ( face, TopAbs_EDGE ); ed.More(); ed.Next() ) { TopoDS_Edge edge = TopoDS::Edge ( ed.Current() ); Standard_Real f, l; @@ -202,7 +202,7 @@ Standard_Boolean ShapeFix::SameParameter(const TopoDS_Shape& shape, Handle(Geom2d_Curve) c2d = BRep_Tool::CurveOnSurface ( edge, face, f, l ); if ( c2d.IsNull() ) continue; - Handle(Geom2dAdaptor_HCurve) GHPC = new Geom2dAdaptor_HCurve ( c2d, f, l ); + Handle(Geom2dAdaptor_Curve) GHPC = new Geom2dAdaptor_Curve ( c2d, f, l ); Adaptor3d_CurveOnSurface ACS(GHPC,AS); Standard_Real tol0 = BRep_Tool::Tolerance(edge); diff --git a/src/ShapeFix/ShapeFix_EdgeProjAux.cxx b/src/ShapeFix/ShapeFix_EdgeProjAux.cxx index f5b5b1c1d7..f2183264d4 100644 --- a/src/ShapeFix/ShapeFix_EdgeProjAux.cxx +++ b/src/ShapeFix/ShapeFix_EdgeProjAux.cxx @@ -14,6 +14,8 @@ //:r5 abv 06.04.99: ec_turbine-A.stp, #4313: protect against null curve // abv 09.04.99 S4136: add parameter preci (to eliminate BRepAPI::Precision) +#include + #include #include #include @@ -23,11 +25,9 @@ #include #include #include -#include #include #include #include -#include #include #include #include @@ -35,7 +35,6 @@ #include #include #include -#include #include #include #include @@ -43,7 +42,7 @@ #include #include #include -#include +#include #include IMPLEMENT_STANDARD_RTTIEXT(ShapeFix_EdgeProjAux,Standard_Transient) @@ -279,7 +278,7 @@ void ShapeFix_EdgeProjAux::Init2d (const Standard_Real preci) Standard_Boolean parU = Standard_False, parV = Standard_False; GeomAdaptor_Surface SA = GeomAdaptor_Surface(theSurface); - Handle(GeomAdaptor_HSurface) myHSur = new GeomAdaptor_HSurface(SA); + Handle(GeomAdaptor_Surface) myHSur = new GeomAdaptor_Surface(SA); cf = theCurve2d->FirstParameter(); cl = theCurve2d->LastParameter(); @@ -386,7 +385,7 @@ void ShapeFix_EdgeProjAux::Init2d (const Standard_Real preci) } Geom2dAdaptor_Curve CA = Geom2dAdaptor_Curve(theCurve2d,cf,cl); - Handle(Geom2dAdaptor_HCurve) myHCur = new Geom2dAdaptor_HCurve(CA); + Handle(Geom2dAdaptor_Curve) myHCur = new Geom2dAdaptor_Curve(CA); Adaptor3d_CurveOnSurface COnS = Adaptor3d_CurveOnSurface(myHCur, myHSur); @@ -511,10 +510,10 @@ void ShapeFix_EdgeProjAux::Init3d (const Standard_Real preci) GeomAdaptor_Surface SA = GeomAdaptor_Surface(theSurface); - Handle(GeomAdaptor_HSurface) myHSur = new GeomAdaptor_HSurface(SA); + Handle(GeomAdaptor_Surface) myHSur = new GeomAdaptor_Surface(SA); Geom2dAdaptor_Curve CA = Geom2dAdaptor_Curve(theCurve2d); - Handle(Geom2dAdaptor_HCurve) myHCur = new Geom2dAdaptor_HCurve(CA); + Handle(Geom2dAdaptor_Curve) myHCur = new Geom2dAdaptor_Curve(CA); Adaptor3d_CurveOnSurface COnS = Adaptor3d_CurveOnSurface(myHCur, myHSur); diff --git a/src/ShapeFix/ShapeFix_Face.cxx b/src/ShapeFix/ShapeFix_Face.cxx index f0ad0e3ed1..31ce32cc7a 100644 --- a/src/ShapeFix/ShapeFix_Face.cxx +++ b/src/ShapeFix/ShapeFix_Face.cxx @@ -52,7 +52,7 @@ #include #include #include -#include +#include #include #include #include @@ -119,7 +119,7 @@ static Standard_Boolean IsSurfaceUVInfinite(const Handle(Geom_Surface)& theSurf) Precision::IsInfinite(VMax) ); } -static Standard_Boolean IsSurfaceUVPeriodic(const Handle(GeomAdaptor_HSurface)& theSurf) +static Standard_Boolean IsSurfaceUVPeriodic(const Handle(GeomAdaptor_Surface)& theSurf) { return ( (theSurf->IsUPeriodic() && theSurf->IsVPeriodic()) || theSurf->GetType() == GeomAbs_Sphere); } diff --git a/src/ShapeFix/ShapeFix_IntersectionTool.cxx b/src/ShapeFix/ShapeFix_IntersectionTool.cxx index f738e9f0dd..c7e500c0bd 100644 --- a/src/ShapeFix/ShapeFix_IntersectionTool.cxx +++ b/src/ShapeFix/ShapeFix_IntersectionTool.cxx @@ -26,7 +26,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/ShapeFix/ShapeFix_Wire.cxx b/src/ShapeFix/ShapeFix_Wire.cxx index 8e407a01b7..b0f2de88b0 100644 --- a/src/ShapeFix/ShapeFix_Wire.cxx +++ b/src/ShapeFix/ShapeFix_Wire.cxx @@ -43,6 +43,8 @@ // one pcurve we make replace pcurve) // PTV 26.06.2002 Remove regressions after fix OCC450 +#include + #include #include #include @@ -60,7 +62,6 @@ #include #include #include -#include #include #include #include @@ -71,7 +72,6 @@ #include #include #include -#include #include #include #include @@ -99,7 +99,6 @@ #include #include #include -#include #include #include #include @@ -1967,8 +1966,8 @@ static Standard_Boolean RemoveLoop (TopoDS_Edge &E, const TopoDS_Face &face, //:q1 TopLoc_Location L; Handle(Geom_Surface) S = BRep_Tool::Surface(face, L); - Handle(Geom2dAdaptor_HCurve) AC = new Geom2dAdaptor_HCurve(c2d); - Handle(GeomAdaptor_HSurface) AS = new GeomAdaptor_HSurface(S); + Handle(Geom2dAdaptor_Curve) AC = new Geom2dAdaptor_Curve(c2d); + Handle(GeomAdaptor_Surface) AS = new GeomAdaptor_Surface(S); Adaptor3d_CurveOnSurface ACS(AC,AS); gp_Pnt P1(ACS.Value(t1)); @@ -2098,8 +2097,8 @@ static Standard_Boolean RemoveLoop (TopoDS_Edge &E, const TopoDS_Face &face, TopLoc_Location L; Handle (Geom_Surface) S = BRep_Tool::Surface(face, L); - Handle (Geom2dAdaptor_HCurve) AC = new Geom2dAdaptor_HCurve(c2d); - Handle (GeomAdaptor_HSurface) AS = new GeomAdaptor_HSurface(S); + Handle (Geom2dAdaptor_Curve) AC = new Geom2dAdaptor_Curve(c2d); + Handle (GeomAdaptor_Surface) AS = new GeomAdaptor_Surface(S); Adaptor3d_CurveOnSurface ACS(AC,AS); gp_Pnt P1(ACS.Value(t1)); diff --git a/src/ShapeFix/ShapeFix_Wire_1.cxx b/src/ShapeFix/ShapeFix_Wire_1.cxx index 00ab4a26a6..b07e969260 100644 --- a/src/ShapeFix/ShapeFix_Wire_1.cxx +++ b/src/ShapeFix/ShapeFix_Wire_1.cxx @@ -52,7 +52,6 @@ #include //S4135 #include #include -#include #include #include #include @@ -75,7 +74,7 @@ #include #include #include -#include +#include #include #include @@ -87,7 +86,7 @@ #include #include #include -#include +#include #include #include #include @@ -348,7 +347,7 @@ static Standard_Real AdjustOnPeriodic3d (const Handle(Geom_Curve)& c, } else if (c->IsKind(STANDARD_TYPE(Geom_Conic))) { - Approx_Curve3d Conv(new GeomAdaptor_HCurve(c,first,last), + Approx_Curve3d Conv(new GeomAdaptor_Curve(c,first,last), myAnalyzer->Precision(),GeomAbs_C1,9,1000); if (Conv.IsDone() || Conv.HasResult()) bsp = Conv.Curve(); } @@ -927,10 +926,10 @@ static Standard_Real AdjustOnPeriodic2d (const Handle(Geom2d_Curve)& pc, } else if (pc->IsKind(STANDARD_TYPE(Geom2d_Conic))) { - GeomAdaptor_Surface& AS = myAnalyzer->Surface()->Adaptor3d()->ChangeSurface(); + GeomAdaptor_Surface& AS = *myAnalyzer->Surface()->Adaptor3d(); Standard_Real tolu = AS.UResolution(myAnalyzer->Precision()), tolv = AS.VResolution(myAnalyzer->Precision()); - Approx_Curve2d Conv(new Geom2dAdaptor_HCurve(pc,first,last), + Approx_Curve2d Conv(new Geom2dAdaptor_Curve(pc,first,last), first,last,tolu,tolv,GeomAbs_C1,9,1000); if (Conv.IsDone() || Conv.HasResult()) bsp = Conv.Curve(); } diff --git a/src/ShapeUpgrade/ShapeUpgrade_UnifySameDomain.cxx b/src/ShapeUpgrade/ShapeUpgrade_UnifySameDomain.cxx index c18089346e..b2994a90bd 100644 --- a/src/ShapeUpgrade/ShapeUpgrade_UnifySameDomain.cxx +++ b/src/ShapeUpgrade/ShapeUpgrade_UnifySameDomain.cxx @@ -40,7 +40,7 @@ #include #include #include -#include +#include #include #include #include @@ -1224,8 +1224,8 @@ static Standard_Boolean IsSameDomain(const TopoDS_Face& aFace, if (S1->IsKind(STANDARD_TYPE(Geom_ElementarySurface)) && S2->IsKind(STANDARD_TYPE(Geom_ElementarySurface))) { - Handle(GeomAdaptor_HSurface) aGA1 = new GeomAdaptor_HSurface(S1); - Handle(GeomAdaptor_HSurface) aGA2 = new GeomAdaptor_HSurface(S2); + Handle(GeomAdaptor_Surface) aGA1 = new GeomAdaptor_Surface(S1); + Handle(GeomAdaptor_Surface) aGA2 = new GeomAdaptor_Surface(S2); Handle(BRepTopAdaptor_TopolTool) aTT1 = new BRepTopAdaptor_TopolTool(); Handle(BRepTopAdaptor_TopolTool) aTT2 = new BRepTopAdaptor_TopolTool(); diff --git a/src/ShapeUpgrade/ShapeUpgrade_WireDivide.cxx b/src/ShapeUpgrade/ShapeUpgrade_WireDivide.cxx index 06167aa2b8..714ee5295e 100644 --- a/src/ShapeUpgrade/ShapeUpgrade_WireDivide.cxx +++ b/src/ShapeUpgrade/ShapeUpgrade_WireDivide.cxx @@ -26,11 +26,11 @@ #include #include #include -#include +#include #include #include #include -#include +#include #include #include #include @@ -424,8 +424,8 @@ void ShapeUpgrade_WireDivide::Perform () else if(myEdgeDivide->HasCurve2d() && !Surf.IsNull()) { Handle(Geom2d_Curve) c2d; sae.PCurve ( E, myFace, c2d, af, al, Standard_False); - Handle(Adaptor3d_HSurface) AdS = new GeomAdaptor_HSurface(Surf); - Handle(Adaptor2d_HCurve2d) AC2d = new Geom2dAdaptor_HCurve(c2d,af,al); + Handle(Adaptor3d_Surface) AdS = new GeomAdaptor_Surface(Surf); + Handle(Adaptor2d_Curve2d) AC2d = new Geom2dAdaptor_Curve(c2d,af,al); AdCS.Load(AC2d); AdCS.Load(AdS); } diff --git a/src/StdPrs/StdPrs_BRepFont.cxx b/src/StdPrs/StdPrs_BRepFont.cxx index bc752ac4e5..177601b9e9 100644 --- a/src/StdPrs/StdPrs_BRepFont.cxx +++ b/src/StdPrs/StdPrs_BRepFont.cxx @@ -33,7 +33,7 @@ #include #include #include -#include +#include #include #include #include @@ -138,8 +138,8 @@ StdPrs_BRepFont::StdPrs_BRepFont () void StdPrs_BRepFont::init() { mySurface = new Geom_Plane (gp_Pln (gp::XOY())); - myCurve2dAdaptor = new Geom2dAdaptor_HCurve(); - Handle(Adaptor3d_HSurface) aSurfAdaptor = new GeomAdaptor_HSurface (mySurface); + myCurve2dAdaptor = new Geom2dAdaptor_Curve(); + Handle(Adaptor3d_Surface) aSurfAdaptor = new GeomAdaptor_Surface (mySurface); myCurvOnSurf.Load (aSurfAdaptor); } @@ -291,8 +291,8 @@ bool StdPrs_BRepFont::to3d (const Handle(Geom2d_Curve)& theCurve2d, { Standard_Real aMaxDeviation = 0.0; Standard_Real anAverDeviation = 0.0; - myCurve2dAdaptor->ChangeCurve2d().Load (theCurve2d); - const Handle(Adaptor2d_HCurve2d)& aCurve = myCurve2dAdaptor; // to avoid ambiguity + myCurve2dAdaptor->Load (theCurve2d); + const Handle(Adaptor2d_Curve2d)& aCurve = myCurve2dAdaptor; // to avoid ambiguity myCurvOnSurf.Load (aCurve); GeomLib::BuildCurve3d (myPrecision, myCurvOnSurf, myCurve2dAdaptor->FirstParameter(), myCurve2dAdaptor->LastParameter(), diff --git a/src/StdPrs/StdPrs_BRepFont.hxx b/src/StdPrs/StdPrs_BRepFont.hxx index e59a21ed96..28fd303aa0 100644 --- a/src/StdPrs/StdPrs_BRepFont.hxx +++ b/src/StdPrs/StdPrs_BRepFont.hxx @@ -19,7 +19,7 @@ #include #include #include -#include +#include #include #include #include @@ -245,7 +245,7 @@ protected: //! @name Protected fields protected: //! @name Shared temporary variables for glyph construction Adaptor3d_CurveOnSurface myCurvOnSurf; - Handle(Geom2dAdaptor_HCurve) myCurve2dAdaptor; + Handle(Geom2dAdaptor_Curve) myCurve2dAdaptor; Geom2dConvert_CompCurveToBSplineCurve myConcatMaker; TColgp_Array1OfPnt2d my3Poles; TColgp_Array1OfPnt2d my4Poles; diff --git a/src/StdPrs/StdPrs_Isolines.cxx b/src/StdPrs/StdPrs_Isolines.cxx index a6da8962a1..5447502d9e 100644 --- a/src/StdPrs/StdPrs_Isolines.cxx +++ b/src/StdPrs/StdPrs_Isolines.cxx @@ -355,7 +355,7 @@ void StdPrs_Isolines::AddOnSurface (const TopoDS_Face& theFace, aUmin, aUmax, aVmin, aVmax); BRepAdaptor_Surface aSurface (theFace); - addOnSurface (new BRepAdaptor_HSurface (aSurface), + addOnSurface (new BRepAdaptor_Surface (aSurface), theDrawer, theDeflection, aUIsoParams, @@ -369,7 +369,7 @@ void StdPrs_Isolines::AddOnSurface (const TopoDS_Face& theFace, // purpose : //================================================================== void StdPrs_Isolines::AddOnSurface (const Handle(Prs3d_Presentation)& thePresentation, - const Handle(BRepAdaptor_HSurface)& theSurface, + const Handle(BRepAdaptor_Surface)& theSurface, const Handle(Prs3d_Drawer)& theDrawer, const Standard_Real theDeflection, const TColStd_SequenceOfReal& theUIsoParams, @@ -385,7 +385,7 @@ void StdPrs_Isolines::AddOnSurface (const Handle(Prs3d_Presentation)& thePrese // function : addOnSurface // purpose : //================================================================== -void StdPrs_Isolines::addOnSurface (const Handle(BRepAdaptor_HSurface)& theSurface, +void StdPrs_Isolines::addOnSurface (const Handle(BRepAdaptor_Surface)& theSurface, const Handle(Prs3d_Drawer)& theDrawer, const Standard_Real theDeflection, const TColStd_SequenceOfReal& theUIsoParams, diff --git a/src/StdPrs/StdPrs_Isolines.hxx b/src/StdPrs/StdPrs_Isolines.hxx index 112ee809be..db8c18475e 100644 --- a/src/StdPrs/StdPrs_Isolines.hxx +++ b/src/StdPrs/StdPrs_Isolines.hxx @@ -16,7 +16,7 @@ #ifndef _StdPrs_Isolines_H__ #define _StdPrs_Isolines_H__ -#include +#include #include #include #include @@ -157,7 +157,7 @@ public: //! @param theUIsoParams [in] the parameters of u isolines to compute. //! @param theVIsoParams [in] the parameters of v isolines to compute. Standard_EXPORT static void AddOnSurface (const Handle(Prs3d_Presentation)& thePresentation, - const Handle(BRepAdaptor_HSurface)& theSurface, + const Handle(BRepAdaptor_Surface)& theSurface, const Handle(Prs3d_Drawer)& theDrawer, const Standard_Real theDeflection, const TColStd_SequenceOfReal& theUIsoParams, @@ -220,7 +220,7 @@ private: //! @param theVIsoParams [in] the parameters of v isolines to compute //! @param theUPolylines [out] the sequence of result polylines //! @param theVPolylines [out] the sequence of result polylines - Standard_EXPORT static void addOnSurface (const Handle(BRepAdaptor_HSurface)& theSurface, + Standard_EXPORT static void addOnSurface (const Handle(BRepAdaptor_Surface)& theSurface, const Handle(Prs3d_Drawer)& theDrawer, const Standard_Real theDeflection, const TColStd_SequenceOfReal& theUIsoParams, diff --git a/src/StdPrs/StdPrs_ToolRFace.cxx b/src/StdPrs/StdPrs_ToolRFace.cxx index deafc2630e..9fe1f54ef3 100644 --- a/src/StdPrs/StdPrs_ToolRFace.cxx +++ b/src/StdPrs/StdPrs_ToolRFace.cxx @@ -16,7 +16,7 @@ #include #include -#include +#include #include //======================================================================= @@ -32,8 +32,8 @@ StdPrs_ToolRFace::StdPrs_ToolRFace() //function : StdPrs_ToolRFace //purpose : //======================================================================= -StdPrs_ToolRFace::StdPrs_ToolRFace (const Handle(BRepAdaptor_HSurface)& theSurface) -: myFace (theSurface->ChangeSurface().Face()), +StdPrs_ToolRFace::StdPrs_ToolRFace (const Handle(BRepAdaptor_Surface)& theSurface) +: myFace (theSurface->Face()), myHasNullCurves (Standard_False) { myFace.Orientation(TopAbs_FORWARD); diff --git a/src/StdPrs/StdPrs_ToolRFace.hxx b/src/StdPrs/StdPrs_ToolRFace.hxx index b9f72e7364..26361f92f9 100644 --- a/src/StdPrs/StdPrs_ToolRFace.hxx +++ b/src/StdPrs/StdPrs_ToolRFace.hxx @@ -17,15 +17,12 @@ #ifndef _StdPrs_ToolRFace_HeaderFile #define _StdPrs_ToolRFace_HeaderFile -#include -#include -#include - -#include -#include +#include #include #include -class BRepAdaptor_HSurface; +#include +#include + class TopoDS_Edge; //! Iterator over 2D curves restricting a face (skipping internal/external edges). @@ -40,7 +37,7 @@ public: Standard_EXPORT StdPrs_ToolRFace(); //! Constructor with initialization. - Standard_EXPORT StdPrs_ToolRFace(const Handle(BRepAdaptor_HSurface)& aSurface); + Standard_EXPORT StdPrs_ToolRFace(const Handle(BRepAdaptor_Surface)& aSurface); //! Return TRUE indicating that iterator looks only for oriented edges. Standard_Boolean IsOriented() const { return Standard_True; } diff --git a/src/StdPrs/StdPrs_WFDeflectionRestrictedFace.cxx b/src/StdPrs/StdPrs_WFDeflectionRestrictedFace.cxx index 1ea54f49b7..2db50e86d2 100644 --- a/src/StdPrs/StdPrs_WFDeflectionRestrictedFace.cxx +++ b/src/StdPrs/StdPrs_WFDeflectionRestrictedFace.cxx @@ -20,7 +20,7 @@ #include #include #include -#include +#include #include #include #include @@ -100,7 +100,7 @@ static void FindLimits(const Adaptor3d_Curve& aCurve, //========================================================================= void StdPrs_WFDeflectionRestrictedFace::Add (const Handle (Prs3d_Presentation)& aPresentation, - const Handle(BRepAdaptor_HSurface)& aFace, + const Handle(BRepAdaptor_Surface)& aFace, const Standard_Boolean DrawUIso, const Standard_Boolean DrawVIso, const Standard_Real Deflection, @@ -316,7 +316,7 @@ void StdPrs_WFDeflectionRestrictedFace::Add Adaptor3d_IsoCurve anIso; anIso.Load(aFace); Handle(Geom_Curve) BC; - const BRepAdaptor_Surface& BS = *(BRepAdaptor_Surface*)&(aFace->Surface()); + const BRepAdaptor_Surface& BS = *aFace; GeomAbs_SurfaceType thetype = aFace->GetType(); Handle(Geom_Surface) GB; @@ -396,7 +396,7 @@ Standard_Boolean StdPrs_WFDeflectionRestrictedFace::Match const Standard_Real Y, const Standard_Real Z, const Standard_Real aDistance, - const Handle(BRepAdaptor_HSurface)& aFace, + const Handle(BRepAdaptor_Surface)& aFace, const Handle(Prs3d_Drawer)& aDrawer, const Standard_Boolean DrawUIso, const Standard_Boolean DrawVIso, @@ -529,7 +529,7 @@ Standard_Boolean StdPrs_WFDeflectionRestrictedFace::Match //========================================================================= void StdPrs_WFDeflectionRestrictedFace::Add (const Handle (Prs3d_Presentation)& aPresentation, - const Handle(BRepAdaptor_HSurface)& aFace, + const Handle(BRepAdaptor_Surface)& aFace, const Handle (Prs3d_Drawer)& aDrawer) { Prs3d_NListOfSequenceOfPnt Curves; @@ -551,7 +551,7 @@ void StdPrs_WFDeflectionRestrictedFace::Add //========================================================================= void StdPrs_WFDeflectionRestrictedFace::AddUIso (const Handle (Prs3d_Presentation)& aPresentation, - const Handle(BRepAdaptor_HSurface)& aFace, + const Handle(BRepAdaptor_Surface)& aFace, const Handle (Prs3d_Drawer)& aDrawer) { Prs3d_NListOfSequenceOfPnt Curves; @@ -574,7 +574,7 @@ void StdPrs_WFDeflectionRestrictedFace::AddUIso //========================================================================= void StdPrs_WFDeflectionRestrictedFace::AddVIso (const Handle (Prs3d_Presentation)& aPresentation, - const Handle(BRepAdaptor_HSurface)& aFace, + const Handle(BRepAdaptor_Surface)& aFace, const Handle (Prs3d_Drawer)& aDrawer) { Prs3d_NListOfSequenceOfPnt Curves; @@ -600,7 +600,7 @@ Standard_Boolean StdPrs_WFDeflectionRestrictedFace::Match const Standard_Real Y, const Standard_Real Z, const Standard_Real aDistance, - const Handle(BRepAdaptor_HSurface)& aFace, + const Handle(BRepAdaptor_Surface)& aFace, const Handle (Prs3d_Drawer)& aDrawer) { return StdPrs_WFDeflectionRestrictedFace::Match ( @@ -624,7 +624,7 @@ Standard_Boolean StdPrs_WFDeflectionRestrictedFace::MatchUIso const Standard_Real Y, const Standard_Real Z, const Standard_Real aDistance, - const Handle(BRepAdaptor_HSurface)& aFace, + const Handle(BRepAdaptor_Surface)& aFace, const Handle (Prs3d_Drawer)& aDrawer) { return StdPrs_WFDeflectionRestrictedFace::Match ( @@ -648,7 +648,7 @@ Standard_Boolean StdPrs_WFDeflectionRestrictedFace::MatchVIso const Standard_Real Y, const Standard_Real Z, const Standard_Real aDistance, - const Handle(BRepAdaptor_HSurface)& aFace, + const Handle(BRepAdaptor_Surface)& aFace, const Handle (Prs3d_Drawer)& aDrawer) { return StdPrs_WFDeflectionRestrictedFace::Match ( diff --git a/src/StdPrs/StdPrs_WFDeflectionRestrictedFace.hxx b/src/StdPrs/StdPrs_WFDeflectionRestrictedFace.hxx index be7d35f9f7..3fb1f58f03 100644 --- a/src/StdPrs/StdPrs_WFDeflectionRestrictedFace.hxx +++ b/src/StdPrs/StdPrs_WFDeflectionRestrictedFace.hxx @@ -17,11 +17,11 @@ #ifndef _StdPrs_WFDeflectionRestrictedFace_HeaderFile #define _StdPrs_WFDeflectionRestrictedFace_HeaderFile +#include #include #include #include -class BRepAdaptor_HSurface; class Bnd_Box; //! A framework to provide display of U and V @@ -46,13 +46,13 @@ public: //! aPresentation, and its display attributes - in //! particular, the number of U and V isoparameters - are //! set in the attribute manager aDrawer. - //! aFace is BRepAdaptor_HSurface surface created + //! aFace is BRepAdaptor_Surface surface created //! from a face in a topological shape. which is passed //! as an argument through the - //! BRepAdaptor_HSurface surface created from it. + //! BRepAdaptor_Surface surface created from it. //! This is what allows the topological face to be treated //! as a geometric surface. - Standard_EXPORT static void Add (const Handle(Prs3d_Presentation)& aPresentation, const Handle(BRepAdaptor_HSurface)& aFace, const Handle(Prs3d_Drawer)& aDrawer); + Standard_EXPORT static void Add (const Handle(Prs3d_Presentation)& aPresentation, const Handle(BRepAdaptor_Surface)& aFace, const Handle(Prs3d_Drawer)& aDrawer); //! Defines a display featuring U isoparameters //! respectively. Add the surface aFace to the @@ -61,13 +61,13 @@ public: //! aPresentation, and its display attributes - in //! particular, the number of U isoparameters - //! are set in the attribute manager aDrawer. - //! aFace is BRepAdaptor_HSurface surface + //! aFace is BRepAdaptor_Surface surface //! created from a face in a topological shape. which //! is passed to the function as an argument through - //! the BRepAdaptor_HSurface surface created from + //! the BRepAdaptor_Surface surface created from //! it. This is what allows the topological face to be //! treated as a geometric surface. - Standard_EXPORT static void AddUIso (const Handle(Prs3d_Presentation)& aPresentation, const Handle(BRepAdaptor_HSurface)& aFace, const Handle(Prs3d_Drawer)& aDrawer); + Standard_EXPORT static void AddUIso (const Handle(Prs3d_Presentation)& aPresentation, const Handle(BRepAdaptor_Surface)& aFace, const Handle(Prs3d_Drawer)& aDrawer); //! Defines a display featuring V isoparameters //! respectively. Add the surface aFace to the @@ -76,13 +76,13 @@ public: //! aPresentation, and its display attributes - in //! particular, the number of V isoparameters - //! are set in the attribute manager aDrawer. - //! aFace is BRepAdaptor_HSurface surface + //! aFace is BRepAdaptor_Surface surface //! created from a face in a topological shape. which //! is passed to the function as an argument through - //! the BRepAdaptor_HSurface surface created from + //! the BRepAdaptor_Surface surface created from //! it. This is what allows the topological face to be //! treated as a geometric surface. - Standard_EXPORT static void AddVIso (const Handle(Prs3d_Presentation)& aPresentation, const Handle(BRepAdaptor_HSurface)& aFace, const Handle(Prs3d_Drawer)& aDrawer); + Standard_EXPORT static void AddVIso (const Handle(Prs3d_Presentation)& aPresentation, const Handle(BRepAdaptor_Surface)& aFace, const Handle(Prs3d_Drawer)& aDrawer); //! Defines a display of a delection-specified face. The //! display will feature U and V isoparameters. @@ -94,23 +94,23 @@ public: //! The function sets the number of U and V //! isoparameters, NBUiso and NBViso, in the shape. To //! do this, the arguments DrawUIso and DrawVIso must be true. - //! aFace is BRepAdaptor_HSurface surface created + //! aFace is BRepAdaptor_Surface surface created //! from a face in a topological shape. which is passed //! as an argument through the - //! BRepAdaptor_HSurface surface created from it. + //! BRepAdaptor_Surface surface created from it. //! This is what allows the topological face to be treated //! as a geometric surface. //! Curves give a sequence of face curves, it is used if the PrimitiveArray //! visualization approach is activated (it is activated by default). - Standard_EXPORT static void Add (const Handle(Prs3d_Presentation)& aPresentation, const Handle(BRepAdaptor_HSurface)& aFace, const Standard_Boolean DrawUIso, const Standard_Boolean DrawVIso, const Standard_Real Deflection, const Standard_Integer NBUiso, const Standard_Integer NBViso, const Handle(Prs3d_Drawer)& aDrawer, Prs3d_NListOfSequenceOfPnt& Curves); + Standard_EXPORT static void Add (const Handle(Prs3d_Presentation)& aPresentation, const Handle(BRepAdaptor_Surface)& aFace, const Standard_Boolean DrawUIso, const Standard_Boolean DrawVIso, const Standard_Real Deflection, const Standard_Integer NBUiso, const Standard_Integer NBViso, const Handle(Prs3d_Drawer)& aDrawer, Prs3d_NListOfSequenceOfPnt& Curves); - Standard_EXPORT static Standard_Boolean Match (const Standard_Real X, const Standard_Real Y, const Standard_Real Z, const Standard_Real aDistance, const Handle(BRepAdaptor_HSurface)& aFace, const Handle(Prs3d_Drawer)& aDrawer); + Standard_EXPORT static Standard_Boolean Match (const Standard_Real X, const Standard_Real Y, const Standard_Real Z, const Standard_Real aDistance, const Handle(BRepAdaptor_Surface)& aFace, const Handle(Prs3d_Drawer)& aDrawer); - Standard_EXPORT static Standard_Boolean MatchUIso (const Standard_Real X, const Standard_Real Y, const Standard_Real Z, const Standard_Real aDistance, const Handle(BRepAdaptor_HSurface)& aFace, const Handle(Prs3d_Drawer)& aDrawer); + Standard_EXPORT static Standard_Boolean MatchUIso (const Standard_Real X, const Standard_Real Y, const Standard_Real Z, const Standard_Real aDistance, const Handle(BRepAdaptor_Surface)& aFace, const Handle(Prs3d_Drawer)& aDrawer); - Standard_EXPORT static Standard_Boolean MatchVIso (const Standard_Real X, const Standard_Real Y, const Standard_Real Z, const Standard_Real aDistance, const Handle(BRepAdaptor_HSurface)& aFace, const Handle(Prs3d_Drawer)& aDrawer); + Standard_EXPORT static Standard_Boolean MatchVIso (const Standard_Real X, const Standard_Real Y, const Standard_Real Z, const Standard_Real aDistance, const Handle(BRepAdaptor_Surface)& aFace, const Handle(Prs3d_Drawer)& aDrawer); - Standard_EXPORT static Standard_Boolean Match (const Standard_Real X, const Standard_Real Y, const Standard_Real Z, const Standard_Real aDistance, const Handle(BRepAdaptor_HSurface)& aFace, const Handle(Prs3d_Drawer)& aDrawer, const Standard_Boolean DrawUIso, const Standard_Boolean DrawVIso, const Standard_Real aDeflection, const Standard_Integer NBUiso, const Standard_Integer NBViso); + Standard_EXPORT static Standard_Boolean Match (const Standard_Real X, const Standard_Real Y, const Standard_Real Z, const Standard_Real aDistance, const Handle(BRepAdaptor_Surface)& aFace, const Handle(Prs3d_Drawer)& aDrawer, const Standard_Boolean DrawUIso, const Standard_Boolean DrawVIso, const Standard_Real aDeflection, const Standard_Integer NBUiso, const Standard_Integer NBViso); }; diff --git a/src/StdPrs/StdPrs_WFDeflectionSurface.cxx b/src/StdPrs/StdPrs_WFDeflectionSurface.cxx index 15707d55b2..4209bcf492 100644 --- a/src/StdPrs/StdPrs_WFDeflectionSurface.cxx +++ b/src/StdPrs/StdPrs_WFDeflectionSurface.cxx @@ -15,7 +15,7 @@ // commercial license or contractual agreement. -#include +#include #include #include #include @@ -28,7 +28,7 @@ #include #include -static void FindLimits(const Handle(Adaptor3d_HSurface)& surf , +static void FindLimits(const Handle(Adaptor3d_Surface)& surf , const Standard_Real aLimit, Standard_Real& UFirst, Standard_Real& ULast, @@ -131,7 +131,7 @@ static void FindLimits(const Handle(Adaptor3d_HSurface)& surf , void StdPrs_WFDeflectionSurface::Add ( const Handle (Prs3d_Presentation)& aPresentation, - const Handle(Adaptor3d_HSurface)& aSurface, + const Handle(Adaptor3d_Surface)& aSurface, const Handle (Prs3d_Drawer)& aDrawer) { Standard_Real U1, U2, V1, V2; @@ -146,7 +146,7 @@ void StdPrs_WFDeflectionSurface::Add ( if (TOD == Aspect_TOD_RELATIVE) { // On calcule la fleche en fonction des min max globaux de la piece: Bnd_Box Total; - BndLib_AddSurface::Add(aSurface->Surface(),U1, U2, V1, V2, 0.,Total); + BndLib_AddSurface::Add (*aSurface, U1, U2, V1, V2, 0., Total); Standard_Real m = aDrawer->MaximalChordialDeviation()/ aDrawer->DeviationCoefficient(); Standard_Real aXmin, aYmin, aZmin, aXmax, aYmax, aZmax; diff --git a/src/StdPrs/StdPrs_WFDeflectionSurface.hxx b/src/StdPrs/StdPrs_WFDeflectionSurface.hxx index 87f832b27b..49a68d845e 100644 --- a/src/StdPrs/StdPrs_WFDeflectionSurface.hxx +++ b/src/StdPrs/StdPrs_WFDeflectionSurface.hxx @@ -17,11 +17,10 @@ #ifndef _StdPrs_WFDeflectionSurface_HeaderFile #define _StdPrs_WFDeflectionSurface_HeaderFile +#include #include #include -class Adaptor3d_HSurface; - //! Draws a surface by drawing the isoparametric curves with respect to //! a maximal chordial deviation. //! The number of isoparametric curves to be drawn and their color are @@ -42,7 +41,7 @@ public: //! Adaptor, and provides data from a Geom surface. //! This makes it possible to use the surface in a geometric algorithm. //! Note that this surface object is manipulated by handles. - Standard_EXPORT static void Add (const Handle(Prs3d_Presentation)& aPresentation, const Handle(Adaptor3d_HSurface)& aSurface, const Handle(Prs3d_Drawer)& aDrawer); + Standard_EXPORT static void Add (const Handle(Prs3d_Presentation)& aPresentation, const Handle(Adaptor3d_Surface)& aSurface, const Handle(Prs3d_Drawer)& aDrawer); diff --git a/src/StdPrs/StdPrs_WFRestrictedFace.cxx b/src/StdPrs/StdPrs_WFRestrictedFace.cxx index dba70ebd0d..1727e6491e 100755 --- a/src/StdPrs/StdPrs_WFRestrictedFace.cxx +++ b/src/StdPrs/StdPrs_WFRestrictedFace.cxx @@ -36,7 +36,7 @@ void StdPrs_WFRestrictedFace::Add (const Handle (Prs3d_Presentation)& thePresentation, - const Handle(BRepAdaptor_HSurface)& theFace, + const Handle(BRepAdaptor_Surface)& theFace, const Standard_Boolean theDrawUIso, const Standard_Boolean theDrawVIso, const Standard_Integer theNbUIso, @@ -148,7 +148,7 @@ void StdPrs_WFRestrictedFace::Add Adaptor3d_IsoCurve anIsoCurve; anIsoCurve.Load(theFace); Handle(Geom_Curve) aBCurve; - const BRepAdaptor_Surface& aBSurface = *(BRepAdaptor_Surface*)&(theFace->Surface()); + const BRepAdaptor_Surface& aBSurface = *theFace; GeomAbs_SurfaceType aFaceType = theFace->GetType(); Standard_Integer aNbLines = anIsoBuild.NbLines(); @@ -218,7 +218,7 @@ Standard_Boolean StdPrs_WFRestrictedFace::Match const Standard_Real theY, const Standard_Real theZ, const Standard_Real theDistance, - const Handle(BRepAdaptor_HSurface)& theFace, + const Handle(BRepAdaptor_Surface)& theFace, const Standard_Boolean theDrawUIso, const Standard_Boolean theDrawVIso, const Standard_Real theDeflection, @@ -383,7 +383,7 @@ Standard_Boolean StdPrs_WFRestrictedFace::Match void StdPrs_WFRestrictedFace::Add (const Handle (Prs3d_Presentation)& thePresentation, - const Handle(BRepAdaptor_HSurface)& theFace, + const Handle(BRepAdaptor_Surface)& theFace, const Handle (Prs3d_Drawer)& theDrawer) { Prs3d_NListOfSequenceOfPnt aCurves; @@ -405,7 +405,7 @@ void StdPrs_WFRestrictedFace::Add void StdPrs_WFRestrictedFace::AddUIso (const Handle (Prs3d_Presentation)& thePresentation, - const Handle(BRepAdaptor_HSurface)& theFace, + const Handle(BRepAdaptor_Surface)& theFace, const Handle (Prs3d_Drawer)& theDrawer) { Prs3d_NListOfSequenceOfPnt aCurves; @@ -427,7 +427,7 @@ void StdPrs_WFRestrictedFace::AddUIso void StdPrs_WFRestrictedFace::AddVIso (const Handle (Prs3d_Presentation)& thePresentation, - const Handle(BRepAdaptor_HSurface)& theFace, + const Handle(BRepAdaptor_Surface)& theFace, const Handle (Prs3d_Drawer)& theDrawer) { Prs3d_NListOfSequenceOfPnt aCurves; @@ -452,7 +452,7 @@ Standard_Boolean StdPrs_WFRestrictedFace::Match const Standard_Real theY, const Standard_Real theZ, const Standard_Real theDistance, - const Handle(BRepAdaptor_HSurface)& theFace, + const Handle(BRepAdaptor_Surface)& theFace, const Handle (Prs3d_Drawer)& theDrawer) { return StdPrs_WFRestrictedFace::Match ( @@ -477,7 +477,7 @@ Standard_Boolean StdPrs_WFRestrictedFace::MatchUIso const Standard_Real theY, const Standard_Real theZ, const Standard_Real theDistance, - const Handle(BRepAdaptor_HSurface)& theFace, + const Handle(BRepAdaptor_Surface)& theFace, const Handle (Prs3d_Drawer)& theDrawer) { return StdPrs_WFRestrictedFace::Match ( @@ -502,7 +502,7 @@ Standard_Boolean StdPrs_WFRestrictedFace::MatchVIso const Standard_Real theY, const Standard_Real theZ, const Standard_Real theDistance, - const Handle(BRepAdaptor_HSurface)& theFace, + const Handle(BRepAdaptor_Surface)& theFace, const Handle (Prs3d_Drawer)& theDrawer) { return StdPrs_WFRestrictedFace::Match ( diff --git a/src/StdPrs/StdPrs_WFRestrictedFace.hxx b/src/StdPrs/StdPrs_WFRestrictedFace.hxx index cfe12c2472..7ac81082ae 100755 --- a/src/StdPrs/StdPrs_WFRestrictedFace.hxx +++ b/src/StdPrs/StdPrs_WFRestrictedFace.hxx @@ -14,7 +14,7 @@ #ifndef _StdPrs_WFRestrictedFace_H__ #define _StdPrs_WFRestrictedFace_H__ -#include +#include #include #include #include @@ -33,7 +33,7 @@ public: Standard_EXPORT static void Add (const Handle (Prs3d_Presentation)& thePresentation, - const Handle(BRepAdaptor_HSurface)& theFace, + const Handle(BRepAdaptor_Surface)& theFace, const Standard_Boolean theDrawUIso, const Standard_Boolean theDrawVIso, const Standard_Integer theNbUIso, @@ -43,7 +43,7 @@ public: Standard_EXPORT static void Add (const Handle (Prs3d_Presentation)& thePresentation, - const Handle(BRepAdaptor_HSurface)& theFace, + const Handle(BRepAdaptor_Surface)& theFace, const Handle (Prs3d_Drawer)& theDrawer); Standard_EXPORT static Standard_Boolean Match @@ -51,7 +51,7 @@ public: const Standard_Real theY, const Standard_Real theZ, const Standard_Real theDistance, - const Handle(BRepAdaptor_HSurface)& theFace, + const Handle(BRepAdaptor_Surface)& theFace, const Standard_Boolean theDrawUIso, const Standard_Boolean theDrawVIso, const Standard_Real theDeflection, @@ -64,7 +64,7 @@ public: const Standard_Real theY, const Standard_Real theZ, const Standard_Real theDistance, - const Handle(BRepAdaptor_HSurface)& theFace, + const Handle(BRepAdaptor_Surface)& theFace, const Handle (Prs3d_Drawer)& theDrawer); Standard_EXPORT static Standard_Boolean MatchUIso @@ -72,7 +72,7 @@ public: const Standard_Real theY, const Standard_Real theZ, const Standard_Real theDistance, - const Handle(BRepAdaptor_HSurface)& theFace, + const Handle(BRepAdaptor_Surface)& theFace, const Handle (Prs3d_Drawer)& theDrawer); Standard_EXPORT static Standard_Boolean MatchVIso @@ -80,17 +80,17 @@ public: const Standard_Real theY, const Standard_Real theZ, const Standard_Real theDistance, - const Handle(BRepAdaptor_HSurface)& theFace, + const Handle(BRepAdaptor_Surface)& theFace, const Handle (Prs3d_Drawer)& theDrawer); Standard_EXPORT static void AddUIso (const Handle (Prs3d_Presentation)& thePresentation, - const Handle(BRepAdaptor_HSurface)& theFace, + const Handle(BRepAdaptor_Surface)& theFace, const Handle (Prs3d_Drawer)& theDrawer); Standard_EXPORT static void AddVIso (const Handle (Prs3d_Presentation)& thePresentation, - const Handle(BRepAdaptor_HSurface)& theFace, + const Handle(BRepAdaptor_Surface)& theFace, const Handle (Prs3d_Drawer)& theDrawer); }; diff --git a/src/StdPrs/StdPrs_WFShape.cxx b/src/StdPrs/StdPrs_WFShape.cxx index c03da7fcad..b7b929b976 100644 --- a/src/StdPrs/StdPrs_WFShape.cxx +++ b/src/StdPrs/StdPrs_WFShape.cxx @@ -18,7 +18,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/StdPrs/StdPrs_WFSurface.cxx b/src/StdPrs/StdPrs_WFSurface.cxx index 29c5c3080a..a258e39597 100644 --- a/src/StdPrs/StdPrs_WFSurface.cxx +++ b/src/StdPrs/StdPrs_WFSurface.cxx @@ -15,7 +15,7 @@ // commercial license or contractual agreement. -#include +#include #include #include #include @@ -31,7 +31,7 @@ #include #include -static void FindLimits(const Handle(Adaptor3d_HSurface)& surf , +static void FindLimits(const Handle(Adaptor3d_Surface)& surf , const Standard_Real aLimit, Standard_Real& UFirst, Standard_Real& ULast, @@ -130,7 +130,7 @@ static void FindLimits(const Handle(Adaptor3d_HSurface)& surf , //======================================================================= void StdPrs_WFSurface::Add (const Handle(Prs3d_Presentation)& aPresentation, - const Handle(Adaptor3d_HSurface)& aSurface, + const Handle(Adaptor3d_Surface)& aSurface, const Handle(Prs3d_Drawer)& aDrawer) { diff --git a/src/StdPrs/StdPrs_WFSurface.hxx b/src/StdPrs/StdPrs_WFSurface.hxx index dacdba11c3..0226be9d76 100644 --- a/src/StdPrs/StdPrs_WFSurface.hxx +++ b/src/StdPrs/StdPrs_WFSurface.hxx @@ -17,11 +17,10 @@ #ifndef _StdPrs_WFSurface_HeaderFile #define _StdPrs_WFSurface_HeaderFile +#include #include #include -class Adaptor3d_HSurface; - //! Computes the wireframe presentation of surfaces //! by displaying a given number of U and/or V isoparametric //! curves. The isoparametric curves are drawn with respect @@ -37,7 +36,7 @@ public: //! a fixed number of points given by the Drawer. //! The number of isoparametric curves to be drawn and their color are //! controlled by the furnished Drawer. - Standard_EXPORT static void Add (const Handle(Prs3d_Presentation)& aPresentation, const Handle(Adaptor3d_HSurface)& aSurface, const Handle(Prs3d_Drawer)& aDrawer); + Standard_EXPORT static void Add (const Handle(Prs3d_Presentation)& aPresentation, const Handle(Adaptor3d_Surface)& aSurface, const Handle(Prs3d_Drawer)& aDrawer); diff --git a/src/StepToTopoDS/StepToTopoDS_TranslateFace.cxx b/src/StepToTopoDS/StepToTopoDS_TranslateFace.cxx index 8bf7a3ee4f..c3bdc3f844 100644 --- a/src/StepToTopoDS/StepToTopoDS_TranslateFace.cxx +++ b/src/StepToTopoDS/StepToTopoDS_TranslateFace.cxx @@ -40,7 +40,6 @@ #include #include #include -#include #include #include #include diff --git a/src/TopOpeBRep/TopOpeBRep_EdgesIntersector.cxx b/src/TopOpeBRep/TopOpeBRep_EdgesIntersector.cxx index 411ba923d6..25e4a12634 100644 --- a/src/TopOpeBRep/TopOpeBRep_EdgesIntersector.cxx +++ b/src/TopOpeBRep/TopOpeBRep_EdgesIntersector.cxx @@ -34,7 +34,6 @@ static void CurveToString(const GeomAbs_CurveType t, TCollection_AsciiString& N) #include #include -#include #include #include #include @@ -95,8 +94,8 @@ Standard_EXPORT TOPKRO KRO_DSFILLER_INTEE("intersection edge/edge"); //======================================================================= TopOpeBRep_EdgesIntersector::TopOpeBRep_EdgesIntersector() { - mySurface1 = new BRepAdaptor_HSurface(); - mySurface2 = new BRepAdaptor_HSurface(); + mySurface1 = new BRepAdaptor_Surface(); + mySurface2 = new BRepAdaptor_Surface(); mySurfacesSameOriented = Standard_False; myFacesSameOriented = Standard_False; myTol1 = 0.; // Precision::PConfusion(); @@ -146,11 +145,11 @@ void TopOpeBRep_EdgesIntersector::SetFaces(const TopoDS_Shape& F1,const TopoDS_S myFacesSameOriented = Standard_True; myFace1 = TopoDS::Face(F1); - BRepAdaptor_Surface& S1 = mySurface1->ChangeSurface(); S1.Initialize(myFace1,computerestriction); + BRepAdaptor_Surface& S1 = *mySurface1; S1.Initialize(myFace1,computerestriction); mySurfaceType1 = S1.GetType(); myFace2 = TopoDS::Face(F2); - BRepAdaptor_Surface& S2 = mySurface2->ChangeSurface(); S2.Initialize(myFace2,computerestriction); + BRepAdaptor_Surface& S2 = *mySurface2; S2.Initialize(myFace2,computerestriction); mySurfaceType2 = S2.GetType(); TopoDS_Face face1forward = myFace1; @@ -887,8 +886,8 @@ const TopoDS_Shape& TopOpeBRep_EdgesIntersector::Face(const Standard_Integer Ind //======================================================================= const BRepAdaptor_Surface& TopOpeBRep_EdgesIntersector::Surface(const Standard_Integer Index) const { - if ( Index == 1 ) return mySurface1->ChangeSurface(); - else if ( Index == 2 ) return mySurface2->ChangeSurface(); + if ( Index == 1 ) return *mySurface1; + else if ( Index == 2 ) return *mySurface2; else throw Standard_Failure("TopOpeBRep_EdgesIntersector::Surface"); } diff --git a/src/TopOpeBRep/TopOpeBRep_EdgesIntersector.hxx b/src/TopOpeBRep/TopOpeBRep_EdgesIntersector.hxx index f31a324552..053c4aa548 100644 --- a/src/TopOpeBRep/TopOpeBRep_EdgesIntersector.hxx +++ b/src/TopOpeBRep/TopOpeBRep_EdgesIntersector.hxx @@ -17,28 +17,21 @@ #ifndef _TopOpeBRep_EdgesIntersector_HeaderFile #define _TopOpeBRep_EdgesIntersector_HeaderFile -#include -#include -#include - -#include +#include #include -#include -#include -#include #include -#include #include +#include #include #include -#include +#include +#include +#include #include #include #include -#include #include -class BRepAdaptor_HSurface; -class TopoDS_Shape; + class Bnd_Box; class Geom2dAdaptor_Curve; class BRepAdaptor_Surface; @@ -49,7 +42,6 @@ class IntRes2d_IntersectionPoint; class TopOpeBRepDS_Transition; class gp_Pnt; - //! Describes the intersection of two edges on the same surface class TopOpeBRep_EdgesIntersector { @@ -180,8 +172,8 @@ private: TopoDS_Face myFace1; TopoDS_Face myFace2; - Handle(BRepAdaptor_HSurface) mySurface1; - Handle(BRepAdaptor_HSurface) mySurface2; + Handle(BRepAdaptor_Surface) mySurface1; + Handle(BRepAdaptor_Surface) mySurface2; GeomAbs_SurfaceType mySurfaceType1; GeomAbs_SurfaceType mySurfaceType2; Standard_Boolean mySurfacesSameOriented; diff --git a/src/TopOpeBRep/TopOpeBRep_EdgesIntersector_1.cxx b/src/TopOpeBRep/TopOpeBRep_EdgesIntersector_1.cxx index 279dff1455..434eb73553 100644 --- a/src/TopOpeBRep/TopOpeBRep_EdgesIntersector_1.cxx +++ b/src/TopOpeBRep/TopOpeBRep_EdgesIntersector_1.cxx @@ -17,7 +17,6 @@ #include #include -#include #include #include #include diff --git a/src/TopOpeBRep/TopOpeBRep_FacesIntersector.cxx b/src/TopOpeBRep/TopOpeBRep_FacesIntersector.cxx index c940dd72d3..10754a83c2 100644 --- a/src/TopOpeBRep/TopOpeBRep_FacesIntersector.cxx +++ b/src/TopOpeBRep/TopOpeBRep_FacesIntersector.cxx @@ -16,7 +16,7 @@ #include -#include +#include #include #include #include @@ -78,34 +78,34 @@ Standard_EXPORT TOPKRO KRO_DSFILLER_INTFF("intersection face/face"); #include #include #include -#include +#include #include #include -#include +#include #include static Standard_Boolean TestWLineAlongRestriction(const Handle(IntPatch_WLine)& theWLine, const Standard_Integer theRank, - const Handle(Adaptor3d_HSurface)& theSurface, + const Handle(Adaptor3d_Surface)& theSurface, const Handle(Adaptor3d_TopolTool)& theDomain, const Standard_Real theTolArc); static Handle(IntPatch_RLine) BuildRLineBasedOnWLine(const Handle(IntPatch_WLine)& theWLine, - const Handle(Adaptor2d_HCurve2d)& theArc, + const Handle(Adaptor2d_Curve2d)& theArc, const Standard_Integer theRank); static Handle(IntPatch_RLine) BuildRLine(const IntPatch_SequenceOfLine& theSeqOfWLine, const Standard_Integer theRank, - const Handle(Adaptor3d_HSurface)& theSurface, + const Handle(Adaptor3d_Surface)& theSurface, const Handle(Adaptor3d_TopolTool)& theDomain, const Standard_Real theTolArc); static void TestWLinesToAnArc(IntPatch_SequenceOfLine& slin, - const Handle(Adaptor3d_HSurface)& theSurface1, + const Handle(Adaptor3d_Surface)& theSurface1, const Handle(Adaptor3d_TopolTool)& theDomain1, - const Handle(Adaptor3d_HSurface)& theSurface2, + const Handle(Adaptor3d_Surface)& theSurface2, const Handle(Adaptor3d_TopolTool)& theDomain2, const Standard_Real theTolArc); // modified by NIZHNY-MKK Mon Apr 2 12:14:38 2001.END @@ -119,17 +119,17 @@ static void TestWLinesToAnArc(IntPatch_SequenceOfLine& slin, #include #include static void MergeWLinesIfAllSegmentsAlongRestriction(IntPatch_SequenceOfLine& theSlin, - const Handle(Adaptor3d_HSurface)& theSurface1, + const Handle(Adaptor3d_Surface)& theSurface1, const Handle(Adaptor3d_TopolTool)& theDomain1, - const Handle(Adaptor3d_HSurface)& theSurface2, + const Handle(Adaptor3d_Surface)& theSurface2, const Handle(Adaptor3d_TopolTool)& theDomain2, const Standard_Real theTolArc); //------------------------------------------------------------------------------------------------ static Standard_Integer GetArc(IntPatch_SequenceOfLine& theSlin, const Standard_Integer& theRankS, - const Handle(Adaptor3d_HSurface)& theSurfaceObj, + const Handle(Adaptor3d_Surface)& theSurfaceObj, const Handle(Adaptor3d_TopolTool)& theDomainObj, - const Handle(Adaptor3d_HSurface)& theSurfaceTool, + const Handle(Adaptor3d_Surface)& theSurfaceTool, const gp_Pnt& theTestPoint, Standard_Real& theVrtxTol, Handle(IntSurf_LineOn2S)& theLineOn2S, @@ -160,8 +160,8 @@ TopOpeBRep_FacesIntersector::TopOpeBRep_FacesIntersector () ResetIntersection(); myTol1 = myTol2 = Precision::Confusion(); myForceTolerances = Standard_False; - mySurface1 = new BRepAdaptor_HSurface(); - mySurface2 = new BRepAdaptor_HSurface(); + mySurface1 = new BRepAdaptor_Surface(); + mySurface2 = new BRepAdaptor_Surface(); myDomain1 = new BRepTopAdaptor_TopolTool(); myDomain2 = new BRepTopAdaptor_TopolTool(); } @@ -182,13 +182,13 @@ void TopOpeBRep_FacesIntersector::Perform(const TopoDS_Shape& F1,const TopoDS_Sh myFace1 = TopoDS::Face(F1); myFace1.Orientation(TopAbs_FORWARD); myFace2 = TopoDS::Face(F2); myFace2.Orientation(TopAbs_FORWARD); - BRepAdaptor_Surface& S1 = mySurface1->ChangeSurface(); S1.Initialize(myFace1); - BRepAdaptor_Surface& S2 = mySurface2->ChangeSurface(); S2.Initialize(myFace2); + BRepAdaptor_Surface& S1 = *mySurface1; S1.Initialize(myFace1); + BRepAdaptor_Surface& S2 = *mySurface2; S2.Initialize(myFace2); mySurfaceType1 = S1.GetType(); mySurfaceType2 = S2.GetType(); - const Handle(Adaptor3d_HSurface)& aSurf1 = mySurface1; // to avoid ambiguity + const Handle(Adaptor3d_Surface)& aSurf1 = mySurface1; // to avoid ambiguity myDomain1->Initialize(aSurf1); - const Handle(Adaptor3d_HSurface)& aSurf2 = mySurface2; // to avoid ambiguity + const Handle(Adaptor3d_Surface)& aSurf2 = mySurface2; // to avoid ambiguity myDomain2->Initialize(aSurf2); #ifdef OCCT_DEBUG @@ -374,8 +374,8 @@ void TopOpeBRep_FacesIntersector::PrepareLines() myLineNb = 0; Standard_Integer n = myIntersector.NbLines(); myHAL = new TopOpeBRep_HArray1OfLineInter(0,n); - BRepAdaptor_Surface& S1 = *((BRepAdaptor_Surface*)&(mySurface1->Surface())); - BRepAdaptor_Surface& S2 = *((BRepAdaptor_Surface*)&(mySurface2->Surface())); + BRepAdaptor_Surface& S1 = *mySurface1; + BRepAdaptor_Surface& S2 = *mySurface2; // modified by NIZHNY-MKK Mon Apr 2 12:14:58 2001.BEGIN if(n==0) @@ -662,7 +662,7 @@ Standard_Real TopOpeBRep_FacesIntersector::ToleranceMax // ================================================================================================ static Standard_Boolean TestWLineAlongRestriction(const Handle(IntPatch_WLine)& theWLine, const Standard_Integer theRank, - const Handle(Adaptor3d_HSurface)& theSurface, + const Handle(Adaptor3d_Surface)& theSurface, const Handle(Adaptor3d_TopolTool)& theDomain, const Standard_Real theTolArc) { @@ -706,7 +706,7 @@ static Standard_Boolean TestWLineAlongRestriction(const Handle(IntPatch_WLine)& // ================================================================================================ static Handle(IntPatch_RLine) BuildRLineBasedOnWLine(const Handle(IntPatch_WLine)& theWLine, - const Handle(Adaptor2d_HCurve2d)& theArc, + const Handle(Adaptor2d_Curve2d)& theArc, const Standard_Integer theRank) { Handle(IntPatch_RLine) anRLine; @@ -727,7 +727,7 @@ Handle(IntPatch_RLine) BuildRLineBasedOnWLine(const Handle(IntPatch_WLine)& theW } aPOnLine = gp_Pnt2d(u, v); - Standard_Real par1 = Geom2dInt_TheProjPCurOfGInter::FindParameter(theArc->Curve2d(), aPOnLine, 1.e-7); + Standard_Real par1 = Geom2dInt_TheProjPCurOfGInter::FindParameter (*theArc, aPOnLine, 1.e-7); if(theRank == 1) { Vtx2.ParametersOnS1(u, v); @@ -736,7 +736,7 @@ Handle(IntPatch_RLine) BuildRLineBasedOnWLine(const Handle(IntPatch_WLine)& theW Vtx2.ParametersOnS2(u, v); } aPOnLine = gp_Pnt2d(u, v); - Standard_Real par2 = Geom2dInt_TheProjPCurOfGInter::FindParameter(theArc->Curve2d(), aPOnLine, 1.e-7); + Standard_Real par2 = Geom2dInt_TheProjPCurOfGInter::FindParameter (*theArc, aPOnLine, 1.e-7); Standard_Real tol = (Vtx1.Tolerance() > Vtx2.Tolerance()) ? Vtx1.Tolerance() : Vtx2.Tolerance(); @@ -784,7 +784,7 @@ Handle(IntPatch_RLine) BuildRLineBasedOnWLine(const Handle(IntPatch_WLine)& theW Vtx.ParametersOnS2(u, v); } gp_Pnt2d atmpPoint(u, v); - Standard_Real apar = Geom2dInt_TheProjPCurOfGInter::FindParameter(theArc->Curve2d(), atmpPoint, 1.e-7); + Standard_Real apar = Geom2dInt_TheProjPCurOfGInter::FindParameter (*theArc, atmpPoint, 1.e-7); Vtx.SetParameter(apar); anRLine->AddVertex(Vtx); } @@ -827,7 +827,7 @@ Handle(IntPatch_RLine) BuildRLineBasedOnWLine(const Handle(IntPatch_WLine)& theW Vtx.ParametersOnS2(u, v); } gp_Pnt2d atmpPoint(u, v); - Standard_Real apar = Geom2dInt_TheProjPCurOfGInter::FindParameter(theArc->Curve2d(), atmpPoint, 1.e-7); + Standard_Real apar = Geom2dInt_TheProjPCurOfGInter::FindParameter (*theArc, atmpPoint, 1.e-7); Vtx.SetParameter(apar); anRLine->AddVertex(Vtx); } @@ -855,7 +855,7 @@ Handle(IntPatch_RLine) BuildRLineBasedOnWLine(const Handle(IntPatch_WLine)& theW static Handle(IntPatch_RLine) BuildRLine(const IntPatch_SequenceOfLine& theSeqOfWLine, const Standard_Integer theRank, - const Handle(Adaptor3d_HSurface)& theSurface, + const Handle(Adaptor3d_Surface)& theSurface, const Handle(Adaptor3d_TopolTool)& theDomain, const Standard_Real theTolArc) { Handle(IntPatch_RLine) anRLine; @@ -903,7 +903,7 @@ Handle(IntPatch_RLine) BuildRLine(const IntPatch_SequenceOfLine& theSeqOfWLi POn2S.ParametersOnS2(u, v); } gp_Pnt2d aPOnArc, aPOnLine(u, v); - Standard_Real par = Geom2dInt_TheProjPCurOfGInter::FindParameter(theDomain->Value()->Curve2d(), aPOnLine, 1e-7); + Standard_Real par = Geom2dInt_TheProjPCurOfGInter::FindParameter (*theDomain->Value(), aPOnLine, 1e-7); aPOnArc = theDomain->Value()->Value(par); gp_Pnt ap; gp_Vec ad1u, ad1v; @@ -994,9 +994,9 @@ Handle(IntPatch_RLine) BuildRLine(const IntPatch_SequenceOfLine& theSeqOfWLi // purpose: test if possible to replace group of wlines by rline and replace in the sequence slin // ================================================================================================ static void TestWLinesToAnArc(IntPatch_SequenceOfLine& slin, - const Handle(Adaptor3d_HSurface)& theSurface1, + const Handle(Adaptor3d_Surface)& theSurface1, const Handle(Adaptor3d_TopolTool)& theDomain1, - const Handle(Adaptor3d_HSurface)& theSurface2, + const Handle(Adaptor3d_Surface)& theSurface2, const Handle(Adaptor3d_TopolTool)& theDomain2, const Standard_Real theTolArc) { @@ -1110,9 +1110,9 @@ static void TestWLinesToAnArc(IntPatch_SequenceOfLine& slin, // RLine. //==================================================================================== static void MergeWLinesIfAllSegmentsAlongRestriction(IntPatch_SequenceOfLine& theSlin, - const Handle(Adaptor3d_HSurface)& theSurface1, + const Handle(Adaptor3d_Surface)& theSurface1, const Handle(Adaptor3d_TopolTool)& theDomain1, - const Handle(Adaptor3d_HSurface)& theSurface2, + const Handle(Adaptor3d_Surface)& theSurface2, const Handle(Adaptor3d_TopolTool)& theDomain2, const Standard_Real theTolArc) { @@ -1205,9 +1205,9 @@ static void MergeWLinesIfAllSegmentsAlongRestriction(IntPatch_SequenceOfLine& //======================================================================================== static Standard_Integer GetArc(IntPatch_SequenceOfLine& theSlin, const Standard_Integer& theRankS, - const Handle(Adaptor3d_HSurface)& theSurfaceObj, + const Handle(Adaptor3d_Surface)& theSurfaceObj, const Handle(Adaptor3d_TopolTool)& theDomainObj, - const Handle(Adaptor3d_HSurface)& theSurfaceTool, + const Handle(Adaptor3d_Surface)& theSurfaceTool, const gp_Pnt& theTestPoint, Standard_Real& theVrtxTol, Handle(IntSurf_LineOn2S)& theLineOn2S, @@ -1256,7 +1256,7 @@ static Standard_Integer GetArc(IntPatch_SequenceOfLine& theSlin, // 2. load parameters of founded edge and its arc. CurArc = 0; TColgp_SequenceOfPnt PointsFromArc; - Handle(Adaptor2d_HCurve2d) arc = NULL; + Handle(Adaptor2d_Curve2d) arc = NULL; Standard_Real tol = 1.e-7; TColStd_SequenceOfReal WLVertexParameters; Standard_Boolean classifyOK = Standard_True; @@ -1297,8 +1297,8 @@ static Standard_Integer GetArc(IntPatch_SequenceOfLine& theSlin, gp_Pnt2d aPOnLine_F(Upf, Vpf); gp_Pnt2d aPOnLine_L(Upl, Vpl); - Standard_Real par_F = Geom2dInt_TheProjPCurOfGInter::FindParameter(arc->Curve2d(), aPOnLine_F, tol); - Standard_Real par_L = Geom2dInt_TheProjPCurOfGInter::FindParameter(arc->Curve2d(), aPOnLine_L, tol); + Standard_Real par_F = Geom2dInt_TheProjPCurOfGInter::FindParameter (*arc, aPOnLine_F, tol); + Standard_Real par_L = Geom2dInt_TheProjPCurOfGInter::FindParameter (*arc, aPOnLine_L, tol); WLVertexParameters.Append(par_F); WLVertexParameters.Append(par_L); @@ -1336,7 +1336,7 @@ static Standard_Integer GetArc(IntPatch_SequenceOfLine& theSlin, Standard_Real param = (firstES1 + WLVertexParameters.Value(1)) / 2.; gp_Pnt point; aCEdge->D0(param, point); - if( !IsPointOK(point, theSurfaceTool->Surface(), CheckTol) ) + if( !IsPointOK(point, *theSurfaceTool, CheckTol) ) { classifyOK = Standard_False; break; @@ -1348,7 +1348,7 @@ static Standard_Integer GetArc(IntPatch_SequenceOfLine& theSlin, Standard_Real param = (lastES1 + WLVertexParameters.Value(WLVertexParameters.Length())) / 2.; gp_Pnt point; aCEdge->D0(param, point); - if( !IsPointOK(point, theSurfaceTool->Surface(), CheckTol) ) + if( !IsPointOK(point, *theSurfaceTool, CheckTol) ) { classifyOK = Standard_False; break; @@ -1363,7 +1363,7 @@ static Standard_Integer GetArc(IntPatch_SequenceOfLine& theSlin, Standard_Real param = (WLVertexParameters.Value(i*2) + WLVertexParameters.Value(i*2+1)) / 2.; gp_Pnt point; aCEdge->D0(param, point); - if( !IsPointOK(point, theSurfaceTool->Surface(), CheckTol) ) + if( !IsPointOK(point, *theSurfaceTool, CheckTol) ) { classifyOK = Standard_False; break; @@ -1403,8 +1403,8 @@ static Standard_Integer GetArc(IntPatch_SequenceOfLine& theSlin, Extrema_POnSurf pOnS1; Extrema_POnSurf pOnS2; gp_Pnt arcpoint = PointsFromArc.Value( i ); - Standard_Boolean isOnS1 = GetPointOn2S( arcpoint, theSurfaceObj->Surface(), CheckTol, pOnS1 ); - Standard_Boolean isOnS2 = GetPointOn2S( arcpoint, theSurfaceTool->Surface(), CheckTol, pOnS2 ); + Standard_Boolean isOnS1 = GetPointOn2S( arcpoint, *theSurfaceObj, CheckTol, pOnS1 ); + Standard_Boolean isOnS2 = GetPointOn2S( arcpoint, *theSurfaceTool, CheckTol, pOnS2 ); if( isOnS1 && isOnS2 ) { Standard_Real u1 = 0., v1 = 0., u2 = 0., v2 = 0.; diff --git a/src/TopOpeBRep/TopOpeBRep_FacesIntersector.hxx b/src/TopOpeBRep/TopOpeBRep_FacesIntersector.hxx index c635f42d1f..60e5ebed6c 100644 --- a/src/TopOpeBRep/TopOpeBRep_FacesIntersector.hxx +++ b/src/TopOpeBRep/TopOpeBRep_FacesIntersector.hxx @@ -17,27 +17,17 @@ #ifndef _TopOpeBRep_FacesIntersector_HeaderFile #define _TopOpeBRep_FacesIntersector_HeaderFile -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include +#include #include -#include -#include +#include #include -class BRepAdaptor_HSurface; -class BRepTopAdaptor_TopolTool; -class TopoDS_Shape; -class Bnd_Box; -class TopOpeBRep_LineInter; +#include +#include +#include +#include +class BRepTopAdaptor_TopolTool; +class Bnd_Box; //! Describes the intersection of two faces. class TopOpeBRep_FacesIntersector @@ -148,8 +138,8 @@ private: Standard_Integer myLineNb; TopoDS_Face myFace1; TopoDS_Face myFace2; - Handle(BRepAdaptor_HSurface) mySurface1; - Handle(BRepAdaptor_HSurface) mySurface2; + Handle(BRepAdaptor_Surface) mySurface1; + Handle(BRepAdaptor_Surface) mySurface2; GeomAbs_SurfaceType mySurfaceType1; GeomAbs_SurfaceType mySurfaceType2; Standard_Boolean mySurfacesSameOriented; diff --git a/src/TopOpeBRep/TopOpeBRep_Hctxff2d.cxx b/src/TopOpeBRep/TopOpeBRep_Hctxff2d.cxx index 454e62b484..3cf6f20d3a 100644 --- a/src/TopOpeBRep/TopOpeBRep_Hctxff2d.cxx +++ b/src/TopOpeBRep/TopOpeBRep_Hctxff2d.cxx @@ -15,7 +15,7 @@ // commercial license or contractual agreement. -#include +#include #include #include #include @@ -52,12 +52,12 @@ void TopOpeBRep_Hctxff2d::SetFaces(const TopoDS_Face& F1,const TopoDS_Face& F2) Standard_Boolean computerestriction = Standard_False; if (newf1) { - if (mySurface1.IsNull()) mySurface1 = new BRepAdaptor_HSurface(); - mySurface1->ChangeSurface().Initialize(F1,computerestriction); + if (mySurface1.IsNull()) mySurface1 = new BRepAdaptor_Surface(); + mySurface1->Initialize(F1,computerestriction); } if (newf2) { - if (mySurface2.IsNull()) mySurface2 = new BRepAdaptor_HSurface(); - mySurface2->ChangeSurface().Initialize(F2,computerestriction); + if (mySurface2.IsNull()) mySurface2 = new BRepAdaptor_Surface(); + mySurface2->Initialize(F2,computerestriction); } SetHSurfacesPrivate(); } // SetFaces @@ -67,12 +67,12 @@ void TopOpeBRep_Hctxff2d::SetFaces(const TopoDS_Face& F1,const TopoDS_Face& F2) //function : SetHSurfaces //purpose : //======================================================================= -void TopOpeBRep_Hctxff2d::SetHSurfaces(const Handle(BRepAdaptor_HSurface)& HS1, - const Handle(BRepAdaptor_HSurface)& HS2) +void TopOpeBRep_Hctxff2d::SetHSurfaces(const Handle(BRepAdaptor_Surface)& HS1, + const Handle(BRepAdaptor_Surface)& HS2) { Standard_Boolean newf1 = Standard_False; Standard_Boolean newf2 = Standard_False; - if (!HS1.IsNull()) newf1 = !HS1->ChangeSurface().Face().IsEqual(myFace1); - if (!HS2.IsNull()) newf2 = !HS2->ChangeSurface().Face().IsEqual(myFace2); + if (!HS1.IsNull()) newf1 = !HS1->Face().IsEqual(myFace1); + if (!HS2.IsNull()) newf2 = !HS2->Face().IsEqual(myFace2); Standard_Boolean yaduneuf = (newf1 || newf2); if (!yaduneuf) return; mySurface1 = HS1; @@ -86,11 +86,11 @@ void TopOpeBRep_Hctxff2d::SetHSurfaces(const Handle(BRepAdaptor_HSurface)& HS1, //======================================================================= void TopOpeBRep_Hctxff2d::SetHSurfacesPrivate() { - BRepAdaptor_Surface& S1 = mySurface1->ChangeSurface(); + BRepAdaptor_Surface& S1 = *mySurface1; myFace1 = S1.Face(); mySurfaceType1 = S1.GetType(); - BRepAdaptor_Surface& S2 = mySurface2->ChangeSurface(); + BRepAdaptor_Surface& S2 = *mySurface2; myFace2 = S2.Face(); mySurfaceType2 = S2.GetType(); @@ -170,7 +170,7 @@ const TopoDS_Face& TopOpeBRep_Hctxff2d::Face(const Standard_Integer Index) const //function : Surface //purpose : //======================================================================= -Handle(BRepAdaptor_HSurface) TopOpeBRep_Hctxff2d::HSurface(const Standard_Integer Index) const +Handle(BRepAdaptor_Surface) TopOpeBRep_Hctxff2d::HSurface(const Standard_Integer Index) const { if ( Index == 1 ) return mySurface1; else if ( Index == 2 ) return mySurface2; diff --git a/src/TopOpeBRep/TopOpeBRep_Hctxff2d.hxx b/src/TopOpeBRep/TopOpeBRep_Hctxff2d.hxx index e2df6d9d18..8049eaa288 100644 --- a/src/TopOpeBRep/TopOpeBRep_Hctxff2d.hxx +++ b/src/TopOpeBRep/TopOpeBRep_Hctxff2d.hxx @@ -17,23 +17,12 @@ #ifndef _TopOpeBRep_Hctxff2d_HeaderFile #define _TopOpeBRep_Hctxff2d_HeaderFile -#include -#include - -#include +#include #include -#include -#include -#include -#include -class BRepAdaptor_HSurface; -class TopoDS_Face; +#include - -class TopOpeBRep_Hctxff2d; DEFINE_STANDARD_HANDLE(TopOpeBRep_Hctxff2d, Standard_Transient) - class TopOpeBRep_Hctxff2d : public Standard_Transient { @@ -44,7 +33,7 @@ public: Standard_EXPORT void SetFaces (const TopoDS_Face& F1, const TopoDS_Face& F2); - Standard_EXPORT void SetHSurfaces (const Handle(BRepAdaptor_HSurface)& S1, const Handle(BRepAdaptor_HSurface)& S2); + Standard_EXPORT void SetHSurfaces (const Handle(BRepAdaptor_Surface)& S1, const Handle(BRepAdaptor_Surface)& S2); Standard_EXPORT void SetTolerances (const Standard_Real Tol1, const Standard_Real Tol2); @@ -54,7 +43,7 @@ public: Standard_EXPORT const TopoDS_Face& Face (const Standard_Integer I) const; - Standard_EXPORT Handle(BRepAdaptor_HSurface) HSurface (const Standard_Integer I) const; + Standard_EXPORT Handle(BRepAdaptor_Surface) HSurface (const Standard_Integer I) const; Standard_EXPORT Standard_Boolean SurfacesSameOriented() const; @@ -78,11 +67,11 @@ private: Standard_EXPORT void SetHSurfacesPrivate(); TopoDS_Face myFace1; - Handle(BRepAdaptor_HSurface) mySurface1; + Handle(BRepAdaptor_Surface) mySurface1; GeomAbs_SurfaceType mySurfaceType1; Standard_Boolean myf1surf1F_sameoriented; TopoDS_Face myFace2; - Handle(BRepAdaptor_HSurface) mySurface2; + Handle(BRepAdaptor_Surface) mySurface2; GeomAbs_SurfaceType mySurfaceType2; Standard_Boolean myf2surf1F_sameoriented; Standard_Boolean mySurfacesSameOriented; diff --git a/src/TopOpeBRep/TopOpeBRep_LineInter.cxx b/src/TopOpeBRep/TopOpeBRep_LineInter.cxx index df24a2a03e..a6bf3b5285 100644 --- a/src/TopOpeBRep/TopOpeBRep_LineInter.cxx +++ b/src/TopOpeBRep/TopOpeBRep_LineInter.cxx @@ -15,7 +15,7 @@ // commercial license or contractual agreement. -#include +#include #include #include #include @@ -51,7 +51,7 @@ #include #include -#include +#include #ifdef OCCT_DEBUG extern Standard_Boolean TopOpeBRep_GetcontextALWLNBP(Standard_Integer&); @@ -60,8 +60,8 @@ extern Standard_Boolean TopOpeBRep_GettraceCONIC(); //----------------------------------------------------------------------- static void FUN_ALINETOWLINE (const Handle(IntPatch_ALine)& AL, - const Handle(BRepAdaptor_HSurface) surf1, - const Handle(BRepAdaptor_HSurface) surf2, + const Handle(BRepAdaptor_Surface) surf1, + const Handle(BRepAdaptor_Surface) surf2, IntPatch_SequenceOfLine& theLines) { Standard_Integer nbpointsmax = 200; @@ -116,8 +116,8 @@ void TopOpeBRep_LineInter::SetLine(const Handle(IntPatch_Line)& L, // transform an analytic line to a walking line if (myTypeLineCurve == TopOpeBRep_ANALYTIC) { IntPatch_SequenceOfLine aSLin; - FUN_ALINETOWLINE(myILA,new BRepAdaptor_HSurface(S1), - new BRepAdaptor_HSurface(S2), aSLin); + FUN_ALINETOWLINE(myILA,new BRepAdaptor_Surface(S1), + new BRepAdaptor_Surface(S2), aSLin); if(aSLin.Length() > 0) myILW = Handle(IntPatch_WLine)::DownCast(aSLin.Value(1)); @@ -482,14 +482,14 @@ const TopoDS_Shape& TopOpeBRep_LineInter::Arc() const { if (myTypeLineCurve == TopOpeBRep_RESTRICTION) { if(myILR->IsArcOnS1()) { - const Handle(Adaptor2d_HCurve2d)& AHC2D = myILR->ArcOnS1(); - const BRepAdaptor_Curve2d& BC2DP = *((BRepAdaptor_Curve2d*)&(AHC2D->Curve2d())); + const Handle(Adaptor2d_Curve2d)& AHC2D = myILR->ArcOnS1(); + const BRepAdaptor_Curve2d& BC2DP = *((BRepAdaptor_Curve2d*)AHC2D.get()); const TopoDS_Shape& S = BC2DP.Edge(); return S; } else { - const Handle(Adaptor2d_HCurve2d)& AHC2D = myILR->ArcOnS2(); - const BRepAdaptor_Curve2d& BC2DP = *((BRepAdaptor_Curve2d*)&(AHC2D->Curve2d())); + const Handle(Adaptor2d_Curve2d)& AHC2D = myILR->ArcOnS2(); + const BRepAdaptor_Curve2d& BC2DP = *((BRepAdaptor_Curve2d*)AHC2D.get()); const TopoDS_Shape& S = BC2DP.Edge(); return S; } diff --git a/src/TopOpeBRep/TopOpeBRep_PointClassifier.cxx b/src/TopOpeBRep/TopOpeBRep_PointClassifier.cxx index edec333f08..6faae127a7 100644 --- a/src/TopOpeBRep/TopOpeBRep_PointClassifier.cxx +++ b/src/TopOpeBRep/TopOpeBRep_PointClassifier.cxx @@ -15,7 +15,6 @@ // commercial license or contractual agreement. -#include #include #include #include @@ -28,7 +27,7 @@ //======================================================================= TopOpeBRep_PointClassifier::TopOpeBRep_PointClassifier() { - myHSurface = new BRepAdaptor_HSurface(); + myHSurface = new BRepAdaptor_Surface(); Init(); } @@ -52,7 +51,7 @@ void TopOpeBRep_PointClassifier::Load(const TopoDS_Face& F) { Standard_Boolean found = myTopolToolMap.IsBound(F); if ( ! found ) { - myHSurface->ChangeSurface().Initialize(F); + myHSurface->Initialize(F); myTopolTool = new BRepTopAdaptor_TopolTool(myHSurface); myTopolToolMap.Bind(F,myTopolTool); } diff --git a/src/TopOpeBRep/TopOpeBRep_PointClassifier.hxx b/src/TopOpeBRep/TopOpeBRep_PointClassifier.hxx index a4248d49aa..f0f73f76c3 100644 --- a/src/TopOpeBRep/TopOpeBRep_PointClassifier.hxx +++ b/src/TopOpeBRep/TopOpeBRep_PointClassifier.hxx @@ -17,20 +17,14 @@ #ifndef _TopOpeBRep_PointClassifier_HeaderFile #define _TopOpeBRep_PointClassifier_HeaderFile -#include -#include -#include - +#include #include #include -#include + class BRepTopAdaptor_TopolTool; -class BRepAdaptor_HSurface; class TopoDS_Face; class gp_Pnt2d; - - class TopOpeBRep_PointClassifier { public: @@ -63,7 +57,7 @@ private: Handle(BRepTopAdaptor_TopolTool) myTopolTool; - Handle(BRepAdaptor_HSurface) myHSurface; + Handle(BRepAdaptor_Surface) myHSurface; TopOpeBRep_DataMapOfTopolTool myTopolToolMap; TopAbs_State myState; diff --git a/src/TopOpeBRep/TopOpeBRep_VPointInter.cxx b/src/TopOpeBRep/TopOpeBRep_VPointInter.cxx index 5dbe29d4f8..9f7f8ab843 100644 --- a/src/TopOpeBRep/TopOpeBRep_VPointInter.cxx +++ b/src/TopOpeBRep/TopOpeBRep_VPointInter.cxx @@ -15,10 +15,9 @@ // commercial license or contractual agreement. -#include +#include #include #include -#include #include #include #include @@ -62,8 +61,8 @@ void TopOpeBRep_VPointInter::SetPoint(const IntPatch_Point& P) //======================================================================= const TopoDS_Shape& TopOpeBRep_VPointInter::ArcOnS1() const { - const Handle(Adaptor2d_HCurve2d)& HAHC2 = myPPOI->ArcOnS1(); - const BRepAdaptor_Curve2d& BRAC2P = *((BRepAdaptor_Curve2d*)&(HAHC2->Curve2d())); + const Handle(Adaptor2d_Curve2d)& HAHC2 = myPPOI->ArcOnS1(); + const BRepAdaptor_Curve2d& BRAC2P = *((BRepAdaptor_Curve2d*)HAHC2.get()); return BRAC2P.Edge(); } @@ -73,8 +72,8 @@ const TopoDS_Shape& TopOpeBRep_VPointInter::ArcOnS1() const //======================================================================= const TopoDS_Shape& TopOpeBRep_VPointInter::ArcOnS2() const { - const Handle(Adaptor2d_HCurve2d)& HAHC2 = myPPOI->ArcOnS2(); - const BRepAdaptor_Curve2d& BRAC2P = *((BRepAdaptor_Curve2d*)&(HAHC2->Curve2d())); + const Handle(Adaptor2d_Curve2d)& HAHC2 = myPPOI->ArcOnS2(); + const BRepAdaptor_Curve2d& BRAC2P = *((BRepAdaptor_Curve2d*)HAHC2.get()); return BRAC2P.Edge(); } diff --git a/src/TopOpeBRepBuild/TopOpeBRepBuild_Tools.cxx b/src/TopOpeBRepBuild/TopOpeBRepBuild_Tools.cxx index ecd2bf1bdd..b629b1a0de 100644 --- a/src/TopOpeBRepBuild/TopOpeBRepBuild_Tools.cxx +++ b/src/TopOpeBRepBuild/TopOpeBRepBuild_Tools.cxx @@ -15,11 +15,10 @@ // commercial license or contractual agreement. -#include +#include #include #include #include -#include #include #include #include @@ -36,7 +35,6 @@ #include #include #include -#include #include #include #include diff --git a/src/TopOpeBRepBuild/TopOpeBRepBuild_Tools_1.cxx b/src/TopOpeBRepBuild/TopOpeBRepBuild_Tools_1.cxx index ed94c358fd..bf4fadaa5d 100644 --- a/src/TopOpeBRepBuild/TopOpeBRepBuild_Tools_1.cxx +++ b/src/TopOpeBRepBuild/TopOpeBRepBuild_Tools_1.cxx @@ -15,8 +15,7 @@ #include -#include -#include +#include #include #include #include @@ -30,15 +29,14 @@ #include #include #include -#include +#include #include #include #include #include #include #include -#include -#include +#include #include #include #include @@ -133,7 +131,7 @@ void CorrectEdgeTolerance (const TopoDS_Edge& myShape, // // 1. Minimum of conditions to Perform Handle (BRep_CurveRepresentation) myCref; - Handle (Adaptor3d_HCurve) myHCurve; + Handle (Adaptor3d_Curve) myHCurve; myCref.Nullify(); @@ -199,16 +197,16 @@ void CorrectEdgeTolerance (const TopoDS_Edge& myShape, Handle(Geom_Curve) C3d = Handle(Geom_Curve)::DownCast (myCref->Curve3D()->Transformed (myCref->Location().Transformation())); GeomAdaptor_Curve GAC3d(C3d,First,Last); - myHCurve = new GeomAdaptor_HCurve(GAC3d); + myHCurve = new GeomAdaptor_Curve(GAC3d); } else { // curve on surface Handle(Geom_Surface) Sref = myCref->Surface(); Sref = Handle(Geom_Surface)::DownCast(Sref->Transformed(myCref->Location().Transformation())); const Handle(Geom2d_Curve)& PCref = myCref->PCurve(); - Handle(GeomAdaptor_HSurface) GAHSref = new GeomAdaptor_HSurface(Sref); - Handle(Geom2dAdaptor_HCurve) GHPCref = new Geom2dAdaptor_HCurve(PCref, First, Last); + Handle(GeomAdaptor_Surface) GAHSref = new GeomAdaptor_Surface(Sref); + Handle(Geom2dAdaptor_Curve) GHPCref = new Geom2dAdaptor_Curve(PCref, First, Last); Adaptor3d_CurveOnSurface ACSref(GHPCref,GAHSref); - myHCurve = new Adaptor3d_HCurveOnSurface(ACSref); + myHCurve = new Adaptor3d_CurveOnSurface(ACSref); } } } @@ -248,10 +246,10 @@ void CorrectEdgeTolerance (const TopoDS_Edge& myShape, Handle(Geom_Surface) Sb = cr->Surface(); Sb = Handle(Geom_Surface)::DownCast (Su->Transformed(L.Transformation())); Handle(Geom2d_Curve) PC = cr->PCurve(); - Handle(GeomAdaptor_HSurface) GAHS = new GeomAdaptor_HSurface(Sb); - Handle(Geom2dAdaptor_HCurve) GHPC = new Geom2dAdaptor_HCurve(PC,f,l); + Handle(GeomAdaptor_Surface) GAHS = new GeomAdaptor_Surface(Sb); + Handle(Geom2dAdaptor_Curve) GHPC = new Geom2dAdaptor_Curve(PC,f,l); Adaptor3d_CurveOnSurface ACS(GHPC,GAHS); - ok = Validate(myHCurve->Curve(), ACS, Tol, SameParameter, aNewTol); + ok = Validate (*myHCurve, ACS, Tol, SameParameter, aNewTol); if (ok) { // printf("(Edge,1) Tolerance=%15.10lg\n", aNewTol); if (aNewTolIsCurveOnClosedSurface()) { // checkclosed = Standard_True; - GHPC->ChangeCurve2d().Load(cr->PCurve2(),f,l); // same bounds + GHPC->Load(cr->PCurve2(),f,l); // same bounds ACS.Load(GHPC, GAHS); // sans doute inutile - ok = Validate(myHCurve->Curve(),ACS,Tol,SameParameter, aNewTol); + ok = Validate (*myHCurve, ACS, Tol, SameParameter, aNewTol); if (ok) { if (aNewTolUpdateTolerance(aNewTol); @@ -288,24 +286,24 @@ void CorrectEdgeTolerance (const TopoDS_Edge& myShape, { // on fait la projection a la volee, comme BRep_Tool P = Handle(Geom_Plane)::DownCast(P->Transformed(L.Transformation())); //on projette Cref sur ce plan - Handle(GeomAdaptor_HSurface) GAHS = new GeomAdaptor_HSurface(P); + Handle(GeomAdaptor_Surface) GAHS = new GeomAdaptor_Surface(P); - // Dub - Normalement myHCurve est une GeomAdaptor_HCurve - GeomAdaptor_Curve& Gac = Handle(GeomAdaptor_HCurve)::DownCast(myHCurve)->ChangeCurve(); - Handle(Geom_Curve) C3d = Gac.Curve(); + // Dub - Normalement myHCurve est une GeomAdaptor_Curve + Handle(GeomAdaptor_Curve) Gac = Handle(GeomAdaptor_Curve)::DownCast(myHCurve); + Handle(Geom_Curve) C3d = Gac->Curve(); Handle(Geom_Curve) ProjOnPlane = GeomProjLib::ProjectOnPlane (new Geom_TrimmedCurve(C3d,First,Last), P, P->Position().Direction(), Standard_True); - Handle(GeomAdaptor_HCurve) aHCurve = new GeomAdaptor_HCurve(ProjOnPlane); + Handle(GeomAdaptor_Curve) aHCurve = new GeomAdaptor_Curve(ProjOnPlane); ProjLib_ProjectedCurve proj(GAHS,aHCurve); Handle(Geom2d_Curve) PC = Geom2dAdaptor::MakeCurve(proj); - Handle(Geom2dAdaptor_HCurve) GHPC = - new Geom2dAdaptor_HCurve(PC, myHCurve->FirstParameter(), myHCurve->LastParameter()); + Handle(Geom2dAdaptor_Curve) GHPC = + new Geom2dAdaptor_Curve(PC, myHCurve->FirstParameter(), myHCurve->LastParameter()); Adaptor3d_CurveOnSurface ACS(GHPC,GAHS); - ok = Validate(myHCurve->Curve(),ACS, + ok = Validate (*myHCurve, ACS, Tol,Standard_True, aNewTol); // voir dub... if (ok) { diff --git a/src/TopOpeBRepDS/TopOpeBRepDS_funk.cxx b/src/TopOpeBRepDS/TopOpeBRepDS_funk.cxx index 65a4648d91..cc141dc451 100644 --- a/src/TopOpeBRepDS/TopOpeBRepDS_funk.cxx +++ b/src/TopOpeBRepDS/TopOpeBRepDS_funk.cxx @@ -52,10 +52,7 @@ #include #include #include -#include -#include #include -#include Standard_EXPORT Handle(Geom2d_Curve) MakePCurve(const ProjLib_ProjectedCurve& PC); @@ -115,9 +112,9 @@ Standard_EXPORT void FUN_UNKFstasta(const TopoDS_Face& FF,const TopoDS_Face& FS, if (CEE.IsNull()) { Standard_Boolean compminmaxUV = Standard_False; BRepAdaptor_Surface BAS(FS,compminmaxUV); - Handle(BRepAdaptor_HSurface) BAHS = new BRepAdaptor_HSurface(BAS); + Handle(BRepAdaptor_Surface) BAHS = new BRepAdaptor_Surface(BAS); BRepAdaptor_Curve AC(EE,FS); - Handle(BRepAdaptor_HCurve) AHC = new BRepAdaptor_HCurve(AC); + Handle(BRepAdaptor_Curve) AHC = new BRepAdaptor_Curve(AC); Standard_Real tolin; FTOL_FaceTolerances3d(FF,FS,tolin); ProjLib_ProjectedCurve projcurv(BAHS,AHC,tolin); CEEFFx = MakePCurve(projcurv); diff --git a/src/TopOpeBRepTool/TopOpeBRepTool_2d.cxx b/src/TopOpeBRepTool/TopOpeBRepTool_2d.cxx index eadc0d5195..da51e0ea60 100644 --- a/src/TopOpeBRepTool/TopOpeBRepTool_2d.cxx +++ b/src/TopOpeBRepTool/TopOpeBRepTool_2d.cxx @@ -24,10 +24,7 @@ #include #include #include -#include -#include #include -#include #include #include #include @@ -202,9 +199,9 @@ static Handle(Geom2d_Curve) FC2D_make2d(const TopoDS_Edge& E,const TopoDS_Face& if (FE.IsNull()) return C2D; Standard_Boolean compminmaxUV = Standard_False; BRepAdaptor_Surface BAS(F,compminmaxUV); - Handle(BRepAdaptor_HSurface) BAHS = new BRepAdaptor_HSurface(BAS); + Handle(BRepAdaptor_Surface) BAHS = new BRepAdaptor_Surface(BAS); BRepAdaptor_Curve AC(E,FE); - Handle(BRepAdaptor_HCurve) AHC = new BRepAdaptor_HCurve(AC); + Handle(BRepAdaptor_Curve) AHC = new BRepAdaptor_Curve(AC); Standard_Real tolin; FTOL_FaceTolerances3d(F,FE,tolin); ProjLib_ProjectedCurve projcurv(BAHS,AHC,tolin); C2D = MakePCurve(projcurv); @@ -340,9 +337,9 @@ static Handle(Geom2d_Curve) FC2D_make2d(const TopoDS_Edge& E,const TopoDS_Face& if (FE.IsNull()) return C2D; Standard_Boolean compminmaxUV = Standard_False; BRepAdaptor_Surface BAS(F,compminmaxUV); - Handle(BRepAdaptor_HSurface) BAHS = new BRepAdaptor_HSurface(BAS); + Handle(BRepAdaptor_Surface) BAHS = new BRepAdaptor_Surface(BAS); BRepAdaptor_Curve AC(E,FE); - Handle(BRepAdaptor_HCurve) AHC = new BRepAdaptor_HCurve(AC); + Handle(BRepAdaptor_Curve) AHC = new BRepAdaptor_Curve(AC); Standard_Real tolin; FTOL_FaceTolerances3d(F,FE,tolin); ProjLib_ProjectedCurve projcurv(BAHS,AHC,tolin); C2D = MakePCurve(projcurv); diff --git a/src/TopOpeBRepTool/TopOpeBRepTool_CurveTool.cxx b/src/TopOpeBRepTool/TopOpeBRepTool_CurveTool.cxx index d79a51d4d7..7ee2221ded 100644 --- a/src/TopOpeBRepTool/TopOpeBRepTool_CurveTool.cxx +++ b/src/TopOpeBRepTool/TopOpeBRepTool_CurveTool.cxx @@ -16,7 +16,6 @@ #include -#include #include #include #include @@ -38,7 +37,6 @@ #include #include #include -#include #include #include #include @@ -897,8 +895,8 @@ Handle(Geom2d_Curve) TopOpeBRepTool_CurveTool::MakePCurveOnFace GeomAdaptor_Curve GAC; if (trim) GAC.Load(C3D,first,last); else GAC.Load(C3D); - Handle(BRepAdaptor_HSurface) BAHS = new BRepAdaptor_HSurface(BAS); - Handle(GeomAdaptor_HCurve) BAHC = new GeomAdaptor_HCurve(GAC); + Handle(BRepAdaptor_Surface) BAHS = new BRepAdaptor_Surface(BAS); + Handle(GeomAdaptor_Curve) BAHC = new GeomAdaptor_Curve(GAC); ProjLib_ProjectedCurve projcurv(BAHS,BAHC); Handle(Geom2d_Curve) C2D = ::MakePCurve(projcurv); TolReached2d = projcurv.GetTolerance(); diff --git a/src/VrmlConverter/VrmlConverter_WFDeflectionRestrictedFace.cxx b/src/VrmlConverter/VrmlConverter_WFDeflectionRestrictedFace.cxx index 2acb98818a..4c67a6c4a2 100644 --- a/src/VrmlConverter/VrmlConverter_WFDeflectionRestrictedFace.cxx +++ b/src/VrmlConverter/VrmlConverter_WFDeflectionRestrictedFace.cxx @@ -18,7 +18,7 @@ #include #include #include -#include +#include #include #include #include @@ -36,7 +36,7 @@ // function: GetDeflection // purpose: //================================================================== -static Standard_Real GetDeflection(const Handle(BRepAdaptor_HSurface)& aFace, +static Standard_Real GetDeflection(const Handle(BRepAdaptor_Surface)& aFace, const Handle (VrmlConverter_Drawer)& aDrawer) { Standard_Real theRequestedDeflection; @@ -76,7 +76,7 @@ static Standard_Real GetDeflection(const Handle(BRepAdaptor_HSurface)& aFace, //========================================================================= void VrmlConverter_WFDeflectionRestrictedFace::Add (Standard_OStream& anOStream, - const Handle(BRepAdaptor_HSurface)& aFace, + const Handle(BRepAdaptor_Surface)& aFace, const Standard_Boolean DrawUIso, const Standard_Boolean DrawVIso, const Standard_Real Deflection, @@ -312,7 +312,7 @@ void VrmlConverter_WFDeflectionRestrictedFace::Add //========================================================================= void VrmlConverter_WFDeflectionRestrictedFace::Add (Standard_OStream& anOStream, - const Handle(BRepAdaptor_HSurface)& aFace, + const Handle(BRepAdaptor_Surface)& aFace, const Handle (VrmlConverter_Drawer)& aDrawer){ Standard_Real Deflection = GetDeflection(aFace, aDrawer); @@ -339,7 +339,7 @@ void VrmlConverter_WFDeflectionRestrictedFace::Add //========================================================================= void VrmlConverter_WFDeflectionRestrictedFace::AddUIso (Standard_OStream& anOStream, - const Handle(BRepAdaptor_HSurface)& aFace, + const Handle(BRepAdaptor_Surface)& aFace, const Handle (VrmlConverter_Drawer)& aDrawer) { Standard_Real Deflection = GetDeflection(aFace, aDrawer); @@ -364,7 +364,7 @@ void VrmlConverter_WFDeflectionRestrictedFace::AddUIso //========================================================================= void VrmlConverter_WFDeflectionRestrictedFace::AddVIso (Standard_OStream& anOStream, - const Handle(BRepAdaptor_HSurface)& aFace, + const Handle(BRepAdaptor_Surface)& aFace, const Handle (VrmlConverter_Drawer)& aDrawer) { Standard_Real Deflection = GetDeflection(aFace, aDrawer); diff --git a/src/VrmlConverter/VrmlConverter_WFDeflectionRestrictedFace.hxx b/src/VrmlConverter/VrmlConverter_WFDeflectionRestrictedFace.hxx index 7fe121994b..48ed57a80a 100644 --- a/src/VrmlConverter/VrmlConverter_WFDeflectionRestrictedFace.hxx +++ b/src/VrmlConverter/VrmlConverter_WFDeflectionRestrictedFace.hxx @@ -17,16 +17,10 @@ #ifndef _VrmlConverter_WFDeflectionRestrictedFace_HeaderFile #define _VrmlConverter_WFDeflectionRestrictedFace_HeaderFile -#include -#include -#include - +#include #include -#include -#include -class BRepAdaptor_HSurface; -class VrmlConverter_Drawer; +class VrmlConverter_Drawer; //! WFDeflectionRestrictedFace - computes the //! wireframe presentation of faces with @@ -45,13 +39,13 @@ public: DEFINE_STANDARD_ALLOC - Standard_EXPORT static void Add (Standard_OStream& anOStream, const Handle(BRepAdaptor_HSurface)& aFace, const Handle(VrmlConverter_Drawer)& aDrawer); + Standard_EXPORT static void Add (Standard_OStream& anOStream, const Handle(BRepAdaptor_Surface)& aFace, const Handle(VrmlConverter_Drawer)& aDrawer); - Standard_EXPORT static void AddUIso (Standard_OStream& anOStream, const Handle(BRepAdaptor_HSurface)& aFace, const Handle(VrmlConverter_Drawer)& aDrawer); + Standard_EXPORT static void AddUIso (Standard_OStream& anOStream, const Handle(BRepAdaptor_Surface)& aFace, const Handle(VrmlConverter_Drawer)& aDrawer); - Standard_EXPORT static void AddVIso (Standard_OStream& anOStream, const Handle(BRepAdaptor_HSurface)& aFace, const Handle(VrmlConverter_Drawer)& aDrawer); + Standard_EXPORT static void AddVIso (Standard_OStream& anOStream, const Handle(BRepAdaptor_Surface)& aFace, const Handle(VrmlConverter_Drawer)& aDrawer); - Standard_EXPORT static void Add (Standard_OStream& anOStream, const Handle(BRepAdaptor_HSurface)& aFace, const Standard_Boolean DrawUIso, const Standard_Boolean DrawVIso, const Standard_Real Deflection, const Standard_Integer NBUiso, const Standard_Integer NBViso, const Handle(VrmlConverter_Drawer)& aDrawer); + Standard_EXPORT static void Add (Standard_OStream& anOStream, const Handle(BRepAdaptor_Surface)& aFace, const Standard_Boolean DrawUIso, const Standard_Boolean DrawVIso, const Standard_Real Deflection, const Standard_Integer NBUiso, const Standard_Integer NBViso, const Handle(VrmlConverter_Drawer)& aDrawer); }; diff --git a/src/VrmlConverter/VrmlConverter_WFDeflectionShape.cxx b/src/VrmlConverter/VrmlConverter_WFDeflectionShape.cxx index 9694e61cd6..8ce2254c1f 100644 --- a/src/VrmlConverter/VrmlConverter_WFDeflectionShape.cxx +++ b/src/VrmlConverter/VrmlConverter_WFDeflectionShape.cxx @@ -15,7 +15,7 @@ #include #include #include -#include +#include #include #include #include @@ -90,7 +90,7 @@ void VrmlConverter_WFDeflectionShape::Add( Standard_OStream& a } if (isoU || isoV) { S.Initialize(Tool.GetFace()); - Handle(BRepAdaptor_HSurface) HS = new BRepAdaptor_HSurface(S); + Handle(BRepAdaptor_Surface) HS = new BRepAdaptor_Surface(S); VrmlConverter_WFDeflectionRestrictedFace::Add(anOStream, HS, isoU, isoV, theRequestedDeflection, @@ -113,7 +113,7 @@ void VrmlConverter_WFDeflectionShape::Add( Standard_OStream& a if (Tool.IsPlanarFace()) isoU = aDrawer->IsoOnPlane(); if (isoU) { S.Initialize(Tool.GetFace()); - Handle(BRepAdaptor_HSurface) HS = new BRepAdaptor_HSurface(S); + Handle(BRepAdaptor_Surface) HS = new BRepAdaptor_Surface(S); VrmlConverter_WFDeflectionRestrictedFace::Add(anOStream, HS, isoU, Standard_False, theRequestedDeflection, @@ -134,7 +134,7 @@ void VrmlConverter_WFDeflectionShape::Add( Standard_OStream& a if (Tool.IsPlanarFace()) isoV = aDrawer->IsoOnPlane(); if (isoV) { S.Initialize(Tool.GetFace()); - Handle(BRepAdaptor_HSurface) HS = new BRepAdaptor_HSurface(S); + Handle(BRepAdaptor_Surface) HS = new BRepAdaptor_Surface(S); VrmlConverter_WFDeflectionRestrictedFace::Add(anOStream, HS, Standard_False, isoV, theRequestedDeflection, diff --git a/src/VrmlConverter/VrmlConverter_WFRestrictedFace.cxx b/src/VrmlConverter/VrmlConverter_WFRestrictedFace.cxx index 83c53302ec..3a897a4a22 100644 --- a/src/VrmlConverter/VrmlConverter_WFRestrictedFace.cxx +++ b/src/VrmlConverter/VrmlConverter_WFRestrictedFace.cxx @@ -15,7 +15,7 @@ #include #include #include -#include +#include #include #include #include @@ -33,7 +33,7 @@ //========================================================================= void VrmlConverter_WFRestrictedFace::Add (Standard_OStream& anOStream, - const Handle(BRepAdaptor_HSurface)& aFace, + const Handle(BRepAdaptor_Surface)& aFace, const Standard_Boolean DrawUIso, const Standard_Boolean DrawVIso, const Standard_Integer NBUiso, @@ -288,7 +288,7 @@ void VrmlConverter_WFRestrictedFace::Add //========================================================================= void VrmlConverter_WFRestrictedFace::Add (Standard_OStream& anOStream, - const Handle(BRepAdaptor_HSurface)& aFace, + const Handle(BRepAdaptor_Surface)& aFace, const Handle (VrmlConverter_Drawer)& aDrawer){ Standard_Integer finu = aDrawer->UIsoAspect()->Number(); @@ -312,7 +312,7 @@ void VrmlConverter_WFRestrictedFace::Add //========================================================================= void VrmlConverter_WFRestrictedFace::AddUIso (Standard_OStream& anOStream, - const Handle(BRepAdaptor_HSurface)& aFace, + const Handle(BRepAdaptor_Surface)& aFace, const Handle (VrmlConverter_Drawer)& aDrawer) { Standard_Integer finu = aDrawer->UIsoAspect()->Number(); @@ -335,7 +335,7 @@ void VrmlConverter_WFRestrictedFace::AddUIso //========================================================================= void VrmlConverter_WFRestrictedFace::AddVIso (Standard_OStream& anOStream, - const Handle(BRepAdaptor_HSurface)& aFace, + const Handle(BRepAdaptor_Surface)& aFace, const Handle (VrmlConverter_Drawer)& aDrawer) { Standard_Integer finu = aDrawer->UIsoAspect()->Number(); diff --git a/src/VrmlConverter/VrmlConverter_WFRestrictedFace.hxx b/src/VrmlConverter/VrmlConverter_WFRestrictedFace.hxx index 30e93f4f07..3d13ee169d 100644 --- a/src/VrmlConverter/VrmlConverter_WFRestrictedFace.hxx +++ b/src/VrmlConverter/VrmlConverter_WFRestrictedFace.hxx @@ -17,16 +17,10 @@ #ifndef _VrmlConverter_WFRestrictedFace_HeaderFile #define _VrmlConverter_WFRestrictedFace_HeaderFile -#include -#include -#include - +#include #include -#include -#include -class BRepAdaptor_HSurface; -class VrmlConverter_Drawer; +class VrmlConverter_Drawer; //! WFRestrictedFace - computes the wireframe //! presentation of faces with restrictions by @@ -44,13 +38,13 @@ public: DEFINE_STANDARD_ALLOC - Standard_EXPORT static void Add (Standard_OStream& anOStream, const Handle(BRepAdaptor_HSurface)& aFace, const Handle(VrmlConverter_Drawer)& aDrawer); + Standard_EXPORT static void Add (Standard_OStream& anOStream, const Handle(BRepAdaptor_Surface)& aFace, const Handle(VrmlConverter_Drawer)& aDrawer); - Standard_EXPORT static void AddUIso (Standard_OStream& anOStream, const Handle(BRepAdaptor_HSurface)& aFace, const Handle(VrmlConverter_Drawer)& aDrawer); + Standard_EXPORT static void AddUIso (Standard_OStream& anOStream, const Handle(BRepAdaptor_Surface)& aFace, const Handle(VrmlConverter_Drawer)& aDrawer); - Standard_EXPORT static void AddVIso (Standard_OStream& anOStream, const Handle(BRepAdaptor_HSurface)& aFace, const Handle(VrmlConverter_Drawer)& aDrawer); + Standard_EXPORT static void AddVIso (Standard_OStream& anOStream, const Handle(BRepAdaptor_Surface)& aFace, const Handle(VrmlConverter_Drawer)& aDrawer); - Standard_EXPORT static void Add (Standard_OStream& anOStream, const Handle(BRepAdaptor_HSurface)& aFace, const Standard_Boolean DrawUIso, const Standard_Boolean DrawVIso, const Standard_Integer NBUiso, const Standard_Integer NBViso, const Handle(VrmlConverter_Drawer)& aDrawer); + Standard_EXPORT static void Add (Standard_OStream& anOStream, const Handle(BRepAdaptor_Surface)& aFace, const Standard_Boolean DrawUIso, const Standard_Boolean DrawVIso, const Standard_Integer NBUiso, const Standard_Integer NBViso, const Handle(VrmlConverter_Drawer)& aDrawer); diff --git a/src/VrmlConverter/VrmlConverter_WFShape.cxx b/src/VrmlConverter/VrmlConverter_WFShape.cxx index a38cef3bcd..73cbc833d3 100644 --- a/src/VrmlConverter/VrmlConverter_WFShape.cxx +++ b/src/VrmlConverter/VrmlConverter_WFShape.cxx @@ -15,7 +15,7 @@ #include #include #include -#include +#include #include #include #include @@ -59,7 +59,7 @@ void VrmlConverter_WFShape::Add(Standard_OStream& anOStream, } if (isoU || isoV) { S.Initialize(Tool.GetFace()); - Handle(BRepAdaptor_HSurface) HS = new BRepAdaptor_HSurface(S); + Handle(BRepAdaptor_Surface) HS = new BRepAdaptor_Surface(S); VrmlConverter_WFRestrictedFace::Add(anOStream, HS, isoU, isoV, aDrawer->UIsoAspect()->Number(), @@ -81,7 +81,7 @@ void VrmlConverter_WFShape::Add(Standard_OStream& anOStream, if (Tool.IsPlanarFace()) isoU = aDrawer->IsoOnPlane(); if (isoU) { S.Initialize(Tool.GetFace()); - Handle(BRepAdaptor_HSurface) HS = new BRepAdaptor_HSurface(S); + Handle(BRepAdaptor_Surface) HS = new BRepAdaptor_Surface(S); VrmlConverter_WFRestrictedFace::Add(anOStream, HS, isoU, Standard_False, aDrawer->UIsoAspect()->Number(), @@ -101,7 +101,7 @@ void VrmlConverter_WFShape::Add(Standard_OStream& anOStream, if (Tool.IsPlanarFace()) isoV = aDrawer->IsoOnPlane(); if (isoV) { S.Initialize(Tool.GetFace()); - Handle(BRepAdaptor_HSurface) HS = new BRepAdaptor_HSurface(S); + Handle(BRepAdaptor_Surface) HS = new BRepAdaptor_Surface(S); VrmlConverter_WFRestrictedFace::Add(anOStream, HS, Standard_False, isoV, 0,