|
|
> I am trying to create circular walls with radius and diameter values or from
> which I can obtain said values. I am trying to stay away from CSG so I am
> thinking of cubic_splines in prisms. I have been studying the code from Block
> Wall Macros specifically the macro Blockwall_Arc(360,"") but it has been
> difficult for me. Is there anybody that can make this code clearer for me...
> tried to find a way to contact Chris Bartlett (I think, who wrote the code but
> he seems very scarce on the net). Any help will be greatly appreciated. I am
> guessing this is OK to include the code here. Perhaps studying it here will make
> it easier for somebody to explain it to me.
>
> Basically, I want to be able to plug in radius and/or diameter values to get a
> circular wall or I would like to use this method but then be able to extract
> radius and/or diameter values from it. Cheers!
>
> // This macro creates a circular (cylindrical) wall or a segment of a circular
> wall.
> //
> #macro Blockwall_Arc (Blockwall_ArcDegrees, Blockwall_BlockType)
> #ifndef(Blockwall_Radius) #declare Blockwall_Radius = 1; #end
> #declare Blockwall_Spline = spline {
> cubic_spline
> #local Blockwall_I = -0.25;
> #while (Blockwall_I<=1.25)
> Blockwall_I, vrotate(Blockwall_Radius*z,
> y*Blockwall_I*Blockwall_ArcDegrees)
> #local Blockwall_I = Blockwall_I + 0.01;
> #end
> }
> object {Blockwall_FollowSpline(Blockwall_BlockType)}
> #end
>
>
>
That macro is not self contained.
First : It create a spline that follows a circular path. For that, it
use an externaly created variable: Blockwall_Radius.
It also use 2 passed parameters: A value in degrees and a reference
value defining what kind of blocks to use.
Then, once the spline is constructed, it use another macro
(Blockwall_FollowSpline) to place blocks along that spline, surely
binded in an union so that you can place the result anywhere you need it.
What this macro _DON'T DO_: Create a prism.
It /DOES/ use CSG as an union of numerous blocks.
Alain
Post a reply to this message
|
|