Erase curves within Breps

grasshopper
unhandled

(Clementeremy) #1

Hi Everyone,

I am challenging myself in trying to create an algorithm to produce objects like in the following pictures.


I just started by the vertical lines and i cannot find a way to cull the lines within the other Brep.
I used the intersection curve/brep component to find the points but the following is very blur for me.


Can someone help me on this please? Also, regarding the horizontal, is there a way to link each curves to tour all the breps as the same time?

Thank you,

Rémy

spheres.gh (16.6 KB)
spheres.3dm (4.2 MB)


#2


spheres_2018Mar20a.gh (17.4 KB)


(qythium) #3

Perhaps a better way of going about this is to first do a Boolean Union on your surfaces, (which does the intersecting and trimming for you), and then extracting the resulting surfaces’ isocurves instead of interpolating points.

Also check out the Contour component:


#4

“better” depends on subjective factors. Different and valid approach for sure, though: Some trimming that was done before to ignore top and bottom ends must be done again (or instead) on the isocurves.


spheres_2018Mar20b.gh (15.8 KB)


(Clementeremy) #5

Thank you @Joseph_Oster and @qythium for your answers

Obviously, there is two approach for this problem. I am trying to do it in a way to be as more modular possible.
I think that i found a solution even if the code can be simplified.


I’ll share it with you once finished.

Thank you guys!


(qythium) #6

Ah, I hadn’t noticed the trimming going on - you could easily do that with a ‘Sub Curve’ , since the isocurves retain the surface parameterization. Perhaps I meant not to say ‘better’ but more intuitive approach (to me at least)


(Clementeremy) #7

Hi guys,

Please find attached my code. I know, there is several things not right (i have error messages), and it’s pretty the mess. But the result is close to what i want to reach.

What do you think? Is there a way to minimise my actions?

Also, i was wondering if there is a way to create waffling and having the different parts interlocking and working together?

Looking forward to your input.

Best,

Rémy

spheres_2.gh (31.5 KB)


(qythium) #8

There’s an unreferenced surface in the bottom right corner of your definition, you should be internalising param data instead of supplying a separate 3dm file.

Also another tip, if you have big sections of repeated components it’s probably a good idea to put them into a cluster or “vectorize” the input into a list / tree structure. Makes it a lot more manageable and easy to follow.


(Clementeremy) #9

Hi @qythium

You are right, sorry! There it is.

Let me know what do you think? Do you know why i have error messages please?

Thx

spheres_2a.gh (33.7 KB)


(qythium) #10

Ah, I think you might have misunderstood- I was simply highlighting the huge repeated portions which could be put into cluster form for modularity. See spheres_2a.gh (35.2 KB)

Also, internalising geometry means to Right-click => Internalise Data , this breaks the dependency on the Rhino file.

Your error looks like it’s due to one of the contours being too small to offset inwards. You might want to prevent this by culling curves by length, or simply ignoring the error (as in my attached file)

  • Any reason for not using the built in “Contour” component?
  • If you’re looking for ready-made solutions for slotting, could search the forum (plenty of waffles) or take a look at the BowerBird plugin. Otherwise maybe experiment with Region Slits component

(Clementeremy) #11

Hi @qythium,

Thank you for your answer. I didn’t knew that components can be integrated inside a cluster and we could Internalise data. This is really helpful, thank you for the tips.

You are right, the contour component is way more easier to use.

I’ll take a look to the forum and BowerBird and keep you posted.

Best,

Rémy