View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0032928 | Community | OCCT:Modeling Data | public | 2022-04-13 08:34 | 2022-04-13 08:40 |
Reporter | khara | Assigned To | |||
Priority | normal | Severity | major | ||
Status | new | Resolution | open | ||
Platform | Windows | OS | VC++ 2019 | ||
Product Version | 7.6.1 | ||||
Summary | 0032928: BRep reader cannot strictly restore original geometry that has been written out | ||||
Description | Write a topology using BRep_Tool::Write, then read it using BRep_Tool::Read, the read topology data may have small difference from the written one. I researched cause of the issue, it was not in brep writer nor brep format, in brep reader. When OCCT will restore gp_Dir value from input stream, three real values are read and those are given to gp_Dir.SetCoord method. In there, the three values are *modified* to satisfy the invariant condition of gp_Dir class (the norm of vector should be 1). That's why the original values in brep format will be often restored inexactly. The problem is spreading to axis geometry classes (gp_Ax1, gp_Ax2, ...) because they depends on gp_Dir. Similar inexact restoration happens for transformation geometry classes (gp_Trsf and gp_Mat). Of couse 2d geometry classes also have same problems as 3d ones. Binary brep reader (BinTools::Read) has same problem. | ||||
Steps To Reproduce | Read test1.brep using BRepTools::Read, then write it. The written out result (test2.brep) has small differences in following places: <3D circle Dx> and <3D circle Dy> in Circle - <3D curve record 2>. 2nd and 3rd <3D direction> in Sphere - < surface record 4 >. | ||||
Tags | No tags attached. | ||||
Test case number | |||||
|
I've tried to create patch for OCCT to fix this issue, but couldn't complete it. I post my incomplete patches for BRepTools and BinTools package. (This patch does not contain fixes for gp_Trsf and gp_Mat classes) GeomTools.diff (17,728 bytes) BinTools.diff (20,837 bytes) |
|
Reproduction samples. test1.brep (1,310 bytes) test2.brep (1,334 bytes) |
Date Modified | Username | Field | Change |
---|---|---|---|
2022-04-13 08:34 | khara | New Issue | |
2022-04-13 08:34 | khara | Assigned To | => msv |
2022-04-13 08:39 | khara | Note Added: 0107904 | |
2022-04-13 08:39 | khara | File Added: GeomTools.diff | |
2022-04-13 08:39 | khara | File Added: BinTools.diff | |
2022-04-13 08:40 | khara | Note Added: 0107905 | |
2022-04-13 08:40 | khara | File Added: test1.brep | |
2022-04-13 08:40 | khara | File Added: test2.brep |