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.

corrupted dimensions when copying, duplicating, or saving

Started by bdeck, May 22, 2016, 10:20:54 PM

Previous topic - Next topic

0 Members and 0 Guests are viewing this topic.

bdeck

Arrow direction on the progressive dimensions in the attached drawing changes whenever the dimension is  copied or duplicated, or when the file is saved a second time (save or saveas).  DC3DMax v25.2

Any ideas?

bd

samdavo

Wow !  that is truly weird lol !  Copy and Paste reverses the direction.   So too does Duplicate (N)  !!

PS And yet a copy of a copy ( i.e. second generation)  still stays reversed.

Bob P

When you open the Info Box on a dimension on the first drawing, you get the same style as the second drawing, and it's not the same as what is displayed on the first drawing...

bdeck

Bob, the info box shows incorrect info for the original dimensions.

The arrow type is correct, but the horizontal text position is reported to be over the first extension line, although it was drawn over the second extension line.

I'm guessing the arrowhead drawing algorithm is similarly flawed.

Also the text movement option was grayed out when drawing the dimension, but is now available to do some funky things (some ok, some not)  in the infobox.

bd

bdeck

The attached file shows that the direction the dimension is drawn determines whether it will corrupt the arrows.

The red dimensions are corrupted after two saves, the black ones are ok.

bd

bdeck

My best guess now is that this problem is not so much a corruption error as a rendering error. The arrow position is miscalculated from the outset, but it somehow takes two generations of copies to make them render the miscalculation correctly.

Internally, it appears there is no such thing as a first or second extension line, only left/right. After a dimension is drawn using first/second parameters, it appears DC must translate first/second/bottom/top into right/left.

In this case, DC translated and rendered the text position correctly from the outset. But it failed to translate the arrow position. Instead, it's initial rendering of arrow text position, while meeting our expectations, was wrong. After 2 generations of copying, it correctly rendered the improperly translated arrow position, which resulted in a dimension which did not satisfy the original parameters using first/second notation.

The macro posted here:  http://forum.designcad.com/index.php?topic=6594.0  appears to fix the problem. Also  when exporting files to dwg/dxf and re-importing them, dimensions drawn with the macro seem to hold up. (see Attached file.)

Could someone test the attached file in Acad (or intellicad, etc) to see if the dims render correctly?
 
Thanks,
bd


bdeck

Quote from: bdeck on May 31, 2016, 07:36:00 AMInternally, it appears there is no such thing as a first or second extension line, only left/right. After a dimension is drawn using first/second parameters, it appears DC must translate first/second/bottom/top into right/left.

Thats what I guessed after reading the sdk updates for Version 18.2.  Numeric parameters to "<DimHorizontalTextPos" are described as "right" and "left," while arrow style parameters are assigned to  "<Arrowhead" and "<Arrowhead2." 

But after rotating completed dimensions (drawn using the dp.d3m macro, see the dcd file attached to prior post)  I'm not so sure.

No matter what angle I rotated the completed dimensions, text and arrows still rendered correctly. And, after exporting them to dwg 2007 and re-importing them to DC, they still rendered correctly.  It appears that once a dimension has been correctly rendered, "right" and "left" are no longer an issue, no matter how the dimension is rotated later. 

Go figure.

bd

PS: I trashed all my Autodesk software years ago, so I have no way to verify that these dimensions render properly in software that uses dwg or dfx files natively. Anyone care test the attached dwg file to check it out?  Arrows and text on the top row are all drawn counter-clockwise,  and those on the bottom row are drawn clockwise. 

bdeck

Well, I downloaded a dwg viewer (dwgsee) to test the file exported from DC .

If dwgsee is correct (I have no reason to believe it is) then exporting progressive dimensions drawn in version 25.2 gives the following results:

1) Exporting a dimension from DC immediately after drawing right-to-left using the DC progressive dimension command results in a correct text position and an incorrect arrow position when viewed with dwgsee.

2) Exporting a dimension copied twice from from a dimension drawn  right-to-left using the DC progressive dimension command results in an incorrect text position and a correct arrow position when viewed with dwgsee.

3) Exporting a dimension drawn  right-to-left with the dp macro results in incorrect text and arrow positions when viewed with dwgsee.

So while the dp macro results in correct rendering of dimensions in DC, it appears that another macro will be necessary to prepare dc files for export as dxf or dwg files if they contain progressive dimensions.

Progressive dimensions drawn right-to-left  in DC version 17.2 render just fine in dwgsee.

DrollTroll

25 years with DesignCAD

bdeck

Quote from: DrollTroll on June 02, 2016, 08:34:19 AMThanks bdeck, we'll look into it.

Good man.. er,... troll...er,... D'oh! ....

Quote from: bdeckProgressive dimensions drawn right-to-left  in DC version 17.2 render just fine in dwgsee.

Of course versions before 18.0 didn't export dimensions at all. They exported only exploded dimensions. So even considering this current rendering issue, the present DC version appears to represent a step forward.