What units does Open CASCADE use?

I am writing some CAD/CAM software.
Is it OK to use code like gp_Pnt(25.0, 0.0, 0.0) with 25.0mm?
And if I am using inches should I use gp_Pnt(1.0, 0.0, 0.0) for inches?
Or should everything be in metres?
Do functions like BRepAlgoAPI_Cut work better with big geometry or small geometry?

Bearloga's picture

It is up to you how to interpret values of coordinates, mm, inch, m or something else. However, when you import/export IGES or STEP format, you can define the current units. To get better result of algorithms connected with intersector, I think it's better when dimensions of shapes are from ones to the thousands, and small features like holes and bendings being not smaller than 0.01.

Dan Heeks's picture

Thanks Bearloga,
I have used Parasolid at work, where they say that all units must be in metres.
I am planning on making my software in millimetres, so I have started by giving Open CASCADE millimetres.
It seems OK so far. I have done a few boolean operations with some primitives and with some STEP files.
So, I'll stay with millimetres until I find out differently.
I can't believe this is stuff is free!

PG's picture

Hello Bearloga,
I have a STEP file ( say in mm) and in my INCH system which I use OCC, I want to convert the imported geometry into INCH units.
Any tips in this regard - i scanned through lot of old forum threads
regards
-PG

Andrey Betenev's picture

Read STEP User's Guide, page 11: you need to set parameter xstep.cascade.unit