@bitbybit-dev/core
Version:
Bit By Bit Developers Core CAD API to Program Geometry
884 lines (883 loc) • 26.4 kB
JavaScript
/* eslint-disable @typescript-eslint/no-namespace */
export var Verb;
(function (Verb) {
class CurveDto {
constructor(curve) {
if (curve !== undefined) {
this.curve = curve;
}
}
}
Verb.CurveDto = CurveDto;
class CurvesDto {
constructor(curves) {
if (curves !== undefined) {
this.curves = curves;
}
}
}
Verb.CurvesDto = CurvesDto;
class ClosestPointDto {
constructor(curve, point) {
if (curve !== undefined) {
this.curve = curve;
}
if (point !== undefined) {
this.point = point;
}
}
}
Verb.ClosestPointDto = ClosestPointDto;
class ClosestPointsDto {
constructor(curve, points) {
if (curve !== undefined) {
this.curve = curve;
}
if (points !== undefined) {
this.points = points;
}
}
}
Verb.ClosestPointsDto = ClosestPointsDto;
class BezierCurveDto {
constructor(points, weights) {
if (points !== undefined) {
this.points = points;
}
if (weights !== undefined) {
this.weights = weights;
}
}
}
Verb.BezierCurveDto = BezierCurveDto;
class DrawCurveDto {
/**
* Provide options without default values
*/
constructor(curve, opacity, colours, size, updatable, curveMesh) {
/**
* Value between 0 and 1
*/
this.opacity = 1;
/**
* Hex colour string
*/
this.colours = "#444444";
/**
* Width of the polyline
*/
this.size = 3;
/**
* Indicates wether the position of this curve will change in time
*/
this.updatable = false;
if (curve !== undefined) {
this.curve = curve;
}
if (opacity !== undefined) {
this.opacity = opacity;
}
if (colours !== undefined) {
this.colours = colours;
}
if (size !== undefined) {
this.size = size;
}
if (updatable !== undefined) {
this.updatable = updatable;
}
if (curveMesh !== undefined) {
this.curveMesh = curveMesh;
}
}
}
Verb.DrawCurveDto = DrawCurveDto;
class CurveParameterDto {
constructor(curve, parameter) {
if (curve !== undefined) {
this.curve = curve;
}
if (parameter !== undefined) {
this.parameter = parameter;
}
}
}
Verb.CurveParameterDto = CurveParameterDto;
class CurvesParameterDto {
constructor(curves, parameter) {
if (curves !== undefined) {
this.curves = curves;
}
if (parameter !== undefined) {
this.parameter = parameter;
}
}
}
Verb.CurvesParameterDto = CurvesParameterDto;
class CurveTransformDto {
constructor(curve, transformation) {
if (curve !== undefined) {
this.curve = curve;
}
if (transformation !== undefined) {
this.transformation = transformation;
}
}
}
Verb.CurveTransformDto = CurveTransformDto;
class CurvesTransformDto {
constructor(curves, transformation) {
if (curves !== undefined) {
this.curves = curves;
}
if (transformation !== undefined) {
this.transformation = transformation;
}
}
}
Verb.CurvesTransformDto = CurvesTransformDto;
class CurveToleranceDto {
constructor(curve, tolerance) {
if (curve !== undefined) {
this.curve = curve;
}
if (tolerance !== undefined) {
this.tolerance = tolerance;
}
}
}
Verb.CurveToleranceDto = CurveToleranceDto;
class CurveLengthToleranceDto {
constructor(curve, length, tolerance) {
if (curve !== undefined) {
this.curve = curve;
}
if (length !== undefined) {
this.length = length;
}
if (tolerance !== undefined) {
this.tolerance = tolerance;
}
}
}
Verb.CurveLengthToleranceDto = CurveLengthToleranceDto;
class CurveDerivativesDto {
constructor(curve, parameter, numDerivatives) {
if (curve !== undefined) {
this.curve = curve;
}
if (parameter !== undefined) {
this.parameter = parameter;
}
if (numDerivatives !== undefined) {
this.numDerivatives = numDerivatives;
}
}
}
Verb.CurveDerivativesDto = CurveDerivativesDto;
class CurveSubdivisionsDto {
constructor(curve, subdivision) {
if (curve !== undefined) {
this.curve = curve;
}
if (subdivision !== undefined) {
this.subdivision = subdivision;
}
}
}
Verb.CurveSubdivisionsDto = CurveSubdivisionsDto;
class CurvesSubdivisionsDto {
constructor(curves, subdivision) {
if (curves !== undefined) {
this.curves = curves;
}
if (subdivision !== undefined) {
this.subdivision = subdivision;
}
}
}
Verb.CurvesSubdivisionsDto = CurvesSubdivisionsDto;
class CurvesDivideLengthDto {
constructor(curves, length) {
if (curves !== undefined) {
this.curves = curves;
}
if (length !== undefined) {
this.length = length;
}
}
}
Verb.CurvesDivideLengthDto = CurvesDivideLengthDto;
class CurveDivideLengthDto {
constructor(curve, length) {
if (curve !== undefined) {
this.curve = curve;
}
if (length !== undefined) {
this.length = length;
}
}
}
Verb.CurveDivideLengthDto = CurveDivideLengthDto;
class DrawCurvesDto {
/**
* Provide options without default values
*/
constructor(curves, opacity, colours, size, updatable, curvesMesh) {
/**
* Value between 0 and 1
*/
this.opacity = 1;
/**
* Hex colour string
*/
this.colours = "#444444";
/**
* Width of the polyline
*/
this.size = 3;
/**
* Indicates wether the position of this polyline will change in time
*/
this.updatable = false;
if (curves !== undefined) {
this.curves = curves;
}
if (opacity !== undefined) {
this.opacity = opacity;
}
if (colours !== undefined) {
this.colours = colours;
}
if (size !== undefined) {
this.size = size;
}
if (updatable !== undefined) {
this.updatable = updatable;
}
if (curvesMesh !== undefined) {
this.curvesMesh = curvesMesh;
}
}
}
Verb.DrawCurvesDto = DrawCurvesDto;
class CurveNurbsDataDto {
constructor(degree, weights, knots, points) {
if (degree !== undefined) {
this.degree = degree;
}
if (weights !== undefined) {
this.weights = weights;
}
if (knots !== undefined) {
this.knots = knots;
}
if (points !== undefined) {
this.points = points;
}
}
}
Verb.CurveNurbsDataDto = CurveNurbsDataDto;
class CurvePathDataDto {
constructor(degree, points) {
if (degree !== undefined) {
this.degree = degree;
}
if (points !== undefined) {
this.points = points;
}
}
}
Verb.CurvePathDataDto = CurvePathDataDto;
class EllipseDto {
constructor(ellipse) {
if (ellipse !== undefined) {
this.ellipse = ellipse;
}
}
}
Verb.EllipseDto = EllipseDto;
class CircleDto {
constructor(circle) {
if (circle !== undefined) {
this.circle = circle;
}
}
}
Verb.CircleDto = CircleDto;
class ArcDto {
constructor(arc) {
if (arc !== undefined) {
this.arc = arc;
}
}
}
Verb.ArcDto = ArcDto;
class EllipseParametersDto {
constructor(xAxis, yAxis, center) {
if (xAxis !== undefined) {
this.xAxis = xAxis;
}
if (yAxis !== undefined) {
this.yAxis = yAxis;
}
if (center !== undefined) {
this.center = center;
}
}
}
Verb.EllipseParametersDto = EllipseParametersDto;
class CircleParametersDto {
constructor(xAxis, yAxis, radius, center) {
if (xAxis !== undefined) {
this.xAxis = xAxis;
}
if (yAxis !== undefined) {
this.yAxis = yAxis;
}
if (radius !== undefined) {
this.radius = radius;
}
if (center !== undefined) {
this.center = center;
}
}
}
Verb.CircleParametersDto = CircleParametersDto;
class ArcParametersDto {
constructor(minAngle, maxAngle, xAxis, yAxis, radius, center) {
if (minAngle !== undefined) {
this.minAngle = minAngle;
}
if (maxAngle !== undefined) {
this.maxAngle = maxAngle;
}
if (xAxis !== undefined) {
this.xAxis = xAxis;
}
if (yAxis !== undefined) {
this.yAxis = yAxis;
}
if (radius !== undefined) {
this.radius = radius;
}
if (center !== undefined) {
this.center = center;
}
}
}
Verb.ArcParametersDto = ArcParametersDto;
class EllipseArcParametersDto {
constructor(minAngle, maxAngle, xAxis, yAxis, center) {
if (minAngle !== undefined) {
this.minAngle = minAngle;
}
if (maxAngle !== undefined) {
this.maxAngle = maxAngle;
}
if (xAxis !== undefined) {
this.xAxis = xAxis;
}
if (yAxis !== undefined) {
this.yAxis = yAxis;
}
if (center !== undefined) {
this.center = center;
}
}
}
Verb.EllipseArcParametersDto = EllipseArcParametersDto;
class SurfaceDto {
constructor(surface) {
if (surface !== undefined) {
this.surface = surface;
}
}
}
Verb.SurfaceDto = SurfaceDto;
class SurfaceTransformDto {
constructor(surface, transformation) {
if (surface !== undefined) {
this.surface = surface;
}
if (transformation !== undefined) {
this.transformation = transformation;
}
}
}
Verb.SurfaceTransformDto = SurfaceTransformDto;
class SurfaceParameterDto {
constructor(surface, parameter, useV) {
if (surface !== undefined) {
this.surface = surface;
}
if (parameter !== undefined) {
this.parameter = parameter;
}
if (useV !== undefined) {
this.useV = useV;
}
}
}
Verb.SurfaceParameterDto = SurfaceParameterDto;
class IsocurvesParametersDto {
constructor(surface, parameters, useV) {
if (surface !== undefined) {
this.surface = surface;
}
if (parameters !== undefined) {
this.parameters = parameters;
}
if (useV !== undefined) {
this.useV = useV;
}
}
}
Verb.IsocurvesParametersDto = IsocurvesParametersDto;
class IsocurveSubdivisionDto {
/**
* Provide undefined options
*/
constructor(surface, useV, includeLast, includeFirst, isocurveSegments) {
/**
* Default parameter is on U direction, use V to switch
*/
this.useV = false;
/**
* Check to include the last isocurve
*/
this.includeLast = true;
/**
* Check to include the first isocurve
*/
this.includeFirst = true;
if (surface !== undefined) {
this.surface = surface;
}
if (useV !== undefined) {
this.useV = useV;
}
if (includeLast !== undefined) {
this.includeLast = includeLast;
}
if (includeFirst !== undefined) {
this.includeFirst = includeFirst;
}
if (isocurveSegments !== undefined) {
this.isocurveSegments = isocurveSegments;
}
}
}
Verb.IsocurveSubdivisionDto = IsocurveSubdivisionDto;
class DerivativesDto {
constructor(surface, u, v, numDerivatives) {
if (surface !== undefined) {
this.surface = surface;
}
if (u !== undefined) {
this.u = u;
}
if (v !== undefined) {
this.v = v;
}
if (numDerivatives !== undefined) {
this.numDerivatives = numDerivatives;
}
}
}
Verb.DerivativesDto = DerivativesDto;
class SurfaceLocationDto {
constructor(surface, u, v) {
if (surface !== undefined) {
this.surface = surface;
}
if (u !== undefined) {
this.u = u;
}
if (v !== undefined) {
this.v = v;
}
}
}
Verb.SurfaceLocationDto = SurfaceLocationDto;
class CornersDto {
constructor(point1, point2, point3, point4) {
if (point1 !== undefined) {
this.point1 = point1;
}
if (point2 !== undefined) {
this.point2 = point2;
}
if (point3 !== undefined) {
this.point3 = point3;
}
if (point4 !== undefined) {
this.point4 = point4;
}
}
}
Verb.CornersDto = CornersDto;
class SurfaceParamDto {
constructor(surface, point) {
if (surface !== undefined) {
this.surface = surface;
}
if (point !== undefined) {
this.point = point;
}
}
}
Verb.SurfaceParamDto = SurfaceParamDto;
class KnotsControlPointsWeightsDto {
constructor(degreeU, degreeV, knotsU, knotsV, points, weights) {
if (degreeU !== undefined) {
this.degreeU = degreeU;
}
if (degreeV !== undefined) {
this.degreeV = degreeV;
}
if (knotsU !== undefined) {
this.knotsU = knotsU;
}
if (knotsV !== undefined) {
this.knotsV = knotsV;
}
if (points !== undefined) {
this.points = points;
}
if (weights !== undefined) {
this.weights = weights;
}
}
}
Verb.KnotsControlPointsWeightsDto = KnotsControlPointsWeightsDto;
class LoftCurvesDto {
constructor(degreeV, curves) {
if (degreeV !== undefined) {
this.degreeV = degreeV;
}
if (curves !== undefined) {
this.curves = curves;
}
}
}
Verb.LoftCurvesDto = LoftCurvesDto;
class DrawSurfaceDto {
/**
* Provide options without default values
*/
constructor(surface, opacity, colours, updatable, hidden, surfaceMesh) {
/**
* Value between 0 and 1
*/
this.opacity = 1;
/**
* Hex colour string
*/
this.colours = "#444444";
/**
* Indicates wether the position of this surface will change in time
*/
this.updatable = false;
/**
* Should be hidden
*/
this.hidden = false;
if (surface !== undefined) {
this.surface = surface;
}
if (opacity !== undefined) {
this.opacity = opacity;
}
if (colours !== undefined) {
this.colours = colours;
}
if (updatable !== undefined) {
this.updatable = updatable;
}
if (hidden !== undefined) {
this.hidden = hidden;
}
if (surfaceMesh !== undefined) {
this.surfaceMesh = surfaceMesh;
}
}
}
Verb.DrawSurfaceDto = DrawSurfaceDto;
class DrawSurfacesDto {
/**
* Provide options without default values
*/
constructor(surfaces, opacity, colours, updatable, hidden, surfacesMesh) {
/**
* Value between 0 and 1
*/
this.opacity = 1;
/**
* Hex colour string
*/
this.colours = "#444444";
/**
* Indicates wether the position of these surfaces will change in time
*/
this.updatable = false;
/**
* Should be hidden
*/
this.hidden = false;
if (surfaces !== undefined) {
this.surfaces = surfaces;
}
if (opacity !== undefined) {
this.opacity = opacity;
}
if (colours !== undefined) {
this.colours = colours;
}
if (updatable !== undefined) {
this.updatable = updatable;
}
if (hidden !== undefined) {
this.hidden = hidden;
}
if (surfacesMesh !== undefined) {
this.surfacesMesh = surfacesMesh;
}
}
}
Verb.DrawSurfacesDto = DrawSurfacesDto;
class DrawSurfacesColoursDto {
/**
* Provide options without default values
*/
constructor(surfaces, colours, opacity, updatable, hidden, surfacesMesh) {
/**
* Value between 0 and 1
*/
this.opacity = 1;
/**
* Indicates wether the position of these surfaces will change in time
*/
this.updatable = false;
/**
* Indicates if surface should be hidden
*/
this.hidden = false;
if (surfaces !== undefined) {
this.surfaces = surfaces;
}
if (colours !== undefined) {
this.colours = colours;
}
if (opacity !== undefined) {
this.opacity = opacity;
}
if (updatable !== undefined) {
this.updatable = updatable;
}
if (hidden !== undefined) {
this.hidden = hidden;
}
if (surfacesMesh !== undefined) {
this.surfacesMesh = surfacesMesh;
}
}
}
Verb.DrawSurfacesColoursDto = DrawSurfacesColoursDto;
class ConeAndCylinderParametersDto {
constructor(axis, xAxis, base, height, radius) {
/**
* Defines main axis of the cone
*/
this.axis = [0, 1, 0];
/**
* X axis of the cone
*/
this.xAxis = [1, 0, 0];
/**
* Base point for the cone
*/
this.base = [0, 0, 0];
/**
* Height of the cone
*/
this.height = 2;
/**
* Radius of the cone
*/
this.radius = 1;
if (axis !== undefined) {
this.axis = axis;
}
if (xAxis !== undefined) {
this.xAxis = xAxis;
}
if (base !== undefined) {
this.base = base;
}
if (height !== undefined) {
this.height = height;
}
if (radius !== undefined) {
this.radius = radius;
}
}
}
Verb.ConeAndCylinderParametersDto = ConeAndCylinderParametersDto;
class ConeDto {
constructor(cone) {
if (cone !== undefined) {
this.cone = cone;
}
}
}
Verb.ConeDto = ConeDto;
class CylinderDto {
constructor(cylinder) {
if (cylinder !== undefined) {
this.cylinder = cylinder;
}
}
}
Verb.CylinderDto = CylinderDto;
class ExtrusionParametersDto {
constructor(profile, direction) {
if (profile !== undefined) {
this.profile = profile;
}
if (direction !== undefined) {
this.direction = direction;
}
}
}
Verb.ExtrusionParametersDto = ExtrusionParametersDto;
class ExtrusionDto {
constructor(extrusion) {
if (extrusion !== undefined) {
this.extrusion = extrusion;
}
}
}
Verb.ExtrusionDto = ExtrusionDto;
class SphericalParametersDto {
constructor(radius, center) {
if (radius !== undefined) {
this.radius = radius;
}
if (center !== undefined) {
this.center = center;
}
}
}
Verb.SphericalParametersDto = SphericalParametersDto;
class SphereDto {
constructor(sphere) {
if (sphere !== undefined) {
this.sphere = sphere;
}
}
}
Verb.SphereDto = SphereDto;
class RevolutionParametersDto {
constructor(profile, center, axis, angle) {
if (profile !== undefined) {
this.profile = profile;
}
if (center !== undefined) {
this.center = center;
}
if (axis !== undefined) {
this.axis = axis;
}
if (angle !== undefined) {
this.angle = angle;
}
}
}
Verb.RevolutionParametersDto = RevolutionParametersDto;
class RevolutionDto {
constructor(revolution) {
if (revolution !== undefined) {
this.revolution = revolution;
}
}
}
Verb.RevolutionDto = RevolutionDto;
class SweepParametersDto {
constructor(profile, rail) {
if (profile !== undefined) {
this.profile = profile;
}
if (rail !== undefined) {
this.rail = rail;
}
}
}
Verb.SweepParametersDto = SweepParametersDto;
class SweepDto {
constructor(sweep) {
if (sweep !== undefined) {
this.sweep = sweep;
}
}
}
Verb.SweepDto = SweepDto;
class CurveCurveDto {
constructor(firstCurve, secondCurve, tolerance) {
if (firstCurve !== undefined) {
this.firstCurve = firstCurve;
}
if (secondCurve !== undefined) {
this.secondCurve = secondCurve;
}
if (tolerance !== undefined) {
this.tolerance = tolerance;
}
}
}
Verb.CurveCurveDto = CurveCurveDto;
class CurveSurfaceDto {
constructor(curve, surface, tolerance) {
if (curve !== undefined) {
this.curve = curve;
}
if (surface !== undefined) {
this.surface = surface;
}
if (tolerance !== undefined) {
this.tolerance = tolerance;
}
}
}
Verb.CurveSurfaceDto = CurveSurfaceDto;
class SurfaceSurfaceDto {
constructor(firstSurface, secondSurface, tolerance) {
if (firstSurface !== undefined) {
this.firstSurface = firstSurface;
}
if (secondSurface !== undefined) {
this.secondSurface = secondSurface;
}
if (tolerance !== undefined) {
this.tolerance = tolerance;
}
}
}
Verb.SurfaceSurfaceDto = SurfaceSurfaceDto;
class CurveCurveIntersectionsDto {
constructor(intersections) {
if (intersections !== undefined) {
this.intersections = intersections;
}
}
}
Verb.CurveCurveIntersectionsDto = CurveCurveIntersectionsDto;
class CurveSurfaceIntersectionsDto {
constructor(intersections) {
if (intersections !== undefined) {
this.intersections = intersections;
}
}
}
Verb.CurveSurfaceIntersectionsDto = CurveSurfaceIntersectionsDto;
})(Verb || (Verb = {}));