How to get "Quad snap points" on a curve

Hello,
I’d like to know How to get “Quad snap points” on a curve by using Python.

Thanks.

I’m not exactly sure how to do this in any of our SDKs. @dale do you know if this functionality is available?

There is no function on RhinoCommon to return a curve’s quad snap points (which are view-dependent). We might be able to add something to Rhino 6. Why do you need this? What are you trying to do?

Hello!

I have a similar problem:
I’m working with an 5 axis CNC machine, but it has a limited rotating movement around the Z: 0-180 deg. My CAM software does not matters the limits, it does not spliting the calculated toolpaths to smaller segments, so i have to do the job on the model.

I figured out that i can split the surfaces on quads:
Running Contour command on the surface in Z direction, then i drawing a curve on the Osnap Quads.

split surface on quads

I like to automate this procedure, at least for extruding the quad points. Can i do this anyway?

Ps.: sorry for englisch.

Hi all, Sorry for my late reply.

I want to get Highest points, Lowest points of curve and surface from a view according to work plane axis. I should give near point to get snap.
Is that possible in new RhinoCommon?

Or, It will be Ok for me using bounding box and intersection functions that now exist.

I’m very grad for considering my questions.

Hi,
I ran into the same situation, where I needed to find all the Quads in a curve.
Using Grasshopper, I could find all the “Extremes” in 3 planes. But there are still 2 “Quads” not found by Gh (the Q dots in the images attached).

I’m not sure what exactly a Quad is in Rhino, or even if I did something to find an actual “Quad”, I just know I need to find/setpts on them.

(Also, I don’t know if I should be posting this as a new question, as my issue its not Dev related, but I was starting a new thread when I saw this one…)

Quad_Crv.3dm (31.6 KB)

Hi Dale,

Sorry to bump something very old. This would be helpful for me too.

Quite a simple use case of a closed curve, and then get the quad points (or simply extremities) from the aligned top view. Not sure if there’s anything now in the SDK that would make it possible to get the extremes?

GetQuadPoints_Maybe.3dm (33.5 KB)

Maybe just bounding box then intersect, and hope for only four results?

Hi @Jonathan_Hutchinson1,

You might see if Curve.ExtremeParameters is of any use.

import Rhino
import scriptcontext as sc

def test_curve_extremes():
    filter = Rhino.DocObjects.ObjectType.Curve
    rc, objref = Rhino.Input.RhinoGet.GetOneObject("Select curve", False, filter)
    if not objref or rc != Rhino.Commands.Result.Success: return 

    crv = objref.Curve()
    if not crv: return
    
    for i in range(2):
        if i == 0:
            dir = Rhino.Geometry.Vector3d.XAxis
        else:
            dir = Rhino.Geometry.Vector3d.YAxis
        crv_t = crv.ExtremeParameters(dir)
        if crv_t:
            for t in crv_t:
                pt = crv.PointAt(t)
                sc.doc.Objects.AddPoint(pt)
    sc.doc.Views.Redraw();
    
test_curve_extremes()

– Dale

what is quad point actually?