Region Union for surfaces where not all of them are coplanar

Hello, I would like to know what would be a good approach to carry out a region Union + boundary surface on a group of surfaces (my goal is to convert them into 1 single surface) where not all of them are coplanar.
Image as reference



Thanks in advance

How do you create a single surface out of non-coplanar ones?
(topologically speaking)

These objects don’t look like surfaces. The triangulated look hints these objects were meshes at some point. Anyway. You can use the Mesh Shadow component or project the outlines to a plane.

Hello, well not exactly, I may have not explained well. I would like there to be, in this particular example, 3 surfaces (3 rectangles). Right now every desired rectangle is composed by many surfaces, which complicates things for the purpose of my work.

See attached that plays ball with BrepFaces. Change faceIdx and see how it works.

BTW: accepts any N of Breps with any “Face plane” [Note: Faces must be planar - notify if you want the general case]. Inner/Outer Face Loops are listed as well.

BrepFace_LoopsBoolean_EntryLevel_V1.gh (126.5 KB)

Hello,

Thanks for the help. In my case, not all breps will be in the same plane. I appreciate your workflow as it will definitely come in handy for other purposes.

Well … that was just an indication. Get the more pragmatic build. Have in mind that Curves (in Outer/Inner BrepFace Loops have an impact on the Elapsed time because Curve Bool Methods are way slower).

BrepFace_LoopsBoolean_EntryLevel_V1A.gh (243.0 KB)

1 Like

Nice definition. It is possible to separate the innerLoopsList in two categories? One category to be the innerLoopsPassThrough for curves that do pass through the object (inner holes into parts) and another one innerLoopsPockets that do have the innerLoops for pockets that do not pass through the parts?

BrepFace_LoopsBoolean_innerLoops.gh.3dm (171.8 KB)

Very easy: it’s an elementary PlanarCurveRelation check - RC has a related Method for that (BTW: I assume that we are talking about the projected Curves [ to the BrepFace Plane picked])

But in fact if you want to fully monitor things … then a proper Class (with suitable Properties for every Loop) is the way to go (also very easy).

Say:

public class LINFO {
public int PARIDX {get;set;}
public int LIDX {get;set;}
public Curve LOOP {get;set;}
public Curve PROJLOOP {get;set;}
public bool INNER {get;set;}
public List< int > STATE {get;set;}

public LINFO (blah, blah){

}
}

BTW: if your R file gives some indication about your goal post it here in R5 format.

I do need to extract the inner holes from the parts using the top view of the parts. For this I do need to separate all the internal contours into pass-through and pockets.
BrepFace_LoopsBoolean_innerLoops.3dm (167.4 KB)

Well …

Any valid and manifold Brep is the collection of objects called BrepFaces (one or more). Each BF has a single OuterLoop (of Type Curve) while may or may not have InnerLoops (“holes” of Type Curve). There’s RC Methods that tell us what is what (i.e. the Type of any Loop). Plus there’s Methods that tell us various other things about BF (for instance if they are planar up to some tol etc etc). Plus there’s RC Methods that expose the connectivity of the 3 classes of objects involved (Vertices, Edges, Faces - kinda the ones in a Mesh)

What means parts? Maybe Breps? What means TopView? Maybe the Plane.WorldXY? What means pockets? Maybe IneerLoops? What means pass-though? Maybe an InnerLoop check VS all the other InnerLoops? related with the projected Curves relation?

For the latter: assume that we project all the InnerLoops to some Plane while we know the Parent Face and the index of the Loop (that’s elementary). Now … we have a collection of co-planar Curves. Do you want explicit info (meaning any action imaginable) related with the Loop/Loop relation? Meaning: using the PlanarClosedCurveRelationship Method in RC speak (i.e. this contains that, this is disjoined to that, this intersects with that … blah, blah).

In terms of coding this would, say, require a List of “enums/relations” (defined via some proper Class).

It’s rather better to expose your final goal: what you want to do after finding whatever you are searching?

In the mean time: the attached projects Loops to a user defined Plane (if the projection is invalid is skipped). See inside C# about what the path dimensions mean (When a future Class is defined these provide the unique ID of any given Loop - including the Type [3rd dim: 0 outer, 1 inner]).

BrepFace_LoopsRelations_V1.gh (24.5 KB)

I have NOT implemented any projected Loop relation and/or action (VS the other Loops) because I’m not sure about what exactly are you after.

1 Like

Yes, I do use only the Plane.WorldXY for projections and I do need to extract the InnerLoops (“holes” of Type Curve ) of the BREPS. I do need this curves to be able to cut that shapes on a CNC machine.

Imagine you are shooting a light from top view and you want to capture the shadow projected through the BREPS with inner holes where the light can pass through the empty space if there it is any. I used the Make2D but that produces meshes and I do need NURBS curves.

No it doesn’t. Each Projected Loop (with unique ID combo) is stored:

  1. Case Outer > In a 3 dim path (1st: brep idx, 2nd: face idx, 3rd: 0);
  2. Case Inner > In a 4 dim path (1st: brep idx, 2nd: face idx, 3rd: 1, 4th: loop idx);

Just for the fun of it I’ll add - soon - Curve (i.e. projected Loops) relations against any other.

Edited my previous post for better understanding.