1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-01 17:36:21 +03:00

Data Exchange - DE Wrapper invalidating parameters after 'Load' (#393)

Fix configuration loading to correctly use FileCS parameter
Add stability test for configuration changes
Update documentation's de wrapping names
This commit is contained in:
Pasukhin Dmitry 2025-02-27 12:38:43 +01:00 committed by GitHub
parent aa630b33b7
commit 79198f7297
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 26 additions and 13 deletions

View File

@ -24,15 +24,15 @@ This guide principally deals with the following OCCT classes:
| CAD format | Extensions | RW support | Thread Safety | Presentation | Package |
| :--------- | :--------- | :--------- | :----------- | :----------- | :------ |
| STEP | .stp, .step .stepz | RW | No | BRep, Mesh | STEPCAFControl |
| XCAF | .xbf | RW | Yes | BRep, Mesh | DEXCAFCascade |
| BREP | .brep | RW | Yes | BRep, Mesh | DEBRepCascade |
| IGES | .igs, .iges | RW | No | BRep | IGESCAFControl |
| OBJ | .obj | RW | Yes | Mesh | RWObj |
| STL | .stl | RW | Yes | Mesh | RWStl |
| PLY | .ply | W | Yes | Mesh | RWPly |
| GLTF | .glTF .glb | RW | Yes | Mesh | RWGltf |
| VRML | .wrl .vrml | RW | Yes | Mesh | Vrml |
| STEP | .stp, .step .stepz | RW | No | BRep, Mesh | DESTEP |
| XCAF | .xbf | RW | Yes | BRep, Mesh | DEXCAF |
| BREP | .brep | RW | Yes | BRep, Mesh | DEBREP |
| IGES | .igs, .iges | RW | No | BRep | DEIGES |
| OBJ | .obj | RW | Yes | Mesh | DEOBJ |
| STL | .stl | RW | Yes | Mesh | DESTL |
| PLY | .ply | W | Yes | Mesh | DEPLY |
| GLTF | .glTF .glb | RW | Yes | Mesh | DEGLTF |
| VRML | .wrl .vrml | RW | Yes | Mesh | DEVRML |
**Note** :
* The format names in the first column match the FormatName values used for configuration nodes.
@ -41,7 +41,7 @@ This guide principally deals with the following OCCT classes:
@section occt_de_wrapper_3 DE Session Configuration
Any providers can have their own read/write parameters. The transfer process is set up using DE configuration nodes, which hold all relevant parameters. There are two ways to change the parameter values: directly from code or by an external resource file/string.
The session is a global or static DE_Wrapper object that stores registered DE configuration nodes and wraps DE commands to work with them. It has some configuration parameters of its own and also keeps track of loaded nodes and specilal global parameters.
The session is a global or static DE_Wrapper object that stores registered DE configuration nodes and wraps DE commands to work with them. It has some configuration parameters of its own and also keeps track of loaded nodes and special global parameters.
@subsection occt_de_wrapper_3_1 Getting a DE session. Code sample

View File

@ -62,7 +62,7 @@ bool DEGLTF_ConfigurationNode::Load(const Handle(DE_ConfigurationContext)& theRe
% 2);
InternalParameters.FileCS =
(RWMesh_CoordinateSystem)(theResource->IntegerVal("file.cs",
(int)InternalParameters.SystemCS,
(int)InternalParameters.FileCS,
aScope)
% 2);

View File

@ -61,7 +61,7 @@ bool DEOBJ_ConfigurationNode::Load(const Handle(DE_ConfigurationContext)& theRes
% 2);
InternalParameters.FileCS =
(RWMesh_CoordinateSystem)(theResource->IntegerVal("file.cs",
(int)InternalParameters.SystemCS,
(int)InternalParameters.FileCS,
aScope)
% 2);

View File

@ -62,7 +62,7 @@ bool DEPLY_ConfigurationNode::Load(const Handle(DE_ConfigurationContext)& theRes
% 2);
InternalParameters.FileCS =
(RWMesh_CoordinateSystem)(theResource->IntegerVal("file.cs",
(int)InternalParameters.SystemCS,
(int)InternalParameters.FileCS,
aScope)
% 2);

View File

@ -0,0 +1,13 @@
puts "============"
puts "0032821: DEWrapper - Implementation of a common toolkit for importing and exporting CAD files"
puts "============"
puts ""
# Checking the stability of ability to change the configuration's values
set old_conf [DumpConfiguration]
LoadConfiguration ""
set new_conf [DumpConfiguration]
CompareConfiguration ${old_conf} ${new_conf}