It would be useful to have two outputs for the “Brep Wireframe (Wires)” componet : one for the “U” curves, and one for the "V"s.
The wireframe also contains edge curves which can be both or neither u, v aligned.
There are also issues with a ‘single’ u wire being interrupted by trims in one or more places. Should that structure be part of the output as well?
I can see three possible changes to this component:
- Three outputs, one with all edge curves, one with all u aligned interior curves, and one with all v aligned interior curves.
- Three outputs, one with all edge curves, one with all u aligned interior curves ordered by face, and one with all v aligned interior curves ordered by face.
- Three outputs, one with all edge curves, one with all u aligned interior curves ordered by face and then ordered by u-parameter, and one with all v aligned interior curves ordered by face and then ordered by v-parameter.
Actually that’s not true, I can think of one more, which is to output all curves as a flat list, but then also (for each curve) output a textual description which can then be used to filter out the curves you need. This description might look like:
edge, trim=yes, leftface=5, rightface=2
For a wireframe curve which represents a trimmed edge between two faces. Or:
iso, index=1, face=5, u=1.4337
For the second u direction isocurve at parameter 1.4337 on face 5.
To be honnest, I was working on a single untrimmed surface and didn’t realize it bacame quite hairy when considering a multi-faces Brep with trimmed surfaces.
Your textual description idea seems quite elegant and goes way farther than my initial request !
Surface_UV_Lines.gh (12.9 KB)
Thanks, this could be a workaround indeed
It is a quick simple concept and it can be improved a bit. For example the inital input can be brep, then we deconstruct the brep into its surfaces. Then there is a tricky part. We have to check if the surface UV is greater than 3, (that place where i subtract 3 from the UV values which the grasshopper component gives us in order to match the UV lines to the original surface). If it isn´t, then we must maintain the original UV values, if it is, then we subtract 3. But then flip matrix wont work with more than one surface. We will get the U lines, but not the V lines. We have to either sort the V points somehow, or generate all lines and eliminate those matching with the already existing U lines.
Now this is not a solution for all possible surfaces. But it is a workable little thing.
If you manage to make it work, create an User Object so you have it handy any time (and maybe share with us )
Is it possible to get U and V for a mesh using GH?
Depends on the mesh…
Thank you, David!
Here is a post I asked about mesh tube.
I think if the tube mesh can be found U and V, the process will be so easy.
Would you please have a look?
Meshes do not intrinsically have u,v directions. Those directions may be implied by texture coordinates on the vertices, but even then there’s no guarantee they form a nice rectilinear grid. Meshes can pretty much do whatever they want, but surfaces can only ever be deformed versions of a rectangular patch.
Thank you, David, I searched the “texture coordinate of the vertices” but still not clear. Is the component “face boundaries”?
Grasshopper doesn’t deal with texture coordinates at all. The mesh type supports them, but Grasshopper ignores them. You could access them via code though.
Got it! Thank you, David.