pennyforge

Leg-o-letters - create lego models from text

Recommended Posts

Awesome tool!

Only a shame a lot of colors are not available at certain bricks but the tool still uses them.

As example on 1x2 bricks in red-trans doesn't exist.

Any way to make a fix for this? I am importing the LDR into stud.io and it gives that error :(

 

Share this post


Link to post
Share on other sites
36 minutes ago, Philo said:

(Granted, that's the version without bottom tube)

I believe that was the point :wink:

Nevertheless, I’m sure there are other examples.

Share this post


Link to post
Share on other sites

Yes, you are right - and there will be others - I choose colours that look nice digitally but they may not exist physically (but there should be something similar(ish)!)  Limiting the colours and bricks and to exact physical brick and colour combinations is on my to-do list!

Share this post


Link to post
Share on other sites

The colours are defined in the function "selectColourAndHues" , where a dictionary "colourAndHues" in that function sets the variety of hues for each of the named colours and the first number in the list of values for each named colour is always trans (so 36 is trans red, 38 is trans orange etc).  Adding "transparency = False" at the very start of the function will exclude all transparent bricks and manipulating the dictionary "colourAndHues" will allow you limit the colour options but even then you would ideally need to cross check any selected colour with the actual brick part which subsequently has that colour applied to it against bricklink's physical parts and colours - this would take me some time to figure out but I am thinking about it!

Edited by pennyforge

Share this post


Link to post
Share on other sites
On 12/9/2019 at 9:04 PM, Philo said:

That i didnt know, i imported the created file into stud.io

@pennyforge

Thanks, it has no hurry for me, but was wondering if it was possible :)

Thanks anyway for the awesome tool! :)

 

Edited by kokkie20

Share this post


Link to post
Share on other sites

Hi @Philo

So you'll need to install a version of python 3 - I'm using 3.7.1 but any version after 3.7 should be OK 

https://www.python.org/downloads/

then you'll need to install numpy (a python library for dealing with big numbers and matrices) and pillow (a python library for manipulating images).  Once you've installed python you can type the following commands into a cmd window to install numpy and pillow.

pip install numpy

pip install pillow

Sometimes though pip does not automatically get added into your path variable (after installing python) so you need to specify the full path to the pip.exe file in the cmd window which is usually 

C:\[Directory for Python37]\Scripts\pip install numpy

C:\[Directory for Python37]\Scripts\pip install pillow

Once numpy and pillow have been installed you should be able to run the leg-o-letters.py python file which will ask you if you want to add your own text/font size/colours etc

Hope that helps - if not let me know

N

 

 

Share this post


Link to post
Share on other sites

Hi @pennyforge, very interesting tool.

If you edit the first post to create a comprehensive presentation page, including the detailed instruction you wrote in the following posts, I will add it to the Section Index.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.