algorithmic modeling for Rhino
Hello,
I am reading curves from a SHP file using Meerkat in Grasshopper. The curves are placed where streets are placed. I have offset in both the positive and negative direction in order to get correct width of the street.
My question is how do I remove the intersecting curves. My first thought was to use a pattern cull and then reference the base street curve as the culling pattern, and then the remainder of the curves as the list component.
Red: base curve
Green: offset curves
Is there an easier way to accomplish this?
Thank you,
Forrest Walker Whitmore
Tags:
Here is an approach:
Find the intersections between all the curves, break[shatter] each curve at its intersection points and remove all segments with small length.
This is far from a perfect solution, as it will not work when streets are very close to each other (it will cull lines you actually need). But since you haven't provided your file I could only test it with a few street lines I created in GH.
you can check it with your file and see if it helps.
good luck,
nikos
Thank you for the help Nikos. I had the previous steps in my definition except for the culling of a specific length. I wasn't sure how to specify what was to be culled. I didn't upload my file because of it's excessive large file size. I will test what you have created and see how it acts with my street curves.
Thanks again,
Forrest Walker Whitmore
Update: I receive an error with the Shatter component "1. Solution exception:Object reference not set to an instance of an object."
Hi Forrest,
I don't know why you could be getting that error. My guess would be a data matching problem. Can you check that the two inputs of [shatter] have exactly the same data structure?
On another note, I thought of a way to make the definition more effective:
before culling the curves based on their length you could cull all the curves that intersect with the street axis so you can then use an even lower number for the length-based-cull and have less chances of removing a useful curve:
Yet you'll have to solve the error with the shutter component first.
If you can find a way to post your files it will make it easier to get help with this one.
good luck,
nikos
You might give the offset method of clipper a try. It can handle an offset of multiple curves without problems.
The plug-in page says that it doesn't support curves? How does it work with trimming extents?
ok, just checked it with a bunch of curves in clipper and it works like a charm! No need to use my complicated definition. It is very intuitive and it seems to work with curves also, so imo that's the way to go.
Amazing job there Arend, thank you for this plugin!
edit: only problem now seems to be offsetting each curve with a different number.
if I apply 4 curves and 4 numbers(both as simple lists-not trees) it offsets each curve with all the numbers. And when I graft both inputs it offsets each curve on its own (as expected). Maybe Arend can help with this one....
Hi Nikos,
Can you send me an image of how you set up the Clipper component with your test curves?
Update: I forgot to unblock the files within the Grasshopper folder. That works perfectly! Thank you both very much for your help!
hi nikos, if you want that you should graft your curves. two lists will not work, because the offset component accepts a lists of curves (which can be nice, because you can offset a network of loose curves, instead of each one individually).
Hi Arend,
I did some tests and this is what I get:
1.No Graft:
2. Graft curves:
3. Graft both:
So it is not possible to offset a network of curves, each with a different distance, right? (only each curve individually)
Do you think that could be possible in a future release (if you plan on making one, that is)?
Thanks again,
nikos
Hi Nikos, if I do that, it will be adding a feature to do a boolean/region join the curves at the end.
It's very easy for you to do that:
Use a trim component, to strip the last 2 path indices (or use a path mapper), and use the region union command to join all curves together.
Welcome to
Grasshopper
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson. Powered by