View Issue Details

IDProjectCategoryView StatusLast Update
0031421Open CASCADEOCCT:Meshpublic2020-07-23 18:50
Reporterszy Assigned Toszy  
Status feedbackResolutionsuspended 
Product Version7.4.0 
Target VersionUnscheduled 
Summary0031421: OCCT:Mesh: SelfIntersectingWire Failure.
DescriptionAttempt to save a valid face using Draw command 'writestl' gives the next error message:
"** Error **: Mesh writing has been failed."

The face contains 2 wires: bounding wire and one internal wire (it gives the face
with a hole).
Minimal distance between wires = 0.40121902464126269
Steps To Reproducepload ALL
stepread simplified_part.stp s *
## Transferrable Roots : Nb entities selected : 1
## Transfer entity n0 601 OK -> DRAW Shape: s_1

nexplode s_1 F
checkshape s_1_241
writestl s_1_241 f241
** Error **: Mesh writing has been failed.
## additional check with incmesh
incmesh s_1_241 0.1
## Incremental Mesh, multi-threading OFF
## Meshing statuses: SelfIntersectingWire Failure

TagsNo tags attached.
Test case number

Attached Files

  • (805,712 bytes)
  • BRepMesh.7z (12,000 bytes)


child of 0024084 assignedoan Additional tool for resolving 2d loops on discretized wires should be implemented in BRepMesh 



2020-03-11 11:27

manager (805,712 bytes)


2020-03-11 13:05

developer   ~0090895

Last edited: 2020-03-11 13:06

Hi Sergey,

thank you for the case with self-intersections, it would be useful for 0024084.
However, reported issue is not a case in context of BRepMesh.

writestl is actually not a part of TKMesh component which OCCT:Mesh category is related to, but OCCT:DataExchange as far as it uses TKSTL API directly from that package.

Here, I would like to suggest to split this issue on two (or probably three) issues:

- First, to fix initial problem, report new issue (or move existing one) in OCCT:DataExchange category so TKSTL could produce *.stl files despite of existence of faces with corrupted triangulations (e.g. only for faces where tricheck reports no error, or for all faces that have triangulation even totally corrupted, with gaps, isolated nodes, cross-face errors, etc.);

- Second, report new issue for OCCT:Mesh in order to improve BRepMesh so it would handle issues with self-intersections (while even fixshape would not fix it);

- Third (optionally), report new issue in OCCT:ShapeHealing category to investigate possibility of resolving cases leading to self-intersections on discrete model, e.g. notched edges, possibly real self-intersections (that could be replaced by simplified geometry within defined tolerance) covered by huge tolerance ~ 3 while max size of BB is ~ 387. Note that bopargcheck raises "Faulties, that can not be treated by BOP, are detected." while checkshape says "This shape seems to be valid".

Here is the detail report of bopargcheck:
Faulties for FIRST shape found : 888
Shapes are not suppotrted by BOP: NO
Self-Intersections : YES Cases(7) Total shapes(14)
Check for SI has been aborted : NO
Too small edges : NO
Bad faces : NO
Too close vertices : DISABLED
Too close edges : DISABLED
Shapes with Continuity C0 : YES Cases(257) Total shapes(257)
Invalid Curve on Surface : YES Cases(624) Total shapes(1248)


2020-06-19 12:47

manager   ~0092578

In fact it is mesher problem.
Meshing statuses: SelfIntersectingWire Failure.
See the attached archive BRepMesh.7z with picture.


2020-06-19 12:47


BRepMesh.7z (12,000 bytes)


2020-06-22 14:14

developer   ~0092651

In fact, it is not.
Please read my previous message carefully.

The cause of the problem is self-intersecting wire, which is not the matter to be solved by BRepMesh if it could not have been solved by fixshape.

Issue History

Date Modified Username Field Change
2020-03-11 11:27 szy New Issue
2020-03-11 11:27 szy Assigned To => oan
2020-03-11 11:27 szy File Added:
2020-03-11 13:05 oan Note Added: 0090895
2020-03-11 13:05 oan Assigned To oan => szy
2020-03-11 13:05 oan Status new => feedback
2020-03-11 13:06 oan Note Edited: 0090895
2020-03-11 13:06 oan Note Edited: 0090895
2020-06-19 12:41 szy Relationship added child of 0024084
2020-06-19 12:47 szy Note Added: 0092578
2020-06-19 12:47 szy File Added: BRepMesh.7z
2020-06-19 12:53 szy Assigned To szy => oan
2020-06-19 12:53 szy Status feedback => assigned
2020-06-19 12:53 szy Target Version 7.5.0 => Unscheduled
2020-06-19 12:53 szy Summary Draw command 'writestl' fails to save valid face => OCCT:Mesh: SelfIntersectingWire Failure.
2020-06-22 14:14 oan Note Added: 0092651
2020-06-22 14:14 oan Assigned To oan => szy
2020-06-22 14:14 oan Status assigned => feedback
2020-07-23 18:50 szy Resolution open => suspended