import { Base } from "@bitbybit-dev/base"; import { IO } from "@bitbybit-dev/base/lib/api/inputs/io-inputs"; import * as Models from "../models"; /** * Every parameter object the OpenCascade kernel accepts. The kernel works on a boundary * representation - vertices, edges, wires, faces, shells, solids and compounds - so most DTOs here * carry one or more shape handles plus the numbers that drive the operation: radii, lengths, * directions, tolerances and fillet or chamfer sizes. * * Two things are worth knowing before reading further. Shape arguments are opaque handles returned * by a previous call, not geometry you construct by hand, so operations chain: build a wire, turn it * into a face, extrude the face into a solid. And the names deliberately repeat across kernels - * there is a CircleDto here, another in Inputs.JSCAD, another in Inputs.Manifold and another in * Inputs.Verb - so check the namespace, not just the class name. */ export declare namespace OCCT { /** * A 3D geometric curve - the underlying mathematical curve, as opposed to the topological edge * that carries it. * * A handle to a shape living inside the OpenCascade kernel, not the geometry itself. The kernel * runs as WebAssembly with its own memory, so what crosses back into JavaScript is this small * reference; pass it to the next operation to keep building. It cannot be inspected or edited * directly - use the shapes and query APIs for that - and it stays valid until the kernel's cache * is cleared. */ type GeomCurvePointer = { hash: number; type: "occ-shape"; }; /** * A curve in 2D parameter space, used when working on a surface's own UV domain rather than in * world coordinates. * * A handle to a shape living inside the OpenCascade kernel, not the geometry itself. The kernel * runs as WebAssembly with its own memory, so what crosses back into JavaScript is this small * reference; pass it to the next operation to keep building. It cannot be inspected or edited * directly - use the shapes and query APIs for that - and it stays valid until the kernel's cache * is cleared. */ type Geom2dCurvePointer = { hash: number; type: "occ-shape"; }; /** * A geometric surface - the underlying mathematical surface, as opposed to the topological face * bounded by wires that sits on it. * * A handle to a shape living inside the OpenCascade kernel, not the geometry itself. The kernel * runs as WebAssembly with its own memory, so what crosses back into JavaScript is this small * reference; pass it to the next operation to keep building. It cannot be inspected or edited * directly - use the shapes and query APIs for that - and it stays valid until the kernel's cache * is cleared. */ type GeomSurfacePointer = { hash: number; type: "occ-shape"; }; /** * A vertex: a single point in the topological structure, the end of an edge. * * A handle to a shape living inside the OpenCascade kernel, not the geometry itself. The kernel * runs as WebAssembly with its own memory, so what crosses back into JavaScript is this small * reference; pass it to the next operation to keep building. It cannot be inspected or edited * directly - use the shapes and query APIs for that - and it stays valid until the kernel's cache * is cleared. */ type TopoDSVertexPointer = { hash: number; type: "occ-shape"; }; /** * An edge: a bounded piece of a curve between two vertices. * * A handle to a shape living inside the OpenCascade kernel, not the geometry itself. The kernel * runs as WebAssembly with its own memory, so what crosses back into JavaScript is this small * reference; pass it to the next operation to keep building. It cannot be inspected or edited * directly - use the shapes and query APIs for that - and it stays valid until the kernel's cache * is cleared. */ type TopoDSEdgePointer = { hash: number; type: "occ-shape"; }; /** * A wire: a connected sequence of edges. A closed planar wire is what you turn into a face. * * A handle to a shape living inside the OpenCascade kernel, not the geometry itself. The kernel * runs as WebAssembly with its own memory, so what crosses back into JavaScript is this small * reference; pass it to the next operation to keep building. It cannot be inspected or edited * directly - use the shapes and query APIs for that - and it stays valid until the kernel's cache * is cleared. */ type TopoDSWirePointer = { hash: number; type: "occ-shape"; }; /** * A face: a bounded region of a surface, outlined by wires. Extrude, revolve or loft a face to * get a solid. * * A handle to a shape living inside the OpenCascade kernel, not the geometry itself. The kernel * runs as WebAssembly with its own memory, so what crosses back into JavaScript is this small * reference; pass it to the next operation to keep building. It cannot be inspected or edited * directly - use the shapes and query APIs for that - and it stays valid until the kernel's cache * is cleared. */ type TopoDSFacePointer = { hash: number; type: "occ-shape"; }; /** * A shell: a set of faces joined along their edges. Close a shell and it can become a solid. * * A handle to a shape living inside the OpenCascade kernel, not the geometry itself. The kernel * runs as WebAssembly with its own memory, so what crosses back into JavaScript is this small * reference; pass it to the next operation to keep building. It cannot be inspected or edited * directly - use the shapes and query APIs for that - and it stays valid until the kernel's cache * is cleared. */ type TopoDSShellPointer = { hash: number; type: "occ-shape"; }; /** * A solid: a closed, watertight volume, and the shape kind most downstream operations and * exporters expect. * * A handle to a shape living inside the OpenCascade kernel, not the geometry itself. The kernel * runs as WebAssembly with its own memory, so what crosses back into JavaScript is this small * reference; pass it to the next operation to keep building. It cannot be inspected or edited * directly - use the shapes and query APIs for that - and it stays valid until the kernel's cache * is cleared. */ type TopoDSSolidPointer = { hash: number; type: "occ-shape"; }; /** * A compound solid: several solids sharing faces, as in a partitioned volume. * * A handle to a shape living inside the OpenCascade kernel, not the geometry itself. The kernel * runs as WebAssembly with its own memory, so what crosses back into JavaScript is this small * reference; pass it to the next operation to keep building. It cannot be inspected or edited * directly - use the shapes and query APIs for that - and it stays valid until the kernel's cache * is cleared. */ type TopoDSCompSolidPointer = { hash: number; type: "occ-shape"; }; /** * A compound: an arbitrary grouping of shapes of any kind, moved and exported as one while * remaining separate inside. * * A handle to a shape living inside the OpenCascade kernel, not the geometry itself. The kernel * runs as WebAssembly with its own memory, so what crosses back into JavaScript is this small * reference; pass it to the next operation to keep building. It cannot be inspected or edited * directly - use the shapes and query APIs for that - and it stays valid until the kernel's cache * is cleared. */ type TopoDSCompoundPointer = { hash: number; type: "occ-shape"; }; /** * A handle to an OpenCascade document - the container used for assemblies, holding a shape * hierarchy along with names, colors and placements. This is what STEP assembly import and export * work against, as opposed to a single loose shape. */ type TDocStdDocumentPointer = { hash: number; type: "occ-entity"; }; /** * Any shape handle, whatever its kind - vertex, edge, wire, face, shell, solid or compound. * Operations that work on shapes generically take this; ones that need a specific kind take the * specific pointer type instead, which is how the types stop you passing an edge where a solid is * required. */ type TopoDSShapePointer = TopoDSVertexPointer | TopoDSEdgePointer | TopoDSWirePointer | TopoDSFacePointer | TopoDSShellPointer | TopoDSSolidPointer | TopoDSCompoundPointer; /** * How an offset fills the outside of a corner. arc rounds it, intersection extends both sides to * their meeting point and leaves a sharp corner, tangent continues each side tangentially. arc is * the safe default; intersection can fail on tight corners where the extensions do not meet. */ enum joinTypeEnum { arc = "arc", intersection = "intersection", tangent = "tangent" } /** * How an offset treats the original shape. skin offsets the surface and keeps only the new skin, * pipe builds the swept volume between old and new, rectoVerso offsets in both directions at once. */ enum bRepOffsetModeEnum { skin = "skin", pipe = "pipe", rectoVerso = "rectoVerso" } /** * How points are spaced along a curve when it is approximated. approxChordLength spaces by * distance, approxCentripetal reduces overshoot near sharp turns, approxIsoParametric spaces * evenly in parameter space. Centripetal is usually the best behaved for interpolation through * unevenly spaced points. */ enum approxParametrizationTypeEnum { approxChordLength = "approxChordLength", approxCentripetal = "approxCentripetal", approxIsoParametric = "approxIsoParametric" } /** * Which side of the original geometry an operation works on: outside, inside, or centerd on it. */ enum directionEnum { outside = "outside", inside = "inside", middle = "middle" } /** * The CAD interchange format for import and export: STEP or IGES. STEP is the modern choice and * preserves solids and assemblies; IGES is older and surface-oriented. */ enum fileTypeEnum { iges = "iges", step = "step" } /** * A shape's orientation within its parent, in OpenCascade's own terms. forward and reversed decide * which way a face points and therefore which side is material; internal and external mark shapes * that lie inside or outside the volume without bounding it. */ enum topAbsOrientationEnum { forward = "forward", reversed = "reversed", internal = "internal", external = "external" } /** * Where a point or a shape sits relative to another: in, out, on the boundary, or unknown. This is * what classification and containment queries return. */ enum topAbsStateEnum { in = "in", out = "out", on = "on", unknown = "unknown" } /** * The kind of a topological shape - vertex, edge, wire, face, shell, solid, compound solid, * compound, or the generic shape. Used to filter the results of a query and to check what an * operation actually produced. */ enum shapeTypeEnum { unknown = "unknown", vertex = "vertex", edge = "edge", wire = "wire", face = "face", shell = "shell", solid = "solid", compSolid = "compSolid", compound = "compound", shape = "shape" } /** * How a construction constraint qualifies the geometry it references: unqualified, enclosing, * enclosed, outside, or no qualifier. Constrained constructions - a circle tangent to two others - * can have several valid answers, and this narrows which one is wanted. */ enum gccEntPositionEnum { unqualified = "unqualified", enclosing = "enclosing", enclosed = "enclosed", outside = "outside", noqualifier = "noqualifier" } /** * Which of the results of a two-sided construction to keep: the first side, the second, or all of * them. */ enum positionResultEnum { keepSide1 = "keepSide1", keepSide2 = "keepSide2", all = "all" } /** * Whether a construction includes the referenced circle, and if so on which side: none, the first * side, or the second. */ enum circleInclusionEnum { none = "none", keepSide1 = "keepSide1", keepSide2 = "keepSide2" } /** * Which combination of two circles a construction includes: neither, both outside, both inside, or * one of each in either order. */ enum twoCircleInclusionEnum { none = "none", outside = "outside", inside = "inside", outsideInside = "outsideInside", insideOutside = "insideOutside" } /** * Which combination of sides a four-sided construction keeps: outside, inside, or one of the two * mixed orders. */ enum fourSidesStrictEnum { outside = "outside", inside = "inside", outsideInside = "outsideInside", insideOutside = "insideOutside" } /** * Which side of a two-sided construction to keep: outside or inside. */ enum twoSidesStrictEnum { outside = "outside", inside = "inside" } /** * How a list of circles is paired up when building faces between them: every circle with every * other, sequentially in order, or sequentially and then closing back to the first. */ enum combinationCirclesForFaceEnum { allWithAll = "allWithAll", inOrder = "inOrder", inOrderClosed = "inOrderClosed" } /** * What kind of shape a generic operation should return - a curve, an edge, a wire or a face - when * the result could reasonably be expressed as more than one of them. */ enum typeSpecificityEnum { curve = 0, edge = 1, wire = 2, face = 3 } /** * Which projected points to return when a projection has several solutions: all of them, the * closest, the furthest, or both extremes. */ enum pointProjectionTypeEnum { all = "all", closest = "closest", furthest = "furthest", closestAndFurthest = "closestAndFurthest" } /** * How the profile is oriented as it travels along the path in a sweep. This is the setting that * decides whether a swept shape twists. isFrenet follows the path's natural curvature and can flip * at inflection points; isCorrectedFrenet removes that flipping and is the usual choice; isFixed * keeps the profile's orientation constant; the isGuide variants steer the profile using a second * guide curve. */ enum geomFillTrihedronEnum { isCorrectedFrenet = "isCorrectedFrenet", isFixed = "isFixed", isFrenet = "isFrenet", isConstantNormal = "isConstantNormal", isDarboux = "isDarboux", isGuideAC = "isGuideAC", isGuidePlan = "isGuidePlan", isGuideACWithContact = "isGuideACWithContact", isGuidePlanWithContact = "isGuidePlanWithContact", isDiscreteTrihedron = "isDiscreteTrihedron" } /** * How colors are written into a DXF file: ACI index colors, which every DXF reader understands, * or true color, which is exact but less widely supported. */ enum dxfColorFormatEnum { aci = "aci", truecolor = "truecolor" } /** * Which AutoCAD DXF version to write. AC1009 is R12, the most compatible; AC1015 is 2000 and * supports more entity types. */ enum dxfAcadVersionEnum { AC1009 = "AC1009", AC1015 = "AC1015" } /** * How a dimension line terminates: with nothing, or with an arrowhead. */ enum dimensionEndTypeEnum { none = "none", arrow = "arrow" } /** * How a wire is built through a list of points: polyline joins them with straight segments, * interpolated fits a smooth curve that passes through every one. */ enum wireFromPointsTypeEnum { polyline = "polyline", interpolated = "interpolated" } /** * How corners are detected. auto handles any geometry; planarOnly restricts detection to planar * faces, which is faster and avoids false positives on curved surfaces. */ enum cornerModeEnum { auto = "auto", planarOnly = "planarOnly" } /** * The triangle mesh of a shape as `shapeToMesh` returns it: one entry per face with its triangles, * one per edge with its points, and the vertex points, ready for drawing. */ class DecomposedMeshDto { constructor(faceList?: DecomposedFaceDto[], edgeList?: DecomposedEdgeDto[]); /** * One entry per face with its triangulation. */ faceList: DecomposedFaceDto[]; /** * One entry per edge with the points that trace it. */ edgeList: DecomposedEdgeDto[]; /** * The points of the shape's standalone vertices. */ pointsList: Base.Point3[]; /** * Which faces carry which color, keyed by `#rrggbbaa`; present only for meshes made from an * assembly document. * @optional true */ colorGroups?: { [color: string]: number[]; } | undefined; } /** * The triangulation of one face inside a `DecomposedMeshDto`: flat coordinate lists the way * graphics libraries take them, plus optional facts about the face when `computeMetadata` was set. */ class DecomposedFaceDto { /** * The position of the face in the shape, counting from 0 in the order `shapes.face.getFaces` * uses. */ faceIndex: number; /** * The vertex normals as a flat list of x, y, z triples, one per vertex. */ normalCoord: number[]; /** * How many triangles the face was cut into. */ numberOfTriangles: number; /** * The triangles as a flat list of vertex indexes, three per triangle. */ triIndexes: number[]; /** * The vertex positions as a flat list of x, y, z triples. */ vertexCoord: number[]; /** * The same vertex positions as a list of points. */ vertexCoordVec: Base.Vector3[]; /** * A point in the middle of the face's parameter range, on the surface. */ centerPoint: Base.Point3; /** * The surface normal at `centerPoint`. */ centerNormal: Base.Vector3; /** * The texture coordinates as a flat list of u, v pairs, one per vertex. */ uvs: number[]; /** * The surface area of the face in square model units; present only with `computeMetadata`. * @optional true */ area?: number | undefined; /** * The center of mass of the face; present only with `computeMetadata`. * @optional true */ centerOfMass?: Base.Point3 | undefined; /** * The kind of surface the face lies on, such as `Plane`, `Cylinder` or `BSplineSurface`; * present only with `computeMetadata`. * @optional true */ surfaceType?: string | undefined; /** * The geometric tolerance of the face in model units; present only with `computeMetadata`. * @optional true */ tolerance?: number | undefined; /** * The indexes of the faces that share an edge with this one; present only with * `computeMetadata`. * @optional true */ adjacentFaces?: number[] | undefined; /** * The face's stable id in the shape's graph, or -1 when unavailable; present only with * `computeMetadata`. * @optional true */ faceUid?: number | undefined; } /** * One edge inside a `DecomposedMeshDto`: the points that trace it for drawing, plus optional facts * about the edge when `computeMetadata` was set. */ class DecomposedEdgeDto { /** * The position of the edge in the shape, counting from 0 in the order `shapes.edge.getEdges` * uses. */ edgeIndex: number; /** * A point halfway along the edge's parameter range. */ middlePoint: Base.Point3; /** * The points that trace the edge, in order, close enough to draw it as a polyline. */ vertexCoord: Base.Vector3[]; /** * The length of the edge in model units; present only with `computeMetadata`. * @optional true */ length?: number | undefined; /** * The center of mass of the edge; present only with `computeMetadata`. * @optional true */ centerOfMass?: Base.Point3 | undefined; /** * The kind of curve the edge follows, such as `Line`, `Circle` or `BSplineCurve`; present only * with `computeMetadata`. * @optional true */ curveType?: string | undefined; /** * True when the edge has no 3D curve, such as the seam at the pole of a sphere; present only * with `computeMetadata`. * @optional true */ degenerated?: boolean | undefined; /** * The indexes of the faces this edge belongs to; present only with `computeMetadata`. * @optional true */ incidentFaces?: number[] | undefined; /** * The edge's stable id in the shape's graph, or -1 when unavailable; present only with * `computeMetadata`. * @optional true */ edgeUid?: number | undefined; } /** * A list of shapes for the methods that take several at once, such as `shapes.face.getFacesAreas` * or `shapes.wire.getWiresLengths`. */ class ShapesDto { constructor(shapes?: T[]); /** * The shapes to work on, in the order the results should come back. * @default undefined */ shapes: T[]; } /** * One point for `shapes.vertex.vertexFromPoint`, which turns it into a vertex shape. */ class PointDto { constructor(point?: Base.Point3); /** * The position of the vertex, in model units. * @default [0, 0, 0] */ point: Base.Point3; } /** * Three coordinates for `shapes.vertex.vertexFromXYZ`, which turns them into a vertex shape. */ class XYZDto { constructor(x?: number, y?: number, z?: number); /** * The X coordinate, in model units. * @default 0 * @minimum -Infinity * @maximum Infinity * @step 0.1 */ x: number; /** * The Y coordinate, in model units; Y is up. * @default 0 * @minimum -Infinity * @maximum Infinity * @step 0.1 */ y: number; /** * The Z coordinate, in model units. * @default 0 * @minimum -Infinity * @maximum Infinity * @step 0.1 */ z: number; } /** * A list of points for the methods that build shapes from them, such as * `shapes.vertex.verticesFromPoints`, `shapes.edge.fromPoints` and `shapes.wire.fromPoints`. */ class PointsDto { constructor(points?: Base.Point3[]); /** * The points, in the order the shapes should follow them. * @default undefined */ points: Base.Point3[]; } /** * A circle, a point outside it and the filtering options for * `shapes.edge.constraintTanLinesFromPtToCircle`, which draws the tangent lines from the point to * the circle. */ class ConstraintTanLinesFromPtToCircleDto { constructor(circle?: T, point?: Base.Point3, tolerance?: number, positionResult?: positionResultEnum, circleRemainder?: circleInclusionEnum); /** * The circle edge the lines must touch. * @default undefined */ circle: T; /** * The point the lines start from; it must lie outside the circle. * @default undefined */ point: Base.Point3; /** * How close a line must come to the circle to count as touching it, in model units. * @default 1e-7 * @minimum 0 * @maximum Infinity * @step 0.00001 */ tolerance: number; /** * Which lines to keep: those on one side of the circle, the other side, or all of them. * @default all */ positionResult: positionResultEnum; /** * Whether to add the piece of the circle between the touching points on one side or the other; * `none` adds nothing. * @default none */ circleRemainder: circleInclusionEnum; } /** * A circle, two points and the filtering options for * `shapes.edge.constraintTanLinesFromTwoPtsToCircle`, which draws the tangent lines from each point * to the circle. */ class ConstraintTanLinesFromTwoPtsToCircleDto { constructor(circle?: T, point1?: Base.Point3, point2?: Base.Point3, tolerance?: number, positionResult?: positionResultEnum, circleRemainder?: circleInclusionEnum); /** * The circle edge the lines must touch. * @default undefined */ circle: T; /** * The first point the lines start from; it must lie outside the circle. * @default undefined */ point1: Base.Point3; /** * The second point the lines start from; it must lie outside the circle. * @default undefined */ point2: Base.Point3; /** * How close a line must come to the circle to count as touching it, in model units. * @default 1e-7 * @minimum 0 * @maximum Infinity * @step 0.00001 */ tolerance: number; /** * Which lines to keep: those on one side of the circle, the other side, or all of them. * @default all */ positionResult: positionResultEnum; /** * Whether to add the piece of the circle between the touching points on one side or the other; * `none` adds nothing. * @default none */ circleRemainder: circleInclusionEnum; } /** * Two circles and the filtering options for `shapes.edge.constraintTanLinesOnTwoCircles` and * `shapes.wire.createWireFromTwoCirclesTan`, which draw the lines that touch both circles. */ class ConstraintTanLinesOnTwoCirclesDto { constructor(circle1?: T, circle2?: T, tolerance?: number, positionResult?: positionResultEnum, circleRemainders?: twoCircleInclusionEnum); /** * The first circle edge the lines must touch. * @default undefined */ circle1: T; /** * The second circle edge the lines must touch. * @default undefined */ circle2: T; /** * How close a line must come to a circle to count as touching it, in model units. * @default 1e-7 * @minimum 0 * @maximum Infinity * @step 0.00001 */ tolerance: number; /** * Which lines to keep: the outer pair, the crossing inner pair, or all of them. * @default all */ positionResult: positionResultEnum; /** * Which pieces of the circles between the touching points to add: the outside arcs, the inside * arcs, one of each, or `none`. * @default none */ circleRemainders: twoCircleInclusionEnum; } /** * Two circles and a radius for `shapes.edge.constraintTanCirclesOnTwoCircles`, which draws the * circles of that radius touching both. */ class ConstraintTanCirclesOnTwoCirclesDto { constructor(circle1?: T, circle2?: T, tolerance?: number, radius?: number); /** * The first circle edge the new circles must touch. * @default undefined */ circle1: T; /** * The second circle edge the new circles must touch. * @default undefined */ circle2: T; /** * How close a circle must come to the others to count as touching, in model units. * @default 1e-7 * @minimum 0 * @maximum Infinity * @step 0.00001 */ tolerance: number; /** * The radius of the circles to draw, in model units. * @default 0.3 * @minimum 0 * @maximum Infinity * @step 0.1 */ radius: number; } /** * A circle, a point and a radius for `shapes.edge.constraintTanCirclesOnCircleAndPnt`, which draws * the circles of that radius through the point that touch the circle. */ class ConstraintTanCirclesOnCircleAndPntDto { constructor(circle?: T, point?: Base.Point3, tolerance?: number, radius?: number); /** * The circle edge the new circles must touch. * @default undefined */ circle: T; /** * The point the new circles must pass through. * @default undefined */ point: Base.Point3; /** * How close a circle must come to the other to count as touching, in model units. * @default 1e-7 * @minimum 0 * @maximum Infinity * @step 0.00001 */ tolerance: number; /** * The radius of the circles to draw, in model units. * @default 0.3 * @minimum 0 * @maximum Infinity * @step 0.1 */ radius: number; } /** * A 2D curve and a surface for `shapes.edge.makeEdgeFromGeom2dCurveAndSurface`, which lays the * curve onto the surface as an edge. */ class CurveAndSurfaceDto { constructor(curve?: T, surface?: U); /** * The 2D curve, drawn in the surface's UV space. * @default undefined */ curve: T; /** * The surface the curve is laid onto. * @default undefined */ surface: U; } /** * Two edges in a plane, the plane and a radius for `fillets.filletTwoEdgesInPlaneIntoAWire`, which * joins them with a rounding arc. */ class FilletTwoEdgesInPlaneDto { constructor(edge1?: T, edge2?: T, planeOrigin?: Base.Point3, planeDirection?: Base.Vector3, radius?: number, solution?: number); /** * The first edge to join. * @default undefined */ edge1: T; /** * The second edge to join. * @default undefined */ edge2: T; /** * A point on the plane the edges lie in; with `solution` at -1 it also picks the arc nearest to * it. * @default [0, 0, 0] */ planeOrigin: Base.Point3; /** * The normal of the plane the edges lie in. * @default [0, 1, 0] */ planeDirection: Base.Vector3; /** * The radius of the rounding arc, in model units. * @default 0.3 * @minimum 0 * @maximum Infinity * @step 0.1 */ radius: number; /** * Which arc to use when several fit, counted from 0; -1 takes the one nearest `planeOrigin`. * @default -1 * @optional true */ solution?: number | undefined; } /** * A shape and points for `operations.closestPointsOnShapeFromPoints` and * `operations.distancesToShapeFromPoints`. */ class ClosestPointsOnShapeFromPointsDto { constructor(shape?: T, points?: Base.Point3[]); /** * The shape the closest points are looked for on. * @default undefined */ shape: T; /** * The points to measure from, in the order the results should come back. * @default undefined */ points: Base.Point3[]; } /** * A bounding box description, as `operations.boundingBoxOfShape` returns it, wrapped for passing * on. */ class BoundingBoxDto { constructor(bbox?: BoundingBoxPropsDto); /** * The box as its corners, center and size. * @default undefined * @optional true */ bbox?: BoundingBoxPropsDto | undefined; } /** * The axis-aligned box around a shape, as `operations.boundingBoxOfShape` returns it. */ class BoundingBoxPropsDto { constructor(min?: Base.Point3, max?: Base.Point3, center?: Base.Point3, size?: Base.Vector3); /** * The corner with the smallest X, Y and Z. * @default [0, 0, 0] */ min: Base.Point3; /** * The corner with the largest X, Y and Z. * @default [0, 0, 0] */ max: Base.Point3; /** * The point halfway between the two corners. * @default [0, 0, 0] */ center: Base.Point3; /** * The extent along X, Y and Z, in model units. * @default [0, 0, 0] */ size: Base.Vector3; } /** * The sphere around a shape, as `operations.boundingSphereOfShape` returns it. */ class BoundingSpherePropsDto { constructor(center?: Base.Point3, radius?: number); /** * The center of the sphere, which is the center of the shape's bounding box. * @default [0, 0, 0] */ center: Base.Point3; /** * The distance from the center to the box's corner, in model units. * @default 0 * @minimum 0 * @maximum Infinity * @step 0.1 */ radius: number; } /** * A wire and points for `shapes.wire.splitOnPoints`, which cuts the wire at the points. */ class SplitWireOnPointsDto { constructor(shape?: T, points?: Base.Point3[]); /** * The wire to cut into pieces. * @default undefined */ shape: T; /** * Where to cut; each point is moved to the closest place on the wire first. * @default undefined */ points: Base.Point3[]; } /** * Shapes and points for `operations.closestPointsOnShapesFromPoints`, which finds the closest point * on every shape for every point. */ class ClosestPointsOnShapesFromPointsDto { constructor(shapes?: T[], points?: Base.Point3[]); /** * The shapes the closest points are looked for on, in the order the result groups them. * @default undefined */ shapes: T[]; /** * The points to measure from. * @default undefined */ points: Base.Point3[]; } /** * Two shapes for `operations.closestPointsBetweenTwoShapes`, which finds the pair of points where * they come closest. */ class ClosestPointsBetweenTwoShapesDto { constructor(shape1?: T, shape2?: T); /** * The first shape; the first point of the result lies on it. * @default undefined */ shape1: T; /** * The second shape; the second point of the result lies on it. * @default undefined */ shape2: T; } /** * A surface, a wire on it and a side for `shapes.face.faceFromSurfaceAndWire`. */ class FaceFromSurfaceAndWireDto { constructor(surface?: T, wire?: U, inside?: boolean); /** * The surface the face is cut from. * @default undefined */ surface: T; /** * The wire lying on the surface that bounds the face. * @default undefined */ wire: U; /** * When true, the wire is turned so the face is the region it encloses; when false the wire's * own direction decides. * @default true */ inside: boolean; } /** * A flat wire and a face for `shapes.wire.placeWireOnFace`, which maps the wire onto the face's * surface. */ class WireOnFaceDto { constructor(wire?: T, face?: U); /** * The wire drawn on the ground plane; its Z coordinate becomes U and its X coordinate V. * @default undefined */ wire: T; /** * The face whose surface the wire is mapped onto. * @default undefined */ face: U; } /** * A shape and how to draw it, for the renderer packages' shape drawing: colors and opacity of * faces, edges and vertices, what to show, and how finely to mesh the shape. */ class DrawShapeDto { /** * Provide options without default values */ constructor(shape?: T, faceOpacity?: number, edgeOpacity?: number, edgeColour?: Base.Color, faceMaterial?: Base.Material, faceColour?: Base.Color, edgeWidth?: number, drawEdges?: boolean, drawFaces?: boolean, drawVertices?: boolean, vertexColour?: Base.Color, vertexSize?: number, precision?: number, drawEdgeIndexes?: boolean, edgeIndexHeight?: number, edgeIndexColour?: Base.Color, drawFaceIndexes?: boolean, faceIndexHeight?: number, faceIndexColour?: Base.Color, drawTwoSided?: boolean, backFaceColour?: Base.Color, backFaceOpacity?: number, keepMeshData?: boolean, allowQualityDecrease?: boolean, forceFaceDeflection?: boolean); /** * The shape to draw; it is meshed at `precision` first. * @default undefined * @optional true */ shape?: T | undefined; /** * How opaque the faces are, from 0 for invisible to 1 for solid. * @default 1 * @minimum 0 * @maximum 1 * @step 0.1 */ faceOpacity: number; /** * How opaque the edges are, from 0 for invisible to 1 for solid. * @default 1 * @minimum 0 * @maximum 1 * @step 0.1 */ edgeOpacity: number; /** * The color of the edges as a hex string such as `#ffffff`. * @default #ffffff */ edgeColour: Base.Color; /** * A material for the faces from the rendering engine; when given it replaces the face color. * @default undefined * @optional true */ faceMaterial?: Base.Material | undefined; /** * The color of the faces as a hex string such as `#ff0000`. * @default #ff0000 */ faceColour: Base.Color; /** * How thick the edge lines are drawn. * @default 2 * @minimum 0 * @maximum Infinity * @step 0.1 */ edgeWidth: number; /** * When false, the edges are not drawn. * @default true */ drawEdges: boolean; /** * When false, the faces are not drawn. * @default true */ drawFaces: boolean; /** * When true, the vertices are drawn as small markers. * @default false */ drawVertices: boolean; /** * The color of the vertex markers as a hex string. * @default #ff00ff */ vertexColour: string; /** * The size of the vertex markers, in model units. * @default 0.03 * @minimum 0 * @maximum Infinity * @step 0.01 */ vertexSize: number; /** * The meshing tolerance in model units; a smaller value follows curved surfaces more closely * with more triangles. * @default 0.01 * @minimum 0 * @maximum Infinity * @step 0.01 */ precision: number; /** * When true, each edge's index is written next to it, handy for picking edges to fillet. * @default false */ drawEdgeIndexes: boolean; /** * The height of the edge index labels, in model units. * @default 0.06 * @minimum 0 * @maximum Infinity * @step 0.01 */ edgeIndexHeight: number; /** * The color of the edge index labels as a hex string. * @default #ff00ff */ edgeIndexColour: Base.Color; /** * When true, each face's index is written on it, handy for picking faces. * @default false */ drawFaceIndexes: boolean; /** * The height of the face index labels, in model units. * @default 0.06 * @minimum 0 * @maximum Infinity * @step 0.01 */ faceIndexHeight: number; /** * The color of the face index labels as a hex string. * @default #0000ff */ faceIndexColour: Base.Color; /** * When true, the back of each face is drawn in its own color, which shows which way faces * point. * @default true */ drawTwoSided: boolean; /** * The color of the back of the faces as a hex string; used only with `drawTwoSided`. * @default #0000ff */ backFaceColour: Base.Color; /** * How opaque the back of the faces is, from 0 to 1; used only with `drawTwoSided`. * @default 1 * @minimum 0 * @maximum 1 * @step 0.1 */ backFaceOpacity: number; /** * When true, the triangulation stays cached on the shape after drawing; when false it is * cleared so memory does not grow across draws. * @default false */ keepMeshData: boolean; /** * When true, a shape already meshed more finely may be remeshed at the coarser precision asked * for. * @default true */ allowQualityDecrease: boolean; /** * When true, every face is remeshed at the requested precision even when a triangulation is * cached. * @default false */ forceFaceDeflection: boolean; } /** * Shapes and how to draw them, for the renderer packages' shape drawing: the same options as * `DrawShapeDto`, applied to every shape in the list. */ class DrawShapesDto { /** * Provide options without default values */ constructor(shapes?: T[], faceOpacity?: number, edgeOpacity?: number, edgeColour?: Base.Color, faceMaterial?: Base.Material, faceColour?: Base.Color, edgeWidth?: number, drawEdges?: boolean, drawFaces?: boolean, drawVertices?: boolean, vertexColour?: Base.Color, vertexSize?: number, precision?: number, drawEdgeIndexes?: boolean, edgeIndexHeight?: number, edgeIndexColour?: Base.Color, drawFaceIndexes?: boolean, faceIndexHeight?: number, faceIndexColour?: Base.Color, drawTwoSided?: boolean, backFaceColour?: Base.Color, backFaceOpacity?: number, keepMeshData?: boolean, allowQualityDecrease?: boolean, forceFaceDeflection?: boolean); /** * The shapes to draw with the same options. * @default undefined */ shapes: T[]; /** * How opaque the faces are, from 0 for invisible to 1 for solid. * @default 1 * @minimum 0 * @maximum 1 * @step 0.1 */ faceOpacity: number; /** * How opaque the edges are, from 0 for invisible to 1 for solid. * @default 1 * @minimum 0 * @maximum 1 * @step 0.1 */ edgeOpacity: number; /** * The color of the edges as a hex string such as `#ffffff`. * @default #ffffff */ edgeColour: Base.Color; /** * A material for the faces from the rendering engine; when given it replaces the face color. * @default undefined * @optional true */ faceMaterial?: Base.Material | undefined; /** * The color of the faces as a hex string such as `#ff0000`. * @default #ff0000 */ faceColour: Base.Color; /** * How thick the edge lines are drawn. * @default 2 * @minimum 0 * @maximum Infinity * @step 0.1 */ edgeWidth: number; /** * When false, the edges are not drawn. * @default true */ drawEdges: boolean; /** * When false, the faces are not drawn. * @default true */ drawFaces: boolean; /** * When true, the vertices are drawn as small markers. * @default false */ drawVertices: boolean; /** * The color of the vertex markers as a hex string. * @default #ff00ff */ vertexColour: string; /** * The size of the vertex markers, in model units. * @default 0.03 * @minimum 0 * @maximum Infinity * @step 0.01 */ vertexSize: number; /** * The meshing tolerance in model units; a smaller value follows curved surfaces more closely * with more triangles. * @default 0.01 * @minimum 0 * @maximum Infinity * @step 0.01 */ precision: number; /** * When true, each edge's index is written next to it, handy for picking edges to fillet. * @default false */ drawEdgeIndexes: boolean; /** * The height of the edge index labels, in model units. * @default 0.06 * @minimum 0 * @maximum Infinity * @step 0.01 */ edgeIndexHeight: number; /** * The color of the edge index labels as a hex string. * @default #ff00ff */ edgeIndexColour: Base.Color; /** * When true, each face's index is written on it, handy for picking faces. * @default false */ drawFaceIndexes: boolean; /** * The height of the face index labels, in model units. * @default 0.06 * @minimum 0 * @maximum Infinity * @step 0.01 */ faceIndexHeight: number; /** * The color of the face index labels as a hex string. * @default #0000ff */ faceIndexColour: Base.Color; /** * When true, the back of each face is drawn in its own color, which shows which way faces * point. * @default true */ drawTwoSided: boolean; /** * The color of the back of the faces as a hex string; used only with `drawTwoSided`. * @default #0000ff */ backFaceColour: Base.Color; /** * How opaque the back of the faces is, from 0 to 1; used only with `drawTwoSided`. * @default 1 * @minimum 0 * @maximum 1 * @step 0.1 */ backFaceOpacity: number; /** * When true, the triangulation stays cached on each shape after drawing; when false it is * cleared so memory does not grow across draws. * @default false */ keepMeshData: boolean; /** * When true, a shape already meshed more finely may be remeshed at the coarser precision asked * for. * @default true */ allowQualityDecrease: boolean; /** * When true, every face is remeshed at the requested precision even when a triangulation is * cached. * @default false */ forceFaceDeflection: boolean; } /** * A face and a grid of divisions for `shapes.face.subdivideToPoints`, `subdivideToNormals` and * `subdivideToUV`; the U and V counts set the grid, the shift and removal flags adjust its rows. */ class FaceSubdivisionDto { /** * Provide options without default values */ constructor(shape?: T, nrDivisionsU?: number, nrDivisionsV?: number, shiftHalfStepU?: boolean, removeStartEdgeU?: boolean, removeEndEdgeU?: boolean, shiftHalfStepV?: boolean, removeStartEdgeV?: boolean, removeEndEdgeV?: boolean); /** * The face to lay the grid over. * @default undefined */ shape: T; /** * How many rows of points across the U range, edge to edge. * @default 10 * @minimum 1 * @maximum Infinity * @step 1 */ nrDivisionsU: number; /** * How many points along each row across the V range, edge to edge. * @default 10 * @minimum 1 * @maximum Infinity * @step 1 */ nrDivisionsV: number; /** * When true, every point moves half a step in U; on a closed face such as a cylinder this keeps * points off the seam. * @default false */ shiftHalfStepU: boolean; /** * When true, the row at the start of the U range is left out. * @default false */ removeStartEdgeU: boolean; /** * When true, the row at the end of the U range is left out. * @default false */ removeEndEdgeU: boolean; /** * When true, every point moves half a step in V; on a closed face such as a cylinder this keeps * points off the seam. * @default false */ shiftHalfStepV: boolean; /** * When true, the points at the start of the V range are left out of every row. * @default false */ removeStartEdgeV: boolean; /** * When true, the points at the end of the V range are left out of every row. * @default false */ removeEndEdgeV: boolean; } /** * A face and a number of divisions for `shapes.face.subdivideToWires`, which draws evenly spaced * wires across the face in one parameter direction. */ class FaceSubdivisionToWiresDto { /** * Provide options without default values */ constructor(shape?: T, nrDivisions?: number, isU?: boolean, shiftHalfStep?: boolean, removeStart?: boolean, removeEnd?: boolean); /** * The face to draw the wires on. * @default undefined */ shape: T; /** * How many steps to divide the range into; one more wire than that is drawn, the two boundary * lines included. * @default 10 * @minimum 1 * @maximum Infinity * @step 1 */ nrDivisions: number; /** * When true each wire sits at a fixed U and runs across the V range; when false the roles swap. * @default true */ isU: boolean; /** * When true, every wire moves half a step along the divided direction. * @default false */ shiftHalfStep: boolean; /** * When true, the wire on the start boundary is left out. * @default false */ removeStart: boolean; /** * When true, the wire on the end boundary is left out. * @default false */ removeEnd: boolean; } /** * A face, a grid of cells and optional patterns for `shapes.face.subdivideToRectangleWires`, which * draws one rectangle wire per cell of the face's UV range. The patterns are read cell by cell and * repeat when they run out. */ class FaceSubdivideToRectangleWiresDto { /** * Provide options without default values */ constructor(shape?: T, nrRectanglesU?: number, nrRectanglesV?: number, scalePatternU?: number[], scalePatternV?: number[], filletPattern?: number[], inclusionPattern?: boolean[], offsetFromBorderU?: number, offsetFromBorderV?: number); /** * The face to draw the rectangles on. * @default undefined */ shape: T; /** * How many cells across the U range. * @default 10 * @minimum 1 * @maximum Infinity * @step 1 */ nrRectanglesU: number; /** * How many cells across the V range. * @default 10 * @minimum 1 * @maximum Infinity * @step 1 */ nrRectanglesV: number; /** * Sizes of the rectangles along U as fractions of their cell, from 0 to 1, applied in turn; 1 * fills the cell, and leaving the list out means no scaling. * @default undefined * @optional true */ scalePatternU?: number[] | undefined; /** * Sizes of the rectangles along V as fractions of their cell, from 0 to 1, applied in turn; 1 * fills the cell, and leaving the list out means no scaling. * @default undefined * @optional true */ scalePatternV?: number[] | undefined; /** * Corner rounding of the rectangles as fractions from 0 to 1 of half the shorter side, applied * in turn; 0 leaves sharp corners. * @default undefined * @optional true */ filletPattern?: number[] | undefined; /** * Which cells get a rectangle, applied in turn: true draws one, false skips the cell. * @default undefined * @optional true */ inclusionPattern?: boolean[] | undefined; /** * A fraction of the U range trimmed at each end before dividing into cells, so the pattern * keeps clear of the border; keep it below 0.5. * @default 0 * @minimum 0 * @maximum 0.5 * @step 0.01 */ offsetFromBorderU: number; /** * A fraction of the V range trimmed at each end before dividing into cells, so the pattern * keeps clear of the border; keep it below 0.5. * @default 0 * @minimum 0 * @maximum 0.5 * @step 0.01 */ offsetFromBorderV: number; } /** * A face, hexagon counts and optional patterns for `shapes.face.subdivideToHexagonWires`, which * lays a honeycomb of hexagon wires over the face's UV range. The patterns are read hexagon by * hexagon and repeat when they run out. */ class FaceSubdivideToHexagonWiresDto { /** * Provide options without default values */ constructor(shape?: T, nrHexagonsU?: number, nrHexagonsV?: number, flatU?: boolean, scalePatternU?: number[], scalePatternV?: number[], filletPattern?: number[], inclusionPattern?: boolean[], offsetFromBorderU?: number, offsetFromBorderV?: number, extendUUp?: boolean, extendUBottom?: boolean, extendVUp?: boolean, extendVBottom?: boolean); /** * The face to draw the hexagons on. * @default undefined */ shape: T; /** * How many hexagons across the U range. * @default 10 * @minimum 1 * @maximum Infinity * @step 1 */ nrHexagonsU?: number | undefined; /** * How many hexagons across the V range. * @default 10 * @minimum 1 * @maximum Infinity * @step 1 */ nrHexagonsV?: number | undefined; /** * When true, the hexagons turn a flat side toward the U direction; when false a corner points * that way. */ flatU: boolean; /** * Sizes of the hexagons along U as fractions of their full size, applied in turn about each * hexagon's center; 1 or no list means no scaling. * @default undefined * @optional true */ scalePatternU?: number[] | undefined; /** * Sizes of the hexagons along V as fractions of their full size, applied in turn about each * hexagon's center; 1 or no list means no scaling. * @default undefined * @optional true */ scalePatternV?: number[] | undefined; /** * Corner rounding of the hexagons as fractions from 0 to 1 of the largest radius that fits, * applied in turn; 0 leaves sharp corners. * @default undefined * @optional true */ filletPattern?: number[] | undefined; /** * Which hexagons are drawn, applied in turn: true draws one, false skips it. * @default undefined * @optional true */ inclusionPattern?: boolean[] | undefined; /** * A fraction of the U range trimmed at each end before laying the grid, so the pattern keeps * clear of the border; keep it below 0.5. * @default 0 * @minimum 0 * @maximum 0.5 * @step 0.01 */ offsetFromBorderU?: number | undefined; /** * A fraction of the V range trimmed at each end before laying the grid, so the pattern keeps * clear of the border; keep it below 0.5. * @default 0 * @minimum 0 * @maximum 0.5 * @step 0.01 */ offsetFromBorderV?: number | undefined; /** * When true, the grid is stretched so the hexagons at the high end of U reach past that border, * covering it without a jagged edge. * @default false */ extendUUp?: boolean | undefined; /** * When true, the grid is stretched so the hexagons at the low end of U reach past that border, * covering it without a jagged edge. * @default false */ extendUBottom?: boolean | undefined; /** * When true, the grid is stretched so the hexagons at the high end of V reach past that border, * covering it without a jagged edge. * @default false */ extendVUp?: boolean | undefined; /** * When true, the grid is stretched so the hexagons at the low end of V reach past that border, * covering it without a jagged edge. * @default false */ extendVBottom?: boolean | undefined; } /** * A face, hexagon counts and optional patterns for `shapes.face.subdivideToHexagonHoles`, which * cuts a honeycomb of hexagonal holes into the face. Without a scale pattern each hole is half the * size of its hexagon. */ class FaceSubdivideToHexagonHolesDto { /** * Provide options without default values */ constructor(shape?: T, nrHexagonsU?: number, nrHexagonsV?: number, flatU?: boolean, holesToFaces?: boolean, scalePatternU?: number[], scalePatternV?: number[], filletPattern?: number[], inclusionPattern?: boolean[], offsetFromBorderU?: number, offsetFromBorderV?: number); /** * The face to cut the holes into. * @default undefined */ shape: T; /** * How many hexagons across the U range. * @default 10 * @minimum 1 * @maximum Infinity * @step 1 */ nrHexagonsU?: number | undefined; /** * How many hexagons across the V range. * @default 10 * @minimum 1 * @maximum Infinity * @step 1 */ nrHexagonsV?: number | undefined; /** * When true, the hexagons turn a flat side toward the U direction; when false a corner points * that way. */ flatU: boolean; /** * When true, the result also carries one face per hole after the perforated face. * @default false */ holesToFaces?: boolean | undefined; /** * Sizes of the holes along U as fractions of their hexagon, applied in turn; leaving the list * out uses 0.5. * @default undefined * @optional true */ scalePatternU?: number[] | undefined; /** * Sizes of the holes along V as fractions of their hexagon, applied in turn; leaving the list * out uses 0.5. * @default undefined * @optional true */ scalePatternV?: number[] | undefined; /** * Corner rounding of the holes as fractions from 0 to 1 of the largest radius that fits, * applied in turn; 0 leaves sharp corners. * @default undefined * @optional true */ filletPattern?: number[] | undefined; /** * Which hexagons become holes, applied in turn: true cuts one, false leaves the face whole * there. * @default undefined * @optional true */ inclusionPattern?: boolean[] | undefined; /** * A fraction of the U range trimmed at each end before laying the grid, so the holes keep clear * of the border; keep it below 0.5. * @default 0 * @minimum 0 * @maximum 0.5 * @step 0.01 */ offsetFromBorderU?: number | undefined; /** * A fraction of the V range trimmed at each end before laying the grid, so the holes keep clear * of the border; keep it below 0.5. * @default 0 * @minimum 0 * @maximum 0.5 * @step 0.01 */ offsetFromBorderV?: number | undefined; } /** * A face, a grid of cells and optional patterns for `shapes.face.subdivideToRectangleHoles`, which * cuts a grid of rectangular holes into the face. Without a scale pattern each hole covers half its * cell. */ class FaceSubdivideToRectangleHolesDto { /** * Provide options without default values */ constructor(shape?: T, nrRectanglesU?: number, nrRectanglesV?: number, scalePatternU?: number[], scalePatternV?: number[], filletPattern?: number[], inclusionPattern?: boolean[], holesToFaces?: boolean, offsetFromBorderU?: number, offsetFromBorderV?: number); /** * The face to cut the holes into. * @default undefined */ shape: T; /** * How many cells across the U range. * @default 10 * @minimum 1 * @maximum Infinity * @step 1 */ nrRectanglesU: number; /** * How many cells across the V range. * @default 10 * @minimum 1 * @maximum Infinity * @step 1 */ nrRectanglesV: number; /** * Sizes of the holes along U as fractions of their cell, applied in turn; leaving the list out * uses 0.5. * @default undefined * @optional true */ scalePatternU?: number[] | undefined; /** * Sizes of the holes along V as fractions of their cell, applied in turn; leaving the list out * uses 0.5. * @default undefined * @optional true */ scalePatternV?: number[] | undefined; /** * Corner rounding of the holes as fractions from 0 to 1 of half the shorter side, applied in * turn; 0 leaves sharp corners. * @default undefined * @optional true */ filletPattern?: number[] | undefined; /** * Which cells become holes, applied in turn: true cuts one, false leaves the face whole there. * @default undefined * @optional true */ inclusionPattern?: boolean[] | undefined; /** * When true, the result also carries one face per hole after the perforated face. * @default false */ holesToFaces: boolean; /** * A fraction of the U range trimmed at each end before dividing into cells, so the holes keep * clear of the border; keep it below 0.5. * @default 0 * @minimum 0 * @maximum 0.5 * @step 0.01 */ offsetFromBorderU: number; /** * A fraction of the V range trimmed at each end before dividing into cells, so the holes keep * clear of the border; keep it below 0.5. * @default 0 * @minimum 0 * @maximum 0.5 * @step 0.01 */ offsetFromBorderV: number; } /** * A face, a grid of divisions and nth-row rules for `shapes.face.subdivideToPointsControlled`, * which shifts or removes points on every nth row instead of all of them. Each rule pairs an `Nth` * count with an `OffsetN` start; 0 switches it off. */ class FaceSubdivisionControlledDto { /** * Provide options without default values */ constructor(shape?: T, nrDivisionsU?: number, nrDivisionsV?: number, shiftHalfStepNthU?: number, shiftHalfStepUOffsetN?: number, removeStartEdgeNthU?: number, removeStartEdgeUOffsetN?: number, removeEndEdgeNthU?: number, removeEndEdgeUOffsetN?: number, shiftHalfStepNthV?: number, shiftHalfStepVOffsetN?: number, removeStartEdgeNthV?: number, removeStartEdgeVOffsetN?: number, removeEndEdgeNthV?: number, removeEndEdgeVOffsetN?: number); /** * The face to lay the grid over. * @default undefined */ shape: T; /** * How many rows of points across the U range, edge to edge. * @default 10 * @minimum 1 * @maximum Infinity * @step 1 */ nrDivisionsU: number; /** * How many points along each row across the V range, edge to edge. * @default 10 * @minimum 1 * @maximum Infinity * @step 1 */ nrDivisionsV: number; /** * Every how-manyth V row is pushed half a step in U; 0 shifts none. * @default 0 * @minimum 0 * @maximum Infinity * @step 1 */ shiftHalfStepNthU: number; /** * Which V row the counting for the U shift starts at. * @default 0 * @minimum 0 * @maximum Infinity * @step 1 */ shiftHalfStepUOffsetN: number; /** * Every how-manyth point is dropped from the first U row; 0 keeps them all. * @default 0 * @minimum 0 * @maximum Infinity * @step 1 */ removeStartEdgeNthU: number; /** * Which point the counting for the first U row removal starts at. * @default 0 * @minimum 0 * @maximum Infinity * @step 1 */ removeStartEdgeUOffsetN: number; /** * Every how-manyth point is dropped from the last U row; 0 keeps them all. * @default 0 * @minimum 0 * @maximum Infinity * @step 1 */ removeEndEdgeNthU: number; /** * Which point the counting for the last U row removal starts at. * @default 0 * @minimum 0 * @maximum Infinity * @step 1 */ removeEndEdgeUOffsetN: number; /** * Every how-manyth U row is pushed half a step in V; 0 shifts none. * @default 0 * @minimum 0 * @maximum Infinity * @step 1 */ shiftHalfStepNthV: number; /** * Which U row the counting for the V shift starts at. * @default 0 * @minimum 0 * @maximum Infinity * @step 1 */ shiftHalfStepVOffsetN: number; /** * Every how-manyth point is dropped from the first V row; 0 keeps them all. * @default 0 * @minimum 0 * @maximum Infinity * @step 1 */ removeStartEdgeNthV: number; /** * Which point the counting for the first V row removal starts at. * @default 0 * @minimum 0 * @maximum Infinity * @step 1 */ removeStartEdgeVOffsetN: number; /** * Every how-manyth point is dropped from the last V row; 0 keeps them all. * @default 0 * @minimum 0 * @maximum Infinity * @step 1 */ removeEndEdgeNthV: number; /** * Which point the counting for the last V row removal starts at. * @default 0 * @minimum 0 * @maximum Infinity * @step 1 */ removeEndEdgeVOffsetN: number; } /** * A face and one line across its UV range for `shapes.face.subdivideToPointsOnParam` and * `subdivideToUVOnParam`: the line sits at `param` in one direction and `nrPoints` points spread * over the other. */ class FaceLinearSubdivisionDto { /** * Provide options without default values */ constructor(shape?: T, isU?: boolean, param?: number, nrPoints?: number, shiftHalfStep?: boolean, removeStartPoint?: boolean, removeEndPoint?: boolean); /** * The face to place the points on. * @default undefined */ shape: T; /** * When true the line sits at a fixed U and the points spread across the V range; when false the * roles swap. * @default true */ isU: boolean; /** * Where the line sits, as a fraction from 0 to 1 of the fixed direction's range. * @default 0.5 * @minimum 0 * @maximum 1 * @step 0.1 */ param: number; /** * How many points along the line, edge to edge. * @default 10 * @minimum 1 * @maximum Infinity * @step 1 */ nrPoints: number; /** * When true, every point moves half a step along the line; on a closed face this keeps points * off the seam. * @default false */ shiftHalfStep: boolean; /** * When true, the first point is left out. * @default false */ removeStartPoint: boolean; /** * When true, the last point is left out. * @default false */ removeEndPoint: boolean; } /** * A face, a direction and a fraction for `shapes.face.wireAlongParam`, which draws a wire across * the face along one parameter line. */ class WireAlongParamDto { /** * Provide options without default values */ constructor(shape?: T, isU?: boolean, param?: number); /** * The face the wire is drawn on. * @default undefined */ shape: T; /** * When true the wire sits at a fixed U and runs across the V range; when false the roles swap. * @default true */ isU: boolean; /** * Where the wire sits, as a fraction from 0 to 1 of the fixed direction's range. * @default 0.5 * @minimum 0 * @maximum 1 * @step 0.1 */ param: number; } /** * A face, a direction and several fractions for `shapes.face.wiresAlongParams`, which draws one * wire across the face per fraction. */ class WiresAlongParamsDto { /** * Provide options without default values */ constructor(shape?: T, isU?: boolean, params?: number[]); /** * The face the wires are drawn on. * @default undefined */ shape: T; /** * When true each wire sits at a fixed U and runs across the V range; when false the roles swap. * @default true */ isU: boolean; /** * Where the wires sit, as fractions from 0 to 1 of the fixed direction's range, one wire each. * @default undefined */ params: number[]; } /** * A face and one UV position for `shapes.face.pointOnUV`, `normalOnUV` and `uvOnFace`. */ class DataOnUVDto { /** * Provide options without default values */ constructor(shape?: T, paramU?: number, paramV?: number); /** * The face to evaluate. * @default undefined */ shape: T; /** * The U position as a fraction from 0 to 1 of the face's U range. * @default 0.5 * @minimum 0 * @maximum 1 * @step 0.1 */ paramU: number; /** * The V position as a fraction from 0 to 1 of the face's V range. * @default 0.5 * @minimum 0 * @maximum 1 * @step 0.1 */ paramV: number; } /** * A face and several UV positions for `shapes.face.pointsOnUVs` and `normalsOnUVs`. */ class DataOnUVsDto { /** * Provide options without default values */ constructor(shape?: T, paramsUV?: [number, number][]); /** * The face to evaluate. * @default undefined */ shape: T; /** * The positions as `[u, v]` pairs, each a fraction from 0 to 1 of the face's range, one result * each. * @default [[0.5, 0.5]] */ paramsUV: [number, number][]; } /** * Corner points for `shapes.wire.createPolygonWire`, `shapes.face.createPolygonFace` and * `shapes.edge.fromPoints`, a closed outline through them. */ class PolygonDto { constructor(points?: Base.Point3[]); /** * The corners in order; the outline closes from the last back to the first. * @default undefined */ points: Base.Point3[]; } /** * Several polygon definitions for `shapes.wire.createPolygons`, which builds one closed wire per * polygon. */ class PolygonsDto { constructor(polygons?: PolygonDto[], returnCompound?: boolean); /** * One list of corner points per polygon. * @default undefined */ polygons: PolygonDto[]; /** * When true, the wires are packed into one compound instead of a list. */ returnCompound: boolean; } /** * Points for `shapes.wire.createPolylineWire`, an open chain of straight edges through them. */ class PolylineDto { constructor(points?: Base.Point3[]); /** * The points in order; the chain stays open between the last and the first. * @default undefined */ points: Base.Point3[]; } /** * A polyline object for `shapes.wire.fromBasePolyline` and `shapes.edge.fromBasePolyline`. */ class PolylineBaseDto { constructor(polyline?: Base.Polyline3); /** * The polyline as `{ points, isClosed }`; a closed one also gets the edge back to its first * point. * @default undefined */ polyline: Base.Polyline3; } /** * Several polyline objects, one wire each; currently unused by the library. */ class PolylinesBaseDto { constructor(polylines?: Base.Polyline3[]); /** * The polylines as `{ points, isClosed }` objects. * @default undefined */ polylines: Base.Polyline3[]; } /** * A line object for `shapes.wire.fromBaseLine` and `shapes.edge.fromBaseLine`. */ class LineBaseDto { constructor(line?: Base.Line3); /** * The line as `{ start, end }`. * @default undefined */ line: Base.Line3; } /** * Several line objects for `shapes.wire.fromBaseLines` and `shapes.edge.fromBaseLines`, one result * each. */ class LinesBaseDto { constructor(lines?: Base.Line3[]); /** * The lines as `{ start, end }` objects, in the order the results should come back. * @default undefined */ lines: Base.Line3[]; } /** * A segment, a pair of points, for `shapes.wire.fromBaseSegment` and `shapes.edge.fromBaseSegment`. */ class SegmentBaseDto { constructor(segment?: Base.Segment3); /** * The segment as a pair of points, `[start, end]`. * @default undefined */ segment: Base.Segment3; } /** * Several segments for `shapes.wire.fromBaseSegments` and `shapes.edge.fromBaseSegments`, one * result each. */ class SegmentsBaseDto { constructor(segments?: Base.Segment3[]); /** * The segments as pairs of points, `[start, end]`, in the order the results should come back. * @default undefined */ segments: Base.Segment3[]; } /** * A triangle for `shapes.face.fromBaseTriangle`, `shapes.wire.fromBaseTriangle` and * `shapes.edge.fromBaseTriangle`. */ class TriangleBaseDto { constructor(triangle?: Base.Triangle3); /** * The triangle as its three corner points. * @default undefined */ triangle: Base.Triangle3; } /** * A triangle mesh for `shapes.face.fromBaseMesh`, `shapes.wire.fromBaseMesh` and * `shapes.edge.fromBaseMesh`, one result per triangle. */ class MeshBaseDto { constructor(mesh?: Base.Mesh3); /** * The mesh as a list of triangles, each three corner points. * @default undefined */ mesh: Base.Mesh3; } /** * Several polyline definitions for `shapes.wire.createPolylines`, which builds one open wire per * polyline. */ class PolylinesDto { constructor(polylines?: PolylineDto[], returnCompound?: boolean); /** * One list of points per polyline. * @default undefined */ polylines: PolylineDto[]; /** * When true, the wires are packed into one compound instead of a list. */ returnCompound: boolean; } /** * A side length and a placement for `shapes.wire.createSquareWire` and * `shapes.face.createSquareFace`. */ class SquareDto { constructor(size?: number, center?: Base.Point3, direction?: Base.Vector3); /** * The length of each side, in model units. * @default 1 * @minimum 0 * @maximum Infinity * @step 1 */ size: number; /** * The point the square is centered on. * @default [0, 0, 0] */ center: Base.Point3; /** * The normal of the plane the square lies in; the default lays it flat on the ground. * @default [0, 1, 0] */ direction: Base.Vector3; } /** * A width, a length and a placement for `shapes.wire.createRectangleWire` and * `shapes.face.createRectangleFace`. */ class RectangleDto { constructor(width?: number, length?: number, center?: Base.Point3, direction?: Base.Vector3); /** * The side along X on the ground plane, in model units, before the rectangle is turned to face * `direction`. * @default 1 * @minimum 0 * @maximum Infinity * @step 1 */ width: number; /** * The side along Z on the ground plane, in model units, before the rectangle is turned to face * `direction`. * @default 2 * @minimum 0 * @maximum Infinity * @step 1 */ length: number; /** * The point the rectangle is centered on. * @default [0, 0, 0] */ center: Base.Point3; /** * The normal of the plane the rectangle lies in; the default lays it flat on the ground. * @default [0, 1, 0] */ direction: Base.Vector3; } /** * The two legs of an L shape and its placement for `shapes.wire.createLPolygonWire` and * `shapes.face.createLPolygonFace`. */ class LPolygonDto { constructor(widthFirst?: number, lengthFirst?: number, widthSecond?: number, lengthSecond?: number, align?: directionEnum, rotation?: number, center?: Base.Point3, direction?: Base.Vector3); /** * The thickness of the first leg, in model units. * @default 1 * @minimum 0 * @maximum Infinity * @step 0.1 */ widthFirst: number; /** * The length of the first leg, in model units. * @default 2 * @minimum 0 * @maximum Infinity * @step 0.1 */ lengthFirst: number; /** * The thickness of the second leg, in model units. * @default 0.5 * @minimum 0 * @maximum Infinity * @step 0.1 */ widthSecond: number; /** * The length of the second leg, in model units. * @default 2 * @minimum 0 * @maximum Infinity * @step 0.1 */ lengthSecond: number; /** * Where the corner of the L sits relative to the legs: on their outside, their inside or their * middle. * @default outside */ align: directionEnum; /** * How far the shape is turned in its plane, in degrees. * @default 0 * @minimum 0 * @maximum Infinity * @step 15 */ rotation: number; /** * The point the shape is placed at. * @default [0, 0, 0] */ center: Base.Point3; /** * The normal of the plane the shape lies in; the default lays it flat on the ground. * @default [0, 1, 0] */ direction: Base.Vector3; } /** * The cross-section of an I-beam, two horizontal flanges joined by a vertical web, for * `shapes.wire.createIBeamProfileWire` and `shapes.face.createIBeamProfileFace`. */ class IBeamProfileDto { constructor(width?: number, height?: number, webThickness?: number, flangeThickness?: number, alignment?: Base.basicAlignmentEnum, rotation?: number, center?: Base.Point3, direction?: Base.Vector3); /** * The width of the flanges, in model units. * @default 2 * @minimum 0 * @maximum Infinity * @step 0.1 */ width: number; /** * The total height of the profile, in model units. * @default 3 * @minimum 0 * @maximum Infinity * @step 0.1 */ height: number; /** * The thickness of the vertical web, in model units. * @default 0.2 * @minimum 0 * @maximum Infinity * @step 0.01 */ webThickness: number; /** * The thickness of each horizontal flange, in model units. * @default 0.3 * @minimum 0 * @maximum Infinity * @step 0.01 */ flangeThickness: number; /** * Which point of the profile's bounding box sits on `center`, such as its middle or its top * left corner. * @default midMid */ alignment: Base.basicAlignmentEnum; /** * How far the profile is turned in its plane, in degrees. * @default 0 * @minimum 0 * @maximum Infinity * @step 15 */ rotation: number; /** * The point the profile is placed at. * @default [0, 0, 0] */ center: Base.Point3; /** * The normal of the plane the profile lies in; the default lays it flat on the ground. * @default [0, 1, 0] */ direction: Base.Vector3; } /** * The cross-section of an H-beam, two vertical flanges joined by a horizontal web, for * `shapes.wire.createHBeamProfileWire` and `shapes.face.createHBeamProfileFace`. */ class HBeamProfileDto { constructor(width?: number, height?: number, webThickness?: number, flangeThickness?: number, alignment?: Base.basicAlignmentEnum, rotation?: number, center?: Base.Point3, direction?: Base.Vector3); /** * The total width of the profile, in model units. * @default 2 * @minimum 0 * @maximum Infinity * @step 0.1 */ width: number; /** * The height of the flanges, in model units. * @default 3 * @minimum 0 * @maximum Infinity * @step 0.1 */ height: number; /** * The thickness of the horizontal web, in model units. * @default 0.2 * @minimum 0 * @maximum Infinity * @step 0.01 */ webThickness: number; /** * The thickness of each vertical flange, in model units. * @default 0.3 * @minimum 0 * @maximum Infinity * @step 0.01 */ flangeThickness: number; /** * Which point of the profile's bounding box sits on `center`, such as its middle or its top * left corner. * @default midMid */ alignment: Base.basicAlignmentEnum; /** * How far the profile is turned in its plane, in degrees. * @default 0 * @minimum 0 * @maximum Infinity * @step 15 */ rotation: number; /** * The point the profile is placed at. * @default [0, 0, 0] */ center: Base.Point3; /** * The normal of the plane the profile lies in; the default lays it flat on the ground. * @default [0, 1, 0] */ direction: Base.Vector3; } /** * The cross-section of a T-beam, a horizontal flange with a vertical web hanging from its middle, * for `shapes.wire.createTBeamProfileWire` and `shapes.face.createTBeamProfileFace`. */ class TBeamProfileDto { constructor(width?: number, height?: number, webThickness?: number, flangeThickness?: number, alignment?: Base.basicAlignmentEnum, rotation?: number, center?: Base.Point3, direction?: Base.Vector3); /** * The width of the flange, in model units. * @default 2 * @minimum 0 * @maximum Infinity * @step 0.1 */ width: number; /** * The total height of the profile, in model units. * @default 2 * @minimum 0 * @maximum Infinity * @step 0.1 */ height: number; /** * The thickness of the vertical web, in model units. * @default 0.2 * @minimum 0 * @maximum Infinity * @step 0.01 */ webThickness: number; /** * The thickness of the flange, in model units. * @default 0.3 * @minimum 0 * @maximum Infinity * @step 0.01 */ flangeThickness: number; /** * Which point of the profile's bounding box sits on `center`, such as its middle or its top * left corner. * @default midMid */ alignment: Base.basicAlignmentEnum; /** * How far the profile is turned in its plane, in degrees. * @default 0 * @minimum 0 * @maximum Infinity * @step 15 */ rotation: number; /** * The point the profile is placed at. * @default [0, 0, 0] */ center: Base.Point3; /** * The normal of the plane the profile lies in; the default lays it flat on the ground. * @default [0, 1, 0] */ direction: Base.Vector3; } /** * The cross-section of a U-beam, a channel with two flanges standing up from a web, for * `shapes.wire.createUBeamProfileWire` and `shapes.face.createUBeamProfileFace`. */ class UBeamProfileDto { constructor(width?: number, height?: number, webThickness?: number, flangeThickness?: number, flangeWidth?: number, alignment?: Base.basicAlignmentEnum, rotation?: number, center?: Base.Point3, direction?: Base.Vector3); /** * The total width of the profile, in model units. * @default 2 * @minimum 0 * @maximum Infinity * @step 0.1 */ width: number; /** * The total height of the profile, in model units. * @default 3 * @minimum 0 * @maximum Infinity * @step 0.1 */ height: number; /** * The thickness of the web at the back of the channel, in model units. * @default 0.2 * @minimum 0 * @maximum Infinity * @step 0.01 */ webThickness: number; /** * The thickness of each flange, in model units. * @default 0.3 * @minimum 0 * @maximum Infinity * @step 0.01 */ flangeThickness: number; /** * How far each flange reaches inward from the side of the channel, in model units. * @default 0.5 * @minimum 0 * @maximum Infinity * @step 0.1 */ flangeWidth: number; /** * Which point of the profile's bounding box sits on `center`, such as its middle or its top * left corner. * @default midMid */ alignment: Base.basicAlignmentEnum; /** * How far the profile is turned in its plane, in degrees. * @default 0 * @minimum 0 * @maximum Infinity * @step 15 */ rotation: number; /** * The point the profile is placed at. * @default [0, 0, 0] */ center: Base.Point3; /** * The normal of the plane the profile lies in; the default lays it flat on the ground. * @default [0, 1, 0] */ direction: Base.Vector3; } /** * How far a flat profile is extruded each way along its normal, the part the beam profile solid * inputs share. */ class ExtrudedSolidDto { constructor(extrusionLengthFront?: number, extrusionLengthBack?: number, center?: Base.Point3, direction?: Base.Vector3); /** * How far the profile grows along its normal, in model units. * @default 1 * @minimum 0 * @maximum Infinity * @step 0.1 */ extrusionLengthFront: number; /** * How far the profile grows against its normal, in model units. * @default 0 * @minimum 0 * @maximum Infinity * @step 0.1 */ extrusionLengthBack: number; /** * The point the profile is placed at. * @default [0, 0, 0] */ center: Base.Point3; /** * The normal of the profile's plane, which is the direction of the extrusion. * @default [0, 1, 0] */ direction: Base.Vector3; } /** * An I-beam profile and the extrusion lengths for `shapes.solid.createIBeamProfileSolid`; at least * one length must be above 0. */ class IBeamProfileSolidDto extends IBeamProfileDto { constructor(width?: number, height?: number, webThickness?: number, flangeThickness?: number, alignment?: Base.basicAlignmentEnum, rotation?: number, center?: Base.Point3, direction?: Base.Vector3, extrusionLengthFront?: number, extrusionLengthBack?: number); /** * How far the profile grows along its normal, in model units. * @default 1 * @minimum 0 * @maximum Infinity * @step 0.1 */ extrusionLengthFront: number; /** * How far the profile grows against its normal, in model units. * @default 0 * @minimum 0 * @maximum Infinity * @step 0.1 */ extrusionLengthBack: number; } /** * An H-beam profile and the extrusion lengths for `shapes.solid.createHBeamProfileSolid`; at least * one length must be above 0. */ class HBeamProfileSolidDto extends HBeamProfileDto { constructor(width?: number, height?: number, webThickness?: number, flangeThickness?: number, alignment?: Base.basicAlignmentEnum, rotation?: number, center?: Base.Point3, direction?: Base.Vector3, extrusionLengthFront?: number, extrusionLengthBack?: number); /** * How far the profile grows along its normal, in model units. * @default 1 * @minimum 0 * @maximum Infinity * @step 0.1 */ extrusionLengthFront: number; /** * How far the profile grows against its normal, in model units. * @default 0 * @minimum 0 * @maximum Infinity * @step 0.1 */ extrusionLengthBack: number; } /** * A T-beam profile and the extrusion lengths for `shapes.solid.createTBeamProfileSolid`; at least * one length must be above 0. */ class TBeamProfileSolidDto extends TBeamProfileDto { constructor(width?: number, height?: number, webThickness?: number, flangeThickness?: number, alignment?: Base.basicAlignmentEnum, rotation?: number, center?: Base.Point3, direction?: Base.Vector3, extrusionLengthFront?: number, extrusionLengthBack?: number); /** * How far the profile grows along its normal, in model units. * @default 1 * @minimum 0 * @maximum Infinity * @step 0.1 */ extrusionLengthFront: number; /** * How far the profile grows against its normal, in model units. * @default 0 * @minimum 0 * @maximum Infinity * @step 0.1 */ extrusionLengthBack: number; } /** * A U-beam profile and the extrusion lengths for `shapes.solid.createUBeamProfileSolid`; at least * one length must be above 0. */ class UBeamProfileSolidDto extends UBeamProfileDto { constructor(width?: number, height?: number, webThickness?: number, flangeThickness?: number, flangeWidth?: number, alignment?: Base.basicAlignmentEnum, rotation?: number, center?: Base.Point3, direction?: Base.Vector3, extrusionLengthFront?: number, extrusionLengthBack?: number); /** * How far the profile grows along its normal, in model units. * @default 1 * @minimum 0 * @maximum Infinity * @step 0.1 */ extrusionLengthFront: number; /** * How far the profile grows against its normal, in model units. * @default 0 * @minimum 0 * @maximum Infinity * @step 0.1 */ extrusionLengthBack: number; } /** * The three sides of a box and where it sits, for `shapes.solid.createBox`; `width` runs along X, * `height` along Y, which is up, and `length` along Z. */ class BoxDto { constructor(width?: number, length?: number, height?: number, center?: Base.Point3, originOnCenter?: boolean); /** * The side along X, in model units. * @default 1 * @minimum 0 * @maximum Infinity * @step 0.1 */ width: number; /** * The side along Z, in model units. * @default 2 * @minimum 0 * @maximum Infinity * @step 0.1 */ length: number; /** * The side along Y, which is up, in model units. * @default 3 * @minimum 0 * @maximum Infinity * @step 0.1 */ height: number; /** * The point the box is centered on, or stands on when `originOnCenter` is false. * @default [0, 0, 0] */ center: Base.Point3; /** * When true, the box is centered on `center`; when false it stands on it, so `center` is the * middle of the bottom face. * @default true */ originOnCenter?: boolean | undefined; } /** * The side of a cube and where it sits, for `shapes.solid.createCube`. */ class CubeDto { constructor(size?: number, center?: Base.Point3, originOnCenter?: boolean); /** * The length of every side, in model units. * @default 1 * @minimum 0 * @maximum Infinity * @step 0.1 */ size: number; /** * The point the cube is centered on, or stands on when `originOnCenter` is false. * @default [0, 0, 0] */ center: Base.Point3; /** * When true, the cube is centered on `center`; when false it stands on it, so `center` is the * middle of the bottom face. * @default true */ originOnCenter?: boolean | undefined; } /** * The three sides of a box and its corner, for `shapes.solid.createBoxFromCorner`, which grows the * box along the positive axes from there. */ class BoxFromCornerDto { constructor(width?: number, length?: number, height?: number, corner?: Base.Point3); /** * The side along X, in model units. * @default 1 * @minimum 0 * @maximum Infinity * @step 0.1 */ width: number; /** * The side along Z, in model units. * @default 2 * @minimum 0 * @maximum Infinity * @step 0.1 */ length: number; /** * The side along Y, which is up, in model units. * @default 3 * @minimum 0 * @maximum Infinity * @step 0.1 */ height: number; /** * The corner with the smallest X, Y and Z; the box extends from it along the positive axes. * @default [0, 0, 0] */ corner: Base.Point3; } /** * A radius and a center for `shapes.solid.createSphere`. */ class SphereDto { constructor(radius?: number, center?: Base.Point3); /** * The distance from the center to the surface, in model units. * @default 1 * @minimum 0 * @maximum Infinity * @step 0.1 */ radius: number; /** * The point the sphere is centered on. * @default [0, 0, 0] */ center: Base.Point3; } /** * The two radii, height and placement of a cone or truncated cone for `shapes.solid.createCone`. */ class ConeDto { constructor(radius1?: number, radius2?: number, height?: number, angle?: number, center?: Base.Point3, direction?: Base.Vector3); /** * The radius of the base at `center`, in model units. * @default 2 * @minimum 0 * @maximum Infinity * @step 0.1 */ radius1: number; /** * The radius at the top, in model units; 0 makes a pointed cone. * @default 1 * @minimum 0 * @maximum Infinity * @step 0.1 */ radius2: number; /** * The distance from the base to the top along `direction`, in model units. * @default 2 * @minimum 0 * @maximum Infinity * @step 0.1 */ height: number; /** * How much of the full round to build, in degrees; less than 360 cuts a wedge out. * @default 360 * @minimum 0 * @maximum 360 * @step 1 */ angle: number; /** * The center of the base. * @default [0, 0, 0] */ center: Base.Point3; /** * The direction from the base to the top. * @default [0, 1, 0] */ direction: Base.Point3; } /** * The two radii and placement of a ring for `shapes.solid.createTorus`. */ class TorusDto { constructor(majorRadius?: number, minorRadius?: number, center?: Base.Point3, direction?: Base.Vector3, angle?: number); /** * The distance from the center of the ring to the middle of its tube, in model units. * @default 2 * @minimum 0 * @maximum Infinity * @step 0.1 */ majorRadius: number; /** * The radius of the tube itself, in model units. * @default 0.5 * @minimum 0 * @maximum Infinity * @step 0.1 */ minorRadius: number; /** * The point the ring is centered on. * @default [0, 0, 0] */ center: Base.Point3; /** * The axis the ring goes around; the default lays it flat on the ground. * @default [0, 1, 0] */ direction: Base.Vector3; /** * How much of the full ring to build, in degrees; less than 360 gives a partial ring. * @default 360 * @minimum 0 * @maximum 360 * @step 1 */ angle?: number | undefined; } /** * Two points for `shapes.edge.line` and `shapes.wire.createLineWire`, a straight edge or wire * between them. */ class LineDto { constructor(start?: Base.Point3, end?: Base.Point3); /** * The point the line starts at. * @default [0, 0, 0] */ start: Base.Point3; /** * The point the line ends at. * @default [0, 1, 0] */ end: Base.Point3; } /** * Two points and how far to lengthen the line past each for * `shapes.wire.createLineWireWithExtensions`. */ class LineWithExtensionsDto { constructor(start?: Base.Point3, end?: Base.Point3, extensionStart?: number, extensionEnd?: number); /** * The point the line starts at, before the extension. * @default [0, 0, 0] */ start: Base.Point3; /** * The point the line ends at, before the extension. * @default [0, 1, 0] */ end: Base.Point3; /** * How far the line is lengthened past its start, in model units. * @default 0.1 * @minimum -Infinity * @maximum Infinity * @step 0.1 */ extensionStart: number; /** * How far the line is lengthened past its end, in model units. * @default 0.1 * @minimum -Infinity * @maximum Infinity * @step 0.1 */ extensionEnd: number; } /** * Several line definitions for `shapes.wire.createLines`, which builds one wire per line. */ class LinesDto { constructor(lines?: LineDto[], returnCompound?: boolean); /** * One start and end point pair per line. * @default undefined */ lines: LineDto[]; /** * When true, the wires are packed into one compound instead of a list. */ returnCompound: boolean; } /** * Two points and a starting direction for `shapes.edge.arcThroughTwoPointsAndTangent`, a circular * arc between the points. */ class ArcEdgeTwoPointsTangentDto { constructor(start?: Base.Point3, tangentVec?: Base.Vector3, end?: Base.Point3); /** * The point the arc begins at, where the tangent applies. * @default [0, 0, 0] */ start: Base.Point3; /** * The direction the arc leaves the start point in; it fixes the plane and radius of the arc. * @default [0, 1, 0] */ tangentVec: Base.Vector3; /** * The point the arc finishes at. * @default [0, 0, 1] */ end: Base.Point3; } /** * A circle edge and two points on it for `shapes.edge.arcFromCircleAndTwoPoints`, which cuts the * arc between them. */ class ArcEdgeCircleTwoPointsDto { constructor(circle?: T, start?: Base.Point3, end?: Base.Point3, sense?: boolean); /** * The circle edge the arc is cut from. * @default undefined */ circle: T; /** * The point on the circle where the arc starts. * @default [0, 0, 0] */ start: Base.Point3; /** * The point on the circle where the arc ends. * @default [0, 0, 1] */ end: Base.Point3; /** * Which way round the circle the arc runs from start to end: true follows the circle's own * direction, false goes the other way. * @default true */ sense: boolean; } /** * A circle edge and two angles for `shapes.edge.arcFromCircleAndTwoAngles`, which cuts the arc * between them. */ class ArcEdgeCircleTwoAnglesDto { constructor(circle?: T, alphaAngle1?: number, alphaAngle2?: number, sense?: boolean); /** * The circle edge the arc is cut from. * @default undefined */ circle: T; /** * The angle where the arc starts, in degrees around the circle from its own start. * @default 0 * @minimum -Infinity * @maximum Infinity * @step 1 */ alphaAngle1: number; /** * The angle where the arc ends, in degrees around the circle from its own start. * @default 90 * @minimum -Infinity * @maximum Infinity * @step 1 */ alphaAngle2: number; /** * Which way round the circle the arc runs from the first angle to the second: true follows the * circle's own direction, false goes the other way. * @default true */ sense: boolean; } /** * A circle edge, a point on it and an angle for `shapes.edge.arcFromCirclePointAndAngle`, which * cuts an arc of that angle from the point. */ class ArcEdgeCirclePointAngleDto { constructor(circle?: T, alphaAngle?: number, sense?: boolean); /** * The circle edge the arc is cut from. * @default undefined */ circle: T; /** * The point on the circle where the arc starts. * @default undefined */ point: Base.Point3; /** * How far the arc spans from the point, in degrees. * @default 90 * @minimum -Infinity * @maximum Infinity * @step 1 */ alphaAngle: number; /** * Which way round the circle the arc runs: true follows the circle's own direction, false goes * the other way. * @default true */ sense: boolean; } /** * Three points for `shapes.edge.arcThroughThreePoints`, the circular arc that passes through all * three. */ class ArcEdgeThreePointsDto { constructor(start?: Base.Point3, middle?: Base.Point3, end?: Base.Point3); /** * The point the arc begins at. * @default [0, 0, 0] */ start: Base.Point3; /** * A point the arc passes through on its way; it fixes the plane and radius. * @default [0, 1, 0] */ middle: Base.Point3; /** * The point the arc finishes at. * @default [0, 0, 1] */ end: Base.Point3; } /** * The size and placement of a cylinder for `shapes.solid.createCylinder`, which stands it on a * round base at `center`. */ class CylinderDto { constructor(radius?: number, height?: number, center?: Base.Point3, direction?: Base.Vector3, angle?: number, originOnCenter?: boolean); /** * The radius of the round base, in model units. * @default 1 * @minimum 0 * @maximum Infinity * @step 0.1 */ radius: number; /** * How far the cylinder grows from its base along `direction`, in model units. * @default 2 * @minimum 0 * @maximum Infinity * @step 0.1 */ height: number; /** * The center of the base, or the middle of the cylinder when `originOnCenter` is true. * @default [0, 0, 0] */ center: Base.Point3; /** * The direction the cylinder grows in; the default stands it up along Y. * @default [0, 1, 0] */ direction?: Base.Vector3 | undefined; /** * How much of the full round to build, in degrees; less than 360 cuts a wedge out, like a slice * of cake. * @default 360 * @minimum 0 * @maximum Infinity * @step 1 */ angle?: number | undefined; /** * When true, the cylinder is shifted back by half its height so `center` sits in its middle. * @default false */ originOnCenter?: boolean | undefined; } /** * Lines and a radius for `shapes.solid.createCylindersOnLines`, which builds one cylinder along * each line. */ class CylindersOnLinesDto { constructor(radius?: number, lines?: Base.Line3[]); /** * The radius shared by every cylinder, in model units. * @default 1 * @minimum 0 * @maximum Infinity * @step 0.1 */ radius: number; /** * The lines the cylinders follow, each from its start to its end. * @default undefined */ lines: Base.Line3[]; } /** * A shape, a radius and optional edge or corner indexes for `fillets.filletEdges` and * `fillets.fillet2d`; `radiusList` pairs with `indexes` when both are given. */ class FilletDto { constructor(shape?: T, radius?: number, radiusList?: number[], indexes?: number[]); /** * The shape whose edges, or whose corners for a flat wire or face, are rounded. * @default undefined */ shape: T; /** * The rounding radius in model units, used for every selected edge unless `radiusList` is * given. * @default 0.1 * @minimum 0 * @maximum Infinity * @step 0.1 * @optional true */ radius?: number | undefined; /** * One radius per entry of `indexes`, in the same order; needs `indexes`. * @default undefined * @optional true */ radiusList?: number[] | undefined; /** * Which edges to round, counted from 0 for `filletEdges`, or which corners, counted from 1 for * `fillet2d`; leave it out to round them all. * @default undefined * @optional true */ indexes?: number[] | undefined; } /** * Shapes, a radius and optional corner indexes for `fillets.fillet2dShapes`, which rounds each flat * wire or face the same way. */ class FilletShapesDto { constructor(shapes?: T[], radius?: number, radiusList?: number[], indexes?: number[]); /** * The flat wires or faces whose corners are rounded. * @default undefined */ shapes: T[]; /** * The rounding radius in model units, used for every selected corner unless `radiusList` is * given. * @default 0.1 * @minimum 0 * @maximum Infinity * @step 0.1 * @optional true */ radius?: number | undefined; /** * One radius per entry of `indexes`, in the same order; needs `indexes`. * @default undefined * @optional true */ radiusList?: number[] | undefined; /** * Which corners to round, counted from 1 along each outline; leave it out to round them all. * @default undefined * @optional true */ indexes?: number[] | undefined; } /** * A shape, some of its edges and one radius per edge for `fillets.filletEdgesList`. */ class FilletEdgesListDto { constructor(shape?: T, edges?: U[], radiusList?: number[]); /** * The shape the edges belong to. * @default undefined */ shape: T; /** * The edges of the shape to round. * @default undefined */ edges: U[]; /** * One rounding radius per edge in model units, in the same order as `edges`; the lists must * have the same length. * @default undefined */ radiusList: number[]; } /** * A shape, some of its edges and one radius for `fillets.filletEdgesListOneRadius`. */ class FilletEdgesListOneRadiusDto { constructor(shape?: T, edges?: U[], radius?: number); /** * The shape the edges belong to. * @default undefined */ shape: T; /** * The edges of the shape to round. * @default undefined */ edges: U[]; /** * The rounding radius for every edge, in model units. * @default 0.1 * @minimum 0 * @maximum Infinity * @step 0.1 */ radius: number; } /** * A shape, one of its edges and a radius profile for `fillets.filletEdgeVariableRadius`; * `radiusList` and `paramsU` pair up by position. */ class FilletEdgeVariableRadiusDto { constructor(shape?: T, edge?: U, radiusList?: number[], paramsU?: number[]); /** * The shape the edge belongs to. * @default undefined */ shape: T; /** * The edge to round with a changing radius. * @default undefined */ edge: U; /** * The radius in model units at each position in `paramsU`; the lists must have the same length. * @default undefined */ radiusList: number[]; /** * Positions along the edge as fractions from 0 at its start to 1 at its end, one per radius. * @default undefined */ paramsU: number[]; } /** * A shape, some of its edges and a radius profile per edge for `fillets.filletEdgesVariableRadius`; * the three lists pair up by position. */ class FilletEdgesVariableRadiusDto { constructor(shape?: T, edges?: U[], radiusLists?: number[][], paramsULists?: number[][]); /** * The shape the edges belong to. * @default undefined */ shape: T; /** * The edges to round, each with its own radius profile. * @default undefined */ edges: U[]; /** * One list per edge of radii in model units, each pairing with the matching list in * `paramsULists`. * @default undefined */ radiusLists: number[][]; /** * One list per edge of positions as fractions from 0 to 1 along it, each pairing with the * matching list in `radiusLists`. * @default undefined */ paramsULists: number[][]; } /** * A shape, some of its edges and one radius profile shared by all of them for * `fillets.filletEdgesSameVariableRadius`. */ class FilletEdgesSameVariableRadiusDto { constructor(shape?: T, edges?: U[], radiusList?: number[], paramsU?: number[]); /** * The shape the edges belong to. * @default undefined */ shape: T; /** * The edges to round, all with the same radius profile. * @default undefined */ edges: U[]; /** * The radius in model units at each position in `paramsU`; the lists must have the same length. * @default undefined */ radiusList: number[]; /** * Positions along each edge as fractions from 0 at its start to 1 at its end, one per radius. * @default undefined */ paramsU: number[]; } /** * Wires, a radius, optional corner indexes and an extrusion direction for `fillets.fillet3DWires`, * which rounds the corners of wires that do not lie in a plane. */ class Fillet3DWiresDto { constructor(shapes?: T[], radius?: number, direction?: Base.Vector3, radiusList?: number[], indexes?: number[]); /** * The wires whose corners are rounded. * @default undefined */ shapes: T[]; /** * The rounding radius in model units, used for every selected corner unless `radiusList` is * given. * @default 0.1 * @minimum 0 * @maximum Infinity * @step 0.1 * @optional true */ radius?: number | undefined; /** * One radius per entry of `indexes`, in the same order; needs `indexes`. * @default undefined * @optional true */ radiusList?: number[] | undefined; /** * Which corners to round, counted from 0 along each wire; leave it out to round them all. * @default undefined * @optional true */ indexes?: number[] | undefined; /** * The direction each wire is extruded along to build the fillets; it must not be parallel to * the wire and must leave room for the radius. * @default [0, 1, 0] */ direction: Base.Vector3; } /** * A wire, a radius, optional corner indexes and an extrusion direction for `fillets.fillet3DWire`, * which rounds the corners of a wire that does not lie in a plane. */ class Fillet3DWireDto { constructor(shape?: T, radius?: number, direction?: Base.Vector3, radiusList?: number[], indexes?: number[]); /** * The wire whose corners are rounded. * @default undefined */ shape: T; /** * The rounding radius in model units, used for every selected corner unless `radiusList` is * given. * @default 0.1 * @minimum 0 * @maximum Infinity * @step 0.1 * @optional true */ radius?: number | undefined; /** * One radius per entry of `indexes`, in the same order; needs `indexes`. * @default undefined * @optional true */ radiusList?: number[] | undefined; /** * Which corners to round, counted from 0 along the wire; leave it out to round them all. * @default undefined * @optional true */ indexes?: number[] | undefined; /** * The direction the wire is extruded along to build the fillets; it must not be parallel to the * wire and must leave room for the radius. * @default [0, 1, 0] */ direction: Base.Vector3; } /** * A shape, a distance and optional edge indexes for `fillets.chamferEdges`; `distanceList` pairs * with `indexes` when both are given. */ class ChamferDto { constructor(shape?: T, distance?: number, distanceList?: number[], indexes?: number[]); /** * The shape whose edges are beveled. * @default undefined */ shape: T; /** * How far the bevel cuts back from the edge in model units, used for every selected edge unless * `distanceList` is given. * @default 0.1 * @minimum 0 * @maximum Infinity * @optional true * @step 0.1 */ distance?: number | undefined; /** * One distance per entry of `indexes`, in the same order; needs `indexes`. * @default undefined * @optional true */ distanceList?: number[] | undefined; /** * Which edges to bevel, counted from 0 in the order `shapes.edge.getEdges` lists them; leave it * out to bevel them all. * @default undefined * @optional true */ indexes?: number[] | undefined; } /** * A shape, some of its edges and one distance per edge for `fillets.chamferEdgesList`. */ class ChamferEdgesListDto { constructor(shape?: T, edges?: U[], distanceList?: number[]); /** * The shape the edges belong to. * @default undefined */ shape: T; /** * The edges of the shape to bevel. * @default undefined */ edges: U[]; /** * One bevel distance per edge in model units, in the same order as `edges`; the lists must have * the same length. * @default undefined */ distanceList: number[]; } /** * A shape, one of its edges, a face at that edge, a distance and an angle for * `fillets.chamferEdgeDistAngle`. */ class ChamferEdgeDistAngleDto { constructor(shape?: T, edge?: U, face?: F, distance?: number, angle?: number); /** * The shape the edge belongs to. * @default undefined */ shape: T; /** * The edge to bevel. * @default undefined */ edge: U; /** * One of the two faces meeting at the edge; the distance is measured on it and the angle from * it. * @default undefined */ face: F; /** * How far from the edge the bevel starts on the face, in model units. * @default 0.1 * @minimum 0 * @maximum Infinity * @step 0.01 */ distance: number; /** * The slope of the bevel away from the face, in degrees; 45 gives an even chamfer. * @default 45 * @minimum 0 * @maximum Infinity * @step 1 */ angle: number; } /** * A shape, one of its edges, a face at that edge and two distances for * `fillets.chamferEdgeTwoDistances`, an uneven bevel. */ class ChamferEdgeTwoDistancesDto { constructor(shape?: T, edge?: U, face?: F, distance1?: number, distance2?: number); /** * The shape the edge belongs to. * @default undefined */ shape: T; /** * The edge to bevel. * @default undefined */ edge: U; /** * One of the two faces meeting at the edge; `distance1` is measured on it. * @default undefined */ face: F; /** * How far the bevel reaches from the edge on `face`, in model units. * @default 0.1 * @minimum 0 * @maximum Infinity * @step 0.01 */ distance1: number; /** * How far the bevel reaches from the edge on the other face, in model units. * @default 0.2 * @minimum 0 * @maximum Infinity * @step 0.01 */ distance2: number; } /** * A shape, some of its edges, one face per edge and two distances per edge for * `fillets.chamferEdgesTwoDistancesLists`; all the lists pair up by position. */ class ChamferEdgesTwoDistancesListsDto { constructor(shape?: T, edges?: U[], faces?: F[], distances1?: number[], distances2?: number[]); /** * The shape the edges belong to. * @default undefined */ shape: T; /** * The edges to bevel. * @default undefined */ edges: U[]; /** * One face per edge, meeting it; the first distance is measured on that face. * @default undefined */ faces: F[]; /** * One distance per edge, in model units, measured on the paired face. * @default undefined */ distances1: number[]; /** * One distance per edge, in model units, measured on the other face. * @default undefined */ distances2: number[]; } /** * A shape, some of its edges, one face per edge and two shared distances for * `fillets.chamferEdgesTwoDistances`; `faces` pairs with `edges` by position. */ class ChamferEdgesTwoDistancesDto { constructor(shape?: T, edges?: U[], faces?: F[], distance1?: number, distance2?: number); /** * The shape the edges belong to. * @default undefined */ shape: T; /** * The edges to bevel. * @default undefined */ edges: U[]; /** * One face per edge, meeting it; `distance1` is measured on that face. * @default undefined */ faces: F[]; /** * How far the bevel reaches from each edge on its paired face, in model units. * @default 0.1 * @minimum 0 * @maximum Infinity * @step 0.01 */ distance1: number; /** * How far the bevel reaches from each edge on the other face, in model units. * @default 0.2 * @minimum 0 * @maximum Infinity * @step 0.01 */ distance2: number; } /** * A shape, some of its edges, one face, distance and angle per edge for * `fillets.chamferEdgesDistsAngles`; all the lists pair up by position. */ class ChamferEdgesDistsAnglesDto { constructor(shape?: T, edges?: U[], faces?: F[], distances?: number[], angles?: number[]); /** * The shape the edges belong to. * @default undefined */ shape: T; /** * The edges to bevel. * @default undefined */ edges: U[]; /** * One face per edge, meeting it; the distance is measured on that face and the angle from it. * @default undefined */ faces: F[]; /** * One distance per edge, in model units, measured on the paired face. * @default undefined */ distances: number[]; /** * One bevel angle per edge, in degrees, measured from the paired face. * @default undefined */ angles: number[]; } /** * A shape, some of its edges, one face per edge and a shared distance and angle for * `fillets.chamferEdgesDistAngle`; `faces` pairs with `edges` by position. */ class ChamferEdgesDistAngleDto { constructor(shape?: T, edges?: U[], faces?: F[], distance?: number, angle?: number); /** * The shape the edges belong to. * @default undefined */ shape: T; /** * The edges to bevel. * @default undefined */ edges: U[]; /** * One face per edge, meeting it; the distance is measured on that face and the angle from it. * @default undefined */ faces: F[]; /** * How far from each edge the bevel starts on its paired face, in model units. * @default 0.1 * @minimum 0 * @maximum Infinity * @step 0.01 */ distance: number; /** * The slope of the bevels away from the paired faces, in degrees; 45 gives an even chamfer. * @default 45 * @minimum 0 * @maximum Infinity * @step 1 */ angle: number; } /** * Points and a closing flag for `shapes.wire.createBSpline`, which fits a smooth curve close to the * points. */ class BSplineDto { constructor(points?: Base.Point3[], closed?: boolean); /** * The points the curve follows closely, in order; it need not pass through them exactly. * @default undefined */ points: Base.Point3[]; /** * When true, the first point is appended again so the ends meet. * @default false */ closed: boolean; } /** * Several B-spline definitions for `shapes.wire.createBSplines`, which builds one wire per * definition. */ class BSplinesDto { constructor(bSplines?: BSplineDto[], returnCompound?: boolean); /** * One definition per curve, as `createBSpline` takes them. * @default undefined */ bSplines: BSplineDto[]; /** * When true, the wires are packed into one compound instead of a list. */ returnCompound: boolean; } /** * Two circles in one plane and which pieces to keep for `shapes.wire.createWireFromTwoCirclesTan`, * a closed outline around both circles. */ class WireFromTwoCirclesTanDto { constructor(circle1?: T, circle2?: T, keepLines?: twoSidesStrictEnum, circleRemainders?: fourSidesStrictEnum, tolerance?: number); /** * The first circle wire; it must consist of a single edge. * @default undefined */ circle1: T; /** * The second circle wire; it must consist of a single edge. * @default undefined */ circle2: T; /** * Which tangent lines join the circles: `outside` gives the belt that does not cross itself, * `inside` the crossing lines. * @default outside */ keepLines: twoSidesStrictEnum; /** * Which arc of each circle stays in the outline: both outside, both inside, or one of each. * @default outside */ circleRemainders: fourSidesStrictEnum; /** * How close a line must come to a circle to count as touching it, in model units. * @default 1e-7 * @minimum 0 * @maximum Infinity * @step 0.00001 */ tolerance: number; } /** * Circles in one plane and how to pair them for `shapes.face.createFaceFromMultipleCircleTanWires`, * which joins the pairs with tangent belts. */ class FaceFromMultipleCircleTanWiresDto { constructor(circles?: T[], combination?: combinationCirclesForFaceEnum, unify?: boolean, tolerance?: number); /** * The circle wires to join, each a single edge. * @default undefined */ circles: T[]; /** * Which pairs get a belt: `allWithAll` every circle with every other, `inOrder` neighbors in * the list, `inOrderClosed` also the last with the first. * @default allWithAll */ combination: combinationCirclesForFaceEnum; /** * When true, the belt faces are fused into one shape; when false they come back as a compound, * which is faster. * @default true */ unify: boolean; /** * How close a line must come to a circle to count as touching it, in model units. * @default 1e-7 * @minimum 0 * @maximum Infinity * @step 0.00001 */ tolerance: number; } /** * Lists of circles and how to pair them for * `shapes.face.createFaceFromMultipleCircleTanWireCollections`, which joins circles of consecutive * lists with tangent belts. */ class FaceFromMultipleCircleTanWireCollectionsDto { constructor(listsOfCircles?: T[][], combination?: combinationCirclesForFaceEnum, unify?: boolean, tolerance?: number); /** * The lists of circle wires; belts run between one list and the next. * @default undefined */ listsOfCircles: T[][]; /** * Which pairs get a belt: `allWithAll` every circle of a list with every circle of the next, * `inOrder` circles at the same position, `inOrderClosed` also closes each list. * @default allWithAll */ combination: combinationCirclesForFaceEnum; /** * When true, the belt faces are fused into one shape; when false they come back as a compound, * which is faster. * @default true */ unify: boolean; /** * How close a line must come to a circle to count as touching it, in model units. * @default 1e-7 * @minimum 0 * @maximum Infinity * @step 0.00001 */ tolerance: number; } /** * Two wires and a bounce count for `shapes.wire.createZigZagBetweenTwoWires`, which draws a * polyline bouncing between them. */ class ZigZagBetweenTwoWiresDto { constructor(wire1?: T, wire2?: T, nrZigZags?: number, inverse?: boolean, divideByEqualDistance?: boolean, zigZagsPerEdge?: boolean); /** * The wire the zig-zag starts on. * @default undefined */ wire1: T; /** * The wire the zig-zag bounces to. * @default undefined */ wire2: T; /** * How many bounces to draw, per edge with `zigZagsPerEdge` or over the whole wire without; one * bounce is two segments meeting at a corner. * @default 20 * @minimum 1 * @maximum Infinity * @step 1 */ nrZigZags: number; /** * When true, the zig-zag starts on the second wire instead of the first. * @default false */ inverse: boolean; /** * When true, the bounce points are spaced by length along the wires; when false they follow the * curves' parameters, which can be uneven. * @default false */ divideByEqualDistance: boolean; /** * When true, each edge of the wires gets `nrZigZags` bounces and the wires need matching edge * counts; when false the count covers the whole wire. * @default true */ zigZagsPerEdge: boolean; } /** * Wires or edges and wire options for * `shapes.wire.createWiresBetweenStartEndPointsOfWiresAndEdges`, which joins their start points * into one wire and their end points into another. */ class WiresBetweenStartEndPointsOfWiresAndEdgesDto { constructor(shapes?: T[], wireType?: wireFromPointsTypeEnum, closed?: boolean, tolerance?: number); /** * Two or more wires or edges, in the order their points are joined. * @default undefined */ shapes: T[]; /** * Whether the points are joined with straight segments or with a smooth interpolated curve. * @default polyline */ wireType?: wireFromPointsTypeEnum | undefined; /** * When true, each new wire loops back to its first point: a polygon, or a periodic curve for * the interpolated kind. * @default false */ closed?: boolean | undefined; /** * How far the interpolated curve may stray from the points, in model units; unused for * polylines. * @default 1e-7 * @minimum 0 * @maximum Infinity * @step 0.00001 */ tolerance?: number | undefined; } /** * Wires or edges, a division count and wire options for * `shapes.wire.createWiresBetweenSubdividedPointsOfWiresAndEdges`, which connects matching division * points like the rungs of a ladder. */ class WiresBetweenSubdividedPointsOfWiresAndEdgesDto { constructor(shapes?: T[], nrOfDivisions?: number, divideByEqualDistance?: boolean, wireType?: wireFromPointsTypeEnum, closed?: boolean, tolerance?: number); /** * Two or more wires or edges, in the order their points are joined. * @default undefined */ shapes: T[]; /** * How many steps each shape is divided into; one rung more than that is drawn, the ends * included. * @default 10 * @minimum 1 * @maximum Infinity * @step 1 */ nrOfDivisions?: number | undefined; /** * When true, the division points are spaced by length along each shape; when false they follow * the curves' parameters, which can be uneven. * @default false */ divideByEqualDistance?: boolean | undefined; /** * Whether each rung is a polyline of straight segments or a smooth interpolated curve. * @default polyline */ wireType?: wireFromPointsTypeEnum | undefined; /** * When true, each rung loops back to its first point: a polygon, or a periodic curve for the * interpolated kind. * @default false */ closed?: boolean | undefined; /** * How far an interpolated rung may stray from its points, in model units; unused for polylines. * @default 1e-7 * @minimum 0 * @maximum Infinity * @step 0.00001 */ tolerance?: number | undefined; } enum bSplineParametrizationEnum { /** Equal parameter spacing - symmetric for symmetric inputs, but can overshoot on uneven spacing. */ uniform = "uniform", /** Spacing proportional to chord length (OCCT's historic default). */ chordLength = "chordLength", /** Spacing proportional to sqrt(chord) - best general default; resists cusps and overshoot. */ centripetal = "centripetal" } /** * Points and fitting options for `shapes.wire.interpolatePoints`, which draws a smooth curve * through every point. */ class InterpolationDto { constructor(points?: Base.Point3[], periodic?: boolean, tolerance?: number, parametrization?: bSplineParametrizationEnum, startTangent?: Base.Vector3, endTangent?: Base.Vector3, tangents?: (Base.Vector3 | undefined)[]); /** * The points the curve passes through, in order. * @default undefined */ points: Base.Point3[]; /** * When true, the curve closes into a loop that is smooth across the seam. * @default false */ periodic: boolean; /** * How far the curve may stray from the points, in model units. * @default 1e-7 * @minimum 0 * @maximum Infinity * @step 0.00001 */ tolerance: number; /** * How the curve is spaced between points: chord length by default, `centripetal` to resist * cusps and overshoot with uneven points, or `uniform`. * @default chordLength */ parametrization?: bSplineParametrizationEnum | undefined; /** * A direction the curve must leave the first point in; only for open curves. * @default undefined * @optional true */ startTangent?: Base.Vector3 | undefined; /** * A direction the curve must arrive at the last point in; only for open curves. * @default undefined * @optional true */ endTangent?: Base.Vector3 | undefined; /** * One direction per point that the curve must follow there, with undefined entries left free; * when given, the start and end tangents are ignored. * @default undefined * @optional true */ tangents?: (Base.Vector3 | undefined)[] | undefined; } /** * Points and a tolerance for `shapes.wire.interpolatePointsSymmetric`, a closed smooth curve that * stays mirror-symmetric when the points are; it works out its own tangents, so nothing else is * needed. */ class InterpolateSymmetricDto { constructor(points?: Base.Point3[], tolerance?: number); /** * At least three points the closed curve passes through, in order. * @default undefined */ points: Base.Point3[]; /** * How far the curve may stray from the points, in model units. * @default 1e-7 * @minimum 0 * @maximum Infinity * @step 0.00001 */ tolerance: number; } /** * Several interpolation definitions for `shapes.wire.interpolateWires`, which builds one wire per * definition. */ class InterpolateWiresDto { constructor(interpolations?: InterpolationDto[], returnCompound?: boolean); /** * One definition per curve, as `interpolatePoints` takes them. * @default undefined */ interpolations: InterpolationDto[]; /** * When true, the wires are packed into one compound instead of a list. */ returnCompound: boolean; } /** * Control points and shape options for `shapes.wire.createBezier`, a smooth curve pulled toward its * control points. */ class BezierDto { constructor(points?: Base.Point3[], closed?: boolean, degree?: number, periodic?: boolean); /** * The control points: the curve starts at the first, ends at the last and is pulled toward the * ones between. * @default undefined */ points: Base.Point3[]; /** * When true, the first point is appended again so the ends meet, with a corner at the seam. * @default false */ closed: boolean; /** * How many neighboring control points shape each part of the curve; leave it out for a classic * Bezier, capped at 25 and bounded automatically above 26 points. * @default undefined * @optional true * @minimum 1 * @maximum Infinity * @step 1 */ degree?: number | undefined; /** * When true, the curve closes into a loop that is smooth across the seam, using `degree` or a * default; it overrides `closed`. * @default false * @optional true */ periodic?: boolean | undefined; } /** * Control points with a weight each and shape options for `shapes.wire.createBezierWeights`; the * weights say how strongly each point pulls the curve. */ class BezierWeightsDto { constructor(points?: Base.Point3[], weights?: number[], closed?: boolean, periodic?: boolean, degree?: number); /** * The control points: the curve starts at the first, ends at the last and is pulled toward the * ones between. * @default undefined */ points: Base.Point3[]; /** * One weight per control point, plus one more when `closed` is true and `periodic` false; above * 1 pulls harder, below 1 lets go. * @default undefined */ weights: number[]; /** * When true, the first point is appended again so the ends meet, with a corner at the seam. * @default false */ closed: boolean; /** * When true, the curve closes into a loop that is smooth across the seam and needs exactly one * weight per point; it overrides `closed`. * @default false * @optional true */ periodic?: boolean | undefined; /** * How many neighboring control points shape each part of a periodic curve; ignored otherwise. * @default undefined * @optional true * @minimum 1 * @maximum Infinity * @step 1 */ degree?: number | undefined; } /** * A wire or edge, a degree and a tolerance for `shapes.wire.rebuildWireDegree` and * `shapes.edge.rebuildEdgeDegree`. */ class RebuildCurveDegreeDto { constructor(shape?: T, degree?: number, tolerance?: number); /** * The wire or edge whose curve is rebuilt. * @default undefined */ shape: T; /** * The degree to rebuild to; lowering smooths the curve within the tolerance, raising keeps it * exact, and 3 is the practical minimum. * @default 3 * @minimum 1 * @maximum Infinity * @step 1 */ degree: number; /** * How far the rebuilt curve may stray from the old one when the degree is lowered, in model * units. * @default 0.0001 * @minimum 0 * @maximum Infinity * @step 0.0001 */ tolerance: number; } /** * A closed periodic wire or edge and a parameter for `moveWireSeamByParameter` and * `moveEdgeSeamByParameter`. */ class CurveSeamByParameterDto { constructor(shape?: T, parameter?: number); /** * The periodic wire or edge whose seam moves; a non-periodic one comes back unchanged. * @default undefined */ shape: T; /** * The curve parameter where the new seam sits, in the curve's own range. * @default 0 * @step 0.1 */ parameter: number; } /** * A closed periodic wire or edge and a distance for `moveWireSeamByLength` and * `moveEdgeSeamByLength`. */ class CurveSeamByLengthDto { constructor(shape?: T, length?: number); /** * The periodic wire or edge whose seam moves; a non-periodic one comes back unchanged. * @default undefined */ shape: T; /** * How far along the curve from the current start the new seam sits, in model units. * @default 0 * @step 0.1 */ length: number; } /** * A face, target degrees and a tolerance for `shapes.face.rebuildFaceDegree`. */ class RebuildFaceDegreeDto { constructor(shape?: T, uDegree?: number, vDegree?: number, tolerance?: number, keepTrim?: boolean); /** * The face whose surface is rebuilt. * @default undefined */ shape: T; /** * The degree to rebuild to in U; lowering smooths within the tolerance, raising keeps the * surface exact, and 3 is the practical minimum. * @default 3 * @minimum 1 * @maximum Infinity * @step 1 */ uDegree: number; /** * The degree to rebuild to in V, with the same rules as `uDegree`. * @default 3 * @minimum 1 * @maximum Infinity * @step 1 */ vDegree: number; /** * How far the rebuilt surface may stray from the old one when a degree is lowered, in model * units. * @default 0.0001 * @minimum 0 * @maximum Infinity * @step 0.0001 */ tolerance: number; /** * When true, the face keeps its boundary wires, which is reliable when raising; when false it * covers the whole rebuilt surface. * @default false */ keepTrim: boolean; } /** * A face and which flips to apply for `shapes.face.flipFaceUV`. */ class FlipFaceUVDto { constructor(shape?: T, swapUV?: boolean, reverseU?: boolean, reverseV?: boolean); /** * The face whose UV parameters are changed. * @default undefined */ shape: T; /** * When true, U and V change places. * @default false */ swapUV: boolean; /** * When true, U runs the other way. * @default false */ reverseU: boolean; /** * When true, V runs the other way. * @default false */ reverseV: boolean; } /** * A face and fitting options for `shapes.face.normalizeFaceParametrization`, which makes equal * parameter steps into roughly equal distances. */ class NormalizeFaceParametrizationDto { constructor(shape?: T, normalizeU?: boolean, normalizeV?: boolean, samples?: number, tolerance?: number); /** * The face to reparametrize. * @default undefined */ shape: T; /** * When true, the U parameter is evened out by distance. * @default true */ normalizeU: boolean; /** * When true, the V parameter is evened out by distance. * @default true */ normalizeV: boolean; /** * How many points per direction the surface is resampled at; more is closer to the original and * slower. * @default 24 * @minimum 4 * @maximum Infinity * @step 1 */ samples: number; /** * How far the refitted surface may stray from the original, in model units. * @default 0.0001 * @minimum 0 * @maximum Infinity * @step 0.0001 */ tolerance: number; } /** * Several Bezier definitions for `shapes.wire.createBezierWires`, which builds one wire per * definition. */ class BezierWiresDto { constructor(bezierWires?: BezierDto[], returnCompound?: boolean); /** * One definition per curve, as `createBezier` takes them. * @default undefined */ bezierWires: BezierDto[]; /** * When true, the wires are packed into one compound instead of a list. */ returnCompound: boolean; } /** * A wire or edge and a division count for `divideWireByParamsToPoints`, * `divideEdgeByEqualDistanceToPoints` and their siblings in `shapes.wire` and `shapes.edge`. */ class DivideDto { constructor(shape?: T, nrOfDivisions?: number, removeStartPoint?: boolean, removeEndPoint?: boolean); /** * The wire or edge to place points along. * @default undefined */ shape: T; /** * How many steps to divide the curve into; one more point than that is placed, the ends * included. * @default 10 * @minimum 1 * @maximum Infinity * @step 1 */ nrOfDivisions?: number | undefined; /** * When true, the point at the start is left out. * @default false */ removeStartPoint?: boolean | undefined; /** * When true, the point at the end is left out. * @default false */ removeEndPoint?: boolean | undefined; } /** * A wire, a shape and a direction for `shapes.wire.project`, which casts the wire onto the shape * along the direction. */ class ProjectWireDto { constructor(wire?: T, shape?: U, direction?: Base.Vector3); /** * The wire to cast onto the shape. * @default undefined */ wire: T; /** * The shape the wire lands on. * @default undefined */ shape: U; /** * The direction the wire is cast along; only its direction matters. * @default [0, 1, 0] */ direction: Base.Vector3; } /** * Points, a shape and a direction for `shapes.vertex.projectPoints`, which casts each point onto * the shape along the direction. */ class ProjectPointsOnShapeDto { constructor(points?: Base.Point3[], shape?: T, direction?: Base.Vector3, projectionType?: pointProjectionTypeEnum); /** * The points to cast onto the shape. * @default undefined */ points: Base.Point3[]; /** * The shape the points land on. * @default undefined */ shape: T; /** * The direction and reach of the cast as one vector, in model units: hits farther away than its * length are not found. * @default [0, 10, 0] */ direction: Base.Vector3; /** * Which hits to keep when a point crosses the shape more than once: all of them, the closest, * the farthest, or both of those. * @default all */ projectionType: pointProjectionTypeEnum; } /** * A shape and deflection settings for `shapes.wire.wiresToPoints`, which traces every wire of the * shape as points. */ class WiresToPointsDto { constructor(shape?: T, angularDeflection?: number, curvatureDeflection?: number, minimumOfPoints?: number, uTolerance?: number, minimumLength?: number); /** * The shape whose wires are traced. * @default undefined */ shape: T; /** * The largest angle, in radians, the polyline may turn between two points; smaller follows * curves more closely. * @default 0.1 * @minimum 0 * @maximum Infinity * @step 0.01 */ angularDeflection: number; /** * The largest distance, in model units, the polyline may stray from the curve; smaller follows * it more closely. * @default 0.1 * @minimum 0 * @maximum Infinity * @step 0.001 */ curvatureDeflection: number; /** * The fewest points any edge is traced with, however straight. * @default 2 * @minimum 0 * @maximum Infinity * @step 1 */ minimumOfPoints: number; /** * How close two parameter values must be to count as the same point. * @default 1.0e-9 * @minimum 0 * @maximum Infinity * @step 1.0e-9 */ uTolerance: number; /** * Edges shorter than this, in model units, are traced with the minimum number of points. * @default 1.0e-7 * @minimum 0 * @maximum Infinity * @step 1.0e-7 */ minimumLength: number; } /** * A shape and deflection settings for `shapes.edge.edgesToPoints`, which traces every edge of the * shape as points. */ class EdgesToPointsDto { constructor(shape?: T, angularDeflection?: number, curvatureDeflection?: number, minimumOfPoints?: number, uTolerance?: number, minimumLength?: number); /** * The shape whose edges are traced. * @default undefined */ shape: T; /** * The largest angle, in radians, the polyline may turn between two points; smaller follows * curves more closely. * @default 0.1 * @minimum 0 * @maximum Infinity * @step 0.01 */ angularDeflection: number; /** * The largest distance, in model units, the polyline may stray from the curve; smaller follows * it more closely. * @default 0.1 * @minimum 0 * @maximum Infinity * @step 0.001 */ curvatureDeflection: number; /** * The fewest points any edge is traced with, however straight. * @default 2 * @minimum 0 * @maximum Infinity * @step 1 */ minimumOfPoints: number; /** * How close two parameter values must be to count as the same point. * @default 1.0e-9 * @minimum 0 * @maximum Infinity * @step 1.0e-9 */ uTolerance: number; /** * Edges shorter than this, in model units, are traced with the minimum number of points. * @default 1.0e-7 * @minimum 0 * @maximum Infinity * @step 1.0e-7 */ minimumLength: number; } /** * Wires, a shape and a direction for `shapes.wire.projectWires`, which casts each wire onto the * shape along the direction. */ class ProjectWiresDto { constructor(wires?: T[], shape?: U, direction?: Base.Vector3); /** * The wires to cast onto the shape, one result per wire. * @default undefined */ wires: T[]; /** * The shape the wires land on. * @default undefined */ shape: U; /** * The direction the wires are cast along; only its direction matters. * @default [0, 1, 0] */ direction: Base.Vector3; } /** * Wires or edges and a division count for `divideWiresByParamsToPoints`, * `divideEdgesByEqualDistanceToPoints` and their siblings. */ class DivideShapesDto { constructor(shapes: T[], nrOfDivisions?: number, removeStartPoint?: boolean, removeEndPoint?: boolean); /** * The wires or edges to place points along, one list of points per shape. * @default undefined */ shapes: T[]; /** * How many steps to divide each curve into; one more point than that is placed, the ends * included. * @default 10 * @minimum 1 * @maximum Infinity * @step 1 */ nrOfDivisions: number; /** * When true, the point at the start of each curve is left out. * @default false */ removeStartPoint: boolean; /** * When true, the point at the end of each curve is left out. * @default false */ removeEndPoint: boolean; } /** * A wire, edge or 2D curve and a parameter for the `...AtParam` methods, such as * `shapes.wire.pointOnWireAtParam` and `shapes.edge.tangentOnEdgeAtParam`. */ class DataOnGeometryAtParamDto { constructor(shape: T, param?: number); /** * The wire, edge or curve to evaluate. * @default undefined */ shape: T; /** * Where to evaluate, as a fraction from 0 at the start to 1 at the end; for a raw 2D curve it * is the curve's own parameter. * @default 0.5 * @minimum 0 * @maximum 1 * @step 0.1 */ param: number; } /** * Several edges and one parameter for `shapes.edge.pointsOnEdgesAtParam` and * `tangentsOnEdgesAtParam`. */ class DataOnGeometryesAtParamDto { constructor(shapes: T[], param?: number); /** * The edges to evaluate, one result per edge. * @default undefined */ shapes: T[]; /** * Where to evaluate on every edge, as a fraction from 0 at the start to 1 at the end. * @default 0.5 * @minimum 0 * @maximum 1 * @step 0.1 */ param: number; } /** * A wire and a spacing for `shapes.wire.pointsOnWireAtEqualLength`, which places points every * `length` units from the start. */ class PointsOnWireAtEqualLengthDto { constructor(shape: T, length?: number, tryNext?: boolean, includeFirst?: boolean, includeLast?: boolean); /** * The wire to place points along. * @default undefined */ shape: T; /** * The distance between points along the wire, in model units. * @default 0.5 * @minimum -Infinity * @maximum Infinity * @step 0.1 */ length: number; /** * When true, one more point is asked for a step beyond the last one that fit. * @default false */ tryNext: boolean; /** * When true, the point at the start of the wire is kept. * @default false */ includeFirst: boolean; /** * When true, the end point of the wire is appended whatever the spacing. * @default false */ includeLast: boolean; } /** * A wire and a repeating pattern of gaps for `shapes.wire.pointsOnWireAtPatternOfLengths`. */ class PointsOnWireAtPatternOfLengthsDto { constructor(shape: T, lengths?: number[], tryNext?: boolean, includeFirst?: boolean, includeLast?: boolean); /** * The wire to place points along. * @default undefined */ shape: T; /** * The gaps between points in model units, applied in turn from the start and repeated until the * wire runs out. * @default undefined */ lengths: number[]; /** * When true, one more point is asked for at the next gap beyond the last one that fit. * @default false */ tryNext: boolean; /** * When true, the point at the start of the wire is kept. * @default false */ includeFirst: boolean; /** * When true, the end point of the wire is appended whatever the pattern. * @default false */ includeLast: boolean; } /** * A wire or edge and a distance for the `...AtLength` methods, such as * `shapes.wire.pointOnWireAtLength` and `shapes.edge.tangentOnEdgeAtLength`. */ class DataOnGeometryAtLengthDto { constructor(shape: T, length?: number); /** * The wire or edge to evaluate. * @default undefined */ shape: T; /** * The distance from the start along the curve, in model units. * @default 0.5 * @minimum -Infinity * @maximum Infinity * @step 0.1 */ length: number; } /** * Several edges and one distance for `shapes.edge.pointsOnEdgesAtLength` and * `tangentsOnEdgesAtLength`. */ class DataOnGeometryesAtLengthDto { constructor(shapes: T[], length?: number); /** * The edges to evaluate, one result per edge. * @default undefined */ shapes: T[]; /** * The distance from the start of each edge along its curve, in model units. * @default 0.5 * @minimum -Infinity * @maximum Infinity * @step 0.1 */ length: number; } /** * A wire and several distances for `shapes.wire.pointsOnWireAtLengths`. */ class DataOnGeometryAtLengthsDto { constructor(shape: T, lengths?: number[]); /** * The wire to evaluate. * @default undefined */ shape: T; /** * The distances from the start along the wire, in model units, one point each. * @default undefined */ lengths: number[]; } /** * A radius, a center and a plane normal for the circle edge, wire and face methods of `shapes` and * `geom.curves.geomCircleCurve`. */ class CircleDto { constructor(radius?: number, center?: Base.Point3, direction?: Base.Vector3); /** * The distance from the center to the circle, in model units. * @default 1 * @minimum 0 * @maximum Infinity * @step 0.1 */ radius: number; /** * The point the circle is centered on. * @default [0, 0, 0] */ center: Base.Point3; /** * The normal of the plane the circle lies in; the default lays it flat on the ground. * @default [0, 1, 0] */ direction: Base.Vector3; } /** * A rectangle, hexagon counts and optional patterns for `shapes.wire.hexagonsInGrid` and * `shapes.face.hexagonsInGrid`, which fill the rectangle on the ground plane with a honeycomb. */ class HexagonsInGridDto { constructor(width?: number, height?: number, nrHexagonsInHeight?: number, nrHexagonsInWidth?: number, flatTop?: boolean, extendTop?: boolean, extendBottom?: boolean, extendLeft?: boolean, extendRight?: boolean, scalePatternWidth?: number[], scalePatternHeight?: number[], filletPattern?: number[], inclusionPattern?: boolean[]); /** * The width of the rectangle to fill, in model units; the hexagon size follows from it and the * counts. * @default 10 * @minimum 0 * @maximum Infinity * @step 0.1 */ width?: number | undefined; /** * The height of the rectangle to fill, in model units. * @default 10 * @minimum 0 * @maximum Infinity * @step 0.1 */ height?: number | undefined; /** * How many hexagons fit across the width. * @default 10 * @minimum 0 * @maximum Infinity * @step 1 */ nrHexagonsInWidth?: number | undefined; /** * How many hexagons fit across the height. * @default 10 * @minimum 0 * @maximum Infinity * @step 1 */ nrHexagonsInHeight?: number | undefined; /** * When true, the hexagons have a flat side at the top and bottom; when false a corner points * up. * @default false */ flatTop?: boolean | undefined; /** * When true, the grid is stretched so its top row reaches past the top edge, covering it * without a jagged border. * @default false */ extendTop?: boolean | undefined; /** * When true, the grid is stretched so its bottom row reaches past the bottom edge, covering it * without a jagged border. * @default false */ extendBottom?: boolean | undefined; /** * When true, the grid is stretched so its left column reaches past the left edge, covering it * without a jagged border. * @default false */ extendLeft?: boolean | undefined; /** * When true, the grid is stretched so its right column reaches past the right edge, covering it * without a jagged border. * @default false */ extendRight?: boolean | undefined; /** * Sizes of the hexagons along the width as fractions of their full size, applied in turn; 1 or * no list means no scaling. * @default undefined * @optional true */ scalePatternWidth?: number[] | undefined; /** * Sizes of the hexagons along the height as fractions of their full size, applied in turn; 1 or * no list means no scaling. * @default undefined * @optional true */ scalePatternHeight?: number[] | undefined; /** * Corner rounding of the hexagons as fractions from 0 to 1 of the largest radius that fits, * applied in turn; 0 leaves sharp corners. * @default undefined * @optional true */ filletPattern?: number[] | undefined; /** * Which hexagons are built, applied in turn: true builds one, false skips it. * @default undefined * @optional true */ inclusionPattern?: boolean[] | undefined; } /** * Section wires and a solid flag for `operations.loft`, which stretches a surface through the * sections in list order. */ class LoftDto { constructor(shapes?: T[], makeSolid?: boolean); /** * The section wires, or edges, in the order the surface passes through them. * @default undefined */ shapes: T[]; /** * When true, the loft is capped into a solid; the sections must be closed for that. * @default false */ makeSolid: boolean; } /** * Section wires and fitting options for `operations.loftAdvanced`: ruled or smooth patches, a * closed or periodic loop, end points and the approximation settings. */ class LoftAdvancedDto { constructor(shapes?: T[], makeSolid?: boolean, closed?: boolean, periodic?: boolean, straight?: boolean, nrPeriodicSections?: number, useSmoothing?: boolean, maxUDegree?: number, tolerance?: number, parType?: approxParametrizationTypeEnum, startVertex?: Base.Point3, endVertex?: Base.Point3); /** * The section wires, or edges, in the order the surface passes through them. * @default undefined */ shapes: T[]; /** * When true, the loft is capped into a solid; the sections must be closed for that. * @default false */ makeSolid: boolean; /** * When true, the surface loops from the last section back to the first. * @default false */ closed: boolean; /** * When true, the closed loop is made smooth across the seam by resampling the sections; needs * `closed`. * @default false */ periodic: boolean; /** * When true, the patches between sections are ruled surfaces with straight lines instead of a * smooth blend. * @default false */ straight: boolean; /** * How many points each section is resampled into for a periodic loft. * @default 10 * @minimum 1 * @maximum Infinity * @step 1 */ nrPeriodicSections: number; /** * When true, the kernel smooths the fitted surface. * @default false */ useSmoothing: boolean; /** * The highest polynomial degree the surface may use across the sections. * @default 3 */ maxUDegree: number; /** * How far the fitted surface may stray from the sections, in model units. * @default 1.0e-7 * @minimum 0 * @maximum Infinity * @step 0.000001 */ tolerance: number; /** * How the sections are parametrized before fitting: by chord length, centripetal, or * isoparametric; centripetal handles uneven sections best. * @default approxCentripetal */ parType: approxParametrizationTypeEnum; /** * A point the loft closes to before the first section, making a pointed end; leave it out for * an open end. * @default undefined * @optional true */ startVertex?: Base.Point3 | undefined; /** * A point the loft closes to after the last section, making a pointed end; leave it out for an * open end. * @default undefined * @optional true */ endVertex?: Base.Point3 | undefined; } /** * A shape and a distance for `operations.offset`, which moves the shape's boundary outward or * inward with rounded corners. */ class OffsetDto { constructor(shape?: T, face?: U, distance?: number, tolerance?: number); /** * The shape to offset: a wire, edge, face, shell or solid. * @default undefined */ shape: T; /** * For a wire or edge, a face whose surface the offset is drawn on; leave it out to offset in * the wire's own plane. * @default undefined * @optional true */ face?: U | undefined; /** * How far the boundary moves, in model units; negative moves it inward, 0 returns the shape as * it is. * @default 0.2 * @minimum -Infinity * @maximum Infinity * @step 0.1 */ distance: number; /** * How close two points must be to count as the same when the offset is built, in model units. * @default 0.1 * @minimum 0 * @maximum Infinity * @step 0.01 */ tolerance: number; } /** * A shape, a distance and corner options for `operations.offsetAdv`, which moves the shape's * boundary outward or inward. */ class OffsetAdvancedDto { constructor(shape?: T, face?: U, distance?: number, tolerance?: number, joinType?: joinTypeEnum, removeIntEdges?: boolean); /** * The shape to offset: a wire, edge, face, shell or solid. * @default undefined */ shape: T; /** * For a wire or edge, a face whose surface the offset is drawn on; leave it out to offset in * the wire's own plane. * @default undefined * @optional true */ face?: U | undefined; /** * How far the boundary moves, in model units; negative moves it inward, 0 returns the shape as * it is. * @default 0.2 * @minimum -Infinity * @maximum Infinity * @step 0.1 */ distance: number; /** * How close two points must be to count as the same when the offset is built, in model units. * @default 0.1 * @minimum 0 * @maximum Infinity * @step 0.01 */ tolerance: number; /** * How the offset pieces meet at corners: `arc` rounds them, `intersection` extends them to a * sharp corner, `tangent` keeps them tangent. * @default arc */ joinType: joinTypeEnum; /** * When true, the internal edges the offset can leave behind are removed from the result. * @default false */ removeIntEdges: boolean; } /** * A profile, an angle and an axis for `operations.revolve`, which spins the profile about the axis * through the origin. */ class RevolveDto { constructor(shape?: T, angle?: number, direction?: Base.Vector3, copy?: boolean); /** * The profile to spin: a wire gives a shell, a face a solid; it must not cross the axis. * @default undefined */ shape: T; /** * How far to spin, in degrees; 360 or more gives a full turn. * @default 360 * @minimum 0 * @maximum 360 * @step 1 */ angle: number; /** * The direction of the axis, which passes through the origin. * @default [0, 1, 0] */ direction: Base.Vector3; /** * When true, the profile's geometry is copied instead of shared with the result. * @default false */ copy: boolean; } /** * A path wire and profile shapes for `operations.pipe`, and generally one shape with a list of * others, as in `shapes.wire.addEdgesAndWiresToWire`. */ class ShapeShapesDto { constructor(shape?: T, shapes?: U[]); /** * The main shape: the path wire for a pipe, the wire to extend when adding edges. * @default undefined */ shape: T; /** * The other shapes: the profiles placed on the path, or the edges and wires to add. * @default undefined */ shapes: U[]; } /** * Flat wires and a face for `shapes.wire.placeWiresOnFace`, which maps the wires onto the face's * surface. */ class WiresOnFaceDto { constructor(wires?: T[], face?: U); /** * The wires drawn on the ground plane; their Z coordinate becomes U and their X coordinate V. * @default undefined */ wires: T[]; /** * The face whose surface the wires are mapped onto. * @default undefined */ face: U; } /** * Path wires, a radius and sweep options for `operations.pipeWiresCylindrical`, which makes a round * tube along each wire. */ class PipeWiresCylindricalDto { constructor(shapes?: T[], radius?: number, makeSolid?: boolean, trihedronEnum?: geomFillTrihedronEnum, forceApproxC1?: boolean); /** * The path wires, one tube per wire. * @default undefined */ shapes: T[]; /** * The radius of the tubes, in model units. * @default 0.1 * @minimum 0 * @maximum Infinity * @step 1 */ radius: number; /** * When true, the tubes are solids; when false they are open shells. * @default true */ makeSolid: boolean; /** * How the profile turns as it follows the path; `isConstantNormal` keeps it steady, the Frenet * modes follow the curve's bending. * @default isConstantNormal */ trihedronEnum: geomFillTrihedronEnum; /** * When true, a swept surface that came out with kinks is refitted to be smooth. * @default false */ forceApproxC1: boolean; } /** * A path wire, a radius and sweep options for `operations.pipeWireCylindrical`, which makes a round * tube along the wire. */ class PipeWireCylindricalDto { constructor(shape?: T, radius?: number, makeSolid?: boolean, trihedronEnum?: geomFillTrihedronEnum, forceApproxC1?: boolean); /** * The path wire the tube follows. * @default undefined */ shape: T; /** * The radius of the tube, in model units. * @default 0.1 * @minimum 0 * @maximum Infinity * @step 1 */ radius: number; /** * When true, the tube is a solid; when false it is an open shell. * @default true */ makeSolid: boolean; /** * How the profile turns as it follows the path; `isConstantNormal` keeps it steady, the Frenet * modes follow the curve's bending. * @default isConstantNormal */ trihedronEnum: geomFillTrihedronEnum; /** * When true, a swept surface that came out with kinks is refitted to be smooth. * @default false */ forceApproxC1: boolean; } /** * A path wire, a polygon size and sweep options for `operations.pipePolylineWireNGon`, which makes * a tube with flat sides along the wire. */ class PipePolygonWireNGonDto { constructor(shape?: T, radius?: number, nrCorners?: number, makeSolid?: boolean, trihedronEnum?: geomFillTrihedronEnum, forceApproxC1?: boolean); /** * The path wire the tube follows. * @default undefined */ shape: T; /** * The distance from the path to each corner of the polygon, in model units. * @default 0.1 * @minimum 0 * @maximum Infinity * @step 1 */ radius: number; /** * How many corners, and so flat sides, the tube has. * @default 6 * @minimum 3 * @maximum Infinity * @step 1 */ nrCorners: number; /** * When true, the tube is a solid; when false it is an open shell. * @default true */ makeSolid: boolean; /** * How the profile turns as it follows the path; `isConstantNormal` keeps it steady, the Frenet * modes follow the curve's bending. * @default isConstantNormal */ trihedronEnum: geomFillTrihedronEnum; /** * When true, a swept surface that came out with kinks is refitted to be smooth. * @default false */ forceApproxC1: boolean; } /** * A shape and a vector for `operations.extrude`, which sweeps the shape in a straight line. */ class ExtrudeDto { constructor(shape?: T, direction?: Base.Vector3); /** * The shape to sweep: a face gives a solid, a wire a shell, an edge a face. * @default undefined */ shape: T; /** * The direction and distance of the sweep as one vector, in model units. * @default [0, 1, 0] */ direction: Base.Vector3; } /** * Shapes and a vector for `operations.extrudeShapes`, which sweeps every shape in the same straight * line. */ class ExtrudeShapesDto { constructor(shapes?: T[], direction?: Base.Vector3); /** * The shapes to sweep, one result per shape. * @default undefined */ shapes: T[]; /** * The direction and distance of the sweep as one vector, in model units. * @default [0, 1, 0] */ direction: Base.Vector3; } /** * A shape and the shapes to cut it with for `operations.splitShapeWithShapes`. */ class SplitDto { constructor(shape?: T, shapes?: T[]); /** * The shape to cut into pieces. * @default undefined */ shape: T; /** * The shapes that do the cutting, such as faces or solids passing through the shape. * @default undefined */ shapes: T[]; /** * How far apart geometry may be and still count as touching, in model units; helps when faces * nearly coincide. * @default 1.0e-4 * @minimum 0 * @maximum Infinity * @step 0.000001 */ localFuzzyTolerance: number; /** * When true, the inputs stay untouched and the result holds the pieces of every shape involved; * when false only the pieces of `shape` come back. * @default true */ nonDestructive: boolean; } /** * Shapes and an edge flag for `booleans.union`, which fuses them into one. */ class UnionDto { constructor(shapes?: T[], keepEdges?: boolean); /** * The shapes to fuse, joined one after another in this order. * @default undefined */ shapes: T[]; /** * When false, faces that end up on one surface are merged and their seams removed; when true * every edge of the inputs stays. * @default false */ keepEdges: boolean; } /** * A main shape and the shapes to cut away from it for `booleans.difference`. */ class DifferenceDto { constructor(shape?: T, shapes?: T[], keepEdges?: boolean); /** * The shape material is removed from. * @default undefined */ shape: T; /** * The shapes whose volume is cut away, one after another. * @default undefined */ shapes: T[]; /** * When false, faces left on one surface are merged and their seams removed; when true every * edge stays. * @default false */ keepEdges: boolean; } /** * Shapes and an edge flag for `booleans.intersection`, which keeps what the first shape shares with * each of the others. */ class IntersectionDto { constructor(shapes?: T[], keepEdges?: boolean); /** * The shapes; the first is intersected with every other one in turn. * @default undefined */ shapes: T[]; /** * When false, faces on one surface are merged and their seams removed; when true every edge * stays. * @default false */ keepEdges: boolean; } /** * One shape for the many methods that take nothing else, such as `shapes.shape.isValid`, * `shapes.face.getFaceArea` or `operations.boundingBoxOfShape`. */ class ShapeDto { constructor(shape?: T); /** * The shape to work on; it is not changed. * @default undefined */ shape: T; } /** * Two shapes and their meshing precisions for `booleans.meshMeshIntersectionWires` and * `meshMeshIntersectionPoints`. */ class MeshMeshIntersectionTwoShapesDto { constructor(shape1?: T, shape2?: T, precision1?: number, precision2?: number); /** * The first shape to intersect. * @default undefined */ shape1: T; /** * The meshing tolerance of the first shape in model units; smaller follows curves more closely * and costs more triangles. * @default 0.01 * @minimum 0 * @maximum Infinity * @step 0.01 */ precision1?: number | undefined; /** * The second shape to intersect. * @default undefined */ shape2: T; /** * The meshing tolerance of the second shape in model units; smaller follows curves more closely * and costs more triangles. * @default 0.01 * @minimum 0 * @maximum Infinity * @step 0.01 */ precision2?: number | undefined; } /** * A main shape, other shapes and their meshing precisions for * `booleans.meshMeshIntersectionOfShapesWires` and `meshMeshIntersectionOfShapesPoints`. */ class MeshMeshesIntersectionOfShapesDto { constructor(shape?: T, shapes?: T[], precision?: number, precisionShapes?: number[]); /** * The main shape every other shape is intersected with. * @default undefined */ shape: T; /** * The meshing tolerance of the main shape in model units; smaller follows curves more closely * and costs more triangles. * @default 0.01 * @minimum 0 * @maximum Infinity * @step 0.01 */ precision?: number | undefined; /** * The other shapes, each intersected with the main one. * @default undefined */ shapes: T[]; /** * One meshing tolerance per other shape; leave it out to mesh them all at `precision`. * @default undefined * @optional true */ precisionShapes?: number[] | undefined; } /** * Two shapes for `shapes.shape.isEqual`, `isNotEqual`, `isSame` and `isPartner`. */ class CompareShapesDto { constructor(shape?: T, otherShape?: T); /** * The first shape of the comparison. * @default undefined */ shape: T; /** * The second shape of the comparison. * @default undefined */ otherShape: T; } /** * A wire and a length for `shapeFix.fixSmallEdgeOnWire`, which removes edges shorter than that. */ class FixSmallEdgesInWireDto { constructor(shape?: T, lockvtx?: boolean, precsmall?: number); /** * The wire to clean up. * @default undefined */ shape: T; /** * When true, the existing vertices are kept in place; when false they may move to close the * gaps. * @default false */ lockvtx: boolean; /** * Edges shorter than this, in model units, are removed; 0 uses the wire's own tolerance. * @default 0 * @minimum 0 * @maximum Infinity * @step 0.0000000001 */ precsmall: number; } /** * A shape and tolerance bounds for `shapeFix.basicShapeRepair`, the kernel's general repair. */ class BasicShapeRepairDto { constructor(shape?: T, precision?: number, maxTolerance?: number, minTolerance?: number); /** * The shape to repair; it stays as it is and a repaired copy comes back. * @default undefined */ shape: T; /** * The size of defect the repair looks for, in model units. * @default 0.001 * @minimum 0 * @maximum Infinity * @step 0.0000000001 */ precision: number; /** * The largest tolerance the repair may give a part of the shape while closing gaps, in model * units; a gap needing more stays open. * @default 0.01 * @minimum 0 * @maximum Infinity * @step 0.0000000001 */ maxTolerance: number; /** * The smallest tolerance the repair may use, in model units; edges shorter than this are * removed. * @default 0.0001 * @minimum 0 * @maximum Infinity * @step 0.0000000001 */ minTolerance: number; } /** * A shape and a tolerance for `shapes.face.faceFromSurface`, `shapes.shell.sewFaces` and the other * methods that build within a tolerance. */ class ShapeWithToleranceDto { constructor(shape?: T, tolerance?: number); /** * The shape or surface to work on. * @default undefined */ shape: T; /** * How close geometry must be to count as touching, in model units. * @default 1.0e-7 * @minimum 0 * @maximum Infinity * @step 0.000001 */ tolerance: number; } /** * A shape and a position for `shapes.face.getFace`, `shapes.wire.getWire`, `shapes.solid.getSolid` * and the like. */ class ShapeIndexDto { constructor(shape?: T, index?: number); /** * The shape to pick from. * @default undefined */ shape: T; /** * The position of the wanted part, counting from 0 in the order the kernel walks the shape; * beyond the last one throws. * @default 0 * @minimum 0 * @maximum Infinity * @step 1 */ index: number; } /** * A shape and a position for `shapes.edge.getEdge`. */ class EdgeIndexDto { constructor(shape?: T, index?: number); /** * The shape to pick the edge from. * @default undefined */ shape: T; /** * The position of the wanted edge, counting from 0 in the order the kernel walks the shape; * beyond the last one throws. * @default 0 * @minimum 0 * @maximum Infinity * @step 1 */ index: number; } /** * A flat profile, a height and a twist for `operations.rotatedExtrude`, which extrudes the profile * up along Y while turning it. */ class RotationExtrudeDto { constructor(shape?: T, height?: number, angle?: number, makeSolid?: boolean); /** * The flat profile to extrude, a wire or a face lying on the ground. * @default undefined */ shape: T; /** * How far the profile is extruded along Y, in model units. * @default 1 * @minimum 0 * @maximum Infinity * @step 0.1 */ height: number; /** * How far the profile turns about the Y axis over the height, in degrees. * @default 360 * @minimum 0 * @maximum 360 * @step 1 */ angle: number; /** * When true, a face profile gives a closed solid; when false the result is a shell. * @default true */ makeSolid: boolean; } /** * A solid, the faces to remove and a wall thickness for `operations.makeThickSolidByJoin`, which * hollows the solid into a shell of that thickness. */ class ThickSolidByJoinDto { constructor(shape?: T, shapes?: T[], offset?: number, tolerance?: number, intersection?: boolean, selfIntersection?: boolean, joinType?: joinTypeEnum, removeIntEdges?: boolean); /** * The solid to hollow out. * @default undefined */ shape: T; /** * The faces of the solid to remove, leaving the openings of the shell. * @default undefined */ shapes: T[]; /** * The wall thickness in model units; negative grows the wall inward. * @default 1 * @minimum 0 * @maximum Infinity * @step 0.1 */ offset: number; /** * How close two points must be to count as the same when the offset walls are joined, in model * units. * @default 1.0e-3 * @minimum 0 * @maximum Infinity * @step 0.000001 */ tolerance: number; /** * When true, the offset faces are intersected with each other rather than joined by their * parallels; the kernel's default is false. * @default false */ intersection: boolean; /** * Whether the kernel should look for self-intersections in the result; not implemented by the * kernel, so leave it false. * @default false */ selfIntersection: boolean; /** * How the offset walls meet at corners: `arc` rounds them, `intersection` extends them to a * sharp corner, `tangent` keeps them tangent. * @default arc */ joinType: joinTypeEnum; /** * When true, the internal edges the offset can leave on the walls are removed from the result. * @default false */ removeIntEdges: boolean; } /** * A shape and a scale, rotation and translation for `transforms.transform`, applied in that order * about the origin. */ class TransformDto { constructor(shape?: T, translation?: Base.Vector3, rotationAxis?: Base.Vector3, rotationAngle?: number, scaleFactor?: number); /** * The shape to transform; it stays as it is and a transformed copy comes back. * @default undefined */ shape: T; /** * The vector the shape moves by, in model units, applied last. * @default [0,0,0] */ translation: Base.Vector3; /** * The direction of the rotation axis, which passes through the origin. * @default [0,1,0] */ rotationAxis: Base.Vector3; /** * The rotation about the axis, in degrees, applied after the scale. * @default 0 * @minimum 0 * @maximum 360 * @step 1 */ rotationAngle: number; /** * The uniform scale about the origin, applied first; 1 keeps the size. * @default 1 * @minimum 0 * @maximum Infinity * @step 0.1 */ scaleFactor: number; } /** * Shapes and one scale, rotation and translation each for `transforms.transformShapes`; all the * lists must have the same length. */ class TransformShapesDto { constructor(shapes?: T[], translations?: Base.Vector3[], rotationAxes?: Base.Vector3[], rotationAngles?: number[], scaleFactors?: number[]); /** * The shapes to transform; they stay as they are and transformed copies come back in the same * order. * @default undefined */ shapes: T[]; /** * One translation vector per shape, in model units. * @default [[0,0,0]] */ translations: Base.Vector3[]; /** * One rotation axis direction per shape, each through the origin. * @default [[0,1,0]] */ rotationAxes: Base.Vector3[]; /** * One rotation angle per shape, in degrees. * @default [0] */ rotationAngles: number[]; /** * One uniform scale factor per shape, about the origin. * @default [1] */ scaleFactors: number[]; } /** * A shape and a vector for `transforms.translate`. */ class TranslateDto { constructor(shape?: T, translation?: Base.Vector3); /** * The shape to move. * @default undefined */ shape: T; /** * The vector the shape moves by, in model units. * @default [0, 0, 0] */ translation: Base.Vector3; } /** * Shapes and one vector each for `transforms.translateShapes`; the two lists must have the same * length. */ class TranslateShapesDto { constructor(shapes?: T[], translations?: Base.Vector3[]); /** * The shapes to move. * @default undefined */ shapes: T[]; /** * One vector per shape, in model units. * @default [[0, 0, 0]] */ translations: Base.Vector3[]; } /** * A shape and two full frames for `transforms.alignNormAndAxis`: the point, normal and axis the * shape is taken from, and the point, normal and axis it lands on. */ class AlignNormAndAxisDto { constructor(shape?: T, fromOrigin?: Base.Point3, fromNorm?: Base.Vector3, fromAx?: Base.Vector3, toOrigin?: Base.Point3, toNorm?: Base.Vector3, toAx?: Base.Vector3); /** * The shape to move. * @default undefined */ shape: T; /** * The point on the shape that is carried onto `toOrigin`. * @default [0, 0, 0] */ fromOrigin: Base.Point3; /** * The normal direction at the shape's frame, carried onto `toNorm`. * @default [1, 0, 0] */ fromNorm: Base.Vector3; /** * An axis direction in the plane of the normal at the shape's frame, carried onto `toAx`; it * fixes the spin about the normal. * @default [0, 0, 1] */ fromAx: Base.Vector3; /** * The point `fromOrigin` lands on. * @default [0, 1, 0] */ toOrigin: Base.Point3; /** * The direction `fromNorm` lands on. * @default [0, 1, 0] */ toNorm: Base.Vector3; /** * The direction `fromAx` lands on. * @default [0, 0, 1] */ toAx: Base.Vector3; } /** * A shape, a point and direction on it, and the point and direction to land on, for * `transforms.align`. */ class AlignDto { constructor(shape?: T, fromOrigin?: Base.Point3, fromDirection?: Base.Vector3, toOrigin?: Base.Point3, toDirection?: Base.Vector3); /** * The shape to move. * @default undefined */ shape: T; /** * The point on the shape that is carried onto `toOrigin`. * @default [0, 0, 0] */ fromOrigin: Base.Point3; /** * The direction at the shape's frame that is carried onto `toDirection`. * @default [0, 0, 1] */ fromDirection: Base.Vector3; /** * The point `fromOrigin` lands on. * @default [0, 1, 0] */ toOrigin: Base.Point3; /** * The direction `fromDirection` lands on. * @default [0, 1, 0] */ toDirection: Base.Vector3; } /** * Shapes and one from and to frame each for `transforms.alignShapes`; all the lists must have the * same length. */ class AlignShapesDto { constructor(shapes?: T[], fromOrigins?: Base.Vector3[], fromDirections?: Base.Vector3[], toOrigins?: Base.Vector3[], toDirections?: Base.Vector3[]); /** * The shapes to move. * @default undefined */ shapes: T[]; /** * One point per shape that is carried onto the matching `toOrigins` entry. * @default [[0, 0, 0]] */ fromOrigins: Base.Point3[]; /** * One direction per shape that is carried onto the matching `toDirections` entry. * @default [[0, 0, 1]] */ fromDirections: Base.Vector3[]; /** * One point per shape for its `fromOrigins` entry to land on. * @default [[0, 1, 0]] */ toOrigins: Base.Point3[]; /** * One direction per shape for its `fromDirections` entry to land on. * @default [[0, 1, 0]] */ toDirections: Base.Vector3[]; } /** * A shape and an axis for `transforms.mirror`, which mirrors the shape across the line through * `origin` along `direction`. */ class MirrorDto { constructor(shape?: T, origin?: Base.Point3, direction?: Base.Vector3); /** * The shape to mirror; it stays as it is and a mirrored copy comes back. * @default undefined */ shape: T; /** * A point on the mirror axis. * @default [0, 0, 0] */ origin: Base.Point3; /** * The direction of the mirror axis. * @default [0, 0, 1] */ direction: Base.Vector3; } /** * Shapes and one mirror axis each for `transforms.mirrorShapes`; all the lists must have the same * length. */ class MirrorShapesDto { constructor(shapes?: T[], origins?: Base.Point3[], directions?: Base.Vector3[]); /** * The shapes to mirror; they stay as they are and mirrored copies come back in the same order. * @default undefined */ shapes: T[]; /** * One point per shape on its mirror axis. * @default [[0, 0, 0]] */ origins: Base.Point3[]; /** * One mirror axis direction per shape. * @default [[0, 0, 1]] */ directions: Base.Vector3[]; } /** * A shape and a plane for `transforms.mirrorAlongNormal`, which mirrors the shape across the plane * through `origin` with the given normal. */ class MirrorAlongNormalDto { constructor(shape?: T, origin?: Base.Point3, normal?: Base.Vector3); /** * The shape to mirror; it stays as it is and a mirrored copy comes back. * @default undefined */ shape: T; /** * A point on the mirror plane. * @default [0, 0, 0] */ origin: Base.Point3; /** * The normal of the mirror plane. * @default [0, 0, 1] */ normal: Base.Vector3; } /** * Shapes and one mirror plane each for `transforms.mirrorAlongNormalShapes`; all the lists must * have the same length. */ class MirrorAlongNormalShapesDto { constructor(shapes?: T[], origins?: Base.Point3[], normals?: Base.Vector3[]); /** * The shapes to mirror; they stay as they are and mirrored copies come back in the same order. * @default undefined */ shapes: T[]; /** * One point per shape on its mirror plane. * @default [[0, 0, 0]] */ origins: Base.Point3[]; /** * One mirror plane normal per shape. * @default [[0, 0, 1]] */ normals: Base.Vector3[]; } /** * A shape, a direction for its Y axis and a point to move it to, for * `transforms.alignAndTranslate`. */ class AlignAndTranslateDto { constructor(shape?: T, direction?: Base.Vector3, center?: Base.Vector3); /** * The shape to place. * @default undefined */ shape: T; /** * The direction the shape's Y axis should point along after placing. * @default [0, 1, 0] */ direction: Base.Vector3; /** * The point the shape's origin is moved to, in model units. */ center: Base.Vector3; } /** * A shape and what to merge for `shapes.shape.unifySameDomain`, which joins faces and edges that * lie on one surface or curve, as booleans leave behind. */ class UnifySameDomainDto { constructor(shape?: T, unifyEdges?: boolean, unifyFaces?: boolean, concatBSplines?: boolean); /** * The shape to clean up. * @default undefined */ shape: T; /** * When true, edges that continue each other on one curve are merged into one. * @default true */ unifyEdges: boolean; /** * When true, faces that lie on one surface are merged into one. * @default true */ unifyFaces: boolean; /** * When true, neighboring B-spline edges are joined into a single B-spline where possible. * @default true */ concatBSplines: boolean; } /** * Faces, points and which groups to keep for `shapes.face.filterFacesPoints`, which sorts each * point as inside, on the boundary of or outside each face. */ class FilterFacesPointsDto { constructor(shapes?: T[], points?: Base.Point3[], tolerance?: number, useBndBox?: boolean, gapTolerance?: number, keepIn?: boolean, keepOn?: boolean, keepOut?: boolean, keepUnknown?: boolean, flatPointsArray?: boolean); /** * The faces to test the points against. * @default undefined */ shapes: T[]; /** * The points to sort. * @default undefined */ points: Base.Point3[]; /** * How close to a boundary a point may be to count as on it, in model units. * @default 1.0e-4 * @minimum 0 * @maximum Infinity * @step 0.000001 */ tolerance: number; /** * When true, a point outside the face's bounding box, grown by `gapTolerance`, counts as * outside without the exact test; a quick reject for many points far from the face. * @default false */ useBndBox: boolean; /** * How far beyond the bounding box a point may lie and still get the exact test when * `useBndBox` is on, in model units. * @default 0.1 * @minimum 0 * @maximum Infinity * @step 0.01 */ gapTolerance: number; /** * When true, points inside a face are kept. * @default true */ keepIn: boolean; /** * When true, points on the boundary of a face are kept. * @default true */ keepOn: boolean; /** * When true, points outside a face are kept. * @default false */ keepOut: boolean; /** * When true, points the kernel cannot place inside, on or outside a face are kept. * @default false */ keepUnknown: boolean; /** * When true, the kept points of all faces come back in one list; when false, one list per face * in the order given. * @default true */ flatPointsArray: boolean; } /** * A face, points and which groups to keep for `shapes.face.filterFacePoints`, which sorts each * point as inside, on the boundary of or outside the face. */ class FilterFacePointsDto { constructor(shape?: T, points?: Base.Point3[], tolerance?: number, useBndBox?: boolean, gapTolerance?: number, keepIn?: boolean, keepOn?: boolean, keepOut?: boolean, keepUnknown?: boolean); /** * The face to test the points against. * @default undefined */ shape: T; /** * The points to sort. * @default undefined */ points: Base.Point3[]; /** * How close to the boundary a point may be to count as on it, in model units. * @default 1.0e-4 * @minimum 0 * @maximum Infinity * @step 0.000001 */ tolerance: number; /** * When true, a point outside the face's bounding box, grown by `gapTolerance`, counts as * outside without the exact test; a quick reject for many points far from the face. * @default false */ useBndBox: boolean; /** * How far beyond the bounding box a point may lie and still get the exact test when * `useBndBox` is on, in model units. * @default 0.1 * @minimum 0 * @maximum Infinity * @step 0.01 */ gapTolerance: number; /** * When true, points inside the face are kept. * @default true */ keepIn: boolean; /** * When true, points on the boundary of the face are kept. * @default true */ keepOn: boolean; /** * When true, points outside the face are kept. * @default false */ keepOut: boolean; /** * When true, points the kernel cannot place inside, on or outside the face are kept. * @default false */ keepUnknown: boolean; } /** * A solid, points and which groups to keep for `shapes.solid.filterSolidPoints`, which sorts each * point as inside the solid, on its surface, outside it or unknown. */ class FilterSolidPointsDto { constructor(shape?: T, points?: Base.Point3[], tolerance?: number, keepIn?: boolean, keepOn?: boolean, keepOut?: boolean, keepUnknown?: boolean); /** * The solid to test the points against. * @default undefined */ shape: T; /** * The points to sort. * @default undefined */ points: Base.Point3[]; /** * How close to the surface a point may be to count as on it, in model units. * @default 1.0e-4 * @minimum 0 * @maximum Infinity * @step 0.000001 */ tolerance: number; /** * When true, points inside the solid are kept. * @default true */ keepIn: boolean; /** * When true, points on the surface of the solid are kept. * @default true */ keepOn: boolean; /** * When true, points outside the solid are kept. * @default false */ keepOut: boolean; /** * When true, points the kernel could not classify are kept. * @default false */ keepUnknown: boolean; } /** * Shapes and one direction and point each for `transforms.alignAndTranslateShapes`; all the lists * must have the same length. */ class AlignAndTranslateShapesDto { constructor(shapes?: T[], directions?: Base.Vector3[], centers?: Base.Vector3[]); /** * The shapes to place. * @default undefined */ shapes: T[]; /** * One direction per shape for its Y axis to point along. * @default [[0, 1, 0]] */ directions: Base.Vector3[]; /** * One point per shape for its origin to move to, in model units. */ centers: Base.Vector3[]; } /** * A shape, an axis through the origin and an angle for `transforms.rotate`. */ class RotateDto { constructor(shape?: T, axis?: Base.Vector3, angle?: number); /** * The shape to rotate; it stays as it is and a rotated copy comes back. * @default undefined */ shape: T; /** * The direction of the rotation axis, which passes through the origin. * @default [0, 0, 1] */ axis: Base.Vector3; /** * The rotation in degrees, following the right-hand rule about the axis. * @default 0 * @minimum 0 * @maximum 360 * @step 1 */ angle: number; } /** * A shape, an angle, a center and an axis for `transforms.rotateAroundCenter`, which rotates about * the axis through the center. */ class RotateAroundCenterDto { constructor(shape?: T, angle?: number, center?: Base.Point3, axis?: Base.Vector3); /** * The shape to rotate; it stays as it is and a rotated copy comes back. * @default undefined */ shape: T; /** * The rotation in degrees, following the right-hand rule about the axis. * @default 0 */ angle: number; /** * The point the rotation axis passes through. * @default [0, 0, 0] */ center: Base.Point3; /** * The direction of the rotation axis. * @default [0, 0, 1] */ axis: Base.Vector3; } /** * Shapes and one axis and angle each for `transforms.rotateShapes`; all the lists must have the * same length. */ class RotateShapesDto { constructor(shapes?: T[], axes?: Base.Vector3[], angles?: number[]); /** * The shapes to rotate; they stay as they are and rotated copies come back in the same order. * @default undefined */ shapes: T[]; /** * One rotation axis direction per shape, each through the origin. * @default [[0, 0, 1]] */ axes: Base.Vector3[]; /** * One rotation angle per shape, in degrees. * @default [0] */ angles: number[]; } /** * Shapes and one angle, center and axis each for `transforms.rotateAroundCenterShapes`; all the * lists must have the same length. */ class RotateAroundCenterShapesDto { constructor(shapes?: T[], angles?: number[], centers?: Base.Point3[], axes?: Base.Vector3[]); /** * The shapes to rotate; they stay as they are and rotated copies come back in the same order. * @default undefined */ shapes: T[]; /** * One rotation angle per shape, in degrees. * @default [0] */ angles: number[]; /** * One point per shape for its rotation axis to pass through. * @default [[0, 0, 0]] */ centers: Base.Point3[]; /** * One rotation axis direction per shape. * @default [[0, 0, 1]] */ axes: Base.Vector3[]; } /** * A shape and a factor for `transforms.scale`, which scales uniformly about the origin. */ class ScaleDto { constructor(shape?: T, factor?: number); /** * The shape to scale; it stays as it is and a scaled copy comes back. * @default undefined */ shape: T; /** * The uniform scale factor; 2 doubles every size, 0.5 halves it. * @default 1 * @minimum 0 * @maximum Infinity * @step 0.1 */ factor: number; } /** * Shapes and one factor each for `transforms.scaleShapes`; the two lists must have the same length. */ class ScaleShapesDto { constructor(shapes?: T[], factors?: number[]); /** * The shapes to scale; they stay as they are and scaled copies come back in the same order. * @default undefined */ shapes: T[]; /** * One uniform scale factor per shape, about the origin. * @default [1] */ factors: number[]; } /** * A shape, three factors and a center for `transforms.scale3d`, which scales each axis on its own * about the center. */ class Scale3DDto { constructor(shape?: T, scale?: Base.Vector3, center?: Base.Point3); /** * The shape to scale. * @default undefined */ shape: T; /** * The factors along X, Y and Z; unequal factors stretch the shape. * @default [1, 1, 1] */ scale: Base.Vector3; /** * The point that stays in place while everything else scales away from or toward it. * @default [0, 0, 0] */ center: Base.Point3; } /** * Shapes and one factor triple and center each for `transforms.scale3dShapes`; all the lists must * have the same length. */ class Scale3DShapesDto { constructor(shapes?: T[], scales?: Base.Vector3[], centers?: Base.Point3[]); /** * The shapes to scale. * @default undefined */ shapes: T[]; /** * One set of X, Y and Z factors per shape. * @default [[1, 1, 1]] */ scales: Base.Vector3[]; /** * One point per shape that stays in place while it scales. * @default [[0, 0, 0]] */ centers: Base.Point3[]; } /** * A shape and a matrix, or a list of matrices, for `transforms.transformByMatrix`. */ class TransformByMatrixDto { constructor(shape?: T, transformation?: Base.TransformMatrix | Base.TransformMatrixes); /** * The shape to transform; it stays as it is and a transformed copy comes back. * @default undefined */ shape: T; /** * A 4x4 column-major matrix of 16 numbers, or a list of them applied first to last as one * combined move. * @default undefined */ transformation: Base.TransformMatrix | Base.TransformMatrixes; } /** * Shapes and one matrix, or list of matrices, applied to all of them for * `transforms.transformShapesByMatrix`. */ class TransformShapesByMatrixDto { constructor(shapes?: T[], transformation?: Base.TransformMatrix | Base.TransformMatrixes); /** * The shapes to transform, all with the same matrix. * @default undefined */ shapes: T[]; /** * A 4x4 column-major matrix of 16 numbers, or a list of them applied first to last as one * combined move. * @default undefined */ transformation: Base.TransformMatrix | Base.TransformMatrixes; } /** * A shape for `transforms.getShapeTransform`, which reads the placement the shape carries. */ class ShapeTransformQueryDto { constructor(shape?: T); /** * The shape whose placement is read. * @default undefined */ shape: T; } /** * A shape, a factor and a center for `transforms.scaleFromCenter`, which scales uniformly about the * center. */ class ScaleFromCenterDto { constructor(shape?: T, factor?: number, center?: Base.Point3); /** * The shape to scale; it stays as it is and a scaled copy comes back. * @default undefined */ shape: T; /** * The uniform scale factor; 2 doubles every size, 0.5 halves it. * @default 1 * @step 0.1 */ factor: number; /** * The point that stays in place while everything else scales away from or toward it. * @default [0, 0, 0] */ center: Base.Point3; } /** * A shape and a point for `transforms.mirrorAboutPoint`, which mirrors the shape through the point. */ class MirrorAboutPointDto { constructor(shape?: T, point?: Base.Point3); /** * The shape to mirror; it stays as it is and a mirrored copy comes back. * @default undefined */ shape: T; /** * The point every part of the shape is mirrored through. * @default [0, 0, 0] */ point: Base.Point3; } /** * A shape and a quaternion for `transforms.rotateByQuaternion`, which rotates the shape about the * origin. */ class RotateByQuaternionDto { constructor(shape?: T, quaternion?: [number, number, number, number]); /** * The shape to rotate; it stays as it is and a rotated copy comes back. * @default undefined */ shape: T; /** * The rotation as `[x, y, z, w]`; it is normalized before use, and `[0, 0, 0, 1]` is no * rotation. * @default [0, 0, 0, 1] */ quaternion: [number, number, number, number]; } /** * A translation, Euler rotation and uniform scale for `transforms.composeTransform`, combined into * one matrix as scale, then rotation, then translation. */ class ComposeTransformDto { constructor(translation?: Base.Vector3, rotation?: Base.Vector3, scale?: number); /** * The move as `[x, y, z]`, in model units, applied last. * @default [0, 0, 0] */ translation: Base.Vector3; /** * Euler angles `[rx, ry, rz]` in degrees about the X, Y and Z axes; the Z turn is applied * first, then Y, then X. * @default [0, 0, 0] */ rotation: Base.Vector3; /** * The uniform scale about the origin, applied first; 1 keeps the size. * @default 1 * @step 0.1 */ scale: number; } /** * A matrix, or a list of matrices, for `transforms.multiplyTransforms`, which folds them into one. */ class MultiplyTransformsDto { constructor(transformation?: Base.TransformMatrix | Base.TransformMatrixes); /** * A 4x4 column-major matrix, or a list of them applied first to last; an empty list gives the * identity. * @default undefined */ transformation: Base.TransformMatrix | Base.TransformMatrixes; } /** * A matrix for `transforms.invertTransform`, which builds the transform that undoes it. */ class InvertTransformDto { constructor(transformation?: Base.TransformMatrix); /** * The 4x4 column-major matrix of 16 numbers to invert. * @default undefined */ transformation: Base.TransformMatrix; } /** * A vector for `transforms.translationToMatrix`, which builds the matrix of that move. */ class TranslationToMatrixDto { constructor(translation?: Base.Vector3); /** * The move as `[x, y, z]`, in model units. * @default [0, 0, 0] */ translation: Base.Vector3; } /** * An axis, an angle and an optional center for `transforms.rotationAxisAngleToMatrix`. */ class RotationAxisAngleToMatrixDto { constructor(axis?: Base.Vector3, angle?: number, center?: Base.Point3); /** * The direction of the rotation axis. * @default [0, 0, 1] */ axis: Base.Vector3; /** * The rotation in degrees, following the right-hand rule about the axis. * @default 0 * @step 1 */ angle: number; /** * The point the axis passes through; the origin when left at its default. * @default [0, 0, 0] */ center: Base.Point3; } /** * A factor and an optional center for `transforms.scaleUniformToMatrix`. */ class ScaleUniformToMatrixDto { constructor(factor?: number, center?: Base.Point3); /** * The uniform scale factor; 2 doubles every size, 0.5 halves it. * @default 1 * @step 0.1 */ factor: number; /** * The point that stays in place while everything else scales; the origin when left at its * default. * @default [0, 0, 0] */ center: Base.Point3; } /** * A point for `transforms.mirrorPointToMatrix`, the matrix of a mirror through that point. */ class MirrorPointToMatrixDto { constructor(point?: Base.Point3); /** * The point every part of a shape is mirrored through. * @default [0, 0, 0] */ point: Base.Point3; } /** * An axis for `transforms.mirrorAxisToMatrix`, the matrix of a mirror across the line through * `origin` along `direction`. */ class MirrorAxisToMatrixDto { constructor(origin?: Base.Point3, direction?: Base.Vector3); /** * A point on the mirror axis. * @default [0, 0, 0] */ origin: Base.Point3; /** * The direction of the mirror axis; any length will do, but not a zero vector. * @default [1, 0, 0] */ direction: Base.Vector3; } /** * A plane for `transforms.mirrorPlaneToMatrix`, the matrix of a mirror across the plane through * `origin` with the given normal. */ class MirrorPlaneToMatrixDto { constructor(origin?: Base.Point3, normal?: Base.Vector3); /** * A point on the mirror plane. * @default [0, 0, 0] */ origin: Base.Point3; /** * The normal of the mirror plane; any length will do, but not a zero vector. * @default [0, 0, 1] */ normal: Base.Vector3; } /** * A quaternion for `transforms.quaternionToMatrix`, which builds the matrix of that rotation. */ class QuaternionToMatrixDto { constructor(quaternion?: [number, number, number, number]); /** * The rotation as `[x, y, z, w]`; it is normalized before use, and `[0, 0, 0, 1]` is no * rotation. * @default [0, 0, 0, 1] */ quaternion: [number, number, number, number]; } /** * Decomposed placement transform of a shape or label. * `matrix` is a flat 16-number 4x4 in column-major order. */ interface ShapeTransformInfo { matrix: Base.TransformMatrix; translation: Base.Point3; quaternion: [number, number, number, number]; scale: number; } /** * The kind of node in a boundary-representation graph. Walking a shape produces a graph of * vertices, edges, wires, faces, shells and solids, and this says which one a given node is - the * discriminator you switch on when traversing the result. */ enum brepGraphNodeKindEnum { solid = "solid", shell = "shell", face = "face", wire = "wire", edge = "edge", vertex = "vertex", compound = "compound", compsolid = "compsolid" } /** * A shape and a graph node, by kind and index, for `brepGraph.reconstruct`, which turns the node * back into a real sub-shape. */ class BRepGraphReconstructDto { constructor(shape?: T, kind?: brepGraphNodeKindEnum, index?: number); /** * The shape the graph was built from. * @default undefined */ shape: T; /** * What kind of part the node is: solid, shell, face, wire, edge, vertex, compound or compsolid. * @default solid */ kind: brepGraphNodeKindEnum; /** * The position of the node among the parts of its kind, counting from 0, as the graph queries * report it. * @default 0 * @step 1 */ index: number; } /** * A shape and one of its sub-shapes for `brepGraph.nodeOfShape`, which finds the graph node * standing for the sub-shape. */ class BRepGraphNodeOfShapeDto { constructor(shape?: T, subShape?: T); /** * The shape the graph was built from. * @default undefined */ shape: T; /** * The face, edge or other part of the shape to look up. * @default undefined */ subShape: T; } /** * A shell or solid, points near its corners and rounding settings for * `corners.filletCornerByPoint`, which rounds only the corners picked by the points. */ class FilletCornerByPointDto { constructor(shape?: T, points?: Base.Point3[], radius?: number, taperFactor?: number, snapTolerance?: number, mode?: cornerModeEnum); /** * The shell or solid whose corners are rounded. * @default undefined */ shape: T; /** * Points near the corners to round; the vertex nearest each point is the one treated. * @default [] */ points: Base.Point3[]; /** * The rounding radius, in model units. * @default 1 * @step 0.1 */ radius: number; /** * For 3D corners, how far the rounding reaches along the meeting edges: 0 for the tightest, * almost spherical corner, 1 for the full reach. * @default 1 * @minimum 0 * @maximum 1 * @step 0.1 */ taperFactor: number; /** * How far a point may be from a vertex and still pick it, in model units; 0 or less accepts the * nearest vertex whatever the distance. * @default 0 * @step 0.1 */ snapTolerance: number; /** * `auto` rounds planar corners in place and 3D corners with a taper; `planarOnly` skips 3D * corners. * @default auto */ mode: cornerModeEnum; } /** * A shell or solid, points near its corners and bevel settings for `corners.chamferCornerByPoint`, * which bevels only the corners picked by the points. */ class ChamferCornerByPointDto { constructor(shape?: T, points?: Base.Point3[], distance?: number, angle?: number, snapTolerance?: number, mode?: cornerModeEnum); /** * The shell or solid whose corners are beveled. * @default undefined */ shape: T; /** * Points near the corners to bevel; the vertex nearest each point is the one treated. * @default [] */ points: Base.Point3[]; /** * How far the bevel reaches back from the corner along its edges, in model units. * @default 1 * @step 0.1 */ distance: number; /** * The slope of the bevel in degrees, used for planar corners. * @default 45 * @step 1 */ angle: number; /** * How far a point may be from a vertex and still pick it, in model units; 0 or less accepts the * nearest vertex whatever the distance. * @default 0 * @step 0.1 */ snapTolerance: number; /** * `auto` bevels planar corners in place and 3D corners with a local plane cut; `planarOnly` * skips 3D corners. * @default auto */ mode: cornerModeEnum; } /** * A shell or solid and points near its corners for `corners.classifyCornerByPoint`, which reports * what kind of corner each point picks. */ class ClassifyCornerByPointDto { constructor(shape?: T, points?: Base.Point3[], snapTolerance?: number); /** * The shell or solid whose corners are looked up. * @default undefined */ shape: T; /** * Points near the corners to classify; the vertex nearest each point is the one reported. * @default [] */ points: Base.Point3[]; /** * How far a point may be from a vertex and still pick it, in model units; 0 or less accepts the * nearest vertex whatever the distance. * @default 0 * @step 0.1 */ snapTolerance: number; } /** * A flat wire or face, a distance, an angle and optional corner indexes for * `fillets.chamfer2dVertices`, which bevels the corners. */ class Chamfer2dVertexDto { constructor(shape?: T, distance?: number, angle?: number, indexes?: number[]); /** * The flat wire or face whose corners are beveled. * @default undefined */ shape: T; /** * How far the bevel cuts back from each corner along one edge, in model units. * @default 1 * @step 0.1 */ distance: number; /** * The angle of the bevel to that edge, in degrees; 45 gives an even chamfer. * @default 45 * @step 1 */ angle: number; /** * Which corners to bevel, counted from 1 along the outline; leave it out to bevel them all. * @default undefined * @optional true */ indexes?: number[] | undefined; } /** * A shape, the faces to tilt and the draft settings for `draft.draftAngle`, which tapers the faces * about a neutral plane. */ class DraftAngleDto { constructor(shape?: T, faces?: U[], direction?: Base.Vector3, angle?: number, neutralPlaneOrigin?: Base.Point3, neutralPlaneDirection?: Base.Vector3, flag?: boolean); /** * The solid whose faces are tilted. * @default undefined */ shape: T; /** * The faces of the shape that get the taper. * @default undefined */ faces: U[]; /** * The pull direction, the way the part leaves the mold; the taper is measured against it. * @default [0, 1, 0] */ direction: Base.Vector3; /** * The draft angle, in degrees. * @default 5 * @step 1 */ angle: number; /** * A point on the neutral plane, the plane that stays where it is while the faces pivot about * it. * @default [0, 0, 0] */ neutralPlaneOrigin: Base.Point3; /** * The normal of the neutral plane. * @default [0, 0, 1] */ neutralPlaneDirection: Base.Vector3; /** * When true, the faces taper on the standard side; false tapers them the other way. * @default true */ flag: boolean; } /** * A wire or shape, a direction, an angle and a length for `draft.makeDraft`, which grows a tapered * skirt from the edges. */ class MakeDraftDto { constructor(shape?: T, direction?: Base.Vector3, angle?: number, lengthMax?: number, internal?: boolean); /** * The wire, face or shape whose edges the skirt grows from. * @default undefined */ shape: T; /** * The direction the skirt grows along, the pull direction of the mold. * @default [0, 1, 0] */ direction: Base.Vector3; /** * How far the skirt leans from the direction, in degrees. * @default 5 * @step 1 */ angle: number; /** * How long the skirt may grow, in model units, measured along the corner edges between its * faces. * @default 10 * @step 0.1 */ lengthMax: number; /** * When true, the skirt leans inward instead of outward. * @default false */ internal: boolean; } /** * A wire or shape, a direction, an angle and a stop shape for `draft.makeDraftToShape`, which grows * a tapered skirt from the edges until it meets the stop shape. */ class MakeDraftToShapeDto { constructor(shape?: T, direction?: Base.Vector3, angle?: number, stopShape?: T, keepOut?: boolean, internal?: boolean); /** * The wire, face or shape whose edges the skirt grows from. * @default undefined */ shape: T; /** * The direction the skirt grows along, the pull direction of the mold. * @default [0, 1, 0] */ direction: Base.Vector3; /** * How far the skirt leans from the direction, in degrees. * @default 5 * @step 1 */ angle: number; /** * The shape the skirt grows up to and stops at. * @default undefined */ stopShape: T; /** * When true, the part of the stop shape outside the skirt is kept in the result. * @default false */ keepOut: boolean; /** * When true, the skirt leans inward instead of outward. * @default false */ internal: boolean; } /** * A shape and meshing settings for `shapeToMesh`, which triangulates the shape for drawing. */ class ShapeToMeshDto { constructor(shape?: T, precision?: number, adjustYtoZ?: boolean, computeMetadata?: boolean, keepMeshData?: boolean, allowQualityDecrease?: boolean, forceFaceDeflection?: boolean); /** * The shape to triangulate. * @default undefined */ shape: T; /** * The meshing tolerance in model units; a smaller value follows curved surfaces more closely * with more triangles. * @default 0.01 * @minimum 0 * @maximum Infinity * @step 0.001 */ precision: number; /** * When true, the mesh is turned so this library's Y-up becomes Z-up, for tools that treat Z as * up. * @default false */ adjustYtoZ: boolean; /** * When true, each face and edge entry also carries its area or length, center of mass, surface * or curve type, tolerance and neighbors, at extra cost. * @default false */ computeMetadata?: boolean | undefined; /** * When true, the triangulation stays cached on the shape; when false it is cleared afterwards * so memory does not grow across calls. * @default false */ keepMeshData?: boolean | undefined; /** * When true, a shape already meshed more finely may be remeshed at the coarser precision asked * for. * @default true */ allowQualityDecrease?: boolean | undefined; /** * When true, every face is remeshed at the requested precision even when a triangulation is * cached. * @default false */ forceFaceDeflection?: boolean | undefined; } /** * A shape and meshing settings for `shapeFacesToPolygonPoints`, which returns every triangle of the * shape as three points. */ class ShapeFacesToPolygonPointsDto { constructor(shape?: T, precision?: number, adjustYtoZ?: boolean, reversedPoints?: boolean); /** * The shape to triangulate. * @default undefined */ shape: T; /** * The meshing tolerance in model units; a smaller value follows curved surfaces more closely * with more triangles. * @default 0.01 * @minimum 0 * @maximum Infinity * @step 0.001 */ precision: number; /** * When true, the points are turned so this library's Y-up becomes Z-up, for tools that treat Z * as up. * @default false */ adjustYtoZ: boolean; /** * When true, the three points of each triangle come in the opposite order, for tools that wind * triangles the other way. * @default false */ reversedPoints: boolean; } /** * Shapes and meshing settings for `shapesToMeshes`, which triangulates each shape with the same * settings. */ class ShapesToMeshesDto { constructor(shapes?: T[], precision?: number, adjustYtoZ?: boolean, computeMetadata?: boolean, keepMeshData?: boolean, allowQualityDecrease?: boolean, forceFaceDeflection?: boolean); /** * The shapes to triangulate, one mesh per shape. * @default undefined */ shapes: T[]; /** * The meshing tolerance in model units; a smaller value follows curved surfaces more closely * with more triangles. * @default 0.01 * @minimum 0 * @maximum Infinity * @step 0.001 */ precision: number; /** * When true, the meshes are turned so this library's Y-up becomes Z-up, for tools that treat Z * as up. * @default false */ adjustYtoZ: boolean; /** * When true, each face and edge entry also carries its area or length, center of mass, surface * or curve type, tolerance and neighbors, at extra cost. * @default false */ computeMetadata?: boolean | undefined; /** * When true, the triangulation stays cached on each shape; when false it is cleared afterwards * so memory does not grow across calls. * @default false */ keepMeshData?: boolean | undefined; /** * When true, a shape already meshed more finely may be remeshed at the coarser precision asked * for. * @default true */ allowQualityDecrease?: boolean | undefined; /** * When true, every face is remeshed at the requested precision even when a triangulation is * cached. * @default false */ forceFaceDeflection?: boolean | undefined; } /** * An assembly document and meshing settings for `docToMesh`, which triangulates its top-level * shapes into one mesh with the document's colors. */ class DocToMeshDto { constructor(document?: U, precision?: number, adjustYtoZ?: boolean, computeMetadata?: boolean, keepMeshData?: boolean, allowQualityDecrease?: boolean, forceFaceDeflection?: boolean); /** * The assembly document whose top-level shapes are meshed together; their face colors end up in * the mesh's color groups. * @default undefined */ document: U; /** * The meshing tolerance in model units; a smaller value follows curved surfaces more closely * with more triangles. * @default 0.01 * @minimum 0 * @maximum Infinity * @step 0.001 */ precision: number; /** * When true, the mesh is turned so this library's Y-up becomes Z-up, for tools that treat Z as * up. * @default false */ adjustYtoZ: boolean; /** * When true, each face and edge entry also carries its area or length, center of mass, surface * or curve type, tolerance, neighbors and ids, at extra cost. * @default false */ computeMetadata?: boolean | undefined; /** * When true, the triangulation stays cached on the shapes; when false it is cleared afterwards * so memory does not grow across calls. * @default false */ keepMeshData?: boolean | undefined; /** * When true, a shape already meshed more finely may be remeshed at the coarser precision asked * for. * @default true */ allowQualityDecrease?: boolean | undefined; /** * When true, every face is remeshed at the requested precision even when a triangulation is * cached. * @default false */ forceFaceDeflection?: boolean | undefined; } /** * An assembly document and meshing settings for `docToMeshes`, which triangulates each top-level * shape into its own mesh with the document's colors. */ class DocToMeshesDto { constructor(document?: U, precision?: number, adjustYtoZ?: boolean, computeMetadata?: boolean, keepMeshData?: boolean, allowQualityDecrease?: boolean, forceFaceDeflection?: boolean); /** * The assembly document whose top-level shapes are meshed one by one; each shape's face colors * end up in its mesh's color groups. * @default undefined */ document: U; /** * The meshing tolerance in model units; a smaller value follows curved surfaces more closely * with more triangles. * @default 0.01 * @minimum 0 * @maximum Infinity * @step 0.001 */ precision: number; /** * When true, the meshes are turned so this library's Y-up becomes Z-up, for tools that treat Z * as up. * @default false */ adjustYtoZ: boolean; /** * When true, each face and edge entry also carries its area or length, center of mass, surface * or curve type, tolerance, neighbors and ids, at extra cost. * @default false */ computeMetadata?: boolean | undefined; /** * When true, the triangulation stays cached on the shapes; when false it is cleared afterwards * so memory does not grow across calls. * @default false */ keepMeshData?: boolean | undefined; /** * When true, a shape already meshed more finely may be remeshed at the coarser precision asked * for. * @default true */ allowQualityDecrease?: boolean | undefined; /** * When true, every face is remeshed at the requested precision even when a triangulation is * cached. * @default false */ forceFaceDeflection?: boolean | undefined; } /** * A shape, a file name and axis options for `io.saveShapeSTEP`, which writes the shape as a STEP * file. */ class SaveStepDto { constructor(shape?: T, fileName?: string, adjustYtoZ?: boolean, tryDownload?: boolean); /** * The shape written to the file. * @default undefined */ shape: T; /** * The name the downloaded file gets; `.step` is appended when missing. * @default shape.step */ fileName: string; /** * When true, the shape is turned so this library's Y-up becomes STEP's Z-up. * @default false */ adjustYtoZ: boolean; /** * When true, the axis swap skips its mirror step, for shapes that were built in a right-handed * system. * @default false */ fromRightHanded?: boolean | undefined; /** * When true, a browser download of the file is started where that is possible; the kernel * itself only returns the text. * @default true */ tryDownload?: boolean | undefined; } /** * A shape, a file name and meshing options for `io.saveShapeStl`, which triangulates the shape and * writes it as an STL file. */ class SaveStlDto { constructor(shape?: T, fileName?: string, precision?: number, adjustYtoZ?: boolean, tryDownload?: boolean, binary?: boolean); /** * The shape written to the file. * @default undefined */ shape: T; /** * The name the downloaded file gets. * @default shape.stl */ fileName: string; /** * The meshing tolerance in model units; a smaller value follows curved surfaces more closely * and makes a bigger file. * @default 0.01 */ precision: number; /** * When true, the shape is turned so this library's Y-up becomes Z-up. * @default false */ adjustYtoZ: boolean; /** * When true, a browser download of the file is started where that is possible; the kernel * itself only returns the text. * @default true */ tryDownload?: boolean | undefined; /** * When true, the STL is written in its binary form, which is much smaller than the text form. * @default true */ binary?: boolean | undefined; } /** * A shape and deflection settings for `io.shapeToDxfPaths`, which traces the shape's wires into DXF * path records. */ class ShapeToDxfPathsDto { constructor(shape?: T, angularDeflection?: number, curvatureDeflection?: number, minimumOfPoints?: number, uTolerance?: number, minimumLength?: number); /** * The shape whose wires are traced; it must lie flat on the XZ ground plane. * @default undefined */ shape: T; /** * The largest angle, in radians, the traced polyline may turn between two points; smaller * follows curves more closely. * @default 0.1 * @minimum 0 * @maximum Infinity * @step 0.01 */ angularDeflection: number; /** * The largest distance, in model units, the traced polyline may stray from the curve; smaller * follows it more closely. * @default 0.1 * @minimum 0 * @maximum Infinity * @step 0.001 */ curvatureDeflection: number; /** * The fewest points any edge is traced with, however straight. * @default 2 * @minimum 0 * @maximum Infinity * @step 1 */ minimumOfPoints: number; /** * How close two parameter values must be to count as the same point. * @default 1.0e-9 * @minimum 0 * @maximum Infinity * @step 1.0e-9 */ uTolerance: number; /** * Edges shorter than this, in model units, are traced with the minimum number of points. * @default 1.0e-7 * @minimum 0 * @maximum Infinity * @step 1.0e-7 */ minimumLength: number; } /** * DXF paths, a layer and a color for `io.dxfPathsWithLayer`, which makes them one part of a DXF * drawing. */ class DxfPathsWithLayerDto { constructor(paths?: IO.DxfPathDto[], layer?: string, color?: Base.Color); /** * The paths from `io.shapeToDxfPaths`. * @default undefined */ paths: IO.DxfPathDto[]; /** * The name of the DXF layer the paths go on. * @default Default */ layer: string; /** * The color of the paths as a hex string such as `#000000`. * @default #000000 */ color: Base.Color; } /** * Layered DXF parts and file options for `io.dxfCreate`, which writes them into one DXF file. */ class DxfPathsPartsListDto { constructor(pathsParts?: IO.DxfPathsPartDto[], colorFormat?: dxfColorFormatEnum, acadVersion?: dxfAcadVersionEnum, tryDownload?: boolean); /** * The parts from `io.dxfPathsWithLayer`, each with its own layer and color. * @default undefined */ pathsParts: IO.DxfPathsPartDto[]; /** * How colors are written: `aci` as AutoCAD's indexed colors, `truecolor` as RGB. * @default aci */ colorFormat: dxfColorFormatEnum; /** * The DXF version to write: `AC1009` is R12, the most widely readable, `AC1015` is 2000. * @default AC1009 */ acadVersion: dxfAcadVersionEnum; /** * The name the downloaded file gets. * @default bitbybit-dev.dxf */ fileName?: string | undefined; /** * When true, a browser download of the file is started where that is possible; the kernel * itself only returns the text. * @default true */ tryDownload?: boolean | undefined; } /** * STEP or IGES text and its kind for the core `occt.io.loadSTEPorIGESFromText`, which reads it into * a shape. */ class ImportStepIgesFromTextDto { constructor(text?: string, fileType?: fileTypeEnum, adjustZtoY?: boolean); /** * The full text of the STEP or IGES file. * @default undefined */ text: string; /** * Whether the text is STEP or IGES. */ fileType: fileTypeEnum; /** * When true, the shape is turned so the file's Z-up becomes this library's Y-up. * @default true */ adjustZtoY: boolean; } /** * A STEP or IGES file for the core `occt.io.loadSTEPorIGES`, which reads it into a shape. */ class ImportStepIgesDto { constructor(assetFile?: File, adjustZtoY?: boolean); /** * The file to read; its extension decides whether it is STEP or IGES. * @default undefined */ assetFile: File; /** * When true, the shape is turned so the file's Z-up becomes this library's Y-up. * @default true */ adjustZtoY: boolean; } /** * File content, a file name and an axis option for `io.loadSTEPorIGES`, which reads STEP or IGES * into a shape. */ class LoadStepOrIgesDto { constructor(filetext?: string | ArrayBuffer, fileName?: string, adjustZtoY?: boolean); /** * The file's text for `.step`, `.stp`, `.iges` and `.igs`, or an ArrayBuffer for the compressed * `.stpz` and `.igz` forms. * @default undefined */ filetext: string | ArrayBuffer; /** * The file name; its extension decides whether it is read as STEP or IGES and whether it is * compressed. * @default shape.step */ fileName: string; /** * When true, the shape is turned so the file's Z-up becomes this library's Y-up. * @default true */ adjustZtoY: boolean; } /** * A STEP file for `io.parseStepToJson`, which reads its assembly structure without building * geometry. */ class ParseStepAssemblyToJsonDto { constructor(stepData?: string | ArrayBuffer | Uint8Array | File | Blob); /** * The STEP file as text, ArrayBuffer, Uint8Array, File or Blob; gzip-compressed `.stpz` content * is unpacked on its own. * @default undefined */ stepData: string | ArrayBuffer | Uint8Array | File | Blob; } /** * A STEP file and meshing settings for `io.convertStepToGltf`, which converts it into a binary * glTF. */ class ConvertStepToGltfDto { constructor(stepData?: string | ArrayBuffer | Uint8Array | File | Blob); /** * The STEP file as text, ArrayBuffer, Uint8Array, File or Blob; gzip-compressed `.stpz` content * is unpacked on its own. * @default undefined */ stepData: string | ArrayBuffer | Uint8Array | File | Blob; /** * How closely triangles follow curved surfaces: with `meshRelative` true a fraction of each * edge's length, otherwise an absolute distance in model units. * @default 0.005 * @minimum 0.0001 * @maximum 10 * @step 0.001 */ meshPrecision: number; /** * The largest angle, in radians, between the normals of neighboring triangles; smaller gives * smoother curves and more triangles. * @default 0.5 * @minimum 0.01 * @maximum 3.14159 * @step 0.05 */ meshAngle: number; /** * When true, `meshPrecision` scales with each part's size, so small fasteners and large * housings both mesh well; when false it is an absolute distance. * @default true */ meshRelative: boolean; /** * When true, extra vertices are added inside curved faces for a closer fit, at the cost of * speed. * @default false */ internalVerticesMode: boolean; /** * When true, an extra pass refines triangles that bulge beyond the precision, at the cost of * speed. * @default false */ controlSurfaceDeflection: boolean; } /** * A STEP file, meshing settings and Draco settings for `io.convertStepToGltfWithDraco`, which * converts it into a Draco-compressed binary glTF. */ class ConvertStepToGltfWithDracoDto extends ConvertStepToGltfDto { constructor(stepData?: string | ArrayBuffer | Uint8Array | File | Blob); /** * When true, the geometry is compressed with Draco. * @default true */ useDraco: boolean; /** * How hard Draco compresses, from 0 for fastest and largest to 10 for slowest and smallest. * @default 7 * @minimum 0 * @maximum 10 * @step 1 */ dracoCompressionLevel: number; /** * How many bits each vertex position keeps; fewer bits mean a smaller file and less precision. * @default 14 * @minimum 0 * @maximum 31 * @step 1 */ dracoQuantizePositionBits: number; /** * How many bits each normal keeps; fewer bits mean a smaller file and less precision. * @default 10 * @minimum 0 * @maximum 31 * @step 1 */ dracoQuantizeNormalBits: number; /** * How many bits each texture coordinate keeps; fewer bits mean a smaller file and less * precision. * @default 12 * @minimum 0 * @maximum 31 * @step 1 */ dracoQuantizeTexcoordBits: number; /** * How many bits each vertex color keeps; fewer bits mean a smaller file and less precision. * @default 8 * @minimum 0 * @maximum 31 * @step 1 */ dracoQuantizeColorBits: number; /** * How many bits other vertex attributes keep; fewer bits mean a smaller file and less * precision. * @default 12 * @minimum 0 * @maximum 31 * @step 1 */ dracoQuantizeGenericBits: number; /** * When true, one quantization grid is used for every attribute instead of one per attribute. * @default false */ dracoUnifiedQuantization: boolean; } /** * glTF node/mesh naming format options. * Controls how node and mesh names are generated in the output glTF. */ enum gltfNameFormatEnum { /** Omit the name */ empty = "empty", /** Use product name (shared by multiple instances) */ product = "product", /** Use instance name */ instance = "instance", /** Use instance name, fall back to product name */ instanceOrProduct = "instanceOrProduct", /** Use product name, fall back to instance name */ productOrInstance = "productOrInstance", /** Use both product and instance names "Product [Instance]" */ productAndInstance = "productAndInstance", /** Verbose naming combining Product+Instance+OCAF (for debugging) */ productAndInstanceAndOcaf = "productAndInstanceAndOcaf" } /** * glTF transformation format options. * Controls how node transformations are encoded in the output glTF. */ enum gltfTransformFormatEnum { /** Compact format - uses TRS when possible, Mat4 otherwise */ compact = "compact", /** Always use 4x4 matrix format */ mat4 = "mat4", /** Always use Translation-Rotation-Scale format */ trs = "trs" } /** * A STEP file with every reading, meshing and writing option for `io.convertStepToGltfAdvanced`; * switch off what is not needed for a faster conversion. */ class ConvertStepToGltfAdvancedDto { constructor(stepData?: string | ArrayBuffer | Uint8Array | File | Blob); /** * The STEP file as text, ArrayBuffer, Uint8Array, File or Blob; gzip-compressed `.stpz` content * is unpacked on its own. * @default undefined */ stepData: string | ArrayBuffer | Uint8Array | File | Blob; /** * When true, colors are read from the file; needed for a colored glTF. * @default true */ readColors: boolean; /** * When true, part names are read from the file; switch it off for faster parsing when names are * not needed. * @default true */ readNames: boolean; /** * When true, materials are read from the file; needed for material properties in the glTF. * @default true */ readMaterials: boolean; /** * When true, layer information is read from the file; rarely needed for glTF. * @default false */ readLayers: boolean; /** * When true, validation properties are read from the file; rarely needed for glTF. * @default false */ readProps: boolean; /** * How closely triangles follow curved surfaces: with `meshRelative` true a fraction of each * edge's length, otherwise an absolute distance in model units. * @default 0.005 * @minimum 0.0001 * @maximum 10 * @step 0.001 */ meshDeflection: number; /** * The largest angle, in radians, between the normals of neighboring triangles; smaller gives * smoother curves and more triangles. * @default 0.5 * @minimum 0.01 * @maximum 3.14159 * @step 0.1 */ meshAngle: number; /** * When true, faces are meshed on several threads where the build allows it. * @default true */ meshParallel: boolean; /** * Above this many faces the assembly is meshed solid by solid to save memory; -1 meshes * everything in one pass, which is fastest. * @default -1 * @minimum -1 * @maximum 500000 * @step 10000 */ faceCountThreshold: number; /** * When true, `meshDeflection` scales with each part's size, so small fasteners and large * housings both mesh well; when false it is an absolute distance. * @default true */ meshRelative: boolean; /** * When true, extra vertices are added inside curved faces for a closer fit, at the cost of * speed. * @default false */ internalVerticesMode: boolean; /** * When true, an extra pass refines triangles that bulge beyond the precision, at the cost of * speed. * @default false */ controlSurfaceDeflection: boolean; /** * When true, the faces of a part are joined into one mesh, which makes a smaller file. * @default true */ mergeFaces: boolean; /** * When true, merged meshes use 16-bit indexes where they fit, which makes a smaller file. * @default true */ splitIndices16: boolean; /** * When true, the glTF is written on several threads, which helps with large files. * @default true */ parallelWrite: boolean; /** * When true, textures are embedded in the GLB instead of referenced as separate files. * @default true */ embedTextures: boolean; /** * When true, texture coordinates are written even for meshes without textures. * @default false */ forceUVExport: boolean; /** * What the glTF nodes are named after: the instance, the product, a combination, or nothing. * @default instance */ nodeNameFormat: gltfNameFormatEnum; /** * What the glTF meshes are named after: the instance, the product, a combination, or nothing. * @default instance */ meshNameFormat: gltfNameFormatEnum; /** * How node placements are written: `compact` as translation, rotation and scale where possible, * `mat4` always as a matrix, `trs` always as the three parts. * @default compact */ transformFormat: gltfTransformFormatEnum; /** * When true, the file's Z-up is turned into glTF's Y-up; false keeps Z up. * @default true */ adjustZtoY: boolean; /** * A factor applied to the whole model, such as 0.001 to turn millimeters into meters; 1 keeps * the size. * @default 1.0 * @minimum 0.000001 * @maximum 1000000 * @step 0.001 */ scale: number; } /** * A STEP file with every reading, meshing and writing option plus Draco settings for * `io.convertStepToGltfAdvancedWithDraco`. */ class ConvertStepToGltfAdvancedWithDracoDto extends ConvertStepToGltfAdvancedDto { constructor(stepData?: string | ArrayBuffer | Uint8Array | File | Blob); /** * When true, the geometry is compressed with Draco. * @default true */ useDraco: boolean; /** * How hard Draco compresses, from 0 for fastest and largest to 10 for slowest and smallest. * @default 7 * @minimum 0 * @maximum 10 * @step 1 */ dracoCompressionLevel: number; /** * How many bits each vertex position keeps; fewer bits mean a smaller file and less precision. * @default 14 * @minimum 0 * @maximum 31 * @step 1 */ dracoQuantizePositionBits: number; /** * How many bits each normal keeps; fewer bits mean a smaller file and less precision. * @default 10 * @minimum 0 * @maximum 31 * @step 1 */ dracoQuantizeNormalBits: number; /** * How many bits each texture coordinate keeps; fewer bits mean a smaller file and less * precision. * @default 12 * @minimum 0 * @maximum 31 * @step 1 */ dracoQuantizeTexcoordBits: number; /** * How many bits each vertex color keeps; fewer bits mean a smaller file and less precision. * @default 8 * @minimum 0 * @maximum 31 * @step 1 */ dracoQuantizeColorBits: number; /** * How many bits other vertex attributes keep; fewer bits mean a smaller file and less * precision. * @default 12 * @minimum 0 * @maximum 31 * @step 1 */ dracoQuantizeGenericBits: number; /** * When true, one quantization grid is used for every attribute instead of one per attribute. * @default false */ dracoUnifiedQuantization: boolean; } /** * A structure, an optional document to update and optional source documents for * `assembly.manager.buildAssemblyDocument`. * @typeParam T - Shape type (TopoDS_Shape or pointer) * @typeParam D - Document type (Handle_TDocStd_Document or pointer) */ class BuildAssemblyDocumentDto { constructor(structure?: Models.OCCT.AssemblyStructureDef, existingDocument?: D, sourceDocuments?: D[]); /** * The parts, nodes and updates to build, from `combineStructure`. * @default undefined */ structure: Models.OCCT.AssemblyStructureDef; /** * A document to update in place instead of creating a new one; its removals and part updates * are applied first, then the new parts and nodes added. * @default undefined * @optional true */ existingDocument?: D | undefined; /** * The documents imported parts copy from, indexed by `sourceDocumentIndex`; usually loaded with * `loadStepToDoc`, and left unchanged. * @default undefined * @optional true */ sourceDocuments?: D[] | undefined; } /** * A part definition for `assembly.manager.createPart`: a shape with an id that instance nodes * place, as many times as needed. */ class CreateAssemblyPartDto { constructor(id?: string, shape?: T, name?: string, colorRgba?: Base.ColorRGBA); /** * The id instance nodes refer to the part by; it must be unique among the parts. * @default undefined */ id: string; /** * The geometry of the part, shared by every instance of it. * @default undefined */ shape: T; /** * The name of the part, written into STEP files and shown by viewers. * @default undefined */ name: string; /** * The color of the part as `{ r, g, b, a }` with every channel from 0 to 1; leave it out for * the default gray. * @default {"r":0.5,"g":0.5,"b":0.5,"a":1} * @minimum 0 * @maximum 1 */ colorRgba?: Base.ColorRGBA | undefined; } /** * An assembly node definition for `assembly.manager.createAssemblyNode`: a container that groups * instances and other assemblies. */ class CreateAssemblyNodeDto { constructor(id?: string, name?: string, parentId?: string, colorRgba?: Base.ColorRGBA, matrix?: Base.TransformMatrix | Base.TransformMatrixes); /** * The id child nodes refer to this assembly by; it must be unique among the nodes. * @default undefined */ id: string; /** * The name of the assembly, written into STEP files and shown by viewers. * @default undefined */ name: string; /** * The id of the assembly this one sits in; leave it out for a root. * @default undefined * @optional true */ parentId?: string | undefined; /** * A color for the assembly as `{ r, g, b, a }` with every channel from 0 to 1. * @default {"r":0.5,"g":0.5,"b":0.5,"a":1} * @minimum 0 * @maximum 1 */ colorRgba?: Base.ColorRGBA | undefined; /** * A placement for the whole group as a column-major 4x4 matrix, or a list of them applied first * to last. * @default undefined * @optional true */ matrix?: Base.TransformMatrix | Base.TransformMatrixes | undefined; } /** * An instance node definition for `assembly.manager.createInstanceNode`: one placement of a part, * with a translation, rotation and scale or a matrix. */ class CreateInstanceNodeDto { constructor(id?: string, partId?: string, name?: string, parentId?: string, translation?: Base.Point3, rotation?: Base.Vector3, scale?: number, colorRgba?: Base.ColorRGBA, matrix?: Base.TransformMatrix | Base.TransformMatrixes); /** * The id of this placement; it must be unique among the nodes. * @default undefined */ id: string; /** * The id of the part, or imported part, being placed. * @default undefined */ partId: string; /** * The name of this placement, written into STEP files and shown by viewers. * @default undefined */ name: string; /** * The id of the assembly this placement sits in; leave it out for the root. * @default undefined * @optional true */ parentId?: string | undefined; /** * Where the part is moved to, as `[x, y, z]` in model units. * @default [0, 0, 0] */ translation?: Base.Point3 | undefined; /** * Euler angles `[rx, ry, rz]` in degrees about the X, Y and Z axes; the Z turn is applied * first, then Y, then X. * @default [0, 0, 0] */ rotation?: Base.Vector3 | undefined; /** * A uniform scale of the placed part; 1 keeps its size. * @default 1.0 */ scale?: number | undefined; /** * A color for this placement only, as `{ r, g, b, a }` from 0 to 1, overriding the part's * color. * @default undefined * @optional true */ colorRgba?: Base.ColorRGBA | undefined; /** * The placement as a column-major 4x4 matrix, or a list of them applied first to last; when * given, translation, rotation and scale are ignored. * @default undefined * @optional true */ matrix?: Base.TransformMatrix | Base.TransformMatrixes | undefined; } /** * A change to an existing part for `assembly.manager.createPartUpdate`: a new shape, name or color * for the part at a label. */ class CreatePartUpdateDto { constructor(label?: string, shape?: T, name?: string, colorRgba?: Base.ColorRGBA); /** * The label of the part to change, such as `0:1:1:1`, as `assembly.query.getDocumentParts` * reports it. * @default undefined */ label: string; /** * The new geometry of the part; leave it out to keep the old one. * @default undefined * @optional true */ shape?: T | undefined; /** * The new name of the part; leave it out to keep the old one. * @default undefined * @optional true */ name?: string | undefined; /** * The new color of the part as `{ r, g, b, a }` from 0 to 1; leave it out to keep the old one. * @default undefined * @optional true */ colorRgba?: Base.ColorRGBA | undefined; } /** * Parts, nodes and the update lists for `assembly.manager.combineStructure`, which gathers them * into one structure for `buildAssemblyDocument`; the update lists only matter when an existing * document is updated. */ class CombineAssemblyStructureDto { constructor(parts?: Models.OCCT.AssemblyPartDef[], nodes?: Models.OCCT.AssemblyNodeDef[], removals?: string[], partUpdates?: Models.OCCT.AssemblyPartUpdateDef[], clearDocument?: boolean, loadedParts?: Models.OCCT.AssemblyLoadedPartDef[]); /** * The part definitions from `createPart`, the shapes that instances place. * @default [] */ parts: Models.OCCT.AssemblyPartDef[]; /** * The assembly and instance node definitions that make up the tree. * @default [] */ nodes: Models.OCCT.AssemblyNodeDef[]; /** * Labels of parts, instances or assemblies to remove from an existing document; ignored for a * new one. * @default undefined * @optional true */ removals?: string[] | undefined; /** * Changes to parts of an existing document from `createPartUpdate`; ignored for a new one. * @default undefined * @optional true */ partUpdates?: Models.OCCT.AssemblyPartUpdateDef[] | undefined; /** * When true, an existing document is emptied before the new parts and nodes are added; when * false its content is kept and the removals and updates applied. * @default false */ clearDocument?: boolean | undefined; /** * Imported part definitions from `createImportedPart`, each copying a label tree out of one of * the source documents so instances can place it. * @default undefined * @optional true */ loadedParts?: Models.OCCT.AssemblyLoadedPartDef[] | undefined; } /** * An imported part definition for `assembly.manager.createImportedPart`: a label tree copied from * another document, placed by instances like any part. */ class CreateImportedPartDto { constructor(id?: string, sourceDocumentIndex?: number, sourceLabel?: string, name?: string, colorRgba?: Base.ColorRGBA); /** * The id instance nodes refer to the imported part by; it must be unique among the parts. * @default undefined */ id: string; /** * Which of the `sourceDocuments` given to `buildAssemblyDocument` to copy from, counting from * 0. * @default 0 */ sourceDocumentIndex: number; /** * The label of the sub-tree to copy, such as `0:1:1:1`; leave it out to copy every top-level * shape of the source document. * @default undefined * @optional true */ sourceLabel?: string | undefined; /** * A name for the copied root; leave it out to keep the source's name. * @default undefined * @optional true */ name?: string | undefined; /** * A color for the copied root as `{ r, g, b, a }` from 0 to 1; leave it out to keep the * source's colors. * @default undefined * @optional true */ colorRgba?: Base.ColorRGBA | undefined; } /** * A document, a label and a color for `assembly.manager.setDocLabelColor`. */ class SetDocLabelColorDto { constructor(document?: T, label?: string, r?: number, g?: number, b?: number, a?: number); /** * The document from `buildAssemblyDocument` or `loadStepToDoc`. * @default undefined */ document: T; /** * The label of the part, instance or assembly to color, such as `0:1:1:1`. * @default undefined */ label: string; /** * The red channel, from 0 to 1. * @default 0.5 * @minimum 0 * @maximum 1 * @step 0.01 */ r: number; /** * The green channel, from 0 to 1. * @default 0.5 * @minimum 0 * @maximum 1 * @step 0.01 */ g: number; /** * The blue channel, from 0 to 1. * @default 0.5 * @minimum 0 * @maximum 1 * @step 0.01 */ b: number; /** * The opacity, from 0 for transparent to 1 for opaque. * @default 1.0 * @minimum 0 * @maximum 1 * @step 0.01 */ a: number; } /** * A document, a label and a name for `assembly.manager.setDocLabelName`. */ class SetDocLabelNameDto { constructor(document?: T, label?: string, name?: string); /** * The document from `buildAssemblyDocument` or `loadStepToDoc`. * @default undefined */ document: T; /** * The label of the part, instance or assembly to rename, such as `0:1:1:1`. * @default undefined */ label: string; /** * The new name written to the label. * @default Renamed */ name: string; } /** * A document for the queries that read it whole, such as `assembly.query.getDocumentParts` and * `getAssemblyHierarchy`, and for deleting it. */ class DocumentQueryDto { constructor(document?: T); /** * The document from `buildAssemblyDocument` or `loadStepToDoc`. * @default undefined */ document: T; } /** * A document and one label for the queries that read a single label, such as * `assembly.query.getShapeFromLabel` and `getLabelColor`. */ class DocumentLabelQueryDto { constructor(document?: T, label?: string); /** * The document from `buildAssemblyDocument` or `loadStepToDoc`. * @default undefined */ document: T; /** * The label to read, such as `0:1:1:1`, as `getDocumentParts` reports it. * @default undefined */ label: string; } /** * A STEP file for `assembly.manager.loadStepToDoc`, which reads it into an assembly document. */ class LoadStepToDocDto { constructor(stepData?: string | ArrayBuffer | Uint8Array | File | Blob); /** * The STEP file as text, ArrayBuffer, Uint8Array, File or Blob; gzip-compressed STEP-Z is * unpacked on its own. * @default undefined */ stepData: string | ArrayBuffer | Uint8Array | File | Blob; } /** * A document and file options for `assembly.manager.exportDocumentToStep`. */ class ExportDocumentToStepDto { constructor(document?: T, fileName?: string, author?: string, organization?: string, compress?: boolean, tryDownload?: boolean); /** * The document from `buildAssemblyDocument` or `loadStepToDoc`. * @default undefined */ document: T; /** * The file name written into the STEP header and used for the download. * @default assembly.step */ fileName: string; /** * The author written into the STEP header. * @default Bitbybit user */ author: string; /** * The organization written into the STEP header. * @default Bitbybit */ organization: string; /** * When true, the file is written as gzip-compressed STEP-Z. * @default false */ compress: boolean; /** * When true, a browser download of the file is started where that is possible; the kernel * itself only returns the bytes. * @default false */ tryDownload: boolean; } /** * A document, meshing settings and file options for `assembly.manager.exportDocumentToGltf`. */ class ExportDocumentToGltfDto { constructor(document?: T, meshDeflection?: number, meshAngle?: number, mergeFaces?: boolean, forceUVExport?: boolean, fileName?: string, tryDownload?: boolean); /** * The document from `buildAssemblyDocument` or `loadStepToDoc`. * @default undefined */ document: T; /** * How closely triangles follow curved surfaces, in model units; smaller gives a finer mesh. * @default 0.1 */ meshDeflection: number; /** * The largest angle, in radians, between the normals of neighboring triangles; smaller gives * smoother curves. * @default 0.5 */ meshAngle: number; /** * When true, extra vertices are added inside curved faces for a closer fit, at the cost of * speed. * @default false */ internalVerticesMode: boolean; /** * When true, an extra pass refines triangles that bulge beyond the deflection, at the cost of * speed. * @default false */ controlSurfaceDeflection: boolean; /** * When true, faces with the same material are joined into one mesh; false keeps every face * separate. * @default false */ mergeFaces: boolean; /** * When true, texture coordinates are written even for meshes without textures. * @default false */ forceUVExport: boolean; /** * The name the downloaded file gets; it should end in `.glb`. * @default assembly.glb */ fileName: string; /** * When true, a browser download of the file is started where that is possible; the kernel * itself only returns the bytes. * @default false */ tryDownload: boolean; } /** * A document, meshing settings and Draco settings for * `assembly.manager.exportDocumentToGltfWithDraco`, which writes a Draco-compressed glTF. */ class ExportDocumentToGltfWithDracoDto extends ExportDocumentToGltfDto { constructor(document?: T, meshDeflection?: number, meshAngle?: number, mergeFaces?: boolean, forceUVExport?: boolean, fileName?: string, tryDownload?: boolean); /** * When true, the geometry is compressed with Draco. * @default true */ useDraco: boolean; /** * How hard Draco compresses, from 0 for fastest and largest to 10 for slowest and smallest. * @default 7 * @minimum 0 * @maximum 10 * @step 1 */ dracoCompressionLevel: number; /** * How many bits each vertex position keeps; fewer bits mean a smaller file and less precision. * @default 14 * @minimum 0 * @maximum 31 * @step 1 */ dracoQuantizePositionBits: number; /** * How many bits each normal keeps; fewer bits mean a smaller file and less precision. * @default 10 * @minimum 0 * @maximum 31 * @step 1 */ dracoQuantizeNormalBits: number; /** * How many bits each texture coordinate keeps; fewer bits mean a smaller file and less * precision. * @default 12 * @minimum 0 * @maximum 31 * @step 1 */ dracoQuantizeTexcoordBits: number; /** * How many bits each vertex color keeps; fewer bits mean a smaller file and less precision. * @default 8 * @minimum 0 * @maximum 31 * @step 1 */ dracoQuantizeColorBits: number; /** * How many bits other vertex attributes keep; fewer bits mean a smaller file and less * precision. * @default 12 * @minimum 0 * @maximum 31 * @step 1 */ dracoQuantizeGenericBits: number; /** * When true, one quantization grid is used for every attribute instead of one per attribute. * @default false */ dracoUnifiedQuantization: boolean; } /** * Shapes for `shapes.compound.makeCompound`, which packs them into one compound without joining * their geometry. */ class CompoundShapesDto { constructor(shapes?: T[]); /** * The shapes to pack together; any kinds may be mixed. * @default undefined */ shapes: T[]; } /** * A face or shell and a thickness for `operations.makeThickSolidSimple`, which turns it into a * solid slab. */ class ThisckSolidSimpleDto { constructor(shape?: T, offset?: number); /** * The face or shell to give a thickness to. * @default undefined */ shape: T; /** * The thickness in model units, along the surface normal for a positive value and the other way * for a negative one. * @default 1 * @minimum -Infinity * @maximum Infinity * @step 0.1 */ offset: number; } /** * A wire, an offset and an extrusion direction for `operations.offset3DWire`, which offsets a wire * that does not lie in one plane. */ class Offset3DWireDto { constructor(shape?: T, offset?: number, direction?: Base.Vector3); /** * The wire to offset; smooth wires work best, so fillet sharp corners first. * @default undefined */ shape: T; /** * The offset distance in model units. * @default 1 * @minimum -Infinity * @maximum Infinity * @step 0.1 */ offset: number; /** * The direction the wire is extruded along to build the offset; it must not be parallel to the * wire. * @default [0, 1, 0] */ direction: Base.Vector3; } /** * A closed wire and a planar flag for `shapes.face.createFaceFromWire`. */ class FaceFromWireDto { constructor(shape?: T, planar?: boolean); /** * The closed wire that becomes the face's boundary. * @default undefined */ shape: T; /** * When true the wire must lie in a plane and the face is flat; when false a smooth surface is * fitted through the wire's edges. * @default false */ planar: boolean; } /** * A wire, a guiding face and a side for `shapes.face.createFaceFromWireOnFace`, which cuts a face * out of the guiding face's surface. */ class FaceFromWireOnFaceDto { constructor(wire?: T, face?: U, inside?: boolean); /** * The wire lying on the guiding face's surface that bounds the new face. * @default undefined */ wire: T; /** * The face whose surface the new face is cut from. * @default undefined */ face: U; /** * When true, the wire is turned so the face is the region it encloses; when false the wire's * own direction decides. * @default true */ inside: boolean; } /** * Wires, a guiding face and a side for `shapes.face.createFacesFromWiresOnFace`, which cuts one * face per wire out of the guiding face's surface. */ class FacesFromWiresOnFaceDto { constructor(wires?: T[], face?: U, inside?: boolean); /** * The wires lying on the guiding face's surface, one face per wire. * @default undefined */ wires: T[]; /** * The face whose surface the new faces are cut from. * @default undefined */ face: U; /** * When true, each wire is turned so its face is the region it encloses; when false the wire's * own direction decides. * @default true */ inside: boolean; } /** * Wires and a planar flag for `shapes.face.createFaceFromWires`, which makes one face with the * first wire as its boundary and the others as holes. */ class FaceFromWiresDto { constructor(shapes?: T[], planar?: boolean); /** * The wires: the first is the outer boundary, every further one cuts a hole. * @default undefined */ shapes: T[]; /** * When true the wires must lie in one plane and the face is flat. * @default false */ planar: boolean; } /** * Wires and a planar flag for `shapes.face.createFacesFromWires`, which makes one face per wire. */ class FacesFromWiresDto { constructor(shapes?: T[], planar?: boolean); /** * The closed wires, one face per wire. * @default undefined */ shapes: T[]; /** * When true each wire must lie in a plane and its face is flat; when false a smooth surface is * fitted through each. * @default false */ planar: boolean; } /** * Wires, a guiding face and a side for `shapes.face.createFaceFromWiresOnFace`, which makes one * face on the guiding surface with holes. */ class FaceFromWiresOnFaceDto { constructor(wires?: T[], face?: U, inside?: boolean); /** * The wires on the guiding surface: the first is the outer boundary, every further one cuts a * hole. * @default undefined */ wires: T[]; /** * The face whose surface the new face is cut from. * @default undefined */ face: U; /** * Applies to the first wire: when true it is turned so the face is the region it encloses; when * false its own direction decides. * @default true */ inside: boolean; } /** * Faces and a tolerance for `shapes.shell.sewFaces`, which stitches faces that share edges into one * shell. */ class SewDto { constructor(shapes?: T[], tolerance?: number); /** * The faces to stitch together; their shared edges must line up within the tolerance. * @default undefined */ shapes: T[]; /** * How far apart two edges may be and still be sewn together, in model units. * @default 1.0e-7 * @minimum 0 * @maximum Infinity * @step 0.00001 */ tolerance: number; } /** * A center, a major axis direction and two radii for `geom.curves.geom2dEllipse`, a 2D construction * curve. */ class Geom2dEllipseDto { constructor(center?: Base.Point2, direction?: Base.Vector2, radiusMinor?: number, radiusMajor?: number, sense?: boolean); /** * The center of the ellipse as a 2D point. * @default [0,0] */ center: Base.Point2; /** * The direction of the major axis in the plane. * @default [1,0] */ direction: Base.Vector2; /** * The half-width across the ellipse's short axis; must not exceed `radiusMajor`. * @default 1 * @minimum 0 * @maximum Infinity * @step 0.1 */ radiusMinor: number; /** * The half-width along the ellipse's long axis. * @default 2 * @minimum 0 * @maximum Infinity * @step 0.1 */ radiusMajor: number; /** * When true, the curve runs the other way round. * @default false */ sense: boolean; } /** * A center, a start direction and a radius for `geom.curves.geom2dCircle`, a 2D construction curve. */ class Geom2dCircleDto { constructor(center?: Base.Point2, direction?: Base.Vector2, radius?: number, sense?: boolean); /** * The center of the circle as a 2D point. * @default [0,0] */ center: Base.Point2; /** * The direction in the plane where the curve's parameter starts. * @default [1,0] */ direction: Base.Vector2; /** * The distance from the center to the curve. * @default 1 * @minimum 0 * @maximum Infinity * @step 0.1 */ radius: number; /** * When true, the curve runs the other way round. * @default false */ sense: boolean; } /** * The proportions of a stylized Christmas tree for `shapes.wire.createChristmasTreeWire` and * `shapes.face.createChristmasTreeFace`, which stand it in the XY plane by default. */ class ChristmasTreeDto { constructor(height?: number, innerDist?: number, outerDist?: number, nrSkirts?: number, trunkHeight?: number, trunkWidth?: number, half?: boolean, rotation?: number, origin?: Base.Point3, direction?: Base.Vector3); /** * The height of the tree without the trunk, in model units. * @default 6 * @minimum 0 * @maximum Infinity * @step 0.1 */ height: number; /** * How far the branches reach from the trunk line at the notches of the lowest skirt, in model * units. * @default 1.5 * @minimum 0 * @maximum Infinity * @step 0.1 */ innerDist: number; /** * How far the branches reach from the trunk line at the tips of the lowest skirt, in model * units. * @default 3 * @minimum 0 * @maximum Infinity * @step 0.1 */ outerDist: number; /** * How many layers of branches, the triangle-like skirts, the tree has. * @default 5 * @minimum 1 * @maximum Infinity * @step 1 */ nrSkirts: number; /** * The height of the trunk below the branches, in model units; 0 leaves the trunk out. * @default 1 * @minimum 0 * @maximum Infinity * @step 0.1 */ trunkHeight: number; /** * The width of the trunk, in model units; used only when the trunk height is above 0. * @default 1 * @minimum 0 * @maximum Infinity * @step 0.1 */ trunkWidth: number; /** * When true, only one side of the tree is built, as an open wire. * @default false */ half: boolean; /** * How far the tree is spun about its trunk-to-tip axis, in degrees. * @default 0 * @minimum 0 * @maximum Infinity * @step 15 */ rotation: number; /** * The point at the base of the trunk. * @default [0, 0, 0] */ origin: Base.Point3; /** * The direction from the trunk to the tip; the default stands the tree up along Y. * @default [0, 1, 0] */ direction: Base.Vector3; } /** * The proportions of a star for `shapes.wire.createStarWire` and `shapes.face.createStarFace`, * which lay it flat on the ground unless `direction` says otherwise. */ class StarDto { constructor(outerRadius?: number, innerRadius?: number, numRays?: number, center?: Base.Point3, direction?: Base.Vector3, offsetOuterEdges?: number, half?: boolean); /** * The point the star is centered on. * @default [0,0,0] */ center: Base.Point3; /** * The normal of the plane the star lies in; the default lays it flat on the ground. * @default [0, 1, 0] */ direction: Base.Vector3; /** * How many points the star has. * @default 7 * @minimum 3 * @maximum Infinity * @step 1 */ numRays: number; /** * The distance from the center to the tip of each ray, in model units. * @default 2 * @minimum 0 * @maximum Infinity * @step 0.1 */ outerRadius: number; /** * The distance from the center to the notch between two rays, in model units. * @default 1 * @minimum 0 * @maximum Infinity * @step 0.1 */ innerRadius: number; /** * Lifts the ray tips out of the plane along the normal, in model units, making a 3D star; keep * it 0 for a face. * @default 0 * @minimum -Infinity * @maximum Infinity * @step 0.1 */ offsetOuterEdges?: number | undefined; /** * When true, only the first half of the rays are built, as an open wire. * @default false */ half: boolean; } /** * The size, lean and placement of a parallelogram for `shapes.wire.createParallelogramWire` and * `shapes.face.createParallelogramFace`. */ class ParallelogramDto { constructor(center?: Base.Point3, direction?: Base.Vector3, aroundCenter?: boolean, width?: number, height?: number, angle?: number); /** * The point the shape is centered on, or starts from when `aroundCenter` is false. * @default [0, 0, 0] */ center: Base.Point3; /** * The normal of the plane the shape lies in; the default lays it flat on the ground. * @default [0, 1, 0] */ direction: Base.Vector3; /** * When true the shape is centered on `center`; when false it starts there and extends in the * positive directions. * @default true */ aroundCenter: boolean; /** * The width of the shape's bounding rectangle, in model units. * @default 2 * @minimum 0 * @maximum Infinity * @step 0.1 */ width: number; /** * The height of the shape's bounding rectangle, in model units. * @default 1 * @minimum 0 * @maximum Infinity * @step 0.1 */ height: number; /** * How far the sides lean over from a rectangle, in degrees; 0 gives a rectangle. * @default 15 * @minimum -Infinity * @maximum Infinity * @step 1 */ angle: number; } /** * The size and placement of a heart outline for `shapes.wire.createHeartWire` and * `shapes.face.createHeartFace`. */ class Heart2DDto { constructor(center?: Base.Point3, direction?: Base.Vector3, rotation?: number, sizeApprox?: number); /** * The point the heart is centered on. * @default [0, 0, 0] */ center: Base.Point3; /** * The normal of the plane the heart lies in; the default lays it flat on the ground. * @default [0, 1, 0] */ direction: Base.Vector3; /** * How far the heart is turned in its plane, in degrees. * @default 0 * @minimum 0 * @maximum Infinity * @step 15 */ rotation: number; /** * The side of the square the heart roughly fits into, in model units. * @default 2 * @minimum 0 * @maximum Infinity * @step 0.1 */ sizeApprox: number; } /** * A corner count, a radius and a placement for `shapes.wire.createNGonWire` and * `shapes.face.createNGonFace`, a regular polygon. */ class NGonWireDto { constructor(center?: Base.Point3, direction?: Base.Vector3, nrCorners?: number, radius?: number); /** * The point the polygon is centered on. * @default [0, 0, 0] */ center: Base.Point3; /** * The normal of the plane the polygon lies in; the default lays it flat on the ground. * @default [0, 1, 0] */ direction: Base.Vector3; /** * How many corners, and so how many equal sides, the polygon has. * @default 6 * @minimum 3 * @maximum Infinity * @step 1 */ nrCorners: number; /** * The distance from the center to each corner, in model units. * @default 1 * @minimum 0 * @maximum Infinity * @step 0.1 */ radius: number; } /** * A center, a plane normal and two radii for the ellipse edge, wire and face methods of `shapes` * and `geom.curves.geomEllipseCurve`. */ class EllipseDto { constructor(center?: Base.Point3, direction?: Base.Vector3, radiusMinor?: number, radiusMajor?: number); /** * The point the ellipse is centered on. * @default [0, 0, 0] */ center: Base.Point3; /** * The normal of the plane the ellipse lies in; the default lays it flat on the ground. * @default [0, 1, 0] */ direction: Base.Vector3; /** * The half-width across the ellipse's short axis, in model units; must not exceed * `radiusMajor`. * @default 1 * @minimum 0 * @maximum Infinity * @step 0.1 */ radiusMinor: number; /** * The half-width along the ellipse's long axis, in model units. * @default 2 * @minimum 0 * @maximum Infinity * @step 0.1 */ radiusMajor: number; } /** * The size of a coil for `shapes.wire.createHelixWire`: its radius, how much it climbs per turn and * its total height. */ class HelixWireDto { constructor(radius?: number, pitch?: number, height?: number, center?: Base.Point3, direction?: Base.Vector3, clockwise?: boolean, tolerance?: number); /** * The distance from the axis to the coil, in model units. * @default 1 * @minimum 0 * @maximum Infinity * @step 0.1 */ radius: number; /** * How far the coil climbs along the axis in one full turn, in model units. * @default 1 * @minimum 0 * @maximum Infinity * @step 0.1 */ pitch: number; /** * The total climb of the coil along the axis, in model units. * @default 5 * @minimum 0 * @maximum Infinity * @step 0.1 */ height: number; /** * The point on the axis where the coil starts climbing from. * @default [0, 0, 0] */ center: Base.Point3; /** * The direction of the axis the coil climbs along. * @default [0, 1, 0] */ direction: Base.Vector3; /** * When true, the coil winds clockwise seen from the tip of the axis. * @default false */ clockwise: boolean; /** * How far the fitted curve may stray from the exact helix, in model units. * @default 0.0001 * @minimum 0 * @maximum Infinity * @step 0.0001 */ tolerance: number; } /** * The size of a coil for `shapes.wire.createHelixWireByTurns`: its radius, how much it climbs per * turn and how many turns it makes. */ class HelixWireByTurnsDto { constructor(radius?: number, pitch?: number, numTurns?: number, center?: Base.Point3, direction?: Base.Vector3, clockwise?: boolean, tolerance?: number); /** * The distance from the axis to the coil, in model units. * @default 1 * @minimum 0 * @maximum Infinity * @step 0.1 */ radius: number; /** * How far the coil climbs along the axis in one full turn, in model units. * @default 1 * @minimum 0 * @maximum Infinity * @step 0.1 */ pitch: number; /** * How many full turns the coil makes; fractions are allowed. * @default 5 * @minimum 0 * @maximum Infinity * @step 0.5 */ numTurns: number; /** * The point on the axis where the coil starts climbing from. * @default [0, 0, 0] */ center: Base.Point3; /** * The direction of the axis the coil climbs along. * @default [0, 1, 0] */ direction: Base.Vector3; /** * When true, the coil winds clockwise seen from the tip of the axis. * @default false */ clockwise: boolean; /** * How far the fitted curve may stray from the exact helix, in model units. * @default 0.0001 * @minimum 0 * @maximum Infinity * @step 0.0001 */ tolerance: number; } /** * The size of a conical coil for `shapes.wire.createTaperedHelixWire`: the radius at each end, the * climb per turn and the total height. */ class TaperedHelixWireDto { constructor(startRadius?: number, endRadius?: number, pitch?: number, height?: number, center?: Base.Point3, direction?: Base.Vector3, clockwise?: boolean, tolerance?: number); /** * The distance from the axis to the coil at its base, in model units. * @default 2 * @minimum 0 * @maximum Infinity * @step 0.1 */ startRadius: number; /** * The distance from the axis to the coil at its top, in model units. * @default 0.5 * @minimum 0 * @maximum Infinity * @step 0.1 */ endRadius: number; /** * How far the coil climbs along the axis in one full turn, in model units. * @default 1 * @minimum 0 * @maximum Infinity * @step 0.1 */ pitch: number; /** * The total climb of the coil along the axis, in model units. * @default 5 * @minimum 0 * @maximum Infinity * @step 0.1 */ height: number; /** * The point on the axis where the coil starts climbing from. * @default [0, 0, 0] */ center: Base.Point3; /** * The direction of the axis the coil climbs along. * @default [0, 1, 0] */ direction: Base.Vector3; /** * When true, the coil winds clockwise seen from the tip of the axis. * @default false */ clockwise: boolean; /** * How far the fitted curve may stray from the exact helix, in model units. * @default 0.0001 * @minimum 0 * @maximum Infinity * @step 0.0001 */ tolerance: number; } /** * The size of a flat spiral for `shapes.wire.createFlatSpiralWire`: the radius at each end and the * number of turns between them. */ class FlatSpiralWireDto { constructor(startRadius?: number, endRadius?: number, numTurns?: number, center?: Base.Point3, direction?: Base.Vector3, clockwise?: boolean, tolerance?: number); /** * The distance from the center where the spiral starts, in model units. * @default 0.5 * @minimum 0 * @maximum Infinity * @step 0.1 */ startRadius: number; /** * The distance from the center where the spiral ends, in model units. * @default 5 * @minimum 0 * @maximum Infinity * @step 0.1 */ endRadius: number; /** * How many full turns the spiral makes between the two radii; fractions are allowed. * @default 5 * @minimum 0 * @maximum Infinity * @step 0.5 */ numTurns: number; /** * The point the spiral winds around. * @default [0, 0, 0] */ center: Base.Point3; /** * The normal of the plane the spiral lies in; the default lays it flat on the ground. * @default [0, 1, 0] */ direction: Base.Vector3; /** * When true, the spiral winds clockwise seen from the tip of the normal. * @default false */ clockwise: boolean; /** * How far the fitted curve may stray from the exact spiral, in model units. * @default 0.0001 * @minimum 0 * @maximum Infinity * @step 0.0001 */ tolerance: number; } /** * Text and its layout for `shapes.wire.textWires` and `textWiresWithData`, which write it as stroke * wires on the ground plane in the single-line Hershey font. */ class TextWiresDto { constructor(text?: string, xOffset?: number, yOffset?: number, height?: number, lineSpacing?: number, letterSpacing?: number, align?: Base.horizontalAlignEnum, extrudeOffset?: number, centerOnOrigin?: boolean); /** * The text to write; a line break starts a new line. * @default Hello World */ text?: string | undefined; /** * How far the whole block is shifted along X, in model units. * @default 0 * @minimum -Infinity * @maximum Infinity * @step 0.1 */ xOffset?: number | undefined; /** * How far the whole block is shifted along the second axis of the text plane, in model units. * @default 0 * @minimum -Infinity * @maximum Infinity * @step 0.1 */ yOffset?: number | undefined; /** * The height of a capital letter, in model units. * @default 1 * @minimum -Infinity * @maximum Infinity * @step 0.1 */ height?: number | undefined; /** * The distance between lines as a multiple of the height. * @default 2 * @minimum -Infinity * @maximum Infinity * @step 0.1 */ lineSpacing?: number | undefined; /** * Extra space between characters as a multiple of the height; 0 uses the font's own spacing. * @default 0 * @minimum -Infinity * @maximum Infinity * @step 0.1 */ letterSpacing?: number | undefined; /** * How lines of different length line up: at their left edge, their center or their right edge. * @default left */ align?: Base.horizontalAlignEnum | undefined; /** * A margin in model units taken off the height and split above and below each character, so * extruded text keeps its full size. * @default 0 * @minimum -Infinity * @maximum Infinity * @step 0.1 */ extrudeOffset?: number | undefined; /** * When true, the middle of the whole text block is moved to the origin. * @default false */ centerOnOrigin: boolean; } /** * A radius and an axis for `geom.surfaces.cylindricalSurface`, an infinite construction surface. */ class GeomCylindricalSurfaceDto { constructor(radius?: number, center?: Base.Point3, direction?: Base.Vector3); /** * The distance from the axis to the surface, in model units. * @default 1 * @minimum 0 * @maximum Infinity * @step 0.1 */ radius: number; /** * A point on the axis of the cylinder. * @default [0, 0, 0] */ center: Base.Point3; /** * The direction of the axis of the cylinder. * @default [0, 1, 0] */ direction: Base.Vector3; } /** * A 2D curve and two parameters for `geom.curves.geom2dTrimmedCurve`, which keeps the piece between * them. */ class Geom2dTrimmedCurveDto { constructor(shape?: T, u1?: number, u2?: number, sense?: boolean, adjustPeriodic?: boolean); /** * The 2D curve to cut a piece out of. * @default undefined */ shape: T; /** * The parameter where the piece starts; the piece runs from `u1` to `u2`, whichever is larger. * @default 0 * @minimum 0 * @maximum Infinity * @step 0.1 */ u1: number; /** * The parameter where the piece ends. * @default 1 * @minimum 0 * @maximum Infinity * @step 0.1 */ u2: number; /** * On a closed curve, which of the two possible pieces is kept: true keeps the one running the * curve's own way. * @default true */ sense: boolean; /** * When true, the parameters of a periodic curve are brought into its period first. * @default true */ adjustPeriodic: boolean; } /** * Two 2D points for `geom.curves.geom2dSegment`, a straight construction curve between them. */ class Geom2dSegmentDto { constructor(start?: Base.Point2, end?: Base.Point2); /** * The 2D point the segment starts at. * @default [0, 0] */ start: Base.Point2; /** * The 2D point the segment ends at. * @default [1, 0] */ end: Base.Point2; } /** * A solid, a spacing and a direction for `operations.slice`, which cuts it into parallel slices. */ class SliceDto { constructor(shape?: T, step?: number, direction?: Base.Vector3); /** * The solid, or shape holding solids, to slice. * @default undefined */ shape: T; /** * The distance between slices, in model units; must be above 0. * @default 0.1 * @minimum 0 * @maximum Infinity * @step 0.1 */ step: number; /** * The direction the slices are stacked along; each cutting plane is perpendicular to it. * @default [0, 1, 0] */ direction: Base.Vector3; } /** * A solid, a pattern of spacings and a direction for `operations.sliceInStepPattern`, which cuts it * into parallel slices with repeating gaps. */ class SliceInStepPatternDto { constructor(shape?: T, steps?: number[], direction?: Base.Vector3); /** * The solid, or shape holding solids, to slice. * @default undefined */ shape: T; /** * The gaps between slices in model units, applied in turn from the bottom and repeated until * the top is reached. * @default [0.1, 0.2] */ steps: number[]; /** * The direction the slices are stacked along; each cutting plane is perpendicular to it. * @default [0, 1, 0] */ direction: Base.Vector3; } /** * Two points and the drawing settings for `dimensions.simpleLinearLengthDimension`: where the * dimension line sits, how the extension lines, arrows and label look, and how the distance is * written. */ class SimpleLinearLengthDimensionDto { constructor(start?: Base.Point3, end?: Base.Point3, direction?: Base.Vector3, offsetFromPoints?: number, crossingSize?: number, labelSuffix?: string, labelSize?: number, labelOffset?: number, labelRotation?: number, endType?: dimensionEndTypeEnum, arrowSize?: number, arrowAngle?: number, arrowsFlipped?: boolean, labelFlipHorizontal?: boolean, labelFlipVertical?: boolean, labelOverwrite?: string, removeTrailingZeros?: boolean); /** * The first of the two points whose distance is measured. * @default undefined */ start: Base.Point3; /** * The second of the two points whose distance is measured. * @default undefined */ end: Base.Point3; /** * The vector from the measured points to the dimension line; its length is the offset, in model * units, and it must not run along the measured line. * @default undefined */ direction: Base.Vector3; /** * The gap between each measured point and the start of its extension line, in model units, so * the dimension does not touch the geometry. * @default 0 * @minimum -Infinity * @maximum Infinity * @step 0.1 */ offsetFromPoints?: number | undefined; /** * How far the lines stick out past their crossings, in model units. * @default 0.2 * @minimum 0 * @maximum Infinity * @step 0.1 */ crossingSize?: number | undefined; /** * How many decimals the distance is rounded to in the label. * @default 2 * @minimum 0 * @maximum Infinity * @step 1 */ decimalPlaces?: number | undefined; /** * Text written after the number, such as a unit; the model has no unit of its own. * @default (cm) */ labelSuffix?: string | undefined; /** * The height of the label's capital letters, in model units. * @default 0.1 * @minimum 0 * @maximum Infinity * @step 0.1 */ labelSize?: number | undefined; /** * How far the label sits from the dimension line, in model units. * @default 0.3 * @minimum -Infinity * @maximum Infinity * @step 0.1 */ labelOffset?: number | undefined; /** * Extra rotation of the label in its plane, in degrees. * @default 0 * @minimum -360 * @maximum 360 * @step 1 */ labelRotation?: number | undefined; /** * What the dimension line ends with: nothing, or an arrowhead. * @default none */ endType?: dimensionEndTypeEnum | undefined; /** * The length of the arrowheads, in model units. * @default 0.3 * @minimum 0 * @maximum Infinity * @step 0.1 */ arrowSize?: number | undefined; /** * The full angle between the two lines of an arrowhead, in degrees, up to 90. * @default 30 * @minimum 0 * @maximum 90 * @step 1 */ arrowAngle?: number | undefined; /** * When true, the arrowheads point outward from the dimension instead of inward. * @default false */ arrowsFlipped?: boolean | undefined; /** * When true, the label is mirrored left to right. * @default false */ labelFlipHorizontal?: boolean | undefined; /** * When true, the label is mirrored top to bottom. * @default false */ labelFlipVertical?: boolean | undefined; /** * An expression written instead of the plain number, with `val` standing for the distance, such * as `100*val` or `Length: val mm`. * @default 1*val * @optional true */ labelOverwrite?: string | undefined; /** * When true, zeros at the end of the decimals are dropped, so 2.50 becomes 2.5. * @default false */ removeTrailingZeros?: boolean | undefined; } /** * A center, two directions and the drawing settings for `dimensions.simpleAngularDimension`: the * arc, the extension lines, the arrows and the label with the angle. */ class SimpleAngularDimensionDto { constructor(direction1?: Base.Point3, direction2?: Base.Point3, center?: Base.Point3, radius?: number, offsetFromCenter?: number, extraSize?: number, radians?: boolean, labelSuffix?: string, labelSize?: number, labelOffset?: number, endType?: dimensionEndTypeEnum, arrowSize?: number, arrowAngle?: number, arrowsFlipped?: boolean, labelRotation?: number, labelFlipHorizontal?: boolean, labelFlipVertical?: boolean, labelOverwrite?: string, removeTrailingZeros?: boolean); /** * The direction of the first leg of the angle, from the center. * @default [1, 0, 0] */ direction1: Base.Point3; /** * The direction of the second leg of the angle, from the center. * @default [0, 0, 1] */ direction2: Base.Point3; /** * The point the angle is measured at. * @default [0, 0, 0] */ center: Base.Point3; /** * The distance from the center to the dimension arc, in model units. * @default 4 * @minimum 0 * @maximum Infinity * @step 0.1 */ radius: number; /** * The gap between the center and the start of each extension line, in model units. * @default 0.5 * @minimum -Infinity * @maximum Infinity * @step 0.1 */ offsetFromCenter: number; /** * How far the extension lines stick out past the arc, in model units. * @default 0 * @minimum 0 * @maximum Infinity * @step 0.1 */ extraSize: number; /** * How many decimals the angle is rounded to in the label. * @default 2 * @minimum 0 * @maximum Infinity * @step 1 */ decimalPlaces: number; /** * Text written after the number, such as the unit. * @default (deg) */ labelSuffix: string; /** * The height of the label's capital letters, in model units. * @default 0.1 * @minimum 0 * @maximum Infinity * @step 0.1 */ labelSize: number; /** * How far the label sits from the arc, in model units. * @default 0.3 * @minimum -Infinity * @maximum Infinity * @step 0.1 */ labelOffset: number; /** * When true, the angle is written in radians instead of degrees. * @default false */ radians: boolean; /** * What the arc ends with: nothing, or an arrowhead. * @default none */ endType?: dimensionEndTypeEnum | undefined; /** * The length of the arrowheads, in model units. * @default 0.3 * @minimum 0 * @maximum Infinity * @step 0.1 */ arrowSize?: number | undefined; /** * The full angle between the two lines of an arrowhead, in degrees, up to 90. * @default 30 * @minimum 0 * @maximum 90 * @step 1 */ arrowAngle?: number | undefined; /** * When true, the arrowheads point outward from the dimension instead of inward. * @default false */ arrowsFlipped?: boolean | undefined; /** * Extra rotation of the label in its plane, in degrees. * @default 0 * @minimum -360 * @maximum 360 * @step 1 */ labelRotation?: number | undefined; /** * When true, the label is mirrored left to right. * @default false */ labelFlipHorizontal?: boolean | undefined; /** * When true, the label is mirrored top to bottom. * @default false */ labelFlipVertical?: boolean | undefined; /** * An expression written instead of the plain number, with `val` standing for the angle, such as * `100*val` or `Angle: val deg`. * @default 1*val * @optional true */ labelOverwrite?: string | undefined; /** * When true, zeros at the end of the decimals are dropped, so 45.00 becomes 45. * @default false */ removeTrailingZeros?: boolean | undefined; } /** * Two points, a label and the drawing settings for `dimensions.pinWithLabel`, a line pointing at a * spot on a model with text at its end. */ class PinWithLabelDto { constructor(startPoint?: Base.Point3, endPoint?: Base.Point3, direction?: Base.Vector3, offsetFromStart?: number, label?: string, labelOffset?: number, labelSize?: number, endType?: dimensionEndTypeEnum, arrowSize?: number, arrowAngle?: number, arrowsFlipped?: boolean, labelRotation?: number, labelFlipHorizontal?: boolean, labelFlipVertical?: boolean); /** * The spot on the model the pin marks. * @default [0, 0, 0] */ startPoint: Base.Point3; /** * The point the pin line ends at, where the label is written. * @default [0, 5, 2] */ endPoint?: Base.Point3 | undefined; /** * The normal of the plane the label is written in. * @default [0, 0, 1] */ direction?: Base.Vector3 | undefined; /** * The gap between the start point and the beginning of the line, in model units. * @default 0 * @minimum 0 * @maximum Infinity * @step 0.1 */ offsetFromStart?: number | undefined; /** * The text written at the end of the pin. * @default Pin */ label?: string | undefined; /** * The gap between the end of the line and the label, in model units. * @default 0.3 * @minimum -Infinity * @maximum Infinity * @step 0.1 */ labelOffset?: number | undefined; /** * The height of the label's capital letters, in model units. * @default 0.1 * @minimum 0 * @maximum Infinity * @step 0.1 */ labelSize?: number | undefined; /** * What the pin line ends with at the start point: nothing, or an arrowhead. * @default none */ endType?: dimensionEndTypeEnum | undefined; /** * The length of the arrowhead, in model units. * @default 0.3 * @minimum 0 * @maximum Infinity * @step 0.1 */ arrowSize?: number | undefined; /** * The full angle between the two lines of the arrowhead, in degrees, up to 90. * @default 30 * @minimum 0 * @maximum 90 * @step 1 */ arrowAngle?: number | undefined; /** * When true, the arrowhead points away from the start point instead of toward it. * @default false */ arrowsFlipped?: boolean | undefined; /** * Extra rotation of the label in its plane, in degrees. * @default 0 * @minimum -360 * @maximum 360 * @step 1 */ labelRotation?: number | undefined; /** * When true, the label is mirrored left to right. * @default false */ labelFlipHorizontal?: boolean | undefined; /** * When true, the label is mirrored top to bottom. * @default false */ labelFlipVertical?: boolean | undefined; } /** * A star outline and the extrusion lengths for `shapes.solid.createStarSolid`; at least one length * must be above 0. */ class StarSolidDto extends StarDto { constructor(outerRadius?: number, innerRadius?: number, numRays?: number, center?: Base.Point3, direction?: Base.Vector3, offsetOuterEdges?: number, half?: boolean, extrusionLengthFront?: number, extrusionLengthBack?: number); /** * How far the star grows along its plane normal, in model units. * @default 1 * @minimum 0 * @maximum Infinity * @step 0.1 */ extrusionLengthFront: number; /** * How far the star grows against its plane normal, in model units. * @default 0 * @minimum 0 * @maximum Infinity * @step 0.1 */ extrusionLengthBack: number; } /** * A regular polygon and the extrusion lengths for `shapes.solid.createNGonSolid`; at least one * length must be above 0. */ class NGonSolidDto extends NGonWireDto { constructor(center?: Base.Point3, direction?: Base.Vector3, nrCorners?: number, radius?: number, extrusionLengthFront?: number, extrusionLengthBack?: number); /** * How far the polygon grows along its plane normal, in model units. * @default 1 * @minimum 0 * @maximum Infinity * @step 0.1 */ extrusionLengthFront: number; /** * How far the polygon grows against its plane normal, in model units. * @default 0 * @minimum 0 * @maximum Infinity * @step 0.1 */ extrusionLengthBack: number; } /** * A parallelogram and the extrusion lengths for `shapes.solid.createParallelogramSolid`; at least * one length must be above 0. */ class ParallelogramSolidDto extends ParallelogramDto { constructor(center?: Base.Point3, direction?: Base.Vector3, aroundCenter?: boolean, width?: number, height?: number, angle?: number, extrusionLengthFront?: number, extrusionLengthBack?: number); /** * How far the parallelogram grows along its plane normal, in model units. * @default 1 * @minimum 0 * @maximum Infinity * @step 0.1 */ extrusionLengthFront: number; /** * How far the parallelogram grows against its plane normal, in model units. * @default 0 * @minimum 0 * @maximum Infinity * @step 0.1 */ extrusionLengthBack: number; } /** * A heart outline and the extrusion lengths for `shapes.solid.createHeartSolid`; at least one * length must be above 0. */ class HeartSolidDto extends Heart2DDto { constructor(center?: Base.Point3, direction?: Base.Vector3, rotation?: number, sizeApprox?: number, extrusionLengthFront?: number, extrusionLengthBack?: number); /** * How far the heart grows along its plane normal, in model units. * @default 1 * @minimum 0 * @maximum Infinity * @step 0.1 */ extrusionLengthFront: number; /** * How far the heart grows against its plane normal, in model units. * @default 0 * @minimum 0 * @maximum Infinity * @step 0.1 */ extrusionLengthBack: number; } /** * A tree outline and the extrusion lengths for `shapes.solid.createChristmasTreeSolid`; at least * one length must be above 0. */ class ChristmasTreeSolidDto extends ChristmasTreeDto { constructor(height?: number, innerDist?: number, outerDist?: number, nrSkirts?: number, trunkHeight?: number, trunkWidth?: number, half?: boolean, rotation?: number, origin?: Base.Point3, direction?: Base.Vector3, extrusionLengthFront?: number, extrusionLengthBack?: number); /** * How far the tree grows along its plane normal, in model units. * @default 1 * @minimum 0 * @maximum Infinity * @step 0.1 */ extrusionLengthFront: number; /** * How far the tree grows against its plane normal, in model units. * @default 0 * @minimum 0 * @maximum Infinity * @step 0.1 */ extrusionLengthBack: number; } /** * An L shape and the extrusion lengths for `shapes.solid.createLPolygonSolid`; at least one length * must be above 0. */ class LPolygonSolidDto extends LPolygonDto { constructor(widthFirst?: number, lengthFirst?: number, widthSecond?: number, lengthSecond?: number, align?: directionEnum, rotation?: number, center?: Base.Point3, direction?: Base.Vector3, extrusionLengthFront?: number, extrusionLengthBack?: number); /** * How far the L shape grows along its plane normal, in model units. * @default 1 * @minimum 0 * @maximum Infinity * @step 0.1 */ extrusionLengthFront: number; /** * How far the L shape grows against its plane normal, in model units. * @default 0 * @minimum 0 * @maximum Infinity * @step 0.1 */ extrusionLengthBack: number; } /** * A straight segment of a path, running from the previous point to `to`. */ class PathLineSegment { constructor(to?: Base.Point2); /** * The segment kind, always `line`. * @default line */ type: "line"; /** * The 2D point the segment ends at. * @default undefined */ to: Base.Point2; } /** * A quadratic Bezier segment of a path: one control point pulls the curve on its way from the * previous point to `to`. */ class PathQuadraticSegment { constructor(c?: Base.Point2, to?: Base.Point2); /** * The segment kind, always `quadratic`. * @default quadratic */ type: "quadratic"; /** * The 2D control point the curve is pulled toward. * @default undefined */ c: Base.Point2; /** * The 2D point the segment ends at. * @default undefined */ to: Base.Point2; } /** * A cubic Bezier segment of a path: two control points shape the curve on its way from the previous * point to `to`. */ class PathCubicSegment { constructor(c1?: Base.Point2, c2?: Base.Point2, to?: Base.Point2); /** * The segment kind, always `cubic`. * @default cubic */ type: "cubic"; /** * The 2D control point that shapes the curve as it leaves the previous point. * @default undefined */ c1: Base.Point2; /** * The 2D control point that shapes the curve as it arrives at `to`. * @default undefined */ c2: Base.Point2; /** * The 2D point the segment ends at. * @default undefined */ to: Base.Point2; } /** * An elliptical arc segment of a path, given by its ellipse's center, radii and rotation and the * angles it sweeps; all angles are in radians. */ class PathArcSegment { constructor(to?: Base.Point2, center?: Base.Point2, rx?: number, ry?: number, xAxisRotation?: number, startAngle?: number, deltaAngle?: number); /** * The segment kind, always `arc`. * @default arc */ type: "arc"; /** * The 2D point the arc ends at. * @default undefined */ to: Base.Point2; /** * The 2D center of the ellipse the arc lies on. * @default undefined */ center: Base.Point2; /** * The half-width of the ellipse along its rotated x axis. * @default 0 */ rx: number; /** * The half-width of the ellipse along its rotated y axis. * @default 0 */ ry: number; /** * How far the ellipse is turned in the plane, in radians, counterclockwise in path space. * @default 0 */ xAxisRotation: number; /** * The angle on the ellipse where the arc starts, in radians. * @default 0 */ startAngle: number; /** * How far the arc sweeps from its start, in radians; negative sweeps clockwise in path space. * @default 0 */ deltaAngle: number; } /** * One segment of an SVG-style path: a line, a quadratic or cubic Bezier, or an arc. A path is a * list of these, which is how imported SVG outlines are represented before they become wires. */ type PathSegment = PathLineSegment | PathQuadraticSegment | PathCubicSegment | PathArcSegment; /** * One continuous run of a path: a start point, its segments in order and whether it closes back on * itself. */ class PathSubpath { constructor(start?: Base.Point2, segments?: PathSegment[], closed?: boolean); /** * The 2D point the first segment starts at. * @default undefined */ start: Base.Point2; /** * The segments in order, each starting where the previous one ended. * @default undefined */ segments: PathSegment[]; /** * When true, the run closes from its last point back to `start`. * @default false */ closed: boolean; } /** * How closed subpaths of a filled element are turned into faces. * - `none`: no faces, only the outline wires. * - `auto`: build faces honoring each element's own SVG fill-rule (nonzero/evenodd). * - `nonzero`: force the non-zero winding rule. * - `evenOdd`: force the even-odd rule. * - `perSubpath`: every closed subpath becomes its own independent face (no holes). */ enum svgFaceStrategyEnum { none = "none", auto = "auto", nonzero = "nonzero", evenOdd = "evenOdd", perSubpath = "perSubpath" } /** * How a 2D path is placed into 3D: scaled, flipped from SVG's downward Y to Y up, and moved to an * origin. The part the path and SVG inputs share. */ class PathPlacementDto { constructor(scale?: number, flipY?: boolean, origin?: Base.Point3); /** * A factor applied to every path coordinate; 1 keeps the size. * @default 1 */ scale: number; /** * When true, Y is negated so a drawing made with Y pointing down, as in SVG, comes out upright. * @default true */ flipY: boolean; /** * The point the scaled and flipped drawing is moved to. * @default [0, 0, 0] */ origin: Base.Point3; } /** * Subpaths and build options for `path.shapeFromPath`, which turns them into wires and, when asked, * faces. */ class ShapeFromPathDto { constructor(subpaths?: PathSubpath[], makeFaces?: boolean, joinSegments?: boolean, tolerance?: number, scale?: number, flipY?: boolean, origin?: Base.Point3); /** * The runs of segments that describe the outline, one wire each. * @default undefined */ subpaths: PathSubpath[]; /** * When true, closed subpaths become faces as well as wires. * @default false */ makeFaces: boolean; /** * When true, consecutive segments of a subpath are merged into a single edge where they can be. * @default true */ joinSegments: boolean; /** * How far apart segment ends may be and still join, in model units. * @default 1e-7 */ tolerance: number; /** * A factor applied to every path coordinate; 1 keeps the size. * @default 1 */ scale: number; /** * When true, Y is negated so a drawing made with Y pointing down comes out upright. * @default true */ flipY: boolean; /** * The point the scaled and flipped drawing is moved to. * @default [0, 0, 0] */ origin: Base.Point3; } /** * SVG text and import options for `svg.loadSVG` and `svg.loadSVGStructured`: which elements to * keep, whether to build faces, and how to scale and place the drawing. */ class LoadSVGDto { constructor(svg?: string, faceStrategy?: svgFaceStrategyEnum, makeRibbons?: boolean, includeInvisible?: boolean, joinSegments?: boolean, tolerance?: number, scale?: number, flipY?: boolean, alignment?: Base.basicAlignmentEnum, direction?: Base.Vector3, center?: Base.Point3); /** * The text of the SVG document. * @default */ svg: string; /** * How filled shapes become faces: `none` keeps only wires, `auto` follows each element's fill * rule, `nonzero` and `evenOdd` force a rule, `perSubpath` makes one face per closed subpath * without holes. * @default none */ faceStrategy: svgFaceStrategyEnum; /** * Reserved for building ribbon faces from stroked paths; not supported yet, stroked paths stay * wires. * @default false */ makeRibbons: boolean; /** * When true, elements hidden by `display: none` or `visibility: hidden` are imported too. * @default false */ includeInvisible: boolean; /** * When true, consecutive segments of a subpath are merged into a single edge where they can be. * @default true */ joinSegments: boolean; /** * How far apart segment ends may be and still join, in model units. * @default 1e-7 */ tolerance: number; /** * A factor applied to the SVG coordinates; 1 keeps the size. * @default 1 */ scale: number; /** * When true, Y is negated so the drawing comes out upright, since SVG has Y pointing down. * @default true */ flipY: boolean; /** * Which point of the drawing's bounding box sits on `center`; `midMid` centers it. * @default midMid */ alignment: Base.basicAlignmentEnum; /** * The normal of the plane the drawing is laid on; the default lays it flat on the ground. * @default [0, 1, 0] */ direction: Base.Vector3; /** * The point the aligned drawing is placed at. * @default [0, 0, 0] */ center: Base.Point3; } /** * One imported SVG element as `svg.loadSVGStructured` returns it: the built shape and the style * resolved for it. An output, not an input. */ class SVGShape { /** * The built shape: a wire, or a face when one was asked for and could be built. */ shape: T; /** * True when `shape` is a face, false when it is a wire. */ isFace: boolean; /** * The SVG tag the shape came from, such as `path`, `rect` or `circle`. */ elementType: string; /** * Whether the element's outline was closed. */ closed: boolean; /** * The fill color that applied to the element, if any. * @optional true */ fill?: string | undefined; /** * The stroke color that applied to the element, if any. * @optional true */ stroke?: string | undefined; /** * The stroke width that applied to the element, if any. * @optional true */ strokeWidth?: number | undefined; /** * The combined opacity of the element from 0 to 1, if any was set. * @optional true */ opacity?: number | undefined; /** * The element's `id` attribute, if any. * @optional true */ id?: string | undefined; /** * The element's `class` attribute, if any. * @optional true */ className?: string | undefined; } /** * What `svg.loadSVGStructured` returns: one shape per drawable element, the view box and any * warnings. An output, not an input. */ class SVGResult { /** * One entry per drawable element, in document order. */ shapes: SVGShape[]; /** * The document's view box as `[minX, minY, width, height]`, when it has one. * @optional true */ viewBox?: [number, number, number, number] | undefined; /** * Problems met while parsing or building that did not stop the import. */ warnings: string[]; } }