mbugert / laserscad

A library for efficient lasercutting with OpenSCAD.
GNU Lesser General Public License v3.0
49 stars 10 forks source link

README.md problem, and "make cut" problem (_laserscad_temp/<>.echo not found) #16

Closed krbeesley closed 4 years ago

krbeesley commented 4 years ago

I installed v0.3.0 on OS X.

I created an .scad file, including a call to lengrave, that by itself seems to work as expected in OpenSCAD itself.

I then cd’ed to the dist/ directory and found the following instructions in the laserscad README.md, which appear to be in error:

    Under “Lasercutting template”
    the instructions say to “Open a shell and run:”
            cd laserscad/dist
            make engrave model=path/to/your/model.scad

    Then under “Engravings”, it tells you to invoke the very same commands.

From other clues, it would appear that the first command should be

            make cut model=path/to/your/model.scad

But when I run that, I get

$ make cut model=/Users/beesley/perso/shop/3D/openscad/projects/pads/pads.scad Getting object bounding boxes... Traceback (most recent call last): File "util/extract_bounding_boxes.py", line 86, in extract(*sys.argv[1:]) File "util/extract_bounding_boxes.py", line 26, in extract with open(src, 'r') as file: FileNotFoundError: [Errno 2] No such file or directory: '/Users/beesley/perso/shop/3D/openscad/projects/pads/_laserscad_temp/pads.echo' make: *** [/Users/beesley/perso/shop/3D/openscad/projects/pads/_laserscad_temp/pads_bb.csv] Error 1

In the directory where my pads.scad is located, I see that a directory _laserscad_temp/ was created, but it’s empty.


I continue to look into this, but I’m currently stuck.

Any suggestions?

mbugert commented 4 years ago

Hi krbeesley,

sorry for taking so long to respond.

From other clues, it would appear that the first command should be make cut model=path/to/your/model.scad

Correct. This is fixed now in the readme.

In the directory where my pads.scad is located, I see that a directory _laserscad_temp/ was created, but it’s empty.

Looks like the very first openscad in the makefile fails. I don't have a device with OS X available so -- could you please try the following things on your end and post the outcome here?

krbeesley commented 4 years ago

On 18Aug2020, at 14:51, Michael Bugert notifications@github.com wrote:

Hi krbeesley,

sorry for taking so long to respond.

From other clues, it would appear that the first command should be make cut model=path/to/your/model.scad

Correct. This is fixed now in the readme.

In the directory where my pads.scad is located, I see that a directory _laserscad_temp/ was created, but it’s empty.

Looks like the very first openscad in the makefile fails. I don't have a device with OS X available so -- could you please try the following things on your end and post the outcome here?

In a shell, what does which openscad return? On my system, it returns

/Users/beesley/bin/openscad

Where ~/bin/openscad is a file containing the following:


!/bin/bash

open -a OpenScad


In OS X, “open -a” opens an OS X application stored in the standard /Applications directory. When you download an OS X app, you put it in /Applications

In a shell, when you cd into the directory with your .scad file and run openscad -D _laserscad_mode=1 -o out.echo pads.scad, does this create the file out.echo in the same directory?

It tells me that -D is not a valid option. Here’s the full complaint:


beesley$ openscad -D _laserscad_mode=1 -o out.echo pads.scad open: invalid option -- D Usage: open [-e] [-t] [-f] [-W] [-R] [-n] [-g] [-h] [-s ][-b ] [-a ] [filenames] [--args arguments] Help: Open opens files from a shell. By default, opens each file using the default application for that file.
If the file is in the form of a URL, the file will be opened as a URL. Options: -a Opens with the specified application. -b Opens with the specified application bundle identifier. -e Opens with TextEdit. -t Opens with default text editor. -f Reads input from standard input and opens with TextEdit. -F --fresh Launches the app fresh, that is, without restoring windows. Saved persistent state is lost, excluding Untitled documents. -R, --reveal Selects in the Finder instead of opening. -W, --wait-apps Blocks until the used applications are closed (even if they were already running). --args All remaining arguments are passed in argv to the application's main() function instead of opened. -n, --new Open a new instance of the application even if one is already running. -j, --hide Launches the app hidden. -g, --background Does not bring the application to the foreground. -h, --header Searches header file locations for headers matching the given filenames, and opens them. -s For -h, the SDK to use; if supplied, only SDKs whose names contain the argument value are searched. Otherwise the highest versioned SDK in each platform is used.


Thanks for looking into this.

Ken


Kenneth R. Beesley, D.Phil. PO Box 540475 North Salt Lake UT 84054 USA

mbugert commented 4 years ago

Okay, that would explain it.

The wikibooks user manual recommends to use a symlink for OS X which should solve the issue. I will add a note to the readme for the future. Let me know if this fixed your issue. :blush:

krbeesley commented 4 years ago

On 23Aug2020, at 08:40, Michael Bugert notifications@github.com wrote:

Okay, that would explain it.

The wikibooks user manual https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Using_OpenSCAD_in_a_command_line_environment#MacOS_notes recommends to use a symlink for OS X which should solve the issue. I will add a note to the readme for the future. Let me know if this fixed your issue. 😊

I created the symlink, restarted the machine, and ran

$ openscad -D _laserscad_mode=1 -o out.echo pads.scad

And I still get the message:


open: invalid option -- D Usage: open [-e] [-t] [-f] [-W] [-R] [-n] [-g] [-h] [-s ][-b ] [-a ] [filenames] [--args arguments] Help: Open opens files from a shell. By default, opens each file using the default application for that file.
If the file is in the form of a URL, the file will be opened as a URL. Options: -a Opens with the specified application. -b Opens with the specified application bundle identifier. -e Opens with TextEdit. -t Opens with default text editor. -f Reads input from standard input and opens with TextEdit. -F --fresh Launches the app fresh, that is, without restoring windows. Saved persistent state is lost, excluding Untitled documents. -R, --reveal Selects in the Finder instead of opening. -W, --wait-apps Blocks until the used applications are closed (even if they were already running). --args All remaining arguments are passed in argv to the application's main() function instead of opened. -n, --new Open a new instance of the application even if one is already running. -j, --hide Launches the app hidden. -g, --background Does not bring the application to the foreground. -h, --header Searches header file locations for headers matching the given filenames, and opens them. -s For -h, the SDK to use; if supplied, only SDKs whose names contain the argument value are searched. Otherwise the highest versioned SDK in each platform is used.


What is -D supposed to do in your operating system? Perhaps there’s an equivalent for open -D in OS X.

Best wishes,

Ken

You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/mbugert/laserscad/issues/16#issuecomment-678782414, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAPIKMLARH6J4WGA4AA2USLSCES4DANCNFSM4PQSBJNQ.


Kenneth R. Beesley, D.Phil. PO Box 540475 North Salt Lake UT 84054 USA

mbugert commented 4 years ago

The problem seems to be that your previous /Users/beesley/bin/openscad still takes priority over the one in /usr/local/bin/openscad. You might have to remove the former to make it work.

krbeesley commented 4 years ago

On 24Aug2020, at 00:03, Michael Bugert notifications@github.com wrote:

The problem seems to be that your previous /Users/beesley/bin/openscad still takes priority over the one in /usr/local/bin/openscad. You might have to remove the former to make it work.

No. I already had renamed it /Users/beesley/bin/openscad.sav

$ which openscad

returns /usr/local/bin/openscad

which is a pointer to /Applications/OpenSCAD.app/Contents/MacOS/OpenSCAD

As far as I can tell, somehow the version of OpenSCAD that I have invokes the “open” command on OS X, and that “open” command on OS X does not recognize the option -D

$ man open

on OS X shows these options:

NAME open -- open files and directories

SYNOPSIS open [-e] [-t] [-f] [-F] [-W] [-R] [-n] [-g] [-j] [-h] [-s sdk] [-b bundle_identifier] [-a application] file ... [--args arg1 …]

No -D. What is the -D supposed to do? There may be an equivalent for the “open” on OS X.

Best wishes,

Ken

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/mbugert/laserscad/issues/16#issuecomment-678921953, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAPIKMJZLJMP2GKOTMR3BPDSCH7EHANCNFSM4PQSBJNQ.


Kenneth R. Beesley, D.Phil. PO Box 540475 North Salt Lake UT 84054 USA

mbugert commented 4 years ago

No -D. What is the -D supposed to do? There may be an equivalent for the “open” on OS X.

-D is a command line option of openscad which should work regardless of the operating system. A similar command which should "just work" would be openscad -v to show the currently installed OpenSCAD version.

To me, it still looks like OpenSCAD is not correctly set up on your machine yet. I can't reproduce it unfortunately and I'm out of ideas at this point. It might be that other users in the OpenSCAD forums or on IRC can help, see https://www.openscad.org/community.html .

mbugert commented 4 years ago

Seeing that you posted issue #17 , this here looks like it's resolved.