DiscussionsIssue archiveData Exchange and Application Framework

Archived discussion

import iges file error with "M" unit

Data Exchange and Application FrameworkMon, 05/13/2019 - 17:144 replies

Browse this forum
QuestionAuthor

I import a iges file with "mm" unit, it seems ok. But error when I import the same iges file with "M" unit.

I think that maybe some parts not be converted from "MM" to "M". 

I used the below code to use "M" unit for importing.

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

 

Discussion

4 archived replies

Posts are displayed in their archived order.

01Commenter-1

I don't see anything similar in Draw Harnes or in CAD Assistant.
Which version of OCCT you are using?
How do you actually read IGES model? Any extra parameters changes?
How do you display the model in 3D Viewer?

pload ALL
param xstep.cascade.unit M
testreadiges {AAC-1937 (T26).igs} i
vclear
vinit View1
vdisplay -dispMode 1 i
vfit
02Author

Dear Kirill,  thanks for your replying very much.  I used the code from the Freecad for testing, please see the attachment.

I use the version 7.3.0  of OCCT.  I dumped the location and box for every shape into data_m.txt and data_mm.txt.

It seems that displaying for the "M" unit  is right.

03Commenter-1

It seems that I'm not familiar with XDE enough to understand document exploration code of yours.

By the way, I believe you misunderstand what HashCode function does in OCCT - it does NOT guarantee lack of collisions, even if you give it INT_MAX as an upper limit.

std::set<int> myRefShapes;
static const int HashUpper = INT_MAX;
hash = aShape.HashCode(HashUpper);
if (isRef || myRefShapes.find(hash) == myRefShapes.end()) {
04Author

Thank you, now  I can read the model correctly. thanks.