TheSwamp

Code Red => AutoLISP (Vanilla / Visual) => Topic started by: Vikram on December 30, 2019, 08:51:31 AM

Title: A lisp to get intersection coordinates of any two objects
Post by: Vikram on December 30, 2019, 08:51:31 AM
I want a lisp which can give me the intersection coordinates of any two objects like circle to lwpolyline,polyline or line. I want to write this coordinates in a text file
Title: Re: A lisp to get intersection coordinates of any two objects
Post by: Lee Mac on December 30, 2019, 08:54:42 AM
Consider the ActiveX intersectwith method.
Title: Re: A lisp to get intersection coordinates of any two objects
Post by: BIGAL on December 31, 2019, 09:50:26 PM
OP has Intellicad no VL. Pretty sure was mentioned on another post.

Back to surveyors formulas. Inters for 2 lines.

Getpoint may be the simplest answer.

http://www.ambrsoft.com/TrigoCalc/Circles2/circlrLine_.htm
Title: Re: A lisp to get intersection coordinates of any two objects
Post by: hmspe on January 01, 2020, 08:49:19 AM
The best solution I know of that does not use VL- functions is  acet-geom-intersectwith  from the express tools.

This is not as accurate as the VL-  intersectwith method because it uses line segments to approximate curves.

Title: Re: A lisp to get intersection coordinates of any two objects
Post by: BIGAL on January 05, 2020, 12:35:10 AM
Not sure the acet functions are in Intellicad. Copying them from Autocad may breach copyrite.

2nd question how do you use the acet function there is so little documentation out there spent 1/2 hour already finding nothing. All I found was the list of 300 items and a few details on afra lisp.

Trial and error (acet-geom-intersectwith (car ent2) (car ent1) 3) similar to intersectwith has extend modes. 2 lines is 3, an arc - line can be 3 or 1.
acExtendNone Does not extend either object.
acExtendThisEntity Extends the base object.
acExtendOtherEntity Extends the object passed as an argument.
acExtendBoth Extends both objects.
Title: Re: A lisp to get intersection coordinates of any two objects
Post by: snownut2 on January 05, 2020, 03:31:51 AM
There's moderately good descriptions in the BricsCad.chm file.  I think thAt can be downloaded from BricsCad website by itself.

Look in the List Processing section here

[url]https://www.bricsys.com/bricscad/help/en_US/CurVer/DevRef/index.html?page=source%2FTX_01.htm[url]
Title: Re: A lisp to get intersection coordinates of any two objects
Post by: hmspe on January 05, 2020, 08:58:07 AM
There was a time when the express tools were openly published and free to download.  I think it would be very hard to make a case for copyright infringement.  You would need to find a copy that was clear text.  Autodesk changed to compiled files (.fas) when they started charging for the express tools.   
Title: Re: A lisp to get intersection coordinates of any two objects
Post by: BIGAL on January 05, 2020, 06:40:45 PM
Thanks Snownut pity Autodesk does not do the same. Some interesting options.

Need vikram to confirm if in Intellicad.

geom-intersectwith is in acetutil2.fas aecauto.lsp shows which files are needed.