Lego bricks in FreeCAD
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
-
- Posts: 1
- Joined: Mon Sep 25, 2017 10:08 am
Re: Lego bricks in FreeCAD
Those are great files, I'm new to Freecad, and the steps on that 2*2 brick are teaching me new stuff about Freecad.
I'm about to make a 2*2 - 1 plate brick, to lodge 10 mm neodymium cubes. (Y)
I'm about to make a 2*2 - 1 plate brick, to lodge 10 mm neodymium cubes. (Y)
Re: Lego bricks in FreeCAD
I revive this thread with:
https://gitlab.com/maidenOne/freecad_lego
I plan to add a workbench for easy placement and part selection.
This will mostly be an excorcise in GUI development on my part.
I also plan on adding a few parts, enough to build a small lego set. Many parts can be autogenerated, but i like to have "proper" freecad parts with sketches instead of a "python object" to allow for easy modification. That said, i will probably improve the lego generator script as well.
Contributions are welcome.
Initially this was just to stress test freecad, especially realthunders link implementation.
Legos base measurement (LU) is 0.4mm, a standard 1x1 is 20 LU wide, that is 20x0.4=8mm wide.
A 2x2 is 2x20x0.4 etc.
For finding the "proper" piece name/id use:
https://www.bricklink.com/v2/catalog/ca ... age?P=3001
https://gitlab.com/maidenOne/freecad_lego
I plan to add a workbench for easy placement and part selection.
This will mostly be an excorcise in GUI development on my part.
I also plan on adding a few parts, enough to build a small lego set. Many parts can be autogenerated, but i like to have "proper" freecad parts with sketches instead of a "python object" to allow for easy modification. That said, i will probably improve the lego generator script as well.
Contributions are welcome.
Initially this was just to stress test freecad, especially realthunders link implementation.
Legos base measurement (LU) is 0.4mm, a standard 1x1 is 20 LU wide, that is 20x0.4=8mm wide.
A 2x2 is 2x20x0.4 etc.
For finding the "proper" piece name/id use:
https://www.bricklink.com/v2/catalog/ca ... age?P=3001
Re: Lego bricks in FreeCAD
I have made some progress, added a few more parts, and started on the "add part menu", as i have had some issues with the built in thumbnail support (its not always playing nicely..) i have decided to write my own thumbnail generation script and handle the images separated from the design file. This gives me a bit more control over how the thumbnails are generated and makes life easier for GUI development.
Here is a scroll-able list view of push buttons, right now they just print the part number when pressed, later when its integrated in FreeCAD they will import the design file in the active document. (or use Links). I will also add a move tool that has "snap to grid" move where the grid will be locked to sizes that matches Lego Units for easy placement and rotation.
Placement and rotation might be separated into different tools or different steps.
A cool thought is to start from the Glass WB and add my stuff above it, but have not had time to look at it yet.
The end goal is to make it user friendly enough for my two oldest kids (4 and 5 years old).
Here is a scroll-able list view of push buttons, right now they just print the part number when pressed, later when its integrated in FreeCAD they will import the design file in the active document. (or use Links). I will also add a move tool that has "snap to grid" move where the grid will be locked to sizes that matches Lego Units for easy placement and rotation.
Placement and rotation might be separated into different tools or different steps.
A cool thought is to start from the Glass WB and add my stuff above it, but have not had time to look at it yet.
The end goal is to make it user friendly enough for my two oldest kids (4 and 5 years old).
Re: Lego bricks in FreeCAD
Built my first construction today!
I noticed that the default rendering looks to have a miss aligned z buffer, got the same result with 0.17 and 0.18 app images, but the issue disappered after zooming and panning the view a bit then return to the "front view"...
- Attachments
-
- legoHouse.fcstd
- (560.78 KiB) Downloaded 103 times
Re: Lego bricks in FreeCAD
Niiiice!
What a cool dad you are
What a cool dad you are
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Re: Lego bricks in FreeCAD
just to see if it's posible: used your bricks to make a small assembly The upper LCS are located on the circles of the top bumps, and the lower ones are translated by -9.6mm (hardcoded)
- Attachments
-
- asm_Lego.zip
- (115.18 KiB) Downloaded 90 times
Re: Lego bricks in FreeCAD
Great, fooling around with assemblies of different kinds is the prime motivator for me.
If you got a bunch of LEGO bricks laying around (real or virtual), its very tempting to put them together
Thats also the reason i went with a slightly simplified version of the blocks, skipped a few distances and indents, i want to stress test number of objects, not number of faces. Its also easier to modify the simplified blocks as there is fewer steps/sketches used to create them.
If you got a bunch of LEGO bricks laying around (real or virtual), its very tempting to put them together
Thats also the reason i went with a slightly simplified version of the blocks, skipped a few distances and indents, i want to stress test number of objects, not number of faces. Its also easier to modify the simplified blocks as there is fewer steps/sketches used to create them.
Re: Lego bricks in FreeCAD
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Re: Lego bricks in FreeCAD
yes, if we have the corresponding Lego parts, assembling them to that is piece of cake. The difficult bit is to actually model all those Lego bricks. There is a script to make rectangular Lego bricks of many shapes and sizes, but nothing for the more fancy ones.
Re: Lego bricks in FreeCAD
The author says he built it in two weeks ...
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.