]> OCCT Git - occt.git/commit
0031382: Data Exchange - BinXCAF should preserve length unit information IR-2021-08-20
authordpasukhi <dpasukhi@opencascade.com>
Tue, 10 Nov 2020 04:52:30 +0000 (07:52 +0300)
committerbugmaster <bugmaster@opencascade.com>
Fri, 20 Aug 2021 17:30:11 +0000 (20:30 +0300)
commitda80ff68f1e9853c1015a5dbb6199541e92789ce
tree9ea1ad98dbe1e667a928ffe19340eae2186d4646
parent9592ae247b4473b3084f9e3386a971028a6c0940
0031382: Data Exchange - BinXCAF should preserve length unit information

Possibility for adding LengthUnit info to XCAF document using special class XCAFDoc_LenghtUnit and XCAFDoc_LenghtUnitTool is implemented.
Package UnitsMethods is split: geom methods were placed to new file GeomConvert_Units which is in the toolkit TKXSBase, internal step scale factors was placed to StepData.
Updated UnitMethods to convert scale factor to different unit types.
Now, XSAlgo::XSAlgo_AlgoContainer is used to update unit info from static interface values.
New Draw command "XSetLengthUnit" and "XGetLengthUnit" for set or get XDE attribute.
Upgraded tests for STEP, IGES, OBJ, glTF, VRML formats to check area regressing with used unit.
Upgraded tests\de test cases to use any units in the "loop back" algorithms.
106 files changed:
src/AIS/AIS_Plane.cxx
src/BinMXCAFDoc/BinMXCAFDoc.cxx
src/BinMXCAFDoc/BinMXCAFDoc.hxx
src/BinMXCAFDoc/BinMXCAFDoc_LengthUnitDriver.cxx [new file with mode: 0644]
src/BinMXCAFDoc/BinMXCAFDoc_LengthUnitDriver.hxx [new file with mode: 0644]
src/BinMXCAFDoc/FILES
src/GeomConvert/FILES
src/GeomConvert/GeomConvert_Units.cxx [new file with mode: 0644]
src/GeomConvert/GeomConvert_Units.hxx [new file with mode: 0644]
src/GeomToStep/GeomToStep_MakeCartesianPoint.cxx
src/GeomToStep/GeomToStep_MakeCircle.cxx
src/GeomToStep/GeomToStep_MakeCircle_gen.pxx
src/GeomToStep/GeomToStep_MakeConicalSurface.cxx
src/GeomToStep/GeomToStep_MakeCylindricalSurface.cxx
src/GeomToStep/GeomToStep_MakeEllipse.cxx
src/GeomToStep/GeomToStep_MakeEllipse_gen.pxx
src/GeomToStep/GeomToStep_MakeHyperbola.cxx
src/GeomToStep/GeomToStep_MakeParabola.cxx
src/GeomToStep/GeomToStep_MakeRectangularTrimmedSurface.cxx
src/GeomToStep/GeomToStep_MakeSphericalSurface.cxx
src/GeomToStep/GeomToStep_MakeSurface.cxx
src/GeomToStep/GeomToStep_MakeToroidalSurface.cxx
src/GeomToStep/GeomToStep_MakeVector.cxx
src/IGESCAFControl/IGESCAFControl_Reader.cxx
src/IGESCAFControl/IGESCAFControl_Writer.cxx
src/IGESCAFControl/IGESCAFControl_Writer.hxx
src/IGESData/IGESData_BasicEditor.cxx
src/IGESData/IGESData_GlobalSection.cxx
src/IGESData/IGESData_GlobalSection.hxx
src/IGESData/IGESData_IGESModel.cxx
src/IGESData/IGESData_IGESModel.hxx
src/PrsDim/PrsDim_AngleDimension.cxx
src/PrsDim/PrsDim_Dimension.cxx
src/RWGltf/RWGltf_CafWriter.cxx
src/RWMesh/RWMesh_CafReader.cxx
src/RWMesh/RWMesh_CafReader.hxx
src/RWObj/RWObj_CafWriter.cxx
src/STEPCAFControl/STEPCAFControl_Reader.cxx
src/STEPCAFControl/STEPCAFControl_Reader.hxx
src/STEPCAFControl/STEPCAFControl_Writer.cxx
src/STEPCAFControl/STEPCAFControl_Writer.hxx
src/STEPConstruct/STEPConstruct_UnitContext.cxx
src/STEPControl/STEPControl_ActorRead.cxx
src/STEPControl/STEPControl_ActorWrite.cxx
src/STEPControl/STEPControl_Reader.cxx
src/STEPControl/STEPControl_Reader.hxx
src/STEPControl/STEPControl_Writer.cxx
src/ShapeAnalysis/ShapeAnalysis_Edge.cxx
src/StepData/FILES
src/StepData/StepData_GlobalFactors.cxx [new file with mode: 0644]
src/StepData/StepData_GlobalFactors.hxx [new file with mode: 0644]
src/StepData/StepData_StepModel.cxx
src/StepData/StepData_StepModel.hxx
src/StepFile/StepFile_ReadData.cxx
src/StepToGeom/StepToGeom.cxx
src/StepToTopoDS/StepToTopoDS_TranslateEdge.cxx
src/TKXSBase/PACKAGES
src/TKernel/PACKAGES
src/TopoDSToStep/TopoDSToStep_MakeStepFace.cxx
src/UnitsMethods/FILES
src/UnitsMethods/UnitsMethods.cxx
src/UnitsMethods/UnitsMethods.hxx
src/UnitsMethods/UnitsMethods_LengthUnit.hxx [new file with mode: 0644]
src/XCAFDoc/FILES
src/XCAFDoc/GUID.txt
src/XCAFDoc/XCAFDoc.cxx
src/XCAFDoc/XCAFDoc_DocumentTool.cxx
src/XCAFDoc/XCAFDoc_DocumentTool.hxx
src/XCAFDoc/XCAFDoc_LengthUnit.cxx [new file with mode: 0644]
src/XCAFDoc/XCAFDoc_LengthUnit.hxx [new file with mode: 0644]
src/XDEDRAW/XDEDRAW.cxx
src/XDEDRAW/XDEDRAW_Common.cxx
src/XDEDRAW/XDEDRAW_Shapes.cxx
src/XSAlgo/XSAlgo_AlgoContainer.cxx
src/XSDRAWSTEP/XSDRAWSTEP.cxx
src/XSDRAWSTLVRML/XSDRAWSTLVRML.cxx
src/XmlMXCAFDoc/FILES
src/XmlMXCAFDoc/XmlMXCAFDoc.cxx
src/XmlMXCAFDoc/XmlMXCAFDoc.hxx
src/XmlMXCAFDoc/XmlMXCAFDoc_LengthUnitDriver.cxx [new file with mode: 0644]
src/XmlMXCAFDoc/XmlMXCAFDoc_LengthUnitDriver.hxx [new file with mode: 0644]
tests/bugs/xde/bug22962
tests/bugs/xde/bug31382 [new file with mode: 0644]
tests/de/begin
tests/de/end
tests/de/iges_1/A2
tests/de/iges_1/B4
tests/de/iges_1/M9
tests/de/iges_2/H1
tests/de/step_1/E4
tests/de/step_1/J5
tests/de/step_1/O7
tests/de/step_2/A3
tests/de/step_2/M3
tests/de/step_2/Q2
tests/de/step_2/X1
tests/de/step_3/A5
tests/de/step_3/F2
tests/de/step_4/A5
tests/de/step_4/C9
tests/de/step_4/E3
tests/de/step_4/G6
tests/de/step_5/B2
tests/de_mesh/gltf_write/helmet
tests/de_mesh/obj_read/ship_boat
tests/de_mesh/obj_write/mustang