圆环创建接口说明
CreateTorus (Template, primaryRadius, profileRadius, sweepAngle)
primaryRadius Double 类型.圆环大圆周的半径
profileRadius Double 类型.圆环纵截面小圆的半径.
sweepAngle Double 类型. 圆环环绕角度.
Template 元素模板 保持样式一致.
参数说明
窗体设计
程序设计
Sub main()
'显示窗体
Form1.Show
End Sub
Private Sub CommandButton1_Click()
Dim primaryRadius, profileRadius, sweepAngle As Double
Dim result As SmartSolidElement
primaryRadius = Val(TextBox1.Value)
profileRadius = Val(TextBox2.Value)
sweepAngle = Val(TextBox3.Value)
Set result = SmartSolid.CreateTorus(Nothing, primaryRadius, profileRadius, sweepAngle)
ActiveModelReference.AddElement result
Form1.Hide
End Sub
运行效果
运行参数2
运行效果2