几何尺寸与公差论坛

 找回密码
 注册
查看: 690|回复: 0

【转帖】formula.txt

[复制链接]
发表于 2009-4-6 19:22:41 | 显示全部楼层 |阅读模式
formula
can any1 tell me how to write simle formulas on cdmis??? say i want to subtract one rad from the other-how do i do that?
*** measure a circle
cir1 =auto/circle,showallarams = no,showhits = no
theo/-5,0.25,-0.5,1,0,0,25
actl/-5,0.25,-0.5,1,0,0,25
targ/-5,0.25,-0.5,1,0,0
*** multily the radius by 2 and save it into variable v1
assign/v1 = cir1.rad *2
** reort to the oerator the value
why do i need a variable? i don't know much about variable.
try this:
*** measure radius location #1
cir1 =auto/circle,showallarams = no,showhits = no
theo/-5,0.25,-0.5,1,0,0,25
actl/-5,0.25,-0.5,1,0,0,25
targ/-5,0.25,-0.5,1,0,0
*** measure radius location #2
cir2 =auto/circle,showallarams = no,showhits = no
theo/-10,0.25,-0.5,1,0,0,40
actl/-10,0.25,-0.5,1,0,0,40
targ/-10,0.25,-0.5,1,0,0
*** assigning a variable is where the math is done, using the measured features
assign/rad_dif = cir2.rad-cir1.rad
now just reort out the value of rad_dif
thanks cmm dude, you gave him an answer secific to his question and i only gave an generic answer.
why use a variable??
you dont have to use a variable, but it sure makes it a lot cleaner when trying to figure it out when you make a mistake.
is there hel in the software on how to do this kinda stuff?
just search the cdmis hel for "variables". there is lenty-o-info there.
if you are already in a articular area of the software that you have questions about, just ress f1, that should take you directly to the hel window...
您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|Archiver|小黑屋|几何尺寸与公差论坛

GMT+8, 2024-12-22 18:58 , Processed in 0.035660 second(s), 20 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表