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 / 4278
4277  |  4279
Special: 
[DAT] (requires LDraw-compatible viewer)
Subject: 
PIPE function...
Newsgroups: 
lugnet.cad.dev
Date: 
Sat, 1 Apr 2000 19:55:20 GMT
Highlighted: 
(details)
Viewed: 
1947 times
  
I've made a new function for LDS called PIPE. It's an extension of the LINE function.

Remember:?

LINE
POINT x y z
POINT x y z
...
POINT x y z
LINE END


Now, PIPE works the same way but with that difference it's in 3D:

PIPE [n_sectors total_sectors] [color]
SEGMENT  x y z  a b c  d e f  g h i
SEGMENT  x y z  a b c  d e f  g h i
...
SEGMENT  x y z  a b c  d e f  g h i
PIPE END


The parameters "x y z  a b c  d e f  g h i" are the same as a pretended n-nEDGE have.

With just two segments, I'm able to make any partial or whole cone. With multiple segments, I can bend and shape a hose
or bransch or anything. (Do I have to say I'm proud? :-) )

Now, I'm willing to create some META-commands for other programs to make primitive substitutions, like for example:

[IN.LDS]
pipe 4 16 blue
segm  0 0 0  0 0 0  100 0 0  0 0 100
segm  200 0 0  0 0 0  50 0 0  0 0 50
pipe end


makes...

[OUT.DAT]
0 IFDEF PIPE
0 PIPE 4 16 1
0 SEGMENT  0 0 0  0 0 0  100 0 0  0 0 100
0 SEGMENT  200 0 0  0 0 0  50 0 0  0 0 50
0 PIPE END
0 ELSE
5 24  0 100 0  200 50 0  0 92.39 -38.27  0 92.39 38.27
4 1  0 100 0  200 50 0  200 46.195 19.135  0 92.39 38.27
5 24  0 92.39 38.27  200 46.195 19.135  0 100 0  0 70.71 70.71
4 1  0 92.39 38.27  200 46.195 19.135  200 35.355 35.355  0 70.71 70.71
5 24  0 70.71 70.71  200 35.355 35.355  0 92.39 38.27  0 38.27 92.39
4 1  0 70.71 70.71  200 35.355 35.355  200 19.135 46.195  0 38.27 92.39
5 24  0 38.27 92.39  200 19.135 46.195  0 70.71 70.71  0 0 100
4 1  0 38.27 92.39  200 19.135 46.195  200 0 50  0 0 100
0 END IF


(Yes, I know the optional lines get wrong colour).

Should I do that, or just output the pure LDraw code? Would anybody find it practical?
Would there be a more proper syntax?

/Tore



1 Message 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