Copying along w/ Scale
-
Also, page 449 of the SU users guide pdf has a great step by step tutorial for a fence like this.
Chris
-
I'd love to know how to do it so you have a set amount of copies. It requires a recursively greater offset per COPY, and I can't work that out.
-
There is a DC variable called "copy" It is the # of the current copy. So if the DC is generating the 5th copy, then "copy" = 5. So if you want each copy to be offset from the previous by 10, then for the X attribute you have this:
X=copy*10
That resolves down to X=5*10 , thus making the X position for the 5th copy to be 50. The 2nd copy will be 20, the 100th copy will be 1000.
Does that answer the question? Does that make sense?
Chris
-
Thanks Chris. I'm slowly getting better at the math involved I made a tiling DC today that's central panel does not scale, but the vertical beams do, so it can be whatever size horizontally, but is fixed vertically. Loving these DC's
-
Man, the user guide is great tool. It was kind of hard to find (typing in "Sketchup 7 User Guide" into Google showed no direct links!). I'll study up.
E
-
OK Chris,
I was able to follow the example in the User Manual regarding the DC Picket Fence. The part I don't understand is the "==5+COPY*(Fence!Spacing+LenX). I read the above posts about the "Copy" variable...but what is the "5" for? Also, where do we find a list of the predefined variables such as "Copy".
Thanks for the guidance,
E
-
Page 853 has the most important information on making DC's in my opinion. It describes all the attributes, syntax, mathematical operators, etc. I think it could be even more complete, but its really quite helpful. It will talk about Copies vs. Copy. There really aren't too many variabesl like "copy" though. It might the only one really.
Ok, the 5. It is an offset from the main post. So work it through w/o the 5 first and you get the following (this is using 0-3 for "copy" and 2 for the Fence spacing and 4 for the picket width):
COPY*(Fence!spacing+LenX)
0*(2+4) = 0
1*(2+4) = 6
2*(2+4) = 12
3*(2+4) = 18
etcSo this is setting each "X" 6 inches away from the previous "X", making a nice fence. But the first x is 0, which is also the "X" position of the fist post. So the +5 adds a 5 inch offset to each picket. THe values actually come out as follows:
5
11
17
23So they are all still spaced 6" apart, but they start 5" away from X=0. I hope that makes sense. I included a picket fence model like the one in the example. Play with it. Right now it has the 5+ in there. Take it out and see what that does.
Then if you want to get crazy, try and add another post that always sticks itself to the other end of the fence and puts itself in the right place based on the copies and spacing of pickets.
Hope that helps,
Chris
-
If they arent yet.....geometry and algebra teachers should be using this tool NOW! SU will bring soooo many visual learners into an appreciation for mathmatics. You teach well Chris. Thanks.
-
Allright..startin off the new year neck deep in DC's!! Heres a question in line with copying subcomponents within a DC using this fence model... Is there a way to user-define different types of "pickets" within a DC using the component options dialog? Hidden layers? How does the component options "pick" them or switch their layer "on".
Any Help is Greatly Appreciated.
THanks
-
The way to do that is to make a component of each type of picket. Then they each need a hidden attribute asigned to turn them on or off. Then make add a user defined variable to the outermost fence component. Set it as "Users can select from list". Then it will give you a list that you create. Add a name for each type of picket. Lets say there are 3 picket types. Put them in the list like this:
Plain - 0
Rounded - 1
Ornate - 2So now the user will see the name and can select what type of picket they want, and the menu will return a 1,2 or 3 as its value.
So now you have 3 separate picket components and a menu option for people to choose what type of picket they want. Now you need to hide all components that are not selected. Do this in the hidden attribute. (I need to mention that we'll use "PicketType" as the user defined variable that creates the menu item that the user selects).
Picket 0 should look like this:
Hidden - if("PicketType"=0,0,1)Picket 1 should look like this:
Hidden - if("PicketType"=1,0,1)Picket 2 should look like this:
Hidden - if("PicketType"=2,0,1)That will set each picket component to be visible if the user has selected it from the list. If it is not selected, then it will be invisible. This will be set to all copies of pickets too (I hope).
So give that a shot, let me know if it doesn't work like I think it should,
Chris
Advertisement