CAA:創(chuàng)建Octree三角形網(wǎng)格

該用例向您展示如何在現(xiàn)有分析文檔上創(chuàng)建Octree三角形網(wǎng)格零件。此方案需要“ FEM Surface(FMS)產(chǎn)品”。

宏打開一個Analysis文檔撬腾。將創(chuàng)建網(wǎng)格零件表面網(wǎng)格,并設(shè)置與此網(wǎng)格零件關(guān)聯(lián)的整體規(guī)格。創(chuàng)建本地規(guī)范:MSHLocalMeshSize顺囊,將孔的邊緣指定為支撐。最后蕉拢,更新網(wǎng)格零件以生成網(wǎng)格特碳。


BasicSurfMesh.gif
' COPYRIGHT DASSAULT SYSTEMES 2000

' ***********************************************************************
'   Purpose:      Open an analysis document
'                 Create a basic surface mesh  
'                 assign the surface as support
'                 specify the global specifications and assing values
'   Assumtions:   Looks for Surface.CATAnalysis in the directory
'   Author:       bmw
'   Languages:    VBScript
'   Locales:      English 
'   CATIA Level:  V5R16
' ***********************************************************************

Sub CATMain()
' ----------------------------------------------------------- 
' Optional: allows to find the sample wherever it's installed

  sDocPath=CATIA.SystemService.Environ("CATDocView")

    If (Not CATIA.FileSystem.FolderExists(sDocPath)) Then
      Err.Raise 9999,,"No Doc Path Defined"
    End If
' ----------------------------------------------------------- 

' Open the Analysis document 
sFilePath = CATIA.FileSystem.ConcatenatePaths(sDocPath, "online\CAAScdAniUseCases\samples\Surface.CATAnalysis")
Set oAnalysisDocument = CATIA.Documents.Open(sFilePath)

' Retrieve the Analysis Manager and Analysis Model
Set oAnalysisManagar = oAnalysisDocument.Analysis

' Retreive the product from Analysis manager
Set oAnalysisLinkedDocument = oAnalysisManagar.LinkedDocuments
Set partDocument = oAnalysisLinkedDocument.Item(1)
Set product = partDocument.Product

' Retrieve the analysis model from the list of models
Set oAnalysisModels = oAnalysisManagar.AnalysisModels
Set oAnalysisModel = oAnalysisModels.Item(1)

' Retrieve mesh manager and mesh part 
Set meshManagar = oAnalysisModel.MeshManager
Set meshPart = meshManagar.AnalysisMeshParts

' Retrieve publications from product and retrieve the published face.
Set publications = product.Publications
Set pubSurf = publications.Item("Round Hole.1")
Set pubCurve = publications.Item("Spine")
Set pubPoint = publications.Item("Point")


' Add the new basic surface mesh part to the list of mesh parts
Set surfPart = meshPart.Add ("MSHPartBasicSurf") 

' Add the support from the published surface
surfPart.AddSupportFromPublication product, pubSurf


' Set the global Specifications
surfPart.SetGlobalSpecification "GlobalMethod", 1
surfPart.SetGlobalSpecification "QuadsOnly", 2
surfPart.SetGlobalSpecification "ElementOrder", "Parabolic"
surfPart.SetGlobalSpecification "DedicatedMesh", 1
surfPart.SetGlobalSpecification "GlobalSize", "10.0 mm"
surfPart.SetGlobalSpecification "Offset", "15.0 mm"
surfPart.SetGlobalSpecification "TopologySize", "20.0 mm"
surfPart.SetGlobalSpecification "TopologySag", 2
surfPart.SetGlobalSpecification "SharpEdges", 1
surfPart.SetGlobalSpecification "FaceAngle", "0 deg"
surfPart.SetGlobalSpecification "OffsetFromThickness", 1
surfPart.SetGlobalSpecification "MeshRelSag", 1
surfPart.SetGlobalSpecification "MeshRelSagValue", "0.1 mm"
surfPart.SetGlobalSpecification "CurveCapture", 1
surfPart.SetGlobalSpecification "CurveCaptureTol", "1.1 mm"
surfPart.SetGlobalSpecification "MeshCapture", 1
surfPart.SetGlobalSpecification "MeshCaptureTol", "1.1 mm"
surfPart.SetGlobalSpecification "MeshAbsSag", 1
surfPart.SetGlobalSpecification "MeshAbsSaglValue", "1.1 mm"

'Add the local specifications
Set meshSpecs = surfPart.AnalysisMeshLocalSpecifications
Set spec = meshSpecs.Add("MSHTopProjectCurve")
spec.AddSupportFromPublication "ConnectorList", product, pubCurve
spec.SetAttribute "Tolerance", "500 mm"


Set spec = meshSpecs.Add("MSHTopProjectPoint")
spec.AddSupportFromPublication "ConnectorList", product, pubPoint
spec.SetAttribute "Tolerance", "500 mm"
spec.SetAttribute "Project", 0


'Upadte the mesh part
surfPart.Update

End Sub
最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
  • 序言:七十年代末,一起剝皮案震驚了整個濱河市晕换,隨后出現(xiàn)的幾起案子午乓,更是在濱河造成了極大的恐慌,老刑警劉巖闸准,帶你破解...
    沈念sama閱讀 212,599評論 6 492
  • 序言:濱河連續(xù)發(fā)生了三起死亡事件益愈,死亡現(xiàn)場離奇詭異,居然都是意外死亡夷家,警方通過查閱死者的電腦和手機腕唧,發(fā)現(xiàn)死者居然都...
    沈念sama閱讀 90,629評論 3 385
  • 文/潘曉璐 我一進店門,熙熙樓的掌柜王于貴愁眉苦臉地迎上來瘾英,“玉大人枣接,你說我怎么就攤上這事∪鼻矗” “怎么了但惶?”我有些...
    開封第一講書人閱讀 158,084評論 0 348
  • 文/不壞的土叔 我叫張陵,是天一觀的道長湿蛔。 經(jīng)常有香客問我膀曾,道長,這世上最難降的妖魔是什么阳啥? 我笑而不...
    開封第一講書人閱讀 56,708評論 1 284
  • 正文 為了忘掉前任添谊,我火速辦了婚禮,結(jié)果婚禮上察迟,老公的妹妹穿的比我還像新娘斩狱。我一直安慰自己耳高,他們只是感情好,可當我...
    茶點故事閱讀 65,813評論 6 386
  • 文/花漫 我一把揭開白布所踊。 她就那樣靜靜地躺著泌枪,像睡著了一般。 火紅的嫁衣襯著肌膚如雪秕岛。 梳的紋絲不亂的頭發(fā)上碌燕,一...
    開封第一講書人閱讀 50,021評論 1 291
  • 那天,我揣著相機與錄音继薛,去河邊找鬼修壕。 笑死,一個胖子當著我的面吹牛遏考,可吹牛的內(nèi)容都是我干的叠殷。 我是一名探鬼主播,決...
    沈念sama閱讀 39,120評論 3 410
  • 文/蒼蘭香墨 我猛地睜開眼诈皿,長吁一口氣:“原來是場噩夢啊……” “哼林束!你這毒婦竟也來了?” 一聲冷哼從身側(cè)響起稽亏,我...
    開封第一講書人閱讀 37,866評論 0 268
  • 序言:老撾萬榮一對情侶失蹤壶冒,失蹤者是張志新(化名)和其女友劉穎,沒想到半個月后截歉,有當?shù)厝嗽跇淞掷锇l(fā)現(xiàn)了一具尸體胖腾,經(jīng)...
    沈念sama閱讀 44,308評論 1 303
  • 正文 獨居荒郊野嶺守林人離奇死亡,尸身上長有42處帶血的膿包…… 初始之章·張勛 以下內(nèi)容為張勛視角 年9月15日...
    茶點故事閱讀 36,633評論 2 327
  • 正文 我和宋清朗相戀三年瘪松,在試婚紗的時候發(fā)現(xiàn)自己被綠了咸作。 大學時的朋友給我發(fā)了我未婚夫和他白月光在一起吃飯的照片。...
    茶點故事閱讀 38,768評論 1 341
  • 序言:一個原本活蹦亂跳的男人離奇死亡宵睦,死狀恐怖记罚,靈堂內(nèi)的尸體忽然破棺而出,到底是詐尸還是另有隱情壳嚎,我是刑警寧澤桐智,帶...
    沈念sama閱讀 34,461評論 4 333
  • 正文 年R本政府宣布,位于F島的核電站烟馅,受9級特大地震影響说庭,放射性物質(zhì)發(fā)生泄漏。R本人自食惡果不足惜郑趁,卻給世界環(huán)境...
    茶點故事閱讀 40,094評論 3 317
  • 文/蒙蒙 一刊驴、第九天 我趴在偏房一處隱蔽的房頂上張望。 院中可真熱鬧,春花似錦捆憎、人聲如沸舅柜。這莊子的主人今日做“春日...
    開封第一講書人閱讀 30,850評論 0 21
  • 文/蒼蘭香墨 我抬頭看了看天上的太陽。三九已至栗柒,卻和暖如春礁扮,著一層夾襖步出監(jiān)牢的瞬間,已是汗流浹背瞬沦。 一陣腳步聲響...
    開封第一講書人閱讀 32,082評論 1 267
  • 我被黑心中介騙來泰國打工太伊, 沒想到剛下飛機就差點兒被人妖公主榨干…… 1. 我叫王不留,地道東北人逛钻。 一個月前我還...
    沈念sama閱讀 46,571評論 2 362
  • 正文 我出身青樓僚焦,卻偏偏與公主長得像,于是被迫代替她去往敵國和親曙痘。 傳聞我的和親對象是個殘疾皇子芳悲,可洞房花燭夜當晚...
    茶點故事閱讀 43,666評論 2 350