MantisBT - Community
View Issue Details
0027622Community[OCCT] OCCT:Data Exchangepublic2016-06-20 14:312016-12-09 16:37
Timo 
bugmaster 
normaltrivial 
closedfixed 
[OCCT] 7.0.0 
[OCCT] 7.1.0[OCCT] 7.1.0 
bugs stlvrml bug27622
0027622: Data Exchange - STL file having less than 4 triangles cannot be read
The appended simple STL file, created by SpaceClaim, cannot be read. The exception says: Wrong file size.

However, it can be read by CAD Exchanger and Siemens NX 9.

Is it an OCC or a SpaceClaim problem?
readstl a Design1.stl
No tags attached.
? Design1.stl (184) 2016-06-20 14:31
https://tracker.dev.opencascade.org/
Issue History
2016-06-20 14:31TimoNew Issue
2016-06-20 14:31TimoAssigned To => gka
2016-06-20 14:31TimoFile Added: Design1.stl
2016-06-20 14:31TimoDescription Updatedbug_revision_view_page.php?rev_id=14000#r14000
2016-06-20 15:24kgvNote Added: 0055230
2016-06-20 15:24kgvNote Edited: 0055230bug_revision_view_page.php?bugnote_id=55230#r14006
2016-06-20 17:36kgvSummarySTL file cannot be read => Data Exchange - STL file having less than 4 triangles cannot be read
2016-06-20 17:36kgvSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=14010#r14010
2016-06-20 17:40gitNote Added: 0055251
2016-06-20 17:41kgvNote Added: 0055252
2016-06-20 17:41kgvSeverityminor => trivial
2016-06-20 17:41kgvStatusnew => resolved
2016-06-20 18:23gkaNote Added: 0055253
2016-06-20 18:23gkaAssigned Togka => bugmaster
2016-06-20 18:23gkaStatusresolved => reviewed
2016-06-20 18:25apvAssigned Tobugmaster => apv
2016-06-21 17:08gitNote Added: 0055311
2016-06-21 17:08apvTest case number => bugs stlvrml bug27622
2016-06-21 17:45apvNote Added: 0055315
2016-06-21 17:45apvAssigned Toapv => bugmaster
2016-06-21 17:45apvStatusreviewed => tested
2016-06-24 12:41bugmasterChangeset attached => occt master a47d34ef
2016-06-24 12:41bugmasterStatustested => verified
2016-06-24 12:41bugmasterResolutionopen => fixed
2016-06-24 12:57gitNote Added: 0055415
2016-12-09 16:31aivStatusverified => closed
2016-12-09 16:37aivFixed in Version => 7.1.0

Notes
(0055230)
kgv   
2016-06-20 15:24   
STL reader in OCCT defines minimum size of binary file as 284 bytes (84 for header and 200 for 4 triangles).
I don't know where it comes from, but it is hard to imagine the valid file of smaller size.
Technically STL file should define a SOLID (closed) geometry, which can be possible only with 4+ triangles.

Attached file defines only 2 triangles, which is considered as broken file by OCCT.

(0055251)
git   
2016-06-20 17:40   
Branch CR27622 has been created by kgv.

SHA-1: 18dc5b49bf767b5570e5bd884440a182f47b9443


Detailed log of new commits:

Author: kgv
Date: Mon Jun 20 17:40:48 2016 +0300

    0027622: Data Exchange - STL file having less than 4 triangles cannot be read
    
    Drop minimum file size check from RWStl::ReadBinary().
(0055252)
kgv   
2016-06-20 17:41   
Patch is ready for review.
(0055253)
gka   
2016-06-20 18:23   
Branch CR27622 is ready to be tested
(0055311)
git   
2016-06-21 17:08   
Branch CR27622 has been updated by apv.

SHA-1: b489733ac5547e8411122957788678e529f5229a


Detailed log of new commits:

Author: apv
Date: Tue Jun 21 17:08:26 2016 +0300

    Test case for issue 0027622

(0055315)
apv   
2016-06-21 17:45   
Dear BugMaster,

Branch CR27622 from occt git-repository (and master from products git-repository) was compiled on Linux, MacOS and Windows platforms and tested.
SHA-1: 18dc5b49bf767b5570e5bd884440a182f47b9443

Number of compiler warnings:
occt component:
   Linux: 0 (0 on master)
   Windows: 0 (0 on master)
   MacOS: 0 (0 on master)
products component:
   Linux: 68
   Windows: 0
   MacOS: 1153

Regressions/Differences:
Not detected

Testing cases:
bugs stlvrml bug27622 - OK
http://occt-tests/CR27622-master-OCCT/Debian70-64/bugs/stlvrml/bug27622.html [^]
http://occt-tests/CR27622-master-OCCT/Windows-64-VC10/bugs/stlvrml/bug27622.html [^]

Testing on Linux:
Total MEMORY difference: 88806235 / 89161369 [-0.40%]
Total CPU difference: 19433.519999999953 / 19458.34999999997 [-0.13%]

Testing on Windows:
Total MEMORY difference: 55888066 / 55904007 [-0.03%]
Total CPU difference: 17985.402090298892 / 18535.836018698956 [-2.97%]
(0055415)
git   
2016-06-24 12:57   
Branch CR27622 has been deleted by inv.

SHA-1: b489733ac5547e8411122957788678e529f5229a