UNPKG

@bitbybit-dev/core

Version:

Bit By Bit Developers Core CAD API to Program Geometry

35 lines (34 loc) 988 B
/** * Extrusion surface functions. * These functions wrap around Verbnurbs library that you can find here http://verbnurbs.com/. * Thanks Peter Boyer for his work. */ export class VerbSurfaceExtrusion { constructor(context) { this.context = context; } /** * Creates the Nurbs surface extrusion from the curve * @param inputs Nurbs profile curve and direction vector * @returns Nurbs surface */ create(inputs) { return new this.context.verb.geom.ExtrudedSurface(inputs.profile, inputs.direction); } /** * Gets the direction vector of the extrusion * @param inputs Extruded Nurbs surface * @returns Vector */ direction(inputs) { return inputs.extrusion.direction(); } /** * Gets the profile Nurbs curve of the extrusion * @param inputs Extruded Nurbs surface * @returns Profile Nurbs curve */ profile(inputs) { return inputs.extrusion.profile(); } }