Quantcast

linear extrude thickness

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

linear extrude thickness

vasilis
This post has NOT been accepted by the mailing list yet.
Dear all,

I want to create a spiral with a square cross section. The following code
        linear_extrude(height=51.84, center=true, convexity=10, twist=1866.24)
                translate([14.9075,33.8639,0])
                        square([2,2],true);
takes a square in x/y and extrude it in z however the cross section of the resulted
line is a thin rectangle.
How can I make it thicker, or force the 2D profile to be perpendicular to the extruded path?

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

Re: linear extrude thickness

Parkinbot
Try something like this, to see where it is going. And be aware that the cross section depends on the twist angle. I used a 90° section of a ring to get an easy solution. Try to change this angle to control the "height" of the cross section.

$fn= 100;                        
 linear_extrude(height=51.84, center=true, convexity=10, twist=1866.24)
                       
intersection()
{
  difference()
  {
    circle(38);
    circle(36);
  }
  square(38);
}
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: linear extrude thickness

MichaelAtOz
Administrator
In reply to this post by vasilis
Hi Vasilis,

Welcome to the forum. Your post is still flagged as "This post has NOT been accepted by the mailing list yet", so nobody gets it unless they look.
You need to subscribe to the mailing list, and CLICK THE LINK in the registration email (check your spam folder).
Admin - PM me if you need anything,
or if I've done something stupid...

Unless specifically shown otherwise above, my contribution is in the Public Domain; to the extent possible under law, I have waived all copyright and related or neighbouring rights to this work.
Obviously inclusion of works of previous authors is not included in the above.


The TPP is no simple “trade agreement.” Fight it! http://www.ourfairdeal.org/ time is running out!
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: linear extrude thickness

vasilis
In reply to this post by Parkinbot
Thank you!
I am simply wondering how it works?
Vasilis
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: linear extrude thickness

vasilis
In reply to this post by MichaelAtOz
I've subscribed a few times, but I never received the email, neither it is in the spam

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

Re: linear extrude thickness

Parkinbot
This post was updated on .
In reply to this post by vasilis
linear_extrude() Z-extrudes a 2D object (living in the XY plane) into a 3D object by sweeping the shape along Z for the specified height - internally, a shifted copy of the bottom shape is made and used as top face and "walls" are added around the outlines to "connect" the two faces into a water-tight 3D-object.

When you specify a twist parameter, the linear_extrude() operator will also Z-rotate the 2D shape during the Z-extrusion. To get some approximation of a "round" object, the extrusion path is cut into little slices and the top face of each new slice that is added is Z-translated and Z-rotated a bit against the bottom face (when constructing the 3D object, obviously only the walls are added plus the very first bottom face and the very last top face). Say you want 100 slices ($fn=100), a height of 10 and a twist angle of 1000. Then obviously, each slice will have its bottom face Z-translated by 0.1 and Z-rotated by 10. It is easy to visualize the behaviour of linear_extrude() with a stack of cards or beer mats.

Now think about the first slice. It is exacly the shape that your final object "pierces" through the XY-plane.
So if you want to construct some coiled design with linear_extrude(), you have to find this shape and use it as operand. In the case of a coil with a square as "cross section" this is easy, because it is the section of a ring - see the solution I showed you with my last post. A round cross section is much more difficult

Note, that all this is only necessary because linear_extrude expects a 2D object living on the XY plane to do, what it does.

OpenSCAD has no built-in operator that does what you want. However, there are of course solutions. The more basic approach builds upon the built-in hull() operator. But it renders quite slow, because OpenSCAD is very slow when it has to calculate the union of hundreds of little objects. Other, more advanced solutions build upon libraries implementing sweep() or skin() modules, and thus operate exactly as you expected linear_extrude() to do. They also render very fast, because they compute all the data necessary to describe the final 3D object and finally call polyhedron(), the most powerful and general OpenSCAD built-in module.

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

Re: linear extrude thickness

vasilis
This post has NOT been accepted by the mailing list yet.
In reply to this post by vasilis
Ok I see I have to create the projection of the square cross section with the angle of the helix
Thanks
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: linear extrude thickness

MichaelAtOz
Administrator
In reply to this post by vasilis
vasilis wrote
I've subscribed a few times, but I never received the email, neither it is in the spam

Vasilis
I'll send you an invite.
Admin - PM me if you need anything,
or if I've done something stupid...

Unless specifically shown otherwise above, my contribution is in the Public Domain; to the extent possible under law, I have waived all copyright and related or neighbouring rights to this work.
Obviously inclusion of works of previous authors is not included in the above.


The TPP is no simple “trade agreement.” Fight it! http://www.ourfairdeal.org/ time is running out!
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: linear extrude thickness

vasilis
This post has NOT been accepted by the mailing list yet.
Thanks it worked now.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: linear extrude thickness

MichaelAtOz
Administrator
Vasilis, did you get the mailing-list invite?
Admin - PM me if you need anything,
or if I've done something stupid...

Unless specifically shown otherwise above, my contribution is in the Public Domain; to the extent possible under law, I have waived all copyright and related or neighbouring rights to this work.
Obviously inclusion of works of previous authors is not included in the above.


The TPP is no simple “trade agreement.” Fight it! http://www.ourfairdeal.org/ time is running out!
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: linear extrude thickness

vasilis
This post has NOT been accepted by the mailing list yet.
Yes I did,

And I believe I subscribe correctly. I don't understand why the first emails never arrived. It could be that the cern filter was blocking them.

Thanks!

Vasilis
Sent from my phone.
Autocorrect makes me say things I didn't Nintendo

On Apr 25, 2017 12:02 AM, "MichaelAtOz [via OpenSCAD]" <ml+[hidden email]> wrote:
Vasilis, did you get the mailing-list invite?
Admin - PM me if you need anything,
or if I've done something stupid...

Unless specifically shown otherwise above, my contribution is in the Public Domain; to the extent possible under law, I have waived all copyright and related or neighbouring rights to this work.
Obviously inclusion of works of previous authors is not included in the above.


The TPP is no simple “trade agreement.” Fight it! http://www.ourfairdeal.org/ time is running out!



If you reply to this email, your message will be added to the discussion below:
http://forum.openscad.org/linear-extrude-thickness-tp21345p21370.html
To unsubscribe from linear extrude thickness, click here.
NAML

Loading...