Author Topic: Chamfer dimension  (Read 171 times)

fl7464

  • Newbie
  • *
  • Posts: 3
Chamfer dimension
« on: August 30, 2017, 02:02:58 PM »
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

  • Hero Member
  • *****
  • Posts: 4381
    • Construction Estimating Program for General Contractors
Re: Chamfer dimension
« Reply #1 on: August 30, 2017, 08:47:43 PM »

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 Pro-design

bdeck

  • Hero Member
  • *****
  • Posts: 825
Re: Chamfer dimension
« Reply #2 on: August 31, 2017, 10:40:49 AM »
When 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

  • Hero Member
  • *****
  • Posts: 825
Re: Chamfer dimension
« Reply #3 on: August 31, 2017, 12:27:59 PM »
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.

Code: [Select]
'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

« Last Edit: August 31, 2017, 07:25:00 PM by bdeck »