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
Interesting. Good to know.
What was strange was that 99% percent of them stayed in the same order as before... except 2 or 3 out of the 600 shifted places in the list... : /
s (and God knows how many in the next case) that's why (other than the colossal amount of time (for no reason) required for creating them ... try to bake them and measure the file size).
3 .Most non pros believe that the thing that matters the most in engineering is the geometry. Nothing could be further from the truth. Is about the 5% (complex real-life cases etc etc - but this one is very simple geometry wise and not that simple with regard the whole "ideal" AND effective strategy required).
4. So I've included in this Rhino file attached a small portion of your frames as input for the second C#: CAREFULLY study what it does and most importantly why: it gives you the clear indication about why you should attack this on an assembly/component basis by using instance definitions INSTEAD of recreating 14++ K "solids". The difference in performance is COLOSSAL, not to mention the baked Rhino file size.
5. Using instances is IMPOSSIBLE whiteout code (as is the case in 99% or real-life engineering tasks).
6. Geometry was never an issue on that one (is the 5% max of the whole puzzle no matter requirements you may have).
Bad news:
1. Zoom extends doesn't work after importing your data (maybe a NVidia Quadro K4200 driver issue - who knows?): use saved views stored.
So ...the choice is yours, best, Lord of Darkness…
ound in Burmese Amber.http://news.discovery.com/animals/insects/ancient-ants-in-amber-were-like-todays-social-brawlers-160216.htmFast forward 99 Million years, and we are still kill each other, with our very own thinking brains! Nothing seems to have changed in 99 million years. Yet we have the audacity to think we now going to solve Global Warming? conveniently renamed Climate Change! are you kidding me!…
yep i am sure. take a look at the image. i get some stretching at the corners with a mean value of .2 but 99% of the surface has a mean value of 0.0000022557.
ating. Here's a regex that answers this question though.
^(3[2-9])|([4-9][0-9])$
I say this hoping that you'll appreciate knowing that regexes can handle ranges such as this and can add really interesting functionality for number manipulation. I should add that it does certainly get trickier with larger numbers (e.g. 3-digits or more). I also know that this post is 5 years old, so I presume you may be aware of this by now... Anyways, thought it wouldn't hurt.…
(buy 3 for the price of 2 just for 99$).
"...by offering the software for free to students and teachers. It's infinitely more expensive for a student to use GH over AutoCAD or Revit."
Congrats, you just divided by 0 :D
…