iCAx开思工具箱

标题: 高手们,看看这段程序代码?不知错在哪儿? [打印本页]

作者: mengfankun    时间: 2006-5-15 16:17
标题: 高手们,看看这段程序代码?不知错在哪儿?
高手们:
  帮忙看看以下这段程序代码,错在哪儿啊?我左看右看也发现不了什么毛病,可运行时老是出错.
  我先生成一个矩形,然后以这个矩形为边界做一个有界平面.红色部分运行出错.  
   Dim line1, line2, line3, line4 As Tag
      
        theUfSession.Curve.CreateLine(line_coords1, line1)
        theUfSession.Curve.CreateLine(line_coords2, line2)
        theUfSession.Curve.CreateLine(line_coords3, line3)
        theUfSession.Curve.CreateLine(line_coords4, line4)

        Dim s_section As StringList = New StringList
         
        'string list structure
        s_section.num = 1
        s_section.string(0) = 4
        s_section.dir(0) = 1
        s_section.id(0) = line1
        s_section.id(1) = line2
        s_section.id(2) = line3
        s_section.id(3) = line4

        theUfSession.Modl.CreateStringList(1, 4, s_section)

        Dim tol() As Double
        tol(0) = 0.001
        tol(1) = 0.5 * (Math.PI / 180)
        tol(2) = 0.02
        Dim bplane As Tag

        'create a bounded plane
        theUfSession.Modl.CreateBplane(s_section, tol, bplane)
        theUfSession.Modl.FreeStringList(s_section)

作者: vodka    时间: 2006-5-16 01:11
你还是回到UFunc罢




欢迎光临 iCAx开思工具箱 (https://t.icax.org/) Powered by Discuz! X3.3