Script needed: orient a solid to XY plane

Does anyone has a script to orient a polysurface consisting of planar surfaces to world XY plane?
I guess you should pick a flat surface on an object and map the whole object from this plane to XY plane.
Like UnrollSrf but for a polysurface.

Hi @mikolaj,

you might try with below script. I´ve just tested on simple boxes, the picked sub-surface must be planar. Note: If the UV directions of the brep face you’ve picked are swapped or reversed, the object might end below the WorldXY plane.

There are two options to control the orientation reference:

  • Parameter: uses u = 0 and v = 0 and sets this to the origin (Default)
  • PickPoint: uses the u and v parameters from the picked point (3.1 KB)


1 Like

Thank you Clement, that is what was needed!

thank you!