Code Red > AutoLISP (Vanilla / Visual)

Thinking about flatten...

(1/9) > >>

Joe Burke:
Recently a client sent a drawing which needed flattening. I'm aware of the ET
flatten command and Mark Middlebrook's lisp routine named the same.

Niether one did the trick given the example drawing attached.

Mark's routine is limited in scope the sense it only deals with a limited set
of object types. And it does not deal with objects drawn outside of the WCS XY plane.
IOW, it simply resets certain Z coordinate values to zero. That's OK if that's
all that's needed.

Moving on to ET flatten. It attemps to flatten objects which are not parallel to
the WCS XY plane. Good idea I suppose, but the methods used seem questionable in
some cases. For instance, WMF out and back in are used. Look at the ET
flattensup.lsp file.

Futhermore, when I ran ET flatten on the example file it blew away the xrefs which
were not available. This was not evident until the file was saved, closed and reopened.
Obviously there's no reason it should do this.

I've also seen numerous errors like this:

Remove hidden lines? <No>:
bad argument type: lselsetp nil

Obviously an indication of poor programming.

So given all this I've been working on an alternative. But I'm very undecided about
what to do with objects drawn out of plane with WCS. Should they be projected to
the WCS plane? Or should they be translated intact to the WCS plane?

All comments welcome.

CADaver:
all the more reason NOT to flatten.

MP:
There's a lot of perfectly valid reasons to flatten a drawing including a client that is willing to pay for it.

:)

It's a challenging problem Joe -- I've written more flatteners than I can count, using everything from reverse engineering dxb plots to stratified wmf exporting / importing w/hidden line removal. I don't have AC2007 on this machine, is it possible it's ET Flattener has been updated (and fixed)? Do you need hidden lines removed?

MP:
In order to keep the flattener in vanilla AC2006 <which may have pooched custom objects> from bombing I dumped the unresolved xrefs, did some errant block cleanup. Anyway, see if the the attached will be of any use.

Joe Burke:

--- Quote from: MP on October 16, 2006, 01:32:21 PM ---In order to keep the flattener in vanilla AC2006 <which may have pooched custom objects> from bombing I dumped the unresolved xrefs, did some errant block cleanup. Anyway, see if the the attached will be of any use.



--- End quote ---
Thanks, Michael. I'll look at it soon, but iI need some sleep now.

It's comforting to hear someone with your level of expertise has condidered the issues beyond what's readily available.

BTW, I'm using vanilla 2006.

I'll post a clearer example of the dillema I talking about soon.

Navigation

[0] Message Index

[#] Next page

Go to full version