Hi all,
Im looking for a quick way to rotate the UV direction of (simple) polysurfaces.
Is this possible without remodeling?
thanks,
Tobias
Hi all,
Im looking for a quick way to rotate the UV direction of (simple) polysurfaces.
Is this possible without remodeling?
thanks,
Tobias
Hi Tobias,
I think that would require for the face to be âreconstructedâ, as it is the base surface that needs to be re-oriented.
What is your goal in rotating the UV? Is this for rendering purposes or do you need the geometric definitions to be oriented different?
How simple are these object? If they are extruded like the example it might be not that hard to script.
-Willem
Hi Willem,
Thanks for your answer. Indeed the underlying base surface has to be rotated and my question is exactly about that: if there is a quick way to rotate that base surface. And no, itâs not about rendering and texture mapping.
The objects are pretty simple, like the example: extruded planar curves. I thought about scripting too. It should be doable, but I havenât found the right approach how to do this.
thanks, Tobias
Well depending on what scripting tool you use - I guess you would need to extract the surface(s) in question and then you would need a reference - for âautomaticâ I might try to find the longest edge of the surface and get a tangent vector (assuming straight), plus the surface plane and border curve. Then rotate the surface plane so its X axis is parallel to the tangent vector, get the bounding box of the border curve in that plane, construct a plane surface along that plane a little bigger than the bounding box, then trim the plane with the border. Afterwards shrink the surface if you want, and rejoin all.
If you work in Python a bunch of the extraction/construction can be done in RhinoCommon with geometry that doesnât have to be added to the document, but I think all the tools are there to work with vanilla vb rhinoscript as well. It is a fair amount of work to do though.
As an afterthought, you might try running this script from my library on your objects - it uses Rhinoâs automatic routines to re-create planar surfaces, but it might actually âstraighten outâ your UVâs in a number of cases as wellâŚ
SimplifyPlanarPolySrfs.rvb (2.1 KB)
âMitch
Hi Mitch,
Thanks a bunch for that script. It just simply does what I was looking for!! Great!
The âstraighten outâ of UVâs is very much welcome too!
thanks, Tobias