找回密码
 立即注册

QQ登录

只需一步,快速开始

微信扫码登录

搜索
查看: 1888|回复: 4

[求助] 大家好,求T型刀数据参数代码

[复制链接]

28

主题

98

回帖

6938

积分

上尉

积分
6938
发表于 2022-6-10 10:46:46 | 显示全部楼层 |阅读模式
大家好,我想把T型 刀独有的参数引进后处理,请问它们的参数代码是什么,例如
globalmom_tool_diameter   global mom_tool_corner1_radius D=[format "%.2f" $mom_tool_diameter]R=[format "%.2f" $mom_tool_corner1_radius] ,具体要的参数看图
要颈部直径,刀刃长


360截图.jpg

28

主题

98

回帖

6938

积分

上尉

积分
6938
 楼主| 发表于 2022-6-11 17:46:28 | 显示全部楼层
本帖最后由 bey2008 于 2022-6-11 17:49 编辑

此问题已经解决了,分享下我的最新成果,最强单刃反镗刀镗反沉孔后处理,用于孔铣反沉孔,欢迎指教回复
1.jpg
3.jpg
4.jpg
5.jpg

28

主题

955

回帖

8379

积分

少校

积分
8379
发表于 2022-6-11 18:45:23 | 显示全部楼层
最强单刃反镗刀镗反沉孔后处理

13

主题

251

回帖

4825

积分

中尉

积分
4825
发表于 2024-10-12 19:48:47 | 显示全部楼层
zhangjier 发表于 2022-6-11 18:45
最强单刃反镗刀镗反沉孔后处理

global mom_tool_number group1
global mom_tool_diameter
global mom_tool_flute_length hhh mom_tool_length_adjust_register
global mom_tool_corner1_radius mom_tool_lower_corner_radius
global mom_tool_type mom_operation_name mom_group_name
global mom_tool_name mom_tool_cutcom_register
global mom_tool_corner1_radius mom_cutcom_adjust_register
global mom_tool_description tname mom_tool_adjust_register
global mom_tool_length rr2 g9g mom_tool_point_angle ddd mmm ttinf
set g9g 0

if {[info exists mom_tool_cutcom_register] } {
set ddd $mom_tool_cutcom_register
} else {
if {[info exists mom_cutcom_adjust_register] } {
set ddd $mom_cutcom_adjust_register
}
}

if {[info exists mom_tool_adjust_register] } {
set hhh $mom_tool_adjust_register
} else {
if {[info exists mom_tool_length_adjust_register] } {
set hhh $mom_tool_length_adjust_register
} else {
set hhh 0
}
}

if {$mom_tool_type == "Milling Tool-T Cutter"} {
#MOM_set_seq_on
#MOM_output_literal "(T$mom_tool_number=$mom_tool_name D=[string trimright [format "%.2f" $mom_tool_diameter] "0"] FL=[string trimright [format "%.2f" $mom_tool_flute_length] "0"] CR=[string trimright [format "%.2f" $mom_tool_lower_corner_radius] "0"] H=[format  "%02.0f" $hhh])"
MOM_output_literal "(T$mom_tool_number=$mom_tool_name D=[string trimright [format "%.2f" $mom_tool_diameter] "0"] CR=[string trimright [format "%.2f" $mom_tool_lower_corner_radius] "0"] FL=[string trimright [format "%.2f" $mom_tool_flute_length] "0"])"
#MOM_set_seq_off
set rr2 "CR=[string trimright [format "%.2f" $mom_tool_lower_corner_radius] "0"]"
} else {
string first str1 str2
if { [ string first "Drill" $mom_tool_type ] == "-1" } {
#MOM_set_seq_on
#MOM_output_literal "(T$mom_tool_number=$mom_tool_name  D=[string trimright [format "%.2f" $mom_tool_diameter] "0"] FL=[string trimright [format "%.2f" $mom_tool_flute_length] "0"] R=[string trimright [format "%.2f" $mom_tool_corner1_radius] "0"] H=[format  "%02.0f" $hhh])"
MOM_output_literal "(T$mom_tool_number=$mom_tool_name  D=[string trimright [format "%.2f" $mom_tool_diameter] "0"] R=[string trimright [format "%.2f" $mom_tool_corner1_radius] "0"] FL=[string trimright [format "%.2f" $mom_tool_flute_length] "0"])"
#MOM_set_seq_off
set rr2 "R=[string trimright [format "%0.2f" $mom_tool_corner1_radius] "0"]"
} else {
#MOM_set_seq_on
#MOM_output_literal "(T$mom_tool_number=$mom_tool_name D=[string trimright [format "%.2f" $mom_tool_diameter] "0"] FL=[string trimright [format "%.2f" $mom_tool_flute_length] "0"] DR=[format "%.0f" [expr (180.0 / 3.14159) * $mom_tool_point_angle]] H=[format  "%02.0f" $hhh])"
MOM_output_literal "(T$mom_tool_number=$mom_tool_name D=[string trimright [format "%.2f" $mom_tool_diameter] "0"] DR=[format "%.0f" [expr (180.0 / 3.14159) * $mom_tool_point_angle]] FL=[string trimright [format "%.2f" $mom_tool_flute_length] "0"])"
#MOM_set_seq_off
set rr2 "DR=[format "%.0f" [expr (180.0 / 3.14159) * $mom_tool_point_angle]]"
}

}
if {$mom_tool_number == 0 } {
MOM_abort "\n\n 「 $mom_operation_name」使用的刀具:「 $mom_tool_name 」未设置刀号\n\n"
}

global numbers toolnumbers mom_operation_name
global nStep nt mom_tool_number ni ntd mom_tool_name
set nStep [expr $nStep+1]
set nt($nStep) $mom_tool_number
set ntd($nStep) $mom_tool_name
for { set ni 0 } { $ni < $nStep } { incr ni } {
if { $nt($ni) == $mom_tool_number } {
set nStep [expr $nStep-1]

if { [string compare $ntd($ni) $mom_tool_name] } {
MOM_abort "\n\n 「 $mom_operation_name」使用的刀具:「 $mom_tool_name 」与前面刀具的刀号相同!\n\n"
}
return
}
}
set numbers [expr $numbers+1]
set toolnumbers($numbers) $mom_tool_number

0

主题

154

回帖

1692

积分

六级士官

积分
1692
发表于 2024-10-12 19:54:36 | 显示全部楼层
最强单刃反镗刀镗反沉孔后处理
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

咨询QQ:1359218528|发帖须知!|Archiver|手机版|小黑屋|UG爱好者论坛 ( 京ICP备10217105号-2 )

GMT+8, 2025-1-9 19:18

Powered by Discuz! X3.5

© 2001-2025 Discuz! Team.

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