Help for Deconstructing Brep

I have tried to recreate this:

Remapping Parametric Values From a Surface (Grasshopper Tutorial)

The problem is that I have an organic shaped body.
Since I am new to Grasshopper, I started with a box.

I then want to get the faces of the box and follow the video.

I guess my problem is that I only use one surface of the deconstructed brep in the following code.

Can anyone help me solve this.

Finally, I want to deform the brep using a mesh.
The goal is to deform the brep to get as close to the mesh as possible.

Thank you very much.

Hi,
I think you need read this post firstly and carefully.
It is a guide for new members of this forum about how to express themselves clearly and efficiently.
That post is by the David Rutten who is the creator God of Grasshopper,every new members should not miss it.
After reading and learning, then you can modify your post and attach just part of you def file which is the core of your problem.

1 Like

If you have one BrepFace (general case: a Surface with Trims that yield inner/outer Loops) then if a Mesh is a final target … divide the Face and get your quad Mesh. Variable openings (with some sort of provision to stop the obvious) due to attractors etc is the next step.

If you have a Blob (i.e. a “curvy” Brep as a collection of stiched Faces) then MeshMashine can do a tri Mesh. If you want a quad Mesh … well … I think that there’s some stuff that does that (but I never work with components/add-ons so I can’t recall the name(s)).

Note: if this is some sort of AEC envelope … and you like quads then planarity is your next challenge (planarity in a quad is the min diagonal distance). That said a tri Mesh yields a rigid W truss (if a truss is in the pipeline anyway).