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.

Chamfer dimension

Started by fl7464, August 30, 2017, 02:02:58 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

fl7464

When placing dimensions on a chamfer the the text is too far away from the chamfer. This has been a problem for many versions.

Rob S


fl7464 - can you post an image of what you are getting?

There are many options that could be affecting this, so seeing might help explain.

I don't seem to have this problem in my useage.
User since forever

bdeck

Quote from: fl7464 on August 30, 2017, 02:02:58 PMWhen placing dimensions on a chamfer the the text is too far away from the chamfer. This has been a problem for many versions.

Looking into this I noticed a bug in the chamfer command that causes DC to "misremember" the location of the second point, so that shift-click,  point-relative, and orthogonal mode all fail to place the third arrow point orthogonally. Imperfect solutions to create a horizontal second leg of the arrow are:
      1) set the third point freehand; or
      2) draw a 3 legged arrow (shift-click works when setting a the 4th arrow point).

Also, it turns out that if you draw the chamfer dimension in "orthogonal mode" DC will force the text to be located at an extreme distance from the second point. Perhaps turning off orthogonal mode will fix your problem?

bdeck

#3
Here is a macro that dimensions a chamfer.
It suspends ortho mode while drawing the dimension.
Then, it (Optionally) forces the last leg of the arrow to be horizontal.

EDIT: Amended to add a test for DC version number.

'CD.d3m     'replacement for DimChafer to work around ortho bug    bdeck  8/17

    'Allows setting final point freehand to achieve horizontal leader.
    'Changes slope of final leg to 0, if drawn with slope less than 0.15 (optional)

Alias ENT_NPTS  &H010D 
Alias ENT_POINT  &H010E 

version=left$(2,sys$(105))
vlow=(version<18)

ne0=sys(9)
omode=sys(347)
sys(347)=0      'turn off ortho mode
>DimChamfer
{
<incomplete
}
sys(347)=omode 'restore previous ortho settings

if vlow then end    ' check DC version status

entno=sys(9)
if entno=ne0 then end   ' did I just draw something?

GETATTR entno, type
if type <>80 then end   ' did I just draw a chamfer?

entity entno
Query Ent_Npts, iii

If iii<6 then end  'if only one leg, do not change

ii=iii-1
i=ii-1

Query Ent_Point, i, x1,y1,z1
Query Ent_Point, ii, x2,y2,z2
Query Ent_Point, iii, x3,y3,z3

if x2=x1 then end        ' if last leg is vertical, do not change

' if abs((y2-y1)/(x2-x1))>.15 then end   ' if slope too high, assume user intended (Optional)

entity entno
Change Ent_Point, ii, x2,y1,z2        ' make last leg horizontal
Change Ent_Point, iii, x3,y1,z3
update

regen
end