# extruding 2-d shapes vs using 3-d shapes.

9 messages
Open this post in threaded view
|

## extruding 2-d shapes vs using 3-d shapes.

 I'm gaining OpenSCAD skills with the (initial) goal of designing things to be lasercut. My initial thought was that a hunk of acrylic would be an scad cube: ```scad cube([w, height, thickness]); ``` Lasercut [1] and Scott Bezek's examples [2] seem to prefer extruding 2-D shapes, e.g. this bit from Scott's blog: ````openscad linear_extrude(thickness, center=true) {      difference() {          square([40,80]);          translate([10, 10]) {              square([20, 60]);          }      } } ``` Is there a technical (performance, numerical accuracy) or aesthetic reason to prefer one approach over the other? Thanks! g. [1]: https://github.com/bmsleight/lasercut/blob/master/lasercut.scad#L84[2]: http://scottbezek.blogspot.com/2016/05/openscad-rendering-tricks-part-2-laser.html_______________________________________________ OpenSCAD mailing list [hidden email] http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Open this post in threaded view
|

## Re: extruding 2-d shapes vs using 3-d shapes.

Open this post in threaded view
|

## Re: extruding 2-d shapes vs using 3-d shapes.

 In reply to this post by George Hartzell I work in 3D, because I need to get a feel for how it will all come together. Then, to get the 2D for cutting, I use Projection to get 2D shapes which can be exported. It helps a lot if your code is neat and logically modularized, so each part is it's own module. Then, it's trivial to just call that module, move the part as needed, and project for cutting. There might be a performance loss, but usually, it's not a problem for me (unless there is a lot of text or minkowski involved). -- Sent from: http://forum.openscad.org/_______________________________________________ OpenSCAD mailing list [hidden email] http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Open this post in threaded view
|

## Re: extruding 2-d shapes vs using 3-d shapes.

 Troberg writes:  > I work in 3D, because I need to get a feel for how it will all come together.  >  > Then, to get the 2D for cutting, I use Projection to get 2D shapes which can  > be exported. This seems to be the common approach, and the one that I'm following. I'm comfortable modeling in 3D and projecting to 2D to get the cut lines.  Scott's site [2] has some great thoughts and tools for doing this. I'm asking a different question, is there any technical or aesthetic advantage to use one or the other of these approached to modeling a 6mm x 4mm slab of 3mm material (cube vs extruding a square)? ```scad module use_a_cube() {     cube([6, 4, 3]); } module use_extrude() {     linear_extrude(3, center=true) square([6, 4]); } use_a_cube(); translate([7, 7, 0]) use_extrude(); ``` I was surprised to discover that a couple of well-thought-out packages ([1], [2], linked also linked in the original query) use `linear_extrude`.  `cube` seems more intuitive. g. [1]: http://scottbezek.blogspot.com/2016/05/openscad-rendering-tricks-part-2-laser.html[2]: https://github.com/bmsleight/lasercut/blob/master/lasercut.scad#L84_______________________________________________ OpenSCAD mailing list [hidden email] http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Open this post in threaded view
|

## Re: extruding 2-d shapes vs using 3-d shapes.

Open this post in threaded view
|

## Re: extruding 2-d shapes vs using 3-d shapes.

 In reply to this post by George Hartzell George Hartzell writes:  > [...]  > I'm asking a different question, is there any technical or aesthetic  > advantage to use one or the other of these approached to modeling a  > 6mm x 4mm slab of 3mm material (cube vs extruding a square)?  > I think I just connected the dots to a big reason to work with in the 2D space: text is a 2d object and you can't mix it with 3d objects like cubes.... g. _______________________________________________ OpenSCAD mailing list [hidden email] http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Open this post in threaded view
|

## Re: extruding 2-d shapes vs using 3-d shapes.

 In reply to this post by George Hartzell George Hartzell wrote > Troberg writes: >  > I work in 3D, because I need to get a feel for how it will all come > together. >  > >  > Then, to get the 2D for cutting, I use Projection to get 2D shapes > which can >  > be exported. > > This seems to be the common approach, and the one that I'm following. > I'm comfortable modeling in 3D and projecting to 2D to get the cut > lines.  Scott's site [2] has some great thoughts and tools for doing > this. If you want to save yourself from manually moving parts in 2D (which becomes quite painful with parameterized models), you could consider using laserscad [1]. It automates the 3D -> 2D process and can handle engravings nicely. Shameless plug by the way. ;) [1] https://github.com/mbugert/laserscad-- Sent from: http://forum.openscad.org/_______________________________________________ OpenSCAD mailing list [hidden email] http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org