To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.cad.devOpen lugnet.cad.dev in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 CAD / Development / 11090
11089  |  11091
Special: 
[DAT] (requires LDraw-compatible viewer)
Subject: 
LDPattern
Newsgroups: 
lugnet.cad.dev
Date: 
Thu, 3 Jun 2010 22:36:15 GMT
Viewed: 
34537 times
  
I just discovered the LDPattern project.
http://sourceforge.net/projects/ldpattern/
Thanks 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 Disigner, I will from now on call my program LDDraw). The
project name was "Vector test".
http://home.swipnet.se/~w-20413/ldd.htm
It's a terrible program, with no Save project option, only Save as LDraw DAT,
and a user-hostile interface. Nevertheless, I authored many patterned parts with
it; like most of the 3005p?? letters & numbers, some 1x6 and 1x8 signs like the
Classic 1x8 "GARAGE" sign.

To get the idea of it without having to download and learn how to use it, I
created a brief tutorial:
http://www.flickr.com/photos/simlego/sets/72157624072727671/

My point is that the current approach for entering polygons in LDPattern seems a
little of a dead end if I got it right: Select to draw a triangle, then use the
mouse to set its coordinates. Next polygon that shares one or two of that
triangle's points, you'll have to click at the exact same position again. And if
you find one point needs adjusting, well how do you do that?

In my LDDraw, you first define the points using the mouse, and then draw the
polygons using the keyboard. When you afterwards adjust a point, all polygons
using that point would be adjusted automatically.

For a long time, I have had thoughts of making a new LDDraw, but never had
enough time to make it. Now that LDPattern probably will do the same thing, and
better than I will ever be able to program, I wish to submit the ideas I've had
for LDDraw that I think can be useful for LDPattern.

The user has to be able to save the project, not only output LDraw dat files.
You may want to reinvent the wheel by creating yet another new file format, or
you may use my LDraw Script (.LDS) format. I think almost all necessary
information for the pattern project can be stored in LDS format, and if some
LDPattern exclusive info is needed, you can easily add LDPattern only META
commands.

The points can be stored with LDS' 3-D point array P, for example:
P10 0 0 -12
P11 -20 0 12
P12 20 0 12
where P10 represents point a, P11=b, and P12=c
(P1 through P9 are predifened; 1, 3, 7, and 9 are corners, 5 is center, and 2,
4, 6, and 8 are in the middle between corners. See your num-pad or my tutorial
and you'll get the idea.)
If the user enters the keys {a, b, c, Enter}, and color 1 is picked, the LDS
code will look like this:
3 1 P10 P11 P12
and after the LDS code is processed (at Save As LDraw DAT), the LDraw code will
be:
3 1 0 0 -12 -20 0 12 20 0 12
{3, c, Enter} will give a "line" command:
2 24 P3 P12
that is, from lower right corner to point c
Entering four keys and Enter will of course create instructions for a quad.
No need to select type of polygon before entering points.

Even the rotation matrix operation may be made in LDS code, using a GOSUB call
before line commands, or can be handled by LDPattern.

Here's a coarse sketch of how a LDPattern project file in LDS format could look
like:
0 Tile  2 x  2 with ?? Pattern
0 Name: 3068bp??.dat
0 Author: LDPatten
0 BFC NOCERTIFY
' LDPATTERN Size 50 50
' LDPATTERN Origin 0 0
' Matrix
X = 0
Y = 0
Z = 0
A = 1
B = 0
C = 0
...
I = 0
' Points
P1 -20 20 0
P2 0 20 0
...
GOSUB Matrix
' Begin output dat file:
1 16  0 0 0  1 0 0  0 1 0  0 0 1  s\3068bs01.dat
3 14 P1 P14 P36
...
0
' End of output dat file
END
:Matrix
FOR J=1 TO N
X(0) = X + (X(N)*A) + (Y(N)+*D) + (Z(N)+*G)
Y(0) = Y + (X(N)*B) + (Y(N)+*E) + (Z(N)+*H)
Y(0) = Z + (X(N)*C) + (Y(N)+*F) + (Z(N)+*I)
P(N) = P(0)
NEXT N
RETURN

Links to obsolete but fully functional version of LDraw Script:
http://home2.swipnet.se/~w-20413/lds/lds.htm
http://home2.swipnet.se/~w-20413/lds/ldssyntx.htm
(Current version needs a new home, most significant difference is that it
doesn't mess up the BFC winding when mirroring)

/Tore



Message has 2 Replies:
  LDPattern + LDS, Proof of Concept  [DAT]
 
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 (...) (14 years ago, 4-Jun-10, to lugnet.cad.dev)
  Re: LDPattern
 
(...) Even with Lugnet it's not always easy to know things exists: I had no idea LDraw Draw existed until today ;o) (...) Hopefully Il'dar will chime in, but I guess LDPattern will work like Quad2dat: once vertices are created, new points closer (...) (14 years ago, 4-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
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR