News:

Please note new Forum URL: forum.designcad.com

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

Copy and paste

Started by Leonard, April 16, 2012, 08:10:54 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Dr PR

DT,

I do not think you can solve this program automatically. It is up to the user to decide if there is a problem or not.

However, I think it would be useful, when the program is operating in 2D mode, to warn the user if objects (points) are outside the working plane. At least the user would know there may be a problem.

This would really be useful when drawings are imported into a 2D drawing.

A "flatten" option, with appropriate warnings, would be useful.

This would be similar to the warning and action that happen when a non-planar plane is corrected.

Phil
DesignCAD user since 1987

cavelamb

Quote from: Dr PR on April 27, 2012, 10:12:34 PM
cavelamb,

If you open "Options/Options" and click the "General" tab you can set the "Coordinate System Precision" to 15. Then the smallest it gets is 0.000000000000001.

Even if you set the Precision to 5 the program still calculates to 15 places - it just rounds off to 5 for displays.

If the Z value is non-zero you will get errors in a 2D drawing, and some intersections may fail.

Phil


I'm going to have to check into that, Phill.
I've never changed coordinate system precision, so the .00001 (muscle memory knows EXACTLY how many zeros that is)
has always worked for me. 

It that because that's the default limit ?




prl

#47
Quote from: Dr PR on April 27, 2012, 10:18:19 PM
I do not think you can solve this program automatically. It is up to the user to decide if there is a problem or not.

I'm with the doc on this one. Be careful. Historically DesignCAD does sometimes introduce the z>0 problem but how to tell the difference between something a user generated intentionally and something DesignCAD did via a bug is a trap. Tackle one by automatically making z=0 and you may be messing with intentional user data.  By the way, for another long topic similar to this one: http://forum.designcad.com/index.php?topic=275.0

The origin of all the various flatten and zzero macros goes back to the 90s when DesignCAD merged the 2d and 3d versions into one.  For version 15 and up I use:


Program: zzero.d3m (make z data equal zero - used to flatten a drawing)

include "dcadalias.d3i"


Sys(1027) = 4 'Yes/No MessageBox style
Message "WARNING!  This routine changes all entity Z coordinates to ZERO. Do you wish to continue?"
if sys(1028) = 7 then
     sys(80) = 0
   end
end if

precision 15
for i = 1 to sys(9)
 entity i
 Query Ent_Npts, epoints
 for j = 1 to epoints
   Query Ent_Point, j, ptX, ptY, ptZ
   Change Ent_Point, j, ptX, ptY, 0
 next j
next i

regen
sys(1027) = 0
message "Done"
end


Also in general, it is useful to always experiment on your drawings using a duplicate drawing.  I do this for many things, like solid add and subtract operations.  This way you can see the results without having to worry about DesignCAD screwing up your base drawing.  The below code will take the selected portions of a drawing and make a duplicate "temporary" drawing.  Think of it like a clipboard drawing space.  In my case, I use a virtual "V" drive as the location.  Nothing I do on the V drive is permanent since it exists only in memory.

'Program: dip.d3m (duplicate in place)

'isolates a subset of your current drawing by copying selected items to a new drawing with same view position, drafting mode, layers etc.

d$ = "v:\temp.dcd"

include "mustselect.d3i"

if sys(80)> 0 then
   >savecopy
   {
   <SelectOnly 1
   <FileName [d$]
   }
   
   >open
   {
   <FileName [d$]
   }
endif

end


Edit: added the include file below

mustselect.d3i

'standard include routine

if sys(80)=0 then
  Message "Nothing selected. . . press any key to continue"
  END
end if


MarkX

I guess DC doesn't have a way to flag that a drawing is meant to be 2D?

In which case, since some users might use the ZY plane, it could be hard for DC to know if a drawing was meant to be 3D or 2D. So it couldn't issue a warning.

You would have to have some arbitrary rule that said "If the X/Y/Z coordinate for all objects is less than <arbitrary value> but greater than zero then warn the user that that the drawing is not 2D"

Do the other major drawing programs store a flag for 2D/3D?

Mark

prl

#49
Quote from: MarkX on May 02, 2012, 07:35:02 AM
Do the other major drawing programs store a flag for 2D/3D?

No.  In general all CAD platforms unless they are a crippled "lite" versions are 3d with 3d database storage.  I suspect the "lite" 2d versions simply ignore the third data point; that is to say they don't use it or change it, it simply gets carried along.  

On my wall directly in front of me, I have a xyz orientation key for several CAD and structural analysis programs.  I always have to remind myself whether the program I am dealing with defines the xy plane as an elevation or a plan. Math books historically used the xy plane as an elevation with xz being plan.  Then AutoCAD created a hybrid approach then eventually settled on xy as being a plan view.

Edit: And then came SketchUp (which I love ) and they decide xyz is too nerdy and redefine the coordinate system as red green blue. Architects!!!  Lar may disagree  :D


Lar

#50
Quote from: prl on May 02, 2012, 08:49:09 AM
Architects!!!  Lar may disagree  :D
My drive for pushing 3d to the max is based in correcting the inherent flaws in traditional architecture, ie, different views of a composite object drawn from imagination (on a board or computer) is a disaster waiting to happen. Most architects don't see it this way.

3D cad conceptually solves the problem but still has very far to go, due in no small part to the complexity it requires to be 100% correct about every single aspect of a construction project.

Still, my biggest thrill with 3d is when, after preparing for a meeting with all the design points I want to explain to the client, I enter the meeting, show the 3d, the client takes one look at it and begins explaining the design to me.

Lar


prl

#51
Quote from: Lar on May 02, 2012, 09:53:59 AM
3D cad conceptually solves the problem but still has very far to go, due in no small part to the complexity it requires to be 100% correct about every single aspect of construction project.

Edit: Abbrevations:  A/E (architects/engineers), BIM (Building Information Modeling).

At the risk of hijacking this topic, I love the capability of 3D but am dismayed at the garbage being produced by today's BIM software. A/Es can now produce hundreds of pages of drawings. The client is usually impressed by the inches of drawing thickness but anyone who started out with pencil on mylar knows garbage when they see it.  In my line of work (architecture building engineering )every line on a drawing is suppose to mean something.  BIM if not carefully managed by a competent draftsman creates so much that one can spend hours trying to separate out dimension lines from incorrectly rendered object lines. It's probably why Lar (and myself) like to "roll our own" BIM systems.  Besides it fun to control your own tools.