
LeoCAD – A CAD program for creating virtual Lego models - app4soft
https://github.com/leozide/leocad/
======
app4soft
Starting from 2017 developers changed numbering of LeoCAD, so now (after
0.83.x version) it look like YY.MM - 17.07.

This is second release in 2017, and must say that LeoCAD grow up - "Parts"
toolbar has so many modes for preview LDraw parts (starting from 17.02). And
for now models in main window could be displayed with shadows and blinks
(starting from 17.07) - just go to menu "View -> Preferences... -> Rendering"
and switch on "Enable lightning".

If you has any issues post them in tracker[0].

LeoCAD has very simple to understand & use UI, so kids could use it after one
hour learning using Basic Tutorial[1].

Don't forget read the docs about Texture Mapping[2] and Meta Commands[3] tags
(could be stored inside _.mpd /_.ldr/*.dat), that give you additional features
on customizing your LEGO model.

Fresh 'nightly' builds of LeoCAD for many Linux-based distros placed on
OBS[4]. Also on this OBS you could find builds for Lpub3D, Lpub, LDglite,
LDView and LDraw library.

Call for Developers: if You know C/C++ & Qt, please, help make this program
better! Help us solve unclosed issues or propose any ideas on how to improve
LeoCAD! ;-)

[0]
[https://github.com/leozide/leocad/issues](https://github.com/leozide/leocad/issues)
[1]
[http://www.leocad.org/docs/tutorial1.html](http://www.leocad.org/docs/tutorial1.html)
[2]
[http://www.leocad.org/docs/texmap.html](http://www.leocad.org/docs/texmap.html)
[3]
[http://www.leocad.org/docs/meta.html](http://www.leocad.org/docs/meta.html)
[4]
[http://download.opensuse.org/repositories/home:/pbartfai/](http://download.opensuse.org/repositories/home:/pbartfai/)

~~~
app4soft
Also in LeoCAD 17.07 added option "Import LEGO Digital Designer", so now you
could import LXF-files ;-)

------
Sknowman
Lego had its own digital designer, I remember playing around with it a really
long time ago, seems its still around. [http://ldd.lego.com/en-
us/](http://ldd.lego.com/en-us/)

~~~
amelius
Interesting. I wonder why it hasn't been more popular. Also, it would be nice
if you could order the bricks for a design by a simple order process.

~~~
jayrhynas
You used to be able to, it even came in a custom box, but it looks like they
discontinued it.

[http://ldd.lego.com/en-us/subpages/designbyme](http://ldd.lego.com/en-
us/subpages/designbyme)

------
bhouston
How does this compare to Mecabricks online?
[https://www.mecabricks.com/](https://www.mecabricks.com/)

And the new tool from Stud.io from Bricklink?
[https://studio.bricklink.com/v2/build/studio.page](https://studio.bricklink.com/v2/build/studio.page)

~~~
app4soft
LeoCAD is fully free & open-source crossplatformed standalone software that
could run on older PC too. Now availiable for Linux/Mac/iOS/Windows; port for
Android also in plans:

[https://github.com/leozide/leocad/issues/65](https://github.com/leozide/leocad/issues/65)

Mecabricks is cloud-based online, so it require Internet connection and, I
think, modern PC with WebGL support. License is EULA-like(?) and its track
user (users are kids). Not good for security reasons, and not availiable in
offline.

Stud.io is only for Mac/Windows, and its licensed as EULA-like(?). Not good
for Linux users.

Here is comparsion of LeoCAD with some other LEGO CAD's (November 2015)

[http://jasonmcreynolds.com/?p=507](http://jasonmcreynolds.com/?p=507)

Think, need create comparsion on Wikipedia

[https://en.wikipedia.org/wiki/Comparison_of_LEGO_CAD_softwar...](https://en.wikipedia.org/wiki/Comparison_of_LEGO_CAD_software)

~~~
bonzini
Stud.io and LDD both run well under Wine. However it's good to have an
alternative tool that is open source. Stud.io uses the LDraw part database,
the same as LeoCAD.

There's also blueprint, a tool to design LEGO instructions. It's not open
source due to the author's legal concerns about publishing an open source
library to read LEGO's own part database. It's a pity because it is a great
tool, with a very good UI. LDraw files (.ldr) support instructions, but the
user interface is a bit harder to use compared to the more specialized one in
blueprint.

------
StavrosK
This is fantastic, I remember using Ldraw to create a 3D model from the LEGO
blueprint when I was younger. It's great for testing out designs if you don't
have the parts, and I remember that the software could print whole step-by-
step blueprint books for you.

~~~
app4soft
> and I remember that the software could print whole step-by-step blueprint
> books for you.

Here it is - LDPub3D (fork of LDPub)

[https://github.com/trevorsandy/lpub3d](https://github.com/trevorsandy/lpub3d)

Some libs and binaries

[https://github.com/trevorsandy/lpub3d_linux_3rdparty](https://github.com/trevorsandy/lpub3d_linux_3rdparty)

[https://github.com/trevorsandy/lpub3d_macos_3rdparty](https://github.com/trevorsandy/lpub3d_macos_3rdparty)

[https://github.com/trevorsandy/lpub3d_windows_3rdparty](https://github.com/trevorsandy/lpub3d_windows_3rdparty)

Also here is upcoming new release

[https://github.com/trevorsandy/lpub3dnext](https://github.com/trevorsandy/lpub3dnext)

'Nightly' builds are here for many Linux distros

[http://download.opensuse.org/repositories/home:/pbartfai/](http://download.opensuse.org/repositories/home:/pbartfai/)

------
santaclaus
Wow super cool! They should have a hot swappable rendering backend so we can
get globally illuminated PBR renders out. Given the limited materials that
Lego bricks are made out of, getting sensible default materials and automated
lighting would be hella easy.

~~~
app4soft
> Given the limited materials that Lego bricks are made out of, getting
> sensible default materials and automated lighting would be hella easy.

So, don't wast time and give us your pull request! ;-)

[https://github.com/leozide/leocad/pulls](https://github.com/leozide/leocad/pulls)

Other option is use Blender with "ImportLDraw" addon for import and render
models produced with LeoCAD

[https://github.com/TobyLobster/ImportLDraw](https://github.com/TobyLobster/ImportLDraw)

Combination of LeoCAD for modelling & Blender (Cycles Render) for rendering -
really COOL thing!

------
Impossible
If I had side project time I'd really like to make a good VR lego CAD program.
I have seen a couple of demos and prototypes and lego has a daydream app, but
all of it seems limited and unpolished compared to LDD, LeoCAD etc.

~~~
app4soft
Hm, you give me an idea: what if add "Fly Navigation" and "Walk Navigation" to
LeoCAD main window, similar how it's work in Blender?...

[https://docs.blender.org/manual/de/dev/editors/3dview/naviga...](https://docs.blender.org/manual/de/dev/editors/3dview/navigate/walk_fly.html)

This feature request must be on isues tracker!

------
erwoe
Does LeoCAD implement flexible items that can be bent, such as the Space
Needle stems ([https://shop.lego.com/en-US/Seattle-Space-
Needle-21003](https://shop.lego.com/en-US/Seattle-Space-Needle-21003))?

~~~
app4soft
Ask it on Github

[https://github.com/leozide/leocad/issues](https://github.com/leozide/leocad/issues)

------
yann63
Is there a software to "manage" a library of LEGO parts, which would then tell
me what I can build?

And is there a software to easily feed/initiate this library? Maybe with
something as simple as taking a photo of spread parts on the ground.

Am I dreaming?

~~~
technomalogical
[https://rebrickable.com/](https://rebrickable.com/)

It seems to be mostly geared towards sets, so if you don't know the sets you
have it may be more difficult (impossible?) to use.

------
floor_
I remember reading a mulitplayer Lego game dev talk about how her team spent
most of their time creating algorithms to detect penis shaped block sets for
censorship reasons.

~~~
mschaef
Sounds difficult to achieve. I attended University of Texas at Austin, and the
campus has a central tower that my psychology professor used as an example of
something phallic. The dividing line would have to be rather precise not to
exclude too much.

~~~
edraferi
If I remember the original article correctly, it WAS too hard. It proved
impossible to prevent offensive shapes from sneaking in. It actually killed
the game.

When Minecraft came along a few years later, they avoided the problem by
making users host the servers. This shifted liability away from the central
developer and put the onus on the player community to sort themselves out.

~~~
pbhjpbhj
>This shifted liability //

If I user makes a suggestive shape out of lego blocks inside a 3D game, what
liability is there? Much less surely than any of the text chat you get on
virtually any online game??

Does/had Minecraft ever had a major problem with what one might term "phallo-
philes"?

------
kuon
LDCad[1] is the only one that won't lag with big models. The UI is a bit
weird, but it works very well.

I tried LeoCAD, but it was either lagging or crashing with 1000+ pieces.

[1] [http://www.melkert.net/LDCad](http://www.melkert.net/LDCad)

~~~
app4soft
LDCad is proprietary freeware program and require modern PC with good GPU.

Tried it on 10 year laptop with integrated ATI RS600 - its has many issues and
lag during modelling. Also UI not very simple.

In same time LeoCAD work on this laptop very well.

Think, for those who want more features than LeoCAD has must try LDCad. LDCad
is mostly for advanced users, for learninig and creating not too big models
LeoCAD is the choice.

~~~
kuon
Yeah, LeoCAD has much nicer UI. I should have added that on my Geforce 1080
GPU it was smoother with big models.

I hope LeoCAD will become more robust with bigger models, having an open
source solution is really a big plus.

------
w0utert
Very cool, I've actally thought at making something like this using the
OpenCASCADE CAD kernel at some point (I'm familiar with that because we are
using it at work).

Does LeoCAD itself have built-in capabilities to create the Lego's, using a
CAD kernel? Or are they pre-modeled in an external tool? Typical Lego bricks
are simple enough to build using basic Boolean geometric operations, so with
just a few simple rules the application could define a vast library of bricks
to use for building.

I tried to figure this out by looking at the source code, but couldn't find
it, so maybe one of the authors can comment on this? Where is the brick data
coming from?

~~~
app4soft
OpenCASCAD is too complex for such tasks.

------
Hydraulix989
The one I've been familiar with (since the early 2000s, really) is LDraw:

[http://www.ldraw.org/](http://www.ldraw.org/)

These guys take Lego SERIOUSLY.

~~~
app4soft
Yeah! LeoCAD use LDraw library compiled in binary form ("library.bin") for
faster interaction with it, but also could use LDraw in original 'textual'
form directly.

Also, LeoCAD always included in "All-In-One-Installer" (aka AIOI) for Windows,
produced by LDraw team.

[http://www.ldraw.org/news/37/15/LDraw-All-In-One-
Installer-2...](http://www.ldraw.org/news/37/15/LDraw-All-In-One-
Installer-2016-01-now-available.html)

AIOI include one more CAD - LDCad (also availiable for Linux), that could be
in some way powerfull (allow scripting, etc.), but LDCad is only freware
proprietary software.

I tried both (LDCad & LeoCAD.) on xUbuntu 16.04LTS (64bit) on 10-year old
notebook (Samsung R58P - RAM 2Gb, CPU 1.7 GHz, intagrated GPU ATI 1250 Express
256Mb).

For me (from point for teaching kids 6-14 year olf), LeoCAD much easier and
faster.. LDCad has much harder to understand UI and settings dialogs, that not
all kids could undetstand.

------
yodon
I recall that one of the LeoCAD-style brick based editors had an option to
remove all the top and bottom connection features for export to .OBJ or
similar, simplifying the shapes to boxes but reducing the poly count
enormously.

Was that something LeoCAD could do or would I need to use a different tool for
that? (This wasn't a general purpose hidden surface removal, it was just
removing all of the parts of the bricks associated with ensuring physical
connections)

~~~
yodon
To answer my own question: the program was LdrDat2Obj[0] and it had an option
to ignore stud.dat references inside brick definitions when exporting designs
to .obj (you'll still be carrying all the weight of the unseen internal
connection shapes but it still represents a pretty huge poly savings to
exclude the top studs on export)

[0][http://www.pearse.co.uk/lego/links/ldrdat2dxf/](http://www.pearse.co.uk/lego/links/ldrdat2dxf/)

------
King-Aaron
Well, that's my productivity done for the rest of the day

~~~
app4soft
So, if you has some free time, then create model of some LEGO® MINDSTORMS® EV3
Core sets robots in LeoCAD

[http://robotsquare.com/2013/10/01/education-
ev3-45544-instru...](http://robotsquare.com/2013/10/01/education-
ev3-45544-instruction/)

For example, try make "Educator Vehicle"

[http://robotsquare.com/wp-
content/uploads/2013/10/45544_educ...](http://robotsquare.com/wp-
content/uploads/2013/10/45544_educator.pdf)

Here is videotutorial for making it in LeoCAD (only modeling, not programming
or emulating)

[https://www.youtube.com/watch?v=t81g9hbKG5A](https://www.youtube.com/watch?v=t81g9hbKG5A)

;-)

------
jve
I'm wondering about the legal side of this. Is it OK from LEGO side to have
stuff like this and other similar tools?

And what if when you start printing stuff like that?

~~~
kuschku
LEGO’s patents expired a while ago, and competitors such as KREO have
replicated the shapes and some of the models already.

That said, no one is going to print LEGO – actual LEGO is a lot more robust
and stable than anything you could print yourself.

~~~
jve
Oh, I see. But replicating the existing plastic cube was not what I actually
thought. I thought: what if I print/manufacture lego mega blocks from whatever
material.

~~~
pbhjpbhj
You can't make "Lego bricks" as Lego is the trademark giving the origin of
specific bricks but you can make near identical (missing the wording "Lego")
bricks if you wish. If you do it at home and completely without any commercial
aspect [giving them away can be commercial, so you have to take great pains to
avoid being commercial] then you can make identical ones AFAICT.

This isn't legal advice of course.

------
CharlesDodgson
I wonder is it possible to create something here and drop it in an AR
environment.

~~~
CharlesDodgson
by here i mean in LeoCAD

~~~
sleepychu
Sure, why not you just need to translate the format into something your AR set
understands. Would be a neat project!

If your post is <1hr old you can edit it for little clarifications like this
:-)

~~~
CharlesDodgson
Thanks for the pointer :)

------
Raphmedia
What is the output? Could you build 3D models with "virtual legos" and 3D
print them easily?

~~~
yodon
In principle, yes, in practice, no. The tolerances and surface quality
achievable are far below what you require and expect when connecting or even
just holding or looking at Legos. As ubiquitous as Legos are, they're among
the highest tolerance, highest quality rigid plastic parts you're likely to
encounter.

~~~
Raphmedia
What about printing an entire model and not the pieces?

In other words, could I "build" models with that software without any
knowledge of 3D modeling and use those models to 3D print?

~~~
app4soft
Print model consisted from many parts (bricks) directly is little complex
task. Think, you need export model from LeoCAD in some 3D mesh (obj, stl or
3ds) and then need make some optimization (remove hidden faces, etc.)

But there is "ImportLDraw" addon for Blender, so its better create feature
request to its developers

[https://github.com/TobyLobster/ImportLDraw](https://github.com/TobyLobster/ImportLDraw)

------
mch82
Cool concept! Sent over a couple pull requests for the docs intended to be
helpful, but okay to ignore.

~~~
app4soft
About LICENSE issue - here it is

[https://github.com/leozide/leocad/blob/master/docs/COPYING.t...](https://github.com/leozide/leocad/blob/master/docs/COPYING.txt)

P.S.: I'm not an owner of LeoCAD, so little wait before owner will review your
isuues & pull requests (think in one-two days he will reply on Github)

------
boobsbr
Wow, that brings some memories. I spent quite a while playing with it in the
early 2000's.

------
reitanqild
For some reason github shows me a 404 when I try to see the full README.

~~~
app4soft
> For some reason github shows me a 404 when I try to see the full README.

README.txt placed in _/ docs/_, not in root folder, so USE THIS LINK

[https://github.com/leozide/leocad/blob/master/docs/README.tx...](https://github.com/leozide/leocad/blob/master/docs/README.txt)

------
pbhjpbhj
FWIW version 0.83.1 (October 2016) is available in Ubuntu repos.

~~~
app4soft
Yeah, this issue on repositary[0] system for distributing apps.

[0]
[https://repology.org/metapackage/leocad/versions](https://repology.org/metapackage/leocad/versions)

Anyway, you could get latest builds from OBS[1]

[1]
[https://software.opensuse.org/package/leocad](https://software.opensuse.org/package/leocad)

