p7q Posted Friday at 08:01 AM Author Posted Friday at 08:01 AM 22 hours ago, Steven P said: That's strange, in my testing it works as I expected. Are you able to post a sample drawing with an arc that rotates? Going to look at the other object types sometime today for you. There is a list at the top of 'Flatten Lines' that work at the moment for info. Thanks for interest. you can try this dwg also. I 'm waiting yours code. arc.dwg Quote
p7q Posted Friday at 08:04 AM Author Posted Friday at 08:04 AM 17 hours ago, mhupp said: Then something wasn't created or modified. aka trying to exploding a invalid or corrupted region, or one that is on a locked layer. maybe run audit and purge before and then check if entity is on a locked layers. -Edit Writing lisp isn't the hard part. figuring out all the different things that could go wrong and how to handle that is the hard part. had a user that would always select things with the crossing selection option(bottom right to top left) and complain about how my lisp was picking up things "outside" what they where selecting. I'm sure I did because I tried exploding an object. But it didn't fill. There must be an error somewhere, but I couldn't find it, so I tried another method. Also, I'm a new programmer and I started writing lips without knowing anything about ACAD, so it was extra difficult. I'm glad this forum exists :))) 1 Quote
p7q Posted Friday at 08:13 AM Author Posted Friday at 08:13 AM 18 hours ago, Isaac26a said: I found it making a google research is at: https://sites.google.com/site/cadkits/home/chz20 And I don't know if this is of some help ı tried but dindt work for arc. But thanks for interest Quote
Steven P Posted Friday at 08:26 AM Posted Friday at 08:26 AM arcs in this case will need to be converted to ellipses to display properly.. something to think about 1 Quote
Isaac26a Posted Friday at 03:46 PM Posted Friday at 03:46 PM (edited) 7 hours ago, Steven P said: arcs in this case will need to be converted to ellipses to display properly.. something to think about As Steven P said, your arcs in order to keep the same display or look should be converted to ellipses or splines, because they are in 3d and to be displayed in 2d should be converted because they're not plain sections of circles as an arc in 2d is meant to be, that's why most of the codes don't apply to what you want Edited Friday at 03:49 PM by Isaac26a Typos 1 Quote
Danielm103 Posted Saturday at 01:59 PM Posted Saturday at 01:59 PM (edited) see if this drawing is correct. I used project from pyrx import Ap, Ax, Db, Ge # register command @Ap.Command() def doit(): try: db = Db.curDb() ms = db.modelSpace(Db.OpenMode.kForWrite) plane = Ge.Plane(Ge.Point3d.kOrigin,Ge.Vector3d.kZAxis) for id in ms.objectIds(Db.Curve.desc()): dbc = Db.Curve(id) gec = dbc.getAcGeCurve() geproj = gec.project(plane,Ge.Vector3d.kZAxis) if not geproj.isKindOf(Ge.kCurve3d): continue geprojCurve = Ge.Curve3d.cast(geproj) dbproj = Db.Core.convertGelibCurveToAcDbCurve(geprojCurve) ms.appendAcDbEntity(dbproj) dbproj.setColorIndex(1) except Exception as err: print(err) Edited 1 hour ago by Danielm103 Quote
Steven P Posted Tuesday at 01:33 PM Posted Tuesday at 01:33 PM Coming back to this one, I was thinking first off a simple task to write something faster - things like the arcs to ellipses slowing things down a bit. Maybe a different approach, are you able to share the LISP you have now, the one that works, and we can look to see if we can make it work faster? Quote
p7q Posted 2 hours ago Author Posted 2 hours ago On 8/26/2025 at 4:33 PM, Steven P said: Coming back to this one, I was thinking first off a simple task to write something faster - things like the arcs to ellipses slowing things down a bit. Maybe a different approach, are you able to share the LISP you have now, the one that works, and we can look to see if we can make it work faster? Unfortunately, I can’t share the LISP code itself, but I can explain the underlying logic.I use a helper function that processes each entity type. When it encounters a block, it gathers the block’s contents into a list; once the top-level selection is done, it feeds that list back into the same function to process all nested entities.” Quote
Danielm103 Posted 2 hours ago Posted 2 hours ago Did you have a look at my drawing? Python converted those arcs to ellipses in milliseconds. If you can run python, then it would be pretty easy to make it callable from lisp Quote
p7q Posted 1 hour ago Author Posted 1 hour ago 35 minutes ago, Danielm103 said: Did you have a look at my drawing? Python converted those arcs to ellipses in milliseconds. If you can run python, then it would be pretty easy to make it callable from lisp sorry ı dont know how to use this code in acad. I'm trying Quote
Isaac26a Posted 1 hour ago Posted 1 hour ago 48 minutes ago, Danielm103 said: Did you have a look at my drawing? Python converted those arcs to ellipses in milliseconds. If you can run python, then it would be pretty easy to make it callable from lisp That sounds to me that you are trying to pull us to the dark side, sounds pretty tempting, would you walk us through? Quote
Danielm103 Posted 53 minutes ago Posted 53 minutes ago (edited) 37 minutes ago, Isaac26a said: That sounds to me that you are trying to pull us to the dark side, sounds pretty tempting, would you walk us through? LOL! Only for items that look difficult, or painful in lisp, where there’s a possible built in function. This drawing took 0.03673760 seconds to process. if the drawing is indeed correct, have a look here for how to run python https://github.com/CEXT-Dan/PyRx arc2.dwg Edited 52 minutes ago by Danielm103 Quote
Recommended Posts
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.