Data Exchange, Step Export - Apply a scaling transformation#513
Data Exchange, Step Export - Apply a scaling transformation#513dpasukhi merged 1 commit intoOpen-Cascade-SAS:IRfrom
Conversation
| }; | ||
|
|
||
| #endif // _DESTEP_Parameters_HeaderFile | ||
| #endif // _DEIGES_Parameters_HeaderFile |
There was a problem hiding this comment.
Could you please check what it is here?
There was a problem hiding this comment.
somebody's copy-paste mistake, which I fixed. I occasionally found it while searching for all the places where it is needed to make updates in creating a new parameter.
… OCP-1949 Add possibility to export scaling factor into the STEP file as a cartesian_transformation_operator_3d. Add flag for turning on/off (on by default) this behavior.
There was a problem hiding this comment.
Pull Request Overview
This PR introduces an option to export the scaling factor in the STEP file by writing it as a cartesian_transformation_operator_3d. Key changes include:
- Adding a scaling factor check and export in the geometry transformation code.
- Updating parameter and configuration interfaces (DESTEP) to support a new flag (WriteScalingTrsf).
- Introducing a new GeomToStep_MakeCartesianTransformationOperator class to create the transformation operator when scaling is active.
Reviewed Changes
Copilot reviewed 10 out of 15 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/DataExchange/TKDESTEP/StepToGeom/StepToGeom.cxx | Adds conditional setting of scale factor in the transformation function. |
| src/DataExchange/TKDESTEP/STEPControl/STEPControl_ActorWrite.hxx & .cxx | Updates parameter types and warning messages to accommodate the scaling factor option. |
| src/DataExchange/TKDESTEP/STEPConstruct/STEPConstruct_Assembly.hxx & .cxx | Adds an overloaded Init() to support cartesian transformation operator initialization. |
| src/DataExchange/TKDESTEP/GeomToStep/GeomToStep_MakeCartesianTransformationOperator.* | Implements the new operator creation for handling transformations with scaling. |
| src/DataExchange/TKDESTEP/DESTEP/DESTEP_Parameters.hxx & DESTEP_ConfigurationNode.cxx | Introduces the new configuration flag to enable/disable scaling transformation export. |
| src/DataExchange/TKDEIGES/DEIGES/DEIGES_Parameters.hxx | Fixes an include guard comment to reflect the correct module name. |
Files not reviewed (5)
- src/DataExchange/TKDESTEP/GeomToStep/FILES.cmake: Language not supported
- tests/bugs/step/bug_ocp1949: Language not supported
- tests/bugs/xde/bug27142: Language not supported
- tests/de_wrapper/configuration/A3: Language not supported
- tests/de_wrapper/configuration/A4: Language not supported
Comments suppressed due to low confidence (1)
src/DataExchange/TKDESTEP/STEPControl/STEPControl_ActorWrite.cxx:1790
- [nitpick] The conditional logic for selecting between an axis2placement3d and a cartesian transformation based on the scale factor could be clarified or refactored for better readability.
if (Abs(aLoc.ScaleFactor() - 1.0) > Precision::Confusion())
|
|
||
| const gp_Ax3 result(Pgp, D3, D1); | ||
| CT.SetTransformation(result); | ||
| if (SCTO->HasScale()) |
There was a problem hiding this comment.
Consider verifying that SCTO is non-null before calling HasScale(), unless its validity is guaranteed elsewhere.
| if (SCTO->HasScale()) | |
| if (!SCTO.IsNull() && SCTO->HasScale()) |
Adding a scaling factor check and export in the geometry transformation code.
Updating parameter and configuration interfaces (DESTEP) to support a new flag (WriteScalingTrsf).
Introducing a new GeomToStep_MakeCartesianTransformationOperator class to create the transformation operator when scaling is active.
Add option (enabled by default) to export scaling factor to the STEP file as cartesian_transformation_operator_3d.
The issue came from OCP-1949; see there for more information and examples