VCOM:VectorWorks:ISDK::CreateExtrudeAlongPath

From Vectorworks Developer
Jump to navigation Jump to search

.SDK|SDK ..SDK:Types|SDK Types ..VCOM:VCOM (Vectorworks Component Object Model)|VCOM Basics ..VCOM:Class Reference|VCOM Class Reference

Description

namespace VectorWorks

Member of VCOM:VectorWorks:ISDK

returns the surface handle if it succeeds, returns NULL if it fails

virtual MCObjectHandle CreateExtrudeAlongPath(
MCObjectHandle pathHandle,
MCObjectHandle profileHandle)

Parameters

MCObjectHandle pathHandle No information available.
MCObjectHandle profileHandle No information available.

Return Value

On error returns: nil

Remarks

The path should be a NURBS curve.

On succes, a list of NURB surface objects is created, they need to be manually added to the container you want.

Example

This example is taken from the mailing list and is created by Vlado.

	VWPolygon2DObj path;

	path.AddVertex( 0, 0 );
	path.AddVertex( 100, 0 );
	path.AddVertex( 100, 50 );
	path.AddVertex( 200, 50 );
	path.SetClosed( false );

	VWPolygon2DObj profile;
	profile.AddVertex( 0, 0 );
	profile.AddVertex( 10, 0 );
	profile.AddVertex( 10, 10 );
	profile.AddVertex( 0, 10 );
	profile.SetClosed( true );


	MCObjectHandle hPathNurb = gSDK->ConvertToNURBS( path );
	MCObjectHandle hExtrudeAlongPath  = gSDK->CreateExtrudeAlongPath( hPathNurb, profile );

	MCObjectHandle hCurrent = hExtrudeAlongPath;

	while ( hCurrent )
	{
		MCObjectHandle hNext  = gSDK->NextObject( hCurrent );
		gSDK->AddObjectToContainer( hCurrent, gSDK->GetCurrentLayer() );
		hCurrent = hNext;
	}

Version

Availability: from Vectorworks 2009