Jump to content

Recommended Posts

Posted

Hello, i create lisp for transform *line, circle, arc ... and the question is:

How to transform arc without convert it to polyline.

Or how to covert arc to polyline transform vertex (this method work fine) and convert again to arc (i don't know how to convert again to arc).

 

What i do, have a lot of math to coordinate system 1 --> coordinate system 2, when i covert vertex of lines everything work perfect but with arcs don't know how to transform vertex clear.

This is about my dissertation.

 

Thank you :)

Posted

Also need to respond to questions rather then posting a whole new thread.

 

  • Agree 1
Posted (edited)

Hello i attach .dwg, but this post are much different. For the first post i solve the problem alone and i think i can solve this to but its more harder.

 

Edited by Trudy
Posted

Its always good to follow up  even just to say "I figured it out"

 

Arc's don't have end points. in dxf code format like lines do.

(-1 . <Entity name: 38277240>) 
(0 . "ARC") 
(5 . "697F") 
(330 . <Entity name: 381a1a60>) 
(100 . "AcDbEntity") 
(67 . 0) 
(410 . "Model") 
(8 . "0") 
(62 . 1) 
(370 . -1) 
(100 . "AcDbCircle") 
(10 330578.878812906 4986801.45718755 0.0) 
(40 . 312945.883966499) 
(210 0.0 0.0 1.0) 
(100 . "AcDbArc") 
(50 . 4.71238546667679) 
(51 . 4.99139637837235) 

 

10 is the center point.

40 is the radius

50 is the start angle in radian

51 is the end angle in radian

 

I was looking to do the same thing.

Rather then calculate where to move the end points I opted to create a circle using the selected arc's center point and radius

Delete the original arc and then trim the circle to where I needed endpoints to create an arc again.

 

(defun C:AE (/ arc cen rad)
  (setq arc (entget (car (entsel "\nSelect Arc"))))
  (setq cen (assoc 10 arc)))
  (setq rad (assoc 40 arc)))
  (entmake (list (cons 0 "CIRCLE") cen rad)))
  (entdel (cdr (assoc -1 arc)))
)

 

 

Posted

@mhupp I made it, with lee lisps i calculate new: rad , cen , start and end angle and Endmod them and work perfect. :)

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...