Special:
|
[DAT] (requires LDraw-compatible viewer)
|
Subject:
|
LDPattern + LDS, Proof of Concept
|
Newsgroups:
|
lugnet.cad.dev
|
Date:
|
Fri, 4 Jun 2010 02:15:44 GMT
|
Viewed:
|
33170 times
|
| |
| |
Here's a thought LDPattern project file in pure LDS format:
' 3068bpL.lds
' LDS Source File created by LDPattern
0 Tile 2 x 2 with Red L Pattern
0 Name: 3068bpL.dat
0 Author: Tore Eriksson
0 Unofficial Non-LEGO Part
0 BFC NOCERTIFY
' Default parameters to be read into LDPattern Program,
' copied from template:
' LDPATTERN Size 40 40
' LDPATTERN Origin 0 0
' LDPATTERN Grid etc etc...
' Write default faceless sub-part, copied from template
1 16 0 0 0 1 0 0 0 1 0 0 0 1 s\3068bs01.dat
0 // Pattern created by LDPattern
' Load defaults for 3068b
GOSUB 3068b
' Load points added by LDPattern
GOSUB Set01
GOSUB Translate
' Pattern polygons added by LDPattern
4 4 p10 p11 p12 p15
4 4 p12 p13 p14 p15
4 16 p7 p10 p11 p9
4 16 p9 p11 p12 p13
4 16 p9 p13 p14 p3
4 16 p3 p14 p15 p1
4 16 p1 p15 p10 p7
' In case you run out of user-defined points (a-z + A-Z),
' you are able to redefine points no longer needed.
' All points have then to be re-translated!
' GOSUB 3068b
' GOSUB Set01
' GOSUB Set02
' GOSUB Translate
' Pattern polygons using redifined points added by LDPattern
' ...
0 // End of Pattern created by LDPattern
0
END
:3068b
' Defaults for 3068b, copied from template
x=0
y=0
z=0
a=1
b=0
c=0
d=0
e=0
f=1
g=0
h=-1
i=0
P1 -20 20 0
P2 0 20 0
P3 20 20 0
P4 -20 0 0
P5 0 0 0
P6 20 0 0
P7 -20 -20 0
P8 0 -20 0
P9 20 -20 0
n=9
RETURN
:Translate
' Standard function, translates pattern thru matrix
for j=1 to n
x(0) = x+(x(j)*a)+(y(j)*b)
x(0) = x(0)+(z(j)*c)
y(0) = y+(x(j)*d)+ (y(j)*e)
y(0) = y(0)+(z(j)*f)
z(0) = z+(x(j)*g)+(y(j)*h)
z(0) = z(0)+(z(j)*i)
P(j) P(0)
next j
RETURN
:Set01
' Points added by LDPattern
P10 -10 -16 0
P11 -4 -16 0
P12 -4 10 0
P13 10 10 0
P14 10 16 0
P15 -10 16 0
n=15
RETURN
0
|
|
Message has 1 Reply: | | Re: LDPattern + LDS, Proof of Concept [DAT]
|
| (...) ... and here's the output from the LDS Compiler v 0.61: 0 Tile 2 x 2 with Red L Pattern 0 Name: 3068bpL.dat 0 Author: Tore Eriksson 0 Unofficial Non-LEGO Part 0 BFC NOCERTIFY 1 16 0 0 0 1 0 0 0 1 0 0 0 1 s\3068bs01.dat 0 // Pattern created by (...) (14 years ago, 4-Jun-10, to lugnet.cad.dev)
|
Message is in Reply To:
| | LDPattern [DAT]
|
| I just discovered the LDPattern project. (URL) to the ongoing delugnetization, I had no idea it existed until today. Anyway, here are my thoughts. In 1997, I made a DOS program called LDD (=LDraw Draw, to avoid confusion with TLC's Lego Digital (...) (14 years ago, 3-Jun-10, to lugnet.cad.dev)
|
5 Messages in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
This Message and its Replies on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|