Swap UV - Grasshopper2024-03-29T06:03:17Zhttps://www.grasshopper3d.com/forum/topics/swap-uv?feed=yes&xn_auth=noHi Damien,
Thanks but I stil…tag:www.grasshopper3d.com,2010-09-23:2985220:Comment:991222010-09-23T08:32:33.679Zleonhttps://www.grasshopper3d.com/profile/leon
Hi Damien,<br />
<br />
Thanks but I still can't get it to work. I'm not too good with the vb thing as yet. The component to] has written sounds perfect for what I need but can't get it to work.<br />
<br />
I am unrolling curved surfaces with the centroid as a referencing point but some surfaces has a switched UV direction and this causes problems with the relative uv points of the curved and flattened surfaces not aligning. I need a guide surface to determine that all the surfaces are uv aligned the same. Just as…
Hi Damien,<br />
<br />
Thanks but I still can't get it to work. I'm not too good with the vb thing as yet. The component to] has written sounds perfect for what I need but can't get it to work.<br />
<br />
I am unrolling curved surfaces with the centroid as a referencing point but some surfaces has a switched UV direction and this causes problems with the relative uv points of the curved and flattened surfaces not aligning. I need a guide surface to determine that all the surfaces are uv aligned the same. Just as this is supposed to do:<br />
<br />
If srf Is Nothing Then<br />
Return<br />
End If<br />
<br />
Dim vec01 As On3dVector = New On3dVector<br />
Dim vec02 As On3dVector = New On3dVector<br />
<br />
If G Is Nothing Then<br />
srf.Transpose()<br />
Else<br />
'Reparameterize<br />
srf.SetDomain(0, 0, 1)<br />
srf.SetDomain(1, 0, 1)<br />
G.SetDomain(0, 0, 1)<br />
G.SetDomain(1, 0, 1)<br />
Dim num1 As Integer = 0<br />
vec01.Set((srf.PointAt(0.5, 0.5).x - srf.PointAt(0.0, 0.5).x), (srf.PointAt(0.5, 0.5).y - srf.PointAt(0.0, 0.5).y), (srf.PointAt(0.5, 0.5).z - srf.PointAt(0.0, 0.5).z))<br />
vec02.Set((G.PointAt(0.5, 0.5).x - G.PointAt(0.0, 0.5).x), (G.PointAt(0.5, 0.5).y - G.PointAt(0.0, 0.5).y), (G.PointAt(0.5, 0.5).z - G.PointAt(0.0, 0.5).z))<br />
num1 = vec01.IsParallelTo(vec02, 1.5707963267948966)<br />
If num1 < 0 Then<br />
srf.Transpose()<br />
End If<br />
End If<br />
<br />
<br />
A = srf<br />
<br />
Any chance you can put this into a working v06.0059 component i can download?<br />
<br />
Many thanks OnSurface.Transpose will stil…tag:www.grasshopper3d.com,2010-09-22:2985220:Comment:988422010-09-22T17:52:54.032ZDamien Alomarhttps://www.grasshopper3d.com/profile/DamienAlomar
OnSurface.Transpose will still do what you're looking for. Is there anything else that you need?
OnSurface.Transpose will still do what you're looking for. Is there anything else that you need?