jcoehoorn / brickmaker Goto Github PK
View Code? Open in Web Editor NEWGenerate STL 3D model files for Lego-like bricks that can be 3D printed
Generate STL 3D model files for Lego-like bricks that can be 3D printed
In real Lego pieces, the plate pieces do not have the ridges to grab the studs, like the bricks do. But in play testing, my clone plates still need these, or some other alternative in order for the pieces below to snap in and hold effectively.
Trying an 8x8 plate, the preview (F5) is fine, but the full F6 render can take a very long time, and eventually seem to get stuck at 984 out of 1000. It did finish after over 3 minutes. A 10x10 plate took over 6 minutes. Smaller pieces are fine, but I want to reduce build times for these larger bricks.
On real Lego bricks, the ridges go all the way to the top of the brick. This is not needed. The ridges should only need to go as high as the studs.
While I doubt trimming these tiny ridges will create meaningful filament savings, I do suspect it will noticeably reduce motions while printing the inside walls, and therefore improve print times.
There are two inner posts in the 1x1 plate, where there should be none. Also, the top overhangs the sides. It's not clear yet whether the it's the sides or top that are calculated wrong.
In my slicer, if I leave all the default settings alone, I often see a bunch of diagnal movements for the middle line in the walls, instead of a clean line. I can fix this by scaling the piece very slightly (.001%, maybe even less), by adding a very small horizontal expansion value (.0001, maybe even less), or other subtle tweaks.
But I shouldn't have to. I know my nozzle width, and I know the size of the walls. I've confirmed the size of the walls using three different tools (OpenSCAD, MeshMixer, and 3D Builder), and they all report exactly 1.2 mm. I should be three clean lines or 0.4 mm each... but I don't. Maybe because 0.2 is a repeating value (irrational) when expressed in binary.
Need to track down what causes this, or what adjustment I can make to work around the issue and get good slices out of the gate. Since the slicer engine is a mystery to most everyone, it will likely end up doing the work-around, where I use a value that is intentionally wrong by some very small amount.
When transitioning from the side walls to the top of the brick, the first layer bridging over the empty space can tend to droop a bit. This is fine for bricks, but for plates it means the studs on a piece below may not fit all the way in cleanly. We need to make this top face slimmer (and lift it up by the same amount) so there is space for the studs below. Probably 0.2 mm is enough, and this could be an optional adjustment factor.
The 2nd post inside a 2x3 brick has a cross support that does not belong. Real 2x3 bricks don't have this, and since printed PLA pieces already tends to be more rigid than Lego ABS, the extra support will hurt more than it helps.
Base support (a plate with a solid bottom) was promised initially, but is not yet complete. Let's get this done.
I'm still tweaking adjustments values with almost every print, and therefore new numbers for those constants will tend to sneak in with otherwise unrelated commits. It's bad, I know, and better process could account for this, but for the moment I'm just leaving this as an active issue, to help anyone else watching this project be aware of the problem, until things become more stable.
This is an idea that may never happen, but I could probably add an option for the customizer to set the render color. Of course, this won't matter for the print; it would only be for rendering. And it's easy to paint an STL in other programs, once you have it, but this is one of those things some people might really appreciate.
Big module named LEGO()
Which will in turn call BLOCK(), STUDS(), POSTS(), RIDGES()
This will allow the code to used as part of other scripts, to build new things.
ThingiVerse Customizer is rendering studs different than OpenSCAD.
The code below somehow produces a stud with a 2 mm diameter in the customizer and 4.825 mm in OpenSCAD.
LU = 1.6;
stud_radius_adjustment = -.02;
base_stud_height = 1.8;
stud_height_adjustment = .1;
stud_height = base_stud_height - stud_height_adjustment;
stud_rad = (1.5*LU) - stud_radius_adjustment;
cylinder(stud_height,stud_rad, stud_rad, $fn=40);
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.