Repeating 'stretchy' element object
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2015-10-06 02:41 PM
2015-10-06
02:41 PM
I have a bunch of LIN_ lines I want to copy around in a grid, but I want to adjust the height and width of the copies a bit to fit the height and width of the object.
I have the following code, but it bugs out:
pen gs_cont_pen aa=0.3466! this is the actual width of the original zz=0.4041!this is the actual height of the original n1=round_int(a/aa)!divide A by the original width to get a round number n2=round_int(zzyzx/zz)!divide ZZYZX by original height to get a round number aaa=a/n1!this should calculate the new width of element zzz=zzyzx/n2!this should calculate the new height of element for herh2 = 1 to n2 !repeat vertical for herh1 = 1 to n1 !repeat horizontal MULX aa/aaa!adjust width to new width MULZ zz/zzz!adjust heigh to new height !! here are all the LIN_ statements for my shape for sake of simplicity, one line LIN_ 0,0,0, 0.3466,0,0.4041 addx aaa !move in x direction next herh1 del n1 addz zzz !move in y direction next herh2Does anyone know where I've made a mistake in the code?
Erwin Edel, Project Lead, Leloup Architecten
www.leloup.nl
ArchiCAD 9-26NED FULL
Windows 10 Pro
Adobe Design Premium CS5
www.leloup.nl
ArchiCAD 9-26NED FULL
Windows 10 Pro
Adobe Design Premium CS5
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2015-10-08 04:36 PM
2015-10-08
04:36 PM
Still playing around with this bit of code
Does anyone have an idea how to make it work?
pen gs_cont_pen aa=0.3466! this is the actual width of the original zz=0.4041!this is the actual height of the original n1=round_int(a/aa)!divide A by the original width to get a round number n2=round_int(zzyzx/zz)!divide ZZYZX by original height to get a round number aaa=a/n1!this should calculate the new width of element zzz=zzyzx/n2!this should calculate the new height of element MULX aa/aaa!adjust width to new width MULZ zz/zzz!adjust heigh to new height for herh2 = 1 to n2 !repeat vertical for herh1 = 1 to n1 !repeat horizontal !! here are all the LIN_ statements for my shape for sake of simplicity, one line BODY -1 LIN_ 0,0,0, 0,0,zz LIN_ 0,0,0, aa,0,0 addx aa !move in x direction next herh1 del n1 addz zz !move in y direction next herh2Small modification, but it still doesn't work like I want it to.
Does anyone have an idea how to make it work?
Erwin Edel, Project Lead, Leloup Architecten
www.leloup.nl
ArchiCAD 9-26NED FULL
Windows 10 Pro
Adobe Design Premium CS5
www.leloup.nl
ArchiCAD 9-26NED FULL
Windows 10 Pro
Adobe Design Premium CS5