UNPKG

@bitbybit-dev/core

Version:

Bit By Bit Developers Core CAD API to Program Geometry

35 lines (34 loc) 957 B
/** * Sweep surface functions. * These functions wrap around Verbnurbs library that you can find here http://verbnurbs.com/. * Thanks Peter Boyer for his work. */ export class VerbSurfaceSweep { constructor(context) { this.context = context; } /** * Creates the sweep Nurbs surface * @param inputs Parameters for Nurbs sweep surface * @returns Sweep Nurbs surface */ create(inputs) { return new this.context.verb.geom.SweptSurface(inputs.profile, inputs.rail); } /** * Get the profile Nurbs curve of the swept Nurbs surface * @param inputs Sweep Nurbs surface * @returns Profile Nurbs curve */ profile(inputs) { return inputs.sweep.profile(); } /** * Get the rail Nurbs curve of the swept Nurbs surface * @param inputs Sweep Nurbs surface * @returns Rail Nurbs curve */ rail(inputs) { return inputs.sweep.rail(); } }