ConvertToNURBS Objects - NURBS 
VectorWorks10.0

VectorScript Declaration:

FUNCTION   ConvertToNURBS
(   h :HANDLE;
    keepOrig :BOOLEAN
) :HANDLE ;

Python:

def  vs.ConvertToNURBS(h, keepOrig):
   return HANDLE

Description:

This function converts the input object into a new NURBS object or a group of NURBS objects in the document.

説明

ハンドルで指定した図形をNURBS図形やNURBS図形のグループに変換します。

Parameters:

h Handle of original object. 図形のハンドル
keepOrig Leave the original object in the drawing. 元図形を残す場合はTRUE

Example:

PROCEDURE Example;
VAR
	h :handle;
BEGIN
	CallTool(-204);
	h := FSActLayer;
	h := ConvertToNURBS(h, false);
	h := CreateOffsetNurbsObjectHandle(h, 1);
END;
RUN(Example);



  CreateInterpolatedSurface Objects - NURBS 
VectorWorks10.0

VectorScript Declaration:

FUNCTION   CreateInterpolatedSurface
(   surfaceHandle :HANDLE;
    numUPts :LONGINT;
    numVPts :LONGINT;
    uDegree :INTEGER;
    vDegree :INTEGER
) :HANDLE ;

Python:

def  vs.CreateInterpolatedSurface(surfaceHandle, numUPts, numVPts, uDegree, vDegree):
   return HANDLE

Description:

Creates an interpolated surface with the specified degrees and number of points. The resulting surface passes through each of the interpoliation points. If a handle to a NURBS surface is provided, the interpolated surface will approximate that surface. If the handle is NULL, it creates a rectangular surface.

説明

度数と頂点数を指定して補間点によるNURBS曲面を作成します。

Parameters:

surfaceHandle Handle to a NURBS surface to approximate NURBS曲面のハンドル
numUPts Number of interpolation points in the U parametric direction. Must be greater than uDegree. U制御点の数
numVPts Number of interpolation points in the V parametric direction. Must be greater than vDegree. V制御点の数
uDegree Degree of the surface in the u parametric direction U角度
vDegree Degree of the surface in the v parametric direction V角度

Result:

Handle to the new interpolated surface object.

返り値

NURBS曲面のハンドルを返します。



  CreateLoftSurfaces Objects - NURBS 
VectorWorks10.0

VectorScript Declaration:

FUNCTION   CreateLoftSurfaces
(   groupCurvesHd :HANDLE;
    bRule :BOOLEAN;
    bClose :BOOLEAN;
    bSolid :BOOLEAN
) :HANDLE ;

Python:

def  vs.CreateLoftSurfaces(groupCurvesHd, bRule, bClose, bSolid):
   return HANDLE

Description:

Creates NURBS surfaces by interpolating a group of cross-section curves. The nurbs curves are lofted in the order in which they were added to the group.

説明

曲線の交点のグループに補間法を用いることでNURBS曲面を作成します。

Example:

PROCEDURE Example;
VAR
	h, groupHand :HANDLE;
	bRule, bClose, bSolid :BOOLEAN;
BEGIN
	BeginGroup;

	h := CreateNurbsCurve(-PLENGTH/2, 0, 0, true, 1);
	AddVertex3D(h, -PLENGTH/2,PHEIGHT,0);
	AddVertex3D(h, PLENGTH/2,PHEIGHT,0);
	AddVertex3D(h, PLENGTH/2,0,0);

	h := CreateNurbsCurve(-PLENGTH/2-POFFSET,0,pWidth, true, 1);
	AddVertex3D(h, -PLENGTH/2-POFFSET, PHEIGHT+POFFSET, pWidth);
	AddVertex3D(h, PLENGTH/2+POFFSET, PHEIGHT+POFFSET, pWidth);
	AddVertex3D(h, PLENGTH/2+POFFSET, 0, pWidth);

	EndGroup;
	groupHand := LNewObj;
	bRule := TRUE;
	bClose := FALSE;
	bSolid := FALSE;
	groupHand := CreateLoftSurfaces(groupHand, bRule, bClose, bSolid);
	SetRot3D(LNewObj,#90d,#0d,#0d,0,0,0);
END;
RUN(Example);



  CreateNurbsCurve Objects - NURBS 
VectorWorks9.0

VectorScript Declaration:

FUNCTION   CreateNurbsCurve
(   firstX :REAL;
    firstY :REAL;
    firstZ :REAL;
    byCtrlPts :BOOLEAN;
    degree :INTEGER
) :HANDLE ;

Python:

def  vs.CreateNurbsCurve(first, byCtrlPts, degree):
   return HANDLE

Description:

Creates a new NURBS curve in the document.

説明

NURBS曲線を作成します。

Parameters:

first Coordinates of the first point in the curve definiton. 座標
byCtrlPts Create curve by control points (not interpolation). 制御点の有無(TRUE=有)
degree The degree of the NURBS curve. 角度

Result:

Returns a HANDLE to the new NURBS curve if successful, otherwise returns NIL.

返り値

新しく作成されたNURBS曲線のハンドルを返します。その他の場合はNILを返します。

Example:

PROCEDURE NewNurbsCurve;
VAR
	nC :HANDLE;
BEGIN
	nC := CreateNurbsCurve(0, 0, 0, true, 2);
	AddVertex3D(nC, 1, 1, 0);
	AddVertex3D(nC, 2, 0, 0);
END;
RUN(NewNurbsCurve);



  CreateNurbsSurface Objects - NURBS 
VectorWorks9.0

VectorScript Declaration:

FUNCTION   CreateNurbsSurface
(   numUPts :LONGINT;
    numVPts :LONGINT;
    uDegree :INTEGER;
    vDegree :INTEGER
) :HANDLE ;

Python:

def  vs.CreateNurbsSurface(numUPts, numVPts, uDegree, vDegree):
   return HANDLE

Description:

Creates a new NURBS surface in the document. The surface has two directions, denoted u and v. The surface acts like a set of NURBS curves in each direction, with the number of control points and the degree specified in the parameter list. (Note that the degree parameters have to be lower than the numPts parameters.)

After creating the surface, you must set the location of each of the control points with NurbsSetPt3D, and when you are done call ResetBBox to make sure the bounding box is correct.

説明

NURBS曲面を作成します。

Parameters:

numUPts The number of definition points along the u-axis of the surface. U制御点の数
numVPts The number of definition points along the v-axis of the surface. V制御点の数
uDegree Degree of the NURBS curve in the u direction. U角度
vDegree Degree of the NURBS curve in the v direction. V角度

Result:

Returns a HANDLE to the newly created NURBS surface object if successful, otherwise returns NIL.

返り値

新しく作成されたNURBS曲面のハンドルを返します。その他の場合はNILを返します。

Example:

PROCEDURE Example;
VAR
	h :HANDLE;
BEGIN
	h := CreateNurbsSurface(3, 3, 1, 1);
	NurbsSetPt3D(h, 0, 0, 0, 0, 0);
	NurbsSetPt3D(h, 0, 1, 1, 0, 0);
	NurbsSetPt3D(h, 0, 2, 2, 0, 0);
	NurbsSetPt3D(h, 1, 0, 0, 1, 0);
	NurbsSetPt3D(h, 1, 1, 1, 1, 1);
	NurbsSetPt3D(h, 1, 2, 2, 1, 0);
	NurbsSetPt3D(h, 2, 0, 0, 2, 0);
	NurbsSetPt3D(h, 2, 1, 1, 2, 0);
	NurbsSetPt3D(h, 2, 2, 2, 2, 0);
	ResetBBox(h);
END;
RUN(Example);

See Also:

NurbsSurfaceEvalPt  



  CreateOffsetNurbsObjectHandle Objects - NURBS 
VectorWorks10.0

VectorScript Declaration:

FUNCTION   CreateOffsetNurbsObjectHandle
(   h :HANDLE;
    offsetDistance :REAL (Coordinate)
) :HANDLE ;

Python:

def  vs.CreateOffsetNurbsObjectHandle(h, offsetDistance):
   return HANDLE

Description:

Returns a handle to a NURBS object that is offset from the given NURBS object h by the offset distance.

説明

ハンドルで指定したNURBS図形オフセットしてNURBS図形を新規に作成し、そのハンドルを返します。

Parameters:

h Handle to object. NURBS図形のハンドル
offsetDistance Offset distance. Positive offsets outwards. オフセット値

Example:

PROCEDURE Example;
VAR
	h :handle;
BEGIN
	CallTool(-204);
	h := FSActLayer;
	h := ConvertToNURBS(h, false);
	h := CreateOffsetNurbsObjectHandle(h, 1);
END;
RUN(Example);



  CreateSurfacefromCurvesNetwork Objects - NURBS 
VectorWorks10.0

VectorScript Declaration:

FUNCTION   CreateSurfacefromCurvesNetwork
:BOOLEAN ;

Python:

def  vs.CreateSurfacefromCurvesNetwork():
   return BOOLEAN

Description:

This function will create a NURBS surface from a network of selected intersecting curves in the document

説明

選択されている交差した曲線からNURBS曲面を作成します。



  DrawNurbsObject Objects - NURBS 
VectorWorks10.0

VectorScript Declaration:

PROCEDURE   DrawNurbsObject
( h:HANDLE ) ;

Python:

def  vs.DrawNurbsObject(h):
   return None

Description:

Draws the NURBS object h on the screen.

説明

NURBS図形を描画します。



  EvaluateNurbsSurfacePointAndNormal Objects - NURBS 
VectorWorks10.0

VectorScript Declaration:

FUNCTION   EvaluateNurbsSurfacePointAndNormal
(   surfaceHandle :HANDLE;
    u :REAL;
    v :REAL;
  VAR  pointX :REAL;
  VAR  pointY :REAL;
  VAR  pointZ :REAL;
  VAR  normalX :REAL;
  VAR  normalY :REAL;
  VAR  normalZ :REAL
) :BOOLEAN ;

Python:

def  vs.EvaluateNurbsSurfacePointAndNormal(surfaceHandle, u, v):
   return (BOOLEAN, point, normal)

Description:

Determines the point and normal on the NURBS surface at the given u/v value.

説明

U方向/V方向の値を指定してNURBS曲面上の頂点を決定します。

Parameters:

surfaceHandle Handle to NURBS surface being evaluated NURBS曲面のハンドル
u parameter value of the point on the surface being evaluated U方向の値
v parameter value of the point on the surface being evaluated V方向の値
point Coordinate of the point on the surface 座標
normal normal vector of the surface computed at the point ベクトル



  ExtendNurbsCurve Objects - NURBS 
VectorWorks10.0

VectorScript Declaration:

FUNCTION   ExtendNurbsCurve
(   curveHandle :HANDLE;
    distance :REAL;
    bStart :BOOLEAN;
    bLinear :BOOLEAN
) :HANDLE ;

Python:

def  vs.ExtendNurbsCurve(curveHandle, distance, bStart, bLinear):
   return HANDLE

Description:

Extends a curve by a given distance at the start or the end. The extension can either be linear or can match the curvature of the existing end.

説明

始点または終点からの距離を指定してNURBS曲線を延長します。直線状または曲率に沿って延長することができます。

Parameters:

curveHandle Handle to a NURBS curve NURBS曲線のハンドル
distance Distance to extend the curve 距離
bStart True to extend the curve at the beginning, false to extend it at the end. 延長する点(TRUE:始点/FALSE:終点)
bLinear True for linear, false to match curvature of existing end. 延長する形状(TRUE:直線状/FALSE:曲率)

Result:

Returns a handle to the extended curve.

返り値

延長したNURBS曲線のハンドルを返します。



  ExtendNurbsSurface Objects - NURBS 
VectorWorks10.0

VectorScript Declaration:

FUNCTION   ExtendNurbsSurface
(   surfaceHandle :HANDLE;
    distance :REAL;
    bStart :BOOLEAN;
    bLinear :BOOLEAN;
    bUDir :BOOLEAN
) :HANDLE ;

Python:

def  vs.ExtendNurbsSurface(surfaceHandle, distance, bStart, bLinear, bUDir):
   return HANDLE

Description:

Extends a surface by a given distance at the start or the end of the U direction or V direction.

説明

U方向やV方向の始点または終点までの距離を指定してNURBS曲面を延長します。

Parameters:

surfaceHandle Handle to a NURBS surface. NURBS曲面のハンドル
distance Distance to extend the surface. 距離
bStart True to extend from the beginning, false to extend from the end. 延長する点(TRUE:始点/FALSE:終点)
bLinear True for linear, false to match curvature of existing surface. 延長する形状(TRUE:直線状/FALSE:曲率)
bUDir True extends the surface in the u parametric direction, otherwise extends it in the v parametric direction. 延長する方向(TRUE:U方向/FALSE:V方向)

Result:

Returns a handle to the extended surface

返り値

延長したNURBS曲面のハンドルを返します。



  GetNurbsObjectDistanceFromPoint Objects - NURBS 
VectorWorks10.0

VectorScript Declaration:

FUNCTION   GetNurbsObjectDistanceFromPoint
(   h :HANDLE;
    pointX :REAL;
    pointY :REAL;
  VAR  distance :REAL
) :BOOLEAN ;

Python:

def  vs.GetNurbsObjectDistanceFromPoint(h, point):
   return (BOOLEAN, distance)

Description:

Returns the distance from the input point to the input NURBS Object h.

説明

NURBS図形と点の間の距離を返します。

Parameters:

h Handle to a NURBS object. NURBS図形のハンドル
point point 点の座標
distance Distance between point and object. NURBS図形と点の間の距離



  GetParameterOnNurbsCurve Objects - NURBS 
VectorWorks10.0

VectorScript Declaration:

FUNCTION   GetParameterOnNurbsCurve
(   h :HANDLE;
    pointX :REAL;
    pointY :REAL;
    pointZ :REAL;
  VAR  parameter :REAL;
  VAR  index :LONGINT
) :BOOLEAN ;

Python:

def  vs.GetParameterOnNurbsCurve(h, point):
   return (BOOLEAN, parameter, index)

Description:

Given a NURBS curve handle and a point (in world space), this function returns the parameter of the point obtained by projecting the input point. The function also returns the index of the piece in the piecewise NURBS curve on which the projected point lies.

説明

NURBS曲線のハンドルと点から、点を投影して確定された点のパラメータを返します。この関数はまた、点が投影されたNURBS曲線の番号も返します。



  GetPointAndParameterOnNurbsCurveAtGivenLength Objects - NURBS 
VectorWorks10.1

VectorScript Declaration:

FUNCTION   GetPointAndParameterOnNurbsCurveAtGivenLength
(   inNurbCurve :HANDLE;
    inPercentOfLength :REAL;
  VAR  pX :REAL;
  VAR  pY :REAL;
  VAR  pZ :REAL;
  VAR  outParam :REAL;
  VAR  outIndex :LONGINT
) :BOOLEAN ;

Python:

def  vs.GetPointAndParameterOnNurbsCurveAtGivenLength(inNurbCurve, inPercentOfLength):
   return (BOOLEAN, p, outParam, outIndex)

Description:

Gets point, parametric parameter, and curve index of specified location along a NURBS Curve.

説明

NURBS曲線上の指定した点の位置、パラメータの位置、番号を返します。

Parameters:

inNurbCurve Handle to the NURBS curve. NURBS曲線のハンドル
inPercentOfLength Specify location on curve as percent of total length. (0 - 1) 長さ(0から1まで)
p Point of specified location. 点の座標
outParam Parametric parameter of location. パラメータ
outIndex 0-based index of piece for piecewise NURBS curve. 番号(0から)

Example:

PROCEDURE Example;
VAR
	inNurbCurve :HANDLE;
	inPercentOfLength :REAL;
	pX, pY, pZ :REAL;
	outParam :REAL;
	outIndex :LONGINT;
BEGIN
	CallTool(-325);
	inNurbCurve := FSActLayer;
	inPercentOfLength := .5;
	IF GetPointAndParameter(inNurbCurve, inPercentOfLength, pX, pY, pZ, outParam, outIndex) THEN BEGIN
		Locus3D(pX, pY, pZ);
	END;
END;
RUN(Example);



  NurbsCurveEvalPt Objects - NURBS 
VectorWorks9.5

VectorScript Declaration:

PROCEDURE   NurbsCurveEvalPt
(   objectHd :HANDLE;
    index :LONGINT;
    u :REAL;
  VAR  pX :REAL;
  VAR  pY :REAL;
  VAR  pZ :REAL
) ;

Python:

def  vs.NurbsCurveEvalPt(objectHd, index, u):
   return p

Description:

This procedure determines the point on the nurbs curve at the given u value in the indexed piece.

The index is zero based (0 to number of knots - 1). The u value can range from 0 to the value of the last knot in the curve segment.

説明

ハンドルで指定したNURBS曲線上の結び目uの座標を返します。

Parameters:

objectHd Handle to a NURBS curve. NURBS曲線のハンドル
index Segment of curve to be queried. 辺の番号
u Parameter between the minimum and maximum knot value. 結び目の値
p Location of the u point on the curve. 結び目の座標

See Also:

NurbsKnot   NurbsNumKnots  



  NurbsCurveGetNumPieces Objects - NURBS 
VectorWorks9.0

VectorScript Declaration:

FUNCTION   NurbsCurveGetNumPieces
( objectHd:HANDLE ) :INTEGER ;

Python:

def  vs.NurbsCurveGetNumPieces(objectHd):
   return INTEGER

Description:

Returns the number of pieces that compose the referenced NURBS curve.

説明

ハンドルで指定したNURBS曲線の辺の数を返します。

Parameters:

objectHd Handle to NURBS curve. NURBS曲線のハンドル

Result:

An INTEGER count of the pieces composing the curve.

返り値

辺の数を返します。



  NurbsCurveType Objects - NURBS 
VectorWorks9.0

VectorScript Declaration:

PROCEDURE   NurbsCurveType
(   objectHd :HANDLE;
    index :LONGINT;
  VAR  isByFit :BOOLEAN
) ;

Python:

def  vs.NurbsCurveType(objectHd, index):
   return isByFit

Description:

Returns the curve type of a segment of the referenced NURBS curve.

The index is zero based (0 to number of segments - 1).

説明

ハンドルで指定したNURBS曲線の、指定した辺の種類を返します。

Parameters:

objectHd Handle to NURBS curve. NURBS曲線のハンドル
index Index of curve segment. 辺の番号
isByFit Type of curve segment. 点の種類

Result:

Returns a BOOLEAN indicating whether the curve is created by fit point (TRUE) or by control point (FALSE).

返り値

TRUE:補間点です。
FALSE:制御点です。



  NurbsDegree Objects - NURBS 
VectorWorks9.0

VectorScript Declaration:

FUNCTION   NurbsDegree
(   objectHd :HANDLE;
    index :INTEGER
) :INTEGER ;

Python:

def  vs.NurbsDegree(objectHd, index):
   return INTEGER

Description:

Returns the degree of a segment in a NURBS curve or surface.

For NURBS curves, the index indicates which segment of the curve is to be queried. The index is zero based (0 to number of segments - 1).

For NURBS surfaces, specify an index of 1 to indicate u-direction, and an index of 0 to indicate v-direction when querying the surface object.

説明

ハンドルで指定したNURBS曲線/曲面の、指定した辺の角度を返します。

Parameters:

objectHd Handle to NURBS curve or surface. NURBS曲線/曲面のハンドル
index Index of curve segment (NURBS curve) or direction index (NURBS surface). 辺の番号

Result:

The degree of the segment as an INTEGER value.

返り値

辺の角度を返します。



  NurbsDelVertex Objects - NURBS 
VectorWorks9.0

VectorScript Declaration:

PROCEDURE   NurbsDelVertex
(   objectHd :HANDLE;
    index1 :LONGINT;
    index2 :LONGINT
) ;

Python:

def  vs.NurbsDelVertex(objectHd, index1, index2):
   return None

Description:

Deletes a point in the referenced NURBS curve or surface.

The index is zero based (0 to number of points - 1).

説明

ハンドルで指定したNURBS曲線/曲面の、指定した頂点を消去します。

Parameters:

objectHd Handle to NURBS curve or surface. NURBS曲線/曲面のハンドル
index1 Index of point in NURBS curve, or U-index of a point in NURBS surface. 頂点番号1
index2 V-index of point in NURBS surface. 頂点番号2



  NurbsGetNumPts Objects - NURBS 
VectorWorks9.0

VectorScript Declaration:

FUNCTION   NurbsGetNumPts
(   objectHd :HANDLE;
    index :LONGINT
) :LONGINT ;

Python:

def  vs.NurbsGetNumPts(objectHd, index):
   return LONGINT

Description:

Returns the number of points for segment of the referenced NURBS curve, or the number of points of the referenced NURBS surface in the u- or v-direction.

For NURBS curves, the index indicates which segment of the curve is to be queried. The index is zero based (0 to number of segments - 1).

For NURBS surfaces, specify an index of 1 to indicate u-direction, and an index of 0 to indicate v-direction when querying the surface object.

説明

ハンドルで指定したNURBS曲線/曲面の頂点数を返します。

Parameters:

objectHd Handle to NURBS curve or surface. NURBS曲線/曲面のハンドル
index Index of curve segment (NURBS curve) or direction index (NURBS surface). 頂点番号

Result:

The number of control points as a LONGINT value.

返り値

頂点数を返します。



  NurbsGetPt3D Objects - NURBS 
VectorWorks9.0

VectorScript Declaration:

PROCEDURE   NurbsGetPt3D
(   objectHd :HANDLE;
    index1 :LONGINT;
    index2 :LONGINT;
  VAR  pX :REAL;
  VAR  pY :REAL;
  VAR  pZ :REAL
) ;

Python:

def  vs.NurbsGetPt3D(objectHd, index1, index2):
   return p

Description:

Returns the coordinates of a point in the referenced NURBS curve or surface.

The index is zero based (0 to number of points - 1).

説明

ハンドルで指定したNURBS曲線/曲面の、指定した頂点の座標を返します。

Parameters:

objectHd Handle to NURBS curve or surface. NURBS曲線/曲面のハンドル
index1 Index of point in NURBS curve, or u-coordinate of point location in NURBS surface. 頂点番号1
index2 V-coordinate of point location in NURBS surface. 頂点番号2
p Coordinates of the control point. 頂点の座標

See Also:

NurbsCurveEvalPt   NurbsSurfaceEvalPt  



  NurbsGetWeight Objects - NURBS 
VectorWorks9.0

VectorScript Declaration:

PROCEDURE   NurbsGetWeight
(   objectHd :HANDLE;
    index1 :LONGINT;
    index2 :LONGINT;
  VAR  weight :REAL
) ;

Python:

def  vs.NurbsGetWeight(objectHd, index1, index2):
   return weight

Description:

Returns the weight of a point in a NURBS curve or surface.

For NURBS curves, index1 corresponds to the segment of the curve to be queried, and index2 corresponds to the index of the point in the segment.

For NURBS surfaces, index1 corresponds to the u-index and index2 corresponds to the v-index of the surface.

The index is zero based (0 to number of points - 1).

説明

ハンドルで指定したNURBS曲線/曲面の、指定した頂点の重みを返します。

Parameters:

objectHd Handle to NURBS curve or surface. NURBS曲線/曲面のハンドル
index1 Segment of curve to be queried (NURBS curve), or u-index (NURBS surface). 頂点番号1
index2 Index of point (NURBS curve) or v-index (NURBS surface). 頂点番号2
weight Weight of point. 頂点の重み



  NurbsKnot Objects - NURBS 
VectorWorks9.0

VectorScript Declaration:

PROCEDURE   NurbsKnot
(   objectHd :HANDLE;
    index1 :LONGINT;
    index2 :LONGINT;
  VAR  knot :REAL
) ;

Python:

def  vs.NurbsKnot(objectHd, index1, index2):
   return knot

Description:

Returns the specified knot in a NURBS curve or surface.

For NURBS curves, index1 corresponds to the segment of the curve to be queried, and index2 corresponds to the knot in the segment.

For NURBS surfaces, index1 corresponds to the u- or v-direction of the surface (u=1, v=0), and index2 corresponds to the knot index.

The index is zero based (0 to number of knots - 1).

説明

ハンドルで指定したNURBS曲線/曲面の、指定した頂点の結び目を返します。

Parameters:

objectHd Handle to NURBS curve or surface. NURBS曲線/曲面のハンドル
index1 Segment of curve to be queried (NURBS curve), or direction (NURBS surface). 頂点番号1
index2 Index of segment or direction knot. 頂点番号2
knot Knot value. 結び目

Example:

See 



  NurbsNumKnots Objects - NURBS 
VectorWorks9.0

VectorScript Declaration:

FUNCTION   NurbsNumKnots
(   objectHd :HANDLE;
    index :LONGINT
) :LONGINT ;

Python:

def  vs.NurbsNumKnots(objectHd, index):
   return LONGINT

Description:

Returns the number of knots for the referenced NURBS curve or surface. If the object is a curve, then index indicates the segment of the curve to consider. If the object is a surface, then the index indicates the U direction (for index = 1) or the V direction (for index = 0).

説明

ハンドルで指定したNURBS曲線/曲面の結び目の数を返します。

Parameters:

objectHd Handle to NURBS curve or surface. NURBS曲線/曲面のハンドル
index Index of curve, or U/V choice for surface. 頂点番号

返り値

結び目の数

Example:

See 



  NurbsSetKnot Objects - NURBS 
VectorWorks9.0

VectorScript Declaration:

PROCEDURE   NurbsSetKnot
(   objectHd :HANDLE;
    index1 :LONGINT;
    index2 :LONGINT;
    knot :REAL
) ;

Python:

def  vs.NurbsSetKnot(objectHd, index1, index2, knot):
   return None

Description:

Sets the specified knot in a NURBS curve or surface.

For NURBS curves, index1 corresponds to a segment of the curve, and index2 corresponds to the knot in the segment.

For NURBS surfaces, index1 corresponds to the u- or v-direction of the surface and index2 corresponds to the knot.

The index is zero based (0 to number of knots - 1).

説明

ハンドルで指定したNURBS曲線/曲面の、指定した頂点の結び目を設定します。

Parameters:

objectHd Handle to NURBS curve or surface. NURBS曲線/曲面のハンドル
index1 Segment of curve to be queried (NURBS curve), or direction (NURBS surface). 頂点番号1
index2 Index of segment or direction knot. 頂点番号2
knot Knot value. 結び目



  NurbsSetPt3D Objects - NURBS 
VectorWorks9.0

VectorScript Declaration:

PROCEDURE   NurbsSetPt3D
(   objectHd :HANDLE;
    index1 :LONGINT;
    index2 :LONGINT;
    pX :REAL;
    pY :REAL;
    pZ :REAL
) ;

Python:

def  vs.NurbsSetPt3D(objectHd, index1, index2, p):
   return None

Description:

Sets the coordinates of a point in the referenced NURBS curve or surface.

The index is zero based (0 to number of points - 1).

For a nurbs curve, index1 is the piece number of the nurbs curve. Index2 is the vertex number within that piece. NurbsCurveGetNumPieces will give you the number of pieces inside of the nurbs curve (1-based). NurbsGetNumPts will give you the number of points inside of a piece.

説明

ハンドルで指定したNURBS曲線/曲面の、指定した頂点の座標を設定します。

Parameters:

objectHd Handle to NURBS curve or surface. NURBS曲線/曲面のハンドル
index1 Index of point in NURBS curve, or u-coordinate of point location in NURBS surface. 頂点番号1
index2 V-coordinate of point location in NURBS surface. 頂点番号2
p New coordinates for the point. 頂点の座標

Example:

See 



  NurbsSetWeight Objects - NURBS 
VectorWorks9.0

VectorScript Declaration:

PROCEDURE   NurbsSetWeight
(   objectHd :HANDLE;
    index1 :LONGINT;
    index2 :LONGINT;
    weight :REAL
) ;

Python:

def  vs.NurbsSetWeight(objectHd, index1, index2, weight):
   return None

Description:

Sets the weight of a point in a NURBS curve or surface.

For NURBS curves, index1 corresponds to the segment of the curve to be queried, and index2 corresponds to the index of the point in the segment.

For NURBS surfaces, index1 corresponds to the u-index and index2 corresponds to the v-index of the surface.

The index is zero based (0 to number of points - 1).

説明

ハンドルで指定したNURBS曲線/曲面の、指定した頂点の重みを設定します。

Parameters:

objectHd Handle to NURBS curve or surface. NURBS曲線/曲面のハンドル
index1 Segment of curve to be queried (NURBS curve), or u-index (NURBS surface). 頂点番号1
index2 Index of point (NURBS curve) or v-index (NURBS surface). 頂点番号2
weight New weight of point. 頂点の重み



  NurbsSurfaceEvalPt Objects - NURBS 
VectorWorks9.5

VectorScript Declaration:

PROCEDURE   NurbsSurfaceEvalPt
(   objectHd :HANDLE;
    u :REAL;
    v :REAL;
  VAR  pX :REAL;
  VAR  pY :REAL;
  VAR  pZ :REAL
) ;

Python:

def  vs.NurbsSurfaceEvalPt(objectHd, u, v):
   return p

Description:

This procedure determines the point on the nurbs surface at the given u,v values.

The u vand v values can range from 0 to the value of the last knot in each direction.

説明

ハンドルで指定したNURBS曲面上の結び目u,vの座標を返します。

Parameters:

objectHd Handle to a NURBS surface. NURBS曲面のハンドル
u Parameter between the minimum and maximum knot value in U direction. U方向上の結び目の値
v Parameter between the minimum and maximum knot value in V direction. V方向上の結び目の値
p Location of the u,v point on the surface. 結び目の座標

Example:

PROCEDURE LocusSurface;
{ Create a surface, then put loci on it }
CONST
    uMaxIndex   = 16;   { 17 points, 0 - 16 }
    vMaxIndex   = 16;   { 17 points, 0 - 16 }
    uDegree     = 3;    
    vDegree     = 4;
    xMin        = -3;
    xMax        = 3;
    yMin        = -3;
    yMax        = 3;
    zMax        = 3;
    numLoci     = 17;
VAR
    surfaceH                : HANDLE;
    x,y,z,u,v               : REAL;
    i,j                     : INTEGER;
    numKnotsU, numKnotsV    : INTEGER;
    maxFoundU, maxFoundV    : REAL;
    uStep, vStep            : REAL;
BEGIN
    { Create a Nurbs Surface }
    
    surfaceH := CreateNurbsSurface(uMaxIndex + 1, vMaxIndex + 1, uDegree, vDegree);
    IF surfaceH <> NIL THEN BEGIN
        FOR i := 0 TO uMaxIndex  DO BEGIN
            FOR j := 0 TO vMaxIndex DO BEGIN
                x := xMin + (xMax - xMin) * (i / uMaxIndex);
                y := yMin + (yMax - yMin) * (j / vMaxIndex);
                z := Cos(i - uMaxIndex / 2) *
                     Cos(j - vMaxIndex / 2) * 
                     zMax / (1 + x*x + y*y);
                NurbsSetPt3D(surfaceH, i, j, x,y,z);
            END;
        END;
        ResetBBox(surfaceH);
        
        { Add Loci }
        
        { Find number of knots in each direction }
        numKnotsU := NurbsNumKnots(surfaceH, 1);
        numKnotsV := NurbsNumKnots(surfaceH, 0);
        
        { Find the u and v real values that correspond the knots with the 
          maximum u and v indices. }
        NurbsKnot(surfaceH, 1, numKnotsU - 1, maxFoundU);       
        NurbsKnot(surfaceH, 0, numKnotsV - 1, maxFoundV);       
        
        Message(numKnotsU, ' ', numKnotsV);
        
        { Create 3D loci along each direction }
        uStep   := maxFoundU / (numLoci - 1);
        vStep   := maxFoundV / (numLoci - 1);
        
        u := 0;
        WHILE u <= maxFoundU DO BEGIN
            v := 0;
            WHILE v <= maxFoundV DO BEGIN
                NurbsSurfaceEvalPt(surfaceH, u, v, x,y,z);
                Locus3D(x,y,z);
                v := v + vStep;
            END;
            u := u + uStep;
        END;
    
        { Set View }
        Projection(0,0,9.76,-4.88,4.88,4.88,-4.88);
        SetView(#-45.0d,#-35.26438968275d,#-30.0d,0,0,0);
        RedrawAll;
    END;
END;
Run(LocusSurface);

See Also:

NurbsKnot   NurbsNumKnots  



  RevolveWithRail Objects - NURBS 
VectorWorks10.0

VectorScript Declaration:

FUNCTION   RevolveWithRail
(   profileH :HANDLE;
    railH :HANDLE;
    axisH :HANDLE
) :HANDLE ;

Python:

def  vs.RevolveWithRail(profileH, railH, axisH):
   return HANDLE

Description:

Creates a NURBS surface or a group of surfaces by revolving a profile about an axis and following a rail guide curve on a plane perpendicular to the plane containing the axis and the profile.

説明

輪郭を示す曲線を軸やパスに沿って回転させて、NURBS曲面またはNURBS曲面のグループを作成します。

Parameters:

profileH Handle to a NURBS curve to be used as the profile object. NURBS曲線のハンドル(輪郭)
railH Handle to a NURBS curve to be used as the rail guide object NURBS曲線のハンドル(パス)
axisH Handle to a linear NURBS curve about which the profile would be revolved NURBS曲線のハンドル(軸)

Result:

Handle to resulting NURBS surface.

返り値

NURBS曲面のハンドルを返します。



  TrimNurbsSurface Objects - NURBS 
Vectorworks 2013

VectorScript Declaration:

FUNCTION   TrimNurbsSurface
(   surfaceHandle :HANDLE;
    curveHandle :HANDLE
) :BOOLEAN ;

Python:

def  vs.TrimNurbsSurface(surfaceHandle, curveHandle):
   return BOOLEAN

Description:

Trims the NURBS surface by a given NURBS curve.

説明

任意のNURBS曲線でNURBS曲面をトリミングします。

Parameters:

surfaceHandle Handle to a NURBS surface to trim. トリミングされるNURBS曲面
curveHandle Handle to a NURBS curve for trimming. トリミングするNURBS曲線

Result:

Returns TRUE if trimmed the surface, otherwise returns FALSE.

返り値

トリミングが成功したかどうかを返します。

Example:

PROCEDURE Example;

VAR
surfaceH, curveH :HANDLE;
bFlag :BOOLEAN;

BEGIN
surfaceH := CreateNurbsSurface(3, 3, 1, 1);
NurbsSetPt3D(h, 0, 0, 0, 0, 0);
NurbsSetPt3D(h, 0, 1, 1, 0, 0);
NurbsSetPt3D(h, 0, 2, 2, 0, 0);
NurbsSetPt3D(h, 1, 0, 0, 1, 0);
NurbsSetPt3D(h, 1, 1, 1, 1, 1);
NurbsSetPt3D(h, 1, 2, 2, 1, 0);
NurbsSetPt3D(h, 2, 0, 0, 2, 0);
NurbsSetPt3D(h, 2, 1, 1, 2, 0);
NurbsSetPt3D(h, 2, 2, 2, 2, 0);

curveH := CreateNurbsCurve(0, 0, 0, TRUE, 2);
AddVertex3D(nC, 1, 1, 0);
AddVertex3D(nC, 2, 0, 0);

bFlag := TrimNurbsSurface(surfaceH, curveH);
END;

RUN(Example);

See Also:

CreateNurbsSurface   CreateNurbsCurve