discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

Re: Tangential join/infill two parallel vertical cylindrical tubes.

GH
Gene Heskett
Wed, Apr 21, 2021 6:25 PM

On Wednesday 21 April 2021 13:16:58 A. Craig West wrote:

Openscad is an amazingly flexible tool, but I do find that it is
overly limited by the assumption that 3d printers are the only
possible use case. I find that the language is great for expressing
geometry in 2d as well, but due to the assumption that all generated
objects must have thickness/volume, you can't actually use it for
things like laser cutting...

I didn't have laser cutting in mind, Craig, more like a suitable carbide
end mill whose dimensions would have to be known by the slicer. Or
assume sinker EDM, but that also has problems due to the erosion of the
sinker electrode as it works.

That too is a major problem when the hole being burnt is more than
electrode diameter deep. I have cut slots to make compressible petals
out of a socket to receive a ball screw, with tapered threads on the
outside.  It does those slots an inch deep, .032" wide, putting a drive
shaft on the end of a ball screw for 2 lathes x drives now. No warpage,
no burrs, puts tons of grip on the end of a ball screw when its wet with
threadlocker and the nut drawn tight.  Hasn't slipped a micron in many
years. That was the general idea.

So what to we have that can turn an openscad output into gcode?
Preferably metric based although linuxcnc accepts either measurement
system.  Preferably something smart enough to make use of linuxcnc's
looping abilities. Something that turns 100 lines of source code into
100 gigabytes of gcode because it has to unroll all the loops, is not to
me, a workable solution.  Success to me is a 90 line gcode program that
takes 3 days to run. I have done that by hand. It also made the sharpest
table saw carbide blade I've ever used.

So I am curious, if you are designing a part in openscad that will
eventually be made on a cnc controlled 3 or more axis milling machine,
what do you use to make that connection work?

Thank you all.

[...]

Cheers, Gene Heskett

"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
If we desire respect for the law, we must first make the law respectable.

On Wednesday 21 April 2021 13:16:58 A. Craig West wrote: > Openscad is an amazingly flexible tool, but I do find that it is > overly limited by the assumption that 3d printers are the only > possible use case. I find that the language is great for expressing > geometry in 2d as well, but due to the assumption that all generated > objects must have thickness/volume, you can't actually use it for > things like laser cutting... I didn't have laser cutting in mind, Craig, more like a suitable carbide end mill whose dimensions would have to be known by the slicer. Or assume sinker EDM, but that also has problems due to the erosion of the sinker electrode as it works. That too is a major problem when the hole being burnt is more than electrode diameter deep. I have cut slots to make compressible petals out of a socket to receive a ball screw, with tapered threads on the outside. It does those slots an inch deep, .032" wide, putting a drive shaft on the end of a ball screw for 2 lathes x drives now. No warpage, no burrs, puts tons of grip on the end of a ball screw when its wet with threadlocker and the nut drawn tight. Hasn't slipped a micron in many years. That was the general idea. So what to we have that can turn an openscad output into gcode? Preferably metric based although linuxcnc accepts either measurement system. Preferably something smart enough to make use of linuxcnc's looping abilities. Something that turns 100 lines of source code into 100 gigabytes of gcode because it has to unroll all the loops, is not to me, a workable solution. Success to me is a 90 line gcode program that takes 3 days to run. I have done that by hand. It also made the sharpest table saw carbide blade I've ever used. So I am curious, if you are designing a part in openscad that will eventually be made on a cnc controlled 3 or more axis milling machine, what do you use to make that connection work? Thank you all. [...] Cheers, Gene Heskett -- "There are four boxes to be used in defense of liberty: soap, ballot, jury, and ammo. Please use in that order." -Ed Howdershelt (Author) If we desire respect for the law, we must first make the law respectable. - Louis D. Brandeis Genes Web page <http://geneslinuxbox.net:6309/gene>
GH
Gene Heskett
Wed, Apr 21, 2021 6:36 PM

On Wednesday 21 April 2021 13:38:58 Alex Gibson wrote:

I’m confused to read that as I use it all the time for 2D!

Are you aware of the whole 2D subsystem? IE square([1,2]); instead of
cube([1,2,3]);?

And that you can both import and export DXF files which are good for
laser cutting and CNC routing?

(if you want to import DXF files – you need to make sure they don’t
contain curves as these come in many incompatible dialects – instead
decimate them to many straight sections – there’s an excellent plugin
for Inkscape called ‘DXF output for OpenSCAD’ or similar which does
this for you)

I got many and confusing hits on that, exact URL please?

You can take a 2D shape and linear or rotate extrude to 3D, or you can
cut a cross section from a 3D model in 2D with projection()…

Or… what is it you’re struggling to do?

Cheers,

Alex Gibson

admg consulting

edumaker limited

·        Project management

·        Operations & Process improvement

·        3D Printing

From: A. Craig West [mailto:acraigwest@gmail.com]
Sent: 21 April 2021 18:17
To: OpenSCAD general discussion
Subject: [OpenSCAD] Re: Linear_extrude

Openscad is an amazingly flexible tool, but I do find that it is
overly limited by the assumption that 3d printers are the only
possible use case. I find that the language is great for expressing
geometry in 2d as well, but due to the assumption that all generated
objects must have thickness/volume, you can't actually use it for
things like laser cutting...

On Wed, 21 Apr 2021, 12:50 Gene Heskett, gheskett@shentel.net wrote:

On Wednesday 21 April 2021 11:03:52 A. Craig West wrote:

I would just use:
mirror([0, 0, 1]) linear_extrude...

Now, why didn't I think of that? Go ahead, answer that, I deserve it.

That would be an ideal first step in making gcode for a milliing
machine. The next would be a "slicer" like translator to break that
depth into something the machine is capable of. Just think, from an
idea done in openscad, sliced into gcode to drive the machine. The
capabilities of that, and the time saved in making the finished part
are mind boggling.

On Wed, 21 Apr 2021, 10:55 Ray West, raywest@raywest.com wrote:

Is there a method of doing a linear-extrude or equivalent in the
opposite direction, (-ve z instead of +ve)? In simple 3 axis
machining, it is usual to have z0 at the top of the work piece,
and it would make things easier, I think, if an extrude in the -ve
z direction was possible.

For example, instead of a  number of lines like
'translate([0,0,-5])linear_extrude(5)notch();'  could simply write
'linear_extrude(-5)notch;' It would allow a very quick way of
getting the 2d drawing into a 3d model of the object.


OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org

Cheers, Gene Heskett

Cheers, Gene Heskett

"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
If we desire respect for the law, we must first make the law respectable.

On Wednesday 21 April 2021 13:38:58 Alex Gibson wrote: > I’m confused to read that as I use it all the time for 2D! > > > > Are you aware of the whole 2D subsystem? IE square([1,2]); instead of > cube([1,2,3]);? > > > > And that you can both import and export DXF files which are good for > laser cutting and CNC routing? > > > > (if you want to import DXF files – you need to make sure they don’t > contain curves as these come in many incompatible dialects – instead > decimate them to many straight sections – there’s an excellent plugin > for Inkscape called ‘DXF output for OpenSCAD’ or similar which does > this for you) I got many and confusing hits on that, exact URL please? > You can take a 2D shape and linear or rotate extrude to 3D, or you can > cut a cross section from a 3D model in 2D with projection()… > > > > Or… what is it you’re struggling to do? > > > > Cheers, > > > > Alex Gibson > > > > admg consulting > > > > edumaker limited > > > > · Project management > > · Operations & Process improvement > > · 3D Printing > > > > From: A. Craig West [mailto:acraigwest@gmail.com] > Sent: 21 April 2021 18:17 > To: OpenSCAD general discussion > Subject: [OpenSCAD] Re: Linear_extrude > > > > Openscad is an amazingly flexible tool, but I do find that it is > overly limited by the assumption that 3d printers are the only > possible use case. I find that the language is great for expressing > geometry in 2d as well, but due to the assumption that all generated > objects must have thickness/volume, you can't actually use it for > things like laser cutting... > > > > On Wed, 21 Apr 2021, 12:50 Gene Heskett, <gheskett@shentel.net> wrote: > > On Wednesday 21 April 2021 11:03:52 A. Craig West wrote: > > I would just use: > > mirror([0, 0, 1]) linear_extrude... > > Now, why didn't I think of that? Go ahead, answer that, I deserve it. > > That would be an ideal first step in making gcode for a milliing > machine. The next would be a "slicer" like translator to break that > depth into something the machine is capable of. Just think, from an > idea done in openscad, sliced into gcode to drive the machine. The > capabilities of that, and the time saved in making the finished part > are mind boggling. > > > On Wed, 21 Apr 2021, 10:55 Ray West, <raywest@raywest.com> wrote: > > > Is there a method of doing a linear-extrude or equivalent in the > > > opposite direction, (-ve z instead of +ve)? In simple 3 axis > > > machining, it is usual to have z0 at the top of the work piece, > > > and it would make things easier, I think, if an extrude in the -ve > > > z direction was possible. > > > > > > For example, instead of a number of lines like > > > 'translate([0,0,-5])linear_extrude(5)notch();' could simply write > > > 'linear_extrude(-5)notch;' It would allow a very quick way of > > > getting the 2d drawing into a 3d model of the object. > > > _______________________________________________ > > > OpenSCAD mailing list > > > To unsubscribe send an email to discuss-leave@lists.openscad.org > > Cheers, Gene Heskett Cheers, Gene Heskett -- "There are four boxes to be used in defense of liberty: soap, ballot, jury, and ammo. Please use in that order." -Ed Howdershelt (Author) If we desire respect for the law, we must first make the law respectable. - Louis D. Brandeis Genes Web page <http://geneslinuxbox.net:6309/gene>
NH
nop head
Wed, Apr 21, 2021 6:46 PM

I use PyCam to convert OpenSCAD to gcode that I then run on LinuxCNC to
drive my router.

On Wed, 21 Apr 2021 at 19:37, Gene Heskett gheskett@shentel.net wrote:

On Wednesday 21 April 2021 13:38:58 Alex Gibson wrote:

I’m confused to read that as I use it all the time for 2D!

Are you aware of the whole 2D subsystem? IE square([1,2]); instead of
cube([1,2,3]);?

And that you can both import and export DXF files which are good for
laser cutting and CNC routing?

(if you want to import DXF files – you need to make sure they don’t
contain curves as these come in many incompatible dialects – instead
decimate them to many straight sections – there’s an excellent plugin
for Inkscape called ‘DXF output for OpenSCAD’ or similar which does
this for you)

I got many and confusing hits on that, exact URL please?

You can take a 2D shape and linear or rotate extrude to 3D, or you can
cut a cross section from a 3D model in 2D with projection()…

Or… what is it you’re struggling to do?

Cheers,

Alex Gibson

admg consulting

edumaker limited

·        Project management

·        Operations & Process improvement

·        3D Printing

From: A. Craig West [mailto:acraigwest@gmail.com]
Sent: 21 April 2021 18:17
To: OpenSCAD general discussion
Subject: [OpenSCAD] Re: Linear_extrude

Openscad is an amazingly flexible tool, but I do find that it is
overly limited by the assumption that 3d printers are the only
possible use case. I find that the language is great for expressing
geometry in 2d as well, but due to the assumption that all generated
objects must have thickness/volume, you can't actually use it for
things like laser cutting...

On Wed, 21 Apr 2021, 12:50 Gene Heskett, gheskett@shentel.net wrote:

On Wednesday 21 April 2021 11:03:52 A. Craig West wrote:

I would just use:
mirror([0, 0, 1]) linear_extrude...

Now, why didn't I think of that? Go ahead, answer that, I deserve it.

That would be an ideal first step in making gcode for a milliing
machine. The next would be a "slicer" like translator to break that
depth into something the machine is capable of. Just think, from an
idea done in openscad, sliced into gcode to drive the machine. The
capabilities of that, and the time saved in making the finished part
are mind boggling.

On Wed, 21 Apr 2021, 10:55 Ray West, raywest@raywest.com wrote:

Is there a method of doing a linear-extrude or equivalent in the
opposite direction, (-ve z instead of +ve)? In simple 3 axis
machining, it is usual to have z0 at the top of the work piece,
and it would make things easier, I think, if an extrude in the -ve
z direction was possible.

For example, instead of a  number of lines like
'translate([0,0,-5])linear_extrude(5)notch();'  could simply write
'linear_extrude(-5)notch;' It would allow a very quick way of
getting the 2d drawing into a 3d model of the object.


OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org

Cheers, Gene Heskett

Cheers, Gene Heskett

"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
If we desire respect for the law, we must first make the law respectable.


OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org

I use PyCam to convert OpenSCAD to gcode that I then run on LinuxCNC to drive my router. On Wed, 21 Apr 2021 at 19:37, Gene Heskett <gheskett@shentel.net> wrote: > On Wednesday 21 April 2021 13:38:58 Alex Gibson wrote: > > > I’m confused to read that as I use it all the time for 2D! > > > > > > > > Are you aware of the whole 2D subsystem? IE square([1,2]); instead of > > cube([1,2,3]);? > > > > > > > > And that you can both import and export DXF files which are good for > > laser cutting and CNC routing? > > > > > > > > (if you want to import DXF files – you need to make sure they don’t > > contain curves as these come in many incompatible dialects – instead > > decimate them to many straight sections – there’s an excellent plugin > > for Inkscape called ‘DXF output for OpenSCAD’ or similar which does > > this for you) > > I got many and confusing hits on that, exact URL please? > > > You can take a 2D shape and linear or rotate extrude to 3D, or you can > > cut a cross section from a 3D model in 2D with projection()… > > > > > > > > Or… what is it you’re struggling to do? > > > > > > > > Cheers, > > > > > > > > Alex Gibson > > > > > > > > admg consulting > > > > > > > > edumaker limited > > > > > > > > · Project management > > > > · Operations & Process improvement > > > > · 3D Printing > > > > > > > > From: A. Craig West [mailto:acraigwest@gmail.com] > > Sent: 21 April 2021 18:17 > > To: OpenSCAD general discussion > > Subject: [OpenSCAD] Re: Linear_extrude > > > > > > > > Openscad is an amazingly flexible tool, but I do find that it is > > overly limited by the assumption that 3d printers are the only > > possible use case. I find that the language is great for expressing > > geometry in 2d as well, but due to the assumption that all generated > > objects must have thickness/volume, you can't actually use it for > > things like laser cutting... > > > > > > > > On Wed, 21 Apr 2021, 12:50 Gene Heskett, <gheskett@shentel.net> wrote: > > > > On Wednesday 21 April 2021 11:03:52 A. Craig West wrote: > > > I would just use: > > > mirror([0, 0, 1]) linear_extrude... > > > > Now, why didn't I think of that? Go ahead, answer that, I deserve it. > > > > That would be an ideal first step in making gcode for a milliing > > machine. The next would be a "slicer" like translator to break that > > depth into something the machine is capable of. Just think, from an > > idea done in openscad, sliced into gcode to drive the machine. The > > capabilities of that, and the time saved in making the finished part > > are mind boggling. > > > > > On Wed, 21 Apr 2021, 10:55 Ray West, <raywest@raywest.com> wrote: > > > > Is there a method of doing a linear-extrude or equivalent in the > > > > opposite direction, (-ve z instead of +ve)? In simple 3 axis > > > > machining, it is usual to have z0 at the top of the work piece, > > > > and it would make things easier, I think, if an extrude in the -ve > > > > z direction was possible. > > > > > > > > For example, instead of a number of lines like > > > > 'translate([0,0,-5])linear_extrude(5)notch();' could simply write > > > > 'linear_extrude(-5)notch;' It would allow a very quick way of > > > > getting the 2d drawing into a 3d model of the object. > > > > _______________________________________________ > > > > OpenSCAD mailing list > > > > To unsubscribe send an email to discuss-leave@lists.openscad.org > > > > Cheers, Gene Heskett > > > Cheers, Gene Heskett > -- > "There are four boxes to be used in defense of liberty: > soap, ballot, jury, and ammo. Please use in that order." > -Ed Howdershelt (Author) > If we desire respect for the law, we must first make the law respectable. > - Louis D. Brandeis > Genes Web page <http://geneslinuxbox.net:6309/gene> > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org >
RW
Ray West
Wed, Apr 21, 2021 7:10 PM

Thanks for all the replies,

My method is basically import a 2d dxf into the cam software, select the
boundaries, and profile or pocket as required, either remembering the
depths of cut or otherwise. A 2d dxf from openscad does the job, but to
get the boundaries, it is sometimes necessary to difference shapes
purely to get boundaries. It came to mind, that it would be simple to
quickly check the shape of the object by extruding downwards, in the
similar way as I think of the machining action, and the depths could be
extracted for use in the cam program. Mirroring would work, but then I'd
have to be thinking 'upside-down' so to speak. I'm not sure of the logic
behind not being able to extrude downwards, I would have thought it
would be not difficult to allow that. A bit more fiddling, and could
probably use offset to generate the tool path for cylindrical cutters,
but the cam does that fine, if I get the outlines.

On 21/04/2021 18:16, A. Craig West wrote:

Openscad is an amazingly flexible tool, but I do find that it is
overly limited by the assumption that 3d printers are the only
possible use case. I find that the language is great for expressing
geometry in 2d as well, but due to the assumption that all generated
objects must have thickness/volume, you can't actually use it for
things like laser cutting...

On Wed, 21 Apr 2021, 12:50 Gene Heskett, <gheskett@shentel.net
mailto:gheskett@shentel.net> wrote:

 On Wednesday 21 April 2021 11:03:52 A. Craig West wrote:

I would just use:
mirror([0, 0, 1]) linear_extrude...

 Now, why didn't I think of that? Go ahead, answer that, I deserve it.

 That would be an ideal first step in making gcode for a milliing
 machine.
 The next would be a "slicer" like translator to break that depth into
 something the machine is capable of. Just think, from an idea done in
 openscad, sliced into gcode to drive the machine. The capabilities of
 that, and the time saved in making the finished part are mind
 boggling.

On Wed, 21 Apr 2021, 10:55 Ray West, <raywest@raywest.com

 <mailto:raywest@raywest.com>> wrote:

Is there a method of doing a linear-extrude or equivalent in the
opposite direction, (-ve z instead of +ve)? In simple 3 axis
machining, it is usual to have z0 at the top of the work

 piece, and

it would make things easier, I think, if an extrude in the -ve z
direction was possible.

For example, instead of a  number of lines like
'translate([0,0,-5])linear_extrude(5)notch();' could simply write
'linear_extrude(-5)notch;' It would allow a very quick way of
getting the 2d drawing into a 3d model of the object.


OpenSCAD mailing list
To unsubscribe send an email to

 discuss-leave@lists.openscad.org
 <mailto:discuss-leave@lists.openscad.org>


 Cheers, Gene Heskett
 -- 
 "There are four boxes to be used in defense of liberty:
  soap, ballot, jury, and ammo. Please use in that order."
 -Ed Howdershelt (Author)
 If we desire respect for the law, we must first make the law
 respectable.
  - Louis D. Brandeis
 Genes Web page <http://geneslinuxbox.net:6309/gene
 <http://geneslinuxbox.net:6309/gene>>
 _______________________________________________
 OpenSCAD mailing list
 To unsubscribe send an email to discuss-leave@lists.openscad.org
 <mailto:discuss-leave@lists.openscad.org>

OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org

Thanks for all the replies, My method is basically import a 2d dxf into the cam software, select the boundaries, and profile or pocket as required, either remembering the depths of cut or otherwise. A 2d dxf from openscad does the job, but to get the boundaries, it is sometimes necessary to difference shapes purely to get boundaries. It came to mind, that it would be simple to quickly check the shape of the object by extruding downwards, in the similar way as I think of the machining action, and the depths could be extracted for use in the cam program. Mirroring would work, but then I'd have to be thinking 'upside-down' so to speak. I'm not sure of the logic behind not being able to extrude downwards, I would have thought it would be not difficult to allow that. A bit more fiddling, and could probably use offset to generate the tool path for cylindrical cutters, but the cam does that fine, if I get the outlines. On 21/04/2021 18:16, A. Craig West wrote: > Openscad is an amazingly flexible tool, but I do find that it is > overly limited by the assumption that 3d printers are the only > possible use case. I find that the language is great for expressing > geometry in 2d as well, but due to the assumption that all generated > objects must have thickness/volume, you can't actually use it for > things like laser cutting... > > On Wed, 21 Apr 2021, 12:50 Gene Heskett, <gheskett@shentel.net > <mailto:gheskett@shentel.net>> wrote: > > On Wednesday 21 April 2021 11:03:52 A. Craig West wrote: > > > I would just use: > > mirror([0, 0, 1]) linear_extrude... > > Now, why didn't I think of that? Go ahead, answer that, I deserve it. > > That would be an ideal first step in making gcode for a milliing > machine. > The next would be a "slicer" like translator to break that depth into > something the machine is capable of. Just think, from an idea done in > openscad, sliced into gcode to drive the machine. The capabilities of > that, and the time saved in making the finished part are mind > boggling. > > > On Wed, 21 Apr 2021, 10:55 Ray West, <raywest@raywest.com > <mailto:raywest@raywest.com>> wrote: > > > Is there a method of doing a linear-extrude or equivalent in the > > > opposite direction, (-ve z instead of +ve)? In simple 3 axis > > > machining, it is usual to have z0 at the top of the work > piece, and > > > it would make things easier, I think, if an extrude in the -ve z > > > direction was possible. > > > > > > For example, instead of a  number of lines like > > > 'translate([0,0,-5])linear_extrude(5)notch();' could simply write > > > 'linear_extrude(-5)notch;' It would allow a very quick way of > > > getting the 2d drawing into a 3d model of the object. > > > _______________________________________________ > > > OpenSCAD mailing list > > > To unsubscribe send an email to > discuss-leave@lists.openscad.org > <mailto:discuss-leave@lists.openscad.org> > > > Cheers, Gene Heskett > -- > "There are four boxes to be used in defense of liberty: >  soap, ballot, jury, and ammo. Please use in that order." > -Ed Howdershelt (Author) > If we desire respect for the law, we must first make the law > respectable. >  - Louis D. Brandeis > Genes Web page <http://geneslinuxbox.net:6309/gene > <http://geneslinuxbox.net:6309/gene>> > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org > <mailto:discuss-leave@lists.openscad.org> > > > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org
AG
Alex Gibson
Wed, Apr 21, 2021 9:16 PM

Hi Gene

I'm not surprised, there were several plugins with similar names that evolved from one another.

This is to my knowledge the best version, definitely works, and takes the best bits from the others - so is the one I'd recommend.
https://github.com/brad/Inkscape-OpenSCAD-DXF-Export

I've validated the install instructions on Windows and Linux - basically just copying files into Inkscape's extensions folder.

With it installed you can open Inkscape, draw or import something, then just need to make sure you've done a 'convert object to path' and then 'save as' and choose the option OpenSCAD DXF.

Good luck!

Alex Gibson

admg consulting

edumaker limited

• Project management
• Operations & Process improvement
• 3D Printing

-----Original Message-----
From: Gene Heskett [mailto:gheskett@shentel.net]
Sent: 21 April 2021 19:37
To: discuss@lists.openscad.org
Subject: [OpenSCAD] Re: Linear_extrude

On Wednesday 21 April 2021 13:38:58 Alex Gibson wrote:

I’m confused to read that as I use it all the time for 2D!

Are you aware of the whole 2D subsystem? IE square([1,2]); instead of
cube([1,2,3]);?

And that you can both import and export DXF files which are good for
laser cutting and CNC routing?

(if you want to import DXF files – you need to make sure they don’t
contain curves as these come in many incompatible dialects – instead
decimate them to many straight sections – there’s an excellent plugin
for Inkscape called ‘DXF output for OpenSCAD’ or similar which does
this for you)

I got many and confusing hits on that, exact URL please?

You can take a 2D shape and linear or rotate extrude to 3D, or you can
cut a cross section from a 3D model in 2D with projection()…

Or… what is it you’re struggling to do?

Cheers,

Alex Gibson

admg consulting

edumaker limited

·        Project management

·        Operations & Process improvement

·        3D Printing

From: A. Craig West [mailto:acraigwest@gmail.com]
Sent: 21 April 2021 18:17
To: OpenSCAD general discussion
Subject: [OpenSCAD] Re: Linear_extrude

Openscad is an amazingly flexible tool, but I do find that it is
overly limited by the assumption that 3d printers are the only
possible use case. I find that the language is great for expressing
geometry in 2d as well, but due to the assumption that all generated
objects must have thickness/volume, you can't actually use it for
things like laser cutting...

On Wed, 21 Apr 2021, 12:50 Gene Heskett, gheskett@shentel.net wrote:

On Wednesday 21 April 2021 11:03:52 A. Craig West wrote:

I would just use:
mirror([0, 0, 1]) linear_extrude...

Now, why didn't I think of that? Go ahead, answer that, I deserve it.

That would be an ideal first step in making gcode for a milliing
machine. The next would be a "slicer" like translator to break that
depth into something the machine is capable of. Just think, from an
idea done in openscad, sliced into gcode to drive the machine. The
capabilities of that, and the time saved in making the finished part
are mind boggling.

On Wed, 21 Apr 2021, 10:55 Ray West, raywest@raywest.com wrote:

Is there a method of doing a linear-extrude or equivalent in the
opposite direction, (-ve z instead of +ve)? In simple 3 axis
machining, it is usual to have z0 at the top of the work piece,
and it would make things easier, I think, if an extrude in the -ve
z direction was possible.

For example, instead of a  number of lines like
'translate([0,0,-5])linear_extrude(5)notch();'  could simply write
'linear_extrude(-5)notch;' It would allow a very quick way of
getting the 2d drawing into a 3d model of the object.


OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org

Cheers, Gene Heskett

Cheers, Gene Heskett

"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
If we desire respect for the law, we must first make the law respectable.


OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org

--
This email has been checked for viruses by AVG.
https://www.avg.com

Hi Gene I'm not surprised, there were several plugins with similar names that evolved from one another. This is to my knowledge the best version, definitely works, and takes the best bits from the others - so is the one I'd recommend. https://github.com/brad/Inkscape-OpenSCAD-DXF-Export I've validated the install instructions on Windows and Linux - basically just copying files into Inkscape's extensions folder. With it installed you can open Inkscape, draw or import something, then just need to make sure you've done a 'convert object to path' and then 'save as' and choose the option OpenSCAD DXF. Good luck! Alex Gibson admg consulting edumaker limited • Project management • Operations & Process improvement • 3D Printing -----Original Message----- From: Gene Heskett [mailto:gheskett@shentel.net] Sent: 21 April 2021 19:37 To: discuss@lists.openscad.org Subject: [OpenSCAD] Re: Linear_extrude On Wednesday 21 April 2021 13:38:58 Alex Gibson wrote: > I’m confused to read that as I use it all the time for 2D! > > > > Are you aware of the whole 2D subsystem? IE square([1,2]); instead of > cube([1,2,3]);? > > > > And that you can both import and export DXF files which are good for > laser cutting and CNC routing? > > > > (if you want to import DXF files – you need to make sure they don’t > contain curves as these come in many incompatible dialects – instead > decimate them to many straight sections – there’s an excellent plugin > for Inkscape called ‘DXF output for OpenSCAD’ or similar which does > this for you) I got many and confusing hits on that, exact URL please? > You can take a 2D shape and linear or rotate extrude to 3D, or you can > cut a cross section from a 3D model in 2D with projection()… > > > > Or… what is it you’re struggling to do? > > > > Cheers, > > > > Alex Gibson > > > > admg consulting > > > > edumaker limited > > > > · Project management > > · Operations & Process improvement > > · 3D Printing > > > > From: A. Craig West [mailto:acraigwest@gmail.com] > Sent: 21 April 2021 18:17 > To: OpenSCAD general discussion > Subject: [OpenSCAD] Re: Linear_extrude > > > > Openscad is an amazingly flexible tool, but I do find that it is > overly limited by the assumption that 3d printers are the only > possible use case. I find that the language is great for expressing > geometry in 2d as well, but due to the assumption that all generated > objects must have thickness/volume, you can't actually use it for > things like laser cutting... > > > > On Wed, 21 Apr 2021, 12:50 Gene Heskett, <gheskett@shentel.net> wrote: > > On Wednesday 21 April 2021 11:03:52 A. Craig West wrote: > > I would just use: > > mirror([0, 0, 1]) linear_extrude... > > Now, why didn't I think of that? Go ahead, answer that, I deserve it. > > That would be an ideal first step in making gcode for a milliing > machine. The next would be a "slicer" like translator to break that > depth into something the machine is capable of. Just think, from an > idea done in openscad, sliced into gcode to drive the machine. The > capabilities of that, and the time saved in making the finished part > are mind boggling. > > > On Wed, 21 Apr 2021, 10:55 Ray West, <raywest@raywest.com> wrote: > > > Is there a method of doing a linear-extrude or equivalent in the > > > opposite direction, (-ve z instead of +ve)? In simple 3 axis > > > machining, it is usual to have z0 at the top of the work piece, > > > and it would make things easier, I think, if an extrude in the -ve > > > z direction was possible. > > > > > > For example, instead of a number of lines like > > > 'translate([0,0,-5])linear_extrude(5)notch();' could simply write > > > 'linear_extrude(-5)notch;' It would allow a very quick way of > > > getting the 2d drawing into a 3d model of the object. > > > _______________________________________________ > > > OpenSCAD mailing list > > > To unsubscribe send an email to discuss-leave@lists.openscad.org > > Cheers, Gene Heskett Cheers, Gene Heskett -- "There are four boxes to be used in defense of liberty: soap, ballot, jury, and ammo. Please use in that order." -Ed Howdershelt (Author) If we desire respect for the law, we must first make the law respectable. - Louis D. Brandeis Genes Web page <http://geneslinuxbox.net:6309/gene> _______________________________________________ OpenSCAD mailing list To unsubscribe send an email to discuss-leave@lists.openscad.org -- This email has been checked for viruses by AVG. https://www.avg.com
JB
Jordan Brown
Wed, Apr 21, 2021 10:29 PM

What would linear-extruding down do that's different from mirroring?
The only thing I can think of offhand is that maybe the direction of the
twist would be reversed - and of course a relatively simple wrapper
could do that.

What would linear-extruding down do that's different from mirroring? The only thing I can think of offhand is that maybe the direction of the twist would be reversed - and of course a relatively simple wrapper could do that.
GH
Gene Heskett
Thu, Apr 22, 2021 1:45 AM

On Wednesday 21 April 2021 17:16:32 Alex Gibson wrote:

Hi Gene

I'm not surprised, there were several plugins with similar names that
evolved from one another.

This is to my knowledge the best version, definitely works, and takes
the best bits from the others - so is the one I'd recommend.
https://github.com/brad/Inkscape-OpenSCAD-DXF-Export

I've validated the install instructions on Windows and Linux -
basically just copying files into Inkscape's extensions folder.

With it installed you can open Inkscape, draw or import something,
then just need to make sure you've done a 'convert object to path' and
then 'save as' and choose the option OpenSCAD DXF.

That machine, since its a new buster install needed another 6 gigabytes
of stuff installed to get rid of all but one dependency error in the
extensions-error.log. From that log:

Extension "Win32 Vector Print" failed to load because the extension is
designed for Windows only.  This is caused by an improper .inx file for
this extension.  An improper .inx file could have been caused by a
faulty installation of Inkscape.
Extension "Sketch Input" failed to load because a dependency was not met.
Dependency:
type: executable
location: path
string: skconvert

LaTex was also missing, but roughly 5GB of texlive stuff seems to have
satisfied that. LaTex support seems to be on its way to the dustbin of
history anyway.

skconvert is still missing and despite the error msgs above claim that it
indicates a faulty windows install, everything on that machine is either
an AppImage or came from the buster repo's. skconvert is apparently a
windows utility to convert sketchup files to something inkscape can use.
I promise I won't miss it. :)  Sketchup if you recall history was a free
google offering, but was converted to a windows only app for seat fees
by google. Obvously I've not a copy of it on any of my farm today.

Now, for my 86 yo wet ram to see what it can do for openscad.

However, in my messing around I did crash inkscape as it stopped
responding and I had to do another login from a different workspace and
issue a killall inkscape.

Good luck!

Alex Gibson

Thank you Alex Gibson for that link.  Its been an interesting 3.5 hours
of installing stuff.  The net seems a bit slower tonight. But I am
getting the bandwidth I'm paying for.

admg consulting

edumaker limited

• Project management
• Operations & Process improvement
• 3D Printing

Take care and stay well folks.

Cheers, Gene Heskett

"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
If we desire respect for the law, we must first make the law respectable.

On Wednesday 21 April 2021 17:16:32 Alex Gibson wrote: > Hi Gene > > I'm not surprised, there were several plugins with similar names that > evolved from one another. > > This is to my knowledge the best version, definitely works, and takes > the best bits from the others - so is the one I'd recommend. > https://github.com/brad/Inkscape-OpenSCAD-DXF-Export > > I've validated the install instructions on Windows and Linux - > basically just copying files into Inkscape's extensions folder. > > With it installed you can open Inkscape, draw or import something, > then just need to make sure you've done a 'convert object to path' and > then 'save as' and choose the option OpenSCAD DXF. That machine, since its a new buster install needed another 6 gigabytes of stuff installed to get rid of all but one dependency error in the extensions-error.log. From that log: ========== Extension "Win32 Vector Print" failed to load because the extension is designed for Windows only. This is caused by an improper .inx file for this extension. An improper .inx file could have been caused by a faulty installation of Inkscape. Extension "Sketch Input" failed to load because a dependency was not met. Dependency: type: executable location: path string: skconvert ========== LaTex was also missing, but roughly 5GB of texlive stuff seems to have satisfied that. LaTex support seems to be on its way to the dustbin of history anyway. skconvert is still missing and despite the error msgs above claim that it indicates a faulty windows install, everything on that machine is either an AppImage or came from the buster repo's. skconvert is apparently a windows utility to convert sketchup files to something inkscape can use. I promise I won't miss it. :) Sketchup if you recall history was a free google offering, but was converted to a windows only app for seat fees by google. Obvously I've not a copy of it on any of my farm today. Now, for my 86 yo wet ram to see what it can do for openscad. However, in my messing around I did crash inkscape as it stopped responding and I had to do another login from a different workspace and issue a killall inkscape. > Good luck! > > Alex Gibson Thank you Alex Gibson for that link. Its been an interesting 3.5 hours of installing stuff. The net seems a bit slower tonight. But I am getting the bandwidth I'm paying for. > admg consulting > > edumaker limited > > • Project management > • Operations & Process improvement > • 3D Printing Take care and stay well folks. Cheers, Gene Heskett -- "There are four boxes to be used in defense of liberty: soap, ballot, jury, and ammo. Please use in that order." -Ed Howdershelt (Author) If we desire respect for the law, we must first make the law respectable. - Louis D. Brandeis Genes Web page <http://geneslinuxbox.net:6309/gene>
RW
Ray West
Thu, Apr 22, 2021 12:14 PM

On 21/04/2021 23:29, Jordan Brown wrote:

What would linear-extruding down do that's different from mirroring?
The only thing I can think of offhand is that maybe the direction of
the twist would be reversed - and of course a relatively simple
wrapper could do that.

The following code may explain the overall awkwardness of my efforts

translate([400,0]){
difference(){
linear_extrude(30)square(250,true);
linear_extrude(20)circle (100);
linear_extrude(50)circle(50);
linear_extrude(50)translate ([0,80]) square(25,true);
linear_extrude(50)translate ([80,0]) circle(20);
}
}

// 2d conversion.

difference(){
square(250,true); //block 250square by 30
circle (100); // bore 20 deep
}
circle(50); // bore right through
translate ([0,80]) square(25,true); //bore right through
translate ([80,0]) circle(20); //bore right through

The first block of code shows the shape of the object (It is not too
difficult to draw it upside down). the linear_extrude values are the
depths of the pockets/profiles (-z values). To convert it back to 2d for
exporting as dxf, requires differencing some items. On this simple made
up example, it is not much of a problem, but it certainly would be for a
more complex item. (move the small square to [0,90], say. I would like
to be able to produce the 2d drawing (my initial starting point) without
fussing with differences, etc, and simply add some linear-extrudes with
depths, to get a quick look at the solid object.

The starting point would be from the 2d dimensions, a hand drawn sketch,
say.

On 21/04/2021 23:29, Jordan Brown wrote: > What would linear-extruding down do that's different from mirroring? > The only thing I can think of offhand is that maybe the direction of > the twist would be reversed - and of course a relatively simple > wrapper could do that. > The following code may explain the overall awkwardness of my efforts translate([400,0]){ difference(){ linear_extrude(30)square(250,true); linear_extrude(20)circle (100); linear_extrude(50)circle(50); linear_extrude(50)translate ([0,80]) square(25,true); linear_extrude(50)translate ([80,0]) circle(20); } } // 2d conversion. difference(){ square(250,true); //block 250square by 30 circle (100); // bore 20 deep } circle(50); // bore right through translate ([0,80]) square(25,true); //bore right through translate ([80,0]) circle(20); //bore right through The first block of code shows the shape of the object (It is not too difficult to draw it upside down). the linear_extrude values are the depths of the pockets/profiles (-z values). To convert it back to 2d for exporting as dxf, requires differencing some items. On this simple made up example, it is not much of a problem, but it certainly would be for a more complex item. (move the small square to [0,90], say. I would like to be able to produce the 2d drawing (my initial starting point) without fussing with differences, etc, and simply add some linear-extrudes with depths, to get a quick look at the solid object. The starting point would be from the 2d dimensions, a hand drawn sketch, say.
RW
Ray West
Thu, Apr 22, 2021 6:42 PM

The following is much easier to write, it complies with 2.5 d thinking,
and the the concept would work on polygons, or other 2d shapes. It is
all constructed from 2d and extruding, but There is no straightforward
way to convert it to a dxf file within openscad, afaik.

module xyz(x,y,z){
    linear_extrude(-z)
    translate([x,y])children();
}

intersection(){
difference(){
    xyz(0,0,-50)square(200,true); // work piece
    // pockets
          xyz(0,-30,-50)circle(20);
          xyz(0,0,-50)circle(15);
          xyz(20,0,-30)circle(20);
          xyz(0,0,-20)square([100,50],true);
     //island
    difference(){
          xyz(0,60,-20)square(40,true);
           xyz(0,60,-20)circle(10);
    }
 }

 // profile   (intersection with object)
   xyz(0,0,-49)square(195,true);
 }

On 22/04/2021 13:14, Ray West wrote:

On 21/04/2021 23:29, Jordan Brown wrote:

What would linear-extruding down do that's different from mirroring?
The only thing I can think of offhand is that maybe the direction of
the twist would be reversed - and of course a relatively simple
wrapper could do that.

The following code may explain the overall awkwardness of my efforts

translate([400,0]){
difference(){
linear_extrude(30)square(250,true);
linear_extrude(20)circle (100);
linear_extrude(50)circle(50);
linear_extrude(50)translate ([0,80]) square(25,true);
linear_extrude(50)translate ([80,0]) circle(20);
}
}

// 2d conversion.

difference(){
square(250,true); //block 250square by 30
circle (100); // bore 20 deep
}
circle(50); // bore right through
translate ([0,80]) square(25,true); //bore right through
translate ([80,0]) circle(20); //bore right through

The first block of code shows the shape of the object (It is not too
difficult to draw it upside down). the linear_extrude values are the
depths of the pockets/profiles (-z values). To convert it back to 2d
for exporting as dxf, requires differencing some items. On this simple
made up example, it is not much of a problem, but it certainly would
be for a more complex item. (move the small square to [0,90], say. I
would like to be able to produce the 2d drawing (my initial starting
point) without fussing with differences, etc, and simply add some
linear-extrudes with depths, to get a quick look at the solid object.

The starting point would be from the 2d dimensions, a hand drawn
sketch, say.


OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org

The following is much easier to write, it complies with 2.5 d thinking, and the the concept would work on polygons, or other 2d shapes. It is all constructed from 2d and extruding, but There is no straightforward way to convert it to a dxf file within openscad, afaik. module xyz(x,y,z){     linear_extrude(-z)     translate([x,y])children(); } intersection(){ difference(){     xyz(0,0,-50)square(200,true); // work piece     // pockets           xyz(0,-30,-50)circle(20);           xyz(0,0,-50)circle(15);           xyz(20,0,-30)circle(20);           xyz(0,0,-20)square([100,50],true);      //island     difference(){           xyz(0,60,-20)square(40,true);            xyz(0,60,-20)circle(10);     }  }  // profile   (intersection with object)    xyz(0,0,-49)square(195,true);  } On 22/04/2021 13:14, Ray West wrote: > > On 21/04/2021 23:29, Jordan Brown wrote: >> What would linear-extruding down do that's different from mirroring? >> The only thing I can think of offhand is that maybe the direction of >> the twist would be reversed - and of course a relatively simple >> wrapper could do that. >> > The following code may explain the overall awkwardness of my efforts > > translate([400,0]){ > difference(){ > linear_extrude(30)square(250,true); > linear_extrude(20)circle (100); > linear_extrude(50)circle(50); > linear_extrude(50)translate ([0,80]) square(25,true); > linear_extrude(50)translate ([80,0]) circle(20); > } > } > > // 2d conversion. > > difference(){ > square(250,true); //block 250square by 30 > circle (100); // bore 20 deep > } > circle(50); // bore right through > translate ([0,80]) square(25,true); //bore right through > translate ([80,0]) circle(20); //bore right through > > The first block of code shows the shape of the object (It is not too > difficult to draw it upside down). the linear_extrude values are the > depths of the pockets/profiles (-z values). To convert it back to 2d > for exporting as dxf, requires differencing some items. On this simple > made up example, it is not much of a problem, but it certainly would > be for a more complex item. (move the small square to [0,90], say. I > would like to be able to produce the 2d drawing (my initial starting > point) without fussing with differences, etc, and simply add some > linear-extrudes with depths, to get a quick look at the solid object. > > The starting point would be from the 2d dimensions, a hand drawn > sketch, say. > > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org
JB
Jordan Brown
Thu, Apr 22, 2021 9:29 PM

On 4/22/2021 11:42 AM, Ray West wrote:

The following is much easier to write, it complies with 2.5 d
thinking, and the the concept would work on polygons, or other 2d
shapes. It is all constructed from 2d and extruding, but There is no
straightforward way to convert it to a dxf file within openscad, afaik.

module xyz(x,y,z){
    linear_extrude(-z)
    translate([x,y])children();
}

I think you have the signs wrong; you negate Z here but then you supply
negative values below so the result is positive.

I'm going to assume that you only intended one negation; you want to
drill holes down from the Z=0 plane.

So why doesn't this do what you want?

module xyz(x,y,z){
    mirror([0,0,1]) linear_extrude(-z)
    translate([x,y])children();
}

intersection(){
difference(){
    xyz(0,0,-50)square(200,true); // work piece
    // pockets
          xyz(0,-30,-50)circle(20);
          xyz(0,0,-50)circle(15);
          xyz(20,0,-30)circle(20);
          xyz(0,0,-20)square([100,50],true);
     //island
    difference(){
          xyz(0,60,-20)square(40,true);
           xyz(0,60,-20)circle(10);
    }
 }

 // profile   (intersection with object)
   xyz(0,0,-49)square(195,true);
 }

On 22/04/2021 13:14, Ray West wrote:

On 21/04/2021 23:29, Jordan Brown wrote:

What would linear-extruding down do that's different from mirroring?
The only thing I can think of offhand is that maybe the direction of
the twist would be reversed - and of course a relatively simple
wrapper could do that.

The following code may explain the overall awkwardness of my efforts

translate([400,0]){
difference(){
linear_extrude(30)square(250,true);
linear_extrude(20)circle (100);
linear_extrude(50)circle(50);
linear_extrude(50)translate ([0,80]) square(25,true);
linear_extrude(50)translate ([80,0]) circle(20);
}
}

// 2d conversion.

difference(){
square(250,true); //block 250square by 30
circle (100); // bore 20 deep
}
circle(50); // bore right through
translate ([0,80]) square(25,true); //bore right through
translate ([80,0]) circle(20); //bore right through

The first block of code shows the shape of the object (It is not too
difficult to draw it upside down). the linear_extrude values are the
depths of the pockets/profiles (-z values). To convert it back to 2d
for exporting as dxf, requires differencing some items. On this
simple made up example, it is not much of a problem, but it certainly
would be for a more complex item. (move the small square to [0,90],
say. I would like to be able to produce the 2d drawing (my initial
starting point) without fussing with differences, etc, and simply add
some linear-extrudes with depths, to get a quick look at the solid
object.

The starting point would be from the 2d dimensions, a hand drawn
sketch, say.


OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org


OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org

On 4/22/2021 11:42 AM, Ray West wrote: > The following is much easier to write, it complies with 2.5 d > thinking, and the the concept would work on polygons, or other 2d > shapes. It is all constructed from 2d and extruding, but There is no > straightforward way to convert it to a dxf file within openscad, afaik. > > > module xyz(x,y,z){ >     linear_extrude(-z) >     translate([x,y])children(); > } I think you have the signs wrong; you negate Z here but then you supply negative values below so the result is positive. I'm going to assume that you only intended one negation; you want to drill holes down from the Z=0 plane. So why doesn't this do what you want? module xyz(x,y,z){ mirror([0,0,1]) linear_extrude(-z) translate([x,y])children(); } > > > intersection(){ > difference(){ >     xyz(0,0,-50)square(200,true); // work piece >     // pockets >           xyz(0,-30,-50)circle(20); >           xyz(0,0,-50)circle(15); >           xyz(20,0,-30)circle(20); >           xyz(0,0,-20)square([100,50],true); >      //island >     difference(){ >           xyz(0,60,-20)square(40,true); >            xyz(0,60,-20)circle(10); >     } >  } > >  // profile   (intersection with object) >    xyz(0,0,-49)square(195,true); >  } > > On 22/04/2021 13:14, Ray West wrote: >> >> On 21/04/2021 23:29, Jordan Brown wrote: >>> What would linear-extruding down do that's different from mirroring? >>> The only thing I can think of offhand is that maybe the direction of >>> the twist would be reversed - and of course a relatively simple >>> wrapper could do that. >>> >> The following code may explain the overall awkwardness of my efforts >> >> translate([400,0]){ >> difference(){ >> linear_extrude(30)square(250,true); >> linear_extrude(20)circle (100); >> linear_extrude(50)circle(50); >> linear_extrude(50)translate ([0,80]) square(25,true); >> linear_extrude(50)translate ([80,0]) circle(20); >> } >> } >> >> // 2d conversion. >> >> difference(){ >> square(250,true); //block 250square by 30 >> circle (100); // bore 20 deep >> } >> circle(50); // bore right through >> translate ([0,80]) square(25,true); //bore right through >> translate ([80,0]) circle(20); //bore right through >> >> The first block of code shows the shape of the object (It is not too >> difficult to draw it upside down). the linear_extrude values are the >> depths of the pockets/profiles (-z values). To convert it back to 2d >> for exporting as dxf, requires differencing some items. On this >> simple made up example, it is not much of a problem, but it certainly >> would be for a more complex item. (move the small square to [0,90], >> say. I would like to be able to produce the 2d drawing (my initial >> starting point) without fussing with differences, etc, and simply add >> some linear-extrudes with depths, to get a quick look at the solid >> object. >> >> The starting point would be from the 2d dimensions, a hand drawn >> sketch, say. >> >> _______________________________________________ >> OpenSCAD mailing list >> To unsubscribe send an email to discuss-leave@lists.openscad.org > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org