From e4acd164edad6f7bd9ac858dfaf4aed7c046a90d Mon Sep 17 00:00:00 2001 From: dkulikov Date: Mon, 14 Jul 2025 17:00:16 +0100 Subject: [PATCH] For some STEP files we fail for geometric tolerances to read the "geometric_tolerance.magnitude" StepDimTol_GeometricTolerance and related classes can now process both StepBasic_MeasureWithUnit and StepRepr_ReprItemAndMeasureWithUnit. Unit tests for changed methods are added. --- src/DataExchange/TKDESTEP/GTests/FILES.cmake | 1 + .../GTests/StepTransientReplacements_Test.cxx | 361 ++++++++++++++++++ .../RWStepBasic_RWConversionBasedUnit.cxx | 4 +- ...Basic_RWConversionBasedUnitAndAreaUnit.cxx | 4 +- ...sic_RWConversionBasedUnitAndLengthUnit.cxx | 4 +- ...Basic_RWConversionBasedUnitAndMassUnit.cxx | 4 +- ...RWConversionBasedUnitAndPlaneAngleUnit.cxx | 4 +- ...asic_RWConversionBasedUnitAndRatioUnit.cxx | 4 +- ...RWConversionBasedUnitAndSolidAngleUnit.cxx | 4 +- ...Basic_RWConversionBasedUnitAndTimeUnit.cxx | 4 +- ...sic_RWConversionBasedUnitAndVolumeUnit.cxx | 4 +- .../RWStepDimTol_RWAngularityTolerance.cxx | 4 +- ...RWStepDimTol_RWCircularRunoutTolerance.cxx | 4 +- .../RWStepDimTol_RWCoaxialityTolerance.cxx | 4 +- .../RWStepDimTol_RWConcentricityTolerance.cxx | 4 +- .../RWStepDimTol_RWCylindricityTolerance.cxx | 4 +- .../RWStepDimTol_RWFlatnessTolerance.cxx | 4 +- ...WStepDimTol_RWGeoTolAndGeoTolWthDatRef.cxx | 4 +- ...olAndGeoTolWthDatRefAndGeoTolWthMaxTol.cxx | 4 +- ...eoTolAndGeoTolWthDatRefAndGeoTolWthMod.cxx | 4 +- ...ndGeoTolWthDatRefAndModGeoTolAndPosTol.cxx | 4 +- ...oTolAndGeoTolWthDatRefAndUneqDisGeoTol.cxx | 4 +- ...WStepDimTol_RWGeoTolAndGeoTolWthMaxTol.cxx | 4 +- .../RWStepDimTol_RWGeoTolAndGeoTolWthMod.cxx | 4 +- .../RWStepDimTol_RWGeometricTolerance.cxx | 4 +- ...RWGeometricToleranceWithDatumReference.cxx | 4 +- ...WGeometricToleranceWithDefinedAreaUnit.cxx | 4 +- ...ol_RWGeometricToleranceWithDefinedUnit.cxx | 4 +- ...GeometricToleranceWithMaximumTolerance.cxx | 4 +- ...mTol_RWGeometricToleranceWithModifiers.cxx | 4 +- .../RWStepDimTol_RWLineProfileTolerance.cxx | 4 +- ...tepDimTol_RWModifiedGeometricTolerance.cxx | 4 +- .../RWStepDimTol_RWParallelismTolerance.cxx | 4 +- ...StepDimTol_RWPerpendicularityTolerance.cxx | 4 +- .../RWStepDimTol_RWPositionTolerance.cxx | 4 +- .../RWStepDimTol_RWRoundnessTolerance.cxx | 4 +- .../RWStepDimTol_RWStraightnessTolerance.cxx | 4 +- ...RWStepDimTol_RWSurfaceProfileTolerance.cxx | 4 +- .../RWStepDimTol_RWSymmetryTolerance.cxx | 4 +- .../RWStepDimTol_RWTotalRunoutTolerance.cxx | 4 +- ..._RWUnequallyDisposedGeometricTolerance.cxx | 4 +- .../RWStepRepr_RWMakeFromUsageOption.cxx | 4 +- .../RWStepRepr_RWParallelOffset.cxx | 4 +- ...epr_RWQuantifiedAssemblyComponentUsage.cxx | 4 +- .../RWStepShape_RWMeasureQualification.cxx | 4 +- .../RWStepShape_RWToleranceValue.cxx | 57 +-- .../STEPCAFControl/STEPCAFControl_Reader.cxx | 107 +++--- .../STEPConstruct_UnitContext.cxx | 73 ++-- .../STEPControl/STEPControl_Reader.cxx | 14 +- .../StepBasic_ConversionBasedUnit.cxx | 6 +- .../StepBasic_ConversionBasedUnit.hxx | 11 +- ...Basic_ConversionBasedUnitAndLengthUnit.cxx | 2 +- ...Basic_ConversionBasedUnitAndLengthUnit.hxx | 2 +- ...epBasic_ConversionBasedUnitAndMassUnit.cxx | 2 +- ...epBasic_ConversionBasedUnitAndMassUnit.hxx | 2 +- ...c_ConversionBasedUnitAndPlaneAngleUnit.cxx | 2 +- ...c_ConversionBasedUnitAndPlaneAngleUnit.hxx | 2 +- ...pBasic_ConversionBasedUnitAndRatioUnit.cxx | 2 +- ...pBasic_ConversionBasedUnitAndRatioUnit.hxx | 2 +- ...c_ConversionBasedUnitAndSolidAngleUnit.cxx | 2 +- ...c_ConversionBasedUnitAndSolidAngleUnit.hxx | 2 +- ...epBasic_ConversionBasedUnitAndTimeUnit.cxx | 2 +- ...epBasic_ConversionBasedUnitAndTimeUnit.hxx | 2 +- .../StepDimTol_GeoTolAndGeoTolWthDatRef.cxx | 4 +- .../StepDimTol_GeoTolAndGeoTolWthDatRef.hxx | 11 +- ...olAndGeoTolWthDatRefAndGeoTolWthMaxTol.cxx | 4 +- ...olAndGeoTolWthDatRefAndGeoTolWthMaxTol.hxx | 11 +- ...eoTolAndGeoTolWthDatRefAndGeoTolWthMod.cxx | 4 +- ...eoTolAndGeoTolWthDatRefAndGeoTolWthMod.hxx | 11 +- ...ndGeoTolWthDatRefAndModGeoTolAndPosTol.cxx | 4 +- ...ndGeoTolWthDatRefAndModGeoTolAndPosTol.hxx | 11 +- ...oTolAndGeoTolWthDatRefAndUneqDisGeoTol.cxx | 4 +- ...oTolAndGeoTolWthDatRefAndUneqDisGeoTol.hxx | 11 +- .../StepDimTol_GeoTolAndGeoTolWthMaxTol.cxx | 4 +- .../StepDimTol_GeoTolAndGeoTolWthMaxTol.hxx | 11 +- .../StepDimTol_GeoTolAndGeoTolWthMod.cxx | 4 +- .../StepDimTol_GeoTolAndGeoTolWthMod.hxx | 11 +- .../StepDimTol_GeometricTolerance.cxx | 15 +- .../StepDimTol_GeometricTolerance.hxx | 17 +- ...l_GeometricToleranceWithDatumReference.cxx | 4 +- ...l_GeometricToleranceWithDatumReference.hxx | 5 +- ..._GeometricToleranceWithDefinedAreaUnit.cxx | 2 +- ..._GeometricToleranceWithDefinedAreaUnit.hxx | 2 +- ...mTol_GeometricToleranceWithDefinedUnit.cxx | 4 +- ...mTol_GeometricToleranceWithDefinedUnit.hxx | 4 +- ...GeometricToleranceWithMaximumTolerance.cxx | 2 +- ...GeometricToleranceWithMaximumTolerance.hxx | 2 +- ...DimTol_GeometricToleranceWithModifiers.cxx | 2 +- ...DimTol_GeometricToleranceWithModifiers.hxx | 3 +- .../StepDimTol_ModifiedGeometricTolerance.cxx | 12 +- .../StepDimTol_ModifiedGeometricTolerance.hxx | 13 +- ...ol_UnequallyDisposedGeometricTolerance.cxx | 2 +- ...ol_UnequallyDisposedGeometricTolerance.hxx | 2 +- .../StepRepr/StepRepr_MakeFromUsageOption.cxx | 20 +- .../StepRepr/StepRepr_MakeFromUsageOption.hxx | 15 +- .../StepRepr/StepRepr_ParallelOffset.cxx | 2 +- .../StepRepr/StepRepr_ParallelOffset.hxx | 9 +- ...pRepr_QuantifiedAssemblyComponentUsage.cxx | 20 +- ...pRepr_QuantifiedAssemblyComponentUsage.hxx | 11 +- .../StepShape_MeasureQualification.cxx | 6 +- .../StepShape_MeasureQualification.hxx | 10 +- .../TKDESTEP/StepToGeom/StepToGeom.cxx | 17 +- tests/bugs/step/bug_gh384 | 34 ++ 103 files changed, 744 insertions(+), 422 deletions(-) create mode 100644 src/DataExchange/TKDESTEP/GTests/StepTransientReplacements_Test.cxx create mode 100644 tests/bugs/step/bug_gh384 diff --git a/src/DataExchange/TKDESTEP/GTests/FILES.cmake b/src/DataExchange/TKDESTEP/GTests/FILES.cmake index 88e5402244..df6050cd9d 100644 --- a/src/DataExchange/TKDESTEP/GTests/FILES.cmake +++ b/src/DataExchange/TKDESTEP/GTests/FILES.cmake @@ -13,4 +13,5 @@ set(OCCT_TKDESTEP_GTests_FILES StepTidy_PlaneReducer_Test.cxx StepTidy_Merger_Test.cxx StepTidy_VectorReducer_Test.cxx + StepTransientReplacements_Test.cxx ) diff --git a/src/DataExchange/TKDESTEP/GTests/StepTransientReplacements_Test.cxx b/src/DataExchange/TKDESTEP/GTests/StepTransientReplacements_Test.cxx new file mode 100644 index 0000000000..629d5b1f53 --- /dev/null +++ b/src/DataExchange/TKDESTEP/GTests/StepTransientReplacements_Test.cxx @@ -0,0 +1,361 @@ +#include + +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +// Helper functions to create test objects +namespace +{ + +// Create a MeasureWithUnit +Handle(StepBasic_MeasureWithUnit) CreateMeasureWithUnit(const Standard_Real theValue) +{ + Handle(StepBasic_MeasureWithUnit) aMeasure = new StepBasic_MeasureWithUnit(); + + // Set value component + Handle(StepBasic_MeasureValueMember) aValueMember = new StepBasic_MeasureValueMember(); + aValueMember->SetName("POSITIVE_LENGTH_MEASURE"); + aValueMember->SetReal(theValue); + aMeasure->SetValueComponentMember(aValueMember); + + // Create a dummy SiUnit for unit component + Handle(StepBasic_SiUnit) aSiUnit = new StepBasic_SiUnit(); + aSiUnit->Init(Standard_False, + StepBasic_SiPrefix::StepBasic_spMilli, + StepBasic_SiUnitName::StepBasic_sunMetre); + StepBasic_Unit aUnit; + aUnit.SetValue(aSiUnit); + aMeasure->SetUnitComponent(aUnit); + + return aMeasure; +} + +// Create a ReprItemAndMeasureWithUnit +Handle(StepRepr_ReprItemAndMeasureWithUnit) CreateReprItemAndMeasureWithUnit( + const Standard_Real theValue) +{ + Handle(StepRepr_ReprItemAndMeasureWithUnit) aReprMeasure = + new StepRepr_ReprItemAndMeasureWithUnit(); + Handle(StepBasic_MeasureWithUnit) aMeasure = CreateMeasureWithUnit(theValue); + aReprMeasure->SetMeasureWithUnit(aMeasure); + + // Set other required fields + Handle(TCollection_HAsciiString) aName = new TCollection_HAsciiString("TestReprItem"); + aReprMeasure->SetName(aName); + + return aReprMeasure; +} +} // namespace + +// Test fixture for all transient replacement tests +class StepTransientReplacements : public ::testing::Test +{ +protected: + void SetUp() override + { + // Create common test objects + myMeasureWithUnit = CreateMeasureWithUnit(5.0); + myReprItemAndMeasureWithUnit = CreateReprItemAndMeasureWithUnit(10.0); + + // Create dimensional exponents + myDimensionalExponents = new StepBasic_DimensionalExponents(); + myDimensionalExponents->Init(0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0); + + // Create name string + myName = new TCollection_HAsciiString("TestName"); + + // Create description string + myDescription = new TCollection_HAsciiString("TestDescription"); + + // Create product definition + myProductDefinition = new StepBasic_ProductDefinition(); + + // Create product definition shape + myProductDefinitionShape = new StepRepr_ProductDefinitionShape(); + + // Create qualifiers array + myQualifiers = new StepShape_HArray1OfValueQualifier(1, 1); + } + + // Common test objects + Handle(StepBasic_MeasureWithUnit) myMeasureWithUnit; + Handle(StepRepr_ReprItemAndMeasureWithUnit) myReprItemAndMeasureWithUnit; + Handle(StepBasic_DimensionalExponents) myDimensionalExponents; + Handle(TCollection_HAsciiString) myName; + Handle(TCollection_HAsciiString) myDescription; + Handle(StepBasic_ProductDefinition) myProductDefinition; + Handle(StepRepr_ProductDefinitionShape) myProductDefinitionShape; + Handle(StepShape_HArray1OfValueQualifier) myQualifiers; +}; + +// Test ConversionBasedUnit with different transient types +TEST_F(StepTransientReplacements, ConversionBasedUnit_WorksWithBothTypes) +{ + // Create ConversionBasedUnit + Handle(StepBasic_ConversionBasedUnit) aUnit = new StepBasic_ConversionBasedUnit(); + + // Test with MeasureWithUnit + aUnit->Init(myDimensionalExponents, myName, myMeasureWithUnit); + EXPECT_FALSE(aUnit->ConversionFactor().IsNull()); + EXPECT_TRUE(aUnit->ConversionFactor()->IsKind(STANDARD_TYPE(StepBasic_MeasureWithUnit))); + + Handle(StepBasic_MeasureWithUnit) aMeasure = + Handle(StepBasic_MeasureWithUnit)::DownCast(aUnit->ConversionFactor()); + EXPECT_FALSE(aMeasure.IsNull()); + EXPECT_NEAR(aMeasure->ValueComponent(), 5.0, 1e-7); + + // Test with ReprItemAndMeasureWithUnit + aUnit->SetConversionFactor(myReprItemAndMeasureWithUnit); + EXPECT_FALSE(aUnit->ConversionFactor().IsNull()); + EXPECT_TRUE( + aUnit->ConversionFactor()->IsKind(STANDARD_TYPE(StepRepr_ReprItemAndMeasureWithUnit))); + + Handle(StepRepr_ReprItemAndMeasureWithUnit) aReprMeasure = + Handle(StepRepr_ReprItemAndMeasureWithUnit)::DownCast(aUnit->ConversionFactor()); + EXPECT_FALSE(aReprMeasure.IsNull()); + Handle(StepBasic_MeasureWithUnit) aExtractedMeasure = aReprMeasure->GetMeasureWithUnit(); + EXPECT_NEAR(aExtractedMeasure->ValueComponent(), 10.0, 1e-7); +} + +// Test GeometricTolerance with different transient types +TEST_F(StepTransientReplacements, GeometricTolerance_WorksWithBothTypes) +{ + // Create GeometricTolerance + Handle(StepDimTol_GeometricTolerance) aTolerance = new StepDimTol_GeometricTolerance(); + + // Create a dummy tolerance target + StepDimTol_GeometricToleranceTarget aTarget; + + // Test with MeasureWithUnit + aTolerance->Init(myName, myDescription, myMeasureWithUnit, aTarget); + EXPECT_FALSE(aTolerance->Magnitude().IsNull()); + EXPECT_TRUE(aTolerance->Magnitude()->IsKind(STANDARD_TYPE(StepBasic_MeasureWithUnit))); + + Handle(StepBasic_MeasureWithUnit) aMeasure = + Handle(StepBasic_MeasureWithUnit)::DownCast(aTolerance->Magnitude()); + EXPECT_FALSE(aMeasure.IsNull()); + EXPECT_NEAR(aMeasure->ValueComponent(), 5.0, 1e-7); + + // Test with ReprItemAndMeasureWithUnit + aTolerance->SetMagnitude(myReprItemAndMeasureWithUnit); + EXPECT_FALSE(aTolerance->Magnitude().IsNull()); + EXPECT_TRUE(aTolerance->Magnitude()->IsKind(STANDARD_TYPE(StepRepr_ReprItemAndMeasureWithUnit))); + + Handle(StepRepr_ReprItemAndMeasureWithUnit) aReprMeasure = + Handle(StepRepr_ReprItemAndMeasureWithUnit)::DownCast(aTolerance->Magnitude()); + EXPECT_FALSE(aReprMeasure.IsNull()); + Handle(StepBasic_MeasureWithUnit) aExtractedMeasure = aReprMeasure->GetMeasureWithUnit(); + EXPECT_NEAR(aExtractedMeasure->ValueComponent(), 10.0, 1e-7); +} + +// Test MakeFromUsageOption with different transient types +TEST_F(StepTransientReplacements, MakeFromUsageOption_WorksWithBothTypes) +{ + // Create MakeFromUsageOption + Handle(StepRepr_MakeFromUsageOption) aMakeFromUsage = new StepRepr_MakeFromUsageOption(); + + // Test with MeasureWithUnit + // Use proper function signature for Init + Standard_Boolean hasDescription = Standard_True; + aMakeFromUsage->Init(myName, + myName, + hasDescription, + myDescription, + myProductDefinition, + myProductDefinition, + 1, + myDescription, + myMeasureWithUnit); + + EXPECT_FALSE(aMakeFromUsage->Quantity().IsNull()); + EXPECT_TRUE(aMakeFromUsage->Quantity()->IsKind(STANDARD_TYPE(StepBasic_MeasureWithUnit))); + + Handle(StepBasic_MeasureWithUnit) aMeasure = + Handle(StepBasic_MeasureWithUnit)::DownCast(aMakeFromUsage->Quantity()); + EXPECT_FALSE(aMeasure.IsNull()); + EXPECT_NEAR(aMeasure->ValueComponent(), 5.0, 1e-7); + + // Test with ReprItemAndMeasureWithUnit + aMakeFromUsage->SetQuantity(myReprItemAndMeasureWithUnit); + EXPECT_FALSE(aMakeFromUsage->Quantity().IsNull()); + EXPECT_TRUE( + aMakeFromUsage->Quantity()->IsKind(STANDARD_TYPE(StepRepr_ReprItemAndMeasureWithUnit))); + + Handle(StepRepr_ReprItemAndMeasureWithUnit) aReprMeasure = + Handle(StepRepr_ReprItemAndMeasureWithUnit)::DownCast(aMakeFromUsage->Quantity()); + EXPECT_FALSE(aReprMeasure.IsNull()); + Handle(StepBasic_MeasureWithUnit) aExtractedMeasure = aReprMeasure->GetMeasureWithUnit(); + EXPECT_NEAR(aExtractedMeasure->ValueComponent(), 10.0, 1e-7); +} + +// Test ParallelOffset with different transient types +TEST_F(StepTransientReplacements, ParallelOffset_WorksWithBothTypes) +{ + // Create ParallelOffset + Handle(StepRepr_ParallelOffset) aParallelOffset = new StepRepr_ParallelOffset(); + + // Test with MeasureWithUnit + aParallelOffset->Init(myName, + myDescription, + myProductDefinitionShape, + StepData_LTrue, + myMeasureWithUnit); + + EXPECT_FALSE(aParallelOffset->Offset().IsNull()); + EXPECT_TRUE(aParallelOffset->Offset()->IsKind(STANDARD_TYPE(StepBasic_MeasureWithUnit))); + + Handle(StepBasic_MeasureWithUnit) aMeasure = + Handle(StepBasic_MeasureWithUnit)::DownCast(aParallelOffset->Offset()); + EXPECT_FALSE(aMeasure.IsNull()); + EXPECT_NEAR(aMeasure->ValueComponent(), 5.0, 1e-7); + + // Test with ReprItemAndMeasureWithUnit + aParallelOffset->SetOffset(myReprItemAndMeasureWithUnit); + EXPECT_FALSE(aParallelOffset->Offset().IsNull()); + EXPECT_TRUE( + aParallelOffset->Offset()->IsKind(STANDARD_TYPE(StepRepr_ReprItemAndMeasureWithUnit))); + + Handle(StepRepr_ReprItemAndMeasureWithUnit) aReprMeasure = + Handle(StepRepr_ReprItemAndMeasureWithUnit)::DownCast(aParallelOffset->Offset()); + EXPECT_FALSE(aReprMeasure.IsNull()); + Handle(StepBasic_MeasureWithUnit) aExtractedMeasure = aReprMeasure->GetMeasureWithUnit(); + EXPECT_NEAR(aExtractedMeasure->ValueComponent(), 10.0, 1e-7); +} + +// Test QuantifiedAssemblyComponentUsage with different transient types +TEST_F(StepTransientReplacements, QuantifiedAssemblyComponentUsage_WorksWithBothTypes) +{ + // Create QuantifiedAssemblyComponentUsage + Handle(StepRepr_QuantifiedAssemblyComponentUsage) aUsage = + new StepRepr_QuantifiedAssemblyComponentUsage(); + + // Test with MeasureWithUnit + // Use proper function signature for Init + Standard_Boolean hasDescription = Standard_True; + Standard_Boolean hasReferenceDesignator = Standard_True; + aUsage->Init(myName, + myName, + hasDescription, + myDescription, + myProductDefinition, + myProductDefinition, + hasReferenceDesignator, + myName, + myMeasureWithUnit); + + EXPECT_FALSE(aUsage->Quantity().IsNull()); + EXPECT_TRUE(aUsage->Quantity()->IsKind(STANDARD_TYPE(StepBasic_MeasureWithUnit))); + + Handle(StepBasic_MeasureWithUnit) aMeasure = + Handle(StepBasic_MeasureWithUnit)::DownCast(aUsage->Quantity()); + EXPECT_FALSE(aMeasure.IsNull()); + EXPECT_NEAR(aMeasure->ValueComponent(), 5.0, 1e-7); + + // Test with ReprItemAndMeasureWithUnit + aUsage->SetQuantity(myReprItemAndMeasureWithUnit); + EXPECT_FALSE(aUsage->Quantity().IsNull()); + EXPECT_TRUE(aUsage->Quantity()->IsKind(STANDARD_TYPE(StepRepr_ReprItemAndMeasureWithUnit))); + + Handle(StepRepr_ReprItemAndMeasureWithUnit) aReprMeasure = + Handle(StepRepr_ReprItemAndMeasureWithUnit)::DownCast(aUsage->Quantity()); + EXPECT_FALSE(aReprMeasure.IsNull()); + Handle(StepBasic_MeasureWithUnit) aExtractedMeasure = aReprMeasure->GetMeasureWithUnit(); + EXPECT_NEAR(aExtractedMeasure->ValueComponent(), 10.0, 1e-7); +} + +// Test MeasureQualification with different transient types +TEST_F(StepTransientReplacements, MeasureQualification_WorksWithBothTypes) +{ + // Create MeasureQualification + Handle(StepShape_MeasureQualification) aQualification = new StepShape_MeasureQualification(); + + // Test with MeasureWithUnit + aQualification->Init(myName, myDescription, myMeasureWithUnit, myQualifiers); + + EXPECT_FALSE(aQualification->QualifiedMeasure().IsNull()); + EXPECT_TRUE(aQualification->QualifiedMeasure()->IsKind(STANDARD_TYPE(StepBasic_MeasureWithUnit))); + + Handle(StepBasic_MeasureWithUnit) aMeasure = + Handle(StepBasic_MeasureWithUnit)::DownCast(aQualification->QualifiedMeasure()); + EXPECT_FALSE(aMeasure.IsNull()); + EXPECT_NEAR(aMeasure->ValueComponent(), 5.0, 1e-7); + + // Test with ReprItemAndMeasureWithUnit + aQualification->SetQualifiedMeasure(myReprItemAndMeasureWithUnit); + EXPECT_FALSE(aQualification->QualifiedMeasure().IsNull()); + EXPECT_TRUE( + aQualification->QualifiedMeasure()->IsKind(STANDARD_TYPE(StepRepr_ReprItemAndMeasureWithUnit))); + + Handle(StepRepr_ReprItemAndMeasureWithUnit) aReprMeasure = + Handle(StepRepr_ReprItemAndMeasureWithUnit)::DownCast(aQualification->QualifiedMeasure()); + EXPECT_FALSE(aReprMeasure.IsNull()); + Handle(StepBasic_MeasureWithUnit) aExtractedMeasure = aReprMeasure->GetMeasureWithUnit(); + EXPECT_NEAR(aExtractedMeasure->ValueComponent(), 10.0, 1e-7); +} + +// Test GetMeasureWithUnit helper function from STEPCAFControl_Reader namespace +TEST_F(StepTransientReplacements, GetMeasureWithUnit_ExtractsCorrectly) +{ + // This tests the helper function that was added in STEPCAFControl_Reader.cxx + // We recreate the function here for testing + + auto GetMeasureWithUnit = + [](const Handle(Standard_Transient)& theMeasure) -> Handle(StepBasic_MeasureWithUnit) { + if (theMeasure.IsNull()) + { + return nullptr; + } + + Handle(StepBasic_MeasureWithUnit) aMeasureWithUnit; + if (theMeasure->IsKind(STANDARD_TYPE(StepBasic_MeasureWithUnit))) + { + aMeasureWithUnit = Handle(StepBasic_MeasureWithUnit)::DownCast(theMeasure); + } + else if (theMeasure->IsKind(STANDARD_TYPE(StepRepr_ReprItemAndMeasureWithUnit))) + { + Handle(StepRepr_ReprItemAndMeasureWithUnit) aReprMeasureItem = + Handle(StepRepr_ReprItemAndMeasureWithUnit)::DownCast(theMeasure); + aMeasureWithUnit = aReprMeasureItem->GetMeasureWithUnit(); + } + return aMeasureWithUnit; + }; + + // Test with null + Handle(Standard_Transient) aNullTransient; + Handle(StepBasic_MeasureWithUnit) aExtracted = GetMeasureWithUnit(aNullTransient); + EXPECT_TRUE(aExtracted.IsNull()); + + // Test with MeasureWithUnit + aExtracted = GetMeasureWithUnit(myMeasureWithUnit); + EXPECT_FALSE(aExtracted.IsNull()); + EXPECT_NEAR(aExtracted->ValueComponent(), 5.0, 1e-7); + + // Test with ReprItemAndMeasureWithUnit + aExtracted = GetMeasureWithUnit(myReprItemAndMeasureWithUnit); + EXPECT_FALSE(aExtracted.IsNull()); + EXPECT_NEAR(aExtracted->ValueComponent(), 10.0, 1e-7); + + // Test with unrelated type + Handle(Standard_Transient) anUnrelatedTransient = myName; + aExtracted = GetMeasureWithUnit(anUnrelatedTransient); + EXPECT_TRUE(aExtracted.IsNull()); +} diff --git a/src/DataExchange/TKDESTEP/RWStepBasic/RWStepBasic_RWConversionBasedUnit.cxx b/src/DataExchange/TKDESTEP/RWStepBasic/RWStepBasic_RWConversionBasedUnit.cxx index 2d0d932176..4cde9fc4d7 100644 --- a/src/DataExchange/TKDESTEP/RWStepBasic/RWStepBasic_RWConversionBasedUnit.cxx +++ b/src/DataExchange/TKDESTEP/RWStepBasic/RWStepBasic_RWConversionBasedUnit.cxx @@ -52,13 +52,13 @@ void RWStepBasic_RWConversionBasedUnit::ReadStep( // --- own field : conversionFactor --- - Handle(StepBasic_MeasureWithUnit) aConversionFactor; + Handle(Standard_Transient) aConversionFactor; // szv#4:S4163:12Mar99 `Standard_Boolean stat3 =` not needed data->ReadEntity(num, 3, "conversion_factor", ach, - STANDARD_TYPE(StepBasic_MeasureWithUnit), + STANDARD_TYPE(Standard_Transient), aConversionFactor); //--- Initialisation of the read entity --- diff --git a/src/DataExchange/TKDESTEP/RWStepBasic/RWStepBasic_RWConversionBasedUnitAndAreaUnit.cxx b/src/DataExchange/TKDESTEP/RWStepBasic/RWStepBasic_RWConversionBasedUnitAndAreaUnit.cxx index 6f8724fc55..17843ca8b3 100644 --- a/src/DataExchange/TKDESTEP/RWStepBasic/RWStepBasic_RWConversionBasedUnitAndAreaUnit.cxx +++ b/src/DataExchange/TKDESTEP/RWStepBasic/RWStepBasic_RWConversionBasedUnitAndAreaUnit.cxx @@ -43,12 +43,12 @@ void RWStepBasic_RWConversionBasedUnitAndAreaUnit::ReadStep( data->ReadString(num, 1, "name", ach, aName); // --- field : conversionFactor --- - Handle(StepBasic_MeasureWithUnit) aConversionFactor; + Handle(Standard_Transient) aConversionFactor; data->ReadEntity(num, 2, "conversion_factor", ach, - STANDARD_TYPE(StepBasic_MeasureWithUnit), + STANDARD_TYPE(Standard_Transient), aConversionFactor); num = data->NextForComplex(num); diff --git a/src/DataExchange/TKDESTEP/RWStepBasic/RWStepBasic_RWConversionBasedUnitAndLengthUnit.cxx b/src/DataExchange/TKDESTEP/RWStepBasic/RWStepBasic_RWConversionBasedUnitAndLengthUnit.cxx index 5981c9a56a..ece2f5f2b0 100644 --- a/src/DataExchange/TKDESTEP/RWStepBasic/RWStepBasic_RWConversionBasedUnitAndLengthUnit.cxx +++ b/src/DataExchange/TKDESTEP/RWStepBasic/RWStepBasic_RWConversionBasedUnitAndLengthUnit.cxx @@ -44,13 +44,13 @@ void RWStepBasic_RWConversionBasedUnitAndLengthUnit::ReadStep( // --- field : conversionFactor --- - Handle(StepBasic_MeasureWithUnit) aConversionFactor; + Handle(Standard_Transient) aConversionFactor; // szv#4:S4163:12Mar99 `Standard_Boolean stat2 =` not needed data->ReadEntity(num, 2, "conversion_factor", ach, - STANDARD_TYPE(StepBasic_MeasureWithUnit), + STANDARD_TYPE(Standard_Transient), aConversionFactor); num = data->NextForComplex(num); diff --git a/src/DataExchange/TKDESTEP/RWStepBasic/RWStepBasic_RWConversionBasedUnitAndMassUnit.cxx b/src/DataExchange/TKDESTEP/RWStepBasic/RWStepBasic_RWConversionBasedUnitAndMassUnit.cxx index 99f4bc9617..c61f01408c 100644 --- a/src/DataExchange/TKDESTEP/RWStepBasic/RWStepBasic_RWConversionBasedUnitAndMassUnit.cxx +++ b/src/DataExchange/TKDESTEP/RWStepBasic/RWStepBasic_RWConversionBasedUnitAndMassUnit.cxx @@ -43,13 +43,13 @@ void RWStepBasic_RWConversionBasedUnitAndMassUnit::ReadStep( // szv#4:S4163:12Mar99 `Standard_Boolean stat1 =` not needed data->ReadString(num, 1, "name", ach, aName); // --- field : conversionFactor --- - Handle(StepBasic_MeasureWithUnit) aConversionFactor; + Handle(Standard_Transient) aConversionFactor; // szv#4:S4163:12Mar99 `Standard_Boolean stat2 =` not needed data->ReadEntity(num, 2, "conversion_factor", ach, - STANDARD_TYPE(StepBasic_MeasureWithUnit), + STANDARD_TYPE(Standard_Transient), aConversionFactor); num = data->NextForComplex(num); diff --git a/src/DataExchange/TKDESTEP/RWStepBasic/RWStepBasic_RWConversionBasedUnitAndPlaneAngleUnit.cxx b/src/DataExchange/TKDESTEP/RWStepBasic/RWStepBasic_RWConversionBasedUnitAndPlaneAngleUnit.cxx index 63f018aec7..260d113536 100644 --- a/src/DataExchange/TKDESTEP/RWStepBasic/RWStepBasic_RWConversionBasedUnitAndPlaneAngleUnit.cxx +++ b/src/DataExchange/TKDESTEP/RWStepBasic/RWStepBasic_RWConversionBasedUnitAndPlaneAngleUnit.cxx @@ -42,12 +42,12 @@ void RWStepBasic_RWConversionBasedUnitAndPlaneAngleUnit::ReadStep( return; Handle(TCollection_HAsciiString) aName; data->ReadString(num, 1, "name", ach, aName); - Handle(StepBasic_MeasureWithUnit) aConversionFactor; + Handle(Standard_Transient) aConversionFactor; data->ReadEntity(num, 2, "conversion_factor", ach, - STANDARD_TYPE(StepBasic_MeasureWithUnit), + STANDARD_TYPE(Standard_Transient), aConversionFactor); // NAMED_UNIT diff --git a/src/DataExchange/TKDESTEP/RWStepBasic/RWStepBasic_RWConversionBasedUnitAndRatioUnit.cxx b/src/DataExchange/TKDESTEP/RWStepBasic/RWStepBasic_RWConversionBasedUnitAndRatioUnit.cxx index c9c73890b0..c4656bfd64 100644 --- a/src/DataExchange/TKDESTEP/RWStepBasic/RWStepBasic_RWConversionBasedUnitAndRatioUnit.cxx +++ b/src/DataExchange/TKDESTEP/RWStepBasic/RWStepBasic_RWConversionBasedUnitAndRatioUnit.cxx @@ -44,13 +44,13 @@ void RWStepBasic_RWConversionBasedUnitAndRatioUnit::ReadStep( // --- field : conversionFactor --- - Handle(StepBasic_MeasureWithUnit) aConversionFactor; + Handle(Standard_Transient) aConversionFactor; // szv#4:S4163:12Mar99 `Standard_Boolean stat2 =` not needed data->ReadEntity(num, 2, "conversion_factor", ach, - STANDARD_TYPE(StepBasic_MeasureWithUnit), + STANDARD_TYPE(Standard_Transient), aConversionFactor); num = data->NextForComplex(num); diff --git a/src/DataExchange/TKDESTEP/RWStepBasic/RWStepBasic_RWConversionBasedUnitAndSolidAngleUnit.cxx b/src/DataExchange/TKDESTEP/RWStepBasic/RWStepBasic_RWConversionBasedUnitAndSolidAngleUnit.cxx index fc3796fef4..013196647f 100644 --- a/src/DataExchange/TKDESTEP/RWStepBasic/RWStepBasic_RWConversionBasedUnitAndSolidAngleUnit.cxx +++ b/src/DataExchange/TKDESTEP/RWStepBasic/RWStepBasic_RWConversionBasedUnitAndSolidAngleUnit.cxx @@ -47,13 +47,13 @@ void RWStepBasic_RWConversionBasedUnitAndSolidAngleUnit::ReadStep( // --- field : conversionFactor --- - Handle(StepBasic_MeasureWithUnit) aConversionFactor; + Handle(Standard_Transient) aConversionFactor; // szv#4:S4163:12Mar99 `Standard_Boolean stat2 =` not needed data->ReadEntity(num, 2, "conversion_factor", ach, - STANDARD_TYPE(StepBasic_MeasureWithUnit), + STANDARD_TYPE(Standard_Transient), aConversionFactor); num = data->NextForComplex(num); diff --git a/src/DataExchange/TKDESTEP/RWStepBasic/RWStepBasic_RWConversionBasedUnitAndTimeUnit.cxx b/src/DataExchange/TKDESTEP/RWStepBasic/RWStepBasic_RWConversionBasedUnitAndTimeUnit.cxx index 06190c6de5..e014516cfe 100644 --- a/src/DataExchange/TKDESTEP/RWStepBasic/RWStepBasic_RWConversionBasedUnitAndTimeUnit.cxx +++ b/src/DataExchange/TKDESTEP/RWStepBasic/RWStepBasic_RWConversionBasedUnitAndTimeUnit.cxx @@ -44,13 +44,13 @@ void RWStepBasic_RWConversionBasedUnitAndTimeUnit::ReadStep( // --- field : conversionFactor --- - Handle(StepBasic_MeasureWithUnit) aConversionFactor; + Handle(Standard_Transient) aConversionFactor; // szv#4:S4163:12Mar99 `Standard_Boolean stat2 =` not needed data->ReadEntity(num, 2, "conversion_factor", ach, - STANDARD_TYPE(StepBasic_MeasureWithUnit), + STANDARD_TYPE(Standard_Transient), aConversionFactor); num = data->NextForComplex(num); diff --git a/src/DataExchange/TKDESTEP/RWStepBasic/RWStepBasic_RWConversionBasedUnitAndVolumeUnit.cxx b/src/DataExchange/TKDESTEP/RWStepBasic/RWStepBasic_RWConversionBasedUnitAndVolumeUnit.cxx index e9cad3d392..0752e2f9e1 100644 --- a/src/DataExchange/TKDESTEP/RWStepBasic/RWStepBasic_RWConversionBasedUnitAndVolumeUnit.cxx +++ b/src/DataExchange/TKDESTEP/RWStepBasic/RWStepBasic_RWConversionBasedUnitAndVolumeUnit.cxx @@ -38,12 +38,12 @@ void RWStepBasic_RWConversionBasedUnitAndVolumeUnit::ReadStep( data->ReadString(num, 1, "name", ach, aName); // --- field : conversionFactor --- - Handle(StepBasic_MeasureWithUnit) aConversionFactor; + Handle(Standard_Transient) aConversionFactor; data->ReadEntity(num, 2, "conversion_factor", ach, - STANDARD_TYPE(StepBasic_MeasureWithUnit), + STANDARD_TYPE(Standard_Transient), aConversionFactor); num = data->NextForComplex(num); diff --git a/src/DataExchange/TKDESTEP/RWStepDimTol/RWStepDimTol_RWAngularityTolerance.cxx b/src/DataExchange/TKDESTEP/RWStepDimTol/RWStepDimTol_RWAngularityTolerance.cxx index 675dbfec44..9e07f054c5 100644 --- a/src/DataExchange/TKDESTEP/RWStepDimTol/RWStepDimTol_RWAngularityTolerance.cxx +++ b/src/DataExchange/TKDESTEP/RWStepDimTol/RWStepDimTol_RWAngularityTolerance.cxx @@ -49,12 +49,12 @@ void RWStepDimTol_RWAngularityTolerance::ReadStep( Handle(TCollection_HAsciiString) aGeometricTolerance_Description; data->ReadString(num, 2, "geometric_tolerance.description", ach, aGeometricTolerance_Description); - Handle(StepBasic_MeasureWithUnit) aGeometricTolerance_Magnitude; + Handle(Standard_Transient) aGeometricTolerance_Magnitude; data->ReadEntity(num, 3, "geometric_tolerance.magnitude", ach, - STANDARD_TYPE(StepBasic_MeasureWithUnit), + STANDARD_TYPE(Standard_Transient), aGeometricTolerance_Magnitude); StepDimTol_GeometricToleranceTarget aGeometricTolerance_TolerancedShapeAspect; diff --git a/src/DataExchange/TKDESTEP/RWStepDimTol/RWStepDimTol_RWCircularRunoutTolerance.cxx b/src/DataExchange/TKDESTEP/RWStepDimTol/RWStepDimTol_RWCircularRunoutTolerance.cxx index a8275ebc1a..de48bbede0 100644 --- a/src/DataExchange/TKDESTEP/RWStepDimTol/RWStepDimTol_RWCircularRunoutTolerance.cxx +++ b/src/DataExchange/TKDESTEP/RWStepDimTol/RWStepDimTol_RWCircularRunoutTolerance.cxx @@ -49,12 +49,12 @@ void RWStepDimTol_RWCircularRunoutTolerance::ReadStep( Handle(TCollection_HAsciiString) aGeometricTolerance_Description; data->ReadString(num, 2, "geometric_tolerance.description", ach, aGeometricTolerance_Description); - Handle(StepBasic_MeasureWithUnit) aGeometricTolerance_Magnitude; + Handle(Standard_Transient) aGeometricTolerance_Magnitude; data->ReadEntity(num, 3, "geometric_tolerance.magnitude", ach, - STANDARD_TYPE(StepBasic_MeasureWithUnit), + STANDARD_TYPE(Standard_Transient), aGeometricTolerance_Magnitude); StepDimTol_GeometricToleranceTarget aGeometricTolerance_TolerancedShapeAspect; diff --git a/src/DataExchange/TKDESTEP/RWStepDimTol/RWStepDimTol_RWCoaxialityTolerance.cxx b/src/DataExchange/TKDESTEP/RWStepDimTol/RWStepDimTol_RWCoaxialityTolerance.cxx index d02bdf7a88..5959578f90 100644 --- a/src/DataExchange/TKDESTEP/RWStepDimTol/RWStepDimTol_RWCoaxialityTolerance.cxx +++ b/src/DataExchange/TKDESTEP/RWStepDimTol/RWStepDimTol_RWCoaxialityTolerance.cxx @@ -49,12 +49,12 @@ void RWStepDimTol_RWCoaxialityTolerance::ReadStep( Handle(TCollection_HAsciiString) aGeometricTolerance_Description; data->ReadString(num, 2, "geometric_tolerance.description", ach, aGeometricTolerance_Description); - Handle(StepBasic_MeasureWithUnit) aGeometricTolerance_Magnitude; + Handle(Standard_Transient) aGeometricTolerance_Magnitude; data->ReadEntity(num, 3, "geometric_tolerance.magnitude", ach, - STANDARD_TYPE(StepBasic_MeasureWithUnit), + STANDARD_TYPE(Standard_Transient), aGeometricTolerance_Magnitude); StepDimTol_GeometricToleranceTarget aGeometricTolerance_TolerancedShapeAspect; diff --git a/src/DataExchange/TKDESTEP/RWStepDimTol/RWStepDimTol_RWConcentricityTolerance.cxx b/src/DataExchange/TKDESTEP/RWStepDimTol/RWStepDimTol_RWConcentricityTolerance.cxx index 29c2d9a42c..0c52dce8f6 100644 --- a/src/DataExchange/TKDESTEP/RWStepDimTol/RWStepDimTol_RWConcentricityTolerance.cxx +++ b/src/DataExchange/TKDESTEP/RWStepDimTol/RWStepDimTol_RWConcentricityTolerance.cxx @@ -49,12 +49,12 @@ void RWStepDimTol_RWConcentricityTolerance::ReadStep( Handle(TCollection_HAsciiString) aGeometricTolerance_Description; data->ReadString(num, 2, "geometric_tolerance.description", ach, aGeometricTolerance_Description); - Handle(StepBasic_MeasureWithUnit) aGeometricTolerance_Magnitude; + Handle(Standard_Transient) aGeometricTolerance_Magnitude; data->ReadEntity(num, 3, "geometric_tolerance.magnitude", ach, - STANDARD_TYPE(StepBasic_MeasureWithUnit), + STANDARD_TYPE(Standard_Transient), aGeometricTolerance_Magnitude); StepDimTol_GeometricToleranceTarget aGeometricTolerance_TolerancedShapeAspect; diff --git a/src/DataExchange/TKDESTEP/RWStepDimTol/RWStepDimTol_RWCylindricityTolerance.cxx b/src/DataExchange/TKDESTEP/RWStepDimTol/RWStepDimTol_RWCylindricityTolerance.cxx index dea05763a3..b273909233 100644 --- a/src/DataExchange/TKDESTEP/RWStepDimTol/RWStepDimTol_RWCylindricityTolerance.cxx +++ b/src/DataExchange/TKDESTEP/RWStepDimTol/RWStepDimTol_RWCylindricityTolerance.cxx @@ -47,12 +47,12 @@ void RWStepDimTol_RWCylindricityTolerance::ReadStep( Handle(TCollection_HAsciiString) aGeometricTolerance_Description; data->ReadString(num, 2, "geometric_tolerance.description", ach, aGeometricTolerance_Description); - Handle(StepBasic_MeasureWithUnit) aGeometricTolerance_Magnitude; + Handle(Standard_Transient) aGeometricTolerance_Magnitude; data->ReadEntity(num, 3, "geometric_tolerance.magnitude", ach, - STANDARD_TYPE(StepBasic_MeasureWithUnit), + STANDARD_TYPE(Standard_Transient), aGeometricTolerance_Magnitude); StepDimTol_GeometricToleranceTarget aGeometricTolerance_TolerancedShapeAspect; diff --git a/src/DataExchange/TKDESTEP/RWStepDimTol/RWStepDimTol_RWFlatnessTolerance.cxx b/src/DataExchange/TKDESTEP/RWStepDimTol/RWStepDimTol_RWFlatnessTolerance.cxx index afc22f27fc..8e4528efed 100644 --- a/src/DataExchange/TKDESTEP/RWStepDimTol/RWStepDimTol_RWFlatnessTolerance.cxx +++ b/src/DataExchange/TKDESTEP/RWStepDimTol/RWStepDimTol_RWFlatnessTolerance.cxx @@ -47,12 +47,12 @@ void RWStepDimTol_RWFlatnessTolerance::ReadStep( Handle(TCollection_HAsciiString) aGeometricTolerance_Description; data->ReadString(num, 2, "geometric_tolerance.description", ach, aGeometricTolerance_Description); - Handle(StepBasic_MeasureWithUnit) aGeometricTolerance_Magnitude; + Handle(Standard_Transient) aGeometricTolerance_Magnitude; data->ReadEntity(num, 3, "geometric_tolerance.magnitude", ach, - STANDARD_TYPE(StepBasic_MeasureWithUnit), + STANDARD_TYPE(Standard_Transient), aGeometricTolerance_Magnitude); StepDimTol_GeometricToleranceTarget aGeometricTolerance_TolerancedShapeAspect; diff --git a/src/DataExchange/TKDESTEP/RWStepDimTol/RWStepDimTol_RWGeoTolAndGeoTolWthDatRef.cxx b/src/DataExchange/TKDESTEP/RWStepDimTol/RWStepDimTol_RWGeoTolAndGeoTolWthDatRef.cxx index 15be9b31a1..8b0a9c6344 100644 --- a/src/DataExchange/TKDESTEP/RWStepDimTol/RWStepDimTol_RWGeoTolAndGeoTolWthDatRef.cxx +++ b/src/DataExchange/TKDESTEP/RWStepDimTol/RWStepDimTol_RWGeoTolAndGeoTolWthDatRef.cxx @@ -44,8 +44,8 @@ void RWStepDimTol_RWGeoTolAndGeoTolWthDatRef::ReadStep( data->ReadString(num, 1, "name", ach, aName); Handle(TCollection_HAsciiString) aDescription; data->ReadString(num, 2, "description", ach, aDescription); - Handle(StepBasic_MeasureWithUnit) aMagnitude; - data->ReadEntity(num, 3, "magnitude", ach, STANDARD_TYPE(StepBasic_MeasureWithUnit), aMagnitude); + Handle(Standard_Transient) aMagnitude; + data->ReadEntity(num, 3, "magnitude", ach, STANDARD_TYPE(Standard_Transient), aMagnitude); StepDimTol_GeometricToleranceTarget aTolerancedShapeAspect; data->ReadEntity(num, 4, "toleranced_shape_aspect", ach, aTolerancedShapeAspect); diff --git a/src/DataExchange/TKDESTEP/RWStepDimTol/RWStepDimTol_RWGeoTolAndGeoTolWthDatRefAndGeoTolWthMaxTol.cxx b/src/DataExchange/TKDESTEP/RWStepDimTol/RWStepDimTol_RWGeoTolAndGeoTolWthDatRefAndGeoTolWthMaxTol.cxx index ed81cb2047..81cc33d2e1 100644 --- a/src/DataExchange/TKDESTEP/RWStepDimTol/RWStepDimTol_RWGeoTolAndGeoTolWthDatRefAndGeoTolWthMaxTol.cxx +++ b/src/DataExchange/TKDESTEP/RWStepDimTol/RWStepDimTol_RWGeoTolAndGeoTolWthDatRefAndGeoTolWthMaxTol.cxx @@ -49,8 +49,8 @@ void RWStepDimTol_RWGeoTolAndGeoTolWthDatRefAndGeoTolWthMaxTol::ReadStep( data->ReadString(num, 1, "name", ach, aName); Handle(TCollection_HAsciiString) aDescription; data->ReadString(num, 2, "description", ach, aDescription); - Handle(StepBasic_MeasureWithUnit) aMagnitude; - data->ReadEntity(num, 3, "magnitude", ach, STANDARD_TYPE(StepBasic_MeasureWithUnit), aMagnitude); + Handle(Standard_Transient) aMagnitude; + data->ReadEntity(num, 3, "magnitude", ach, STANDARD_TYPE(Standard_Transient), aMagnitude); StepDimTol_GeometricToleranceTarget aTolerancedShapeAspect; data->ReadEntity(num, 4, "toleranced_shape_aspect", ach, aTolerancedShapeAspect); diff --git a/src/DataExchange/TKDESTEP/RWStepDimTol/RWStepDimTol_RWGeoTolAndGeoTolWthDatRefAndGeoTolWthMod.cxx b/src/DataExchange/TKDESTEP/RWStepDimTol/RWStepDimTol_RWGeoTolAndGeoTolWthDatRefAndGeoTolWthMod.cxx index e4a50e8be4..ecd69027a4 100644 --- a/src/DataExchange/TKDESTEP/RWStepDimTol/RWStepDimTol_RWGeoTolAndGeoTolWthDatRefAndGeoTolWthMod.cxx +++ b/src/DataExchange/TKDESTEP/RWStepDimTol/RWStepDimTol_RWGeoTolAndGeoTolWthDatRefAndGeoTolWthMod.cxx @@ -48,8 +48,8 @@ void RWStepDimTol_RWGeoTolAndGeoTolWthDatRefAndGeoTolWthMod::ReadStep( data->ReadString(num, 1, "name", ach, aName); Handle(TCollection_HAsciiString) aDescription; data->ReadString(num, 2, "description", ach, aDescription); - Handle(StepBasic_MeasureWithUnit) aMagnitude; - data->ReadEntity(num, 3, "magnitude", ach, STANDARD_TYPE(StepBasic_MeasureWithUnit), aMagnitude); + Handle(Standard_Transient) aMagnitude; + data->ReadEntity(num, 3, "magnitude", ach, STANDARD_TYPE(Standard_Transient), aMagnitude); StepDimTol_GeometricToleranceTarget aTolerancedShapeAspect; data->ReadEntity(num, 4, "toleranced_shape_aspect", ach, aTolerancedShapeAspect); diff --git a/src/DataExchange/TKDESTEP/RWStepDimTol/RWStepDimTol_RWGeoTolAndGeoTolWthDatRefAndModGeoTolAndPosTol.cxx b/src/DataExchange/TKDESTEP/RWStepDimTol/RWStepDimTol_RWGeoTolAndGeoTolWthDatRefAndModGeoTolAndPosTol.cxx index e86c0766a8..c32c6d190f 100644 --- a/src/DataExchange/TKDESTEP/RWStepDimTol/RWStepDimTol_RWGeoTolAndGeoTolWthDatRefAndModGeoTolAndPosTol.cxx +++ b/src/DataExchange/TKDESTEP/RWStepDimTol/RWStepDimTol_RWGeoTolAndGeoTolWthDatRefAndModGeoTolAndPosTol.cxx @@ -46,8 +46,8 @@ void RWStepDimTol_RWGeoTolAndGeoTolWthDatRefAndModGeoTolAndPosTol::ReadStep( data->ReadString(num, 1, "name", ach, aName); Handle(TCollection_HAsciiString) aDescription; data->ReadString(num, 2, "description", ach, aDescription); - Handle(StepBasic_MeasureWithUnit) aMagnitude; - data->ReadEntity(num, 3, "magnitude", ach, STANDARD_TYPE(StepBasic_MeasureWithUnit), aMagnitude); + Handle(Standard_Transient) aMagnitude; + data->ReadEntity(num, 3, "magnitude", ach, STANDARD_TYPE(Standard_Transient), aMagnitude); StepDimTol_GeometricToleranceTarget aTolerancedShapeAspect; data->ReadEntity(num, 4, "toleranced_shape_aspect", ach, aTolerancedShapeAspect); diff --git a/src/DataExchange/TKDESTEP/RWStepDimTol/RWStepDimTol_RWGeoTolAndGeoTolWthDatRefAndUneqDisGeoTol.cxx b/src/DataExchange/TKDESTEP/RWStepDimTol/RWStepDimTol_RWGeoTolAndGeoTolWthDatRefAndUneqDisGeoTol.cxx index 41496f691b..5d37f1196c 100644 --- a/src/DataExchange/TKDESTEP/RWStepDimTol/RWStepDimTol_RWGeoTolAndGeoTolWthDatRefAndUneqDisGeoTol.cxx +++ b/src/DataExchange/TKDESTEP/RWStepDimTol/RWStepDimTol_RWGeoTolAndGeoTolWthDatRefAndUneqDisGeoTol.cxx @@ -47,8 +47,8 @@ void RWStepDimTol_RWGeoTolAndGeoTolWthDatRefAndUneqDisGeoTol::ReadStep( data->ReadString(num, 1, "name", ach, aName); Handle(TCollection_HAsciiString) aDescription; data->ReadString(num, 2, "description", ach, aDescription); - Handle(StepBasic_MeasureWithUnit) aMagnitude; - data->ReadEntity(num, 3, "magnitude", ach, STANDARD_TYPE(StepBasic_MeasureWithUnit), aMagnitude); + Handle(Standard_Transient) aMagnitude; + data->ReadEntity(num, 3, "magnitude", ach, STANDARD_TYPE(Standard_Transient), aMagnitude); StepDimTol_GeometricToleranceTarget aTolerancedShapeAspect; data->ReadEntity(num, 4, "toleranced_shape_aspect", ach, aTolerancedShapeAspect); diff --git a/src/DataExchange/TKDESTEP/RWStepDimTol/RWStepDimTol_RWGeoTolAndGeoTolWthMaxTol.cxx b/src/DataExchange/TKDESTEP/RWStepDimTol/RWStepDimTol_RWGeoTolAndGeoTolWthMaxTol.cxx index 48c8ad721d..bb06e28d23 100644 --- a/src/DataExchange/TKDESTEP/RWStepDimTol/RWStepDimTol_RWGeoTolAndGeoTolWthMaxTol.cxx +++ b/src/DataExchange/TKDESTEP/RWStepDimTol/RWStepDimTol_RWGeoTolAndGeoTolWthMaxTol.cxx @@ -44,8 +44,8 @@ void RWStepDimTol_RWGeoTolAndGeoTolWthMaxTol::ReadStep( data->ReadString(num, 1, "name", ach, aName); Handle(TCollection_HAsciiString) aDescription; data->ReadString(num, 2, "description", ach, aDescription); - Handle(StepBasic_MeasureWithUnit) aMagnitude; - data->ReadEntity(num, 3, "magnitude", ach, STANDARD_TYPE(StepBasic_MeasureWithUnit), aMagnitude); + Handle(Standard_Transient) aMagnitude; + data->ReadEntity(num, 3, "magnitude", ach, STANDARD_TYPE(Standard_Transient), aMagnitude); StepDimTol_GeometricToleranceTarget aTolerancedShapeAspect; data->ReadEntity(num, 4, "toleranced_shape_aspect", ach, aTolerancedShapeAspect); diff --git a/src/DataExchange/TKDESTEP/RWStepDimTol/RWStepDimTol_RWGeoTolAndGeoTolWthMod.cxx b/src/DataExchange/TKDESTEP/RWStepDimTol/RWStepDimTol_RWGeoTolAndGeoTolWthMod.cxx index 497a5b4a35..186988c697 100644 --- a/src/DataExchange/TKDESTEP/RWStepDimTol/RWStepDimTol_RWGeoTolAndGeoTolWthMod.cxx +++ b/src/DataExchange/TKDESTEP/RWStepDimTol/RWStepDimTol_RWGeoTolAndGeoTolWthMod.cxx @@ -43,8 +43,8 @@ void RWStepDimTol_RWGeoTolAndGeoTolWthMod::ReadStep( data->ReadString(num, 1, "name", ach, aName); Handle(TCollection_HAsciiString) aDescription; data->ReadString(num, 2, "description", ach, aDescription); - Handle(StepBasic_MeasureWithUnit) aMagnitude; - data->ReadEntity(num, 3, "magnitude", ach, STANDARD_TYPE(StepBasic_MeasureWithUnit), aMagnitude); + Handle(Standard_Transient) aMagnitude; + data->ReadEntity(num, 3, "magnitude", ach, STANDARD_TYPE(Standard_Transient), aMagnitude); StepDimTol_GeometricToleranceTarget aTolerancedShapeAspect; data->ReadEntity(num, 4, "toleranced_shape_aspect", ach, aTolerancedShapeAspect); diff --git a/src/DataExchange/TKDESTEP/RWStepDimTol/RWStepDimTol_RWGeometricTolerance.cxx b/src/DataExchange/TKDESTEP/RWStepDimTol/RWStepDimTol_RWGeometricTolerance.cxx index 0275555db2..94f3a25d67 100644 --- a/src/DataExchange/TKDESTEP/RWStepDimTol/RWStepDimTol_RWGeometricTolerance.cxx +++ b/src/DataExchange/TKDESTEP/RWStepDimTol/RWStepDimTol_RWGeometricTolerance.cxx @@ -47,8 +47,8 @@ void RWStepDimTol_RWGeometricTolerance::ReadStep( Handle(TCollection_HAsciiString) aDescription; data->ReadString(num, 2, "description", ach, aDescription); - Handle(StepBasic_MeasureWithUnit) aMagnitude; - data->ReadEntity(num, 3, "magnitude", ach, STANDARD_TYPE(StepBasic_MeasureWithUnit), aMagnitude); + Handle(Standard_Transient) aMagnitude; + data->ReadEntity(num, 3, "magnitude", ach, STANDARD_TYPE(Standard_Transient), aMagnitude); StepDimTol_GeometricToleranceTarget aTolerancedShapeAspect; data->ReadEntity(num, 4, "toleranced_shape_aspect", ach, aTolerancedShapeAspect); diff --git a/src/DataExchange/TKDESTEP/RWStepDimTol/RWStepDimTol_RWGeometricToleranceWithDatumReference.cxx b/src/DataExchange/TKDESTEP/RWStepDimTol/RWStepDimTol_RWGeometricToleranceWithDatumReference.cxx index baab136f11..541c0f4743 100644 --- a/src/DataExchange/TKDESTEP/RWStepDimTol/RWStepDimTol_RWGeometricToleranceWithDatumReference.cxx +++ b/src/DataExchange/TKDESTEP/RWStepDimTol/RWStepDimTol_RWGeometricToleranceWithDatumReference.cxx @@ -51,12 +51,12 @@ void RWStepDimTol_RWGeometricToleranceWithDatumReference::ReadStep( Handle(TCollection_HAsciiString) aGeometricTolerance_Description; data->ReadString(num, 2, "geometric_tolerance.description", ach, aGeometricTolerance_Description); - Handle(StepBasic_MeasureWithUnit) aGeometricTolerance_Magnitude; + Handle(Standard_Transient) aGeometricTolerance_Magnitude; data->ReadEntity(num, 3, "geometric_tolerance.magnitude", ach, - STANDARD_TYPE(StepBasic_MeasureWithUnit), + STANDARD_TYPE(Standard_Transient), aGeometricTolerance_Magnitude); StepDimTol_GeometricToleranceTarget aGeometricTolerance_TolerancedShapeAspect; diff --git a/src/DataExchange/TKDESTEP/RWStepDimTol/RWStepDimTol_RWGeometricToleranceWithDefinedAreaUnit.cxx b/src/DataExchange/TKDESTEP/RWStepDimTol/RWStepDimTol_RWGeometricToleranceWithDefinedAreaUnit.cxx index 73c3c47ddd..2e42f24754 100644 --- a/src/DataExchange/TKDESTEP/RWStepDimTol/RWStepDimTol_RWGeometricToleranceWithDefinedAreaUnit.cxx +++ b/src/DataExchange/TKDESTEP/RWStepDimTol/RWStepDimTol_RWGeometricToleranceWithDefinedAreaUnit.cxx @@ -49,12 +49,12 @@ void RWStepDimTol_RWGeometricToleranceWithDefinedAreaUnit::ReadStep( Handle(TCollection_HAsciiString) aDescription; data->ReadString(num, 2, "geometric_tolerance.description", ach, aDescription); - Handle(StepBasic_MeasureWithUnit) aMagnitude; + Handle(Standard_Transient) aMagnitude; data->ReadEntity(num, 3, "geometric_tolerance.magnitude", ach, - STANDARD_TYPE(StepBasic_MeasureWithUnit), + STANDARD_TYPE(Standard_Transient), aMagnitude); StepDimTol_GeometricToleranceTarget aTolerancedShapeAspect; diff --git a/src/DataExchange/TKDESTEP/RWStepDimTol/RWStepDimTol_RWGeometricToleranceWithDefinedUnit.cxx b/src/DataExchange/TKDESTEP/RWStepDimTol/RWStepDimTol_RWGeometricToleranceWithDefinedUnit.cxx index 39b594bb2e..503b4a3aee 100644 --- a/src/DataExchange/TKDESTEP/RWStepDimTol/RWStepDimTol_RWGeometricToleranceWithDefinedUnit.cxx +++ b/src/DataExchange/TKDESTEP/RWStepDimTol/RWStepDimTol_RWGeometricToleranceWithDefinedUnit.cxx @@ -48,12 +48,12 @@ void RWStepDimTol_RWGeometricToleranceWithDefinedUnit::ReadStep( Handle(TCollection_HAsciiString) aDescription; data->ReadString(num, 2, "geometric_tolerance.description", ach, aDescription); - Handle(StepBasic_MeasureWithUnit) aMagnitude; + Handle(Standard_Transient) aMagnitude; data->ReadEntity(num, 3, "geometric_tolerance.magnitude", ach, - STANDARD_TYPE(StepBasic_MeasureWithUnit), + STANDARD_TYPE(Standard_Transient), aMagnitude); StepDimTol_GeometricToleranceTarget aTolerancedShapeAspect; diff --git a/src/DataExchange/TKDESTEP/RWStepDimTol/RWStepDimTol_RWGeometricToleranceWithMaximumTolerance.cxx b/src/DataExchange/TKDESTEP/RWStepDimTol/RWStepDimTol_RWGeometricToleranceWithMaximumTolerance.cxx index 506d7dd698..9f77f671a2 100644 --- a/src/DataExchange/TKDESTEP/RWStepDimTol/RWStepDimTol_RWGeometricToleranceWithMaximumTolerance.cxx +++ b/src/DataExchange/TKDESTEP/RWStepDimTol/RWStepDimTol_RWGeometricToleranceWithMaximumTolerance.cxx @@ -50,12 +50,12 @@ void RWStepDimTol_RWGeometricToleranceWithMaximumTolerance::ReadStep( Handle(TCollection_HAsciiString) aDescription; data->ReadString(num, 2, "geometric_tolerance.description", ach, aDescription); - Handle(StepBasic_MeasureWithUnit) aMagnitude; + Handle(Standard_Transient) aMagnitude; data->ReadEntity(num, 3, "geometric_tolerance.magnitude", ach, - STANDARD_TYPE(StepBasic_MeasureWithUnit), + STANDARD_TYPE(Standard_Transient), aMagnitude); StepDimTol_GeometricToleranceTarget aTolerancedShapeAspect; diff --git a/src/DataExchange/TKDESTEP/RWStepDimTol/RWStepDimTol_RWGeometricToleranceWithModifiers.cxx b/src/DataExchange/TKDESTEP/RWStepDimTol/RWStepDimTol_RWGeometricToleranceWithModifiers.cxx index d118d4b220..ea265d1ebf 100644 --- a/src/DataExchange/TKDESTEP/RWStepDimTol/RWStepDimTol_RWGeometricToleranceWithModifiers.cxx +++ b/src/DataExchange/TKDESTEP/RWStepDimTol/RWStepDimTol_RWGeometricToleranceWithModifiers.cxx @@ -47,12 +47,12 @@ void RWStepDimTol_RWGeometricToleranceWithModifiers::ReadStep( Handle(TCollection_HAsciiString) aDescription; data->ReadString(num, 2, "geometric_tolerance.description", ach, aDescription); - Handle(StepBasic_MeasureWithUnit) aMagnitude; + Handle(Standard_Transient) aMagnitude; data->ReadEntity(num, 3, "geometric_tolerance.magnitude", ach, - STANDARD_TYPE(StepBasic_MeasureWithUnit), + STANDARD_TYPE(Standard_Transient), aMagnitude); StepDimTol_GeometricToleranceTarget aTolerancedShapeAspect; diff --git a/src/DataExchange/TKDESTEP/RWStepDimTol/RWStepDimTol_RWLineProfileTolerance.cxx b/src/DataExchange/TKDESTEP/RWStepDimTol/RWStepDimTol_RWLineProfileTolerance.cxx index 21e2da135f..062e8c3034 100644 --- a/src/DataExchange/TKDESTEP/RWStepDimTol/RWStepDimTol_RWLineProfileTolerance.cxx +++ b/src/DataExchange/TKDESTEP/RWStepDimTol/RWStepDimTol_RWLineProfileTolerance.cxx @@ -46,12 +46,12 @@ void RWStepDimTol_RWLineProfileTolerance::ReadStep( Handle(TCollection_HAsciiString) aGeometricTolerance_Description; data->ReadString(num, 2, "geometric_tolerance.description", ach, aGeometricTolerance_Description); - Handle(StepBasic_MeasureWithUnit) aGeometricTolerance_Magnitude; + Handle(Standard_Transient) aGeometricTolerance_Magnitude; data->ReadEntity(num, 3, "geometric_tolerance.magnitude", ach, - STANDARD_TYPE(StepBasic_MeasureWithUnit), + STANDARD_TYPE(Standard_Transient), aGeometricTolerance_Magnitude); StepDimTol_GeometricToleranceTarget aGeometricTolerance_TolerancedShapeAspect; diff --git a/src/DataExchange/TKDESTEP/RWStepDimTol/RWStepDimTol_RWModifiedGeometricTolerance.cxx b/src/DataExchange/TKDESTEP/RWStepDimTol/RWStepDimTol_RWModifiedGeometricTolerance.cxx index f6c09d6b0d..7810b8d82d 100644 --- a/src/DataExchange/TKDESTEP/RWStepDimTol/RWStepDimTol_RWModifiedGeometricTolerance.cxx +++ b/src/DataExchange/TKDESTEP/RWStepDimTol/RWStepDimTol_RWModifiedGeometricTolerance.cxx @@ -46,12 +46,12 @@ void RWStepDimTol_RWModifiedGeometricTolerance::ReadStep( Handle(TCollection_HAsciiString) aGeometricTolerance_Description; data->ReadString(num, 2, "geometric_tolerance.description", ach, aGeometricTolerance_Description); - Handle(StepBasic_MeasureWithUnit) aGeometricTolerance_Magnitude; + Handle(Standard_Transient) aGeometricTolerance_Magnitude; data->ReadEntity(num, 3, "geometric_tolerance.magnitude", ach, - STANDARD_TYPE(StepBasic_MeasureWithUnit), + STANDARD_TYPE(Standard_Transient), aGeometricTolerance_Magnitude); StepDimTol_GeometricToleranceTarget aGeometricTolerance_TolerancedShapeAspect; diff --git a/src/DataExchange/TKDESTEP/RWStepDimTol/RWStepDimTol_RWParallelismTolerance.cxx b/src/DataExchange/TKDESTEP/RWStepDimTol/RWStepDimTol_RWParallelismTolerance.cxx index 764b1e6922..3769c62fe8 100644 --- a/src/DataExchange/TKDESTEP/RWStepDimTol/RWStepDimTol_RWParallelismTolerance.cxx +++ b/src/DataExchange/TKDESTEP/RWStepDimTol/RWStepDimTol_RWParallelismTolerance.cxx @@ -47,12 +47,12 @@ void RWStepDimTol_RWParallelismTolerance::ReadStep( Handle(TCollection_HAsciiString) aGeometricTolerance_Description; data->ReadString(num, 2, "geometric_tolerance.description", ach, aGeometricTolerance_Description); - Handle(StepBasic_MeasureWithUnit) aGeometricTolerance_Magnitude; + Handle(Standard_Transient) aGeometricTolerance_Magnitude; data->ReadEntity(num, 3, "geometric_tolerance.magnitude", ach, - STANDARD_TYPE(StepBasic_MeasureWithUnit), + STANDARD_TYPE(Standard_Transient), aGeometricTolerance_Magnitude); StepDimTol_GeometricToleranceTarget aGeometricTolerance_TolerancedShapeAspect; diff --git a/src/DataExchange/TKDESTEP/RWStepDimTol/RWStepDimTol_RWPerpendicularityTolerance.cxx b/src/DataExchange/TKDESTEP/RWStepDimTol/RWStepDimTol_RWPerpendicularityTolerance.cxx index ff9e3f61c0..f638979a29 100644 --- a/src/DataExchange/TKDESTEP/RWStepDimTol/RWStepDimTol_RWPerpendicularityTolerance.cxx +++ b/src/DataExchange/TKDESTEP/RWStepDimTol/RWStepDimTol_RWPerpendicularityTolerance.cxx @@ -47,12 +47,12 @@ void RWStepDimTol_RWPerpendicularityTolerance::ReadStep( Handle(TCollection_HAsciiString) aGeometricTolerance_Description; data->ReadString(num, 2, "geometric_tolerance.description", ach, aGeometricTolerance_Description); - Handle(StepBasic_MeasureWithUnit) aGeometricTolerance_Magnitude; + Handle(Standard_Transient) aGeometricTolerance_Magnitude; data->ReadEntity(num, 3, "geometric_tolerance.magnitude", ach, - STANDARD_TYPE(StepBasic_MeasureWithUnit), + STANDARD_TYPE(Standard_Transient), aGeometricTolerance_Magnitude); StepDimTol_GeometricToleranceTarget aGeometricTolerance_TolerancedShapeAspect; diff --git a/src/DataExchange/TKDESTEP/RWStepDimTol/RWStepDimTol_RWPositionTolerance.cxx b/src/DataExchange/TKDESTEP/RWStepDimTol/RWStepDimTol_RWPositionTolerance.cxx index 37b9a60867..18982fdb52 100644 --- a/src/DataExchange/TKDESTEP/RWStepDimTol/RWStepDimTol_RWPositionTolerance.cxx +++ b/src/DataExchange/TKDESTEP/RWStepDimTol/RWStepDimTol_RWPositionTolerance.cxx @@ -46,12 +46,12 @@ void RWStepDimTol_RWPositionTolerance::ReadStep( Handle(TCollection_HAsciiString) aGeometricTolerance_Description; data->ReadString(num, 2, "geometric_tolerance.description", ach, aGeometricTolerance_Description); - Handle(StepBasic_MeasureWithUnit) aGeometricTolerance_Magnitude; + Handle(Standard_Transient) aGeometricTolerance_Magnitude; data->ReadEntity(num, 3, "geometric_tolerance.magnitude", ach, - STANDARD_TYPE(StepBasic_MeasureWithUnit), + STANDARD_TYPE(Standard_Transient), aGeometricTolerance_Magnitude); StepDimTol_GeometricToleranceTarget aGeometricTolerance_TolerancedShapeAspect; diff --git a/src/DataExchange/TKDESTEP/RWStepDimTol/RWStepDimTol_RWRoundnessTolerance.cxx b/src/DataExchange/TKDESTEP/RWStepDimTol/RWStepDimTol_RWRoundnessTolerance.cxx index ba040b51c9..2b648758e9 100644 --- a/src/DataExchange/TKDESTEP/RWStepDimTol/RWStepDimTol_RWRoundnessTolerance.cxx +++ b/src/DataExchange/TKDESTEP/RWStepDimTol/RWStepDimTol_RWRoundnessTolerance.cxx @@ -46,12 +46,12 @@ void RWStepDimTol_RWRoundnessTolerance::ReadStep( Handle(TCollection_HAsciiString) aGeometricTolerance_Description; data->ReadString(num, 2, "geometric_tolerance.description", ach, aGeometricTolerance_Description); - Handle(StepBasic_MeasureWithUnit) aGeometricTolerance_Magnitude; + Handle(Standard_Transient) aGeometricTolerance_Magnitude; data->ReadEntity(num, 3, "geometric_tolerance.magnitude", ach, - STANDARD_TYPE(StepBasic_MeasureWithUnit), + STANDARD_TYPE(Standard_Transient), aGeometricTolerance_Magnitude); StepDimTol_GeometricToleranceTarget aGeometricTolerance_TolerancedShapeAspect; diff --git a/src/DataExchange/TKDESTEP/RWStepDimTol/RWStepDimTol_RWStraightnessTolerance.cxx b/src/DataExchange/TKDESTEP/RWStepDimTol/RWStepDimTol_RWStraightnessTolerance.cxx index cf83ebd32b..50648f45a7 100644 --- a/src/DataExchange/TKDESTEP/RWStepDimTol/RWStepDimTol_RWStraightnessTolerance.cxx +++ b/src/DataExchange/TKDESTEP/RWStepDimTol/RWStepDimTol_RWStraightnessTolerance.cxx @@ -46,12 +46,12 @@ void RWStepDimTol_RWStraightnessTolerance::ReadStep( Handle(TCollection_HAsciiString) aGeometricTolerance_Description; data->ReadString(num, 2, "geometric_tolerance.description", ach, aGeometricTolerance_Description); - Handle(StepBasic_MeasureWithUnit) aGeometricTolerance_Magnitude; + Handle(Standard_Transient) aGeometricTolerance_Magnitude; data->ReadEntity(num, 3, "geometric_tolerance.magnitude", ach, - STANDARD_TYPE(StepBasic_MeasureWithUnit), + STANDARD_TYPE(Standard_Transient), aGeometricTolerance_Magnitude); StepDimTol_GeometricToleranceTarget aGeometricTolerance_TolerancedShapeAspect; diff --git a/src/DataExchange/TKDESTEP/RWStepDimTol/RWStepDimTol_RWSurfaceProfileTolerance.cxx b/src/DataExchange/TKDESTEP/RWStepDimTol/RWStepDimTol_RWSurfaceProfileTolerance.cxx index 0cd54a3fdf..cd74f2d4b9 100644 --- a/src/DataExchange/TKDESTEP/RWStepDimTol/RWStepDimTol_RWSurfaceProfileTolerance.cxx +++ b/src/DataExchange/TKDESTEP/RWStepDimTol/RWStepDimTol_RWSurfaceProfileTolerance.cxx @@ -46,12 +46,12 @@ void RWStepDimTol_RWSurfaceProfileTolerance::ReadStep( Handle(TCollection_HAsciiString) aGeometricTolerance_Description; data->ReadString(num, 2, "geometric_tolerance.description", ach, aGeometricTolerance_Description); - Handle(StepBasic_MeasureWithUnit) aGeometricTolerance_Magnitude; + Handle(Standard_Transient) aGeometricTolerance_Magnitude; data->ReadEntity(num, 3, "geometric_tolerance.magnitude", ach, - STANDARD_TYPE(StepBasic_MeasureWithUnit), + STANDARD_TYPE(Standard_Transient), aGeometricTolerance_Magnitude); StepDimTol_GeometricToleranceTarget aGeometricTolerance_TolerancedShapeAspect; diff --git a/src/DataExchange/TKDESTEP/RWStepDimTol/RWStepDimTol_RWSymmetryTolerance.cxx b/src/DataExchange/TKDESTEP/RWStepDimTol/RWStepDimTol_RWSymmetryTolerance.cxx index 068d3824d2..c6e14b13de 100644 --- a/src/DataExchange/TKDESTEP/RWStepDimTol/RWStepDimTol_RWSymmetryTolerance.cxx +++ b/src/DataExchange/TKDESTEP/RWStepDimTol/RWStepDimTol_RWSymmetryTolerance.cxx @@ -47,12 +47,12 @@ void RWStepDimTol_RWSymmetryTolerance::ReadStep( Handle(TCollection_HAsciiString) aGeometricTolerance_Description; data->ReadString(num, 2, "geometric_tolerance.description", ach, aGeometricTolerance_Description); - Handle(StepBasic_MeasureWithUnit) aGeometricTolerance_Magnitude; + Handle(Standard_Transient) aGeometricTolerance_Magnitude; data->ReadEntity(num, 3, "geometric_tolerance.magnitude", ach, - STANDARD_TYPE(StepBasic_MeasureWithUnit), + STANDARD_TYPE(Standard_Transient), aGeometricTolerance_Magnitude); StepDimTol_GeometricToleranceTarget aGeometricTolerance_TolerancedShapeAspect; diff --git a/src/DataExchange/TKDESTEP/RWStepDimTol/RWStepDimTol_RWTotalRunoutTolerance.cxx b/src/DataExchange/TKDESTEP/RWStepDimTol/RWStepDimTol_RWTotalRunoutTolerance.cxx index f434bcad8a..586c476c6b 100644 --- a/src/DataExchange/TKDESTEP/RWStepDimTol/RWStepDimTol_RWTotalRunoutTolerance.cxx +++ b/src/DataExchange/TKDESTEP/RWStepDimTol/RWStepDimTol_RWTotalRunoutTolerance.cxx @@ -47,12 +47,12 @@ void RWStepDimTol_RWTotalRunoutTolerance::ReadStep( Handle(TCollection_HAsciiString) aGeometricTolerance_Description; data->ReadString(num, 2, "geometric_tolerance.description", ach, aGeometricTolerance_Description); - Handle(StepBasic_MeasureWithUnit) aGeometricTolerance_Magnitude; + Handle(Standard_Transient) aGeometricTolerance_Magnitude; data->ReadEntity(num, 3, "geometric_tolerance.magnitude", ach, - STANDARD_TYPE(StepBasic_MeasureWithUnit), + STANDARD_TYPE(Standard_Transient), aGeometricTolerance_Magnitude); StepDimTol_GeometricToleranceTarget aGeometricTolerance_TolerancedShapeAspect; diff --git a/src/DataExchange/TKDESTEP/RWStepDimTol/RWStepDimTol_RWUnequallyDisposedGeometricTolerance.cxx b/src/DataExchange/TKDESTEP/RWStepDimTol/RWStepDimTol_RWUnequallyDisposedGeometricTolerance.cxx index 495aac46dc..b92ec40ebc 100644 --- a/src/DataExchange/TKDESTEP/RWStepDimTol/RWStepDimTol_RWUnequallyDisposedGeometricTolerance.cxx +++ b/src/DataExchange/TKDESTEP/RWStepDimTol/RWStepDimTol_RWUnequallyDisposedGeometricTolerance.cxx @@ -47,12 +47,12 @@ void RWStepDimTol_RWUnequallyDisposedGeometricTolerance::ReadStep( Handle(TCollection_HAsciiString) aDescription; data->ReadString(num, 2, "geometric_tolerance.description", ach, aDescription); - Handle(StepBasic_MeasureWithUnit) aMagnitude; + Handle(Standard_Transient) aMagnitude; data->ReadEntity(num, 3, "geometric_tolerance.magnitude", ach, - STANDARD_TYPE(StepBasic_MeasureWithUnit), + STANDARD_TYPE(Standard_Transient), aMagnitude); StepDimTol_GeometricToleranceTarget aTolerancedShapeAspect; diff --git a/src/DataExchange/TKDESTEP/RWStepRepr/RWStepRepr_RWMakeFromUsageOption.cxx b/src/DataExchange/TKDESTEP/RWStepRepr/RWStepRepr_RWMakeFromUsageOption.cxx index 2f4e23947b..9e3b07358a 100644 --- a/src/DataExchange/TKDESTEP/RWStepRepr/RWStepRepr_RWMakeFromUsageOption.cxx +++ b/src/DataExchange/TKDESTEP/RWStepRepr/RWStepRepr_RWMakeFromUsageOption.cxx @@ -91,8 +91,8 @@ void RWStepRepr_RWMakeFromUsageOption::ReadStep( Handle(TCollection_HAsciiString) aRankingRationale; data->ReadString(num, 7, "ranking_rationale", ach, aRankingRationale); - Handle(StepBasic_MeasureWithUnit) aQuantity; - data->ReadEntity(num, 8, "quantity", ach, STANDARD_TYPE(StepBasic_MeasureWithUnit), aQuantity); + Handle(Standard_Transient) aQuantity; + data->ReadEntity(num, 8, "quantity", ach, STANDARD_TYPE(Standard_Transient), aQuantity); // Initialize entity ent->Init(aProductDefinitionRelationship_Id, diff --git a/src/DataExchange/TKDESTEP/RWStepRepr/RWStepRepr_RWParallelOffset.cxx b/src/DataExchange/TKDESTEP/RWStepRepr/RWStepRepr_RWParallelOffset.cxx index f940391312..669f72a38f 100644 --- a/src/DataExchange/TKDESTEP/RWStepRepr/RWStepRepr_RWParallelOffset.cxx +++ b/src/DataExchange/TKDESTEP/RWStepRepr/RWStepRepr_RWParallelOffset.cxx @@ -65,8 +65,8 @@ void RWStepRepr_RWParallelOffset::ReadStep(const Handle(StepData_StepReaderData) // Own fields of ParallelOffset - Handle(StepBasic_MeasureWithUnit) anOffset; - data->ReadEntity(num, 5, "offset", ach, STANDARD_TYPE(StepBasic_MeasureWithUnit), anOffset); + Handle(Standard_Transient) anOffset; + data->ReadEntity(num, 5, "offset", ach, STANDARD_TYPE(Standard_Transient), anOffset); // Initialize entity ent->Init(aShapeAspect_Name, diff --git a/src/DataExchange/TKDESTEP/RWStepRepr/RWStepRepr_RWQuantifiedAssemblyComponentUsage.cxx b/src/DataExchange/TKDESTEP/RWStepRepr/RWStepRepr_RWQuantifiedAssemblyComponentUsage.cxx index b1e46e2a20..b1dd893c4f 100644 --- a/src/DataExchange/TKDESTEP/RWStepRepr/RWStepRepr_RWQuantifiedAssemblyComponentUsage.cxx +++ b/src/DataExchange/TKDESTEP/RWStepRepr/RWStepRepr_RWQuantifiedAssemblyComponentUsage.cxx @@ -102,8 +102,8 @@ void RWStepRepr_RWQuantifiedAssemblyComponentUsage::ReadStep( // Own fields of QuantifiedAssemblyComponentUsage - Handle(StepBasic_MeasureWithUnit) aQuantity; - data->ReadEntity(num, 7, "quantity", ach, STANDARD_TYPE(StepBasic_MeasureWithUnit), aQuantity); + Handle(Standard_Transient) aQuantity; + data->ReadEntity(num, 7, "quantity", ach, STANDARD_TYPE(Standard_Transient), aQuantity); // Initialize entity ent->Init(aProductDefinitionRelationship_Id, diff --git a/src/DataExchange/TKDESTEP/RWStepShape/RWStepShape_RWMeasureQualification.cxx b/src/DataExchange/TKDESTEP/RWStepShape/RWStepShape_RWMeasureQualification.cxx index b511d8f503..5bbd491bc3 100644 --- a/src/DataExchange/TKDESTEP/RWStepShape/RWStepShape_RWMeasureQualification.cxx +++ b/src/DataExchange/TKDESTEP/RWStepShape/RWStepShape_RWMeasureQualification.cxx @@ -47,8 +47,8 @@ void RWStepShape_RWMeasureQualification::ReadStep( // --- own field : qualified_measure --- - Handle(StepBasic_MeasureWithUnit) aQM; - data->ReadEntity(num, 3, "qualified_measure", ach, STANDARD_TYPE(StepBasic_MeasureWithUnit), aQM); + Handle(Standard_Transient) aQM; + data->ReadEntity(num, 3, "qualified_measure", ach, STANDARD_TYPE(Standard_Transient), aQM); // --- own field : qualifiers --- diff --git a/src/DataExchange/TKDESTEP/RWStepShape/RWStepShape_RWToleranceValue.cxx b/src/DataExchange/TKDESTEP/RWStepShape/RWStepShape_RWToleranceValue.cxx index 3f768954ac..942720a094 100644 --- a/src/DataExchange/TKDESTEP/RWStepShape/RWStepShape_RWToleranceValue.cxx +++ b/src/DataExchange/TKDESTEP/RWStepShape/RWStepShape_RWToleranceValue.cxx @@ -34,63 +34,18 @@ void RWStepShape_RWToleranceValue::ReadStep(const Handle(StepData_StepReaderData // --- own field : lower_bound --- - Handle(Standard_Transient) LB; - if (!data->ReadEntity(num, 1, "lower_bound", ach, STANDARD_TYPE(StepBasic_MeasureWithUnit), LB)) - { - Handle(StepRepr_MeasureRepresentationItem) aMSR; - Handle(StepRepr_ReprItemAndMeasureWithUnit) aRIMU; - - if (data->ReadEntity(num, - 1, - "lower_bound", - ach, - STANDARD_TYPE(StepRepr_MeasureRepresentationItem), - aMSR) - || data->ReadEntity(num, - 1, - "lower_bound", - ach, - STANDARD_TYPE(StepRepr_ReprItemAndMeasureWithUnit), - aRIMU)) - { - if (!aMSR.IsNull()) - LB = aMSR; - else if (!aRIMU.IsNull()) - LB = aRIMU; - } - } + Handle(Standard_Transient) aLowerBound; + data->ReadEntity(num, 1, "lower_bound", ach, STANDARD_TYPE(Standard_Transient), aLowerBound); // --- own field : upper_bound --- - Handle(Standard_Transient) UB; - if (!data->ReadEntity(num, 2, "upper_bound", ach, STANDARD_TYPE(StepBasic_MeasureWithUnit), UB)) - { - Handle(StepRepr_MeasureRepresentationItem) aMSR1; - Handle(StepRepr_ReprItemAndMeasureWithUnit) aRIMU1; - if (data->ReadEntity(num, - 2, - "upper_bound", - ach, - STANDARD_TYPE(StepRepr_MeasureRepresentationItem), - aMSR1) - || data->ReadEntity(num, - 2, - "upper_bound", - ach, - STANDARD_TYPE(StepRepr_ReprItemAndMeasureWithUnit), - aRIMU1)) - { - if (!aMSR1.IsNull()) - UB = aMSR1; - else if (!aRIMU1.IsNull()) - UB = aRIMU1; - } - } + Handle(Standard_Transient) anUpperBound; + data->ReadEntity(num, 2, "upper_bound", ach, STANDARD_TYPE(Standard_Transient), anUpperBound); //--- Initialisation of the read entity --- - if (!LB.IsNull() && !UB.IsNull()) + if (!aLowerBound.IsNull() && !anUpperBound.IsNull()) ach->ClearFails(); - ent->Init(LB, UB); + ent->Init(aLowerBound, anUpperBound); } void RWStepShape_RWToleranceValue::WriteStep(StepData_StepWriter& SW, diff --git a/src/DataExchange/TKDESTEP/STEPCAFControl/STEPCAFControl_Reader.cxx b/src/DataExchange/TKDESTEP/STEPCAFControl/STEPCAFControl_Reader.cxx index 636916e3b1..cdcc6f3d16 100644 --- a/src/DataExchange/TKDESTEP/STEPCAFControl/STEPCAFControl_Reader.cxx +++ b/src/DataExchange/TKDESTEP/STEPCAFControl/STEPCAFControl_Reader.cxx @@ -247,36 +247,36 @@ #include #include -// skl 21.08.2003 for reading G&DT -// #include -// #include -// #include -// #include -// #include -// #include -// #include -// #include -// #include -// #include -// #include -// #include -// #include -#ifdef OCCT_DEBUG -//! Converts address of the passed shape (TShape) to string. -//! \param theShape [in] Shape to dump. -//! \return corresponding string. -TCollection_AsciiString AddrToString(const TopoDS_Shape& theShape) +namespace { - std::string anAddrStr; - std::ostringstream ost; - ost << theShape.TShape().get(); - anAddrStr = ost.str(); - - TCollection_AsciiString aStr = TCollection_AsciiString("[").Cat(anAddrStr.c_str()).Cat("]"); +// Returns a MeasureWithUnit from the given Standard_Transient object. +// If the object is a StepRepr_ReprItemAndMeasureWithUnit, it retrieves +// the MeasureWithUnit from it. If it is a StepBasic_MeasureWithUnit, +// it returns it directly. If the object is neither, it returns a null handle. +// @param theMeasure The Standard_Transient object to check. +// @return Handle to StepBasic_MeasureWithUnit if found, otherwise null handle. +static Handle(StepBasic_MeasureWithUnit) GetMeasureWithUnit( + const Handle(Standard_Transient)& theMeasure) +{ + if (theMeasure.IsNull()) + { + return nullptr; + } - return aStr; + Handle(StepBasic_MeasureWithUnit) aMeasureWithUnit; + if (theMeasure->IsKind(STANDARD_TYPE(StepBasic_MeasureWithUnit))) + { + aMeasureWithUnit = Handle(StepBasic_MeasureWithUnit)::DownCast(theMeasure); + } + else if (theMeasure->IsKind(STANDARD_TYPE(StepRepr_ReprItemAndMeasureWithUnit))) + { + Handle(StepRepr_ReprItemAndMeasureWithUnit) aReprMeasureItem = + Handle(StepRepr_ReprItemAndMeasureWithUnit)::DownCast(theMeasure); + aMeasureWithUnit = aReprMeasureItem->GetMeasureWithUnit(); + } + return aMeasureWithUnit; } -#endif +} // namespace //================================================================================================= @@ -1991,7 +1991,7 @@ Standard_Boolean STEPCAFControl_Reader::ReadSHUOs( { if (style != aHSeqOfInvisStyle->Value(si)) continue; - // found that current style is invisible. + // found that current style is invisible. #ifdef OCCT_DEBUG std::cout << "Warning: item No " << i << "(" << style->Item()->DynamicType()->Name() << ") is invisible" << std::endl; @@ -2091,7 +2091,7 @@ static Standard_Boolean GetMassConversionFactor(const Handle(StepBasic_NamedUnit return Standard_False; Handle(StepBasic_ConversionBasedUnitAndMassUnit) CBUMU = Handle(StepBasic_ConversionBasedUnitAndMassUnit)::DownCast(NU); - Handle(StepBasic_MeasureWithUnit) MWUCBU = CBUMU->ConversionFactor(); + Handle(StepBasic_MeasureWithUnit) MWUCBU = GetMeasureWithUnit(CBUMU->ConversionFactor()); afact = MWUCBU->ValueComponent(); StepBasic_Unit anUnit2 = MWUCBU->UnitComponent(); if (anUnit2.CaseNum(anUnit2.Value()) == 1) @@ -3680,12 +3680,11 @@ TDF_Label STEPCAFControl_Reader::createGDTObjectInXCAF(const Handle(Standard_Tra Handle(StepDimTol_GeometricTolerance) GT = Handle(StepDimTol_GeometricTolerance)::DownCast(theEnt); // read common data for tolerance - // Standard_Real dim = GT->Magnitude()->ValueComponent(); - Handle(StepBasic_MeasureWithUnit) dim3 = GT->Magnitude(); + Handle(StepBasic_MeasureWithUnit) dim3 = GetMeasureWithUnit(GT->Magnitude()); if (dim3.IsNull()) continue; Standard_Real dim = dim3->ValueComponent(); - StepBasic_Unit anUnit = GT->Magnitude()->UnitComponent(); + StepBasic_Unit anUnit = dim3->UnitComponent(); if (anUnit.IsNull()) continue; if (!(anUnit.CaseNum(anUnit.Value()) == 1)) @@ -4136,15 +4135,7 @@ static void setDimObjectToXCAF(const Handle(Standard_Transient)& theEnt, Handle(Standard_Transient) aUpperBound = aTV->UpperBound(); if (aUpperBound.IsNull()) continue; - Handle(StepBasic_MeasureWithUnit) aMWU; - if (aUpperBound->IsKind(STANDARD_TYPE(StepBasic_MeasureWithUnit))) - aMWU = Handle(StepBasic_MeasureWithUnit)::DownCast(aUpperBound); - else if (aUpperBound->IsKind(STANDARD_TYPE(StepRepr_ReprItemAndMeasureWithUnit))) - { - Handle(StepRepr_ReprItemAndMeasureWithUnit) aReprMeasureItem = - Handle(StepRepr_ReprItemAndMeasureWithUnit)::DownCast(aUpperBound); - aMWU = aReprMeasureItem->GetMeasureWithUnit(); - } + Handle(StepBasic_MeasureWithUnit) aMWU = GetMeasureWithUnit(aUpperBound); if (aMWU.IsNull()) continue; Standard_Real aVal = aMWU->ValueComponent(); @@ -4173,14 +4164,7 @@ static void setDimObjectToXCAF(const Handle(Standard_Transient)& theEnt, if (aLowerBound.IsNull()) continue; - if (aLowerBound->IsKind(STANDARD_TYPE(StepBasic_MeasureWithUnit))) - aMWU = Handle(StepBasic_MeasureWithUnit)::DownCast(aLowerBound); - else if (aLowerBound->IsKind(STANDARD_TYPE(StepRepr_ReprItemAndMeasureWithUnit))) - { - Handle(StepRepr_ReprItemAndMeasureWithUnit) aReprMeasureItem = - Handle(StepRepr_ReprItemAndMeasureWithUnit)::DownCast(aLowerBound); - aMWU = aReprMeasureItem->GetMeasureWithUnit(); - } + aMWU = GetMeasureWithUnit(aLowerBound); if (aMWU.IsNull()) continue; @@ -4550,17 +4534,20 @@ static void setGeomTolObjectToXCAF(const Handle(Standard_Transient)& theEnt, if (!aTolEnt->Magnitude().IsNull()) { // get value - Standard_Real aVal = aTolEnt->Magnitude()->ValueComponent(); - StepBasic_Unit anUnit = aTolEnt->Magnitude()->UnitComponent(); - if (anUnit.IsNull()) - return; - if (!(anUnit.CaseNum(anUnit.Value()) == 1)) - return; - Handle(StepBasic_NamedUnit) NU = anUnit.NamedUnit(); - STEPConstruct_UnitContext anUnitCtx; - anUnitCtx.ComputeFactors(NU, theLocalFactors); - aVal = aVal * anUnitCtx.LengthFactor(); - aTolObj->SetValue(aVal); + if (Handle(StepBasic_MeasureWithUnit) aMWU = GetMeasureWithUnit(aTolEnt->Magnitude())) + { + Standard_Real aVal = aMWU->ValueComponent(); + StepBasic_Unit anUnit = aMWU->UnitComponent(); + if (anUnit.IsNull()) + return; + if (!(anUnit.CaseNum(anUnit.Value()) == 1)) + return; + Handle(StepBasic_NamedUnit) NU = anUnit.NamedUnit(); + STEPConstruct_UnitContext anUnitCtx; + anUnitCtx.ComputeFactors(NU, theLocalFactors); + aVal = aVal * anUnitCtx.LengthFactor(); + aTolObj->SetValue(aVal); + } } // get modifiers XCAFDimTolObjects_GeomToleranceTypeValue aTypeV = XCAFDimTolObjects_GeomToleranceTypeValue_None; diff --git a/src/DataExchange/TKDESTEP/STEPConstruct/STEPConstruct_UnitContext.cxx b/src/DataExchange/TKDESTEP/STEPConstruct/STEPConstruct_UnitContext.cxx index 0e79dce272..bf5bd94be1 100644 --- a/src/DataExchange/TKDESTEP/STEPConstruct/STEPConstruct_UnitContext.cxx +++ b/src/DataExchange/TKDESTEP/STEPConstruct/STEPConstruct_UnitContext.cxx @@ -38,6 +38,7 @@ #include #include #include +#include #include //================================================================================================= @@ -284,10 +285,6 @@ Standard_Integer STEPConstruct_UnitContext::ComputeFactors( if (aContext.IsNull()) { -#ifdef OCCT_DEBUG - std::cout << " -- STEPConstruct_UnitContext:ComputeFactor, Context undefined -> default" - << std::endl; -#endif return 1; } @@ -299,15 +296,12 @@ Standard_Integer STEPConstruct_UnitContext::ComputeFactors( { Handle(StepBasic_NamedUnit) theNamedUnit = aContext->UnitsValue(i); status = ComputeFactors(theNamedUnit, theLocalFactors); -#ifdef OCCT_DEBUG - if (status == -1) - std::cout << " -- STEPConstruct_UnitContext:ComputeFactor: Unit item no." << i - << " is not recognized" << std::endl; -#endif } return status; } +//================================================================================================= + Standard_Integer STEPConstruct_UnitContext::ComputeFactors(const Handle(StepBasic_NamedUnit)& aUnit, const StepData_Factors& theLocalFactors) { @@ -326,28 +320,33 @@ Standard_Integer STEPConstruct_UnitContext::ComputeFactors(const Handle(StepBasi { Handle(StepBasic_ConversionBasedUnit) theCBU = Handle(StepBasic_ConversionBasedUnit)::DownCast(aUnit); - // Handle(StepBasic_DimensionalExponents) theDimExp = theCBU->Dimensions(); - Handle(StepBasic_MeasureWithUnit) theMWU; + + Handle(StepBasic_MeasureWithUnit) aMWU; if (!theCBU.IsNull()) { - theMWU = theCBU->ConversionFactor(); + Handle(Standard_Transient) aConvFactor = theCBU->ConversionFactor(); + if (aConvFactor->IsKind(STANDARD_TYPE(StepBasic_MeasureWithUnit))) + { + aMWU = Handle(StepBasic_MeasureWithUnit)::DownCast(aConvFactor); + } + else if (aConvFactor->IsKind(STANDARD_TYPE(StepRepr_ReprItemAndMeasureWithUnit))) + { + Handle(StepRepr_ReprItemAndMeasureWithUnit) aReprMeasureItem = + Handle(StepRepr_ReprItemAndMeasureWithUnit)::DownCast(aConvFactor); + aMWU = aReprMeasureItem->GetMeasureWithUnit(); + } + // sln 8.10.2001: the case of unrecognized entity - if (theMWU.IsNull()) + if (aMWU.IsNull()) + { return -1; - // if (!theMWU->IsKind(STANDARD_TYPE(StepBasic_LengthMeasureWithUnit))) { gka - // return 2; - // } - Handle(StepBasic_NamedUnit) theTargetUnit = theMWU->UnitComponent().NamedUnit(); - // StepBasic_Unit theTargetUnit = theMWU->UnitComponent(); - Standard_Real theSIPFactor = 1.; + } + + Handle(StepBasic_NamedUnit) theTargetUnit = aMWU->UnitComponent().NamedUnit(); + Standard_Real theSIPFactor = 1.; //: f5 abv 24 Apr 98: ProSTEP TR8 tr8_bv1_tc: INCHES - // gka Handle(StepBasic_SiUnitAndLengthUnit) theSUALU = - // Handle(StepBasic_SiUnitAndLengthUnit)::DownCast(theTargetUnit); - // Handle(StepBasic_SiUnit) theSIU; - // if ( ! theSUALU.IsNull() ) theSIU = Handle(StepBasic_SiUnit)::DownCast(theSUALU); - Handle(StepBasic_SiUnit) theSIU = // f5 - Handle(StepBasic_SiUnit)::DownCast(theTargetUnit); // f5 + Handle(StepBasic_SiUnit) theSIU = Handle(StepBasic_SiUnit)::DownCast(theTargetUnit); if (!theSIU.IsNull()) { @@ -360,15 +359,12 @@ Standard_Integer STEPConstruct_UnitContext::ComputeFactors(const Handle(StepBasi // Treat the SiUnitName if (!SiUnitNameFactor(theSIU, theSIUNF)) status = 11; // et continue - // std::cout << "The SiUnitNameFactor is :"; - // std::cout << theSIUNF << std::endl; } else { - // std::cout << "Recursive algo required - Aborted" << std::endl; return 3; } - Standard_Real theMVAL = theMWU->ValueComponent(); + Standard_Real theMVAL = aMWU->ValueComponent(); theFactor = theSIPFactor * theMVAL; // * theSIUNF * pow(10.,theLExp) } parameter = theFactor; @@ -379,9 +375,6 @@ Standard_Integer STEPConstruct_UnitContext::ComputeFactors(const Handle(StepBasi else { status = 14; -#ifdef OCCT_DEBUG - std::cout << "Error in the file : parameter double defined" << std::endl; -#endif } } else if (aUnit->IsKind(STANDARD_TYPE(StepBasic_SiUnit))) @@ -409,18 +402,12 @@ Standard_Integer STEPConstruct_UnitContext::ComputeFactors(const Handle(StepBasi else { status = 14; -#ifdef OCCT_DEBUG - std::cout << "Error in the file : parameter double defined" << std::endl; -#endif } } // Defining a type of unit if (!parameterDone) { -#ifdef OCCT_DEBUG - std::cout << "Unit Type not implemented" << std::endl; -#endif return 0; } @@ -438,9 +425,6 @@ Standard_Integer STEPConstruct_UnitContext::ComputeFactors(const Handle(StepBasi else { status = 14; -#ifdef OCCT_DEBUG - std::cout << "Error in the file : LengthFactor double defined" << std::endl; -#endif } } // end of LengthUnit else if (aUnit->IsKind(STANDARD_TYPE(StepBasic_ConversionBasedUnitAndPlaneAngleUnit)) @@ -503,9 +487,6 @@ Standard_Integer STEPConstruct_UnitContext::ComputeTolerance( Handle(StepBasic_UncertaintyMeasureWithUnit) aUMWU = aContext->UncertaintyValue(un); if (aUMWU.IsNull()) { -#ifdef OCCT_DEBUG - std::cout << "BAD Uncertainty Measure with Units, n0." << un << std::endl; -#endif continue; } // Decode the associated Unit @@ -540,10 +521,6 @@ Standard_Integer STEPConstruct_UnitContext::ComputeTolerance( } } -#ifdef OCCT_DEBUG - if (hasUncertainty) - std::cout << "UNCERTAINTY read as " << theUncertainty << std::endl; -#endif return status; } diff --git a/src/DataExchange/TKDESTEP/STEPControl/STEPControl_Reader.cxx b/src/DataExchange/TKDESTEP/STEPControl/STEPControl_Reader.cxx index db7014213c..d0df52564d 100644 --- a/src/DataExchange/TKDESTEP/STEPControl/STEPControl_Reader.cxx +++ b/src/DataExchange/TKDESTEP/STEPControl/STEPControl_Reader.cxx @@ -49,6 +49,7 @@ #include #include #include +#include #include #include #include @@ -808,7 +809,18 @@ Standard_Boolean STEPControl_Reader::findUnits( Standard_Real anUnitFact = 0; if (!aConvUnit.IsNull()) { - Handle(StepBasic_MeasureWithUnit) aMeasWithUnit = aConvUnit->ConversionFactor(); + Handle(StepBasic_MeasureWithUnit) aMeasWithUnit; + Handle(Standard_Transient) aConvFactor = aConvUnit->ConversionFactor(); + if (aConvFactor->IsKind(STANDARD_TYPE(StepBasic_MeasureWithUnit))) + { + aMeasWithUnit = Handle(StepBasic_MeasureWithUnit)::DownCast(aConvFactor); + } + else if (aConvFactor->IsKind(STANDARD_TYPE(StepRepr_ReprItemAndMeasureWithUnit))) + { + Handle(StepRepr_ReprItemAndMeasureWithUnit) aReprMeasureItem = + Handle(StepRepr_ReprItemAndMeasureWithUnit)::DownCast(aConvFactor); + aMeasWithUnit = aReprMeasureItem->GetMeasureWithUnit(); + } if (aMeasWithUnit.IsNull()) continue; diff --git a/src/DataExchange/TKDESTEP/StepBasic/StepBasic_ConversionBasedUnit.cxx b/src/DataExchange/TKDESTEP/StepBasic/StepBasic_ConversionBasedUnit.cxx index 32fc867174..f505118c73 100644 --- a/src/DataExchange/TKDESTEP/StepBasic/StepBasic_ConversionBasedUnit.cxx +++ b/src/DataExchange/TKDESTEP/StepBasic/StepBasic_ConversionBasedUnit.cxx @@ -22,7 +22,7 @@ StepBasic_ConversionBasedUnit::StepBasic_ConversionBasedUnit() {} void StepBasic_ConversionBasedUnit::Init(const Handle(StepBasic_DimensionalExponents)& aDimensions, const Handle(TCollection_HAsciiString)& aName, - const Handle(StepBasic_MeasureWithUnit)& aConversionFactor) + const Handle(Standard_Transient)& aConversionFactor) { // --- classe own fields --- name = aName; @@ -42,12 +42,12 @@ Handle(TCollection_HAsciiString) StepBasic_ConversionBasedUnit::Name() const } void StepBasic_ConversionBasedUnit::SetConversionFactor( - const Handle(StepBasic_MeasureWithUnit)& aConversionFactor) + const Handle(Standard_Transient)& aConversionFactor) { conversionFactor = aConversionFactor; } -Handle(StepBasic_MeasureWithUnit) StepBasic_ConversionBasedUnit::ConversionFactor() const +Handle(Standard_Transient) StepBasic_ConversionBasedUnit::ConversionFactor() const { return conversionFactor; } diff --git a/src/DataExchange/TKDESTEP/StepBasic/StepBasic_ConversionBasedUnit.hxx b/src/DataExchange/TKDESTEP/StepBasic/StepBasic_ConversionBasedUnit.hxx index 3120fa00e0..d5c0557d8f 100644 --- a/src/DataExchange/TKDESTEP/StepBasic/StepBasic_ConversionBasedUnit.hxx +++ b/src/DataExchange/TKDESTEP/StepBasic/StepBasic_ConversionBasedUnit.hxx @@ -37,23 +37,22 @@ public: Standard_EXPORT void Init(const Handle(StepBasic_DimensionalExponents)& aDimensions, const Handle(TCollection_HAsciiString)& aName, - const Handle(StepBasic_MeasureWithUnit)& aConversionFactor); + const Handle(Standard_Transient)& aConversionFactor); Standard_EXPORT void SetName(const Handle(TCollection_HAsciiString)& aName); Standard_EXPORT Handle(TCollection_HAsciiString) Name() const; - Standard_EXPORT void SetConversionFactor( - const Handle(StepBasic_MeasureWithUnit)& aConversionFactor); + Standard_EXPORT void SetConversionFactor(const Handle(Standard_Transient)& aConversionFactor); - Standard_EXPORT Handle(StepBasic_MeasureWithUnit) ConversionFactor() const; + Standard_EXPORT Handle(Standard_Transient) ConversionFactor() const; DEFINE_STANDARD_RTTIEXT(StepBasic_ConversionBasedUnit, StepBasic_NamedUnit) protected: private: - Handle(TCollection_HAsciiString) name; - Handle(StepBasic_MeasureWithUnit) conversionFactor; + Handle(TCollection_HAsciiString) name; + Handle(Standard_Transient) conversionFactor; }; #endif // _StepBasic_ConversionBasedUnit_HeaderFile diff --git a/src/DataExchange/TKDESTEP/StepBasic/StepBasic_ConversionBasedUnitAndLengthUnit.cxx b/src/DataExchange/TKDESTEP/StepBasic/StepBasic_ConversionBasedUnitAndLengthUnit.cxx index 7630ff991d..a0a5d95371 100644 --- a/src/DataExchange/TKDESTEP/StepBasic/StepBasic_ConversionBasedUnitAndLengthUnit.cxx +++ b/src/DataExchange/TKDESTEP/StepBasic/StepBasic_ConversionBasedUnitAndLengthUnit.cxx @@ -26,7 +26,7 @@ StepBasic_ConversionBasedUnitAndLengthUnit::StepBasic_ConversionBasedUnitAndLeng void StepBasic_ConversionBasedUnitAndLengthUnit::Init( const Handle(StepBasic_DimensionalExponents)& aDimensions, const Handle(TCollection_HAsciiString)& aName, - const Handle(StepBasic_MeasureWithUnit)& aConversionFactor) + const Handle(Standard_Transient)& aConversionFactor) { // --- ANDOR component fields --- StepBasic_ConversionBasedUnit::Init(aDimensions, aName, aConversionFactor); diff --git a/src/DataExchange/TKDESTEP/StepBasic/StepBasic_ConversionBasedUnitAndLengthUnit.hxx b/src/DataExchange/TKDESTEP/StepBasic/StepBasic_ConversionBasedUnitAndLengthUnit.hxx index 0123cddc6a..fe5faef1b5 100644 --- a/src/DataExchange/TKDESTEP/StepBasic/StepBasic_ConversionBasedUnitAndLengthUnit.hxx +++ b/src/DataExchange/TKDESTEP/StepBasic/StepBasic_ConversionBasedUnitAndLengthUnit.hxx @@ -38,7 +38,7 @@ public: Standard_EXPORT void Init(const Handle(StepBasic_DimensionalExponents)& aDimensions, const Handle(TCollection_HAsciiString)& aName, - const Handle(StepBasic_MeasureWithUnit)& aConversionFactor); + const Handle(Standard_Transient)& aConversionFactor); Standard_EXPORT void SetLengthUnit(const Handle(StepBasic_LengthUnit)& aLengthUnit); diff --git a/src/DataExchange/TKDESTEP/StepBasic/StepBasic_ConversionBasedUnitAndMassUnit.cxx b/src/DataExchange/TKDESTEP/StepBasic/StepBasic_ConversionBasedUnitAndMassUnit.cxx index d65d2a751e..0959ca9159 100644 --- a/src/DataExchange/TKDESTEP/StepBasic/StepBasic_ConversionBasedUnitAndMassUnit.cxx +++ b/src/DataExchange/TKDESTEP/StepBasic/StepBasic_ConversionBasedUnitAndMassUnit.cxx @@ -29,7 +29,7 @@ StepBasic_ConversionBasedUnitAndMassUnit::StepBasic_ConversionBasedUnitAndMassUn void StepBasic_ConversionBasedUnitAndMassUnit::Init( const Handle(StepBasic_DimensionalExponents)& aDimensions, const Handle(TCollection_HAsciiString)& aName, - const Handle(StepBasic_MeasureWithUnit)& aConversionFactor) + const Handle(Standard_Transient)& aConversionFactor) { // --- ANDOR component fields --- StepBasic_ConversionBasedUnit::Init(aDimensions, aName, aConversionFactor); diff --git a/src/DataExchange/TKDESTEP/StepBasic/StepBasic_ConversionBasedUnitAndMassUnit.hxx b/src/DataExchange/TKDESTEP/StepBasic/StepBasic_ConversionBasedUnitAndMassUnit.hxx index 212696ef34..7694c76b0b 100644 --- a/src/DataExchange/TKDESTEP/StepBasic/StepBasic_ConversionBasedUnitAndMassUnit.hxx +++ b/src/DataExchange/TKDESTEP/StepBasic/StepBasic_ConversionBasedUnitAndMassUnit.hxx @@ -37,7 +37,7 @@ public: Standard_EXPORT void Init(const Handle(StepBasic_DimensionalExponents)& aDimensions, const Handle(TCollection_HAsciiString)& aName, - const Handle(StepBasic_MeasureWithUnit)& aConversionFactor); + const Handle(Standard_Transient)& aConversionFactor); Standard_EXPORT void SetMassUnit(const Handle(StepBasic_MassUnit)& aMassUnit); diff --git a/src/DataExchange/TKDESTEP/StepBasic/StepBasic_ConversionBasedUnitAndPlaneAngleUnit.cxx b/src/DataExchange/TKDESTEP/StepBasic/StepBasic_ConversionBasedUnitAndPlaneAngleUnit.cxx index 02a346a93f..b2f5bac86b 100644 --- a/src/DataExchange/TKDESTEP/StepBasic/StepBasic_ConversionBasedUnitAndPlaneAngleUnit.cxx +++ b/src/DataExchange/TKDESTEP/StepBasic/StepBasic_ConversionBasedUnitAndPlaneAngleUnit.cxx @@ -26,7 +26,7 @@ StepBasic_ConversionBasedUnitAndPlaneAngleUnit::StepBasic_ConversionBasedUnitAnd void StepBasic_ConversionBasedUnitAndPlaneAngleUnit::Init( const Handle(StepBasic_DimensionalExponents)& aDimensions, const Handle(TCollection_HAsciiString)& aName, - const Handle(StepBasic_MeasureWithUnit)& aConversionFactor) + const Handle(Standard_Transient)& aConversionFactor) { // --- ANDOR component fields --- StepBasic_ConversionBasedUnit::Init(aDimensions, aName, aConversionFactor); diff --git a/src/DataExchange/TKDESTEP/StepBasic/StepBasic_ConversionBasedUnitAndPlaneAngleUnit.hxx b/src/DataExchange/TKDESTEP/StepBasic/StepBasic_ConversionBasedUnitAndPlaneAngleUnit.hxx index 170369526c..366ab7f1b4 100644 --- a/src/DataExchange/TKDESTEP/StepBasic/StepBasic_ConversionBasedUnitAndPlaneAngleUnit.hxx +++ b/src/DataExchange/TKDESTEP/StepBasic/StepBasic_ConversionBasedUnitAndPlaneAngleUnit.hxx @@ -39,7 +39,7 @@ public: Standard_EXPORT void Init(const Handle(StepBasic_DimensionalExponents)& aDimensions, const Handle(TCollection_HAsciiString)& aName, - const Handle(StepBasic_MeasureWithUnit)& aConversionFactor); + const Handle(Standard_Transient)& aConversionFactor); Standard_EXPORT void SetPlaneAngleUnit(const Handle(StepBasic_PlaneAngleUnit)& aPlaneAngleUnit); diff --git a/src/DataExchange/TKDESTEP/StepBasic/StepBasic_ConversionBasedUnitAndRatioUnit.cxx b/src/DataExchange/TKDESTEP/StepBasic/StepBasic_ConversionBasedUnitAndRatioUnit.cxx index d352a1acf0..7b72829431 100644 --- a/src/DataExchange/TKDESTEP/StepBasic/StepBasic_ConversionBasedUnitAndRatioUnit.cxx +++ b/src/DataExchange/TKDESTEP/StepBasic/StepBasic_ConversionBasedUnitAndRatioUnit.cxx @@ -25,7 +25,7 @@ StepBasic_ConversionBasedUnitAndRatioUnit::StepBasic_ConversionBasedUnitAndRatio void StepBasic_ConversionBasedUnitAndRatioUnit::Init( const Handle(StepBasic_DimensionalExponents)& aDimensions, const Handle(TCollection_HAsciiString)& aName, - const Handle(StepBasic_MeasureWithUnit)& aConversionFactor) + const Handle(Standard_Transient)& aConversionFactor) { // --- ANDOR component fields --- StepBasic_ConversionBasedUnit::Init(aDimensions, aName, aConversionFactor); diff --git a/src/DataExchange/TKDESTEP/StepBasic/StepBasic_ConversionBasedUnitAndRatioUnit.hxx b/src/DataExchange/TKDESTEP/StepBasic/StepBasic_ConversionBasedUnitAndRatioUnit.hxx index 97c9c68196..a0e702cd21 100644 --- a/src/DataExchange/TKDESTEP/StepBasic/StepBasic_ConversionBasedUnitAndRatioUnit.hxx +++ b/src/DataExchange/TKDESTEP/StepBasic/StepBasic_ConversionBasedUnitAndRatioUnit.hxx @@ -38,7 +38,7 @@ public: Standard_EXPORT void Init(const Handle(StepBasic_DimensionalExponents)& aDimensions, const Handle(TCollection_HAsciiString)& aName, - const Handle(StepBasic_MeasureWithUnit)& aConversionFactor); + const Handle(Standard_Transient)& aConversionFactor); Standard_EXPORT void SetRatioUnit(const Handle(StepBasic_RatioUnit)& aRatioUnit); diff --git a/src/DataExchange/TKDESTEP/StepBasic/StepBasic_ConversionBasedUnitAndSolidAngleUnit.cxx b/src/DataExchange/TKDESTEP/StepBasic/StepBasic_ConversionBasedUnitAndSolidAngleUnit.cxx index f2fe6a1925..69e25db55b 100644 --- a/src/DataExchange/TKDESTEP/StepBasic/StepBasic_ConversionBasedUnitAndSolidAngleUnit.cxx +++ b/src/DataExchange/TKDESTEP/StepBasic/StepBasic_ConversionBasedUnitAndSolidAngleUnit.cxx @@ -26,7 +26,7 @@ StepBasic_ConversionBasedUnitAndSolidAngleUnit::StepBasic_ConversionBasedUnitAnd void StepBasic_ConversionBasedUnitAndSolidAngleUnit::Init( const Handle(StepBasic_DimensionalExponents)& aDimensions, const Handle(TCollection_HAsciiString)& aName, - const Handle(StepBasic_MeasureWithUnit)& aConversionFactor) + const Handle(Standard_Transient)& aConversionFactor) { // --- ANDOR component fields --- StepBasic_ConversionBasedUnit::Init(aDimensions, aName, aConversionFactor); diff --git a/src/DataExchange/TKDESTEP/StepBasic/StepBasic_ConversionBasedUnitAndSolidAngleUnit.hxx b/src/DataExchange/TKDESTEP/StepBasic/StepBasic_ConversionBasedUnitAndSolidAngleUnit.hxx index f5bd7ccd7e..92d3f12bd3 100644 --- a/src/DataExchange/TKDESTEP/StepBasic/StepBasic_ConversionBasedUnitAndSolidAngleUnit.hxx +++ b/src/DataExchange/TKDESTEP/StepBasic/StepBasic_ConversionBasedUnitAndSolidAngleUnit.hxx @@ -39,7 +39,7 @@ public: Standard_EXPORT void Init(const Handle(StepBasic_DimensionalExponents)& aDimensions, const Handle(TCollection_HAsciiString)& aName, - const Handle(StepBasic_MeasureWithUnit)& aConversionFactor); + const Handle(Standard_Transient)& aConversionFactor); Standard_EXPORT void SetSolidAngleUnit(const Handle(StepBasic_SolidAngleUnit)& aSolidAngleUnit); diff --git a/src/DataExchange/TKDESTEP/StepBasic/StepBasic_ConversionBasedUnitAndTimeUnit.cxx b/src/DataExchange/TKDESTEP/StepBasic/StepBasic_ConversionBasedUnitAndTimeUnit.cxx index ffe6e3890c..48353eb6c8 100644 --- a/src/DataExchange/TKDESTEP/StepBasic/StepBasic_ConversionBasedUnitAndTimeUnit.cxx +++ b/src/DataExchange/TKDESTEP/StepBasic/StepBasic_ConversionBasedUnitAndTimeUnit.cxx @@ -25,7 +25,7 @@ StepBasic_ConversionBasedUnitAndTimeUnit::StepBasic_ConversionBasedUnitAndTimeUn void StepBasic_ConversionBasedUnitAndTimeUnit::Init( const Handle(StepBasic_DimensionalExponents)& aDimensions, const Handle(TCollection_HAsciiString)& aName, - const Handle(StepBasic_MeasureWithUnit)& aConversionFactor) + const Handle(Standard_Transient)& aConversionFactor) { // --- ANDOR component fields --- StepBasic_ConversionBasedUnit::Init(aDimensions, aName, aConversionFactor); diff --git a/src/DataExchange/TKDESTEP/StepBasic/StepBasic_ConversionBasedUnitAndTimeUnit.hxx b/src/DataExchange/TKDESTEP/StepBasic/StepBasic_ConversionBasedUnitAndTimeUnit.hxx index e27e4205a6..d3ef94fb97 100644 --- a/src/DataExchange/TKDESTEP/StepBasic/StepBasic_ConversionBasedUnitAndTimeUnit.hxx +++ b/src/DataExchange/TKDESTEP/StepBasic/StepBasic_ConversionBasedUnitAndTimeUnit.hxx @@ -38,7 +38,7 @@ public: Standard_EXPORT void Init(const Handle(StepBasic_DimensionalExponents)& aDimensions, const Handle(TCollection_HAsciiString)& aName, - const Handle(StepBasic_MeasureWithUnit)& aConversionFactor); + const Handle(Standard_Transient)& aConversionFactor); Standard_EXPORT void SetTimeUnit(const Handle(StepBasic_TimeUnit)& aTimeUnit); diff --git a/src/DataExchange/TKDESTEP/StepDimTol/StepDimTol_GeoTolAndGeoTolWthDatRef.cxx b/src/DataExchange/TKDESTEP/StepDimTol/StepDimTol_GeoTolAndGeoTolWthDatRef.cxx index 1f85820fa7..c41512addc 100644 --- a/src/DataExchange/TKDESTEP/StepDimTol/StepDimTol_GeoTolAndGeoTolWthDatRef.cxx +++ b/src/DataExchange/TKDESTEP/StepDimTol/StepDimTol_GeoTolAndGeoTolWthDatRef.cxx @@ -30,7 +30,7 @@ StepDimTol_GeoTolAndGeoTolWthDatRef::StepDimTol_GeoTolAndGeoTolWthDatRef() {} void StepDimTol_GeoTolAndGeoTolWthDatRef::Init( const Handle(TCollection_HAsciiString)& theName, const Handle(TCollection_HAsciiString)& theDescription, - const Handle(StepBasic_MeasureWithUnit)& theMagnitude, + const Handle(Standard_Transient)& theMagnitude, const Handle(StepRepr_ShapeAspect)& theTolerancedShapeAspect, const Handle(StepDimTol_GeometricToleranceWithDatumReference)& theGTWDR, const StepDimTol_GeometricToleranceType theType) @@ -48,7 +48,7 @@ void StepDimTol_GeoTolAndGeoTolWthDatRef::Init( void StepDimTol_GeoTolAndGeoTolWthDatRef::Init( const Handle(TCollection_HAsciiString)& theName, const Handle(TCollection_HAsciiString)& theDescription, - const Handle(StepBasic_MeasureWithUnit)& theMagnitude, + const Handle(Standard_Transient)& theMagnitude, const StepDimTol_GeometricToleranceTarget& theTolerancedShapeAspect, const Handle(StepDimTol_GeometricToleranceWithDatumReference)& theGTWDR, const StepDimTol_GeometricToleranceType theType) diff --git a/src/DataExchange/TKDESTEP/StepDimTol/StepDimTol_GeoTolAndGeoTolWthDatRef.hxx b/src/DataExchange/TKDESTEP/StepDimTol/StepDimTol_GeoTolAndGeoTolWthDatRef.hxx index bf16d64cf0..ffb8303f97 100644 --- a/src/DataExchange/TKDESTEP/StepDimTol/StepDimTol_GeoTolAndGeoTolWthDatRef.hxx +++ b/src/DataExchange/TKDESTEP/StepDimTol/StepDimTol_GeoTolAndGeoTolWthDatRef.hxx @@ -24,7 +24,6 @@ class StepDimTol_GeometricToleranceTarget; class StepDimTol_GeometricToleranceWithDatumReference; class TCollection_HAsciiString; -class StepBasic_MeasureWithUnit; class StepRepr_ShapeAspect; class StepDimTol_GeoTolAndGeoTolWthDatRef; @@ -36,16 +35,16 @@ class StepDimTol_GeoTolAndGeoTolWthDatRef : public StepDimTol_GeometricTolerance public: Standard_EXPORT StepDimTol_GeoTolAndGeoTolWthDatRef(); - Standard_EXPORT void Init(const Handle(TCollection_HAsciiString)& theName, - const Handle(TCollection_HAsciiString)& theDescription, - const Handle(StepBasic_MeasureWithUnit)& theMagnitude, - const Handle(StepRepr_ShapeAspect)& theTolerancedShapeAspect, + Standard_EXPORT void Init(const Handle(TCollection_HAsciiString)& theName, + const Handle(TCollection_HAsciiString)& theDescription, + const Handle(Standard_Transient)& theMagnitude, + const Handle(StepRepr_ShapeAspect)& theTolerancedShapeAspect, const Handle(StepDimTol_GeometricToleranceWithDatumReference)& theGTWDR, const StepDimTol_GeometricToleranceType theType); Standard_EXPORT void Init(const Handle(TCollection_HAsciiString)& aName, const Handle(TCollection_HAsciiString)& aDescription, - const Handle(StepBasic_MeasureWithUnit)& aMagnitude, + const Handle(Standard_Transient)& aMagnitude, const StepDimTol_GeometricToleranceTarget& aTolerancedShapeAspect, const Handle(StepDimTol_GeometricToleranceWithDatumReference)& aGTWDR, const StepDimTol_GeometricToleranceType theType); diff --git a/src/DataExchange/TKDESTEP/StepDimTol/StepDimTol_GeoTolAndGeoTolWthDatRefAndGeoTolWthMaxTol.cxx b/src/DataExchange/TKDESTEP/StepDimTol/StepDimTol_GeoTolAndGeoTolWthDatRefAndGeoTolWthMaxTol.cxx index 389cfaf0b9..40cbced700 100644 --- a/src/DataExchange/TKDESTEP/StepDimTol/StepDimTol_GeoTolAndGeoTolWthDatRefAndGeoTolWthMaxTol.cxx +++ b/src/DataExchange/TKDESTEP/StepDimTol/StepDimTol_GeoTolAndGeoTolWthDatRefAndGeoTolWthMaxTol.cxx @@ -36,7 +36,7 @@ StepDimTol_GeoTolAndGeoTolWthDatRefAndGeoTolWthMaxTol:: void StepDimTol_GeoTolAndGeoTolWthDatRefAndGeoTolWthMaxTol::Init( const Handle(TCollection_HAsciiString)& theName, const Handle(TCollection_HAsciiString)& theDescription, - const Handle(StepBasic_MeasureWithUnit)& theMagnitude, + const Handle(Standard_Transient)& theMagnitude, const Handle(StepRepr_ShapeAspect)& theTolerancedShapeAspect, const Handle(StepDimTol_GeometricToleranceWithDatumReference)& theGTWDR, const Handle(StepDimTol_GeometricToleranceWithModifiers)& theGTWM, @@ -58,7 +58,7 @@ void StepDimTol_GeoTolAndGeoTolWthDatRefAndGeoTolWthMaxTol::Init( void StepDimTol_GeoTolAndGeoTolWthDatRefAndGeoTolWthMaxTol::Init( const Handle(TCollection_HAsciiString)& theName, const Handle(TCollection_HAsciiString)& theDescription, - const Handle(StepBasic_MeasureWithUnit)& theMagnitude, + const Handle(Standard_Transient)& theMagnitude, const StepDimTol_GeometricToleranceTarget& theTolerancedShapeAspect, const Handle(StepDimTol_GeometricToleranceWithDatumReference)& theGTWDR, const Handle(StepDimTol_GeometricToleranceWithModifiers)& theGTWM, diff --git a/src/DataExchange/TKDESTEP/StepDimTol/StepDimTol_GeoTolAndGeoTolWthDatRefAndGeoTolWthMaxTol.hxx b/src/DataExchange/TKDESTEP/StepDimTol/StepDimTol_GeoTolAndGeoTolWthDatRefAndGeoTolWthMaxTol.hxx index 6511b41090..d3523fd885 100644 --- a/src/DataExchange/TKDESTEP/StepDimTol/StepDimTol_GeoTolAndGeoTolWthDatRefAndGeoTolWthMaxTol.hxx +++ b/src/DataExchange/TKDESTEP/StepDimTol/StepDimTol_GeoTolAndGeoTolWthDatRefAndGeoTolWthMaxTol.hxx @@ -26,7 +26,6 @@ class StepDimTol_GeometricToleranceWithDatumReference; class StepDimTol_GeometricToleranceWithModifiers; class TCollection_HAsciiString; class StepBasic_LengthMeasureWithUnit; -class StepBasic_MeasureWithUnit; class StepRepr_ShapeAspect; DEFINE_STANDARD_HANDLE(StepDimTol_GeoTolAndGeoTolWthDatRefAndGeoTolWthMaxTol, @@ -39,10 +38,10 @@ class StepDimTol_GeoTolAndGeoTolWthDatRefAndGeoTolWthMaxTol public: Standard_EXPORT StepDimTol_GeoTolAndGeoTolWthDatRefAndGeoTolWthMaxTol(); - Standard_EXPORT void Init(const Handle(TCollection_HAsciiString)& theName, - const Handle(TCollection_HAsciiString)& theDescription, - const Handle(StepBasic_MeasureWithUnit)& theMagnitude, - const Handle(StepRepr_ShapeAspect)& theTolerancedShapeAspect, + Standard_EXPORT void Init(const Handle(TCollection_HAsciiString)& theName, + const Handle(TCollection_HAsciiString)& theDescription, + const Handle(Standard_Transient)& theMagnitude, + const Handle(StepRepr_ShapeAspect)& theTolerancedShapeAspect, const Handle(StepDimTol_GeometricToleranceWithDatumReference)& theGTWDR, const Handle(StepDimTol_GeometricToleranceWithModifiers)& theGTWM, const Handle(StepBasic_LengthMeasureWithUnit)& theMaxTol, @@ -50,7 +49,7 @@ public: Standard_EXPORT void Init(const Handle(TCollection_HAsciiString)& aName, const Handle(TCollection_HAsciiString)& aDescription, - const Handle(StepBasic_MeasureWithUnit)& aMagnitude, + const Handle(Standard_Transient)& aMagnitude, const StepDimTol_GeometricToleranceTarget& aTolerancedShapeAspect, const Handle(StepDimTol_GeometricToleranceWithDatumReference)& aGTWDR, const Handle(StepDimTol_GeometricToleranceWithModifiers)& aGTWM, diff --git a/src/DataExchange/TKDESTEP/StepDimTol/StepDimTol_GeoTolAndGeoTolWthDatRefAndGeoTolWthMod.cxx b/src/DataExchange/TKDESTEP/StepDimTol/StepDimTol_GeoTolAndGeoTolWthDatRefAndGeoTolWthMod.cxx index b76795aa89..acd71d8fe3 100644 --- a/src/DataExchange/TKDESTEP/StepDimTol/StepDimTol_GeoTolAndGeoTolWthDatRefAndGeoTolWthMod.cxx +++ b/src/DataExchange/TKDESTEP/StepDimTol/StepDimTol_GeoTolAndGeoTolWthDatRefAndGeoTolWthMod.cxx @@ -35,7 +35,7 @@ StepDimTol_GeoTolAndGeoTolWthDatRefAndGeoTolWthMod:: void StepDimTol_GeoTolAndGeoTolWthDatRefAndGeoTolWthMod::Init( const Handle(TCollection_HAsciiString)& theName, const Handle(TCollection_HAsciiString)& theDescription, - const Handle(StepBasic_MeasureWithUnit)& theMagnitude, + const Handle(Standard_Transient)& theMagnitude, const Handle(StepRepr_ShapeAspect)& theTolerancedShapeAspect, const Handle(StepDimTol_GeometricToleranceWithDatumReference)& theGTWDR, const Handle(StepDimTol_GeometricToleranceWithModifiers)& theGTWM, @@ -55,7 +55,7 @@ void StepDimTol_GeoTolAndGeoTolWthDatRefAndGeoTolWthMod::Init( void StepDimTol_GeoTolAndGeoTolWthDatRefAndGeoTolWthMod::Init( const Handle(TCollection_HAsciiString)& theName, const Handle(TCollection_HAsciiString)& theDescription, - const Handle(StepBasic_MeasureWithUnit)& theMagnitude, + const Handle(Standard_Transient)& theMagnitude, const StepDimTol_GeometricToleranceTarget& theTolerancedShapeAspect, const Handle(StepDimTol_GeometricToleranceWithDatumReference)& theGTWDR, const Handle(StepDimTol_GeometricToleranceWithModifiers)& theGTWM, diff --git a/src/DataExchange/TKDESTEP/StepDimTol/StepDimTol_GeoTolAndGeoTolWthDatRefAndGeoTolWthMod.hxx b/src/DataExchange/TKDESTEP/StepDimTol/StepDimTol_GeoTolAndGeoTolWthDatRefAndGeoTolWthMod.hxx index 3e2a381160..7fef145d89 100644 --- a/src/DataExchange/TKDESTEP/StepDimTol/StepDimTol_GeoTolAndGeoTolWthDatRefAndGeoTolWthMod.hxx +++ b/src/DataExchange/TKDESTEP/StepDimTol/StepDimTol_GeoTolAndGeoTolWthDatRefAndGeoTolWthMod.hxx @@ -25,7 +25,6 @@ class StepDimTol_GeometricToleranceTarget; class StepDimTol_GeometricToleranceWithDatumReference; class StepDimTol_GeometricToleranceWithModifiers; class TCollection_HAsciiString; -class StepBasic_MeasureWithUnit; class StepRepr_ShapeAspect; class StepDimTol_GeoTolAndGeoTolWthDatRefAndGeoTolWthMod; @@ -38,17 +37,17 @@ class StepDimTol_GeoTolAndGeoTolWthDatRefAndGeoTolWthMod : public StepDimTol_Geo public: Standard_EXPORT StepDimTol_GeoTolAndGeoTolWthDatRefAndGeoTolWthMod(); - Standard_EXPORT void Init(const Handle(TCollection_HAsciiString)& theName, - const Handle(TCollection_HAsciiString)& theDescription, - const Handle(StepBasic_MeasureWithUnit)& theMagnitude, - const Handle(StepRepr_ShapeAspect)& theTolerancedShapeAspect, + Standard_EXPORT void Init(const Handle(TCollection_HAsciiString)& theName, + const Handle(TCollection_HAsciiString)& theDescription, + const Handle(Standard_Transient)& theMagnitude, + const Handle(StepRepr_ShapeAspect)& theTolerancedShapeAspect, const Handle(StepDimTol_GeometricToleranceWithDatumReference)& theGTWDR, const Handle(StepDimTol_GeometricToleranceWithModifiers)& theGTWM, const StepDimTol_GeometricToleranceType theType); Standard_EXPORT void Init(const Handle(TCollection_HAsciiString)& aName, const Handle(TCollection_HAsciiString)& aDescription, - const Handle(StepBasic_MeasureWithUnit)& aMagnitude, + const Handle(Standard_Transient)& aMagnitude, const StepDimTol_GeometricToleranceTarget& aTolerancedShapeAspect, const Handle(StepDimTol_GeometricToleranceWithDatumReference)& aGTWDR, const Handle(StepDimTol_GeometricToleranceWithModifiers)& aGTWM, diff --git a/src/DataExchange/TKDESTEP/StepDimTol/StepDimTol_GeoTolAndGeoTolWthDatRefAndModGeoTolAndPosTol.cxx b/src/DataExchange/TKDESTEP/StepDimTol/StepDimTol_GeoTolAndGeoTolWthDatRefAndModGeoTolAndPosTol.cxx index fcc9ee4182..2743008a88 100644 --- a/src/DataExchange/TKDESTEP/StepDimTol/StepDimTol_GeoTolAndGeoTolWthDatRefAndModGeoTolAndPosTol.cxx +++ b/src/DataExchange/TKDESTEP/StepDimTol/StepDimTol_GeoTolAndGeoTolWthDatRefAndModGeoTolAndPosTol.cxx @@ -34,7 +34,7 @@ StepDimTol_GeoTolAndGeoTolWthDatRefAndModGeoTolAndPosTol:: void StepDimTol_GeoTolAndGeoTolWthDatRefAndModGeoTolAndPosTol::Init( const Handle(TCollection_HAsciiString)& aName, const Handle(TCollection_HAsciiString)& aDescription, - const Handle(StepBasic_MeasureWithUnit)& aMagnitude, + const Handle(Standard_Transient)& aMagnitude, const Handle(StepRepr_ShapeAspect)& aTolerancedShapeAspect, const Handle(StepDimTol_GeometricToleranceWithDatumReference)& aGTWDR, const Handle(StepDimTol_ModifiedGeometricTolerance)& aMGT) @@ -52,7 +52,7 @@ void StepDimTol_GeoTolAndGeoTolWthDatRefAndModGeoTolAndPosTol::Init( void StepDimTol_GeoTolAndGeoTolWthDatRefAndModGeoTolAndPosTol::Init( const Handle(TCollection_HAsciiString)& aName, const Handle(TCollection_HAsciiString)& aDescription, - const Handle(StepBasic_MeasureWithUnit)& aMagnitude, + const Handle(Standard_Transient)& aMagnitude, const StepDimTol_GeometricToleranceTarget& aTolerancedShapeAspect, const Handle(StepDimTol_GeometricToleranceWithDatumReference)& aGTWDR, const Handle(StepDimTol_ModifiedGeometricTolerance)& aMGT) diff --git a/src/DataExchange/TKDESTEP/StepDimTol/StepDimTol_GeoTolAndGeoTolWthDatRefAndModGeoTolAndPosTol.hxx b/src/DataExchange/TKDESTEP/StepDimTol/StepDimTol_GeoTolAndGeoTolWthDatRefAndModGeoTolAndPosTol.hxx index a6a8f8615c..25b96e86cb 100644 --- a/src/DataExchange/TKDESTEP/StepDimTol/StepDimTol_GeoTolAndGeoTolWthDatRefAndModGeoTolAndPosTol.hxx +++ b/src/DataExchange/TKDESTEP/StepDimTol/StepDimTol_GeoTolAndGeoTolWthDatRefAndModGeoTolAndPosTol.hxx @@ -25,7 +25,6 @@ class StepDimTol_GeometricToleranceWithDatumReference; class StepDimTol_ModifiedGeometricTolerance; class StepDimTol_PositionTolerance; class TCollection_HAsciiString; -class StepBasic_MeasureWithUnit; class StepRepr_ShapeAspect; class StepDimTol_GeoTolAndGeoTolWthDatRefAndModGeoTolAndPosTol; @@ -39,16 +38,16 @@ class StepDimTol_GeoTolAndGeoTolWthDatRefAndModGeoTolAndPosTol public: Standard_EXPORT StepDimTol_GeoTolAndGeoTolWthDatRefAndModGeoTolAndPosTol(); - Standard_EXPORT void Init(const Handle(TCollection_HAsciiString)& aName, - const Handle(TCollection_HAsciiString)& aDescription, - const Handle(StepBasic_MeasureWithUnit)& aMagnitude, - const Handle(StepRepr_ShapeAspect)& aTolerancedShapeAspect, + Standard_EXPORT void Init(const Handle(TCollection_HAsciiString)& aName, + const Handle(TCollection_HAsciiString)& aDescription, + const Handle(Standard_Transient)& aMagnitude, + const Handle(StepRepr_ShapeAspect)& aTolerancedShapeAspect, const Handle(StepDimTol_GeometricToleranceWithDatumReference)& aGTWDR, const Handle(StepDimTol_ModifiedGeometricTolerance)& aMGT); Standard_EXPORT void Init(const Handle(TCollection_HAsciiString)& aName, const Handle(TCollection_HAsciiString)& aDescription, - const Handle(StepBasic_MeasureWithUnit)& aMagnitude, + const Handle(Standard_Transient)& aMagnitude, const StepDimTol_GeometricToleranceTarget& aTolerancedShapeAspect, const Handle(StepDimTol_GeometricToleranceWithDatumReference)& aGTWDR, const Handle(StepDimTol_ModifiedGeometricTolerance)& aMGT); diff --git a/src/DataExchange/TKDESTEP/StepDimTol/StepDimTol_GeoTolAndGeoTolWthDatRefAndUneqDisGeoTol.cxx b/src/DataExchange/TKDESTEP/StepDimTol/StepDimTol_GeoTolAndGeoTolWthDatRefAndUneqDisGeoTol.cxx index 685b51c90f..c075d41ab3 100644 --- a/src/DataExchange/TKDESTEP/StepDimTol/StepDimTol_GeoTolAndGeoTolWthDatRefAndUneqDisGeoTol.cxx +++ b/src/DataExchange/TKDESTEP/StepDimTol/StepDimTol_GeoTolAndGeoTolWthDatRefAndUneqDisGeoTol.cxx @@ -34,7 +34,7 @@ StepDimTol_GeoTolAndGeoTolWthDatRefAndUneqDisGeoTol:: void StepDimTol_GeoTolAndGeoTolWthDatRefAndUneqDisGeoTol::Init( const Handle(TCollection_HAsciiString)& theName, const Handle(TCollection_HAsciiString)& theDescription, - const Handle(StepBasic_MeasureWithUnit)& theMagnitude, + const Handle(Standard_Transient)& theMagnitude, const Handle(StepRepr_ShapeAspect)& theTolerancedShapeAspect, const Handle(StepDimTol_GeometricToleranceWithDatumReference)& theGTWDR, const StepDimTol_GeometricToleranceType theType, @@ -54,7 +54,7 @@ void StepDimTol_GeoTolAndGeoTolWthDatRefAndUneqDisGeoTol::Init( void StepDimTol_GeoTolAndGeoTolWthDatRefAndUneqDisGeoTol::Init( const Handle(TCollection_HAsciiString)& theName, const Handle(TCollection_HAsciiString)& theDescription, - const Handle(StepBasic_MeasureWithUnit)& theMagnitude, + const Handle(Standard_Transient)& theMagnitude, const StepDimTol_GeometricToleranceTarget& theTolerancedShapeAspect, const Handle(StepDimTol_GeometricToleranceWithDatumReference)& theGTWDR, const StepDimTol_GeometricToleranceType theType, diff --git a/src/DataExchange/TKDESTEP/StepDimTol/StepDimTol_GeoTolAndGeoTolWthDatRefAndUneqDisGeoTol.hxx b/src/DataExchange/TKDESTEP/StepDimTol/StepDimTol_GeoTolAndGeoTolWthDatRefAndUneqDisGeoTol.hxx index b526fa6d76..0197cab37b 100644 --- a/src/DataExchange/TKDESTEP/StepDimTol/StepDimTol_GeoTolAndGeoTolWthDatRefAndUneqDisGeoTol.hxx +++ b/src/DataExchange/TKDESTEP/StepDimTol/StepDimTol_GeoTolAndGeoTolWthDatRefAndUneqDisGeoTol.hxx @@ -24,7 +24,6 @@ class StepDimTol_GeometricToleranceTarget; class StepDimTol_GeometricToleranceWithDatumReference; class StepDimTol_UnequallyDisposedGeometricTolerance; class TCollection_HAsciiString; -class StepBasic_MeasureWithUnit; class StepRepr_ShapeAspect; class StepDimTol_GeoTolAndGeoTolWthDatRefAndUneqDisGeoTol; @@ -38,17 +37,17 @@ class StepDimTol_GeoTolAndGeoTolWthDatRefAndUneqDisGeoTol public: Standard_EXPORT StepDimTol_GeoTolAndGeoTolWthDatRefAndUneqDisGeoTol(); - Standard_EXPORT void Init(const Handle(TCollection_HAsciiString)& theName, - const Handle(TCollection_HAsciiString)& theDescription, - const Handle(StepBasic_MeasureWithUnit)& theMagnitude, - const Handle(StepRepr_ShapeAspect)& theTolerancedShapeAspect, + Standard_EXPORT void Init(const Handle(TCollection_HAsciiString)& theName, + const Handle(TCollection_HAsciiString)& theDescription, + const Handle(Standard_Transient)& theMagnitude, + const Handle(StepRepr_ShapeAspect)& theTolerancedShapeAspect, const Handle(StepDimTol_GeometricToleranceWithDatumReference)& theGTWDR, const StepDimTol_GeometricToleranceType theType, const Handle(StepDimTol_UnequallyDisposedGeometricTolerance)& theUDGT); Standard_EXPORT void Init(const Handle(TCollection_HAsciiString)& aName, const Handle(TCollection_HAsciiString)& aDescription, - const Handle(StepBasic_MeasureWithUnit)& aMagnitude, + const Handle(Standard_Transient)& aMagnitude, const StepDimTol_GeometricToleranceTarget& aTolerancedShapeAspect, const Handle(StepDimTol_GeometricToleranceWithDatumReference)& aGTWDR, const StepDimTol_GeometricToleranceType theType, diff --git a/src/DataExchange/TKDESTEP/StepDimTol/StepDimTol_GeoTolAndGeoTolWthMaxTol.cxx b/src/DataExchange/TKDESTEP/StepDimTol/StepDimTol_GeoTolAndGeoTolWthMaxTol.cxx index 7f639140ac..6ce6e746e5 100644 --- a/src/DataExchange/TKDESTEP/StepDimTol/StepDimTol_GeoTolAndGeoTolWthMaxTol.cxx +++ b/src/DataExchange/TKDESTEP/StepDimTol/StepDimTol_GeoTolAndGeoTolWthMaxTol.cxx @@ -31,7 +31,7 @@ StepDimTol_GeoTolAndGeoTolWthMaxTol::StepDimTol_GeoTolAndGeoTolWthMaxTol() {} void StepDimTol_GeoTolAndGeoTolWthMaxTol::Init( const Handle(TCollection_HAsciiString)& theName, const Handle(TCollection_HAsciiString)& theDescription, - const Handle(StepBasic_MeasureWithUnit)& theMagnitude, + const Handle(Standard_Transient)& theMagnitude, const Handle(StepRepr_ShapeAspect)& theTolerancedShapeAspect, const Handle(StepDimTol_GeometricToleranceWithModifiers)& theGTWM, const Handle(StepBasic_LengthMeasureWithUnit)& theMaxTol, @@ -51,7 +51,7 @@ void StepDimTol_GeoTolAndGeoTolWthMaxTol::Init( void StepDimTol_GeoTolAndGeoTolWthMaxTol::Init( const Handle(TCollection_HAsciiString)& theName, const Handle(TCollection_HAsciiString)& theDescription, - const Handle(StepBasic_MeasureWithUnit)& theMagnitude, + const Handle(Standard_Transient)& theMagnitude, const StepDimTol_GeometricToleranceTarget& theTolerancedShapeAspect, const Handle(StepDimTol_GeometricToleranceWithModifiers)& theGTWM, const Handle(StepBasic_LengthMeasureWithUnit)& theMaxTol, diff --git a/src/DataExchange/TKDESTEP/StepDimTol/StepDimTol_GeoTolAndGeoTolWthMaxTol.hxx b/src/DataExchange/TKDESTEP/StepDimTol/StepDimTol_GeoTolAndGeoTolWthMaxTol.hxx index fd1937ccfe..5c83e97689 100644 --- a/src/DataExchange/TKDESTEP/StepDimTol/StepDimTol_GeoTolAndGeoTolWthMaxTol.hxx +++ b/src/DataExchange/TKDESTEP/StepDimTol/StepDimTol_GeoTolAndGeoTolWthMaxTol.hxx @@ -25,7 +25,6 @@ class StepDimTol_GeometricToleranceTarget; class StepDimTol_GeometricToleranceWithModifiers; class TCollection_HAsciiString; class StepBasic_LengthMeasureWithUnit; -class StepBasic_MeasureWithUnit; class StepRepr_ShapeAspect; class StepDimTol_GeoTolAndGeoTolWthMaxTol; @@ -37,17 +36,17 @@ class StepDimTol_GeoTolAndGeoTolWthMaxTol : public StepDimTol_GeoTolAndGeoTolWth public: Standard_EXPORT StepDimTol_GeoTolAndGeoTolWthMaxTol(); - Standard_EXPORT void Init(const Handle(TCollection_HAsciiString)& theName, - const Handle(TCollection_HAsciiString)& theDescription, - const Handle(StepBasic_MeasureWithUnit)& theMagnitude, - const Handle(StepRepr_ShapeAspect)& theTolerancedShapeAspect, + Standard_EXPORT void Init(const Handle(TCollection_HAsciiString)& theName, + const Handle(TCollection_HAsciiString)& theDescription, + const Handle(Standard_Transient)& theMagnitude, + const Handle(StepRepr_ShapeAspect)& theTolerancedShapeAspect, const Handle(StepDimTol_GeometricToleranceWithModifiers)& theGTWM, const Handle(StepBasic_LengthMeasureWithUnit)& theMaxTol, const StepDimTol_GeometricToleranceType theType); Standard_EXPORT void Init(const Handle(TCollection_HAsciiString)& aName, const Handle(TCollection_HAsciiString)& aDescription, - const Handle(StepBasic_MeasureWithUnit)& aMagnitude, + const Handle(Standard_Transient)& aMagnitude, const StepDimTol_GeometricToleranceTarget& aTolerancedShapeAspect, const Handle(StepDimTol_GeometricToleranceWithModifiers)& aGTWM, const Handle(StepBasic_LengthMeasureWithUnit)& theMaxTol, diff --git a/src/DataExchange/TKDESTEP/StepDimTol/StepDimTol_GeoTolAndGeoTolWthMod.cxx b/src/DataExchange/TKDESTEP/StepDimTol/StepDimTol_GeoTolAndGeoTolWthMod.cxx index ebf6b33a3d..1de2f22f91 100644 --- a/src/DataExchange/TKDESTEP/StepDimTol/StepDimTol_GeoTolAndGeoTolWthMod.cxx +++ b/src/DataExchange/TKDESTEP/StepDimTol/StepDimTol_GeoTolAndGeoTolWthMod.cxx @@ -30,7 +30,7 @@ StepDimTol_GeoTolAndGeoTolWthMod::StepDimTol_GeoTolAndGeoTolWthMod() {} void StepDimTol_GeoTolAndGeoTolWthMod::Init( const Handle(TCollection_HAsciiString)& theName, const Handle(TCollection_HAsciiString)& theDescription, - const Handle(StepBasic_MeasureWithUnit)& theMagnitude, + const Handle(Standard_Transient)& theMagnitude, const Handle(StepRepr_ShapeAspect)& theTolerancedShapeAspect, const Handle(StepDimTol_GeometricToleranceWithModifiers)& theGTWM, const StepDimTol_GeometricToleranceType theType) @@ -48,7 +48,7 @@ void StepDimTol_GeoTolAndGeoTolWthMod::Init( void StepDimTol_GeoTolAndGeoTolWthMod::Init( const Handle(TCollection_HAsciiString)& theName, const Handle(TCollection_HAsciiString)& theDescription, - const Handle(StepBasic_MeasureWithUnit)& theMagnitude, + const Handle(Standard_Transient)& theMagnitude, const StepDimTol_GeometricToleranceTarget& theTolerancedShapeAspect, const Handle(StepDimTol_GeometricToleranceWithModifiers)& theGTWM, const StepDimTol_GeometricToleranceType theType) diff --git a/src/DataExchange/TKDESTEP/StepDimTol/StepDimTol_GeoTolAndGeoTolWthMod.hxx b/src/DataExchange/TKDESTEP/StepDimTol/StepDimTol_GeoTolAndGeoTolWthMod.hxx index e54b0f5bd4..0df4fbb0f6 100644 --- a/src/DataExchange/TKDESTEP/StepDimTol/StepDimTol_GeoTolAndGeoTolWthMod.hxx +++ b/src/DataExchange/TKDESTEP/StepDimTol/StepDimTol_GeoTolAndGeoTolWthMod.hxx @@ -24,7 +24,6 @@ class StepDimTol_GeometricToleranceTarget; class StepDimTol_GeometricToleranceWithModifiers; class TCollection_HAsciiString; -class StepBasic_MeasureWithUnit; class StepRepr_ShapeAspect; class StepDimTol_GeoTolAndGeoTolWthMod; @@ -36,16 +35,16 @@ class StepDimTol_GeoTolAndGeoTolWthMod : public StepDimTol_GeometricTolerance public: Standard_EXPORT StepDimTol_GeoTolAndGeoTolWthMod(); - Standard_EXPORT void Init(const Handle(TCollection_HAsciiString)& theName, - const Handle(TCollection_HAsciiString)& theDescription, - const Handle(StepBasic_MeasureWithUnit)& theMagnitude, - const Handle(StepRepr_ShapeAspect)& theTolerancedShapeAspect, + Standard_EXPORT void Init(const Handle(TCollection_HAsciiString)& theName, + const Handle(TCollection_HAsciiString)& theDescription, + const Handle(Standard_Transient)& theMagnitude, + const Handle(StepRepr_ShapeAspect)& theTolerancedShapeAspect, const Handle(StepDimTol_GeometricToleranceWithModifiers)& theGTWM, const StepDimTol_GeometricToleranceType theType); Standard_EXPORT void Init(const Handle(TCollection_HAsciiString)& aName, const Handle(TCollection_HAsciiString)& aDescription, - const Handle(StepBasic_MeasureWithUnit)& aMagnitude, + const Handle(Standard_Transient)& aMagnitude, const StepDimTol_GeometricToleranceTarget& aTolerancedShapeAspect, const Handle(StepDimTol_GeometricToleranceWithModifiers)& aGTWM, const StepDimTol_GeometricToleranceType theType); diff --git a/src/DataExchange/TKDESTEP/StepDimTol/StepDimTol_GeometricTolerance.cxx b/src/DataExchange/TKDESTEP/StepDimTol/StepDimTol_GeometricTolerance.cxx index 3226853043..4db4640acc 100644 --- a/src/DataExchange/TKDESTEP/StepDimTol/StepDimTol_GeometricTolerance.cxx +++ b/src/DataExchange/TKDESTEP/StepDimTol/StepDimTol_GeometricTolerance.cxx @@ -32,7 +32,7 @@ StepDimTol_GeometricTolerance::StepDimTol_GeometricTolerance() {} void StepDimTol_GeometricTolerance::Init( const Handle(TCollection_HAsciiString)& theName, const Handle(TCollection_HAsciiString)& theDescription, - const Handle(StepBasic_MeasureWithUnit)& theMagnitude, + const Handle(Standard_Transient)& theMagnitude, const StepDimTol_GeometricToleranceTarget& theTolerancedShapeAspect) { @@ -48,10 +48,10 @@ void StepDimTol_GeometricTolerance::Init( //================================================================================================= void StepDimTol_GeometricTolerance::Init( - const Handle(TCollection_HAsciiString)& theName, - const Handle(TCollection_HAsciiString)& theDescription, - const Handle(StepBasic_MeasureWithUnit)& theMagnitude, - const Handle(StepRepr_ShapeAspect)& theTolerancedShapeAspect) + const Handle(TCollection_HAsciiString)& theName, + const Handle(TCollection_HAsciiString)& theDescription, + const Handle(Standard_Transient)& theMagnitude, + const Handle(StepRepr_ShapeAspect)& theTolerancedShapeAspect) { myName = theName; @@ -94,15 +94,14 @@ void StepDimTol_GeometricTolerance::SetDescription( //================================================================================================= -Handle(StepBasic_MeasureWithUnit) StepDimTol_GeometricTolerance::Magnitude() const +Handle(Standard_Transient) StepDimTol_GeometricTolerance::Magnitude() const { return myMagnitude; } //================================================================================================= -void StepDimTol_GeometricTolerance::SetMagnitude( - const Handle(StepBasic_MeasureWithUnit)& theMagnitude) +void StepDimTol_GeometricTolerance::SetMagnitude(const Handle(Standard_Transient)& theMagnitude) { myMagnitude = theMagnitude; } diff --git a/src/DataExchange/TKDESTEP/StepDimTol/StepDimTol_GeometricTolerance.hxx b/src/DataExchange/TKDESTEP/StepDimTol/StepDimTol_GeometricTolerance.hxx index 6c435d7712..c8bde80369 100644 --- a/src/DataExchange/TKDESTEP/StepDimTol/StepDimTol_GeometricTolerance.hxx +++ b/src/DataExchange/TKDESTEP/StepDimTol/StepDimTol_GeometricTolerance.hxx @@ -22,7 +22,6 @@ #include #include class TCollection_HAsciiString; -class StepBasic_MeasureWithUnit; class StepRepr_ShapeAspect; class StepDimTol_GeometricTolerance; @@ -37,15 +36,15 @@ public: Standard_EXPORT StepDimTol_GeometricTolerance(); //! Initialize all fields (own and inherited) AP214 - Standard_EXPORT void Init(const Handle(TCollection_HAsciiString)& theName, - const Handle(TCollection_HAsciiString)& theDescription, - const Handle(StepBasic_MeasureWithUnit)& theMagnitude, - const Handle(StepRepr_ShapeAspect)& theTolerancedShapeAspect); + Standard_EXPORT void Init(const Handle(TCollection_HAsciiString)& theName, + const Handle(TCollection_HAsciiString)& theDescription, + const Handle(Standard_Transient)& theMagnitude, + const Handle(StepRepr_ShapeAspect)& theTolerancedShapeAspect); //! Initialize all fields (own and inherited) AP242 Standard_EXPORT void Init(const Handle(TCollection_HAsciiString)& theName, const Handle(TCollection_HAsciiString)& theDescription, - const Handle(StepBasic_MeasureWithUnit)& theMagnitude, + const Handle(Standard_Transient)& theMagnitude, const StepDimTol_GeometricToleranceTarget& theTolerancedShapeAspect); //! Returns field Name @@ -61,10 +60,10 @@ public: Standard_EXPORT void SetDescription(const Handle(TCollection_HAsciiString)& theDescription); //! Returns field Magnitude - Standard_EXPORT Handle(StepBasic_MeasureWithUnit) Magnitude() const; + Standard_EXPORT Handle(Standard_Transient) Magnitude() const; //! Set field Magnitude - Standard_EXPORT void SetMagnitude(const Handle(StepBasic_MeasureWithUnit)& theMagnitude); + Standard_EXPORT void SetMagnitude(const Handle(Standard_Transient)& theMagnitude); //! Returns field TolerancedShapeAspect //! Note: in AP214(203) type of this attribute can be only StepRepr_ShapeAspect @@ -84,7 +83,7 @@ protected: private: Handle(TCollection_HAsciiString) myName; Handle(TCollection_HAsciiString) myDescription; - Handle(StepBasic_MeasureWithUnit) myMagnitude; + Handle(Standard_Transient) myMagnitude; StepDimTol_GeometricToleranceTarget myTolerancedShapeAspect; }; diff --git a/src/DataExchange/TKDESTEP/StepDimTol/StepDimTol_GeometricToleranceWithDatumReference.cxx b/src/DataExchange/TKDESTEP/StepDimTol/StepDimTol_GeometricToleranceWithDatumReference.cxx index 615ef26daf..7ff6e10cf0 100644 --- a/src/DataExchange/TKDESTEP/StepDimTol/StepDimTol_GeometricToleranceWithDatumReference.cxx +++ b/src/DataExchange/TKDESTEP/StepDimTol/StepDimTol_GeometricToleranceWithDatumReference.cxx @@ -35,7 +35,7 @@ StepDimTol_GeometricToleranceWithDatumReference::StepDimTol_GeometricToleranceWi void StepDimTol_GeometricToleranceWithDatumReference::Init( const Handle(TCollection_HAsciiString)& theGeometricTolerance_Name, const Handle(TCollection_HAsciiString)& theGeometricTolerance_Description, - const Handle(StepBasic_MeasureWithUnit)& theGeometricTolerance_Magnitude, + const Handle(Standard_Transient)& theGeometricTolerance_Magnitude, const Handle(StepRepr_ShapeAspect)& theGeometricTolerance_TolerancedShapeAspect, const Handle(StepDimTol_HArray1OfDatumReference)& theDatumSystem) { @@ -59,7 +59,7 @@ void StepDimTol_GeometricToleranceWithDatumReference::Init( void StepDimTol_GeometricToleranceWithDatumReference::Init( const Handle(TCollection_HAsciiString)& theGeometricTolerance_Name, const Handle(TCollection_HAsciiString)& theGeometricTolerance_Description, - const Handle(StepBasic_MeasureWithUnit)& theGeometricTolerance_Magnitude, + const Handle(Standard_Transient)& theGeometricTolerance_Magnitude, const StepDimTol_GeometricToleranceTarget& theGeometricTolerance_TolerancedShapeAspect, const Handle(StepDimTol_HArray1OfDatumSystemOrReference)& theDatumSystem) { diff --git a/src/DataExchange/TKDESTEP/StepDimTol/StepDimTol_GeometricToleranceWithDatumReference.hxx b/src/DataExchange/TKDESTEP/StepDimTol/StepDimTol_GeometricToleranceWithDatumReference.hxx index 6410ba7fa4..1e4e62ab9f 100644 --- a/src/DataExchange/TKDESTEP/StepDimTol/StepDimTol_GeometricToleranceWithDatumReference.hxx +++ b/src/DataExchange/TKDESTEP/StepDimTol/StepDimTol_GeometricToleranceWithDatumReference.hxx @@ -23,7 +23,6 @@ #include #include class TCollection_HAsciiString; -class StepBasic_MeasureWithUnit; class StepDimTol_GeometricToleranceTarget; class StepRepr_ShapeAspect; @@ -43,7 +42,7 @@ public: Standard_EXPORT void Init( const Handle(TCollection_HAsciiString)& theGeometricTolerance_Name, const Handle(TCollection_HAsciiString)& theGeometricTolerance_Description, - const Handle(StepBasic_MeasureWithUnit)& theGeometricTolerance_Magnitude, + const Handle(Standard_Transient)& theGeometricTolerance_Magnitude, const Handle(StepRepr_ShapeAspect)& theGeometricTolerance_TolerancedShapeAspect, const Handle(StepDimTol_HArray1OfDatumReference)& theDatumSystem); @@ -51,7 +50,7 @@ public: Standard_EXPORT void Init( const Handle(TCollection_HAsciiString)& theGeometricTolerance_Name, const Handle(TCollection_HAsciiString)& theGeometricTolerance_Description, - const Handle(StepBasic_MeasureWithUnit)& theGeometricTolerance_Magnitude, + const Handle(Standard_Transient)& theGeometricTolerance_Magnitude, const StepDimTol_GeometricToleranceTarget& theGeometricTolerance_TolerancedShapeAspect, const Handle(StepDimTol_HArray1OfDatumSystemOrReference)& theDatumSystem); diff --git a/src/DataExchange/TKDESTEP/StepDimTol/StepDimTol_GeometricToleranceWithDefinedAreaUnit.cxx b/src/DataExchange/TKDESTEP/StepDimTol/StepDimTol_GeometricToleranceWithDefinedAreaUnit.cxx index cdf9b229a6..0205429525 100644 --- a/src/DataExchange/TKDESTEP/StepDimTol/StepDimTol_GeometricToleranceWithDefinedAreaUnit.cxx +++ b/src/DataExchange/TKDESTEP/StepDimTol/StepDimTol_GeometricToleranceWithDefinedAreaUnit.cxx @@ -29,7 +29,7 @@ StepDimTol_GeometricToleranceWithDefinedAreaUnit::StepDimTol_GeometricToleranceW void StepDimTol_GeometricToleranceWithDefinedAreaUnit::Init( const Handle(TCollection_HAsciiString)& theName, const Handle(TCollection_HAsciiString)& theDescription, - const Handle(StepBasic_MeasureWithUnit)& theMagnitude, + const Handle(Standard_Transient)& theMagnitude, const StepDimTol_GeometricToleranceTarget& theTolerancedShapeAspect, const Handle(StepBasic_LengthMeasureWithUnit)& theUnitSize, const StepDimTol_AreaUnitType theUnitType, diff --git a/src/DataExchange/TKDESTEP/StepDimTol/StepDimTol_GeometricToleranceWithDefinedAreaUnit.hxx b/src/DataExchange/TKDESTEP/StepDimTol/StepDimTol_GeometricToleranceWithDefinedAreaUnit.hxx index f82d6969a6..44564167df 100644 --- a/src/DataExchange/TKDESTEP/StepDimTol/StepDimTol_GeometricToleranceWithDefinedAreaUnit.hxx +++ b/src/DataExchange/TKDESTEP/StepDimTol/StepDimTol_GeometricToleranceWithDefinedAreaUnit.hxx @@ -43,7 +43,7 @@ public: //! Initialize all fields (own and inherited) Standard_EXPORT void Init(const Handle(TCollection_HAsciiString)& theName, const Handle(TCollection_HAsciiString)& theDescription, - const Handle(StepBasic_MeasureWithUnit)& theMagnitude, + const Handle(Standard_Transient)& theMagnitude, const StepDimTol_GeometricToleranceTarget& theTolerancedShapeAspect, const Handle(StepBasic_LengthMeasureWithUnit)& theUnitSize, const StepDimTol_AreaUnitType theAreaType, diff --git a/src/DataExchange/TKDESTEP/StepDimTol/StepDimTol_GeometricToleranceWithDefinedUnit.cxx b/src/DataExchange/TKDESTEP/StepDimTol/StepDimTol_GeometricToleranceWithDefinedUnit.cxx index d94680e0bd..1a9004ce5d 100644 --- a/src/DataExchange/TKDESTEP/StepDimTol/StepDimTol_GeometricToleranceWithDefinedUnit.cxx +++ b/src/DataExchange/TKDESTEP/StepDimTol/StepDimTol_GeometricToleranceWithDefinedUnit.cxx @@ -30,7 +30,7 @@ StepDimTol_GeometricToleranceWithDefinedUnit::StepDimTol_GeometricToleranceWithD void StepDimTol_GeometricToleranceWithDefinedUnit::Init( const Handle(TCollection_HAsciiString)& theName, const Handle(TCollection_HAsciiString)& theDescription, - const Handle(StepBasic_MeasureWithUnit)& theMagnitude, + const Handle(Standard_Transient)& theMagnitude, const Handle(StepRepr_ShapeAspect)& theTolerancedShapeAspect, const Handle(StepBasic_LengthMeasureWithUnit)& theUnitSize) { @@ -46,7 +46,7 @@ void StepDimTol_GeometricToleranceWithDefinedUnit::Init( void StepDimTol_GeometricToleranceWithDefinedUnit::Init( const Handle(TCollection_HAsciiString)& theName, const Handle(TCollection_HAsciiString)& theDescription, - const Handle(StepBasic_MeasureWithUnit)& theMagnitude, + const Handle(Standard_Transient)& theMagnitude, const StepDimTol_GeometricToleranceTarget& theTolerancedShapeAspect, const Handle(StepBasic_LengthMeasureWithUnit)& theUnitSize) { diff --git a/src/DataExchange/TKDESTEP/StepDimTol/StepDimTol_GeometricToleranceWithDefinedUnit.hxx b/src/DataExchange/TKDESTEP/StepDimTol/StepDimTol_GeometricToleranceWithDefinedUnit.hxx index 3f25884bae..9876e64a72 100644 --- a/src/DataExchange/TKDESTEP/StepDimTol/StepDimTol_GeometricToleranceWithDefinedUnit.hxx +++ b/src/DataExchange/TKDESTEP/StepDimTol/StepDimTol_GeometricToleranceWithDefinedUnit.hxx @@ -40,14 +40,14 @@ public: //! Initialize all fields (own and inherited) AP214 Standard_EXPORT void Init(const Handle(TCollection_HAsciiString)& theName, const Handle(TCollection_HAsciiString)& theDescription, - const Handle(StepBasic_MeasureWithUnit)& theMagnitude, + const Handle(Standard_Transient)& theMagnitude, const Handle(StepRepr_ShapeAspect)& theTolerancedShapeAspect, const Handle(StepBasic_LengthMeasureWithUnit)& theUnitSize); //! Initialize all fields (own and inherited) AP242 Standard_EXPORT void Init(const Handle(TCollection_HAsciiString)& theName, const Handle(TCollection_HAsciiString)& theDescription, - const Handle(StepBasic_MeasureWithUnit)& theMagnitude, + const Handle(Standard_Transient)& theMagnitude, const StepDimTol_GeometricToleranceTarget& theTolerancedShapeAspect, const Handle(StepBasic_LengthMeasureWithUnit)& theUnitSize); diff --git a/src/DataExchange/TKDESTEP/StepDimTol/StepDimTol_GeometricToleranceWithMaximumTolerance.cxx b/src/DataExchange/TKDESTEP/StepDimTol/StepDimTol_GeometricToleranceWithMaximumTolerance.cxx index 7c7abc1593..2a0a3facdd 100644 --- a/src/DataExchange/TKDESTEP/StepDimTol/StepDimTol_GeometricToleranceWithMaximumTolerance.cxx +++ b/src/DataExchange/TKDESTEP/StepDimTol/StepDimTol_GeometricToleranceWithMaximumTolerance.cxx @@ -33,7 +33,7 @@ StepDimTol_GeometricToleranceWithMaximumTolerance:: void StepDimTol_GeometricToleranceWithMaximumTolerance::Init( const Handle(TCollection_HAsciiString)& theName, const Handle(TCollection_HAsciiString)& theDescription, - const Handle(StepBasic_MeasureWithUnit)& theMagnitude, + const Handle(Standard_Transient)& theMagnitude, const StepDimTol_GeometricToleranceTarget& theTolerancedShapeAspect, const Handle(StepDimTol_HArray1OfGeometricToleranceModifier)& theModifiers, const Handle(StepBasic_LengthMeasureWithUnit)& theMaximumUpperTolerance) diff --git a/src/DataExchange/TKDESTEP/StepDimTol/StepDimTol_GeometricToleranceWithMaximumTolerance.hxx b/src/DataExchange/TKDESTEP/StepDimTol/StepDimTol_GeometricToleranceWithMaximumTolerance.hxx index a518411139..2fd9ce26df 100644 --- a/src/DataExchange/TKDESTEP/StepDimTol/StepDimTol_GeometricToleranceWithMaximumTolerance.hxx +++ b/src/DataExchange/TKDESTEP/StepDimTol/StepDimTol_GeometricToleranceWithMaximumTolerance.hxx @@ -43,7 +43,7 @@ public: Standard_EXPORT void Init( const Handle(TCollection_HAsciiString)& theName, const Handle(TCollection_HAsciiString)& theDescription, - const Handle(StepBasic_MeasureWithUnit)& theMagnitude, + const Handle(Standard_Transient)& theMagnitude, const StepDimTol_GeometricToleranceTarget& theTolerancedShapeAspect, const Handle(StepDimTol_HArray1OfGeometricToleranceModifier)& theModifiers, const Handle(StepBasic_LengthMeasureWithUnit)& theUnitSize); diff --git a/src/DataExchange/TKDESTEP/StepDimTol/StepDimTol_GeometricToleranceWithModifiers.cxx b/src/DataExchange/TKDESTEP/StepDimTol/StepDimTol_GeometricToleranceWithModifiers.cxx index b98ac4e2cb..6a6b803a3f 100644 --- a/src/DataExchange/TKDESTEP/StepDimTol/StepDimTol_GeometricToleranceWithModifiers.cxx +++ b/src/DataExchange/TKDESTEP/StepDimTol/StepDimTol_GeometricToleranceWithModifiers.cxx @@ -30,7 +30,7 @@ StepDimTol_GeometricToleranceWithModifiers::StepDimTol_GeometricToleranceWithMod void StepDimTol_GeometricToleranceWithModifiers::Init( const Handle(TCollection_HAsciiString)& theName, const Handle(TCollection_HAsciiString)& theDescription, - const Handle(StepBasic_MeasureWithUnit)& theMagnitude, + const Handle(Standard_Transient)& theMagnitude, const StepDimTol_GeometricToleranceTarget& theTolerancedShapeAspect, const Handle(StepDimTol_HArray1OfGeometricToleranceModifier)& theModifiers) { diff --git a/src/DataExchange/TKDESTEP/StepDimTol/StepDimTol_GeometricToleranceWithModifiers.hxx b/src/DataExchange/TKDESTEP/StepDimTol/StepDimTol_GeometricToleranceWithModifiers.hxx index bbb1833a1a..bdcaf8152f 100644 --- a/src/DataExchange/TKDESTEP/StepDimTol/StepDimTol_GeometricToleranceWithModifiers.hxx +++ b/src/DataExchange/TKDESTEP/StepDimTol/StepDimTol_GeometricToleranceWithModifiers.hxx @@ -23,7 +23,6 @@ #include class TCollection_HAsciiString; -class StepBasic_MeasureWithUnit; class StepDimTol_GeometricToleranceTarget; class StepDimTol_GeometricToleranceWithModifiers; @@ -41,7 +40,7 @@ public: Standard_EXPORT void Init( const Handle(TCollection_HAsciiString)& theName, const Handle(TCollection_HAsciiString)& theDescription, - const Handle(StepBasic_MeasureWithUnit)& theMagnitude, + const Handle(Standard_Transient)& theMagnitude, const StepDimTol_GeometricToleranceTarget& theTolerancedShapeAspect, const Handle(StepDimTol_HArray1OfGeometricToleranceModifier)& theModifiers); diff --git a/src/DataExchange/TKDESTEP/StepDimTol/StepDimTol_ModifiedGeometricTolerance.cxx b/src/DataExchange/TKDESTEP/StepDimTol/StepDimTol_ModifiedGeometricTolerance.cxx index e54377647d..50c5e8c5fb 100644 --- a/src/DataExchange/TKDESTEP/StepDimTol/StepDimTol_ModifiedGeometricTolerance.cxx +++ b/src/DataExchange/TKDESTEP/StepDimTol/StepDimTol_ModifiedGeometricTolerance.cxx @@ -30,11 +30,11 @@ StepDimTol_ModifiedGeometricTolerance::StepDimTol_ModifiedGeometricTolerance() { //================================================================================================= void StepDimTol_ModifiedGeometricTolerance::Init( - const Handle(TCollection_HAsciiString)& theGeometricTolerance_Name, - const Handle(TCollection_HAsciiString)& theGeometricTolerance_Description, - const Handle(StepBasic_MeasureWithUnit)& theGeometricTolerance_Magnitude, - const Handle(StepRepr_ShapeAspect)& theGeometricTolerance_TolerancedShapeAspect, - const StepDimTol_LimitCondition theModifier) + const Handle(TCollection_HAsciiString)& theGeometricTolerance_Name, + const Handle(TCollection_HAsciiString)& theGeometricTolerance_Description, + const Handle(Standard_Transient)& theGeometricTolerance_Magnitude, + const Handle(StepRepr_ShapeAspect)& theGeometricTolerance_TolerancedShapeAspect, + const StepDimTol_LimitCondition theModifier) { StepDimTol_GeometricTolerance::Init(theGeometricTolerance_Name, theGeometricTolerance_Description, @@ -49,7 +49,7 @@ void StepDimTol_ModifiedGeometricTolerance::Init( void StepDimTol_ModifiedGeometricTolerance::Init( const Handle(TCollection_HAsciiString)& theGeometricTolerance_Name, const Handle(TCollection_HAsciiString)& theGeometricTolerance_Description, - const Handle(StepBasic_MeasureWithUnit)& theGeometricTolerance_Magnitude, + const Handle(Standard_Transient)& theGeometricTolerance_Magnitude, const StepDimTol_GeometricToleranceTarget& theGeometricTolerance_TolerancedShapeAspect, const StepDimTol_LimitCondition theModifier) { diff --git a/src/DataExchange/TKDESTEP/StepDimTol/StepDimTol_ModifiedGeometricTolerance.hxx b/src/DataExchange/TKDESTEP/StepDimTol/StepDimTol_ModifiedGeometricTolerance.hxx index 631e6364af..2466f53042 100644 --- a/src/DataExchange/TKDESTEP/StepDimTol/StepDimTol_ModifiedGeometricTolerance.hxx +++ b/src/DataExchange/TKDESTEP/StepDimTol/StepDimTol_ModifiedGeometricTolerance.hxx @@ -22,7 +22,6 @@ #include #include class TCollection_HAsciiString; -class StepBasic_MeasureWithUnit; class StepDimTol_GeometricToleranceTarget; class StepRepr_ShapeAspect; @@ -39,17 +38,17 @@ public: //! Initialize all fields (own and inherited) AP214 Standard_EXPORT void Init( - const Handle(TCollection_HAsciiString)& theGeometricTolerance_Name, - const Handle(TCollection_HAsciiString)& theGeometricTolerance_Description, - const Handle(StepBasic_MeasureWithUnit)& theGeometricTolerance_Magnitude, - const Handle(StepRepr_ShapeAspect)& theGeometricTolerance_TolerancedShapeAspect, - const StepDimTol_LimitCondition theModifier); + const Handle(TCollection_HAsciiString)& theGeometricTolerance_Name, + const Handle(TCollection_HAsciiString)& theGeometricTolerance_Description, + const Handle(Standard_Transient)& theGeometricTolerance_Magnitude, + const Handle(StepRepr_ShapeAspect)& theGeometricTolerance_TolerancedShapeAspect, + const StepDimTol_LimitCondition theModifier); //! Initialize all fields (own and inherited) AP242 Standard_EXPORT void Init( const Handle(TCollection_HAsciiString)& theGeometricTolerance_Name, const Handle(TCollection_HAsciiString)& theGeometricTolerance_Description, - const Handle(StepBasic_MeasureWithUnit)& theGeometricTolerance_Magnitude, + const Handle(Standard_Transient)& theGeometricTolerance_Magnitude, const StepDimTol_GeometricToleranceTarget& theGeometricTolerance_TolerancedShapeAspect, const StepDimTol_LimitCondition theModifier); diff --git a/src/DataExchange/TKDESTEP/StepDimTol/StepDimTol_UnequallyDisposedGeometricTolerance.cxx b/src/DataExchange/TKDESTEP/StepDimTol/StepDimTol_UnequallyDisposedGeometricTolerance.cxx index f853e26e1e..5e0cfc27ca 100644 --- a/src/DataExchange/TKDESTEP/StepDimTol/StepDimTol_UnequallyDisposedGeometricTolerance.cxx +++ b/src/DataExchange/TKDESTEP/StepDimTol/StepDimTol_UnequallyDisposedGeometricTolerance.cxx @@ -30,7 +30,7 @@ StepDimTol_UnequallyDisposedGeometricTolerance::StepDimTol_UnequallyDisposedGeom void StepDimTol_UnequallyDisposedGeometricTolerance::Init( const Handle(TCollection_HAsciiString)& theName, const Handle(TCollection_HAsciiString)& theDescription, - const Handle(StepBasic_MeasureWithUnit)& theMagnitude, + const Handle(Standard_Transient)& theMagnitude, const StepDimTol_GeometricToleranceTarget& theTolerancedShapeAspect, const Handle(StepBasic_LengthMeasureWithUnit)& theDisplacement) { diff --git a/src/DataExchange/TKDESTEP/StepDimTol/StepDimTol_UnequallyDisposedGeometricTolerance.hxx b/src/DataExchange/TKDESTEP/StepDimTol/StepDimTol_UnequallyDisposedGeometricTolerance.hxx index 4ff94b8c31..81d497a207 100644 --- a/src/DataExchange/TKDESTEP/StepDimTol/StepDimTol_UnequallyDisposedGeometricTolerance.hxx +++ b/src/DataExchange/TKDESTEP/StepDimTol/StepDimTol_UnequallyDisposedGeometricTolerance.hxx @@ -40,7 +40,7 @@ public: //! Initialize all fields (own and inherited) Standard_EXPORT void Init(const Handle(TCollection_HAsciiString)& theName, const Handle(TCollection_HAsciiString)& theDescription, - const Handle(StepBasic_MeasureWithUnit)& theMagnitude, + const Handle(Standard_Transient)& theMagnitude, const StepDimTol_GeometricToleranceTarget& theTolerancedShapeAspect, const Handle(StepBasic_LengthMeasureWithUnit)& theDisplacement); diff --git a/src/DataExchange/TKDESTEP/StepRepr/StepRepr_MakeFromUsageOption.cxx b/src/DataExchange/TKDESTEP/StepRepr/StepRepr_MakeFromUsageOption.cxx index e9530fb3f8..3bbb71cc7e 100644 --- a/src/DataExchange/TKDESTEP/StepRepr/StepRepr_MakeFromUsageOption.cxx +++ b/src/DataExchange/TKDESTEP/StepRepr/StepRepr_MakeFromUsageOption.cxx @@ -36,10 +36,10 @@ void StepRepr_MakeFromUsageOption::Init( const Handle(StepBasic_ProductDefinition)& aProductDefinitionRelationship_RelatingProductDefinition, const Handle(StepBasic_ProductDefinition)& - aProductDefinitionRelationship_RelatedProductDefinition, - const Standard_Integer aRanking, - const Handle(TCollection_HAsciiString)& aRankingRationale, - const Handle(StepBasic_MeasureWithUnit)& aQuantity) + aProductDefinitionRelationship_RelatedProductDefinition, + const Standard_Integer aRanking, + const Handle(TCollection_HAsciiString)& aRankingRationale, + const Handle(Standard_Transient)& aQuantity) { StepRepr_ProductDefinitionUsage::Init(aProductDefinitionRelationship_Id, aProductDefinitionRelationship_Name, @@ -65,10 +65,10 @@ void StepRepr_MakeFromUsageOption::Init( const StepBasic_ProductDefinitionOrReference& aProductDefinitionRelationship_RelatingProductDefinition, const StepBasic_ProductDefinitionOrReference& - aProductDefinitionRelationship_RelatedProductDefinition, - const Standard_Integer aRanking, - const Handle(TCollection_HAsciiString)& aRankingRationale, - const Handle(StepBasic_MeasureWithUnit)& aQuantity) + aProductDefinitionRelationship_RelatedProductDefinition, + const Standard_Integer aRanking, + const Handle(TCollection_HAsciiString)& aRankingRationale, + const Handle(Standard_Transient)& aQuantity) { StepRepr_ProductDefinitionUsage::Init(aProductDefinitionRelationship_Id, aProductDefinitionRelationship_Name, @@ -115,14 +115,14 @@ void StepRepr_MakeFromUsageOption::SetRankingRationale( //================================================================================================= -Handle(StepBasic_MeasureWithUnit) StepRepr_MakeFromUsageOption::Quantity() const +Handle(Standard_Transient) StepRepr_MakeFromUsageOption::Quantity() const { return theQuantity; } //================================================================================================= -void StepRepr_MakeFromUsageOption::SetQuantity(const Handle(StepBasic_MeasureWithUnit)& aQuantity) +void StepRepr_MakeFromUsageOption::SetQuantity(const Handle(Standard_Transient)& aQuantity) { theQuantity = aQuantity; } diff --git a/src/DataExchange/TKDESTEP/StepRepr/StepRepr_MakeFromUsageOption.hxx b/src/DataExchange/TKDESTEP/StepRepr/StepRepr_MakeFromUsageOption.hxx index 20584986c7..344c529f1b 100644 --- a/src/DataExchange/TKDESTEP/StepRepr/StepRepr_MakeFromUsageOption.hxx +++ b/src/DataExchange/TKDESTEP/StepRepr/StepRepr_MakeFromUsageOption.hxx @@ -22,7 +22,6 @@ #include #include class TCollection_HAsciiString; -class StepBasic_MeasureWithUnit; class StepBasic_ProductDefinition; class StepRepr_MakeFromUsageOption; @@ -48,7 +47,7 @@ public: aProductDefinitionRelationship_RelatedProductDefinition, const Standard_Integer aRanking, const Handle(TCollection_HAsciiString)& aRankingRationale, - const Handle(StepBasic_MeasureWithUnit)& aQuantity); + const Handle(Standard_Transient)& aQuantity); //! Initialize all fields (own and inherited) Standard_EXPORT void Init( @@ -62,7 +61,7 @@ public: aProductDefinitionRelationship_RelatedProductDefinition, const Standard_Integer aRanking, const Handle(TCollection_HAsciiString)& aRankingRationale, - const Handle(StepBasic_MeasureWithUnit)& aQuantity); + const Handle(Standard_Transient)& aQuantity); //! Returns field Ranking Standard_EXPORT Standard_Integer Ranking() const; @@ -78,18 +77,18 @@ public: const Handle(TCollection_HAsciiString)& RankingRationale); //! Returns field Quantity - Standard_EXPORT Handle(StepBasic_MeasureWithUnit) Quantity() const; + Standard_EXPORT Handle(Standard_Transient) Quantity() const; //! Set field Quantity - Standard_EXPORT void SetQuantity(const Handle(StepBasic_MeasureWithUnit)& Quantity); + Standard_EXPORT void SetQuantity(const Handle(Standard_Transient)& Quantity); DEFINE_STANDARD_RTTIEXT(StepRepr_MakeFromUsageOption, StepRepr_ProductDefinitionUsage) protected: private: - Standard_Integer theRanking; - Handle(TCollection_HAsciiString) theRankingRationale; - Handle(StepBasic_MeasureWithUnit) theQuantity; + Standard_Integer theRanking; + Handle(TCollection_HAsciiString) theRankingRationale; + Handle(Standard_Transient) theQuantity; }; #endif // _StepRepr_MakeFromUsageOption_HeaderFile diff --git a/src/DataExchange/TKDESTEP/StepRepr/StepRepr_ParallelOffset.cxx b/src/DataExchange/TKDESTEP/StepRepr/StepRepr_ParallelOffset.cxx index 0b1b579163..e6188b1357 100644 --- a/src/DataExchange/TKDESTEP/StepRepr/StepRepr_ParallelOffset.cxx +++ b/src/DataExchange/TKDESTEP/StepRepr/StepRepr_ParallelOffset.cxx @@ -26,7 +26,7 @@ void StepRepr_ParallelOffset::Init( const Handle(TCollection_HAsciiString)& theShapeAspect_Description, const Handle(StepRepr_ProductDefinitionShape)& theShapeAspect_OfShape, const StepData_Logical theShapeAspect_ProductDefinitional, - const Handle(StepBasic_MeasureWithUnit)& theOffset) + const Handle(Standard_Transient)& theOffset) { StepRepr_ShapeAspect::Init(theShapeAspect_Name, theShapeAspect_Description, diff --git a/src/DataExchange/TKDESTEP/StepRepr/StepRepr_ParallelOffset.hxx b/src/DataExchange/TKDESTEP/StepRepr/StepRepr_ParallelOffset.hxx index b89e463f06..9b6ab54ae6 100644 --- a/src/DataExchange/TKDESTEP/StepRepr/StepRepr_ParallelOffset.hxx +++ b/src/DataExchange/TKDESTEP/StepRepr/StepRepr_ParallelOffset.hxx @@ -21,7 +21,6 @@ #include #include -class StepBasic_MeasureWithUnit; class TCollection_HAsciiString; class StepRepr_ProductDefinitionShape; @@ -40,17 +39,17 @@ public: const Handle(TCollection_HAsciiString)& theDescription, const Handle(StepRepr_ProductDefinitionShape)& theOfShape, const StepData_Logical theProductDefinitional, - const Handle(StepBasic_MeasureWithUnit)& theOffset); + const Handle(Standard_Transient)& theOffset); //! Returns field Offset - inline Handle(StepBasic_MeasureWithUnit) Offset() const { return offset; } + inline Handle(Standard_Transient) Offset() const { return offset; } //! Set field Offset - inline void SetOffset(const Handle(StepBasic_MeasureWithUnit)& theOffset) { offset = theOffset; } + inline void SetOffset(const Handle(Standard_Transient)& theOffset) { offset = theOffset; } DEFINE_STANDARD_RTTIEXT(StepRepr_ParallelOffset, StepRepr_DerivedShapeAspect) private: - Handle(StepBasic_MeasureWithUnit) offset; + Handle(Standard_Transient) offset; }; #endif // _StepRepr_ParallelOffset_HeaderFile diff --git a/src/DataExchange/TKDESTEP/StepRepr/StepRepr_QuantifiedAssemblyComponentUsage.cxx b/src/DataExchange/TKDESTEP/StepRepr/StepRepr_QuantifiedAssemblyComponentUsage.cxx index 5a63df15f3..b06102a9ea 100644 --- a/src/DataExchange/TKDESTEP/StepRepr/StepRepr_QuantifiedAssemblyComponentUsage.cxx +++ b/src/DataExchange/TKDESTEP/StepRepr/StepRepr_QuantifiedAssemblyComponentUsage.cxx @@ -37,10 +37,10 @@ void StepRepr_QuantifiedAssemblyComponentUsage::Init( const Handle(StepBasic_ProductDefinition)& aProductDefinitionRelationship_RelatingProductDefinition, const Handle(StepBasic_ProductDefinition)& - aProductDefinitionRelationship_RelatedProductDefinition, - const Standard_Boolean hasAssemblyComponentUsage_ReferenceDesignator, - const Handle(TCollection_HAsciiString)& aAssemblyComponentUsage_ReferenceDesignator, - const Handle(StepBasic_MeasureWithUnit)& aQuantity) + aProductDefinitionRelationship_RelatedProductDefinition, + const Standard_Boolean hasAssemblyComponentUsage_ReferenceDesignator, + const Handle(TCollection_HAsciiString)& aAssemblyComponentUsage_ReferenceDesignator, + const Handle(Standard_Transient)& aQuantity) { StepRepr_AssemblyComponentUsage::Init(aProductDefinitionRelationship_Id, aProductDefinitionRelationship_Name, @@ -64,10 +64,10 @@ void StepRepr_QuantifiedAssemblyComponentUsage::Init( const StepBasic_ProductDefinitionOrReference& aProductDefinitionRelationship_RelatingProductDefinition, const StepBasic_ProductDefinitionOrReference& - aProductDefinitionRelationship_RelatedProductDefinition, - const Standard_Boolean hasAssemblyComponentUsage_ReferenceDesignator, - const Handle(TCollection_HAsciiString)& aAssemblyComponentUsage_ReferenceDesignator, - const Handle(StepBasic_MeasureWithUnit)& aQuantity) + aProductDefinitionRelationship_RelatedProductDefinition, + const Standard_Boolean hasAssemblyComponentUsage_ReferenceDesignator, + const Handle(TCollection_HAsciiString)& aAssemblyComponentUsage_ReferenceDesignator, + const Handle(Standard_Transient)& aQuantity) { StepRepr_AssemblyComponentUsage::Init(aProductDefinitionRelationship_Id, aProductDefinitionRelationship_Name, @@ -83,7 +83,7 @@ void StepRepr_QuantifiedAssemblyComponentUsage::Init( //================================================================================================= -Handle(StepBasic_MeasureWithUnit) StepRepr_QuantifiedAssemblyComponentUsage::Quantity() const +Handle(Standard_Transient) StepRepr_QuantifiedAssemblyComponentUsage::Quantity() const { return theQuantity; } @@ -91,7 +91,7 @@ Handle(StepBasic_MeasureWithUnit) StepRepr_QuantifiedAssemblyComponentUsage::Qua //================================================================================================= void StepRepr_QuantifiedAssemblyComponentUsage::SetQuantity( - const Handle(StepBasic_MeasureWithUnit)& aQuantity) + const Handle(Standard_Transient)& aQuantity) { theQuantity = aQuantity; } diff --git a/src/DataExchange/TKDESTEP/StepRepr/StepRepr_QuantifiedAssemblyComponentUsage.hxx b/src/DataExchange/TKDESTEP/StepRepr/StepRepr_QuantifiedAssemblyComponentUsage.hxx index 57488f8f5b..3fed617d27 100644 --- a/src/DataExchange/TKDESTEP/StepRepr/StepRepr_QuantifiedAssemblyComponentUsage.hxx +++ b/src/DataExchange/TKDESTEP/StepRepr/StepRepr_QuantifiedAssemblyComponentUsage.hxx @@ -20,7 +20,6 @@ #include #include -class StepBasic_MeasureWithUnit; class TCollection_HAsciiString; class StepBasic_ProductDefinition; @@ -47,7 +46,7 @@ public: aProductDefinitionRelationship_RelatedProductDefinition, const Standard_Boolean hasAssemblyComponentUsage_ReferenceDesignator, const Handle(TCollection_HAsciiString)& aAssemblyComponentUsage_ReferenceDesignator, - const Handle(StepBasic_MeasureWithUnit)& aQuantity); + const Handle(Standard_Transient)& aQuantity); //! Initialize all fields (own and inherited) Standard_EXPORT void Init( @@ -61,20 +60,20 @@ public: aProductDefinitionRelationship_RelatedProductDefinition, const Standard_Boolean hasAssemblyComponentUsage_ReferenceDesignator, const Handle(TCollection_HAsciiString)& aAssemblyComponentUsage_ReferenceDesignator, - const Handle(StepBasic_MeasureWithUnit)& aQuantity); + const Handle(Standard_Transient)& aQuantity); //! Returns field Quantity - Standard_EXPORT Handle(StepBasic_MeasureWithUnit) Quantity() const; + Standard_EXPORT Handle(Standard_Transient) Quantity() const; //! Set field Quantity - Standard_EXPORT void SetQuantity(const Handle(StepBasic_MeasureWithUnit)& Quantity); + Standard_EXPORT void SetQuantity(const Handle(Standard_Transient)& Quantity); DEFINE_STANDARD_RTTIEXT(StepRepr_QuantifiedAssemblyComponentUsage, StepRepr_AssemblyComponentUsage) protected: private: - Handle(StepBasic_MeasureWithUnit) theQuantity; + Handle(Standard_Transient) theQuantity; }; #endif // _StepRepr_QuantifiedAssemblyComponentUsage_HeaderFile diff --git a/src/DataExchange/TKDESTEP/StepShape/StepShape_MeasureQualification.cxx b/src/DataExchange/TKDESTEP/StepShape/StepShape_MeasureQualification.cxx index c37cd1269e..b3d5eced89 100644 --- a/src/DataExchange/TKDESTEP/StepShape/StepShape_MeasureQualification.cxx +++ b/src/DataExchange/TKDESTEP/StepShape/StepShape_MeasureQualification.cxx @@ -23,7 +23,7 @@ StepShape_MeasureQualification::StepShape_MeasureQualification() {} void StepShape_MeasureQualification::Init( const Handle(TCollection_HAsciiString)& name, const Handle(TCollection_HAsciiString)& description, - const Handle(StepBasic_MeasureWithUnit)& qualified_measure, + const Handle(Standard_Transient)& qualified_measure, const Handle(StepShape_HArray1OfValueQualifier)& qualifiers) { theName = name; @@ -53,13 +53,13 @@ void StepShape_MeasureQualification::SetDescription( theDescription = description; } -Handle(StepBasic_MeasureWithUnit) StepShape_MeasureQualification::QualifiedMeasure() const +Handle(Standard_Transient) StepShape_MeasureQualification::QualifiedMeasure() const { return theQualifiedMeasure; } void StepShape_MeasureQualification::SetQualifiedMeasure( - const Handle(StepBasic_MeasureWithUnit)& qualified_measure) + const Handle(Standard_Transient)& qualified_measure) { theQualifiedMeasure = qualified_measure; } diff --git a/src/DataExchange/TKDESTEP/StepShape/StepShape_MeasureQualification.hxx b/src/DataExchange/TKDESTEP/StepShape/StepShape_MeasureQualification.hxx index 7ee791ba13..a6059dd9b2 100644 --- a/src/DataExchange/TKDESTEP/StepShape/StepShape_MeasureQualification.hxx +++ b/src/DataExchange/TKDESTEP/StepShape/StepShape_MeasureQualification.hxx @@ -23,7 +23,6 @@ #include #include class TCollection_HAsciiString; -class StepBasic_MeasureWithUnit; class StepShape_ValueQualifier; class StepShape_MeasureQualification; @@ -38,7 +37,7 @@ public: Standard_EXPORT void Init(const Handle(TCollection_HAsciiString)& name, const Handle(TCollection_HAsciiString)& description, - const Handle(StepBasic_MeasureWithUnit)& qualified_measure, + const Handle(Standard_Transient)& qualified_measure, const Handle(StepShape_HArray1OfValueQualifier)& qualifiers); Standard_EXPORT Handle(TCollection_HAsciiString) Name() const; @@ -49,10 +48,9 @@ public: Standard_EXPORT void SetDescription(const Handle(TCollection_HAsciiString)& description); - Standard_EXPORT Handle(StepBasic_MeasureWithUnit) QualifiedMeasure() const; + Standard_EXPORT Handle(Standard_Transient) QualifiedMeasure() const; - Standard_EXPORT void SetQualifiedMeasure( - const Handle(StepBasic_MeasureWithUnit)& qualified_measure); + Standard_EXPORT void SetQualifiedMeasure(const Handle(Standard_Transient)& qualified_measure); Standard_EXPORT Handle(StepShape_HArray1OfValueQualifier) Qualifiers() const; @@ -71,7 +69,7 @@ protected: private: Handle(TCollection_HAsciiString) theName; Handle(TCollection_HAsciiString) theDescription; - Handle(StepBasic_MeasureWithUnit) theQualifiedMeasure; + Handle(Standard_Transient) theQualifiedMeasure; Handle(StepShape_HArray1OfValueQualifier) theQualifiers; }; diff --git a/src/DataExchange/TKDESTEP/StepToGeom/StepToGeom.cxx b/src/DataExchange/TKDESTEP/StepToGeom/StepToGeom.cxx index 9c4a9201f1..132d82aa1b 100644 --- a/src/DataExchange/TKDESTEP/StepToGeom/StepToGeom.cxx +++ b/src/DataExchange/TKDESTEP/StepToGeom/StepToGeom.cxx @@ -132,6 +132,7 @@ #include #include #include +#include #include //============================================================================= @@ -2558,8 +2559,20 @@ Handle(TColStd_HArray1OfReal) StepToGeom::MakeYprRotation( { Handle(StepBasic_ConversionBasedUnitAndPlaneAngleUnit) aConverUnit = Handle(StepBasic_ConversionBasedUnitAndPlaneAngleUnit)::DownCast(aPau); - anAngle = anAngle * aConverUnit->ConversionFactor()->ValueComponent(); - aPau = aConverUnit->ConversionFactor()->UnitComponent().NamedUnit(); + Handle(StepBasic_MeasureWithUnit) aConversionFactor; + Handle(Standard_Transient) aTransientFactor = aConverUnit->ConversionFactor(); + if (aTransientFactor->IsKind(STANDARD_TYPE(StepBasic_MeasureWithUnit))) + { + aConversionFactor = Handle(StepBasic_MeasureWithUnit)::DownCast(aTransientFactor); + } + else if (aTransientFactor->IsKind(STANDARD_TYPE(StepRepr_ReprItemAndMeasureWithUnit))) + { + Handle(StepRepr_ReprItemAndMeasureWithUnit) aReprMeasureItem = + Handle(StepRepr_ReprItemAndMeasureWithUnit)::DownCast(aTransientFactor); + aConversionFactor = aReprMeasureItem->GetMeasureWithUnit(); + } + anAngle = anAngle * aConversionFactor->ValueComponent(); + aPau = aConversionFactor->UnitComponent().NamedUnit(); } if (aPau.IsNull()) { diff --git a/tests/bugs/step/bug_gh384 b/tests/bugs/step/bug_gh384 new file mode 100644 index 0000000000..a4c56a43b0 --- /dev/null +++ b/tests/bugs/step/bug_gh384 @@ -0,0 +1,34 @@ +puts "====================================" +puts "For some STEP files we fail for geometric tolerances to read the geometric_tolerance.magnitude" +puts "====================================" +pload OCAF + +Close D -silent + +ReadStep D [locate_data_file bug_gh384.stp] + +proc checkEqual {theActualValue theExpectedValue {theTolerance 1.0e-7}} { + # Calculate absolute difference + set aDifference [expr abs($theActualValue - $theExpectedValue)] + + # Check if difference is within tolerance + set isEqual [expr {$aDifference <= $theTolerance}] + + if {!$isEqual} { + puts "Error: Tolerance data is not correct" + puts "Expected: $theExpectedValue, actual: $anActualValue" + } +} + +set aTolerance0 [XGetToleranceValue D "0:1:4:1"] +checkEqual $aTolerance0 0.75 + +set aTolerance1 [XGetToleranceValue D "0:1:4:5"] +checkEqual $aTolerance1 0.75 + +set aTolerance2 [XGetToleranceValue D "0:1:4:11"] +checkEqual $aTolerance2 1.25 + +set aTolerance3 [XGetToleranceValue D "0:1:4:15"] +checkEqual $aTolerance3 0.5 + -- 2.39.5