Grasshopper

algorithmic modeling for Rhino

I've started this script for a truncating form.  I'm new to rhinoCommon and can't figure out how to connect the truncated lines with lines in rhinoCommon.

 

 

I'd love any assistance and/or feedback.

 

Thanks

 

testTruncTetra.ghx

Views: 532

Replies to This Discussion

Hi Mishkaduh,

there's quite a bit of code in there.

You'll find a Line|Line intersector in the rhino.Geometry.Intersect.Intersection class. This class provides a large list of mathematicla and physical intersection algorithms.

--
David Rutten
david@mcneel.com
Poprad, Slovakia
Thanks for the quick reply David. I'll take a look.

I imagine the coding will get more efficient with experience.
Well I was wondering why you didn't make the lines long enough to begin with. Is this an actual problem you're solving, or is it a test case?

--
David Rutten
david@mcneel.com
Poprad, Slovakia
I'm working on truncated forms...so when the t value is 0 the lines touch. but when it is, for example, .75 the edges are chamfered.

I'm attaching a jpg of what I'd like it to look like. This is part of an exploration into lattice structures/space frames.
Attachments:
Oh I get it. You weren't trying to complete the shape, but to add the missing edges.

Ok, LineLine intersection won't help you here. I think the best way would be to add the exact smarts to your algorithm so that it knows exactly which lines are supposed to be connected. If this is too difficult, you could try writing a small function that sorts a collection of line end-points based on distance and picks the two best hits.

I'm not quite sure which would be the best solution in this case. Where do you want to go next? Are you looking to create faces for these polyhedrons? Meshes? Closed polylines per face?

--
David Rutten
david@mcneel.com
Poprad, Slovakia
The final result is create a space grid with the geometry as a component of the grid. Edges and vertices are important. Sorting the end points would be a great work around but I think the real way to do this is your first suggestion.

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