Grasshopper

algorithmic modeling for Rhino

Is there a way to make "Fair Curve" available in Grasshopper?

Hey Folks,

I was wondering if there is a way to implement fair curve (removal of curvature variations) into grasshopper in a way that I can feed curves into a component and get the faired curve as an output.

I tried to solve this using the python scripting component but since I'm fairly (haha...) new to scripting inside of grasshopper it does not really work properly :/

The problem seems to be that rhinoscriptsyntax.FairCurve only returns a boolean for failure/success or None on error, no way to get the actual faired curve back into grasshopper?!

Maybe somebody with more experience has an idea? I added a screenshot of my approach, it's probably really shitty :P

Greets
max

Views: 642

Attachments:

Replies to This Discussion

Hi Max,

rhinoscriptsyntax FairCurve function edits a curve in place. Which means you do not have the append to output_crvs what it returns, but the curve itself.
Check the attached file.

It would be better if you would edit your initial post (upper right angle -> Options -> Edit discussion) to change the topic category. This question should be in VB, C# and Python Coding category.


For any further question or new topics, please attach your .gh and .3dm files.

Attachments:

Hey djordie,

Okay, seems the solution to this is much simpler than I expected. Thanks a LOT for the help! I modified your attached file slightly with a while loop so you can specify  how often the FairCurve command should be executed and now it does exactly what I was hoping for!

Problem is solved!

PS: I also changed the Discussion category

Greets

Max

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service