STEP files units?

Is there a way to find out the units of a step file before I import it? Reason is that I’d usually want to import it into my template that matches those units, since that’s what the client it probably wanting me to use (that’s the short-answer version.) Same for IGES?

Hi Peter -both formats are text files so there may be something you can read directly in a text editor:

#22338=(
_UNIT()
NAMED_UNIT(*)
SI_UNIT(.CENTI.,.METRE.)
);
#22339=LENGTH_MEALENGTHSURE_WITH_UNIT(LENGTH_MEASURE(2.54),#22338);
#22340=(
CONVERSION_BASED_UNIT('INCH',#22339)
LENGTH_UNIT()
NAMED_UNIT(#22343)
);
#22341=(
NAMED_UNIT(*)
PLANE_ANGLE_UNIT()
SI_UNIT($,.RADIAN.)

My Rhino file for the above was in inches…
For iges it seems to be in the top few lines:
cm:

1.0D0,10,2HCM,1,0.0254D0,13H201022.145525, 

or inch

1.0D0,1,4HINCH,1,0.01D0,13H201022.145444, 

-Pascal

That’s awkward, but I guess I could search for inch each time.

I can add a printout of units and tolerance to the StepTree command pretty easily, or make a simple command that just finds the tolerance and units. You will still have to sit through the entire file parsing step though, which can take a while for large files. [EDIT] - But at least you wouldn’t have to go through the much longer step of building the geometry.

I may be able to come up with something more efficient in the future.

Chuck, I think that would be great. It’s not instant, but it’s faster than importing the whole file.

RH-61174 is fixed in the latest Service Release Candidate

1 Like

There is also a new command, StepUnitsAndTolerance that just gives you those things when you choose a step file. It isn’t significantly faster than StepTree but, unlike StepTree, it is available in the Mac version as well as the Windows version.

Thanks!