MantisBT - Community
View Issue Details
0022849Community[OCCT] OCCT:Data Exchangepublic2011-12-15 21:252020-10-02 21:45
WindowsWindowsXP Pro SP3
[OCCT] 6.5.2 
[OCCT] 7.6.0* 
chl 934 V7
0022849: Bad import of a STEP file (error during triangulation).
The attached STEP file is not imported correctly. At least, 9 faces cannot be triangulated. I have compared the results with other software that show the mesh correctly.
Simply try to open the STEP with the Import/Export sample. Navigate around the "3M" extruded text. The lateral faces of the number "3" are missing.
No tags attached.
? 2520-6002_step.stp (840,020) 2011-12-15 21:25
jpg shot1.jpg (53,874) 2011-12-15 21:29
? V7 (894) 2012-03-15 17:34
Issue History
2011-12-15 21:25AGPXNew Issue
2011-12-15 21:25AGPXAssigned To => gka
2011-12-15 21:25AGPXFile Added: 2520-6002_step.stp
2011-12-15 21:29AGPXFile Added: shot1.jpg
2011-12-16 08:14abvNote Added: 0018876
2011-12-16 08:14abvAssigned Togka => ama
2011-12-16 08:14abvStatusnew => assigned
2012-01-12 09:48abvNote Added: 0019094
2012-01-27 16:38amaNote Added: 0019286
2012-01-27 16:40amaAssigned Toama => pdn
2012-01-27 16:40amaStatusassigned => resolved
2012-02-07 12:03amaNote Added: 0019429
2012-02-15 15:20abvAssigned Topdn => ama
2012-02-15 15:20abvStatusresolved => assigned
2012-02-28 14:53amaNote Deleted: 0019429
2012-02-28 15:02amaNote Edited: 0019286bug_revision_view_page.php?bugnote_id=19286#r3563
2012-02-28 15:58amaAssigned Toama => pdn
2012-02-28 15:58amaStatusassigned => resolved
2012-03-11 10:43abvAssigned Topdn => epa
2012-03-12 10:51epaNote Added: 0019931
2012-03-12 10:51epaAssigned Toepa => ama
2012-03-12 10:51epaStatusresolved => assigned
2012-03-14 14:51amaNote Added: 0019966
2012-03-14 14:51amaAssigned Toama => epa
2012-03-14 14:51amaStatusassigned => resolved
2012-03-14 15:39epaNote Added: 0019968
2012-03-14 15:39epaAssigned Toepa => bugmaster
2012-03-14 15:39epaStatusresolved => reviewed
2012-03-14 15:50mkvAssigned Tobugmaster => aan
2012-03-15 17:33apnTest case number => chl 934 V7
2012-03-15 17:34apnAssigned Toaan => apn
2012-03-15 17:34apnFile Added: V7
2012-03-16 16:01apnNote Added: 0020021
2012-03-16 16:01apnNote Edited: 0020021bug_revision_view_page.php?bugnote_id=20021#r3666
2012-03-16 16:02apnAssigned Toapn => ama
2012-03-16 16:02apnStatusreviewed => assigned
2012-11-09 10:10abvCategoryOCCT:Data Exchange => OCCT:Mesh
2013-01-19 18:56AGPXNote Added: 0023036
2013-01-19 18:57AGPXNote Added: 0023037
2014-09-15 11:52pdnTarget Version => 7.1.0
2015-02-12 07:00abvRelationship addedrelated to 0025415
2015-05-13 09:56oanRelationship addedrelated to 0024265
2016-10-17 11:51oanNote Added: 0058771
2016-10-17 11:51oanAssigned Toama =>
2016-10-17 11:51oanCategoryOCCT:Mesh => OCCT:Data Exchange
2016-10-17 11:51oanAssigned To => gka
2016-10-25 16:21gkaNote Added: 0059101
2016-10-25 16:22gkaAssigned Togka => oan
2016-10-25 16:22gkaStatusassigned => feedback
2016-10-25 16:22gkaTarget Version7.1.0 => 7.2.0
2017-07-27 09:24abvTarget Version7.2.0 => 7.4.0
2019-07-10 21:56abvTarget Version7.4.0 => 7.5.0
2020-10-02 21:45abvTarget Version7.5.0 => 7.6.0*

2011-12-16 08:14   
Reproduced on last trunk, in DRAW:

Draw[5]> stepread D:/ABV/Work/OCC/occ22849/2520-6002_step.stp a *
Draw[6]> checksh a_1
This shape seems to be valid
Draw[7]> tole a_1
Tolerance MAX=0.025401524012559532 AVG=0.00034227306905487047 MIN=9.999999999999
FACE : MAX=9.9999999999999995e-008 AVG=9.9999999999999995e-008 MIN=9.99999999
EDGE : MAX=0.025401524012559532 AVG=0.00014795105451371384 MIN=1.00005e-007
VERTEX : MAX=0.025401524012559532 AVG=0.00047448980445837901 MIN=1.000100002500
Draw[9]> incmesh a_1 0.1
Meshing statuses: OpenWire Failure
Draw[10]> tricheck a_1
face 66 has no triangulation
face 67 has no triangulation
face 68 has no triangulation
face 72 has no triangulation
face 73 has no triangulation
face 74 has no triangulation
face 89 has no triangulation
face 90 has no triangulation
face 91 has no triangulation
2012-01-12 09:48   
The same problem (no shading of some faces) is reproduced in previous releases of OCCT (checked: 6.3.0, 6.3.1, and 6.5.0)
2012-01-27 16:38   
(edited on: 2012-02-28 15:02)
SVN branch http://svn/svn/occt/branches/OCC22849 [^] (revision 10634) is ready to be reviewed.

Modified process of edges discretization (BRepMesh_FastDiscret::Add(edge)) in this way to avoid unclosed polygons and "OpenWire Failure". If adjucent edges are disconnected in 2d (while connected in 3d) the gap is closed by last point from previous edge.
But some faces is still has no triangulation (face 67, 73, 91). This is normal because in the original file (2520-6002_step.stp) these faces are determined by a planar surface and only two vertex that lead to an error during triangulation (Meshing statuses: Failure).
Also changed the conditions of bending pcurves in ShapeFix_Wire::FixLacking() - if two pcurves are parallel lines - bending is replaced by increase tolerance of vertex.

2012-03-12 10:51   
The fix looks like a workaround. Comparing of 2D points with Precision::PConfusion looks redundant, because nearest 2D points are merged in the 2D cell filter. Comparing of 3D points looks dangerous:
* why double tolerance is uses
* what behaviour will be if the tolerance of vertex is too big (more than face bounding box)
* this fix potensionnaly contradict to fix with checking direction of pcurves (not yet integrated)

Before testing this fix please update the values ​​of the field myFirstEdge in all places where the function "Add" is called from the Edge
2012-03-14 14:51   
SVN branch http://svn/svn/occt/branches/OCC22849 [^] (revision 10740) is ready to be reviewed.
2012-03-14 15:39   
Dear Bugmaster,
Please test the current fix
2012-03-16 16:01   
Dear BugMaster,
    SVN branch http://svn/svn/occt/branches/OCC22849 [^] hes been moved to GIT CR22849 one.
    Workbench KAS:dev:apn-22849-occt was created from git branch CR22849
  (and apn-22849-products from svn trunk) and compiled on Linux platform.
    There are following regressions in apn-22849-products regarding to KAS:dev:products-20120306-opt:

bom 009 A3 B3 F3 G3
bom 010 P2 P3 Q2 Q3
bom 012 P2 P3 Q2
bom 013 G2 H2 H3 R2 R3 S2 S3
bom 014 A1 B4 C1 C2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 ...

msh 001 D2 D7 F2 F6 F7 F8 L2 N7 O1 O3 O6 P2 P4 R6

shd 001 A2 A4 A7 B2 B3 B5 B6 B7 B9 C1 C2 C4 C5 C6 C7 C8 C9 D1 D2 D3 D4 D5 D7 D8 D9 E1 E2 E3 E4 E5 E6 E7 E8 E9 ....
shd 002 ...
shd 003 A2 A5 B1 B3 B4 B6

vpr 002 A1 A2 A3 A4 A5 A6 A7 A8
vpr 005 A1 A2 A3 A4 A5 A6 A7 A8
vpr 007 A2 B2 B5 D8
vpr 008 A2 B2 B5 D8

    Test case for this fix is chl 934 V7. It's OK.

    See results in /QADisk/occttests/results/KAS/dev/apn-22849-products_15032012/lin
    See reference results in /QADisk/occttests/results/KAS/dev/products-20120306-opt_07032012/lin
    See test cases in /QADisk/occttests/tests/ED

2013-01-19 18:56   
Reminder sent to: apn, epa

Hello, there's some prevision for when this fix will be released? Thank you.
2013-01-19 18:57   
Reminder sent to: ama

Hello, there's some prevision on when this fix will be released? Thank you.
2016-10-17 11:51   
Issue has been moved to Data Exchange category due to problem during STEP translation described in: [^]
2016-10-25 16:21   
For this case STEP file contains faces containing from two edges based on the lines. For example face with number 67 obtained from entity #5009
Shape a_1_1_67 : imported from entity 4973:#5009

Draw[29]> entity 4973 6
  -- DUMP Entity n0 4973 level 6
 --- (STEP) Entity 4973:#5009 Type cdl : StepShape_AdvancedFace
In dump, iii:#jjj means : entity rank iii has step ident #jjj
4963:#4999 = PLANE('',4962:#4998);
4972:#5008 = FACE_OUTER_BOUND('',4971:#5007,.T.);
4973:#5009 = ADVANCED_FACE('',(4972:#5008),4963:#4999,.F.);

Draw[30]> entity 4971 6
  -- DUMP Entity n0 4971 level 6
 --- (STEP) Entity 4971:#5007 Type cdl : StepShape_EdgeLoop
In dump, iii:#jjj means : entity rank iii has step ident #jjj
4969:#5005 = ORIENTED_EDGE('',*,*,4968:#5004,.F.);
4970:#5006 = ORIENTED_EDGE('',*,*,2690:#2726,.F.);
4971:#5007 = EDGE_LOOP('',(4969:#5005,4970:#5006));

Draw[31]> entity 4968 6
  -- DUMP Entity n0 4968 level 6
 --- (STEP) Entity 4968:#5004 Type cdl : StepShape_EdgeCurve
In dump, iii:#jjj means : entity rank iii has step ident #jjj
2459:#2495 = VERTEX_POINT('',2458:#2494);
2667:#2703 = VERTEX_POINT('',2666:#2702);
4967:#5003 = LINE('',4964:#5000,4966:#5002);
4968:#5004 = EDGE_CURVE('',2459:#2495,2667:#2703,4967:#5003,.T.);

Draw[32]> entity 2690 6
  -- DUMP Entity n0 2690 level 6
 --- (STEP) Entity 2690:#2726 Type cdl : StepShape_EdgeCurve
In dump, iii:#jjj means : entity rank iii has step ident #jjj
2459:#2495 = VERTEX_POINT('',2458:#2494);
2667:#2703 = VERTEX_POINT('',2666:#2702);
2689:#2725 = LINE('',2686:#2722,2688:#2724);
2690:#2726 = EDGE_CURVE('',2667:#2703,2459:#2495,2689:#2725,.T.);

After translation from STEP valid face consists of two edges with to vertices was created.
Gaps in the 2D and 3D space on the both ends of face was covered by tolerances of vertices.

Therefore translation from STEP in this case is valid. Obviously that this case is limitation of the BRepMesh_FastDiscret algorithm.