Skip to content

Commit 783c344

Browse files
authored
Coding - Remove unused dependencies from TKXDEDRAW (#650)
- 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
1 parent 7d2cce0 commit 783c344

9 files changed

Lines changed: 58 additions & 78 deletions

File tree

src/DataExchange/TKDESTEP/STEPCAFControl/STEPCAFControl_GDTProperty.cxx

Lines changed: 0 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1206,50 +1206,6 @@ Handle(TCollection_HAsciiString) STEPCAFControl_GDTProperty::GetDatumTargetName(
12061206

12071207
//=================================================================================================
12081208

1209-
Standard_Boolean STEPCAFControl_GDTProperty::IsDimensionalLocation(
1210-
const XCAFDimTolObjects_DimensionType theType)
1211-
{
1212-
if (theType == XCAFDimTolObjects_DimensionType_Location_None
1213-
|| theType == XCAFDimTolObjects_DimensionType_Location_CurvedDistance
1214-
|| theType == XCAFDimTolObjects_DimensionType_Location_LinearDistance
1215-
|| theType == XCAFDimTolObjects_DimensionType_Location_LinearDistance_FromCenterToOuter
1216-
|| theType == XCAFDimTolObjects_DimensionType_Location_LinearDistance_FromCenterToInner
1217-
|| theType == XCAFDimTolObjects_DimensionType_Location_LinearDistance_FromOuterToCenter
1218-
|| theType == XCAFDimTolObjects_DimensionType_Location_LinearDistance_FromOuterToOuter
1219-
|| theType == XCAFDimTolObjects_DimensionType_Location_LinearDistance_FromOuterToInner
1220-
|| theType == XCAFDimTolObjects_DimensionType_Location_LinearDistance_FromInnerToCenter
1221-
|| theType == XCAFDimTolObjects_DimensionType_Location_LinearDistance_FromInnerToOuter
1222-
|| theType == XCAFDimTolObjects_DimensionType_Location_LinearDistance_FromInnerToInner
1223-
|| theType == XCAFDimTolObjects_DimensionType_Location_Oriented)
1224-
return Standard_True;
1225-
return Standard_False;
1226-
}
1227-
1228-
//=================================================================================================
1229-
1230-
Standard_Boolean STEPCAFControl_GDTProperty::IsDimensionalSize(
1231-
const XCAFDimTolObjects_DimensionType theType)
1232-
{
1233-
if (theType == XCAFDimTolObjects_DimensionType_Size_CurveLength
1234-
|| theType == XCAFDimTolObjects_DimensionType_Size_Diameter
1235-
|| theType == XCAFDimTolObjects_DimensionType_Size_SphericalDiameter
1236-
|| theType == XCAFDimTolObjects_DimensionType_Size_Radius
1237-
|| theType == XCAFDimTolObjects_DimensionType_Size_SphericalRadius
1238-
|| theType == XCAFDimTolObjects_DimensionType_Size_ToroidalMinorDiameter
1239-
|| theType == XCAFDimTolObjects_DimensionType_Size_ToroidalMajorDiameter
1240-
|| theType == XCAFDimTolObjects_DimensionType_Size_ToroidalMinorRadius
1241-
|| theType == XCAFDimTolObjects_DimensionType_Size_ToroidalMajorRadius
1242-
|| theType == XCAFDimTolObjects_DimensionType_Size_ToroidalHighMajorDiameter
1243-
|| theType == XCAFDimTolObjects_DimensionType_Size_ToroidalLowMajorDiameter
1244-
|| theType == XCAFDimTolObjects_DimensionType_Size_ToroidalHighMajorRadius
1245-
|| theType == XCAFDimTolObjects_DimensionType_Size_ToroidalLowMajorRadius
1246-
|| theType == XCAFDimTolObjects_DimensionType_Size_Thickness)
1247-
return Standard_True;
1248-
return Standard_False;
1249-
}
1250-
1251-
//=================================================================================================
1252-
12531209
StepDimTol_GeometricToleranceType STEPCAFControl_GDTProperty::GetGeomToleranceType(
12541210
const XCAFDimTolObjects_GeomToleranceType theType)
12551211
{

src/DataExchange/TKDESTEP/STEPCAFControl/STEPCAFControl_GDTProperty.hxx

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -94,12 +94,6 @@ public:
9494
Standard_EXPORT static Handle(TCollection_HAsciiString) GetDatumTargetName(
9595
const XCAFDimTolObjects_DatumTargetType theDatumType);
9696

97-
Standard_EXPORT static Standard_Boolean IsDimensionalLocation(
98-
const XCAFDimTolObjects_DimensionType theType);
99-
100-
Standard_EXPORT static Standard_Boolean IsDimensionalSize(
101-
const XCAFDimTolObjects_DimensionType theType);
102-
10397
Standard_EXPORT static StepDimTol_GeometricToleranceType GetGeomToleranceType(
10498
const XCAFDimTolObjects_GeomToleranceType theType);
10599

src/DataExchange/TKDESTEP/STEPCAFControl/STEPCAFControl_Writer.cxx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4489,7 +4489,7 @@ Standard_Boolean STEPCAFControl_Writer::writeDGTsAP242(const Handle(XSControl_Wo
44894489
aConnectionPnts,
44904490
theLocalFactors);
44914491
XCAFDimTolObjects_DimensionType aDimType = anObject->GetType();
4492-
if (STEPCAFControl_GDTProperty::IsDimensionalLocation(aDimType))
4492+
if (XCAFDimTolObjects_DimensionObject::IsDimensionalLocation(aDimType))
44934493
{
44944494
// Dimensional_Location
44954495
Handle(StepShape_DimensionalLocation) aDim = new StepShape_DimensionalLocation();
@@ -4535,7 +4535,7 @@ Standard_Boolean STEPCAFControl_Writer::writeDGTsAP242(const Handle(XSControl_Wo
45354535
->Init(new TCollection_HAsciiString(), Standard_False, NULL, aFirstSA, aSecondSA, aPathSA);
45364536
aDimension.SetValue(aDim);
45374537
}
4538-
else if (STEPCAFControl_GDTProperty::IsDimensionalSize(aDimType))
4538+
else if (XCAFDimTolObjects_DimensionObject::IsDimensionalSize(aDimType))
45394539
{
45404540
// Dimensional_Size
45414541
Handle(StepShape_DimensionalSize) aDim = new StepShape_DimensionalSize();

src/DataExchange/TKXCAF/XCAFDimTolObjects/XCAFDimTolObjects_DimensionObject.cxx

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -446,6 +446,50 @@ void XCAFDimTolObjects_DimensionObject::RemoveDescription(const Standard_Integer
446446

447447
//=================================================================================================
448448

449+
Standard_Boolean XCAFDimTolObjects_DimensionObject::IsDimensionalLocation(
450+
const XCAFDimTolObjects_DimensionType theType)
451+
{
452+
if (theType == XCAFDimTolObjects_DimensionType_Location_None
453+
|| theType == XCAFDimTolObjects_DimensionType_Location_CurvedDistance
454+
|| theType == XCAFDimTolObjects_DimensionType_Location_LinearDistance
455+
|| theType == XCAFDimTolObjects_DimensionType_Location_LinearDistance_FromCenterToOuter
456+
|| theType == XCAFDimTolObjects_DimensionType_Location_LinearDistance_FromCenterToInner
457+
|| theType == XCAFDimTolObjects_DimensionType_Location_LinearDistance_FromOuterToCenter
458+
|| theType == XCAFDimTolObjects_DimensionType_Location_LinearDistance_FromOuterToOuter
459+
|| theType == XCAFDimTolObjects_DimensionType_Location_LinearDistance_FromOuterToInner
460+
|| theType == XCAFDimTolObjects_DimensionType_Location_LinearDistance_FromInnerToCenter
461+
|| theType == XCAFDimTolObjects_DimensionType_Location_LinearDistance_FromInnerToOuter
462+
|| theType == XCAFDimTolObjects_DimensionType_Location_LinearDistance_FromInnerToInner
463+
|| theType == XCAFDimTolObjects_DimensionType_Location_Oriented)
464+
return Standard_True;
465+
return Standard_False;
466+
}
467+
468+
//=================================================================================================
469+
470+
Standard_Boolean XCAFDimTolObjects_DimensionObject::IsDimensionalSize(
471+
const XCAFDimTolObjects_DimensionType theType)
472+
{
473+
if (theType == XCAFDimTolObjects_DimensionType_Size_CurveLength
474+
|| theType == XCAFDimTolObjects_DimensionType_Size_Diameter
475+
|| theType == XCAFDimTolObjects_DimensionType_Size_SphericalDiameter
476+
|| theType == XCAFDimTolObjects_DimensionType_Size_Radius
477+
|| theType == XCAFDimTolObjects_DimensionType_Size_SphericalRadius
478+
|| theType == XCAFDimTolObjects_DimensionType_Size_ToroidalMinorDiameter
479+
|| theType == XCAFDimTolObjects_DimensionType_Size_ToroidalMajorDiameter
480+
|| theType == XCAFDimTolObjects_DimensionType_Size_ToroidalMinorRadius
481+
|| theType == XCAFDimTolObjects_DimensionType_Size_ToroidalMajorRadius
482+
|| theType == XCAFDimTolObjects_DimensionType_Size_ToroidalHighMajorDiameter
483+
|| theType == XCAFDimTolObjects_DimensionType_Size_ToroidalLowMajorDiameter
484+
|| theType == XCAFDimTolObjects_DimensionType_Size_ToroidalHighMajorRadius
485+
|| theType == XCAFDimTolObjects_DimensionType_Size_ToroidalLowMajorRadius
486+
|| theType == XCAFDimTolObjects_DimensionType_Size_Thickness)
487+
return Standard_True;
488+
return Standard_False;
489+
}
490+
491+
//=================================================================================================
492+
449493
void XCAFDimTolObjects_DimensionObject::DumpJson(Standard_OStream& theOStream,
450494
Standard_Integer theDepth) const
451495
{

src/DataExchange/TKXCAF/XCAFDimTolObjects/XCAFDimTolObjects_DimensionObject.hxx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -292,6 +292,14 @@ public:
292292
myDescriptionNames.Append(theName);
293293
}
294294

295+
//! Returns true if the dimension type is a location.
296+
Standard_EXPORT static Standard_Boolean IsDimensionalLocation(
297+
const XCAFDimTolObjects_DimensionType theType);
298+
299+
//! Returns true if the dimension type is a size.
300+
Standard_EXPORT static Standard_Boolean IsDimensionalSize(
301+
const XCAFDimTolObjects_DimensionType theType);
302+
295303
//! Dumps the content of me into the stream
296304
Standard_EXPORT void DumpJson(Standard_OStream& theOStream, Standard_Integer theDepth = -1) const;
297305

src/Draw/TKXDEDRAW/EXTERNLIB.cmake

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,19 +16,10 @@ set(OCCT_TKXDEDRAW_EXTERNAL_LIBS
1616
TKTopAlgo
1717
TKLCAF
1818
TKG3d
19-
TKRWMesh
20-
TKDEOBJ
21-
TKDEGLTF
22-
TKDEPLY
23-
TKDESTL
2419
TKMesh
2520
TKXSDRAW
26-
TKDECascade
27-
TKDEIGES
28-
TKDESTEP
2921
TKDCAF
3022
TKViewerTest
3123
TKBinXCAF
3224
TKXmlXCAF
33-
TKDEVRML
3425
)

src/Draw/TKXDEDRAW/XDEDRAW/XDEDRAW.cxx

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -24,22 +24,13 @@
2424
#include <DDF_Browser.hxx>
2525
#include <DDocStd.hxx>
2626
#include <DDocStd_DrawDocument.hxx>
27-
#include <DE_Wrapper.hxx>
28-
#include <DEBREP_ConfigurationNode.hxx>
29-
#include <DEXCAF_ConfigurationNode.hxx>
3027
#include <Draw.hxx>
3128
#include <Draw_PluginMacro.hxx>
3229
#include <Draw_ProgressIndicator.hxx>
3330
#include <Geom_Axis2Placement.hxx>
34-
#include <DEIGES_ConfigurationNode.hxx>
3531
#include <Prs3d_Drawer.hxx>
3632
#include <Prs3d_LineAspect.hxx>
3733
#include <Quantity_Color.hxx>
38-
#include <DESTL_ConfigurationNode.hxx>
39-
#include <DEOBJ_ConfigurationNode.hxx>
40-
#include <DEPLY_ConfigurationNode.hxx>
41-
#include <STEPCAFControl_Controller.hxx>
42-
#include <DESTEP_ConfigurationNode.hxx>
4334
#include <TCollection_AsciiString.hxx>
4435
#include <TCollection_ExtendedString.hxx>
4536
#include <TCollection_HAsciiString.hxx>
@@ -78,7 +69,6 @@
7869
#include <V3d_Viewer.hxx>
7970
#include <ViewerTest.hxx>
8071
#include <ViewerTest_AutoUpdater.hxx>
81-
#include <DEVRML_ConfigurationNode.hxx>
8272
#include <XCAFDoc.hxx>
8373
#include <XCAFDoc_AssemblyIterator.hxx>
8474
#include <XCAFDoc_AssemblyGraph.hxx>
@@ -1854,9 +1844,6 @@ void XDEDRAW::Init(Draw_Interpretor& di)
18541844
}
18551845
initactor = Standard_True;
18561846

1857-
// Load static variables for STEPCAF (ssv; 16.08.2012)
1858-
STEPCAFControl_Controller::Init();
1859-
18601847
// Initialize XCAF formats
18611848
Handle(TDocStd_Application) anApp = DDocStd::GetApplication();
18621849
BinXCAFDrivers::DefineFormat(anApp);

src/Draw/TKXDEDRAW/XDEDRAW/XDEDRAW_GDTs.cxx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@
2121
#include <DrawTrSurf.hxx>
2222
#include <Geom_Plane.hxx>
2323

24-
#include <STEPCAFControl_GDTProperty.hxx>
25-
2624
#include <TDF_Tool.hxx>
2725
#include <TDF_Label.hxx>
2826
#include <XCAFDoc_GraphNode.hxx>
@@ -402,7 +400,7 @@ static Standard_Integer DumpNbDGTs(Draw_Interpretor& di, Standard_Integer argc,
402400
{
403401
nbCommon++;
404402
}
405-
else if (STEPCAFControl_GDTProperty::IsDimensionalLocation(aDimType))
403+
else if (XCAFDimTolObjects_DimensionObject::IsDimensionalLocation(aDimType))
406404
{
407405
nbLocation++;
408406
}
@@ -416,7 +414,7 @@ static Standard_Integer DumpNbDGTs(Draw_Interpretor& di, Standard_Integer argc,
416414
nbLocation++;
417415
nbWithPath++;
418416
}
419-
else if (STEPCAFControl_GDTProperty::IsDimensionalSize(aDimType))
417+
else if (XCAFDimTolObjects_DimensionObject::IsDimensionalSize(aDimType))
420418
{
421419
nbSize++;
422420
}

src/Draw/TKXSDRAWSTEP/XSDRAWSTEP/XSDRAWSTEP.cxx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
#include <OSD_OpenFile.hxx>
2828
#include <OSD_Parallel.hxx>
2929
#include <OSD_Path.hxx>
30+
#include <STEPCAFControl_Controller.hxx>
3031
#include <STEPCAFControl_Reader.hxx>
3132
#include <STEPCAFControl_Writer.hxx>
3233
#include <STEPControl_ActorWrite.hxx>
@@ -1100,6 +1101,7 @@ void XSDRAWSTEP::Factory(Draw_Interpretor& theDI)
11001101
{
11011102
return;
11021103
}
1104+
STEPCAFControl_Controller::Init();
11031105
aIsActivated = Standard_True;
11041106

11051107
const char* aGroup = "DE: STEP"; // Step transfer file commands

0 commit comments

Comments
 (0)