Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Laser Layout Mirror Option #106

Merged
merged 10 commits into from
Dec 27, 2020
Merged

Conversation

dmadison
Copy link
Contributor

@dmadison dmadison commented Dec 12, 2020

This adds the option to mirror the 2D laser-cut design so that the outside faces are facing 'up' / towards the laser when cut. This is useful for materials with a special finish on only one side like Ponoko's matte black acrylic, which is cut with the matte finish facing towards the laser.

The mirroring can be set with the render_2d_mirror flag, or with the --mirror option in the generate_2d.py script.

This continues the conversation from PR #100, and offers an alternate solution to the same issue.

For material where the outside face of the design is cut facing *up* rather than down.
One function call with children instead of a separate call for each child
This avoids etching on the outside faces when the layout is mirrored.

Note that this commit breaks the `generate_2d.py` script when using the --mirror option, as etchings will fail to export.
This allows you to disable geometry (like etched features) and have the script ignore cases where no geometry is exported.
@dmadison
Copy link
Contributor Author

Okay. With the addition of the alignment indicators (PR #111) I think we've reached the point where it no longer makes sense to mirror the individual etched portions. Instead, I've updated the etch function to prevent rendering the laser etches if the mirror option is set.

I've also updated the generate_2d.py and projection_renderer.py scripts to pass OpenSCAD components that don't return geometry instead of raising an exception, and added an additional --no-etch option for exporting the unmirrored design without the etched portions.

Demos:

Copy link
Owner

@scottbez1 scottbez1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, one comment inline

This simplifies the logic when disabling the etched output.
@scottbez1 scottbez1 merged commit ab3f67d into scottbez1:master Dec 27, 2020
@dmadison dmadison deleted the laser-mirror branch December 27, 2020 01:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants