advanced openSCAD features and help

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

advanced openSCAD features and help

Loki
I need some help and I've noticed that your not conforming to the rather dazzling array of different ways of doing things with graphics, so I'm hoping that your still in the process of pulling out the stuff I need. 

Ok, for starters, how do I apply a intersection operator over the partial results of a for loop?
it should create a smoothish line thing but looking at the csg tree, it doesn't work like that. 
intersection(){

for(z = [0:5]){

multmatrix (m =[

[1,0,0,z/5],

[0,1,0,0],

[0,0,1,z],

[0,0,0,1]

]){

sphere(r = 1);

}}}


Also, the [3,n] in the zero indexed matrix column doesn't perform shearing like I expected. AFAIK it doesn't do anything.


My real goal is I have a cylinder object, and I want to maintain the bottom radius and gradually pinch the x axis together into a parabolic smooth shape, and elongate the y axis. The purpose is to make a hinge attached to a cylinder.


Thanks, and here is to hoping I'm not too off my rocker!

Lawrence

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: advanced openSCAD features and help

kintel
Administrator
On Jan 7, 2010, at 05:29 , Loki wrote:

> I need some help and I've noticed that your not conforming to the  
> rather dazzling array of different ways of doing things with  
> graphics, so I'm hoping that your still in the process of pulling  
> out the stuff I need.
>
Please point out anything you feel is not conforming to common  
practices. Things can change ;)

> Ok, for starters, how do I apply a intersection operator over the  
> partial results of a for loop?

Use intersection_for() instead of for()

> Also, the [3,n] in the zero indexed matrix column doesn't perform  
> shearing like I expected. AFAIK it doesn't do anything.
>
This is due to a row-major vs. column-major matrix ordering.
Shearing is set by modifying the _last_ vector of the matrix instead  
of the last item of each vector.

> My real goal is I have a cylinder object, and I want to maintain the  
> bottom radius and gradually pinch the x axis together into a  
> parabolic smooth shape, and elongate the y axis. The purpose is to  
> make a hinge attached to a cylinder.
>
I didn't quite get that (time to go to sleep;), so please post the  
object if you get it modeled as you want!

Cheers,

~/= Marius

--
We are Elektropeople for a better living.





Loading...