Jump to content

Recommended Posts

Posted

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 :shock:

  • Replies 24
  • Created
  • Last Reply

Top Posters In This Topic

  • Tharwat

    7

  • harilalmn

    6

  • pBe

    5

  • Lee Mac

    3

Top Posters In This Topic

Posted

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....!!! :shock:

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..!! :reallymad:

Posted (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 by pBe
Posted

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. :D

Posted
Thank you for a very useful technique.

 

And nice to know exactly how the geometry had been formed. :D

 

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.

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...