VCOM:VectorWorks:ISDK::CreateExtrudeAlongPath: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
m (1 revision) |
(No difference)
|
Latest revision as of 15:00, 12 August 2013
.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
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