eldon Posted September 5, 2011 Posted September 5, 2011 That's what would have been expected, but the geometry posted does not behave in an orderly fashion. I expect someone will be able to say exactly how it was created Quote
harilalmn Posted September 6, 2011 Author Posted September 6, 2011 eldon, I know that the drawing out there was a piece of crap. We got the drawing from someone else. We have the hilarious task of fixing these drawings and keeping these as base drawings and taking them to the GFC level....!!! In the drawing, Arcs do not have there Z Values, for Starting point and Ending point, the same. Even in some cases arcs have yet another value for the center Z Value...!! Which clearly indicates that these elemnts were not drawn on the same working plane. I dont know how to fix these drawings and getting mad thinking of it as the deadline is fast approaching..!! Quote
pBe Posted September 6, 2011 Posted September 6, 2011 (edited) I encountered a drawing similar to that. some yahoo change the ucs ever so slghtly then start drawing stuff on that UCS view UCSXDIR = 0.015,-1.000,0.000 UCSYDIR = 1.000,0.015,0.000 What i did was change the UCS to follow the entity which gives me its current UCS on which where the enitities aligned. (luckily its just one direction for all enitites) I then block the whole thing (with objects delete option), went back UCS world and insert the newly created block. then invoke FLATTEN I tried this on the OP's sample drawing. but i think you need to create a lisp for realigning block to the current UCS. which i believe is easy enouh (which incidentally the OP's original intention until we all saw the sample drawing) Where Block UCS alignment lisp is needed ang NOT just Z position to ZERO routine (defun c:B210 ( / objs i Block BlockEnt) (setq objs (ssget '((0 . "INSERT")))) (repeat (setq i (sslength objs)) (setq Block (ssname objs (setq i (1- i)))) (setq BlockEnt (entget Block)) (setq DXF10 (cdr (assoc 10 BlockEnt))) (setq BlockEnt (entmod (subst (cons 210 '( 0.00 0.00 1.00))(assoc 210 BlockEnt) BlockEnt))) (entmod (subst (list 10 (car DXF10) (cadr DXF10) 0.0) (assoc 10 BlockEnt) BlockEnt)) ) (princ) ) EDIT: update atached dwg to reflect C:B210 effect on blocks Test_Drawing_0Flat.dwg Edited September 6, 2011 by pBe Quote
eldon Posted September 6, 2011 Posted September 6, 2011 What i did was change the UCS to follow the entity which gives me its current UCS on which where the enitities aligned. Thank you for a very useful technique. And nice to know exactly how the geometry had been formed. Quote
pBe Posted September 6, 2011 Posted September 6, 2011 Thank you for a very useful technique. And nice to know exactly how the geometry had been formed. You're welcome eldon. thats what were all here for. learn, suggest and SHARE For the OP I wrote the B210 code similar to what you originally had so you may understand it better. 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.