cture, Rhino treats them as a single flat list. For example a surface can have 10 rows and 6 columns of control-points, resulting in a list of 60 points.
But 10 times 6 isn't the only way to get to 60. If you want to make a surface out of a list of 60 points, you'll also have to tell Rhino how those 60 points should be interpreted in terms of a grid. It could be 2*30, 3*20, 4*15, 5*12, 6*10, and all of the aforementioned products the other way around.
Sometimes there's only one way for a number of points to fit into a rectangular grid. For example if you provide 49 points, then 7*7 is the only way to make it work, but these cases are rare so we always demand you give us all the information required to actually make a rectangular grid of control-points from a linear collection.
As for "Why is it, sometimes we need to attach additional value into it?", this is usually because when you divide a domain or a curve into N segments, you end up with N+1 points. For example take the domain {0 to 5}, and divide it into 5 equal subdomains. You end up with {0 to 1}, {1 to 2}, {2 to 3}, {3 to 4} and {4 to 5}. However there are six numbers that mark the transitions between these domains 0, 1, 2, 3, 4 and 5. This is why you often have to add 1 to the UCount, because the number that controls the UCount often results in N+1 actual points.…
Added by David Rutten at 8:30am on December 25, 2014
per components.
I have attached a 3dm file and a picture so you guys can see what I am talking about.
I have previously translated boxes into breps, which i did with this code:
Dim bbx As New box(pl, New interval(-.5, .5), New interval(-.5, .5), New interval(-.5, .5)) Dim ms As New Mesh() ms.Vertices.AddVertices(bbx.GetCorners) ms.Faces.AddFace(0, 1, 2, 3) ms.Faces.AddFace(0, 1, 5, 4) ms.Faces.AddFace(1, 2, 6, 5) ms.Faces.AddFace(2, 3, 7, 6) ms.Faces.AddFace(3, 0, 4, 7) ms.faces.addface(4, 5, 6, 7) ms.Normals.ComputeNormals()
ms.Compact()
I have tried to do something similar with this specific example, and I now that meshes only consist of quads or triangles, so i broke down the geometry into quads without any succes.
Looking foreward to any suggestions.
- Jens…
{0;1;0}N=6
{0;1;1}N=6
{0;1;2}N=5
{0;2;0}N=7
{0;2;1}N=8
{0;2;2}N=9
Can you shift and wrap any of the paths A B or C?
Say if I wanted to shift and wrap B by 1 to get the following...
{0;0;0}N=7
{0;0;1}N=8
{0;0;2}N=9
{0;1;0}N=3
{0;1;1}N=2
{0;1;2}N=5
{0;2;0}N=6
{0;2;1}N=6
{0;2;2}N=5…
Integer = 0 To 9
val *= 2
lst.Add(val)
Next
Since val is a ValueType, when we assign it to the list we actually put a copy of val into the list. Thus, the list contains the following memory layout:
[0] = 2
[1] = 4
[2] = 8
[3] = 16
[4] = 32
[5] = 64
[6] = 128
[7] = 256
[8] = 512
[9] = 1024
Now let's assume we do the same, but with OnLines:
Dim ln As New OnLine(A, B)
Dim lst As New List(Of OnLine)
For i As Integer = 0 To 9
ln.Transform(xform)
lst.Add(ln)
Next
When we declare ln on line 1, it is assigned an address in memory, say "24 Bell Ave." Then we modify that one line over and over, and keep on adding the same address to lst. Thus, the memory layout of lst is now:
[0] = "24 Bell Ave."
[1] = "24 Bell Ave."
[2] = "24 Bell Ave."
[3] = "24 Bell Ave."
[4] = "24 Bell Ave."
[5] = "24 Bell Ave."
[6] = "24 Bell Ave."
[7] = "24 Bell Ave."
[8] = "24 Bell Ave."
[9] = "24 Bell Ave."
To do this properly, we need to create a unique line for every element in lst:
Dim lst As New List(Of OnLine)
For i As Integer = 0 To 9
Dim ln As New OnLine(A, B)
ln.Transform(xform)
lst.Add(ln)
Next
Now, ln is constructed not just once, but whenever the loop runs. And every time it is constructed, a new piece of memory is reserved for it and a new address is created. So now the list memory layout is:
[0] = "24 Bell Ave."
[1] = "12 Pike St."
[2] = "377 The Pines"
[3] = "3670 Woodland Park Ave."
[4] = "99 Zoo Ln."
[5] = "13a District Rd."
[6] = "2 Penny Lane"
[7] = "10 Broadway"
[8] = "225 Franklin Ave."
[9] = "420 Paper St."
--
David Rutten
david@mcneel.com
Poprad, Slovakia…
Added by David Rutten at 6:26am on September 9, 2010
zed like this:
{0}
0 Surface 1
{1}
0 Surface 2
1 Surface 3
2 Surface 4
{2}
0 Surface 5
1 Surface 6
{3}
0 Surface 7
1 Surface 8
2 Surface 9
And not like this (which is what i have when select tehm with "multiple surfaces")
{0}
0 Surface 1
1 Surface 2
.....
7 Surface 8
8 Surface 9
Thanks a lot for your help: it is a very frequent issue and i would like to fix it.
Regards
…
ements between mid axes of elements ( being perpendicular to both). On the attached image, the links are the small elements connectiong nodes 4 to 5, 6 to 7 and 8 to 9. All nodes (1 to 9 including 1', 2', 3') are defined in Karamba as fixed supports but nodes 1,1', 2, 2', 3, and 3' have hinges added with the beam joint component. The freed rotations are shown on the figure.
I wondered if that was the correct way of defining such a structure in Karamba bearing in mind that nodes 1', 2' and3' are free nodes in the reality.
Thanks again for your help !
Yousef…