Welcome,
Guest
. Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News:
Home
Help
Login
Register
TheSwamp
»
Code Red
»
AutoLISP (Vanilla / Visual)
»
Topic:
drap slection set of lines on selection set of 3dpolylines
« previous
next »
Print
Pages: [
1
] |
Go Down
Author
Topic: drap slection set of lines on selection set of 3dpolylines (Read 1804 times)
0 Members and 1 Guest are viewing this topic.
motee-z
Newt
Posts: 40
drap slection set of lines on selection set of 3dpolylines
«
on:
August 27, 2015, 03:42:23 PM »
Hello
i need help to drape a selection set of lines on a selection set of 3d polylines as in attached drawing
any help will highly appriciated
Logged
motee-z
Newt
Posts: 40
Re: drap slection set of lines on selection set of 3dpolylines
«
Reply #1 on:
August 28, 2015, 04:08:26 PM »
still hoping someone who can help me
Logged
ymg
Guest
Re: drap slection set of lines on selection set of 3dpolylines
«
Reply #2 on:
September 03, 2015, 02:21:23 PM »
motee-z,
Use your blue lines as fences to select your polylines.
Each line will return a selection set, use ssnamex to get the
2d intersection points between lines and polylines.
Use these points to get the z value using the curves function.
ymg
Logged
ymg
Guest
Re: drap slection set of lines on selection set of 3dpolylines
«
Reply #3 on:
September 04, 2015, 12:04:31 PM »
Here is some code to get you started.
Beware that there is no error trapping.
Also the method to get the z using (osnap p "_appint")
is sensitive to zoom level.
Code - Auto/Visual Lisp:
[Select]
;; Modified a routine by AlanJT ;
;; ;
;; Will entmake a 3d polyline given, 3d point list l ;
;; ;
;; Returns ename of polyline ;
(
defun
mk_3dp
(
l
/
p
)
(
if
(
>
(
length
l
)
1
)
(
progn
(
entmakex
'
(
(
0
.
"POLYLINE"
)
(
70
.
8
)
)
)
(
foreach
p l
(
entmakex
(
list
'
(
0
.
"VERTEX"
)
(
cons
10
p
)
'
(
70
.
32
)
)
)
)
(
entmakex
'
(
(
0
.
"SEQEND"
)
)
)
)
)
(
entlast
)
)
;; Main Routine ;
(
defun
c:test
(
/
i j ent fen ss ss1 p pol lst itm int
)
(
setq
ss
(
ssget
"_X"
'
(
(
0
.
"LINE"
)
(
8
.
"LAY"
)
)
)
)
(
repeat
(
setq
i
(
sslength
ss
)
)
(
setq
ent
(
entget
(
ssname
ss
(
setq
i
(
1-
i
)
)
)
)
fen
(
list
(
cdr
(
assoc
10
ent
)
)
(
cdr
(
assoc
11
ent
)
)
)
ss1
(
ssget
"_F"
fen '
(
(
0
.
"POLYLINE"
)
)
)
pol
nil
)
(
repeat
(
setq
j
(
sslength
ss1
)
)
(
setq
lst
(
ssnamex
ss1
(
setq
j
(
1-
j
)
)
)
)
(
foreach
itm lst
(
setq
itm
(
cdddr
itm
)
)
(
foreach
int itm
(
setq
p
(
cadr
int
)
)
(
vl-cmdf
"_ZOOM"
"_C"
p
"200X"
)
(
setq
pol
(
cons
(
osnap
p
"_appint"
)
pol
)
)
(
vl-cmdf
"_ZOOM"
"_P"
)
)
)
)
(
mk_3dp pol
)
)
)
ymg
Logged
motee-z
Newt
Posts: 40
Re: drap slection set of lines on selection set of 3dpolylines
«
Reply #4 on:
September 04, 2015, 02:01:54 PM »
you are great ymg thank you for your reply
it works fine
Logged
ymg
Guest
Re: drap slection set of lines on selection set of 3dpolylines
«
Reply #5 on:
September 04, 2015, 02:37:15 PM »
motte-z,
There might be some funny results when the blue lines
intersects with the newly created 3d poly.
ymg
Logged
Print
Pages: [
1
] |
Go Up
« previous
next »
TheSwamp
»
Code Red
»
AutoLISP (Vanilla / Visual)
»
Topic:
drap slection set of lines on selection set of 3dpolylines