zanestoy
Structural
- Apr 25, 2012
- 10
I've been working with FEMAP for about 6 years now, and am trying to learn the API to be more efficient. I am trying to create a cylinder from a line using feSurfaceRevolve. I can get the lines drawn using the API, but I can't figure out how to get the revolve to work. I've tried using the curveID with the negative sign in front of it, but that just kicks back an error message that the curve could not be created. Any help would be greatly appreciated. My code is below.
Sub Main
Dim App As femap.model
Set App = feFemap()
Dim Height1, Diameter1 As Double
Height1=150: Diameter1=150:
Dim a2(3), b1(3),c1(3),c2(3) As Double
Dim line1, revolve1 As Integer
c1(0)=Diameter1*0.5: c1(1)=0: c1(2)=0
c2(0)=c1(0): c2(1)=Height1: c2(2)=0
a2(0)=0: a2(1)=Height1: a2(2)=0
b1(0)=0: b1(1)=0: b1(2)=0
line1 = App.feLinePoints(False,c1,c2,True)
revolve1 = App.feSurfaceRevolve(line1,360,b1,a2)
End Sub
Sub Main
Dim App As femap.model
Set App = feFemap()
Dim Height1, Diameter1 As Double
Height1=150: Diameter1=150:
Dim a2(3), b1(3),c1(3),c2(3) As Double
Dim line1, revolve1 As Integer
c1(0)=Diameter1*0.5: c1(1)=0: c1(2)=0
c2(0)=c1(0): c2(1)=Height1: c2(2)=0
a2(0)=0: a2(1)=Height1: a2(2)=0
b1(0)=0: b1(1)=0: b1(2)=0
line1 = App.feLinePoints(False,c1,c2,True)
revolve1 = App.feSurfaceRevolve(line1,360,b1,a2)
End Sub