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
Facades+ PERFORMANCE is two weeks away. Don't miss out on a great symposium and set of workshops April 11+12 in NYC. 8 Continuing Education Credits for each day.
http://facade.archpaper.com/ny2013/
e input says that a value of 12 should equal 12 PM, but it seems to be showing 11 AM instead. I checked this against Diva, in case I had just forgotten how to read a sun path diagram :P I've attached the sunpath from ladybug and diva, both were set to June 21 at 12 pm. As you can see Ladybug is one hour earlier. Seems to be a bug, and can be dealt with by simply changing the inputs to account for it, but it's misleading that the input says one thing and does another.
Thanks!…
rve
10 curve
11 curve
12 curve
13 curve
...and I'd like to rearrange the order in which the curve are listed, to something like this:
{0,0,0}
0 curve
1 curve
8 curve
9 curve
10 curve
11 curve
2 curve
3 curve
4 curve
5 curve
12 curve
13 curve
6 curve
7 curve
I hope this makes sense.
Thank in advance for any advice,
John…
fault materials...6 RAD materials are loaded1. 2. Downloading OpenStudioMasterTemplate.idf to c:\ladybug\3. Loading EP construction library4. 206 material found in c:\ladybug\OpenStudioMasterTemplate.idf5. 30 windowmaterial found in c:\ladybug\OpenStudioMasterTemplate.idf6. 284 construction found in c:\ladybug\OpenStudioMasterTemplate.idf7. Loading EP schedules...8. The ScheduleTypeLimits: Fraction is already existed in the libaray.You need to rename this ScheduleTypeLimits.9. The ScheduleTypeLimits: Temperature 7 is already existed in the libaray.You need to rename this ScheduleTypeLimits.10. 21 scheduletypelimits found in c:\ladybug\OpenStudioMasterTemplate.idf11. 1370 schedule found in c:\ladybug\OpenStudioMasterTemplate.idf12. 13. 14. Hooohooho...Flying!!Vviiiiiiizzz...…
private void DrawRadioButton(Graphics graphics, PointF center, bool checked)
{
if (checked) {
graphics.FillEllipse(Brushes.Black, center.X-6, center.Y-6, 12, 12);
}
else
{
graphics.FillEllipse(Brushes.Black, center.X-6, center.Y-6, 12, 12);
graphics.FillEllipse(Brushes.White, center.X-4, center.Y-4, 8, 8);
}
}
You call this method from within the Render() method and you can draw all the empty and filled circles representing all the radio-buttons you want. If you want to add text, then draw a string next to the circles. If you want squares instead of circles, use FillRectangle instead of FillEllipse and so on and so forth.
--
David Rutten
david@mcneel.com
Poprad, Slovakia…
Added by David Rutten at 10:02am on April 25, 2013
the parameter as the first polyline + the change:
if the first polyline segments was :
pt80{8,9,0}, pt81{10,10,0}, pt82{12,11,0}, pt83{16,11,0}, pt84{19,12,0}...pt89{26,20,0}
then in the new polyline I want it to be (with a change in the x axis of 8 segments)
pt80B{8+8,9,0}, pt81B{10+8,10,0}, pt82B{12+8,11,0}, pt83B{16+8,11,0}, pt84B{19/19+8,12,0}...pt89B{26,20,0}
Thank you for all the help
and you made everything to sound so easy…