Grasshopper

algorithmic modeling for Rhino

Hi,

I'm trying to fillet a curve's corners using RhinoCommon, yet i can't find the right method to do that.

In Rhino, I'm using FilletCorners commands tho i can't find the relevant command in the SDK so i believe the FilletCorners is a complex command that is using the SDK in a non-obvious way.

For example:

and after using Rhino's FilletCorners with radius parameter 6:

If no command is available i'm willing to implement the FilletCorners algorithm and create my own function that manipulates the SDK in order to achieve that fillet corners in a curve.

I'm really not sure how it works.

Best regards,

H.

Views: 4595

Replies to This Discussion

You'll have to use Curve.CreateFillet(). It takes two curves (could be the same one), a radius and two parameter hints. It then gives you the resulting arc. What I'd do is explode the curve into the loose segments, then compute fillet points for all adjacent pairs, trim the original segments so they end at the fillet arc endpoints, and join it all back together again.

--

David Rutten

david@mcneel.com

I am also trying to achieve this for a triangle. in python:
my code reads:


import rhinoscriptsyntax as rs

radii=(x)

if rs.IsCurve(crv):
a=rs.ExplodeCurves(crv)
print len(a)

#what is next?

for my python battery I have the "crv"(triangle) and "x" (as radii) input
the rs.Addfillet takes three arguments (two curves and a radius) how do I input the list of segments from the exploded triangle to achieve the fillet corners?

Please I need some help.

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service