discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

Managed to model a finger joint box with relieved fingers --- now how to actually cut it? Allow OpenSCAD to write out files?

WF
William F. Adams
Tue, Aug 11, 2020 1:17 PM

Tried sending this before and it didn't go through.
Image of the design at: https://imgur.com/g9pQxS6
It was also discussed at:https://www.reddit.com/r/openscad/comments/i2do7a/managed_to_model_a_finger_joint_box_with_relieved/?If folks want to see the code it's at: https://community.carbide3d.com/uploads/short-url/cb4ilRtY2Hestsi1kbgdht9yM0Z.zip(and further discussion at: https://community.carbide3d.com/t/cnc-finger-joint-box/8880 )The problems are:

  • performance at any reasonable quality level is glacial --- the app essentially becomes unusable
  • the rounding is simply a straight-line move --- how do I get those numbers out of RapCAD or OpenSCAD and into a DXF or SVG? I'm not seeing a way to get these coordinates written out to a file or to put a non-closed path into a DXF or SVG

There simply isn't a way to export an open path in a DXF from OpenSCAD --- I don't want to use a rectangle since that may result in a doubling back on the cut and increased machine time.
Another consideration is I can't find a CAM tool which will model a radiused endmill such as: https://www.amazon.com/gp/product/B00Q8M1SRS
A simple work-around would be if OpenSCAD would allow opening a text file and writing out coordinate information --- this would be a lot easier than the parallel-coding I've used for simpler projects:

http://www.tug.org/TUGboat/tb40-2/tb125adams-3d.pdf
If that's not an option --- do any of the OpenSCAD alternatives allow writing out text files? I'm wondering if I shouldn't just try writing out G-Code directly.
Please don't tell me to just use Autodesk Fusion 360 --- I can't afford the bar bill that would require --- if someone has a suggestion for FreeCAD tutorials which would guide along this I'd be glad of them though.
William

Tried sending this before and it didn't go through. Image of the design at: https://imgur.com/g9pQxS6 It was also discussed at:https://www.reddit.com/r/openscad/comments/i2do7a/managed_to_model_a_finger_joint_box_with_relieved/?If folks want to see the code it's at: https://community.carbide3d.com/uploads/short-url/cb4ilRtY2Hestsi1kbgdht9yM0Z.zip(and further discussion at: https://community.carbide3d.com/t/cnc-finger-joint-box/8880 )The problems are: - performance at any reasonable quality level is glacial --- the app essentially becomes unusable - the rounding is simply a straight-line move --- how do I get those numbers out of RapCAD or OpenSCAD and into a DXF or SVG? I'm not seeing a way to get these coordinates written out to a file or to put a non-closed path into a DXF or SVG There simply isn't a way to export an open path in a DXF from OpenSCAD --- I don't want to use a rectangle since that may result in a doubling back on the cut and increased machine time. Another consideration is I can't find a CAM tool which will model a radiused endmill such as: https://www.amazon.com/gp/product/B00Q8M1SRS A simple work-around would be if OpenSCAD would allow opening a text file and writing out coordinate information --- this would be a lot easier than the parallel-coding I've used for simpler projects: http://www.tug.org/TUGboat/tb40-2/tb125adams-3d.pdf If that's not an option --- do any of the OpenSCAD alternatives allow writing out text files? I'm wondering if I shouldn't just try writing out G-Code directly. Please don't tell me to just use Autodesk Fusion 360 --- I can't afford the bar bill that would require --- if someone has a suggestion for FreeCAD tutorials which would guide along this I'd be glad of them though. William
NH
nop head
Tue, Aug 11, 2020 1:34 PM

I get text out of OpenSCAD by using echo and the command line and capturing
it with a Python script that extracts the text from the echo format. There
is no access to the geometry coordinates though unless you generate it with
polygon, etc.

On Tue, 11 Aug 2020 at 14:18, William F. Adams via Discuss <
discuss@lists.openscad.org> wrote:

Tried sending this before and it didn't go through.

Image of the design at: https://imgur.com/g9pQxS6

It was also discussed at:

https://www.reddit.com/r/openscad/comments/i2do7a/managed_to_model_a_finger_joint_box_with_relieved/
?
If folks want to see the code it's at:
https://community.carbide3d.com/uploads/short-url/cb4ilRtY2Hestsi1kbgdht9yM0Z.zip
(and further discussion at:
https://community.carbide3d.com/t/cnc-finger-joint-box/8880 )
The problems are:

- performance at any reasonable quality level is glacial --- the app
essentially becomes unusable
- the rounding is simply a straight-line move --- how do I get those
numbers out of RapCAD or OpenSCAD and into a DXF or SVG? I'm not seeing a
way to get these coordinates written out to a file or to put a non-closed
path into a DXF or SVG

There simply isn't a way to export an open path in a DXF from OpenSCAD ---
I don't want to use a rectangle since that may result in a doubling back on
the cut and increased machine time.

Another consideration is I can't find a CAM tool which will model a
radiused endmill such as: https://www.amazon.com/gp/product/B00Q8M1SRS

A simple work-around would be if OpenSCAD would allow opening a text file
and writing out coordinate information --- this would be a lot easier than
the parallel-coding I've used for simpler projects:

http://www.tug.org/TUGboat/tb40-2/tb125adams-3d.pdf

If that's not an option --- do any of the OpenSCAD alternatives allow
writing out text files? I'm wondering if I shouldn't just try writing out
G-Code directly.

Please don't tell me to just use Autodesk Fusion 360 --- I can't afford
the bar bill that would require --- if someone has a suggestion for FreeCAD
tutorials which would guide along this I'd be glad of them though.

William


OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

I get text out of OpenSCAD by using echo and the command line and capturing it with a Python script that extracts the text from the echo format. There is no access to the geometry coordinates though unless you generate it with polygon, etc. On Tue, 11 Aug 2020 at 14:18, William F. Adams via Discuss < discuss@lists.openscad.org> wrote: > Tried sending this before and it didn't go through. > > Image of the design at: https://imgur.com/g9pQxS6 > > It was also discussed at: > > https://www.reddit.com/r/openscad/comments/i2do7a/managed_to_model_a_finger_joint_box_with_relieved/ > ? > If folks want to see the code it's at: > https://community.carbide3d.com/uploads/short-url/cb4ilRtY2Hestsi1kbgdht9yM0Z.zip > (and further discussion at: > https://community.carbide3d.com/t/cnc-finger-joint-box/8880 ) > The problems are: > > - performance at any reasonable quality level is glacial --- the app > essentially becomes unusable > - the rounding is simply a straight-line move --- how do I get those > numbers out of RapCAD or OpenSCAD and into a DXF or SVG? I'm not seeing a > way to get these coordinates written out to a file or to put a non-closed > path into a DXF or SVG > > > There simply isn't a way to export an open path in a DXF from OpenSCAD --- > I don't want to use a rectangle since that may result in a doubling back on > the cut and increased machine time. > > Another consideration is I can't find a CAM tool which will model a > radiused endmill such as: https://www.amazon.com/gp/product/B00Q8M1SRS > > A simple work-around would be if OpenSCAD would allow opening a text file > and writing out coordinate information --- this would be a lot easier than > the parallel-coding I've used for simpler projects: > > > http://www.tug.org/TUGboat/tb40-2/tb125adams-3d.pdf > > If that's not an option --- do any of the OpenSCAD alternatives allow > writing out text files? I'm wondering if I shouldn't just try writing out > G-Code directly. > > Please don't tell me to just use Autodesk Fusion 360 --- I can't afford > the bar bill that would require --- if someone has a suggestion for FreeCAD > tutorials which would guide along this I'd be glad of them though. > > William > > > > _______________________________________________ > OpenSCAD mailing list > Discuss@lists.openscad.org > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org >
WF
William F. Adams
Tue, Aug 11, 2020 4:09 PM

If I could create the design as a polygon I'd start there --- maybe arguably that's the better route --- have a master program which writes out both an OpenSCAD file and a matching G-Code file --- but I'd really rather just do it from w/in OpenSCAD or a similar 3D modeling tool.
Toolpath Language isn't an option since it can't model radius endmills.
I've gone ahead and put in an issue w/ both OpenSCAD and RapCAD to add the ability to write out numbers from calculations to a text file --- that and some plain text would let one directly create G-Code which would allow either be a very powerful 3D CAM tool.
If there's some other scripted 3D modeling tool which allows writing out numbers from calculation and text already I'd be glad to hear of it.
William

If I could create the design as a polygon I'd start there --- maybe arguably that's the better route --- have a master program which writes out both an OpenSCAD file and a matching G-Code file --- but I'd really rather just do it from w/in OpenSCAD or a similar 3D modeling tool. Toolpath Language isn't an option since it can't model radius endmills. I've gone ahead and put in an issue w/ both OpenSCAD and RapCAD to add the ability to write out numbers from calculations to a text file --- that and some plain text would let one directly create G-Code which would allow either be a very powerful 3D CAM tool. If there's some other scripted 3D modeling tool which allows writing out numbers from calculation and text already I'd be glad to hear of it. William
WF
William F. Adams
Wed, Aug 12, 2020 12:31 PM

Thanks!
Raised an issue on GitHub and had some really good discussion there:
https://github.com/openscad/openscad/issues/3400
Just adding a pair of menus to the File menu:
File | Save Console Text (Filtered) == only the text added in the .scad file programmatically using either echo or some new command
and 
Save Console Text (Complete) == all the text in the Console area
and having a command which would allow specifying the file extension (and name, though using the current filename would be fine for me) would work.
It would be a lot easier for me, and I think more expressive than the alternatives:
 - using a second programming language to write out a matched pair of .scad and .nc (G-Code) files - using a second programming language to capture the text output from the console and filter it to create the G-Code file
Thank you for taking the time to read and consider this.
William

Thanks! Raised an issue on GitHub and had some really good discussion there: https://github.com/openscad/openscad/issues/3400 Just adding a pair of menus to the File menu: File | Save Console Text (Filtered) == only the text added in the .scad file programmatically using either echo or some new command and  Save Console Text (Complete) == all the text in the Console area and having a command which would allow specifying the file extension (and name, though using the current filename would be fine for me) would work. It would be a lot easier for me, and I think more expressive than the alternatives:  - using a second programming language to write out a matched pair of .scad and .nc (G-Code) files - using a second programming language to capture the text output from the console and filter it to create the G-Code file Thank you for taking the time to read and consider this. William
WF
William F. Adams
Wed, Aug 12, 2020 3:35 PM

Issue was closed, so continuing this at:
https://github.com/openscad/openscad/issues/2017

-----Original Message-----
From: William F. Adams via Discuss discuss@lists.openscad.org
To: discuss@lists.openscad.org discuss@lists.openscad.org
Cc: William F. Adams willadams@aol.com
Sent: Wed, Aug 12, 2020 8:31 am
Subject: Re: [OpenSCAD] Managed to model a finger joint box with relieved fingers --- now how to actually cut it? Allow OpenSCAD to write out files?

Thanks!
Raised an issue on GitHub and had some really good discussion there:
https://github.com/openscad/openscad/issues/3400
Just adding a pair of menus to the File menu:
File | Save Console Text (Filtered) == only the text added in the .scad file programmatically using either echo or some new command
and 
Save Console Text (Complete) == all the text in the Console area
and having a command which would allow specifying the file extension (and name, though using the current filename would be fine for me) would work.
It would be a lot easier for me, and I think more expressive than the alternatives:
 - using a second programming language to write out a matched pair of .scad and .nc (G-Code) files - using a second programming language to capture the text output from the console and filter it to create the G-Code file
Thank you for taking the time to read and consider this.
William


OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

Issue was closed, so continuing this at: https://github.com/openscad/openscad/issues/2017 -----Original Message----- From: William F. Adams via Discuss <discuss@lists.openscad.org> To: discuss@lists.openscad.org <discuss@lists.openscad.org> Cc: William F. Adams <willadams@aol.com> Sent: Wed, Aug 12, 2020 8:31 am Subject: Re: [OpenSCAD] Managed to model a finger joint box with relieved fingers --- now how to actually cut it? Allow OpenSCAD to write out files? Thanks! Raised an issue on GitHub and had some really good discussion there: https://github.com/openscad/openscad/issues/3400 Just adding a pair of menus to the File menu: File | Save Console Text (Filtered) == only the text added in the .scad file programmatically using either echo or some new command and  Save Console Text (Complete) == all the text in the Console area and having a command which would allow specifying the file extension (and name, though using the current filename would be fine for me) would work. It would be a lot easier for me, and I think more expressive than the alternatives:  - using a second programming language to write out a matched pair of .scad and .nc (G-Code) files - using a second programming language to capture the text output from the console and filter it to create the G-Code file Thank you for taking the time to read and consider this. William _______________________________________________ OpenSCAD mailing list Discuss@lists.openscad.org http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
WF
William F. Adams
Thu, Aug 13, 2020 2:19 PM

Still surprised this issue was closed with such little consideration.
Writing out text files from OpenSCAD could be quite useful (and apparently some folks are already using the Console output by filtering it --- allowing a bit more control over writing out files would make this far more workable).
Potential uses:
 - debugging - calculating coordinates to make specialized files such as polygons - B.O.M.s - assembly instructions and other documentation - doing CAM as raw G-Code
Just adding a parallel output where if one called echo() only that text was written out to a second file (with a user configurable file extension) would work --- no added menu entry, just a pair of configuration options:
[ ] write out echo text in separate file[ ] custom file extension, use ____ instead of .txt
would work for me.
William

Still surprised this issue was closed with such little consideration. Writing out text files from OpenSCAD could be quite useful (and apparently some folks are already using the Console output by filtering it --- allowing a bit more control over writing out files would make this far more workable). Potential uses:  - debugging - calculating coordinates to make specialized files such as polygons - B.O.M.s - assembly instructions and other documentation - doing CAM as raw G-Code Just adding a parallel output where if one called echo() only that text was written out to a second file (with a user configurable file extension) would work --- no added menu entry, just a pair of configuration options: [ ] write out echo text in separate file[ ] custom file extension, use ____ instead of .txt would work for me. William
AC
A. Craig West
Thu, Aug 13, 2020 2:22 PM

I would find general file io to be VERY useful, it would allow me to
write code to support file type we don't currently support, for both
input and output

On Thu, Aug 13, 2020 at 10:20 AM William F. Adams via Discuss
discuss@lists.openscad.org wrote:

Still surprised this issue was closed with such little consideration.

Writing out text files from OpenSCAD could be quite useful (and apparently some folks are already using the Console output by filtering it --- allowing a bit more control over writing out files would make this far more workable).

Potential uses:

  • debugging
  • calculating coordinates to make specialized files such as polygons
  • B.O.M.s
  • assembly instructions and other documentation
  • doing CAM as raw G-Code

Just adding a parallel output where if one called echo() only that text was written out to a second file (with a user configurable file extension) would work --- no added menu entry, just a pair of configuration options:

[ ] write out echo text in separate file
[ ] custom file extension, use ____ instead of .txt

would work for me.

William


OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

I would find general file io to be VERY useful, it would allow me to write code to support file type we don't currently support, for both input and output On Thu, Aug 13, 2020 at 10:20 AM William F. Adams via Discuss <discuss@lists.openscad.org> wrote: > > Still surprised this issue was closed with such little consideration. > > Writing out text files from OpenSCAD could be quite useful (and apparently some folks are already using the Console output by filtering it --- allowing a bit more control over writing out files would make this far more workable). > > Potential uses: > > - debugging > - calculating coordinates to make specialized files such as polygons > - B.O.M.s > - assembly instructions and other documentation > - doing CAM as raw G-Code > > Just adding a parallel output where if one called echo() only that text was written out to a second file (with a user configurable file extension) would work --- no added menu entry, just a pair of configuration options: > > [ ] write out echo text in separate file > [ ] custom file extension, use ____ instead of .txt > > would work for me. > > William > > _______________________________________________ > OpenSCAD mailing list > Discuss@lists.openscad.org > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
JB
Jordan Brown
Thu, Aug 13, 2020 3:42 PM

If you want to experiment with writing other file types, it's not too
hard.  Use echo() and copy-paste the output, or run OpenSCAD from the
command line and capture the output.  You'd have to post-process it a
bit to remove the noise, but it wouldn't be terribly hard.  nop head
does this to generate BOMs.  I do it to generate lists of models from
multi-model files.

But make sure that you can actually do what you want before thinking
about adding new features.  Remember that nothing in the OpenSCAD
language has access to the coordinates.

translate([x,y,z]) {
    /* Nothing here has any way to access the the new origin in global coordinates. */
}

If you want access to the coordinates you'd have to do your own
transforms in parallel.

If you want to experiment with writing other file types, it's not too hard.  Use echo() and copy-paste the output, or run OpenSCAD from the command line and capture the output.  You'd have to post-process it a bit to remove the noise, but it wouldn't be terribly hard.  nop head does this to generate BOMs.  I do it to generate lists of models from multi-model files. But make sure that you can actually do what you want before thinking about adding new features.  Remember that nothing in the OpenSCAD language has access to the coordinates. translate([x,y,z]) { /* Nothing here has any way to access the the new origin in global coordinates. */ } If you want access to the coordinates you'd have to do your own transforms in parallel.
AC
A. Craig West
Thu, Aug 13, 2020 3:55 PM

I am actually more interested in arbitrary file input, but both input and
output would be useful. Must of my libraries work entirely in userspace, so
I have all of the co-ordinate already

On Thu, 13 Aug 2020, 11:43 Jordan Brown, openscad@jordan.maileater.net
wrote:

If you want to experiment with writing other file types, it's not too
hard.  Use echo() and copy-paste the output, or run OpenSCAD from the
command line and capture the output.  You'd have to post-process it a bit
to remove the noise, but it wouldn't be terribly hard.  nop head does this
to generate BOMs.  I do it to generate lists of models from multi-model
files.

But make sure that you can actually do what you want before thinking about
adding new features.  Remember that nothing in the OpenSCAD language has
access to the coordinates.

translate([x,y,z]) {
/* Nothing here has any way to access the the new origin in global coordinates. */
}

If you want access to the coordinates you'd have to do your own transforms
in parallel.


OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

I am actually more interested in arbitrary file input, but both input and output would be useful. Must of my libraries work entirely in userspace, so I have all of the co-ordinate already On Thu, 13 Aug 2020, 11:43 Jordan Brown, <openscad@jordan.maileater.net> wrote: > If you want to experiment with writing other file types, it's not too > hard. Use echo() and copy-paste the output, or run OpenSCAD from the > command line and capture the output. You'd have to post-process it a bit > to remove the noise, but it wouldn't be terribly hard. nop head does this > to generate BOMs. I do it to generate lists of models from multi-model > files. > > But make sure that you can actually do what you want before thinking about > adding new features. Remember that nothing in the OpenSCAD language has > access to the coordinates. > > translate([x,y,z]) { > /* Nothing here has any way to access the the new origin in global coordinates. */ > } > > If you want access to the coordinates you'd have to do your own transforms > in parallel. > > _______________________________________________ > OpenSCAD mailing list > Discuss@lists.openscad.org > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org >
C
cbernhardt
Thu, Aug 13, 2020 4:36 PM

To answer your original question “how do I get those numbers out of RapCAD or
OpenSCAD and into a DXF or SVG?”
I took your 3d_Fingerjoint.scad file and exported it to an STL.  I imported
the STL file into AutoCAD and traced a POLYLINE around the boundary of the 4
pieces and then exported a DXF file of just the POLYLINES.  And imported
that into OpenSCAD.  I can understand why you choose not to use AutoCAD but
FreeCAD (according to their manual) can do the same thing.
http://forum.openscad.org/file/t1309/outline.jpg

--
Sent from: http://forum.openscad.org/

To answer your original question “how do I get those numbers out of RapCAD or OpenSCAD and into a DXF or SVG?” I took your 3d_Fingerjoint.scad file and exported it to an STL. I imported the STL file into AutoCAD and traced a POLYLINE around the boundary of the 4 pieces and then exported a DXF file of just the POLYLINES. And imported that into OpenSCAD. I can understand why you choose not to use AutoCAD but FreeCAD (according to their manual) can do the same thing. <http://forum.openscad.org/file/t1309/outline.jpg> -- Sent from: http://forum.openscad.org/