Offset Check Python Script

Hi,

I am trying to write a simple python script to check the distance between pieces. My idea is to project the pieces to XY plane and extract the borders from surfaces. After that, I am planning to offset them to check if there are any intersection points. I attached the initial code. It creates the surfaces though I was not able to create curves from the border.

offsetCheck.py (478 Bytes)

Thanks,
Kamil

I figured out up to this point though still I need a clean outline. It is easy in Rhino by CurveBoolean but it works differently on the python scripting side.


offsetCheck_01.py (663 Bytes)

Hello,

Grasshopper and RhinoCommon have something called Clash.
You can also use these method.

Grasshopper Clash Component
clash

Clash API in RhinoCommon

https://developer.rhino3d.com/api/RhinoCommon/html/Overload_Rhino_Geometry_Intersect_MeshClash_Search.htm

1 Like

Thanks for the suggestion though before checking the intersections I need to have clear boundaries of the objects and offset those lines with a desirable value. (we usually use 0.75" which is a bit bigger than the bit for the rough cut on CNC) if I figure out that via Python then I can combine it with Grasshopper to make it interactive. I know it is easy to make this with Grasshopper but I want to improve my Python knowledge and the best way is to create some tasks and try to solve them I guess :slight_smile: