Open CASCADE, the 3D modelling kernel
3D modeling & numerical simulation

Search the Forums
See All Topics

Does OCC support importing an iges file's dimensioning?

Does OCC support importing an iges file's dimensioning?
K Rutherford 2006/02/27 20:45
If there are dimension lines and arrows in an iges file, does OCC ignore all that when importing/reading the file? I have an iges file with some dimension lines but they don't show up when I read the file in. According to iges.PDF section 2.2.1 Translatable Entities, it make no mention of dimensions so I'm assuming that they are just chucked out the window when importing. Please tell me I'm wrong, and there is a way to read all the dimension lines in along with the model. Thanks.
FranÁois Lauzon 2006/02/27 21:14
when you import an iges file, the dimension lines are read, you could access information about it but what is created by OCC is only brep entities (curves, surfaces, points,...) no dimensions. You have to do it yourself (have a look at the file IGESDimen.cdl).

You should search for others forum post that may help you with extracting IGESData_IGESEntity (which in your case some of them would be dimension, like IGESDimen_CenterLine, IGESDimen_LinearDimension and so on).

Good Luck,
K Rutherford 2006/02/27 23:35
Thanks Francois,

I appreciate your help in the right direction. I am now getting IGESDraw_View and IGESDimen_LinearDimension from the list after reading the file. Then, doing a TransferBRepEntity to convert them to a TopoDS_Shape and appending them my sequence of shapes to be displayed but I never see them. Have any ideas why they might not be displaying? Thanks again for you help, I appreciate it.

FranÁois Lauzon 2006/02/28 14:32
Yes, you can't convert them to BRep entities, it's not supported. You have to write your own converter for those entities. Basicly, only 3d objects are converted, all 2d and dimension stuff is not converted (it is read, so you can do something with it if you want). It make sense since there is not much high level api for the 2d like you could find for the 3d.

Look at section 2.4. Mapping of IGES entities to Open CASCADE shapes in the iges.pdf files for a list of iges entities that are converted to BRep entities, for all others entities, you have to do it yourself.
K Rutherford 2006/03/02 15:31

Thanks for your continuing input and help. Iíve made great strides in writing my own routines to building and drawing the dimensioning attributes in my iges files. However, I have one little squirrelly thing going on. If I create the iges file myself with a 3rd party app, and put in dimension lines and notes and I can display them properly now in OCC in the correct position. However, taking a file from someone else, that has dimension lines in it, it does draw the dimension attributes but the location it far out of whack. Any ideas? Do I need to check from some sort of translation or scaling on something? Just thought I would ask, you seem to be very knowledgeable about this.

Also, my next hurdle it to do the same thing for step files. Do I approach it the same way? Iíve been looking in the OCC Classes Browser and Iím not seeing anything like IGESDimen_???. What classes or packages would I use to extract dimensioning data from the step file? I see a StepDimTol_?? But it doesnít show anything referring to leaderlines, arrowheads, or dimension lines.

Thanks again for you input.

PG 2012/09/27 08:06
Hello ( very late though),
can u share the implementation of a simple IGES file which contains geometry as
well as text to be imported using OCC API.
Also how to export similar dimensions to an IGEs file ?

- PG
Latest news
  • Open CASCADE CAD Assistant for iOS platform is available!
  • Open CASCADE Technology 6.9.0 is available for download!
  • JT Assistant for Android

  • © OPEN CASCADE 2000 - 2015  |  Search  |  Contacts   |  Site map