LDCad Duplo or Lego Alphabet Script (and question about groups)


Duplo or Lego Alphabet Script (and question about groups)
#1
Hello everyone,

The attached script (just change .txt to .lua) lets you write words in a Duplo or Lego font. 

Just change the part and factor variables in addLetter to get the different versions. For brevity, the letters are defined using positions by studs and brick height and are multiplied by the factor to get coordinates. As such, they will work for any brick that is 2 studs wide with height 1. 

Code:
function addLetter(color, studOffset, letter)
 
  -- Duplo
  --   local part = '3437.dat'
  --   local factor = ldc.vector(40, -48, 40)
 
  -- Lego
  local part = '3003.dat'
  local factor = ldc.vector(20, -24, 20)
 
Question: Is it possible to add a group in an an LDCad script? I'd like to add the parts in each letter to a group, and then add a group for the entire word. The best example I have seen is in the Add Wall example script, but that just adds the new parts to the selection.

Thank you,
Mike

   


Attached Files
.txt   MJC-Alphabet 1.txt (Size: 7.58 KB / Downloads: 5)
Reply
« Next Oldest | Next Newest »



Messages In This Thread
Duplo or Lego Alphabet Script (and question about groups) - by Mike C - 2022-03-07, 17:20

Forum Jump:


Users browsing this thread: 2 Guest(s)