]> OCCT Git - occt.git/commitdiff
Coding - Removing simple gxx files (#827)
authorPasukhin Dmitry <dpasukhi@opencascade.com>
Thu, 13 Nov 2025 19:28:14 +0000 (19:28 +0000)
committerGitHub <noreply@github.com>
Thu, 13 Nov 2025 19:28:14 +0000 (19:28 +0000)
- Converted generic template files to direct implementations for three packages (Extrema, MAT, TopBas/HLRAlgo)
- Removed preprocessor macro-based includes and replaced with concrete type definitions
- Updated CMake FILES lists to remove deprecated `.gxx` and `.lxx` files

101 files changed:
src/DataExchange/TKDEIGES/IGESBasic/IGESBasic_HArray1OfHArray1OfIGESEntity_0.cxx
src/DataExchange/TKDEIGES/IGESBasic/IGESBasic_HArray1OfHArray1OfInteger_0.cxx
src/DataExchange/TKDEIGES/IGESBasic/IGESBasic_HArray1OfHArray1OfReal_0.cxx
src/DataExchange/TKDEIGES/IGESBasic/IGESBasic_HArray1OfHArray1OfXYZ_0.cxx
src/DataExchange/TKDEIGES/IGESBasic/IGESBasic_HArray1OfHArray1OfXY_0.cxx
src/DataExchange/TKDEIGES/IGESData/IGESData_GlobalNodeOfSpecificLib_0.cxx
src/DataExchange/TKDEIGES/IGESData/IGESData_GlobalNodeOfWriterLib_0.cxx
src/DataExchange/TKDEIGES/IGESData/IGESData_NodeOfSpecificLib_0.cxx
src/DataExchange/TKDEIGES/IGESData/IGESData_NodeOfWriterLib_0.cxx
src/DataExchange/TKDEIGES/IGESDefs/IGESDefs_HArray1OfHArray1OfTextDisplayTemplate_0.cxx
src/DataExchange/TKDEIGES/IGESSelect/IGESSelect_FileModifier_0.cxx
src/DataExchange/TKDEIGES/IGESSelect/IGESSelect_ModelModifier_0.cxx
src/DataExchange/TKDESTEP/StepData/StepData_GlobalNodeOfWriterLib_0.cxx
src/DataExchange/TKDESTEP/StepData/StepData_NodeOfWriterLib_0.cxx
src/DataExchange/TKDESTEP/StepSelect/StepSelect_FileModifier_0.cxx
src/DataExchange/TKDESTEP/StepSelect/StepSelect_ModelModifier_0.cxx
src/DataExchange/TKXSBase/IFSelect/FILES.cmake
src/DataExchange/TKXSBase/IFSelect/IFSelect_FileModifier.gxx [deleted file]
src/DataExchange/TKXSBase/IFSelect/IFSelect_ModelModifier.gxx [deleted file]
src/DataExchange/TKXSBase/Interface/FILES.cmake
src/DataExchange/TKXSBase/Interface/Interface_GlobalNodeOfGeneralLib_0.cxx
src/DataExchange/TKXSBase/Interface/Interface_GlobalNodeOfReaderLib_0.cxx
src/DataExchange/TKXSBase/Interface/Interface_JaggedArray.gxx [deleted file]
src/DataExchange/TKXSBase/Interface/Interface_NodeOfGeneralLib_0.cxx
src/DataExchange/TKXSBase/Interface/Interface_NodeOfReaderLib_0.cxx
src/DataExchange/TKXSBase/LibCtl/FILES.cmake
src/DataExchange/TKXSBase/LibCtl/LibCtl_GlobalNode.gxx [deleted file]
src/DataExchange/TKXSBase/LibCtl/LibCtl_Node.gxx [deleted file]
src/ModelingAlgorithms/TKGeomAlgo/Geom2dInt/Geom2dInt_MyImpParToolOfTheIntersectorOfTheIntConicCurveOfGInter_0.cxx
src/ModelingAlgorithms/TKGeomAlgo/Geom2dInt/Geom2dInt_TheProjPCurOfGInter_0.cxx
src/ModelingAlgorithms/TKGeomAlgo/GeomInt/GeomInt_BSpGradient_BFGSOfMyBSplGradientOfTheComputeLineOfWLApprox_0.cxx
src/ModelingAlgorithms/TKGeomAlgo/GeomInt/GeomInt_Gradient_BFGSOfMyGradientOfTheComputeLineBezierOfWLApprox_0.cxx
src/ModelingAlgorithms/TKGeomAlgo/GeomInt/GeomInt_Gradient_BFGSOfMyGradientbisOfTheComputeLineOfWLApprox_0.cxx
src/ModelingAlgorithms/TKGeomAlgo/IntCurve/FILES.cmake
src/ModelingAlgorithms/TKGeomAlgo/IntCurve/IntCurve_MyImpParToolOfIntImpConicParConic_0.cxx
src/ModelingAlgorithms/TKGeomAlgo/IntCurve/IntCurve_ProjPCurGen.gxx [deleted file]
src/ModelingAlgorithms/TKGeomAlgo/IntCurveSurface/FILES.cmake
src/ModelingAlgorithms/TKGeomAlgo/IntCurveSurface/IntCurveSurface_PolygonTool.gxx [deleted file]
src/ModelingAlgorithms/TKGeomAlgo/IntCurveSurface/IntCurveSurface_PolyhedronTool.gxx [deleted file]
src/ModelingAlgorithms/TKGeomAlgo/IntCurveSurface/IntCurveSurface_QuadricCurveFunc.gxx [deleted file]
src/ModelingAlgorithms/TKGeomAlgo/IntCurveSurface/IntCurveSurface_ThePolygonToolOfHInter_0.cxx
src/ModelingAlgorithms/TKGeomAlgo/IntCurveSurface/IntCurveSurface_ThePolyhedronToolOfHInter_0.cxx
src/ModelingAlgorithms/TKGeomAlgo/IntCurveSurface/IntCurveSurface_TheQuadCurvFuncOfTheQuadCurvExactHInter_0.cxx
src/ModelingAlgorithms/TKGeomAlgo/IntImpParGen/FILES.cmake
src/ModelingAlgorithms/TKGeomAlgo/IntImpParGen/IntImpParGen_ImpParTool.gxx [deleted file]
src/ModelingAlgorithms/TKGeomAlgo/IntPatch/IntPatch_TheIWLineOfTheIWalking.hxx
src/ModelingAlgorithms/TKGeomAlgo/IntPatch/IntPatch_TheIWLineOfTheIWalking_0.cxx
src/ModelingAlgorithms/TKGeomAlgo/IntPatch/IntPatch_ThePathPointOfTheSOnBounds.hxx
src/ModelingAlgorithms/TKGeomAlgo/IntPatch/IntPatch_ThePathPointOfTheSOnBounds_0.cxx
src/ModelingAlgorithms/TKGeomAlgo/IntPatch/IntPatch_TheSegmentOfTheSOnBounds.hxx
src/ModelingAlgorithms/TKGeomAlgo/IntPatch/IntPatch_TheSegmentOfTheSOnBounds_0.cxx
src/ModelingAlgorithms/TKGeomAlgo/IntStart/FILES.cmake
src/ModelingAlgorithms/TKGeomAlgo/IntStart/IntStart_PathPoint.gxx [deleted file]
src/ModelingAlgorithms/TKGeomAlgo/IntStart/IntStart_PathPoint.lxx [deleted file]
src/ModelingAlgorithms/TKGeomAlgo/IntStart/IntStart_Segment.gxx [deleted file]
src/ModelingAlgorithms/TKGeomAlgo/IntStart/IntStart_Segment.lxx [deleted file]
src/ModelingAlgorithms/TKGeomAlgo/IntWalk/FILES.cmake
src/ModelingAlgorithms/TKGeomAlgo/IntWalk/IntWalk_IWLine.gxx [deleted file]
src/ModelingAlgorithms/TKGeomAlgo/IntWalk/IntWalk_IWLine.lxx [deleted file]
src/ModelingAlgorithms/TKHLR/Contap/Contap_TheIWLineOfTheIWalking.hxx
src/ModelingAlgorithms/TKHLR/Contap/Contap_TheIWLineOfTheIWalking_0.cxx
src/ModelingAlgorithms/TKHLR/Contap/Contap_ThePathPointOfTheSearch.hxx
src/ModelingAlgorithms/TKHLR/Contap/Contap_ThePathPointOfTheSearch_0.cxx
src/ModelingAlgorithms/TKHLR/Contap/Contap_TheSegmentOfTheSearch.hxx
src/ModelingAlgorithms/TKHLR/Contap/Contap_TheSegmentOfTheSearch_0.cxx
src/ModelingAlgorithms/TKHLR/HLRAlgo/HLRAlgo_Interference.hxx
src/ModelingAlgorithms/TKHLR/HLRAlgo/HLRAlgo_Interference_0.cxx
src/ModelingAlgorithms/TKHLR/HLRBRep/HLRBRep_MyImpParToolOfTheIntersectorOfTheIntConicCurveOfCInter_0.cxx
src/ModelingAlgorithms/TKHLR/HLRBRep/HLRBRep_ThePolygonToolOfInterCSurf_0.cxx
src/ModelingAlgorithms/TKHLR/HLRBRep/HLRBRep_ThePolyhedronToolOfInterCSurf_0.cxx
src/ModelingAlgorithms/TKHLR/HLRBRep/HLRBRep_TheProjPCurOfCInter_0.cxx
src/ModelingAlgorithms/TKHLR/HLRBRep/HLRBRep_TheQuadCurvFuncOfTheQuadCurvExactInterCSurf_0.cxx
src/ModelingAlgorithms/TKHLR/TopBas/FILES.cmake
src/ModelingAlgorithms/TKHLR/TopBas/TopBas_Interference.gxx [deleted file]
src/ModelingAlgorithms/TKHLR/TopBas/TopBas_Interference.lxx [deleted file]
src/ModelingAlgorithms/TKHLR/TopBas/TopBas_TestInterference.hxx
src/ModelingAlgorithms/TKHLR/TopBas/TopBas_TestInterference_0.cxx
src/ModelingAlgorithms/TKTopAlgo/BRepApprox/BRepApprox_BSpGradient_BFGSOfMyBSplGradientOfTheComputeLineOfApprox_0.cxx
src/ModelingAlgorithms/TKTopAlgo/BRepApprox/BRepApprox_Gradient_BFGSOfMyGradientOfTheComputeLineBezierOfApprox_0.cxx
src/ModelingAlgorithms/TKTopAlgo/BRepApprox/BRepApprox_Gradient_BFGSOfMyGradientbisOfTheComputeLineOfApprox_0.cxx
src/ModelingAlgorithms/TKTopAlgo/MAT/FILES.cmake
src/ModelingAlgorithms/TKTopAlgo/MAT/MAT_TListNode.gxx [deleted file]
src/ModelingAlgorithms/TKTopAlgo/MAT/MAT_TListNode.lxx [deleted file]
src/ModelingAlgorithms/TKTopAlgo/MAT/MAT_TListNodeOfListOfBisector.hxx
src/ModelingAlgorithms/TKTopAlgo/MAT/MAT_TListNodeOfListOfBisector_0.cxx
src/ModelingAlgorithms/TKTopAlgo/MAT/MAT_TListNodeOfListOfEdge.hxx
src/ModelingAlgorithms/TKTopAlgo/MAT/MAT_TListNodeOfListOfEdge_0.cxx
src/ModelingData/TKGeomBase/AppDef/AppDef_BSpGradient_BFGSOfMyBSplGradientOfBSplineCompute_0.cxx
src/ModelingData/TKGeomBase/AppDef/AppDef_Gradient_BFGSOfMyGradientOfCompute_0.cxx
src/ModelingData/TKGeomBase/AppDef/AppDef_Gradient_BFGSOfMyGradientbisOfBSplineCompute_0.cxx
src/ModelingData/TKGeomBase/AppDef/AppDef_Gradient_BFGSOfTheGradient_0.cxx
src/ModelingData/TKGeomBase/AppParCurves/AppParCurves_BSpGradient_BFGS.gxx [deleted file]
src/ModelingData/TKGeomBase/AppParCurves/AppParCurves_Gradient_BFGS.gxx [deleted file]
src/ModelingData/TKGeomBase/AppParCurves/FILES.cmake
src/ModelingData/TKGeomBase/Extrema/Extrema_POnCurv.hxx
src/ModelingData/TKGeomBase/Extrema/Extrema_POnCurv2d.hxx
src/ModelingData/TKGeomBase/Extrema/Extrema_POnCurv2d_0.cxx
src/ModelingData/TKGeomBase/Extrema/Extrema_POnCurv_0.cxx
src/ModelingData/TKGeomBase/Extrema/Extrema_Point.gxx [deleted file]
src/ModelingData/TKGeomBase/Extrema/Extrema_Point.lxx [deleted file]
src/ModelingData/TKGeomBase/Extrema/FILES.cmake

index 6c196dbdcf976fb7013587937311f665eb58cc6c..1dd334d9cf1f7057d077f1e2a306ba61fc9ef74b 100644 (file)
 
 #include <Standard_Type.hxx>
 
-#define Handle_TheKey Handle(IGESData_HArray1OfIGESEntity)
-#define TheKey IGESData_HArray1OfIGESEntity
-#define TheKey_hxx <IGESData_HArray1OfIGESEntity.hxx>
-#define Interface_JaggedArray IGESBasic_HArray1OfHArray1OfIGESEntity
-#define Interface_JaggedArray_hxx <IGESBasic_HArray1OfHArray1OfIGESEntity.hxx>
-#define Handle_Interface_JaggedArray Handle(IGESBasic_HArray1OfHArray1OfIGESEntity)
-#include <Interface_JaggedArray.gxx>
+IGESBasic_HArray1OfHArray1OfIGESEntity::IGESBasic_HArray1OfHArray1OfIGESEntity(
+  const Standard_Integer low,
+  const Standard_Integer up)
+    : thelist(low, up)
+{
+  Handle(Standard_Transient) nulo;
+  thelist.Init(nulo);
+}
+
+Standard_Integer IGESBasic_HArray1OfHArray1OfIGESEntity::Lower() const
+{
+  return thelist.Lower();
+}
+
+Standard_Integer IGESBasic_HArray1OfHArray1OfIGESEntity::Upper() const
+{
+  return thelist.Upper();
+}
+
+Standard_Integer IGESBasic_HArray1OfHArray1OfIGESEntity::Length() const
+{
+  return thelist.Length();
+}
+
+void IGESBasic_HArray1OfHArray1OfIGESEntity::SetValue(
+  const Standard_Integer                      num,
+  const Handle(IGESData_HArray1OfIGESEntity)& val)
+{
+  thelist.SetValue(num, val);
+}
+
+Handle(IGESData_HArray1OfIGESEntity) IGESBasic_HArray1OfHArray1OfIGESEntity::Value(
+  const Standard_Integer num) const
+{
+  return Handle(IGESData_HArray1OfIGESEntity)::DownCast(thelist.Value(num));
+}
index c644d7feef7c7e17d8a7e633a1b9983938b36495..8d466a7cea862c9594728afc1b226e88e5f24b53 100644 (file)
 
 #include <Standard_Type.hxx>
 
-#define Handle_TheKey Handle(TColStd_HArray1OfInteger)
-#define TheKey TColStd_HArray1OfInteger
-#define TheKey_hxx <TColStd_HArray1OfInteger.hxx>
-#define Interface_JaggedArray IGESBasic_HArray1OfHArray1OfInteger
-#define Interface_JaggedArray_hxx <IGESBasic_HArray1OfHArray1OfInteger.hxx>
-#define Handle_Interface_JaggedArray Handle(IGESBasic_HArray1OfHArray1OfInteger)
-#include <Interface_JaggedArray.gxx>
+IGESBasic_HArray1OfHArray1OfInteger::IGESBasic_HArray1OfHArray1OfInteger(const Standard_Integer low,
+                                                                         const Standard_Integer up)
+    : thelist(low, up)
+{
+  Handle(Standard_Transient) nulo;
+  thelist.Init(nulo);
+}
+
+Standard_Integer IGESBasic_HArray1OfHArray1OfInteger::Lower() const
+{
+  return thelist.Lower();
+}
+
+Standard_Integer IGESBasic_HArray1OfHArray1OfInteger::Upper() const
+{
+  return thelist.Upper();
+}
+
+Standard_Integer IGESBasic_HArray1OfHArray1OfInteger::Length() const
+{
+  return thelist.Length();
+}
+
+void IGESBasic_HArray1OfHArray1OfInteger::SetValue(const Standard_Integer                  num,
+                                                   const Handle(TColStd_HArray1OfInteger)& val)
+{
+  thelist.SetValue(num, val);
+}
+
+Handle(TColStd_HArray1OfInteger) IGESBasic_HArray1OfHArray1OfInteger::Value(
+  const Standard_Integer num) const
+{
+  return Handle(TColStd_HArray1OfInteger)::DownCast(thelist.Value(num));
+}
index bdf44ba6ea7f20feb9576873a36c2ae70dca397e..f0df9fa1f5e751ccd3b003eeae2da0daad408bbf 100644 (file)
 
 #include <Standard_Type.hxx>
 
-#define Handle_TheKey Handle(TColStd_HArray1OfReal)
-#define TheKey TColStd_HArray1OfReal
-#define TheKey_hxx <TColStd_HArray1OfReal.hxx>
-#define Interface_JaggedArray IGESBasic_HArray1OfHArray1OfReal
-#define Interface_JaggedArray_hxx <IGESBasic_HArray1OfHArray1OfReal.hxx>
-#define Handle_Interface_JaggedArray Handle(IGESBasic_HArray1OfHArray1OfReal)
-#include <Interface_JaggedArray.gxx>
+IGESBasic_HArray1OfHArray1OfReal::IGESBasic_HArray1OfHArray1OfReal(const Standard_Integer low,
+                                                                   const Standard_Integer up)
+    : thelist(low, up)
+{
+  Handle(Standard_Transient) nulo;
+  thelist.Init(nulo);
+}
+
+Standard_Integer IGESBasic_HArray1OfHArray1OfReal::Lower() const
+{
+  return thelist.Lower();
+}
+
+Standard_Integer IGESBasic_HArray1OfHArray1OfReal::Upper() const
+{
+  return thelist.Upper();
+}
+
+Standard_Integer IGESBasic_HArray1OfHArray1OfReal::Length() const
+{
+  return thelist.Length();
+}
+
+void IGESBasic_HArray1OfHArray1OfReal::SetValue(const Standard_Integer               num,
+                                                const Handle(TColStd_HArray1OfReal)& val)
+{
+  thelist.SetValue(num, val);
+}
+
+Handle(TColStd_HArray1OfReal) IGESBasic_HArray1OfHArray1OfReal::Value(
+  const Standard_Integer num) const
+{
+  return Handle(TColStd_HArray1OfReal)::DownCast(thelist.Value(num));
+}
index 739632afe3b441e9ae015ccda6825d40ddcff143..7eef563e8ba7dba0bf7e6045e7fd0d69c263f73c 100644 (file)
 
 #include <Standard_Type.hxx>
 
-#define Handle_TheKey Handle(TColgp_HArray1OfXYZ)
-#define TheKey TColgp_HArray1OfXYZ
-#define TheKey_hxx <TColgp_HArray1OfXYZ.hxx>
-#define Interface_JaggedArray IGESBasic_HArray1OfHArray1OfXYZ
-#define Interface_JaggedArray_hxx <IGESBasic_HArray1OfHArray1OfXYZ.hxx>
-#define Handle_Interface_JaggedArray Handle(IGESBasic_HArray1OfHArray1OfXYZ)
-#include <Interface_JaggedArray.gxx>
+IGESBasic_HArray1OfHArray1OfXYZ::IGESBasic_HArray1OfHArray1OfXYZ(const Standard_Integer low,
+                                                                 const Standard_Integer up)
+    : thelist(low, up)
+{
+  Handle(Standard_Transient) nulo;
+  thelist.Init(nulo);
+}
+
+Standard_Integer IGESBasic_HArray1OfHArray1OfXYZ::Lower() const
+{
+  return thelist.Lower();
+}
+
+Standard_Integer IGESBasic_HArray1OfHArray1OfXYZ::Upper() const
+{
+  return thelist.Upper();
+}
+
+Standard_Integer IGESBasic_HArray1OfHArray1OfXYZ::Length() const
+{
+  return thelist.Length();
+}
+
+void IGESBasic_HArray1OfHArray1OfXYZ::SetValue(const Standard_Integer             num,
+                                               const Handle(TColgp_HArray1OfXYZ)& val)
+{
+  thelist.SetValue(num, val);
+}
+
+Handle(TColgp_HArray1OfXYZ) IGESBasic_HArray1OfHArray1OfXYZ::Value(const Standard_Integer num) const
+{
+  return Handle(TColgp_HArray1OfXYZ)::DownCast(thelist.Value(num));
+}
index cc38f86276e90020e61434d4b36dd65ba0c45823..a7fe0f0dddfe0bca15559238e335b18bcfde1651 100644 (file)
 
 #include <Standard_Type.hxx>
 
-#define Handle_TheKey Handle(TColgp_HArray1OfXY)
-#define TheKey TColgp_HArray1OfXY
-#define TheKey_hxx <TColgp_HArray1OfXY.hxx>
-#define Interface_JaggedArray IGESBasic_HArray1OfHArray1OfXY
-#define Interface_JaggedArray_hxx <IGESBasic_HArray1OfHArray1OfXY.hxx>
-#define Handle_Interface_JaggedArray Handle(IGESBasic_HArray1OfHArray1OfXY)
-#include <Interface_JaggedArray.gxx>
+IGESBasic_HArray1OfHArray1OfXY::IGESBasic_HArray1OfHArray1OfXY(const Standard_Integer low,
+                                                               const Standard_Integer up)
+    : thelist(low, up)
+{
+  Handle(Standard_Transient) nulo;
+  thelist.Init(nulo);
+}
+
+Standard_Integer IGESBasic_HArray1OfHArray1OfXY::Lower() const
+{
+  return thelist.Lower();
+}
+
+Standard_Integer IGESBasic_HArray1OfHArray1OfXY::Upper() const
+{
+  return thelist.Upper();
+}
+
+Standard_Integer IGESBasic_HArray1OfHArray1OfXY::Length() const
+{
+  return thelist.Length();
+}
+
+void IGESBasic_HArray1OfHArray1OfXY::SetValue(const Standard_Integer            num,
+                                              const Handle(TColgp_HArray1OfXY)& val)
+{
+  thelist.SetValue(num, val);
+}
+
+Handle(TColgp_HArray1OfXY) IGESBasic_HArray1OfHArray1OfXY::Value(const Standard_Integer num) const
+{
+  return Handle(TColgp_HArray1OfXY)::DownCast(thelist.Value(num));
+}
index 341466ee9967d8b6c8d6e5303af3c926e451cb5b..df58ab6f17f6ea69668d0422bf6676dff4a30d15 100644 (file)
 #include <IGESData_SpecificLib.hxx>
 #include <IGESData_NodeOfSpecificLib.hxx>
 
-#define TheObject Handle(IGESData_IGESEntity)
-#define TheObject_hxx <IGESData_IGESEntity.hxx>
-#define Handle_TheModule Handle(IGESData_SpecificModule)
-#define TheModule IGESData_SpecificModule
-#define TheModule_hxx <IGESData_SpecificModule.hxx>
-#define Handle_TheProtocol Handle(IGESData_Protocol)
-#define TheProtocol IGESData_Protocol
-#define TheProtocol_hxx <IGESData_Protocol.hxx>
-#define LibCtl_GlobalNode IGESData_GlobalNodeOfSpecificLib
-#define LibCtl_GlobalNode_hxx <IGESData_GlobalNodeOfSpecificLib.hxx>
-#define LibCtl_Node IGESData_NodeOfSpecificLib
-#define LibCtl_Node_hxx <IGESData_NodeOfSpecificLib.hxx>
-#define Handle_LibCtl_GlobalNode Handle(IGESData_GlobalNodeOfSpecificLib)
-#define Handle_LibCtl_Node Handle(IGESData_NodeOfSpecificLib)
-#define LibCtl_Library IGESData_SpecificLib
-#define LibCtl_Library_hxx <IGESData_SpecificLib.hxx>
-#include <LibCtl_GlobalNode.gxx>
+IGESData_GlobalNodeOfSpecificLib::IGESData_GlobalNodeOfSpecificLib() {}
+
+void IGESData_GlobalNodeOfSpecificLib::Add(const Handle(IGESData_SpecificModule)& amodule,
+                                           const Handle(IGESData_Protocol)&       aprotocol)
+{
+  if (themod == amodule)
+    return;
+  if (theprot == aprotocol)
+    themod = amodule;
+  else if (thenext.IsNull())
+  {
+    if (themod.IsNull())
+    {
+      themod  = amodule;
+      theprot = aprotocol;
+    }
+    else
+    {
+      thenext = new IGESData_GlobalNodeOfSpecificLib;
+      thenext->Add(amodule, aprotocol);
+    }
+  }
+  else
+    thenext->Add(amodule, aprotocol);
+}
+
+const Handle(IGESData_SpecificModule)& IGESData_GlobalNodeOfSpecificLib::Module() const
+{
+  return themod;
+}
+
+const Handle(IGESData_Protocol)& IGESData_GlobalNodeOfSpecificLib::Protocol() const
+{
+  return theprot;
+}
+
+const Handle(IGESData_GlobalNodeOfSpecificLib)& IGESData_GlobalNodeOfSpecificLib::Next() const
+{
+  return thenext;
+}
index 919abf863a45a862ff1b815580653de59eaf526d..cb5ae08beab0b02595c3c9de0c4b9887b2d9618c 100644 (file)
 #include <IGESData_WriterLib.hxx>
 #include <IGESData_NodeOfWriterLib.hxx>
 
-#define TheObject Handle(IGESData_IGESEntity)
-#define TheObject_hxx <IGESData_IGESEntity.hxx>
-#define Handle_TheModule Handle(IGESData_ReadWriteModule)
-#define TheModule IGESData_ReadWriteModule
-#define TheModule_hxx <IGESData_ReadWriteModule.hxx>
-#define Handle_TheProtocol Handle(IGESData_Protocol)
-#define TheProtocol IGESData_Protocol
-#define TheProtocol_hxx <IGESData_Protocol.hxx>
-#define LibCtl_GlobalNode IGESData_GlobalNodeOfWriterLib
-#define LibCtl_GlobalNode_hxx <IGESData_GlobalNodeOfWriterLib.hxx>
-#define LibCtl_Node IGESData_NodeOfWriterLib
-#define LibCtl_Node_hxx <IGESData_NodeOfWriterLib.hxx>
-#define Handle_LibCtl_GlobalNode Handle(IGESData_GlobalNodeOfWriterLib)
-#define Handle_LibCtl_Node Handle(IGESData_NodeOfWriterLib)
-#define LibCtl_Library IGESData_WriterLib
-#define LibCtl_Library_hxx <IGESData_WriterLib.hxx>
-#include <LibCtl_GlobalNode.gxx>
+IGESData_GlobalNodeOfWriterLib::IGESData_GlobalNodeOfWriterLib() {}
+
+void IGESData_GlobalNodeOfWriterLib::Add(const Handle(IGESData_ReadWriteModule)& amodule,
+                                         const Handle(IGESData_Protocol)&        aprotocol)
+{
+  if (themod == amodule)
+    return;
+  if (theprot == aprotocol)
+    themod = amodule;
+  else if (thenext.IsNull())
+  {
+    if (themod.IsNull())
+    {
+      themod  = amodule;
+      theprot = aprotocol;
+    }
+    else
+    {
+      thenext = new IGESData_GlobalNodeOfWriterLib;
+      thenext->Add(amodule, aprotocol);
+    }
+  }
+  else
+    thenext->Add(amodule, aprotocol);
+}
+
+const Handle(IGESData_ReadWriteModule)& IGESData_GlobalNodeOfWriterLib::Module() const
+{
+  return themod;
+}
+
+const Handle(IGESData_Protocol)& IGESData_GlobalNodeOfWriterLib::Protocol() const
+{
+  return theprot;
+}
+
+const Handle(IGESData_GlobalNodeOfWriterLib)& IGESData_GlobalNodeOfWriterLib::Next() const
+{
+  return thenext;
+}
index 807b7a4e7d356bc17aa7b59cfa123a2558c44447..9a1b2b9ebdd7b67dccadaf59260dcdfd8e369fb2 100644 (file)
 #include <IGESData_Protocol.hxx>
 #include <IGESData_SpecificLib.hxx>
 
-#define TheObject Handle(IGESData_IGESEntity)
-#define TheObject_hxx <IGESData_IGESEntity.hxx>
-#define Handle_TheModule Handle(IGESData_SpecificModule)
-#define TheModule IGESData_SpecificModule
-#define TheModule_hxx <IGESData_SpecificModule.hxx>
-#define Handle_TheProtocol Handle(IGESData_Protocol)
-#define TheProtocol IGESData_Protocol
-#define TheProtocol_hxx <IGESData_Protocol.hxx>
-#define LibCtl_GlobalNode IGESData_GlobalNodeOfSpecificLib
-#define LibCtl_GlobalNode_hxx <IGESData_GlobalNodeOfSpecificLib.hxx>
-#define LibCtl_Node IGESData_NodeOfSpecificLib
-#define LibCtl_Node_hxx <IGESData_NodeOfSpecificLib.hxx>
-#define Handle_LibCtl_GlobalNode Handle(IGESData_GlobalNodeOfSpecificLib)
-#define Handle_LibCtl_Node Handle(IGESData_NodeOfSpecificLib)
-#define LibCtl_Library IGESData_SpecificLib
-#define LibCtl_Library_hxx <IGESData_SpecificLib.hxx>
-#include <LibCtl_Node.gxx>
+IGESData_NodeOfSpecificLib::IGESData_NodeOfSpecificLib() {}
+
+void IGESData_NodeOfSpecificLib::AddNode(const Handle(IGESData_GlobalNodeOfSpecificLib)& anode)
+{
+  if (thenode == anode)
+    return;
+  if (thenext.IsNull())
+  {
+    if (thenode.IsNull())
+      thenode = anode;
+    else
+    {
+      thenext = new IGESData_NodeOfSpecificLib;
+      thenext->AddNode(anode);
+    }
+  }
+  else
+    thenext->AddNode(anode);
+}
+
+const Handle(IGESData_SpecificModule)& IGESData_NodeOfSpecificLib::Module() const
+{
+  return thenode->Module();
+}
+
+const Handle(IGESData_Protocol)& IGESData_NodeOfSpecificLib::Protocol() const
+{
+  return thenode->Protocol();
+}
+
+const Handle(IGESData_NodeOfSpecificLib)& IGESData_NodeOfSpecificLib::Next() const
+{
+  return thenext;
+}
index be545f1e3de9aac3861aa56e9a706df9661e7a7d..7006605ee5f7f08b625e8826585ae401de688552 100644 (file)
 #include <IGESData_Protocol.hxx>
 #include <IGESData_WriterLib.hxx>
 
-#define TheObject Handle(IGESData_IGESEntity)
-#define TheObject_hxx <IGESData_IGESEntity.hxx>
-#define Handle_TheModule Handle(IGESData_ReadWriteModule)
-#define TheModule IGESData_ReadWriteModule
-#define TheModule_hxx <IGESData_ReadWriteModule.hxx>
-#define Handle_TheProtocol Handle(IGESData_Protocol)
-#define TheProtocol IGESData_Protocol
-#define TheProtocol_hxx <IGESData_Protocol.hxx>
-#define LibCtl_GlobalNode IGESData_GlobalNodeOfWriterLib
-#define LibCtl_GlobalNode_hxx <IGESData_GlobalNodeOfWriterLib.hxx>
-#define LibCtl_Node IGESData_NodeOfWriterLib
-#define LibCtl_Node_hxx <IGESData_NodeOfWriterLib.hxx>
-#define Handle_LibCtl_GlobalNode Handle(IGESData_GlobalNodeOfWriterLib)
-#define Handle_LibCtl_Node Handle(IGESData_NodeOfWriterLib)
-#define LibCtl_Library IGESData_WriterLib
-#define LibCtl_Library_hxx <IGESData_WriterLib.hxx>
-#include <LibCtl_Node.gxx>
+IGESData_NodeOfWriterLib::IGESData_NodeOfWriterLib() {}
+
+void IGESData_NodeOfWriterLib::AddNode(const Handle(IGESData_GlobalNodeOfWriterLib)& anode)
+{
+  if (thenode == anode)
+    return;
+  if (thenext.IsNull())
+  {
+    if (thenode.IsNull())
+      thenode = anode;
+    else
+    {
+      thenext = new IGESData_NodeOfWriterLib;
+      thenext->AddNode(anode);
+    }
+  }
+  else
+    thenext->AddNode(anode);
+}
+
+const Handle(IGESData_ReadWriteModule)& IGESData_NodeOfWriterLib::Module() const
+{
+  return thenode->Module();
+}
+
+const Handle(IGESData_Protocol)& IGESData_NodeOfWriterLib::Protocol() const
+{
+  return thenode->Protocol();
+}
+
+const Handle(IGESData_NodeOfWriterLib)& IGESData_NodeOfWriterLib::Next() const
+{
+  return thenext;
+}
index 3e7d66392422aa938aafc7f6dd12a824c6c44f18..03ae480941b0297edd5a3a7a50ddb8d216fda272 100644 (file)
 
 #include <Standard_Type.hxx>
 
-#define Handle_TheKey Handle(IGESGraph_HArray1OfTextDisplayTemplate)
-#define TheKey IGESGraph_HArray1OfTextDisplayTemplate
-#define TheKey_hxx <IGESGraph_HArray1OfTextDisplayTemplate.hxx>
-#define Interface_JaggedArray IGESDefs_HArray1OfHArray1OfTextDisplayTemplate
-#define Interface_JaggedArray_hxx <IGESDefs_HArray1OfHArray1OfTextDisplayTemplate.hxx>
-#define Handle_Interface_JaggedArray Handle(IGESDefs_HArray1OfHArray1OfTextDisplayTemplate)
-#include <Interface_JaggedArray.gxx>
+IGESDefs_HArray1OfHArray1OfTextDisplayTemplate::IGESDefs_HArray1OfHArray1OfTextDisplayTemplate(
+  const Standard_Integer low,
+  const Standard_Integer up)
+    : thelist(low, up)
+{
+  Handle(Standard_Transient) nulo;
+  thelist.Init(nulo);
+}
+
+Standard_Integer IGESDefs_HArray1OfHArray1OfTextDisplayTemplate::Lower() const
+{
+  return thelist.Lower();
+}
+
+Standard_Integer IGESDefs_HArray1OfHArray1OfTextDisplayTemplate::Upper() const
+{
+  return thelist.Upper();
+}
+
+Standard_Integer IGESDefs_HArray1OfHArray1OfTextDisplayTemplate::Length() const
+{
+  return thelist.Length();
+}
+
+void IGESDefs_HArray1OfHArray1OfTextDisplayTemplate::SetValue(
+  const Standard_Integer                                num,
+  const Handle(IGESGraph_HArray1OfTextDisplayTemplate)& val)
+{
+  thelist.SetValue(num, val);
+}
+
+Handle(IGESGraph_HArray1OfTextDisplayTemplate) IGESDefs_HArray1OfHArray1OfTextDisplayTemplate::
+  Value(const Standard_Integer num) const
+{
+  return Handle(IGESGraph_HArray1OfTextDisplayTemplate)::DownCast(thelist.Value(num));
+}
index 44f626e5f865ed185ff00a5810bf21edab48c77b..c2c5d012074ad7c0f8aeddff2221536eb98ad8f4 100644 (file)
@@ -21,9 +21,7 @@
 #include <IGESData_IGESWriter.hxx>
 #include <IFSelect_ContextWrite.hxx>
 
-#define Writer IGESData_IGESWriter
-#define Writer_hxx <IGESData_IGESWriter.hxx>
-#define IFSelect_FileModifier IGESSelect_FileModifier
-#define IFSelect_FileModifier_hxx <IGESSelect_FileModifier.hxx>
-#define Handle_IFSelect_FileModifier Handle(IGESSelect_FileModifier)
-#include <IFSelect_FileModifier.gxx>
+IGESSelect_FileModifier::IGESSelect_FileModifier()
+    : IFSelect_GeneralModifier(Standard_False)
+{
+}
index 733066220831d530906744400e422999e70b8086..310c416f9915def76faba9b2c8b03ddadbd84a33 100644 (file)
 #include <Interface_InterfaceModel.hxx>
 #include <Interface_Protocol.hxx>
 #include <Interface_CopyTool.hxx>
+#include <Interface_Check.hxx>
 
-#define Handle_Model Handle(IGESData_IGESModel)
-#define Model IGESData_IGESModel
-#define Model_hxx <IGESData_IGESModel.hxx>
-#define Handle_Proto Handle(IGESData_Protocol)
-#define Proto IGESData_Protocol
-#define Proto_hxx <IGESData_Protocol.hxx>
-#define IFSelect_ModelModifier IGESSelect_ModelModifier
-#define IFSelect_ModelModifier_hxx <IGESSelect_ModelModifier.hxx>
-#define Handle_IFSelect_ModelModifier Handle(IGESSelect_ModelModifier)
-#include <IFSelect_ModelModifier.gxx>
+IGESSelect_ModelModifier::IGESSelect_ModelModifier(const Standard_Boolean grf)
+    : IFSelect_Modifier(grf)
+{
+}
+
+void IGESSelect_ModelModifier::Perform(IFSelect_ContextModif&                  ctx,
+                                       const Handle(Interface_InterfaceModel)& target,
+                                       const Handle(Interface_Protocol)&       protocol,
+                                       Interface_CopyTool&                     TC) const
+{
+  ctx.TraceModifier(this);
+  Handle(IGESData_IGESModel) targ = Handle(IGESData_IGESModel)::DownCast(target);
+  Handle(IGESData_Protocol)  prot = Handle(IGESData_Protocol)::DownCast(protocol);
+  if (targ.IsNull())
+  {
+    ctx.CCheck()->AddFail("Model to Modify : unproper type");
+    return;
+  }
+  PerformProtocol(ctx, targ, prot, TC);
+}
+
+void IGESSelect_ModelModifier::PerformProtocol(IFSelect_ContextModif&            ctx,
+                                               const Handle(IGESData_IGESModel)& target,
+                                               const Handle(IGESData_Protocol)&  protocol,
+                                               Interface_CopyTool&               TC) const
+{
+  ctx.SetProtocol(protocol);
+  Performing(ctx, target, TC);
+}
index ecdf0a3c3025682344b848a16d35c14f9bc9f824..ad8a931dbeca4cd1390c26bd5fa4514b467bbe3d 100644 (file)
 #include <StepData_WriterLib.hxx>
 #include <StepData_NodeOfWriterLib.hxx>
 
-#define TheObject Handle(Standard_Transient)
-#define TheObject_hxx <Standard_Transient.hxx>
-#define Handle_TheModule Handle(StepData_ReadWriteModule)
-#define TheModule StepData_ReadWriteModule
-#define TheModule_hxx <StepData_ReadWriteModule.hxx>
-#define Handle_TheProtocol Handle(StepData_Protocol)
-#define TheProtocol StepData_Protocol
-#define TheProtocol_hxx <StepData_Protocol.hxx>
-#define LibCtl_GlobalNode StepData_GlobalNodeOfWriterLib
-#define LibCtl_GlobalNode_hxx <StepData_GlobalNodeOfWriterLib.hxx>
-#define LibCtl_Node StepData_NodeOfWriterLib
-#define LibCtl_Node_hxx <StepData_NodeOfWriterLib.hxx>
-#define Handle_LibCtl_GlobalNode Handle(StepData_GlobalNodeOfWriterLib)
-#define Handle_LibCtl_Node Handle(StepData_NodeOfWriterLib)
-#define LibCtl_Library StepData_WriterLib
-#define LibCtl_Library_hxx <StepData_WriterLib.hxx>
-#include <LibCtl_GlobalNode.gxx>
+StepData_GlobalNodeOfWriterLib::StepData_GlobalNodeOfWriterLib() {}
+
+void StepData_GlobalNodeOfWriterLib::Add(const Handle(StepData_ReadWriteModule)& amodule,
+                                         const Handle(StepData_Protocol)&        aprotocol)
+{
+  if (themod == amodule)
+    return;
+  if (theprot == aprotocol)
+    themod = amodule;
+  else if (thenext.IsNull())
+  {
+    if (themod.IsNull())
+    {
+      themod  = amodule;
+      theprot = aprotocol;
+    }
+    else
+    {
+      thenext = new StepData_GlobalNodeOfWriterLib;
+      thenext->Add(amodule, aprotocol);
+    }
+  }
+  else
+    thenext->Add(amodule, aprotocol);
+}
+
+const Handle(StepData_ReadWriteModule)& StepData_GlobalNodeOfWriterLib::Module() const
+{
+  return themod;
+}
+
+const Handle(StepData_Protocol)& StepData_GlobalNodeOfWriterLib::Protocol() const
+{
+  return theprot;
+}
+
+const Handle(StepData_GlobalNodeOfWriterLib)& StepData_GlobalNodeOfWriterLib::Next() const
+{
+  return thenext;
+}
index a01a39f7b59e2e86a8bce67b4cf92fd99abc8bb3..e872b36a961aa24a5288d78d03c243772190eb7f 100644 (file)
 #include <StepData_Protocol.hxx>
 #include <StepData_WriterLib.hxx>
 
-#define TheObject Handle(Standard_Transient)
-#define TheObject_hxx <Standard_Transient.hxx>
-#define Handle_TheModule Handle(StepData_ReadWriteModule)
-#define TheModule StepData_ReadWriteModule
-#define TheModule_hxx <StepData_ReadWriteModule.hxx>
-#define Handle_TheProtocol Handle(StepData_Protocol)
-#define TheProtocol StepData_Protocol
-#define TheProtocol_hxx <StepData_Protocol.hxx>
-#define LibCtl_GlobalNode StepData_GlobalNodeOfWriterLib
-#define LibCtl_GlobalNode_hxx <StepData_GlobalNodeOfWriterLib.hxx>
-#define LibCtl_Node StepData_NodeOfWriterLib
-#define LibCtl_Node_hxx <StepData_NodeOfWriterLib.hxx>
-#define Handle_LibCtl_GlobalNode Handle(StepData_GlobalNodeOfWriterLib)
-#define Handle_LibCtl_Node Handle(StepData_NodeOfWriterLib)
-#define LibCtl_Library StepData_WriterLib
-#define LibCtl_Library_hxx <StepData_WriterLib.hxx>
-#include <LibCtl_Node.gxx>
+StepData_NodeOfWriterLib::StepData_NodeOfWriterLib() {}
+
+void StepData_NodeOfWriterLib::AddNode(const Handle(StepData_GlobalNodeOfWriterLib)& anode)
+{
+  if (thenode == anode)
+    return;
+  if (thenext.IsNull())
+  {
+    if (thenode.IsNull())
+      thenode = anode;
+    else
+    {
+      thenext = new StepData_NodeOfWriterLib;
+      thenext->AddNode(anode);
+    }
+  }
+  else
+    thenext->AddNode(anode);
+}
+
+const Handle(StepData_ReadWriteModule)& StepData_NodeOfWriterLib::Module() const
+{
+  return thenode->Module();
+}
+
+const Handle(StepData_Protocol)& StepData_NodeOfWriterLib::Protocol() const
+{
+  return thenode->Protocol();
+}
+
+const Handle(StepData_NodeOfWriterLib)& StepData_NodeOfWriterLib::Next() const
+{
+  return thenext;
+}
index c44f320f6bd340fcb94913ca118acb2075b16309..73cd30f076fde91838c09c5bc3147f777834aa75 100644 (file)
@@ -21,9 +21,7 @@
 #include <StepData_StepWriter.hxx>
 #include <IFSelect_ContextWrite.hxx>
 
-#define Writer StepData_StepWriter
-#define Writer_hxx <StepData_StepWriter.hxx>
-#define IFSelect_FileModifier StepSelect_FileModifier
-#define IFSelect_FileModifier_hxx <StepSelect_FileModifier.hxx>
-#define Handle_IFSelect_FileModifier Handle(StepSelect_FileModifier)
-#include <IFSelect_FileModifier.gxx>
+StepSelect_FileModifier::StepSelect_FileModifier()
+    : IFSelect_GeneralModifier(Standard_False)
+{
+}
index 124d5370d491c61e3c95643f0c8ae0b873ae15f3..16940fd8372174f9bfe18e7b609d9e0d25f48bf2 100644 (file)
 #include <Interface_InterfaceModel.hxx>
 #include <Interface_Protocol.hxx>
 #include <Interface_CopyTool.hxx>
+#include <Interface_Check.hxx>
 
-#define Handle_Model Handle(StepData_StepModel)
-#define Model StepData_StepModel
-#define Model_hxx <StepData_StepModel.hxx>
-#define Handle_Proto Handle(StepData_Protocol)
-#define Proto StepData_Protocol
-#define Proto_hxx <StepData_Protocol.hxx>
-#define IFSelect_ModelModifier StepSelect_ModelModifier
-#define IFSelect_ModelModifier_hxx <StepSelect_ModelModifier.hxx>
-#define Handle_IFSelect_ModelModifier Handle(StepSelect_ModelModifier)
-#include <IFSelect_ModelModifier.gxx>
+StepSelect_ModelModifier::StepSelect_ModelModifier(const Standard_Boolean grf)
+    : IFSelect_Modifier(grf)
+{
+}
+
+void StepSelect_ModelModifier::Perform(IFSelect_ContextModif&                  ctx,
+                                       const Handle(Interface_InterfaceModel)& target,
+                                       const Handle(Interface_Protocol)&       protocol,
+                                       Interface_CopyTool&                     TC) const
+{
+  ctx.TraceModifier(this);
+  Handle(StepData_StepModel) targ = Handle(StepData_StepModel)::DownCast(target);
+  Handle(StepData_Protocol)  prot = Handle(StepData_Protocol)::DownCast(protocol);
+  if (targ.IsNull())
+  {
+    ctx.CCheck()->AddFail("Model to Modify : unproper type");
+    return;
+  }
+  PerformProtocol(ctx, targ, prot, TC);
+}
+
+void StepSelect_ModelModifier::PerformProtocol(IFSelect_ContextModif&            ctx,
+                                               const Handle(StepData_StepModel)& target,
+                                               const Handle(StepData_Protocol)&  protocol,
+                                               Interface_CopyTool&               TC) const
+{
+  ctx.SetProtocol(protocol);
+  Performing(ctx, target, TC);
+}
index 2b276cf1e8b995edda9a96d3fa66e1f8e39ecb31..0ef4614985697057267e31696026abaabc07fedc 100644 (file)
@@ -36,7 +36,6 @@ set(OCCT_IFSelect_FILES
   IFSelect_Editor.cxx
   IFSelect_Editor.hxx
   IFSelect_EditValue.hxx
-  IFSelect_FileModifier.gxx
   IFSelect_Functions.cxx
   IFSelect_Functions.hxx
   IFSelect_GeneralModifier.cxx
@@ -50,7 +49,6 @@ set(OCCT_IFSelect_FILES
   IFSelect_ListEditor.hxx
   IFSelect_ModelCopier.cxx
   IFSelect_ModelCopier.hxx
-  IFSelect_ModelModifier.gxx
   IFSelect_ModifEditForm.cxx
   IFSelect_ModifEditForm.hxx
   IFSelect_Modifier.cxx
diff --git a/src/DataExchange/TKXSBase/IFSelect/IFSelect_FileModifier.gxx b/src/DataExchange/TKXSBase/IFSelect/IFSelect_FileModifier.gxx
deleted file mode 100644 (file)
index ab4ddc5..0000000
+++ /dev/null
@@ -1,19 +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 <IFSelect_FileModifier.ixx>
-
-IFSelect_FileModifier::IFSelect_FileModifier()
-    : IFSelect_GeneralModifier(Standard_False)
-{
-}
diff --git a/src/DataExchange/TKXSBase/IFSelect/IFSelect_ModelModifier.gxx b/src/DataExchange/TKXSBase/IFSelect/IFSelect_ModelModifier.gxx
deleted file mode 100644 (file)
index db115da..0000000
+++ /dev/null
@@ -1,45 +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 <IFSelect_ModelModifier.ixx>
-#include <Interface_Check.hxx>
-
-IFSelect_ModelModifier::IFSelect_ModelModifier(const Standard_Boolean grf)
-    : IFSelect_Modifier(grf)
-{
-}
-
-void IFSelect_ModelModifier::Perform(IFSelect_ContextModif&                  ctx,
-                                     const Handle(Interface_InterfaceModel)& target,
-                                     const Handle(Interface_Protocol)&       protocol,
-                                     Interface_CopyTool&                     TC) const
-{
-  ctx.TraceModifier(this);
-  Handle(Model) targ = Handle(Model)::DownCast(target);
-  Handle(Proto) prot = Handle(Proto)::DownCast(protocol);
-  if (targ.IsNull())
-  {
-    ctx.CCheck()->AddFail("Model to Modify : unproper type");
-    return;
-  }
-  PerformProtocol(ctx, targ, prot, TC);
-}
-
-void IFSelect_ModelModifier::PerformProtocol(IFSelect_ContextModif& ctx,
-                                             const Handle(Model)&   target,
-                                             const Handle(Proto)&   protocol,
-                                             Interface_CopyTool&    TC) const
-{
-  ctx.SetProtocol(protocol);
-  Performing(ctx, target, TC);
-}
index 667c3c8a1a5d4a2b9ce06b375ea6337b075e85dd..223081a688419780e5acaa356e3925d5bc09864d 100644 (file)
@@ -66,7 +66,6 @@ set(OCCT_Interface_FILES
   Interface_IntList.hxx
   Interface_IntVal.cxx
   Interface_IntVal.hxx
-  Interface_JaggedArray.gxx
   Interface_LineBuffer.cxx
   Interface_LineBuffer.hxx
   Interface_Macros.hxx
index fc901d8f0ad17de7c9b9d4d208dc985a1f64bb3c..c39964f923f7d518e694e3016f53b9e2c1f0776e 100644 (file)
 #include <Interface_GeneralLib.hxx>
 #include <Interface_NodeOfGeneralLib.hxx>
 
-#define TheObject Handle(Standard_Transient)
-#define TheObject_hxx <Standard_Transient.hxx>
-#define Handle_TheModule Handle(Interface_GeneralModule)
-#define TheModule Interface_GeneralModule
-#define TheModule_hxx <Interface_GeneralModule.hxx>
-#define Handle_TheProtocol Handle(Interface_Protocol)
-#define TheProtocol Interface_Protocol
-#define TheProtocol_hxx <Interface_Protocol.hxx>
-#define LibCtl_GlobalNode Interface_GlobalNodeOfGeneralLib
-#define LibCtl_GlobalNode_hxx <Interface_GlobalNodeOfGeneralLib.hxx>
-#define LibCtl_Node Interface_NodeOfGeneralLib
-#define LibCtl_Node_hxx <Interface_NodeOfGeneralLib.hxx>
-#define Handle_LibCtl_GlobalNode Handle(Interface_GlobalNodeOfGeneralLib)
-#define Handle_LibCtl_Node Handle(Interface_NodeOfGeneralLib)
-#define LibCtl_Library Interface_GeneralLib
-#define LibCtl_Library_hxx <Interface_GeneralLib.hxx>
-#include <LibCtl_GlobalNode.gxx>
+Interface_GlobalNodeOfGeneralLib::Interface_GlobalNodeOfGeneralLib() {}
+
+void Interface_GlobalNodeOfGeneralLib::Add(const Handle(Interface_GeneralModule)& amodule,
+                                           const Handle(Interface_Protocol)&      aprotocol)
+{
+  if (themod == amodule)
+    return;
+  if (theprot == aprotocol)
+    themod = amodule;
+  else if (thenext.IsNull())
+  {
+    if (themod.IsNull())
+    {
+      themod  = amodule;
+      theprot = aprotocol;
+    }
+    else
+    {
+      thenext = new Interface_GlobalNodeOfGeneralLib;
+      thenext->Add(amodule, aprotocol);
+    }
+  }
+  else
+    thenext->Add(amodule, aprotocol);
+}
+
+const Handle(Interface_GeneralModule)& Interface_GlobalNodeOfGeneralLib::Module() const
+{
+  return themod;
+}
+
+const Handle(Interface_Protocol)& Interface_GlobalNodeOfGeneralLib::Protocol() const
+{
+  return theprot;
+}
+
+const Handle(Interface_GlobalNodeOfGeneralLib)& Interface_GlobalNodeOfGeneralLib::Next() const
+{
+  return thenext;
+}
index 00c3f43e3dfe255cfc54360e025b15d165a8138a..336caa5c09aa848d26704405c7c5ea32bc6d73f0 100644 (file)
 #include <Interface_ReaderLib.hxx>
 #include <Interface_NodeOfReaderLib.hxx>
 
-#define TheObject Handle(Standard_Transient)
-#define TheObject_hxx <Standard_Transient.hxx>
-#define Handle_TheModule Handle(Interface_ReaderModule)
-#define TheModule Interface_ReaderModule
-#define TheModule_hxx <Interface_ReaderModule.hxx>
-#define Handle_TheProtocol Handle(Interface_Protocol)
-#define TheProtocol Interface_Protocol
-#define TheProtocol_hxx <Interface_Protocol.hxx>
-#define LibCtl_GlobalNode Interface_GlobalNodeOfReaderLib
-#define LibCtl_GlobalNode_hxx <Interface_GlobalNodeOfReaderLib.hxx>
-#define LibCtl_Node Interface_NodeOfReaderLib
-#define LibCtl_Node_hxx <Interface_NodeOfReaderLib.hxx>
-#define Handle_LibCtl_GlobalNode Handle(Interface_GlobalNodeOfReaderLib)
-#define Handle_LibCtl_Node Handle(Interface_NodeOfReaderLib)
-#define LibCtl_Library Interface_ReaderLib
-#define LibCtl_Library_hxx <Interface_ReaderLib.hxx>
-#include <LibCtl_GlobalNode.gxx>
+Interface_GlobalNodeOfReaderLib::Interface_GlobalNodeOfReaderLib() {}
+
+void Interface_GlobalNodeOfReaderLib::Add(const Handle(Interface_ReaderModule)& amodule,
+                                          const Handle(Interface_Protocol)&     aprotocol)
+{
+  if (themod == amodule)
+    return;
+  if (theprot == aprotocol)
+    themod = amodule;
+  else if (thenext.IsNull())
+  {
+    if (themod.IsNull())
+    {
+      themod  = amodule;
+      theprot = aprotocol;
+    }
+    else
+    {
+      thenext = new Interface_GlobalNodeOfReaderLib;
+      thenext->Add(amodule, aprotocol);
+    }
+  }
+  else
+    thenext->Add(amodule, aprotocol);
+}
+
+const Handle(Interface_ReaderModule)& Interface_GlobalNodeOfReaderLib::Module() const
+{
+  return themod;
+}
+
+const Handle(Interface_Protocol)& Interface_GlobalNodeOfReaderLib::Protocol() const
+{
+  return theprot;
+}
+
+const Handle(Interface_GlobalNodeOfReaderLib)& Interface_GlobalNodeOfReaderLib::Next() const
+{
+  return thenext;
+}
diff --git a/src/DataExchange/TKXSBase/Interface/Interface_JaggedArray.gxx b/src/DataExchange/TKXSBase/Interface/Interface_JaggedArray.gxx
deleted file mode 100644 (file)
index 9e35d16..0000000
+++ /dev/null
@@ -1,50 +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 <Interface_JaggedArray.ixx>
-
-Interface_JaggedArray::Interface_JaggedArray(const Standard_Integer low, const Standard_Integer up)
-    : thelist(low, up)
-{
-  Handle(Standard_Transient) nulo;
-  thelist.Init(nulo);
-}
-
-Standard_Integer Interface_JaggedArray::Lower() const
-{
-  return thelist.Lower();
-}
-
-Standard_Integer Interface_JaggedArray::Upper() const
-{
-  return thelist.Upper();
-}
-
-Standard_Integer Interface_JaggedArray::Length() const
-{
-  return thelist.Length();
-}
-
-void Interface_JaggedArray::SetValue(const Standard_Integer num, const Handle(TheKey)& val)
-{
-  thelist.SetValue(num, val);
-}
-
-Handle(TheKey) Interface_JaggedArray::Value(const Standard_Integer num) const
-{
-  return Handle(TheKey)::DownCast(thelist.Value(num));
-}
-
-//    Handle(TheKey)&  Interface_JaggedArray::ChangeValue
-//  (const Standard_Integer num)
-//      {  return thelist.ChangeValue(num);  }
index e6742e90d0f4a076d26e4ac3830af7e81f78fddf..b4cbb4e626a6900ca778c5e8acdc0f3d1ea000ff 100644 (file)
 #include <Interface_Protocol.hxx>
 #include <Interface_GeneralLib.hxx>
 
-#define TheObject Handle(Standard_Transient)
-#define TheObject_hxx <Standard_Transient.hxx>
-#define Handle_TheModule Handle(Interface_GeneralModule)
-#define TheModule Interface_GeneralModule
-#define TheModule_hxx <Interface_GeneralModule.hxx>
-#define Handle_TheProtocol Handle(Interface_Protocol)
-#define TheProtocol Interface_Protocol
-#define TheProtocol_hxx <Interface_Protocol.hxx>
-#define LibCtl_GlobalNode Interface_GlobalNodeOfGeneralLib
-#define LibCtl_GlobalNode_hxx <Interface_GlobalNodeOfGeneralLib.hxx>
-#define LibCtl_Node Interface_NodeOfGeneralLib
-#define LibCtl_Node_hxx <Interface_NodeOfGeneralLib.hxx>
-#define Handle_LibCtl_GlobalNode Handle(Interface_GlobalNodeOfGeneralLib)
-#define Handle_LibCtl_Node Handle(Interface_NodeOfGeneralLib)
-#define LibCtl_Library Interface_GeneralLib
-#define LibCtl_Library_hxx <Interface_GeneralLib.hxx>
-#include <LibCtl_Node.gxx>
+Interface_NodeOfGeneralLib::Interface_NodeOfGeneralLib() {}
+
+void Interface_NodeOfGeneralLib::AddNode(const Handle(Interface_GlobalNodeOfGeneralLib)& anode)
+{
+  if (thenode == anode)
+    return;
+  if (thenext.IsNull())
+  {
+    if (thenode.IsNull())
+      thenode = anode;
+    else
+    {
+      thenext = new Interface_NodeOfGeneralLib;
+      thenext->AddNode(anode);
+    }
+  }
+  else
+    thenext->AddNode(anode);
+}
+
+const Handle(Interface_GeneralModule)& Interface_NodeOfGeneralLib::Module() const
+{
+  return thenode->Module();
+}
+
+const Handle(Interface_Protocol)& Interface_NodeOfGeneralLib::Protocol() const
+{
+  return thenode->Protocol();
+}
+
+const Handle(Interface_NodeOfGeneralLib)& Interface_NodeOfGeneralLib::Next() const
+{
+  return thenext;
+}
index 50fb6bb0b309918fab007d13a1efcefe024fe78c..ffd30473519a91251528b8c69a3867f35b01b9ec 100644 (file)
 #include <Interface_Protocol.hxx>
 #include <Interface_ReaderLib.hxx>
 
-#define TheObject Handle(Standard_Transient)
-#define TheObject_hxx <Standard_Transient.hxx>
-#define Handle_TheModule Handle(Interface_ReaderModule)
-#define TheModule Interface_ReaderModule
-#define TheModule_hxx <Interface_ReaderModule.hxx>
-#define Handle_TheProtocol Handle(Interface_Protocol)
-#define TheProtocol Interface_Protocol
-#define TheProtocol_hxx <Interface_Protocol.hxx>
-#define LibCtl_GlobalNode Interface_GlobalNodeOfReaderLib
-#define LibCtl_GlobalNode_hxx <Interface_GlobalNodeOfReaderLib.hxx>
-#define LibCtl_Node Interface_NodeOfReaderLib
-#define LibCtl_Node_hxx <Interface_NodeOfReaderLib.hxx>
-#define Handle_LibCtl_GlobalNode Handle(Interface_GlobalNodeOfReaderLib)
-#define Handle_LibCtl_Node Handle(Interface_NodeOfReaderLib)
-#define LibCtl_Library Interface_ReaderLib
-#define LibCtl_Library_hxx <Interface_ReaderLib.hxx>
-#include <LibCtl_Node.gxx>
+Interface_NodeOfReaderLib::Interface_NodeOfReaderLib() {}
+
+void Interface_NodeOfReaderLib::AddNode(const Handle(Interface_GlobalNodeOfReaderLib)& anode)
+{
+  if (thenode == anode)
+    return;
+  if (thenext.IsNull())
+  {
+    if (thenode.IsNull())
+      thenode = anode;
+    else
+    {
+      thenext = new Interface_NodeOfReaderLib;
+      thenext->AddNode(anode);
+    }
+  }
+  else
+    thenext->AddNode(anode);
+}
+
+const Handle(Interface_ReaderModule)& Interface_NodeOfReaderLib::Module() const
+{
+  return thenode->Module();
+}
+
+const Handle(Interface_Protocol)& Interface_NodeOfReaderLib::Protocol() const
+{
+  return thenode->Protocol();
+}
+
+const Handle(Interface_NodeOfReaderLib)& Interface_NodeOfReaderLib::Next() const
+{
+  return thenext;
+}
index 51b5b1a6bf288f860363ad4d93b9ef6878898a6f..d65375bd0fa8c90321f8d7487597cac20ff3dc80 100644 (file)
@@ -2,7 +2,5 @@
 set(OCCT_LibCtl_FILES_LOCATION "${CMAKE_CURRENT_LIST_DIR}")
 
 set(OCCT_LibCtl_FILES
-  LibCtl_GlobalNode.gxx
   LibCtl_Library.gxx
-  LibCtl_Node.gxx
 )
diff --git a/src/DataExchange/TKXSBase/LibCtl/LibCtl_GlobalNode.gxx b/src/DataExchange/TKXSBase/LibCtl/LibCtl_GlobalNode.gxx
deleted file mode 100644 (file)
index a5d672d..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-// Copyright (c) 1998-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 <LibCtl_GlobalNode.ixx>
-
-//  Generic class nested in Library: used to build the
-//  global lists of Modules attached to an instantiated class of Library
-//  (see Library for more details)
-
-LibCtl_GlobalNode::LibCtl_GlobalNode() {}
-
-// WARNING, Add acts as substitution: for a given Protocol, it is the
-//   last call wins
-void LibCtl_GlobalNode::Add(const Handle(TheModule)& amodule, const Handle(TheProtocol)& aprotocol)
-{
-  if (themod == amodule)
-    return;
-  if (theprot == aprotocol)
-    themod = amodule;
-  else if (thenext.IsNull())
-  {
-    if (themod.IsNull())
-    {
-      themod  = amodule;
-      theprot = aprotocol;
-    }
-    else
-    {
-      thenext = new LibCtl_GlobalNode;
-      thenext->Add(amodule, aprotocol);
-    }
-  }
-  else
-    thenext->Add(amodule, aprotocol);
-}
-
-const Handle(TheModule)& LibCtl_GlobalNode::Module() const
-{
-  return themod;
-}
-
-const Handle(TheProtocol)& LibCtl_GlobalNode::Protocol() const
-{
-  return theprot;
-}
-
-const Handle(LibCtl_GlobalNode)& LibCtl_GlobalNode::Next() const
-{
-  return thenext;
-}
diff --git a/src/DataExchange/TKXSBase/LibCtl/LibCtl_Node.gxx b/src/DataExchange/TKXSBase/LibCtl/LibCtl_Node.gxx
deleted file mode 100644 (file)
index 4d4a41e..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-// Copyright (c) 1998-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 <LibCtl_Node.ixx>
-
-//  Generic class nested in Library: used to build the
-//  lists of Modules of a library  (see Library for more details)
-//  (In fact: List of Global Nodes -> Module + Protocol)
-
-LibCtl_Node::LibCtl_Node() {}
-
-void LibCtl_Node::AddNode(const Handle(LibCtl_GlobalNode)& anode)
-{
-  if (thenode == anode)
-    return;
-  if (thenext.IsNull())
-  {
-    if (thenode.IsNull())
-      thenode = anode;
-    else
-    {
-      thenext = new LibCtl_Node;
-      thenext->AddNode(anode);
-    }
-  }
-  else
-    thenext->AddNode(anode);
-}
-
-const Handle(TheModule)& LibCtl_Node::Module() const
-{
-  return thenode->Module();
-}
-
-const Handle(TheProtocol)& LibCtl_Node::Protocol() const
-{
-  return thenode->Protocol();
-}
-
-const Handle(LibCtl_Node)& LibCtl_Node::Next() const
-{
-  return thenext;
-}
index 629ad88d27e75d283f18a31400e9353eb4f2995a..b72310b1714c72f613adcc1485eb39351dceeaea 100644 (file)
 #include <Adaptor2d_Curve2d.hxx>
 #include <Geom2dInt_Geom2dCurveTool.hxx>
 
-#define ImpTool IntCurve_IConicTool
-#define ImpTool_hxx <IntCurve_IConicTool.hxx>
-#define ParCurve Adaptor2d_Curve2d
-#define ParCurve_hxx <Adaptor2d_Curve2d.hxx>
-#define ParTool Geom2dInt_Geom2dCurveTool
-#define ParTool_hxx <Geom2dInt_Geom2dCurveTool.hxx>
-#define IntImpParGen_ImpParTool Geom2dInt_MyImpParToolOfTheIntersectorOfTheIntConicCurveOfGInter
-#define IntImpParGen_ImpParTool_hxx                                                                \
-  <Geom2dInt_MyImpParToolOfTheIntersectorOfTheIntConicCurveOfGInter.hxx>
-#include <IntImpParGen_ImpParTool.gxx>
+#include <gp_Vec2d.hxx>
+
+Geom2dInt_MyImpParToolOfTheIntersectorOfTheIntConicCurveOfGInter::
+  Geom2dInt_MyImpParToolOfTheIntersectorOfTheIntConicCurveOfGInter(const IntCurve_IConicTool& ITool,
+                                                                   const Adaptor2d_Curve2d&   PC)
+    : TheImpTool(ITool)
+{
+  TheParCurve = (Standard_Address)(&PC);
+}
+
+Standard_Boolean Geom2dInt_MyImpParToolOfTheIntersectorOfTheIntConicCurveOfGInter::Value(
+  const Standard_Real Param,
+  Standard_Real&      ApproxDistance)
+{
+  ApproxDistance = TheImpTool.Distance(
+    Geom2dInt_Geom2dCurveTool::Value((*((Adaptor2d_Curve2d*)(TheParCurve))), Param));
+  return (Standard_True);
+}
+
+Standard_Boolean Geom2dInt_MyImpParToolOfTheIntersectorOfTheIntConicCurveOfGInter::Derivative(
+  const Standard_Real Param,
+  Standard_Real&      D_ApproxDistance_DV)
+{
+  gp_Pnt2d Pt;
+  gp_Vec2d TanParCurve;
+  gp_Vec2d Grad = TheImpTool.GradDistance(
+    Geom2dInt_Geom2dCurveTool::Value((*((Adaptor2d_Curve2d*)(TheParCurve))), Param));
+  Geom2dInt_Geom2dCurveTool::D1((*((Adaptor2d_Curve2d*)(TheParCurve))), Param, Pt, TanParCurve);
+  D_ApproxDistance_DV = Grad.Dot(TanParCurve);
+  return (Standard_True);
+}
+
+Standard_Boolean Geom2dInt_MyImpParToolOfTheIntersectorOfTheIntConicCurveOfGInter::Values(
+  const Standard_Real Param,
+  Standard_Real&      ApproxDistance,
+  Standard_Real&      Deriv)
+{
+  this->Value(Param, ApproxDistance);
+  this->Derivative(Param, Deriv);
+  return (Standard_True);
+}
index b2d65c71eca096e522517607603ffa506856d868..28c39322a40a19cc79f3dc3eb2ecbc10ef1603f2 100644 (file)
 #include <Geom2dInt_TheLocateExtPCOfTheProjPCurOfGInter.hxx>
 #include <Geom2dInt_PCLocFOfTheLocateExtPCOfTheProjPCurOfGInter.hxx>
 #include <gp_Pnt2d.hxx>
+#include <Extrema_POnCurv2d.hxx>
 
-#define TheCurve Adaptor2d_Curve2d
-#define TheCurve_hxx <Adaptor2d_Curve2d.hxx>
-#define TheCurveTool Geom2dInt_Geom2dCurveTool
-#define TheCurveTool_hxx <Geom2dInt_Geom2dCurveTool.hxx>
-#define IntCurve_TheCurveLocator Geom2dInt_TheCurveLocatorOfTheProjPCurOfGInter
-#define IntCurve_TheCurveLocator_hxx <Geom2dInt_TheCurveLocatorOfTheProjPCurOfGInter.hxx>
-#define IntCurve_TheLocateExtPC Geom2dInt_TheLocateExtPCOfTheProjPCurOfGInter
-#define IntCurve_TheLocateExtPC_hxx <Geom2dInt_TheLocateExtPCOfTheProjPCurOfGInter.hxx>
-#define IntCurve_PCLocFOfTheLocateExtPC Geom2dInt_PCLocFOfTheLocateExtPCOfTheProjPCurOfGInter
-#define IntCurve_PCLocFOfTheLocateExtPC_hxx                                                        \
-  <Geom2dInt_PCLocFOfTheLocateExtPCOfTheProjPCurOfGInter.hxx>
-#define IntCurve_PCLocFOfTheLocateExtPC Geom2dInt_PCLocFOfTheLocateExtPCOfTheProjPCurOfGInter
-#define IntCurve_PCLocFOfTheLocateExtPC_hxx                                                        \
-  <Geom2dInt_PCLocFOfTheLocateExtPCOfTheProjPCurOfGInter.hxx>
-#define IntCurve_ProjPCurGen Geom2dInt_TheProjPCurOfGInter
-#define IntCurve_ProjPCurGen_hxx <Geom2dInt_TheProjPCurOfGInter.hxx>
-#include <IntCurve_ProjPCurGen.gxx>
+Standard_Real Geom2dInt_TheProjPCurOfGInter::FindParameter(const Adaptor2d_Curve2d& C,
+                                                           const gp_Pnt2d&          P,
+                                                           const Standard_Real      LowParameter,
+                                                           const Standard_Real      HighParameter,
+                                                           const Standard_Real)
+{
+  Standard_Real     theparam, defaultparam;
+  Standard_Integer  NbPts   = Geom2dInt_Geom2dCurveTool::NbSamples(C);
+  Standard_Real     theEpsX = Geom2dInt_Geom2dCurveTool::EpsX(C);
+  Extrema_POnCurv2d POnC;
+
+  Geom2dInt_TheCurveLocatorOfTheProjPCurOfGInter::Locate(P,
+                                                         C,
+                                                         NbPts,
+                                                         LowParameter,
+                                                         HighParameter,
+                                                         POnC);
+  defaultparam = POnC.Parameter();
+  Geom2dInt_TheLocateExtPCOfTheProjPCurOfGInter Loc(P, C, defaultparam, theEpsX);
+
+  if (Loc.IsDone() == Standard_False)
+  {
+    //-- cout<<"\n Erreur dans LocateExtPC "<<endl;
+    theparam = defaultparam;
+  }
+  else
+  {
+    if (Loc.IsMin() == Standard_False)
+    {
+      //-- cout<<"\n Erreur dans LocateExtPC (Maximum trouve) "<<endl;
+      theparam = defaultparam;
+    }
+    else
+    {
+      theparam = Loc.Point().Parameter();
+    }
+  }
+  return theparam;
+}
+
+Standard_Real Geom2dInt_TheProjPCurOfGInter::FindParameter(const Adaptor2d_Curve2d& C,
+                                                           const gp_Pnt2d&          P,
+                                                           const Standard_Real      Tol)
+{
+
+  Standard_Real theParam;
+  theParam = FindParameter(C,
+                           P,
+                           Geom2dInt_Geom2dCurveTool::FirstParameter(C),
+                           Geom2dInt_Geom2dCurveTool::LastParameter(C),
+                           Tol);
+  return theParam;
+}
index 9411a30e280b72c2f8411fef449c8583ec23f404..a3317a7008697284479e0c3de30f58f69bcae866 100644 (file)
 #include <GeomInt_BSpParFunctionOfMyBSplGradientOfTheComputeLineOfWLApprox.hxx>
 #include <math_MultipleVarFunctionWithGradient.hxx>
 
-#define MultiLine GeomInt_TheMultiLineOfWLApprox
-#define MultiLine_hxx <GeomInt_TheMultiLineOfWLApprox.hxx>
-#define ToolLine GeomInt_TheMultiLineToolOfWLApprox
-#define ToolLine_hxx <GeomInt_TheMultiLineToolOfWLApprox.hxx>
-#define AppParCurves_BSpParLeastSquare                                                             \
-  GeomInt_BSpParLeastSquareOfMyBSplGradientOfTheComputeLineOfWLApprox
-#define AppParCurves_BSpParLeastSquare_hxx                                                         \
-  <GeomInt_BSpParLeastSquareOfMyBSplGradientOfTheComputeLineOfWLApprox.hxx>
-#define AppParCurves_BSpParFunction GeomInt_BSpParFunctionOfMyBSplGradientOfTheComputeLineOfWLApprox
-#define AppParCurves_BSpParFunction_hxx                                                            \
-  <GeomInt_BSpParFunctionOfMyBSplGradientOfTheComputeLineOfWLApprox.hxx>
-#define AppParCurves_BSpGradient_BFGS                                                              \
-  GeomInt_BSpGradient_BFGSOfMyBSplGradientOfTheComputeLineOfWLApprox
-#define AppParCurves_BSpGradient_BFGS_hxx                                                          \
-  <GeomInt_BSpGradient_BFGSOfMyBSplGradientOfTheComputeLineOfWLApprox.hxx>
-#define AppParCurves_BSpGradient GeomInt_MyBSplGradientOfTheComputeLineOfWLApprox
-#define AppParCurves_BSpGradient_hxx <GeomInt_MyBSplGradientOfTheComputeLineOfWLApprox.hxx>
-#include <AppParCurves_BSpGradient_BFGS.gxx>
+GeomInt_BSpGradient_BFGSOfMyBSplGradientOfTheComputeLineOfWLApprox::
+  GeomInt_BSpGradient_BFGSOfMyBSplGradientOfTheComputeLineOfWLApprox(
+    math_MultipleVarFunctionWithGradient& F,
+    const math_Vector&                    StartingPoint,
+    const Standard_Real                   Tolerance3d,
+    const Standard_Real                   Tolerance2d,
+    const Standard_Real                   Eps,
+    const Standard_Integer                NbIterations)
+    : math_BFGS(F.NbVariables(), Eps, NbIterations, Eps),
+      myTol3d(Tolerance3d),
+      myTol2d(Tolerance2d)
+{
+  Perform(F, StartingPoint);
+}
+
+Standard_Boolean GeomInt_BSpGradient_BFGSOfMyBSplGradientOfTheComputeLineOfWLApprox::
+  IsSolutionReached(math_MultipleVarFunctionWithGradient& F) const
+{
+  Standard_Boolean                                                  Result, Result2;
+  GeomInt_BSpParFunctionOfMyBSplGradientOfTheComputeLineOfWLApprox* F1 =
+    (GeomInt_BSpParFunctionOfMyBSplGradientOfTheComputeLineOfWLApprox*)&F;
+
+  Result               = (2.0 * fabs(TheMinimum - PreviousMinimum)
+            <= 1.e-10 * (fabs(TheMinimum) + fabs(PreviousMinimum)) + 1.e-12);
+  Standard_Real MErr3d = F1->MaxError3d();
+  Standard_Real MErr2d = F1->MaxError2d();
+  Result2              = ((MErr3d <= myTol3d) && (MErr2d <= myTol2d));
+
+  return (Result || Result2);
+}
index 128a0a8e82844613f75efe42bc0c55b0d9ca886d..2e5c63c4f6d794dd906f84b5d2684c73a5bd5610 100644 (file)
 #include <GeomInt_ParFunctionOfMyGradientOfTheComputeLineBezierOfWLApprox.hxx>
 #include <math_MultipleVarFunctionWithGradient.hxx>
 
-#define MultiLine GeomInt_TheMultiLineOfWLApprox
-#define MultiLine_hxx <GeomInt_TheMultiLineOfWLApprox.hxx>
-#define ToolLine GeomInt_TheMultiLineToolOfWLApprox
-#define ToolLine_hxx <GeomInt_TheMultiLineToolOfWLApprox.hxx>
-#define AppParCurves_ParLeastSquare                                                                \
-  GeomInt_ParLeastSquareOfMyGradientOfTheComputeLineBezierOfWLApprox
-#define AppParCurves_ParLeastSquare_hxx                                                            \
-  <GeomInt_ParLeastSquareOfMyGradientOfTheComputeLineBezierOfWLApprox.hxx>
-#define AppParCurves_ResConstraint GeomInt_ResConstraintOfMyGradientOfTheComputeLineBezierOfWLApprox
-#define AppParCurves_ResConstraint_hxx                                                             \
-  <GeomInt_ResConstraintOfMyGradientOfTheComputeLineBezierOfWLApprox.hxx>
-#define AppParCurves_ParFunction GeomInt_ParFunctionOfMyGradientOfTheComputeLineBezierOfWLApprox
-#define AppParCurves_ParFunction_hxx                                                               \
-  <GeomInt_ParFunctionOfMyGradientOfTheComputeLineBezierOfWLApprox.hxx>
-#define AppParCurves_Gradient_BFGS GeomInt_Gradient_BFGSOfMyGradientOfTheComputeLineBezierOfWLApprox
-#define AppParCurves_Gradient_BFGS_hxx                                                             \
-  <GeomInt_Gradient_BFGSOfMyGradientOfTheComputeLineBezierOfWLApprox.hxx>
-#define AppParCurves_Gradient GeomInt_MyGradientOfTheComputeLineBezierOfWLApprox
-#define AppParCurves_Gradient_hxx <GeomInt_MyGradientOfTheComputeLineBezierOfWLApprox.hxx>
-#include <AppParCurves_Gradient_BFGS.gxx>
+GeomInt_Gradient_BFGSOfMyGradientOfTheComputeLineBezierOfWLApprox::
+  GeomInt_Gradient_BFGSOfMyGradientOfTheComputeLineBezierOfWLApprox(
+    math_MultipleVarFunctionWithGradient& F,
+    const math_Vector&                    StartingPoint,
+    const Standard_Real                   Tolerance3d,
+    const Standard_Real                   Tolerance2d,
+    const Standard_Real                   Eps,
+    const Standard_Integer                NbIterations)
+    : math_BFGS(F.NbVariables(), Eps, NbIterations, Eps),
+      myTol3d(Tolerance3d),
+      myTol2d(Tolerance2d)
+{
+  Perform(F, StartingPoint);
+}
+
+Standard_Boolean GeomInt_Gradient_BFGSOfMyGradientOfTheComputeLineBezierOfWLApprox::
+  IsSolutionReached(math_MultipleVarFunctionWithGradient& F) const
+{
+  GeomInt_ParFunctionOfMyGradientOfTheComputeLineBezierOfWLApprox* F1 =
+    (GeomInt_ParFunctionOfMyGradientOfTheComputeLineBezierOfWLApprox*)&F;
+  Standard_Boolean Result, Result2;
+
+  Result               = (2.0 * fabs(TheMinimum - PreviousMinimum)
+            <= 1.e-10 * (fabs(TheMinimum) + fabs(PreviousMinimum)) + 1.e-12);
+  Standard_Real MErr3d = F1->MaxError3d();
+  Standard_Real MErr2d = F1->MaxError2d();
+
+  Result2 = ((MErr3d <= myTol3d) && (MErr2d <= myTol2d));
+  return (Result || Result2);
+}
index b3e440f6a60108db621b5e5e7e840aed16c3be72..490de18018bf613c0d9b5f736b95a662f9edec7c 100644 (file)
 #include <GeomInt_ParFunctionOfMyGradientbisOfTheComputeLineOfWLApprox.hxx>
 #include <math_MultipleVarFunctionWithGradient.hxx>
 
-#define MultiLine GeomInt_TheMultiLineOfWLApprox
-#define MultiLine_hxx <GeomInt_TheMultiLineOfWLApprox.hxx>
-#define ToolLine GeomInt_TheMultiLineToolOfWLApprox
-#define ToolLine_hxx <GeomInt_TheMultiLineToolOfWLApprox.hxx>
-#define AppParCurves_ParLeastSquare GeomInt_ParLeastSquareOfMyGradientbisOfTheComputeLineOfWLApprox
-#define AppParCurves_ParLeastSquare_hxx                                                            \
-  <GeomInt_ParLeastSquareOfMyGradientbisOfTheComputeLineOfWLApprox.hxx>
-#define AppParCurves_ResConstraint GeomInt_ResConstraintOfMyGradientbisOfTheComputeLineOfWLApprox
-#define AppParCurves_ResConstraint_hxx                                                             \
-  <GeomInt_ResConstraintOfMyGradientbisOfTheComputeLineOfWLApprox.hxx>
-#define AppParCurves_ParFunction GeomInt_ParFunctionOfMyGradientbisOfTheComputeLineOfWLApprox
-#define AppParCurves_ParFunction_hxx                                                               \
-  <GeomInt_ParFunctionOfMyGradientbisOfTheComputeLineOfWLApprox.hxx>
-#define AppParCurves_Gradient_BFGS GeomInt_Gradient_BFGSOfMyGradientbisOfTheComputeLineOfWLApprox
-#define AppParCurves_Gradient_BFGS_hxx                                                             \
-  <GeomInt_Gradient_BFGSOfMyGradientbisOfTheComputeLineOfWLApprox.hxx>
-#define AppParCurves_Gradient GeomInt_MyGradientbisOfTheComputeLineOfWLApprox
-#define AppParCurves_Gradient_hxx <GeomInt_MyGradientbisOfTheComputeLineOfWLApprox.hxx>
-#include <AppParCurves_Gradient_BFGS.gxx>
+GeomInt_Gradient_BFGSOfMyGradientbisOfTheComputeLineOfWLApprox::
+  GeomInt_Gradient_BFGSOfMyGradientbisOfTheComputeLineOfWLApprox(
+    math_MultipleVarFunctionWithGradient& F,
+    const math_Vector&                    StartingPoint,
+    const Standard_Real                   Tolerance3d,
+    const Standard_Real                   Tolerance2d,
+    const Standard_Real                   Eps,
+    const Standard_Integer                NbIterations)
+    : math_BFGS(F.NbVariables(), Eps, NbIterations, Eps),
+      myTol3d(Tolerance3d),
+      myTol2d(Tolerance2d)
+{
+  Perform(F, StartingPoint);
+}
+
+Standard_Boolean GeomInt_Gradient_BFGSOfMyGradientbisOfTheComputeLineOfWLApprox::IsSolutionReached(
+  math_MultipleVarFunctionWithGradient& F) const
+{
+  GeomInt_ParFunctionOfMyGradientbisOfTheComputeLineOfWLApprox* F1 =
+    (GeomInt_ParFunctionOfMyGradientbisOfTheComputeLineOfWLApprox*)&F;
+  Standard_Boolean Result, Result2;
+
+  Result               = (2.0 * fabs(TheMinimum - PreviousMinimum)
+            <= 1.e-10 * (fabs(TheMinimum) + fabs(PreviousMinimum)) + 1.e-12);
+  Standard_Real MErr3d = F1->MaxError3d();
+  Standard_Real MErr2d = F1->MaxError2d();
+
+  Result2 = ((MErr3d <= myTol3d) && (MErr2d <= myTol2d));
+  return (Result || Result2);
+}
index 1ac4b607eb58d861ebd2e3e8570f78cb57f9ce75..5aea25f896b81238e17702a2815344d349797e83 100644 (file)
@@ -30,6 +30,5 @@ set(OCCT_IntCurve_FILES
   IntCurve_Polygon2dGen.lxx
   IntCurve_ProjectOnPConicTool.cxx
   IntCurve_ProjectOnPConicTool.hxx
-  IntCurve_ProjPCurGen.gxx
   IntCurve_UserIntConicCurveGen.gxx
 )
index 4056e4f5529c45173c09d2fd7e54c069a942ecda..93b65286c1c186f8d683c8233d46b4c2de9cdf51 100644 (file)
 #include <IntCurve_PConic.hxx>
 #include <IntCurve_PConicTool.hxx>
 
-#define ImpTool IntCurve_IConicTool
-#define ImpTool_hxx <IntCurve_IConicTool.hxx>
-#define ParCurve IntCurve_PConic
-#define ParCurve_hxx <IntCurve_PConic.hxx>
-#define ParTool IntCurve_PConicTool
-#define ParTool_hxx <IntCurve_PConicTool.hxx>
-#define IntImpParGen_ImpParTool IntCurve_MyImpParToolOfIntImpConicParConic
-#define IntImpParGen_ImpParTool_hxx <IntCurve_MyImpParToolOfIntImpConicParConic.hxx>
-#include <IntImpParGen_ImpParTool.gxx>
+#include <gp_Vec2d.hxx>
+
+IntCurve_MyImpParToolOfIntImpConicParConic::IntCurve_MyImpParToolOfIntImpConicParConic(
+  const IntCurve_IConicTool& ITool,
+  const IntCurve_PConic&     PC)
+    : TheImpTool(ITool)
+{
+  TheParCurve = (Standard_Address)(&PC);
+}
+
+Standard_Boolean IntCurve_MyImpParToolOfIntImpConicParConic::Value(const Standard_Real Param,
+                                                                   Standard_Real& ApproxDistance)
+{
+  ApproxDistance =
+    TheImpTool.Distance(IntCurve_PConicTool::Value((*((IntCurve_PConic*)(TheParCurve))), Param));
+  return (Standard_True);
+}
+
+Standard_Boolean IntCurve_MyImpParToolOfIntImpConicParConic::Derivative(
+  const Standard_Real Param,
+  Standard_Real&      D_ApproxDistance_DV)
+{
+  gp_Pnt2d Pt;
+  gp_Vec2d TanParCurve;
+  gp_Vec2d Grad = TheImpTool.GradDistance(
+    IntCurve_PConicTool::Value((*((IntCurve_PConic*)(TheParCurve))), Param));
+  IntCurve_PConicTool::D1((*((IntCurve_PConic*)(TheParCurve))), Param, Pt, TanParCurve);
+  D_ApproxDistance_DV = Grad.Dot(TanParCurve);
+  return (Standard_True);
+}
+
+Standard_Boolean IntCurve_MyImpParToolOfIntImpConicParConic::Values(const Standard_Real Param,
+                                                                    Standard_Real& ApproxDistance,
+                                                                    Standard_Real& Deriv)
+{
+  this->Value(Param, ApproxDistance);
+  this->Derivative(Param, Deriv);
+  return (Standard_True);
+}
diff --git a/src/ModelingAlgorithms/TKGeomAlgo/IntCurve/IntCurve_ProjPCurGen.gxx b/src/ModelingAlgorithms/TKGeomAlgo/IntCurve/IntCurve_ProjPCurGen.gxx
deleted file mode 100644 (file)
index ee8f399..0000000
+++ /dev/null
@@ -1,63 +0,0 @@
-// Created on: 1992-10-13
-// Created by: Laurent BUCHARD
-// 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 <Extrema_POnCurv2d.hxx>
-
-Standard_Real IntCurve_ProjPCurGen::FindParameter(const TheCurve&     C,
-                                                  const gp_Pnt2d&     P,
-                                                  const Standard_Real LowParameter,
-                                                  const Standard_Real HighParameter,
-                                                  const Standard_Real)
-{
-  Standard_Real     theparam, defaultparam;
-  Standard_Integer  NbPts   = TheCurveTool::NbSamples(C);
-  Standard_Real     theEpsX = TheCurveTool::EpsX(C);
-  Extrema_POnCurv2d POnC;
-
-  IntCurve_TheCurveLocator::Locate(P, C, NbPts, LowParameter, HighParameter, POnC);
-  defaultparam = POnC.Parameter();
-  IntCurve_TheLocateExtPC Loc(P, C, defaultparam, theEpsX);
-
-  if (Loc.IsDone() == Standard_False)
-  {
-    //-- cout<<"\n Erreur dans LocateExtPC "<<endl;
-    theparam = defaultparam;
-  }
-  else
-  {
-    if (Loc.IsMin() == Standard_False)
-    {
-      //-- cout<<"\n Erreur dans LocateExtPC (Maximum trouve) "<<endl;
-      theparam = defaultparam;
-    }
-    else
-    {
-      theparam = Loc.Point().Parameter();
-    }
-  }
-  return theparam;
-}
-
-Standard_Real IntCurve_ProjPCurGen::FindParameter(const TheCurve&     C,
-                                                  const gp_Pnt2d&     P,
-                                                  const Standard_Real Tol)
-{
-
-  Standard_Real theParam;
-  theParam =
-    FindParameter(C, P, TheCurveTool::FirstParameter(C), TheCurveTool::LastParameter(C), Tol);
-  return theParam;
-}
index 002be63e2c7204f57f3a497475547db56779b2b2..3f23a750be6a5fa118efec484239f1e173d6798b 100644 (file)
@@ -13,14 +13,11 @@ set(OCCT_IntCurveSurface_FILES
   IntCurveSurface_IntersectionSegment.cxx
   IntCurveSurface_IntersectionSegment.hxx
   IntCurveSurface_Polygon.gxx
-  IntCurveSurface_PolygonTool.gxx
   IntCurveSurface_PolygonTool.lxx
   IntCurveSurface_Polyhedron.gxx
   IntCurveSurface_Polyhedron.lxx
-  IntCurveSurface_PolyhedronTool.gxx
   IntCurveSurface_PolyhedronTool.lxx
   IntCurveSurface_QuadricCurveExactInter.gxx
-  IntCurveSurface_QuadricCurveFunc.gxx
   IntCurveSurface_SequenceOfPnt.hxx
   IntCurveSurface_SequenceOfSeg.hxx
   IntCurveSurface_TheCSFunctionOfHInter.hxx
diff --git a/src/ModelingAlgorithms/TKGeomAlgo/IntCurveSurface/IntCurveSurface_PolygonTool.gxx b/src/ModelingAlgorithms/TKGeomAlgo/IntCurveSurface/IntCurveSurface_PolygonTool.gxx
deleted file mode 100644 (file)
index bf88e84..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-// Created on: 1993-01-14
-// 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.
-
-void IntCurveSurface_PolygonTool::Dump(const ThePolygon& L)
-{
-
-  static Standard_Integer num = 0;
-  num++;
-  Standard_Integer nbs = IntCurveSurface_PolygonTool::NbSegments(L);
-  std::cout << "\npol2d " << num << " " << nbs << std::endl;
-  std::cout << "Deflection " << IntCurveSurface_PolygonTool::DeflectionOverEstimation(L)
-            << std::endl;
-
-  for (Standard_Integer i = 1; i <= nbs; i++)
-  {
-    gp_Pnt P(IntCurveSurface_PolygonTool::BeginOfSeg(L, i));
-    std::cout << "pnt " << num << " " << i << " " << P.X() << " " << P.Y() << " " << P.Z()
-              << std::endl;
-  }
-  gp_Pnt PF(IntCurveSurface_PolygonTool::EndOfSeg(L, nbs));
-  std::cout << "pnt " << num << " " << nbs << " " << PF.X() << " " << PF.Y() << " " << PF.Z()
-            << std::endl;
-}
diff --git a/src/ModelingAlgorithms/TKGeomAlgo/IntCurveSurface/IntCurveSurface_PolyhedronTool.gxx b/src/ModelingAlgorithms/TKGeomAlgo/IntCurveSurface/IntCurveSurface_PolyhedronTool.gxx
deleted file mode 100644 (file)
index 520db45..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-// 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.
-
-void IntCurveSurface_PolyhedronTool::Dump(const ThePolyhedron& polyh)
-{
-  polyh.Dump();
-}
diff --git a/src/ModelingAlgorithms/TKGeomAlgo/IntCurveSurface/IntCurveSurface_QuadricCurveFunc.gxx b/src/ModelingAlgorithms/TKGeomAlgo/IntCurveSurface/IntCurveSurface_QuadricCurveFunc.gxx
deleted file mode 100644 (file)
index 1872486..0000000
+++ /dev/null
@@ -1,57 +0,0 @@
-// Created on: 1993-08-19
-// 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 <gp_Vec.hxx>
-
-//=================================================================================================
-
-IntCurveSurface_QuadricCurveFunc::IntCurveSurface_QuadricCurveFunc(const TheQuadric& Q,
-                                                                   const TheCurve&   C)
-    : myQuadric(Q),
-      myCurve(C)
-{
-}
-
-//=================================================================================================
-
-Standard_Boolean IntCurveSurface_QuadricCurveFunc::Value(const Standard_Real Param,
-                                                         Standard_Real&      F)
-{
-  F = myQuadric.Distance(TheCurveTool::Value(myCurve, Param));
-  return (Standard_True);
-}
-
-Standard_Boolean IntCurveSurface_QuadricCurveFunc::Derivative(const Standard_Real Param,
-                                                              Standard_Real&      D)
-{
-  gp_Pnt P;
-  gp_Vec T;
-  TheCurveTool::D1(myCurve, Param, P, T);
-  D = T.Dot(myQuadric.Gradient(P));
-  return (Standard_True);
-}
-
-Standard_Boolean IntCurveSurface_QuadricCurveFunc::Values(const Standard_Real Param,
-                                                          Standard_Real&      F,
-                                                          Standard_Real&      D)
-{
-  gp_Pnt P;
-  gp_Vec T, Grad;
-  TheCurveTool::D1(myCurve, Param, P, T);
-  myQuadric.ValAndGrad(P, F, Grad);
-  D = T.Dot(Grad);
-  return (Standard_True);
-}
index d9e0996259b5e6e12091402e47c6087fea765e4a..e86b0e2f4b63dcede14d6586ea6f9c016f4524cc 100644 (file)
 #include <IntCurveSurface_ThePolygonOfHInter.hxx>
 #include <Bnd_Box.hxx>
 
-#define ThePoint gp_Pnt
-#define ThePoint_hxx <gp_Pnt.hxx>
-#define ThePolygon IntCurveSurface_ThePolygonOfHInter
-#define ThePolygon_hxx <IntCurveSurface_ThePolygonOfHInter.hxx>
-#define TheBoundingBox Bnd_Box
-#define TheBoundingBox_hxx <Bnd_Box.hxx>
-#define IntCurveSurface_PolygonTool IntCurveSurface_ThePolygonToolOfHInter
-#define IntCurveSurface_PolygonTool_hxx <IntCurveSurface_ThePolygonToolOfHInter.hxx>
-#include <IntCurveSurface_PolygonTool.gxx>
+#include <iostream>
+
+void IntCurveSurface_ThePolygonToolOfHInter::Dump(const IntCurveSurface_ThePolygonOfHInter& L)
+{
+  static Standard_Integer num = 0;
+  num++;
+  Standard_Integer nbs = IntCurveSurface_ThePolygonToolOfHInter::NbSegments(L);
+  std::cout << "\npol2d " << num << " " << nbs << std::endl;
+  std::cout << "Deflection " << IntCurveSurface_ThePolygonToolOfHInter::DeflectionOverEstimation(L)
+            << std::endl;
+
+  for (Standard_Integer i = 1; i <= nbs; i++)
+  {
+    gp_Pnt P(IntCurveSurface_ThePolygonToolOfHInter::BeginOfSeg(L, i));
+    std::cout << "pnt " << num << " " << i << " " << P.X() << " " << P.Y() << " " << P.Z()
+              << std::endl;
+  }
+  gp_Pnt PF(IntCurveSurface_ThePolygonToolOfHInter::EndOfSeg(L, nbs));
+  std::cout << "pnt " << num << " " << nbs << " " << PF.X() << " " << PF.Y() << " " << PF.Z()
+            << std::endl;
+}
index dd3e4579f08bb82f3df22449c8ff5ef1585a39a4..9f746aad70997c60eb2ba76929cf6c54067d895c 100644 (file)
@@ -21,8 +21,8 @@
 #include <Bnd_Box.hxx>
 #include <gp_Pnt.hxx>
 
-#define ThePolyhedron IntCurveSurface_ThePolyhedronOfHInter
-#define ThePolyhedron_hxx <IntCurveSurface_ThePolyhedronOfHInter.hxx>
-#define IntCurveSurface_PolyhedronTool IntCurveSurface_ThePolyhedronToolOfHInter
-#define IntCurveSurface_PolyhedronTool_hxx <IntCurveSurface_ThePolyhedronToolOfHInter.hxx>
-#include <IntCurveSurface_PolyhedronTool.gxx>
+void IntCurveSurface_ThePolyhedronToolOfHInter::Dump(
+  const IntCurveSurface_ThePolyhedronOfHInter& polyh)
+{
+  polyh.Dump();
+}
index 5a7d60db0bf124ce4d546334d54260d7a1ec29dc..eac0a73309b9834cb093851925bc73b95eef1267 100644 (file)
 #include <Adaptor3d_Curve.hxx>
 #include <IntSurf_Quadric.hxx>
 #include <IntCurveSurface_TheHCurveTool.hxx>
+#include <gp_Vec.hxx>
 
-#define TheQuadric IntSurf_Quadric
-#define TheQuadric_hxx <IntSurf_Quadric.hxx>
-#define TheCurve Handle(Adaptor3d_Curve)
-#define TheCurve_hxx <Adaptor3d_Curve.hxx>
-#define TheCurveTool IntCurveSurface_TheHCurveTool
-#define TheCurveTool_hxx <IntCurveSurface_TheHCurveTool.hxx>
-#define IntCurveSurface_QuadricCurveFunc IntCurveSurface_TheQuadCurvFuncOfTheQuadCurvExactHInter
-#define IntCurveSurface_QuadricCurveFunc_hxx                                                       \
-  <IntCurveSurface_TheQuadCurvFuncOfTheQuadCurvExactHInter.hxx>
-#include <IntCurveSurface_QuadricCurveFunc.gxx>
+IntCurveSurface_TheQuadCurvFuncOfTheQuadCurvExactHInter::
+  IntCurveSurface_TheQuadCurvFuncOfTheQuadCurvExactHInter(const IntSurf_Quadric&         Q,
+                                                          const Handle(Adaptor3d_Curve)& C)
+    : myQuadric(Q),
+      myCurve(C)
+{
+}
+
+Standard_Boolean IntCurveSurface_TheQuadCurvFuncOfTheQuadCurvExactHInter::Value(
+  const Standard_Real Param,
+  Standard_Real&      F)
+{
+  F = myQuadric.Distance(IntCurveSurface_TheHCurveTool::Value(myCurve, Param));
+  return (Standard_True);
+}
+
+Standard_Boolean IntCurveSurface_TheQuadCurvFuncOfTheQuadCurvExactHInter::Derivative(
+  const Standard_Real Param,
+  Standard_Real&      D)
+{
+  gp_Pnt P;
+  gp_Vec T;
+  IntCurveSurface_TheHCurveTool::D1(myCurve, Param, P, T);
+  D = T.Dot(myQuadric.Gradient(P));
+  return (Standard_True);
+}
+
+Standard_Boolean IntCurveSurface_TheQuadCurvFuncOfTheQuadCurvExactHInter::Values(
+  const Standard_Real Param,
+  Standard_Real&      F,
+  Standard_Real&      D)
+{
+  gp_Pnt P;
+  gp_Vec T, Grad;
+  IntCurveSurface_TheHCurveTool::D1(myCurve, Param, P, T);
+  myQuadric.ValAndGrad(P, F, Grad);
+  D = T.Dot(Grad);
+  return (Standard_True);
+}
index 56cdd7eb38cb956682a7aeb2156c7b006e198a92..4df2e6223878c56ab86c216d81d45bd5b9c4c437 100644 (file)
@@ -4,7 +4,6 @@ set(OCCT_IntImpParGen_FILES_LOCATION "${CMAKE_CURRENT_LIST_DIR}")
 set(OCCT_IntImpParGen_FILES
   IntImpParGen.cxx
   IntImpParGen.hxx
-  IntImpParGen_ImpParTool.gxx
   IntImpParGen_ImpTool.hxx
   IntImpParGen_Intersector.gxx
   IntImpParGen_Tool.cxx
diff --git a/src/ModelingAlgorithms/TKGeomAlgo/IntImpParGen/IntImpParGen_ImpParTool.gxx b/src/ModelingAlgorithms/TKGeomAlgo/IntImpParGen/IntImpParGen_ImpParTool.gxx
deleted file mode 100644 (file)
index 686cc37..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-// 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 <gp_Vec2d.hxx>
-
-IntImpParGen_ImpParTool::IntImpParGen_ImpParTool(const ImpTool& ITool, const ParCurve& PC)
-    : TheImpTool(ITool)
-{
-  TheParCurve = (Standard_Address)(&PC);
-}
-
-Standard_Boolean IntImpParGen_ImpParTool::Value(const Standard_Real Param,
-                                                Standard_Real&      ApproxDistance)
-{
-
-  ApproxDistance = TheImpTool.Distance(ParTool::Value((*((ParCurve*)(TheParCurve))), Param));
-  return (Standard_True);
-}
-
-Standard_Boolean IntImpParGen_ImpParTool::Derivative(const Standard_Real Param,
-                                                     Standard_Real&      D_ApproxDistance_DV)
-{
-
-  gp_Pnt2d Pt;
-  gp_Vec2d TanParCurve;
-  gp_Vec2d Grad = TheImpTool.GradDistance(ParTool::Value((*((ParCurve*)(TheParCurve))), Param));
-  ParTool::D1((*((ParCurve*)(TheParCurve))), Param, Pt, TanParCurve);
-  D_ApproxDistance_DV = Grad.Dot(TanParCurve);
-  return (Standard_True);
-}
-
-Standard_Boolean IntImpParGen_ImpParTool::Values(const Standard_Real Param,
-                                                 Standard_Real&      ApproxDistance,
-                                                 Standard_Real&      Deriv)
-{
-
-  this->Value(Param, ApproxDistance);
-  this->Derivative(Param, Deriv);
-  return (Standard_True);
-}
index 120b517468377e22b735cd379e419c61309399f5..709b056f1e0de1c232c52c56731ea7017a3680f2 100644 (file)
@@ -26,7 +26,7 @@
 #include <gp_Vec.hxx>
 #include <Standard_Transient.hxx>
 #include <IntSurf_Allocator.hxx>
-class IntSurf_LineOn2S;
+#include <IntSurf_LineOn2S.hxx>
 class Standard_OutOfRange;
 class Standard_DomainError;
 class IntSurf_PathPoint;
@@ -162,18 +162,169 @@ private:
   Standard_Boolean         istgtend;
 };
 
-#define TheStartPoint IntSurf_PathPoint
-#define TheStartPoint_hxx <IntSurf_PathPoint.hxx>
-#define IntWalk_IWLine IntPatch_TheIWLineOfTheIWalking
-#define IntWalk_IWLine_hxx <IntPatch_TheIWLineOfTheIWalking.hxx>
-#define Handle_IntWalk_IWLine Handle(IntPatch_TheIWLineOfTheIWalking)
+//=================================================================================================
+// Inline implementations
+//=================================================================================================
 
-#include <IntWalk_IWLine.lxx>
+inline void IntPatch_TheIWLineOfTheIWalking::Cut(const Standard_Integer Index)
+{
+  Handle(IntSurf_LineOn2S) lost = line->Split(Index);
+}
+
+inline void IntPatch_TheIWLineOfTheIWalking::AddPoint(const IntSurf_PntOn2S& P)
+{
+  line->Add(P);
+}
+
+inline void IntPatch_TheIWLineOfTheIWalking::AddStatusFirst(const Standard_Boolean Closed,
+                                                            const Standard_Boolean HasFirst)
+{
+  closed   = Closed;
+  hasFirst = HasFirst;
+}
+
+inline void IntPatch_TheIWLineOfTheIWalking::AddStatusLast(const Standard_Boolean HasLast)
+{
+  hasLast = HasLast;
+}
+
+inline void IntPatch_TheIWLineOfTheIWalking::AddStatusFirst(const Standard_Boolean   Closed,
+                                                            const Standard_Boolean   HasFirst,
+                                                            const Standard_Integer   Index,
+                                                            const IntSurf_PathPoint& P)
+{
+  closed        = Closed;
+  hasFirst      = HasFirst;
+  firstIndex    = Index;
+  theFirstPoint = P;
+}
+
+inline void IntPatch_TheIWLineOfTheIWalking::AddStatusLast(const Standard_Boolean   HasLast,
+                                                           const Standard_Integer   Index,
+                                                           const IntSurf_PathPoint& P)
+{
+  hasLast      = HasLast;
+  lastIndex    = Index;
+  theLastPoint = P;
+}
+
+inline void IntPatch_TheIWLineOfTheIWalking::AddStatusFirstLast(const Standard_Boolean Closed,
+                                                                const Standard_Boolean HasFirst,
+                                                                const Standard_Boolean HasLast)
+{
+  closed   = Closed;
+  hasFirst = HasFirst;
+  hasLast  = HasLast;
+}
+
+inline void IntPatch_TheIWLineOfTheIWalking::AddIndexPassing(const Standard_Integer Index)
+{
+  couple.Append(IntSurf_Couple(line->NbPoints() + 1, Index));
+}
+
+inline Standard_Integer IntPatch_TheIWLineOfTheIWalking::NbPoints() const
+{
+  return line->NbPoints();
+}
+
+inline const IntSurf_PntOn2S& IntPatch_TheIWLineOfTheIWalking::Value(
+  const Standard_Integer Index) const
+{
+  return line->Value(Index);
+}
+
+inline const Handle(IntSurf_LineOn2S)& IntPatch_TheIWLineOfTheIWalking::Line() const
+{
+  return line;
+}
+
+inline Standard_Boolean IntPatch_TheIWLineOfTheIWalking::IsClosed() const
+{
+  return closed;
+}
+
+inline Standard_Boolean IntPatch_TheIWLineOfTheIWalking::HasFirstPoint() const
+{
+  return hasFirst;
+}
+
+inline Standard_Integer IntPatch_TheIWLineOfTheIWalking::FirstPointIndex() const
+{
+  if (!hasFirst)
+    throw Standard_DomainError();
+  return firstIndex;
+}
+
+inline const IntSurf_PathPoint& IntPatch_TheIWLineOfTheIWalking::FirstPoint() const
+{
+  if (!hasFirst)
+    throw Standard_DomainError();
+  return theFirstPoint;
+}
+
+inline Standard_Boolean IntPatch_TheIWLineOfTheIWalking::HasLastPoint() const
+{
+  return hasLast;
+}
+
+inline const IntSurf_PathPoint& IntPatch_TheIWLineOfTheIWalking::LastPoint() const
+{
+  if (!hasLast)
+    throw Standard_DomainError();
+  return theLastPoint;
+}
+
+inline Standard_Integer IntPatch_TheIWLineOfTheIWalking::LastPointIndex() const
+{
+  if (!hasLast)
+    throw Standard_DomainError();
+  return lastIndex;
+}
+
+inline Standard_Integer IntPatch_TheIWLineOfTheIWalking::NbPassingPoint() const
+{
+  return couple.Length();
+}
+
+inline void IntPatch_TheIWLineOfTheIWalking::PassingPoint(const Standard_Integer Index,
+                                                          Standard_Integer&      IndexLine,
+                                                          Standard_Integer&      IndexPnts) const
+{
+  IndexLine = couple(Index).First();
+  IndexPnts = couple(Index).Second();
+}
+
+inline void IntPatch_TheIWLineOfTheIWalking::SetTangentVector(const gp_Vec&          V,
+                                                              const Standard_Integer Index)
+{
+  indextg = Index;
+  vcttg   = V;
+}
+
+inline void IntPatch_TheIWLineOfTheIWalking::SetTangencyAtBegining(const Standard_Boolean IsTangent)
+{
+  istgtend = IsTangent;
+}
+
+inline void IntPatch_TheIWLineOfTheIWalking::SetTangencyAtEnd(const Standard_Boolean IsTangent)
+{
+  istgtend = IsTangent;
+}
+
+inline const gp_Vec& IntPatch_TheIWLineOfTheIWalking::TangentVector(Standard_Integer& Index) const
+{
+  Index = indextg;
+  return vcttg;
+}
 
-#undef TheStartPoint
-#undef TheStartPoint_hxx
-#undef IntWalk_IWLine
-#undef IntWalk_IWLine_hxx
-#undef Handle_IntWalk_IWLine
+inline Standard_Boolean IntPatch_TheIWLineOfTheIWalking::IsTangentAtBegining() const
+{
+  return istgtbeg;
+}
+
+inline Standard_Boolean IntPatch_TheIWLineOfTheIWalking::IsTangentAtEnd() const
+{
+  return istgtend;
+}
 
 #endif // _IntPatch_TheIWLineOfTheIWalking_HeaderFile
index a756686127a294384d799b43cf6b725dc5160b45..8c5dfd23ab20f49381f2e11db3564f04a180f768 100644 (file)
 #include <IntSurf_PntOn2S.hxx>
 #include <gp_Vec.hxx>
 
-#define TheStartPoint IntSurf_PathPoint
-#define TheStartPoint_hxx <IntSurf_PathPoint.hxx>
-#define IntWalk_IWLine IntPatch_TheIWLineOfTheIWalking
-#define IntWalk_IWLine_hxx <IntPatch_TheIWLineOfTheIWalking.hxx>
-#define Handle_IntWalk_IWLine Handle(IntPatch_TheIWLineOfTheIWalking)
-#include <IntWalk_IWLine.gxx>
+IntPatch_TheIWLineOfTheIWalking::IntPatch_TheIWLineOfTheIWalking(
+  const IntSurf_Allocator& theAllocator)
+    : line(new IntSurf_LineOn2S(theAllocator)),
+      closed(Standard_False),
+      hasFirst(Standard_False),
+      hasLast(Standard_False),
+      firstIndex(-1),
+      lastIndex(-1),
+      indextg(-1),
+      istgtbeg(Standard_False),
+      istgtend(Standard_False)
+{
+}
+
+void IntPatch_TheIWLineOfTheIWalking::Reverse()
+{
+  line->Reverse();
+  Standard_Integer N        = line->NbPoints();
+  Standard_Integer NbCouple = couple.Length();
+  for (Standard_Integer i = 1; i <= NbCouple; i++)
+  {
+    couple(i) = IntSurf_Couple(N - couple(i).First() + 1, couple(i).Second());
+  }
+}
index 0d63e7683d00cdd14b4bebe29c5d146b58d4c369..6b53c36039b8f9a4bfccaaa9f7da18ebe2e6fb84 100644 (file)
@@ -75,20 +75,68 @@ private:
   Standard_Real             param;
 };
 
-#define TheVertex Handle(Adaptor3d_HVertex)
-#define TheVertex_hxx <Adaptor3d_HVertex.hxx>
-#define TheArc Handle(Adaptor2d_Curve2d)
-#define TheArc_hxx <Adaptor2d_Curve2d.hxx>
-#define IntStart_PathPoint IntPatch_ThePathPointOfTheSOnBounds
-#define IntStart_PathPoint_hxx <IntPatch_ThePathPointOfTheSOnBounds.hxx>
-
-#include <IntStart_PathPoint.lxx>
-
-#undef TheVertex
-#undef TheVertex_hxx
-#undef TheArc
-#undef TheArc_hxx
-#undef IntStart_PathPoint
-#undef IntStart_PathPoint_hxx
+//=================================================================================================
+// Inline implementations
+//=================================================================================================
+
+inline void IntPatch_ThePathPointOfTheSOnBounds::SetValue(const gp_Pnt&                    P,
+                                                          const Standard_Real              Tol,
+                                                          const Handle(Adaptor3d_HVertex)& V,
+                                                          const Handle(Adaptor2d_Curve2d)& A,
+                                                          const Standard_Real Parameter)
+{
+  isnew = Standard_False;
+  point = P;
+  tol   = Tol;
+  vtx   = V;
+  arc   = A;
+  param = Parameter;
+}
+
+inline void IntPatch_ThePathPointOfTheSOnBounds::SetValue(const gp_Pnt&                    P,
+                                                          const Standard_Real              Tol,
+                                                          const Handle(Adaptor2d_Curve2d)& A,
+                                                          const Standard_Real Parameter)
+{
+  isnew = Standard_True;
+  point = P;
+  tol   = Tol;
+  arc   = A;
+  param = Parameter;
+}
+
+inline const gp_Pnt& IntPatch_ThePathPointOfTheSOnBounds::Value() const
+{
+  return point;
+}
+
+inline Standard_Real IntPatch_ThePathPointOfTheSOnBounds::Tolerance() const
+{
+  return tol;
+}
+
+inline Standard_Boolean IntPatch_ThePathPointOfTheSOnBounds::IsNew() const
+{
+  return isnew;
+}
+
+inline const Handle(Adaptor3d_HVertex)& IntPatch_ThePathPointOfTheSOnBounds::Vertex() const
+{
+  if (isnew)
+  {
+    throw Standard_DomainError();
+  }
+  return vtx;
+}
+
+inline const Handle(Adaptor2d_Curve2d)& IntPatch_ThePathPointOfTheSOnBounds::Arc() const
+{
+  return arc;
+}
+
+inline Standard_Real IntPatch_ThePathPointOfTheSOnBounds::Parameter() const
+{
+  return param;
+}
 
 #endif // _IntPatch_ThePathPointOfTheSOnBounds_HeaderFile
index f6f375821d0ddb7f97b479387d4ab577cba6443b..c5a4c8932420818ef91efb852c7e0e75b4e40c09 100644 (file)
 #include <Standard_DomainError.hxx>
 #include <gp_Pnt.hxx>
 
-#define TheVertex Handle(Adaptor3d_HVertex)
-#define TheVertex_hxx <Adaptor3d_HVertex.hxx>
-#define TheArc Handle(Adaptor2d_Curve2d)
-#define TheArc_hxx <Adaptor2d_Curve2d.hxx>
-#define IntStart_PathPoint IntPatch_ThePathPointOfTheSOnBounds
-#define IntStart_PathPoint_hxx <IntPatch_ThePathPointOfTheSOnBounds.hxx>
-#include <IntStart_PathPoint.gxx>
+IntPatch_ThePathPointOfTheSOnBounds::IntPatch_ThePathPointOfTheSOnBounds()
+    : tol(0.0),
+      isnew(Standard_True),
+      param(0.0)
+{
+}
+
+IntPatch_ThePathPointOfTheSOnBounds::IntPatch_ThePathPointOfTheSOnBounds(
+  const gp_Pnt&                    P,
+  const Standard_Real              Tol,
+  const Handle(Adaptor3d_HVertex)& V,
+  const Handle(Adaptor2d_Curve2d)& A,
+  const Standard_Real              Parameter)
+    : point(P),
+      tol(Tol),
+      isnew(Standard_False),
+      vtx(V),
+      arc(A),
+      param(Parameter)
+{
+}
+
+IntPatch_ThePathPointOfTheSOnBounds::IntPatch_ThePathPointOfTheSOnBounds(
+  const gp_Pnt&                    P,
+  const Standard_Real              Tol,
+  const Handle(Adaptor2d_Curve2d)& A,
+  const Standard_Real              Parameter)
+    : point(P),
+      tol(Tol),
+      isnew(Standard_True),
+      arc(A),
+      param(Parameter)
+{
+}
index 5857a473f44e1b31ae6b998e250388e14da29585..fba4378c6dc5d35acf6d40f507673bc05dca51a7 100644 (file)
@@ -70,24 +70,50 @@ private:
   IntPatch_ThePathPointOfTheSOnBounds thelp;
 };
 
-#define TheVertex Handle(Adaptor3d_HVertex)
-#define TheVertex_hxx <Adaptor3d_HVertex.hxx>
-#define TheArc Handle(Adaptor2d_Curve2d)
-#define TheArc_hxx <Adaptor2d_Curve2d.hxx>
-#define ThePathPoint IntPatch_ThePathPointOfTheSOnBounds
-#define ThePathPoint_hxx <IntPatch_ThePathPointOfTheSOnBounds.hxx>
-#define IntStart_Segment IntPatch_TheSegmentOfTheSOnBounds
-#define IntStart_Segment_hxx <IntPatch_TheSegmentOfTheSOnBounds.hxx>
-
-#include <IntStart_Segment.lxx>
-
-#undef TheVertex
-#undef TheVertex_hxx
-#undef TheArc
-#undef TheArc_hxx
-#undef ThePathPoint
-#undef ThePathPoint_hxx
-#undef IntStart_Segment
-#undef IntStart_Segment_hxx
+//=================================================================================================
+// Inline implementations
+//=================================================================================================
+
+inline void IntPatch_TheSegmentOfTheSOnBounds::SetValue(const Handle(Adaptor2d_Curve2d)& A)
+{
+  hasfp = Standard_False;
+  haslp = Standard_False;
+  arc   = A;
+}
+
+inline const Handle(Adaptor2d_Curve2d)& IntPatch_TheSegmentOfTheSOnBounds::Curve() const
+{
+  return arc;
+}
+
+inline Standard_Boolean IntPatch_TheSegmentOfTheSOnBounds::HasFirstPoint() const
+{
+  return hasfp;
+}
+
+inline const IntPatch_ThePathPointOfTheSOnBounds& IntPatch_TheSegmentOfTheSOnBounds::FirstPoint()
+  const
+{
+  if (!hasfp)
+  {
+    throw Standard_DomainError();
+  }
+  return thefp;
+}
+
+inline Standard_Boolean IntPatch_TheSegmentOfTheSOnBounds::HasLastPoint() const
+{
+  return haslp;
+}
+
+inline const IntPatch_ThePathPointOfTheSOnBounds& IntPatch_TheSegmentOfTheSOnBounds::LastPoint()
+  const
+{
+  if (!haslp)
+  {
+    throw Standard_DomainError();
+  }
+  return thelp;
+}
 
 #endif // _IntPatch_TheSegmentOfTheSOnBounds_HeaderFile
index 1f10705eb89f7b9a87f6ddd9a3fb284deb12a186..90f0c890dba21949ae7ff6070444974667b5260e 100644 (file)
 #include <Adaptor3d_HVertex.hxx>
 #include <IntPatch_ThePathPointOfTheSOnBounds.hxx>
 
-#define TheVertex Handle(Adaptor3d_HVertex)
-#define TheVertex_hxx <Adaptor3d_HVertex.hxx>
-#define TheArc Handle(Adaptor2d_Curve2d)
-#define TheArc_hxx <Adaptor2d_Curve2d.hxx>
-#define ThePathPoint IntPatch_ThePathPointOfTheSOnBounds
-#define ThePathPoint_hxx <IntPatch_ThePathPointOfTheSOnBounds.hxx>
-#define IntStart_Segment IntPatch_TheSegmentOfTheSOnBounds
-#define IntStart_Segment_hxx <IntPatch_TheSegmentOfTheSOnBounds.hxx>
-#include <IntStart_Segment.gxx>
+IntPatch_TheSegmentOfTheSOnBounds::IntPatch_TheSegmentOfTheSOnBounds()
+    : hasfp(Standard_False),
+      haslp(Standard_False)
+{
+}
+
+void IntPatch_TheSegmentOfTheSOnBounds::SetLimitPoint(const IntPatch_ThePathPointOfTheSOnBounds& V,
+                                                      const Standard_Boolean First)
+{
+  if (First)
+  {
+    hasfp = Standard_True;
+    thefp = V;
+  }
+  else
+  {
+    haslp = Standard_True;
+    thelp = V;
+  }
+}
index 434e7832c2978e36ace2146bb11506cfbeb42a44..0173015fbeee5ecb95cf362380035608cc031061 100644 (file)
@@ -2,14 +2,10 @@
 set(OCCT_IntStart_FILES_LOCATION "${CMAKE_CURRENT_LIST_DIR}")
 
 set(OCCT_IntStart_FILES
-  IntStart_PathPoint.gxx
-  IntStart_PathPoint.lxx
   IntStart_SearchInside.gxx
   IntStart_SearchInside.lxx
   IntStart_SearchOnBoundaries.gxx
   IntStart_SearchOnBoundaries.lxx
-  IntStart_Segment.gxx
-  IntStart_Segment.lxx
   IntStart_SITopolTool.cxx
   IntStart_SITopolTool.hxx
 )
diff --git a/src/ModelingAlgorithms/TKGeomAlgo/IntStart/IntStart_PathPoint.gxx b/src/ModelingAlgorithms/TKGeomAlgo/IntStart/IntStart_PathPoint.gxx
deleted file mode 100644 (file)
index 8b54daf..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-// 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.
-
-IntStart_PathPoint::IntStart_PathPoint()
-    : tol(0.0),
-      isnew(Standard_True),
-      param(0.0)
-{
-}
-
-IntStart_PathPoint::IntStart_PathPoint(const gp_Pnt&       P,
-                                       const Standard_Real Tol,
-                                       const TheVertex&    V,
-                                       const TheArc&       A,
-                                       const Standard_Real Parameter)
-    :
-
-      point(P),
-      tol(Tol),
-      isnew(Standard_False),
-      vtx(V),
-      arc(A),
-      param(Parameter)
-{
-}
-
-IntStart_PathPoint::IntStart_PathPoint(const gp_Pnt&       P,
-                                       const Standard_Real Tol,
-                                       const TheArc&       A,
-                                       const Standard_Real Parameter)
-    :
-
-      point(P),
-      tol(Tol),
-      isnew(Standard_True),
-      arc(A),
-      param(Parameter)
-{
-}
diff --git a/src/ModelingAlgorithms/TKGeomAlgo/IntStart/IntStart_PathPoint.lxx b/src/ModelingAlgorithms/TKGeomAlgo/IntStart/IntStart_PathPoint.lxx
deleted file mode 100644 (file)
index 2cfe7f3..0000000
+++ /dev/null
@@ -1,83 +0,0 @@
-// 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 <Standard_DomainError.hxx>
-
-inline void IntStart_PathPoint::SetValue(const gp_Pnt&       P,
-                                         const Standard_Real Tol,
-                                         const TheVertex&    V,
-                                         const TheArc&       A,
-                                         const Standard_Real Parameter)
-{
-
-  isnew = Standard_False;
-  point = P;
-  tol   = Tol;
-  vtx   = V;
-  arc   = A;
-  param = Parameter;
-}
-
-inline void IntStart_PathPoint::SetValue(const gp_Pnt&       P,
-                                         const Standard_Real Tol,
-                                         const TheArc&       A,
-                                         const Standard_Real Parameter)
-{
-
-  isnew = Standard_True;
-  point = P;
-  tol   = Tol;
-  arc   = A;
-  param = Parameter;
-}
-
-inline const gp_Pnt& IntStart_PathPoint::Value() const
-{
-
-  return point;
-}
-
-inline Standard_Real IntStart_PathPoint::Tolerance() const
-{
-
-  return tol;
-}
-
-inline Standard_Boolean IntStart_PathPoint::IsNew() const
-{
-
-  return isnew;
-}
-
-inline const TheVertex& IntStart_PathPoint::Vertex() const
-{
-
-  if (isnew)
-  {
-    throw Standard_DomainError();
-  }
-  return vtx;
-}
-
-inline const TheArc& IntStart_PathPoint::Arc() const
-{
-
-  return arc;
-}
-
-inline Standard_Real IntStart_PathPoint::Parameter() const
-{
-
-  return param;
-}
diff --git a/src/ModelingAlgorithms/TKGeomAlgo/IntStart/IntStart_Segment.gxx b/src/ModelingAlgorithms/TKGeomAlgo/IntStart/IntStart_Segment.gxx
deleted file mode 100644 (file)
index d41b013..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-// 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.
-
-IntStart_Segment::IntStart_Segment()
-    : hasfp(Standard_False),
-      haslp(Standard_False)
-{
-}
-
-void IntStart_Segment::SetLimitPoint(const ThePathPoint& V, const Standard_Boolean First)
-{
-
-  if (First)
-  {
-    hasfp = Standard_True;
-    thefp = V;
-  }
-  else
-  {
-    haslp = Standard_True;
-    thelp = V;
-  }
-}
diff --git a/src/ModelingAlgorithms/TKGeomAlgo/IntStart/IntStart_Segment.lxx b/src/ModelingAlgorithms/TKGeomAlgo/IntStart/IntStart_Segment.lxx
deleted file mode 100644 (file)
index 14190dd..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-// 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 <Standard_DomainError.hxx>
-
-inline void IntStart_Segment::SetValue(const TheArc& A)
-{
-
-  hasfp = Standard_False;
-  haslp = Standard_False;
-  arc   = A;
-}
-
-inline const TheArc& IntStart_Segment::Curve() const
-{
-
-  return arc;
-}
-
-inline Standard_Boolean IntStart_Segment::HasFirstPoint() const
-{
-
-  return hasfp;
-}
-
-inline const ThePathPoint& IntStart_Segment::FirstPoint() const
-{
-
-  if (!hasfp)
-  {
-    throw Standard_DomainError();
-  }
-  return thefp;
-}
-
-inline Standard_Boolean IntStart_Segment::HasLastPoint() const
-{
-
-  return haslp;
-}
-
-inline const ThePathPoint& IntStart_Segment::LastPoint() const
-{
-
-  if (!haslp)
-  {
-    throw Standard_DomainError();
-  }
-  return thelp;
-}
index c2efbdb9cd75745a1c17a66462d0b0458e50948a..05628d9bbf2f206448f2844be79252cbd4f5c5a9 100644 (file)
@@ -4,8 +4,6 @@ set(OCCT_IntWalk_FILES_LOCATION "${CMAKE_CURRENT_LIST_DIR}")
 set(OCCT_IntWalk_FILES
   IntWalk_IWalking.gxx
   IntWalk_IWalking.lxx
-  IntWalk_IWLine.gxx
-  IntWalk_IWLine.lxx
   IntWalk_PWalking.cxx
   IntWalk_PWalking.hxx
   IntWalk_PWalking.lxx
diff --git a/src/ModelingAlgorithms/TKGeomAlgo/IntWalk/IntWalk_IWLine.gxx b/src/ModelingAlgorithms/TKGeomAlgo/IntWalk/IntWalk_IWLine.gxx
deleted file mode 100644 (file)
index d8715e1..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-// 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 <IntSurf_Couple.hxx>
-
-IntWalk_IWLine::IntWalk_IWLine(const IntSurf_Allocator& theAllocator)
-    : line(new IntSurf_LineOn2S(theAllocator)),
-      closed(Standard_False),
-      hasFirst(Standard_False),
-      hasLast(Standard_False),
-      firstIndex(-1),
-      lastIndex(-1),
-      indextg(-1),
-      istgtbeg(Standard_False),
-      istgtend(Standard_False)
-{
-}
-
-void IntWalk_IWLine::Reverse()
-{
-  line->Reverse();
-  Standard_Integer N        = line->NbPoints();
-  Standard_Integer NbCouple = couple.Length();
-  for (Standard_Integer i = 1; i <= NbCouple; i++)
-  {
-    couple(i) = IntSurf_Couple(N - couple(i).First() + 1, couple(i).Second());
-  }
-}
diff --git a/src/ModelingAlgorithms/TKGeomAlgo/IntWalk/IntWalk_IWLine.lxx b/src/ModelingAlgorithms/TKGeomAlgo/IntWalk/IntWalk_IWLine.lxx
deleted file mode 100644 (file)
index aaf815b..0000000
+++ /dev/null
@@ -1,189 +0,0 @@
-// 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 <Standard_DomainError.hxx>
-#include <IntSurf_LineOn2S.hxx>
-#include <IntSurf_Couple.hxx>
-#include <IntSurf_SequenceOfCouple.hxx>
-
-inline void IntWalk_IWLine::Cut(const Standard_Integer Index)
-{
-  //--   std::cout<<" split : "<<Index<<std::endl;
-  Handle(IntSurf_LineOn2S) lost = line->Split(Index);
-}
-
-inline void IntWalk_IWLine::AddPoint(const IntSurf_PntOn2S& P)
-{
-  line->Add(P);
-}
-
-inline void IntWalk_IWLine::AddStatusFirst(const Standard_Boolean Closed,
-                                           const Standard_Boolean HasFirst)
-{
-  closed   = Closed;
-  hasFirst = HasFirst;
-}
-
-inline void IntWalk_IWLine::AddStatusLast(const Standard_Boolean HasLast)
-{
-  hasLast = HasLast;
-}
-
-inline void IntWalk_IWLine::AddStatusFirst(const Standard_Boolean Closed,
-                                           const Standard_Boolean HasFirst,
-                                           const Standard_Integer Index,
-                                           const TheStartPoint&   P)
-{
-  closed        = Closed;
-  hasFirst      = HasFirst;
-  firstIndex    = Index;
-  theFirstPoint = P;
-}
-
-inline void IntWalk_IWLine::AddStatusLast(const Standard_Boolean HasLast,
-                                          const Standard_Integer Index,
-                                          const TheStartPoint&   P)
-{
-  hasLast      = HasLast;
-  lastIndex    = Index;
-  theLastPoint = P;
-}
-
-inline void IntWalk_IWLine::AddStatusFirstLast(const Standard_Boolean Closed,
-                                               const Standard_Boolean HasFirst,
-                                               const Standard_Boolean HasLast)
-{
-  closed   = Closed;
-  hasFirst = HasFirst;
-  hasLast  = HasLast;
-}
-
-inline void IntWalk_IWLine::AddIndexPassing(const Standard_Integer Index)
-
-{
-  couple.Append(IntSurf_Couple(line->NbPoints() + 1, Index));
-}
-
-inline Standard_Integer IntWalk_IWLine::NbPoints() const
-{
-  return line->NbPoints();
-}
-
-inline const IntSurf_PntOn2S& IntWalk_IWLine::Value(const Standard_Integer Index) const
-{
-  return line->Value(Index);
-}
-
-inline const Handle(IntSurf_LineOn2S)& IntWalk_IWLine::Line() const
-{
-  return line;
-}
-
-inline Standard_Boolean IntWalk_IWLine::IsClosed() const
-{
-  return closed;
-}
-
-inline Standard_Boolean IntWalk_IWLine::HasFirstPoint() const
-{
-  return hasFirst;
-}
-
-inline Standard_Integer IntWalk_IWLine::FirstPointIndex() const
-{
-  if (!hasFirst)
-    throw Standard_DomainError();
-  return firstIndex;
-}
-
-inline const TheStartPoint& IntWalk_IWLine::FirstPoint() const
-{
-  if (!hasFirst)
-    throw Standard_DomainError();
-  return theFirstPoint;
-}
-
-inline Standard_Boolean IntWalk_IWLine::HasLastPoint() const
-{
-  return hasLast;
-}
-
-inline const TheStartPoint& IntWalk_IWLine::LastPoint() const
-{
-  if (!hasLast)
-    throw Standard_DomainError();
-  return theLastPoint;
-}
-
-inline Standard_Integer IntWalk_IWLine::LastPointIndex() const
-{
-  if (!hasLast)
-    throw Standard_DomainError();
-  return lastIndex;
-}
-
-inline Standard_Integer IntWalk_IWLine::NbPassingPoint() const
-{
-  return couple.Length();
-}
-
-inline void IntWalk_IWLine::PassingPoint(const Standard_Integer Index,
-                                         Standard_Integer&      IndexLine,
-                                         Standard_Integer&      IndexPnts) const
-{
-  IndexLine = couple(Index).First();
-  IndexPnts = couple(Index).Second();
-}
-
-inline void IntWalk_IWLine::SetTangentVector(const gp_Vec& V, const Standard_Integer Index)
-{
-  indextg = Index;
-  vcttg   = V;
-
-  //-- std::cout<<"\n IntWalk_IWLine::SetTangentVector : "<<V.X()<<" "<<V.Y()<<" "<<V.Z()<<"
-  // Ind:"<<Index<<"  NbPts:"<<NbPoints()<<std::endl;
-}
-
-inline void IntWalk_IWLine::SetTangencyAtBegining(const Standard_Boolean IsTangent)
-{
-
-  istgtend = IsTangent;
-}
-
-inline void IntWalk_IWLine::SetTangencyAtEnd(const Standard_Boolean IsTangent)
-{
-
-  istgtend = IsTangent;
-}
-
-inline const gp_Vec& IntWalk_IWLine::TangentVector(Standard_Integer& Index) const
-{
-  //--    if(istgtend == Standard_False && istgtbeg == Standard_False) {
-  //--      std::cout<<" IntWalk_IWLine.lxx : Pb "<<std::endl;
-  //--    }
-  Index = indextg;
-  return vcttg;
-}
-
-inline Standard_Boolean IntWalk_IWLine::IsTangentAtBegining() const
-{
-
-  return istgtbeg;
-}
-
-inline Standard_Boolean IntWalk_IWLine::IsTangentAtEnd() const
-{
-
-  return istgtend;
-}
index 80b98d73eeb7a1c3631bdae8f9c43ffb1debfd35..2b002a8d20d742432afd7fe4de07f9f8ee80a908 100644 (file)
@@ -27,7 +27,7 @@
 #include <gp_Vec.hxx>
 #include <Standard_Transient.hxx>
 #include <IntSurf_Allocator.hxx>
-class IntSurf_LineOn2S;
+#include <IntSurf_LineOn2S.hxx>
 class Standard_OutOfRange;
 class Standard_DomainError;
 class IntSurf_PathPoint;
@@ -164,18 +164,169 @@ private:
   Standard_Boolean         istgtend;
 };
 
-#define TheStartPoint IntSurf_PathPoint
-#define TheStartPoint_hxx <IntSurf_PathPoint.hxx>
-#define IntWalk_IWLine Contap_TheIWLineOfTheIWalking
-#define IntWalk_IWLine_hxx <Contap_TheIWLineOfTheIWalking.hxx>
-#define Handle_IntWalk_IWLine Handle(Contap_TheIWLineOfTheIWalking)
+//=================================================================================================
+// Inline implementations
+//=================================================================================================
 
-#include <IntWalk_IWLine.lxx>
+inline void Contap_TheIWLineOfTheIWalking::Cut(const Standard_Integer Index)
+{
+  Handle(IntSurf_LineOn2S) lost = line->Split(Index);
+}
+
+inline void Contap_TheIWLineOfTheIWalking::AddPoint(const IntSurf_PntOn2S& P)
+{
+  line->Add(P);
+}
+
+inline void Contap_TheIWLineOfTheIWalking::AddStatusFirst(const Standard_Boolean Closed,
+                                                          const Standard_Boolean HasFirst)
+{
+  closed   = Closed;
+  hasFirst = HasFirst;
+}
+
+inline void Contap_TheIWLineOfTheIWalking::AddStatusLast(const Standard_Boolean HasLast)
+{
+  hasLast = HasLast;
+}
+
+inline void Contap_TheIWLineOfTheIWalking::AddStatusFirst(const Standard_Boolean   Closed,
+                                                          const Standard_Boolean   HasFirst,
+                                                          const Standard_Integer   Index,
+                                                          const IntSurf_PathPoint& P)
+{
+  closed        = Closed;
+  hasFirst      = HasFirst;
+  firstIndex    = Index;
+  theFirstPoint = P;
+}
+
+inline void Contap_TheIWLineOfTheIWalking::AddStatusLast(const Standard_Boolean   HasLast,
+                                                         const Standard_Integer   Index,
+                                                         const IntSurf_PathPoint& P)
+{
+  hasLast      = HasLast;
+  lastIndex    = Index;
+  theLastPoint = P;
+}
+
+inline void Contap_TheIWLineOfTheIWalking::AddStatusFirstLast(const Standard_Boolean Closed,
+                                                              const Standard_Boolean HasFirst,
+                                                              const Standard_Boolean HasLast)
+{
+  closed   = Closed;
+  hasFirst = HasFirst;
+  hasLast  = HasLast;
+}
+
+inline void Contap_TheIWLineOfTheIWalking::AddIndexPassing(const Standard_Integer Index)
+{
+  couple.Append(IntSurf_Couple(line->NbPoints() + 1, Index));
+}
+
+inline Standard_Integer Contap_TheIWLineOfTheIWalking::NbPoints() const
+{
+  return line->NbPoints();
+}
+
+inline const IntSurf_PntOn2S& Contap_TheIWLineOfTheIWalking::Value(
+  const Standard_Integer Index) const
+{
+  return line->Value(Index);
+}
+
+inline const Handle(IntSurf_LineOn2S)& Contap_TheIWLineOfTheIWalking::Line() const
+{
+  return line;
+}
+
+inline Standard_Boolean Contap_TheIWLineOfTheIWalking::IsClosed() const
+{
+  return closed;
+}
+
+inline Standard_Boolean Contap_TheIWLineOfTheIWalking::HasFirstPoint() const
+{
+  return hasFirst;
+}
+
+inline Standard_Integer Contap_TheIWLineOfTheIWalking::FirstPointIndex() const
+{
+  if (!hasFirst)
+    throw Standard_DomainError();
+  return firstIndex;
+}
+
+inline const IntSurf_PathPoint& Contap_TheIWLineOfTheIWalking::FirstPoint() const
+{
+  if (!hasFirst)
+    throw Standard_DomainError();
+  return theFirstPoint;
+}
+
+inline Standard_Boolean Contap_TheIWLineOfTheIWalking::HasLastPoint() const
+{
+  return hasLast;
+}
+
+inline const IntSurf_PathPoint& Contap_TheIWLineOfTheIWalking::LastPoint() const
+{
+  if (!hasLast)
+    throw Standard_DomainError();
+  return theLastPoint;
+}
+
+inline Standard_Integer Contap_TheIWLineOfTheIWalking::LastPointIndex() const
+{
+  if (!hasLast)
+    throw Standard_DomainError();
+  return lastIndex;
+}
+
+inline Standard_Integer Contap_TheIWLineOfTheIWalking::NbPassingPoint() const
+{
+  return couple.Length();
+}
+
+inline void Contap_TheIWLineOfTheIWalking::PassingPoint(const Standard_Integer Index,
+                                                        Standard_Integer&      IndexLine,
+                                                        Standard_Integer&      IndexPnts) const
+{
+  IndexLine = couple(Index).First();
+  IndexPnts = couple(Index).Second();
+}
+
+inline void Contap_TheIWLineOfTheIWalking::SetTangentVector(const gp_Vec&          V,
+                                                            const Standard_Integer Index)
+{
+  indextg = Index;
+  vcttg   = V;
+}
+
+inline void Contap_TheIWLineOfTheIWalking::SetTangencyAtBegining(const Standard_Boolean IsTangent)
+{
+  istgtend = IsTangent;
+}
+
+inline void Contap_TheIWLineOfTheIWalking::SetTangencyAtEnd(const Standard_Boolean IsTangent)
+{
+  istgtend = IsTangent;
+}
+
+inline const gp_Vec& Contap_TheIWLineOfTheIWalking::TangentVector(Standard_Integer& Index) const
+{
+  Index = indextg;
+  return vcttg;
+}
 
-#undef TheStartPoint
-#undef TheStartPoint_hxx
-#undef IntWalk_IWLine
-#undef IntWalk_IWLine_hxx
-#undef Handle_IntWalk_IWLine
+inline Standard_Boolean Contap_TheIWLineOfTheIWalking::IsTangentAtBegining() const
+{
+  return istgtbeg;
+}
+
+inline Standard_Boolean Contap_TheIWLineOfTheIWalking::IsTangentAtEnd() const
+{
+  return istgtend;
+}
 
 #endif // _Contap_TheIWLineOfTheIWalking_HeaderFile
index d8801ef798c759ec5d4b4763e359c4b7679407bf..240f1776f456d904f5a6b5d94dd574f981607443 100644 (file)
 #include <IntSurf_PntOn2S.hxx>
 #include <gp_Vec.hxx>
 
-#define TheStartPoint IntSurf_PathPoint
-#define TheStartPoint_hxx <IntSurf_PathPoint.hxx>
-#define IntWalk_IWLine Contap_TheIWLineOfTheIWalking
-#define IntWalk_IWLine_hxx <Contap_TheIWLineOfTheIWalking.hxx>
-#define Handle_IntWalk_IWLine Handle(Contap_TheIWLineOfTheIWalking)
-#include <IntWalk_IWLine.gxx>
+Contap_TheIWLineOfTheIWalking::Contap_TheIWLineOfTheIWalking(const IntSurf_Allocator& theAllocator)
+    : line(new IntSurf_LineOn2S(theAllocator)),
+      closed(Standard_False),
+      hasFirst(Standard_False),
+      hasLast(Standard_False),
+      firstIndex(-1),
+      lastIndex(-1),
+      indextg(-1),
+      istgtbeg(Standard_False),
+      istgtend(Standard_False)
+{
+}
+
+void Contap_TheIWLineOfTheIWalking::Reverse()
+{
+  line->Reverse();
+  Standard_Integer N        = line->NbPoints();
+  Standard_Integer NbCouple = couple.Length();
+  for (Standard_Integer i = 1; i <= NbCouple; i++)
+  {
+    couple(i) = IntSurf_Couple(N - couple(i).First() + 1, couple(i).Second());
+  }
+}
index a8a79fc4bb7e8697542a92929a81b137faae2519..521f0c63bfe8bb5632f821a25a576d1ca99b95dc 100644 (file)
@@ -75,20 +75,68 @@ private:
   Standard_Real             param;
 };
 
-#define TheVertex Handle(Adaptor3d_HVertex)
-#define TheVertex_hxx <Adaptor3d_HVertex.hxx>
-#define TheArc Handle(Adaptor2d_Curve2d)
-#define TheArc_hxx <Adaptor2d_Curve2d.hxx>
-#define IntStart_PathPoint Contap_ThePathPointOfTheSearch
-#define IntStart_PathPoint_hxx <Contap_ThePathPointOfTheSearch.hxx>
-
-#include <IntStart_PathPoint.lxx>
-
-#undef TheVertex
-#undef TheVertex_hxx
-#undef TheArc
-#undef TheArc_hxx
-#undef IntStart_PathPoint
-#undef IntStart_PathPoint_hxx
+//=================================================================================================
+// Inline implementations
+//=================================================================================================
+
+inline void Contap_ThePathPointOfTheSearch::SetValue(const gp_Pnt&                    P,
+                                                     const Standard_Real              Tol,
+                                                     const Handle(Adaptor3d_HVertex)& V,
+                                                     const Handle(Adaptor2d_Curve2d)& A,
+                                                     const Standard_Real              Parameter)
+{
+  isnew = Standard_False;
+  point = P;
+  tol   = Tol;
+  vtx   = V;
+  arc   = A;
+  param = Parameter;
+}
+
+inline void Contap_ThePathPointOfTheSearch::SetValue(const gp_Pnt&                    P,
+                                                     const Standard_Real              Tol,
+                                                     const Handle(Adaptor2d_Curve2d)& A,
+                                                     const Standard_Real              Parameter)
+{
+  isnew = Standard_True;
+  point = P;
+  tol   = Tol;
+  arc   = A;
+  param = Parameter;
+}
+
+inline const gp_Pnt& Contap_ThePathPointOfTheSearch::Value() const
+{
+  return point;
+}
+
+inline Standard_Real Contap_ThePathPointOfTheSearch::Tolerance() const
+{
+  return tol;
+}
+
+inline Standard_Boolean Contap_ThePathPointOfTheSearch::IsNew() const
+{
+  return isnew;
+}
+
+inline const Handle(Adaptor3d_HVertex)& Contap_ThePathPointOfTheSearch::Vertex() const
+{
+  if (isnew)
+  {
+    throw Standard_DomainError();
+  }
+  return vtx;
+}
+
+inline const Handle(Adaptor2d_Curve2d)& Contap_ThePathPointOfTheSearch::Arc() const
+{
+  return arc;
+}
+
+inline Standard_Real Contap_ThePathPointOfTheSearch::Parameter() const
+{
+  return param;
+}
 
 #endif // _Contap_ThePathPointOfTheSearch_HeaderFile
index 14a488b303b14fee969401ff30ce3ed3575c02e4..f6be45807fade503d367c565ce3cf93738572260 100644 (file)
 #include <Standard_DomainError.hxx>
 #include <gp_Pnt.hxx>
 
-#define TheVertex Handle(Adaptor3d_HVertex)
-#define TheVertex_hxx <Adaptor3d_HVertex.hxx>
-#define TheArc Handle(Adaptor2d_Curve2d)
-#define TheArc_hxx <Adaptor2d_Curve2d.hxx>
-#define IntStart_PathPoint Contap_ThePathPointOfTheSearch
-#define IntStart_PathPoint_hxx <Contap_ThePathPointOfTheSearch.hxx>
-#include <IntStart_PathPoint.gxx>
+Contap_ThePathPointOfTheSearch::Contap_ThePathPointOfTheSearch()
+    : tol(0.0),
+      isnew(Standard_True),
+      param(0.0)
+{
+}
+
+Contap_ThePathPointOfTheSearch::Contap_ThePathPointOfTheSearch(const gp_Pnt&                    P,
+                                                               const Standard_Real              Tol,
+                                                               const Handle(Adaptor3d_HVertex)& V,
+                                                               const Handle(Adaptor2d_Curve2d)& A,
+                                                               const Standard_Real Parameter)
+    : point(P),
+      tol(Tol),
+      isnew(Standard_False),
+      vtx(V),
+      arc(A),
+      param(Parameter)
+{
+}
+
+Contap_ThePathPointOfTheSearch::Contap_ThePathPointOfTheSearch(const gp_Pnt&                    P,
+                                                               const Standard_Real              Tol,
+                                                               const Handle(Adaptor2d_Curve2d)& A,
+                                                               const Standard_Real Parameter)
+    : point(P),
+      tol(Tol),
+      isnew(Standard_True),
+      arc(A),
+      param(Parameter)
+{
+}
index fc165474738c004d498240154f6d01acb76cc8d1..0cc441f38e04724b7357e174ea626a3785e17f34 100644 (file)
@@ -67,24 +67,48 @@ private:
   Contap_ThePathPointOfTheSearch thelp;
 };
 
-#define TheVertex Handle(Adaptor3d_HVertex)
-#define TheVertex_hxx <Adaptor3d_HVertex.hxx>
-#define TheArc Handle(Adaptor2d_Curve2d)
-#define TheArc_hxx <Adaptor2d_Curve2d.hxx>
-#define ThePathPoint Contap_ThePathPointOfTheSearch
-#define ThePathPoint_hxx <Contap_ThePathPointOfTheSearch.hxx>
-#define IntStart_Segment Contap_TheSegmentOfTheSearch
-#define IntStart_Segment_hxx <Contap_TheSegmentOfTheSearch.hxx>
-
-#include <IntStart_Segment.lxx>
-
-#undef TheVertex
-#undef TheVertex_hxx
-#undef TheArc
-#undef TheArc_hxx
-#undef ThePathPoint
-#undef ThePathPoint_hxx
-#undef IntStart_Segment
-#undef IntStart_Segment_hxx
+//=================================================================================================
+// Inline implementations
+//=================================================================================================
+
+inline void Contap_TheSegmentOfTheSearch::SetValue(const Handle(Adaptor2d_Curve2d)& A)
+{
+  hasfp = Standard_False;
+  haslp = Standard_False;
+  arc   = A;
+}
+
+inline const Handle(Adaptor2d_Curve2d)& Contap_TheSegmentOfTheSearch::Curve() const
+{
+  return arc;
+}
+
+inline Standard_Boolean Contap_TheSegmentOfTheSearch::HasFirstPoint() const
+{
+  return hasfp;
+}
+
+inline const Contap_ThePathPointOfTheSearch& Contap_TheSegmentOfTheSearch::FirstPoint() const
+{
+  if (!hasfp)
+  {
+    throw Standard_DomainError();
+  }
+  return thefp;
+}
+
+inline Standard_Boolean Contap_TheSegmentOfTheSearch::HasLastPoint() const
+{
+  return haslp;
+}
+
+inline const Contap_ThePathPointOfTheSearch& Contap_TheSegmentOfTheSearch::LastPoint() const
+{
+  if (!haslp)
+  {
+    throw Standard_DomainError();
+  }
+  return thelp;
+}
 
 #endif // _Contap_TheSegmentOfTheSearch_HeaderFile
index a1945998393260298431f4501c9bcc41323dc315..f5d8262c8e0113fd27ab0eb755b5ab758f852230 100644 (file)
 #include <Adaptor3d_HVertex.hxx>
 #include <Contap_ThePathPointOfTheSearch.hxx>
 
-#define TheVertex Handle(Adaptor3d_HVertex)
-#define TheVertex_hxx <Adaptor3d_HVertex.hxx>
-#define TheArc Handle(Adaptor2d_Curve2d)
-#define TheArc_hxx <Adaptor2d_Curve2d.hxx>
-#define ThePathPoint Contap_ThePathPointOfTheSearch
-#define ThePathPoint_hxx <Contap_ThePathPointOfTheSearch.hxx>
-#define IntStart_Segment Contap_TheSegmentOfTheSearch
-#define IntStart_Segment_hxx <Contap_TheSegmentOfTheSearch.hxx>
-#include <IntStart_Segment.gxx>
+Contap_TheSegmentOfTheSearch::Contap_TheSegmentOfTheSearch()
+    : hasfp(Standard_False),
+      haslp(Standard_False)
+{
+}
+
+void Contap_TheSegmentOfTheSearch::SetLimitPoint(const Contap_ThePathPointOfTheSearch& V,
+                                                 const Standard_Boolean                First)
+{
+  if (First)
+  {
+    hasfp = Standard_True;
+    thefp = V;
+  }
+  else
+  {
+    haslp = Standard_True;
+    thelp = V;
+  }
+}
index 749ec9b30cc2a84f01048881b391ceb366a021d6..0f909570b2384df8a08b981beffaa8bf9cbafc09 100644 (file)
@@ -72,20 +72,90 @@ private:
   TopAbs_Orientation   myBTransition;
 };
 
-#define TheSubShape HLRAlgo_Intersection
-#define TheSubShape_hxx <HLRAlgo_Intersection.hxx>
-#define TheShape HLRAlgo_Coincidence
-#define TheShape_hxx <HLRAlgo_Coincidence.hxx>
-#define TopBas_Interference HLRAlgo_Interference
-#define TopBas_Interference_hxx <HLRAlgo_Interference.hxx>
-
-#include <TopBas_Interference.lxx>
-
-#undef TheSubShape
-#undef TheSubShape_hxx
-#undef TheShape
-#undef TheShape_hxx
-#undef TopBas_Interference
-#undef TopBas_Interference_hxx
+//=================================================================================================
+// Inline implementations
+//=================================================================================================
+
+inline void HLRAlgo_Interference::Intersection(const HLRAlgo_Intersection& I)
+{
+  myIntersection = I;
+}
+
+//=================================================================================================
+
+inline void HLRAlgo_Interference::Boundary(const HLRAlgo_Coincidence& B)
+{
+  myBoundary = B;
+}
+
+//=================================================================================================
+
+inline void HLRAlgo_Interference::Orientation(const TopAbs_Orientation Or)
+{
+  myOrientation = Or;
+}
+
+//=================================================================================================
+
+inline void HLRAlgo_Interference::Transition(const TopAbs_Orientation Or)
+{
+  myTransition = Or;
+}
+
+//=================================================================================================
+
+inline void HLRAlgo_Interference::BoundaryTransition(const TopAbs_Orientation Or)
+{
+  myBTransition = Or;
+}
+
+//=================================================================================================
+
+inline const HLRAlgo_Intersection& HLRAlgo_Interference::Intersection() const
+{
+  return myIntersection;
+}
+
+//=================================================================================================
+
+inline HLRAlgo_Intersection& HLRAlgo_Interference::ChangeIntersection()
+{
+  return myIntersection;
+}
+
+//=================================================================================================
+
+inline const HLRAlgo_Coincidence& HLRAlgo_Interference::Boundary() const
+{
+  return myBoundary;
+}
+
+//=================================================================================================
+
+inline HLRAlgo_Coincidence& HLRAlgo_Interference::ChangeBoundary()
+{
+  return myBoundary;
+}
+
+//=================================================================================================
+
+inline TopAbs_Orientation HLRAlgo_Interference::Orientation() const
+{
+  return myOrientation;
+}
+
+//=================================================================================================
+
+inline TopAbs_Orientation HLRAlgo_Interference::Transition() const
+{
+  return myTransition;
+}
+
+//=================================================================================================
+
+inline TopAbs_Orientation HLRAlgo_Interference::BoundaryTransition() const
+{
+  return myBTransition;
+}
 
 #endif // _HLRAlgo_Interference_HeaderFile
index 43822587534a75d0ca94c7520b1028e1d054600a..a3a6ba2df1e69570a22ecdad73b73dcf78938d33 100644 (file)
 #include <HLRAlgo_Intersection.hxx>
 #include <HLRAlgo_Coincidence.hxx>
 
-#define TheSubShape HLRAlgo_Intersection
-#define TheSubShape_hxx <HLRAlgo_Intersection.hxx>
-#define TheShape HLRAlgo_Coincidence
-#define TheShape_hxx <HLRAlgo_Coincidence.hxx>
-#define TopBas_Interference HLRAlgo_Interference
-#define TopBas_Interference_hxx <HLRAlgo_Interference.hxx>
-#include <TopBas_Interference.gxx>
+//=================================================================================================
+
+HLRAlgo_Interference::HLRAlgo_Interference() {}
+
+//=================================================================================================
+
+HLRAlgo_Interference::HLRAlgo_Interference(const HLRAlgo_Intersection& Inters,
+                                           const HLRAlgo_Coincidence&  Bound,
+                                           const TopAbs_Orientation    Orient,
+                                           const TopAbs_Orientation    Trans,
+                                           const TopAbs_Orientation    BTrans)
+    : myIntersection(Inters),
+      myBoundary(Bound),
+      myOrientation(Orient),
+      myTransition(Trans),
+      myBTransition(BTrans)
+{
+}
index 4aa43b0263654c50f248d1da266248c88d6cd697..322f394582232b823cb1cb82ef26e52643e20703 100644 (file)
 #include <IntCurve_IConicTool.hxx>
 #include <HLRBRep_CurveTool.hxx>
 
-#define ImpTool IntCurve_IConicTool
-#define ImpTool_hxx <IntCurve_IConicTool.hxx>
-#define ParCurve Standard_Address
-#define ParCurve_hxx <Standard_Address.hxx>
-#define ParTool HLRBRep_CurveTool
-#define ParTool_hxx <HLRBRep_CurveTool.hxx>
-#define IntImpParGen_ImpParTool HLRBRep_MyImpParToolOfTheIntersectorOfTheIntConicCurveOfCInter
-#define IntImpParGen_ImpParTool_hxx                                                                \
-  <HLRBRep_MyImpParToolOfTheIntersectorOfTheIntConicCurveOfCInter.hxx>
-#include <IntImpParGen_ImpParTool.gxx>
+#include <gp_Vec2d.hxx>
+
+HLRBRep_MyImpParToolOfTheIntersectorOfTheIntConicCurveOfCInter::
+  HLRBRep_MyImpParToolOfTheIntersectorOfTheIntConicCurveOfCInter(const IntCurve_IConicTool& ITool,
+                                                                 const Standard_Address&    PC)
+    : TheImpTool(ITool)
+{
+  TheParCurve = (Standard_Address)(&PC);
+}
+
+Standard_Boolean HLRBRep_MyImpParToolOfTheIntersectorOfTheIntConicCurveOfCInter::Value(
+  const Standard_Real Param,
+  Standard_Real&      ApproxDistance)
+{
+  ApproxDistance =
+    TheImpTool.Distance(HLRBRep_CurveTool::Value((*((Standard_Address*)(TheParCurve))), Param));
+  return (Standard_True);
+}
+
+Standard_Boolean HLRBRep_MyImpParToolOfTheIntersectorOfTheIntConicCurveOfCInter::Derivative(
+  const Standard_Real Param,
+  Standard_Real&      D_ApproxDistance_DV)
+{
+  gp_Pnt2d Pt;
+  gp_Vec2d TanParCurve;
+  gp_Vec2d Grad =
+    TheImpTool.GradDistance(HLRBRep_CurveTool::Value((*((Standard_Address*)(TheParCurve))), Param));
+  HLRBRep_CurveTool::D1((*((Standard_Address*)(TheParCurve))), Param, Pt, TanParCurve);
+  D_ApproxDistance_DV = Grad.Dot(TanParCurve);
+  return (Standard_True);
+}
+
+Standard_Boolean HLRBRep_MyImpParToolOfTheIntersectorOfTheIntConicCurveOfCInter::Values(
+  const Standard_Real Param,
+  Standard_Real&      ApproxDistance,
+  Standard_Real&      Deriv)
+{
+  this->Value(Param, ApproxDistance);
+  this->Derivative(Param, Deriv);
+  return (Standard_True);
+}
index e421fdb42a038d1dcb3b0d488292cdc290683062..25a243317444aa3a4069e36b870b8c5e8fe32958 100644 (file)
 #include <HLRBRep_ThePolygonOfInterCSurf.hxx>
 #include <Bnd_Box.hxx>
 
-#define ThePoint gp_Pnt
-#define ThePoint_hxx <gp_Pnt.hxx>
-#define ThePolygon HLRBRep_ThePolygonOfInterCSurf
-#define ThePolygon_hxx <HLRBRep_ThePolygonOfInterCSurf.hxx>
-#define TheBoundingBox Bnd_Box
-#define TheBoundingBox_hxx <Bnd_Box.hxx>
-#define IntCurveSurface_PolygonTool HLRBRep_ThePolygonToolOfInterCSurf
-#define IntCurveSurface_PolygonTool_hxx <HLRBRep_ThePolygonToolOfInterCSurf.hxx>
-#include <IntCurveSurface_PolygonTool.gxx>
+#include <iostream>
+
+void HLRBRep_ThePolygonToolOfInterCSurf::Dump(const HLRBRep_ThePolygonOfInterCSurf& L)
+{
+  static Standard_Integer num = 0;
+  num++;
+  Standard_Integer nbs = HLRBRep_ThePolygonToolOfInterCSurf::NbSegments(L);
+  std::cout << "\npol2d " << num << " " << nbs << std::endl;
+  std::cout << "Deflection " << HLRBRep_ThePolygonToolOfInterCSurf::DeflectionOverEstimation(L)
+            << std::endl;
+
+  for (Standard_Integer i = 1; i <= nbs; i++)
+  {
+    gp_Pnt P(HLRBRep_ThePolygonToolOfInterCSurf::BeginOfSeg(L, i));
+    std::cout << "pnt " << num << " " << i << " " << P.X() << " " << P.Y() << " " << P.Z()
+              << std::endl;
+  }
+  gp_Pnt PF(HLRBRep_ThePolygonToolOfInterCSurf::EndOfSeg(L, nbs));
+  std::cout << "pnt " << num << " " << nbs << " " << PF.X() << " " << PF.Y() << " " << PF.Z()
+            << std::endl;
+}
index 110df1a80716bdc082d39175e4fe8bb1aa1f28f8..4759064b1406b9311673bf249724abff9a2e225b 100644 (file)
@@ -21,8 +21,7 @@
 #include <Bnd_Box.hxx>
 #include <gp_Pnt.hxx>
 
-#define ThePolyhedron HLRBRep_ThePolyhedronOfInterCSurf
-#define ThePolyhedron_hxx <HLRBRep_ThePolyhedronOfInterCSurf.hxx>
-#define IntCurveSurface_PolyhedronTool HLRBRep_ThePolyhedronToolOfInterCSurf
-#define IntCurveSurface_PolyhedronTool_hxx <HLRBRep_ThePolyhedronToolOfInterCSurf.hxx>
-#include <IntCurveSurface_PolyhedronTool.gxx>
+void HLRBRep_ThePolyhedronToolOfInterCSurf::Dump(const HLRBRep_ThePolyhedronOfInterCSurf& polyh)
+{
+  polyh.Dump();
+}
index c41a7c1d60d6ec04c667976c2b807a79204d4454..ee5ebb9ba784e1a90c2c854bc85c64a7280d2eac 100644 (file)
 #include <HLRBRep_TheLocateExtPCOfTheProjPCurOfCInter.hxx>
 #include <HLRBRep_PCLocFOfTheLocateExtPCOfTheProjPCurOfCInter.hxx>
 #include <gp_Pnt2d.hxx>
+#include <Extrema_POnCurv2d.hxx>
 
-#define TheCurve Standard_Address
-#define TheCurve_hxx <Standard_Address.hxx>
-#define TheCurveTool HLRBRep_CurveTool
-#define TheCurveTool_hxx <HLRBRep_CurveTool.hxx>
-#define IntCurve_TheCurveLocator HLRBRep_TheCurveLocatorOfTheProjPCurOfCInter
-#define IntCurve_TheCurveLocator_hxx <HLRBRep_TheCurveLocatorOfTheProjPCurOfCInter.hxx>
-#define IntCurve_TheLocateExtPC HLRBRep_TheLocateExtPCOfTheProjPCurOfCInter
-#define IntCurve_TheLocateExtPC_hxx <HLRBRep_TheLocateExtPCOfTheProjPCurOfCInter.hxx>
-#define IntCurve_PCLocFOfTheLocateExtPC HLRBRep_PCLocFOfTheLocateExtPCOfTheProjPCurOfCInter
-#define IntCurve_PCLocFOfTheLocateExtPC_hxx                                                        \
-  <HLRBRep_PCLocFOfTheLocateExtPCOfTheProjPCurOfCInter.hxx>
-#define IntCurve_PCLocFOfTheLocateExtPC HLRBRep_PCLocFOfTheLocateExtPCOfTheProjPCurOfCInter
-#define IntCurve_PCLocFOfTheLocateExtPC_hxx                                                        \
-  <HLRBRep_PCLocFOfTheLocateExtPCOfTheProjPCurOfCInter.hxx>
-#define IntCurve_ProjPCurGen HLRBRep_TheProjPCurOfCInter
-#define IntCurve_ProjPCurGen_hxx <HLRBRep_TheProjPCurOfCInter.hxx>
-#include <IntCurve_ProjPCurGen.gxx>
+Standard_Real HLRBRep_TheProjPCurOfCInter::FindParameter(const Standard_Address& C,
+                                                         const gp_Pnt2d&         P,
+                                                         const Standard_Real     LowParameter,
+                                                         const Standard_Real     HighParameter,
+                                                         const Standard_Real)
+{
+  Standard_Real     theparam, defaultparam;
+  Standard_Integer  NbPts   = HLRBRep_CurveTool::NbSamples(C);
+  Standard_Real     theEpsX = HLRBRep_CurveTool::EpsX(C);
+  Extrema_POnCurv2d POnC;
+
+  HLRBRep_TheCurveLocatorOfTheProjPCurOfCInter::Locate(P,
+                                                       C,
+                                                       NbPts,
+                                                       LowParameter,
+                                                       HighParameter,
+                                                       POnC);
+  defaultparam = POnC.Parameter();
+  HLRBRep_TheLocateExtPCOfTheProjPCurOfCInter Loc(P, C, defaultparam, theEpsX);
+
+  if (Loc.IsDone() == Standard_False)
+  {
+    //-- cout<<"\n Erreur dans LocateExtPC "<<endl;
+    theparam = defaultparam;
+  }
+  else
+  {
+    if (Loc.IsMin() == Standard_False)
+    {
+      //-- cout<<"\n Erreur dans LocateExtPC (Maximum trouve) "<<endl;
+      theparam = defaultparam;
+    }
+    else
+    {
+      theparam = Loc.Point().Parameter();
+    }
+  }
+  return theparam;
+}
+
+Standard_Real HLRBRep_TheProjPCurOfCInter::FindParameter(const Standard_Address& C,
+                                                         const gp_Pnt2d&         P,
+                                                         const Standard_Real     Tol)
+{
+
+  Standard_Real theParam;
+  theParam = FindParameter(C,
+                           P,
+                           HLRBRep_CurveTool::FirstParameter(C),
+                           HLRBRep_CurveTool::LastParameter(C),
+                           Tol);
+  return theParam;
+}
index c1a15ab56fe0ff5b4902ab69be3b99c0602c3e08..814a4ea0eb88ca9fdb7df2489df57dce44de32b9 100644 (file)
 #include <IntSurf_Quadric.hxx>
 #include <gp_Lin.hxx>
 #include <HLRBRep_LineTool.hxx>
+#include <gp_Vec.hxx>
 
-#define TheQuadric IntSurf_Quadric
-#define TheQuadric_hxx <IntSurf_Quadric.hxx>
-#define TheCurve gp_Lin
-#define TheCurve_hxx <gp_Lin.hxx>
-#define TheCurveTool HLRBRep_LineTool
-#define TheCurveTool_hxx <HLRBRep_LineTool.hxx>
-#define IntCurveSurface_QuadricCurveFunc HLRBRep_TheQuadCurvFuncOfTheQuadCurvExactInterCSurf
-#define IntCurveSurface_QuadricCurveFunc_hxx                                                       \
-  <HLRBRep_TheQuadCurvFuncOfTheQuadCurvExactInterCSurf.hxx>
-#include <IntCurveSurface_QuadricCurveFunc.gxx>
+HLRBRep_TheQuadCurvFuncOfTheQuadCurvExactInterCSurf::
+  HLRBRep_TheQuadCurvFuncOfTheQuadCurvExactInterCSurf(const IntSurf_Quadric& Q, const gp_Lin& C)
+    : myQuadric(Q),
+      myCurve(C)
+{
+}
+
+Standard_Boolean HLRBRep_TheQuadCurvFuncOfTheQuadCurvExactInterCSurf::Value(
+  const Standard_Real Param,
+  Standard_Real&      F)
+{
+  F = myQuadric.Distance(HLRBRep_LineTool::Value(myCurve, Param));
+  return (Standard_True);
+}
+
+Standard_Boolean HLRBRep_TheQuadCurvFuncOfTheQuadCurvExactInterCSurf::Derivative(
+  const Standard_Real Param,
+  Standard_Real&      D)
+{
+  gp_Pnt P;
+  gp_Vec T;
+  HLRBRep_LineTool::D1(myCurve, Param, P, T);
+  D = T.Dot(myQuadric.Gradient(P));
+  return (Standard_True);
+}
+
+Standard_Boolean HLRBRep_TheQuadCurvFuncOfTheQuadCurvExactInterCSurf::Values(
+  const Standard_Real Param,
+  Standard_Real&      F,
+  Standard_Real&      D)
+{
+  gp_Pnt P;
+  gp_Vec T, Grad;
+  HLRBRep_LineTool::D1(myCurve, Param, P, T);
+  myQuadric.ValAndGrad(P, F, Grad);
+  D = T.Dot(Grad);
+  return (Standard_True);
+}
index e2ae9827db85f6cc58afe188e8da34355eb27189..2f340cd0f3ef66be87e32de2ef7b73d21add49d2 100644 (file)
@@ -2,8 +2,6 @@
 set(OCCT_TopBas_FILES_LOCATION "${CMAKE_CURRENT_LIST_DIR}")
 
 set(OCCT_TopBas_FILES
-  TopBas_Interference.gxx
-  TopBas_Interference.lxx
   TopBas_ListIteratorOfListOfTestInterference.hxx
   TopBas_ListOfTestInterference.hxx
   TopBas_TestInterference.hxx
diff --git a/src/ModelingAlgorithms/TKHLR/TopBas/TopBas_Interference.gxx b/src/ModelingAlgorithms/TKHLR/TopBas/TopBas_Interference.gxx
deleted file mode 100644 (file)
index fac0f9d..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-// Created on: 1992-08-13
-// Created by: Remi LEQUETTE
-// 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.
-
-//=================================================================================================
-
-TopBas_Interference::TopBas_Interference() {}
-
-//=================================================================================================
-
-TopBas_Interference::TopBas_Interference(const TheSubShape&       Inters,
-                                         const TheShape&          Bound,
-                                         const TopAbs_Orientation Orient,
-                                         const TopAbs_Orientation Trans,
-                                         const TopAbs_Orientation BTrans)
-    : myIntersection(Inters),
-      myBoundary(Bound),
-      myOrientation(Orient),
-      myTransition(Trans),
-      myBTransition(BTrans)
-{
-}
diff --git a/src/ModelingAlgorithms/TKHLR/TopBas/TopBas_Interference.lxx b/src/ModelingAlgorithms/TKHLR/TopBas/TopBas_Interference.lxx
deleted file mode 100644 (file)
index 1bd8be4..0000000
+++ /dev/null
@@ -1,97 +0,0 @@
-// 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 void TopBas_Interference::Intersection(const TheSubShape& I)
-{
-  myIntersection = I;
-}
-
-//=================================================================================================
-
-inline void TopBas_Interference::Boundary(const TheShape& B)
-{
-  myBoundary = B;
-}
-
-//=================================================================================================
-
-inline void TopBas_Interference::Orientation(const TopAbs_Orientation Or)
-{
-  myOrientation = Or;
-}
-
-//=================================================================================================
-
-inline void TopBas_Interference::Transition(const TopAbs_Orientation Or)
-{
-  myTransition = Or;
-}
-
-//=================================================================================================
-
-inline void TopBas_Interference::BoundaryTransition(const TopAbs_Orientation Or)
-{
-  myBTransition = Or;
-}
-
-//=================================================================================================
-
-inline const TheSubShape& TopBas_Interference::Intersection() const
-{
-  return myIntersection;
-}
-
-//=================================================================================================
-
-inline TheSubShape& TopBas_Interference::ChangeIntersection()
-{
-  return myIntersection;
-}
-
-//=================================================================================================
-
-inline const TheShape& TopBas_Interference::Boundary() const
-{
-  return myBoundary;
-}
-
-//=================================================================================================
-
-inline TheShape& TopBas_Interference::ChangeBoundary()
-{
-  return myBoundary;
-}
-
-//=================================================================================================
-
-inline TopAbs_Orientation TopBas_Interference::Orientation() const
-{
-  return myOrientation;
-}
-
-//=================================================================================================
-
-inline TopAbs_Orientation TopBas_Interference::Transition() const
-{
-  return myTransition;
-}
-
-//=================================================================================================
-
-inline TopAbs_Orientation TopBas_Interference::BoundaryTransition() const
-{
-  return myBTransition;
-}
index f4863a16d441a3bfaa945e381817ba18f6fcef27..3b1c68ddbe14ff07a042ebce332751d78978a16d 100644 (file)
@@ -70,20 +70,90 @@ private:
   TopAbs_Orientation myBTransition;
 };
 
-#define TheSubShape Standard_Real
-#define TheSubShape_hxx <Standard_Real.hxx>
-#define TheShape Standard_Integer
-#define TheShape_hxx <Standard_Integer.hxx>
-#define TopBas_Interference TopBas_TestInterference
-#define TopBas_Interference_hxx <TopBas_TestInterference.hxx>
-
-#include <TopBas_Interference.lxx>
-
-#undef TheSubShape
-#undef TheSubShape_hxx
-#undef TheShape
-#undef TheShape_hxx
-#undef TopBas_Interference
-#undef TopBas_Interference_hxx
+//=================================================================================================
+// Inline implementations
+//=================================================================================================
+
+inline void TopBas_TestInterference::Intersection(const Standard_Real& I)
+{
+  myIntersection = I;
+}
+
+//=================================================================================================
+
+inline void TopBas_TestInterference::Boundary(const Standard_Integer& B)
+{
+  myBoundary = B;
+}
+
+//=================================================================================================
+
+inline void TopBas_TestInterference::Orientation(const TopAbs_Orientation Or)
+{
+  myOrientation = Or;
+}
+
+//=================================================================================================
+
+inline void TopBas_TestInterference::Transition(const TopAbs_Orientation Or)
+{
+  myTransition = Or;
+}
+
+//=================================================================================================
+
+inline void TopBas_TestInterference::BoundaryTransition(const TopAbs_Orientation Or)
+{
+  myBTransition = Or;
+}
+
+//=================================================================================================
+
+inline const Standard_Real& TopBas_TestInterference::Intersection() const
+{
+  return myIntersection;
+}
+
+//=================================================================================================
+
+inline Standard_Real& TopBas_TestInterference::ChangeIntersection()
+{
+  return myIntersection;
+}
+
+//=================================================================================================
+
+inline const Standard_Integer& TopBas_TestInterference::Boundary() const
+{
+  return myBoundary;
+}
+
+//=================================================================================================
+
+inline Standard_Integer& TopBas_TestInterference::ChangeBoundary()
+{
+  return myBoundary;
+}
+
+//=================================================================================================
+
+inline TopAbs_Orientation TopBas_TestInterference::Orientation() const
+{
+  return myOrientation;
+}
+
+//=================================================================================================
+
+inline TopAbs_Orientation TopBas_TestInterference::Transition() const
+{
+  return myTransition;
+}
+
+//=================================================================================================
+
+inline TopAbs_Orientation TopBas_TestInterference::BoundaryTransition() const
+{
+  return myBTransition;
+}
 
 #endif // _TopBas_TestInterference_HeaderFile
index b6ab6668f786cca2dd9dab7a7a43a4d4434ba08a..3d92fdf1b83157fe7d33e31afc4813b99276088f 100644 (file)
 
 #include <TopBas_TestInterference.hxx>
 
-#define TheSubShape Standard_Real
-#define TheSubShape_hxx <Standard_Real.hxx>
-#define TheShape Standard_Integer
-#define TheShape_hxx <Standard_Integer.hxx>
-#define TopBas_Interference TopBas_TestInterference
-#define TopBas_Interference_hxx <TopBas_TestInterference.hxx>
-#include <TopBas_Interference.gxx>
+//=================================================================================================
+
+TopBas_TestInterference::TopBas_TestInterference() {}
+
+//=================================================================================================
+
+TopBas_TestInterference::TopBas_TestInterference(const Standard_Real&     Inters,
+                                                 const Standard_Integer&  Bound,
+                                                 const TopAbs_Orientation Orient,
+                                                 const TopAbs_Orientation Trans,
+                                                 const TopAbs_Orientation BTrans)
+    : myIntersection(Inters),
+      myBoundary(Bound),
+      myOrientation(Orient),
+      myTransition(Trans),
+      myBTransition(BTrans)
+{
+}
index 395f7a9751bd5e763526f8b097f6fd449cb27902..6da238afe778f384d2497d9cb1a24298163edd53 100644 (file)
 #include <BRepApprox_BSpParFunctionOfMyBSplGradientOfTheComputeLineOfApprox.hxx>
 #include <math_MultipleVarFunctionWithGradient.hxx>
 
-#define MultiLine BRepApprox_TheMultiLineOfApprox
-#define MultiLine_hxx <BRepApprox_TheMultiLineOfApprox.hxx>
-#define ToolLine BRepApprox_TheMultiLineToolOfApprox
-#define ToolLine_hxx <BRepApprox_TheMultiLineToolOfApprox.hxx>
-#define AppParCurves_BSpParLeastSquare                                                             \
-  BRepApprox_BSpParLeastSquareOfMyBSplGradientOfTheComputeLineOfApprox
-#define AppParCurves_BSpParLeastSquare_hxx                                                         \
-  <BRepApprox_BSpParLeastSquareOfMyBSplGradientOfTheComputeLineOfApprox.hxx>
-#define AppParCurves_BSpParFunction                                                                \
-  BRepApprox_BSpParFunctionOfMyBSplGradientOfTheComputeLineOfApprox
-#define AppParCurves_BSpParFunction_hxx                                                            \
-  <BRepApprox_BSpParFunctionOfMyBSplGradientOfTheComputeLineOfApprox.hxx>
-#define AppParCurves_BSpGradient_BFGS                                                              \
-  BRepApprox_BSpGradient_BFGSOfMyBSplGradientOfTheComputeLineOfApprox
-#define AppParCurves_BSpGradient_BFGS_hxx                                                          \
-  <BRepApprox_BSpGradient_BFGSOfMyBSplGradientOfTheComputeLineOfApprox.hxx>
-#define AppParCurves_BSpGradient BRepApprox_MyBSplGradientOfTheComputeLineOfApprox
-#define AppParCurves_BSpGradient_hxx <BRepApprox_MyBSplGradientOfTheComputeLineOfApprox.hxx>
-#include <AppParCurves_BSpGradient_BFGS.gxx>
+BRepApprox_BSpGradient_BFGSOfMyBSplGradientOfTheComputeLineOfApprox::
+  BRepApprox_BSpGradient_BFGSOfMyBSplGradientOfTheComputeLineOfApprox(
+    math_MultipleVarFunctionWithGradient& F,
+    const math_Vector&                    StartingPoint,
+    const Standard_Real                   Tolerance3d,
+    const Standard_Real                   Tolerance2d,
+    const Standard_Real                   Eps,
+    const Standard_Integer                NbIterations)
+    : math_BFGS(F.NbVariables(), Eps, NbIterations, Eps),
+      myTol3d(Tolerance3d),
+      myTol2d(Tolerance2d)
+{
+  Perform(F, StartingPoint);
+}
+
+Standard_Boolean BRepApprox_BSpGradient_BFGSOfMyBSplGradientOfTheComputeLineOfApprox::
+  IsSolutionReached(math_MultipleVarFunctionWithGradient& F) const
+{
+  Standard_Boolean                                                   Result, Result2;
+  BRepApprox_BSpParFunctionOfMyBSplGradientOfTheComputeLineOfApprox* F1 =
+    (BRepApprox_BSpParFunctionOfMyBSplGradientOfTheComputeLineOfApprox*)&F;
+
+  Result               = (2.0 * fabs(TheMinimum - PreviousMinimum)
+            <= 1.e-10 * (fabs(TheMinimum) + fabs(PreviousMinimum)) + 1.e-12);
+  Standard_Real MErr3d = F1->MaxError3d();
+  Standard_Real MErr2d = F1->MaxError2d();
+  Result2              = ((MErr3d <= myTol3d) && (MErr2d <= myTol2d));
+
+  return (Result || Result2);
+}
index 63ccdb91b745ac198b2bbdbfc3cbe3a20d3f5530..59cbfed5327d9ecf17afae8b0e376dc46c957677 100644 (file)
 #include <BRepApprox_ParFunctionOfMyGradientOfTheComputeLineBezierOfApprox.hxx>
 #include <math_MultipleVarFunctionWithGradient.hxx>
 
-#define MultiLine BRepApprox_TheMultiLineOfApprox
-#define MultiLine_hxx <BRepApprox_TheMultiLineOfApprox.hxx>
-#define ToolLine BRepApprox_TheMultiLineToolOfApprox
-#define ToolLine_hxx <BRepApprox_TheMultiLineToolOfApprox.hxx>
-#define AppParCurves_ParLeastSquare                                                                \
-  BRepApprox_ParLeastSquareOfMyGradientOfTheComputeLineBezierOfApprox
-#define AppParCurves_ParLeastSquare_hxx                                                            \
-  <BRepApprox_ParLeastSquareOfMyGradientOfTheComputeLineBezierOfApprox.hxx>
-#define AppParCurves_ResConstraint                                                                 \
-  BRepApprox_ResConstraintOfMyGradientOfTheComputeLineBezierOfApprox
-#define AppParCurves_ResConstraint_hxx                                                             \
-  <BRepApprox_ResConstraintOfMyGradientOfTheComputeLineBezierOfApprox.hxx>
-#define AppParCurves_ParFunction BRepApprox_ParFunctionOfMyGradientOfTheComputeLineBezierOfApprox
-#define AppParCurves_ParFunction_hxx                                                               \
-  <BRepApprox_ParFunctionOfMyGradientOfTheComputeLineBezierOfApprox.hxx>
-#define AppParCurves_Gradient_BFGS                                                                 \
-  BRepApprox_Gradient_BFGSOfMyGradientOfTheComputeLineBezierOfApprox
-#define AppParCurves_Gradient_BFGS_hxx                                                             \
-  <BRepApprox_Gradient_BFGSOfMyGradientOfTheComputeLineBezierOfApprox.hxx>
-#define AppParCurves_Gradient BRepApprox_MyGradientOfTheComputeLineBezierOfApprox
-#define AppParCurves_Gradient_hxx <BRepApprox_MyGradientOfTheComputeLineBezierOfApprox.hxx>
-#include <AppParCurves_Gradient_BFGS.gxx>
+BRepApprox_Gradient_BFGSOfMyGradientOfTheComputeLineBezierOfApprox::
+  BRepApprox_Gradient_BFGSOfMyGradientOfTheComputeLineBezierOfApprox(
+    math_MultipleVarFunctionWithGradient& F,
+    const math_Vector&                    StartingPoint,
+    const Standard_Real                   Tolerance3d,
+    const Standard_Real                   Tolerance2d,
+    const Standard_Real                   Eps,
+    const Standard_Integer                NbIterations)
+    : math_BFGS(F.NbVariables(), Eps, NbIterations, Eps),
+      myTol3d(Tolerance3d),
+      myTol2d(Tolerance2d)
+{
+  Perform(F, StartingPoint);
+}
+
+Standard_Boolean BRepApprox_Gradient_BFGSOfMyGradientOfTheComputeLineBezierOfApprox::
+  IsSolutionReached(math_MultipleVarFunctionWithGradient& F) const
+{
+  BRepApprox_ParFunctionOfMyGradientOfTheComputeLineBezierOfApprox* F1 =
+    (BRepApprox_ParFunctionOfMyGradientOfTheComputeLineBezierOfApprox*)&F;
+  Standard_Boolean Result, Result2;
+
+  Result               = (2.0 * fabs(TheMinimum - PreviousMinimum)
+            <= 1.e-10 * (fabs(TheMinimum) + fabs(PreviousMinimum)) + 1.e-12);
+  Standard_Real MErr3d = F1->MaxError3d();
+  Standard_Real MErr2d = F1->MaxError2d();
+
+  Result2 = ((MErr3d <= myTol3d) && (MErr2d <= myTol2d));
+  return (Result || Result2);
+}
index 04d89d48c0985dbbcb60e85bc19a01b5d971eb1c..ef3be530ec25408b9c6947187e1bbe39ec14c7d6 100644 (file)
 #include <BRepApprox_ParFunctionOfMyGradientbisOfTheComputeLineOfApprox.hxx>
 #include <math_MultipleVarFunctionWithGradient.hxx>
 
-#define MultiLine BRepApprox_TheMultiLineOfApprox
-#define MultiLine_hxx <BRepApprox_TheMultiLineOfApprox.hxx>
-#define ToolLine BRepApprox_TheMultiLineToolOfApprox
-#define ToolLine_hxx <BRepApprox_TheMultiLineToolOfApprox.hxx>
-#define AppParCurves_ParLeastSquare BRepApprox_ParLeastSquareOfMyGradientbisOfTheComputeLineOfApprox
-#define AppParCurves_ParLeastSquare_hxx                                                            \
-  <BRepApprox_ParLeastSquareOfMyGradientbisOfTheComputeLineOfApprox.hxx>
-#define AppParCurves_ResConstraint BRepApprox_ResConstraintOfMyGradientbisOfTheComputeLineOfApprox
-#define AppParCurves_ResConstraint_hxx                                                             \
-  <BRepApprox_ResConstraintOfMyGradientbisOfTheComputeLineOfApprox.hxx>
-#define AppParCurves_ParFunction BRepApprox_ParFunctionOfMyGradientbisOfTheComputeLineOfApprox
-#define AppParCurves_ParFunction_hxx                                                               \
-  <BRepApprox_ParFunctionOfMyGradientbisOfTheComputeLineOfApprox.hxx>
-#define AppParCurves_Gradient_BFGS BRepApprox_Gradient_BFGSOfMyGradientbisOfTheComputeLineOfApprox
-#define AppParCurves_Gradient_BFGS_hxx                                                             \
-  <BRepApprox_Gradient_BFGSOfMyGradientbisOfTheComputeLineOfApprox.hxx>
-#define AppParCurves_Gradient BRepApprox_MyGradientbisOfTheComputeLineOfApprox
-#define AppParCurves_Gradient_hxx <BRepApprox_MyGradientbisOfTheComputeLineOfApprox.hxx>
-#include <AppParCurves_Gradient_BFGS.gxx>
+BRepApprox_Gradient_BFGSOfMyGradientbisOfTheComputeLineOfApprox::
+  BRepApprox_Gradient_BFGSOfMyGradientbisOfTheComputeLineOfApprox(
+    math_MultipleVarFunctionWithGradient& F,
+    const math_Vector&                    StartingPoint,
+    const Standard_Real                   Tolerance3d,
+    const Standard_Real                   Tolerance2d,
+    const Standard_Real                   Eps,
+    const Standard_Integer                NbIterations)
+    : math_BFGS(F.NbVariables(), Eps, NbIterations, Eps),
+      myTol3d(Tolerance3d),
+      myTol2d(Tolerance2d)
+{
+  Perform(F, StartingPoint);
+}
+
+Standard_Boolean BRepApprox_Gradient_BFGSOfMyGradientbisOfTheComputeLineOfApprox::IsSolutionReached(
+  math_MultipleVarFunctionWithGradient& F) const
+{
+  BRepApprox_ParFunctionOfMyGradientbisOfTheComputeLineOfApprox* F1 =
+    (BRepApprox_ParFunctionOfMyGradientbisOfTheComputeLineOfApprox*)&F;
+  Standard_Boolean Result, Result2;
+
+  Result               = (2.0 * fabs(TheMinimum - PreviousMinimum)
+            <= 1.e-10 * (fabs(TheMinimum) + fabs(PreviousMinimum)) + 1.e-12);
+  Standard_Real MErr3d = F1->MaxError3d();
+  Standard_Real MErr2d = F1->MaxError2d();
+
+  Result2 = ((MErr3d <= myTol3d) && (MErr2d <= myTol2d));
+  return (Result || Result2);
+}
index b75747eb9b7abdd6a48423fa571a79187a5b5538..d0bf0943ad95909c6c65db6547168c737ea2785e 100644 (file)
@@ -31,8 +31,6 @@ set(OCCT_MAT_FILES
   MAT_Side.hxx
   MAT_TList.gxx
   MAT_TList.lxx
-  MAT_TListNode.gxx
-  MAT_TListNode.lxx
   MAT_TListNodeOfListOfBisector.hxx
   MAT_TListNodeOfListOfBisector_0.cxx
   MAT_TListNodeOfListOfEdge.hxx
diff --git a/src/ModelingAlgorithms/TKTopAlgo/MAT/MAT_TListNode.gxx b/src/ModelingAlgorithms/TKTopAlgo/MAT/MAT_TListNode.gxx
deleted file mode 100644 (file)
index f46c465..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-// Created on: 1992-06-24
-// Created by: Gilles DEBARBOUILLE
-// 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.
-
-//=================================================================================================
-
-void MAT_TListNode::Dummy() const {}
diff --git a/src/ModelingAlgorithms/TKTopAlgo/MAT/MAT_TListNode.lxx b/src/ModelingAlgorithms/TKTopAlgo/MAT/MAT_TListNode.lxx
deleted file mode 100644 (file)
index 13d6d40..0000000
+++ /dev/null
@@ -1,68 +0,0 @@
-// Created on: 1992-06-24
-// Created by: Gilles DEBARBOUILLE
-// 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.
-
-//=================================================================================================
-
-inline MAT_TListNode::MAT_TListNode() {}
-
-//=================================================================================================
-
-inline MAT_TListNode::MAT_TListNode(const Item& anitem)
-{
-  theitem = anitem;
-}
-
-//=================================================================================================
-
-inline Item MAT_TListNode::GetItem() const
-{
-  return theitem;
-}
-
-//=================================================================================================
-
-inline Handle(MAT_TListNode) MAT_TListNode::Next() const
-{
-  return thenext;
-}
-
-//=================================================================================================
-
-inline Handle(MAT_TListNode) MAT_TListNode::Previous() const
-{
-  return theprevious;
-}
-
-//=================================================================================================
-
-inline void MAT_TListNode::SetItem(const Item& anitem)
-{
-  theitem = anitem;
-}
-
-//=================================================================================================
-
-inline void MAT_TListNode::Next(const Handle(MAT_TListNode)& atlistnode)
-{
-  thenext = atlistnode;
-}
-
-//=================================================================================================
-
-inline void MAT_TListNode::Previous(const Handle(MAT_TListNode)& atlistnode)
-{
-  theprevious = atlistnode;
-}
index 85114d6655111da138c52f0fbb01b023f78eea16..2f7a4779993f4c0cdd552d36d1b31720692bd64e 100644 (file)
@@ -58,24 +58,62 @@ private:
   Handle(MAT_Bisector)                  theitem;
 };
 
-#define Item Handle(MAT_Bisector)
-#define Item_hxx <MAT_Bisector.hxx>
-#define MAT_TListNode MAT_TListNodeOfListOfBisector
-#define MAT_TListNode_hxx <MAT_TListNodeOfListOfBisector.hxx>
-#define Handle_MAT_TListNode Handle(MAT_TListNodeOfListOfBisector)
-#define MAT_TList MAT_ListOfBisector
-#define MAT_TList_hxx <MAT_ListOfBisector.hxx>
-#define Handle_MAT_TList Handle(MAT_ListOfBisector)
-
-#include <MAT_TListNode.lxx>
-
-#undef Item
-#undef Item_hxx
-#undef MAT_TListNode
-#undef MAT_TListNode_hxx
-#undef Handle_MAT_TListNode
-#undef MAT_TList
-#undef MAT_TList_hxx
-#undef Handle_MAT_TList
+//=================================================================================================
+// Inline implementations
+//=================================================================================================
+
+inline MAT_TListNodeOfListOfBisector::MAT_TListNodeOfListOfBisector() {}
+
+//=================================================================================================
+
+inline MAT_TListNodeOfListOfBisector::MAT_TListNodeOfListOfBisector(
+  const Handle(MAT_Bisector)& anitem)
+{
+  theitem = anitem;
+}
+
+//=================================================================================================
+
+inline Handle(MAT_Bisector) MAT_TListNodeOfListOfBisector::GetItem() const
+{
+  return theitem;
+}
+
+//=================================================================================================
+
+inline Handle(MAT_TListNodeOfListOfBisector) MAT_TListNodeOfListOfBisector::Next() const
+{
+  return thenext;
+}
+
+//=================================================================================================
+
+inline Handle(MAT_TListNodeOfListOfBisector) MAT_TListNodeOfListOfBisector::Previous() const
+{
+  return theprevious;
+}
+
+//=================================================================================================
+
+inline void MAT_TListNodeOfListOfBisector::SetItem(const Handle(MAT_Bisector)& anitem)
+{
+  theitem = anitem;
+}
+
+//=================================================================================================
+
+inline void MAT_TListNodeOfListOfBisector::Next(
+  const Handle(MAT_TListNodeOfListOfBisector)& atlistnode)
+{
+  thenext = atlistnode;
+}
+
+//=================================================================================================
+
+inline void MAT_TListNodeOfListOfBisector::Previous(
+  const Handle(MAT_TListNodeOfListOfBisector)& atlistnode)
+{
+  theprevious = atlistnode;
+}
 
 #endif // _MAT_TListNodeOfListOfBisector_HeaderFile
index 99378d4fc710dc14693797f5607a118767fcc53b..e651c2ee14defc001f41796d63eb66e1547efc39 100644 (file)
 #include <MAT_Bisector.hxx>
 #include <MAT_ListOfBisector.hxx>
 
-#define Item Handle(MAT_Bisector)
-#define Item_hxx <MAT_Bisector.hxx>
-#define MAT_TListNode MAT_TListNodeOfListOfBisector
-#define MAT_TListNode_hxx <MAT_TListNodeOfListOfBisector.hxx>
-#define Handle_MAT_TListNode Handle(MAT_TListNodeOfListOfBisector)
-#define MAT_TList MAT_ListOfBisector
-#define MAT_TList_hxx <MAT_ListOfBisector.hxx>
-#define Handle_MAT_TList Handle(MAT_ListOfBisector)
-#include <MAT_TListNode.gxx>
+//=================================================================================================
+
+void MAT_TListNodeOfListOfBisector::Dummy() const {}
index 3b970e340a71357758417eb7f3b80b980281aaba..d7aaf5d25901f19102826ce820d6311c5c318927 100644 (file)
@@ -58,24 +58,59 @@ private:
   Handle(MAT_Edge)                  theitem;
 };
 
-#define Item Handle(MAT_Edge)
-#define Item_hxx <MAT_Edge.hxx>
-#define MAT_TListNode MAT_TListNodeOfListOfEdge
-#define MAT_TListNode_hxx <MAT_TListNodeOfListOfEdge.hxx>
-#define Handle_MAT_TListNode Handle(MAT_TListNodeOfListOfEdge)
-#define MAT_TList MAT_ListOfEdge
-#define MAT_TList_hxx <MAT_ListOfEdge.hxx>
-#define Handle_MAT_TList Handle(MAT_ListOfEdge)
-
-#include <MAT_TListNode.lxx>
-
-#undef Item
-#undef Item_hxx
-#undef MAT_TListNode
-#undef MAT_TListNode_hxx
-#undef Handle_MAT_TListNode
-#undef MAT_TList
-#undef MAT_TList_hxx
-#undef Handle_MAT_TList
+//=================================================================================================
+// Inline implementations
+//=================================================================================================
+
+inline MAT_TListNodeOfListOfEdge::MAT_TListNodeOfListOfEdge() {}
+
+//=================================================================================================
+
+inline MAT_TListNodeOfListOfEdge::MAT_TListNodeOfListOfEdge(const Handle(MAT_Edge)& anitem)
+{
+  theitem = anitem;
+}
+
+//=================================================================================================
+
+inline Handle(MAT_Edge) MAT_TListNodeOfListOfEdge::GetItem() const
+{
+  return theitem;
+}
+
+//=================================================================================================
+
+inline Handle(MAT_TListNodeOfListOfEdge) MAT_TListNodeOfListOfEdge::Next() const
+{
+  return thenext;
+}
+
+//=================================================================================================
+
+inline Handle(MAT_TListNodeOfListOfEdge) MAT_TListNodeOfListOfEdge::Previous() const
+{
+  return theprevious;
+}
+
+//=================================================================================================
+
+inline void MAT_TListNodeOfListOfEdge::SetItem(const Handle(MAT_Edge)& anitem)
+{
+  theitem = anitem;
+}
+
+//=================================================================================================
+
+inline void MAT_TListNodeOfListOfEdge::Next(const Handle(MAT_TListNodeOfListOfEdge)& atlistnode)
+{
+  thenext = atlistnode;
+}
+
+//=================================================================================================
+
+inline void MAT_TListNodeOfListOfEdge::Previous(const Handle(MAT_TListNodeOfListOfEdge)& atlistnode)
+{
+  theprevious = atlistnode;
+}
 
 #endif // _MAT_TListNodeOfListOfEdge_HeaderFile
index 4bd966b3d2ed8c342b605a6c0969c2aa4fb34ed8..b8b36feaaaa6b1a080fa1d75b1da6ab2ee7fd144 100644 (file)
 #include <MAT_Edge.hxx>
 #include <MAT_ListOfEdge.hxx>
 
-#define Item Handle(MAT_Edge)
-#define Item_hxx <MAT_Edge.hxx>
-#define MAT_TListNode MAT_TListNodeOfListOfEdge
-#define MAT_TListNode_hxx <MAT_TListNodeOfListOfEdge.hxx>
-#define Handle_MAT_TListNode Handle(MAT_TListNodeOfListOfEdge)
-#define MAT_TList MAT_ListOfEdge
-#define MAT_TList_hxx <MAT_ListOfEdge.hxx>
-#define Handle_MAT_TList Handle(MAT_ListOfEdge)
-#include <MAT_TListNode.gxx>
+//=================================================================================================
+
+void MAT_TListNodeOfListOfEdge::Dummy() const {}
index 4fa1d90e35970fb8a777e2165f2a88da0a411453..cb3f043deb85c52e6486cf637de494e741a33f00 100644 (file)
 #include <AppDef_BSpParFunctionOfMyBSplGradientOfBSplineCompute.hxx>
 #include <math_MultipleVarFunctionWithGradient.hxx>
 
-#define MultiLine AppDef_MultiLine
-#define MultiLine_hxx <AppDef_MultiLine.hxx>
-#define ToolLine AppDef_MyLineTool
-#define ToolLine_hxx <AppDef_MyLineTool.hxx>
-#define AppParCurves_BSpParLeastSquare AppDef_BSpParLeastSquareOfMyBSplGradientOfBSplineCompute
-#define AppParCurves_BSpParLeastSquare_hxx                                                         \
-  <AppDef_BSpParLeastSquareOfMyBSplGradientOfBSplineCompute.hxx>
-#define AppParCurves_BSpParFunction AppDef_BSpParFunctionOfMyBSplGradientOfBSplineCompute
-#define AppParCurves_BSpParFunction_hxx <AppDef_BSpParFunctionOfMyBSplGradientOfBSplineCompute.hxx>
-#define AppParCurves_BSpGradient_BFGS AppDef_BSpGradient_BFGSOfMyBSplGradientOfBSplineCompute
-#define AppParCurves_BSpGradient_BFGS_hxx                                                          \
-  <AppDef_BSpGradient_BFGSOfMyBSplGradientOfBSplineCompute.hxx>
-#define AppParCurves_BSpGradient AppDef_MyBSplGradientOfBSplineCompute
-#define AppParCurves_BSpGradient_hxx <AppDef_MyBSplGradientOfBSplineCompute.hxx>
-#include "../AppParCurves/AppParCurves_BSpGradient_BFGS.gxx"
+AppDef_BSpGradient_BFGSOfMyBSplGradientOfBSplineCompute::
+  AppDef_BSpGradient_BFGSOfMyBSplGradientOfBSplineCompute(math_MultipleVarFunctionWithGradient& F,
+                                                          const math_Vector&     StartingPoint,
+                                                          const Standard_Real    Tolerance3d,
+                                                          const Standard_Real    Tolerance2d,
+                                                          const Standard_Real    Eps,
+                                                          const Standard_Integer NbIterations)
+    : math_BFGS(F.NbVariables(), Eps, NbIterations, Eps),
+      myTol3d(Tolerance3d),
+      myTol2d(Tolerance2d)
+{
+  Perform(F, StartingPoint);
+}
+
+Standard_Boolean AppDef_BSpGradient_BFGSOfMyBSplGradientOfBSplineCompute::IsSolutionReached(
+  math_MultipleVarFunctionWithGradient& F) const
+{
+  Standard_Boolean                                       Result, Result2;
+  AppDef_BSpParFunctionOfMyBSplGradientOfBSplineCompute* F1 =
+    (AppDef_BSpParFunctionOfMyBSplGradientOfBSplineCompute*)&F;
+
+  Result               = (2.0 * fabs(TheMinimum - PreviousMinimum)
+            <= 1.e-10 * (fabs(TheMinimum) + fabs(PreviousMinimum)) + 1.e-12);
+  Standard_Real MErr3d = F1->MaxError3d();
+  Standard_Real MErr2d = F1->MaxError2d();
+  Result2              = ((MErr3d <= myTol3d) && (MErr2d <= myTol2d));
+
+  return (Result || Result2);
+}
index 4e8d238ae32c250be6b71346e0cc4b40d77e403d..b8eb12fbe10eff9d4b73c7ed4ff1703f88b6a196 100644 (file)
 #include <AppDef_ParFunctionOfMyGradientOfCompute.hxx>
 #include <math_MultipleVarFunctionWithGradient.hxx>
 
-#define MultiLine AppDef_MultiLine
-#define MultiLine_hxx <AppDef_MultiLine.hxx>
-#define ToolLine AppDef_MyLineTool
-#define ToolLine_hxx <AppDef_MyLineTool.hxx>
-#define AppParCurves_ParLeastSquare AppDef_ParLeastSquareOfMyGradientOfCompute
-#define AppParCurves_ParLeastSquare_hxx <AppDef_ParLeastSquareOfMyGradientOfCompute.hxx>
-#define AppParCurves_ResConstraint AppDef_ResConstraintOfMyGradientOfCompute
-#define AppParCurves_ResConstraint_hxx <AppDef_ResConstraintOfMyGradientOfCompute.hxx>
-#define AppParCurves_ParFunction AppDef_ParFunctionOfMyGradientOfCompute
-#define AppParCurves_ParFunction_hxx <AppDef_ParFunctionOfMyGradientOfCompute.hxx>
-#define AppParCurves_Gradient_BFGS AppDef_Gradient_BFGSOfMyGradientOfCompute
-#define AppParCurves_Gradient_BFGS_hxx <AppDef_Gradient_BFGSOfMyGradientOfCompute.hxx>
-#define AppParCurves_Gradient AppDef_MyGradientOfCompute
-#define AppParCurves_Gradient_hxx <AppDef_MyGradientOfCompute.hxx>
-#include <AppParCurves_Gradient_BFGS.gxx>
+AppDef_Gradient_BFGSOfMyGradientOfCompute::AppDef_Gradient_BFGSOfMyGradientOfCompute(
+  math_MultipleVarFunctionWithGradient& F,
+  const math_Vector&                    StartingPoint,
+  const Standard_Real                   Tolerance3d,
+  const Standard_Real                   Tolerance2d,
+  const Standard_Real                   Eps,
+  const Standard_Integer                NbIterations)
+    : math_BFGS(F.NbVariables(), Eps, NbIterations, Eps),
+      myTol3d(Tolerance3d),
+      myTol2d(Tolerance2d)
+{
+  Perform(F, StartingPoint);
+}
+
+Standard_Boolean AppDef_Gradient_BFGSOfMyGradientOfCompute::IsSolutionReached(
+  math_MultipleVarFunctionWithGradient& F) const
+{
+  AppDef_ParFunctionOfMyGradientOfCompute* F1 = (AppDef_ParFunctionOfMyGradientOfCompute*)&F;
+  Standard_Boolean                         Result, Result2;
+
+  Result               = (2.0 * fabs(TheMinimum - PreviousMinimum)
+            <= 1.e-10 * (fabs(TheMinimum) + fabs(PreviousMinimum)) + 1.e-12);
+  Standard_Real MErr3d = F1->MaxError3d();
+  Standard_Real MErr2d = F1->MaxError2d();
+
+  Result2 = ((MErr3d <= myTol3d) && (MErr2d <= myTol2d));
+  return (Result || Result2);
+}
index 78f6a0ad4119735b86c6ac73c5be19094946e9fd..ad2192af465bfbc0ca1e1d6dd4306256559a2f86 100644 (file)
 #include <AppDef_ParFunctionOfMyGradientbisOfBSplineCompute.hxx>
 #include <math_MultipleVarFunctionWithGradient.hxx>
 
-#define MultiLine AppDef_MultiLine
-#define MultiLine_hxx <AppDef_MultiLine.hxx>
-#define ToolLine AppDef_MyLineTool
-#define ToolLine_hxx <AppDef_MyLineTool.hxx>
-#define AppParCurves_ParLeastSquare AppDef_ParLeastSquareOfMyGradientbisOfBSplineCompute
-#define AppParCurves_ParLeastSquare_hxx <AppDef_ParLeastSquareOfMyGradientbisOfBSplineCompute.hxx>
-#define AppParCurves_ResConstraint AppDef_ResConstraintOfMyGradientbisOfBSplineCompute
-#define AppParCurves_ResConstraint_hxx <AppDef_ResConstraintOfMyGradientbisOfBSplineCompute.hxx>
-#define AppParCurves_ParFunction AppDef_ParFunctionOfMyGradientbisOfBSplineCompute
-#define AppParCurves_ParFunction_hxx <AppDef_ParFunctionOfMyGradientbisOfBSplineCompute.hxx>
-#define AppParCurves_Gradient_BFGS AppDef_Gradient_BFGSOfMyGradientbisOfBSplineCompute
-#define AppParCurves_Gradient_BFGS_hxx <AppDef_Gradient_BFGSOfMyGradientbisOfBSplineCompute.hxx>
-#define AppParCurves_Gradient AppDef_MyGradientbisOfBSplineCompute
-#define AppParCurves_Gradient_hxx <AppDef_MyGradientbisOfBSplineCompute.hxx>
-#include <AppParCurves_Gradient_BFGS.gxx>
+AppDef_Gradient_BFGSOfMyGradientbisOfBSplineCompute::
+  AppDef_Gradient_BFGSOfMyGradientbisOfBSplineCompute(math_MultipleVarFunctionWithGradient& F,
+                                                      const math_Vector&     StartingPoint,
+                                                      const Standard_Real    Tolerance3d,
+                                                      const Standard_Real    Tolerance2d,
+                                                      const Standard_Real    Eps,
+                                                      const Standard_Integer NbIterations)
+    : math_BFGS(F.NbVariables(), Eps, NbIterations, Eps),
+      myTol3d(Tolerance3d),
+      myTol2d(Tolerance2d)
+{
+  Perform(F, StartingPoint);
+}
+
+Standard_Boolean AppDef_Gradient_BFGSOfMyGradientbisOfBSplineCompute::IsSolutionReached(
+  math_MultipleVarFunctionWithGradient& F) const
+{
+  AppDef_ParFunctionOfMyGradientbisOfBSplineCompute* F1 =
+    (AppDef_ParFunctionOfMyGradientbisOfBSplineCompute*)&F;
+  Standard_Boolean Result, Result2;
+
+  Result               = (2.0 * fabs(TheMinimum - PreviousMinimum)
+            <= 1.e-10 * (fabs(TheMinimum) + fabs(PreviousMinimum)) + 1.e-12);
+  Standard_Real MErr3d = F1->MaxError3d();
+  Standard_Real MErr2d = F1->MaxError2d();
+
+  Result2 = ((MErr3d <= myTol3d) && (MErr2d <= myTol2d));
+  return (Result || Result2);
+}
index b28e694396ee17e75670ffa5b35bc153581f0012..84fc77e02a7dccefc4826eb85b96ceaeffe36403 100644 (file)
 #include <AppDef_ParFunctionOfTheGradient.hxx>
 #include <math_MultipleVarFunctionWithGradient.hxx>
 
-#define MultiLine AppDef_MultiLine
-#define MultiLine_hxx <AppDef_MultiLine.hxx>
-#define ToolLine AppDef_MyLineTool
-#define ToolLine_hxx <AppDef_MyLineTool.hxx>
-#define AppParCurves_ParLeastSquare AppDef_ParLeastSquareOfTheGradient
-#define AppParCurves_ParLeastSquare_hxx <AppDef_ParLeastSquareOfTheGradient.hxx>
-#define AppParCurves_ResConstraint AppDef_ResConstraintOfTheGradient
-#define AppParCurves_ResConstraint_hxx <AppDef_ResConstraintOfTheGradient.hxx>
-#define AppParCurves_ParFunction AppDef_ParFunctionOfTheGradient
-#define AppParCurves_ParFunction_hxx <AppDef_ParFunctionOfTheGradient.hxx>
-#define AppParCurves_Gradient_BFGS AppDef_Gradient_BFGSOfTheGradient
-#define AppParCurves_Gradient_BFGS_hxx <AppDef_Gradient_BFGSOfTheGradient.hxx>
-#define AppParCurves_Gradient AppDef_TheGradient
-#define AppParCurves_Gradient_hxx <AppDef_TheGradient.hxx>
-#include <AppParCurves_Gradient_BFGS.gxx>
+AppDef_Gradient_BFGSOfTheGradient::AppDef_Gradient_BFGSOfTheGradient(
+  math_MultipleVarFunctionWithGradient& F,
+  const math_Vector&                    StartingPoint,
+  const Standard_Real                   Tolerance3d,
+  const Standard_Real                   Tolerance2d,
+  const Standard_Real                   Eps,
+  const Standard_Integer                NbIterations)
+    : math_BFGS(F.NbVariables(), Eps, NbIterations, Eps),
+      myTol3d(Tolerance3d),
+      myTol2d(Tolerance2d)
+{
+  Perform(F, StartingPoint);
+}
+
+Standard_Boolean AppDef_Gradient_BFGSOfTheGradient::IsSolutionReached(
+  math_MultipleVarFunctionWithGradient& F) const
+{
+  AppDef_ParFunctionOfTheGradient* F1 = (AppDef_ParFunctionOfTheGradient*)&F;
+  Standard_Boolean                 Result, Result2;
+
+  Result               = (2.0 * fabs(TheMinimum - PreviousMinimum)
+            <= 1.e-10 * (fabs(TheMinimum) + fabs(PreviousMinimum)) + 1.e-12);
+  Standard_Real MErr3d = F1->MaxError3d();
+  Standard_Real MErr2d = F1->MaxError2d();
+
+  Result2 = ((MErr3d <= myTol3d) && (MErr2d <= myTol2d));
+  return (Result || Result2);
+}
diff --git a/src/ModelingData/TKGeomBase/AppParCurves/AppParCurves_BSpGradient_BFGS.gxx b/src/ModelingData/TKGeomBase/AppParCurves/AppParCurves_BSpGradient_BFGS.gxx
deleted file mode 100644 (file)
index 8eb25c9..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-// Created on: 1999-12-16
-// Created by: Atelier CAS2000
-// Copyright (c) 1999-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.
-
-// Redefinition de math_BFGS:
-// ==========================
-
-AppParCurves_BSpGradient_BFGS::AppParCurves_BSpGradient_BFGS(
-  math_MultipleVarFunctionWithGradient& F,
-  const math_Vector&                    StartingPoint,
-  const Standard_Real                   Tolerance3d,
-  const Standard_Real                   Tolerance2d,
-  const Standard_Real                   Eps,
-  const Standard_Integer                NbIterations)
-    : math_BFGS(F.NbVariables(), Eps, NbIterations, Eps),
-      myTol3d(Tolerance3d),
-      myTol2d(Tolerance2d)
-{
-
-  Perform(F, StartingPoint);
-}
-
-Standard_Boolean AppParCurves_BSpGradient_BFGS::IsSolutionReached(
-  math_MultipleVarFunctionWithGradient& F) const
-{
-  Standard_Boolean             Result, Result2;
-  AppParCurves_BSpParFunction* F1 = (AppParCurves_BSpParFunction*)&F;
-
-  Result               = (2.0 * fabs(TheMinimum - PreviousMinimum)
-            <= 1.e-10 * (fabs(TheMinimum) + fabs(PreviousMinimum)) + 1.e-12);
-  Standard_Real MErr3d = F1->MaxError3d();
-  Standard_Real MErr2d = F1->MaxError2d();
-  Result2              = ((MErr3d <= myTol3d) && (MErr2d <= myTol2d));
-
-  return (Result || Result2);
-}
diff --git a/src/ModelingData/TKGeomBase/AppParCurves/AppParCurves_Gradient_BFGS.gxx b/src/ModelingData/TKGeomBase/AppParCurves/AppParCurves_Gradient_BFGS.gxx
deleted file mode 100644 (file)
index a0a9bb6..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-// Created on: 1999-12-16
-// Created by: Atelier CAS2000
-// Copyright (c) 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.
-
-// Redefinition de math_BFGS:
-// ==========================
-
-AppParCurves_Gradient_BFGS::AppParCurves_Gradient_BFGS(math_MultipleVarFunctionWithGradient& F,
-                                                       const math_Vector&     StartingPoint,
-                                                       const Standard_Real    Tolerance3d,
-                                                       const Standard_Real    Tolerance2d,
-                                                       const Standard_Real    Eps,
-                                                       const Standard_Integer NbIterations)
-    : math_BFGS(F.NbVariables(), Eps, NbIterations, Eps),
-      myTol3d(Tolerance3d),
-      myTol2d(Tolerance2d)
-{
-  Perform(F, StartingPoint);
-}
-
-Standard_Boolean AppParCurves_Gradient_BFGS::IsSolutionReached(
-  math_MultipleVarFunctionWithGradient& F) const
-{
-  AppParCurves_ParFunction* F1 = (AppParCurves_ParFunction*)&F;
-  Standard_Boolean          Result, Result2;
-
-  Result               = (2.0 * fabs(TheMinimum - PreviousMinimum)
-            <= 1.e-10 * (fabs(TheMinimum) + fabs(PreviousMinimum)) + 1.e-12);
-  Standard_Real MErr3d = F1->MaxError3d();
-  Standard_Real MErr2d = F1->MaxError2d();
-
-  Result2 = ((MErr3d <= myTol3d) && (MErr2d <= myTol2d));
-  return (Result || Result2);
-}
index 6f29275de63f82bba5164483624227a77a5ee395..1fa5a483e97f4586559892376786dacba695ff87 100644 (file)
@@ -10,13 +10,11 @@ set(OCCT_AppParCurves_FILES
   AppParCurves_Array1OfMultiPoint.hxx
   AppParCurves_BSpFunction.gxx
   AppParCurves_BSpGradient.gxx
-  AppParCurves_BSpGradient_BFGS.gxx
   AppParCurves_Constraint.hxx
   AppParCurves_ConstraintCouple.cxx
   AppParCurves_ConstraintCouple.hxx
   AppParCurves_Function.gxx
   AppParCurves_Gradient.gxx
-  AppParCurves_Gradient_BFGS.gxx
   AppParCurves_HArray1OfConstraintCouple.hxx
   AppParCurves_HArray1OfMultiBSpCurve.hxx
   AppParCurves_HArray1OfMultiCurve.hxx
index f10330348d860854e98d6bc860e8ccf6c2e62dda..f4ccc3700e0d6a04d7ef9b8c3d36d134fa22cb7a 100644 (file)
@@ -51,16 +51,18 @@ private:
   gp_Pnt        myP;
 };
 
-#define Pnt gp_Pnt
-#define Pnt_hxx <gp_Pnt.hxx>
-#define Extrema_Point Extrema_POnCurv
-#define Extrema_Point_hxx <Extrema_POnCurv.hxx>
+//=================================================================================================
+// Inline implementations
+//=================================================================================================
 
-#include <Extrema_Point.lxx>
+inline Standard_Real Extrema_POnCurv::Parameter() const
+{
+  return myU;
+}
 
-#undef Pnt
-#undef Pnt_hxx
-#undef Extrema_Point
-#undef Extrema_Point_hxx
+inline const gp_Pnt& Extrema_POnCurv::Value() const
+{
+  return myP;
+}
 
 #endif // _Extrema_POnCurv_HeaderFile
index a2955efc769d61b1f51ba47aeb7d374c768d403a..4917325e0e132f7a4a8deeecb0b211ab0af17d00 100644 (file)
@@ -50,16 +50,18 @@ private:
   gp_Pnt2d      myP;
 };
 
-#define Pnt gp_Pnt2d
-#define Pnt_hxx <gp_Pnt2d.hxx>
-#define Extrema_Point Extrema_POnCurv2d
-#define Extrema_Point_hxx <Extrema_POnCurv2d.hxx>
+//=================================================================================================
+// Inline implementations
+//=================================================================================================
 
-#include <Extrema_Point.lxx>
+inline Standard_Real Extrema_POnCurv2d::Parameter() const
+{
+  return myU;
+}
 
-#undef Pnt
-#undef Pnt_hxx
-#undef Extrema_Point
-#undef Extrema_Point_hxx
+inline const gp_Pnt2d& Extrema_POnCurv2d::Value() const
+{
+  return myP;
+}
 
 #endif // _Extrema_POnCurv2d_HeaderFile
index 34451fdba880879686b4e061efcecd3ab78e4472..30edd8056d964afc046bdb0078a1516e6399eacc 100644 (file)
 
 #include <gp_Pnt2d.hxx>
 
-#define Pnt gp_Pnt2d
-#define Pnt_hxx <gp_Pnt2d.hxx>
-#define Extrema_Point Extrema_POnCurv2d
-#define Extrema_Point_hxx <Extrema_POnCurv2d.hxx>
-#include <Extrema_Point.gxx>
+Extrema_POnCurv2d::Extrema_POnCurv2d()
+    : myU(0.0)
+{
+}
+
+Extrema_POnCurv2d::Extrema_POnCurv2d(const Standard_Real U, const gp_Pnt2d& P)
+{
+  myU = U;
+  myP = P;
+}
+
+void Extrema_POnCurv2d::SetValues(const Standard_Real U, const gp_Pnt2d& P)
+{
+  myU = U;
+  myP = P;
+}
index bf54ce3410d665a997dad1e87b65947f7feaffac..9394926ae2dfea3deccd9ef2e8254d7b98c81894 100644 (file)
 
 #include <gp_Pnt.hxx>
 
-#define Pnt gp_Pnt
-#define Pnt_hxx <gp_Pnt.hxx>
-#define Extrema_Point Extrema_POnCurv
-#define Extrema_Point_hxx <Extrema_POnCurv.hxx>
-#include <Extrema_Point.gxx>
+Extrema_POnCurv::Extrema_POnCurv()
+    : myU(0.0)
+{
+}
+
+Extrema_POnCurv::Extrema_POnCurv(const Standard_Real U, const gp_Pnt& P)
+{
+  myU = U;
+  myP = P;
+}
+
+void Extrema_POnCurv::SetValues(const Standard_Real U, const gp_Pnt& P)
+{
+  myU = U;
+  myP = P;
+}
diff --git a/src/ModelingData/TKGeomBase/Extrema/Extrema_Point.gxx b/src/ModelingData/TKGeomBase/Extrema/Extrema_Point.gxx
deleted file mode 100644 (file)
index fd53fb3..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-// 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.
-
-Extrema_Point::Extrema_Point()
-    : myU(0.0)
-{
-}
-
-Extrema_Point::Extrema_Point(const Standard_Real U, const Pnt& P)
-{
-  myU = U;
-  myP = P;
-}
-
-void Extrema_Point::SetValues(const Standard_Real U, const Pnt& P)
-{
-  myU = U;
-  myP = P;
-}
diff --git a/src/ModelingData/TKGeomBase/Extrema/Extrema_Point.lxx b/src/ModelingData/TKGeomBase/Extrema/Extrema_Point.lxx
deleted file mode 100644 (file)
index 29cfd3c..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-// 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 Standard_Real Extrema_Point::Parameter() const
-{
-  return myU;
-}
-
-inline const Pnt& Extrema_Point::Value() const
-{
-  return myP;
-}
index 91a7c9308a8fa663ef26a307ac69237684210da8..29c1f2d2cfcab63401ab0bc52fba920568cf88d3 100644 (file)
@@ -143,8 +143,6 @@ set(OCCT_Extrema_FILES
   Extrema_PCLocFOfLocEPCOfLocateExtPC2d.hxx
   Extrema_PCLocFOfLocEPCOfLocateExtPC2d_0.cxx
   Extrema_PCLocFOfLocEPCOfLocateExtPC_0.cxx
-  Extrema_Point.gxx
-  Extrema_Point.lxx
   Extrema_POnCurv.hxx
   Extrema_POnCurv2d.hxx
   Extrema_POnCurv2d_0.cxx