UNPKG

@bitbybit-dev/base

Version:

Bit By Bit Developers Base CAD Library to Program Geometry

67 lines (66 loc) 2.58 kB
import * as Inputs from "../inputs"; import { Polyline } from "./polyline"; import { Vector } from "./vector"; /** * Contains various mesh helper methods that are not necessarily present in higher level CAD kernels that bitbybit is using. */ export declare class MeshBitByBit { private readonly vector; private readonly polyline; constructor(vector: Vector, polyline: Polyline); /** * Computes the signed distance from a point to a plane. * @param inputs a point and a plane * @returns signed distance * @group base * @shortname signed dist to plane * @drawable false */ signedDistanceToPlane(inputs: Inputs.Mesh.SignedDistanceFromPlaneToPointDto): number; /** * Calculates the triangle plane from triangle. * @param inputs triangle and tolerance * @returns triangle plane * @group traingle * @shortname triangle plane * @drawable false */ calculateTrianglePlane(inputs: Inputs.Mesh.TriangleToleranceDto): Inputs.Base.TrianglePlane3 | undefined; /** * Calculates the intersection of two triangles. * @param inputs first triangle, second triangle, and tolerance * @returns intersection segment or undefined if no intersection * @group traingle * @shortname triangle-triangle int * @drawable false */ triangleTriangleIntersection(inputs: Inputs.Mesh.TriangleTriangleToleranceDto): Inputs.Base.Segment3 | undefined; /** * Computes the intersection segments of two meshes. * @param inputs first mesh, second mesh, and tolerance * @returns array of intersection segments * @group mesh * @shortname mesh-mesh int segments * @drawable false */ meshMeshIntersectionSegments(inputs: Inputs.Mesh.MeshMeshToleranceDto): Inputs.Base.Segment3[]; /** * Computes the intersection polylines of two meshes. * @param inputs first mesh, second mesh, and tolerance * @returns array of intersection polylines * @group mesh * @shortname mesh-mesh int polylines * @drawable true */ meshMeshIntersectionPolylines(inputs: Inputs.Mesh.MeshMeshToleranceDto): Inputs.Base.Polyline3[]; /** * Computes the intersection points of two meshes. * @param inputs first mesh, second mesh, and tolerance * @returns array of intersection points * @group mesh * @shortname mesh-mesh int points * @drawable false */ meshMeshIntersectionPoints(inputs: Inputs.Mesh.MeshMeshToleranceDto): Inputs.Base.Point3[][]; private computeIntersectionPoint; }