all the pt as it used to do in the older sdk. The following is the code i been working on someone see if the 2d array is not written properly. Thanks a bunch
Private Sub RunScript(ByVal state As List(Of Integer), ByVal pts As List(Of Point3d), ByVal xNum As Integer, ByVal yNum As Integer, ByVal zNum As Integer, ByVal gen As Integer, ByRef outPts As Object, ByRef B As Object)
Dim grid(xNum,yNum) As point3d
generateGrid(pts, xNum, yNum, zNum, grid)
Dim nPt As New List(Of Point3d)
For i As Integer = 0 To xNum - 1
For j As Integer = 0 To yNum - 1
nPt.Add(grid(i, j))
Next
Next
outPts = nPt
End Sub
'<Custom additional code>
Sub generateGrid(ByVal pts As List(Of point3d), ByVal xNum As Integer, ByVal yNum As Integer, ByVal zNum As Integer, ByRef grid As point3d(,))
Dim x, y, z As Integer
For i As Integer = 0 To pts.Count - 1 Step xNum
x = 0
y = 0
z = 0
For j As Integer = i To i + yNum - 1
Dim pt As Point3d
pt = pts(j)
grid(x, y) = pt
y += 1
Next
x += 1
Next
End Sub
'</Custom additional code>
End Class…
Added by Kyle Chou at 8:37pm on September 20, 2010
ld be the best UI.
I think difference is made by 'Slider = 10' vs 'Slider = 10.000' more than by simple input/component initialization so, why to stop when it could be even more powerful?
Slider = 0 To 5 --- Slider in [0, 5]
Slider = {3; 0 To 5}
Slider = {3;0;5}
Slider = 3;0;5
Slider = 3 0:5
Slider = 3,0,5
Slider = 3 0 5 --- Value and range (min max)
3 0.0 5 --- 3.0 0.0 5.0
3 0 5.0 --- 3.0 0.0 5.0
3.0 0 5 --- 3.0 0.0 5.0
-1 0 5 --- 0 0 5 (-1 -1 5)
6 0 5 --- 5 0 5 (6 0 6)
Slider = 0:2:6 --- Even numbers: 0, 2, 4, 6.
Slider = 1:2:7 --- Odd numbers: 1, 3, 5, 7.
0:2:5 --- 0:2:4 (or 0:2:6)
3:2:8 --- 3:2:7 (or 3:2:9)
3 1:2:7 --- 1 3 5 7 (value 3)
Bang! = 7 --- 7 outputs
Merge = 5 --- 5 inputs
What's your opinion about Bang! = 7? As it's setting number of inputs, should it use different format? Bang! 7? Bang! (7)? Bang! i7?
+ * - / \ % ^ & | ! = > --- Addition, Multiplication, Subtraction, Division, Integer Division, Modulus, Power, AND, OR, NOT, Larger than, &c.
= could be a problem.
\ Integer division or Set difference?
! could be NOT but also Factorial.
| could mean intersection.
& could mean concatenate.
1+ --- Addition: input A = 1
2* --- Multiplication: input A = 2
+{0,1,1} --- Addition: input B = {0,1,1}
0-, 1/, 2^, 10^, e^ have their own components
Flatten = {7} or Flatten = 7 --- Input P = {7} (off-topic: Why can’t P be a list?)
Pt = {1, 2, 3} --- Point XYZ, X = 1, Y = 2, Z = 3.
Swatch = 129,239,231 (102)
Swatch = 129 139 231 102
F2 = "x^2+y"
"List Length" and "List Insert" don't work properly: "Value List" is choosen. Why? What's the reason to this choice? Well, I'd like to know how the whole thing (search by keywords) works, David.
Name and nickname can be now used as keywords. "Larger" works for ">" but "greater" doesn't. Could it be improved? Could synonyms be used? Could a short description even be used (I know this could be a bit weird)?
more than --- >
more or less --- Similarity
more less --- Similarity
red green --- Sets.List components should be showed
lightning --- Split Tree
What about use Curve.Analysis or Math.Boolean to display those Tab.Panel components? Param, Math, Sets, Vector? Primitive, Special, Util? Tab, Panel, and Tab.Panel as keywords.
At the moment that I write this, I check that ignoring accents in keywords has almost been included (0.8.0009): p`anel, pañel, pánel --- panel (almost)
Shouldn’t 'Dom2' work for Dom²?
What about nested search? You type some keywords (say 'Params' or 'Params.Geometry', or 'red green', or 'lst') and then you make a fine-tunning search over previous results/keywords. Tab.Panel and/or nested geometry could be useful when search by plug-in is desired or when you want to search among .ghuser components (first 'ghuser' or 'Extra.MyPlugIn' or 'lst' keyword and then fine-tunning, specific, search).
Is 'list length' performing this nested search right now ('lst' > 'length')? Anyway, I am thinking about UI (graphical) changes; successive searches.
As I said, description (and even words from the help info) could be used to search. What about "some kind of tags"? I mean that if 'list l' to finally choose List Length has been used for a while, that could be learned. Eventually, an XML file could store these tags, so you could even edit them. That could implement description, name, nickname, help info, Tab.Panel, .ghuser, synonyms (lots of them), tags/shortcuts or wathever.
How could flatten/graft/reverse be used? Initialize graft+Simplify or graft+Bang! could be really useful.
What about expressions? I don't how could it be done properly: would Slider = x^2 (expression) work? I mean, aren't expressions parsed when initializing?
Is Panel somehow doing this? 'panel = wathever' always suppose that wathever is a string, so you can't use 'panel = <pi>'. Sets.Strings components also do this.
I've been about to write several paragraphs about height/width (resizable components: Panel, Graph Mapper, Slider, &c.), input/output names (Scripts, F components; or any component with editable input/output names), orientation (Scribble), type hint and access option, nickname, &c. but, to sum up: being able to set any property when initializing would be really useful. I'd like to know the best choice of syntax but I'm sure that, David, you're closer to the answer. What do you think about this?
Slider: 3 0 5 "MySlider" "Slider^2"
Panel: "This is the content" "This is the title"
VB: "N" List Integer 7 "r" Item Double
Addition: A 1 B 2
I guess that any unified syntax would be elegant and useful, but additional ad hoc syntax (per component) could be even better (cleaner).
What about use lists of values? I'm not sure about format: panel = ("Hello", "Bonjour", "Hola")? If any valid format/syntax is found, maybe more sophisticated fetaures could be achieved: panel = {0;0} ("A", "B", "C") {0;1} ("1", "2", "3") How would you like this to be implemented?
There is a much simpler and interesting feature that would be useful, in my opinion: being able to initialize more than one component. I mean say 7xSlider = 10.0 and get 7 sliders and I also mean multiline (multi-component) initialization: Ctrl+Intro when you want to start a new line and Intro (or even some Accept/Cancel buttons when you activate multiline mode) to initialize (every line/component), for example. I mean:
3 x Slider = 1
Panel
Mass addition
Panel
And the whole bunch of components that were in mind (pre-thinked definition) is initialized. It speeds up the workflow, making more dynamic to add components that are only available via the drop-down panels.
Should this multiplier be something like a text box adjacent to search field more than '7x'?
These are some of my thoughts about intitializing. Please let me know your opinion :]
…
in different locations. If you search for PanelingTools.rhp, just one should turn out, and in the same folder, you should see 3 other files. See attached.
…
display point by mouse clicks.
My simple code following but failed:
import rhinoscriptsyntax as rs
import Rhino
import System.Drawing
while 1: pt = Rhino.Input.Custom.GetPoint()
pt.Get()
c = pt.Point()
print (c)
print(type(c))
Rhino.Display.DisplayPipeline.DrawPoint(c,System.Drawing.Color.Blue)
Someother problems: 1. How to Capture mouse events
2. can somebody explain the 'gp.DynamicDraw += GetPointDynamicDrawFunc' means.
How did the '+=' works to hook on the function.…
JILLA
-and when i look at the output values for SPRINGS and REJILLA, both
are modified by the operator!
so my question is:
how can i introduce a list in vb and keep it non-modified (while i
operate with another one created in vb that has inherited its values)
the script:
thanks a lot!
jorge
Sub RunScript(ByVal puntos As List(Of On3dPoint), ByVal springs As List
(Of On3dPoint), ByVal k As Double, ByVal m As Double, ByVal iter As
Integer, ByVal num_f As Integer, ByVal num_c As Integer)
Dim i As Int16
Dim p0 As New On3dPoint()
Dim cont As Int16
Dim num_i As Integer
num_i = num_f + 2
Dim num_j As Integer
num_j = num_c + 2
Dim max_i As Integer
max_i = num_f - 1
Dim max_j As Integer
max_j = num_c - 1
Dim j As Integer
Dim p_max As Integer
Dim p_list As New List(Of On3dPoint)
p_max = springs.Count() - (num_f + num_c)
Dim rejilla As New List(Of On3dPoint)
For i = num_j To p_max Step num_j - 1
For j = i To i + num_c - 2
rejilla.add(springs(j))
Next
Next
While cont < iter
For i = 0 To rejilla.count() - 1
rejilla(i).x += 3
rejilla(i).y += 4
rejilla(i).z += 6
print("posicion " & rejilla(i).x & " " & rejilla(i).y & " " &
rejilla(i).z)
Next
cont += 1
End While
SP = springs
RJ = rejilla
PT = puntos…
JILLA
-and when i look at the output values for SPRINGS and REJILLA, both
are modified by the operator!
so my question is:
how can i introduce a list in vb and keep it non-modified (while i
operate with another one created in vb that has inherited its values)
the script:
thanks a lot!
jorge
Sub RunScript(ByVal puntos As List(Of On3dPoint), ByVal springs As List
(Of On3dPoint), ByVal k As Double, ByVal m As Double, ByVal iter As
Integer, ByVal num_f As Integer, ByVal num_c As Integer)
Dim i As Int16
Dim p0 As New On3dPoint()
Dim cont As Int16
Dim num_i As Integer
num_i = num_f + 2
Dim num_j As Integer
num_j = num_c + 2
Dim max_i As Integer
max_i = num_f - 1
Dim max_j As Integer
max_j = num_c - 1
Dim j As Integer
Dim p_max As Integer
Dim p_list As New List(Of On3dPoint)
p_max = springs.Count() - (num_f + num_c)
Dim rejilla As New List(Of On3dPoint)
For i = num_j To p_max Step num_j - 1
For j = i To i + num_c - 2
rejilla.add(springs(j))
Next
Next
While cont < iter
For i = 0 To rejilla.count() - 1
rejilla(i).x += 3
rejilla(i).y += 4
rejilla(i).z += 6
print("posicion " & rejilla(i).x & " " & rejilla(i).y & " " &
rejilla(i).z)
Next
cont += 1
End While
SP = springs
RJ = rejilla
PT = puntos…
ore simplest way, for example i need to declare min distance (minDist) like huge number to avoid overlapping values. may be find way do not use second loop in script at all . In the neoarchaic's script has line 99 (j = pts.ClosestIndex(pt)) but i have no idea how to do it in C#.
2. In a file i prepared GH+Hoopsnake and GH+Anemone solution for this script . Can i use the same principle in C# (shipt list with wrap values )? This solution I need for studying list operations in C#.
Thank you for helping .
ps..My script:
int num = x.Count; double minDist,dist; int minI = 0; int i = 0;
Point3d pt; List<Point3d> z = new List<Point3d>();
while (i < num) { i++; z.Add(x[minI]); pt = x[minI]; minDist = 1000000000000; x.RemoveAt(minI);
for (int n = 0; n < x.Count; n++){
dist = x[n].DistanceTo(pt);
if ( dist < minDist) { minI = n; minDist = dist; } } } A = z;
…
t the points to move in the x y or z, instead of a more offset move. I would also like to alternate each point on the line so the first point moves out 1 mm and the next point moves in -1mm. Any suggestions would be very appreciated. Thank you.
…
have the latest GH 0.9.0006
2- Download and run the latest PanelingTools PT-GH installer for Rhino 5.0 (Windows 32 or 64).
Look forward to your feedback.
Enjoy!
Rajaa Issa
Robert McNeel & Associates
-------------------
New in this release:
-------------------
- PanelingTools rhi Installer now installs both PanelingTools plugin and PT-GH Add-On and save under (%appdata%\McNeel\Rhinoceros\5.0\Plug-ins\PanelingTools\...). Grasshopper 0.9 can now handle looking for ".gha" Add-On files in folders other than GH special components folder. You do not need to move files anywhere and it is strongly recommended to leave it where the installer puts them to handle future automatic updates and recovery.
- The release includes a major rewrite of all PT-GH components to handle multiple grid creation and paneling. Here is an example image of how it looks now with multiple grid input and paneling:
…