;-------------------------------------------------------
)
;-------------------------------------------------------
)
;-------------------------------------------------------
(defun :3DF
-3V
-LST
(x
-el
) (list (:DXF
10 x
-el
) (:DXF
11 x
-el
) (:DXF
12 x
-el
) ) )
;-------------------------------------------------------
;-------------------------------------------------------
(list '
(0 .
"LINE") '
(100 .
"AcDbEntity") '
(410 .
"Model") '
(100 .
"AcDbLine") (cons 10 p1
) (cons 11 p2
) ) )
)
;-------------------------------------------------------
(defun :SS
-BEFORE
-EN
( x
-en
/ tmp
) )
;-------------------------------------------------------
(defun :SS
-BEFORE
-EL
( / tmp x
-en
) nil
)
)
;-------------------------------------------------------
(defun :SS
-MAKE
-PREVIOUS
-EB
(x
-en
/ ssa
) )
;-------------------------------------------------------
;-------------------------------------------------------
(defun :GEOM
-SEG
-LST
>POINT
-LST
-LST
(x
-seg
-lst
/ kwi next
-seg shape
-v
-lst shape
-v
-lst
-lst x
-seg
) (setq x
-seg
(car x
-seg
-lst
) x
-seg
-lst
(cdr x
-seg
-lst
) ) )
; (princ "\nnext segment not found !")
)
)
)
(setq shape
-v
-lst
-lst
(cons shape
-v
-lst shape
-v
-lst
-lst
) ) )
shape-v-lst-lst
)
;-------------------------------------------------------
(defun :3DPOLY
-EMK
-V
-LST
(v
-lst
) '(
(0 . "POLYLINE") (100 . "AcDbEntity") (100 . "AcDb3dPolyline")
(66 . 1) (10 0.0 0.0 0.0) (70 . 8) (40 . 0.0) (41 . 0.0) (210 0.0 0.0 1.0)
(71 . 0) (72 . 0) (73 . 0) (74 . 0) (75 . 0)
)
)
)
'( (0 . "VERTEX") (100 . "AcDbEntity") (100 . "AcDbVertex") (100 . "AcDb3dPolylineVertex") )
'( (40 . 0.0) (41 . 0.0) (42 . 0.0) (50 . 0.0) (70 . 32) (71 . 0) (72 . 0) (73 . 0) (74 . 0) )
)
)
)
'( (0 . "SEQEND") (100 . "AcDbEntity") )
)
)
;-------------------------------------------------------
(defun c:MESH
-SHAPE
-2 ( / eb m2p-segs-lst p10 p11 p12 segs-lst shape-seg-lst shape-v-
lst-lst ss ss-el-lst trng-lst x-m2p-seg x-m2p-seg-2 x-seg x-trng
)
(setq ss
(LM:
SSGET "\nselect 3DFACES to get the SHAPE <exit> :" '
(((0 .
"3DFACE"))) ) ) )
trng-lst
)
)
segs-lst
)
)
(setq x
-m2p
-seg
(car m2p
-segs
-lst
) m2p
-segs
-lst
(cdr m2p
-segs
-lst
) )
(setq shape
-seg
-lst
(cons (cdr x
-m2p
-seg
) shape
-seg
-lst
) ) )
)
(setq shape
-v
-lst
-lst
(:GEOM
-SEG
-LST
>POINT
-LST
-LST shape
-seg
-lst
) ) )
(setq eb
(:SS
-BEFORE
-EL
) )
(foreach shape
-v
-lst shape
-v
-lst
-lst
(:3DPOLY
-EMK
-V
-LST shape
-v
-lst
) ) (:SS-MAKE-PREVIOUS-EB eb)
shape-v-lst-lst
)
(defun C:MS2
() (c:MESH
-SHAPE
-2) )