UNPKG

@bitbybit-dev/base

Version:

Bit By Bit Developers Base CAD Library to Program Geometry

248 lines (247 loc) 7.06 kB
/* eslint-disable @typescript-eslint/no-namespace */ export var Line; (function (Line) { class LinePointsDto { /** * Provide options without default values */ constructor(start, end) { if (start !== undefined) { this.start = start; } if (end !== undefined) { this.end = end; } } } Line.LinePointsDto = LinePointsDto; class LineStartEndPointsDto { /** * Provide options without default values */ constructor(startPoints, endPoints) { if (startPoints !== undefined) { this.startPoints = startPoints; } if (endPoints !== undefined) { this.endPoints = endPoints; } } } Line.LineStartEndPointsDto = LineStartEndPointsDto; class DrawLineDto { /** * Provide options without default values */ constructor(line, opacity, colours, size, updatable, lineMesh) { /** * Value between 0 and 1 * @default 1 * @minimum 0 * @maximum 1 * @step 0.1 */ this.opacity = 1; /** * Hex colour string * @default #444444 */ this.colours = "#444444"; /** * Width of the line * @default 3 * @minimum 0 * @maximum Infinity * @step 0.1 */ this.size = 3; /** * Indicates wether the position of this line will change in time * @default false */ this.updatable = false; if (line !== undefined) { this.line = line; } 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 (lineMesh !== undefined) { this.lineMesh = lineMesh; } } } Line.DrawLineDto = DrawLineDto; class DrawLinesDto { /** * Provide options without default values */ constructor(lines, opacity, colours, size, updatable, linesMesh) { /** * Value between 0 and 1 * @default 1 * @minimum 0 * @maximum 1 * @step 0.1 */ this.opacity = 1; /** * Hex colour string * @default #444444 */ this.colours = "#444444"; /** * Width of the line * @default 3 * @minimum 0 * @maximum Infinity * @step 0.1 */ this.size = 3; /** * Indicates wether the position of these lines will change in time * @default false */ this.updatable = false; if (lines !== undefined) { this.lines = lines; } 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 (linesMesh !== undefined) { this.linesMesh = linesMesh; } } } Line.DrawLinesDto = DrawLinesDto; class PointsLinesDto { constructor(points) { if (points !== undefined) { this.points = points; } } } Line.PointsLinesDto = PointsLinesDto; class LineDto { constructor(line) { if (line !== undefined) { this.line = line; } } } Line.LineDto = LineDto; class SegmentDto { constructor(segment) { if (segment !== undefined) { this.segment = segment; } } } Line.SegmentDto = SegmentDto; class SegmentsDto { constructor(segments) { if (segments !== undefined) { this.segments = segments; } } } Line.SegmentsDto = SegmentsDto; class LinesDto { constructor(lines) { if (lines !== undefined) { this.lines = lines; } } } Line.LinesDto = LinesDto; class LineLineIntersectionDto { constructor(line1, line2, tolerance) { /** * Set to false if you want to check for infinite lines * @default true */ this.checkSegmentsOnly = true; if (line1 !== undefined) { this.line1 = line1; } if (line2 !== undefined) { this.line2 = line2; } if (tolerance !== undefined) { this.tolerance = tolerance; } } } Line.LineLineIntersectionDto = LineLineIntersectionDto; class PointOnLineDto { constructor(line, param) { /** * Param to use for point on line * @default 0.5 * @minimum -Infinity * @maximum Infinity * @step 0.1 */ this.param = 0.5; if (line !== undefined) { this.line = line; } if (param !== undefined) { this.param = param; } } } Line.PointOnLineDto = PointOnLineDto; class TransformLineDto { constructor(line, transformation) { if (line !== undefined) { this.line = line; } if (transformation !== undefined) { this.transformation = transformation; } } } Line.TransformLineDto = TransformLineDto; class TransformsLinesDto { constructor(lines, transformation) { if (lines !== undefined) { this.lines = lines; } if (transformation !== undefined) { this.transformation = transformation; } } } Line.TransformsLinesDto = TransformsLinesDto; class TransformLinesDto { constructor(lines, transformation) { if (lines !== undefined) { this.lines = lines; } if (transformation !== undefined) { this.transformation = transformation; } } } Line.TransformLinesDto = TransformLinesDto; })(Line || (Line = {}));