Trim Brep with both sides of a plane

Hi, I’m trying to trim/split the edges of a brep with a plane (its a window frame, and the idea is to find the angle between the edges and cut the frame so the angles match), but it’s splitting just in one side.

I tried:

  1. to invert the normal of the plane
  2. to rotate the plane 180°
  3. to create a new plane with an inverted Z axis

No matter what I did, only the original plane cuts the Brep, the other ones don’t work:

Orange and pink are the edge vectors
Green is the bisector vector
Purple is the Z/Normal of the cutting plane

Profile.gh (35.4 KB)

This splits all the pieces, but you’d have to search for the right ones:

Trim Brep with both sides of a plane VR 01.gh (56.5 KB)

There’s a better way to do this.

Namely this:

Trim Brep with both sides of a plane VR 02.gh (42.6 KB)

1 Like

I saw that differently . Shouldn’t we first solid union the extrusion ? and I think the planes are duplicated , which I can’t see why .
I assume we have 4 frames that should join together first

Very interesting idea. I thought about an extrusion, but the loft actually makes sense. Thanks!

I don’t know. It may be important to keep the different parts of the frame profile separate for later in the script as they are likely separate members in reality.

I have duplicated and paired the end cutting surfaces into a branches for each of the window sides, since this is what the Split Brep Multiple component demands. Not sure if this is what you mean by duplicated.

1 Like

Wood, plastic or metal?

Likely metal, judging by the profiles. Metal/plastic combo.

1 Like

Metal. Steel profiles.

It is just the principle. You will have to use a different method from loft for non-linear members, and I wouldn’t rely on the planes for surfaces of the correct size.

Yes you are right we should keep the parts separate . Thanks for clarification

For a full context, I’m trying to create a procedure where I can create the 3D profile extrusion automatically.

I’m starting with the outer frames for now, assuming that every side has the same profile. After the procedure is rock solid, I’ll try to expand it, adding step by step:

  1. vertical and horizontal divisions
  2. Possibility to have different profiles for each edge
  3. Add window doors.

Im just at the beginning, trying to see what could work (there’s also a bit of problems with how I create the vectors for the bisector). I can see that loft wouldn’t work for Arcs for example, but now that I have an idea of how it works I can figure something out. Thanks again!

to late now for the reply

i have used sasquatch plugin to fix it just for your information

Trim Brep with both sides of a plane VR 02_rp00.gh (30.3 KB)

1 Like

Thanks. I don’t know this plugin, so that’s good information anyway. I’ll check it.

for the curved and twisted profiles you can try flow along method

this should solve your issues

Yes, after the first solution I was thinking that something that works like sweep would still work then for curved profiles.

sweep is good option
when u have hollow profiles and split them and then making it to closed brep is difficult part
in sweep case u can use Boolean difference