mirror of
https://github.com/Open-Cascade-SAS/OCCT.git
synced 2026-06-13 19:04:10 +08:00
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.
This commit is contained in:
@@ -92,6 +92,12 @@ public:
|
||||
const Standard_CString multi = 0,
|
||||
const Message_ProgressRange& theProgress = Message_ProgressRange());
|
||||
|
||||
//! Mehod to writing sequence of root assemblies or part of the file specified by use by one label
|
||||
Standard_EXPORT Standard_Boolean Transfer (const TDF_LabelSequence& L,
|
||||
const STEPControl_StepModelType mode = STEPControl_AsIs,
|
||||
const Standard_CString multi = 0,
|
||||
const Message_ProgressRange& theProgress = Message_ProgressRange());
|
||||
|
||||
Standard_EXPORT Standard_Boolean Perform (const Handle(TDocStd_Document)& doc,
|
||||
const TCollection_AsciiString& filename,
|
||||
const Message_ProgressRange& theProgress = Message_ProgressRange());
|
||||
@@ -155,15 +161,7 @@ public:
|
||||
|
||||
Standard_EXPORT Standard_Boolean GetMaterialMode() const;
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
//! Mehod to writing sequence of root assemblies or part of the file specified by use by one label
|
||||
Standard_EXPORT Standard_Boolean Transfer (const TDF_LabelSequence& L,
|
||||
const STEPControl_StepModelType mode = STEPControl_AsIs,
|
||||
const Standard_CString multi = 0,
|
||||
const Message_ProgressRange& theProgress = Message_ProgressRange());
|
||||
|
||||
//! Transfers labels to a STEP model
|
||||
//! Returns True if translation is OK
|
||||
@@ -215,9 +213,14 @@ protected:
|
||||
//! Write SHUO assigned to specified component, to STEP model
|
||||
Standard_EXPORT Standard_Boolean WriteSHUOs (const Handle(XSControl_WorkSession)& WS, const TDF_LabelSequence& labels);
|
||||
|
||||
|
||||
//! Finds length units located in root of label
|
||||
//! If it exists, initializes local length unit from it
|
||||
//! Else initializes according to Cascade length unit
|
||||
Standard_EXPORT void prepareUnit(const TDF_Label& theLabel,
|
||||
const Handle(StepData_StepModel)& theModel);
|
||||
|
||||
private:
|
||||
|
||||
Standard_EXPORT Handle(StepRepr_ShapeAspect) WriteShapeAspect(const Handle(XSControl_WorkSession) &WS,
|
||||
const TDF_Label theLabel, const TopoDS_Shape theShape, Handle(StepRepr_RepresentationContext)& theRC,
|
||||
Handle(StepAP242_GeometricItemSpecificUsage)& theGISU);
|
||||
@@ -236,6 +239,7 @@ private:
|
||||
const TDF_Label theGeomTolL, const Handle(StepDimTol_HArray1OfDatumSystemOrReference)& theDatumSystem,
|
||||
const Handle(StepRepr_RepresentationContext)& theRC);
|
||||
|
||||
private:
|
||||
|
||||
|
||||
STEPControl_Writer myWriter;
|
||||
|
||||
Reference in New Issue
Block a user