美文网首页狮猿社CATIA
CAA:创建Octree三角形网格

CAA:创建Octree三角形网格

作者: 锦囊喵 | 来源:发表于2020-10-07 22:35 被阅读0次

该用例向您展示如何在现有分析文档上创建Octree三角形网格零件。此方案需要“ FEM Surface(FMS)产品”。

宏打开一个Analysis文档。将创建网格零件表面网格,并设置与此网格零件关联的整体规格。创建本地规范:MSHLocalMeshSize,将孔的边缘指定为支撑。最后,更新网格零件以生成网格。


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

相关文章

  • CAA:创建Octree三角形网格

    该用例向您展示如何在现有分析文档上创建Octree三角形网格零件。此方案需要“ FEM Surface(FMS)产...

  • 网格

    遵守网格的协议 创建网格

  • 平面与三维网格求交

    平面与网格相交 计算截面与三角形网格的相交可以分解为三角形面与平面的相交。而三角形面与平面的相交又可以分解为线段与...

  • 2020暑假学习笔记

    文献1.大脑网络探索-不同尺度 2. 漫漫的探索之旅 人类大脑中存在利用正三角形网格来帮助定位的网格细胞,这些网格...

  • CSS Grid Auto

    关键词:隐式轨道 / 隐式网格 / 自动布局算法 隐式网格 隐式网格是指当网格项目确认在显式网格之外时所创建的网格...

  • CAA实用代码片段

    CAA实用代码片段: CAA获取属性

  • OpenGL学习30——法线贴图

    法线贴图(Normal Mapping) 在网格上使用纹理给我们带来真实感,但是网格实际上由扁平的三角形组成,如果...

  • Flutter练习GridView

    创建网格布局 就这样

  • UICollectionView的使用代理方法

    pragma mark - 创建UI -(void)createUI{// 创建网格布局对象 UIColl...

  • layer动画总结

    layer的属性 条形 波浪 波纹 翻转 画圆圈 动的三角形 网格动画 转圈动画

网友评论

    本文标题:CAA:创建Octree三角形网格

    本文链接:https://www.haomeiwen.com/subject/ckwqpktx.html