Giter Club home page Giter Club logo

laserscad's People

Contributors

hartzell avatar jmgao avatar mbugert avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

laserscad's Issues

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

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?

Engraving support

Support for engraving lparts. Either to identify parts after they're lasered or just because it looks fancy.

  • scad, makefile adjustments
  • add png import to example
  • documentation

2D packing with simulated annealing

Proper packing algorithm with multiple quality settings.

  • basic implementation
  • reasonable parameters (quality presets, cooling schedule)
  • documentation/readme

Fails with misleading message for models that don't define lkerf, lidentify, and lmargin

I've spent a couple days trying to debug OpenSCAD's import behavior, when it turned out to be a problem with laserscad.

Laserscad prints the following failure message if any warnings come out of OpenSCAD in from laserscad.scad:

Error: OpenSCAD cannot find 'laserscad.scad'. Put 'laserscad.scad' in the OpenSCAD libraries folder or in the same folder as your model.

That statement is incorrect. In my case, the warnings were

WARNING: Ignoring unknown variable 'lkerf', in file laserscad.scad, line 150.
WARNING: Ignoring unknown variable 'lmargin', in file laserscad.scad, line 151.
WARNING: Ignoring unknown variable 'lidentify', in file laserscad.scad, line 152.

As a workaround, defining all three variables in my design silences the warnings.

Proper SVG manipulation via XML

  • don't manipulate SVG via find/replace on plaintext, use proper XML
  • add possibility to change line thickness of exported SVGs
  • documentation

Version check utility

  • Add major, minor, patch version to laserscad.scad and add a utility module which complains if the version does not match
  • Document changes in readme

Error: Duplicate lpart id's

I'm still having problems running laserscad on OS X. Here's the background:

On OS X v 10.13.6
Using laserscad v0.3.2

$ which openscad
returns /usr/local/bin/openscad

which is an executable bash script that looks like this:

#!/bin/bash
/Applications/OpenSCAD.app/Contents/MacOS/OpenSCAD $*

When I cd to the new v0.3.2 laserscad/dist and
invoke

$ make cut model=/Users/beesley/perso/shop/3D/openscad/projects/pads/pads.scad

it creates directory _laserscad_temp/ in pads/, puts file pads.echo in it, and then finds an error,
returning

$ make cut model=/Users/beesley/perso/shop/3D/openscad/projects/pads/pads.scad
Getting object bounding boxes...
OpenSCAD reports:
WARNING: Ignoring unknown variable 'lidentify'.
WARNING: Ignoring unknown variable 'lmargin'.
WARNING: Ignoring unknown variable 'lkerf'.
Error: Duplicate lpart id's: pad
make: *** [/Users/beesley/perso/shop/3D/openscad/projects/pads/_laserscad_temp/pads_bb.csv] Error 1

and exits. There's no further output.

The pads.scad file looks like this:
// pads.scad
// Kenneth R. Beesley
/*
Design pads (basically just circles) for saxophone keys to be cut
out of material by a laser cutter

The "material" will be a sandwich of neoprene rubber sheet (1/16"
to 1/8" thick) with a card backing already glued on.  The laser
cutter will need to cut through the rubber and the card backing.

The thickness of the material will vary.  Needs to be specified
for the laser-cutter, I assume?

*/

include <laserscad.scad>

// width of cut left by the laser cutter (see details of the machine)
kerf = 0.5;

thickness = 3; // affects only the development preview in OpenSCAD

// $fn value controls the roundness of the circles
$fn = 200;
font_color = "black";
font_size = 1.5;

module pad(diam) {
lpart("pad", [diam, diam]) {
// text to be engraved
lengrave(thickness, true){
color(font_color)
text(font="DejaVu Sans", size=font_size, str(diam),
halign="center", valign="center");
}
// engrave the text onto a basic cylinder
cylinder(h=thickness, d=diam + kerf);

}

}

module pad_with_hole(odiam, idiam) {
lpart("pad_with_hole", [odiam, odiam]) {
// text to be engraved
lengrave(thickness, true){
color(font_color)
translate([0, 2, 0])
text(font="DejaVu Sans", size=font_size, str(odiam), halign="center",
valign="center");
}

    // engrave the text onto a cylinder with a hole in the middle
    difference() {
        cylinder(h=thickness, d=odiam + kerf);

        translate([0, 0, -1])
        cylinder(h=thickness + 2, d=idiam - kerf);
    }
}

}

union() {
translate([-24, 0, 0])
pad(8.5);

translate([-13, 0, 0])
pad(10);

pad(13);

translate([16, 0, 0])
pad_with_hole(15, 2);

}

********* end of pads.scad ********

So that's where I'm stuck.

What do I need to do to get this working?

Thanks,

Ken

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.