| Welcome, Guest |
You have to register before you can post on our site.
|
| Online Users |
There are currently 130 online users. » 0 Member(s) | 124 Guest(s) Applebot, Baidu, Bing, Facebook, Google, Yandex
|
| Latest Threads |
Teenage Mutant Ninja Turt...
Forum: Official Models
Last Post: Chris Böhnke
Today, 5:19
» Replies: 8
» Views: 3,110
|
LDraw.org 2026-05 Parts U...
Forum: LDraw.org Announcements
Last Post: Orion Pobursky
Yesterday, 20:11
» Replies: 0
» Views: 126
|
Most Common Parts - 16 im...
Forum: Part Requests
Last Post: tom alphin
2026-05-30, 15:05
» Replies: 4
» Views: 474
|
Current LEGO Colour Palet...
Forum: Parts Authoring
Last Post: Chris Böhnke
2026-05-29, 21:24
» Replies: 2
» Views: 343
|
LDraw.org Official Parts ...
Forum: Parts Tracker Discussion
Last Post: Manfred Schaefer
2026-05-29, 12:14
» Replies: 18
» Views: 1,395
|
Hello! Parts 30258pb006,...
Forum: Part Requests
Last Post: Matthew
2026-05-27, 23:02
» Replies: 6
» Views: 593
|
Successor to LL918 using ...
Forum: MOCs (My Own Creations)
Last Post: Willy Tschager
2026-05-27, 13:05
» Replies: 1
» Views: 297
|
at rt
Forum: MOCs (My Own Creations)
Last Post: Jeff Jones
2026-05-27, 8:47
» Replies: 3
» Views: 409
|
One week to go.
Forum: Parts Tracker Discussion
Last Post: Magnus Forsberg
2026-05-25, 16:00
» Replies: 0
» Views: 305
|
47430
Forum: Parts Authoring
Last Post: Jeff Jones
2026-05-24, 15:33
» Replies: 0
» Views: 328
|
|
|
| Calculating rings |
|
Posted by: Willy Tschager - 2020-06-10, 7:04 - Forum: Parts Authoring
- Replies (4)
|
 |
My usual approach placing rings is trail'n'error. I wonder if there is a mathematical way or even a tool which does it for me? I have these cylo:
1 1 50 -37 -10 43.75 0 0 0 0 -43.75 0 10 0 48\2-4cylo.dat
1 1 50 -37 -10 40 0 0 0 0 -40 0 3.125 0 48\2-4cylo.dat
1 1 50 -37 -3.125 40 0 0 0 0 -40 0 3.125 0 48\2-4cylo.dat
and need the external ring.
1 1 50 -37 -3.125 4 0 0 0 0 -4 0 3.125 0 48\1-4rin10.dat
is too large cos the distance is not 4 but 3.75. So ...
w.
|
|
|
| Lego Description Language (LDL) |
|
Posted by: SNIPE - 2020-06-01, 20:31 - Forum: General LDraw.org Discussion
- Replies (4)
|
 |
Hi,
Today, I'd like to share a project I've been working on for a few years.
It is the idea of being able to describe lego models without the use of physical or digital lego, and in a way that is:
- Very close to English and not too unintuitive
- Has fast development time
- Is cross platform and highly accessable
- Is powerful enough to represent any possible combination of LEGO parts or building techniques
- Capable of being translated by a computer into a digital model (though this goal was originally part of a seperate "lego programming language" project)
- Flexable parts, hinges, etc are also possible
- Still makes the user learn about lego techniques
- Can be converted into native LDRAW script
After a few failed ideas I think I have got a good solution but the clever thing about it is that it takes what is good about low level languages and what is good about high level languages and combines them in a harmonious way.
It works by just having the bare minimum amount of information to build a lego model:
Part type, Part ID, Primative type, Primative ID
These are simply macros for certain paramaters in an ldraw script, that's it!. Let's take a few examples:
Code: 3005 B1 c1 = 3005 B2 s1
/* place clutch1 of BRICK1 of type 3005 onto stud1 of BRICK2 of type 3005 */
32316 L1 ph1 = 2780 PI1 pi1
/* place pinhole1 of LIFTARM1 of type 32316 onto pin1 of PIN1 of type 4274 */
/* Now what if we want to attach these two assemblies together? easy: */
3024 PL1 c1 = PIN1 c1
PL1 s1 = B2 C1
/* place clutch1 of PLATE1 of type 3024 onto clutch1 of PIN1.
place stud1 of PLATE1 onto clutch1 of BRICK2 */
This syntax also means you can create helper assemblies in order to position more complex parts then simply DEL(ete) the helper assemblies, which after all is what you do in ldd/ldcad anyhow therefore SNOT and advanced building tequniques are possible including the ability to flex certain types of parts. So the syntax has been tried and tested and can stand up to huge and or complex models.
There are a few syntax shortcuts so far such as part/primative ranges or lists (3003 B1:B50 c1) (3005 B2 c1,c2,c3,c4,), exact part positioning co-cordinates (B2 <25,87,53>) and the IDE will also help you by having tools which leads me onto the bit where I need help from the LDRAW community: building the compiler/IDE:
The idea (assuming you are not just typing into notepad) is to have a C program read the LDL syntax and parse it into native LDRAW script but also display the digital model in real time, as you type, in a graphical output window.
This post is already kinda long so feel free to ask about the full syntax, the IDE, or the compiler, or anything else more below.
Regards, Snipe
|
|
|
|