DesignCAD 3D Max 2027 box
Now available

DesignCAD 2027

Hatches that follow their boundaries, an on-screen dial to turn your model, and a way to find any command by name, in a clean Windows 11 look.

Flaten 2D

Started by Pearco, January 23, 2011, 04:44:46 AM

Previous topic - Next topic

0 Members and 0 Guests are viewing this topic.

Pearco

A while back a macro was posted that would check and set all entities to Z = 0. I can not seem to find it and could use it now. Anyone know where I can find it?
Thanks
Jim
User since ProDesign 1.5

JJG

Yes, the macro was written by Lar, and his name is "Flatten Z".
in the past, it was downloadable on the web page "Designcadenlashed", unfortunately now unavailable ...

JJG

#2
with the permission of Lar (I hope ... !), here is a french translated version (from me), were I added some options ... :

JJG

Very usefull to correct the following problem :
when some objects have some z<>0 coordinates in a 2D drawing, the command "strech" don't work. These macro remove this problem !

Pearco

Thanks JJG. I had some lines on a symbol that I had used in the past. I was trying to trim lines and for some reason they came in with Z= .001. More of those gremlins.
Jim
User since ProDesign 1.5

JJG

Quote from: Pearco on January 23, 2011, 08:59:30 AM
... and for some reason they came in with Z= .001. More of those gremlins.

probably a "copy and paste" ... no?
For me, it is often the source of this kind of thing.

Pearco

JJG;

No, I use load as a symbol all the time.
Jim
User since ProDesign 1.5

Adrian 2.0

I frequently need to flatten drawings when my trim commands fail.
The proceedure I use is to 'select all' (still in 2d mode) & open the info box.
In the 3-panel fields labelled XYZ Scale enter '0' in the Z-scale field.
The bounding box depth will change to '0'
If the drawing is already flat the Z-scale field will be greyed out.

NOTE: designcad will not position your flat drawing on the origin plane but (I think) it centres it halfway between the old extents.
Any new work in 2d will automatically be drawn on the origin's plane so you must change to 3D mode, select <Point><origin> & set a point on the drawing plane to ensure your new work is on the same plane.
It would be nice if the program set the selected points at Z=zero, or on the same plane as the selection handle after flattening but it appears to be random.

JJG

That's the advantage of the macro above: no need to ask oneself questions, everything (on your choice, "selected only" or "all") is reseted to Z = 0 precisely.

Lar

Just to keep the history straight this version of the macro that uses the query and change statements originated from Impulse. I added the 'selected only' option and a bunch of messages.

Before basiccad had query and change (somewhere around version 14 or 15) I had a flatten macro that used point select mode. It took forever and had issues with circles. About a year after query and change became available I read up on them and realized that they could work for this purpose and kept promising myself for months to write it but then Impulse posted his and it was great because it took a second to run.

Lar