NurbsSurfaceMesh.Set operator

説明

メッシュの完全なデータ記述を基に NurbsSurfaceMeshを設定します。このメソッドは、スクリプトオペレータからのみ使用できます。注:このメソッドをクラスタのあるオブジェクトに使用してトポロジを変更した場合は、クラスタの更新はユーザが実行する必要があります。スクリプトオペレータでないオペレータの場合は、このプロパティは、オブジェクトがフリーズされている場合にのみ設定できます。

スクリプト 構文

NurbsSurfaceMesh.Set( Count, UVControlPoints, [NbUControlPoints], [NbVControlPoints], [UKnots], [NbUKnots], [VKnots], [NbVKnots], [UClosed], [VClosed], [UDegree], [VDegree], [UParam], [VParam], [NurbsFormat] );

パラメータ

パラメータ タイプ 詳細
Count Long メッシュにあるNurbsSurface の数
UVControlPoints 1DArray コントロールポイントは 2D 配列に格納されます。この配列には、U制御ポイントの数 > 制御ポイントの数 > x,y,z,w値のシークエンスをこの順番で含める必要があります(例:{NbU, NbV, Xo,Yo,Zo,Wo...X(n-1),Y(n-1),Z(n-1),W(n-1)})。
NbUControlPoints LongのArray NurbsCurveごとの U ControlPoint の数を指定します。
NbVControlPoints LongのArray NurbsCurveごとの V ControlPoint の数を指定します。
UKnots DoubleのArray U方向のノット値の配列
NbUKnots LongのArray NurbsCurveごとの Uノットの数を指定します。
VKnots DoubleのArray V方向のノット値の配列
NbVKnots LongのArray NurbsCurveごとの Vノットの数を指定します。
UClosed Boolean値のArray NURBS サーフェイスが U方向で閉じられているかどうかを指定します。
VClosed Boolean値のArray NURBS サーフェイスがV方向で閉じられているかどうかを指定します。
UDegree LongのArray NURBS サーフェイスの U方向の次数
VDegree LongのArray NURBS サーフェイスの V方向の次数
UParam siKnotParameterization値のArray NURBS サーフェイスの U方向のパラメータ配置方法
VParam siKnotParameterization値のArray NURBS サーフェイスの V方向のパラメータ配置方法
NurbsFormat siNurbsFormat NURBs のデータ形式を指定します。

デフォルト値:siSINurbs

例

VBScript の例

Dim lDegree(2), bClosed(2), eParameterization(2), aControlPoints, aKnots(2), aNbKnots(2), aNbControlVertex(2), lCount
set oRoot = Application.activeproject.activescene.root
set oGrid1 = oRoot.AddGeometry("Grid", "NurbsSurface")
oGrid1.Kinematics.Global.Parameters("posx").value = oG
set oGrid2 = oRoot.AddGeometry("Grid", "NurbsSurface")
oGrid2.Kinematics.Global.Parameters("posx").value = oGrid1.Kinematics.Global.Parameters("posx").value - 4.0
SelectObj oGrid2
AddToSelection oGrid1
SIAssembleNurbsMesh , 0.150, False, False, True
SelectObj "surfmsh"
set oAssembledSurface = selection(0)
'We must freeze the object so that Set call succeeds
FreezeObj oAssembledSurface
oAssembledSurface.ActivePrimitive.Geometry.Get _                
        siSINurbs, _
        lCount, _
        aControlVertex, aNbControlVertex(siUDirection), aNbControlVertex(siVDirection), _
        aKnots(siUDirection), aNbKnots(siUDirection), aKnots(siVDirection) , aNbKnots(siVDirection), _
        bClosed(siUDirection),bClosed(siVDirection), _
        lDegree(siUDirection),lDegree(siVDirection), _
        eParameterization(siUDirection),eParameterization(siVDirection)
'Making a tunnel
l_total = 0
for k = 0 to lCount - 1
        for i = 0 to aNbControlVertex(siVDirection)(k) - 1
                for j = 0 to aNbControlVertex(siUDirection)(k) - 1
                        aControlVertex(1,i, j + l_total) = aControlVertex(1,i,j + l_total) + (aNbControlVertex(siVDirection)(k)/2 - abs( aNbControlVertex(siVDirection)(k)/2 - i))
                next
        next
        l_total = l_total + aNbControlVertex(siUDirection)(k)
next
oAssembledSurface.ActivePrimitive.Geometry.Set _                
        lCount, _
        aControlVertex, aNbControlVertex(siUDirection), aNbControlVertex(siVDirection), _
        aKnots(siUDirection), aNbKnots(siUDirection), aKnots(siVDirection) , aNbKnots(siVDirection), _
        bClosed(siUDirection),bClosed(siVDirection), _
        lDegree(siUDirection),lDegree(siVDirection), _
        eParameterization(siUDirection),eParameterization(siVDirection), _
        siSINurbs