I have a simple question. How can i round the vertices of a mesh or a brep. as you can see in the script, the mesh who comes from a cad software, is not precise. so i want to round the vertices and clean the geometry.
there are only two geometries at the moment, but there will be 1500 meshes per floor and 20 floors!!!
so i need some help which is the best way to clean this geometries. plugins?

Note that this method only works on boxes that are square with the âWorld XYâ axes. If you want to handle boxes that are rotated at arbitrary angles, a bit more work is required. Iâd use one of the longer horizontal edges to find the correctly oriented plane for the BBox(Bounding Box).

Thx, that is allready the next question. i will put a script with this caseâŠ I have geometries where i canât use the bounding box. How can i reshape this geometry in an easy way? Maybe with a pluginâŠ IFC GEOMETRY EXAMPLES.gh (6.3 KB)

Oh, thatâs not just rotated, itâs trapezoidal instead of a box.

Here is a hasty (lazy) way that works on the single MESHES_T(one trapezoidal âboxâ) but fails on two of them (the output of Entwine) and fails on either or both of the square boxes from yesterday (MESHES_B).

I tried and failed with MIndex(which doesnât mean it wasnât useful) but managed to come up with a way that appears to work for all three test cases (Value Listin blue/white group), sort ofâŠ

The trouble is that converting the lofted brep to a mesh results in extra points, either at the midpoint of all the edges or duplicates at the corners with Custom Mesh Settings. I donât know why?

FYI, I tried a bunch of different things but wasnât able to rebuild an arbitrary mesh from the ârounded pointsâ (points with their X, Y and Z coordinates rounded to 2 or 3 decimal places, which is the easy part). Perhaps I just donât know enough about meshes. The assumption that there are identical top and bottom surfaces that are aligned vertically is just too limiting, eh?

Well thatâs annoying! I mean that I didnât know that. Construct Mesh doesnât work as desired with vertices alone but accepts the old faces and replaces their vertices with new point values!??? Wow.

And apparently the points can be moved far away from where they were, as I just discovered by modifying the pDecon expressions as follows:

Is there some rationale for this behavior or is this another one of those weird things about GH that one just has to know? Would have saved me a lot of time had I known this yesterday.

Thatâs because the Faces input expects the vertex Indices for creating a face , since you donât change the order you can move the point as you like as long as you donât produce an invalid face.

I think the name"Faces" might be misleading.The vertex order is important for the mesh creation,the same way it is for a polyline. If you imagine the face as a closed polyline it may become clearer.

The only way it makes sense to me is if a face is actually a list of index values that refer to the list of vertices, rather than thinking of a face as a closed polyline?