[LDCad] Duplo or Lego Alphabet Script (and question about groups) - Printable Version +- LDraw.org Discussion Forums (https://forums.ldraw.org) +-- Forum: LDraw Programs (https://forums.ldraw.org/forum-7.html) +--- Forum: LDraw Editors and Viewers (https://forums.ldraw.org/forum-11.html) +--- Thread: [LDCad] Duplo or Lego Alphabet Script (and question about groups) (/thread-26102.html) |
Duplo or Lego Alphabet Script (and question about groups) - Mike C - 2022-03-07 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) 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 RE: Duplo or Lego Alphabet Script (and question about groups) - Mike C - 2022-03-10 (2021-08-12, 18:21)Roland Melkert Wrote: That script only lists the 'static' functions, ldc.vector() etc returns lua 'user data' which has its own set of functions. Looks like Roland already answered my question in another thread, LDCad 1.7 Alpha 1 (win + linux), emphasis mine. RE: Duplo or Lego Alphabet Script (and question about groups) - Roland Melkert - 2022-03-10 (2022-03-07, 17:20)Mike C Wrote: Is it possible to add a group in an an LDCad script?At the moment it is not possible to add things to a group. This is something I'm planning to add though. |