MantisBT - Community
View Issue Details
0022820Community[OCCT] OCCT:Data Exchangepublic2011-11-30 12:122013-04-29 15:21
szy 
ika 
normalminor 
closedfixed 
ALL
[OCCT] 6.5.2 
[OCCT] 6.6.0[OCCT] 6.6.0 
bugs iges(003) bug22820
0022820: OCCT IGES writer loses plane information
Post from the Forum - http://www.opencascade.org/org/forum/thread_22264/. [^]
1. "Hi all,

I have an iges file which represents a rectangular solid with 6 faces, when I view it in cadexchanger, it is as expected. When I read the IGES file programmatically in OpenCascade, I find 6 BSpline surfaces instead of planes, Was a little confused as to how I can proceed from here.. any pointers on the same? "
2. RLN:
" The IGES file has been produced by OCC.

So, the root-cause is in the fact that the OCC IGES exporter converts planes to B-Splines of degree 1. So you lose your plane information when writing to IGES.
Draw reproducer:

pload ALL
box b 1 1 1
dump b ;# all surfaces are planes
brepiges b
# choose 0 - end
listtypes ;# 6 B-Spline surfaces
igesbrep . bb *
dump bb ;# all surfaces are B-Splines

Hope this helps.
Roman
"
3. RLN => important note:
"Thank you for registering this report.
My thinking is that this behavior has been historically adopted due to IGES format limitation where the Plane entity (type 108) defines a plane without parameterization. With that storing pcurves will be impossible. However this should likely be fine given that pcurves are optional in OCC for planes and can be computed on the fly when reading back.
Another thought - when storing file using IGES 5.1+ (i.e. using solid/shell/face entities) - consider using Plane Surface Entity (type 190 form 1) depending on the write.surfaceconvert.mode parameter. This will be consistent with the choice made regarding revolved surfaces which are either stored as surface_of_revolution (type 120) or conical/cylindrical/etc types (192/194/...).

HTH.
Roman"
Draw reproducer:

pload ALL
box b 1 1 1
dump b ;# all surfaces are planes
brepiges b
# choose 0 - end
listtypes ;# 6 B-Spline surfaces
igesbrep . bb *
dump bb ;# all surfaces are B-Splines
No tags attached.
? simplecube.igs (26,158) 2011-11-30 12:12
https://tracker.dev.opencascade.org/
? bug22820 (685) 2012-12-27 17:46
https://tracker.dev.opencascade.org/
Issue History
2011-11-30 12:12szyNew Issue
2011-11-30 12:12szyAssigned To => gka
2011-11-30 12:12szyFile Added: simplecube.igs
2011-11-30 13:01szyDescription Updatedbug_revision_view_page.php?rev_id=1146#r1146
2011-11-30 18:00abvDescription Updatedbug_revision_view_page.php?rev_id=1147#r1147
2011-11-30 18:00abvSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=1149#r1149
2011-11-30 18:10abvNote Added: 0018668
2011-11-30 18:10abvStatusnew => assigned
2012-02-09 09:04abvTarget Version6.5.3 => 6.5.4
2012-10-19 17:10gkaTarget Version6.5.4 => 6.6.0
2012-10-19 17:11gkaAssigned Togka => szy
2012-10-19 17:11gkaAssigned Toszy => ika
2012-11-01 12:10ikaNote Added: 0022048
2012-11-01 12:10ikaAssigned Toika => gka
2012-11-01 12:10ikaStatusassigned => resolved
2012-12-04 10:29gkaNote Added: 0022532
2012-12-04 10:29gkaStatusresolved => reviewed
2012-12-04 16:37Roman LyginNote Added: 0022544
2012-12-05 18:47mkvAssigned Togka => mkv
2012-12-06 14:49mkvNote Added: 0022590
2012-12-06 14:49mkvAssigned Tomkv => ika
2012-12-06 14:49mkvStatusreviewed => assigned
2012-12-06 16:58ikaNote Added: 0022599
2012-12-06 16:58ikaAssigned Toika => mkv
2012-12-06 16:58ikaStatusassigned => resolved
2012-12-21 10:10abvStatusresolved => feedback
2012-12-27 17:46mkvFile Added: bug22820
2012-12-27 17:47mkvNote Added: 0022873
2012-12-27 17:48mkvTest case number => bugs iges(003) bug22820
2012-12-27 17:48mkvAssigned Tomkv => bugmaster
2012-12-27 17:48mkvStatusfeedback => tested
2013-01-04 11:35ikaChangeset attached => occt master a8fcd8d0
2013-01-04 11:35ikaAssigned Tobugmaster => ika
2013-01-04 11:35ikaStatustested => verified
2013-01-04 11:35ikaResolutionopen => fixed
2013-04-23 13:36aivStatusverified => closed
2013-04-29 15:21aivFixed in Version => 6.6.0

Notes
(0018668)
abv   
2011-11-30 18:10   
Note that IGES entity type 108 (plane) cannot be used in the trimmed surface (type 144), however it can contain it own restriction curve, i.e. it can be used to represent a face. OCCT translator recognizes this entity on reading, but does not create it on writing. That is to say, Roman's suggestions look quite reasonable.
(0022048)
ika   
2012-11-01 12:10   
Writing planes like BSplines was changed to writing like planes in Type 108, writing pcurves for planes was prohibited.

Git branch CR22820 is ready to be reviewed.

Dear GKA,
Please review.
(0022532)
gka   
2012-12-04 10:29   
Branch CR22820 is ready to be tested.
(0022544)
Roman Lygin   
2012-12-04 16:37   
Please consider removing redundant code BRepToIGES_BRWire.cxx.
For instance, there are unnecessary #include's and the commented out code which was initially added (seems to be my mistake) and then commented out.
Also the code in GeomToIGES_GeomSurface.cxx just contains many lines of now redundant code which could have just been removed.
Thanks.
(0022590)
mkv   
2012-12-06 14:49   
Dear BugMaster,
Branch CR22820 (and products from GIT master) was compiled on Linux and
Windows platforms and tested.

Regressions:
xigs 001 A1 A2

Improvements:
Not detected

See results in
/QADisk/occttests/results/KAS/dev/CR22820-master-products_06122012/lin
See reference results in
/QADisk/occttests/results/KAS/dev/IR-2012-11-15-master-products_15112012/lin
See test cases in /QADisk/occttests/tests/ED
(0022599)
ika   
2012-12-06 16:58   
These are not regressions, but valid behavior after this fix.
Please change tests.
(0022873)
mkv   
2012-12-27 17:47   
Dear BugMaster,

Test cases
xigs 001 A1 A2
will be corrected afther pusshing to master this fix.

Testing case:
bugs iges(003) bug22820 - OK.