Grasshopper

algorithmic modeling for Rhino

Need help for optimizing script for bowl creation (offset direction, wrong index numbers...)

Hello there,

I created a little script that should create a bowl from two curves.

The script works, but only if i set up some things by hand to avoid unwanted results. 

It would be nice if someone could help me to optimize the script, so it works reliable.

At the end the script should work only by the input of the following informations:

- Top-Curve

- Bottom-Curve

- accuracy  ( like poly-count)

- is the bowl an open or closed structure?

This is an example of a good result:

From here its probably the best if you open both attached files, so you understand the problems.

1. Bug:

Offset direction of the bottomcurve needs to be set up by hand sometimes.

The script uses "loft" on a bunch of 3pt Arcs to create transitions. Arc 3pts" needs a "Point B" on the offset of the bottom line. Sometimes the offset is inverted, so i need to change it by hand.

The rule to make it work correct is: "The offset of the bottom line goes into the same direction as the top line, but on the same hight as the bottom line."

How can i implement this in GH?

2. Bug:

The floor generation needs a lot of guessing the right index numbers of lists.

The script uses 2x "Deconstruct Brep" to find the actual bottom curve of the created transition Brep. "Patch" is used to create a floor from this curve.

If the bowl is an open structure, the script creates a line between the endpoints of the bottom curve to close it, in order to create a trimmed "Patch". But again, you have to set up the right Index Numbers by hand...

3. Bug:

If the bowl is an open structure and the endpoints of the top-line and the bottom-line are the same the lofting is not working. At the moment I use a script that finds double points in the list and deletes it.

But the the result is, that the loft is not starting at the beginning or the end. Here is an Image.

I have only a little experience in gh, but i really want to learn more.

Thank you all for your help!

Views: 492

Attachments:

Replies to This Discussion

Hi

Here is my two cents. I guess offset sometimes fails because your curve is not planal, so my approach is using tangent vectors of your base curve and their crossproduct.

Your floor edge of bowl is also not planal. So you won't be able to use "Boundary Surface". Patch is not so good though, check attached definition.

Curve params were internalised. Best.

Attachments:

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