Command _section in python

Hi guys,

I would like to get sections of a mesh which I can easily do in Rhino by using:
Curve-> Curve from Object -> Section or simply the command _Section
However, I cannot find such a function in the rhinoscript syntax.
Could anybody either tell me if there is a similar function and I just haven’t found it so far, or how I could otherwisely solve that taxk in python scripting?
Thank you very much in advance!!!
Cheers

Normally that would be MeshContourPoints() which you would then connect with polylines through the points. Unfortunately this is not yet implemented in rhinoscriptsyntax, so you will need to dive into some RhinoCommon here. Let me look in my library and see if I have something “canned”…

Edit, here is what I have in my library: GetMeshContourPoints3.py (2.5 KB)

inside that script file, you will see a custom function: GetMeshContours(meshID,cp1,cp2,dist,ret_pts=False,cull_dup_pts=True,add_objs=False)

That takes a GUID representing a mesh, 2 points representing the contour direction, plus some other optional arguments. Let me know if this helps…

–Mitch

Thank you very very much, I will try it out and let you know :slight_smile: