Let's discuss units

Quaoar

Administrator
Staff member
One important topic to touch on is the measurement units. It's often the case that non-SI units are used, and we have to survive such cases. For example, inches are popular in US and UK and the CAD files from these geographic locations might require extra caution.

Btw, a tool to consult units programmatically was first introduced in OpenCascade 6.5.3 (release notes):

1637660829985.png
Whatever units are defined in the STEP file, OpenCascade converts them to the units determined by the xstep.cascade.unit variable, which is millimeters by default. The reverse conversion is done via write.step.unit variable, which is also millimeters by default. Here is the snippet of a STEP file for the same model saved with MM and INCH setting.

1637665375201.png

Once imported back, both models have the same extents, i.e., inches are automatically converted to millimeters (unless xstep.cascade.unit value is changed).

Units are important but personally, I was often ignorant about them since computations I've been working on are unitless. Sometimes you recall about a physical object behind your computation, e.g., when you have to decide on some absolute tolerance value. E.g., a face stitching (sewing) tolerance for a ship hull is likely much larger than that of a hand watch. Also, if you do some measurements on a model, isn't it more straightforward to output the measured lengths, diameters, whatever in the native units right away, cause otherwise you'll have to do a back conversion?

Today I was asked by a guy if one should really perform inches-to-millimeters conversion or is it possible (or even better) to keep using the original units of a model (e.g., inches) in a computation (feature recognition in my case)? What do you guys think about that? How do you handle units in your software? @A-U how does CQ handle units?

1637665693245.png
 

Attachments

  • 1637660159900.png
    1637660159900.png
    187.3 KB · Views: 6

A-U

Active CAD practitioner
CQ has no notion of units. It is fully up to the user how to interpret the dimensions.
 
Top