]> OCCT Git - occt.git/commitdiff
Data Exchange - DE Wrapper invalidating parameters after 'Load' (#393)
authorPasukhin Dmitry <dpasukhi@opencascade.com>
Thu, 27 Feb 2025 11:38:43 +0000 (12:38 +0100)
committerGitHub <noreply@github.com>
Thu, 27 Feb 2025 11:38:43 +0000 (11:38 +0000)
Fix configuration loading to correctly use FileCS parameter
Add stability test for configuration changes
Update documentation's de wrapping names

dox/user_guides/de_wrapper/de_wrapper.md
src/DEGLTF/DEGLTF_ConfigurationNode.cxx
src/DEOBJ/DEOBJ_ConfigurationNode.cxx
src/DEPLY/DEPLY_ConfigurationNode.cxx
tests/de_wrapper/configuration/A5 [new file with mode: 0644]

index e40b43bde0b2754418bdbf60349f349bb72b6f46..09e0b70901b3a189f4118af63a5b9c6155c3454f 100644 (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
 
index f20cb4ceef07a695f5e1f131ae832209668a42a3..cee90ef70962f9f7cb06be7e6bedafa396bfdb77 100644 (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);
 
index 3f7cb7dbf5455faf14b498062756e565613971a3..826b1508482d3fbf77b341e2ff0babea31a0feee 100644 (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);
 
index 0c48f2f4d4e23dadc5a0cde2b3f40634692f0c57..fa47112c8fc6b5de5fdcca3ba1dfdd054abb97ee 100644 (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);
 
diff --git a/tests/de_wrapper/configuration/A5 b/tests/de_wrapper/configuration/A5
new file mode 100644 (file)
index 0000000..e462102
--- /dev/null
@@ -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}