Fillet in ghpythonlib

Hi,
I’m trying to call Fillet 2 with out parameter, but I only see Fillet 1. what should I do?
Thank you.


Hi @Shank ,

Are you trying to call the actual “Node To Code” aka the GH component?

Otherwise you can just do this:

Graph Space:

Model Space:
image


__author__ = "Michael Vollrath"
__version__ = "2023.08.20"
#Made With <3 In Dallas, TX

ghenv.Component.Message = None

import rhinoscriptsyntax as rs

O = rs.AddFilletCurve(C1,C2,R)

1 Like

Hi,
yes, i’m trying to call Node to code.
but I want fillet curve by python look like picture below. Any ideas ?

Here you go, this should be a match for the functionality of the component:

Graph Space:

Model Space:

__author__ = "Michael Vollrath"
__version__ = "2023.08.20"
#Made With <3 In Dallas, TX

ghenv.Component.Name = "Fillet (Python)"
ghenv.Component.NickName = "Fp"
ghenv.Component.Description = "Mimicks the Fillet component"

ghenv.Component.Params.Input[0].Name ="Curve"
ghenv.Component.Params.Input[0].NickName ="C"
ghenv.Component.Params.Input[0].Description ="Curve To Fillet"

ghenv.Component.Params.Input[1].Name ="Radius"
ghenv.Component.Params.Input[1].NickName ="R"
ghenv.Component.Params.Input[1].Description ="Fillet Radius"

ghenv.Component.Params.Output[0].Name ="Curve"
ghenv.Component.Params.Output[0].NickName ="C"
ghenv.Component.Params.Output[0].Description ="Curve With Filleted Corners"

import Rhino
import rhinoscriptsyntax as rs

#Get Document Tolerance Settings
tol = Rhino.RhinoDoc.ActiveDoc.ModelAbsoluteTolerance
aTol = Rhino.RhinoDoc.ActiveDoc.ModelAngleToleranceRadians

#Fillet Curve
C = rs.coercecurve(C).CreateFilletCornersCurve(C, R, tol, aTol)

20230820_Python_Fillet_Curve_Response_01b.gh (7.1 KB)

1 Like

Thank you too much.

1 Like

You’re welcome! Happy filleting

1 Like