Quantcast
Viewing all articles
Browse latest Browse all 5793

Offset curve on surface and selection of surface in brep

@s.branca wrote:

Hi, i am trying to select a surface into a brep and obtain a offsetcurveonsurface metod.
This code is a copypaste of all the piece that i found useful but i realy cannot understand how rhinoscriptsintax.offsectcurveonsurface() work.

Thanks in advance

import rhinoscriptsyntax as rs

def TestOffset():
    curve = rs.GetEdgeCurves("dammi le curve")
    if curve is None: return False
    curve = rs.JoinCurves(
    reference = SubObjectSelect()
    surface = reference[0]
    point = reference[1]
    if surface is None: return False
    point = reference[1]
    if point is None: return False
    parameter = 4
    rc = rs.OffsetCurveOnSurface( curve, surface, parameter )
    return rc is not None
def SubObjectSelect():
    obj_ref = rs.GetObject(message="Bla", filter=8, preselect=False, subobjects=True)
    if obj_ref:
        return  [obj_ref.Surface(),obj_ref.SelectionPoint()]
        print "Surface:", obj_ref.Surface()
        print "Selection Point:", obj_ref.SelectionPoint()
TestOffset()

Posts: 2

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 5793

Trending Articles