DiscussionsIssue archiveOCCT:Data Exchange

Archived issue #0030024

Data Exchange - STEP export support of BRep shapes based on tessellated geometry

CommunityOCCT:Data Exchangeverified46 public notes

Search issues

Description

occt7.3.0 now support tessellated geometry shape visualization, such as:
readstl s test.stl triangulation
vdisplay s

But when save the tessellated shape to STEP or IGES, such as:
stepwrite 0 s test.step

The saved STEP file have no geometry data.

Public activity

46 archived notes

Participants are labeled by their role within this record.

01Author
I upload the Recommended Practices for 3D Tessellated Geometry for STEP,
the document can be downloaded from here:
https://www.cax-if.org/documents/Attachment 1 (PDF)
02Commenter 2
Implementation of this functionality is not expected in the current version of the Open CASCADE. If you have an urgent need contact us via contact form:
https://www.opencascade.com/contact
03Author
Hello gka,

I do not have an urgent need for this functionality.

For the BRep shapes based on tessellated geometry, there are now serveral modeling alogirhtms support them, and can be displayed by the visualization module.

For data exchange module, it supports the BREP, STL tessellated shapes. Implementation other file format to exchange tessellated shapes data I think it is important functionality.

[signature removed]
04Commenter 4
Branch [archived branch] has been created by Commenter 1.

[revision removed]


Detailed log of new commits:

Author: Sergey NIKONOV
Date: Mon Apr 4 18:08:34 2022 +0300

    0030024: Data Exchange - STEP, IGES export support of BRep shapes based on tessellated geometry
05Commenter 4
Branch [archived branch] has been updated forcibly by Commenter 1.

[revision removed]
06Commenter 4
Branch [archived branch] has been updated forcibly by Commenter 1.

[revision removed]
07Commenter 4
Branch [archived branch] has been updated forcibly by Commenter 1.

[revision removed]
08Commenter 4
Branch [archived branch] has been updated forcibly by Commenter 1.

[revision removed]
09Commenter 4
Branch [archived branch] has been updated forcibly by Commenter 1.

[revision removed]
10Commenter 4
Branch [archived branch] has been updated forcibly by Commenter 1.

[revision removed]
11Commenter 11
Sergey, Michail,

I've collected some formartting issues. See attached file.
Attachment 2 (TXT) (13,394 bytes)   
12Commenter 12
Sergey, Michail,

I have some questions to the code. See attached file.
Attachment 3 (TXT) (900 bytes)   
13Commenter 13
dox/user_guides/step/step.md
1159: only three columns are defined in this row, but table has 4 columns.

src/StepToTopoDS/StepToTopoDS_TranslateSolid.cxx
src/StepToTopoDS/StepToTopoDS_TranslateSolid.hxx
src/StepToTopoDS/StepToTopoDS_TranslateSolidError.hxx
Copy-paste errors in the file headers of new files: author, copyright, comment "gka 09.04.99".

src/StepVisual/StepVisual_TessellatedVertex.cxx
myPointIndex is not initialized in ctor.

src/TopoDSToStep/TopoDSToStep_MakeTessellatedItem.cxx
src/TopoDSToStep/TopoDSToStep_MakeTessellatedItem.hxx
Correct copyright year of new files.

src/TKSTEPBase/PACKAGES
Revert this change, as the added packages belong to another toolkit TKSTEPAttr.

tests/de_mesh/step_read/end
tests/de_mesh/step_write/end
Why such many images are generated? It is not a visualization test. I think it is enough only one.

Make the patch in occt-products to make working java and csharp samples. It is needed to wrap new classes in interface files in the folder occt-products\samples\swig.
14Commenter 4
Branch [archived branch] has been updated forcibly by Commenter 1.

[revision removed]
15Commenter 4
Branch [archived branch] has been updated forcibly by Commenter 1.

[revision removed]
16Commenter 16
src/STEPControl/STEPControl_ActorWrite.cxx
Please correct indentation taking into account that tab size=8.

src/TKSTEPBase/PACKAGES
\ No newline at end of file

Please insert newline.
17Commenter 17
File: STEPControl_ActorWrite.cxx
Lines: 922-1177
Problem: need to replace tabs with spaces

Files: StepToTopoDS_TranslateSolid.hxx,
       StepToTopoDS_TranslateSolid.cxx,
       StepToTopoDS_TranslateSolidError.hxx,
       TopoDSToStep_MakeTessellatedItem.cxx,
       TopoDSToStep_MakeTessellatedItem.hxx
Problem: For newly created files must be one line about copyright, like in Graphic3d_Texture3D.cxx

Autogenerated files:
Problem: The year of the beginning of the copyright: 2021 -> 2022
18Commenter 4
Branch [archived branch] has been updated forcibly by Commenter 1.

[revision removed]
19Commenter 4
Branch [archived branch] has been created by Participant.

[revision removed]


Detailed log of new commits:

Author: Sergey NIKONOV
Date: Mon Apr 4 18:08:34 2022 +0300

    0030024: Data Exchange - STEP, IGES export support of BRep shapes based on tessellated geometry
    
    Support of reading and writing tessellated geometry is added for the following STEP entities:
    - triangulated face
    - tessellated shell
    - tessellated solid
    - tessellated shape representation
    
    Models without BRep geometry (mesh formats like STL, OBJ and so on) are supported for writing to STEP.
    
    New parameters are added to enable/disable tessellated geometry reading and writing:
    - read.step.tessellated (On/Off)
    - write.step.tessellated (On/Off)
    Both of them are set to Off by default.
    
    Faces with poly triangulation are written in STEP as triangulated face entities with one coordinates list per face.
    Only one poly triangulation per face (returned by BRep_Tool::Triangulation) is written to STEP.
20Commenter 20
For integration:
occt - CR30024_1
products - CR30024
21Commenter 4
Branch [archived branch] has been updated forcibly by Participant.

[revision removed]
22Commenter 4
Branch [archived branch] has been deleted by Participant.

[revision removed]
23Commenter 23
For integration:
occt - CR30024
products - CR30024
24Commenter 24
Warning in csharp-sample and java-sample on Windows 64 with VC14, VC141, VC142

++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Project : CR0-WEEK-21_CR0-WEEK-21-Products-Windows-64-VC14-sample-csharp
++++++++++++++++++++++++++++++++++++++++++++++++++++++++

New warnings appears: 4
 
Type : MSBuild
Category : 322
File Name : E:/install/CR0-WEEK-21_CR0-WEEK-21/Windows-64-VC14-opt/Products/samples/csharp/../swig/TKSTEPAttr.i
Line : 53
Message : previous declaration of DownCast.

Type : MSBuild
Category : 322
File Name : E:/install/CR0-WEEK-21_CR0-WEEK-21/Windows-64-VC14-opt/Products/samples/csharp/../swig/TKSTEPAttr.i
Line : 53
Message : previous declaration of TypeOf.
25Commenter 25
In addition, please change the type of static flag read.step.tessellated from boolean to enum with 3 values:
On - tessellation is always read
Off - tessellation is always ignored
OnNoBRep - tessellation is read only for entities for which there is no BRep representation.
26Commenter 4
Branch [archived branch] has been updated forcibly by Commenter 1.

[revision removed]
27Commenter 4
Branch [archived branch] has been updated forcibly by Commenter 1.

[revision removed]
28Commenter 28
tests/de_mesh/step_read/A1
6: this command is executed in 'end'.
29Commenter 4
Branch [archived branch] has been updated forcibly by Commenter 1.

[revision removed]
30Commenter 4
Branch [archived branch] has been updated by Commenter 1.

[revision removed]


Detailed log of new commits:

Author: Sergey NIKONOV
Date: Mon May 30 19:11:56 2022 +0300

    0030024: Data Exchange - STEP, IGES export support of BRep shapes based on tessellated geometry
    
    #Reading of Complex_Triangulated_Face is added
31Commenter 31
tests/de_mesh/step_read/B1
This script does not perform XGetOneShape, so in the 'end' the source shape is checked instead of the final one.

tests/de_mesh/step_read/A2
tests/de_mesh/step_read/A3
Please add in the beginning 'puts' with corresponding bug title.
32Commenter 4
Branch [archived branch] has been updated forcibly by Commenter 1.

[revision removed]
33Commenter 4
Branch [archived branch] has been updated forcibly by Commenter 1.

[revision removed]
34Commenter 5
I have no more remarks.
Commenter 5, please combine both branches in occt and products to obtain one commit.
35Commenter 4
Branch [archived branch] has been updated forcibly by Commenter 1.

[revision removed]
36Commenter 36
Sorry, one more remark. It is needed to add the option "OnNoBRep" for the parameter "write.step.tessellated".
37Commenter 4
Branch [archived branch] has been updated by Commenter 1.

[revision removed]


Detailed log of new commits:

Author: Sergey NIKONOV
Date: Thu Jun 2 12:12:22 2022 +0300

    #write.step.tessellated parameter OnNoBRep - tessellation is written only for entities for which there is no BRep representation
38Commenter 4
Branch [archived branch] has been updated forcibly by Commenter 1.

[revision removed]
39Commenter 39
In commit message:
- write.step.tessellated (On/Off) (Off by default)
Correct this info.

tests/de_mesh/step_write/end
# restore reading/writing tessellated STEP geometry default parameters
param read.step.tessellated Off
param write.step.tessellated Off

Default values are others.

tests/de_mesh/step_write/C2
# simple meshed box (mesh without brep)

The comment is incorrect, indeed brep with mesh.
40Commenter 4
Branch [archived branch] has been updated forcibly by Commenter 1.

[revision removed]
41Commenter 4
Branch [archived branch] has been updated forcibly by Commenter 1.

[revision removed]
42Commenter 4
Branch [archived branch] has been updated forcibly by Commenter 1.

[revision removed]
43Commenter 43
For integration:
occt - CR30024
products - CR30024
44Commenter 44
Combination -
OCCT branch : [archived branch]
master SHA - [revision removed]
[revision removed]
Products branch : [archived branch] SHA - [revision removed]
was compiled on Linux, MacOS and Windows platforms and tested in optimize mode.

Number of compiler warnings:
No new/fixed warnings

Regressions/Differences/Improvements:
No regressions/differences

CPU differences:
Debian80-64:
OCCT
Total CPU difference: 18736.560000000623 / 18755.550000000607 [-0.10%]
Products
Total CPU difference: 11708.410000000114 / 11723.710000000106 [-0.13%]
Windows-64-VC14:
OCCT
Total CPU difference: 20637.375 / 20721.125 [-0.40%]
Products
Total CPU difference: 13299.6875 / 13249.9375 [+0.38%]


Image differences :
No differences that require special attention

Memory differences :
No differences that require special attention
45Commenter 4
Branch [archived branch] has been deleted by Participant.

[revision removed]
46Author
I try this in opencascade-7.7.0-beta:
1 Load the data/occ/Top.brep and writeobj to save a obj file;
2 Load the obj file by ReadObj to a document;
3 Write the obj document to tessellated STEP file by WriteStep;
4 Load the tessellated STEP file by ReadStep;
5 Display the tessellated STEP file by XDisplay.
Attachment 4 (PNG) (199,476 bytes)   

Related records