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?