Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Anyone have a lisp that will find the center of a square?

48 REPLIES 48
Reply
Message 1 of 49
Friptzap
1694 Views, 48 Replies

Anyone have a lisp that will find the center of a square?

I always thought there should be something built into AutoCAD to do this but I never thought about it much though as far as making a lisp for it till now. (not just a polyline cause it may be part of a block or 4 separate lines or even a rectangle. Maybe just finds midpoint of a diagonal selection from corner to corner?
48 REPLIES 48
Message 41 of 49
btlsp2014
in reply to: btlsp2014

Yes I'm familiar with mapcar and lambda, thank you for directing me though, what else do you reccomend as I enter this world anew?

Bill

Message 42 of 49
btlsp2014
in reply to: btlsp2014

I worked in Carson City Nevada for a Surveying/Engineering firm, the super, big guy wrote his sermons between labeling parcels in a sub-division at his computer for Sunday's performance at the church lost his friend, bad back to disability and they hired me.  Chuck laughed at the command line when up came "Have a nice day" the way I used to sign out a routine that was used.  The routine was my trimcircle.lsp, it removed all remnants of lines passing through a circle.  Very handy when you have dozens of circles all filled with parcel corners and you want to place labeling letters in them.  He was extremely happy for some reason when his bud recovered spontaniously and I was let go after only 3 months.  I did enjoy doing trimcircle though.

Message 43 of 49
mid-awe
in reply to: Friptzap

I know I used trim circle 🙂 long time ago. Nice one, & fast too. kudos to you.
Message 44 of 49
btlsp2014
in reply to: mid-awe

was that my trim circle?



________________________
Click to read the Lonely Road
updated on Sundays
*LONELY ROAD *




Bill Tonnesen


*503-935-2391*
Message 45 of 49
mid-awe
in reply to: Friptzap

I don't know. Same name did the same thing. Coincidence? Maybe.
Message 46 of 49
btlsp2014
in reply to: mid-awe

Maybe.  Would you send me the code?  Thx, Bill

Message 47 of 49
btlsp2014
in reply to: btlsp2014

I did a routine a long time ago to produce a shadow of a set of contiguous 3dfaces.  It traces a ray in 3d from the single source point through the points defining the 3dface vertices to the object 3dface.  However it creates a set of one-to-one 3dfaces in the object 3dface plane.  ideally it would further trace a closed polyline circumnavigating the 3dface set and filling that closed polyline, thus creating a more life-like shadow.  as it is it fills each face.  Any ideas?

 

Like maybe, oh,

   1) Search for an outer-most 3dface point

   2) Starting there examine the 2 adjacent lines of the 3dface and choosing one

  

   Start of loop:

  

   3) Search  for the set of 3dfaces a point of which shares the subject point

   4) Find A

   5)

Message 48 of 49
btlsp2014
in reply to: btlsp2014

Sorry this reply belongs in the new meassage zone

Message 49 of 49
mid-awe
in reply to: btlsp2014

I'll see if I can find it. It has been years since I had a use for it.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost