Author Topic: Thinking about flatten...  (Read 21957 times)

0 Members and 1 Guest are viewing this topic.

Joe Burke

  • Guest
Re: Thinking about flatten...
« Reply #15 on: October 18, 2006, 10:24:34 AM »
Joe !
I've seen your dwg and use the official macro :
Code: [Select]
_move;_all;;0,0,0;0,0,1e99;_move;_p;;0,0,0;0,0,-1e99;
The problem is that I used it on all objects and it spreat some of the red 3poly on the top to incredible points (at huge X and Y).
So, if we exept the problem withe those few elements that I finally removed before the macro, the macro seems to be convenient and fast. Don't know if you know it.

Thanks for your reply.

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Re: Thinking about flatten...
« Reply #16 on: October 18, 2006, 02:04:31 PM »
Thanks, Michael. That seems to solve a separate issue which I won't bother getting into here.

Ummm, glad to help?

The academic question was is there a way to ... <snip> ... convert it to a 4x4 matrix which could then be passed to (vla-transformby <obj> (vlax-tmatrix <matrix>)). The desired result is the object's Normal property is (0.0 0.0 1.0) after it is transformed. Without forcing the property on the object.

I'd say most likely achievable (doubtful via a single call) but my brain hurts too much right now to really think about it with an honest effort. Fortunately there is a lot of talent / expertise swimming about so I'd be surprised if you weren't provided a couple ways to skin this cat in relatively short order.

:)
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.comhttp://cadanalyst.slack.comhttp://linkedin.com/in/cadanalyst

MikeJarosz

  • Guest
Re: Thinking about flatten...
« Reply #17 on: October 26, 2006, 05:11:22 PM »
I've also seen numerous errors like this:

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

Obviously an indication of poor programming.


More than just bad programming, bad data structure design! For 12 years I worked on another CAD system totally unrelated to any current system. We could easily "flatten" (your term) 3D data in any direction. We could flatten the z-coord to zero or any arbitrary number. We could also flatten about x and y. The reason was that all entities were defined as connected points. A polygon was n-connected dots. Every point had an x,y,z value. One form of the scale command functioned as a point editor. The x,y,z  value of a point could be changed with a single command. Moving a point moved everything connected to it. So a command like:

move nodes scale z 0 about 0 0 0

would make all z node values equal to zero, taking all entities with them. Substitute scale z 5 in the above command and the z coordinate becomes 5 instead of zero. Say your building was on a 45 degree angle and you wanted a projected ("squashed") elevation. You could take the accurate elevation and squeeze it with:

move nodes scale x .5 about 0 0 0  (or what ever percentage factor needed).
 
This command changes the x coordinate to be x/2, and leaves the y and z alone. Hence, a projected elevation.You could also take a 3D hiddenline elevation and flatten it on x or y to achieve the same goal.

Imagine a jagged line, like a Wall Street stock chart graph. A command like:

move nodes scale y  0 about 0 1 0 would turn it into a horizontal flatliner at y=1. Scale x 12 would turn it into a vertical line at x=12. A circle would become an ellipse.

I bring this up because way too many people never think critically about their CAD system and what it's features are, and what it might be missing. Imagine a snap to 0 0 0? Or a snap to a polygon centroid? How about polygon shadows that have area?

Needless to say, when we were finally forced to use the 800 pound gorilla CAD system (you know which one). we were shocked at how little power it had.

My favorite bit of bad programming: why is dimensioning a subprogram?

dan19936

  • Guest
Re: Thinking about flatten...
« Reply #18 on: October 26, 2006, 08:16:14 PM »
Was that CAD system AES? That was my first cad system out of school in '93. Everything was command line driven - Add line . (grapically) or add line color 2  .

Led to massive amounts of shortcuts, the above were AL or AL2 col 2

What was amazing was to be able to change all lines color x on layers y to layer z in one step.

People who came over from AutoCAD hated it, I mean really hated it.

Dan

MikeJarosz

  • Guest
Re: Thinking about flatten...
« Reply #19 on: October 27, 2006, 07:27:49 PM »
Yes it was AES. It was enormously powerful, and frankly beyond the ability of most users. But here we are, years later, and I am amazed to see features popping up in current software that AES had 20 years ago.

You may have seen talk about point clouds. We had a computer graphics PHD come to us a while back, proudly demonstrating the software he wrote do create point clouds. Everything in AES was based upon a  point. You could draw the points only without any of the other data, hence: a point cloud. We did a project with BirdAir. all they needed were the points, because they had their own software. We sent them an excel file of every point.

The people who hated AES then were used to barely functional PC software. If I demonstrated the capabilities of AES to today's users, I am sure they would respond differently. After all, they've mastered 3D studio, Viz, Maya, Rhino, Microstation. Lisp, even Catia (what did I leave out?). AES wouldn't look so difficult anymore. It was way ahead of it's time. Most of the programmers who developed it went on to other positions in the CAD industry. An ACAD insider told me that the polar tracking in ACAD was created by a former AES programmer. AES had tracking too.

When will ACAD discover polygon transparency? AES had it. Not in the plot driver, but in the data. So you could have solid AND transparent polygons in the same drawing. You could cast a transparent shadow across a solid background in color. The color would merge with the underlying data. And the shadow had area. Twenty years ago! The list is endless.

I say this to encourage CAD users to think about the capabilities of their software. I'm tired of hearing people lament how ACAD can't flatten effectively. You bought a Cessna. Don't expect a Boeing. And don't knock Boeing because it makes your Cessna look bad. Of course, if you're only interested in short hops, the Cessna's for you.

To correct a misunderstanding, AES had a command line. But it had drop down menus and forms too. And the commands had user definable aliases that are way more powerful the the Acad PGP stuff. add line color  could become alc. then you could type alc 2. But you could also type alc 5 or alc 55. The alias did not need to be complete. You could finish it on the command line. This is  a common UNIX capability that monolingual PC users don't know about!

Rant over

CADaver

  • Guest
Re: Thinking about flatten...
« Reply #20 on: October 28, 2006, 04:31:00 PM »
I've also seen numerous errors like this:

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

Obviously an indication of poor programming.
More than just bad programming, bad data structure design!
Considering that one is taking a perfectly good 3D model and attempting to break it (for some unknown reason), one would expect some error in the broken result.  Not necessarily bad programming, but maybe bad premise.

For 12 years I worked on another CAD system totally unrelated to any current system. We could easily "flatten" (your term) 3D data in any direction. We could flatten the z-coord to zero or any arbitrary number. We could also flatten about x and y.
I'm still looking for an intelligent reason for doing so? (other than antiquated CNC tools, but even that has an easier solution)

The reason was that all entities were defined as connected points. A polygon was n-connected dots. Every point had an x,y,z value. One form of the scale command functioned as a point editor. The x,y,z  value of a point could be changed with a single command. Moving a point moved everything connected to it. So a command like:

move nodes scale z 0 about 0 0 0
and this is intuitive?  Sounds like a hard version of the properties box.

Say your building was on a 45 degree angle and you wanted a projected ("squashed") elevation.
ummm... what the heck for?

move nodes scale y  0 about 0 1 0 would turn it into a horizontal flatliner at y=1. Scale x 12 would turn it into a vertical line at x=12. A circle would become an ellipse.
Changing the X or Y or Z scale factor of the XREF is a load easier.

Imagine a snap to 0 0 0? Or a snap to a polygon centroid?
No need to imagine, both have been available in AutoCAD for quite some time.

How about polygon shadows that have area?
again, what for?  A feature may be very nice, but if it has little application, what good is "nice"?

Needless to say, when we were finally forced to use the 800 pound gorilla CAD system (you know which one). we were shocked at how little power it had.
Was that a "real" problem with the software, or the preconceived notions of the user??

My favorite bit of bad programming: why is dimensioning a subprogram?
I guess I need that one explained.


CADaver

  • Guest
Re: Thinking about flatten...
« Reply #21 on: October 28, 2006, 04:49:01 PM »
Yes it was AES. It was enormously powerful, and frankly beyond the ability of most users. But here we are, years later, and I am amazed to see features popping up in current software that AES had 20 years ago.
hmmm... such as??

You may have seen talk about point clouds. We had a computer graphics PHD come to us a while back, proudly demonstrating the software he wrote do create point clouds. Everything in AES was based upon a  point. You could draw the points only without any of the other data, hence: a point cloud. We did a project with BirdAir. all they needed were the points, because they had their own software. We sent them an excel file of every point.
I think you'e missed the point (NPI) about point clouds, especially in the Survey/Surface approximation fields.

I say this to encourage CAD users to think about the capabilities of their software. I'm tired of hearing people lament how ACAD can't flatten effectively. You bought a Cessna. Don't expect a Boeing. And don't knock Boeing because it makes your Cessna look bad. Of course, if you're only interested in short hops, the Cessna's for you.
yada yada yada.  AES was a heavy-handed bit of programming, as was GE-CALMA and a few other "big-boy" toys of early CAD development.  And yes they had a few features that programmers thought would be handy for designers, but because they were programmers and not designers most of the features were just so much flash looking for application.  As for AutoCAD not "flatten[ing] effectively, why in the heck should it?  Instead of backing up to the way old programs did it and touting that as some good thing, look at the better way. 

It like complaining about nail guns because you no longer have a use for your old hammer.   All the rants about how good your specific hammer was for certain tasks aside, the obvious solution is stop using the old hammer to drive nails.

Keith™

  • Villiage Idiot
  • Seagull
  • Posts: 16899
  • Superior Stupidity at its best
Re: Thinking about flatten...
« Reply #22 on: October 28, 2006, 05:11:54 PM »
It like complaining about nail guns because you no longer have a use for your old hammer.   All the rants about how good your specific hammer was for certain tasks aside, the obvious solution is stop using the old hammer to drive nails.

That is funny ... I find it quite amusing that when on construction sites I frequently see carpenters using their $400 nail gun as a hammer beating and pounding away at boards. Then they wonder how come it has to be worked on all the time. Go figure ...
Proud provider of opinion and arrogance since November 22, 2003 at 09:35:31 am
CadJockey Militia Field Marshal

Find me on https://parler.com @kblackie

CADaver

  • Guest
Re: Thinking about flatten...
« Reply #23 on: October 28, 2006, 05:19:43 PM »
It like complaining about nail guns because you no longer have a use for your old hammer.   All the rants about how good your specific hammer was for certain tasks aside, the obvious solution is stop using the old hammer to drive nails.

That is funny ... I find it quite amusing that when on construction sites I frequently see carpenters using their $400 nail gun as a hammer beating and pounding away at boards. Then they wonder how come it has to be worked on all the time. Go figure ...
I saw a guy recently peeling the nails out of the wire strips and driving them with a hammer... I didn't ask, I was afraid of the answer.

Keith™

  • Villiage Idiot
  • Seagull
  • Posts: 16899
  • Superior Stupidity at its best
Re: Thinking about flatten...
« Reply #24 on: October 28, 2006, 06:44:35 PM »
dee-da-dee
Proud provider of opinion and arrogance since November 22, 2003 at 09:35:31 am
CadJockey Militia Field Marshal

Find me on https://parler.com @kblackie

Joe Burke

  • Guest
Re: Thinking about flatten...
« Reply #25 on: October 30, 2006, 09:56:42 AM »
I've also seen numerous errors like this:

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

Obviously an indication of poor programming.
More than just bad programming, bad data structure design!
Considering that one is taking a perfectly good 3D model and attempting to break it (for some unknown reason), one would expect some error in the broken result.  Not necessarily bad programming, but maybe bad premise.

As usual, you presume too much.

I did not say a 3D model was involded when ET flatten returned that error.

CADaver

  • Guest
Re: Thinking about flatten...
« Reply #26 on: October 30, 2006, 05:48:17 PM »
As usual, you presume too much.
I did not say a 3D model was involded when ET flatten returned that error.
You're absolutely correct, I had assumed that we were talking about flattening a 3D model.  Of course I have no clue why one would need to flatten anything other than 3D, but then there you are.

Keith™

  • Villiage Idiot
  • Seagull
  • Posts: 16899
  • Superior Stupidity at its best
Re: Thinking about flatten...
« Reply #27 on: October 30, 2006, 06:53:42 PM »
As usual, you presume too much.
I did not say a 3D model was involded when ET flatten returned that error.
You're absolutely correct, I had assumed that we were talking about flattening a 3D model.  Of course I have no clue why one would need to flatten anything other than 3D, but then there you are.

Randy, I can completely understand his dilemna. I have received plans (2d) where some ignoramus had set the elevation var to something other than 0 for one line, then 0 for another and then another elevation for the third line. What you get is a hodge podge of varying z elevarions where hatching is impossible, regioning is impossible,and all sorts of other meaninful data gathering becomes quite the task. Mind you we are not talking about a 3d model her, but rather a 2d plan view that looks as if someone arbitrarily changed the z elevations on endpoints of lines for no good purpose ... or as I have seen prior. Rather than use an ellipse to approximate an angled view (in a 2d drawing) the user rotated a circle in 3d to make it look about right.

Anyway, there is a valid reason for using it, if for no other reason than to fix the mess caused by employees who are no longer with us.
Proud provider of opinion and arrogance since November 22, 2003 at 09:35:31 am
CadJockey Militia Field Marshal

Find me on https://parler.com @kblackie

CADaver

  • Guest
Re: Thinking about flatten...
« Reply #28 on: October 30, 2006, 07:06:05 PM »
As usual, you presume too much.
I did not say a 3D model was involded when ET flatten returned that error.
You're absolutely correct, I had assumed that we were talking about flattening a 3D model.  Of course I have no clue why one would need to flatten anything other than 3D, but then there you are.

Randy, I can completely understand his dilemna. I have received plans (2d) where some ignoramus had set the elevation var to something other than 0 for one line, then 0 for another and then another elevation for the third line. What you get is a hodge podge of varying z elevarions where hatching is impossible, regioning is impossible,and all sorts of other meaninful data gathering becomes quite the task. Mind you we are not talking about a 3d model her, but rather a 2d plan view that looks as if someone arbitrarily changed the z elevations on endpoints of lines for no good purpose ... or as I have seen prior. Rather than use an ellipse to approximate an angled view (in a 2d drawing) the user rotated a circle in 3d to make it look about right.

Anyway, there is a valid reason for using it, if for no other reason than to fix the mess caused by employees who are no longer with us.
Except for the lunatic rotated circle for ellipse, wouldn't the properties box be a lot easier for 2d elements than flatten??

Keith™

  • Villiage Idiot
  • Seagull
  • Posts: 16899
  • Superior Stupidity at its best
Re: Thinking about flatten...
« Reply #29 on: October 30, 2006, 07:10:35 PM »
It would ... and I use that method whenever it is the most appropriate. Occasionally I find those where flatten is invaluable, but as you point out .. a "select all" and "Z = 0.0" works wonders on most of them except the occasional drawing where the lines are not parallel to the ucs, then changing the Z yields unpredictable results.
Proud provider of opinion and arrogance since November 22, 2003 at 09:35:31 am
CadJockey Militia Field Marshal

Find me on https://parler.com @kblackie