mcneel / rhinocommon

RhinoCommon is the .NET SDK for Rhino5 / Grasshopper
http://wiki.mcneel.com/developer/rhinocommon
243 stars 93 forks source link

Easy to use extrusion maker #114

Closed sbaer closed 11 years ago

sbaer commented 12 years ago

Add a static function to the Extrusion class for simple to create extrusions. Something like

public static Extrusion Create(Curve planarCurve, double distance, bool cap)

planarCurve must be planar distance = height of extrusion (+or-) with the extrusion always starting on the curve and extruded in a direction normal to the curve's plane cap = make the extrusion capped

Based on request from python forum at http://python.rhino3d.com/threads/1159-cap-extruded-surface-constructed-from-plane-curve

dalelear commented 12 years ago

The .NET and python code can use the opennurbs C++ function

static ON_Extrusion* ON_Extrusion::CreateFrom3dCurve( const ON_Curve& curve, const ON_Plane* plane, double height, bool bCap, ON_Extrusion* extrusion ) ;

to perform the necessary checks and calculations.

The plane argument is optional and is supplied so users can control the direction of the extrusion if the results of ON_Curve::IsPlanar() are not predictable enough for their application.

sbaer commented 11 years ago

Added a while ago. This will be in V5 SR1