For all issues regarding the Forums use, please, refer to the Forum Rules.

Our Solutions

Need professional assistance?
Consider our:

Support Offerings

 

Need to speed up your development?
Have a look at our:

Samples & Tools

 

Need some functionality extending standard OCCT capabilities?
Check out our:

Adv. Components

continued problem reading IGES wheel

Tod Courtney's picture
Forums: 

I have been struggling for several days trying to understand why a particular IGES file can not be read/rendered by OCCT 6.5.2 (and 6.5.4).

The file starts as 'wheel.igs' and I load it into my tool. My tool works in meters but the file is written in MM, so I use this command:

Interface_Static::SetCVal ("xstep.cascade.unit", "M");

so that OCCT converts the file to M. this works and I can render the model correctly.

Then I export the model from my tool as 'wheel-new.igs'. The file units are back to MM and the geometry has been scaled appropriately -- automatically by OCCT.

When I load 'wheel-new.igs' back into my OCCT-based tool, the single face is flagged as 'bad' by BRepCheck_Analyzer and nothing is rendered.

If I change my code and comment out the line that sets "xstep.cascade.unit" to "M" so that OCCT uses MM internally, I can load both 'wheel.igs' and 'wheel-new.igs' and they render correctly. I can export 'wheel-new.igs' to 'wheel-new2.igs' and load 'wheel-new2.igs' correctly too.

I have a feeling that I need to make one of the IGES tolerances 1/1000 smaller when I write the model, but I have not been able to determine which one or figure out how to do it correctly.

I do not know how to get IGESCAFControl_Writer to export in "M". It doesn't have a constructor that takes units, and setting "write.iges.unit" to "M" doesn't seem to work.

I am to the point of keeping OCCT in "MM" internally when I read and write, and converting to "M" myself using BRepBuilderAPI_Transform to after I read to convert to M and before I write to convert the model back to MM.

Does anyone have experience successfully using OCCT with Meters as the internal representation? Can anyone point me towards a solution? Can someone confirm that there is a bug in "M" conversions?

(This is the same model and issue that I posted about here: http://www.opencascade.org/org/forum/thread_24348. At that time I thought it was a meshing issue, now I believe it is an issue with converting units when translating the IGES model)

Thanks,
Tod Courtney