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:
Order of Results From 'Intersectwith Method
« previous
next »
Print
Pages: [
1
] |
Go Down
Author
Topic: Order of Results From 'Intersectwith Method (Read 1936 times)
0 Members and 1 Guest are viewing this topic.
ymg
Guest
Order of Results From 'Intersectwith Method
«
on:
February 21, 2014, 08:54:36 AM »
Am I right with the assumption that (vlax-invoke obj1 'intersectwith obj2 acExtendNone)
always gives return ordered by distance along curve obj1
So far haven't found any counter examples.
ymg
Logged
Lee Mac
Seagull
Posts: 12926
London, England
WWW
Re: Order of Results From 'Intersectwith Method
«
Reply #1 on:
February 22, 2014, 11:30:10 AM »
That may be, but I certainly wouldn't rely on that assumption when a simple
vl-sort
removes all doubt:
Code - Auto/Visual Lisp:
[Select]
(
defun
intersectwith
(
obj1 obj2
/
lst srt tmp
)
(
setq
tmp
(
vlax-invoke
obj1 'intersectwith obj2 acextendnone
)
)
(
repeat
(
/
(
length
tmp
)
3
)
(
setq
lst
(
cons
(
list
(
car
tmp
)
(
cadr
tmp
)
(
caddr
tmp
)
)
lst
)
srt
(
cons
(
vlax-curve-getparamatpoint
obj1
(
car
lst
)
)
srt
)
tmp
(
cdddr
tmp
)
)
)
(
mapcar
'
(
lambda
(
n
)
(
nth
n lst
)
)
(
vl-sort-i
srt '
<
)
)
)
Logged
Lee Mac Programming
•
Twitter
•
Exchange App Store
ymg
Guest
Re: Order of Results From 'Intersectwith Method
«
Reply #2 on:
February 22, 2014, 01:34:33 PM »
Thanks Lee,
Agree we all know about the saying on assume.
Still would be interesting to know for sure..
ymg
Logged
ymg
Guest
Re: Order of Results From 'Intersectwith Method
«
Reply #3 on:
February 23, 2014, 02:03:36 AM »
To put it to rest, Self Crossing polylines will give you results that are not ordered.
ymg
Logged
Print
Pages: [
1
] |
Go Up
« previous
next »
TheSwamp
»
Code Red
»
AutoLISP (Vanilla / Visual)
»
Topic:
Order of Results From 'Intersectwith Method