Comments (4)
Hi Ken,
the library requires each lpart to have a unique name so that it can identify them during the arrangement process later on. You define an lpart named pad
and instantiate it three times, therefore it returns Error: Duplicate lpart id's: pad
.
A quick fix would be to include the diameter in the lpart names, i.e. by writing lpart(str("pad", diam), [diam, diam])
and lpart(str("pad_with_hole", odiam, idiam), [odiam, odiam])
.
If you need multiple pads of the same diameter, this will fail for the same reason as before of course. You could then do the following:
include <laserscad.scad>
kerf = 0.5;
thickness = 3;
$fn = 200;
font_color = "black";
font_size = 1.5;
module pad(diam, id="") {
lpart(str("pad", diam, id), [diam, diam]) {
lengrave(thickness, true){
color(font_color)
text(font="DejaVu Sans", size=font_size, str(diam),
halign="center", valign="center");
}
cylinder(h=thickness, d=diam + kerf);
}
}
for (x=[1:4], y=[1:4]) {
translate([x*10,y*10,0])
pad(8, id=str(x,y));
}
from laserscad.
from laserscad.
Yeah, I agree that it's not particularly obvious from the readme. I'll update that.
Iโll get back on it.
๐๐
from laserscad.
from laserscad.
Related Issues (15)
- Finish README.md
- Sanity checks and error messages HOT 1
- Windows support
- Version check utility HOT 1
- Fails with misleading message for models that don't define lkerf, lidentify, and lmargin HOT 1
- README.md problem, and "make cut" problem (_laserscad_temp/<>.echo not found) HOT 8
- Support nesting of lpart, ltranslate, etc.
- 2D packing with simulated annealing HOT 1
- Proper support for 2D packing across multiple sheets HOT 2
- "lslice" for slicing 3D models in z direction
- Add SVG export.
- Engraving support
- Add license headers HOT 1
- Proper SVG manipulation via XML
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from laserscad.