algorithmic modeling for Rhino
If srf Is Nothing Then
Return
End If
srf.Transpose()
A = srf
If srf Is Nothing Then
Return
End If
Dim vec01 As On3dVector = New On3dVector
Dim vec02 As On3dVector = New On3dVector
If G Is Nothing Then
srf.Transpose()
Else
'Reparameterize
srf.SetDomain(0, 0, 1)
srf.SetDomain(1, 0, 1)
G.SetDomain(0, 0, 1)
G.SetDomain(1, 0, 1)
Dim num1 As Integer = 0
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))
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))
num1 = vec01.IsParallelTo(vec02, 1.5707963267948966)
If num1 < 0 Then
srf.Transpose()
End If
End If
A = srf
if (S == null)
return;
Vector3d vec01 = new Vector3d();
Vector3d vec02 = new Vector3d();
if(G == null)
{
A = S.Transpose();
B = true;
}
else
{
//Reparameterize
Interval I = new Interval(0, 1);
S.SetDomain(0, I);
S.SetDomain(1, I);
G.SetDomain(0, I);
G.SetDomain(1, I);
int num1 = 0;
vec01.Set((S.PointAt(0.5, 0.5).X - S.PointAt(0.0, 0.5).X), (S.PointAt(0.5, 0.5).Y - S.PointAt(0.0, 0.5).Y), (S.PointAt(0.5, 0.5).Z - S.PointAt(0.0, 0.5).Z));
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));
num1 = vec01.IsParallelTo(vec02, 1.5707963267948966);
if (num1 > 0)
{
if (!vec01.Equals(vec02))
{
Surface T ;
T = S.Reverse(0);
A = T.Transpose();
B = true;
}
else
{
A = S.Transpose();
B = true;
}
//if (vec01.
}
else
{
A = S;
B = false;
}
}
Welcome to
Grasshopper
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson. Powered by