几何尺寸与公差论坛

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

【转帖】diameter shaf

[复制链接]
发表于 2009-4-13 10:21:26 | 显示全部楼层 |阅读模式
diameter shaft
there is problem when i draw a shaft.......
my method.
1) i draw circle and extruded
2)i draw another circle on the 1 circle and extruded
3)then i mirror the circle
4)i record this step as a macro
when i run my shaft is succeed to show.........
...........i..........
i i i
......i i i........
i 1 2 i 3 4 i
i..... i .........i
i i i
i..........i.........i
i
that is the figure of my shaft that i want to show.........
-my problem is my program only can insert the big size....
for example for shaft 1 and 2 i can put the diameter 8m above..........if i insert diameter with smaller size let say 0.008m the haft will not show........
can somebody help me.........
what does your code look like?
drc inc.
minneapolis, mn
.designreadycontrols.com
sw2007 sp5.0
core2 quad
3gb ram
xp pro sp2
ati firegl v3600
'circle
set swapp = application.sldworks
set part = swapp.activedoc
set selmgr = part.selectionmanager
swapp.activedoc.activeview.framestate = 1
part.clearselection2 true
dim skcircle as object
set skcircle = part.sketchmanager.createcircle(0, 0, 0, txt1.text, 5.605184485944e-04, 0)
part.clearselection2 true
boolstatus = part.extension.selectbyid2("arc1", "sketchsegment", 0, 0, 0, false, 0, nothing, 0)
part.featuremanager.featureextrusion2 true, false, false, 0, 0, txt2.text, txt2.text, false, false, false, false, 0.01745329251994, 0.01745329251994, false, false, false, false, 1, 1, 1, 0, 0, false
part.selectionmanager.enablecontourselection = 0
part.clearselection2 true
set swapp = application.sldworks
'mirror the circle
set swapp = application.sldworks
set part = swapp.activedoc
set selmgr = part.selectionmanager
swapp.activedoc.activeview.framestate = 1
boolstatus = part.extension.selectbyid2("front plane", "plane", 0, 0, 0, false, 0, nothing, 0)
boolstatus = part.extension.selectbyid2("", "face", 2.159662026272, 4.509529901473, 2.439799975864, true, 0, nothing, 0)
part.clearselection2 true
boolstatus = part.extension.selectbyid2("front plane", "plane", 0, 0, 0, false, 2, nothing, 0)
boolstatus = part.extension.selectbyid2("", "face", 2.159662026272, 4.509529901473, 2.439799975864, true, 1, nothing, 0)
part.featuremanager.insertmirrorfeature false, false, false, false
quick
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2024-12-24 02:58 , Processed in 0.035588 second(s), 19 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2023 Discuz! Team.

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