]> OCCT Git - occt.git/commitdiff
Coding - Remove unused dependencies from TKXDEDRAW (#650)
authorPasukhin Dmitry <dpasukhi@opencascade.com>
Tue, 29 Jul 2025 07:39:07 +0000 (08:39 +0100)
committerGitHub <noreply@github.com>
Tue, 29 Jul 2025 07:39:07 +0000 (08:39 +0100)
- Removed unused dependency includes from TKXDEDRAW/XDEDRAW module files
- Moved dimension type checking methods from STEPCAFControl_GDTProperty to XCAFDimTolObjects_DimensionObject
- Updated external library dependencies to remove unused libraries

src/DataExchange/TKDESTEP/STEPCAFControl/STEPCAFControl_GDTProperty.cxx
src/DataExchange/TKDESTEP/STEPCAFControl/STEPCAFControl_GDTProperty.hxx
src/DataExchange/TKDESTEP/STEPCAFControl/STEPCAFControl_Writer.cxx
src/DataExchange/TKXCAF/XCAFDimTolObjects/XCAFDimTolObjects_DimensionObject.cxx
src/DataExchange/TKXCAF/XCAFDimTolObjects/XCAFDimTolObjects_DimensionObject.hxx
src/Draw/TKXDEDRAW/EXTERNLIB.cmake
src/Draw/TKXDEDRAW/XDEDRAW/XDEDRAW.cxx
src/Draw/TKXDEDRAW/XDEDRAW/XDEDRAW_GDTs.cxx
src/Draw/TKXSDRAWSTEP/XSDRAWSTEP/XSDRAWSTEP.cxx

index 2706fd494a015c27d6308ee7a227a5bf104ebebd..d4bada297c7f84863d43d7e7be2fc5674f86ed69 100644 (file)
@@ -1206,50 +1206,6 @@ Handle(TCollection_HAsciiString) STEPCAFControl_GDTProperty::GetDatumTargetName(
 
 //=================================================================================================
 
-Standard_Boolean STEPCAFControl_GDTProperty::IsDimensionalLocation(
-  const XCAFDimTolObjects_DimensionType theType)
-{
-  if (theType == XCAFDimTolObjects_DimensionType_Location_None
-      || theType == XCAFDimTolObjects_DimensionType_Location_CurvedDistance
-      || theType == XCAFDimTolObjects_DimensionType_Location_LinearDistance
-      || theType == XCAFDimTolObjects_DimensionType_Location_LinearDistance_FromCenterToOuter
-      || theType == XCAFDimTolObjects_DimensionType_Location_LinearDistance_FromCenterToInner
-      || theType == XCAFDimTolObjects_DimensionType_Location_LinearDistance_FromOuterToCenter
-      || theType == XCAFDimTolObjects_DimensionType_Location_LinearDistance_FromOuterToOuter
-      || theType == XCAFDimTolObjects_DimensionType_Location_LinearDistance_FromOuterToInner
-      || theType == XCAFDimTolObjects_DimensionType_Location_LinearDistance_FromInnerToCenter
-      || theType == XCAFDimTolObjects_DimensionType_Location_LinearDistance_FromInnerToOuter
-      || theType == XCAFDimTolObjects_DimensionType_Location_LinearDistance_FromInnerToInner
-      || theType == XCAFDimTolObjects_DimensionType_Location_Oriented)
-    return Standard_True;
-  return Standard_False;
-}
-
-//=================================================================================================
-
-Standard_Boolean STEPCAFControl_GDTProperty::IsDimensionalSize(
-  const XCAFDimTolObjects_DimensionType theType)
-{
-  if (theType == XCAFDimTolObjects_DimensionType_Size_CurveLength
-      || theType == XCAFDimTolObjects_DimensionType_Size_Diameter
-      || theType == XCAFDimTolObjects_DimensionType_Size_SphericalDiameter
-      || theType == XCAFDimTolObjects_DimensionType_Size_Radius
-      || theType == XCAFDimTolObjects_DimensionType_Size_SphericalRadius
-      || theType == XCAFDimTolObjects_DimensionType_Size_ToroidalMinorDiameter
-      || theType == XCAFDimTolObjects_DimensionType_Size_ToroidalMajorDiameter
-      || theType == XCAFDimTolObjects_DimensionType_Size_ToroidalMinorRadius
-      || theType == XCAFDimTolObjects_DimensionType_Size_ToroidalMajorRadius
-      || theType == XCAFDimTolObjects_DimensionType_Size_ToroidalHighMajorDiameter
-      || theType == XCAFDimTolObjects_DimensionType_Size_ToroidalLowMajorDiameter
-      || theType == XCAFDimTolObjects_DimensionType_Size_ToroidalHighMajorRadius
-      || theType == XCAFDimTolObjects_DimensionType_Size_ToroidalLowMajorRadius
-      || theType == XCAFDimTolObjects_DimensionType_Size_Thickness)
-    return Standard_True;
-  return Standard_False;
-}
-
-//=================================================================================================
-
 StepDimTol_GeometricToleranceType STEPCAFControl_GDTProperty::GetGeomToleranceType(
   const XCAFDimTolObjects_GeomToleranceType theType)
 {
index e7c63335e1723f75db601b2cc1975b2f324c30f8..976e2d046aee2b599266b0d0ac699e1e18e60b43 100644 (file)
@@ -94,12 +94,6 @@ public:
   Standard_EXPORT static Handle(TCollection_HAsciiString) GetDatumTargetName(
     const XCAFDimTolObjects_DatumTargetType theDatumType);
 
-  Standard_EXPORT static Standard_Boolean IsDimensionalLocation(
-    const XCAFDimTolObjects_DimensionType theType);
-
-  Standard_EXPORT static Standard_Boolean IsDimensionalSize(
-    const XCAFDimTolObjects_DimensionType theType);
-
   Standard_EXPORT static StepDimTol_GeometricToleranceType GetGeomToleranceType(
     const XCAFDimTolObjects_GeomToleranceType theType);
 
index f8b9a0455c7edbcfe2a16e925a62641df5e006bc..cfbf513b047630c46625c426d46069a17f87e1a9 100644 (file)
@@ -4489,7 +4489,7 @@ Standard_Boolean STEPCAFControl_Writer::writeDGTsAP242(const Handle(XSControl_Wo
                            aConnectionPnts,
                            theLocalFactors);
     XCAFDimTolObjects_DimensionType aDimType = anObject->GetType();
-    if (STEPCAFControl_GDTProperty::IsDimensionalLocation(aDimType))
+    if (XCAFDimTolObjects_DimensionObject::IsDimensionalLocation(aDimType))
     {
       // Dimensional_Location
       Handle(StepShape_DimensionalLocation) aDim = new StepShape_DimensionalLocation();
@@ -4535,7 +4535,7 @@ Standard_Boolean STEPCAFControl_Writer::writeDGTsAP242(const Handle(XSControl_Wo
         ->Init(new TCollection_HAsciiString(), Standard_False, NULL, aFirstSA, aSecondSA, aPathSA);
       aDimension.SetValue(aDim);
     }
-    else if (STEPCAFControl_GDTProperty::IsDimensionalSize(aDimType))
+    else if (XCAFDimTolObjects_DimensionObject::IsDimensionalSize(aDimType))
     {
       // Dimensional_Size
       Handle(StepShape_DimensionalSize) aDim = new StepShape_DimensionalSize();
index 0301243ce424c561691bb1018792f39519cabde4..ee3093d141df1c408a99cde65c1b8042eaa46652 100644 (file)
@@ -446,6 +446,50 @@ void XCAFDimTolObjects_DimensionObject::RemoveDescription(const Standard_Integer
 
 //=================================================================================================
 
+Standard_Boolean XCAFDimTolObjects_DimensionObject::IsDimensionalLocation(
+  const XCAFDimTolObjects_DimensionType theType)
+{
+  if (theType == XCAFDimTolObjects_DimensionType_Location_None
+      || theType == XCAFDimTolObjects_DimensionType_Location_CurvedDistance
+      || theType == XCAFDimTolObjects_DimensionType_Location_LinearDistance
+      || theType == XCAFDimTolObjects_DimensionType_Location_LinearDistance_FromCenterToOuter
+      || theType == XCAFDimTolObjects_DimensionType_Location_LinearDistance_FromCenterToInner
+      || theType == XCAFDimTolObjects_DimensionType_Location_LinearDistance_FromOuterToCenter
+      || theType == XCAFDimTolObjects_DimensionType_Location_LinearDistance_FromOuterToOuter
+      || theType == XCAFDimTolObjects_DimensionType_Location_LinearDistance_FromOuterToInner
+      || theType == XCAFDimTolObjects_DimensionType_Location_LinearDistance_FromInnerToCenter
+      || theType == XCAFDimTolObjects_DimensionType_Location_LinearDistance_FromInnerToOuter
+      || theType == XCAFDimTolObjects_DimensionType_Location_LinearDistance_FromInnerToInner
+      || theType == XCAFDimTolObjects_DimensionType_Location_Oriented)
+    return Standard_True;
+  return Standard_False;
+}
+
+//=================================================================================================
+
+Standard_Boolean XCAFDimTolObjects_DimensionObject::IsDimensionalSize(
+  const XCAFDimTolObjects_DimensionType theType)
+{
+  if (theType == XCAFDimTolObjects_DimensionType_Size_CurveLength
+      || theType == XCAFDimTolObjects_DimensionType_Size_Diameter
+      || theType == XCAFDimTolObjects_DimensionType_Size_SphericalDiameter
+      || theType == XCAFDimTolObjects_DimensionType_Size_Radius
+      || theType == XCAFDimTolObjects_DimensionType_Size_SphericalRadius
+      || theType == XCAFDimTolObjects_DimensionType_Size_ToroidalMinorDiameter
+      || theType == XCAFDimTolObjects_DimensionType_Size_ToroidalMajorDiameter
+      || theType == XCAFDimTolObjects_DimensionType_Size_ToroidalMinorRadius
+      || theType == XCAFDimTolObjects_DimensionType_Size_ToroidalMajorRadius
+      || theType == XCAFDimTolObjects_DimensionType_Size_ToroidalHighMajorDiameter
+      || theType == XCAFDimTolObjects_DimensionType_Size_ToroidalLowMajorDiameter
+      || theType == XCAFDimTolObjects_DimensionType_Size_ToroidalHighMajorRadius
+      || theType == XCAFDimTolObjects_DimensionType_Size_ToroidalLowMajorRadius
+      || theType == XCAFDimTolObjects_DimensionType_Size_Thickness)
+    return Standard_True;
+  return Standard_False;
+}
+
+//=================================================================================================
+
 void XCAFDimTolObjects_DimensionObject::DumpJson(Standard_OStream& theOStream,
                                                  Standard_Integer  theDepth) const
 {
index 015a6f7b91e951e7d08d720a6e87b9aa31340cea..8f78fe04cc5008890cb3e4472d2af0e20d326520 100644 (file)
@@ -292,6 +292,14 @@ public:
     myDescriptionNames.Append(theName);
   }
 
+  //! Returns true if the dimension type is a location.
+  Standard_EXPORT static Standard_Boolean IsDimensionalLocation(
+    const XCAFDimTolObjects_DimensionType theType);
+
+  //! Returns true if the dimension type is a size.
+  Standard_EXPORT static Standard_Boolean IsDimensionalSize(
+    const XCAFDimTolObjects_DimensionType theType);
+
   //! Dumps the content of me into the stream
   Standard_EXPORT void DumpJson(Standard_OStream& theOStream, Standard_Integer theDepth = -1) const;
 
index 11dc0c6afaa4b7fa96562bd4060f46d260b116a1..9e38847e440fdf7fd64230c40e6be2c26e11eaea 100644 (file)
@@ -16,19 +16,10 @@ set(OCCT_TKXDEDRAW_EXTERNAL_LIBS
   TKTopAlgo
   TKLCAF
   TKG3d
-  TKRWMesh
-  TKDEOBJ
-  TKDEGLTF
-  TKDEPLY
-  TKDESTL
   TKMesh
   TKXSDRAW
-  TKDECascade
-  TKDEIGES
-  TKDESTEP
   TKDCAF
   TKViewerTest
   TKBinXCAF
   TKXmlXCAF
-  TKDEVRML
 )
index d9fa5af0b7359b3d94ac28639383ecccb83cb756..64cbb961bb9ecb6fcdad064c353d1542753cf0d8 100644 (file)
 #include <DDF_Browser.hxx>
 #include <DDocStd.hxx>
 #include <DDocStd_DrawDocument.hxx>
-#include <DE_Wrapper.hxx>
-#include <DEBREP_ConfigurationNode.hxx>
-#include <DEXCAF_ConfigurationNode.hxx>
 #include <Draw.hxx>
 #include <Draw_PluginMacro.hxx>
 #include <Draw_ProgressIndicator.hxx>
 #include <Geom_Axis2Placement.hxx>
-#include <DEIGES_ConfigurationNode.hxx>
 #include <Prs3d_Drawer.hxx>
 #include <Prs3d_LineAspect.hxx>
 #include <Quantity_Color.hxx>
-#include <DESTL_ConfigurationNode.hxx>
-#include <DEOBJ_ConfigurationNode.hxx>
-#include <DEPLY_ConfigurationNode.hxx>
-#include <STEPCAFControl_Controller.hxx>
-#include <DESTEP_ConfigurationNode.hxx>
 #include <TCollection_AsciiString.hxx>
 #include <TCollection_ExtendedString.hxx>
 #include <TCollection_HAsciiString.hxx>
@@ -78,7 +69,6 @@
 #include <V3d_Viewer.hxx>
 #include <ViewerTest.hxx>
 #include <ViewerTest_AutoUpdater.hxx>
-#include <DEVRML_ConfigurationNode.hxx>
 #include <XCAFDoc.hxx>
 #include <XCAFDoc_AssemblyIterator.hxx>
 #include <XCAFDoc_AssemblyGraph.hxx>
@@ -1854,9 +1844,6 @@ void XDEDRAW::Init(Draw_Interpretor& di)
   }
   initactor = Standard_True;
 
-  // Load static variables for STEPCAF (ssv; 16.08.2012)
-  STEPCAFControl_Controller::Init();
-
   // Initialize XCAF formats
   Handle(TDocStd_Application) anApp = DDocStd::GetApplication();
   BinXCAFDrivers::DefineFormat(anApp);
index d0cd7a652c0fe4da742f6fa465b7d71f201a4751..0f5b00d59cd05a79a130f1c66c2148d5561cfc5a 100644 (file)
@@ -21,8 +21,6 @@
 #include <DrawTrSurf.hxx>
 #include <Geom_Plane.hxx>
 
-#include <STEPCAFControl_GDTProperty.hxx>
-
 #include <TDF_Tool.hxx>
 #include <TDF_Label.hxx>
 #include <XCAFDoc_GraphNode.hxx>
@@ -402,7 +400,7 @@ static Standard_Integer DumpNbDGTs(Draw_Interpretor& di, Standard_Integer argc,
       {
         nbCommon++;
       }
-      else if (STEPCAFControl_GDTProperty::IsDimensionalLocation(aDimType))
+      else if (XCAFDimTolObjects_DimensionObject::IsDimensionalLocation(aDimType))
       {
         nbLocation++;
       }
@@ -416,7 +414,7 @@ static Standard_Integer DumpNbDGTs(Draw_Interpretor& di, Standard_Integer argc,
         nbLocation++;
         nbWithPath++;
       }
-      else if (STEPCAFControl_GDTProperty::IsDimensionalSize(aDimType))
+      else if (XCAFDimTolObjects_DimensionObject::IsDimensionalSize(aDimType))
       {
         nbSize++;
       }
index 5889b3be95efc3d8c30294923ed71ef45bff67d1..3ed5126b29080d0f413deea7d45e2340f0deb7e6 100644 (file)
@@ -27,6 +27,7 @@
 #include <OSD_OpenFile.hxx>
 #include <OSD_Parallel.hxx>
 #include <OSD_Path.hxx>
+#include <STEPCAFControl_Controller.hxx>
 #include <STEPCAFControl_Reader.hxx>
 #include <STEPCAFControl_Writer.hxx>
 #include <STEPControl_ActorWrite.hxx>
@@ -1100,6 +1101,7 @@ void XSDRAWSTEP::Factory(Draw_Interpretor& theDI)
   {
     return;
   }
+  STEPCAFControl_Controller::Init();
   aIsActivated = Standard_True;
 
   const char* aGroup = "DE: STEP"; // Step transfer file commands