VS:CreateLoftSurfaces

From Vectorworks Developer
Revision as of 10:25, 12 August 2013 by Root (Talk | contribs)

Jump to: navigation, search

.VectorScript|VectorScript ..VS:Function Reference|Function Reference ..VS:Function_Reference_Appendix|Appendix


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.
FUNCTION CreateLoftSurfaces(
groupCurvesHd  :HANDLE;
bRule  :BOOLEAN;
bClose  :BOOLEAN;
bSolid  :BOOLEAN) : HANDLE;
def vs.CreateLoftSurfaces(groupCurvesHd, bRule, bClose, bSolid):
    return HANDLE

Parameters

groupCurvesHd HANDLE
bRule BOOLEAN
bClose BOOLEAN
bSolid BOOLEAN

Example

VectorScript

PROCEDURE Example;
CONST
PLENGTH = 10;
PHEIGHT = 20;
POFFSET = 5;
pWidth = 3;
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);

Python

def Example():
	PLENGTH = 10
	PHEIGHT = 20
	POFFSET = 5
	pWidth = 3

	vs.BeginGroup()
	
	h = vs.CreateNurbsCurve(-PLENGTH/2, 0, 0, True, 1)
	vs.AddVertex3D(h, -PLENGTH/2,PHEIGHT,0)
	vs.AddVertex3D(h, PLENGTH/2,PHEIGHT,0)
	vs.AddVertex3D(h, PLENGTH/2,0,0)

	h = vs.CreateNurbsCurve(-PLENGTH/2-POFFSET,0,pWidth, True, 1)
	vs.AddVertex3D(h, -PLENGTH/2-POFFSET, PHEIGHT+POFFSET, pWidth)
	vs.AddVertex3D(h, PLENGTH/2+POFFSET, PHEIGHT+POFFSET, pWidth);
	vs.AddVertex3D(h, PLENGTH/2+POFFSET, 0, pWidth);

	vs.EndGroup()
	
Example()

Version

Availability: from VectorWorks10.0
Personal tools
NamespacesFFFF

Variants
Actions
Advanced Search
See Also
Navigation
Toolbox