Author Topic: square to circle lisp  (Read 15201 times)

0 Members and 1 Guest are viewing this topic.

ELOQUINTET

  • Guest
square to circle lisp
« on: June 11, 2004, 10:11:58 AM »
hey guys just wondering if anyone has a lisp which will change a square to a circle?

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
square to circle lisp
« Reply #1 on: June 11, 2004, 10:22:45 AM »
A square is nothing more that a closed pline, so if you select a 4 sided
closed pline you could find the center but what would the radius be?
The object could be a rectangle. The radius could be closest side, farthest
side, or to corner.

CAB

PS No I don't have one. :)
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

JohnK

  • Administrator
  • Seagull
  • Posts: 10661
square to circle lisp
« Reply #2 on: June 11, 2004, 10:26:15 AM »
I wonder if the best solution would be to take the avg radius. (Just a thought)
TheSwamp.org (serving the CAD community since 2003)
Member location map - Add yourself

Donate to TheSwamp.org

ELOQUINTET

  • Guest
square to circle lisp
« Reply #3 on: June 11, 2004, 11:48:08 AM »
it's not a big deal i already did what i needed to do manually. the thought just entered my mind that would be nice to have in my arsenal if someone else had it lying around.

t-bear

  • Guest
square to circle lisp
« Reply #4 on: June 11, 2004, 11:55:44 AM »
Are you looking to have the square and circle both with the same area, perimiter or????

SMadsen

  • Guest
square to circle lisp
« Reply #5 on: June 11, 2004, 12:02:31 PM »
Quote from: eloquintet
it's not a big deal i already did what i needed to do manually. the thought just entered my mind that would be nice to have in my arsenal if someone else had it lying around.

That's a shame. It would make a really good beginners exercise for those who wanted to learn a bit of AutoLISP.

M-dub

  • Guest
square to circle lisp
« Reply #6 on: June 11, 2004, 12:53:28 PM »
a quick and dirty solution could be done with a quick script?
^c^ccircle;2p;mid;\mid;\erase;\;


It would be a good starter for lisp though...
My excuse though is: "no time" :roll:

JohnK

  • Administrator
  • Seagull
  • Posts: 10661
square to circle lisp
« Reply #7 on: June 11, 2004, 01:17:12 PM »
WHAT?! I dont care! Sign up anyways!!  (If someone walks up to you on the street saying "Heres 5 bucks." Your reply is gonna be "Oh sorry, my wallet is full" ??!?!!?)  If you dont sign up for this im gonna drive up there and slap you in the back of the head so hard, your head is gonna bounce off the floor!
TheSwamp.org (serving the CAD community since 2003)
Member location map - Add yourself

Donate to TheSwamp.org

ELOQUINTET

  • Guest
square to circle lisp
« Reply #8 on: June 11, 2004, 01:22:45 PM »
easy you little devil you :lol:

JohnK

  • Administrator
  • Seagull
  • Posts: 10661
square to circle lisp
« Reply #9 on: June 11, 2004, 01:26:57 PM »
Stig, I'm in.
TheSwamp.org (serving the CAD community since 2003)
Member location map - Add yourself

Donate to TheSwamp.org

M-dub

  • Guest
square to circle lisp
« Reply #10 on: June 11, 2004, 01:29:03 PM »
Sorry, am I missing something here?  (It wouldn't surprise me)  Sign up for what?

ELOQUINTET

  • Guest
square to circle lisp
« Reply #11 on: June 11, 2004, 01:34:59 PM »
he kinda lost me too. i guess for the tutorial

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
square to circle lisp
« Reply #12 on: June 11, 2004, 06:07:59 PM »
Sign me up....

Already did my homework :)
No peeking.

Code: [Select]
(40 100 101 102 117 110 32 99 58 115 113 50 99 105 114 99 108 101 32 40 41)
(32 32 59 59 114 101 116 117 114 110 58 32 84 32 105 102 32 99 108 111 115 101 100 44 32 110 105 108 32 111 116 104 101 114 119 105 115 101)
(32 32 40 100 101 102 117 110 32 105 115 112 111 108 121 99 108 111 115 101 100 32 40 101 108 105 115 116 41)
(32 32 32 32 40 61 32 49 32 40 108 111 103 97 110 100 32 49 32 40 99 100 114 32 40 97 115 115 111 99 32 55 48 32 40 101 110 116 103 101 116 32 101 108 105 115 116 41 41 41 41 41)
(32 32 41)
(32 32 40 100 101 102 117 110 32 103 101 116 95 118 101 114 116 101 120 32 40 101 108 105 115 116 41)
(32 32 32 32 40 109 97 112 99 97 114 32 39 99 100 114)
(32 32 32 32 40 118 108 45 114 101 109 111 118 101 45 105 102 45 110 111 116)
(32 32 32 32 32 32 39 40 108 97 109 98 100 97 32 40 120 41 32 40 61 32 40 99 97 114 32 120 41 32 49 48 41 41 32 101 108 105 115 116 41 41)
(32 32 41)
(32 32 59 59 32 32 61 61 61 61 61 61 61 61 61 61 61 61 61 61 32 32 83 84 65 82 84 32 32 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61)
(32 32 40 105 102 32 40 97 110 100 32 40 115 101 116 113 32 115 113 32 40 101 110 116 115 101 108 32 34 92 110 83 101 108 101 99 116 32 115 113 117 97 114 101 32 116 111 32 99 111 110 118 101 114 116 32 116 111 32 97 32 99 105 114 99 108 101 46 34 41 41)
(32 32 32 32 32 32 32 32 32 32 32 40 61 32 40 99 100 114 32 40 97 115 115 111 99 32 48 32 40 115 101 116 113 32 101 110 116 108 115 116 32 40 101 110 116 103 101 116 32 40 115 101 116 113 32 101 110 116 32 40 99 97 114 32 115 113 41 41 41 41 41 41)
(32 32 32 32 32 32 32 32 32 32 32 32 32 32 34 76 87 80 79 76 89 76 73 78 69 34 41)
(32 32 32 32 32 32 32 32 32 32 32 40 61 32 40 108 101 110 103 116 104 32 40 115 101 116 113 32 99 108 115 116 32 40 103 101 116 95 118 101 114 116 101 120 32 101 110 116 108 115 116 41 41 41 32 52 41)
(32 32 32 32 32 32 32 32 32 32 32 40 105 115 112 111 108 121 99 108 111 115 101 100 32 101 110 116 41)
(32 32 32 32 32 32 41)
(32 32 32 32 40 112 114 111 103 110)
(32 32 32 32 32 32 59 59 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61)
(32 32 32 32 32 32 40 115 101 116 113 32 114 102 108 97 103 32 48 41 32 59 32 114 97 100 105 117 115 32 102 108 97 103 32)
(32 32 32 32 32 32 40 99 111 110 100)
(32 32 32 32 32 32 32 32 40 40 61 32 114 102 108 97 103 32 48 41 59 32 32 82 97 100 105 117 115 32 105 115 32 101 110 100 112 111 105 110 116)
(32 32 32 32 32 32 32 32 32 40 115 101 116 113 32 114 97 100 32 40 47 32 40 100 105 115 116 97 110 99 101 32 40 110 116 104 32 48 32 99 108 115 116 41 32 40 110 116 104 32 50 32 99 108 115 116 41 41 32 50 41 41)
(32 32 32 32 32 32 32 32 41)
(32 32 32 32 32 32 32 32 40 40 61 32 114 102 108 97 103 32 49 41 59 32 32 114 97 100 105 117 115 32 105 115 32 99 108 111 115 101 115 116 32 115 105 100 101)
(32 32 32 32 32 32 32 32 32 40 115 101 116 113 32 114 97 100 32 40 47 32 40 109 105 110 32 40 100 105 115 116 97 110 99 101 32 40 110 116 104 32 48 32 99 108 115 116 41 32 40 110 116 104 32 49 32 99 108 115 116 41 41)
(32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 40 100 105 115 116 97 110 99 101 32 40 110 116 104 32 49 32 99 108 115 116 41 32 40 110 116 104 32 50 32 99 108 115 116 41 41 41 50 41 41)
(32 32 32 32 32 32 32 32 41)
(32 32 32 32 32 32 32 32 40 40 61 32 114 102 108 97 103 32 50 41 59 32 32 114 97 100 105 117 115 32 105 115 32 99 108 111 115 101 115 116 32 115 105 100 101)
(32 32 32 32 32 32 32 32 32 40 115 101 116 113 32 114 97 100 32 40 47 32 40 109 97 120 32 40 100 105 115 116 97 110 99 101 32 40 110 116 104 32 48 32 99 108 115 116 41 32 40 110 116 104 32 49 32 99 108 115 116 41 41)
(32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 40 100 105 115 116 97 110 99 101 32 40 110 116 104 32 49 32 99 108 115 116 41 32 40 110 116 104 32 50 32 99 108 115 116 41 41 41 50 41 41)
(32 32 32 32 32 32 32 32 41)
(32 32 32 32 32 32 41)
(32 32 32 32 32 32 59 59 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61)
(32 32 32 32 32 32 40 115 101 116 113 32 99 101 110 32 40 112 111 108 97 114 32 40 110 116 104 32 48 32 99 108 115 116 41)
(32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 40 97 110 103 108 101 32 40 110 116 104 32 48 32 99 108 115 116 41 32 40 110 116 104 32 50 32 99 108 115 116 41 41)
(32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 40 47 32 40 100 105 115 116 97 110 99 101 32 40 110 116 104 32 48 32 99 108 115 116 41 32 40 110 116 104 32 50 32 99 108 115 116 41 41 32 50 41 41)
(32 32 32 32 32 32 41)
(32 32 32 32 32 32 40 115 101 116 113 32 111 112 116 115 32 40 108 105 115 116 32 40 99 111 110 115 32 48 32 34 67 73 82 67 76 69 34 41)
(32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 40 99 111 110 115 32 56 32 40 99 100 114 32 40 97 115 115 111 99 32 56 32 101 110 116 108 115 116 41 41 41 41)
(32 32 32 32 32 32 41)
(32 32 32 32 32 32 40 105 102 32 40 115 101 116 113 32 108 110 116 121 112 32 40 97 115 115 111 99 32 54 32 101 110 116 108 115 116 41 41)
(32 32 32 32 32 32 32 32 40 115 101 116 113 32 111 112 116 115 32 40 97 112 112 101 110 100 32 111 112 116 115 32 40 108 105 115 116 32 40 99 111 110 115 32 54 32 40 99 100 114 32 108 110 116 121 112 41 41 41 41 41)
(32 32 32 32 32 32 41)
(32 32 32 32 32 32 40 105 102 32 40 115 101 116 113 32 99 111 108 111 114 32 40 97 115 115 111 99 32 54 50 32 101 110 116 108 115 116 41 41)
(32 32 32 32 32 32 32 32 40 115 101 116 113 32 111 112 116 115 32 40 97 112 112 101 110 100 32 111 112 116 115 32 40 108 105 115 116 32 40 99 111 110 115 32 54 50 32 40 99 100 114 32 99 111 108 111 114 41 41 41 41 41)
(32 32 32 32 32 32 41)
(32 32 32 32 32 32 40 115 101 116 113 32 111 112 116 115 32 40 97 112 112 101 110 100 32 111 112 116 115 32 40 108 105 115 116 40 99 111 110 115 32 49 48 32 99 101 110 41 32 40 99 111 110 115 32 52 48 32 114 97 100 41 41 41 41)
(32 32 32 32 32 32 40 105 102 32 40 101 110 116 109 97 107 101 32 111 112 116 115 41)
(32 32 32 32 32 32 32 32 40 101 110 116 100 101 108 32 101 110 116 41)
(32 32 32 32 32 32 41)
(32 32 32 32 41)
(32 32 41)
(41)
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

JohnK

  • Administrator
  • Seagull
  • Posts: 10661
square to circle lisp
« Reply #13 on: June 11, 2004, 06:59:50 PM »
heh! ...like there isnt an Autolisper that couldnt read that.
TheSwamp.org (serving the CAD community since 2003)
Member location map - Add yourself

Donate to TheSwamp.org

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
square to circle lisp
« Reply #14 on: June 11, 2004, 07:15:10 PM »
Is that a little better?
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.