- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
hello,
i am trying to create a lisp to find matching intersecting points between two rectangles.
specifically i am trying to determine match line points for sheet outlines (civil work)
where the left side of one sheet and the right side of one sheet have the same intersection point with a line that passes across both.
i can get the intersection points using vl-intersectwith and get two different lists of intersection points
i could use some help finding a way to compare the two lists,
i was thinking i could get the list-length and while loop through the items in the first list getting the intersection x,y
then find the list which equals those points then cond it against the center point of the sheet to determine which direction the matchline would be from the center.
see attached screen shot,
my lists will look like this -
main sheet ((1,2,3) (4,5,6)) (main sheet being the one matchlines are being added to
surrounding sheets (((sheet number)(1,2,3)(7,8,9)) ((sheet number)(4,5,6)(13,14,15)))
i would like to be able to make a loop to test (1,2,3) then test (4,5,6) from the main list
against the surrounding sheets list in a way that if (1,2,3) is found in the surrounding sheets list it returns the whole ((sheet number)(1,2,3)(7,8,9)) item so that i can then get the sheet number and compare where its location is compared to the center of the main sheet to find left,right,top,bottom matchline location.
can anyone point me in some kind of direction on comparing the lists, i think i have the rest covered.
i was thinking (find) or (car(member) but am unsure about getting that to return exactly what i am looking for being the sublist which the point is located in
thinking assoc but i've only ever used assoc when it was the first item being searched (dxf codes) and can not test if it will return what i'm looking for at the moment. (search the whole sub list)
thanks
Solved! Go to Solution.