青青草原综合久久大伊人导航_色综合久久天天综合_日日噜噜夜夜狠狠久久丁香五月_热久久这里只有精品

eryar

PipeCAD - Plant Piping Design Software.
PlantAssistant - Translate AVEVA RVM/SP3D VUE to glTF, STEP, etc.
posts - 606, comments - 590, trackbacks - 0, articles - 0

OpenCASCADE 麻花鉆頭造型實例分析

Posted on 2017-09-18 23:35 eryar 閱讀(2160) 評論(0)  編輯 收藏 引用 所屬分類: 2.OpenCASCADE

OpenCASCADE 麻花鉆頭造型實例分析

eryar@163.com

Abstract. OpenCASCADE provides a simple twist drill bit modeling example in Tcl script. The blog will give a details of some key points, when you understand the key points, you can modeling the shape like that.

Key Words. OpenCASCADE, Twist Drill Bit Modeling, Tcl

1.Introduction

OpenCASCADE的Draw Test Harness中提供了一個麻花鉆頭造型的實例,如下圖所示:

wps_clip_image-8478

Figure 1. A Simple Twist Drill Bit by OpenCASCADE

鉆頭造型主要涉及到旋轉形狀的造型方法,放樣造型及布爾操作。本文結合鉆頭的Tcl腳本來詳細說明造型過程。對于有同樣造型需求的,可以在理解造型方法的基礎上實現自己需要的參數化形狀。

2.Modeling Tcl Script

通過Draw Test Harness的菜單Samples->View samples可以找到Drill例子,如下圖所示:

wps_clip_image-20966

Figure 2. Drill bit modeling sample

對應的Tcl腳本位于samples/tcl文件夾中,列出如下:

# Sample: creation of simple twist drill bit
#Category: Modeling
#Title: Drill

pload MODELING VISUALIZATION
# drill parameters (some terms taken from http://www.drill-bits.cn/drill-bits-quality.asp)

dset R  4.    ;# outer radius

dset D  2*R   ;# diameter

dset Rr 3.5   ;# chisel radius (outer radius minus body clearance)

dset b  1.    ;# web thickness (approximate)

dset d  b/2
dset H  80.   ;# height of the spiral part

dset a  3.*pi ;# total angle of spiral rotation

dset sigma 118 ;# point angle, in degrees
# Create section profile by sequence of Boolean operations
# on simple planar objects

puts "Creating the drill section profile..."
polyline rectangle1 d -R 0  R -R 0 -d R 0 -R R 0  d -R 0
circle circle1 0 0 0 0 0 1 R
mkedge circle1 circle1
wire circle1 circle1
circle circle2 0 0 0 0 0 1 Rr
mkedge circle2 circle2
wire circle2 circle2
plane p0
mkface rectangle1 p0 rectangle1
mkface circle1 p0 circle1
mkface circle2 p0 circle2
bcommon sec rectangle1 circle1
# note use of 'fuse' instead of 'bfuse' -- we need to get single face

fuse sec sec circle2
# Construct flute profile so as to have cutting lip straight after sharpening.
# Here we need to take into account spiral shift of the flute edge
# along the point length -- the way to do that is to make spiral
# from the desired cutting lip edge and then intersect it by plane

polyline lip d -d/2 0  d -R -R/tan(sigma/2*pi/180)
polyline sp 0 0 0 0 0 H
cylinder cc 0 0 0 0 0 1 0 -4 0 4
line ll 0 0 a 80
trim ll ll 0 sqrt(a*a+H*H)
vertex v1 0 -R 0
vertex v2 0 -R H
trotate v2 0 0 0 0 0 1 180.*a/pi
mkedge ee ll cc v1 v2
wire gg ee
mksweep sp
setsweep -G gg 0 0
addsweep lip
buildsweep spiral -S
mkface f0 p0 -R R -R R
bsection sflute spiral f0
# here we rely on that section curve is parameterized from 0 to 1 
# and directed as cutting lip edge;
# note that this can change if intersection algorithm is modified

explode sflute e
mkcurve cflute sflute_1
cvalue cflute 0. x0 y0 z0
cvalue cflute 1. x1 y1 z1
vertex vf0 x0 y0 z0 
vertex vf1 x1 y1 z1
# -- variant: replace curve by arc with start at x0,y0,z0 and end at x1,y1,z1,
# -- such that tanget at start point is along Y
#dset Rflute ((x1-x0)*(x1-x0)+(y1-y0)*(y1-y0))/(2*(x1-x0))
#circle aflute x0+Rflute y0 0  0 0 1  Rflute
#mkedge sflute_1 aflute vf0 vf1
# make rounding in the flute; use circle with radius Rr/2

circle cround x0+Rr/2 y0 0 0 0 1 Rr/2
vertex vf3 x0+Rr y0 0
mkedge sflute_2 cround vf3 vf0
vertex vf2 R -R 0
edge sflute_3 vf3 vf2
edge sflute_4 vf2 vf1
wire w2 sflute_1 sflute_2 sflute_3 sflute_4
mkface flute p0 w2
# cut flute from profile

bcut sec sec flute
trotate flute 0 0 0 0 0 1 180.
bcut sec sec flute
donly sec
# sweep profile to get a drill body

puts "Sweeping the profile..."
mksweep sp
setsweep -G gg 0 0
explode sec w
addsweep sec_1
buildsweep base -S
# sharpen the drill (see http://tool-land.ru/zatochka-sverla.php)

puts "Sharpening..."
dset theta a*R/H*sin((90-sigma/2)*pi/180)
plane ax1 d 1.9*D "H+1.9*D/tan(pi/180.*sigma/2.)" 0 -1 -1
pcone sh1 ax1 0 100*sin((sigma-90)/2*pi/180.) 100
trotate sh1 0 0 0 0 0 1 -theta*180/pi
tcopy sh1 sh2
trotate sh2 0 0 0 0 0 1 180
box sh -D/2 -D/2 72 D D 20
bcommon qq sh1 sh2
bcut sharpener sh qq
bcut body base sharpener
# make a shank

puts "Making a shank..."
plane pl2 0 0 -40 0 0 1
pcylinder shank pl2 4 40
pcone transit R 0 R
plane pl3 0 0 -40 0 0 -0.5
pcone tail pl3 R 0 0.5
bfuse shank shank tail
bfuse shank shank transit
bfuse drill body shank
# check result

checkshape drill
# show result

puts "Displaying result..."
incmesh drill 0.01
vdisplay drill
vsetdispmode drill 1
vrenderparams -msaa 8
vfit
# show section and sweep path

ttranslate sec_1 0 0 H; trotate sec_1 0 0 0 0 0 1 a*180/pi; incmesh gg 0.01; vdisplay gg sec_1

 

下面結合Tcl腳本來對鉆頭的造型過程進行詳細說明。

3.Twist Drill Bit Parameters

腳本首先加載相應的模塊:造型模塊和顯示模塊,分別為MODEING和VISUALIZATION。然后設置鉆頭相關參數變量:

wps_clip_image-20435

Figure 3. Drill Bit 

變量名及其說明:

變量名variable 說明 detail
R 外半徑 outer radius
D 直徑D
Rr Chisel Radius
b Web thickness(approximate)
d  
H 螺旋部分的高度Height of the spiral height
a 螺旋角度Total angle of spiral rotation
sigma 鉆尖角度Point angle in degrees.

 

 

 

 

 

 

 

先定義這些變量的思想也是參數化的思想,將這些變量值改變就會得到不同的鉆頭模型。參數化的思想在CAD軟件中比較常見,如AutoCAD中的動態塊,PDMS中的設備模板Template等,都屬于參數化的方法。通過修改參數讓一個或多個幾何體形狀發生變化。

4.Create Drill Section Profile

創建鉆頭截面的Tcl腳本如下所示:

# Create section profile by sequence of Boolean operations
# on simple planar objects

puts "Creating the drill section profile..."
polyline rectangle1 d -R 0  R -R 0 -d R 0 -R R 0  d -R 0
circle circle1 0 0 0 0 0 1 R
mkedge circle1 circle1
wire circle1 circle1
circle circle2 0 0 0 0 0 1 Rr
mkedge circle2 circle2
wire circle2 circle2
plane p0
mkface rectangle1 p0 rectangle1
mkface circle1 p0 circle1
mkface circle2 p0 circle2
bcommon sec rectangle1 circle1
# note use of 'fuse' instead of 'bfuse' -- we need to get single face

fuse sec sec circle2

 

生成的圖形如下圖所示:

wps_clip_image-30324

Figure 4 Profile construction curves

其中變量Rectangle1是圖中綠色表示的四邊形,Circle1是黃色表示的外圓,Circle2是紅色表示的內圓。通過布爾操作求取Rectangle1和Circle1的公共部分得到如下圖所示的截面:

wps_clip_image-28102

Figure 5 Common of Rectangle1 and Circle1

將公共部分與內圓Circle2合并得到如圖所示截面:

wps_clip_image-8412

Figure 6. Fuse of Common part and Circle2

下面在這個截面的基礎上生成鉆頭的螺旋凹槽,這里是相對關鍵的地方,生成凹槽的時候還要考慮螺旋。

# Construct flute profile so as to have cutting lip straight after sharpening.
# Here we need to take into account spiral shift of the flute edge
# along the point length -- the way to do that is to make spiral
# from the desired cutting lip edge and then intersect it by plane

polyline lip d -d/2 0  d -R -R/tan(sigma/2*pi/180)
polyline sp 0 0 0 0 0 H
cylinder cc 0 0 0 0 0 1 0 -4 0 4
line ll 0 0 a 80
trim ll ll 0 sqrt(a*a+H*H)
vertex v1 0 -R 0
vertex v2 0 -R H
trotate v2 0 0 0 0 0 1 180.*a/pi
mkedge ee ll cc v1 v2
wire gg ee
mksweep sp
setsweep -G gg 0 0
addsweep lip
buildsweep spiral -S
mkface f0 p0 -R R -R R
bsection sflute spiral f0

 

代碼生成的圖形如下圖所示:

wps_clip_image-27754

Figure 7. Flute of the drill bit

通過將線lip沿著路徑直線sp和螺旋線gg放樣得到螺旋截面spiral,再將螺旋截面spiral和底平面f0求交得到sflute。

# here we rely on that section curve is parameterized from 0 to 1 
# and directed as cutting lip edge;
# note that this can change if intersection algorithm is modified

explode sflute e
mkcurve cflute sflute_1
cvalue cflute 0. x0 y0 z0
cvalue cflute 1. x1 y1 z1
vertex vf0 x0 y0 z0 
vertex vf1 x1 y1 z1
# -- variant: replace curve by arc with start at x0,y0,z0 and end at x1,y1,z1,
# -- such that tanget at start point is along Y
#dset Rflute ((x1-x0)*(x1-x0)+(y1-y0)*(y1-y0))/(2*(x1-x0))
#circle aflute x0+Rflute y0 0  0 0 1  Rflute
#mkedge sflute_1 aflute vf0 vf1
# make rounding in the flute; use circle with radius Rr/2

circle cround x0+Rr/2 y0 0 0 0 1 Rr/2
vertex vf3 x0+Rr y0 0
mkedge sflute_2 cround vf3 vf0
vertex vf2 R -R 0
edge sflute_3 vf3 vf2
edge sflute_4 vf2 vf1
wire w2 sflute_1 sflute_2 sflute_3 sflute_4
mkface flute p0 w2

 

通過求得的交線再構造圓弧和線段來構造出鉆頭凹槽的截面,如下圖所示:

wps_clip_image-2949

Figure 8. Make flute section

將凹槽截面flute從前面構造的截面中去除:

# cut flute from profile

bcut sec sec flute

 

wps_clip_image-22613

Figure 9. Make drill bit profile

將凹槽截面繞Z軸旋轉180度,再去布爾減原來的截面:

trotate flute 0 0 0 0 0 1 180.
bcut sec sec flute

 

wps_clip_image-9522

Figure 10. Make drill bit profile

這樣鉆頭的截面就生成了。

5.Sweeping the Profile

將上面鉆頭截面沿著直線sp和螺旋線gg放樣:

# sweep profile to get a drill body

puts "Sweeping the profile..."
mksweep sp
setsweep -G gg 0 0
explode sec w
addsweep sec_1
buildsweep base -S

 

生成圖形如下圖所示:

wps_clip_image-20384

Figure 11. Sweep the profile

通過放樣得到了鉆頭的螺桿base。

6.Sharpening

得到鉆頭的螺桿后需要生成鉆頭的鉆尖,根據鉆尖角point angle變量sigma來造型。

# sharpen the drill (see http://tool-land.ru/zatochka-sverla.php)

puts "Sharpening..."
dset theta a*R/H*sin((90-sigma/2)*pi/180)
plane ax1 d 1.9*D "H+1.9*D/tan(pi/180.*sigma/2.)" 0 -1 -1
pcone sh1 ax1 0 100*sin((sigma-90)/2*pi/180.) 100
trotate sh1 0 0 0 0 0 1 -theta*180/pi
tcopy sh1 sh2
trotate sh2 0 0 0 0 0 1 180
box sh -D/2 -D/2 72 D D 20
bcommon qq sh1 sh2
bcut sharpener sh qq
bcut body base sharpener

 

先構造兩個圓錐體(sh1和sh2)和一個長方體sh,再通過布爾運算得到兩個圓錐體sh1,sh2的公共部分qq。如下圖所示:

wps_clip_image-23669

wps_clip_image-5130

Figure 12. Modeling point angle

再從長方體sh中減去兩個圓錐的公共部分得到如下圖所示:

wps_clip_image-3000

wps_clip_image-24408

Figure 13. Modeling point angle

wps_clip_image-12972

將螺桿減去上面得到的sharpener就完成鉆尖的造型,如下圖所示:

wps_clip_image-4999

Figure 14. Modeling point angle

7.Make Shank

完成螺桿和鉆尖造型后,就來實現麻花鉆頭的最后部分,鉆頭柄shank。

# make a shank

puts "Making a shank..."
plane pl2 0 0 -40 0 0 1
pcylinder shank pl2 4 40
pcone transit R 0 R
plane pl3 0 0 -40 0 0 -0.5
pcone tail pl3 R 0 0.5
bfuse shank shank tail
bfuse shank shank transit
bfuse drill body shank

 

鉆頭柄部由兩個圓錐(transit和tail)和一個圓柱shank組成。最后將這三個形狀合并得到完成的鉆頭的柄部shank。

wps_clip_image-20511

Figure 15. Modeling Shank

8.Conclusion

通過對OpenCASCADE中麻花鉆頭的造型實例分析,可見這個鉆頭造型用到的算法主要是放樣及布爾操作。在生成螺旋線時主要是使用pcurve的方式。最后還要理解參數化的造型思想,通過定義變量來生成參數化的模型。

青青草原综合久久大伊人导航_色综合久久天天综合_日日噜噜夜夜狠狠久久丁香五月_热久久这里只有精品
  • <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>
            欧美一区二区三区男人的天堂 | 一本久久精品一区二区| 久久精彩免费视频| 久久成人免费电影| 欧美在线视频全部完| 欧美伊人久久久久久午夜久久久久| 99在线|亚洲一区二区| 一本一本a久久| 亚洲午夜激情网站| 欧美一区国产一区| 免费高清在线一区| 亚洲破处大片| av成人免费在线观看| 亚洲欧美日韩中文在线制服| 欧美一级艳片视频免费观看| 欧美一区二区久久久| 久久影视精品| 国产精品www| 黑人巨大精品欧美一区二区小视频| 怡红院av一区二区三区| 日韩视频在线播放| 午夜亚洲性色视频| 毛片av中文字幕一区二区| 亚洲欧洲精品一区二区精品久久久| 一区二区三区精品| 久久精品国产999大香线蕉| 噜噜噜在线观看免费视频日韩| 欧美日韩国产综合视频在线观看中文| 国产精品久久久久一区二区三区| 韩国在线视频一区| 国产精品99久久久久久白浆小说| 久久不射2019中文字幕| 亚洲电影免费观看高清完整版在线| 一本色道久久综合亚洲精品不| 午夜日韩在线观看| 欧美成人乱码一区二区三区| 国产精品视频免费观看www| 亚洲精品美女| 久久久美女艺术照精彩视频福利播放 | 亚洲人成网站精品片在线观看| 亚洲一区在线免费观看| 欧美一级一区| 91久久精品www人人做人人爽| 一二三四社区欧美黄| 蜜桃视频一区| 雨宫琴音一区二区在线| 欧美一区二区三区啪啪| 日韩视频免费在线| 欧美大片91| 亚洲激情网址| 蜜臀久久久99精品久久久久久| 午夜日韩在线| 国产女精品视频网站免费| 亚洲一区二区精品在线| 亚洲人成人99网站| 欧美成人视屏| 亚洲精品美女在线| 亚洲第一成人在线| 免费美女久久99| 永久免费精品影视网站| 久久性天堂网| 久久久久九九九| 一区在线观看视频| 免费成人小视频| 麻豆成人在线观看| 亚洲人成网站在线播| 亚洲国产99| 欧美啪啪一区| 亚洲午夜一区二区| 亚洲一区二区精品视频| 国产精品美女视频网站| 欧美在线欧美在线| 久久久久久久高潮| 亚洲激情欧美| 日韩视频一区二区在线观看| 国产精品电影网站| 欧美一区二区三区喷汁尤物| 欧美在线三区| 亚洲国产一区二区精品专区| 91久久精品视频| 国产精品爱啪在线线免费观看| 亚洲一区免费网站| 欧美在线观看一二区| 在线观看91久久久久久| 欧美电影免费观看高清| 欧美精品一区在线观看| 欧美在线啊v一区| 久久精品国产精品亚洲| 亚洲美女av黄| 午夜欧美大片免费观看| 91久久国产自产拍夜夜嗨| 日韩午夜三级在线| 国产一区视频观看| 亚洲国产va精品久久久不卡综合| 欧美日本二区| 久久精品视频在线| 欧美日韩91| 久久久亚洲人| 欧美日韩天堂| 久久久久免费视频| 欧美日韩国产综合视频在线观看中文 | 欲色影视综合吧| 日韩视频一区二区三区| 国产亚洲在线| 亚洲国产高清自拍| 国产欧美日韩一级| 亚洲精品欧美在线| 狠狠爱综合网| 亚洲一区二区三区精品在线观看 | 一区二区高清在线观看| 欧美在线一级va免费观看| 一本到高清视频免费精品| 久久av最新网址| 亚洲伊人观看| 欧美黄色大片网站| 久久免费黄色| 国产欧美精品在线| 一本色道久久88综合日韩精品| 亚洲黄色尤物视频| 欧美一区二区私人影院日本| 亚洲免费小视频| 欧美激情一区二区久久久| 久久一区二区精品| 国产亚洲人成网站在线观看| 亚洲一区二区视频| 亚洲视频自拍偷拍| 欧美精品自拍偷拍动漫精品| 欧美插天视频在线播放| 国产原创一区二区| 亚洲天堂av在线免费观看| 日韩亚洲欧美中文三级| 欧美超级免费视 在线| 欧美mv日韩mv国产网站app| 黄色成人av在线| 久久狠狠婷婷| 久久精品视频一| 国产专区综合网| 欧美中文字幕在线播放| 久久精品1区| 国产在线拍偷自揄拍精品| 亚洲香蕉成视频在线观看 | 精品51国产黑色丝袜高跟鞋| 性欧美18~19sex高清播放| 欧美一区二区精美| 国产热re99久久6国产精品| 亚洲尤物视频在线| 久久久久国产精品www| 国产在线精品二区| 久久久久久亚洲精品不卡4k岛国| 久热精品在线视频| 亚洲国产精品激情在线观看| 欧美a级片一区| 日韩网站在线观看| 欧美一区二区三区免费观看视频| 国产精品日韩专区| 久久国产精品高清| 欧美成人一二三| 亚洲精品免费网站| 亚洲精华国产欧美| 亚洲激情在线观看| 国产精品美女www爽爽爽| 亚洲男人的天堂在线观看| 久久不见久久见免费视频1| 在线观看国产精品网站| 欧美国产在线视频| 亚洲一区三区视频在线观看 | 国产一区二区中文| 亚洲福利视频网| 亚洲狼人精品一区二区三区| 欧美丝袜第一区| 亚洲一区二区三区涩| 久久av一区二区三区亚洲| 国产美女精品免费电影| 久久久国产亚洲精品| 欧美日韩综合| 性欧美办公室18xxxxhd| 欧美成人精品不卡视频在线观看| 欧美精品九九| 伊人精品成人久久综合软件| 亚洲日本中文字幕免费在线不卡| 欧美人成在线| aaa亚洲精品一二三区| 亚洲高清精品中出| 激情综合网激情| 在线一区二区三区四区五区| 国产女人精品视频| 亚洲国产黄色片| 免费日本视频一区| 亚洲午夜视频在线| 久久字幕精品一区| 亚洲在线视频观看| 欧美成人精品不卡视频在线观看| 香蕉久久国产| 欧美成人精品在线播放| 久久婷婷人人澡人人喊人人爽| 国产精品久久久久久久久免费| 亚洲人成人一区二区三区| 国产精品久久久久av免费| 欧美激情第3页| 国产精品日日摸夜夜摸av|