View Issue Details

IDProjectCategoryView StatusLast Update
0022820CommunityOCCT:Data Exchangepublic2013-04-29 15:21
ReporterszyAssigned Toika  
PrioritynormalSeverityminor 
Status closedResolutionfixed 
PlatformAOSL 
Product Version6.5.2 
Target Version6.6.0Fixed in Version6.6.0 
Summary0022820: OCCT IGES writer loses plane information
DescriptionPost 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"
Steps To ReproduceDraw 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
TagsNo tags attached.
Test case numberbugs iges(003) bug22820

Attached Files

  • simplecube.igs (26,158 bytes)
  • bug22820 (685 bytes)

Activities

szy

2011-11-30 12:12

manager  

simplecube.igs (26,158 bytes)

abv

2011-11-30 18:10

manager   ~0018668

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.

ika

2012-11-01 12:10

developer   ~0022048

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.

gka

2012-12-04 10:29

developer   ~0022532

Branch CR22820 is ready to be tested.

Roman Lygin

2012-12-04 16:37

developer   ~0022544

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.

mkv

2012-12-06 14:49

tester   ~0022590

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

ika

2012-12-06 16:58

developer   ~0022599

These are not regressions, but valid behavior after this fix.
Please change tests.

mkv

2012-12-27 17:46

tester  

bug22820 (685 bytes)

mkv

2012-12-27 17:47

tester   ~0022873

Dear BugMaster,

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

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

Related Changesets

occt: master a8fcd8d0

2012-12-28 14:30:58

ika

Details Diff
0022820: OCCT IGES writer loses plane information

added writing planes in Type 108 not like BSplines
pcurves for planes not writing
add parameter for choice between writing planes in BSplines and Planes
0022820: OCCT IGES writer loses plane information

pcurves were prohibited also for BRep mode
Adding test case for this fix
Affected Issues
0022820
mod - src/BRepToIGES/BRepToIGES_BRWire.cxx Diff File
mod - src/GeomToIGES/GeomToIGES_GeomSurface.cxx Diff File
mod - src/IGESData/IGESData.cxx Diff File
add - tests/bugs/iges/bug22820 Diff File

Issue History

Date Modified Username Field Change
2011-11-30 12:12 szy New Issue
2011-11-30 12:12 szy Assigned To => gka
2011-11-30 12:12 szy File Added: simplecube.igs
2011-11-30 13:01 szy Description Updated
2011-11-30 18:00 abv Description Updated
2011-11-30 18:00 abv Steps to Reproduce Updated
2011-11-30 18:10 abv Note Added: 0018668
2011-11-30 18:10 abv Status new => assigned
2012-02-09 09:04 abv Target Version 6.5.3 => 6.5.4
2012-10-19 17:10 gka Target Version 6.5.4 => 6.6.0
2012-10-19 17:11 gka Assigned To gka => szy
2012-10-19 17:11 gka Assigned To szy => ika
2012-11-01 12:10 ika Note Added: 0022048
2012-11-01 12:10 ika Assigned To ika => gka
2012-11-01 12:10 ika Status assigned => resolved
2012-12-04 10:29 gka Note Added: 0022532
2012-12-04 10:29 gka Status resolved => reviewed
2012-12-04 16:37 Roman Lygin Note Added: 0022544
2012-12-05 18:47 mkv Assigned To gka => mkv
2012-12-06 14:49 mkv Note Added: 0022590
2012-12-06 14:49 mkv Assigned To mkv => ika
2012-12-06 14:49 mkv Status reviewed => assigned
2012-12-06 16:58 ika Note Added: 0022599
2012-12-06 16:58 ika Assigned To ika => mkv
2012-12-06 16:58 ika Status assigned => resolved
2012-12-21 10:10 abv Status resolved => feedback
2012-12-27 17:46 mkv File Added: bug22820
2012-12-27 17:47 mkv Note Added: 0022873
2012-12-27 17:48 mkv Test case number => bugs iges(003) bug22820
2012-12-27 17:48 mkv Assigned To mkv => bugmaster
2012-12-27 17:48 mkv Status feedback => tested
2013-01-04 11:35 ika Changeset attached => occt master a8fcd8d0
2013-01-04 11:35 ika Assigned To bugmaster => ika
2013-01-04 11:35 ika Status tested => verified
2013-01-04 11:35 ika Resolution open => fixed
2013-04-23 13:36 aiv Status verified => closed
2013-04-29 15:21 aiv Fixed in Version => 6.6.0