# Creating boundary line from separate breps

Hi,
I have two separate breps but I need to create a common boundary line touching two breps. I have attached an image of top view of brep where in top there are two separate breps on the bottom you can see boundary line (red line) highlighted in red colour. May I know how to achieve that without manual methods in rhino and can be achieved using grasshopper? please help

1 Like

Hi

here is the definition dealing with 2 closed curves, tested in varius orientations.
In your case project your breps to xy plane and plug them in.

BoundingBox 2 closed curves.gh (8.8 KB)

Just to complement clever definition by @Jakinta, you can use Clipper to offset 2 times. This gives more possibilities.

1 Like
1 Like

curve test boundary.gh (2.3 KB)

Thank you for the definition. But it didnt work for all curves. I attached a curve below kindly have a look.
curve test boundary.gh (2.3 KB)

Thank you for the definition. But it is far from what I like to achieve

May I know what component is â€śpolyline offsetâ€ť? I could not find it in my gh

Thank you very much but what if there are multiple curves ? I have to repeat the definitions? Kindly find the attached curves

curve test boundary.gh (2.3 KB)

Maybe you need separate them ; if you want a script can solve different cases i donâ€™t think this is easy

bound.gh (8.1 KB)

Thank you I have to play with controls of extend curve. This is pretty perfect for now. You are awesome and you should know that.

You mean I need a script to solve different complex cases?

Yes sometimes you need separate the curves.
Maybe there is a method with scripting or complex definition i donâ€™t know

1 Like

If it is far from what you need better not use it.
Extend curve must be the best way.

Well, it is a different case from your initial post.

1. what if there are 2+ curves,
2. what if they are not orthogonal,
3. what if there are plenty of them in flattened listâ€¦

As you see, so many ifsâ€¦
So i simplified and guessed you might need very solution for that and only that problem postedâ€¦

In case 1) extension approach as @ [Seghier khaled] would be the best. The question is how to chose proper extension distance so it dont mess all possible cases, likeâ€¦

In case 2) @ Laurent Delrieu Clipper based solution suits well.

In case 3) preproccessing the curves by grouping them on proximity is neccessaryâ€¦

By my humble opinion, when the curves are grouped properly, general solution is to find the closest control points ( similiar as in my definition), extend the proper segments by measured distance + small number so it intercests the polyline and then do some â€śregion boundingâ€ť.

How to choose proper segment to extend because there are 2 on every control or disontinuity point?
Test which one has larger angle on closest polylineâ€¦for example

1 Like

Maybe this work for different cases but sometimes you need to adjust the sliders (polygon radius & addition)

bound2.gh (22.3 KB)

3 Likes

This is some incredible work. You are the real mvp today. Thank you very much for your brain for the work and create something neat and impressive like this. bows head down