|
分享一段钣金的材料标记和面积计算标记关系式:
材料标记可以为例如:Q235-A T=1.2
面积自动计算自动计算例如:0.5 m^2
/*材料
THICKNESS=SMT_THICKNESS
IF THICKNESS - FLOOR(THICKNESS) == 0
CMAT=MATERIAL_PARAM("cmaterial")+" T="+ITOS(FLOOR(THICKNESS))+"."+"0"
ELSE
IF THICKNESS<1
CMAT=MATERIAL_PARAM("cmaterial")+" T=" +"0"+"."+ ITOS ( mod((THICKNESS-FLOOR(THICKNESS))*100,100))
ELSE
IF THICKNESS >1
CMAT=MATERIAL_PARAM("cmaterial")+" T=" + ITOS(FLOOR(THICKNESS))+"."+ ITOS ( mod((THICKNESS-FLOOR(THICKNESS))*100,100))
endif
endif
endif
/*面积
CAREA1=mp_surf_area("")/1000000
if CAREA1<1
CAREA="0"+"."+ itos(mod(CAREA1*1000,1000)) + " m^2"
else
CAREA=itos(floor(CAREA1))+"."+ itos(mod((CAREA1-floor(CAREA1))*1000,1000)) + " m^2"
endif
|
评分
-
查看全部评分
|