Author Topic: ={ Challenge }=union subtract intersect  (Read 6260 times)

0 Members and 1 Guest are viewing this topic.

irneb

  • Water Moccasin
  • Posts: 1794
  • ACad R9-2016, Revit Arch 6-2016
Re: ={ Challenge }=union subtract intersect
« Reply #15 on: March 28, 2014, 01:21:46 AM »
Each of those can use a function which creates a temporary polyline from the list of points. Then it runs the region command to convert the polyline into a region. Then run the UNION/SUBTRACT/INTERSECT commands (this is the only thing which differs between these functions). Then explode the resulting region. Run "PEdit" "Multiple" <selection> "Yes" "Join" "" "" ... to convert them back into a poliline (or more depending on the shape like in that union example). Read their entget data and extract only the vector points. Delete the temporary objects and return the points you obtained from them.
Common sense - the curse in disguise. Because if you have it, you have to live with those that don't.

gile

  • Gator
  • Posts: 2520
  • Marseille, France
Re: ={ Challenge }=union subtract intersect
« Reply #16 on: March 29, 2014, 11:01:18 AM »
Hi,

You can have a look here (LISP code in reply #3). this is only for Union but may easily adapted for others Boolean operations.
Speaking English as a French Frog

ribarm

  • Gator
  • Posts: 3309
  • Marko Ribar, architect
Re: ={ Challenge }=union subtract intersect
« Reply #17 on: March 29, 2014, 11:11:59 AM »
Gilles...
Code: [Select]
(setq reg (vlax-invoke space 'addRegion tmp))

OP doesn't want regions, just calculation of point list of resulting boolean polygon...
Marko Ribar, d.i.a. (graduated engineer of architecture)

:)

M.R. on Youtube

Q1241274614

  • Guest
Re: ={ Challenge }=union subtract intersect
« Reply #18 on: March 29, 2014, 12:10:34 PM »
yes

gile

  • Gator
  • Posts: 2520
  • Marseille, France
Re: ={ Challenge }=union subtract intersect
« Reply #19 on: March 29, 2014, 01:07:21 PM »
Oopss !...
Sorry, I don't have enough time right now for such a challenge.
Speaking English as a French Frog