pdms aid的用法

$(
辅助标识
Design Reference Manual
  General Commands
    Display
      Element Representation
        Using Design Aids

LINE ARROW CEARROW ARC SPHERE BOX CYLINDER 

符号说明
[] 表示可选 
(/) 表示选一 
NUMber 大写是必须的,小写可省略

示例:
LINE 线
AID LINE [NUMber 1] $!!CE.APOS TO $!!CE.LPOS [LINEStyle (SOLId/DASHEd/DOTTEd/DASHDot)]
注意 同一个NUM 线型 只需要定义一次


TEXT 文本
AID TEXT [NUMber 2] |hello world| AT $!!CE.POS

ARROW 箭头 
PROP 1 全箭头 0 全线
AID ARROW [NUMber 1] AT $!!CE.LPOS DIRection $!!CE.LDIR HEIght 100 PROPortion 0.5

CEARROW CE显示方向箭头
AID CEARROW (ON/OFF)
AID CEARROW HEIght (abore * 3) PROPortion 0.8 (ARRIVE/LEAVE/ORIGIN)

ARC 弧线
AID ARC [NUMber 1] $!!CE.APOS TO $!!CE.LPOS (TANPoint $!!CE.POS / THRU $!!CE.POS)

SPHERE 球
AID SPHERE [NUMber 1] $!!CE.POS DIAmeter 100

BOX 立方体
AID BOX [NUMber 2] POSition $!!CE.POS ORIentation $!!CE.ORI XLENgth 100 YLENgth 100 ZLENgth 500 FILLed (ON/OFF)

CYLinder 圆柱
AID CYLinder [NUMber 2] (POSition $!!CE.APOS / AT $!!CE.LPOS) ORIentation $!!CE.ORI DIAmeter 100 HEIght 5000 FILLed (ON/OFF)

清除 
AID CLEAR ALL
AID CLEAR LINE ALL
AID CLEAR LINE 1 
AID CLEAR LINE UNNumbered

查询
Q AID  LINE (1 / UNNumbered / ALL)

Design Reference Manual
  General Commands
    Display
      Element Representation
        Specifyint Axes

AXEs HEIght 500 AT $!!CE.POS
AXEs (ON/OFF/DELete)
$)

简单应用

image.png
id@
!ele1 = !!CE
id@
!ele2 = !!CE

!aidNumber = 99
-- 清除标识
!aids = 'TEXT LINE ARROW CEARROW ARC SPHERE BOX CYLINDER'
do !aid values !aids.split(' ')
  AID CLEAR $!aid $!aidNumber
  handle any
  endhandle
enddo

!p1 = !ele1.pos
!p8 = !ele2.pos
-- 根据2点生成8点 p1~p8
!tmp = array()
!tmp.append(0)
!tmp.append(1)
!n = 0
do !i values !tmp
  do !j values !tmp
    do !k values !tmp
      !p = !p1
      !p.East = !p1.East + (!p8.East - !p1.East) * !i
      !p.North = !p1.North + (!p8.North - !p1.North) * !j
      !p.Up = !p1.Up + (!p8.Up - !p1.Up) * !k
      !n = 2 * 2 * !i + 2 * !j + !k + 1
      !p$!n = !p
      $p $!i $!j $!k $!n $!p$!n
    enddo
  enddo
enddo

-- p1~p8 组成 长方体的 12 根线
!linePairU = '1,2;3,4;5,6;7,8;'
!linePairN = '1,3;2,4;5,7;6,8;'
!linePairE = '1,5;2,6;3,7;4,8'
!linePairs = !linePairU + !linePairN + !linePairE
do !linePair values !linePairs.split(';')
  !line = !linePair.split(',')
  !lineStart = !line[1]
  !lineEnd = !line[2]

  !posa = !p$!
  !posb = !p$!

  AID LINE NUM $!aidNumber $!posa TO $!posb LINEStyle DASHDOT

  !textPos = !posa.MidPoint(!posb)
  !distance = !posa.Distance(!posb).String('D1')
  if !distance.neq('0.0') and !lineStart.eq('1') then
    AID TEXT NUM $!aidNumber |$!distance mm| AT $!textPos
  endif
enddo

你可能感兴趣的:(pdms aid的用法)