Visual LISP, AutoLISP and General Customization

Visual LISP, AutoLISP and General Customization

Reply
Post 1 of 11

SuperFlatten

8997 Views, 10 Replies
08-16-2007 10:39 AM
I posted this routine at theswamp recently. I'm cross-posting it here because this NG
is where I feel like I live.

I hope those who might need it find it useful. Essentially it attempts to replace the
ExpressTools flatten command with something which actually works.

Comments and example files are welcome.

Joe Burke
Post 2 of 11

Re: SuperFlatten

08-16-2007 10:55 AM in reply to: *Joe Burke
Hey thanks joe.

Although quite different than the express flatten command it appears to work very fast and accurately.

Quite a peice of programming.


Bill
Post 3 of 11

Re: SuperFlatten

08-16-2007 11:28 AM in reply to: *Joe Burke
Hi Bill,

I found an example file posted by you named something like this: ABPDN120,dwg.
Apparently you were looking for some way to flatten the objects contained in that
drawing.

What I'm trying to convey here is two ideas. Your example file was very helpful in
terms of the code. And I'd like to know if the code flattens your example file as you
would expect.

Regards
Joe



wrote in message news:5692152@discussion.autodesk.com...
Hey thanks joe.

Although quite different than the express flatten command it appears to work very
fast and accurately.

Quite a peice of programming.


Bill
Post 4 of 11

Re: SuperFlatten

08-16-2007 11:44 AM in reply to: *Joe Burke
Hi Joe,

I use the flatten command mostly to convert 3d models into
2d representations (illustrations?).
I've attached a .png to help explain.
The image at the top was a 3d console model that flattened with your program. Everything was flattened to the WCS even though I was in a View UCS.
The bottom image I used the flatten express tool.
Note how it still looks like the model that I was looking at in 3D,
only it's now a 2D flat image.
Post 5 of 11

Re: SuperFlatten

08-17-2007 03:28 AM in reply to: *Joe Burke
Hi Bill,

Thanks for the example. Check the header comments. It's intended to flatten to WCS
regardless of the current view. Which suits my needs, but maybe I should think about
another option.

Joe


wrote in message news:5692205@discussion.autodesk.com...
Hi Joe,

I use the flatten command mostly to convert 3d models into
2d representations (illustrations?).
I've attached a .png to help explain.
The image at the top was a 3d console model that flattened with your program.
Everything was flattened to the WCS even though I was in a View UCS.
The bottom image I used the flatten express tool.
Note how it still looks like the model that I was looking at in 3D,
only it's now a 2D flat image.
Post 6 of 11

Re: SuperFlatten

08-17-2007 04:13 AM in reply to: *Joe Burke
>>>but maybe I should think about
another option.
<<<

That would be nice.
An accurate flatten in the view UCS would be a big
improvement over the express flatten, which leaves a lot to be desired esp. in the area of circles, ellipses and splines that are viewed at a twist.

Bill
Post 7 of 11

Re: SuperFlatten

08-17-2007 04:42 AM in reply to: *Joe Burke
Bill,

Could you use the rotate3d command with a drawing like that and then flatten to WCS?

Attached is your example file I used for testing.

Thanks
Joe


wrote in message news:5692842@discussion.autodesk.com...
>>>but maybe I should think about
another option.
<<<

That would be nice.
An accurate flatten in the view UCS would be a big
improvement over the express flatten, which leaves a lot to be desired esp. in the
area of circles, ellipses and splines that are viewed at a twist.

Bill
Post 8 of 11

Re: SuperFlatten

08-17-2007 05:46 AM in reply to: *Joe Burke
>>>Could you use the rotate3d command with a drawing like that and then flatten to WCS?

Actually, to a certain extent, we do that now.
But you have to give the user the ability to "see" the end result and then convert that to the 2d facsimile.
So,
What our program does is inserts the solid model into the drawing, then allows the user to set the "psuedo isometric" view to whatever the need is for direction in that particular drawing.
I added a 3d rotate only for a "fine tuning" of the way the model looks to the viewer.
Generally the models orientation stays the same as it is when was inserted, only the way you look at it changes.

To me, it makes more sense (and be more user friendly) to be able to flatten to the way you are looking at it (View UCS) than it would be to do a rotate3d then follow that with a view.

See attached

Bill
Post 9 of 11

Re: SuperFlatten

08-17-2007 06:39 AM in reply to: *Joe Burke
Bill,

Agreed regarding flatten to View UCS would be more user friendly. But I have to
balance that against the code revisions needed to allow it. Also the bugs such
changes might introduce. If you've even glanced at the code, you've seen it's already
a beast.

Some background. The main reason I wrote it was to flatten a civil site plan for use
as an xref in architectural drawings. I could not trust the ET flatten command to do
that. In fact, it would fail more often than not. I'll post an example file to CF if
anyone is interested in what the ET command does compared to SuperFlatten with such a
file.

Support for solid objects was sort of an afterthought.

If you haven't already, check the header comments. That may shed some light on my
view of the program and what it's designed to do.

Regards
Joe

wrote in message news:5692922@discussion.autodesk.com...
>>>Could you use the rotate3d command with a drawing like that and then flatten to
>>>WCS?

Actually, to a certain extent, we do that now.
But you have to give the user the ability to "see" the end result and then convert
that to the 2d facsimile.
So,
What our program does is inserts the solid model into the drawing, then allows the
user to set the "psuedo isometric" view to whatever the need is for direction in that
particular drawing.
I added a 3d rotate only for a "fine tuning" of the wa
y the model looks to the viewer.
Generally the models orientation stays the same as it is when was inserted, only the
way you look at it changes.

To me, it makes more sense (and be more user friendly) to be able to flatten to the
way you are looking at it (View UCS) than it would be to do a rotate3d then follow
that with a view.

See attached

Bill
Post 10 of 11

Re: SuperFlatten

08-17-2007 06:59 AM in reply to: *Joe Burke
Not a problem Joe.
I only mentioned what I did because I figured you were in the mood to cut some more code. :-)

It's the same way here, We're not "developers" and
I have to balance what I do, with what my job is.

I would think that a points transformation to the view UCS would be all that's needed but like you say, you developed your program for a specific reason while we here are doing a form of illustration to provide information to an assembly line.

We find ourselves fixing/erasing a few things using the et flatten but until we have somethng better, it beats doing everything manually.

One thing nice about not being a programmer as a primary job is, if I'm asked to do more than what I think is fesible, i can always say "who am I, Bill Kramer? :)

Thanks agian.

Bill
Post 11 of 11

Re: SuperFlatten

08-21-2007 06:59 AM in reply to: *Joe Burke
Attached is a revised version named SuperFlatten 1.1a. It handles text and mtext
objects with odd normals much better than the previous version.

Joe Burke
Post to the Community

Have questions about Autodesk products? Ask the community.

New Post