the curves on surface issue it's solved seting flatten to the surface control point output. Still didnt know how to group points like:
1;1, 2;2, 3;3.....
1;2, 2;3, 3;4....
1;3, 2;4, 3;5...
....
{1;1;4}{1;1;5}{1;2;0}{1;2;1}{1;2;2}{1;2;3}{1;2;4}{1;2;5}{1;3;0}{1;3;1}{1;3;2}{1;3;3}{1;3;4}{1;3;5}
etc...
and I want to format as a text it so it replaces the innermost branch with a letter so {0;0;1} would read A-0-1. I am able to replace all the symbols using replace text but am no sure if there's a way to convert a number to a letter.…
Added by Ryan Whitby at 12:40pm on February 3, 2015
etc.
Group 2 - 1, 6, 11, 16, 21 etc.
Group 3 - 2, 7, 12, 17, 22 etc.
Group 4 - 3, 8, 13, 18, 23 etc.
Group 5 - 4, 9, 14, 19, 24 etc. "
except in data, the branches start at 0, so 'group 1' is branch 0
as for the order of your points, that depends on the input prior sorting...
yrs …
What are B and C supposed to be? I mean, they have to resolve to actual numbers.
So given the tree:
{0} [0;1;2;3]
{1} [0;1;2;3]
{2} [0;1;2;3]
{3} [0;1;2;3]
What is it you're after?
Added by David Rutten at 8:59am on October 21, 2017
nput parameter and then set the named values on the second?
protected override void BeforeSolveInstance() { Param_Integer param0 = Params.Input[0] as Param_Integer; Param_Integer param1 = Params.Input[1] as Param_Integer; param1.ClearNamedValues();
GH_Structure<GH_Integer> data = param0.VolatileData as GH_Structure<GH_Integer>; if (data.IsEmpty) return; foreach (GH_Integer value in data.AllData(true)) { switch (value.Value) { case 1: param1.AddNamedValue("First option for 1", 11); param1.AddNamedValue("Second option for 1", 12); param1.AddNamedValue("Third option for 1", 13); break;
case 2: param1.AddNamedValue("First option for 2", 21); param1.AddNamedValue("Second option for 2", 22); param1.AddNamedValue("Third option for 2", 23); break;
case 3: param1.AddNamedValue("First option for 3", 31); param1.AddNamedValue("Second option for 3", 32); param1.AddNamedValue("Third option for 3", 33); break; } return; } }
--
David Rutten
david@mcneel.com…
Added by David Rutten at 1:56am on December 18, 2013
0, 5, 10, 15, 20
1, 6, 11, 16, 21
2, 7, 12, 17, 22
3, 8, 13, 18, 23
4, 9, 14, 19, 24
and if i'm here is because i'm not able... :)
can you help me?
thank you
…
Here it the RhinoScript that I am using:
'Option Explicit
'Rem Script written by Giulio
'Rem Script version lunes, 10 de noviembre de 2008 21:00:00
'Rem This script is licenced to you under the conditions shown at
'Rem http://www.giuliopiacentino.com/this/
Call Main()
Sub Main()'starts command
Dim arrLfStart(),arrRxStart(), arrLfEnd(), arrRxEnd(), arrLinks(), i 'sets intergers
Dim links: links = 36 'number of cylinders (links)
ReDim arrLfStart(links), arrRxStart(links), arrLfEnd(links), arrRxEnd(links), arrLinks(links) 'combines integer with number
Dim angleDist:angleDist = Rhino.PI / 10
For i=0 To links 'sets integer
'The following sets the path
arrLfStart(i) = Array(Cos(i-angleDist)*3 + Cos(i*12)*12, Sin(i-angleDist)*3 + Sin(i*12)*12, i*5)
arrRxStart(i) = Array(Cos(i+angleDist)*3 + Cos(i*12)*12, Sin(i+angleDist)*3 + Sin(i*12)*12, i*5)
arrLfEnd(i) = Array(-Cos(i-angleDist)*3 + Cos(i*12)*12, -Sin(i-angleDist)*3 + Sin(i*12)*12, i*5)
arrRxEnd(i) = Array(-Cos(i+angleDist)*3 + Cos(i*12)*12, -Sin(i+angleDist)*3 + Sin(i*12)*12, i*5)
'The following adds cylindars according to specified points
Call Rhino.AddCylinder(IntraPts(arrLfStart(i), arrRxStart(i), 0.5), IntraPts(arrLfEnd(i), arrRxEnd(i), 0.5), 0.5)
Next
'The following adds surfaces to the path
Call Rhino.AddLoftSrf(Array(Rhino.AddInterpCurve(arrLfStart), Rhino.AddInterpCurve(arrRxStart)))
Call Rhino.AddLoftSrf(Array(Rhino.AddInterpCurve(arrLfEnd), Rhino.AddInterpCurve(arrRxEnd)))
End Sub
Function IntraPts(byRef p1, byRef p2,byRef n)
'Rem This function gives the first point out if you use n=0,
'Rem with n=1 it gives the second point.
IntraPts = Array( p1(0)*(1.0-n)+p2(0)*n, p1(1)*(1.0-n)+p2(1)*n, p1(2)*(1.0-n)+p2(2)*n )
End Function
I know that the script works in RhinoScript. If anyone could help me out I would appreciate it.…
Added by Adam Smith at 1:57pm on September 9, 2010
W, X, Y, Z}
----------------------------------------
and if I set this
SetA = {U, V, W, X, Y, Z}
SetB = {1, 2, 3}
Imap = {2, 2, 2}
I will get this?
result = {U, V, 3, 2, 1, W, X, Y, Z}
----------------------------------
And what if I set this?:
SetA = {U, V, W, X, Y, Z}
SetB = {1, 2, 3}
Imap = {2, 2}…
Added by Frane Zilic at 3:26pm on September 10, 2010