diff --git a/docs/.gitignore b/docs/.gitignore index 8713d9b67..572208f21 100644 --- a/docs/.gitignore +++ b/docs/.gitignore @@ -7,6 +7,7 @@ # Generated files .docusaurus .cache-loader +/static/llms.txt # Misc .DS_Store diff --git a/docs/API.md b/docs/API.md index 3ec084614..353b1a520 100644 --- a/docs/API.md +++ b/docs/API.md @@ -62,10 +62,24 @@ declare namespace Bit { g: number; b: number; }; - type Point2 = [number, number]; - type Vector2 = [number, number]; - type Point3 = [number, number, number]; - type Vector3 = [number, number, number]; + type Point2 = [ + number, + number + ]; + type Vector2 = [ + number, + number + ]; + type Point3 = [ + number, + number, + number + ]; + type Vector3 = [ + number, + number, + number + ]; type Axis3 = { origin: Base.Point3; direction: Base.Vector3; @@ -74,13 +88,23 @@ declare namespace Bit { origin: Base.Point2; direction: Base.Vector2; }; - type Segment2 = [Point2, Point2]; - type Segment3 = [Point3, Point3]; + type Segment2 = [ + Point2, + Point2 + ]; + type Segment3 = [ + Point3, + Point3 + ]; type TrianglePlane3 = { normal: Vector3; d: number; }; - type Triangle3 = [Base.Point3, Base.Point3, Base.Point3]; + type Triangle3 = [ + Base.Point3, + Base.Point3, + Base.Point3 + ]; type Mesh3 = Triangle3[]; type Plane3 = { origin: Base.Point3; @@ -117,1666 +141,458 @@ declare namespace Bit { type VerbSurface = { tessellate: (options: any) => any; }; - type TransformMatrix3x3 = [number, number, number, number, number, number, number, number, number]; + type TransformMatrix3x3 = [ + number, + number, + number, + number, + number, + number, + number, + number, + number + ]; type TransformMatrixes3x3 = TransformMatrix3x3[]; - type TransformMatrix = [number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number]; + type TransformMatrix = [ + number, + number, + number, + number, + number, + number, + number, + number, + number, + number, + number, + number, + number, + number, + number, + number + ]; type TransformMatrixes = TransformMatrix[]; - } declare namespace JSCAD { + } + declare namespace JSCAD { type JSCADEntity = any; class PolylinePropertiesDto { - /** - * Provide options without default values - */ constructor(points?: Base.Point3[], isClosed?: boolean); - /** - * Points of the polyline - */ points: Base.Point3[]; - /** - * Can contain is closed information - */ isClosed?: boolean; - /** - * Can contain color information - */ color?: string | number[]; } enum solidCornerTypeEnum { - /** - * Edges will meet at a corner - */ edge = "edge", - /** - * Edges will be rounded on the corner - */ round = "round", - /** - * Edges will be chamfered on the corner - */ chamfer = "chamfer" } enum jscadTextAlignEnum { - /** - * Aligns text to the left - */ left = "left", - /** - * Aligns text to the center - */ center = "center", - /** - * Aligns text to the right - */ right = "right" } class MeshDto { constructor(mesh?: JSCADEntity); - /** - * Solid Jscad mesh - */ mesh: JSCADEntity; } class MeshesDto { constructor(meshes?: JSCADEntity[]); - /** - * Solid Jscad mesh - */ meshes: JSCADEntity[]; } class DrawSolidMeshDto { - /** - * Provide options without default values - */ - constructor(mesh?: JSCADEntity, opacity?: number, colours?: string | string[], updatable?: boolean, hidden?: boolean, jscadMesh?: T); - /** - * Solid Jscad mesh - */ + constructor(mesh?: JSCADEntity, opacity?: number, colours?: string | string[], updatable?: boolean, hidden?: boolean, jscadMesh?: T, drawTwoSided?: boolean, backFaceColour?: string, backFaceOpacity?: number); mesh: JSCADEntity; - /** - * Value between 0 and 1 - * @default 1 - * @minimum 0 - * @maximum 1 - * @step 0.1 - */ opacity: number; - /** - * Hex colour string - * @default #444444 - */ colours: string | string[]; - /** - * Indicates wether this solid will be transformed in time - * @default false - */ updatable: boolean; - /** - * Hidden - * @default false - */ hidden: boolean; - /** - * Solid mesh variable in case it already exists and needs updating - * @default undefined - * @optional true - * @ignore true - */ jscadMesh?: T; + drawTwoSided: boolean; + backFaceColour: string; + backFaceOpacity: number; } class DrawSolidMeshesDto { - /** - * Provide options without default values - */ - constructor(meshes?: JSCADEntity[], opacity?: number, colours?: string | string[], updatable?: boolean, hidden?: boolean, jscadMesh?: T); - /** - * Solid Jscad meshes - * @default undefined - * @optional true - */ + constructor(meshes?: JSCADEntity[], opacity?: number, colours?: string | string[], updatable?: boolean, hidden?: boolean, jscadMesh?: T, drawTwoSided?: boolean, backFaceColour?: string, backFaceOpacity?: number); meshes: JSCADEntity[]; - /** - * Value between 0 and 1 - * @default 1 - * @minimum 0 - * @maximum 1 - * @step 0.1 - */ opacity: number; - /** - * Hex colour string - * @default #444444 - */ colours: string | string[]; - /** - * Indicates wether this solid will be transformed in time - * @default false - */ updatable: boolean; - /** - * Should be hidden - * @default false - */ hidden: boolean; - /** - * Solid mesh variable in case it already exists and needs updating - * @default undefined - * @optional true - * @ignore true - */ jscadMesh?: T; + drawTwoSided: boolean; + backFaceColour: string; + backFaceOpacity: number; } class DrawPathDto { - /** - * Provide options without default values - */ constructor(path?: JSCADEntity, colour?: string, opacity?: number, width?: number, updatable?: boolean, pathMesh?: T); - /** - * 2D Path to draw - * @default undefined - */ path: JSCADEntity; - /** - * Colour of the path - * @default #444444 - */ colour: string; - /** - * Opacity of the path - * @default 1 - * @minimum 0 - * @maximum 1 - * @step 0.1 - */ opacity: number; - /** - * Width of the path - * @default 10 - * @minimum 0 - * @maximum Infinity - * @step 1 - */ width: number; - /** - * Indicates wether the path will change in time - * @default false - */ updatable: boolean; - /** - * Path mesh variable that will be updated if updatable property is set to true - * @default undefined - * @optional true - * @ignore true - */ pathMesh?: T; } class TransformSolidsDto { constructor(meshes?: JSCADEntity[], transformation?: Base.TransformMatrixes); - /** - * Solids to be transformed - * @default undefined - */ meshes: JSCADEntity[]; - /** - * Transformation matrix or a list of transformation matrixes - * @default undefined - */ transformation: Base.TransformMatrixes; } class TransformSolidDto { constructor(mesh?: JSCADEntity, transformation?: Base.TransformMatrixes); - /** - * Solid to be transformed - * @default undefined - */ mesh: JSCADEntity; - /** - * Transformation matrix or a list of transformation matrixes - * @default undefined - */ transformation: Base.TransformMatrixes; } class DownloadSolidDto { constructor(mesh?: JSCADEntity, fileName?: string); - /** - * Solid to be downloaded - * @default undefined - */ mesh: JSCADEntity; - /** - * File name - * @default undefined - */ fileName: string; } class DownloadGeometryDto { constructor(geometry?: JSCADEntity | JSCADEntity[], fileName?: string, options?: any); - /** - * Solid or path to be downloaded, also supports multiple geometries in array - * @default undefined - */ geometry: JSCADEntity | JSCADEntity[]; - /** - * File name - * @default jscad-geometry - */ fileName: string; - /** - * Options - * @default undefined - * @optional true - */ options: any; } class DownloadSolidsDto { constructor(meshes?: JSCADEntity[], fileName?: string); - /** - * Solids to be downloaded - * @default undefined - */ meshes: JSCADEntity[]; - /** - * File name - * @default undefined - */ fileName: string; } class ColorizeDto { constructor(geometry?: JSCADEntity, color?: string); - /** - * Solid to be colorized - * @default undefined - */ geometry: JSCADEntity | JSCADEntity[]; - /** - * Hex color string - * @default #0000ff - */ color: string; } class BooleanObjectsDto { constructor(meshes?: JSCADEntity[]); - /** - * Contains solid Jscad mesh objects that will be used to perform boolean operation - * @default undefined - */ meshes: JSCADEntity[]; } class BooleanTwoObjectsDto { constructor(first?: JSCADEntity, second?: JSCADEntity); - /** - * Contains Jscad Solid - * @default undefined - */ first: JSCADEntity; - /** - * Contains Jscad Solid - * @default undefined - */ second: JSCADEntity; } class BooleanObjectsFromDto { constructor(from?: JSCADEntity, meshes?: JSCADEntity[]); - /** - * Contains Jscad Solid - * @default undefined - */ from: JSCADEntity; - /** - * Contains Jscad Solid - * @default undefined - */ meshes: JSCADEntity[]; } class ExpansionDto { constructor(geometry?: JSCADEntity, delta?: number, corners?: solidCornerTypeEnum, segments?: number); - /** - * Can contain various Jscad entities from Solid category - * @default undefined - */ geometry: JSCADEntity; - /** - * Delta (+/-) of expansion - * @default 0.1 - * @minimum -Infinity - * @maximum Infinity - * @step 0.1 - */ delta: number; - /** - * Type of corner to create during of expansion; edge, chamfer, round - * @default edge - */ corners: solidCornerTypeEnum; - /** - * Integer number of segments when creating round corners - * @default 24 - * @minimum 0 - * @maximum Infinity - * @step 1 - */ segments: number; } class OffsetDto { constructor(geometry?: JSCADEntity, delta?: number, corners?: solidCornerTypeEnum, segments?: number); - /** - * Can contain various Jscad entities from Solid category - * @default undefined - */ geometry: JSCADEntity; - /** - * Delta (+/-) of offset - * @default 0.1 - * @minimum -Infinity - * @maximum Infinity - * @step 0.1 - */ delta: number; - /** - * Type of corner to create during the offset; edge, chamfer, round. - * @default edge - */ corners: solidCornerTypeEnum; - /** - * Integer number of segments when creating round corners - * @default 24 - * @minimum 0 - * @maximum Infinity - * @step 1 - */ segments: number; } class ExtrudeLinearDto { constructor(geometry?: JSCADEntity, height?: number, twistAngle?: number, twistSteps?: number); - /** - * Geometry to extrude - * @default undefined - */ geometry: JSCADEntity; - /** - * Height of linear extrude - * @default 1 - * @minimum -Infinity - * @maximum Infinity - * @step 0.1 - */ height: number; - /** - * Twist angle in degrees - * @default 90 - * @minimum -Infinity - * @maximum Infinity - * @step 1 - */ twistAngle: number; - /** - * Number of twist steps - * @default 15 - * @minimum 0 - * @maximum Infinity - * @step 1 - */ twistSteps: number; } class HullDto { constructor(meshes?: JSCADEntity[]); - /** - * Geometries to use in hull - * @default undefined - */ meshes: JSCADEntity[]; } class ExtrudeRectangularDto { constructor(geometry?: JSCADEntity, height?: number, size?: number); - /** - * Geometry to extrude - * @default undefined - */ geometry: JSCADEntity; - /** - * Height of linear extrude - * @default 1 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ height: number; - /** - * Size of the rectangle - * @default 1 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ size: number; } class ExtrudeRectangularPointsDto { constructor(points?: Base.Point3[], height?: number, size?: number); - /** - * Points for a path - * @default undefined - */ points: Base.Point3[]; - /** - * Height of linear extrude - * @default 1 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ height: number; - /** - * Size of the rectangle - * @default 1 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ size: number; } class ExtrudeRotateDto { constructor(polygon?: JSCADEntity, angle?: number, startAngle?: number, segments?: number); - /** - * Polygon to extrude - * @default undefined - */ polygon: JSCADEntity; - /** - * Angle in degrees - * @default 90 - * @minimum -Infinity - * @maximum Infinity - * @step 1 - */ angle: number; - /** - * Start angle in degrees - * @default 0 - * @minimum -Infinity - * @maximum Infinity - * @step 1 - */ startAngle: number; - /** - * Number of segments - * @default 24 - * @minimum 0 - * @maximum Infinity - * @step 1 - */ segments: number; } class PolylineDto { constructor(polyline?: PolylinePropertiesDto); - /** - * Polyline with points - */ polyline: PolylinePropertiesDto; } class CurveDto { constructor(curve?: any); - /** - * Nurbs curve - */ curve: any; } class PointsDto { constructor(points?: Base.Point3[]); - /** - * Points - */ points: Base.Point3[]; } class PathDto { constructor(path?: JSCADEntity); - /** - * 2D path - * @default undefined - */ path: JSCADEntity; } class PathFromPointsDto { constructor(points?: Base.Point2[], closed?: boolean); - /** - * Points through which to create a path - * @default undefined - */ points: Base.Point2[]; - /** - * Indicates wether we want to create a closed path - * @default false - */ closed: boolean; } class PathsFromPointsDto { constructor(pointsLists?: Base.Point3[][] | Base.Point2[][]); - /** - * Points - * @default undefined - */ pointsLists: Base.Point3[][] | Base.Point2[][]; } class PathFromPolylineDto { constructor(polyline?: PolylinePropertiesDto, closed?: boolean); - /** - * Polyline - * @default undefined - */ polyline: PolylinePropertiesDto; - /** - * Indicates wether we want to create a closed path - * @default false - */ closed: boolean; } class PathAppendCurveDto { constructor(curve?: JSCADEntity, path?: JSCADEntity); - /** - * Verb Nurbs curve - * @default undefined - */ curve: JSCADEntity; - /** - * Path to append the curve to - * @default undefined - */ path: JSCADEntity; } class PathAppendPointsDto { constructor(points?: Base.Point2[], path?: JSCADEntity); - /** - * Points to append - * @default undefined - */ points: Base.Point2[]; - /** - * Path to append the points to - * @default undefined - */ path: JSCADEntity; } class PathAppendPolylineDto { constructor(polyline?: PolylinePropertiesDto, path?: JSCADEntity); - /** - * Polyline to append - * @default undefined - */ polyline: PolylinePropertiesDto; - /** - * Path to append the polyline to - * @default undefined - */ path: JSCADEntity; } class PathAppendArcDto { constructor(path?: JSCADEntity, endPoint?: Base.Point2, xAxisRotation?: number, clockwise?: boolean, large?: boolean, segments?: number, radiusX?: number, radiusY?: number); - /** - * Path to append the arc to - * @default undefined - */ path: JSCADEntity; - /** - * End point of an arc - * @default [1, 1] - */ endPoint: Base.Point2; - /** - * Rotation (degrees) of the X axis of the arc with respect to the X axis of the coordinate system - * @default 90 - * @minimum -Infinity - * @maximum Infinity - * @step 1 - */ xAxisRotation: number; - /** - * Draw an arc clockwise with respect to the center point - * @default true - */ clockwise: boolean; - /** - * Draw an arc longer than PI radians - * @default false - */ large: boolean; - /** - * Number of segments for the arc - * @default 24 - * @minimum 0 - * @maximum Infinity - * @step 1 - */ segments: number; - /** - * X radius of an arc - * @default 1 - * @minimum -Infinity - * @maximum Infinity - * @step 0.1 - */ radiusX: number; - /** - * Y radius of an arc - * @default 1 - * @minimum -Infinity - * @maximum Infinity - * @step 0.1 - */ radiusY: number; } class CircleDto { constructor(center?: Base.Point2, radius?: number, segments?: number); - /** - * Center of the circle - * @default [0, 0] - */ center: Base.Point2; - /** - * Radius of the circle - * @default 1 - * @minimum -Infinity - * @maximum Infinity - * @step 0.1 - */ radius: number; - /** - * Segment number - * @default 24 - * @minimum 0 - * @maximum Infinity - * @step 1 - */ segments: number; } class EllipseDto { constructor(center?: Base.Point2, radius?: Base.Point2, segments?: number); - /** - * Center of the circle - * @default [0, 0] - */ center: Base.Point2; - /** - * Radius of the circle in [x, y] form - * @default [1, 2] - */ radius: Base.Point2; - /** - * Segment number - * @default 24 - * @minimum 0 - * @maximum Infinity - * @step 1 - */ segments: number; } class SquareDto { constructor(center?: Base.Point2, size?: number); - /** - * Center of the 2D square - * @default [0, 0] - */ center: Base.Point2; - /** - * Size of the square - * @default 1 - * @minimum -Infinity - * @maximum Infinity - * @step 0.1 - */ size: number; } class RectangleDto { constructor(center?: Base.Point2, width?: number, length?: number); - /** - * Center of the 2D rectangle - * @default [0, 0] - */ center: Base.Point2; - /** - * Width of the rectangle - * @default 1 - * @minimum -Infinity - * @maximum Infinity - * @step 0.1 - */ width: number; - /** - * Length of the rectangle - * @default 1 - * @minimum -Infinity - * @maximum Infinity - * @step 0.1 - */ length: number; } class RoundedRectangleDto { constructor(center?: Base.Point2, roundRadius?: number, segments?: number, width?: number, length?: number); - /** - * Center of the 2D rectangle - * @default [0, 0] - */ center: Base.Point2; - /** - * The radius to round the rectangle edge - * @default 0.2 - * @minimum -Infinity - * @maximum Infinity - * @step 0.1 - */ roundRadius: number; - /** - * Number of segments for corners - * @default 24 - * @minimum 0 - * @maximum Infinity - * @step 1 - */ segments: number; - /** - * Width of the rectangle - * @default 1 - * @minimum -Infinity - * @maximum Infinity - * @step 0.1 - */ width: number; - /** - * Length of the rectangle - * @default 1 - * @minimum -Infinity - * @maximum Infinity - * @step 0.1 - */ length: number; } class StarDto { constructor(center?: Base.Point2, vertices?: number, density?: number, outerRadius?: number, innerRadius?: number, startAngle?: number); - /** - * Center of the 2D star - * @default [0, 0] - */ center: Base.Point2; - /** - * Number of vertices on the star - * @default 10 - * @minimum 0 - * @maximum Infinity - * @step 1 - */ vertices: number; - /** - * Density of the star - * @default 1 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ density: number; - /** - * Outer radius of the star - * @default 2 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ outerRadius: number; - /** - * Inner radius of the star - * @default 1 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ innerRadius: number; - /** - * Starting angle for first vertice, in degrees - * @default 0 - * @minimum -Infinity - * @maximum Infinity - * @step 1 - */ startAngle: number; } class CubeDto { constructor(center?: Base.Point3, size?: number); - /** - * Center coordinates of the cube - * @default [0, 0, 0] - */ center: Base.Point3; - /** - * Size of the cube - * @default 1 - * @minimum -Infinity - * @maximum Infinity - * @step 0.1 - */ size: number; } class CubeCentersDto { constructor(centers?: Base.Point3[], size?: number); - /** - * Center coordinates of the cubes - * @default undefined - */ centers: Base.Point3[]; - /** - * Size of the cube - * @default 1 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ size: number; } class CuboidDto { constructor(center?: Base.Point3, width?: number, length?: number, height?: number); - /** - * Center coordinates of the cubod - * @default [0, 0, 0] - */ center: Base.Point3; - /** - * Width of the cuboid - * @default 1 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ width: number; - /** - * Length of the cuboid - * @default 1 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ length: number; - /** - * Height of the cuboid - * @default 1 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ height: number; } class CuboidCentersDto { constructor(centers?: Base.Point3[], width?: number, length?: number, height?: number); - /** - * Center coordinates of the cuboids - * @default undefined - */ centers: Base.Point3[]; - /** - * Width of the cuboids - * @default 1 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ width: number; - /** - * Length of the cuboids - * @default 1 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ length: number; - /** - * Height of the cuboids - * @default 1 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ height: number; } class RoundedCuboidDto { constructor(center?: Base.Point3, roundRadius?: number, width?: number, length?: number, height?: number, segments?: number); - /** - * Center coordinates of the cubod - * @default [0, 0, 0] - */ center: Base.Point3; - /** - * Radius for rounding edges - * @default 0.1 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ roundRadius: number; - /** - * Width of the cuboid - * @default 1 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ width: number; - /** - * Length of the cuboid - * @default 1 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ length: number; - /** - * Height of the cuboid - * @default 1 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ height: number; - /** - * Segments of rounded edges - * @default 24 - * @minimum 0 - * @maximum Infinity - * @step 1 - */ segments: number; } class RoundedCuboidCentersDto { constructor(centers?: Base.Point3[], roundRadius?: number, width?: number, length?: number, height?: number, segments?: number); - /** - * Center coordinates of the cuboids - * @default undefined - */ centers: Base.Point3[]; - /** - * Radius for rounding edges - * @default 0.1 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ roundRadius: number; - /** - * Width of the cuboids - * @default 1 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ width: number; - /** - * Length of the cuboids - * @default 1 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ length: number; - /** - * Height of the cuboids - * @default 1 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ height: number; - /** - * Segments of rounded edges - * @default 24 - * @minimum 0 - * @maximum Infinity - * @step 1 - */ segments: number; } class CylidnerEllipticDto { constructor(center?: Base.Point3, height?: number, startRadius?: Base.Point2, endRadius?: Base.Point2, segments?: number); - /** - * Center of the cylinder - * @default [0, 0, 0] - */ center: Base.Point3; - /** - * Height of the cylinder - * @default 1 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ height: number; - /** - * Start radius on X and Y directions - * @default [1, 2] - */ startRadius: Base.Vector2; - /** - * End radius on X and Y directions - * @default [2, 3] - */ endRadius: Base.Vector2; - /** - * Subdivision segments - * @default 24 - * @minimum 0 - * @maximum Infinity - * @step 1 - */ segments: number; } class CylidnerCentersEllipticDto { constructor(centers?: Base.Point3[], height?: number, startRadius?: Base.Point2, endRadius?: Base.Point2, segments?: number); - /** - * Centers of the cylinders - * @default undefined - */ centers: Base.Point3[]; - /** - * Height of the cylinders - * @default 1 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ height: number; - /** - * Start radius on X and Y directions - * @default [1, 2] - */ startRadius: Base.Point2; - /** - * End radius on X and Y directions - * @default [2, 3] - */ endRadius: Base.Point2; - /** - * Subdivision segments - * @default 24 - * @minimum 0 - * @maximum Infinity - * @step 1 - */ segments: number; } class CylidnerDto { constructor(center?: Base.Point3, height?: number, radius?: number, segments?: number); - /** - * Center of the cylinder - * @default [0, 0, 0] - */ center: Base.Point3; - /** - * Height of the cylinder - * @default 1 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ height: number; - /** - * Radius of the cylinder - * @default 1 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ radius: number; - /** - * Subdivision segments - * @default 24 - * @minimum 0 - * @maximum Infinity - * @step 1 - */ segments: number; } class RoundedCylidnerDto { constructor(center?: Base.Point3, roundRadius?: number, height?: number, radius?: number, segments?: number); - /** - * Center of the cylinder - * @default [0, 0, 0] - */ center: Base.Point3; - /** - * Rounding radius - * @default 0.1 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ roundRadius: number; - /** - * Height of the cylinder - * @default 1 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ height: number; - /** - * Radius of the cylinder - * @default 1 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ radius: number; - /** - * Segment number - * @default 24 - * @minimum 0 - * @maximum Infinity - * @step 1 - */ segments: number; } class EllipsoidDto { constructor(center?: Base.Point3, radius?: Base.Point3, segments?: number); - /** - * Center coordinates - * @default [0, 0, 0] - */ center: Base.Point3; - /** - * Radius of the ellipsoid in [x, y, z] form - * @default [1, 2, 3] - */ radius: Base.Point3; - /** - * Segment count for ellipsoid - * @default 24 - * @minimum 0 - * @maximum Infinity - * @step 1 - */ segments: number; } class EllipsoidCentersDto { constructor(centers?: Base.Point3[], radius?: Base.Point3, segments?: number); - /** - * Center coordinates - * @default undefined - */ centers: Base.Point3[]; - /** - * Radius of the ellipsoid in [x, y, z] form - * @default [1, 2, 3] - */ radius: Base.Point3; - /** - * Segment count for ellipsoid - * @default 24 - * @minimum 0 - * @maximum Infinity - * @step 1 - */ segments: number; } class GeodesicSphereDto { constructor(center?: Base.Point3, radius?: number, frequency?: number); - /** - * Center coordinate of the geodesic sphere - * @default [0, 0, 0] - */ center: Base.Point3; - /** - * Radius of the sphere - * @default 1 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ radius: number; - /** - * Subdivision count - * @default 12 - * @minimum 0 - * @maximum Infinity - * @step 1 - */ frequency: number; } class GeodesicSphereCentersDto { constructor(centers?: Base.Point3[], radius?: number, frequency?: number); - /** - * Center coordinates of the geodesic spheres - * @default undefined - */ centers: Base.Point3[]; - /** - * Radius of the sphere - * @default 1 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ radius: number; - /** - * Subdivision count - * @default 12 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ frequency: number; } class CylidnerCentersDto { constructor(centers?: Base.Point3[], height?: number, radius?: number, segments?: number); - /** - * Centers of the cylinders - * @default undefined - */ centers: Base.Point3[]; - /** - * Height of the cylinders - * @default 1 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ height: number; - /** - * Radius of the cylinders - * @default 1 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ radius: number; - /** - * Subdivision segments - * @default 24 - * @minimum 0 - * @maximum Infinity - * @step 1 - */ segments: number; } class RoundedCylidnerCentersDto { constructor(centers?: Base.Point3[], roundRadius?: number, height?: number, radius?: number, segments?: number); - /** - * Centers of the cylinders - * @default undefined - */ centers: Base.Point3[]; - /** - * Rounding radius - * @default 0.1 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ roundRadius: number; - /** - * Height of the cylinders - * @default 1 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ height: number; - /** - * Radius of the cylinders - * @default 1 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ radius: number; - /** - * Segment number - * @default 24 - * @minimum 0 - * @maximum Infinity - * @step 1 - */ segments: number; } class SphereDto { constructor(center?: Base.Point3, radius?: number, segments?: number); - /** - * Center point of the sphere - * @default [0, 0, 0] - */ center: Base.Point3; - /** - * Radius of the sphere - * @default 1 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ radius: number; - /** - * Segment count - * @default 24 - * @minimum 0 - * @maximum Infinity - * @step 1 - */ segments: number; } class SphereCentersDto { constructor(centers?: Base.Point3[], radius?: number, segments?: number); - /** - * Center points of the spheres - * @default undefined - */ centers: Base.Point3[]; - /** - * Radius of the spheres - * @default 1 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ radius: number; - /** - * Segment count - * @default 24 - * @minimum 0 - * @maximum Infinity - * @step 1 - */ segments: number; } class TorusDto { constructor(center?: Base.Point3, innerRadius?: number, outerRadius?: number, innerSegments?: number, outerSegments?: number, innerRotation?: number, outerRotation?: number, startAngle?: number); - /** - * Center coordinate - * @default [0, 0, 0] - */ center: Base.Point3; - /** - * Inner radius - * @default 1 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ innerRadius: number; - /** - * Outer radius - * @default 2 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ outerRadius: number; - /** - * Number of inner segments - * @default 24 - * @minimum 0 - * @maximum Infinity - * @step 1 - */ innerSegments: number; - /** - * Number of outer segments - * @default 24 - * @minimum 0 - * @maximum Infinity - * @step 1 - */ outerSegments: number; - /** - * Inner rotation in degrees - * @default 0 - * @minimum -Infinity - * @maximum Infinity - * @step 1 - */ innerRotation: number; - /** - * Outer rotation in degrees - * @default 360 - * @minimum -Infinity - * @maximum Infinity - * @step 1 - */ outerRotation: number; - /** - * Start angle in degrees - * @default 0 - * @minimum -Infinity - * @maximum Infinity - * @step 1 - */ startAngle: number; } class TextDto { constructor(text?: string, segments?: number, xOffset?: number, yOffset?: number, height?: number, lineSpacing?: number, letterSpacing?: number, align?: jscadTextAlignEnum, extrudeOffset?: number); - /** - * Text to write - * @default Hello World - */ text: string; - /** - * Number of segments - * @default 24 - * @minimum 0 - * @maximum Infinity - * @step 1 - */ segments: number; - /** - * X offset of the text - * @default 0 - * @minimum -Infinity - * @maximum Infinity - * @step 0.1 - */ xOffset: number; - /** - * Y offset of the text - * @default 0 - * @minimum -Infinity - * @maximum Infinity - * @step 0.1 - */ yOffset: number; - /** - * Height of the text - * @default 1 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ height: number; - /** - * Space between lines - * @default 1.4 - * @minimum -Infinity - * @maximum Infinity - * @step 0.1 - */ lineSpacing: number; - /** - * Space between letters - * @default 1 - * @minimum -Infinity - * @maximum Infinity - * @step 0.1 - */ letterSpacing: number; - /** - * Align between left, center, right - * @default center - */ align: jscadTextAlignEnum; - /** - * Offset the extrusion - * @default 0 - * @minimum -Infinity - * @maximum Infinity - * @step 0.1 - */ extrudeOffset: number; } class CylinderTextDto { constructor(text?: string, extrusionHeight?: number, extrusionSize?: number, segments?: number, xOffset?: number, yOffset?: number, height?: number, lineSpacing?: number, letterSpacing?: number, align?: jscadTextAlignEnum, extrudeOffset?: number); - /** - * Text to write - * @default Hello World - */ text: string; - /** - * Height of the cylinder - * @default 0.5 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ extrusionHeight: number; - /** - * Radius of the cylinder - * @default 0.1 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ extrusionSize: number; - /** - * Segment subdivision for cylinder - * @default 24 - * @minimum 0 - * @maximum Infinity - * @step 1 - */ segments: number; - /** - * X offset of the text - * @default 0 - * @minimum -Infinity - * @maximum Infinity - * @step 0.1 - */ xOffset: number; - /** - * Y offset of the text - * @default 0 - * @minimum -Infinity - * @maximum Infinity - * @step 0.1 - */ yOffset: number; - /** - * Height of the text - * @default 1 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ height: number; - /** - * Space between lines - * @default 1.4 - * @minimum -Infinity - * @maximum Infinity - * @step 0.1 - */ lineSpacing: number; - /** - * Space between letters - * @default 1 - * @minimum -Infinity - * @maximum Infinity - * @step 0.1 - */ letterSpacing: number; - /** - * Align between left, center, right - * @default center - */ align: jscadTextAlignEnum; - /** - * Offset the extrusion - * @default 0 - * @minimum -Infinity - * @maximum Infinity - * @step 0.1 - */ extrudeOffset: number; } class SphereTextDto { constructor(text?: string, radius?: number, segments?: number, xOffset?: number, yOffset?: number, height?: number, lineSpacing?: number, letterSpacing?: number, align?: jscadTextAlignEnum, extrudeOffset?: number); - /** - * Text to write - * @default Hello World - */ text: string; - /** - * Radius of the spheres - * @default 0.1 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ radius: number; - /** - * Segment subdivision for sphere - * @default 24 - * @minimum 0 - * @maximum Infinity - * @step 1 - */ segments: number; - /** - * X offset of the text - * @default 0 - * @minimum -Infinity - * @maximum Infinity - * @step 0.1 - */ xOffset: number; - /** - * Y offset of the text - * @default 0 - * @minimum -Infinity - * @maximum Infinity - * @step 0.1 - */ yOffset: number; - /** - * Height of the text - * @default 1 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ height: number; - /** - * Space between lines - * @default 1.4 - * @minimum -Infinity - * @maximum Infinity - * @step 0.1 - */ lineSpacing: number; - /** - * Space between letters - * @default 1 - * @minimum -Infinity - * @maximum Infinity - * @step 0.1 - */ letterSpacing: number; - /** - * Align between left, center, right - * @default center - */ align: jscadTextAlignEnum; - /** - * Offset the extrusion - * @default 0 - * @minimum -Infinity - * @maximum Infinity - * @step 0.1 - */ extrudeOffset: number; } class FromPolygonPoints { constructor(polygonPoints?: Base.Point3[][]); - /** - * Points describing polygons - */ polygonPoints?: Base.Point3[][]; } } @@ -1787,10 +603,24 @@ declare namespace Bit { g: number; b: number; }; - type Point2 = [number, number]; - type Vector2 = [number, number]; - type Point3 = [number, number, number]; - type Vector3 = [number, number, number]; + type Point2 = [ + number, + number + ]; + type Vector2 = [ + number, + number + ]; + type Point3 = [ + number, + number, + number + ]; + type Vector3 = [ + number, + number, + number + ]; type Axis3 = { origin: Base.Point3; direction: Base.Vector3; @@ -1799,13 +629,23 @@ declare namespace Bit { origin: Base.Point2; direction: Base.Vector2; }; - type Segment2 = [Point2, Point2]; - type Segment3 = [Point3, Point3]; + type Segment2 = [ + Point2, + Point2 + ]; + type Segment3 = [ + Point3, + Point3 + ]; type TrianglePlane3 = { normal: Vector3; d: number; }; - type Triangle3 = [Base.Point3, Base.Point3, Base.Point3]; + type Triangle3 = [ + Base.Point3, + Base.Point3, + Base.Point3 + ]; type Mesh3 = Triangle3[]; type Plane3 = { origin: Base.Point3; @@ -1842,11 +682,39 @@ declare namespace Bit { type VerbSurface = { tessellate: (options: any) => any; }; - type TransformMatrix3x3 = [number, number, number, number, number, number, number, number, number]; + type TransformMatrix3x3 = [ + number, + number, + number, + number, + number, + number, + number, + number, + number + ]; type TransformMatrixes3x3 = TransformMatrix3x3[]; - type TransformMatrix = [number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number]; + type TransformMatrix = [ + number, + number, + number, + number, + number, + number, + number, + number, + number, + number, + number, + number, + number, + number, + number, + number + ]; type TransformMatrixes = TransformMatrix[]; - } declare namespace Manifold { + } + declare namespace Manifold { type ManifoldPointer = { hash: number; type: string; @@ -1868,7 +736,8 @@ declare namespace Bit { enum manifoldJoinTypeEnum { square = "Square", round = "Round", - miter = "Miter" + miter = "Miter", + bevel = "Bevel" } class DecomposedManifoldMeshDto { numProp: number; @@ -1883,1120 +752,395 @@ declare namespace Bit { halfedgeTangent?: Float32Array; } class DrawManifoldOrCrossSectionDto { - /** - * Provide options without default values - */ - constructor(manifoldOrCrossSection?: T, faceOpacity?: number, faceMaterial?: M, faceColour?: Base.Color, crossSectionColour?: Base.Color, crossSectionWidth?: number, crossSectionOpacity?: number, computeNormals?: boolean); - /** - * Manifold geometry - * @default undefined - */ + constructor(manifoldOrCrossSection?: T, faceOpacity?: number, faceMaterial?: M, faceColour?: Base.Color, crossSectionColour?: Base.Color, crossSectionWidth?: number, crossSectionOpacity?: number, computeNormals?: boolean, drawTwoSided?: boolean, backFaceColour?: Base.Color, backFaceOpacity?: number); manifoldOrCrossSection?: T; - /** - * Face opacity value between 0 and 1 - * @default 1 - * @minimum 0 - * @maximum 1 - * @step 0.1 - */ faceOpacity: number; - /** - * Face material - * @default undefined - * @optional true - */ faceMaterial?: M; - /** - * Hex colour string for face colour - * @default #ff0000 - */ faceColour: Base.Color; - /** - * Hex colour string for cross section drawing - * @default #ff00ff - */ crossSectionColour: Base.Color; - /** - * Width of cross section lines - * @default 2 - */ crossSectionWidth: number; - /** - * Cross section opacity value between 0 and 1 - * @default 1 - * @minimum 0 - * @maximum 1 - * @step 0.1 - */ crossSectionOpacity: number; - /** - * Compute normals for the shape - * @default false - */ computeNormals: boolean; + drawTwoSided: boolean; + backFaceColour: Base.Color; + backFaceOpacity: number; } class DrawManifoldsOrCrossSectionsDto { - /** - * Provide options without default values - */ - constructor(manifoldsOrCrossSections?: T[], faceOpacity?: number, faceMaterial?: M, faceColour?: Base.Color, crossSectionColour?: Base.Color, crossSectionWidth?: number, crossSectionOpacity?: number, computeNormals?: boolean); - /** - * Manifold geometry - * @default undefined - */ + constructor(manifoldsOrCrossSections?: T[], faceOpacity?: number, faceMaterial?: M, faceColour?: Base.Color, crossSectionColour?: Base.Color, crossSectionWidth?: number, crossSectionOpacity?: number, computeNormals?: boolean, drawTwoSided?: boolean, backFaceColour?: Base.Color, backFaceOpacity?: number); manifoldsOrCrossSections?: T[]; - /** - * Face material - * @default undefined - * @optional true - */ faceMaterial?: M; - /** - * Hex colour string for face colour - * @default #ff0000 - */ faceColour: Base.Color; - /** - * Face opacity value between 0 and 1 - * @default 1 - * @minimum 0 - * @maximum 1 - * @step 0.1 - */ faceOpacity: number; - /** - * Hex colour string for cross section drawing - * @default #ff00ff - */ crossSectionColour: Base.Color; - /** - * Width of cross section lines - * @default 2 - */ crossSectionWidth: number; - /** - * Cross section opacity value between 0 and 1 - * @default 1 - * @minimum 0 - * @maximum 1 - * @step 0.1 - */ crossSectionOpacity: number; - /** - * Compute normals for the shape - * @default false - */ computeNormals: boolean; + drawTwoSided: boolean; + backFaceColour: Base.Color; + backFaceOpacity: number; } class CreateFromMeshDto { constructor(mesh?: DecomposedManifoldMeshDto); - /** - * Mesh definition - */ mesh: DecomposedManifoldMeshDto; } class FromPolygonPointsDto { constructor(polygonPoints?: Base.Point3[][]); - /** - * Points describing polygons - */ polygonPoints?: Base.Point3[][]; } + class CrossSectionFromPolygonPointsDto { + constructor(points?: Base.Point3[], fillRule?: fillRuleEnum, removeDuplicates?: boolean, tolerance?: number); + points: Base.Point3[]; + fillRule?: fillRuleEnum; + removeDuplicates?: boolean; + tolerance?: number; + } + class CrossSectionFromPolygonsPointsDto { + constructor(polygonPoints?: Base.Point3[][], fillRule?: fillRuleEnum, removeDuplicates?: boolean, tolerance?: number); + polygonPoints: Base.Point3[][]; + fillRule?: fillRuleEnum; + removeDuplicates?: boolean; + tolerance?: number; + } class CubeDto { constructor(center?: boolean, size?: number); - /** - * Place cube on the center - * @default true - */ center: boolean; - /** - * Size of the cube - * @default 1 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ size: number; } class CreateContourSectionDto { constructor(polygons?: Base.Vector2[][], fillRule?: fillRuleEnum); - /** - * Polygons to use for the contour section - * @default undefined - */ polygons: Base.Vector2[][]; - /** - * Fill rule for the contour section - * @default EvenOdd - */ fillRule: fillRuleEnum; } class SquareDto { constructor(center?: boolean, size?: number); - /** - * Place cube on the center - * @default false - */ center: boolean; - /** - * Size of the cube - * @default 1 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ size: number; } class SphereDto { constructor(radius?: number, circularSegments?: number); - /** - * Radius of the sphere - * @default 1 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ radius: number; - /** - * Circular segments of the sphere - * @default 32 - * @minimum 0 - * @maximum Infinity - * @step 1 - */ circularSegments: number; } class CylinderDto { constructor(height?: number, radiusLow?: number, radiusHigh?: number, circularSegments?: number, center?: boolean); - /** - * Height of the cylinder - * @default 1 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ height: number; - /** - * Radius of the cylinder - * @default 1 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ radiusLow: number; - /** - * Radius of the cylinder - * @default 1 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ radiusHigh: number; - /** - * Circular segments of the cylinder - * @default 32 - * @minimum 0 - * @maximum Infinity - * @step 1 - */ circularSegments: number; - /** - * Place cylinder on the center - * @default true - */ center: boolean; } class CircleDto { constructor(radius?: number, circularSegments?: number); - /** - * Radius of the cylinder - * @default 1 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ radius: number; - /** - * Circular segments of the cylinder - * @default 32 - * @minimum 0 - * @maximum Infinity - * @step 1 - */ circularSegments: number; } class RectangleDto { constructor(length?: number, height?: number, center?: boolean); - /** - * Length of the rectangle - * @default 1 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ length: number; - /** - * Height of the rectangle - * @default 1 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ height: number; - /** - * Place rectangle on the center - * @default false - */ center: boolean; } class ManifoldDto { constructor(manifold?: T); - /** - * Manifold shape - */ manifold: T; } class CalculateNormalsDto { constructor(manifold?: T, normalIdx?: number, minSharpAngle?: number); - /** - * Manifold shape - */ manifold: T; - /** - * The property channel in which to store the X - * values of the normals. The X, Y, and Z channels will be sequential. The - * property set will be automatically expanded to include up through normalIdx - * + 2. - * @default 0 - * @minimum 0 - * @maximum Infinity - * @step 1 - */ normalIdx: number; - /** - * Any edges with angles greater than this value will - * remain sharp, getting different normal vector properties on each side of - * the edge. By default, no edges are sharp and all normals are shared. With a - * value of zero, the model is faceted and all normals match their triangle - * normals, but in this case it would be better not to calculate normals at - * all. The value is in degrees. - * @default 0 - * @minimum 0 - * @maximum Infinity - * @step 1 - */ minSharpAngle: number; } class CalculateCurvatureDto { constructor(manifold?: T); - /** - * Manifold shape - */ manifold: T; - /** - * The property channel index in which to store the - * Gaussian curvature. An index < 0 will be ignored (stores nothing). The - * property set will be automatically expanded to include the channel - * index specified. - * @default 0 - * @minimum 0 - * @maximum Infinity - * @step 1 - */ gaussianIdx: number; - /** - * The property channel index in which to store the mean - * curvature. An index < 0 will be ignored (stores nothing). The property - * set will be automatically expanded to include the channel index - * specified. The mean curvature is a scalar value that describes the - * @default 1 - * @minimum 0 - * @maximum Infinity - * @step 1 - */ meanIdx: number; } class CountDto { constructor(count?: number); - /** - * Nr to count - */ count: number; } class ManifoldsMinGapDto { constructor(manifold1?: T, manifold2?: T, searchLength?: number); - /** - * Manifold shape - */ manifold1: T; - /** - * Manifold shape - */ manifold2: T; - /** - * Length of the search gap - * @default 100 - * @minimum 0 - * @maximum Infinity - * @step 10 - */ searchLength: number; } class ManifoldRefineToleranceDto { constructor(manifold?: T, tolerance?: number); - /** - * Manifold shape - */ manifold: T; - /** - * The desired maximum distance between the faceted mesh - * produced and the exact smoothly curving surface. All vertices are exactly - * on the surface, within rounding error. - * @default 1e-6 - * @minimum 0 - * @maximum Infinity - * @step 1e-7 - */ tolerance: number; } class ManifoldRefineLengthDto { constructor(manifold?: T, length?: number); - /** - * Manifold shape - */ manifold: T; - /** - * Length of the manifold - * @default 0.1 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ length: number; } class ManifoldRefineDto { constructor(manifold?: T, number?: number); - /** - * Manifold shape - */ manifold: T; - /** - * The number of pieces to split every edge into. Must be > 1. - * @default 1 - * @minimum 0 - * @maximum Infinity - * @step 1 - */ number: number; } class ManifoldSmoothByNormalsDto { constructor(manifold?: T, normalIdx?: number); - /** - * Manifold shape - */ manifold: T; - /** - * The first property channel of the normals. NumProp must be - * at least normalIdx + 3. Any vertex where multiple normals exist and don't - * agree will result in a sharp edge. - * @default 0 - * @minimum 0 - * @maximum Infinity - * @step 1 - */ normalIdx: number; } + class ManifoldSimplifyDto { + constructor(manifold?: T, tolerance?: number); + manifold: T; + tolerance?: number; + } + class ManifoldSetPropertiesDto { + constructor(manifold?: T, numProp?: number, propFunc?: (newProp: number[], position: Base.Vector3, oldProp: number[]) => void); + manifold: T; + numProp: number; + propFunc: (newProp: number[], position: Base.Vector3, oldProp: number[]) => void; + } class ManifoldSmoothOutDto { constructor(manifold?: T, minSharpAngle?: number, minSmoothness?: number); - /** - * Manifold shape - */ manifold: T; - /** - * Any edges with angles greater - * than this value will remain sharp. The rest will be smoothed to G1 - * continuity, with the caveat that flat faces of three or more triangles will - * always remain flat. With a value of zero, the model is faceted, but in this - * case there is no point in smoothing. - * @default 60 - * @minimum -Infinity - * @maximum Infinity - * @step 1 - */ minSharpAngle: number; - /** - * The smoothness applied to - * sharp angles. The default gives a hard edge, while values > 0 will give a - * small fillet on these sharp edges. A value of 1 is equivalent to a - * minSharpAngle of 180 - all edges will be smooth. - * @default 0 - * @minimum 0 - * @maximum 1 - * @step 0.1 - */ minSmoothness: number; } class HullPointsDto { constructor(points?: T); - /** - * Points to hull - */ points: T; } class SliceDto { constructor(manifold?: T); - /** - * Manifold shape - */ manifold: T; - /** - * Height of the slice - * @default 0.5 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ height: number; } class MeshDto { constructor(mesh?: T); - /** - * Mesh - */ mesh: T; } class MeshVertexIndexDto { constructor(mesh?: T, vertexIndex?: number); - /** - * Mesh - */ mesh: T; - /** - * Vertex index - * @default 0 - * @minimum 0 - * @maximum Infinity - * @step 1 - */ vertexIndex: number; } class MeshTriangleRunIndexDto { constructor(mesh?: T, triangleRunIndex?: number); - /** - * Mesh - */ mesh: T; - /** - * Triangle run index - * @default 0 - * @minimum 0 - * @maximum Infinity - * @step 1 - */ triangleRunIndex: number; } class MeshHalfEdgeIndexDto { constructor(mesh?: T, halfEdgeIndex?: number); - /** - * Mesh - */ mesh: T; - /** - * Half edge index - * @default 0 - * @minimum 0 - * @maximum Infinity - * @step 1 - */ halfEdgeIndex: number; } class MeshTriangleIndexDto { constructor(mesh?: T, triangleIndex?: number); - /** - * Mesh - */ mesh: T; - /** - * Triangle index - * @default 0 - * @minimum 0 - * @maximum Infinity - * @step 1 - */ triangleIndex: number; } class CrossSectionDto { constructor(crossSection?: T); - /** - * Cross section - */ crossSection: T; } class CrossSectionsDto { constructor(crossSections?: T[]); - /** - * Cross sections - */ crossSections: T[]; } class ExtrudeDto { constructor(crossSection?: T); - /** - * Extrude cross section shape - */ crossSection: T; - /** - * Height of the extrusion - * @default 1 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ height: number; - /** - * Number of divisions - * @default 1 - * @minimum 0 - * @maximum Infinity - * @step 1 - */ nDivisions: number; - /** - * Twist degrees - * @default 0 - * @minimum -Infinity - * @maximum Infinity - * @step 1 - */ twistDegrees: number; - /** - * Scale top - * @default 1 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ scaleTopX: number; - /** - * Scale top - * @default 1 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ scaleTopY: number; - /** - * Center the extrusion - * @default true - */ center: boolean; } class RevolveDto { constructor(crossSection?: T, revolveDegrees?: number, matchProfile?: boolean, circularSegments?: number); - /** - * Revolve cross section shape - */ crossSection: T; - /** - * Extrude cross section shape - * @default 360 - * @minimum 0 - * @maximum Infinity - * @step 1 - */ revolveDegrees: number; - /** - * Default manifold library will adjust profile when generating revolved shape. We prefer it to be matching the profile by default. Set to false to use default manifold library behavior. - * @default true - */ matchProfile: boolean; - /** - * Circular segments - * @default 32 - * @minimum 0 - * @maximum Infinity - * @step 1 - */ circularSegments: number; } class OffsetDto { constructor(crossSection?: T, delta?: number, joinType?: manifoldJoinTypeEnum, miterLimit?: number, circularSegments?: number); - /** - * Revolve cross section shape - */ crossSection: T; - /** - * Positive deltas will cause the expansion of outlining contours - * to expand, and retraction of inner (hole) contours. Negative deltas will - * have the opposite effect. - * @default 1 - * @minimum -Infinity - * @maximum Infinity - * @step 0.1 - */ delta: number; - /** - * The join type specifying the treatment of contour joins - * (corners). - * @default round - */ joinType: manifoldJoinTypeEnum; - /** - * The maximum distance in multiples of delta that vertices - * can be offset from their original positions with before squaring is - * applied, **when the join type is Miter** (default is 2, which is the - * minimum allowed). See the [Clipper2 - * MiterLimit](http://www.angusj.com/clipper2/Docs/Units/Clipper.Offset/Classes/ClipperOffset/Properties/MiterLimit.htm) - * page for a visual example. - * @default 2 - * @minimum 2 - * @maximum Infinity - * @step 0.1 - */ miterLimit: number; - /** - * Number of segments per 360 degrees of - * JoinType::Round corners (roughly, the number of vertices that - * will be added to each contour). Default is calculated by the static Quality - * defaults according to the radius. - * @default 32 - * @minimum 0 - * @maximum Infinity - * @step 1 - */ circularSegments: number; } class SimplifyDto { constructor(crossSection?: T, epsilon?: number); - /** - * Revolve cross section shape - */ crossSection: T; - /** - * Extrude cross section shape - * @default 1e-6 - * @minimum 0 - * @maximum Infinity - * @step 1e-7 - */ epsilon: number; } class ComposeDto { constructor(polygons?: T); - /** - * Polygons to compose - */ polygons: T; } class MirrorCrossSectionDto { constructor(crossSection?: T, normal?: Base.Vector2); - /** - * Manifold shape - */ crossSection: T; - /** - * The normal vector of the plane to be mirrored over - * @default [1,0] - */ normal: Base.Vector2; } class Scale2DCrossSectionDto { constructor(crossSection?: T, vector?: Base.Vector2); - /** - * Manifold shape - */ crossSection: T; - /** - * The normal vector of the plane to be mirrored over - * @default [2,2] - */ vector: Base.Vector2; } class TranslateCrossSectionDto { constructor(crossSection?: T, vector?: Base.Vector2); - /** - * Manifold shape - */ crossSection: T; - /** - * The translation vector - * @default undefined - */ vector: Base.Vector2; } class RotateCrossSectionDto { constructor(crossSection?: T, degrees?: number); - /** - * Manifold shape - */ crossSection: T; - /** - * The rotation vector in eulers - * @default 45 - * @minimum -Infinity - * @maximum Infinity - * @step 1 - */ degrees: number; } class ScaleCrossSectionDto { constructor(crossSection?: T, factor?: number); - /** - * Manifold shape - */ crossSection: T; - /** - * The normal vector of the plane to be mirrored over - * @default 2 - */ factor: number; } class TranslateXYCrossSectionDto { constructor(crossSection?: T, x?: number, y?: number); - /** - * Manifold shape - */ crossSection: T; - /** - * The translation X axis - * @default 0 - * @minimum -Infinity - * @maximum Infinity - * @step 1 - */ x: number; - /** - * The translation Y axis - * @default 0 - * @minimum -Infinity - * @maximum Infinity - * @step 1 - */ y: number; } class TransformCrossSectionDto { constructor(crossSection?: T, transform?: Base.TransformMatrix3x3); - /** - * Cross section - */ crossSection: T; - /** - * The transform matrix to apply - * @default undefined - */ transform: Base.TransformMatrix3x3; } + class CrossSectionWarpDto { + constructor(crossSection?: T, warpFunc?: (vert: Base.Vector2) => void); + crossSection: T; + warpFunc: (vert: Base.Vector2) => void; + } class MirrorDto { constructor(manifold?: T, normal?: Base.Vector3); - /** - * Manifold shape - */ manifold: T; - /** - * The normal vector of the plane to be mirrored over - * @default [1,0,0] - */ normal: Base.Vector3; } class Scale3DDto { constructor(manifold?: T, vector?: Base.Vector3); - /** - * Manifold shape - */ manifold: T; - /** - * The normal vector of the plane to be mirrored over - * @default [2,2,2] - */ vector: Base.Vector3; } class TranslateDto { constructor(manifold?: T, vector?: Base.Vector3); - /** - * Manifold shape - */ manifold: T; - /** - * The translation vector - * @default undefined - */ vector: Base.Vector3; } class TranslateByVectorsDto { constructor(manifold?: T, vectors?: Base.Vector3[]); - /** - * Manifold shape - */ manifold: T; - /** - * The translation vector - * @default undefined - */ vectors: Base.Vector3[]; } class RotateDto { constructor(manifold?: T, vector?: Base.Vector3); - /** - * Manifold shape - */ manifold: T; - /** - * The rotation vector in eulers - * @default undefined - */ vector: Base.Vector3; } class RotateXYZDto { constructor(manifold?: T, x?: number, y?: number, z?: number); - /** - * Manifold shape - */ manifold: T; - /** - * The rotation vector in eulers on X axis - * @default 0 - * @minimum -Infinity - * @maximum Infinity - * @step 1 - */ x: number; - /** - * The rotation vector in eulers on Y axis - * @default 0 - * @minimum -Infinity - * @maximum Infinity - * @step 1 - */ y: number; - /** - * The rotation vector in eulers on Z axis - * @default 0 - * @minimum -Infinity - * @maximum Infinity - * @step 1 - */ z: number; } class ScaleDto { constructor(manifold?: T, factor?: number); - /** - * Manifold shape - */ manifold: T; - /** - * The normal vector of the plane to be mirrored over - * @default 2 - */ factor: number; } class TranslateXYZDto { constructor(manifold?: T, x?: number, y?: number, z?: number); - /** - * Manifold shape - */ manifold: T; - /** - * The translation X axis - * @default 0 - * @minimum -Infinity - * @maximum Infinity - * @step 1 - */ x: number; - /** - * The translation Y axis - * @default 0 - * @minimum -Infinity - * @maximum Infinity - * @step 1 - */ y: number; - /** - * The translation Z axis - * @default 0 - * @minimum -Infinity - * @maximum Infinity - * @step 1 - */ z: number; } class TransformDto { constructor(manifold?: T, transform?: Base.TransformMatrix); - /** - * Manifold shape - */ manifold: T; - /** - * The transform matrix to apply - * @default undefined - */ transform: Base.TransformMatrix; } class TransformsDto { constructor(manifold?: T, transforms?: Base.TransformMatrixes); - /** - * Manifold shape - */ manifold: T; - /** - * The transform matrixes to apply - * @default undefined - */ transforms: Base.TransformMatrixes; } + class ManifoldWarpDto { + constructor(manifold?: T, warpFunc?: (vert: Base.Vector3) => void); + manifold: T; + warpFunc: (vert: Base.Vector3) => void; + } class TwoCrossSectionsDto { constructor(crossSection1?: T, crossSection2?: T); - /** - * Manifold shape - */ crossSection1: T; - /** - * Manifold shape - */ crossSection2: T; } class TwoManifoldsDto { constructor(manifold1?: T, manifold2?: T); - /** - * Manifold shape - */ manifold1: T; - /** - * Manifold shape - */ manifold2: T; } class SplitManifoldsDto { constructor(manifoldToSplit?: T, manifoldCutter?: T); - /** - * Manifold that will be split - */ manifoldToSplit: T; - /** - * Manifold cutter - */ manifoldCutter: T; } class TrimByPlaneDto { constructor(manifold?: T, normal?: Base.Vector3, originOffset?: number); - /** - * Manifold that will be trimmed - */ manifold: T; - /** - * The normal vector of the plane to be mirrored over - * @default [1,0,0] - */ normal: Base.Vector3; - /** - * The offset from the origin - * @default 0 - * @minimum -Infinity - * @maximum Infinity - * @step 0.1 - */ originOffset: number; } class SplitByPlaneDto { constructor(manifold?: T, normal?: Base.Vector3, originOffset?: number); - /** - * Manifold that will be split - */ manifold: T; - /** - * The normal vector of the plane to be mirrored over - * @default [1,0,0] - */ normal: Base.Vector3; - /** - * The offset from the origin - * @default 0 - * @minimum -Infinity - * @maximum Infinity - * @step 0.1 - */ originOffset: number; } class SplitByPlaneOnOffsetsDto { constructor(manifold?: T, normal?: Base.Vector3, originOffsets?: number[]); - /** - * Manifold that will be split - */ manifold: T; - /** - * The normal vector of the plane to be mirrored over - * @default [1,0,0] - */ normal: Base.Vector3; - /** - * The offsets from the origin - * @default [0] - */ originOffsets: number[]; } class ManifoldsDto { constructor(manifolds?: T[]); - /** - * Manifolds - */ manifolds: T[]; } class ManifoldToMeshDto { constructor(manifold?: T, normalIdx?: number); - /** - * Manifold shape - */ manifold: T; - /** - * Optional normal index - */ normalIdx?: number; } class ManifoldsToMeshesDto { constructor(manifolds?: T[], normalIdx?: number[]); - /** - * Manifold shape - */ manifolds: T[]; - /** - * Optional normal indexes - */ normalIdx?: number[]; } class DecomposeManifoldOrCrossSectionDto { constructor(manifoldOrCrossSection?: T, normalIdx?: number); - /** - * Manifold shape - */ manifoldOrCrossSection: T; - /** - * Optional normal index - */ normalIdx?: number; } class ManifoldOrCrossSectionDto { constructor(manifoldOrCrossSection?: T); - /** - * Manifold or cross section - */ manifoldOrCrossSection: T; } class ManifoldsOrCrossSectionsDto { constructor(manifoldsOrCrossSections?: T[]); - /** - * Manifolds or cross sections - */ manifoldsOrCrossSections: T[]; } class DecomposeManifoldsOrCrossSectionsDto { constructor(manifoldsOrCrossSections?: T[], normalIdx?: number[]); - /** - * Manifold shape - */ manifoldsOrCrossSections: T[]; - /** - * Optional normal indexes - */ normalIdx?: number[]; } } @@ -3157,19 +1301,22 @@ declare namespace Bit { isGuidePlanWithContact = "isGuidePlanWithContact", isDiscreteTrihedron = "isDiscreteTrihedron" } + enum dxfColorFormatEnum { + aci = "aci", + truecolor = "truecolor" + } + enum dxfAcadVersionEnum { + AC1009 = "AC1009", + AC1015 = "AC1015" + } + enum dimensionEndTypeEnum { + none = "none", + arrow = "arrow" + } class DecomposedMeshDto { constructor(faceList?: DecomposedFaceDto[], edgeList?: DecomposedEdgeDto[]); - /** - * Face list for decomposed faces - */ faceList: DecomposedFaceDto[]; - /** - * Edge list for decomposed edges - */ edgeList: DecomposedEdgeDto[]; - /** - * The points list in a shape that includes vertex shapes - */ pointsList: Base.Point3[]; } class DecomposedFaceDto { @@ -3190,6278 +1337,1877 @@ declare namespace Bit { } class ShapesDto { constructor(shapes?: T[]); - /** - * The OCCT shapes - * @default undefined - */ shapes: T[]; } class PointDto { constructor(point?: Base.Point3); - /** - * The point - * @default [0, 0, 0] - */ point: Base.Point3; } class XYZDto { constructor(x?: number, y?: number, z?: number); - /** - * X coord - * @default 0 - * @minimum -Infinity - * @maximum Infinity - * @step 0.1 - */ x: number; - /** - * Y coord - * @default 0 - * @minimum -Infinity - * @maximum Infinity - * @step 0.1 - */ y: number; - /** - * Z coord - * @default 0 - * @minimum -Infinity - * @maximum Infinity - * @step 0.1 - */ z: number; } class PointsDto { constructor(points?: Base.Point3[]); - /** - * The point - * @default undefined - */ points: Base.Point3[]; } class ConstraintTanLinesFromPtToCircleDto { constructor(circle?: T, point?: Base.Point3, tolerance?: number, positionResult?: positionResultEnum, circleRemainder?: circleInclusionEnum); - /** - * The circle for tangent points - * @default undefined - */ circle: T; - /** - * The point from which to find the lines - * @default undefined - */ point: Base.Point3; - /** - * tolerance - * @default 1e-7 - * @minimum 0 - * @maximum Infinity - * @step 0.00001 - */ tolerance: number; - /** - * Filters resulting lines by position - * @default all - */ positionResult: positionResultEnum; - /** - * Splits provided circle on tangent points and adds it to the solutions - * This only works when number of solutions contains 2 lines, when solution involves more than 4 lines, this option will be ignored. - * @default none - */ circleRemainder: circleInclusionEnum; } class ConstraintTanLinesFromTwoPtsToCircleDto { constructor(circle?: T, point1?: Base.Point3, point2?: Base.Point3, tolerance?: number, positionResult?: positionResultEnum, circleRemainder?: circleInclusionEnum); - /** - * The circle for tangent points - * @default undefined - */ circle: T; - /** - * The point from which to find the lines - * @default undefined - */ point1: Base.Point3; - /** - * The point from which to find the lines - * @default undefined - */ point2: Base.Point3; - /** - * tolerance - * @default 1e-7 - * @minimum 0 - * @maximum Infinity - * @step 0.00001 - */ tolerance: number; - /** - * Filters resulting lines by position - * @default all - */ positionResult: positionResultEnum; - /** - * Splits provided circle on tangent points and adds it to the solutions - * This only works when number of solutions contains 2 lines, when solution involves more than 4 lines, this option will be ignored. - * @default none - */ circleRemainder: circleInclusionEnum; } class ConstraintTanLinesOnTwoCirclesDto { constructor(circle1?: T, circle2?: T, tolerance?: number, positionResult?: positionResultEnum, circleRemainders?: twoCircleInclusionEnum); - /** - * The first circle for tangential lines - * @default undefined - */ circle1: T; - /** - * The second circle for tangential lines - * @default undefined - */ circle2: T; - /** - * tolerance - * @default 1e-7 - * @minimum 0 - * @maximum Infinity - * @step 0.00001 - */ tolerance: number; - /** - * Filters resulting lines by position relative to circles - * @default all - */ positionResult: positionResultEnum; - /** - * Splits provided circles on tangent points and returns those as part of the solutions - * This only works when number of solutions is limited to 2 lines, when solution involves more than 4 lines, this option will be ignored. - * @default none - */ circleRemainders: twoCircleInclusionEnum; } class ConstraintTanCirclesOnTwoCirclesDto { constructor(circle1?: T, circle2?: T, tolerance?: number, radius?: number); - /** - * The first circle for tangential lines - * @default undefined - */ circle1: T; - /** - * The second circle for tangential lines - * @default undefined - */ circle2: T; - /** - * tolerance - * @default 1e-7 - * @minimum 0 - * @maximum Infinity - * @step 0.00001 - */ tolerance: number; - /** - * Radius of the circles being constructed - * @default 0.3 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ radius: number; } class ConstraintTanCirclesOnCircleAndPntDto { constructor(circle?: T, point?: Base.Point3, tolerance?: number, radius?: number); - /** - * The first circle for tangential lines - * @default undefined - */ circle: T; - /** - * The second circle for tangential lines - * @default undefined - */ point: Base.Point3; - /** - * tolerance - * @default 1e-7 - * @minimum 0 - * @maximum Infinity - * @step 0.00001 - */ tolerance: number; - /** - * Radius of the circles being constructed - * @default 0.3 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ radius: number; } class CurveAndSurfaceDto { constructor(curve?: T, surface?: U); - /** - * Curve - * @default undefined - */ curve: T; - /** - * Surface - * @default undefined - */ surface: U; } class FilletTwoEdgesInPlaneDto { constructor(edge1?: T, edge2?: T, planeOrigin?: Base.Point3, planeDirection?: Base.Vector3, radius?: number, solution?: number); - /** - * First OCCT edge to fillet - * @default undefined - */ edge1: T; - /** - * Second OCCT edge to fillet - * @default undefined - */ edge2: T; - /** - * Plane origin that is also used to find the closest solution if two solutions exist. - * @default [0, 0, 0] - */ planeOrigin: Base.Point3; - /** - * Plane direction for fillet - * @default [0, 1, 0] - */ planeDirection: Base.Vector3; - /** - * Radius of the fillet - * @default 0.3 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ radius: number; - /** - * if solution is -1 planeOrigin chooses a particular fillet in case of several fillets may be constructed (for example, a circle intersecting a segment in 2 points). Put the intersecting (or common) point of the edges - * @default -1 - * @optional true - */ solution?: number; } class ClosestPointsOnShapeFromPointsDto { constructor(shape?: T, points?: Base.Point3[]); - /** - * The OCCT shape - * @default undefined - */ shape: T; - /** - * The list of points - * @default undefined - */ points: Base.Point3[]; } class BoundingBoxDto { constructor(bbox?: BoundingBoxPropsDto); - /** - * Bounding box - * @default undefined - */ bbox?: BoundingBoxPropsDto; } class BoundingBoxPropsDto { constructor(min?: Base.Point3, max?: Base.Point3, center?: Base.Point3, size?: Base.Vector3); - /** - * Minimum point of the bounding box - * @default [0, 0, 0] - */ min: Base.Point3; - /** - * Maximum point of the bounding box - * @default [0, 0, 0] - */ max: Base.Point3; - /** - * Center point of the bounding box - * @default [0, 0, 0] - */ center: Base.Point3; - /** - * Size of the bounding box - * @default [0, 0, 0] - */ size: Base.Vector3; } class BoundingSpherePropsDto { constructor(center?: Base.Point3, radius?: number); - /** - * Center point of the bounding box - * @default [0, 0, 0] - */ center: Base.Point3; - /** - * Radius of the bounding sphere - * @default 0 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ radius: number; } class SplitWireOnPointsDto { constructor(shape?: T, points?: Base.Point3[]); - /** - * The OCCT wire shape - * @default undefined - */ shape: T; - /** - * The list of points - * @default undefined - */ points: Base.Point3[]; } class ClosestPointsOnShapesFromPointsDto { constructor(shapes?: T[], points?: Base.Point3[]); - /** - * The OCCT shapes - * @default undefined - */ shapes: T[]; - /** - * The list of points - * @default undefined - */ points: Base.Point3[]; } class ClosestPointsBetweenTwoShapesDto { constructor(shape1?: T, shape2?: T); - /** - * First OCCT shape - * @default undefined - */ shape1: T; - /** - * Second OCCT shape - * @default undefined - */ shape2: T; } class FaceFromSurfaceAndWireDto { constructor(surface?: T, wire?: U, inside?: boolean); - /** - * Surface from which to create a face - * @default undefined - */ surface: T; - /** - * Wire that represents a boundary on the surface to delimit the face - * @default undefined - */ wire: U; - /** - * Indicates wether face should be created inside or outside the wire - * @default true - */ inside: boolean; } class WireOnFaceDto { constructor(wire?: T, face?: U); - /** - * Wire to place on face - * @default undefined - */ wire: T; - /** - * Face on which the wire will be placed - * @default undefined - */ face: U; } 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); - /** - * Brep OpenCascade geometry - * @default undefined - */ + 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); shape?: T; - /** - * Face opacity value between 0 and 1 - * @default 1 - * @minimum 0 - * @maximum 1 - * @step 0.1 - */ faceOpacity: number; - /** - * Edge opacity value between 0 and 1 - * @default 1 - * @minimum 0 - * @maximum 1 - * @step 0.1 - */ edgeOpacity: number; - /** - * Hex colour string for the edges - * @default #ffffff - */ edgeColour: Base.Color; - /** - * Face material - * @default undefined - * @optional true - */ faceMaterial?: Base.Material; - /** - * Hex colour string for face colour - * @default #ff0000 - */ faceColour: Base.Color; - /** - * Edge width - * @default 2 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ edgeWidth: number; - /** - * You can turn off drawing of edges via this property - * @default true - */ drawEdges: boolean; - /** - * You can turn off drawing of faces via this property - * @default true - */ drawFaces: boolean; - /** - * You can turn off drawing of vertexes via this property - * @default false - */ drawVertices: boolean; - /** - * Color of the vertices that will be drawn - * @default #ff00ff - */ vertexColour: string; - /** - * The size of a vertices that will be drawn - * @default 0.03 - * @minimum 0 - * @maximum Infinity - * @step 0.01 - */ vertexSize: number; - /** - * Precision of the mesh that will be generated for the shape, lower number will mean more triangles - * @default 0.01 - * @minimum 0 - * @maximum Infinity - * @step 0.01 - */ precision: number; - /** - * Draw index of edges in space - * @default false - */ drawEdgeIndexes: boolean; - /** - * Indicates the edge index height if they are drawn - * @default 0.06 - * @minimum 0 - * @maximum Infinity - * @step 0.01 - */ edgeIndexHeight: number; - /** - * Edge index colour if the edges are drawn - * @default #ff00ff - */ edgeIndexColour: Base.Color; - /** - * Draw indexes of faces in space - * @default false - */ drawFaceIndexes: boolean; - /** - * Indicates the edge index height if they are drawn - * @default 0.06 - * @minimum 0 - * @maximum Infinity - * @step 0.01 - */ faceIndexHeight: number; - /** - * Edge index colour if the edges are drawn - * @default #0000ff - */ faceIndexColour: Base.Color; + drawTwoSided: boolean; + backFaceColour: Base.Color; + backFaceOpacity: number; } 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); - /** - * Brep OpenCascade geometry - * @default undefined - */ + 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); shapes: T[]; - /** - * Face opacity value between 0 and 1 - * @default 1 - * @minimum 0 - * @maximum 1 - * @step 0.1 - */ faceOpacity: number; - /** - * Edge opacity value between 0 and 1 - * @default 1 - * @minimum 0 - * @maximum 1 - * @step 0.1 - */ edgeOpacity: number; - /** - * Hex colour string for the edges - * @default #ffffff - */ edgeColour: Base.Color; - /** - * Face material - * @default undefined - * @optional true - */ faceMaterial?: Base.Material; - /** - * Hex colour string for face colour - * @default #ff0000 - */ faceColour: Base.Color; - /** - * Edge width - * @default 2 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ edgeWidth: number; - /** - * You can turn off drawing of edges via this property - * @default true - */ drawEdges: boolean; - /** - * You can turn off drawing of faces via this property - * @default true - */ drawFaces: boolean; - /** - * You can turn off drawing of vertexes via this property - * @default false - */ drawVertices: boolean; - /** - * Color of the vertices that will be drawn - * @default #ff00ff - */ vertexColour: string; - /** - * The size of a vertices that will be drawn - * @default 0.03 - * @minimum 0 - * @maximum Infinity - * @step 0.01 - */ vertexSize: number; - /** - * Precision of the mesh that will be generated for the shape, lower number will mean more triangles - * @default 0.01 - * @minimum 0 - * @maximum Infinity - * @step 0.01 - */ precision: number; - /** - * Draw index of edges in space - * @default false - */ drawEdgeIndexes: boolean; - /** - * Indicates the edge index height if they are drawn - * @default 0.06 - * @minimum 0 - * @maximum Infinity - * @step 0.01 - */ edgeIndexHeight: number; - /** - * Edge index colour if the edges are drawn - * @default #ff00ff - */ edgeIndexColour: Base.Color; - /** - * Draw indexes of faces in space - * @default false - */ drawFaceIndexes: boolean; - /** - * Indicates the edge index height if they are drawn - * @default 0.06 - * @minimum 0 - * @maximum Infinity - * @step 0.01 - */ faceIndexHeight: number; - /** - * Edge index colour if the edges are drawn - * @default #0000ff - */ faceIndexColour: Base.Color; + drawTwoSided: boolean; + backFaceColour: Base.Color; + backFaceOpacity: number; } 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); - /** - * Brep OpenCascade geometry - * @default undefined - */ shape: T; - /** - * Number of points that will be added on U direction - * @default 10 - * @minimum 1 - * @maximum Infinity - * @step 1 - */ nrDivisionsU: number; - /** - * Number of points that will be added on V direction - * @default 10 - * @minimum 1 - * @maximum Infinity - * @step 1 - */ nrDivisionsV: number; - /** - * Sometimes you want to shift your points half way the step distance, especially on periodic surfaces - * @default false - */ shiftHalfStepU: boolean; - /** - * Removes start edge points on U - * @default false - */ removeStartEdgeU: boolean; - /** - * Removes end edge points on U - * @default false - */ removeEndEdgeU: boolean; - /** - * Sometimes you want to shift your points half way the step distance, especially on periodic surfaces - * @default false - */ shiftHalfStepV: boolean; - /** - * Removes start edge points on V - * @default false - */ removeStartEdgeV: boolean; - /** - * Removes end edge points on V - * @default false - */ removeEndEdgeV: boolean; } class FaceSubdivisionToWiresDto { - /** - * Provide options without default values - */ constructor(shape?: T, nrDivisions?: number, isU?: boolean, shiftHalfStep?: boolean, removeStart?: boolean, removeEnd?: boolean); - /** - * Openascade Face - * @default undefined - */ shape: T; - /** - * Number of points that will be added on U direction - * @default 10 - * @minimum 1 - * @maximum Infinity - * @step 1 - */ nrDivisions: number; - /** - * Linear subdivision direction true - U, false - V - * @default true - */ isU: boolean; - /** - * Sometimes you want to shift your wires half way the step distance, especially on periodic surfaces - * @default false - */ shiftHalfStep: boolean; - /** - * Removes start wire - * @default false - */ removeStart: boolean; - /** - * Removes end wire - * @default false - */ removeEnd: boolean; } 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); - /** - * Openascade Face - * @default undefined - */ shape: T; - /** - * Number of rectangles on U direction - * @default 10 - * @minimum 1 - * @maximum Infinity - * @step 1 - */ nrRectanglesU: number; - /** - * Number of rectangles on V direction - * @default 10 - * @minimum 1 - * @maximum Infinity - * @step 1 - */ nrRectanglesV: number; - /** - * Rectangle scale pattern on u direction - numbers between 0 and 1, if 1 or undefined is used, no scaling is applied - * @default undefined - * @optional true - */ scalePatternU: number[]; - /** - * Rectangle scale pattern on v direction - numbers between 0 and 1, if 1 or undefined is used, no scaling is applied - * @default undefined - * @optional true - */ scalePatternV: number[]; - /** - * Rectangle fillet scale pattern - numbers between 0 and 1, if 0 is used, no fillet is applied, - * if 1 is used, the fillet will be exactly half of the length of the shorter side of the rectangle - * @default undefined - * @optional true - */ filletPattern: number[]; - /** - * Rectangle inclusion pattern - true means that the rectangle will be included, - * false means that the rectangle will be removed from the face - * @default undefined - * @optional true - */ inclusionPattern: boolean[]; - /** - * If offset on U is bigger then 0 we will use a smaller space for rectangles to be placed. This means that even rectangle of U param 1 will be offset from the face border - * That is often required to create a pattern that is not too close to the face border - * It should not be bigger then half of the total width of the face as that will create problems - * @default 0 - * @minimum 0 - * @maximum 0.5 - * @step 0.01 - */ offsetFromBorderU: number; - /** - * If offset on V is bigger then 0 we will use a smaller space for rectangles to be placed. This means that even rectangle of V param 1 will be offset from the face border - * That is often required to create a pattern that is not too close to the face border - * It should not be bigger then half of the total width of the face as that will create problems - * @default 0 - * @minimum 0 - * @maximum 0.5 - * @step 0.01 - */ offsetFromBorderV: number; } 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); - /** - * Openascade Face - * @default undefined - */ shape?: T; - /** - * Number of hexagons on U direction - * @default 10 - * @minimum 1 - * @maximum Infinity - * @step 1 - */ nrHexagonsU?: number; - /** - * Number of hexagons on V direction - * @default 10 - * @minimum 1 - * @maximum Infinity - * @step 1 - */ nrHexagonsV?: number; flatU: boolean; - /** - * Hexagon scale pattern on u direction - numbers between 0 and 1, if 1 or undefined is used, no scaling is applied - * @default undefined - * @optional true - */ scalePatternU?: number[]; - /** - * Hexagon scale pattern on v direction - numbers between 0 and 1, if 1 or undefined is used, no scaling is applied - * @default undefined - * @optional true - */ scalePatternV?: number[]; - /** - * Hexagon fillet scale pattern - numbers between 0 and 1, if 0 is used, no fillet is applied, - * if 1 is used, the fillet will be exactly half of the length of the shortest segment of the hexagon - * @default undefined - * @optional true - */ filletPattern?: number[]; - /** - * Hexagon inclusion pattern - true means that the hexagon will be included, - * false means that the hexagon will be removed from the face - * @default undefined - * @optional true - */ inclusionPattern?: boolean[]; - /** - * If offset on U is bigger then 0 we will use a smaller space for hexagons to be placed. This means that even hexagon of U param 1 will be offset from the face border - * That is often required to create a pattern that is not too close to the face border - * It should not be bigger then half of the total width of the face as that will create problems - * @default 0 - * @minimum 0 - * @maximum 0.5 - * @step 0.01 - */ offsetFromBorderU?: number; - /** - * If offset on V is bigger then 0 we will use a smaller space for hexagons to be placed. This means that even hexagon of V param 1 will be offset from the face border - * That is often required to create a pattern that is not too close to the face border - * It should not be bigger then half of the total width of the face as that will create problems - * @default 0 - * @minimum 0 - * @maximum 0.5 - * @step 0.01 - */ offsetFromBorderV?: number; - /** - * If true, we will extend the hexagons beyond the face u up border by their pointy tops - * @default false - */ extendUUp?: boolean; - /** - * If true, we will extend the hexagons beyond the face u bottom border by their pointy tops - * @default false - */ extendUBottom?: boolean; - /** - * If true, we will extend the hexagons beyond the face v upper border by their half width - * @default false - */ extendVUp?: boolean; - /** - * If true, we will extend the hexagons beyond the face v bottom border by their half width - * @default false - */ extendVBottom?: boolean; } 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); - /** - * Openascade Face - * @default undefined - */ shape?: T; - /** - * Number of hexagons on U direction - * @default 10 - * @minimum 1 - * @maximum Infinity - * @step 1 - */ nrHexagonsU?: number; - /** - * Number of hexagons on V direction - * @default 10 - * @minimum 1 - * @maximum Infinity - * @step 1 - */ nrHexagonsV?: number; flatU: boolean; - /** - * If true, we will also create holes as faces - * @default false - */ holesToFaces?: boolean; - /** - * Hexagon scale pattern on u direction - numbers between 0 and 1, if 1 or undefined is used, no scaling is applied - * @default undefined - * @optional true - */ scalePatternU?: number[]; - /** - * Hexagon scale pattern on v direction - numbers between 0 and 1, if 1 or undefined is used, no scaling is applied - * @default undefined - * @optional true - */ scalePatternV?: number[]; - /** - * Hexagon fillet scale pattern - numbers between 0 and 1, if 0 is used, no fillet is applied, - * if 1 is used, the fillet will be exactly half of the length of the shortest segment of the hexagon - * @default undefined - * @optional true - */ filletPattern?: number[]; - /** - * Hexagon inclusion pattern - true means that the hexagon will be included, - * false means that the hexagon will be removed from the face - * @default undefined - * @optional true - */ inclusionPattern?: boolean[]; - /** - * If offset on U is bigger then 0 we will use a smaller space for hexagons to be placed. This means that even hexagon of U param 1 will be offset from the face border - * That is often required to create a pattern that is not too close to the face border - * It should not be bigger then half of the total width of the face as that will create problems - * @default 0 - * @minimum 0 - * @maximum 0.5 - * @step 0.01 - */ offsetFromBorderU?: number; - /** - * If offset on V is bigger then 0 we will use a smaller space for hexagons to be placed. This means that even hexagon of V param 1 will be offset from the face border - * That is often required to create a pattern that is not too close to the face border - * It should not be bigger then half of the total width of the face as that will create problems - * @default 0 - * @minimum 0 - * @maximum 0.5 - * @step 0.01 - */ offsetFromBorderV?: number; } 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); - /** - * Openascade Face - * @default undefined - */ shape: T; - /** - * Number of rectangles on U direction - * @default 10 - * @minimum 1 - * @maximum Infinity - * @step 1 - */ nrRectanglesU: number; - /** - * Number of rectangles on V direction - * @default 10 - * @minimum 1 - * @maximum Infinity - * @step 1 - */ nrRectanglesV: number; - /** - * Rectangle scale pattern on u direction - numbers between 0 and 1, if 1 or undefined is used, no scaling is applied - * @default undefined - * @optional true - */ scalePatternU: number[]; - /** - * Rectangle scale pattern on v direction - numbers between 0 and 1, if 1 or undefined is used, no scaling is applied - * @default undefined - * @optional true - */ scalePatternV: number[]; - /** - * Rectangle fillet scale pattern - numbers between 0 and 1, if 0 is used, no fillet is applied, - * if 1 is used, the fillet will be exactly half of the length of the shorter side of the rectangle - * @default undefined - * @optional true - */ filletPattern: number[]; - /** - * Rectangle inclusion pattern - true means that the rectangle will be included, - * false means that the rectangle will be removed from the face - * @default undefined - * @optional true - */ inclusionPattern: boolean[]; - /** - * If true, we will also output the faces for all the rectangles. The first face in the result will be the original face with holes punched, while the rest will be the rectangles - * @default false - */ holesToFaces: boolean; - /** - * If offset on U is bigger then 0 we will use a smaller space for rectangles to be placed. This means that even rectangle of U param 1 will be offset from the face border - * That is often required to create a pattern that is not too close to the face border - * It should not be bigger then half of the total width of the face as that will create problems - * @default 0 - * @minimum 0 - * @maximum 0.5 - * @step 0.01 - */ offsetFromBorderU: number; - /** - * If offset on V is bigger then 0 we will use a smaller space for rectangles to be placed. This means that even rectangle of V param 1 will be offset from the face border - * That is often required to create a pattern that is not too close to the face border - * It should not be bigger then half of the total width of the face as that will create problems - * @default 0 - * @minimum 0 - * @maximum 0.5 - * @step 0.01 - */ offsetFromBorderV: number; } 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); - /** - * Brep OpenCascade geometry - * @default undefined - */ shape: T; - /** - * Number of subdivisions on U direction - * @default 10 - * @minimum 1 - * @maximum Infinity - * @step 1 - */ nrDivisionsU: number; - /** - * Number of subdivisions on V direction - * @default 10 - * @minimum 1 - * @maximum Infinity - * @step 1 - */ nrDivisionsV: number; - /** - * Shift half step every nth U row - * @default 0 - * @minimum 0 - * @maximum Infinity - * @step 1 - */ shiftHalfStepNthU: number; - /** - * Offset for shift half step every nth U row - * @default 0 - * @minimum 0 - * @maximum Infinity - * @step 1 - */ shiftHalfStepUOffsetN: number; - /** - * Removes start edge points on U - * @default 0 - * @minimum 0 - * @maximum Infinity - * @step 1 - */ removeStartEdgeNthU: number; - /** - * Offset for remove start edge points on U - * @default 0 - * @minimum 0 - * @maximum Infinity - * @step 1 - */ removeStartEdgeUOffsetN: number; - /** - * Removes end edge points on U - * @default 0 - * @minimum 0 - * @maximum Infinity - * @step 1 - */ removeEndEdgeNthU: number; - /** - * Offset for remove end edge points on U - * @default 0 - * @minimum 0 - * @maximum Infinity - * @step 1 - */ removeEndEdgeUOffsetN: number; - /** - * Shift half step every nth V row - * @default 0 - * @minimum 0 - * @maximum Infinity - * @step 1 - */ shiftHalfStepNthV: number; - /** - * Offset for shift half step every nth V row - * @default 0 - * @minimum 0 - * @maximum Infinity - * @step 1 - */ shiftHalfStepVOffsetN: number; - /** - * Removes start edge points on V - * @default 0 - * @minimum 0 - * @maximum Infinity - * @step 1 - */ removeStartEdgeNthV: number; - /** - * Offset for remove start edge points on V - * @default 0 - * @minimum 0 - * @maximum Infinity - * @step 1 - */ removeStartEdgeVOffsetN: number; - /** - * Removes end edge points on V - * @default 0 - * @minimum 0 - * @maximum Infinity - * @step 1 - */ removeEndEdgeNthV: number; - /** - * Offset for remove end edge points on V - * @default 0 - * @minimum 0 - * @maximum Infinity - * @step 1 - */ removeEndEdgeVOffsetN: number; } class FaceLinearSubdivisionDto { - /** - * Provide options without default values - */ constructor(shape?: T, isU?: boolean, param?: number, nrPoints?: number, shiftHalfStep?: boolean, removeStartPoint?: boolean, removeEndPoint?: boolean); - /** - * Brep OpenCascade geometry - * @default undefined - */ shape: T; - /** - * Linear subdivision direction true - U, false - V - * @default true - */ isU: boolean; - /** - * Param on direction 0 - 1 - * @default 0.5 - * @minimum 0 - * @maximum 1 - * @step 0.1 - */ param: number; - /** - * Number of subdivisions on opposite direction - * @default 10 - * @minimum 1 - * @maximum Infinity - * @step 1 - */ nrPoints: number; - /** - * Sometimes you want to shift your points half way the step distance, especially on periodic surfaces - * @default false - */ shiftHalfStep: boolean; - /** - * Removes first point - * @default false - */ removeStartPoint: boolean; - /** - * Removes last point - * @default false - */ removeEndPoint: boolean; } class WireAlongParamDto { - /** - * Provide options without default values - */ constructor(shape?: T, isU?: boolean, param?: number); - /** - * Brep OpenCascade geometry - * @default undefined - */ shape: T; - /** - * Linear subdivision direction true - U, false - V - * @default true - */ isU: boolean; - /** - * Param on direction 0 - 1 - * @default 0.5 - * @minimum 0 - * @maximum 1 - * @step 0.1 - */ param: number; } class WiresAlongParamsDto { - /** - * Provide options without default values - */ constructor(shape?: T, isU?: boolean, params?: number[]); - /** - * Brep OpenCascade geometry - * @default undefined - */ shape: T; - /** - * Linear subdivision direction true - U, false - V - * @default true - */ isU: boolean; - /** - * Params on direction 0 - 1 - * @default undefined - */ params: number[]; } class DataOnUVDto { - /** - * Provide options without default values - */ constructor(shape?: T, paramU?: number, paramV?: number); - /** - * Brep OpenCascade geometry - * @default undefined - */ shape: T; - /** - * Param on U direction 0 to 1 - * @default 0.5 - * @minimum 0 - * @maximum 1 - * @step 0.1 - */ paramU: number; - /** - * Param on V direction 0 to 1 - * @default 0.5 - * @minimum 0 - * @maximum 1 - * @step 0.1 - */ paramV: number; } class DataOnUVsDto { - /** - * Provide options without default values - */ - constructor(shape?: T, paramsUV?: [number, number][]); - /** - * Brep OpenCascade geometry - * @default undefined - */ + constructor(shape?: T, paramsUV?: [ + number, + number + ][]); shape: T; - /** - * Params uv - * @default [[0.5, 0.5]] - */ - paramsUV: [number, number][]; + paramsUV: [ + number, + number + ][]; } class PolygonDto { constructor(points?: Base.Point3[]); - /** - * Points points - * @default undefined - */ points: Base.Point3[]; } class PolygonsDto { constructor(polygons?: PolygonDto[], returnCompound?: boolean); - /** - * Polygons - * @default undefined - */ polygons: PolygonDto[]; - /** - * Indicates whether the shapes should be returned as a compound - */ returnCompound: boolean; } class PolylineDto { constructor(points?: Base.Point3[]); - /** - * Points points - * @default undefined - */ points: Base.Point3[]; } class PolylineBaseDto { constructor(polyline?: Base.Polyline3); - /** - * Polyline - * @default undefined - */ polyline: Base.Polyline3; } class PolylinesBaseDto { constructor(polylines?: Base.Polyline3[]); - /** - * Polylines - * @default undefined - */ polylines: Base.Polyline3[]; } class LineBaseDto { constructor(line?: Base.Line3); - /** - * Line - * @default undefined - */ line: Base.Line3; } class LinesBaseDto { constructor(lines?: Base.Line3[]); - /** - * Lines - * @default undefined - */ lines: Base.Line3[]; } class SegmentBaseDto { constructor(segment?: Base.Segment3); - /** - * Segment - * @default undefined - */ segment: Base.Segment3; } class SegmentsBaseDto { constructor(segments?: Base.Segment3[]); - /** - * Segments - * @default undefined - */ segments: Base.Segment3[]; } class TriangleBaseDto { constructor(triangle?: Base.Triangle3); - /** - * Triangle - * @default undefined - */ triangle: Base.Triangle3; } class MeshBaseDto { constructor(mesh?: Base.Mesh3); - /** - * Mesh - * @default undefined - */ mesh: Base.Mesh3; } class PolylinesDto { constructor(polylines?: PolylineDto[], returnCompound?: boolean); - /** - * Polylines - * @default undefined - */ polylines: PolylineDto[]; - /** - * Indicates whether the shapes should be returned as a compound - */ returnCompound: boolean; } class SquareDto { constructor(size?: number, center?: Base.Point3, direction?: Base.Vector3); - /** - * size of square - * @default 1 - * @minimum 0 - * @maximum Infinity - * @step 1 - */ size: number; - /** - * Center of the square - * @default [0, 0, 0] - */ center: Base.Point3; - /** - * Direction of the square - * @default [0, 1, 0] - */ direction: Base.Vector3; } class RectangleDto { constructor(width?: number, length?: number, center?: Base.Point3, direction?: Base.Vector3); - /** - * width of the rectangle - * @default 1 - * @minimum 0 - * @maximum Infinity - * @step 1 - */ width: number; - /** - * Height of the rectangle - * @default 2 - * @minimum 0 - * @maximum Infinity - * @step 1 - */ length: number; - /** - * Center of the rectangle - * @default [0, 0, 0] - */ center: Base.Point3; - /** - * Direction of the rectangle - * @default [0, 1, 0] - */ direction: Base.Vector3; } class LPolygonDto { constructor(widthFirst?: number, lengthFirst?: number, widthSecond?: number, lengthSecond?: number, align?: directionEnum, rotation?: number, center?: Base.Point3, direction?: Base.Vector3); - /** - * Width of the first side of L polygon - * @default 1 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ widthFirst: number; - /** - * Length of the first side of L polygon - * @default 2 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ lengthFirst: number; - /** - * Width of the second side of L polygon - * @default 0.5 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ widthSecond: number; - /** - * Length of the second side of L polygon - * @default 2 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ lengthSecond: number; - /** - * Indicates if the L polygon should be aligned inside/outside or middle - * @default outside - */ align: directionEnum; - /** - * Rotation of the L polygon - * @default 0 - * @minimum 0 - * @maximum Infinity - * @step 15 - */ rotation: number; - /** - * Center of the L polygon - * @default [0, 0, 0] - */ center: Base.Point3; - /** - * Direction of the L polygon - * @default [0, 1, 0] - */ direction: Base.Vector3; } + class IBeamProfileDto { + constructor(width?: number, height?: number, webThickness?: number, flangeThickness?: number, alignment?: Base.basicAlignmentEnum, rotation?: number, center?: Base.Point3, direction?: Base.Vector3); + width: number; + height: number; + webThickness: number; + flangeThickness: number; + alignment: Base.basicAlignmentEnum; + rotation: number; + center: Base.Point3; + direction: Base.Vector3; + } + class HBeamProfileDto { + constructor(width?: number, height?: number, webThickness?: number, flangeThickness?: number, alignment?: Base.basicAlignmentEnum, rotation?: number, center?: Base.Point3, direction?: Base.Vector3); + width: number; + height: number; + webThickness: number; + flangeThickness: number; + alignment: Base.basicAlignmentEnum; + rotation: number; + center: Base.Point3; + direction: Base.Vector3; + } + class TBeamProfileDto { + constructor(width?: number, height?: number, webThickness?: number, flangeThickness?: number, alignment?: Base.basicAlignmentEnum, rotation?: number, center?: Base.Point3, direction?: Base.Vector3); + width: number; + height: number; + webThickness: number; + flangeThickness: number; + alignment: Base.basicAlignmentEnum; + rotation: number; + center: Base.Point3; + direction: Base.Vector3; + } + class UBeamProfileDto { + constructor(width?: number, height?: number, webThickness?: number, flangeThickness?: number, flangeWidth?: number, alignment?: Base.basicAlignmentEnum, rotation?: number, center?: Base.Point3, direction?: Base.Vector3); + width: number; + height: number; + webThickness: number; + flangeThickness: number; + flangeWidth: number; + alignment: Base.basicAlignmentEnum; + rotation: number; + center: Base.Point3; + direction: Base.Vector3; + } + class ExtrudedSolidDto { + constructor(extrusionLengthFront?: number, extrusionLengthBack?: number, center?: Base.Point3, direction?: Base.Vector3); + extrusionLengthFront: number; + extrusionLengthBack: number; + center: Base.Point3; + direction: Base.Vector3; + } + 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); + extrusionLengthFront: number; + extrusionLengthBack: number; + } + 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); + extrusionLengthFront: number; + extrusionLengthBack: number; + } + 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); + extrusionLengthFront: number; + extrusionLengthBack: number; + } + 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); + extrusionLengthFront: number; + extrusionLengthBack: number; + } class BoxDto { constructor(width?: number, length?: number, height?: number, center?: Base.Point3, originOnCenter?: boolean); - /** - * Width of the box - * @default 1 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ width: number; - /** - * Length of the box - * @default 2 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ length: number; - /** - * Height of the box - * @default 3 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ height: number; - /** - * Center of the box - * @default [0, 0, 0] - */ center: Base.Point3; - /** - * Force origin to be on the center of the cube - * @default true - */ originOnCenter?: boolean; } class CubeDto { constructor(size?: number, center?: Base.Point3, originOnCenter?: boolean); - /** - * Size of the cube - * @default 1 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ size: number; - /** - * Center of the box - * @default [0, 0, 0] - */ center: Base.Point3; - /** - * Force origin to be on the center of the cube - * @default true - */ originOnCenter?: boolean; } class BoxFromCornerDto { constructor(width?: number, length?: number, height?: number, corner?: Base.Point3); - /** - * Width of the box - * @default 1 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ width: number; - /** - * Length of the box - * @default 2 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ length: number; - /** - * Height of the box - * @default 3 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ height: number; - /** - * Corner of the box - * @default [0, 0, 0] - */ corner: Base.Point3; } class SphereDto { constructor(radius?: number, center?: Base.Point3); - /** - * Radius of the sphere - * @default 1 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ radius: number; - /** - * Center of the sphere - * @default [0, 0, 0] - */ center: Base.Point3; } class ConeDto { constructor(radius1?: number, radius2?: number, height?: number, angle?: number, center?: Base.Point3, direction?: Base.Vector3); - /** - * First radius of the cone - * @default 2 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ radius1: number; - /** - * Second radius of the cone - * @default 1 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ radius2: number; - /** - * Height of the cone - * @default 2 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ height: number; - /** - * Angle of the cone - * @default 360 - * @minimum 0 - * @maximum 360 - * @step 1 - */ angle: number; - /** - * Center of the cone - * @default [0, 0, 0] - */ center: Base.Point3; - /** - * Direction of the cone - * @default [0, 1, 0] - */ direction: Base.Point3; } class LineDto { constructor(start?: Base.Point3, end?: Base.Point3); - /** - * Start of the line - * @default [0, 0, 0] - */ start: Base.Point3; - /** - * End of the line - * @default [0, 1, 0] - */ end: Base.Point3; } class LineWithExtensionsDto { constructor(start?: Base.Point3, end?: Base.Point3, extensionStart?: number, extensionEnd?: number); - /** - * Start of the line - * @default [0, 0, 0] - */ start: Base.Point3; - /** - * End of the line - * @default [0, 1, 0] - */ end: Base.Point3; - /** - * Extension of the line on the start - * @default 0.1 - * @minimum -Infinity - * @maximum Infinity - * @step 0.1 - */ extensionStart: number; - /** - * Extension of the line on the end - * @default 0.1 - * @minimum -Infinity - * @maximum Infinity - * @step 0.1 - */ extensionEnd: number; } class LinesDto { constructor(lines?: LineDto[], returnCompound?: boolean); - /** - * Lines - * @default undefined - */ lines: LineDto[]; - /** - * Indicates whether the shapes should be returned as a compound - */ returnCompound: boolean; } class ArcEdgeTwoPointsTangentDto { constructor(start?: Base.Point3, tangentVec?: Base.Vector3, end?: Base.Point3); - /** - * Start of the arc - * @default [0, 0, 0] - */ start: Base.Point3; - /** - * Tangent vector on first point of the edge - * @default [0, 1, 0] - */ tangentVec: Base.Vector3; - /** - * End of the arc - * @default [0, 0, 1] - */ end: Base.Point3; } class ArcEdgeCircleTwoPointsDto { constructor(circle?: T, start?: Base.Point3, end?: Base.Point3, sense?: boolean); - /** - * Circular edge - * @default undefined - */ circle: T; - /** - * Start of the arc on the circle - * @default [0, 0, 0] - */ start: Base.Point3; - /** - * End of the arc on the circle - * @default [0, 0, 1] - */ end: Base.Point3; - /** - * If true will sense the direction - * @default true - */ sense: boolean; } class ArcEdgeCircleTwoAnglesDto { constructor(circle?: T, alphaAngle1?: number, alphaAngle2?: number, sense?: boolean); - /** - * Circular edge - * @default undefined - */ circle: T; - /** - * First angle - * @default 0 - * @minimum -Infinity - * @maximum Infinity - * @step 1 - */ alphaAngle1: number; - /** - * End angle - * @default 90 - * @minimum -Infinity - * @maximum Infinity - * @step 1 - */ alphaAngle2: number; - /** - * If true will sense the direction - * @default true - */ sense: boolean; } class ArcEdgeCirclePointAngleDto { constructor(circle?: T, alphaAngle?: number, alphaAngle2?: number, sense?: boolean); - /** - * Circular edge - * @default undefined - */ circle: T; - /** - * Point on the circle from where to start the arc - * @default undefined - */ point: Base.Point3; - /** - * Angle from point - * @default 90 - * @minimum -Infinity - * @maximum Infinity - * @step 1 - */ alphaAngle: number; - /** - * If true will sense the direction - * @default true - */ sense: boolean; } class ArcEdgeThreePointsDto { constructor(start?: Base.Point3, middle?: Base.Point3, end?: Base.Point3); - /** - * Start of the arc - * @default [0, 0, 0] - */ start: Base.Point3; - /** - * Middle of the arc - * @default [0, 1, 0] - */ middle: Base.Point3; - /** - * End of the arc - * @default [0, 0, 1] - */ end: Base.Point3; } class CylinderDto { constructor(radius?: number, height?: number, center?: Base.Point3, direction?: Base.Vector3, angle?: number, originOnCenter?: boolean); - /** - * Radius of the cylinder - * @default 1 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ radius: number; - /** - * Height of the cylinder - * @default 2 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ height: number; - /** - * Center of the cylinder - * @default [0, 0, 0] - */ center: Base.Point3; - /** - * Direction for the cylinder - * @default [0, 1, 0] - */ direction?: Base.Vector3; - /** - * Angle of the cylinder pie - * @default 360 - * @minimum 0 - * @maximum Infinity - * @step 1 - */ angle?: number; - /** - * Force origin to be on the center of cylinder - * @default false - */ originOnCenter?: boolean; } class CylindersOnLinesDto { constructor(radius?: number, lines?: Base.Line3[]); - /** - * Radius of the cylinder - * @default 1 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ radius: number; - /** - * Lines between which to span cylinders - * @default undefined - */ lines: Base.Line3[]; } class FilletDto { constructor(shape?: T, radius?: number, radiusList?: number[], indexes?: number[]); - /** - * Shape to apply the fillets - * @default undefined - */ shape: T; - /** - * Radius of the fillets - * @default 0.1 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - * @optional true - */ radius?: number; - /** - * Radius list - * @default undefined - * @optional true - */ radiusList?: number[]; - /** - * List of edge indexes to which apply the fillet, if left empty all edges will be rounded - * @default undefined - * @optional true - */ indexes?: number[]; } class FilletShapesDto { constructor(shapes?: T[], radius?: number, radiusList?: number[], indexes?: number[]); - /** - * Shapes to apply the fillets - * @default undefined - */ shapes: T[]; - /** - * Radius of the fillets - * @default 0.1 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - * @optional true - */ radius?: number; - /** - * Radius list - * @default undefined - * @optional true - */ radiusList?: number[]; - /** - * List of edge indexes to which apply the fillet, if left empty all edges will be rounded - * @default undefined - * @optional true - */ indexes?: number[]; } class FilletEdgesListDto { constructor(shape?: T, edges?: U[], radiusList?: number[]); - /** - * Shape to apply the fillet - * @default undefined - */ shape: T; - /** - * Edges to use for the fillet - * @default undefined - */ edges: U[]; - /** - * Radius list for the fillets. The length of this array must match the length of the edges array. Each index corresponds to fillet on the edge at the same index. - * @default undefined - */ radiusList: number[]; } class FilletEdgesListOneRadiusDto { constructor(shape?: T, edges?: U[], radius?: number); - /** - * Shape to apply the fillet - * @default undefined - */ shape: T; - /** - * Edges to use for the fillet - * @default undefined - */ edges: U[]; - /** - * Radius of the fillets - * @default 0.1 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - * @optional true - */ radius: number; } class FilletEdgeVariableRadiusDto { constructor(shape?: T, edge?: U, radiusList?: number[], paramsU?: number[]); - /** - * Shape to apply the fillet - * @default undefined - */ shape: T; - /** - * Edge to use for the fillet - * @default undefined - */ edge: U; - /** - * Radius list for the fillets that has to match the paramsU list - * @default undefined - */ radiusList: number[]; - /** - * List of parameters on the edge to which apply the fillet. Each param must be between 0 and 1. - * @default undefined - */ paramsU: number[]; } class FilletEdgesVariableRadiusDto { constructor(shape?: T, edges?: U[], radiusLists?: number[][], paramsULists?: number[][]); - /** - * Shape to apply the fillet - * @default undefined - */ shape: T; - /** - * Edges to use for the fillet - * @default undefined - */ edges: U[]; - /** - * Lists of radius lists for the fillets. Top level array length needs to match the nr of edges used and each second level array needs to match paramsU length array at the same index. - * @default undefined - */ radiusLists: number[][]; - /** - * Lists of parameter lists on the edges to which apply the fillet. Each param must be between 0 and 1. Top level array length needs to match the nr of edges used and each second level array needs to match radius length array at the same index. - * @default undefined - */ paramsULists: number[][]; } class FilletEdgesSameVariableRadiusDto { constructor(shape?: T, edges?: U[], radiusList?: number[], paramsU?: number[]); - /** - * Shape to apply the fillet - * @default undefined - */ shape: T; - /** - * Edges to use for the fillet - * @default undefined - */ edges: U[]; - /** - * Radius list for the fillets that has to match the paramsU list - * @default undefined - */ radiusList: number[]; - /** - * List of parameters on the edges to which apply the fillet. Each param must be between 0 and 1. - * @default undefined - */ paramsU: number[]; } class Fillet3DWiresDto { constructor(shapes?: T[], radius?: number, direction?: Base.Vector3, radiusList?: number[], indexes?: number[]); - /** - * Shapes to apply the fillets on - * @default undefined - */ shapes: T[]; - /** - * Radius of the fillets - * @default 0.1 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - * @optional true - */ radius?: number; - /** - * Radius list - * @default undefined - * @optional true - */ radiusList?: number[]; - /** - * List of edge indexes to which apply the fillet, if left empty all edges will be rounded - * @default undefined - * @optional true - */ indexes?: number[]; - /** - * Orientation direction for the fillet - * @default [0, 1, 0] - */ direction: Base.Vector3; } class Fillet3DWireDto { constructor(shape?: T, radius?: number, direction?: Base.Vector3, radiusList?: number[], indexes?: number[]); - /** - * Shape to apply the fillets - * @default undefined - */ shape: T; - /** - * Radius of the fillets - * @default 0.1 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - * @optional true - */ radius?: number; - /** - * Radius list - * @default undefined - * @optional true - */ radiusList?: number[]; - /** - * List of edge indexes to which apply the fillet, if left empty all edges will be rounded - * @default undefined - * @optional true - */ indexes?: number[]; - /** - * Orientation direction for the fillet - * @default [0, 1, 0] - */ direction: Base.Vector3; } class ChamferDto { constructor(shape?: T, distance?: number, distanceList?: number[], indexes?: number[]); - /** - * Shape to apply the chamfer - * @default undefined - */ shape: T; - /** - * Distance for the chamfer - * @default 0.1 - * @minimum 0 - * @maximum Infinity - * @optional true - * @step 0.1 - */ distance?: number; - /** - * Distance for the chamfer - * @default undefined - * @optional true - */ distanceList?: number[]; - /** - * List of edge indexes to which apply the chamfer, if left empty all edges will be chamfered - * @default undefined - * @optional true - */ indexes?: number[]; } class ChamferEdgesListDto { constructor(shape?: T, edges?: U[], distanceList?: number[]); - /** - * Shape to apply the chamfer - * @default undefined - */ shape: T; - /** - * Edges to apply the chamfer to - * @default undefined - */ edges: U[]; - /** - * Distance for the chamfer - * @default undefined - */ distanceList: number[]; } class ChamferEdgeDistAngleDto { constructor(shape?: T, edge?: U, face?: F, distance?: number, angle?: number); - /** - * Shape to apply the chamfer - * @default undefined - */ shape: T; - /** - * Edge to apply the chamfer to - * @default undefined - */ edge: U; - /** - * Face from which to apply the angle - * @default undefined - */ face: F; - /** - * Distance for the chamfer - * @default 0.1 - * @minimum 0 - * @maximum Infinity - * @step 0.01 - */ distance: number; - /** - * Angle for the chamfer - * @default 45 - * @minimum 0 - * @maximum Infinity - * @step 1 - */ angle: number; } class ChamferEdgeTwoDistancesDto { constructor(shape?: T, edge?: U, face?: F, distance1?: number, distance2?: number); - /** - * Shape to apply the chamfer - * @default undefined - */ shape: T; - /** - * Edge to apply the chamfer to - * @default undefined - */ edge: U; - /** - * Face from which to apply the first distance - * @default undefined - */ face: F; - /** - * First distance from the face for the chamfer - * @default 0.1 - * @minimum 0 - * @maximum Infinity - * @step 0.01 - */ distance1: number; - /** - * Second distance for the chamfer - * @default 0.2 - * @minimum 0 - * @maximum Infinity - * @step 0.01 - */ distance2: number; } class ChamferEdgesTwoDistancesListsDto { constructor(shape?: T, edges?: U[], faces?: F[], distances1?: number[], distances2?: number[]); - /** - * Shape to apply the chamfer - * @default undefined - */ shape: T; - /** - * Edges to apply the chamfers to - * @default undefined - */ edges: U[]; - /** - * Faces from which to apply the angle of the chamfers - * @default undefined - */ faces: F[]; - /** - * Distance 1 list for the chamfers - * @default undefined - */ distances1: number[]; - /** - * Distance 2 list for the chamfers - * @default undefined - */ distances2: number[]; } class ChamferEdgesTwoDistancesDto { constructor(shape?: T, edges?: U[], faces?: F[], distance1?: number, distance2?: number); - /** - * Shape to apply the chamfer - * @default undefined - */ shape: T; - /** - * Edges to apply the chamfers to - * @default undefined - */ edges: U[]; - /** - * Faces from which to apply the angle of the chamfers - * @default undefined - */ faces: F[]; - /** - * First distance from the face for the chamfer - * @default 0.1 - * @minimum 0 - * @maximum Infinity - * @step 0.01 - */ distance1: number; - /** - * Second distance for the chamfer - * @default 0.2 - * @minimum 0 - * @maximum Infinity - * @step 0.01 - */ distance2: number; } class ChamferEdgesDistsAnglesDto { constructor(shape?: T, edges?: U[], faces?: F[], distances?: number[], angles?: number[]); - /** - * Shape to apply the chamfer - * @default undefined - */ shape: T; - /** - * Edges to apply the chamfers to - * @default undefined - */ edges: U[]; - /** - * Faces from which to apply the angle of the chamfers - * @default undefined - */ faces: F[]; - /** - * Distance list for the chamfers - * @default undefined - */ distances: number[]; - /** - * Angles for the chamfers - * @default undefined - */ angles: number[]; } class ChamferEdgesDistAngleDto { constructor(shape?: T, edges?: U[], faces?: F[], distance?: number, angle?: number); - /** - * Shape to apply the chamfer - * @default undefined - */ shape: T; - /** - * Edges to apply the chamfers to - * @default undefined - */ edges: U[]; - /** - * Faces from which to apply the angle of the chamfers - * @default undefined - */ faces: F[]; - /** - * Distance from the face - * @default 0.1 - * @minimum 0 - * @maximum Infinity - * @step 0.01 - */ distance: number; - /** - * Angle for the chamfers - * @default 45 - * @minimum 0 - * @maximum Infinity - * @step 1 - */ angle: number; } class BSplineDto { constructor(points?: Base.Point3[], closed?: boolean); - /** - * Points through which the BSpline will be created - * @default undefined - */ points: Base.Point3[]; - /** - * Indicates wether BSpline will be cloed - * @default false - */ closed: boolean; } class BSplinesDto { constructor(bSplines?: BSplineDto[], returnCompound?: boolean); - /** - * BSpline definitions - * @default undefined - */ bSplines: BSplineDto[]; - /** - * Indicates whether the shapes should be returned as a compound - */ returnCompound: boolean; } class WireFromTwoCirclesTanDto { constructor(circle1?: T, circle2?: T, keepLines?: twoSidesStrictEnum, circleRemainders?: fourSidesStrictEnum, tolerance?: number); - /** - * The first circle to be encloed with tangential lines - * @default undefined - */ circle1: T; - /** - * The second circle to be encloed with tangential lines - * @default undefined - */ circle2: T; - /** - * Choose which side to keep for the wire. Outside gives non-intersecting solution. - * @default outside - */ keepLines: twoSidesStrictEnum; - /** - * Choose which side to keep for the wire. Outside gives non-intersecting solution. - * @default outside - */ circleRemainders: fourSidesStrictEnum; - /** - * tolerance - * @default 1e-7 - * @minimum 0 - * @maximum Infinity - * @step 0.00001 - */ tolerance: number; } class FaceFromMultipleCircleTanWiresDto { constructor(circles?: T[], combination?: combinationCirclesForFaceEnum, unify?: boolean, tolerance?: number); - /** - * The circles that will all be joined into a single face through tangential lines - * @default undefined - */ circles: T[]; - /** - * Indicates how circles should be joined together. Users can choose to join all circles with each other. Alternatively it is possible to respect the order of circles and only join consecutive circles. It is also possible to respect order and close the shape with first circle in the list. - * @default allWithAll - */ combination: combinationCirclesForFaceEnum; - /** - * Choose whether you want faces to be unifided into a single face or not. Sometimes if you want to get faster result you can set this to false, but in this case faces will be returned as compound. - * @default true - */ unify: boolean; - /** - * tolerance - * @default 1e-7 - * @minimum 0 - * @maximum Infinity - * @step 0.00001 - */ tolerance: number; } class FaceFromMultipleCircleTanWireCollectionsDto { constructor(listsOfCircles?: T[][], combination?: combinationCirclesForFaceEnum, unify?: boolean, tolerance?: number); - /** - * The two dimensional circle array that can host multiple circle collections. - * @default undefined - */ listsOfCircles: T[][]; - /** - * Indicates how circles should be joined together. Users can choose to join all circles with each other. Alternatively it is possible to respect the order of circles and only join consecutive circles. It is also possible to respect order and close the shape with first circle in the list. - * @default allWithAll - */ combination: combinationCirclesForFaceEnum; - /** - * Choose whether you want faces to be unifided into a single face or not. Sometimes if you want to get faster result you can set this to false, but in this case faces will be returned as compound. - * @default true - */ unify: boolean; - /** - * tolerance - * @default 1e-7 - * @minimum 0 - * @maximum Infinity - * @step 0.00001 - */ tolerance: number; } class ZigZagBetweenTwoWiresDto { constructor(wire1?: T, wire2?: T, nrZigZags?: number, inverse?: boolean, divideByEqualDistance?: boolean, zigZagsPerEdge?: boolean); - /** - * The first wire for zig zag - * @default undefined - */ wire1: T; - /** - * The second wire for zig zag - * @default undefined - */ wire2: T; - /** - * How many zig zags to create between the two wires on each edge. The number of edges should match. Edges will be joined by zigzags in order. One zig zag means two edges forming a corner. - * @default 20 - * @minimum 1 - * @maximum Infinity - * @step 1 - */ nrZigZags: number; - /** - * Inverse the the zig zag to go from wire2 to wire1 - * @default false - */ inverse: boolean; - /** - * If true, the zig zags will be spaced equally on each edge. By default we follow parametric subdivision of the edges, which is not always equal to distance based subdivisions. - * @default false - */ divideByEqualDistance: boolean; - /** - * By default the number of zig zags is applied to each edge. If this is set to false, the number of zig zags will be applied to the whole wire. This could then skip some corners where edges meet. - * @default true - */ zigZagsPerEdge: boolean; } class InterpolationDto { constructor(points?: Base.Point3[], periodic?: boolean, tolerance?: number); - /** - * Points through which the BSpline will be created - * @default undefined - */ points: Base.Point3[]; - /** - * Indicates wether BSpline will be periodic - * @default false - */ periodic: boolean; - /** - * tolerance - * @default 1e-7 - * @minimum 0 - * @maximum Infinity - * @step 0.00001 - */ tolerance: number; } class InterpolateWiresDto { constructor(interpolations?: InterpolationDto[], returnCompound?: boolean); - /** - * Interpolation definitions - * @default undefined - */ interpolations: InterpolationDto[]; - /** - * Indicates whether the shapes should be returned as a compound - */ returnCompound: boolean; } class BezierDto { constructor(points?: Base.Point3[], closed?: boolean); - /** - * Points through which the Bezier curve will be created - * @default undefined - */ points: Base.Point3[]; - /** - * Indicates wether Bezier will be cloed - * @default false - */ closed: boolean; } class BezierWeightsDto { constructor(points?: Base.Point3[], weights?: number[], closed?: boolean); - /** - * Points through which the Bezier curve will be created - * @default undefined - */ points: Base.Point3[]; - /** - * Weights for beziers that will be used, values should be between 0 and 1 - * @default undefined - */ weights: number[]; - /** - * Indicates wether Bezier will be cloed - * @default false - */ closed: boolean; } class BezierWiresDto { constructor(bezierWires?: BezierDto[], returnCompound?: boolean); - /** - * Bezier wires - * @default undefined - */ bezierWires: BezierDto[]; - /** - * Indicates whether the shapes should be returned as a compound - */ returnCompound: boolean; } class DivideDto { - constructor(shape: T, nrOfDivisions?: number, removeStartPoint?: boolean, removeEndPoint?: boolean); - /** - * Shape representing a wire - * @default undefined - */ - shape: T; - /** - * The number of divisions that will be performed on the curve - * @default 10 - * @minimum 1 - * @maximum Infinity - * @step 1 - */ - nrOfDivisions: number; - /** - * Indicates if algorithm should remove start point - * @default false - */ - removeStartPoint: boolean; - /** - * Indicates if algorithm should remove end point - * @default false - */ - removeEndPoint: boolean; + constructor(shape?: T, nrOfDivisions?: number, removeStartPoint?: boolean, removeEndPoint?: boolean); + shape?: T; + nrOfDivisions?: number; + removeStartPoint?: boolean; + removeEndPoint?: boolean; } class ProjectWireDto { constructor(wire?: T, shape?: U, direction?: Base.Vector3); - /** - * Wire to project - * @default undefined - */ wire: T; - /** - * Shape to use for projection - * @default undefined - */ shape: U; - /** - * Direction vector for projection - * @default [0, 1, 0] - */ direction: Base.Vector3; } class ProjectPointsOnShapeDto { constructor(points?: Base.Point3[], shape?: T, direction?: Base.Vector3, projectionType?: pointProjectionTypeEnum); - /** - * Points to project - * @default undefined - */ points: Base.Point3[]; - /** - * Shape to use for projection - * @default undefined - */ shape: T; - /** - * Direction vector for projection - this must take the length into account as well, because algorithm looks for intresections with the shape in this direction. It will not find solutions outside the given length of this vector. - * @default [0, 10, 0] - */ direction: Base.Vector3; - /** - * Allows user to choose what solutions are being returned by this operation. - * @default all - */ projectionType: pointProjectionTypeEnum; } class WiresToPointsDto { constructor(shape?: T, angularDeflection?: number, curvatureDeflection?: number, minimumOfPoints?: number, uTolerance?: number, minimumLength?: number); - /** - * Shape to use for parsing edges - * @default undefined - */ shape: T; - /** - * The angular deflection - * @default 0.1 - * @minimum 0 - * @maximum Infinity - * @step 0.01 - */ angularDeflection: number; - /** - * The curvature deflection - * @default 0.1 - * @minimum 0 - * @maximum Infinity - * @step 0.001 - */ curvatureDeflection: number; - /** - * Minimum of points - * @default 2 - * @minimum 0 - * @maximum Infinity - * @step 1 - */ minimumOfPoints: number; - /** - * U tolerance - * @default 1.0e-9 - * @minimum 0 - * @maximum Infinity - * @step 1.0e-9 - */ uTolerance: number; - /** - * Minimum length - * @default 1.0e-7 - * @minimum 0 - * @maximum Infinity - * @step 1.0e-7 - */ minimumLength: number; } class EdgesToPointsDto { constructor(shape?: T, angularDeflection?: number, curvatureDeflection?: number, minimumOfPoints?: number, uTolerance?: number, minimumLength?: number); - /** - * Shape to use for parsing edges - * @default undefined - */ shape: T; - /** - * The angular deflection - * @default 0.1 - * @minimum 0 - * @maximum Infinity - * @step 0.01 - */ angularDeflection: number; - /** - * The curvature deflection - * @default 0.1 - * @minimum 0 - * @maximum Infinity - * @step 0.001 - */ curvatureDeflection: number; - /** - * Minimum of points - * @default 2 - * @minimum 0 - * @maximum Infinity - * @step 1 - */ minimumOfPoints: number; - /** - * U tolerance - * @default 1.0e-9 - * @minimum 0 - * @maximum Infinity - * @step 1.0e-9 - */ uTolerance: number; - /** - * Minimum length - * @default 1.0e-7 - * @minimum 0 - * @maximum Infinity - * @step 1.0e-7 - */ minimumLength: number; } class ProjectWiresDto { constructor(wires?: T[], shape?: U, direction?: Base.Vector3); - /** - * Wire to project - * @default undefined - */ wires: T[]; - /** - * Shape to use for projection - * @default undefined - */ shape: U; - /** - * Direction vector for projection - * @default [0, 1, 0] - */ direction: Base.Vector3; } class DivideShapesDto { constructor(shapes: T[], nrOfDivisions?: number, removeStartPoint?: boolean, removeEndPoint?: boolean); - /** - * Shapes - * @default undefined - */ shapes: T[]; - /** - * The number of divisions that will be performed on the curve - * @default 10 - * @minimum 1 - * @maximum Infinity - * @step 1 - */ nrOfDivisions: number; - /** - * Indicates if algorithm should remove start point - * @default false - */ removeStartPoint: boolean; - /** - * Indicates if algorithm should remove end point - * @default false - */ removeEndPoint: boolean; } class DataOnGeometryAtParamDto { constructor(shape: T, param?: number); - /** - * Shape representing a geometry - * @default undefined - */ shape: T; - /** - * 0 - 1 value - * @default 0.5 - * @minimum 0 - * @maximum 1 - * @step 0.1 - */ param: number; } class DataOnGeometryesAtParamDto { constructor(shapes: T[], param?: number); - /** - * Shapes representing a geometry - * @default undefined - */ shapes: T[]; - /** - * 0 - 1 value - * @default 0.5 - * @minimum 0 - * @maximum 1 - * @step 0.1 - */ param: number; } class PointInFaceDto { constructor(face: T, edge: T, tEdgeParam?: number, distance2DParam?: number); - /** - * OCCT face to be used for calculation - * @default undefined - */ face: T; - /** - * OCCT edge to be used for calculation - * @default undefined - */ edge: T; - /** - * 0 - 1 value - * @default 0.5 - * @minimum 0 - * @maximum 1 - * @step 0.1 - */ tEdgeParam: number; - /** - * The point will be distanced on from the 2d curve. - * @default 0.5 - * @minimum -Infinity - * @maximum Infinity - * @step 0.1 - */ distance2DParam: number; } class PointsOnWireAtEqualLengthDto { constructor(shape: T, length?: number, tryNext?: boolean, includeFirst?: boolean, includeLast?: boolean); - /** - * Shape representing a wire - * @default undefined - */ shape: T; - /** - * length at which to evaluate the point - * @default 0.5 - * @minimum -Infinity - * @maximum Infinity - * @step 0.1 - */ length: number; - /** - * Try next point if the point is not found - * @default false - */ tryNext: boolean; - /** - * Include first point - * @default false - */ includeFirst: boolean; - /** - * Include last point - * @default false - */ includeLast: boolean; } class PointsOnWireAtPatternOfLengthsDto { constructor(shape: T, lengths?: number[], tryNext?: boolean, includeFirst?: boolean, includeLast?: boolean); - /** - * Shape representing a wire - * @default undefined - */ shape: T; - /** - * length at which to evaluate the point - * @default undefined - */ lengths: number[]; - /** - * Try next point if the point is not found - * @default false - */ tryNext: boolean; - /** - * Include first point - * @default false - */ includeFirst: boolean; - /** - * Include last point - * @default false - */ includeLast: boolean; } class DataOnGeometryAtLengthDto { constructor(shape: T, length?: number); - /** - * Shape - * @default undefined - */ shape: T; - /** - * length at which to evaluate the point - * @default 0.5 - * @minimum -Infinity - * @maximum Infinity - * @step 0.1 - */ length: number; } class DataOnGeometryesAtLengthDto { constructor(shapes: T[], length?: number); - /** - * Shapes - * @default undefined - */ shapes: T[]; - /** - * length at which to evaluate the point - * @default 0.5 - * @minimum -Infinity - * @maximum Infinity - * @step 0.1 - */ length: number; } class DataOnGeometryAtLengthsDto { constructor(shape: T, lengths?: number[]); - /** - * Shape representing a wire - * @default undefined - */ shape: T; - /** - * lengths at which to evaluate the points - * @default undefined - */ lengths: number[]; } class CircleDto { constructor(radius?: number, center?: Base.Point3, direction?: Base.Vector3); - /** - * Radius of the circle - * @default 1 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ radius: number; - /** - * Center of the circle - * @default [0, 0, 0] - */ center: Base.Point3; - /** - * Direction vector for circle - * @default [0, 1, 0] - */ direction: Base.Vector3; } class HexagonsInGridDto { constructor(wdith?: 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[]); - /** Total desired width for the grid area. The hexagon size will be derived from this and nrHexagonsU. - * @default 10 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ width?: number; - /** Total desired height for the grid area. Note: due to hexagon geometry, the actual grid height might differ slightly if maintaining regular hexagons based on width. - * @default 10 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ height?: number; - /** Number of hexagons desired in width. - * @default 10 - * @minimum 0 - * @maximum Infinity - * @step 1 - */ nrHexagonsInWidth?: number; - /** Number of hexagons desired in height. - * @default 10 - * @minimum 0 - * @maximum Infinity - * @step 1 - */ nrHexagonsInHeight?: number; - /** If true, the hexagons will be oriented with their flat sides facing up and down. - * @default false - */ flatTop?: boolean; - /** If true, shift the entire grid up by half hex height. - * @default false - */ extendTop?: boolean; - /** If true, shift the entire grid down by half hex height. - * @default false - */ extendBottom?: boolean; - /** If true, shift the entire grid left by half hex width. - * @default false - */ extendLeft?: boolean; - /** If true, shift the entire grid right by half hex width. - * @default false - */ extendRight?: boolean; - /** - * Hex scale pattern on width direction - numbers between 0 and 1, if 1 or undefined is used, no scaling is applied - * @default undefined - * @optional true - */ scalePatternWidth?: number[]; - /** - * Hex scale pattern on height direction - numbers between 0 and 1, if 1 or undefined is used, no scaling is applied - * @default undefined - * @optional true - */ scalePatternHeight?: number[]; - /** - * Hex fillet scale pattern - numbers between 0 and 1, if 0 is used, no fillet is applied, - * if 1 is used, the fillet will be exactly half of the length of the shorter side of the hex - * @default undefined - * @optional true - */ filletPattern?: number[]; - /** - * Inclusion pattern - true means that the hex will be included, - * false means that the hex will be removed - * @default undefined - * @optional true - */ inclusionPattern?: boolean[]; } class LoftDto { constructor(shapes?: T[], makeSolid?: boolean); - /** - * Wires through which the loft passes - * @default undefined - */ shapes: T[]; - /** - * Tries to make a solid when lofting - * @default false - */ makeSolid: boolean; } 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); - /** - * Wires through which the loft passes - * @default undefined - */ shapes: T[]; - /** - * Tries to make a solid when lofting - * @default false - */ makeSolid: boolean; - /** - * Will make a closed loft. - * @default false - */ closed: boolean; - /** - * Will make a periodic loft. - * @default false - */ periodic: boolean; - /** - * Indicates whether straight sections should be made out of the loft - * @default false - */ straight: boolean; - /** - * This number only is used when closed non straight lofting is used - * @default 10 - * @minimum 1 - * @maximum Infinity - * @step 1 - */ nrPeriodicSections: number; - /** - * Tell algorithm to use smoothing - * @default false - */ useSmoothing: boolean; - /** - * Maximum u degree - * @default 3 - */ maxUDegree: number; - /** - * Tolerance - * @default 1.0e-7 - * @minimum 0 - * @maximum Infinity - * @step 0.000001 - */ tolerance: number; - /** - * Approximation parametrization type - * @default approxCentripetal - */ parType: approxParametrizationTypeEnum; - /** - * Optional if loft should start with a vertex - * @default undefined - * @optional true - */ startVertex?: Base.Point3; - /** - * Optional if loft should end with a vertex - * @default undefined - * @optional true - */ endVertex?: Base.Point3; } class OffsetDto { constructor(shape?: T, face?: U, distance?: number, tolerance?: number); - /** - * Shape to offset - * @default undefined - */ shape: T; - /** - * Optionally provide face for the offset - * @default undefined - * @optional true - */ face?: U; - /** - * Distance of offset - * @default 0.2 - * @minimum -Infinity - * @maximum Infinity - * @step 0.1 - */ distance: number; - /** - * Offset tolerance - * @default 0.1 - * @minimum 0 - * @maximum Infinity - * @step 0.01 - */ tolerance: number; } class OffsetAdvancedDto { constructor(shape?: T, face?: U, distance?: number, tolerance?: number, joinType?: joinTypeEnum, removeIntEdges?: boolean); - /** - * Shape to offset - * @default undefined - */ shape: T; - /** - * Optionally provide face for the offset - * @default undefined - * @optional true - */ face?: U; - /** - * Distance of offset - * @default 0.2 - * @minimum -Infinity - * @maximum Infinity - * @step 0.1 - */ distance: number; - /** - * Offset tolerance - * @default 0.1 - * @minimum 0 - * @maximum Infinity - * @step 0.01 - */ tolerance: number; - /** - * Join defines how to fill the holes that may appear between parallels to the two adjacent faces. It may take values GeomAbs_Arc or GeomAbs_Intersection: - * if Join is equal to GeomAbs_Arc, then pipes are generated between two free edges of two adjacent parallels, and spheres are generated on "images" of vertices; it is the default value - * @default arc - */ joinType: joinTypeEnum; - /** - * Removes internal edges - * @default false - */ removeIntEdges: boolean; } class RevolveDto { constructor(shape?: T, angle?: number, direction?: Base.Vector3, copy?: boolean); - /** - * Shape to revolve - * @default undefined - */ shape: T; - /** - * Angle degrees - * @default 360 - * @minimum 0 - * @maximum 360 - * @step 1 - */ angle: number; - /** - * Direction vector - * @default [0, 1, 0] - */ direction: Base.Vector3; - /** - * Copy original shape - * @default false - */ copy: boolean; } class ShapeShapesDto { constructor(shape?: T, shapes?: U[]); - /** - * The wire path - * @default undefined - */ shape: T; - /** - * Shapes along the path to be piped - * @default undefined - */ shapes: U[]; } class WiresOnFaceDto { constructor(wires?: T[], face?: U); - /** - * The wires - * @default undefined - */ wires: T[]; - /** - * Face shape - * @default undefined - */ face: U; } class PipeWiresCylindricalDto { constructor(shapes?: T[], radius?: number, makeSolid?: boolean, trihedronEnum?: geomFillTrihedronEnum, forceApproxC1?: boolean); - /** - * Wire paths to pipe - * @default undefined - */ shapes: T[]; - /** - * Radius of the cylindrical pipe - * @default 0.1 - * @minimum 0 - * @maximum Infinity - * @step 1 - */ radius: number; - /** - * Make solid result by closing start and end parts - * @default true - */ makeSolid: boolean; - /** - * Goemetry Fill Trihedron Options - * @default isConstantNormal - */ trihedronEnum: geomFillTrihedronEnum; - /** - * Attempt to approximate a C1-continuous surface if a swept surface proved to be C0 - * @default false - */ forceApproxC1: boolean; } class PipeWireCylindricalDto { constructor(shape?: T, radius?: number, makeSolid?: boolean, trihedronEnum?: geomFillTrihedronEnum, forceApproxC1?: boolean); - /** - * Wire path to pipe - * @default undefined - */ shape: T; - /** - * Radius of the cylindrical pipe - * @default 0.1 - * @minimum 0 - * @maximum Infinity - * @step 1 - */ radius: number; - /** - * Make solid result by closing start and end parts - * @default true - */ makeSolid: boolean; - /** - * Goemetry Fill Trihedron Options - * @default isConstantNormal - */ trihedronEnum: geomFillTrihedronEnum; - /** - * Attempt to approximate a C1-continuous surface if a swept surface proved to be C0 - * @default false - */ forceApproxC1: boolean; } class PipePolygonWireNGonDto { constructor(shapes?: T, radius?: number, nrCorners?: number, makeSolid?: boolean, trihedronEnum?: geomFillTrihedronEnum, forceApproxC1?: boolean); - /** - * Wire path to pipe - * @default undefined - */ shape: T; - /** - * Radius of the cylindrical pipe - * @default 0.1 - * @minimum 0 - * @maximum Infinity - * @step 1 - */ radius: number; - /** - * Nr of ngon corners to be used - * @default 6 - * @minimum 3 - * @maximum Infinity - * @step 1 - */ nrCorners: number; - /** - * Make solid result by closing start and end parts - * @default true - */ makeSolid: boolean; - /** - * Goemetry Fill Trihedron Options - * @default isConstantNormal - */ trihedronEnum: geomFillTrihedronEnum; - /** - * Attempt to approximate a C1-continuous surface if a swept surface proved to be C0 - * @default false - */ forceApproxC1: boolean; } class ExtrudeDto { constructor(shape?: T, direction?: Base.Vector3); - /** - * Face to extrude - * @default undefined - */ shape: T; - /** - * Direction vector for extrusion - * @default [0, 1, 0] - */ direction: Base.Vector3; } class ExtrudeShapesDto { constructor(shapes?: T[], direction?: Base.Vector3); - /** - * Shapes to extrude - * @default undefined - */ shapes: T[]; - /** - * Direction vector for extrusion - * @default [0, 1, 0] - */ direction: Base.Vector3; } class SplitDto { constructor(shape?: T, shapes?: T[]); - /** - * Shape to split - * @default undefined - */ shape: T; - /** - * Shapes to split from main shape - * @default undefined - */ shapes: T[]; - /** - * Local fuzzy tolerance used for splitting - * @default 1.0e-4 - * @minimum 0 - * @maximum Infinity - * @step 0.000001 - */ localFuzzyTolerance: number; - /** - * Set to true if you want to split the shape non-destructively - * @default true - */ nonDestructive: boolean; } class UnionDto { constructor(shapes?: T[], keepEdges?: boolean); - /** - * Objects to be joined together - * @default undefined - */ shapes: T[]; - /** - * Keeps edges - * @default false - */ keepEdges: boolean; } class DifferenceDto { constructor(shape?: T, shapes?: T[], keepEdges?: boolean); - /** - * Object to subtract from - * @default undefined - */ shape: T; - /** - * Objects to subtract - * @default undefined - */ shapes: T[]; - /** - * Keeps edges unaffected - * @default false - */ keepEdges: boolean; } class IntersectionDto { constructor(shapes?: T[], keepEdges?: boolean); - /** - * Shapes to intersect - * @default undefined - */ shapes: T[]; - /** - * Keep the edges - * @default false - */ keepEdges: boolean; } class ShapeDto { constructor(shape?: T); - /** - * Shape on which action should be performed - * @default undefined - */ shape: T; } class MeshMeshIntersectionTwoShapesDto { constructor(shape1?: T, shape2?: T, precision1?: number, precision2?: number); - /** - * First shape to be used for intersection - * @default undefined - */ shape1: T; - /** - * Precision of first shape to be used for meshing and computing intersection. - * Keep in mind that the lower this value is, the more triangles will be produced and thus the slower the computation. - * @default 0.01 - * @minimum 0 - * @maximum Infinity - * @step 0.01 - */ precision1?: number; - /** - * Second shape to be used for intersection - * @default undefined - */ shape2: T; - /** - * Precision of second shape to be used for meshing and computing intersection. - * Keep in mind that the lower this value is, the more triangles will be produced and thus the slower the computation. - * @default 0.01 - * @minimum 0 - * @maximum Infinity - * @step 0.01 - */ precision2?: number; } class MeshMeshesIntersectionOfShapesDto { constructor(shape?: T, shapes?: T[], precision?: number, precisionShapes?: number[]); - /** - * Shape to use for the base of computations - * @default undefined - */ shape?: T; - /** - * Precision of first shape to be used for meshing and computing intersection. - * Keep in mind that the lower this value is, the more triangles will be produced and thus the slower the computation. - * @default 0.01 - * @minimum 0 - * @maximum Infinity - * @step 0.01 - */ precision?: number; - /** - * Second shape to be used for intersection - * @default undefined - */ shapes?: T[]; - /** - * Precision of shapes to be used, if undefined, a universal precision will be used of the first shape - * @default undefined - * @optional true - */ precisionShapes?: number[]; } class CompareShapesDto { constructor(shape?: T, otherShape?: T); - /** - * Shape to be compared - * @default undefined - */ shape: T; - /** - * Shape to be compared against - * @default undefined - */ otherShape: T; } class FixSmallEdgesInWireDto { constructor(shape?: T, lockvtx?: boolean, precsmall?: number); - /** - * Shape on which action should be performed - * @default undefined - */ shape: T; - /** - * Lock vertex. If true, the edge must be kept. - * @default false - */ lockvtx: boolean; - /** - * Definition of the small distance edge - * @default 0 - * @minimum 0 - * @maximum Infinity - * @step 0.0000000001 - */ precsmall: number; } class BasicShapeRepairDto { constructor(shape?: T, precision?: number, maxTolerance?: number, minTolerance?: number); - /** - * Shape to repair - * @default undefined - */ shape: T; - /** - * Basic precision - * @default 0.001 - * @minimum 0 - * @maximum Infinity - * @step 0.0000000001 - */ precision: number; - /** - * maximum allowed tolerance. All problems will be detected for cases when a dimension of invalidity is larger than - * the basic precision or a tolerance of sub-shape on that problem is detected. The maximum tolerance value limits - * the increasing tolerance for fixing a problem such as fix of not connected and self-intersected wires. If a value - * larger than the maximum allowed tolerance is necessary for correcting a detected problem the problem can not be fixed. - * The maximal tolerance is not taking into account during computation of tolerance of edges - * @default 0.01 - * @minimum 0 - * @maximum Infinity - * @step 0.0000000001 - */ maxTolerance: number; - /** - * minimal allowed tolerance. It defines the minimal allowed length of edges. - * Detected edges having length less than the specified minimal tolerance will be removed. - * @default 0.0001 - * @minimum 0 - * @maximum Infinity - * @step 0.0000000001 - */ minTolerance: number; } class FixClosedDto { constructor(shape?: T, precision?: number); - /** - * Shape on which action should be performed - * @default undefined - */ shape: T; - /** - * Precision for closed wire - * @default -0.1 - * @minimum -Infinity - * @maximum Infinity - * @step 0.0000000001 - */ precision: number; } class ShapesWithToleranceDto { constructor(shapes?: T[], tolerance?: number); - /** - * The shapes - * @default undefined - */ shapes: T[]; - /** - * Tolerance used for intersections - * @default 1.0e-7 - * @minimum 0 - * @maximum Infinity - * @step 0.000001 - */ tolerance: number; } class ShapeWithToleranceDto { constructor(shape?: T, tolerance?: number); - /** - * The shape - * @default undefined - */ shape: T; - /** - * Tolerance used for intersections - * @default 1.0e-7 - * @minimum 0 - * @maximum Infinity - * @step 0.000001 - */ tolerance: number; } class ShapeIndexDto { constructor(shape?: T, index?: number); - /** - * Shape - * @default undefined - */ shape: T; - /** - * Index of the entity - * @default 0 - * @minimum 0 - * @maximum Infinity - * @step 1 - */ index: number; } class EdgeIndexDto { constructor(shape?: T, index?: number); - /** - * Shape - * @default undefined - */ shape: T; - /** - * Index of the entity - * @default 1 - * @minimum 1 - * @maximum Infinity - * @step 1 - */ index: number; } class RotationExtrudeDto { constructor(shape?: T, height?: number, angle?: number, makeSolid?: boolean); - /** - * Wire to extrude by rotating - * @default undefined - */ shape: T; - /** - * Height of rotation - * @default 1 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ height: number; - /** - * Rotation in degrees - * @default 360 - * @minimum 0 - * @maximum 360 - * @step 1 - */ angle: number; - /** - * Make solid of the result - * @default true - */ makeSolid: boolean; } class ThickSolidByJoinDto { constructor(shape?: T, shapes?: T[], offset?: number, tolerance?: number, intersection?: boolean, selfIntersection?: boolean, joinType?: joinTypeEnum, removeIntEdges?: boolean); - /** - * Shape to make thick - * @default undefined - */ shape: T; - /** - * closing faces - * @default undefined - */ shapes: T[]; - /** - * Offset to apply - * @default 1 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ offset: number; - /** - * Tolerance defines the tolerance criterion for coincidence in generated shapes - * @default 1.0e-3 - * @minimum 0 - * @maximum Infinity - * @step 0.000001 - */ tolerance: number; - /** - * if Intersection is false (default value), the intersection is calculated with the parallels to the two adjacent shapes - * @default false - */ intersection: boolean; - /** - * SelfInter tells the algorithm whether a computation to eliminate self-intersections needs to be applied to the resulting shape. However, as this functionality is not yet implemented, you should use the default value (false) - * @default false - */ selfIntersection: boolean; - /** - * Join defines how to fill the holes that may appear between parallels to the two adjacent faces. It may take values GeomAbs_Arc or GeomAbs_Intersection: - * if Join is equal to GeomAbs_Arc, then pipes are generated between two free edges of two adjacent parallels, and spheres are generated on "images" of vertices; it is the default value - * @default arc - */ joinType: joinTypeEnum; - /** - * if Join is equal to GeomAbs_Intersection, then the parallels to the two adjacent faces are enlarged and intersected, so that there are no free edges on parallels to faces. RemoveIntEdges flag defines whether to remove the INTERNAL edges from the result or not. Warnings Since the algorithm of MakeThickSolid is based on MakeOffsetShape algorithm, the warnings are the same as for MakeOffsetShape. - * @default false - */ removeIntEdges: boolean; } class TransformDto { constructor(shape?: T, translation?: Base.Vector3, rotationAxis?: Base.Vector3, rotationAngle?: number, scaleFactor?: number); - /** - * Shape to transform - * @default undefined - */ shape: T; - /** - * Translation to apply - * @default [0,0,0] - */ translation: Base.Vector3; - /** - * Rotation to apply - * @default [0,1,0] - */ rotationAxis: Base.Vector3; - /** - * Rotation degrees - * @default 0 - * @minimum 0 - * @maximum 360 - * @step 1 - */ rotationAngle: number; - /** - * Scale factor to apply - * @default 1 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ scaleFactor: number; } class TransformShapesDto { constructor(shapes?: T[], translation?: Base.Vector3[], rotationAxes?: Base.Vector3[], rotationDegrees?: number[], scaleFactors?: number[]); - /** - * Shape to transform - * @default undefined - */ shapes: T[]; - /** - * Translation to apply - * @default [[0,0,0]] - */ translations: Base.Vector3[]; - /** - * Rotation to apply - * @default [[0,1,0]] - */ rotationAxes: Base.Vector3[]; - /** - * Rotation degrees - * @default [0] - */ rotationAngles: number[]; - /** - * Scale factor to apply - * @default [1] - */ scaleFactors: number[]; } class TranslateDto { constructor(shape?: T, translation?: Base.Vector3); - /** - * Shape for translation - * @default undefined - */ shape: T; - /** - * Translation vector - * @default [0, 0, 0] - */ translation: Base.Vector3; } class TranslateShapesDto { constructor(shapes?: T[], translations?: Base.Vector3[]); - /** - * Shape for translation - * @default undefined - */ shapes: T[]; - /** - * Translation vector - * @default [[0, 0, 0]] - */ translations: Base.Vector3[]; } class AlignNormAndAxisDto { constructor(shape?: T, fromOrigin?: Base.Point3, fromNorm?: Base.Vector3, fromAx?: Base.Vector3, toOrigin?: Base.Point3, toNorm?: Base.Vector3, toAx?: Base.Vector3); - /** - * Shape for translation - * @default undefined - */ shape: T; - /** - * @default [0, 0, 0] - */ fromOrigin: Base.Point3; - /** - * From direction 1 - * @default [0, 0, 1] - */ fromNorm: Base.Vector3; - /** - * From direction 2 - * @default [0, 0, 1] - */ fromAx: Base.Vector3; - /** - * To origin - * @default [0, 1, 0] - */ toOrigin: Base.Point3; - /** - * To direction 1 - * @default [0, 1, 0] - */ toNorm: Base.Vector3; - /** - * To direction 2 - * @default [0, 0, 1] - */ toAx: Base.Vector3; } class AlignDto { constructor(shape?: T, fromOrigin?: Base.Point3, fromDirection?: Base.Vector3, toOrigin?: Base.Point3, toDirection?: Base.Vector3); - /** - * Shape for translation - * @default undefined - */ shape: T; - /** - * @default [0, 0, 0] - */ fromOrigin: Base.Point3; - /** - * From direction - * @default [0, 0, 1] - */ fromDirection: Base.Vector3; - /** - * To origin - * @default [0, 1, 0] - */ toOrigin: Base.Point3; - /** - * To direction - * @default [0, 1, 0] - */ toDirection: Base.Vector3; } class AlignShapesDto { constructor(shapes?: T[], fromOrigins?: Base.Vector3[], fromDirections?: Base.Vector3[], toOrigins?: Base.Vector3[], toDirections?: Base.Vector3[]); - /** - * Shape for translation - * @default undefined - */ shapes: T[]; - /** - * @default [[0, 0, 0]] - */ fromOrigins: Base.Point3[]; - /** - * From direction - * @default [[0, 0, 1]] - */ fromDirections: Base.Vector3[]; - /** - * To origin - * @default [[0, 1, 0]] - */ toOrigins: Base.Point3[]; - /** - * To direction - * @default [[0, 1, 0]] - */ toDirections: Base.Vector3[]; } class MirrorDto { constructor(shape?: T, origin?: Base.Point3, direction?: Base.Vector3); - /** - * Shape to mirror - * @default undefined - */ shape: T; - /** - * Axis origin point - * @default [0, 0, 0] - */ origin: Base.Point3; - /** - * Axis direction vector - * @default [0, 0, 1] - */ direction: Base.Vector3; } class MirrorShapesDto { constructor(shapes?: T[], origins?: Base.Point3[], directions?: Base.Vector3[]); - /** - * Shape to mirror - * @default undefined - */ shapes: T[]; - /** - * Axis origin point - * @default [[0, 0, 0]] - */ origins: Base.Point3[]; - /** - * Axis direction vector - * @default [[0, 0, 1]] - */ directions: Base.Vector3[]; } class MirrorAlongNormalDto { constructor(shape?: T, origin?: Base.Point3, normal?: Base.Vector3); - /** - * Shape to mirror - * @default undefined - */ shape: T; - /** - * Axis origin point - * @default [0, 0, 0] - */ origin: Base.Point3; - /** - * First normal axis direction vector - * @default [0, 0, 1] - */ normal: Base.Vector3; } class MirrorAlongNormalShapesDto { constructor(shapes?: T[], origins?: Base.Point3[], normals?: Base.Vector3[]); - /** - * Shape to mirror - * @default undefined - */ shapes: T[]; - /** - * Axis origin point - * @default [[0, 0, 0]] - */ origins: Base.Point3[]; - /** - * First normal axis direction vector - * @default [[0, 0, 1]] - */ normals: Base.Vector3[]; } class AlignAndTranslateDto { constructor(shape?: T, direction?: Base.Vector3, center?: Base.Vector3); - /** - * Shape to align and translate - * @default undefined - */ shape: T; - /** - * Direction on which to align - * @default [0, 0, 1] - */ direction: Base.Vector3; - /** - * Position to translate - */ center: Base.Vector3; } class UnifySameDomainDto { constructor(shape?: T, unifyEdges?: boolean, unifyFaces?: boolean, concatBSplines?: boolean); - /** - * Shape on which action should be performed - * @default undefined - */ shape: T; - /** - * If true, unifies the edges - * @default true - */ unifyEdges: boolean; - /** - * If true, unifies the edges - * @default true - */ unifyFaces: boolean; - /** - * If true, unifies the edges - * @default true - */ concatBSplines: boolean; } class FilterFacesPointsDto { constructor(shapes?: T[], points?: Base.Point3[], tolerance?: number, useBndBox?: boolean, gapTolerance?: number, keepIn?: boolean, keepOn?: boolean, keepOut?: boolean, keepUnknown?: boolean, flatPointsArray?: boolean); - /** - * Face that will be used to filter points - * @default undefined - */ shapes: T[]; - /** - * Points to filter - * @default undefined - */ points: Base.Point3[]; - /** - * Tolerance used for filter - * @default 1.0e-4 - * @minimum 0 - * @maximum Infinity - * @step 0.000001 - */ tolerance: number; - /** - * If true, the bounding box will be used to prefilter the points so that there are less points to check on actual face. - * Recommended to enable if face has more than 10 edges and geometry is mostly spline. - * This might be faster, but if it is known that points are withing bounding box, this may not be faster. - * @default false - */ useBndBox: boolean; - /** - * Gap tolerance - * @default 0.1 - * @minimum 0 - * @maximum Infinity - * @step 0.01 - */ gapTolerance: number; - /** - * Return points that are inside the face - * @default true - */ keepIn: boolean; - /** - * Return points that are on the border of the face - * @default true - */ keepOn: boolean; - /** - * Return points that are outside the borders of the face - * @default false - */ keepOut: boolean; - /** - * Return points that are classified as unknown - * @default false - */ keepUnknown: boolean; - /** - * Returns flat points array by default, otherwise returns points for each face in order provided - * @default true - */ flatPointsArray: boolean; } class FilterFacePointsDto { constructor(shape?: T, points?: Base.Point3[], tolerance?: number, useBndBox?: boolean, gapTolerance?: number, keepIn?: boolean, keepOn?: boolean, keepOut?: boolean, keepUnknown?: boolean); - /** - * Face that will be used to filter points - * @default undefined - */ shape: T; - /** - * Points to filter - * @default undefined - */ points: Base.Point3[]; - /** - * Tolerance used for filter - * @default 1.0e-4 - * @minimum 0 - * @maximum Infinity - * @step 0.000001 - */ tolerance: number; - /** - * If true, the bounding box will be used to prefilter the points so that there are less points to check on actual face. - * Recommended to enable if face has more than 10 edges and geometry is mostly spline. - * This might be faster, but if it is known that points are withing bounding box, this may not be faster. - * @default false - */ useBndBox: boolean; - /** - * Gap tolerance - * @default 0.1 - * @minimum 0 - * @maximum Infinity - * @step 0.01 - */ gapTolerance: number; - /** - * Return points that are inside the face - * @default true - */ keepIn: boolean; - /** - * Return points that are on the border of the face - * @default true - */ keepOn: boolean; - /** - * Return points that are outside the borders of the face - * @default false - */ keepOut: boolean; - /** - * Return points that are classified as unknown - * @default false - */ keepUnknown: boolean; } class FilterSolidPointsDto { constructor(shape?: T, points?: Base.Point3[], tolerance?: number, keepIn?: boolean, keepOn?: boolean, keepOut?: boolean, keepUnknown?: boolean); - /** - * Face that will be used to filter points - * @default undefined - */ shape: T; - /** - * Points to filter - * @default undefined - */ points: Base.Point3[]; - /** - * Tolerance used for filter - * @default 1.0e-4 - * @minimum 0 - * @maximum Infinity - * @step 0.000001 - */ tolerance: number; - /** - * Return points that are inside the face - * @default true - */ keepIn: boolean; - /** - * Return points that are on the border of the face - * @default true - */ keepOn: boolean; - /** - * Return points that are outside the borders of the face - * @default false - */ keepOut: boolean; - /** - * Return points that are classified as unknown - * @default false - */ keepUnknown: boolean; } class AlignAndTranslateShapesDto { constructor(shapes?: T[], directions?: Base.Vector3[], centers?: Base.Vector3[]); - /** - * Shapes to align and translate - * @default undefined - */ shapes: T[]; - /** - * Directions on which to align - * @default [0, 0, 1] - */ directions: Base.Vector3[]; - /** - * Positions to translate - */ centers: Base.Vector3[]; } class RotateDto { constructor(shape?: T, axis?: Base.Vector3, angle?: number); - /** - * Shape to rotate - * @default undefined - */ shape: T; - /** - * Axis on which to rotate - * @default [0, 0, 1] - */ axis: Base.Vector3; - /** - * Rotation degrees - * @default 0 - * @minimum 0 - * @maximum 360 - * @step 1 - */ angle: number; } class RotateAroundCenterDto { constructor(shape?: T, angle?: number, center?: Base.Point3, axis?: Base.Vector3); - /** - * Shape to rotate - * @default undefined - */ shape: T; - /** - * Angle of rotation to apply - * @default 0 - */ angle: number; - /** - * Center of the rotation - * @default [0, 0, 0] - */ center: Base.Point3; - /** - * Axis around which to rotate - * @default [0, 0, 1] - */ axis: Base.Vector3; } class RotateShapesDto { constructor(shapes?: T[], axes?: Base.Vector3[], angles?: number[]); - /** - * Shape to rotate - * @default undefined - */ shapes: T[]; - /** - * Axis on which to rotate - * @default [[0, 0, 1]] - */ axes: Base.Vector3[]; - /** - * Rotation degrees - * @default [0] - */ angles: number[]; } class RotateAroundCenterShapesDto { constructor(shapes?: T[], angles?: number[], centers?: Base.Point3[], axes?: Base.Vector3[]); - /** - * Shape to scale - * @default undefined - */ shapes: T[]; - /** - * Angles of rotation to apply - * @default [0] - */ angles: number[]; - /** - * Centers around which to rotate - * @default [[0, 0, 0]] - */ centers: Base.Point3[]; - /** - * Axes around which to rotate - * @default [[0, 0, 1]] - */ axes: Base.Vector3[]; } class ScaleDto { constructor(shape?: T, factor?: number); - /** - * Shape to scale - * @default undefined - */ shape: T; - /** - * Scale factor to apply - * @default 1 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ factor: number; } class ScaleShapesDto { constructor(shapes?: T[], factors?: number[]); - /** - * Shape to scale - * @default undefined - */ shapes: T[]; - /** - * Scale factor to apply - * @default [1] - */ factors: number[]; } class Scale3DDto { constructor(shape?: T, scale?: Base.Vector3, center?: Base.Point3); - /** - * Shape to scale - * @default undefined - */ shape: T; - /** - * Scale factor to apply - * @default [1, 1, 1] - */ scale: Base.Vector3; - /** - * Scale from the center - * @default [0, 0, 0] - */ center: Base.Point3; } class Scale3DShapesDto { constructor(shapes?: T[], scales?: Base.Vector3[], centers?: Base.Point3[]); - /** - * Shape to scale - * @default undefined - */ shapes: T[]; - /** - * Scale factor to apply - * @default [[1, 1, 1]] - */ scales: Base.Vector3[]; - /** - * Scale from the center - * @default [[0, 0, 0]] - */ centers: Base.Point3[]; } class ShapeToMeshDto { constructor(shape?: T, precision?: number, adjustYtoZ?: boolean); - /** - * Shape to save - * @default undefined - */ shape: T; - /** - * Precision of the mesh - * @default 0.01 - * @minimum 0 - * @maximum Infinity - * @step 0.001 - */ precision: number; - /** - * Adjust Y (up) coordinate system to Z (up) coordinate system - * @default false - */ adjustYtoZ: boolean; } class ShapeFacesToPolygonPointsDto { constructor(shape?: T, precision?: number, adjustYtoZ?: boolean, reversedPoints?: boolean); - /** - * Shape to save - * @default undefined - */ shape: T; - /** - * Precision of the mesh - * @default 0.01 - * @minimum 0 - * @maximum Infinity - * @step 0.001 - */ precision: number; - /** - * Adjust Y (up) coordinate system to Z (up) coordinate system - * @default false - */ adjustYtoZ: boolean; - /** - * Reverse the order of the points describing the polygon because some CAD kernels use the opposite order - * @default false - */ reversedPoints: boolean; } class ShapesToMeshesDto { constructor(shapes?: T[], precision?: number, adjustYtoZ?: boolean); - /** - * Shapes to transform - * @default undefined - */ shapes: T[]; - /** - * Precision of the mesh - * @default 0.01 - * @minimum 0 - * @maximum Infinity - * @step 0.001 - */ precision: number; - /** - * Adjust Y (up) coordinate system to Z (up) coordinate system - * @default false - */ adjustYtoZ: boolean; } class SaveStepDto { constructor(shape?: T, fileName?: string, adjustYtoZ?: boolean, tryDownload?: boolean); - /** - * Shape to save - * @default undefined - */ shape: T; - /** - * File name - * @default shape.step - */ fileName: string; - /** - * Adjust Y (up) coordinate system to Z (up) coordinate system - * @default false - */ adjustYtoZ: boolean; - /** - * Will assume that the shape is created in right handed coordinate system environment - * and will compensate by not mirroring the shape along z axis - * @default false - */ fromRightHanded?: boolean; - /** - * Will attempt to downlaod the file if that is possible - * @default true - */ tryDownload?: boolean; } class SaveStlDto { constructor(shape?: T, fileName?: string, precision?: number, adjustYtoZ?: boolean, tryDownload?: boolean, binary?: boolean); - /** - * Shape to save - * @default undefined - */ shape: T; - /** - * File name - * @default shape.stl - */ fileName: string; - /** - * Precision of the mesh - lower means higher res - * @default 0.01 - */ precision: number; - /** - * Adjust Y (up) coordinate system to Z (up) coordinate system - * @default false - */ adjustYtoZ: boolean; - /** - * Try download the file if that is possible - * @default true - */ tryDownload?: boolean; - /** - * Generate binary STL file - * @default true - */ binary?: boolean; } + class ShapeToDxfPathsDto { + constructor(shape?: T, angularDeflection?: number, curvatureDeflection?: number, minimumOfPoints?: number, uTolerance?: number, minimumLength?: number); + shape: T; + angularDeflection: number; + curvatureDeflection: number; + minimumOfPoints: number; + uTolerance: number; + minimumLength: number; + } + class DxfPathsWithLayerDto { + constructor(paths?: IO.DxfPathDto[], layer?: string, color?: Base.Color); + paths: IO.DxfPathDto[]; + layer: string; + color: Base.Color; + } + class DxfPathsPartsListDto { + constructor(pathsParts?: IO.DxfPathsPartDto[], colorFormat?: dxfColorFormatEnum, acadVersion?: dxfAcadVersionEnum, tryDownload?: boolean); + pathsParts: IO.DxfPathsPartDto[]; + colorFormat: dxfColorFormatEnum; + acadVersion: dxfAcadVersionEnum; + fileName?: string; + tryDownload?: boolean; + } + class SaveDxfDto { + constructor(shape?: T, fileName?: string, tryDownload?: boolean, angularDeflection?: number, curvatureDeflection?: number, minimumOfPoints?: number, uTolerance?: number, minimumLength?: number); + shape: T; + fileName: string; + tryDownload?: boolean; + angularDeflection: number; + curvatureDeflection: number; + minimumOfPoints: number; + uTolerance: number; + minimumLength: number; + } class ImportStepIgesFromTextDto { constructor(text?: string, fileType?: fileTypeEnum, adjustZtoY?: boolean); - /** - * The text that represents step or iges contents - * @default undefined - */ text: string; - /** - */ fileType: fileTypeEnum; - /** - * Adjusts models that use Z coordinate as up to Y up system. - * @default true - */ adjustZtoY: boolean; } class ImportStepIgesDto { constructor(assetFile?: File, adjustZtoY?: boolean); - /** - * The name of the asset to store in the cache. - * @default undefined - */ assetFile: File; - /** - * Adjusts models that use Z coordinate as up to Y up system. - * @default true - */ adjustZtoY: boolean; } class LoadStepOrIgesDto { constructor(filetext?: string | ArrayBuffer, fileName?: string, adjustZtoY?: boolean); - /** - * File text - * @default undefined - */ filetext: string | ArrayBuffer; - /** - * File name - * @default shape.igs - */ fileName: string; - /** - * Adjusts models that use Z coordinate as up to Y up system. - * @default true - */ adjustZtoY: boolean; } class CompoundShapesDto { constructor(shapes?: T[]); - /** - * Shapes to add to compound - * @default undefined - */ shapes: T[]; } class ThisckSolidSimpleDto { constructor(shape?: T, offset?: number); - /** - * Shape to make thick - * @default undefined - */ shape: T; - /** - * Offset distance - * @default 1 - * @minimum -Infinity - * @maximum Infinity - * @step 0.1 - */ offset: number; } class Offset3DWireDto { constructor(shape?: T, offset?: number, direction?: Base.Vector3); - /** - * Shape to make thick - * @default undefined - */ shape: T; - /** - * Offset distance - * @default 1 - * @minimum -Infinity - * @maximum Infinity - * @step 0.1 - */ offset: number; - /** - * Direction normal of the plane for the offset - * @default [0, 1, 0] - */ direction: Base.Vector3; } class FaceFromWireDto { constructor(shape?: T, planar?: boolean); - /** - * Wire shape to convert into a face - * @default undefined - */ shape: T; - /** - * Should plane be planar - * @default false - */ planar: boolean; } class FaceFromWireOnFaceDto { constructor(wire?: T, face?: U, inside?: boolean); - /** - * Wire shape to convert into a face - * @default undefined - */ wire: T; - /** - * Face to attach the wire to - * @default undefined - */ face: U; - /** - * Indication if wire is inside the surface or outside - * @default true - */ inside: boolean; } class FacesFromWiresOnFaceDto { constructor(wires?: T[], face?: U, inside?: boolean); - /** - * Wire shape to convert into a face - * @default undefined - */ wires: T[]; - /** - * Face to attach the wires to - * @default undefined - */ face: U; - /** - * Indication if wire is inside the surface or outside - * @default true - */ inside: boolean; } class FaceFromWiresDto { constructor(shapes?: T[], planar?: boolean); - /** - * Wire shapes to convert into a faces - * @default undefined - */ shapes: T[]; - /** - * Should plane be planar - * @default false - */ planar: boolean; } class FacesFromWiresDto { constructor(shapes?: T[], planar?: boolean); - /** - * Wire shapes to convert into a faces - * @default undefined - */ shapes: T[]; - /** - * Should plane be planar - * @default false - */ planar: boolean; } class FaceFromWiresOnFaceDto { constructor(wires?: T[], face?: U, inside?: boolean); - /** - * Wire shapes to convert into a faces - * @default undefined - */ wires: T[]; - /** - * Guide face to use as a base - * @default undefined - */ face: U; - /** - * Indication if wire is inside the surface or outside - * @default true - */ inside: boolean; } class SewDto { - constructor(shapes: T[], tolerance?: number); - /** - * Faces to construct a shell from - * @default undefined - */ + constructor(shapes?: T[], tolerance?: number); shapes: T[]; - /** - * Tolerance of sewing - * @default 1.0e-7 - * @minimum 0 - * @maximum Infinity - * @step 0.00001 - */ tolerance: number; } class FaceIsoCurveAtParamDto { constructor(shape?: T, param?: number, dir?: "u" | "v"); - /** - * Face shape - * @default undefined - */ shape: T; - /** - * Param at which to find isocurve - * @default 0.5 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ param: number; - /** - * Direction to find the isocurve - * @default u - */ dir: "u" | "v"; } class DivideFaceToUVPointsDto { constructor(shape?: T, nrOfPointsU?: number, nrOfPointsV?: number, flat?: boolean); - /** - * Face shape - * @default undefined - */ shape: T; - /** - * Number of points on U direction - * @default 10 - * @minimum 1 - * @maximum Infinity - * @step 1 - */ nrOfPointsU: number; - /** - * Number of points on V direction - * @default 10 - * @minimum 1 - * @maximum Infinity - * @step 1 - */ nrOfPointsV: number; - /** - * Flatten the output - * @default false - */ flat: boolean; } class Geom2dEllipseDto { constructor(center?: Base.Point2, direction?: Base.Vector2, radiusMinor?: number, radiusMajor?: number, sense?: boolean); - /** - * Center of the ellipse - * @default [0,0] - */ center: Base.Point2; - /** - * Direction of the vector - * @default [1,0] - */ direction: Base.Vector2; - /** - * Minor radius of an ellipse - * @default 1 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ radiusMinor: number; - /** - * Major radius of an ellipse - * @default 2 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ radiusMajor: number; - /** - * If true will sense the direction - * @default false - */ sense: boolean; } class Geom2dCircleDto { constructor(center?: Base.Point2, direction?: Base.Vector2, radius?: number, sense?: boolean); - /** - * Center of the circle - * @default [0,0] - */ center: Base.Point2; - /** - * Direction of the vector - * @default [1,0] - */ direction: Base.Vector2; - /** - * Radius of the circle - * @default 1 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ radius: number; - /** - * If true will sense the direction - * @default false - */ sense: boolean; } 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); - /** - * Height of the tree - * @default 6 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ height: number; - /** - * Inner distance of the branches on the bottom of the tree - * @default 1.5 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ innerDist: number; - /** - * Outer distance of the branches on the bottom of the tree - * @default 3 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ outerDist: number; - /** - * Number of skirts on the tree (triangle like shapes) - * @default 5 - * @minimum 1 - * @maximum Infinity - * @step 1 - */ nrSkirts: number; - /** - * Trunk height - * @default 1 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ trunkHeight: number; - /** - * Trunk width only applies if trunk height is more than 0 - * @default 1 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ trunkWidth: number; - /** - * Indicates wether only a half of the tree should be created - * @default false - */ half: boolean; - /** - * Rotation of the tree - * @default 0 - * @minimum 0 - * @maximum Infinity - * @step 15 - */ rotation: number; - /** - * Origin of the tree - * @default [0, 0, 0] - */ origin: Base.Point3; - /** - * Direction of the tree - * @default [0, 1, 0] - */ direction: Base.Vector3; } class StarDto { constructor(outerRadius?: number, innerRadius?: number, numRays?: number, center?: Base.Point3, direction?: Base.Vector3, offsetOuterEdges?: number, half?: boolean); - /** - * Center of the circle - * @default [0,0,0] - */ center: Base.Point3; - /** - * Direction - * @default [0, 1, 0] - */ direction: Base.Vector3; - /** - * Direction of the vector - * @default 7 - * @minimum 3 - * @maximum Infinity - * @step 1 - */ numRays: number; - /** - * Angle of the rays - * @default 2 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ outerRadius: number; - /** - * Angle of the rays - * @default 1 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ innerRadius: number; - /** - * Offsets outer edge cornerners along the direction vector - * @default 0 - * @minimum -Infinity - * @maximum Infinity - * @step 0.1 - */ offsetOuterEdges?: number; - /** - * Construct half of the star - * @default false - */ half: boolean; } class ParallelogramDto { constructor(center?: Base.Point3, direction?: Base.Vector3, aroundCenter?: boolean, width?: number, height?: number, angle?: number); - /** - * Center of the circle - * @default [0, 0, 0] - */ center: Base.Point3; - /** - * Direction - * @default [0, 1, 0] - */ direction: Base.Vector3; - /** - * Indicates whether to draw the parallelogram around the center point or start from corner. - * @default true - */ aroundCenter: boolean; - /** - * Width of bounding rectangle - * @default 2 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ width: number; - /** - * Height of bounding rectangle - * @default 1 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ height: number; - /** - * Sharp angle of the parallelogram - * @default 15 - * @minimum -Infinity - * @maximum Infinity - * @step 1 - */ angle: number; } class Heart2DDto { constructor(center?: Base.Point3, direction?: Base.Vector3, rotation?: number, sizeApprox?: number); - /** - * Center of the circle - * @default [0, 0, 0] - */ center: Base.Point3; - /** - * Direction - * @default [0, 1, 0] - */ direction: Base.Vector3; - /** - * Rotation of the hear - * @default 0 - * @minimum 0 - * @maximum Infinity - * @step 15 - */ rotation: number; - /** - * Size of the bounding box within which the heart gets drawn - * @default 2 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ sizeApprox: number; } class NGonWireDto { constructor(center?: Base.Point3, direction?: Base.Vector3, nrCorners?: number, radius?: number); - /** - * Center of the circle - * @default [0, 0, 0] - */ center: Base.Point3; - /** - * Direction - * @default [0, 1, 0] - */ direction: Base.Vector3; - /** - * How many corners to create. - * @default 6 - * @minimum 3 - * @maximum Infinity - * @step 1 - */ nrCorners: number; - /** - * Radius of nGon - * @default 1 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ radius: number; } class EllipseDto { constructor(center?: Base.Point3, direction?: Base.Vector3, radiusMinor?: number, radiusMajor?: number); - /** - * Center of the ellipse - * @default [0, 0, 0] - */ center: Base.Point3; - /** - * Direction of the vector - * @default [0, 1, 0] - */ direction: Base.Vector3; - /** - * Minor radius of an ellipse - * @default 1 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ radiusMinor: number; - /** - * Major radius of an ellipse - * @default 2 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ radiusMajor: number; } class TextWiresDto { constructor(text?: string, xOffset?: number, yOffset?: number, height?: number, lineSpacing?: number, letterSpacing?: number, align?: Base.horizontalAlignEnum, extrudeOffset?: number, origin?: Base.Point3, rotation?: number, direction?: Base.Vector3, centerOnOrigin?: boolean); - /** - * The text - * @default Hello World - */ text?: string; - /** - * The x offset - * @default 0 - * @minimum -Infinity - * @maximum Infinity - * @step 0.1 - */ xOffset?: number; - /** - * The y offset - * @default 0 - * @minimum -Infinity - * @maximum Infinity - * @step 0.1 - */ yOffset?: number; - /** - * The height of the text - * @default 1 - * @minimum -Infinity - * @maximum Infinity - * @step 0.1 - */ height?: number; - /** - * The line spacing - * @default 2 - * @minimum -Infinity - * @maximum Infinity - * @step 0.1 - */ lineSpacing?: number; - /** - * The letter spacing offset - * @default 0 - * @minimum -Infinity - * @maximum Infinity - * @step 0.1 - */ letterSpacing?: number; - /** - * The extrude offset - * @default left - */ align?: Base.horizontalAlignEnum; - /** - * The extrude offset - * @default 0 - * @minimum -Infinity - * @maximum Infinity - * @step 0.1 - */ extrudeOffset?: number; - /** - * Indicates whether to center text on origin - * @default false - */ centerOnOrigin: boolean; } class GeomCylindricalSurfaceDto { constructor(radius?: number, center?: Base.Point3, direction?: Base.Vector3); - /** - * Radius of the cylindrical surface - * @default 1 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ radius: number; - /** - * Center of the cylindrical surface - * @default [0, 0, 0] - */ center: Base.Point3; - /** - * Axis of direction for cylindrical surface - * @default [0, 1, 0] - */ direction: Base.Vector3; } class Geom2dTrimmedCurveDto { constructor(shape?: T, u1?: number, u2?: number, sense?: boolean, adjustPeriodic?: boolean); - /** - * 2D Curve to trim - * @default undefined - */ shape: T; - /** - * First param on the curve for trimming. U1 can be greater or lower than U2. The returned curve is oriented from U1 to U2. - * @default 0 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ u1: number; - /** - * Second parameter on the curve for trimming - * @default 1 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ u2: number; - /** - * If the basis curve C is periodic there is an ambiguity because two parts are available. - * In this case by default the trimmed curve has the same orientation as the basis curve (Sense = True). - * If Sense = False then the orientation of the trimmed curve is opposite to the orientation of the basis curve C. - * @default true - */ sense: boolean; - /** - * If the curve is closed but not periodic it is not possible to keep the part of the curve including the - * junction point (except if the junction point is at the beginning or at the end of the trimmed curve) - * because you could lose the fundamental characteristics of the basis curve which are used for example - * to compute the derivatives of the trimmed curve. So for a closed curve the rules are the same as for a open curve. - * @default true - */ adjustPeriodic: boolean; } class Geom2dSegmentDto { constructor(start?: Base.Point2, end?: Base.Point2); - /** - * Start 2d point for segment - * @default [0, 0] - */ start: Base.Point2; - /** - * End 2d point for segment - * @default [1, 0] - */ end: Base.Point2; } class SliceDto { constructor(shape?: T, step?: number, direction?: Base.Vector3); - /** - * The shape to slice - * @default undefined - */ shape: T; - /** - * Step at which to divide the shape - * @default 0.1 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ step: number; - /** - * Direction vector - * @default [0, 1, 0] - */ direction: Base.Vector3; } class SliceInStepPatternDto { constructor(shape?: T, steps?: number[], direction?: Base.Vector3); - /** - * The shape to slice - * @default undefined - */ shape: T; - /** - * Steps that should be used for slicing. This array is going to be treated as a pattern - - * this menas that if the actual number of steps is lower than the number of steps in the pattern, the pattern will be repeated. - * @default [0.1, 0.2] - */ steps: number[]; - /** - * Direction vector - * @default [0, 1, 0] - */ direction: Base.Vector3; } class SimpleLinearLengthDimensionDto { - constructor(start?: Base.Point3, end?: Base.Point3, direction?: Base.Vector3, offsetFromPoints?: number, crossingSize?: number, labelSuffix?: string, labelSize?: number, labelOffset?: number); - /** - * The start point for dimension - * @default undefined - */ + constructor(start?: Base.Point3, end?: Base.Point3, direction?: Base.Vector3, offsetFromPoints?: number, crossingSize?: number, labelSuffix?: string, labelSize?: number, labelOffset?: number, labelRotation?: number, arrowType?: dimensionEndTypeEnum, arrowSize?: number, arrowAngle?: number, arrowsFlipped?: boolean, labelFlipHorizontal?: boolean, labelFlipVertical?: boolean, labelOverwrite?: string, removeTrailingZeros?: boolean); start: Base.Point3; - /** - * The end point for dimension - * @default undefined - */ end?: Base.Point3; - /** - * The dimension direction (must include length) - * @default undefined - */ direction?: Base.Vector3; - /** - * The dimension label - * @default 0 - * @minimum -Infinity - * @maximum Infinity - * @step 0.1 - */ offsetFromPoints?: number; - /** - * The dimension crossing size - * @default 0 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ crossingSize?: number; - /** - * The dimension label decimal places - * @default 2 - * @minimum 0 - * @maximum Infinity - * @step 1 - */ decimalPlaces?: number; - /** - * The dimension label suffix - * @default (cm) - */ labelSuffix?: string; - /** - * The dimension label size - * @default 0.1 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ labelSize?: number; - /** - * The dimension label offset - * @default 0.3 - * @minimum -Infinity - * @maximum Infinity - * @step 0.1 - */ labelOffset?: number; + labelRotation?: number; + endType?: dimensionEndTypeEnum; + arrowSize?: number; + arrowAngle?: number; + arrowsFlipped?: boolean; + labelFlipHorizontal?: boolean; + labelFlipVertical?: boolean; + labelOverwrite?: string; + removeTrailingZeros?: boolean; } class SimpleAngularDimensionDto { - constructor(direction1?: Base.Point3, direction2?: Base.Point3, center?: Base.Point3, radius?: number, offsetFromCenter?: number, crossingSize?: number, radians?: boolean, labelSuffix?: string, labelSize?: number, labelOffset?: number); - /** - * The first direction for dimension - * @default [1, 0, 0] - */ + constructor(direction1?: Base.Point3, direction2?: Base.Point3, center?: Base.Point3, radius?: number, offsetFromCenter?: number, crossingSize?: 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); direction1: Base.Point3; - /** - * The second direction for dimension - * @default [0, 0, 1] - */ direction2: Base.Point3; - /** - * The center point for dimension - * @default [0, 0, 0] - */ center: Base.Point3; - /** - * The dimension radius - * @default 4 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ radius: number; - /** - * Offset from center - * @default 0.5 - * @minimum -Infinity - * @maximum Infinity - * @step 0.1 - */ offsetFromCenter: number; - /** - * The dimension crossing size - * @default 0 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ extraSize: number; - /** - * The dimension label decimal places - * @default 2 - * @minimum 0 - * @maximum Infinity - * @step 1 - */ decimalPlaces: number; - /** - * The dimension label suffix - * @default (deg) - */ labelSuffix: string; - /** - * The dimension label size - * @default 0.1 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ labelSize: number; - /** - * The dimension label offset - * @default 0.3 - * @minimum -Infinity - * @maximum Infinity - * @step 0.1 - */ labelOffset: number; - /** - * If true the angle is in radians - * @default false - */ radians: boolean; + endType?: dimensionEndTypeEnum; + arrowSize?: number; + arrowAngle?: number; + arrowsFlipped?: boolean; + labelRotation?: number; + labelFlipHorizontal?: boolean; + labelFlipVertical?: boolean; + labelOverwrite?: string; + removeTrailingZeros?: boolean; } class PinWithLabelDto { - constructor(startPoint?: Base.Point3, endPoint?: Base.Point3, direction?: Base.Vector3, offsetFromStart?: number, label?: string, labelOffset?: number, labelSize?: number); - /** - * The start point for dimension - * @default [0, 0, 0] - */ + 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); startPoint: Base.Point3; - /** - * The end point for dimension - * @default [0, 5, 2] - */ endPoint?: Base.Point3; - /** - * The dimension direction (must include length) - * @default [0, 0, 1] - */ direction?: Base.Vector3; - /** - * Offset from the start point - * @default 0 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ offsetFromStart?: number; - /** - * The dimension label - * @default Pin - */ label?: string; - /** - * The dimension label offset - * @default 0.3 - * @minimum -Infinity - * @maximum Infinity - * @step 0.1 - */ labelOffset?: number; - /** - * The dimension label size - * @default 0.1 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ labelSize?: number; + endType?: dimensionEndTypeEnum; + arrowSize?: number; + arrowAngle?: number; + arrowsFlipped?: boolean; + labelRotation?: number; + labelFlipHorizontal?: boolean; + labelFlipVertical?: boolean; + } + 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); + extrusionLengthFront: number; + extrusionLengthBack: number; + } + class NGonSolidDto extends NGonWireDto { + constructor(center?: Base.Point3, direction?: Base.Vector3, nrCorners?: number, radius?: number, extrusionLengthFront?: number, extrusionLengthBack?: number); + extrusionLengthFront: number; + extrusionLengthBack: number; + } + class ParallelogramSolidDto extends ParallelogramDto { + constructor(center?: Base.Point3, direction?: Base.Vector3, aroundCenter?: boolean, width?: number, height?: number, angle?: number, extrusionLengthFront?: number, extrusionLengthBack?: number); + extrusionLengthFront: number; + extrusionLengthBack: number; + } + class HeartSolidDto extends Heart2DDto { + constructor(center?: Base.Point3, direction?: Base.Vector3, rotation?: number, sizeApprox?: number, extrusionLengthFront?: number, extrusionLengthBack?: number); + extrusionLengthFront: number; + extrusionLengthBack: number; + } + 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); + extrusionLengthFront: number; + extrusionLengthBack: number; + } + 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); + extrusionLengthFront: number; + extrusionLengthBack: number; } } declare namespace BabylonCamera { class ArcRotateCameraDto { constructor(radius?: number, alpha?: number, beta?: number, lowerRadiusLimit?: number, upperRadiusLimit?: number, lowerAlphaLimit?: number, upperAlphaLimit?: number, lowerBetaLimit?: number, upperBetaLimit?: number, angularSensibilityX?: number, angularSensibilityY?: number, panningSensibility?: number, wheelPrecision?: number, maxZ?: number); - /** - * Defines the camera distance from its target. This radius will be used to rotate the camera around the target as default. - * @default 20 - * @minimum 0 - * @maximum Infinity - * @step 1 - */ radius: number; - /** - * Target of the arc rotate camera. Camera will look at and rotate around this point by default. - * @default [0, 0, 0] - */ target: Base.Point3; - /** - * Defines the camera rotation along the longitudinal (horizontal) axis in degrees - * @default 45 - * @minimum -360 - * @maximum 360 - * @step 1 - */ alpha: number; - /** - * Defines the camera rotation along the latitudinal (vertical) axis in degrees. This is counted from top down, where 0 is looking from top straight down. - * @default 70 - * @minimum -360 - * @maximum 360 - * @step 1 - */ beta: number; - /** - * Lower radius limit - how close can the camera be to the target - * @default undefined - * @minimum -Infinity - * @maximum Infinity - * @step 1 - * @optional true - */ lowerRadiusLimit: any; - /** - * Upper radius limit - how far can the camera be from the target - * @default undefined - * @minimum -Infinity - * @maximum Infinity - * @step 1 - * @optional true - */ upperRadiusLimit: any; - /** - * Lower alpha limit - camera rotation along the longitudinal (horizontal) axis in degrees. - * @default undefined - * @minimum -360 - * @maximum 360 - * @step 1 - * @optional true - */ lowerAlphaLimit: any; - /** - * Upper alpha limit - camera rotation along the longitudinal (horizontal) axis in degrees. - * @default undefined - * @minimum -360 - * @maximum 360 - * @step 1 - * @optional true - */ upperAlphaLimit: any; - /** - * Lower beta limit - camera rotation along the latitudinal (vertical) axis in degrees. This is counted from the top down, where 0 is looking from top straight down. - * @default 1 - * @minimum -360 - * @maximum 360 - * @step 1 - */ lowerBetaLimit: number; - /** - * Upper beta limit - camera rotation along the longitudinal (vertical) axis in degrees. This is counted from the top down, where 180 is looking from bottom straight up. - * @default 179 - * @minimum -360 - * @maximum 360 - * @step 1 - */ upperBetaLimit: number; - /** - * Angular sensibility along x (horizontal) axis of the camera - * @default 1000 - * @minimum 0 - * @maximum Infinity - * @step 10 - */ angularSensibilityX: number; - /** - * Angular sensibility along y (vertical) axis of the camera - * @default 1000 - * @minimum 0 - * @maximum Infinity - * @step 10 - */ angularSensibilityY: number; - /** - * Panning sensibility. The lower this number gets the faster camera will move when panning. - * @default 1000 - * @minimum 0 - * @maximum Infinity - * @step 100 - */ panningSensibility: number; - /** - * Wheel precision. The lower this number gets the faster camera will move when zooming. - * @default 3 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ wheelPrecision: number; - /** - * Maximum distance the camera can see. Objects that are further away from the camera than this value will not be rendered. - * @default 1000 - * @minimum 0 - * @maximum Infinity - * @step 10 - */ maxZ: number; } class FreeCameraDto { constructor(position?: Base.Point3, target?: Base.Point3); - /** - * Position of the free camera - * @default [20, 20, 20] - */ position: Base.Point3; - /** - * Target of the free camera - * @default [0, 0, 0] - */ target: Base.Point3; } class TargetCameraDto { constructor(position?: Base.Point3, target?: Base.Point3); - /** - * Position of the free camera - * @default [20, 20, 20] - */ position: Base.Point3; - /** - * Target of the free camera - * @default [0, 0, 0] - */ target: Base.Point3; } class PositionDto { constructor(camera?: BABYLON.TargetCamera, position?: Base.Point3); - /** - * Target camera - */ camera: BABYLON.TargetCamera; - /** - * Position of the free camera - * @default [20, 20, 20] - */ position: Base.Point3; } class SpeedDto { constructor(camera?: BABYLON.TargetCamera, speed?: number); - /** - * Target camera - */ camera: BABYLON.TargetCamera; - /** - * speed of the camera - * @default 1 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ speed: number; } class TargetDto { constructor(camera?: BABYLON.TargetCamera, target?: Base.Point3); - /** - * Target camera - */ camera: BABYLON.TargetCamera; - /** - * target of the camera - * @default [0, 0, 0] - */ target: Base.Point3; } class MinZDto { constructor(camera?: BABYLON.Camera, minZ?: number); - /** - * Free camera - */ camera: BABYLON.Camera; - /** - * minZ of the camera - * @default 0 - * @minimum 0 - * @maximum Infinity - * @step 0.01 - */ minZ: number; } class MaxZDto { constructor(camera?: BABYLON.Camera, maxZ?: number); - /** - * Free camera - */ camera: BABYLON.Camera; - /** - * maxZ of the camera - * @default 1000 - * @minimum 0 - * @maximum Infinity - * @step 1 - */ maxZ: number; } class OrthographicDto { constructor(camera?: BABYLON.Camera, orthoLeft?: number, orthoRight?: number, orthoTop?: number, orthoBottom?: number); - /** - * Camera to adjust - */ camera: BABYLON.Camera; - /** - * Left side limit of the orthographic camera - * @default -1 - * @minimum -Infinity - * @maximum Infinity - * @step 1 - */ orthoLeft: number; - /** - * Right side limit of the orthographic camera - * @default 1 - * @minimum -Infinity - * @maximum Infinity - * @step 1 - */ orthoRight: number; - /** - * Bottom side limit of the orthographic camera - * @default -1 - * @minimum -Infinity - * @maximum Infinity - * @step 1 - */ orthoBottom: number; - /** - * Top side limit of the orthographic camera - * @default 1 - * @minimum -Infinity - * @maximum Infinity - * @step 1 - */ orthoTop: number; } class CameraDto { constructor(camera?: BABYLON.Camera); - /** - * Camera - */ camera: BABYLON.Camera; } - } declare namespace BabylonGaussianSplatting { + } + declare namespace BabylonGaussianSplatting { class CreateGaussianSplattingMeshDto { constructor(url?: string); - /** - * Babylon Mesh that needs to be updated - * @default undefined - */ url: string; } class GaussianSplattingMeshDto { constructor(babylonMesh?: BABYLON.GaussianSplattingMesh); - /** - * Gaussian Splatting Mesh that needs to be updated - */ babylonMesh: BABYLON.GaussianSplattingMesh; } - } declare namespace BabylonGizmo { + } + declare namespace BabylonGizmo { enum positionGizmoObservableSelectorEnum { - /** Fires an event when any of it's sub gizmos are dragged */ onDragStartObservable = "onDragStartObservable", - /** Fires an event when any of it's sub gizmos are being dragged */ onDragObservable = "onDragObservable", - /** Fires an event when any of it's sub gizmos are released from dragging */ onDragEndObservable = "onDragEndObservable" } enum rotationGizmoObservableSelectorEnum { - /** Fires an event when any of it's sub gizmos are dragged */ onDragStartObservable = "onDragStartObservable", - /** Fires an event when any of it's sub gizmos are being dragged */ onDragObservable = "onDragObservable", - /** Fires an event when any of it's sub gizmos are released from dragging */ onDragEndObservable = "onDragEndObservable" } enum scaleGizmoObservableSelectorEnum { - /** Fires an event when any of it's sub gizmos are dragged */ onDragStartObservable = "onDragStartObservable", - /** Fires an event when any of it's sub gizmos are being dragged */ onDragObservable = "onDragObservable", - /** Fires an event when any of it's sub gizmos are released from dragging */ onDragEndObservable = "onDragEndObservable" } enum boundingBoxGizmoObservableSelectorEnum { - /** - * Fired when a rotation anchor or scale box is dragged - */ onDragStartObservable = "onDragStartObservable", - /** - * Fired when a scale box is dragged - */ onScaleBoxDragObservable = "onScaleBoxDragObservable", - /** - * Fired when a scale box drag is ended - */ onScaleBoxDragEndObservable = "onScaleBoxDragEndObservable", - /** - * Fired when a rotation anchor is dragged - */ onRotationSphereDragObservable = "onRotationSphereDragObservable", - /** - * Fired when a rotation anchor drag is ended - */ onRotationSphereDragEndObservable = "onRotationSphereDragEndObservable" } class CreateGizmoDto { constructor(positionGizmoEnabled?: boolean, rotationGizmoEnabled?: boolean, scaleGizmoEnabled?: boolean, boundingBoxGizmoEnabled?: boolean, attachableMeshes?: BABYLON.AbstractMesh[], clearGizmoOnEmptyPointerEvent?: boolean, scaleRatio?: number, usePointerToAttachGizmos?: boolean); - /** - * Enable position gizmo - * @default true - */ positionGizmoEnabled: boolean; - /** - * Enable rotation gizmo - * @default false - */ rotationGizmoEnabled: boolean; - /** - * Enable scale gizmo - * @default false - */ scaleGizmoEnabled: boolean; - /** - * Enable bounding box gizmo - * @default false - */ boundingBoxGizmoEnabled: boolean; - /** - * Use pointer to attach gizmos - * @default true - */ usePointerToAttachGizmos: boolean; - /** - * Clear gizmo on empty pointer event - * @default false - */ clearGizmoOnEmptyPointerEvent: boolean; - /** - * Scale ratio - * @default 1 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ scaleRatio: number; - /** - * Attachable meshes - * @default undefined - */ attachableMeshes: BABYLON.AbstractMesh[]; } class GizmoDto { constructor(gizmo?: BABYLON.IGizmo); - /** - * Gizmo to use - * @default undefined - */ gizmo: BABYLON.IGizmo; } class SetGizmoScaleRatioDto { constructor(gizmo?: BABYLON.IGizmo, scaleRatio?: number); - /** - * gizmo - * @default undefined - */ gizmo: BABYLON.IGizmo; - /** - * Scale ratio - * @default 1 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ scaleRatio: number; } class GizmoManagerDto { constructor(gizmoManager?: BABYLON.GizmoManager); - /** - * Gizmo manager to use - * @default undefined - */ gizmoManager: BABYLON.GizmoManager; } class PositionGizmoDto { constructor(gizmoManager?: BABYLON.IPositionGizmo); - /** - * Gizmo manager to use - * @default undefined - */ positionGizmo: BABYLON.IPositionGizmo; } class SetPlanarGizmoEnabled { constructor(positionGizmo?: BABYLON.IPositionGizmo, planarGizmoEnabled?: boolean); - /** - * Position gizmo - * @default undefined - */ positionGizmo: BABYLON.IPositionGizmo; - /** - * Planar gizmo enabled - * @default true - */ planarGizmoEnabled: boolean; } class SetScaleGizmoSnapDistanceDto { constructor(scaleGizmo?: BABYLON.IScaleGizmo, snapDistance?: number); - /** - * Scale gizmo - * @default undefined - */ scaleGizmo: BABYLON.IScaleGizmo; - /** - * Snap distance - * @default 0 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ snapDistance: number; } class SetScaleGizmoIncrementalSnapDto { constructor(scaleGizmo?: BABYLON.IScaleGizmo, incrementalSnap?: boolean); - /** - * Scale gizmo - * @default undefined - */ scaleGizmo: BABYLON.IScaleGizmo; - /** - * Incremental snap - * @default false - */ incrementalSnap: boolean; } class SetScaleGizmoSensitivityDto { constructor(scaleGizmo?: BABYLON.IScaleGizmo, sensitivity?: number); - /** - * Scale gizmo - * @default undefined - */ scaleGizmo: BABYLON.IScaleGizmo; - /** - * Sensitivity - * @default 1 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ sensitivity: number; } class ScaleGizmoDto { constructor(scaleGizmo?: BABYLON.IScaleGizmo); - /** - * Scale gizmo - * @default undefined - */ scaleGizmo: BABYLON.IScaleGizmo; } class BoundingBoxGizmoDto { constructor(boundingBoxGizmo?: BABYLON.BoundingBoxGizmo); - /** - * Bounding box gizmo - * @default undefined - */ boundingBoxGizmo: BABYLON.BoundingBoxGizmo; } class SetBoundingBoxGizmoRotationSphereSizeDto { constructor(boundingBoxGizmo?: BABYLON.BoundingBoxGizmo, rotationSphereSize?: number); - /** - * Bounding box gizmo - * @default undefined - */ boundingBoxGizmo: BABYLON.BoundingBoxGizmo; - /** - * The size of the rotation anchors attached to the bounding box (Default: 0.1) - * @default 0.1 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ rotationSphereSize: number; } class SetBoundingBoxGizmoFixedDragMeshScreenSizeDto { constructor(boundingBoxGizmo?: BABYLON.BoundingBoxGizmo, fixedDragMeshScreenSize?: boolean); - /** - * Bounding box gizmo - * @default undefined - */ boundingBoxGizmo: BABYLON.BoundingBoxGizmo; - /** - * fiex drag mesh screen size - * @default false - */ fixedDragMeshScreenSize: boolean; } class SetBoundingBoxGizmoFixedDragMeshBoundsSizeDto { constructor(boundingBoxGizmo?: BABYLON.BoundingBoxGizmo, fixedDragMeshBoundsSize?: boolean); - /** - * Bounding box gizmo - * @default undefined - */ boundingBoxGizmo: BABYLON.BoundingBoxGizmo; - /** - * fixed drag mesh bounds size - * @default false - */ fixedDragMeshBoundsSize: boolean; } class SetBoundingBoxGizmoFixedDragMeshScreenSizeDistanceFactorDto { constructor(boundingBoxGizmo?: BABYLON.BoundingBoxGizmo, fixedDragMeshScreenSizeDistanceFactor?: number); - /** - * Bounding box gizmo - * @default undefined - */ boundingBoxGizmo: BABYLON.BoundingBoxGizmo; - /** - * fixed drag mesh screen size distance factor - * @default 10 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ fixedDragMeshScreenSizeDistanceFactor: number; } class SetBoundingBoxGizmoScalingSnapDistanceDto { constructor(boundingBoxGizmo?: BABYLON.BoundingBoxGizmo, scalingSnapDistance?: number); - /** - * Bounding box gizmo - * @default undefined - */ boundingBoxGizmo: BABYLON.BoundingBoxGizmo; - /** - * Scaling snap distance - * @default 0 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ scalingSnapDistance: number; } class SetBoundingBoxGizmoRotationSnapDistanceDto { constructor(boundingBoxGizmo?: BABYLON.BoundingBoxGizmo, rotationSnapDistance?: number); - /** - * Bounding box gizmo - * @default undefined - */ boundingBoxGizmo: BABYLON.BoundingBoxGizmo; - /** - * Rotation snap distance - * @default 0 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ rotationSnapDistance: number; } class SetBoundingBoxGizmoScaleBoxSizeDto { constructor(boundingBoxGizmo?: BABYLON.BoundingBoxGizmo, scaleBoxSize?: number); - /** - * Bounding box gizmo - * @default undefined - */ boundingBoxGizmo: BABYLON.BoundingBoxGizmo; - /** - * The size of the scale boxes attached to the bounding box (Default: 0.1) - * @default 0.1 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ scaleBoxSize: number; } class SetBoundingBoxGizmoIncrementalSnapDto { constructor(boundingBoxGizmo?: BABYLON.BoundingBoxGizmo, incrementalSnap?: boolean); - /** - * Bounding box gizmo - * @default undefined - */ boundingBoxGizmo: BABYLON.BoundingBoxGizmo; - /** - * Incremental snap - * @default false - */ incrementalSnap: boolean; } class SetBoundingBoxGizmoScalePivotDto { constructor(boundingBoxGizmo?: BABYLON.BoundingBoxGizmo, scalePivot?: Base.Vector3); - /** - * Bounding box gizmo - * @default undefined - */ boundingBoxGizmo: BABYLON.BoundingBoxGizmo; - /** - * Scale pivot - * @default undefined - */ scalePivot: Base.Vector3; } class SetBoundingBoxGizmoAxisFactorDto { constructor(boundingBoxGizmo?: BABYLON.BoundingBoxGizmo, axisFactor?: Base.Vector3); - /** - * Bounding box gizmo - * @default undefined - */ boundingBoxGizmo: BABYLON.BoundingBoxGizmo; - /** - * Axis factor - * @default undefined - */ axisFactor: Base.Vector3; } class SetBoundingBoxGizmoScaleDragSpeedDto { constructor(boundingBoxGizmo?: BABYLON.BoundingBoxGizmo, scaleDragSpeed?: number); - /** - * Bounding box gizmo - * @default undefined - */ boundingBoxGizmo: BABYLON.BoundingBoxGizmo; - /** - * Scale drag speed - * @default 1 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ scaleDragSpeed: number; } class SetPositionGizmoSnapDistanceDto { constructor(positionGizmo?: BABYLON.IPositionGizmo, snapDistance?: number); - /** - * Position gizmo - * @default undefined - */ positionGizmo: BABYLON.IPositionGizmo; - /** - * Snap distance - * @default 0 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ snapDistance: number; } class SetRotationGizmoSnapDistanceDto { constructor(rotationGizmo?: BABYLON.IRotationGizmo, snapDistance?: number); - /** - * Position gizmo - * @default undefined - */ rotationGizmo: BABYLON.IRotationGizmo; - /** - * Snap distance - * @default 0 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ snapDistance: number; } class SetRotationGizmoSensitivityDto { constructor(rotationGizmo?: BABYLON.IRotationGizmo, sensitivity?: number); - /** - * Position gizmo - * @default undefined - */ rotationGizmo: BABYLON.IRotationGizmo; - /** - * Sensitivity - * @default 1 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ sensitivity: number; } class RotationGizmoDto { constructor(rotationGizmo?: BABYLON.IRotationGizmo); - /** - * Rotation gizmo - * @default undefined - */ rotationGizmo: BABYLON.IRotationGizmo; } class AxisScaleGizmoDto { constructor(axisScaleGizmo?: BABYLON.IAxisScaleGizmo); - /** - * axis scale gizmo - * @default undefined - */ axisScaleGizmo: BABYLON.IAxisScaleGizmo; } class SetIsEnabledAxisScaleGizmoDto { constructor(gizmoManager?: BABYLON.IAxisScaleGizmo, isEnabled?: boolean); - /** - * axis scale gizmo - * @default undefined - */ axisScaleGizmo: BABYLON.IAxisScaleGizmo; - /** - * Is enabled - * @default true - */ isEnabled: boolean; } class AxisDragGizmoDto { constructor(axisDragGizmo?: BABYLON.IAxisDragGizmo); - /** - * axis drag gizmo - * @default undefined - */ axisDragGizmo: BABYLON.IAxisDragGizmo; } class SetIsEnabledAxisDragGizmoDto { constructor(gizmoManager?: BABYLON.IAxisDragGizmo, isEnabled?: boolean); - /** - * axis drag gizmo - * @default undefined - */ axisDragGizmo: BABYLON.IAxisDragGizmo; - /** - * Is enabled - * @default true - */ isEnabled: boolean; } class SetIsEnabledPlaneRotationGizmoDto { constructor(planeRotationGizmo?: BABYLON.IPlaneRotationGizmo, isEnabled?: boolean); - /** - * plane drag gizmo - * @default undefined - */ planeRotationGizmo: BABYLON.IPlaneRotationGizmo; - /** - * Is enabled - * @default true - */ isEnabled: boolean; } class SetIsEnabledPlaneDragGizmoDto { constructor(planeDragGizmo?: BABYLON.IPlaneDragGizmo, isEnabled?: boolean); - /** - * plane drag gizmo - * @default undefined - */ planeDragGizmo: BABYLON.IPlaneDragGizmo; - /** - * Is enabled - * @default true - */ isEnabled: boolean; } class PlaneDragGizmoDto { constructor(planeDragGizmo?: BABYLON.IPlaneDragGizmo); - /** - * plane drag gizmo - * @default undefined - */ planeDragGizmo: BABYLON.IPlaneDragGizmo; } class PlaneRotationGizmoDto { constructor(planeRotationGizmo?: BABYLON.IPlaneRotationGizmo); - /** - * plane drag gizmo - * @default undefined - */ planeRotationGizmo: BABYLON.IPlaneRotationGizmo; } class AttachToMeshDto { constructor(mesh: BABYLON.AbstractMesh, gizmoManager: BABYLON.GizmoManager); - /** - * Mesh to attach gizmo manager to - */ mesh: BABYLON.AbstractMesh; - /** - * Gizmo manager to attach - */ gizmoManager: BABYLON.GizmoManager; } class PositionGizmoObservableSelectorDto { constructor(selector: positionGizmoObservableSelectorEnum); - /** - * Selector - */ selector: positionGizmoObservableSelectorEnum; } class BoundingBoxGizmoObservableSelectorDto { constructor(selector: boundingBoxGizmoObservableSelectorEnum); - /** - * Selector - */ selector: boundingBoxGizmoObservableSelectorEnum; } class RotationGizmoObservableSelectorDto { constructor(selector: rotationGizmoObservableSelectorEnum); - /** - * Selector - */ selector: rotationGizmoObservableSelectorEnum; } class ScaleGizmoObservableSelectorDto { constructor(selector: scaleGizmoObservableSelectorEnum); - /** - * Selector - */ selector: scaleGizmoObservableSelectorEnum; } - } declare namespace BabylonGui { + } + declare namespace BabylonGui { enum horizontalAlignmentEnum { left = "left", center = "center", @@ -9473,2791 +3219,809 @@ declare namespace Bit { bottom = "bottom" } enum inputTextObservableSelectorEnum { - /** Observable raised when the text changes */ onTextChangedObservable = "onTextChangedObservable", - /** Observable raised just before an entered character is to be added */ onBeforeKeyAddObservable = "onBeforeKeyAddObservable", - /** Observable raised when the text is highlighted */ onTextHighlightObservable = "onTextHighlightObservable", - /** Observable raised when copy event is triggered */ onTextCopyObservable = "onTextCopyObservable", - /** Observable raised when cut event is triggered */ onTextCutObservable = "onTextCutObservable", - /** Observable raised when paste event is triggered */ onTextPasteObservable = "onTextPasteObservable" } enum sliderObservableSelectorEnum { - /** - * Raised when the value has changed - */ onValueChangedObservable = "onValueChangedObservable" } enum colorPickerObservableSelectorEnum { - /** - * Raised when the value has changed - */ onValueChangedObservable = "onValueChangedObservable" } enum textBlockObservableSelectorEnum { - /** - * Raised when the text has changed - */ onTextChangedObservable = "onTextChangedObservable" } enum checkboxObservableSelectorEnum { - /** - * Raised when the checkbox is checked or unchecked - */ onIsCheckedChangedObservable = "onIsCheckedChangedObservable" } enum radioButtonObservableSelectorEnum { - /** - * Raised when the radio button is checked or unchecked - */ onIsCheckedChangedObservable = "onIsCheckedChangedObservable" } enum controlObservableSelectorEnum { onFocusObservable = "onFocusObservable", onBlurObservable = "onBlurObservable", - /** - * Observable that fires whenever the accessibility event of the control has changed - */ onAccessibilityTagChangedObservable = "onAccessibilityTagChangedObservable", - /** - * An event triggered when pointer wheel is scrolled - */ onWheelObservable = "onWheelObservable", - /** - * An event triggered when the pointer moves over the control. - */ onPointerMoveObservable = "onPointerMoveObservable", - /** - * An event triggered when the pointer moves out of the control. - */ onPointerOutObservable = "onPointerOutObservable", - /** - * An event triggered when the pointer taps the control - */ onPointerDownObservable = "onPointerDownObservable", - /** - * An event triggered when pointer up - */ onPointerUpObservable = "onPointerUpObservable", - /** - * An event triggered when a control is clicked on - */ onPointerClickObservable = "onPointerClickObservable", - /** - * An event triggered when a control receives an ENTER key down event - */ onEnterPressedObservable = "onEnterPressedObservable", - /** - * An event triggered when pointer enters the control - */ onPointerEnterObservable = "onPointerEnterObservable", - /** - * An event triggered when the control is marked as dirty - */ onDirtyObservable = "onDirtyObservable", - /** - * An event triggered before drawing the control - */ onBeforeDrawObservable = "onBeforeDrawObservable", - /** - * An event triggered after the control was drawn - */ onAfterDrawObservable = "onAfterDrawObservable", - /** - * An event triggered when the control has been disposed - */ onDisposeObservable = "onDisposeObservable", - /** - * An event triggered when the control isVisible is changed - */ onIsVisibleChangedObservable = "onIsVisibleChangedObservable" } class CreateFullScreenUIDto { constructor(name?: string, foreground?: boolean, adaptiveScaling?: boolean); - /** - * Name of advanced texture - * @default fullscreen - */ name: string; - /** - * Foreground - * @default true - */ foreground?: boolean; - /** - * Adaptive scaling - * @default false - */ adaptiveScaling?: boolean; } class CreateForMeshDto { constructor(mesh?: BABYLON.AbstractMesh, width?: number, height?: number, supportPointerMove?: boolean, onlyAlphaTesting?: boolean, invertY?: boolean, sampling?: BabylonTexture.samplingModeEnum); - /** - * Mesh - * @default undefined - */ mesh: BABYLON.AbstractMesh; - /** - * Width - * @default undefined - * @optional true - */ width?: number; - /** - * Height - * @default undefined - * @optional true - */ height?: number; - /** - * Support pointer move - * @default true - */ supportPointerMove: boolean; - /** - * Only alpha testing - * @default false - */ onlyAlphaTesting: boolean; - /** - * Invert Y - * @default true - */ invertY: boolean; - /** - * Sampling - * @default trilinear - */ sampling: BabylonTexture.samplingModeEnum; } class CreateStackPanelDto { constructor(name?: string, isVertical?: boolean, spacing?: number, width?: number | string, height?: number | string, color?: string, background?: string); - /** - * Name of stack panel - * @default stackPanel - */ name: string; - /** - * Horizontal or vertical - * @default true - */ isVertical: boolean; - /** - * Spacing between each child in pixels - * @default 0 - */ spacing: number; - /** - * Width of the stack panel. This value should not be set when in horizontal mode as it will be computed automatically. - * @default undefined - * @optional true - */ width: number | string; - /** - * Height of the stack panel. This value should not be set when in vertical mode as it will be computed automatically. - * @default undefined - * @optional true - */ height: number | string; - /** - * Color of the stack panel - * @default #00000000 - */ color: string; - /** - * Background of the stack panel. We give transparency to the background by default so that it would be visible - * @default #00000055 - */ background: string; } class SetStackPanelIsVerticalDto { constructor(stackPanel?: BABYLON.GUI.StackPanel, isVertical?: boolean); - /** - * Stack panel to update - * @default undefined - */ stackPanel: BABYLON.GUI.StackPanel; - /** - * Is vertical - * @default true - */ isVertical: boolean; } class SetStackPanelSpacingDto { constructor(stackPanel?: BABYLON.GUI.StackPanel, spacing?: number); - /** - * Stack panel to update - * @default undefined - */ stackPanel: BABYLON.GUI.StackPanel; - /** - * Spacing between each child in pixels - * @default 0 - */ spacing: number; } class SetStackPanelWidthDto { constructor(stackPanel?: BABYLON.GUI.StackPanel, width?: number | string); - /** - * Stack panel to update - * @default undefined - */ stackPanel: BABYLON.GUI.StackPanel; - /** - * Width of the stack panel - * @default undefined - * @optional true - */ width: number | string; } class SetStackPanelHeightDto { constructor(stackPanel?: BABYLON.GUI.StackPanel, height?: number | string); - /** - * Stack panel to update - * @default undefined - */ stackPanel: BABYLON.GUI.StackPanel; - /** - * Height of the stack panel. - * @default undefined - * @optional true - */ height: number | string; } class StackPanelDto { constructor(stackPanel?: BABYLON.GUI.StackPanel); - /** - * Stack panel to update - * @default undefined - */ stackPanel: BABYLON.GUI.StackPanel; } class SliderObservableSelectorDto { constructor(selector: sliderObservableSelectorEnum); - /** - * Selector for the observable - * @default onValueChangedObservable - */ selector: sliderObservableSelectorEnum; } class ColorPickerObservableSelectorDto { constructor(selector: colorPickerObservableSelectorEnum); - /** - * Selector for the observable - * @default onValueChangedObservable - */ selector: colorPickerObservableSelectorEnum; } class InputTextObservableSelectorDto { constructor(selector: inputTextObservableSelectorEnum); - /** - * Selector for the observable - * @default onTextChangedObservable - */ selector: inputTextObservableSelectorEnum; } class RadioButtonObservableSelectorDto { constructor(selector: radioButtonObservableSelectorEnum); - /** - * Selector for the observable - * @default onIsCheckedChangedObservable - */ selector: radioButtonObservableSelectorEnum; } class CheckboxObservableSelectorDto { constructor(selector: checkboxObservableSelectorEnum); - /** - * Selector for the observable - * @default onIsCheckedChangedObservable - */ selector: checkboxObservableSelectorEnum; } class ControlObservableSelectorDto { constructor(selector: controlObservableSelectorEnum); - /** - * Selector for the observable - * @default onPointerClickObservable - */ selector: controlObservableSelectorEnum; } class TextBlockObservableSelectorDto { constructor(selector: textBlockObservableSelectorEnum); - /** - * Selector for the observable - * @default onTextChangedObservable - */ selector: textBlockObservableSelectorEnum; } class ContainerDto { constructor(container?: BABYLON.GUI.Container); - /** - * Container to update - * @default undefined - */ container: BABYLON.GUI.Container; } class AddControlsToContainerDto { constructor(container?: BABYLON.GUI.StackPanel, controls?: BABYLON.GUI.Control[], clearControlsFirst?: boolean); - /** - * Container to add control to - * @default undefined - */ container: BABYLON.GUI.Container; - /** - * Controls to add - * @default undefined - */ controls: BABYLON.GUI.Control[]; - /** - * Clear controls first. That will preserve the order of the controls. - * @default true - */ clearControlsFirst: boolean; } class GetControlByNameDto { constructor(container?: BABYLON.GUI.Container, name?: string); - /** - * Container to get control from - * @default undefined - */ container: BABYLON.GUI.Container; - /** - * Name of the control - * @default controlName - */ name: string; } class SetControlIsVisibleDto { constructor(control?: BABYLON.GUI.Control, isVisible?: boolean); - /** - * Control to update - * @default undefined - */ control: BABYLON.GUI.Control; - /** - * Is visible - * @default true - */ isVisible: boolean; } class SetControlIsReadonlyDto { constructor(control?: BABYLON.GUI.Control, isReadOnly?: boolean); - /** - * Control to update - * @default undefined - */ control: BABYLON.GUI.Control; - /** - * Is readonly - * @default false - */ isReadOnly: boolean; } class SetControlIsEnabledDto { constructor(control?: BABYLON.GUI.Control, isEnabled?: boolean); - /** - * Control to update - * @default undefined - */ control: BABYLON.GUI.Control; - /** - * Is enabled - * @default true - */ isEnabled: boolean; } class CreateImageDto { constructor(name?: string, url?: string, color?: string, width?: number | string, height?: number | string); - /** - * Name of the image - * @default imageName - */ name: string; - /** - * Link to the image - * @default undefined - */ url: string; - /** - * Color of the image - * @default black - */ color: string; - /** - * Width of the image - * @default undefined - * @optional true - */ width?: number | string; - /** - * Height of the image - * @default undefined - * @optional true - */ height?: number | string; } class SetImageUrlDto { constructor(image?: BABYLON.GUI.Image, url?: string); - /** - * Image to update - * @default undefined - */ image: BABYLON.GUI.Image; - /** - * Link to the image - * @default undefined - */ url: string; } class ImageDto { constructor(image?: BABYLON.GUI.Image); - /** - * Image to update - * @default undefined - */ image: BABYLON.GUI.Image; } class CreateButtonDto { constructor(name?: string, label?: string, color?: string, background?: string, width?: number | string, height?: number | string, fontSize?: number); - /** - * Name of the button - * @default buttonName - */ name: string; - /** - * Text of the button - * @default Click me! - */ label: string; - /** - * Color of the button - * @default black - */ color: string; - /** - * Background of the button - * @default #f0cebb - */ background: string; - /** - * Width of the button - * @default undefined - * @optional true - */ width?: number | string; - /** - * Height of the button - * @default undefined - * @optional true - */ height?: number | string; - /** - * Font size of the button - * @default 24 - */ fontSize: number; } class SetButtonTextDto { constructor(button?: BABYLON.GUI.Button, text?: string); - /** - * Button to update - * @default undefined - */ button: BABYLON.GUI.Button; - /** - * Text of the button - * @default Click me! - */ text: string; } class ButtonDto { constructor(button?: BABYLON.GUI.Button); - /** - * Button to update - * @default undefined - */ button: BABYLON.GUI.Button; } class CreateColorPickerDto { constructor(name?: string, defaultColor?: string, color?: string, width?: number | string, height?: number | string, size?: number | string); - /** - * Name of the color picker - * @default colorPickerName - */ name: string; - /** - * Default color of the color picker - * @default #f0cebb - */ defaultColor: string; - /** - * Color of the color picker - * @default #f0cebb - */ color: string; - /** - * Width of the color picker - * @default undefined - * @optional true - */ width?: number | string; - /** - * Height of the color picker - * @default undefined - * @optional true - */ height?: number | string; - /** - * Size of the color picker - * @default 300px - * @optional true - */ size?: number | string; } class SetColorPickerValueDto { constructor(colorPicker?: BABYLON.GUI.ColorPicker, color?: string); - /** - * Color picker to update - * @default undefined - */ colorPicker: BABYLON.GUI.ColorPicker; - /** - * Value of the color picker - * @default undefined - */ color: string; } class SetColorPickerSizeDto { constructor(colorPicker?: BABYLON.GUI.ColorPicker, size?: number | string); - /** - * Color picker to update - * @default undefined - */ colorPicker: BABYLON.GUI.ColorPicker; - /** - * Size of the color picker - * @default 300px - * @optional true - */ size?: number | string; } class ColorPickerDto { constructor(colorPicker?: BABYLON.GUI.ColorPicker); - /** - * Color picker to update - * @default undefined - */ colorPicker: BABYLON.GUI.ColorPicker; } class CreateCheckboxDto { constructor(name?: string, isChecked?: boolean, checkSizeRatio?: number, color?: string, background?: string, width?: number | string, height?: number | string); - /** - * Name of the checkbox - * @default checkboxName - */ name: string; - /** - * Is checked - * @default false - */ isChecked: boolean; - /** - * Check size ratio - * @default 0.8 - * @minimum 0 - * @maximum 1 - * @step 0.05 - */ checkSizeRatio: number; - /** - * Color of the checkbox - * @default #f0cebb - */ color: string; - /** - * Background of the checkbox - * @default black - */ background: string; - /** - * Width of the checkbox - * @default undefined - * @optional true - */ width?: number | string; - /** - * Height of the checkbox - * @default undefined - * @optional true - */ height?: number | string; } class SetControlFontSizeDto { constructor(control?: BABYLON.GUI.Control, fontSize?: number); - /** - * Control to update - * @default undefined - */ control: BABYLON.GUI.Control; - /** - * Font size of the button - * @default 24 - */ fontSize: number; } class SetControlHeightDto { constructor(control?: BABYLON.GUI.Control, height?: number | string); - /** - * Control to update - * @default undefined - */ control: BABYLON.GUI.Control; - /** - * Height of the checkbox - * @default undefined - */ height: number | string; } class SetControlWidthDto { constructor(control?: BABYLON.GUI.Control, width?: number | string); - /** - * Control to update - * @default undefined - */ control: BABYLON.GUI.Control; - /** - * Width of the checkbox - * @default undefined - */ width: number | string; } class SetControlColorDto { constructor(control?: BABYLON.GUI.Control, color?: string); - /** - * Control to update - * @default undefined - */ control: BABYLON.GUI.Control; - /** - * Color of the checkbox - * @default #f0cebb - */ color: string; } class SetContainerBackgroundDto { constructor(container?: BABYLON.GUI.Container, background?: string); - /** - * Container to update - * @default undefined - */ container: BABYLON.GUI.Container; - /** - * Background of the checkbox - * @default black - */ background: string; } class SetContainerIsReadonlyDto { constructor(container?: BABYLON.GUI.Container, isReadOnly?: boolean); - /** - * Container to update - * @default undefined - */ container: BABYLON.GUI.Container; - /** - * Is readonly - * @default false - */ isReadOnly: boolean; } class SetCheckboxBackgroundDto { constructor(checkbox?: BABYLON.GUI.Checkbox, background?: string); - /** - * Checkbox to update - * @default undefined - */ checkbox: BABYLON.GUI.Checkbox; - /** - * Background of the checkbox - * @default black - */ background: string; } class SetCheckboxCheckSizeRatioDto { constructor(checkbox?: BABYLON.GUI.Checkbox, checkSizeRatio?: number); - /** - * Checkbox to update - * @default undefined - */ checkbox: BABYLON.GUI.Checkbox; - /** - * Check size ratio - * @default 0.8 - * @minimum 0 - * @maximum 1 - * @step 0.05 - */ checkSizeRatio: number; } class CheckboxDto { constructor(checkbox?: BABYLON.GUI.Checkbox); - /** - * Checkbox to update - * @default undefined - */ checkbox: BABYLON.GUI.Checkbox; } class ControlDto { constructor(control?: BABYLON.GUI.Control); - /** - * Control to update - * @default undefined - */ control: BABYLON.GUI.Control; } class SetCheckboxIsCheckedDto { constructor(checkbox?: BABYLON.GUI.Checkbox, isChecked?: boolean); - /** - * Checkbox to update - * @default undefined - */ checkbox: BABYLON.GUI.Checkbox; - /** - * Is checked - * @default false - */ isChecked: boolean; } class CreateInputTextDto { constructor(name?: string, color?: string, background?: string, width?: number | string, height?: number | string); - /** - * Name of the button - * @default inputName - */ name: string; - /** - * Text of the input - * @default - */ text: string; - /** - * Placeholder of the input - * @default - */ placeholder: string; - /** - * Color of the button - * @default #f0cebb - */ color: string; - /** - * Background of the button - * @default black - */ background: string; - /** - * Width of the button - * @default undefined - * @optional true - */ width?: number | string; - /** - * Height of the button - * @default undefined - * @optional true - */ height?: number | string; } class SetInputTextBackgroundDto { constructor(inputText?: BABYLON.GUI.InputText, background?: string); - /** - * Input text to update - * @default undefined - */ inputText: BABYLON.GUI.InputText; - /** - * Background of the input text - * @default black - */ background: string; } class SetInputTextTextDto { constructor(inputText?: BABYLON.GUI.InputText, text?: string); - /** - * Input text to update - * @default undefined - */ inputText: BABYLON.GUI.InputText; - /** - * Text of the input text - * @default - */ text: string; } class SetInputTextPlaceholderDto { constructor(inputText?: BABYLON.GUI.InputText, placeholder?: string); - /** - * Input text to update - * @default undefined - */ inputText: BABYLON.GUI.InputText; - /** - * Placeholder of the input text - * @default - */ placeholder: string; } class InputTextDto { constructor(inputText?: BABYLON.GUI.InputText); - /** - * Input text to update - * @default undefined - */ inputText: BABYLON.GUI.InputText; } class CreateRadioButtonDto { constructor(name?: string, group?: string, isChecked?: boolean, checkSizeRatio?: number, color?: string, background?: string, width?: number | string, height?: number | string); - /** - * Name of the button - * @default radioBtnName - */ name: string; - /** - * Group of the radio button which is used when multiple radio buttons needs to be split into separate groups - * @default - * @optional true - */ group: string; - /** - * Is checked - * @default false - */ isChecked: boolean; - /** - * Check size ratio - * @default 0.8 - * @minimum 0 - * @maximum 1 - * @step 0.05 - */ checkSizeRatio: number; - /** - * Color of the button - * @default #f0cebb - */ color: string; - /** - * Background of the button - * @default black - */ background: string; - /** - * Width of the button - * @default undefined - * @optional true - */ width?: number | string; - /** - * Height of the button - * @default undefined - * @optional true - */ height?: number | string; } class SetRadioButtonCheckSizeRatioDto { constructor(radioButton?: BABYLON.GUI.RadioButton, checkSizeRatio?: number); - /** - * Radio button to update - * @default undefined - */ radioButton: BABYLON.GUI.RadioButton; - /** - * Check size ratio - * @default 0.8 - * @minimum 0 - * @maximum 1 - * @step 0.05 - */ checkSizeRatio: number; } class SetRadioButtonGroupDto { constructor(radioButton?: BABYLON.GUI.RadioButton, group?: string); - /** - * Radio button to update - * @default undefined - */ radioButton: BABYLON.GUI.RadioButton; - /** - * Group of the radio button - * @default - */ group: string; } class SetRadioButtonBackgroundDto { constructor(radioButton?: BABYLON.GUI.RadioButton, background?: string); - /** - * Radio button to update - * @default undefined - */ radioButton: BABYLON.GUI.RadioButton; - /** - * Background of the radio button - * @default black - */ background: string; } class RadioButtonDto { constructor(radioButton?: BABYLON.GUI.RadioButton); - /** - * Radio button to update - * @default undefined - */ radioButton: BABYLON.GUI.RadioButton; } class CreateSliderDto { constructor(name?: string, minimum?: number, maximum?: number, value?: number, step?: number, isVertical?: boolean, color?: string, background?: string, width?: number | string, height?: number | string, displayThumb?: boolean); - /** - * Name of the button - * @default sliderName - */ name: string; - /** - * Minimum value of the slider - * @default 0 - * @minimum -Infinity - * @maximum Infinity - * @step 0.1 - */ minimum: number; - /** - * Maximum value of the slider - * @default 10 - * @minimum -Infinity - * @maximum Infinity - * @step 0.1 - */ maximum: number; - /** - * Value of the slider - * @default 5 - * @minimum -Infinity - * @maximum Infinity - * @step 0.1 - */ value: number; - /** - * Step of the slider - * @default 0.01 - * @minimum -Infinity - * @maximum Infinity - * @step 0.01 - */ step: number; - /** - * Is slider vertical - * @default false - */ isVertical: boolean; - /** - * Color of the button - * @default #f0cebb - */ color: string; - /** - * Background of the button - * @default black - */ background: string; - /** - * Width of the button - * @default undefined - * @optional true - */ width?: number | string; - /** - * Height of the button - * @default undefined - * @optional true - */ height?: number | string; - /** - * Should display thumb - * @default true - */ displayThumb: boolean; } class CreateTextBlockDto { constructor(name?: string, text?: string, color?: string, width?: number | string, height?: number | string); - /** - * Name of the text block - * @default textBlockName - */ name: string; - /** - * Text of the block - * @default Hello World! - */ text: string; - /** - * Color of the text block - * @default #f0cebb - */ color: string; - /** - * Width of the text block - * @default undefined - * @optional true - */ width?: number | string; - /** - * Height of the text block - * @default undefined - * @optional true - */ height?: number | string; - /** - * Font size of the text block - * @default 24 - */ fontSize: number; } class SetTextBlockTextDto { constructor(textBlock?: BABYLON.GUI.TextBlock, text?: string); - /** - * Text block to update - * @default undefined - */ textBlock: BABYLON.GUI.TextBlock; - /** - * Text of the block - * @default undefined - */ text: string; } class SetTextBlockResizeToFitDto { constructor(textBlock?: BABYLON.GUI.TextBlock, resizeToFit?: boolean); - /** - * Text block to update - * @default undefined - */ textBlock: BABYLON.GUI.TextBlock; - /** - * Resize to fit - * @default false - */ resizeToFit: boolean; } class SetTextBlockTextWrappingDto { constructor(textBlock?: BABYLON.GUI.TextBlock, textWrapping?: boolean); - /** - * Text block to update - * @default undefined - */ textBlock: BABYLON.GUI.TextBlock; - /** - * Text wrapping - * @default undefined - */ textWrapping: boolean | BABYLON.GUI.TextWrapping; } class SetTextBlockLineSpacingDto { constructor(textBlock?: BABYLON.GUI.TextBlock, lineSpacing?: string | number); - /** - * Text block to update - * @default undefined - */ textBlock: BABYLON.GUI.TextBlock; - /** - * Line spacing of the text - * @default undefined - */ lineSpacing: string | number; } class TextBlockDto { constructor(textBlock?: BABYLON.GUI.TextBlock); - /** - * Text block to update - * @default undefined - */ textBlock: BABYLON.GUI.TextBlock; } class SliderThumbDto { constructor(slider?: BABYLON.GUI.Slider, isThumbCircle?: boolean, thumbColor?: string, thumbWidth?: string | number, isThumbClamped?: boolean, displayThumb?: boolean); - /** - * Slider for which the thumb needs to be updated - * @default undefined - */ slider: BABYLON.GUI.Slider; - /** - * Is thumb circle - * @default false - */ isThumbCircle: boolean; - /** - * Color of the thumb - * @default white - */ thumbColor: string; - /** - * Thumb width - * @default undefined - * @optional true - */ thumbWidth?: string | number; - /** - * Is thumb clamped - * @default false - */ isThumbClamped: boolean; - /** - * Should display thumb - * @default true - */ displayThumb: boolean; } class SliderDto { constructor(slider?: BABYLON.GUI.Slider); - /** - * Slider for which the thumb needs to be updated - * @default undefined - */ slider: BABYLON.GUI.Slider; } class SliderBorderColorDto { constructor(slider?: BABYLON.GUI.Slider, borderColor?: string); - /** - * Slider for which the thumb needs to be updated - * @default undefined - */ slider: BABYLON.GUI.Slider; - /** - * Border color of the slider - * @default white - */ borderColor: string; } class SliderBackgroundColorDto { constructor(slider?: BABYLON.GUI.Slider, backgroundColor?: string); - /** - * Slider for which the thumb needs to be updated - * @default undefined - */ slider: BABYLON.GUI.Slider; - /** - * Background color of the slider - * @default black - */ backgroundColor: string; } class SetSliderValueDto { constructor(slider?: BABYLON.GUI.Slider, value?: number); - /** - * Slider for which the thumb needs to be updated - * @default undefined - */ slider: BABYLON.GUI.Slider; - /** - * Value of the slider - * @default 5 - * @minimum -Infinity - * @maximum Infinity - * @step 0.1 - */ value: number; } class PaddingLeftRightTopBottomDto { constructor(control?: BABYLON.GUI.Control, paddingLeft?: number | string, paddingRight?: number | string, paddingTop?: number | string, paddingBottom?: number | string); - /** - * Control to change the padding - * @default undefined - */ control: BABYLON.GUI.Control; - /** - * Padding left of the stack panel - * @default undefined - * @optional true - */ paddingLeft: number | string; - /** - * Padding right of the stack panel - * @default undefined - * @optional true - */ paddingRight: number | string; - /** - * Padding top of the stack panel - * @default undefined - * @optional true - */ paddingTop: number | string; - /** - * Padding bottom of the stack panel - * @default undefined - * @optional true - */ paddingBottom: number | string; } class CloneControlDto { constructor(control?: BABYLON.GUI.Control, container?: BABYLON.GUI.Container, name?: string, host?: BABYLON.GUI.AdvancedDynamicTexture); - /** - * Control to clone - * @default undefined - */ control: BABYLON.GUI.Control; - /** - * Use container to which the cloned control will be added - * @default undefined - * @optional true - */ container?: BABYLON.GUI.Container; - /** - * Name of the cloned control - * @default clonedControl - */ name: string; - /** - * Host of the cloned control - * @default undefined - * @optional true - */ host?: BABYLON.GUI.AdvancedDynamicTexture; } class AlignmentDto { constructor(control?: T, horizontalAlignment?: horizontalAlignmentEnum, verticalAlignment?: verticalAlignmentEnum); - /** - * Control to change the padding - * @default undefined - */ control: T; - /** - * Alignment horizontal - * @default center - */ horizontalAlignment: horizontalAlignmentEnum; - /** - * Alignment horizontal - * @default center - */ verticalAlignment: verticalAlignmentEnum; } class SetTextBlockTextOutlineDto { constructor(textBlock?: BABYLON.GUI.TextBlock, outlineWidth?: number, outlineColor?: string); - /** - * Control to change the padding - * @default undefined - */ textBlock: BABYLON.GUI.TextBlock; - /** - * Alignment horizontal - * @default 0 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ outlineWidth: number; - /** - * Outline color - * @default white - */ outlineColor: string; } - } declare namespace BabylonIO { + } + declare namespace BabylonIO { class ExportSceneGlbDto { constructor(fileName?: string, discardSkyboxAndGrid?: boolean); - /** - * File name that should be used for the scene. - * @default bitbybit-scene - */ fileName: string; - /** - * Discard skybox and grid - * @default false - * @optional true - */ discardSkyboxAndGrid?: boolean; } class ExportSceneDto { constructor(fileName?: string); - /** - * File name that should be used for the scene. - * @default bitbybit-scene - */ fileName: string; } class ExportMeshToStlDto { constructor(mesh?: BABYLON.Mesh, fileName?: string); - /** - * Mesh to export - */ mesh: BABYLON.Mesh; - /** - * File name that should be used for the scene. - * @default bitbybit-mesh - */ fileName: string; } class ExportMeshesToStlDto { constructor(meshes?: BABYLON.Mesh[], fileName?: string); - /** - * Meshes to export - */ meshes: BABYLON.Mesh[]; - /** - * File name that should be used for the scene. - * @default bitbybit-mesh - */ fileName: string; } - } declare namespace BabylonLight { + } + declare namespace BabylonLight { class ShadowLightDirectionToTargetDto { constructor(shadowLight?: BABYLON.ShadowLight, target?: Base.Vector3); - /** - * Shadow light to update - * @default undefined - */ shadowLight: BABYLON.ShadowLight; - /** - * The direction target - * @default undefined - */ target?: Base.Vector3; } class ShadowLightPositionDto { constructor(shadowLight?: BABYLON.ShadowLight, position?: Base.Vector3); - /** - * Shadow light to update - * @default undefined - */ shadowLight: BABYLON.ShadowLight; - /** - * The position - * @default undefined - */ position?: Base.Vector3; } - } declare namespace BabylonMaterial { + } + declare namespace BabylonMaterial { class PBRMetallicRoughnessDto { constructor(name?: string, baseColor?: Base.Color, emissiveColor?: Base.Color, metallic?: number, roughness?: number, alpha?: number, backFaceCulling?: boolean, zOffset?: number); - /** - * Name of the material - * @default Custom Material - */ name: string; - /** - * Base color of the material - * @default #0000ff - */ baseColor: Base.Color; - /** - * Emissive color of the material - * @default #000000 - */ emissiveColor?: Base.Color; - /** - * Metallic value of the material - * @default 0.6 - * @minimum 0 - * @maximum 1 - * @step 0.1 - */ metallic: number; - /** - * Roughness value of the material - * @default 0.5 - * @minimum 0 - * @maximum 1 - * @step 0.1 - */ roughness: number; - /** - * Defines the transparency of the material - * @default 1 - * @minimum 0 - * @maximum 1 - * @step 0.1 - */ alpha: number; - /** - * Identifies if both sides of the surface should have material applied - * @default false - */ backFaceCulling: boolean; - /** - * Defines the z offset of the material - * @default 0 - * @minimum -Infinity - * @maximum Infinity - * @step 0.1 - */ zOffset: number; } class BaseColorDto { constructor(material?: BABYLON.PBRMetallicRoughnessMaterial, baseColor?: Base.Color); - /** - * Material to update - * @default undefined - */ material: BABYLON.PBRMetallicRoughnessMaterial; - /** - * Base color of the material - * @default #0000ff - */ baseColor?: Base.Color; } class MaterialPropDto { constructor(material?: BABYLON.PBRMetallicRoughnessMaterial); - /** - * Material to investigate - * @default undefined - */ material: BABYLON.PBRMetallicRoughnessMaterial; } class SkyMaterialPropDto { constructor(skyMaterial?: MATERIALS.SkyMaterial); - /** - * Material to investigate - * @default undefined - */ skyMaterial: MATERIALS.SkyMaterial; } class MetallicDto { constructor(material?: BABYLON.PBRMetallicRoughnessMaterial, metallic?: number); - /** - * Material to update - * @default undefined - */ material: BABYLON.PBRMetallicRoughnessMaterial; - /** - * Metallic value of the material - * @default 0.5 - * @minimum 0 - * @maximum 1 - * @step 0.1 - */ metallic?: number; } class RoughnessDto { constructor(material?: BABYLON.PBRMetallicRoughnessMaterial, roughness?: number); - /** - * Material to update - * @default undefined - */ material: BABYLON.PBRMetallicRoughnessMaterial; - /** - * Roughness value of the material - * @default 0.5 - * @minimum 0 - * @maximum 1 - * @step 0.1 - */ roughness?: number; } class AlphaDto { constructor(material?: BABYLON.PBRMetallicRoughnessMaterial, alpha?: number); - /** - * Material to update - * @default undefined - */ material: BABYLON.PBRMetallicRoughnessMaterial; - /** - * Alpha value of the material - * @default 0.5 - * @minimum 0 - * @maximum 1 - * @step 0.1 - */ alpha?: number; } class BackFaceCullingDto { constructor(material?: BABYLON.PBRMetallicRoughnessMaterial, backFaceCulling?: boolean); - /** - * Material to update - * @default undefined - */ material: BABYLON.PBRMetallicRoughnessMaterial; - /** - * back face culling - * @default true - */ backFaceCulling?: boolean; } class BaseTextureDto { constructor(material?: BABYLON.PBRMetallicRoughnessMaterial, baseTexture?: BABYLON.Texture); - /** - * Material to update - * @default undefined - */ material: BABYLON.PBRMetallicRoughnessMaterial; - /** - * Base texture of the material - * @default undefined - */ baseTexture: BABYLON.Texture; } class SkyMaterialDto { constructor(luminance?: number, turbidity?: number, rayleigh?: number, mieCoefficient?: number, mieDirectionalG?: number, distance?: number, inclination?: number, azimuth?: number, sunPosition?: Base.Vector3, useSunPosition?: boolean, cameraOffset?: Base.Vector3, up?: Base.Vector3, dithering?: boolean); - /** - * Defines the overall luminance of sky in interval ]0, 1[. - * @default 1 - * @minimum 0 - * @maximum 1 - * @step 0.01 - * - */ luminance: number; - /** - * Defines the amount (scattering) of haze as opposed to molecules in atmosphere. - * @default 10 - * @minimum 0 - * @maximum Infinity - * @step 1 - */ turbidity: number; - /** - * Defines the sky appearance (light intensity). - * @default 2 - * @minimum 0 - * @maximum Infinity - * @step 1 - */ rayleigh: number; - /** - * Defines the mieCoefficient in interval [0, 0.1] which affects the property .mieDirectionalG. - * @default 0.005 - * @minimum 0 - * @maximum Infinity - * @step 0.001 - */ mieCoefficient: number; - /** - * Defines the amount of haze particles following the Mie scattering theory. - * @default 0.8 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ mieDirectionalG: number; - /** - * Defines the distance of the sun according to the active scene camera. - * @default 500 - * @minimum 0 - * @maximum Infinity - * @step 10 - */ distance: number; - /** - * Defines the sun inclination, in interval [-0.5, 0.5]. When the inclination is not 0, the sun is said - * "inclined". - * @default 0.49 - * @minimum -0.5 - * @maximum 0.5 - * @step 0.01 - */ inclination: number; - /** - * Defines the solar azimuth in interval [0, 1]. The azimuth is the angle in the horizontal plan between - * an object direction and a reference direction. - * @default 0.25 - * @minimum 0 - * @maximum 1 - * @step 0.01 - */ azimuth: number; - /** - * Defines the sun position in the sky on (x,y,z). If the property .useSunPosition is set to false, then - * the property is overridden by the inclination and the azimuth and can be read at any moment. - * @default undefined - * @optional true - */ sunPosition: Base.Vector3; - /** - * Defines if the sun position should be computed (inclination and azimuth) according to the given - * .sunPosition property. - * @default false - */ useSunPosition: boolean; - /** - * Defines an offset vector used to get a horizon offset. - * @example skyMaterial.cameraOffset.y = camera.globalPosition.y // Set horizon relative to 0 on the Y axis - * @default undefined - * @optional true - */ cameraOffset: Base.Vector3; - /** - * Defines the vector the skyMaterial should consider as up. (default is Vector3(0, 1, 0) as returned by Vector3.Up()) - * @default [0, 1, 0] - */ up: number[]; - /** - * Defines if sky should be dithered. - * @default false - */ dithering: boolean; } class LuminanceDto { constructor(material?: MATERIALS.SkyMaterial, luminance?: number); - /** - * Material to update - * @default undefined - */ material: MATERIALS.SkyMaterial; - /** - * Defines the overall luminance of sky in interval ]0, 1[. - * @default 1 - * @minimum 0 - * @maximum 1 - * @step 0.01 - */ luminance?: number; } class TurbidityDto { constructor(material?: MATERIALS.SkyMaterial, turbidity?: number); - /** - * Material to update - * @default undefined - */ material: MATERIALS.SkyMaterial; - /** - * Defines the amount (scattering) of haze as opposed to molecules in atmosphere. - * @default 10 - * @minimum 0 - * @maximum Infinity - * @step 1 - */ turbidity?: number; } class RayleighDto { constructor(material?: MATERIALS.SkyMaterial, rayleigh?: number); - /** - * Material to update - * @default undefined - */ material: MATERIALS.SkyMaterial; - /** - * Defines the sky appearance (light intensity). - * @default 2 - * @minimum 0 - * @maximum Infinity - * @step 1 - */ rayleigh?: number; } class MieCoefficientDto { constructor(material?: MATERIALS.SkyMaterial, mieCoefficient?: number); - /** - * Material to update - * @default undefined - */ material: MATERIALS.SkyMaterial; - /** - * Defines the mieCoefficient in interval [0, 0.1] which affects the property .mieDirectionalG. - * @default 0.005 - * @minimum 0 - * @maximum Infinity - * @step 0.001 - */ mieCoefficient?: number; } class MieDirectionalGDto { constructor(material?: MATERIALS.SkyMaterial, mieDirectionalG?: number); - /** - * Material to update - * @default undefined - */ material: MATERIALS.SkyMaterial; - /** - * Defines the amount of haze particles following the Mie scattering theory. - * @default 0.8 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ mieDirectionalG?: number; } class DistanceDto { constructor(material?: MATERIALS.SkyMaterial, distance?: number); - /** - * Material to update - * @default undefined - */ material: MATERIALS.SkyMaterial; - /** - * Defines the distance of the sun according to the active scene camera. - * @default 500 - * @minimum 0 - * @maximum Infinity - * @step 10 - */ distance?: number; } class InclinationDto { constructor(material?: MATERIALS.SkyMaterial, inclination?: number); - /** - * Material to update - * @default undefined - */ material: MATERIALS.SkyMaterial; - /** - * Defines the sun inclination, in interval [-0.5, 0.5]. When the inclination is not 0, the sun is said - * "inclined". - * @default 0.49 - * @minimum -0.5 - * @maximum 0.5 - * @step 0.01 - */ inclination?: number; } class AzimuthDto { constructor(material?: MATERIALS.SkyMaterial, azimuth?: number); - /** - * Material to update - * @default undefined - */ material: MATERIALS.SkyMaterial; - /** - * Defines the solar azimuth in interval [0, 1]. The azimuth is the angle in the horizontal plan between - * an object direction and a reference direction. - * @default 0.25 - * @minimum 0 - * @maximum 1 - * @step 0.01 - */ azimuth?: number; } class SunPositionDto { constructor(material?: MATERIALS.SkyMaterial, sunPosition?: Base.Vector3); - /** - * Material to update - * @default undefined - */ material: MATERIALS.SkyMaterial; - /** - * Defines the sun position in the sky on (x,y,z). If the property .useSunPosition is set to false, then - * the property is overridden by the inclination and the azimuth and can be read at any moment. - * @default undefined - */ sunPosition?: Base.Vector3; } class UseSunPositionDto { constructor(material?: MATERIALS.SkyMaterial, useSunPosition?: boolean); - /** - * Material to update - * @default undefined - */ material: MATERIALS.SkyMaterial; - /** - * Defines if the sun position should be computed (inclination and azimuth) according to the given - * .sunPosition property. - * @default false - */ useSunPosition?: boolean; } class CameraOffsetDto { constructor(material?: MATERIALS.SkyMaterial, cameraOffset?: Base.Vector3); - /** - * Material to update - * @default undefined - */ material: MATERIALS.SkyMaterial; - /** - * Defines an offset vector used to get a horizon offset. - * @example skyMaterial.cameraOffset.y = camera.globalPosition.y // Set horizon relative to 0 on the Y axis - * @default undefined - */ cameraOffset?: Base.Vector3; } class UpDto { constructor(material?: MATERIALS.SkyMaterial, up?: Base.Vector3); - /** - * Material to update - * @default undefined - */ material: MATERIALS.SkyMaterial; - /** - * Defines the vector the skyMaterial should consider as up. (default is Vector3(0, 1, 0) as returned by Vector3.Up()) - * @default undefined - */ up?: Base.Vector3; } class DitheringDto { constructor(material?: MATERIALS.SkyMaterial, dithering?: boolean); - /** - * Material to update - * @default undefined - */ material: MATERIALS.SkyMaterial; - /** - * Defines if sky should be dithered. - * @default false - */ dithering?: boolean; } - } declare namespace BabylonMeshBuilder { + } + declare namespace BabylonMeshBuilder { class CreateBoxDto { constructor(width?: number, depth?: number, height?: number, sideOrientation?: BabylonMesh.sideOrientationEnum, enableShadows?: boolean); - /** - * Width of the box - * @default 1 - */ width: number; - /** - * Depth of the box - * @default 1 - */ depth: number; - /** - * Height of the box - * @default 1 - */ height: number; - /** - * Side orientation of the mesh - * @default frontside - */ sideOrientation: BabylonMesh.sideOrientationEnum; - /** - * Enables shadows for the mesh - * @default true - */ enableShadows: boolean; } class CreateCubeDto { constructor(size?: number, sideOrientation?: BabylonMesh.sideOrientationEnum, enableShadows?: boolean); - /** - * Size of the cube - * @default 1 - */ size: number; - /** - * Side orientation of the mesh - * @default frontside - */ sideOrientation: BabylonMesh.sideOrientationEnum; - /** - * Enables shadows for the mesh - * @default true - */ enableShadows: boolean; } class CreateSquarePlaneDto { constructor(size?: number, sideOrientation?: BabylonMesh.sideOrientationEnum, enableShadows?: boolean); - /** - * Size of the square plane - * @default 1 - */ size: number; - /** - * Side orientation of the mesh - * @default frontside - */ sideOrientation: BabylonMesh.sideOrientationEnum; - /** - * Enables shadows for the mesh - * @default true - */ enableShadows: boolean; } class CreateSphereDto { constructor(diameter?: number, segments?: number, sideOrientation?: BabylonMesh.sideOrientationEnum, enableShadows?: boolean); - /** - * Diameter of the sphere - * @default 1 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ diameter: number; - /** - * Segments of the sphere - * @default 32 - * @minimum 0 - * @maximum Infinity - * @step 1 - */ segments: number; - /** - * Side orientation of the mesh - * @default frontside - */ sideOrientation: BabylonMesh.sideOrientationEnum; - /** - * Enables shadows for the mesh - * @default true - */ enableShadows: boolean; } class CreateIcoSphereDto { constructor(radius?: number, radiusX?: number, radiusY?: number, radiusZ?: number, flat?: boolean, subdivisions?: number, sideOrientation?: BabylonMesh.sideOrientationEnum, enableShadows?: boolean); - /** - * Radius of the ico sphere - * @default 1 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ radius: number; - /** - * Radius X of the ico sphere - * @default 0 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ radiusX: number; - /** - * Radius Y of the ico sphere - * @default 0 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ radiusY: number; - /** - * Radius Z of the ico sphere - * @default 0 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ radiusZ: number; - /** - * Flat of the ico sphere - * @default false - */ flat: boolean; - /** - * Subdivisions of the ico sphere - * @default 4 - * @minimum 0 - * @maximum Infinity - * @step 1 - */ subdivisions: number; - /** - * Side orientation of the mesh - * @default frontside - */ sideOrientation: BabylonMesh.sideOrientationEnum; - /** - * Enables shadows for the mesh - * @default true - */ enableShadows: boolean; } class CreateDiscDto { constructor(radius?: number, tessellation?: number, sideOrientation?: BabylonMesh.sideOrientationEnum, enableShadows?: boolean); - /** - * Radius of the disc - * @default 1 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ radius: number; - /** - * Tessellation of the disc - * @default 32 - * @minimum 3 - * @maximum Infinity - * @step 1 - */ tessellation: number; - /** - * Arc between 0 and 1 - * @default 1 - * @minimum 0 - * @maximum 1 - * @step 0.1 - */ arc: number; - /** - * Side orientation of the mesh - * @default frontside - */ sideOrientation: BabylonMesh.sideOrientationEnum; - /** - * Enables shadows for the mesh - * @default true - */ enableShadows: boolean; } class CreateRibbonDto { constructor(pathArray?: Base.Vector3[][], closeArray?: boolean, closePath?: boolean, offset?: number, updatable?: boolean, sideOrientation?: BabylonMesh.sideOrientationEnum, enableShadows?: boolean); - /** - * Path array of the ribbon - */ pathArray: Base.Vector3[][]; - /** - * Close array of the ribbon - * @default false - */ closeArray: boolean; - /** - * Close path of the ribbon - * @default false - */ closePath: boolean; - /** - * Offset of the ribbon - * @default 0 - */ offset: number; - /** - * Updateable - * @default false - */ updatable: boolean; - /** - * Side orientation of the mesh - * @default frontside - */ sideOrientation: BabylonMesh.sideOrientationEnum; - /** - * Enables shadows for the mesh - * @default true - */ enableShadows: boolean; } class CreateTorusDto { constructor(diameter?: number, thickness?: number, tessellation?: number, sideOrientation?: BabylonMesh.sideOrientationEnum, enableShadows?: boolean); - /** - * Diameter of the torus - * @default 1 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ diameter: number; - /** - * Thickness of the torus - * @default 0.5 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ thickness: number; - /** - * Tessellation of the torus - * @default 32 - * @minimum 3 - * @maximum Infinity - * @step 1 - */ tessellation: number; - /** - * Side orientation of the mesh - * @default frontside - */ sideOrientation: BabylonMesh.sideOrientationEnum; - /** - * Enables shadows for the mesh - * @default true - */ enableShadows: boolean; } class CreateTorusKnotDto { constructor(radius?: number, tube?: number, radialSegments?: number, tubularSegments?: number, p?: number, q?: number, sideOrientation?: BabylonMesh.sideOrientationEnum, enableShadows?: boolean); - /** - * Radius of the torus knot - * @default 2 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ radius: number; - /** - * Tube of the torus knot - * @default 0.5 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ tube: number; - /** - * Radial segments of the torus knot - * @default 128 - * @minimum 3 - * @maximum Infinity - * @step 1 - */ radialSegments: number; - /** - * Tubular segments of the torus knot - * @default 32 - * @minimum 3 - * @maximum Infinity - * @step 1 - */ tubularSegments: number; - /** - * P of the torus knot - * @default 2 - * @minimum 0 - * @maximum Infinity - * @step 1 - */ p: number; - /** - * Q of the torus knot - * @default 3 - * @minimum 0 - * @maximum Infinity - * @step 1 - */ q: number; - /** - * Side orientation of the mesh - * @default frontside - */ sideOrientation: BabylonMesh.sideOrientationEnum; - /** - * Enables shadows for the mesh - * @default true - */ enableShadows: boolean; } class CreatePolygonDto { constructor(shape?: Base.Vector3[], holes?: Base.Vector3[][], depth?: number, smoothingThreshold?: number, sideOrientation?: BabylonMesh.sideOrientationEnum, wrap?: boolean, enableShadows?: boolean); - /** - * Shape of the polygon - */ shape: Base.Vector3[]; - /** - * Holes of the polygon - * @optional true - */ holes?: Base.Vector3[][]; - /** - * Depth of the polygon - * @default 0 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ depth: number; - /** - * Smoothing threshold of the polygon - * @default 0.01 - * @minimum 0 - * @maximum 1 - * @step 0.01 - */ smoothingThreshold: number; - /** - * Side orientation of the mesh - * @default frontside - */ sideOrientation: BabylonMesh.sideOrientationEnum; - /** - * Wrap of the polygon - * @default false - */ wrap: boolean; - /** - * Enables shadows for the mesh - * @default true - */ enableShadows: boolean; } class ExtrudePolygonDto { constructor(shape?: Base.Vector3[], holes?: Base.Vector3[][], depth?: number, sideOrientation?: BabylonMesh.sideOrientationEnum, wrap?: boolean, enableShadows?: boolean); - /** - * Shape of the extrude - */ shape: Base.Vector3[]; - /** - * Holes of the extrude - * @optional true - */ holes?: Base.Vector3[][]; - /** - * Depth of the extrude - * @default 1 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ depth: number; - /** - * Side orientation of the mesh - * @default frontside - */ sideOrientation: BabylonMesh.sideOrientationEnum; - /** - * Wrap of the extrude - * @default false - */ wrap: boolean; - /** - * Enables shadows for the mesh - * @default true - */ enableShadows: boolean; } class CreatePolyhedronDto { constructor(size?: number, type?: number, sizeX?: number, sizeY?: number, sizeZ?: number, custom?: number[], flat?: boolean, sideOrientation?: BabylonMesh.sideOrientationEnum, enableShadows?: boolean); - /** - * Size of the polyhedron - * @default 1 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ size: number; - /** - * Type of the polyhedron - * @default 0 - * @minimum 0 - * @maximum Infinity - * @step 1 - */ type: number; - /** - * Size X of the polyhedron - * @default 0 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ sizeX: number; - /** - * Size Y of the polyhedron - * @default 0 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ sizeY: number; - /** - * Size Z of the polyhedron - * @default 0 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ sizeZ: number; - /** - * Custom polyhedron - * @optional true - */ custom?: number[]; - /** - * Flat polyhedron - * @default false - */ flat: boolean; - /** - * Side orientation of the mesh - * @default frontside - */ sideOrientation: BabylonMesh.sideOrientationEnum; - /** - * Enables shadows for the mesh - * @default true - */ enableShadows: boolean; } class CreateGeodesicDto { constructor(m?: number, n?: number, size?: number, sizeX?: number, sizeY?: number, sizeZ?: number, flat?: boolean, subdivisions?: number, sideOrientation?: BabylonMesh.sideOrientationEnum, enableShadows?: boolean); - /** - * M of the geodesic - * @default 4 - * @minimum 0 - * @maximum Infinity - * @step 1 - */ m: number; - /** - * N of the geodesic - * @default 4 - * @minimum 0 - * @maximum Infinity - * @step 1 - */ n: number; - /** - * Size of the geodesic - * @default 1 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ size: number; - /** - * Size X of the geodesic - * @default 0 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ sizeX: number; - /** - * Size Y of the geodesic - * @default 0 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ sizeY: number; - /** - * Size Z of the geodesic - * @default 0 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ sizeZ: number; - /** - * Flat - * @default false - */ flat: boolean; - /** - * Subdivisions of the geodesic - * @default 4 - * @minimum 0 - * @maximum Infinity - * @step 1 - */ subdivisions: number; - /** - * Side orientation of the mesh - * @default frontside - */ sideOrientation: BabylonMesh.sideOrientationEnum; - /** - * Enables shadows for the mesh - * @default true - */ enableShadows: boolean; } class CreateCapsuleDto { constructor(orientation?: Base.Vector3, subdivisions?: number, tessellation?: number, height?: number, radius?: number, capSubdivisions?: number, radiusTop?: number, radiusBottom?: number, topCapSubdivisions?: number, bottomCapSubdivisions?: number, sideOrientation?: BabylonMesh.sideOrientationEnum, enableShadows?: boolean); - /** - * Orientation of the capsule - */ orientation: Base.Vector3; - /** - * Subdivisions of the capsule - * @default 2 - * @minimum 0 - * @maximum Infinity - * @step 1 - */ subdivisions: number; - /** - * Tessellation of the capsule - * @default 16 - * @minimum 3 - * @maximum Infinity - * @step 1 - */ tessellation: number; - /** - * Height of the capsule - * @default 2 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ height: number; - /** - * Radius of the capsule - * @default 1 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ radius: number; - /** - * Cap subdivisions of the capsule - * @default 6 - * @minimum 0 - * @maximum Infinity - * @step 1 - */ capSubdivisions: number; - /** - * Radius top of the capsule - * @default 0.5 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ radiusTop: number; - /** - * Radius bottom of the capsule - * @default 0.5 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ radiusBottom: number; - /** - * Top cap subdivisions of the capsule - * @default 6 - * @minimum 0 - * @maximum Infinity - * @step 1 - */ topCapSubdivisions: number; - /** - * Bottom cap subdivisions of the capsule - * @default 6 - * @minimum 0 - * @maximum Infinity - * @step 1 - */ bottomCapSubdivisions: number; - /** - * Side orientation of the mesh - * @default doubleside - */ sideOrientation: BabylonMesh.sideOrientationEnum; - /** - * Enables shadows for the mesh - * @default true - */ enableShadows: boolean; } class CreateGoldbergDto { constructor(m?: number, n?: number, size?: number, sizeX?: number, sizeY?: number, sizeZ?: number, sideOrientation?: BabylonMesh.sideOrientationEnum, enableShadows?: boolean); - /** - * M of the goldberg - * @default 4 - * @minimum 0 - * @maximum Infinity - * @step 1 - */ m: number; - /** - * N of the goldberg - * @default 4 - * @minimum 0 - * @maximum Infinity - * @step 1 - */ n: number; - /** - * Size of the goldberg - * @default 1 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ size: number; - /** - * Size X of the goldberg - * @default 0 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ sizeX: number; - /** - * Size Y of the goldberg - * @default 0 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ sizeY: number; - /** - * Size Z of the goldberg - * @default 0 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ sizeZ: number; - /** - * Side orientation of the mesh - * @default doubleside - */ sideOrientation: BabylonMesh.sideOrientationEnum; - /** - * Enables shadows for the mesh - * @default true - */ enableShadows: boolean; } class CreateTubeDto { constructor(path?: Base.Vector3[], radius?: number, tessellation?: number, cap?: number, arc?: number, sideOrientation?: BabylonMesh.sideOrientationEnum, enableShadows?: boolean); - /** - * Path of the tube - * @default undefined - */ path: Base.Vector3[]; - /** - * Radius of the tube - * @default 1 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ radius: number; - /** - * Tessellation of the tube - * @default 32 - * @minimum 3 - * @maximum Infinity - * @step 1 - */ tessellation: number; - /** - * Cap of the tube - * @default 0 - * @minimum 0 - * @maximum 3 - * @step 1 - */ cap: number; - /** - * Arc of the tube - * @default 1 - * @minimum 0 - * @maximum 1 - * @step 0.1 - */ arc: number; - /** - * Side orientation of the mesh - * @default doubleside - */ sideOrientation: BabylonMesh.sideOrientationEnum; - /** - * Enables shadows for the mesh - * @default true - */ enableShadows: boolean; } class CreateExtrudedShapeDto { constructor(shape?: Base.Vector3[], path?: Base.Vector3[], scale?: number, rotation?: number, cap?: number, sideOrientation?: BabylonMesh.sideOrientationEnum, enableShadows?: boolean); - /** - * Shape of the extrude - */ shape: Base.Vector3[]; - /** - * Path of the extrude - */ path: Base.Vector3[]; - /** - * Scale of the extrude - * @default 1 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ scale: number; - /** - * Rotation of the extrude - * @default 0 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ rotation: number; - /** - * Close shape of the extrude - * @default false - */ closeShape: boolean; - /** - * Close path of the extrude - * @default false - */ closePath: boolean; - /** - * Cap of the extrude - * @default 0 - * @minimum 0 - * @maximum 3 - * @step 1 - */ cap: number; - /** - * Side orientation of the mesh - * @default doubleside - */ sideOrientation: BabylonMesh.sideOrientationEnum; - /** - * Enables shadows for the mesh - * @default true - */ enableShadows: boolean; } class CreateCylinderDto { constructor(height?: number, diameterTop?: number, diameterBottom?: number, tessellation?: number, subdivisions?: number, sideOrientation?: BabylonMesh.sideOrientationEnum, enableShadows?: boolean); - /** - * Height of the cylinder - * @default 1 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ height: number; - /** - * Diameter top of the cylinder - * @default 1 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ diameterTop: number; - /** - * Diameter bottom of the cylinder - * @default 1 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ diameterBottom: number; - /** - * Tessellation of the cylinder - * @default 64 - * @minimum 3 - * @maximum Infinity - * @step 1 - */ tessellation: number; - /** - * Subdivisions of the cylinder - * @default 1 - * @minimum 0 - * @maximum Infinity - * @step 1 - */ subdivisions: number; - /** - * Side orientation of the mesh - * @default doubleside - */ sideOrientation: BabylonMesh.sideOrientationEnum; - /** - * Enables shadows for the mesh - * @default true - */ enableShadows: boolean; } class CreateLatheDto { constructor(shape?: Base.Vector3[], radius?: number, tessellation?: number, arc?: number, closed?: boolean, sideOrientation?: BabylonMesh.sideOrientationEnum, enableShadows?: boolean); - /** - * Shape of the lathe - */ shape: Base.Vector3[]; - /** - * Radius of the lathe - * @default 1 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ radius: number; - /** - * Tessellation of the lathe - * @default 64 - * @minimum 3 - * @maximum Infinity - * @step 1 - */ tessellation: number; - /** - * Arc of the lathe - * @default 1 - * @minimum 0 - * @maximum 1 - * @step 0.1 - */ arc: number; - /** - * Should lathe be closed - * @default true - */ closed: boolean; - /** - * Side orientation of the mesh - * @default doubleside - */ sideOrientation: BabylonMesh.sideOrientationEnum; - /** - * Enables shadows for the mesh - * @default true - */ enableShadows: boolean; } class CreateGroundDto { constructor(width?: number, height?: number, subdivisionsX?: number, subdivisionsY?: number, sideOrientation?: BabylonMesh.sideOrientationEnum, enableShadows?: boolean); - /** - * Width of the ground - * @default 10 - * @minimum 0 - * @maximum Infinity - * @step 1 - */ width: number; - /** - * Height of the ground - * @default 10 - * @minimum 0 - * @maximum Infinity - * @step 1 - */ height: number; - /** - * Subdivisions X of the ground - * @default 1 - * @minimum 0 - * @maximum Infinity - * @step 1 - */ subdivisionsX: number; - /** - * Subdivisions Y of the ground - * @default 1 - * @minimum 0 - * @maximum Infinity - * @step 1 - */ subdivisionsY: number; - /** - * Side orientation of the mesh - * @default doubleside - */ sideOrientation: BabylonMesh.sideOrientationEnum; - /** - * Enables shadows for the mesh - * @default true - */ enableShadows: boolean; } class CreateRectanglePlaneDto { constructor(width?: number, height?: number, sideOrientation?: BabylonMesh.sideOrientationEnum, enableShadows?: boolean); - /** - * Width of the rectangle plane - * @default 1 - */ width: number; - /** - * Height of the rectangle plane - * @default 1 - */ height: number; - /** - * Side orientation of the mesh - * @default doubleside - */ sideOrientation: BabylonMesh.sideOrientationEnum; - /** - * Enables shadows for the mesh - * @default true - */ enableShadows: boolean; } - } declare namespace BabylonMesh { + } + declare namespace BabylonMesh { enum sideOrientationEnum { frontside = "frontside", backside = "backside", @@ -12265,489 +4029,222 @@ declare namespace Bit { } class UpdateDrawnBabylonMesh { constructor(babylonMesh?: BABYLON.Mesh, position?: Base.Point3, rotation?: Base.Vector3, scaling?: Base.Vector3, colours?: string | string[]); - /** - * Babylon Mesh that needs to be updated - * @default undefined - */ babylonMesh: BABYLON.Mesh; - /** - * Position to place the mesh into - * @default undefined - */ position: Base.Point3; - /** - * Rotation for the mesh - * @default undefined - */ rotation: Base.Vector3; - /** - * Scale mesh to certain value - * @default undefined - */ scaling: Base.Vector3; - /** - * Colours or a single colour to change - * @default undefined - */ colours: string | string[]; } class SetParentDto { constructor(babylonMesh?: BABYLON.Mesh | BABYLON.InstancedMesh | BABYLON.AbstractMesh, parentMesh?: BABYLON.Mesh | BABYLON.InstancedMesh | BABYLON.AbstractMesh); - /** - * BabylonJS Mesh that needs to change it's parent - * @default undefined - */ babylonMesh: BABYLON.Mesh | BABYLON.InstancedMesh | BABYLON.AbstractMesh; - /** - * BabylonJS Mesh to use as a parent - * @default undefined - */ parentMesh: BABYLON.Mesh | BABYLON.InstancedMesh | BABYLON.AbstractMesh; } class UpdateDrawnBabylonMeshPositionDto { constructor(babylonMesh?: BABYLON.Mesh | BABYLON.InstancedMesh, position?: Base.Point3); - /** - * Babylon Mesh that needs to be updated - * @default undefined - */ babylonMesh: BABYLON.Mesh | BABYLON.InstancedMesh; - /** - * Position to place the mesh into - * @default undefined - */ position: Base.Point3; } class UpdateDrawnBabylonMeshRotationDto { constructor(babylonMesh?: BABYLON.Mesh | BABYLON.InstancedMesh, rotation?: Base.Vector3); - /** - * Babylon Mesh that needs to be updated - * @default undefined - */ babylonMesh: BABYLON.Mesh | BABYLON.InstancedMesh; - /** - * Rotation for the mesh - * @default undefined - */ rotation: Base.Vector3; } class UpdateDrawnBabylonMeshScaleDto { constructor(babylonMesh?: BABYLON.Mesh | BABYLON.InstancedMesh, scale?: Base.Vector3); - /** - * Babylon Mesh that needs to be updated - * @default undefined - */ babylonMesh: BABYLON.Mesh | BABYLON.InstancedMesh; - /** - * Scale for the mesh - * @default undefined - */ scale: Base.Vector3; } + class ScaleInPlaceDto { + constructor(babylonMesh?: BABYLON.Mesh | BABYLON.InstancedMesh, scale?: number); + babylonMesh: BABYLON.Mesh | BABYLON.InstancedMesh; + scale: number; + } class IntersectsMeshDto { constructor(babylonMesh?: BABYLON.Mesh | BABYLON.InstancedMesh, babylonMesh2?: BABYLON.Mesh | BABYLON.InstancedMesh, precise?: boolean, includeDescendants?: boolean); - /** - * Babylon Mesh that needs to be updated - * @default undefined - */ babylonMesh: BABYLON.Mesh | BABYLON.InstancedMesh; - /** - * Babylon Mesh that needs to be updated - * @default undefined - */ babylonMesh2: BABYLON.Mesh | BABYLON.InstancedMesh; - /** - * Should check precisely - * @default false - */ precise: boolean; - /** - * Check descendant intersections as well - * @default false - */ includeDescendants: boolean; } class IntersectsPointDto { constructor(babylonMesh?: BABYLON.Mesh | BABYLON.InstancedMesh, point?: Base.Point3); - /** - * Babylon Mesh that needs to be updated - * @default undefined - */ babylonMesh: BABYLON.Mesh | BABYLON.InstancedMesh; - /** - * point - * @default undefined - */ point: Base.Point3; } class BabylonMeshDto { constructor(babylonMesh?: BABYLON.Mesh); - /** - * BabylonJS mesh - * @default undefined - */ babylonMesh: BABYLON.Mesh; } class CloneToPositionsDto { constructor(babylonMesh?: BABYLON.Mesh, positions?: Base.Point3[]); - /** - * BabylonJS mesh - * @default undefined - */ babylonMesh: BABYLON.Mesh; - /** - * positions to clone to - * @default [] - */ positions: Base.Point3[]; } class MergeMeshesDto { constructor(arrayOfMeshes?: BABYLON.Mesh[], disposeSource?: boolean, allow32BitsIndices?: boolean, meshSubclass?: BABYLON.Mesh, subdivideWithSubMeshes?: boolean, multiMultiMaterials?: boolean); - /** - * meshes array of meshes with the vertices to merge. Entries cannot be empty meshes. - * @default undefined - */ arrayOfMeshes: BABYLON.Mesh[]; - /** - * disposeSource when true (default), dispose of the vertices from the source meshes. - * @default true - */ disposeSource: boolean; - /** - * allow32BitsIndices when the sum of the vertices > 64k, this must be set to true. - * @default false - */ allow32BitsIndices: boolean; - /** - * meshSubclass (optional) can be set to a Mesh where the merged vertices will be inserted. - * @default undefined - * @optional true - */ meshSubclass?: BABYLON.Mesh; - /** - * subdivideWithSubMeshes when true (false default), subdivide mesh into subMeshes. - * @default false - */ subdivideWithSubMeshes: boolean; - /** - * multiMultiMaterials when true (false default), subdivide mesh into subMeshes with multiple materials, ignores subdivideWithSubMeshes. - * @default false - */ multiMultiMaterials: boolean; } class BabylonMeshWithChildrenDto { constructor(babylonMesh?: BABYLON.Mesh); - /** - * BabylonJS mesh - * @default undefined - */ babylonMesh: BABYLON.Mesh; - /** - * Include children when performing action - * @default true - */ includeChildren: boolean; } class ShowHideMeshDto { constructor(babylonMesh?: BABYLON.Mesh, includeChildren?: boolean); - /** - * BabylonJS mesh - * @default undefined - */ babylonMesh: BABYLON.Mesh; - /** - * Include children when showing hiding - * @default true - */ includeChildren: boolean; } class CloneBabylonMeshDto { constructor(babylonMesh?: BABYLON.Mesh); - /** - * BabylonJS mesh - * @default undefined - */ babylonMesh: BABYLON.Mesh; } class ChildMeshesBabylonMeshDto { constructor(babylonMesh?: BABYLON.Mesh, directDescendantsOnly?: boolean); - /** - * BabylonJS mesh - * @default undefined - */ babylonMesh: BABYLON.Mesh; - /** - * Include only direct descendants - * @default false - */ directDescendantsOnly: boolean; } class TranslateBabylonMeshDto { constructor(babylonMesh?: BABYLON.Mesh, distance?: number); - /** - * BabylonJS mesh - * @default undefined - */ babylonMesh: BABYLON.Mesh; - /** - * distance to translate - * @default 0 - * @minimum -Infinity - * @maximum Infinity - * @step 1 - */ distance: number; } class NameBabylonMeshDto { constructor(babylonMesh?: BABYLON.Mesh, name?: string, includeChildren?: boolean); - /** - * BabylonJS mesh - * @default undefined - * - */ babylonMesh?: BABYLON.Mesh; - /** - * name of the mesh - * @default undefined - */ name: string; - /** - * Set name also on children - * @default false - */ includeChildren?: boolean; } class ByNameBabylonMeshDto { constructor(name?: string); - /** - * name of the mesh - * @default undefined - */ name: string; } class MaterialBabylonMeshDto { constructor(babylonMesh?: BABYLON.Mesh, material?: BABYLON.Material, includeChildren?: boolean); - /** - * BabylonJS mesh - * @default undefined - */ babylonMesh?: BABYLON.Mesh; - /** - * material of the mesh - * @default undefined - */ material: BABYLON.Material; - /** - * Set material on children also - * @default false - */ includeChildren: boolean; } class IdBabylonMeshDto { constructor(babylonMesh?: BABYLON.Mesh, id?: string); - /** - * BabylonJS mesh - * @default undefined - */ babylonMesh?: BABYLON.Mesh; - /** - * id of the mesh - * @default undefined - */ id: string; } class ByIdBabylonMeshDto { constructor(id?: string); - /** - * id of the mesh - * @default undefined - */ id: string; } class UniqueIdBabylonMeshDto { constructor(uniqueId?: number); - /** - * Unique id of the mesh - * @default 0 - * @minimum -Infinity - * @maximum Infinity - * @step 1 - */ uniqueId: number; } class PickableBabylonMeshDto { constructor(babylonMesh?: BABYLON.Mesh, pickable?: boolean, includeChildren?: boolean); - /** - * BabylonJS mesh - * @default undefined - */ babylonMesh: BABYLON.Mesh; - /** - * Pickable - * @default false - */ pickable: boolean; - /** - * Apply set to children also - * @default false - */ includeChildren: boolean; } class CheckCollisionsBabylonMeshDto { constructor(babylonMesh?: BABYLON.Mesh, checkCollisions?: boolean, includeChildren?: boolean); - /** - * BabylonJS mesh - * @default undefined - */ babylonMesh: BABYLON.Mesh; - /** - * Check collisions - * @default false - */ checkCollisions: boolean; - /** - * Apply set to children also - * @default false - */ includeChildren: boolean; } class RotateBabylonMeshDto { constructor(babylonMesh?: BABYLON.Mesh, rotate?: number); - /** - * BabylonJS mesh - * @default undefined - */ babylonMesh: BABYLON.Mesh; - /** - * rotate to translate - * @default 0 - * @minimum -Infinity - * @maximum Infinity - * @step 1 - */ rotate: number; } class SetMeshVisibilityDto { constructor(babylonMesh?: BABYLON.Mesh, visibility?: number, includeChildren?: boolean); - /** - * BabylonJS mesh - * @default undefined - */ babylonMesh: BABYLON.Mesh; - /** - * Shows mesh if 0 and shows if 1 - * @default 0 - * @minimum 0 - * @maximum 1 - * @step 0.1 - */ visibility: number; - /** - * Include children - * @default false - */ includeChildren: boolean; } class MeshInstanceAndTransformDto { constructor(mesh?: BABYLON.Mesh, position?: Base.Point3, rotation?: Base.Vector3, scaling?: Base.Vector3); - /** - * BabylonJS mesh - * @default undefined - */ mesh: BABYLON.Mesh; - /** - * Position - * @default undefined - */ position: Base.Point3; - /** - * Rotation - * @default undefined - */ rotation: Base.Vector3; - /** - * Scaling - * @default undefined - */ scaling: Base.Vector3; } class MeshInstanceDto { constructor(mesh?: BABYLON.Mesh); - /** - * BabylonJS mesh - * @default undefined - */ mesh: BABYLON.Mesh; } class RotateAroundAxisNodeDto { constructor(mesh?: BABYLON.Mesh, position?: Base.Point3, axis?: Base.Vector3, angle?: number); - /** - * BabylonJS mesh - * @default undefined - */ mesh: BABYLON.Mesh; - /** - * Position vector expressed in [x, y, z] vector array - */ position: Base.Point3; - /** - * Rotate around the axis expressed in [x, y, z] vector array - */ axis: Base.Vector3; - /** - * The rotation angle expressed in degrees - */ angle: number; } - } declare namespace BabylonPick { + } + declare namespace BabylonPick { class RayDto { constructor(ray?: BABYLON.Ray); - /** - * Ray - */ ray: BABYLON.Ray; } class PickInfo { constructor(pickInfo?: BABYLON.PickingInfo); - /** - * Information about picking result - */ pickInfo: BABYLON.PickingInfo; } - } declare namespace BabylonRay { + } + declare namespace BabylonRay { class BaseRayDto { constructor(origin?: Base.Point3, direction?: Base.Vector3, length?: number); - /** - * Origin of the ray - */ origin: Base.Point3; - /** - * Direction of the ray - */ direction: Base.Vector3; - /** - * Length of the ray - */ length?: number; } class RayDto { constructor(ray?: BABYLON.Ray); - /** - * ray to analyze - */ ray: BABYLON.Ray; } class FromToDto { constructor(from?: Base.Point3, to?: Base.Point3); - /** - * From point - */ from: Base.Point3; - /** - * To point - */ to: Base.Point3; } - } declare namespace BabylonTexture { + } + interface InitBabylonJSResult { + scene: BABYLON.Scene; + engine: BABYLON.Engine; + hemisphericLight: BABYLON.HemisphericLight; + directionalLight: BABYLON.DirectionalLight; + ground: BABYLON.Mesh | null; + arcRotateCamera: BABYLON.ArcRotateCamera | null; + startRenderLoop: (onRender?: () => void) => void; + dispose: () => void; + } + declare namespace BabylonJSScene { + class InitBabylonJSDto { + constructor(canvasId?: string, sceneSize?: number, backgroundColor?: string, enableShadows?: boolean, enableGround?: boolean, groundCenter?: Base.Point3, groundScaleFactor?: number, groundColor?: string, groundOpacity?: number, hemisphereLightSkyColor?: string, hemisphereLightGroundColor?: string, hemisphereLightIntensity?: number, directionalLightColor?: string, directionalLightIntensity?: number, shadowMapSize?: number); + canvasId?: string; + sceneSize: number; + backgroundColor: string; + enableShadows: boolean; + enableGround: boolean; + groundCenter: Base.Point3; + groundScaleFactor: number; + groundColor: string; + groundOpacity: number; + hemisphereLightSkyColor: string; + hemisphereLightGroundColor: string; + hemisphereLightIntensity: number; + directionalLightColor: string; + directionalLightIntensity: number; + shadowMapSize: number; + enableArcRotateCamera: boolean; + arcRotateCameraOptions?: BabylonCamera.ArcRotateCameraDto; + } + } + declare namespace BabylonTexture { enum samplingModeEnum { nearest = "nearest", bilinear = "bilinear", @@ -12755,358 +4252,120 @@ declare namespace Bit { } class TextureSimpleDto { constructor(name?: string, url?: string, invertY?: boolean, invertZ?: boolean, wAng?: number, uScale?: number, vScale?: number, uOffset?: number, vOffset?: number, samplingMode?: samplingModeEnum); - /** - * Name of the material - * @default Custom Texture - */ name: string; - /** - * Url of the texture - * @default undefined - */ url: string; - /** - * Invert texture on Y direction - * @default false - */ invertY: boolean; - /** - * Invert texture on Z direction - * @default false - */ invertZ: boolean; - /** - * W angle of the texture - * @default 0 - */ wAng: number; - /** - * U scale of the texture - * @default 1 - */ uScale: number; - /** - * V scale of the texture - * @default 1 - */ vScale: number; - /** - * U offset of the texture - * @default 0 - */ uOffset: number; - /** - * V offset of the texture - * @default 0 - */ vOffset: number; - /** - * The sampling mode of the texture - * @default nearest - */ samplingMode: samplingModeEnum; } - } declare namespace BabylonTools { + } + declare namespace BabylonTools { class ScreenshotDto { constructor(camera?: BABYLON.Camera, width?: number, height?: number, mimeType?: string, quality?: number); - /** - * Camera to be used. If not set, active camera will be used - * @default undefined - */ camera: BABYLON.Camera; - /** - * width of the screenshot - * @default 1920 - * @minimum 0 - * @maximum Infinity - * @step 1 - */ width: number; - /** - * height of the screenshot - * @default 1080 - * @minimum 0 - * @maximum Infinity - * @step 1 - */ height: number; - /** - * The mime type - * @default image/png - */ mimeType: string; - /** - * quality of the screenshot - * @default 1 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ quality: number; } - } declare namespace BabylonTransforms { + } + declare namespace BabylonTransforms { class RotationCenterAxisDto { constructor(angle?: number, axis?: Base.Vector3, center?: Base.Point3); - /** - * Angle of rotation in degrees - * @default 90 - * @minimum -Infinity - * @maximum Infinity - * @step 1 - */ angle: number; - /** - * Axis vector for rotation - * @default [0, 1, 0] - */ axis: Base.Vector3; - /** - * The center from which the axis is pointing - * @default [0, 0, 0] - */ center: Base.Point3; } class TransformBabylonMeshDto { constructor(mesh?: BABYLON.Mesh, transformation?: Base.TransformMatrixes); - /** - * Mesh to transform - * @default undefined - */ mesh: BABYLON.Mesh; - /** - * Transformation(s) to apply - * @default undefined - */ transformation: Base.TransformMatrixes; } class RotationCenterDto { constructor(angle?: number, center?: Base.Point3); - /** - * Angle of rotation in degrees - * @default 90 - * @minimum -Infinity - * @maximum Infinity - * @step 1 - */ angle: number; - /** - * The center from which the axis is pointing - * @default [0, 0, 0] - */ center: Base.Point3; } class RotationCenterYawPitchRollDto { constructor(yaw?: number, pitch?: number, roll?: number, center?: Base.Point3); - /** - * Yaw angle (Rotation around X) in degrees - * @default 0 - * @minimum -Infinity - * @maximum Infinity - * @step 1 - */ yaw: number; - /** - * Pitch angle (Rotation around Y) in degrees - * @default 0 - * @minimum -Infinity - * @maximum Infinity - * @step 1 - */ pitch: number; - /** - * Roll angle (Rotation around Z) in degrees - * @default 0 - * @minimum -Infinity - * @maximum Infinity - * @step 1 - */ roll: number; - /** - * The center from which the rotations are applied - * @default [0, 0, 0] - */ center: Base.Point3; } class ScaleXYZDto { constructor(scaleXyz?: Base.Vector3); - /** - * Scaling factors for each axis [1, 2, 1] means that Y axis will be scaled 200% and both x and z axis will remain on 100% - * @default [1, 1, 1] - */ scaleXyz: Base.Vector3; } class ScaleCenterXYZDto { constructor(center?: Base.Point3, scaleXyz?: Base.Vector3); - /** - * The center from which the scaling is applied - * @default [0, 0, 0] - */ center: Base.Point3; - /** - * Scaling factors for each axis [1, 2, 1] means that Y axis will be scaled 200% and both x and z axis will remain on 100% - * @default [1, 1, 1] - */ scaleXyz: Base.Vector3; } class UniformScaleDto { constructor(scale?: number); - /** - * Uniform scale factor for all x, y, z directions. 1 will keep everything on original size, 2 will scale 200%; - * @default 1 - * @minimum -Infinity - * @maximum Infinity - * @step 0.1 - */ scale: number; } class UniformScaleFromCenterDto { constructor(scale?: number, center?: Base.Point3); - /** - * Scale factor for all x, y, z directions. 1 will keep everything on original size, 2 will scale 200%; - * @default 1 - * @minimum -Infinity - * @maximum Infinity - * @step 0.1 - */ scale: number; - /** - * Center position of the scaling - * @default [0, 0, 0] - */ center: Base.Point3; } class TranslationXYZDto { constructor(translation?: Base.Vector3); - /** - * Translation vector with [x, y, z] distances - * @default [0, 0, 0] - */ translation: Base.Vector3; } class TranslationsXYZDto { constructor(translations?: Base.Vector3[]); - /** - * Translation vectors with [x, y, z] distances - * @default undefined - */ translations: Base.Vector3[]; } - } declare namespace BabylonWebXR { + } + declare namespace BabylonWebXR { class WebXRDefaultExperienceOptions { constructor(disableDefaultUI?: boolean); - /** - * Enable or disable default UI to enter XR - * @optional true - */ disableDefaultUI?: boolean; - /** - * Should pointer selection not initialize. - * Note that disabling pointer selection also disables teleportation. - * Defaults to false. - * @optional true - */ disablePointerSelection?: boolean; - /** - * Should teleportation not initialize. Defaults to false. - * @optional true - */ disableTeleportation?: boolean; - /** - * Should nearInteraction not initialize. Defaults to false. - * @optional true - */ disableNearInteraction?: boolean; - /** - * Should hand tracking be disabled. Defaults to false. - * @optional true - */ disableHandTracking?: boolean; - /** - * Floor meshes that will be used for teleport - * @optional true - */ floorMeshes?: BABYLON.AbstractMesh[]; - /** - * If set to true, the first frame will not be used to reset position - * The first frame is mainly used when copying transformation from the old camera - * Mainly used in AR - * @optional true - */ ignoreNativeCameraTransformation?: boolean; - /** - * Optional configuration for the XR input object - * @optional true - */ inputOptions?: Partial; - /** - * optional configuration for pointer selection - * @optional true - */ pointerSelectionOptions?: Partial; - /** - * optional configuration for near interaction - * @optional true - */ nearInteractionOptions?: Partial; - /** - * optional configuration for hand tracking - * @optional true - */ handSupportOptions?: Partial; - /** - * optional configuration for teleportation - * @optional true - */ teleportationOptions?: Partial; - /** - * optional configuration for the output canvas - * @optional true - */ outputCanvasOptions?: BABYLON.WebXRManagedOutputCanvasOptions; - /** - * optional UI options. This can be used among other to change session mode and reference space type - * @optional true - */ uiOptions?: Partial; - /** - * When loading teleportation and pointer select, use stable versions instead of latest. - * @optional true - */ useStablePlugins?: boolean; - /** - * An optional rendering group id that will be set globally for teleportation, pointer selection and default controller meshes - * @optional true - */ renderingGroupId?: number; - /** - * A list of optional features to init the session with - * If set to true, all features we support will be added - * @optional true - */ optionalFeatures?: boolean | string[]; } class DefaultWebXRWithTeleportationDto { constructor(groundMeshes?: BABYLON.Mesh[]); - /** - * Create XR experience with ground meshes - */ groundMeshes: BABYLON.Mesh[]; } class WebXRDefaultExperienceDto { constructor(webXRDefaultExperience?: BABYLON.WebXRDefaultExperience); - /** - * Web XR default experience - */ webXRDefaultExperience: BABYLON.WebXRDefaultExperience; } class WebXRExperienceHelperDto { constructor(baseExperience?: BABYLON.WebXRExperienceHelper); - /** - * Base experience - */ baseExperience: BABYLON.WebXRExperienceHelper; } - } declare namespace Base { + } + declare namespace Base { + enum colorMapStrategyEnum { + firstColorForAll = "firstColorForAll", + lastColorRemainder = "lastColorRemainder", + repeatColors = "repeatColors", + reversedColors = "reversedColors" + } enum skyboxEnum { default = "default", clearSky = "clearSky", @@ -13119,6 +4378,75 @@ declare namespace Bit { exponentialSquared = "exponentialSquared", linear = "linear" } + enum gradientDirectionEnum { + toTop = "to top", + toTopRight = "to top right", + toRight = "to right", + toBottomRight = "to bottom right", + toBottom = "to bottom", + toBottomLeft = "to bottom left", + toLeft = "to left", + toTopLeft = "to top left", + deg0 = "0deg", + deg45 = "45deg", + deg90 = "90deg", + deg135 = "135deg", + deg180 = "180deg", + deg225 = "225deg", + deg270 = "270deg", + deg315 = "315deg" + } + enum gradientPositionEnum { + center = "center", + top = "top", + topLeft = "top left", + topRight = "top right", + bottom = "bottom", + bottomLeft = "bottom left", + bottomRight = "bottom right", + left = "left", + right = "right", + centerTop = "50% 0%", + centerBottom = "50% 100%", + leftCenter = "0% 50%", + rightCenter = "100% 50%" + } + enum gradientShapeEnum { + circle = "circle", + ellipse = "ellipse" + } + enum backgroundRepeatEnum { + repeat = "repeat", + repeatX = "repeat-x", + repeatY = "repeat-y", + noRepeat = "no-repeat", + space = "space", + round = "round" + } + enum backgroundSizeEnum { + auto = "auto", + cover = "cover", + contain = "contain" + } + enum backgroundAttachmentEnum { + scroll = "scroll", + fixed = "fixed", + local = "local" + } + enum backgroundOriginClipEnum { + paddingBox = "padding-box", + borderBox = "border-box", + contentBox = "content-box" + } + enum verticalAlignmentEnum { + top = "top", + middle = "middle", + bottom = "bottom" + } + enum topBottomEnum { + top = "top", + bottom = "bottom" + } type Color = string; type ColorRGB = { r: number; @@ -13126,10 +4454,25 @@ declare namespace Bit { b: number; }; type Material = any; - type Point2 = [number, number]; - type Vector2 = [number, number]; - type Point3 = [number, number, number]; - type Vector3 = [number, number, number]; + type Texture = any; + type Point2 = [ + number, + number + ]; + type Vector2 = [ + number, + number + ]; + type Point3 = [ + number, + number, + number + ]; + type Vector3 = [ + number, + number, + number + ]; type Axis3 = { origin: Base.Point3; direction: Base.Vector3; @@ -13138,13 +4481,23 @@ declare namespace Bit { origin: Base.Point2; direction: Base.Vector2; }; - type Segment2 = [Point2, Point2]; - type Segment3 = [Point3, Point3]; + type Segment2 = [ + Point2, + Point2 + ]; + type Segment3 = [ + Point3, + Point3 + ]; type TrianglePlane3 = { normal: Vector3; d: number; }; - type Triangle3 = [Base.Point3, Base.Point3, Base.Point3]; + type Triangle3 = [ + Base.Point3, + Base.Point3, + Base.Point3 + ]; type Mesh3 = Triangle3[]; type Plane3 = { origin: Base.Point3; @@ -13181,416 +4534,197 @@ declare namespace Bit { type VerbSurface = { tessellate: (options: any) => any; }; - type TransformMatrix3x3 = [number, number, number, number, number, number, number, number, number]; + type TransformMatrix3x3 = [ + number, + number, + number, + number, + number, + number, + number, + number, + number + ]; type TransformMatrixes3x3 = TransformMatrix3x3[]; - type TransformMatrix = [number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number]; + type TransformMatrix = [ + number, + number, + number, + number, + number, + number, + number, + number, + number, + number, + number, + number, + number, + number, + number, + number + ]; type TransformMatrixes = TransformMatrix[]; - } declare namespace Draw { + } + declare namespace Draw { type DrawOptions = DrawBasicGeometryOptions | DrawManifoldOrCrossSectionOptions | DrawOcctShapeOptions | DrawOcctShapeSimpleOptions | DrawOcctShapeMaterialOptions | DrawNodeOptions; - type Entity = Base.Point3 | Base.Vector3 | Base.Line3 | Base.Polyline3 | Base.VerbCurve | Base.VerbSurface | Inputs.OCCT.TopoDSShapePointer | Inputs.Tag.TagDto | { + type Entity = number[] | [ + number, + number, + number + ] | Base.Point3 | Base.Vector3 | Base.Line3 | Base.Segment3 | Base.Polyline3 | Base.VerbCurve | Base.VerbSurface | Inputs.OCCT.TopoDSShapePointer | Inputs.Tag.TagDto | { type: string; - name: string; - } | Base.Point3[] | Base.Vector3[] | Base.Line3[] | Base.Polyline3[] | Base.VerbCurve[] | Base.VerbSurface[] | Inputs.OCCT.TopoDSShapePointer[] | Inputs.Tag.TagDto[] | { + name?: string; + entityName?: string; + } | number[][] | Base.Point3[] | Base.Vector3[] | Base.Line3[] | Base.Segment3[] | Base.Polyline3[] | Base.VerbCurve[] | Base.VerbSurface[] | Inputs.OCCT.TopoDSShapePointer[] | Inputs.Tag.TagDto[] | { type: string[]; - name: string; + name?: string; + entityName?: string; }; class DrawAny { constructor(entity?: Entity, options?: DrawOptions, babylonMesh?: BABYLON.Mesh | BABYLON.LinesMesh); - /** - * Entity to be drawn - can be a single or multiple points, lines, polylines, verb curves, verb surfaces, jscad meshes, jscad polygons, jscad paths, occt shapes, tags, nodes - * @default undefined - */ entity: Entity; - /** - * Options that help you control how your drawn objects look like. This property is optional. In order to pick the right option you need to know which entity you are going to draw. For example if you draw points, lines, polylines or jscad meshes you can use basic geometry options, but if you want to draw OCCT shapes, use OCCT options. - * @default undefined - * @optional true - */ options?: DrawOptions; - /** - * Entity to be used when updating already drawn mesh in the render loop - * @default undefined - * @optional true - */ babylonMesh?: BABYLON.Mesh | BABYLON.LinesMesh; } class SceneDrawGridMeshDto { constructor(width?: number, height?: number, subdivisions?: number, majorUnitFrequency?: number, minorUnitVisibility?: number, gridRatio?: number, opacity?: number, backFaceCulling?: boolean, mainColor?: Base.Color, secondaryColor?: Base.Color); - /** - * Width of the grid - * @default 400 - * @minimum 0 - * @maximum Infinity - * @step 10 - */ width: number; - /** - * Height of the ground - * @default 400 - * @minimum 0 - * @maximum Infinity - * @step 10 - */ height: number; - /** - * Ground subdivisions - * @default 10 - * @minimum 0 - * @maximum Infinity - * @step 1 - */ subdivisions: number; - /** - * The frequency of thicker lines. - * @default 10 - * @minimum 0 - * @maximum Infinity - * @step 1 - */ majorUnitFrequency: number; - /** - * The visibility of minor units in the grid. - * @default 0.45 - * @minimum 0 - * @maximum 1 - * @step 0.1 - */ minorUnitVisibility: number; - /** - * The scale of the grid compared to unit. - * @default 0.5 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ gridRatio: number; - /** - * The grid opacity outside of the lines. - * @default 0.5 - * @minimum 0 - * @maximum 1 - * @step 0.1 - */ opacity: number; - /** - * Cull the back faces - * @default false - */ backFaceCulling: boolean; - /** - * Main color of the grid (e.g. between lines) - * @default #ffffff - */ mainColor: Base.Color; - /** - * Color of the grid lines. - * @default #ffffff - */ secondaryColor: Base.Color; } - /** - * Draw options for basic geometry types like points, lines, polylines, surfaces and jscad meshes - */ class DrawBasicGeometryOptions { - constructor(colours?: string | string[], size?: number, opacity?: number, updatable?: boolean, hidden?: boolean); - /** - * Basic geometry colours to use for lines, points, polylines, surfaces, jscad meshes. - * @default #ff0000 - */ + constructor(colours?: string | string[], size?: number, opacity?: number, updatable?: boolean, hidden?: boolean, drawTwoSided?: boolean, backFaceColour?: Base.Color, backFaceOpacity?: number, colorMapStrategy?: Base.colorMapStrategyEnum, arrowSize?: number, arrowAngle?: number); colours: string | string[]; - /** - * Size affect how big the drawn points are and how wide lines are. - * @default 0.1 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ + colorMapStrategy: Base.colorMapStrategyEnum; size: number; - /** - * Opacity of the point 0 to 1 - * @default 1 - * @minimum 0 - * @maximum 1 - * @step 0.1 - */ opacity: number; - /** - * If geometry needs to be updated later - * @default false - */ updatable: boolean; - /** - * Hidden - * @default false - */ hidden: boolean; + drawTwoSided: boolean; + backFaceColour: Base.Color; + backFaceOpacity: number; + arrowSize: number; + arrowAngle: number; } - /** - * Draw options for Nodes - */ class DrawNodeOptions { constructor(colourX?: Base.Color, colourY?: Base.Color, colourZ?: Base.Color, size?: number); - /** - * X Axis colour - * @default #ff0000 - */ colorX: Base.Color; - /** - * Y Axis colour - * @default #00ff00 - */ colorY: Base.Color; - /** - * Z Axis colour - * @default #0000ff - */ colorZ: Base.Color; - /** - * Length of the node axis - * @default 2 - * @minimum 0 - * @maximum Infinity - */ size: number; } class DrawManifoldOrCrossSectionOptions { - /** - * Provide options without default values - */ - constructor(faceOpacity?: number, faceMaterial?: Base.Material, faceColour?: Base.Color, crossSectionColour?: Base.Color, crossSectionWidth?: number, crossSectionOpacity?: number, computeNormals?: boolean); - /** - * Face opacity value between 0 and 1 - * @default 1 - * @minimum 0 - * @maximum 1 - * @step 0.1 - */ + constructor(faceOpacity?: number, faceMaterial?: Base.Material, faceColour?: Base.Color, crossSectionColour?: Base.Color, crossSectionWidth?: number, crossSectionOpacity?: number, computeNormals?: boolean, drawTwoSided?: boolean, backFaceColour?: Base.Color, backFaceOpacity?: number); faceOpacity: number; - /** - * Hex colour string for face colour - * @default #ff0000 - */ faceColour: Base.Color; - /** - * Face material - * @default undefined - * @optional true - */ faceMaterial?: Base.Material; - /** - * Hex colour string for cross section drawing - * @default #ff00ff - */ crossSectionColour: Base.Color; - /** - * Width of cross section lines - * @default 2 - */ crossSectionWidth: number; - /** - * Cross section opacity value between 0 and 1 - * @default 1 - * @minimum 0 - * @maximum 1 - * @step 0.1 - */ crossSectionOpacity: number; - /** - * Compute normals for the shape - * @default false - */ computeNormals: boolean; + drawTwoSided: boolean; + backFaceColour: Base.Color; + backFaceOpacity: number; } - /** - * Draw options for OCCT shapes - */ class DrawOcctShapeOptions { - /** - * Provide options without default values - */ - constructor(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); - /** - * Face opacity value between 0 and 1 - * @default 1 - * @minimum 0 - * @maximum 1 - * @step 0.1 - */ + constructor(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, edgeArrowSize?: number, edgeArrowAngle?: number); faceOpacity: number; - /** - * Edge opacity value between 0 and 1 - * @default 1 - * @minimum 0 - * @maximum 1 - * @step 0.1 - */ edgeOpacity: number; - /** - * Hex colour string for the edges - * @default #ffffff - */ edgeColour: Base.Color; - /** - * Hex colour string for face colour - * @default #ff0000 - */ faceColour: Base.Color; - /** - * Color of the vertices that will be drawn - * @default #ff00ff - */ vertexColour: Base.Color; - /** - * Face material - * @default undefined - * @optional true - */ faceMaterial?: Base.Material; - /** - * Edge width - * @default 2 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ edgeWidth: number; - /** - * The size of a vertices that will be drawn - * @default 0.03 - * @minimum 0 - * @maximum Infinity - * @step 0.01 - */ vertexSize: number; - /** - * You can turn off drawing of edges via this property - * @default true - */ drawEdges: boolean; - /** - * You can turn off drawing of faces via this property - * @default true - */ drawFaces: boolean; - /** - * You can turn off drawing of vertexes via this property - * @default false - */ drawVertices: boolean; - /** - * Precision of the mesh that will be generated for the shape, lower number will mean more triangles - * @default 0.01 - * @minimum 0 - * @maximum Infinity - * @step 0.01 - */ precision: number; - /** - * Draw index of edges in space - * @default false - */ drawEdgeIndexes: boolean; - /** - * Indicates the edge index height if they are drawn - * @default 0.06 - * @minimum 0 - * @maximum Infinity - * @step 0.01 - */ edgeIndexHeight: number; - /** - * Edge index colour if the edges are drawn - * @default #ff00ff - */ edgeIndexColour: Base.Color; - /** - * Draw indexes of faces in space - * @default false - */ drawFaceIndexes: boolean; - /** - * Indicates the edge index height if they are drawn - * @default 0.06 - * @minimum 0 - * @maximum Infinity - * @step 0.01 - */ faceIndexHeight: number; - /** - * Edge index colour if the edges are drawn - * @default #0000ff - */ faceIndexColour: Base.Color; + drawTwoSided: boolean; + backFaceColour: Base.Color; + backFaceOpacity: number; + edgeArrowSize: number; + edgeArrowAngle: number; } class DrawOcctShapeSimpleOptions { - constructor(precision?: number, drawFaces?: boolean, faceColour?: Base.Color, drawEdges?: boolean, edgeColour?: Base.Color, edgeWidth?: number); - /** - * Precision - * @default 0.01 - * @minimum 0 - * @maximum Infinity - */ + constructor(precision?: number, drawFaces?: boolean, faceColour?: Base.Color, drawEdges?: boolean, edgeColour?: Base.Color, edgeWidth?: number, drawTwoSided?: boolean, backFaceColour?: Base.Color, backFaceOpacity?: number); precision: number; - /** - * You can turn off drawing of faces via this property - * @default true - */ drawFaces: boolean; - /** - * Hex colour string for face colour - * @default #ff0000 - */ faceColour?: Base.Color; - /** - * You can turn off drawing of edges via this property - * @default true - */ drawEdges: boolean; - /** - * Hex colour string for the edges - * @default #ffffff - */ edgeColour: Base.Color; - /** - * Edge width - * @default 2 - * @minimum 0 - * @maximum Infinity - */ edgeWidth: number; + drawTwoSided: boolean; + backFaceColour: Base.Color; + backFaceOpacity: number; } class DrawOcctShapeMaterialOptions { constructor(precision?: number, faceMaterial?: any, drawEdges?: boolean, edgeColour?: Base.Color, edgeWidth?: number); - /** - * Precision - * @default 0.01 - * @minimum 0 - * @maximum Infinity - */ precision: number; - /** - * Face material - * @default undefined - */ faceMaterial: any; - /** - * You can turn off drawing of edges via this property - * @default true - */ drawEdges: boolean; - /** - * Hex colour string for the edges - * @default #ffffff - */ edgeColour: Base.Color; - /** - * Edge width - * @default 2 - * @minimum 0 - * @maximum Infinity - */ edgeWidth: number; } + enum samplingModeEnum { + nearest = "nearest", + bilinear = "bilinear", + trilinear = "trilinear" + } + class GenericTextureDto { + constructor(url?: string, name?: string, uScale?: number, vScale?: number, uOffset?: number, vOffset?: number, wAng?: number, invertY?: boolean, invertZ?: boolean, samplingMode?: samplingModeEnum); + url: string; + name: string; + uScale: number; + vScale: number; + uOffset: number; + vOffset: number; + wAng: number; + invertY: boolean; + invertZ: boolean; + samplingMode: samplingModeEnum; + } + enum alphaModeEnum { + opaque = "opaque", + mask = "mask", + blend = "blend" + } + class GenericPBRMaterialDto { + constructor(name?: string, baseColor?: Base.Color, metallic?: number, roughness?: number, alpha?: number, emissiveColor?: Base.Color, emissiveIntensity?: number, zOffset?: number, zOffsetUnits?: number, baseColorTexture?: Base.Texture, metallicRoughnessTexture?: Base.Texture, normalTexture?: Base.Texture, emissiveTexture?: Base.Texture, occlusionTexture?: Base.Texture, alphaMode?: alphaModeEnum, alphaCutoff?: number, doubleSided?: boolean, wireframe?: boolean, unlit?: boolean); + name: string; + baseColor: Base.Color; + metallic: number; + roughness: number; + alpha: number; + emissiveColor?: Base.Color; + emissiveIntensity: number; + zOffset: number; + zOffsetUnits: number; + baseColorTexture?: Base.Texture; + metallicRoughnessTexture?: Base.Texture; + normalTexture?: Base.Texture; + emissiveTexture?: Base.Texture; + occlusionTexture?: Base.Texture; + alphaMode: alphaModeEnum; + alphaCutoff: number; + doubleSided: boolean; + wireframe: boolean; + unlit: boolean; + } enum drawingTypes { point = 0, points = 1, @@ -13611,572 +4745,215 @@ declare namespace Bit { tag = 16, tags = 17 } - } declare namespace BabylonNode { + } + declare namespace BabylonNode { class NodeDto { constructor(node?: BABYLON.TransformNode); - /** - * Transformation node - */ node: BABYLON.TransformNode; } class NodeTranslationDto { constructor(node?: BABYLON.TransformNode, direction?: Base.Vector3, distance?: number); - /** - * Transformation node - */ node: BABYLON.TransformNode; - /** - * Direction vector expressed in [x, y, z] vector array - */ direction: Base.Vector3; - /** - * Distance to translate - */ distance: number; } class NodeParentDto { constructor(node?: BABYLON.TransformNode, parentNode?: BABYLON.TransformNode); - /** - * Transformation node - */ node: BABYLON.TransformNode; - /** - * Parent node - */ parentNode: BABYLON.TransformNode; } class NodeDirectionDto { constructor(node?: BABYLON.TransformNode, direction?: Base.Vector3); - /** - * Transformation node - */ node: BABYLON.TransformNode; - /** - * Direction vector expressed in [x, y, z] vector array - */ direction: number[]; } class NodePositionDto { constructor(node?: BABYLON.TransformNode, position?: Base.Point3); - /** - * Transformation node - */ node: BABYLON.TransformNode; - /** - * Position vector expressed in [x, y, z] vector array - */ position: Base.Point3; } class RotateNodeDto { constructor(node?: BABYLON.TransformNode, axis?: Base.Vector3, angle?: number); - /** - * Transformation node - */ node: BABYLON.TransformNode; - /** - * Rotate around the axis expressed in [x, y, z] vector array - */ axis: Base.Vector3; - /** - * The rotation angle expressed in degrees - */ angle: number; } class RotateAroundAxisNodeDto { constructor(node?: BABYLON.TransformNode, position?: Base.Point3, axis?: Base.Vector3, angle?: number); - /** - * Transformation node - */ node: BABYLON.TransformNode; - /** - * Position vector expressed in [x, y, z] vector array - */ position: Base.Point3; - /** - * Rotate around the axis expressed in [x, y, z] vector array - */ axis: Base.Vector3; - /** - * The rotation angle expressed in degrees - */ angle: number; } class CreateNodeFromRotationDto { constructor(parent?: BABYLON.TransformNode, origin?: Base.Point3, rotation?: Base.Vector3); - /** - * Optional parent node - */ parent: BABYLON.TransformNode | null; - /** - * Oirigin of the node - */ origin: Base.Point3; - /** - * Rotations of the node around x y z axis - */ rotation: Base.Vector3; } class DrawNodeDto { constructor(node?: BABYLON.TransformNode, colorX?: string, colorY?: string, colorZ?: string, size?: number); - /** - * Transformation node - */ node: BABYLON.TransformNode; - /** - * Hex encoded color string for X axis - */ colorX: string; - /** - * Hex encoded color string for Y axis - */ colorY: string; - /** - * Hex encoded color string for Z axis - */ colorZ: string; - /** - * Length of the node axis - */ size: number; } class DrawNodesDto { constructor(nodes?: BABYLON.TransformNode[], colorX?: string, colorY?: string, colorZ?: string, size?: number); - /** - * Nodes that will be drawn - */ nodes: BABYLON.TransformNode[]; - /** - * Hex encoded color string for X axis - */ colorX: string; - /** - * Hex encoded color string for Y axis - */ colorY: string; - /** - * Hex encoded color string for Z axis - */ colorZ: string; - /** - * Length of the node axis - */ size: number; } - } declare namespace BabylonScene { + } + declare namespace BabylonScene { class SceneBackgroundColourDto { - /** - * Provide options without default values - */ constructor(colour?: string); - /** - * Hex colour string for the scene background colour - * @default #ffffff - */ colour: Base.Color; } class SceneDto { - /** - * Provide scene - */ constructor(scene?: BABYLON.Scene); - /** - * The babylonjs scene - * @default undefined - */ scene: BABYLON.Scene; } class EnablePhysicsDto { constructor(vector?: Base.Vector3); - /** - * The gravity vector - * @default [0, -9.81, 0] - */ vector: Base.Vector3; } class PointLightDto { - constructor(position?: Base.Point3, intensity?: number, diffuse?: Base.Color, specular?: Base.Color, radius?: number, shadowGeneratorMapSize?: number, enableShadows?: boolean, shadowDarkness?: number, shadowUsePercentageCloserFiltering?: boolean, shadowContactHardeningLightSizeUVRatio?: number, shadowBias?: number, shadowNormalBias?: number, shadowMaxZ?: number, shadowMinZ?: number); - /** - * Position of the point light - * @default [0, 0, 0] - */ + constructor(position?: Base.Point3, intensity?: number, diffuse?: Base.Color, specular?: Base.Color, radius?: number, shadowGeneratorMapSize?: number, enableShadows?: boolean, shadowDarkness?: number, transparencyShadow?: boolean, shadowUsePercentageCloserFiltering?: boolean, shadowContactHardeningLightSizeUVRatio?: number, shadowBias?: number, shadowNormalBias?: number, shadowMaxZ?: number, shadowMinZ?: number, shadowRefreshRate?: number); position: Base.Point3; - /** - * Intensity of the point light, value between 0 and 1 - * @default 2000 - * @minimum 0 - * @maximum Infinity - * @step 500 - */ intensity: number; - /** - * Diffuse colour of the point light - * @default #ffffff - */ diffuse: Base.Color; - /** - * Specular colour of the point light - * @default #ffffff - */ specular: Base.Color; - /** - * Radius of the sphere mesh representing the light bulb. If 0 light gets created without the mesh - * @default 0.1 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ radius: number; - /** - * The map size for shadow generator texture if shadows are enabled - * @default 1024 - * @minimum 0 - * @maximum Infinity - * @step 1 - */ shadowGeneratorMapSize?: number; - /** - * Enables shadows - * @default true - */ enableShadows?: boolean; - /** - * Shadow darkness - * @default 0 - * @minimum 0 - * @maximum 1 - * @step 0.1 - */ shadowDarkness?: number; - /** - * Use percentage closer filtering - * @default true - */ + transparencyShadow: boolean; shadowUsePercentageCloserFiltering: boolean; - /** - * Shadow contact hardening light size UV ratio - only applies if usePercentageCloserFiltering is true - * @default 0.2 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ shadowContactHardeningLightSizeUVRatio: number; - /** - * Shadow bias - * @default 0.0001 - * @minimum 0 - * @maximum Infinity - * @step 0.00001 - */ shadowBias: number; - /** - * Shadow normal bias - * @default 0.002 - * @minimum 0 - * @maximum Infinity - * @step 0.0001 - */ shadowNormalBias: number; - /** - * Shadow max Z - * @default 1000 - * @minimum 0 - * @maximum Infinity - * @step 50 - */ shadowMaxZ: number; - /** - * Shadow min Z - * @default 0.1 - * @minimum 0 - * @maximum Infinity - * @step 50 - */ shadowMinZ: number; + shadowRefreshRate: number; } class ActiveCameraDto { constructor(camera?: BABYLON.Camera); - /** - * Camera to activate - * @default undefined - */ camera: BABYLON.Camera; } class UseRightHandedSystemDto { constructor(use?: boolean); - /** Indicates to use right handed system - * @default true - */ use: boolean; } class DirectionalLightDto { - constructor(direction?: Base.Vector3, intensity?: number, diffuse?: Base.Color, specular?: Base.Color, shadowGeneratorMapSize?: number, enableShadows?: boolean, shadowDarkness?: number, shadowUsePercentageCloserFiltering?: boolean, shadowContactHardeningLightSizeUVRatio?: number, shadowBias?: number, shadowNormalBias?: number, shadowMaxZ?: number, shadowMinZ?: number); - /** - * Direction of the directional light - * @default [-100, -100, -100] - */ + constructor(direction?: Base.Vector3, intensity?: number, diffuse?: Base.Color, specular?: Base.Color, shadowGeneratorMapSize?: number, enableShadows?: boolean, shadowDarkness?: number, shadowUsePercentageCloserFiltering?: boolean, shadowContactHardeningLightSizeUVRatio?: number, shadowBias?: number, shadowNormalBias?: number, shadowMaxZ?: number, shadowMinZ?: number, shadowRefreshRate?: number); direction: Base.Vector3; - /** - * Intensity of the point light, value between 0 and 1 - * @default 0.5 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ intensity: number; - /** - * Diffuse colour of the point light - * @default #ffffff - */ diffuse: Base.Color; - /** - * Specular colour of the point light - * @default #ffffff - */ specular: Base.Color; - /** - * The map size for shadow generator texture if shadows are enabled - * @default 1024 - * @minimum 0 - * @maximum Infinity - * @step 1 - */ shadowGeneratorMapSize?: number; - /** - * Enables shadows - * @default true - */ enableShadows?: boolean; - /** - * Shadow darkness - * @default 0 - * @minimum 0 - * @maximum 1 - * @step 0.1 - */ shadowDarkness?: number; - /** - * Use percentage closer filtering - * @default true - */ shadowUsePercentageCloserFiltering: boolean; - /** - * Shadow contact hardening light size UV ratio - only applies if usePercentageCloserFiltering is true - * @default 0.2 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ + transparencyShadow: boolean; shadowContactHardeningLightSizeUVRatio: number; - /** - * Shadow bias - * @default 0.0001 - * @minimum 0 - * @maximum Infinity - * @step 0.00001 - */ shadowBias: number; - /** - * Shadow normal bias - * @default 0.002 - * @minimum 0 - * @maximum Infinity - * @step 0.0001 - */ shadowNormalBias: number; - /** - * Shadow max Z - * @default 1000 - * @minimum 0 - * @maximum Infinity - * @step 50 - */ shadowMaxZ: number; - /** - * Shadow min Z - * @default 0 - * @minimum 0 - * @maximum Infinity - * @step 50 - */ shadowMinZ: number; + shadowRefreshRate: number; } class CameraConfigurationDto { constructor(position?: Base.Point3, lookAt?: Base.Point3, lowerRadiusLimit?: number, upperRadiusLimit?: number, lowerAlphaLimit?: number, upperAlphaLimit?: number, lowerBetaLimit?: number, upperBetaLimit?: number, angularSensibilityX?: number, angularSensibilityY?: number, maxZ?: number, panningSensibility?: number, wheelPrecision?: number); - /** - * Position of the point light - * @default [10, 10, 10] - * - */ position: Base.Point3; - /** - * Look at - */ lookAt: Base.Point3; - /** - * Lower radius limit - how close can the camera be to the target - * @default undefined - * @minimum -Infinity - * @maximum Infinity - * @step 1 - * @optional true - */ lowerRadiusLimit: any; - /** - * Upper radius limit - how far can the camera be from the target - * @default undefined - * @minimum -Infinity - * @maximum Infinity - * @step 1 - * @optional true - */ upperRadiusLimit: any; - /** - * Lower alpha limit - camera rotation along the longitudinal (horizontal) axis in degrees. - * @default undefined - * @minimum -360 - * @maximum 360 - * @step 1 - * @optional true - */ lowerAlphaLimit: any; - /** - * Upper alpha limit - camera rotation along the longitudinal (horizontal) axis in degrees. - * @default undefined - * @minimum -360 - * @maximum 360 - * @step 1 - * @optional true - */ upperAlphaLimit: any; - /** - * Lower beta limit - camera rotation along the latitudinal (vertical) axis in degrees. This is counted from the top down, where 0 is looking from top straight down. - * @default 1 - * @minimum -360 - * @maximum 360 - * @step 1 - */ lowerBetaLimit: number; - /** - * Upper beta limit - camera rotation along the longitudinal (vertical) axis in degrees. This is counted from the top down, where 180 is looking from bottom straight up. - * @default 179 - * @minimum -360 - * @maximum 360 - * @step 1 - */ upperBetaLimit: number; - /** - * Angular sensibility along x (horizontal) axis of the camera. The lower this number, the faster the camera will move. - * @default 1000 - * @minimum 0 - * @maximum Infinity - * @step 10 - */ angularSensibilityX: number; - /** - * Angular sensibility along y (vertical) axis of the camera. The lower this number, the faster the camera will move. - * @default 1000 - * @minimum 0 - * @maximum Infinity - * @step 10 - */ angularSensibilityY: number; - /** - * Change how far the camera can see - * @default 1000 - * @minimum 0 - * @maximum Infinity - * @step 1 - */ maxZ: number; - /** - * Panning sensibility. If large units are used for the model, this number needs to get smaller - * @default 1000 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ panningSensibility: number; - /** - * Zoom precision of the wheel. If large units are used, this number needs to get smaller - * @default 3 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ wheelPrecision: number; } class SkyboxDto { - constructor(skybox?: Base.skyboxEnum, size?: number, blur?: number, environmentIntensity?: number); - /** - * Skybox type - * @default clearSky - */ + constructor(skybox?: Base.skyboxEnum, size?: number, blur?: number, environmentIntensity?: number, hideSkybox?: boolean); skybox: Base.skyboxEnum; - /** - * Skybox size - * @default 1000 - * @minimum 0 - * @maximum Infinity - * @step 10 - */ size: number; - /** - * Identifies if skybox texture should affect scene environment - * @default 0.1 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ blur: number; - /** - * Identifies if skybox texture should affect scene environment - * @default 0.7 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ environmentIntensity: number; + hideSkybox?: boolean; + } + class SkyboxCustomTextureDto { + constructor(textureUrl?: string, textureSize?: number, size?: number, blur?: number, environmentIntensity?: number, hideSkybox?: boolean); + textureUrl?: string; + textureSize?: number; + size: number; + blur: number; + environmentIntensity: number; + hideSkybox?: boolean; } class PointerDto { statement_update: () => void; } class FogDto { constructor(mode?: Base.fogModeEnum, color?: Base.Color, density?: number, start?: number, end?: number); - /** - * Fog mode - * @default none - */ mode: Base.fogModeEnum; - /** - * Fog color - * @default #ffffff - */ color: Base.Color; - /** - * Fog density - * @default 0.1 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ density: number; - /** - * Fog start - * @default 0 - * @minimum 0 - * @maximum Infinity - * @step 1 - */ start: number; - /** - * Fog end - * @default 1000 - * @minimum 0 - * @maximum Infinity - * @step 1 - */ end: number; } + class SceneCanvasCSSBackgroundImageDto { + constructor(cssBackgroundImage?: string); + cssBackgroundImage: string; + } + class SceneTwoColorLinearGradientDto { + constructor(colorFrom?: Base.Color, colorTo?: Base.Color, direction?: Base.gradientDirectionEnum, stopFrom?: number, stopTo?: number); + colorFrom: Base.Color; + colorTo: Base.Color; + direction: Base.gradientDirectionEnum; + stopFrom: number; + stopTo: number; + } + class SceneTwoColorRadialGradientDto { + constructor(colorFrom?: Base.Color, colorTo?: Base.Color, position?: Base.gradientPositionEnum, stopFrom?: number, stopTo?: number, shape?: Base.gradientShapeEnum); + colorFrom: Base.Color; + colorTo: Base.Color; + position: Base.gradientPositionEnum; + stopFrom: number; + stopTo: number; + shape: Base.gradientShapeEnum; + } + class SceneMultiColorLinearGradientDto { + constructor(colors?: Base.Color[], stops?: number[], direction?: Base.gradientDirectionEnum); + colors: Base.Color[]; + stops: number[]; + direction: Base.gradientDirectionEnum; + } + class SceneMultiColorRadialGradientDto { + constructor(colors?: Base.Color[], stops?: number[], position?: Base.gradientPositionEnum, shape?: Base.gradientShapeEnum); + colors: Base.Color[]; + stops: number[]; + position: Base.gradientPositionEnum; + shape: Base.gradientShapeEnum; + } + class SceneCanvasBackgroundImageDto { + constructor(imageUrl?: string, repeat?: Base.backgroundRepeatEnum, size?: Base.backgroundSizeEnum, position?: Base.gradientPositionEnum, attachment?: Base.backgroundAttachmentEnum, origin?: Base.backgroundOriginClipEnum, clip?: Base.backgroundOriginClipEnum); + imageUrl?: string; + repeat: Base.backgroundRepeatEnum; + size: Base.backgroundSizeEnum; + position: Base.gradientPositionEnum; + attachment: Base.backgroundAttachmentEnum; + origin: Base.backgroundOriginClipEnum; + clip: Base.backgroundOriginClipEnum; + } } declare namespace Base { type Color = string; @@ -14186,10 +4963,24 @@ declare namespace Bit { b: number; }; type Material = any; - type Point2 = [number, number]; - type Vector2 = [number, number]; - type Point3 = [number, number, number]; - type Vector3 = [number, number, number]; + type Point2 = [ + number, + number + ]; + type Vector2 = [ + number, + number + ]; + type Point3 = [ + number, + number, + number + ]; + type Vector3 = [ + number, + number, + number + ]; type Axis3 = { origin: Base.Point3; direction: Base.Vector3; @@ -14198,13 +4989,23 @@ declare namespace Bit { origin: Base.Point2; direction: Base.Vector2; }; - type Segment2 = [Point2, Point2]; - type Segment3 = [Point3, Point3]; + type Segment2 = [ + Point2, + Point2 + ]; + type Segment3 = [ + Point3, + Point3 + ]; type TrianglePlane3 = { normal: Vector3; d: number; }; - type Triangle3 = [Base.Point3, Base.Point3, Base.Point3]; + type Triangle3 = [ + Base.Point3, + Base.Point3, + Base.Point3 + ]; type Mesh3 = Triangle3[]; type Plane3 = { origin: Base.Point3; @@ -14237,1075 +5038,451 @@ declare namespace Bit { isClosed?: boolean; color?: number[]; }; - type TransformMatrix3x3 = [number, number, number, number, number, number, number, number, number]; + type TransformMatrix3x3 = [ + number, + number, + number, + number, + number, + number, + number, + number, + number + ]; type TransformMatrixes3x3 = TransformMatrix3x3[]; - type TransformMatrix = [number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number]; + type TransformMatrix = [ + number, + number, + number, + number, + number, + number, + number, + number, + number, + number, + number, + number, + number, + number, + number, + number + ]; type TransformMatrixes = TransformMatrix[]; enum horizontalAlignEnum { - /** - * Aligns to the left - */ left = "left", - /** - * Aligns to the center - */ center = "center", - /** - * Aligns to the right - */ right = "right" } - } declare namespace Color { + enum verticalAlignmentEnum { + top = "top", + middle = "middle", + bottom = "bottom" + } + enum topBottomEnum { + top = "top", + bottom = "bottom" + } + enum basicAlignmentEnum { + topLeft = "topLeft", + topMid = "topMid", + topRight = "topRight", + midLeft = "midLeft", + midMid = "midMid", + midRight = "midRight", + bottomLeft = "bottomLeft", + bottomMid = "bottomMid", + bottomRight = "bottomRight" + } + } + declare namespace Color { class HexDto { constructor(color?: Base.Color); - /** - * Color hex - * @default #0000ff - */ color: Base.Color; } class InvertHexDto { constructor(color?: Base.Color); - /** - * Color hex - * @default #0000ff - */ color: Base.Color; - /** - * Choose to invert the color to black and white (useful for text color) - */ blackAndWhite: boolean; } class HexDtoMapped { constructor(color?: Base.Color, from?: number, to?: number); - /** - * Color hex - * @default #0000ff - */ color: Base.Color; - /** - * From min bound - * @default 0 - * @minimum -Infinity - * @maximum Infinity - * @step 1 - */ from: number; - /** - * To max bound - * @default 255 - * @minimum -Infinity - * @maximum Infinity - * @step 1 - */ to: number; } class RGBObjectMaxDto { constructor(rgb?: Base.ColorRGB, max?: number); - /** - * Red value component - * @default undefined - */ rgb: Base.ColorRGB; - /** - * Min value of the range - * @default 0 - * @minimum 0 - * @maximum 255 - * @step 0.1 - */ min: number; - /** - * Max value, it would automatically be remapped to whatever is needed if lower comes in - * @default 255 - * @minimum 0 - * @maximum 255 - * @step 0.1 - */ max: number; } class RGBMinMaxDto { constructor(r?: number, g?: number, b?: number, min?: number, max?: number); - /** - * Red value component - * @default 255 - * @minimum 0 - * @maximum 255 - * @step 1 - */ r: number; - /** - * Green value component - * @default 255 - * @minimum 0 - * @maximum 255 - * @step 1 - */ g: number; - /** - * Blue value component - * @default 255 - * @minimum 0 - * @maximum 255 - * @step 1 - */ b: number; - /** - * Min value of the range - * @default 0 - * @minimum 0 - * @maximum 255 - * @step 0.1 - */ min: number; - /** - * Max value of the range - * @default 255 - * @minimum 0 - * @maximum 255 - * @step 0.1 - */ max: number; } class RGBObjectDto { constructor(rgb?: Base.ColorRGB); - /** - * Red value component - * @default undefined - */ rgb: Base.ColorRGB; } - } declare namespace Dates { + } + declare namespace Dates { class DateDto { constructor(date?: Date); - /** - * The date - * @default undefined - */ date: Date; } class DateStringDto { constructor(dateString?: string); - /** - * The date string - * @default undefined - */ dateString: string; } class DateSecondsDto { constructor(date?: Date, seconds?: number); - /** - * The date to update the seconds for - * @default undefined - */ date: Date; - /** - * The seconds of the date - * @default 30 - * @minimum 0 - * @maximum Infinity - * @step 1 - */ seconds: number; } class DateDayDto { constructor(date?: Date, day?: number); - /** - * The date - * @default undefined - */ date: Date; - /** - * The day of the date - * @default 1 - * @minimum 0 - * @maximum Infinity - * @step 1 - */ day: number; } class DateYearDto { constructor(date?: Date, year?: number); - /** - * The date - * @default undefined - */ date: Date; - /** - * The year of the date - * @default 1 - * @minimum 0 - * @maximum Infinity - * @step 1 - */ year: number; } class DateMonthDto { constructor(date?: Date, month?: number); - /** - * The date - * @default undefined - */ date: Date; - /** - * The month of the date - * @default 1 - * @minimum 0 - * @maximum Infinity - * @step 1 - */ month: number; } class DateHoursDto { constructor(date?: Date, hours?: number); - /** - * The date - * @default undefined - */ date: Date; - /** - * The hours of the date - * @default 1 - * @minimum 0 - * @maximum Infinity - * @step 1 - */ hours: number; } class DateMinutesDto { constructor(date?: Date, minutes?: number); - /** - * The date - * @default undefined - */ date: Date; - /** - * The minutes of the date - * @default 1 - * @minimum 0 - * @maximum Infinity - * @step 1 - */ minutes: number; } class DateMillisecondsDto { constructor(date?: Date, milliseconds?: number); - /** - * The date - * @default undefined - */ date: Date; - /** - * The milliseconds of the date - * @default 1 - * @minimum 0 - * @maximum Infinity - * @step 1 - */ milliseconds: number; } class DateTimeDto { constructor(date?: Date, time?: number); - /** - * The date - * @default undefined - */ date: Date; - /** - * The time of the date - * @default 1 - * @minimum 0 - * @maximum Infinity - * @step 1 - */ time: number; } class CreateFromUnixTimeStampDto { constructor(unixTimeStamp?: number); - /** - * The unix time stamp - * @default 1 - * @minimum 0 - * @maximum Infinity - * @step 1 - */ unixTimeStamp: number; } class CreateDateDto { constructor(year?: number, month?: number, day?: number, hours?: number, minutes?: number, seconds?: number, milliseconds?: number); - /** - * The year of the date - * @default 1 - * @minimum 0 - * @maximum Infinity - * @step 1 - */ year: number; - /** - * The month of the date - * @default 1 - * @minimum 0 - * @maximum Infinity - * @step 1 - */ month: number; - /** - * The day of the month - * @default 1 - * @minimum 0 - * @maximum Infinity - * @step 1 - */ day: number; - /** - * The hours of the date - * @default 1 - * @minimum 0 - * @maximum Infinity - * @step 1 - */ hours: number; - /** - * The minutes of the date - * @default 1 - * @minimum 0 - * @maximum Infinity - * @step 1 - */ minutes: number; - /** - * The seconds of the date - * @default 1 - * @minimum 0 - * @maximum Infinity - * @step 1 - */ seconds: number; - /** - * The milliseconds of the date - * @default 1 - * @minimum 0 - * @maximum Infinity - * @step 1 - */ milliseconds: number; } - } declare namespace Line { + } + declare namespace IO { + class DxfLineSegmentDto { + constructor(start?: Base.Point2, end?: Base.Point2); + start: Base.Point2; + end: Base.Point2; + } + class DxfArcSegmentDto { + constructor(center?: Base.Point2, radius?: number, startAngle?: number, endAngle?: number); + center: Base.Point2; + radius: number; + startAngle: number; + endAngle: number; + } + class DxfCircleSegmentDto { + constructor(center?: Base.Point2, radius?: number); + center: Base.Point2; + radius: number; + } + class DxfPolylineSegmentDto { + constructor(points?: Base.Point2[], closed?: boolean, bulges?: number[]); + points: Base.Point2[]; + closed?: boolean; + bulges?: number[]; + } + class DxfSplineSegmentDto { + constructor(controlPoints?: Base.Point2[], degree?: number, closed?: boolean); + controlPoints: Base.Point2[]; + degree?: number; + closed?: boolean; + } + class DxfPathDto { + constructor(segments?: (DxfLineSegmentDto | DxfArcSegmentDto | DxfCircleSegmentDto | DxfPolylineSegmentDto | DxfSplineSegmentDto)[]); + segments: (DxfLineSegmentDto | DxfArcSegmentDto | DxfCircleSegmentDto | DxfPolylineSegmentDto | DxfSplineSegmentDto)[]; + } + class DxfPathsPartDto { + constructor(layer?: string, color?: Base.Color, paths?: DxfPathDto[]); + layer: string; + color: Base.Color; + paths: DxfPathDto[]; + } + class DxfModelDto { + constructor(dxfPathsParts?: DxfPathsPartDto[], colorFormat?: "aci" | "truecolor", acadVersion?: "AC1009" | "AC1015"); + dxfPathsParts: DxfPathsPartDto[]; + colorFormat?: "aci" | "truecolor"; + acadVersion?: "AC1009" | "AC1015"; + } + } + declare namespace Line { class LinePointsDto { - /** - * Provide options without default values - */ constructor(start?: Base.Point3, end?: Base.Point3); - /** - * Start point - * @default undefined - */ start?: Base.Point3; - /** - * End point - * @default undefined - */ end?: Base.Point3; } class LineStartEndPointsDto { - /** - * Provide options without default values - */ constructor(startPoints?: Base.Point3[], endPoints?: Base.Point3[]); - /** - * Start points - * @default undefined - */ startPoints: Base.Point3[]; - /** - * End points - * @default undefined - */ endPoints: Base.Point3[]; } class DrawLineDto { - /** - * Provide options without default values - */ constructor(line?: LinePointsDto, opacity?: number, colours?: string | string[], size?: number, updatable?: boolean, lineMesh?: T); - /** - * Line - * @default undefined - */ line?: LinePointsDto; - /** - * Value between 0 and 1 - * @default 1 - * @minimum 0 - * @maximum 1 - * @step 0.1 - */ opacity?: number; - /** - * Hex colour string - * @default #444444 - */ colours?: string | string[]; - /** - * Width of the line - * @default 3 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ size?: number; - /** - * Indicates wether the position of this line will change in time - * @default false - */ updatable?: boolean; - /** - * Line mesh variable in case it already exists and needs updating - * @default undefined - */ lineMesh?: T; } class DrawLinesDto { - /** - * Provide options without default values - */ constructor(lines?: LinePointsDto[], opacity?: number, colours?: string | string[], size?: number, updatable?: boolean, linesMesh?: T); - /** - * Lines - * @default undefined - */ lines?: LinePointsDto[]; - /** - * Value between 0 and 1 - * @default 1 - * @minimum 0 - * @maximum 1 - * @step 0.1 - */ opacity?: number; - /** - * Hex colour string - * @default #444444 - */ colours?: string | string[]; - /** - * Width of the line - * @default 3 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ size?: number; - /** - * Indicates wether the position of these lines will change in time - * @default false - */ updatable?: boolean; - /** - * Line mesh variable in case it already exists and needs updating - * @default undefined - */ linesMesh?: T; } class PointsLinesDto { constructor(points?: Base.Point3[]); - /** - * Points - * @default undefined - */ points?: Base.Point3[]; } class LineDto { constructor(line?: LinePointsDto); - /** - * Line to convert - * @default undefined - */ line?: LinePointsDto; } class SegmentDto { constructor(segment?: Base.Segment3); - /** - * Segment - * @default undefined - */ segment?: Base.Segment3; } class SegmentsDto { constructor(segments?: Base.Segment3[]); - /** - * Segments - * @default undefined - */ segments?: Base.Segment3[]; } class LinesDto { constructor(lines?: LinePointsDto[]); - /** - * Lines to convert - * @default undefined - */ lines?: LinePointsDto[]; } class LineLineIntersectionDto { constructor(line1?: LinePointsDto, line2?: LinePointsDto, tolerance?: number); - /** - * First line - * @default undefined - */ line1?: LinePointsDto; - /** - * Second line - * @default undefined - */ line2?: LinePointsDto; - /** - * Set to false if you want to check for infinite lines - * @default true - */ checkSegmentsOnly?: boolean; - /** - * Tolerance for intersection - * @default 0.01 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ tolerance?: number; } class PointOnLineDto { constructor(line?: LinePointsDto, param?: number); - /** - * Line to get point on - * @default undefined - */ line?: LinePointsDto; - /** - * Param to use for point on line - * @default 0.5 - * @minimum -Infinity - * @maximum Infinity - * @step 0.1 - */ param?: number; } class TransformLineDto { constructor(line?: LinePointsDto, transformation?: Base.TransformMatrixes); - /** - * Line to transform - * @default undefined - */ line?: LinePointsDto; - /** - * Transformation matrix or a list of transformation matrixes - * @default undefined - */ transformation?: Base.TransformMatrixes; } class TransformsLinesDto { constructor(lines?: LinePointsDto[], transformation?: Base.TransformMatrixes[]); - /** - * Lines to transform - * @default undefined - */ lines?: LinePointsDto[]; - /** - * Transformations matrix or a list of transformations matrixes - * @default undefined - */ transformation?: Base.TransformMatrixes[]; } class TransformLinesDto { constructor(lines?: LinePointsDto[], transformation?: Base.TransformMatrixes); - /** - * Lines to transform - * @default undefined - */ lines?: LinePointsDto[]; - /** - * Transformation matrix or a list of transformation matrixes - * @default undefined - */ transformation?: Base.TransformMatrixes; } - } declare namespace Lists { + } + declare namespace Lists { enum firstLastEnum { first = "first", last = "last" } class ListItemDto { constructor(list?: T[], index?: number, clone?: boolean); - /** - * The list to interrogate - * @default undefined - */ list: T[]; - /** - * Index of the item in the list - 0 means first. - * @default 0 - * @minimum 0 - * @maximum Infinity - * @step 1 - */ index: number; - /** - * Tries to make structured clone of the incoming list data in the component, sometimes it may not be possible due to circular structures or other types of error - * @default true - */ clone?: boolean; } class SubListDto { constructor(list?: T[], indexStart?: number, indexEnd?: number, clone?: boolean); - /** - * The list to split into a sublist - * @default undefined - */ list: T[]; - /** - * Index from which to start the sublist - 0 means first. - * @default 0 - * @minimum 0 - * @maximum Infinity - * @step 1 - */ indexStart: number; - /** - * Index to which to end the sublist - 0 means first. - * @default 1 - * @minimum 0 - * @maximum Infinity - * @step 1 - */ indexEnd: number; - /** - * Tries to clone the data in the component, sometimes it may not be possible if structure is circular - * @default true - */ clone?: boolean; } class ListCloneDto { constructor(list?: T[], clone?: boolean); - /** - * The list to interrogate - * @default undefined - */ list: T[]; - /** - * Tries to make structured clone of the incoming list data in the component, sometimes it may not be possible due to circular structures or other types of error - * @default true - */ clone?: boolean; } class RepeatInPatternDto { constructor(list?: T[]); - /** - * The list to interrogate - * @default undefined - */ list: T[]; - /** - * Tries to make structured clone of the incoming list data in the component, sometimes it may not be possible due to circular structures or other types of error - * @default true - */ clone?: boolean; - /** - * The limit of the length of the list - * @default 100 - * @minimum 1 - * @maximum Infinity - * @step 1 - */ lengthLimit: number; } class SortDto { constructor(list?: T[], clone?: boolean, orderAsc?: boolean); - /** - * The list to interrogate - * @default undefined - */ list: T[]; - /** - * Tries to make structured clone of the incoming list data in the component, sometimes it may not be possible due to circular structures or other types of error - * @default true - */ clone?: boolean; - /** - * If true, the list will be sorted in ascending order, otherwise in descending order - * @default true - */ orderAsc: boolean; } class SortJsonDto { constructor(list?: T[], clone?: boolean, orderAsc?: boolean); - /** - * The list to interrogate - * @default undefined - */ list: T[]; - /** - * Tries to make structured clone of the incoming list data in the component, sometimes it may not be possible due to circular structures or other types of error - * @default true - */ clone?: boolean; - /** - * If true, the list will be sorted in ascending order, otherwise in descending order - * @default true - */ orderAsc: boolean; - /** - * The property to sort by - * @default propName - */ property: string; } class ListDto { constructor(list?: T[]); - /** - * The list - * @default undefined - */ list: T[]; } class GroupListDto { constructor(list?: T[], nrElements?: number, keepRemainder?: boolean); - /** - * The list of elements to group together - * @default undefined - */ list: T[]; - /** - * The number of elements in each group - * @default 2 - * @minimum 1 - * @maximum Infinity - * @step 1 - */ nrElements: number; - /** - * If true, the remainder of the list will be added as a separate group - * @default false - */ keepRemainder: boolean; } class MultiplyItemDto { constructor(item?: T, times?: number); - /** - * The item to multiply - * @default undefined - */ item: T; - /** - * Times to multiply - * @default 10 - * @minimum 0 - * @maximum Infinity - * @step 1 - */ times: number; } class AddItemAtIndexDto { constructor(list?: T[], item?: T, index?: number, clone?: boolean); - /** - * The list to which item needs to be added - * @default undefined - */ list: T[]; - /** - * The item to add - * @default undefined - */ item: T; - /** - * The index to add the item at - * @default 0 - * @minimum 0 - * @maximum Infinity - * @step 1 - */ index: number; - /** - * Tries to make structured clone of the incoming list data in the component, sometimes it may not be possible due to circular structures or other types of error - * @default true - */ clone?: boolean; } class AddItemAtIndexesDto { constructor(list?: T[], item?: T, indexes?: number[], clone?: boolean); - /** - * The list to which item needs to be added - * @default undefined - */ list: T[]; - /** - * The item to add - * @default undefined - */ item: T; - /** - * The index to add the item at - * @default [0] - */ indexes: number[]; - /** - * Tries to make structured clone of the incoming list data in the component, sometimes it may not be possible due to circular structures or other types of error - * @default true - */ clone?: boolean; } class AddItemsAtIndexesDto { constructor(list?: T[], items?: T[], indexes?: number[], clone?: boolean); - /** - * The list to which item needs to be added - * @default undefined - */ list: T[]; - /** - * The item to add - * @default undefined - */ items: T[]; - /** - * The index to add the item at - * @default [0] - */ indexes: number[]; - /** - * Tries to make structured clone of the incoming list data in the component, sometimes it may not be possible due to circular structures or other types of error - * @default true - */ clone?: boolean; } class RemoveItemAtIndexDto { constructor(list?: T[], index?: number, clone?: boolean); - /** - * The list from which item needs to be removed - * @default undefined - */ list: T[]; - /** - * The index to on which remove item - * @default 0 - * @minimum 0 - * @maximum Infinity - * @step 1 - */ index: number; - /** - * Tries to make structured clone of the incoming list data in the component, sometimes it may not be possible due to circular structures or other types of error - * @default true - */ clone?: boolean; } class RemoveItemsAtIndexesDto { constructor(list?: T[], indexes?: number[], clone?: boolean); - /** - * The list from which item needs to be removed - * @default undefined - */ list: T[]; - /** - * The indexes that should be removed - * @default undefined - */ indexes: number[]; - /** - * Tries to make structured clone of the incoming list data in the component, sometimes it may not be possible due to circular structures or other types of error - * @default true - */ clone?: boolean; } class RemoveNthItemDto { constructor(list?: T[], nth?: number, offset?: number, clone?: boolean); - /** - * The list from which item needs to be removed - * @default undefined - */ list: T[]; - /** - * The nth item to remove - * @default 2 - * @minimum 1 - * @maximum Infinity - * @step 1 - */ nth: number; - /** - * The offset from which to start counting - * @default 0 - * @minimum 0 - * @maximum Infinity - * @step 1 - */ offset: number; - /** - * Tries to make structured clone of the incoming list data in the component, sometimes it may not be possible due to circular structures or other types of error - * @default true - */ clone?: boolean; } class RandomThresholdDto { constructor(list?: T[], threshold?: number, clone?: boolean); - /** - * The list from which item needs to be updated - * @default undefined - */ list: T[]; - /** - * Threshold for items - * @default 0.5 - * @minimum 0 - * @maximum 1 - * @step 1 - */ threshold: number; - /** - * Tries to make structured clone of the incoming list data in the component, sometimes it may not be possible due to circular structures or other types of error - * @default true - */ clone?: boolean; } class RemoveDuplicatesDto { constructor(list?: T[], clone?: boolean); - /** - * The list from which item needs to be removed - * @default undefined - */ list: T[]; - /** - * Tries to make structured clone of the incoming list data in the component, sometimes it may not be possible due to circular structures or other types of error - * @default true - */ clone?: boolean; } class RemoveDuplicatesToleranceDto { constructor(list?: T[], clone?: boolean, tolerance?: number); - /** - * The list from which item needs to be removed - * @default undefined - */ list: T[]; - /** - * The tolerance to apply - * @default 1e-7 - * @minimum 0 - * @maximum Infinity - * @step 1e-7 - */ tolerance: number; - /** - * Tries to make structured clone of the incoming list data in the component, sometimes it may not be possible due to circular structures or other types of error - * @default true - */ clone?: boolean; } class GetByPatternDto { constructor(list?: T[], pattern?: boolean[]); - /** - * The list from which we need to get an item - * @default undefined - */ list: T[]; - /** - * The list of booleans to be used as a pattern (true means get, false means skip) - * @default [true, true, false] - */ pattern: boolean[]; } class GetNthItemDto { constructor(list?: T[], nth?: number, offset?: number, clone?: boolean); - /** - * The list from which we need to get an item - * @default undefined - */ list: T[]; - /** - * The nth item to get - * @default 2 - * @minimum 1 - * @maximum Infinity - * @step 1 - */ nth: number; - /** - * The offset from which to start counting - * @default 0 - * @minimum 0 - * @maximum Infinity - * @step 1 - */ offset: number; - /** - * Tries to make structured clone of the incoming list data in the component, sometimes it may not be possible due to circular structures or other types of error - * @default true - */ clone?: boolean; } class GetLongestListLength { constructor(lists?: T[]); - /** - * The list from which we need to get an item - * @default undefined - */ lists: T[]; } class MergeElementsOfLists { constructor(lists?: T[], level?: number); - /** - * The list from which we need to get an item - * @default undefined - */ lists: T[]; - /** - * The level on which to merge the elements. 0 means first level - * @default 0 - * @minimum 0 - * @maximum Infinity - * @step 1 - */ level: number; } class AddItemDto { constructor(list?: T[], item?: T, clone?: boolean); - /** - * The list to which item needs to be added - * @default undefined - */ list: T[]; - /** - * The item to add - * @default undefined - */ item: T; - /** - * Tries to make structured clone of the incoming list data in the component, sometimes it may not be possible due to circular structures or other types of error - * @default true - */ clone?: boolean; } class AddItemFirstLastDto { constructor(list?: T[], item?: T, position?: firstLastEnum, clone?: boolean); - /** - * The list to which item needs to be added - * @default undefined - */ list: T[]; - /** - * The item to add - * @default undefined - */ item: T; - /** - * The option if the item needs to be added at the beginning or the end of the list - * @default last - */ position: firstLastEnum; - /** - * Tries to make structured clone of the incoming list data in the component, sometimes it may not be possible due to circular structures or other types of error - * @default true - */ clone?: boolean; } - } declare namespace Logic { + class ConcatenateDto { + constructor(lists?: T[][], clone?: boolean); + lists: T[][]; + clone?: boolean; + } + class IncludesDto { + constructor(list?: T[], item?: T); + list: T[]; + item: T; + } + class InterleaveDto { + constructor(lists?: T[][], clone?: boolean); + lists: T[][]; + clone?: boolean; + } + } + declare namespace Logic { enum BooleanOperatorsEnum { less = "<", lessOrEqual = "<=", @@ -15318,155 +5495,51 @@ declare namespace Bit { } class ComparisonDto { constructor(first?: T, second?: T, operator?: BooleanOperatorsEnum); - /** - * First item - * @default undefined - */ first: T; - /** - * Second item - * @default undefined - */ second: T; - /** - * Operator - * @default less - */ operator: BooleanOperatorsEnum; } class BooleanDto { constructor(boolean?: boolean); - /** - * Boolean value - * @default false - */ boolean: boolean; } class BooleanListDto { constructor(booleans?: boolean); - /** - * Boolean value - * @default undefined - */ booleans: any; } class ValueGateDto { constructor(value?: T, boolean?: boolean); - /** - * Value to transmit when gate will be released. When value is not released we will transmit undefined value - * @default undefined - */ value: T; - /** - * Boolean value to release the gate - * @default false - */ boolean: boolean; } class TwoValueGateDto { constructor(value1?: T, value2?: U); - /** - * First value to check - * @default undefined - * @optional true - */ value1?: T; - /** - * Second value to check - * @default undefined - * @optional true - */ value2?: U; } class RandomBooleansDto { constructor(length?: number); - /** - * Length of the list - * @default 10 - * @minimum 1 - * @maximum Infinity - * @step 1 - */ length: number; - /** - * Threshold for true value between 0 and 1. The closer the value is to 1 the more true values there will be in the list. - * @default 0.5 - * @minimum 0 - * @maximum 1 - * @step 0.1 - */ trueThreshold: number; } class TwoThresholdRandomGradientDto { - /** - * Numbers to remap to bools - * @default undefined - */ numbers: number[]; - /** - * Threshold for the numeric value until which the output will be true - * @default 1 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ thresholdTotalTrue: number; - /** - * Threshold for the numeric value until which the output will be true - * @default 2 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ thresholdTotalFalse: number; - /** - * Number of levels to go through in between thresholds for gradient - * @default 10 - * @minimum 0 - * @maximum Infinity - * @step 1 - */ nrLevels: number; } class ThresholdBooleanListDto { - /** - * Numbers to remap to bools based on threshold - * @default undefined - */ numbers: number[]; - /** - * Threshold for the numeric value until which the output will be true. - * If number in the list is larger than this threshold it will become false if inverse stays false. - * @default 1 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ threshold: number; - /** - * True values become false and false values become true - * @default false - */ inverse: boolean; } class ThresholdGapsBooleanListDto { - /** - * Numbers to remap to bools based on threshold - * @default undefined - */ numbers: number[]; - /** - * 2D arrays representing gaps of the thresholds on which numbers should be flipped from false to true if inverse is false. - * @default undefined - */ gapThresholds: Base.Vector2[]; - /** - * True values become false and false values become true - * @default false - */ inverse: boolean; } - } declare namespace Math { + } + declare namespace Math { enum mathTwoNrOperatorEnum { add = "add", subtract = "subtract", @@ -15530,1886 +5603,663 @@ declare namespace Bit { } class ModulusDto { constructor(number?: number, modulus?: number); - /** - * Number - * @default 1 - * @minimum -Infinity - * @maximum Infinity - * @step 0.1 - */ number: number; - /** - * Modulus - * @default 1 - * @minimum -Infinity - * @maximum Infinity - * @step 0.1 - */ modulus: number; } class NumberDto { constructor(number?: number); - /** - * Number - * @default 1 - * @minimum -Infinity - * @maximum Infinity - * @step 0.1 - */ number: number; } class EaseDto { constructor(x?: number); - /** - * X value param between 0-1 - * @default 0.5 - * @minimum 0 - * @maximum 1 - * @step 0.1 - */ x: number; - /** - * Minimum value - * @default 0 - * @minimum -Infinity - * @maximum Infinity - * @step 0.1 - */ min: number; - /** - * Maximum value - * @default 1 - * @minimum -Infinity - * @maximum Infinity - * @step 0.1 - */ max: number; - /** - * Ease function - * @default easeInSine - */ ease: easeEnum; } class RoundToDecimalsDto { constructor(number?: number, decimalPlaces?: number); - /** - * Number to round - * @default 1.123456 - * @minimum -Infinity - * @maximum Infinity - * @step 0.1 - */ number: number; - /** - * Number of decimal places - * @default 2 - * @minimum -Infinity - * @maximum Infinity - * @step 1 - */ decimalPlaces: number; } class ActionOnTwoNumbersDto { constructor(first?: number, second?: number, operation?: mathTwoNrOperatorEnum); - /** - * First number - * @default 1 - * @minimum -Infinity - * @maximum Infinity - * @step 0.1 - */ first: number; - /** - * Second number - * @default 1 - * @minimum -Infinity - * @maximum Infinity - * @step 0.1 - */ second: number; - /** - * Point - * @default add - */ operation: mathTwoNrOperatorEnum; } class TwoNumbersDto { constructor(first?: number, second?: number); - /** - * First number - * @default 1 - * @minimum -Infinity - * @maximum Infinity - * @step 0.1 - */ first: number; - /** - * Second number - * @default 2 - * @minimum -Infinity - * @maximum Infinity - * @step 0.1 - */ second: number; } class ActionOnOneNumberDto { constructor(number?: number, operation?: mathOneNrOperatorEnum); - /** - * First number - * @default 1 - * @minimum -Infinity - * @maximum Infinity - * @step 0.1 - */ number: number; - /** - * Point - * @default absolute - */ operation: mathOneNrOperatorEnum; } class RemapNumberDto { constructor(number?: number, fromLow?: number, fromHigh?: number, toLow?: number, toHigh?: number); - /** - * Number to remap - * @default 0.5 - * @minimum -Infinity - * @maximum Infinity - * @step 0.1 - */ number: number; - /** - * First number range min - * @default 0 - * @minimum -Infinity - * @maximum Infinity - * @step 0.1 - */ fromLow: number; - /** - * Map to range min - * @default 1 - * @minimum -Infinity - * @maximum Infinity - * @step 0.1 - */ fromHigh: number; - /** - * First number range max - * @default 1 - * @minimum -Infinity - * @maximum Infinity - * @step 0.1 - */ toLow: number; - /** - * Map to range max - * @default 2 - * @minimum -Infinity - * @maximum Infinity - * @step 0.1 - */ toHigh: number; } class RandomNumberDto { constructor(low?: number, high?: number); - /** - * Low range of random value - * @default 0 - * @minimum -Infinity - * @maximum Infinity - * @step 0.1 - */ low: number; - /** - * High range of random value - * @default 1 - * @minimum -Infinity - * @maximum Infinity - * @step 0.1 - */ high: number; } class RandomNumbersDto { constructor(low?: number, high?: number, count?: number); - /** - * Low range of random value - * @default 0 - * @minimum -Infinity - * @maximum Infinity - * @step 0.1 - */ low: number; - /** - * High range of random value - * @default 1 - * @minimum -Infinity - * @maximum Infinity - * @step 0.1 - */ high: number; - /** - * Number of produced random values - * @default 10 - * @minimum -Infinity - * @maximum Infinity - * @step 1 - */ count: number; } class ToFixedDto { constructor(number?: number, decimalPlaces?: number); - /** - * Number to round - * @default undefined - * @minimum -Infinity - * @maximum Infinity - * @step 0.1 - */ number: number; - /** - * Number of decimal places - * @default 2 - * @minimum -Infinity - * @maximum Infinity - * @step 1 - */ decimalPlaces: number; } - } declare namespace Mesh { + class ClampDto { + constructor(number?: number, min?: number, max?: number); + number: number; + min: number; + max: number; + } + class LerpDto { + constructor(start?: number, end?: number, t?: number); + start: number; + end: number; + t: number; + } + class InverseLerpDto { + constructor(start?: number, end?: number, value?: number); + start: number; + end: number; + value: number; + } + class WrapDto { + constructor(number?: number, min?: number, max?: number); + number: number; + min: number; + max: number; + } + class PingPongDto { + constructor(t?: number, length?: number); + t: number; + length: number; + } + class MoveTowardsDto { + constructor(current?: number, target?: number, maxDelta?: number); + current: number; + target: number; + maxDelta: number; + } + } + declare namespace Mesh { class SignedDistanceFromPlaneToPointDto { constructor(point?: Base.Point3, plane?: Base.TrianglePlane3); - /** - * Point from which to find the distance - * @default undefined - */ point?: Base.Point3; - /** - * Triangle plane to which the distance is calculated - * @default undefined - */ plane?: Base.TrianglePlane3; } class TriangleDto { constructor(triangle?: Base.Triangle3); - /** - * Triangle to be used - * @default undefined - */ triangle?: Base.Triangle3; } class TriangleToleranceDto { constructor(triangle?: Base.Triangle3); - /** - * Triangle to be used - * @default undefined - */ triangle?: Base.Triangle3; - /** - * Tolerance for the calculation - * @default 1e-7 - * @minimum -Infinity - * @maximum Infinity - * @step 1e-7 - */ tolerance?: number; } class TriangleTriangleToleranceDto { constructor(triangle1?: Base.Triangle3, triangle2?: Base.Triangle3, tolerance?: number); - /** - * First triangle - * @default undefined - */ triangle1?: Base.Triangle3; - /** - * Second triangle - * @default undefined - */ triangle2?: Base.Triangle3; - /** - * Tolerance for the calculation - * @default 1e-7 - * @minimum -Infinity - * @maximum Infinity - * @step 1e-7 - */ tolerance?: number; } class MeshMeshToleranceDto { constructor(mesh1?: Base.Mesh3, mesh2?: Base.Mesh3, tolerance?: number); - /** - * First mesh - * @default undefined - */ mesh1?: Base.Mesh3; - /** - * Second mesh - * @default undefined - */ mesh2?: Base.Mesh3; - /** - * Tolerance for the calculation - * @default 1e-7 - * @minimum -Infinity - * @maximum Infinity - * @step 1e-7 - */ tolerance?: number; } - } declare namespace Point { + } + declare namespace Point { class PointDto { constructor(point?: Base.Point3); - /** - * Point - * @default undefined - */ point: Base.Point3; } class PointXYZDto { constructor(x?: number, y?: number, z?: number); - /** - * Point - * @default 0 - * @minimum -Infinity - * @maximum Infinity - * @step 0.1 - */ x: number; - /** - * Point - * @default 0 - * @minimum -Infinity - * @maximum Infinity - * @step 0.1 - */ y: number; - /** - * Point - * @default 0 - * @minimum -Infinity - * @maximum Infinity - * @step 0.1 - */ z: number; } class PointXYDto { constructor(x?: number, y?: number); - /** - * Point - * @default 0 - * @minimum -Infinity - * @maximum Infinity - * @step 0.1 - */ x: number; - /** - * Point - * @default 0 - * @minimum -Infinity - * @maximum Infinity - * @step 0.1 - */ y: number; } class PointsDto { constructor(points?: Base.Point3[]); - /** - * Points - * @default undefined - */ points: Base.Point3[]; } class TwoPointsDto { constructor(point1?: Base.Point3, point2?: Base.Point3); - /** - * Point 1 - * @default undefined - */ point1: Base.Point3; - /** - * Point 2 - * @default undefined - */ point2: Base.Point3; } class DrawPointDto { - /** - * Provide options without default values - */ constructor(point?: Base.Point3, opacity?: number, size?: number, colours?: string | string[], updatable?: boolean, pointMesh?: T); - /** - * Point - * @default undefined - */ point: Base.Point3; - /** - * Value between 0 and 1 - * @default 1 - * @minimum 0 - * @maximum 1 - * @step 0.1 - */ opacity: number; - /** - * Size of the point - * @default 3 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ size: number; - /** - * Hex colour string - * @default #444444 - */ colours: string | string[]; - /** - * Indicates wether the position of this point will change in time - * @default false - */ updatable: boolean; - /** - * Point mesh variable in case it already exists and needs updating - * @default undefined - */ pointMesh?: T; } class DrawPointsDto { - /** - * Provide options without default values - */ constructor(points?: Base.Point3[], opacity?: number, size?: number, colours?: string | string[], updatable?: boolean, pointsMesh?: T); - /** - * Point - * @default undefined - */ points: Base.Point3[]; - /** - * Value between 0 and 1 - * @default 1 - * @minimum 0 - * @maximum 1 - * @step 0.1 - */ opacity: number; - /** - * Size of the points - * @default 0.1 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ size: number; - /** - * Hex colour string or collection of strings - * @default #444444 - */ colours: string | string[]; - /** - * Indicates wether the position of this point will change in time - * @default false - */ updatable: boolean; - /** - * Points mesh variable in case it already exists and needs updating - * @default undefined - */ pointsMesh?: T; } class TransformPointDto { constructor(point?: Base.Point3, transformation?: Base.TransformMatrixes); - /** - * Point to transform - * @default undefined - */ point: Base.Point3; - /** - * Transformation matrix or a list of transformation matrixes - * @default undefined - */ transformation: Base.TransformMatrixes; } class TransformPointsDto { constructor(points?: Base.Point3[], transformation?: Base.TransformMatrixes); - /** - * Points to transform - * @default undefined - */ points: Base.Point3[]; - /** - * Transformation matrix or a list of transformation matrixes - * @default undefined - */ transformation: Base.TransformMatrixes; } class TranslatePointsWithVectorsDto { constructor(points?: Base.Point3[], translations?: Base.Vector3[]); - /** - * Points to transform - * @default undefined - */ points: Base.Point3[]; - /** - * Translation vectors for each point - * @default undefined - */ translations: Base.Vector3[]; } class TranslatePointsDto { constructor(points?: Base.Point3[], translation?: Base.Vector3); - /** - * Points to transform - * @default undefined - */ points: Base.Point3[]; - /** - * Translation vector with x, y and z values - * @default undefined - */ translation: Base.Vector3; } class TranslateXYZPointsDto { constructor(points?: Base.Point3[], x?: number, y?: number, z?: number); - /** - * Points to transform - * @default undefined - */ points: Base.Point3[]; - /** - * X vector value - * @default 0 - */ x: number; - /** - * Y vector value - * @default 1 - */ y: number; - /** - * Z vector value - * @default 0 - */ z: number; } class ScalePointsCenterXYZDto { constructor(points?: Base.Point3[], center?: Base.Point3, scaleXyz?: Base.Vector3); - /** - * Points to transform - * @default undefined - */ points: Base.Point3[]; - /** - * The center from which the scaling is applied - * @default [0, 0, 0] - */ center: Base.Point3; - /** - * Scaling factors for each axis [1, 2, 1] means that Y axis will be scaled 200% and both x and z axis will remain on 100% - * @default [1, 1, 1] - */ scaleXyz: Base.Vector3; } class StretchPointsDirFromCenterDto { constructor(points?: Base.Point3[], center?: Base.Point3, direction?: Base.Vector3, scale?: number); - /** - * Points to transform - * @default undefined - */ points?: Base.Point3[]; - /** - * The center from which the scaling is applied - * @default [0, 0, 0] - */ center?: Base.Point3; - /** - * Stretch direction vector - * @default [0, 0, 1] - */ direction?: Base.Vector3; - /** - * The scale factor to apply along the direction vector. 1.0 means no change. - * @default 2 - * @minimum -Infinity - * @maximum Infinity - * @step 0.1 - */ scale?: number; } class RotatePointsCenterAxisDto { constructor(points?: Base.Point3[], angle?: number, axis?: Base.Vector3, center?: Base.Point3); - /** - * Points to transform - * @default undefined - */ points: Base.Point3[]; - /** - * Angle of rotation in degrees - * @default 90 - * @minimum -Infinity - * @maximum Infinity - * @step 1 - */ angle: number; - /** - * Axis vector for rotation - * @default [0, 1, 0] - */ axis: Base.Vector3; - /** - * The center from which the axis is pointing - * @default [0, 0, 0] - */ center: Base.Point3; } class TransformsForPointsDto { constructor(points?: Base.Point3[], transformation?: Base.TransformMatrixes[]); - /** - * Points to transform - * @default undefined - */ points: Base.Point3[]; - /** - * Transformations that have to match nr of points - * @default undefined - */ transformation: Base.TransformMatrixes[]; } class ThreePointsNormalDto { constructor(point1?: Base.Point3, point2?: Base.Point3, point3?: Base.Point3, reverseNormal?: boolean); - /** - * Point 1 - * @default undefined - */ point1: Base.Point3; - /** - * Point 2 - * @default undefined - */ point2: Base.Point3; - /** - * Point 3 - * @default undefined - */ point3: Base.Point3; - /** - * Reverse normal direction - * @default false - */ reverseNormal: boolean; } class ThreePointsToleranceDto { constructor(start?: Base.Point3, center?: Base.Point3, end?: Base.Point3, tolerance?: number); - /** - * Start point - * @default undefined - */ start?: Base.Point3; - /** - * Center point - * @default undefined - */ center?: Base.Point3; - /** - * End point - * @default undefined - */ end?: Base.Point3; - /** - * Tolerance for the calculation - * @default 1e-7 - * @minimum -Infinity - * @maximum Infinity - * @step 1e-7 - */ tolerance: number; } class PointsMaxFilletsHalfLineDto { constructor(points?: Base.Point3[], checkLastWithFirst?: boolean, tolerance?: number); - /** - * Points to transform - * @default undefined - */ points?: Base.Point3[]; - /** - * Check first and last point for duplicates - * @default false - */ checkLastWithFirst?: boolean; - /** - * Tolerance for the calculation - * @default 1e-7 - * @minimum -Infinity - * @maximum Infinity - * @step 1e-7 - */ tolerance?: number; } class RemoveConsecutiveDuplicatesDto { constructor(points?: Base.Point3[], tolerance?: number, checkFirstAndLast?: boolean); - /** - * Points to transform - * @default undefined - */ points: Base.Point3[]; - /** - * Tolerance for removing duplicates - * @default 1e-7 - * @minimum 0 - * @maximum Infinity - * @step 1e-7 - */ tolerance: number; - /** - * Check first and last point for duplicates - */ checkFirstAndLast: boolean; } class ClosestPointFromPointsDto { constructor(points?: Base.Point3[], point?: Base.Point3); - /** - * Points to transform - * @default undefined - */ points: Base.Point3[]; - /** - * Transformation matrix or a list of transformation matrixes - * @default undefined - */ point: Base.Point3; } class TwoPointsToleranceDto { constructor(point1?: Base.Point3, point2?: Base.Point3, tolerance?: number); - /** - * First point to compare - * @default undefined - */ point1?: Base.Point3; - /** - * Second point to compare - * @default undefined - */ point2?: Base.Point3; - /** - * Tolerance for the calculation - * @default 1e-7 - * @minimum -Infinity - * @maximum Infinity - * @step 1e-7 - */ tolerance?: number; } class StartEndPointsDto { constructor(startPoint?: Base.Point3, endPoint?: Base.Point3); - /** - * Start point - * @default undefined - */ startPoint: Base.Point3; - /** - * End point - * @default undefined - */ endPoint: Base.Point3; } class StartEndPointsListDto { constructor(startPoint?: Base.Point3, endPoints?: Base.Point3[]); - /** - * Start point - * @default undefined - */ startPoint: Base.Point3; - /** - * End point - * @default undefined - */ endPoints: Base.Point3[]; } class MultiplyPointDto { constructor(point?: Base.Point3, amountOfPoints?: number); - /** - * Point for multiplication - * @default undefined - */ point: Base.Point3; - /** - * Number of points to create in the list - * @default undefined - */ amountOfPoints: number; } class SpiralDto { constructor(radius?: number, numberPoints?: number, widening?: number, factor?: number, phi?: number); - /** - * Identifies phi angle - * @default 0.9 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ phi: number; - /** - * Identifies how many points will be created - * @default 200 - * @minimum 0 - * @maximum Infinity - * @step 10 - */ numberPoints: number; - /** - * Widening factor of the spiral - * @default 3 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ widening: number; - /** - * Radius of the spiral - * @default 6 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ radius: number; - /** - * Factor of the spiral - * @default 1 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ factor: number; } class HexGridScaledToFitDto { constructor(wdith?: number, height?: number, nrHexagonsU?: number, nrHexagonsV?: number, centerGrid?: boolean, pointsOnGround?: boolean); - /** Total desired width for the grid area. The hexagon size will be derived from this and nrHexagonsU. - * @default 10 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ width?: number; - /** Total desired height for the grid area. Note: due to hexagon geometry, the actual grid height might differ slightly if maintaining regular hexagons based on width. - * @default 10 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ height?: number; - /** Number of hexagons desired in width. - * @default 10 - * @minimum 0 - * @maximum Infinity - * @step 1 - */ nrHexagonsInWidth?: number; - /** Number of hexagons desired in height. - * @default 10 - * @minimum 0 - * @maximum Infinity - * @step 1 - */ nrHexagonsInHeight?: number; - /** If true, the hexagons will be oriented with their flat sides facing up and down. - * @default false - */ flatTop?: boolean; - /** If true, shift the entire grid up by half hex height. - * @default false - */ extendTop?: boolean; - /** If true, shift the entire grid down by half hex height. - * @default false - */ extendBottom?: boolean; - /** If true, shift the entire grid left by half hex width. - * @default false - */ extendLeft?: boolean; - /** If true, shift the entire grid right by half hex width. - * @default false - */ extendRight?: boolean; - /** If true, the grid center (based on totalWidth/totalHeight) will be at [0,0,0]. - * @default false - */ centerGrid?: boolean; - /** If true, swaps Y and Z coordinates and sets Y to 0, placing points on the XZ ground plane. - * @default false - */ pointsOnGround?: boolean; } class HexGridCentersDto { constructor(nrHexagonsX?: number, nrHexagonsY?: number, radiusHexagon?: number, orientOnCenter?: boolean, pointsOnGround?: boolean); - /** - * Number of hexagons on Y direction - * @default 21 - * @minimum 0 - * @maximum Infinity - * @step 1 - */ nrHexagonsY: number; - /** - * Number of Hexagons on Z direction - * @default 21 - * @minimum 0 - * @maximum Infinity - * @step 1 - */ nrHexagonsX: number; - /** - * radius of a single hexagon - * @default 0.2 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ radiusHexagon: number; - /** - * Orient hexagon points grid on center - * @default false - */ orientOnCenter: boolean; - /** - * Orient points on the ground - * @default false - */ pointsOnGround: boolean; } - } declare namespace Polyline { + } + declare namespace Polyline { class PolylineCreateDto { - /** - * Provide options without default values - */ constructor(points?: Base.Point3[], isClosed?: boolean); - /** - * Points of the polyline - * @default undefined - */ points?: Base.Point3[]; - /** - * Can contain is closed information - * @default false - */ isClosed?: boolean; } class PolylinePropertiesDto { - /** - * Provide options without default values - */ constructor(points?: Base.Point3[], isClosed?: boolean); - /** - * Points of the polyline - * @default undefined - */ points?: Base.Point3[]; - /** - * Can contain is closed information - * @default false - */ isClosed?: boolean; - /** - * Optional polyline color - * @default #444444 - */ color?: string | number[]; } class PolylineDto { constructor(polyline?: PolylinePropertiesDto); - /** - * Polyline with points - * @default undefined - */ polyline?: PolylinePropertiesDto; } class PolylinesDto { constructor(polylines?: PolylinePropertiesDto[]); - /** - * Polylines array - * @default undefined - */ polylines?: PolylinePropertiesDto[]; } class TransformPolylineDto { constructor(polyline?: PolylinePropertiesDto, transformation?: Base.TransformMatrixes); - /** - * Polyline to transform - * @default undefined - */ polyline?: PolylinePropertiesDto; - /** - * Transformation matrix or a list of transformation matrixes - * @default undefined - */ transformation?: Base.TransformMatrixes; } class DrawPolylineDto { - /** - * Provide options without default values - */ constructor(polyline?: PolylinePropertiesDto, opacity?: number, colours?: string | string[], size?: number, updatable?: boolean, polylineMesh?: T); - /** - * Polyline - * @default undefined - */ polyline?: PolylinePropertiesDto; - /** - * Value between 0 and 1 - * @default 1 - * @minimum 0 - * @maximum 1 - * @step 0.1 - */ opacity?: number; - /** - * Hex colour string - * @default #444444 - */ colours?: string | string[]; - /** - * Width of the polyline - * @default 3 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ size?: number; - /** - * Indicates wether the position of this polyline will change in time - * @default false - */ updatable?: boolean; - /** - * Line mesh variable in case it already exists and needs updating - * @default undefined - */ polylineMesh?: T; } class DrawPolylinesDto { - /** - * Provide options without default values - */ constructor(polylines?: PolylinePropertiesDto[], opacity?: number, colours?: string | string[], size?: number, updatable?: boolean, polylinesMesh?: T); - /** - * Polylines - * @default undefined - */ polylines?: PolylinePropertiesDto[]; - /** - * Value between 0 and 1 - * @default 1 - * @minimum 0 - * @maximum 1 - * @step 0.1 - */ opacity?: number; - /** - * Hex colour string - * @default #444444 - */ colours?: string | string[]; - /** - * Width of the polyline - * @default 3 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ size?: number; - /** - * Indicates wether the position of this polyline will change in time - * @default false - */ updatable?: boolean; - /** - * Polyline mesh variable in case it already exists and needs updating - * @default undefined - */ polylinesMesh?: T; } class SegmentsToleranceDto { constructor(segments?: Base.Segment3[]); - /** - * Segments array - * @default undefined - */ segments?: Base.Segment3[]; - /** - * Tolerance for the calculation - * @default 1e-5 - * @minimum -Infinity - * @maximum Infinity - * @step 1e-5 - */ tolerance?: number; } class PolylineToleranceDto { constructor(polyline?: PolylinePropertiesDto, tolerance?: number); - /** - * Polyline to check - * @default undefined - */ polyline?: PolylinePropertiesDto; - /** - * Tolerance for the calculation - * @default 1e-5 - * @minimum -Infinity - * @maximum Infinity - * @step 1e-5 - */ tolerance?: number; } class TwoPolylinesToleranceDto { constructor(polyline1?: PolylinePropertiesDto, polyline2?: PolylinePropertiesDto, tolerance?: number); - /** - * First polyline to check - * @default undefined - */ polyline1?: PolylinePropertiesDto; - /** - * Second polyline to check - * @default undefined - */ polyline2?: PolylinePropertiesDto; - /** - * Tolerance for the calculation - * @default 1e-5 - * @minimum -Infinity - * @maximum Infinity - * @step 1e-5 - */ tolerance?: number; } - } declare namespace Text { + } + declare namespace Text { class TextDto { constructor(text?: string); - /** - * The text - * @default Hello World - */ text: string; } class TextSplitDto { constructor(text?: string, separator?: string); - /** - * Text to split - * @default a,b,c - */ text: string; - /** - * Text to split by - * @default , - */ separator: string; } class TextReplaceDto { constructor(text?: string, search?: string, replaceWith?: string); - /** - * Text to replace - * @default a-c - */ text: string; - /** - * Text to search for - * @default - - */ search: string; - /** - * Text to replace found occurences - * @default b - */ replaceWith: string; } class TextJoinDto { constructor(list?: string[], separator?: string); - /** - * Text to join - * @default undefined - */ list: string[]; - /** - * Text to join by - * @default , - */ separator: string; } class ToStringDto { constructor(item?: T); - /** - * Item to stringify - * @default undefined - */ item: T; } class ToStringEachDto { constructor(list?: T[]); - /** - * Item to stringify - * @default undefined - */ list: T[]; } class TextFormatDto { constructor(text?: string, values?: string[]); - /** - * Text to format - * @default Hello {0} - */ text: string; - /** - * Values to format - * @default ["World"] - */ values: string[]; } + class TextSearchDto { + constructor(text?: string, search?: string); + text: string; + search: string; + } + class TextSubstringDto { + constructor(text?: string, start?: number, end?: number); + text: string; + start: number; + end?: number; + } + class TextIndexDto { + constructor(text?: string, index?: number); + text: string; + index: number; + } + class TextPadDto { + constructor(text?: string, length?: number, padString?: string); + text: string; + length: number; + padString: string; + } + class TextRepeatDto { + constructor(text?: string, count?: number); + text: string; + count: number; + } + class TextConcatDto { + constructor(texts?: string[]); + texts: string[]; + } + class TextRegexDto { + constructor(text?: string, pattern?: string, flags?: string); + text: string; + pattern: string; + flags: string; + } + class TextRegexReplaceDto { + constructor(text?: string, pattern?: string, flags?: string, replaceWith?: string); + text: string; + pattern: string; + flags: string; + replaceWith: string; + } class VectorCharDto { constructor(char?: string, xOffset?: number, yOffset?: number, height?: number, extrudeOffset?: number); - /** - * The text - * @default A - */ char: string; - /** - * The x offset - * @default 0 - * @minimum -Infinity - * @maximum Infinity - * @step 0.1 - */ xOffset?: number; - /** - * The y offset - * @minimum -Infinity - * @maximum Infinity - * @step 0.1 - */ yOffset?: number; - /** - * The height of the text - * @default 1 - * @minimum -Infinity - * @maximum Infinity - * @step 0.1 - */ height?: number; - /** - * The extrude offset - * @default 0 - * @minimum -Infinity - * @maximum Infinity - * @step 0.1 - */ extrudeOffset?: number; } class VectorTextDto { constructor(text?: string, xOffset?: number, yOffset?: number, height?: number, lineSpacing?: number, letterSpacing?: number, align?: Base.horizontalAlignEnum, extrudeOffset?: number, centerOnOrigin?: boolean); - /** - * The text - * @default Hello World - */ text?: string; - /** - * The x offset - * @default 0 - * @minimum -Infinity - * @maximum Infinity - * @step 0.1 - */ xOffset?: number; - /** - * The y offset - * @default 0 - * @minimum -Infinity - * @maximum Infinity - * @step 0.1 - */ yOffset?: number; - /** - * The height of the text - * @default 1 - * @minimum -Infinity - * @maximum Infinity - * @step 0.1 - */ height?: number; - /** - * The line spacing - * @default 1.4 - * @minimum -Infinity - * @maximum Infinity - * @step 0.1 - */ lineSpacing?: number; - /** - * The letter spacing offset - * @default 0 - * @minimum -Infinity - * @maximum Infinity - * @step 0.1 - */ letterSpacing?: number; - /** - * The extrude offset - * @default left - */ align?: Base.horizontalAlignEnum; - /** - * The extrude offset - * @default 0 - * @minimum -Infinity - * @maximum Infinity - * @step 0.1 - */ extrudeOffset?: number; - /** - * Will center text on 0, 0, 0 - * @default false - */ centerOnOrigin?: boolean; } - } declare namespace Transforms { + } + declare namespace Transforms { class RotationCenterAxisDto { constructor(angle?: number, axis?: Base.Vector3, center?: Base.Point3); - /** - * Angle of rotation in degrees - * @default 90 - * @minimum -Infinity - * @maximum Infinity - * @step 1 - */ angle: number; - /** - * Axis vector for rotation - * @default [0, 1, 0] - */ axis: Base.Vector3; - /** - * The center from which the axis is pointing - * @default [0, 0, 0] - */ center: Base.Point3; } class RotationCenterDto { constructor(angle?: number, center?: Base.Point3); - /** - * Angle of rotation in degrees - * @default 90 - * @minimum -Infinity - * @maximum Infinity - * @step 1 - */ angle: number; - /** - * The center from which the axis is pointing - * @default [0, 0, 0] - */ center: Base.Point3; } class RotationCenterYawPitchRollDto { constructor(yaw?: number, pitch?: number, roll?: number, center?: Base.Point3); - /** - * Yaw angle (Rotation around X) in degrees - * @default 0 - * @minimum -Infinity - * @maximum Infinity - * @step 1 - */ yaw: number; - /** - * Pitch angle (Rotation around Y) in degrees - * @default 0 - * @minimum -Infinity - * @maximum Infinity - * @step 1 - */ pitch: number; - /** - * Roll angle (Rotation around Z) in degrees - * @default 0 - * @minimum -Infinity - * @maximum Infinity - * @step 1 - */ roll: number; - /** - * The center from which the rotations are applied - * @default [0, 0, 0] - */ center: Base.Point3; } class ScaleXYZDto { constructor(scaleXyz?: Base.Vector3); - /** - * Scaling factors for each axis [1, 2, 1] means that Y axis will be scaled 200% and both x and z axis will remain on 100% - * @default [1, 1, 1] - */ scaleXyz: Base.Vector3; } class StretchDirCenterDto { constructor(scale?: number, center?: Base.Point3, direction?: Base.Vector3); - /** The center point around which to stretch. - * @default [0, 0, 0] - */ center?: Base.Point3; - /** The direction vector along which to stretch. Does not need to be normalized initially. - * @default [0, 0, 1] - */ direction?: Base.Vector3; - /** The scale factor to apply along the direction vector. 1.0 means no change. - * @default 2 - * @minimum -Infinity - * @maximum Infinity - * @step 0.1 - */ scale?: number; } class ScaleCenterXYZDto { constructor(center?: Base.Point3, scaleXyz?: Base.Vector3); - /** - * The center from which the scaling is applied - * @default [0, 0, 0] - */ center: Base.Point3; - /** - * Scaling factors for each axis [1, 2, 1] means that Y axis will be scaled 200% and both x and z axis will remain on 100% - * @default [1, 1, 1] - */ scaleXyz: Base.Vector3; } class UniformScaleDto { constructor(scale?: number); - /** - * Uniform scale factor for all x, y, z directions. 1 will keep everything on original size, 2 will scale 200%; - * @default 1 - * @minimum -Infinity - * @maximum Infinity - * @step 0.1 - */ scale: number; } class UniformScaleFromCenterDto { constructor(scale?: number, center?: Base.Point3); - /** - * Scale factor for all x, y, z directions. 1 will keep everything on original size, 2 will scale 200%; - * @default 1 - * @minimum -Infinity - * @maximum Infinity - * @step 0.1 - */ scale: number; - /** - * Center position of the scaling - * @default [0, 0, 0] - */ center: Base.Point3; } class TranslationXYZDto { constructor(translation?: Base.Vector3); - /** - * Translation vector with [x, y, z] distances - * @default [0, 0, 0] - */ translation: Base.Vector3; } class TranslationsXYZDto { constructor(translations?: Base.Vector3[]); - /** - * Translation vectors with [x, y, z] distances - * @default undefined - */ translations: Base.Vector3[]; } - } declare namespace Vector { + } + declare namespace Vector { class TwoVectorsDto { constructor(first?: number[], second?: number[]); - /** - * First vector - * @default undefined - */ first: number[]; - /** - * Second vector - * @default undefined - */ second: number[]; } class VectorBoolDto { constructor(vector?: boolean[]); - /** - * Vector of booleans - * @default undefined - */ vector: boolean[]; } class RemoveAllDuplicateVectorsDto { constructor(vectors?: number[][], tolerance?: number); - /** - * Vectors array - * @default undefined - */ vectors: number[][]; - /** - * Tolerance value - * @default 1e-7 - * @minimum 0 - * @maximum Infinity - */ tolerance: number; } class RemoveConsecutiveDuplicateVectorsDto { constructor(vectors?: number[][], checkFirstAndLast?: boolean, tolerance?: number); - /** - * Vectors array - * @default undefined - */ vectors: number[][]; - /** - * Check first and last vectors - * @default false - */ checkFirstAndLast: boolean; - /** - * Tolerance value - * @default 1e-7 - * @minimum 0 - * @maximum Infinity - */ tolerance: number; } class VectorsTheSameDto { constructor(vec1?: number[], vec2?: number[], tolerance?: number); - /** - * First vector - * @default undefined - */ vec1: number[]; - /** - * Second vector - * @default undefined - */ vec2: number[]; - /** - * Tolerance value - * @default 1e-7 - * @minimum 0 - * @maximum Infinity - */ tolerance: number; } class VectorDto { constructor(vector?: number[]); - /** - * Vector array of numbers - * @default undefined - */ vector: number[]; } + class VectorStringDto { + constructor(vector?: string[]); + vector: string[]; + } class Vector3Dto { constructor(vector?: Base.Vector3); - /** - * Vector array of 3 numbers - * @default undefined - */ vector: Base.Vector3; } class RangeMaxDto { constructor(max?: number); - /** - * Maximum range boundary - * @default 10 - * @minimum -Infinity - * @maximum Infinity - * @step 1 - */ max: number; } class VectorXYZDto { constructor(x?: number, y?: number, z?: number); - /** - * X value of vector - * @default 0 - * @minimum -Infinity - * @maximum Infinity - * @step 0.5 - */ x: number; - /** - * Y value of vector - * @default 0 - * @minimum -Infinity - * @maximum Infinity - * @step 0.5 - */ y: number; - /** - * Z value of vector - * @default 0 - * @minimum -Infinity - * @maximum Infinity - * @step 0.5 - */ z: number; } class VectorXYDto { constructor(x?: number, y?: number); - /** - * X value of vector - * @default 0 - * @minimum -Infinity - * @maximum Infinity - * @step 0.5 - */ x: number; - /** - * Y value of vector - * @default 0 - * @minimum -Infinity - * @maximum Infinity - * @step 0.5 - */ y: number; } class SpanDto { constructor(step?: number, min?: number, max?: number); - /** - * Step of the span - * @default 0.1 - * @minimum -Infinity - * @maximum Infinity - * @step 0.1 - */ step: number; - /** - * Min value of the span - * @default 0 - * @minimum -Infinity - * @maximum Infinity - * @step 1 - */ min: number; - /** - * Max value of the span - * @default 1 - * @minimum -Infinity - * @maximum Infinity - * @step 1 - */ max: number; } class SpanEaseItemsDto { constructor(nrItems?: number, min?: number, max?: number, ease?: Math.easeEnum); - /** - * Nr of items in the span - * @default 100 - * @minimum 2 - * @maximum Infinity - * @step 1 - */ nrItems: number; - /** - * Min value of the span - * @default 0 - * @minimum -Infinity - * @maximum Infinity - * @step 1 - */ min: number; - /** - * Max value of the span - * @default 1 - * @minimum -Infinity - * @maximum Infinity - * @step 1 - */ max: number; - /** - * Ease type - * @default easeInSine - */ ease: Math.easeEnum; - /** - * Indicates wether only intervals should be outputed. This will output step lengths between the values. - * @default false - */ intervals: boolean; } class SpanLinearItemsDto { constructor(nrItems?: number, min?: number, max?: number); - /** - * Nr of items in the span - * @default 100 - * @minimum 2 - * @maximum Infinity - * @step 1 - */ nrItems: number; - /** - * Min value of the span - * @default 0 - * @minimum -Infinity - * @maximum Infinity - * @step 1 - */ min: number; - /** - * Max value of the span - * @default 1 - * @minimum -Infinity - * @maximum Infinity - * @step 1 - */ max: number; } class RayPointDto { constructor(point?: Base.Point3, distance?: number, vector?: number[]); - /** - * Origin location of the ray - * @default undefined - */ point: Base.Point3; - /** - * Distance to the point on the ray - * @default 1 - * @minimum -Infinity - * @maximum Infinity - * @step 1 - */ distance: number; - /** - * Vector array of numbers - * @default undefined - */ vector: number[]; } class VectorsDto { constructor(vectors?: number[][]); - /** - * Vectors array - * @default undefined - */ vectors: number[][]; } class FractionTwoVectorsDto { constructor(fraction?: number, first?: Base.Vector3, second?: Base.Vector3); - /** - * Fraction number - * @default 0.5 - * @minimum -Infinity - * @maximum Infinity - * @step 0.1 - */ fraction: number; - /** - * First vector - * @default undefined - */ first: Base.Vector3; - /** - * Second vector - * @default undefined - */ second: Base.Vector3; } class VectorScalarDto { constructor(scalar?: number, vector?: number[]); - /** - * Scalar number - * @default 1 - * @minimum -Infinity - * @maximum Infinity - * @step 0.1 - */ scalar: number; - /** - * Vector array of numbers - * @default undefined - */ vector: number[]; } class TwoVectorsReferenceDto { constructor(reference?: number[], first?: Base.Vector3, second?: Base.Vector3); - /** - * Reference vector - * @default undefined - */ reference: number[]; - /** - * First vector - * @default undefined - */ first: Base.Vector3; - /** - * Second vector - * @default undefined - */ second: Base.Vector3; } } declare namespace Asset { class GetAssetDto { constructor(fileName?: string); - /** - * The fileName associated with the projects asset - * @default undefined - */ fileName: string; } class FetchDto { constructor(url?: string); - /** - * The url to fetch from - * @default undefined - */ url: string; } class FileDto { constructor(file?: File | Blob); - /** - * Asset file that was loaded - * @default undefined - */ file: File | Blob; } class FilesDto { constructor(files?: (File | Blob)[]); - /** - * Asset file that was loaded - * @default undefined - */ files: (File | Blob)[]; } class AssetFileDto { constructor(assetFile?: File, hidden?: boolean); - /** - * Asset file that was loaded - * @default undefined - */ assetFile: File; - /** - * Import the asset hidden - * @default false - */ hidden: boolean; } class AssetFileByUrlDto { constructor(assetFile?: string, rootUrl?: string, hidden?: boolean); - /** - * Asset file name - * @default undefined - */ assetFile: string; - /** - * Root url - * @default undefined - */ rootUrl: string; - /** - * Import the asset hidden - * @default false - */ hidden: boolean; } - } declare namespace Base { + class DownloadDto { + constructor(fileName?: string, content?: string | Blob, extension?: string, contentType?: string); + fileName: string; + content: string | Blob; + extension: string; + contentType: string; + } + } + declare namespace Base { + enum colorMapStrategyEnum { + firstColorForAll = "firstColorForAll", + lastColorRemainder = "lastColorRemainder", + repeatColors = "repeatColors", + reversedColors = "reversedColors" + } enum skyboxEnum { default = "default", clearSky = "clearSky", @@ -17422,31 +6272,80 @@ declare namespace Bit { exponentialSquared = "exponentialSquared", linear = "linear" } - type Color = string; - type ColorRGB = { - r: number; - g: number; - b: number; - }; - type Point2 = [number, number]; - type Vector2 = [number, number]; - type Point3 = [number, number, number]; - type Vector3 = [number, number, number]; - type Axis3 = { - origin: Base.Point3; - direction: Base.Vector3; - }; - type Axis2 = { - origin: Base.Point2; + enum horizontalAlignEnum { + left = "left", + center = "center", + right = "right" + } + enum verticalAlignmentEnum { + top = "top", + middle = "middle", + bottom = "bottom" + } + enum topBottomEnum { + top = "top", + bottom = "bottom" + } + enum basicAlignmentEnum { + topLeft = "topLeft", + topMid = "topMid", + topRight = "topRight", + midLeft = "midLeft", + midMid = "midMid", + midRight = "midRight", + bottomLeft = "bottomLeft", + bottomMid = "bottomMid", + bottomRight = "bottomRight" + } + type Color = string; + type ColorRGB = { + r: number; + g: number; + b: number; + }; + type Point2 = [ + number, + number + ]; + type Vector2 = [ + number, + number + ]; + type Point3 = [ + number, + number, + number + ]; + type Vector3 = [ + number, + number, + number + ]; + type Axis3 = { + origin: Base.Point3; + direction: Base.Vector3; + }; + type Axis2 = { + origin: Base.Point2; direction: Base.Vector2; }; - type Segment2 = [Point2, Point2]; - type Segment3 = [Point3, Point3]; + type Segment2 = [ + Point2, + Point2 + ]; + type Segment3 = [ + Point3, + Point3 + ]; type TrianglePlane3 = { normal: Vector3; d: number; }; - type Triangle3 = [Base.Point3, Base.Point3, Base.Point3]; + type Triangle3 = [ + Base.Point3, + Base.Point3, + Base.Point3 + ]; type Mesh3 = Triangle3[]; type Plane3 = { origin: Base.Point3; @@ -17483,1078 +6382,563 @@ declare namespace Bit { type VerbSurface = { tessellate: (options: any) => any; }; - type TransformMatrix3x3 = [number, number, number, number, number, number, number, number, number]; + type TransformMatrix3x3 = [ + number, + number, + number, + number, + number, + number, + number, + number, + number + ]; type TransformMatrixes3x3 = TransformMatrix3x3[]; - type TransformMatrix = [number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number]; + type TransformMatrix = [ + number, + number, + number, + number, + number, + number, + number, + number, + number, + number, + number, + number, + number, + number, + number, + number + ]; type TransformMatrixes = TransformMatrix[]; - } declare namespace JSON { + } + declare namespace CSV { + class ParseToArrayDto { + constructor(csv?: string, rowSeparator?: string, columnSeparator?: string); + csv: string; + rowSeparator?: string; + columnSeparator?: string; + } + class ParseToJsonDto { + constructor(csv?: string, headerRow?: number, dataStartRow?: number, rowSeparator?: string, columnSeparator?: string, numberColumns?: string[]); + csv: string; + headerRow?: number; + dataStartRow?: number; + rowSeparator?: string; + columnSeparator?: string; + numberColumns?: string[]; + } + class ParseToJsonWithHeadersDto { + constructor(csv?: string, headers?: string[], dataStartRow?: number, rowSeparator?: string, columnSeparator?: string, numberColumns?: string[]); + csv: string; + headers: string[]; + dataStartRow?: number; + rowSeparator?: string; + columnSeparator?: string; + numberColumns?: string[]; + } + class QueryColumnDto { + constructor(csv?: string, column?: string, headerRow?: number, dataStartRow?: number, rowSeparator?: string, columnSeparator?: string, asNumber?: boolean); + csv: string; + column: string; + headerRow?: number; + dataStartRow?: number; + rowSeparator?: string; + columnSeparator?: string; + asNumber?: boolean; + } + class QueryRowsByValueDto { + constructor(csv?: string, column?: string, value?: string, headerRow?: number, dataStartRow?: number, rowSeparator?: string, columnSeparator?: string, numberColumns?: string[]); + csv: string; + column: string; + value: string; + headerRow?: number; + dataStartRow?: number; + rowSeparator?: string; + columnSeparator?: string; + numberColumns?: string[]; + } + class ArrayToCsvDto { + constructor(array?: (string | number | boolean | null | undefined)[][], rowSeparator?: string, columnSeparator?: string); + array: (string | number | boolean | null | undefined)[][]; + rowSeparator?: string; + columnSeparator?: string; + } + class JsonToCsvDto> { + constructor(json?: T[], headers?: string[], includeHeaders?: boolean, rowSeparator?: string, columnSeparator?: string); + json: T[]; + headers: string[]; + includeHeaders?: boolean; + rowSeparator?: string; + columnSeparator?: string; + } + class JsonToCsvAutoDto> { + constructor(json?: T[], includeHeaders?: boolean, rowSeparator?: string, columnSeparator?: string); + json: T[]; + includeHeaders?: boolean; + rowSeparator?: string; + columnSeparator?: string; + } + class GetHeadersDto { + constructor(csv?: string, headerRow?: number, rowSeparator?: string, columnSeparator?: string); + csv: string; + headerRow?: number; + rowSeparator?: string; + columnSeparator?: string; + } + class GetRowCountDto { + constructor(csv?: string, hasHeaders?: boolean, dataStartRow?: number, rowSeparator?: string, columnSeparator?: string); + csv: string; + hasHeaders?: boolean; + dataStartRow?: number; + rowSeparator?: string; + columnSeparator?: string; + } + } + declare namespace JSON { class StringifyDto { constructor(json?: any); - /** - * Stringify value - * @default undefined - */ json: any; } class ParseDto { constructor(text?: string); - /** - * Stringify value - * @default "[0, 0, 0]" - */ text: string; } class QueryDto { constructor(json?: any, query?: string); - /** - * query json structure - * @default undefined - */ json: any; - /** - * query path - * @default undefined - */ query: string; } class SetValueOnPropDto { constructor(json?: any, value?: any, property?: string); - /** - * query json structure - * @default undefined - */ json: any; - /** - * value to be set - * @default undefined - */ value: any; - /** - * query json structure - * @default propName - */ property: string; } class GetJsonFromArrayByFirstPropMatchDto { constructor(jsonArray?: any[], property?: string, match?: any); - /** - * Array - * @default undefined - */ jsonArray: any[]; - /** - * property to check - * @default propName - */ property: string; - /** - * Value to match for the property - * @default undefined - */ match: any; } class GetValueOnPropDto { constructor(json?: any, property?: string); - /** - * query json structure - * @default undefined - */ json: any; - /** - * query json structure - * @default propName - */ property: string; } class SetValueDto { constructor(json?: any, value?: any, path?: string, prop?: string); - /** - * query json structure - * @default undefined - */ json: any; - /** - * value to be set - * @default undefined - */ value: any; - /** - * query to json structure elements on which given prop has to be updated - * @default $.pathToParent - */ path: string; - /** - * property to update - * @default propertyName - */ prop: string; } class SetValuesOnPathsDto { - constructor(json?: any, values?: any[], paths?: string[], props?: []); - /** - * query json structure - * @default undefined - */ + constructor(json?: any, values?: any[], paths?: string[], props?: [ + ]); json: any; - /** - * values to be set - * @default undefined - */ values: any[]; - /** - * query json structures - * @default undefined - */ paths: string[]; - /** - * properties to update - * @default undefined - */ props: string[]; } class PathsDto { constructor(json?: any, query?: string); - /** - * query json structure - * @default undefined - */ json: any; - /** - * query path - * @default undefined - */ query: string; } class JsonDto { constructor(json?: any); - /** - * json value - * @default undefined - */ json: any; } - } declare namespace Tag { + } + declare namespace Tag { class DrawTagDto { constructor(tag?: TagDto, updatable?: boolean, tagVariable?: TagDto); - /** - * Text tag to draw - */ tag: TagDto; - /** - * Indicates that it is updatable tag - */ updatable: boolean; - /** - * Optional existing tag in case it needs updating - */ tagVariable?: TagDto; } class DrawTagsDto { constructor(tags?: TagDto[], updatable?: boolean, tagsVariable?: TagDto[]); - /** - * Text tag to draw - */ tags: TagDto[]; - /** - * Indicates that it is updatable tag - */ updatable: boolean; - /** - * Optional existing tag in case it needs updating - */ tagsVariable?: TagDto[]; } - /** - * Class representing a tag - */ class TagDto { constructor(text?: string, position?: Base.Point3, colour?: string, size?: number, adaptDepth?: boolean, needsUpdate?: boolean, id?: string); - /** - * Text of the tag - */ text: string; - /** - * Position of the tag - */ position: Base.Point3; - /** - * Colour of the tag - */ colour: string; - /** - * Text size - */ size: number; - /** - * Make tags that are further away smaller - */ adaptDepth: boolean; - /** - * Indicates if tag needs updating - */ needsUpdate?: boolean; - /** - * Unique id of the tag - */ id?: string; } - } declare namespace Time { + } + declare namespace Time { class PostFromIframe { constructor(data?: any, targetOrigin?: string); - /** - * The data object to post - */ data: any; - /** - * Thir party iframe origin url to which data should be posted - */ targetOrigin: string; } - } declare namespace Verb { + } + declare namespace Verb { class CurveDto { constructor(curve?: any); - /** - * Nurbs curve - */ curve: any; } class LineDto { constructor(line?: Base.Line3); - /** - * Basic line - */ line: Base.Line3; } class LinesDto { constructor(lines?: Base.Line3[]); - /** - * Basic lines - */ lines: Base.Line3[]; } class PolylineDto { constructor(polyline?: Base.Polyline3); - /** - * Basic polyline - */ polyline: Base.Polyline3; } class PolylinesDto { constructor(polylines?: Base.Polyline3[]); - /** - * Basic polyline - */ polylines: Base.Polyline3[]; } class CurvesDto { constructor(curves?: any[]); - /** - * Nurbs curves - */ curves: any[]; } class ClosestPointDto { constructor(curve?: any, point?: Base.Point3); - /** - * Nurbs curve - */ curve: any; - /** - * Point - */ point: Base.Point3; } class ClosestPointsDto { constructor(curve?: any, points?: Base.Point3[]); - /** - * Nurbs curve - */ curve: any; - /** - * Points - */ points: Base.Point3[]; } class BezierCurveDto { constructor(points?: Base.Point3[], weights?: number[]); - /** - * Control points - */ points: Base.Point3[]; - /** - * Weights - */ weights: number[]; } class DrawCurveDto { - /** - * Provide options without default values - */ constructor(curve?: any, opacity?: number, colours?: string | string[], size?: number, updatable?: boolean, curveMesh?: T); - /** - * Nurbs curve - */ curve: any; - /** - * Value between 0 and 1 - */ opacity: number; - /** - * Hex colour string - */ colours: string | string[]; - /** - * Width of the polyline - */ size: number; - /** - * Indicates wether the position of this curve will change in time - */ updatable: boolean; - /** - * Curve mesh variable in case it already exists and needs updating - */ curveMesh?: T; } class CurveParameterDto { constructor(curve?: any, parameter?: number); - /** - * Nurbs curve - */ curve: any; - /** - * Parameter on the curve - */ parameter: number; } class CurvesParameterDto { constructor(curves?: any[], parameter?: number); - /** - * Nurbs curve - */ curves: any; - /** - * Parameter on the curve - */ parameter: number; } class CurveTransformDto { constructor(curve?: any, transformation?: Base.TransformMatrixes); - /** - * Nurbs curve - */ curve: any; - /** - * Transformation matrixes - */ transformation: Base.TransformMatrixes; } class CurvesTransformDto { constructor(curves?: any[], transformation?: Base.TransformMatrixes); - /** - * Nurbs curve - */ curves: any[]; - /** - * Transformation matrixes - */ transformation: Base.TransformMatrixes; } class CurveToleranceDto { constructor(curve?: any, tolerance?: number); - /** - * Nurbs curve - */ curve: any; - /** - * Optional tolerance - */ tolerance: number; } class CurveLengthToleranceDto { constructor(curve?: any, length?: number, tolerance?: number); - /** - * Nurbs curve - */ curve: any; - /** - * Length on the curve - */ length: number; - /** - * Tolerance - */ tolerance: number; } class CurveDerivativesDto { constructor(curve?: any, parameter?: number, numDerivatives?: number); - /** - * Nurbs curve - */ curve: any; - /** - * Number of derivatives - */ numDerivatives: number; - /** - * Parameter on the curve - */ parameter: number; } class CurveSubdivisionsDto { constructor(curve?: any, subdivision?: number); - /** - * Nurbs curve - */ curve: any; - /** - * Number of subdivisions - */ subdivision: number; } class CurvesSubdivisionsDto { constructor(curves?: any[], subdivision?: number); - /** - * Nurbs curves - */ curves: any[]; - /** - * Number of subdivisions - */ subdivision: number; } class CurvesDivideLengthDto { constructor(curves?: any[], length?: number); - /** - * Nurbs curves - */ curves: any[]; - /** - * Length of subdivisions - */ length: number; } class CurveDivideLengthDto { constructor(curve?: any, length?: number); - /** - * Nurbs curve - */ curve: any; - /** - * Length of subdivisions - */ length: number; } class DrawCurvesDto { - /** - * Provide options without default values - */ constructor(curves?: any[], opacity?: number, colours?: string | string[], size?: number, updatable?: boolean, curvesMesh?: T); - /** - * Nurbs curves - */ curves: any[]; - /** - * Value between 0 and 1 - */ opacity: number; - /** - * Hex colour string - */ colours: string | string[]; - /** - * Width of the polyline - */ size: number; - /** - * Indicates wether the position of this polyline will change in time - */ updatable: boolean; - /** - * Curve mesh variable in case it already exists and needs updating - */ curvesMesh?: T; } class CurveNurbsDataDto { constructor(degree?: number, weights?: number[], knots?: number[], points?: Base.Point3[]); - /** - * Nurbs curve degree - */ degree: number; - /** - * Weights that identify strength that attracts curve to control points - */ weights: number[]; - /** - * Knots of the Nurbs curve - */ knots: number[]; - /** - * Control points of the nurbs curve - */ points: Base.Point3[]; } class CurvePathDataDto { constructor(degree?: number, points?: Base.Point3[]); - /** - * Nurbs curve degree - */ degree: number; - /** - * Control points of the nurbs curve - */ points: Base.Point3[]; } class EllipseDto { constructor(ellipse?: any); - /** - * Nurbs ellipse - */ ellipse: any; } class CircleDto { constructor(circle?: any); - /** - * Nurbs circle - */ circle: any; } class ArcDto { constructor(arc?: any); - /** - * Nurbs arc - */ arc: any; } class EllipseParametersDto { constructor(xAxis?: Base.Vector3, yAxis?: Base.Vector3, center?: Base.Point3); - /** - * X axis of the circle - */ xAxis: Base.Vector3; - /** - * Y axis of the circle - */ yAxis: Base.Vector3; - /** - * Center of the circle - */ center: Base.Point3; } class CircleParametersDto { constructor(xAxis?: Base.Vector3, yAxis?: Base.Vector3, radius?: number, center?: Base.Point3); - /** - * X axis of the circle - */ xAxis: Base.Vector3; - /** - * Y axis of the circle - */ yAxis: Base.Vector3; - /** - * Radius of the circle - */ radius: number; - /** - * Center of the circle - */ center: Base.Point3; } class ArcParametersDto { constructor(minAngle?: number, maxAngle?: number, xAxis?: Base.Vector3, yAxis?: Base.Vector3, radius?: number, center?: Base.Point3); - /** - * Minimum angle in degrees - */ minAngle: number; - /** - * Maximum angle in degrees - */ maxAngle: number; - /** - * X axis of the circle - */ xAxis: Base.Vector3; - /** - * Y axis of the circle - */ yAxis: Base.Vector3; - /** - * Radius of the circle - */ radius: number; - /** - * Center of the circle - */ center: Base.Point3; } class EllipseArcParametersDto { constructor(minAngle?: number, maxAngle?: number, xAxis?: Base.Vector3, yAxis?: Base.Vector3, center?: Base.Point3); - /** - * Minimum angle in degrees - */ minAngle: number; - /** - * Maximum angle in degrees - */ maxAngle: number; - /** - * X axis of the circle - */ xAxis: Base.Vector3; - /** - * Y axis of the circle - */ yAxis: Base.Vector3; - /** - * Center of the circle - */ center: Base.Point3; } class SurfaceDto { constructor(surface?: any); - /** - * Nurbs surface - */ surface: any; } class SurfaceTransformDto { constructor(surface?: any, transformation?: Base.TransformMatrixes); - /** - * Nurbs surface - */ surface: any; - /** - * Transformations - */ transformation: Base.TransformMatrixes; } class SurfaceParameterDto { constructor(surface?: any, parameter?: number, useV?: boolean); - /** - * Nurbs surface - */ surface: any; - /** - * Parameter on the surface - */ parameter: number; - /** - * Default parameter is on U direction, use V to switch - */ useV: boolean; } class IsocurvesParametersDto { constructor(surface?: any, parameters?: number[], useV?: boolean); - /** - * Nurbs surface - */ surface: any; - /** - * Parameter on the surface - */ parameters: number[]; - /** - * Default parameter is on U direction, use V to switch - */ useV: boolean; } class IsocurveSubdivisionDto { - /** - * Provide undefined options - */ constructor(surface?: any, useV?: boolean, includeLast?: boolean, includeFirst?: boolean, isocurveSegments?: number); - /** - * Nurbs surface - */ surface: any; - /** - * Default parameter is on U direction, use V to switch - */ useV: boolean; - /** - * Check to include the last isocurve - */ includeLast: boolean; - /** - * Check to include the first isocurve - */ includeFirst: boolean; - /** - * Number of segments including surface start and end - */ isocurveSegments: number; } class DerivativesDto { constructor(surface?: any, u?: number, v?: number, numDerivatives?: number); - /** - * Nurbs surface - */ surface: any; - /** - * U coordinate - */ u: number; - /** - * V coordinate - */ v: number; - /** - * Number of derivatives - */ numDerivatives: number; } class SurfaceLocationDto { constructor(surface?: any, u?: number, v?: number); - /** - * Nurbs surface - */ surface: any; - /** - * U coordinate - */ u: number; - /** - * V coordinate - */ v: number; } class CornersDto { constructor(point1?: Base.Point3, point2?: Base.Point3, point3?: Base.Point3, point4?: Base.Point3); - /** - * Corner 1 - */ point1: Base.Point3; - /** - * Corner 2 - */ point2: Base.Point3; - /** - * Corner 3 - */ point3: Base.Point3; - /** - * Corner 4 - */ point4: Base.Point3; } class SurfaceParamDto { constructor(surface?: any, point?: Base.Point3); - /** - * Nurbs surface - */ surface: any; - /** - * Point - */ point: Base.Point3; } class KnotsControlPointsWeightsDto { constructor(degreeU?: number, degreeV?: number, knotsU?: number[], knotsV?: number[], points?: Base.Point3[], weights?: number[]); - /** - * U direction degree - */ degreeU: number; - /** - * V direction degree - */ degreeV: number; - /** - * U direction knots - */ knotsU: number[]; - /** - * V direction knots - */ knotsV: number[]; - /** - * Points - */ points: Base.Point3[]; - /** - * Weights - */ weights: number[]; } class LoftCurvesDto { constructor(degreeV?: number, curves?: any[]); - /** - * V direction degree - */ degreeV: number; - /** - * Nurbs curves - */ curves: any[]; } class DrawSurfaceDto { - /** - * Provide options without default values - */ - constructor(surface?: any, opacity?: number, colours?: string | string[], updatable?: boolean, hidden?: boolean, surfaceMesh?: T); - /** - * Nurbs surface - */ + constructor(surface?: any, opacity?: number, colours?: string | string[], updatable?: boolean, hidden?: boolean, surfaceMesh?: T, drawTwoSided?: boolean, backFaceColour?: string, backFaceOpacity?: number); surface: any; - /** - * Value between 0 and 1 - */ opacity: number; - /** - * Hex colour string - */ colours: string | string[]; - /** - * Indicates wether the position of this surface will change in time - */ updatable: boolean; - /** - * Should be hidden - */ hidden: boolean; - /** - * Surface mesh variable in case it already exists and needs updating - */ surfaceMesh?: T; + drawTwoSided: boolean; + backFaceColour: string; + backFaceOpacity: number; } class DrawSurfacesDto { - /** - * Provide options without default values - */ - constructor(surfaces?: any[], opacity?: number, colours?: string | string[], updatable?: boolean, hidden?: boolean, surfacesMesh?: T); - /** - * Nurbs surfaces - */ + constructor(surfaces?: any[], opacity?: number, colours?: string | string[], updatable?: boolean, hidden?: boolean, surfacesMesh?: T, drawTwoSided?: boolean, backFaceColour?: string, backFaceOpacity?: number); surfaces: any[]; - /** - * Value between 0 and 1 - */ opacity: number; - /** - * Hex colour string - */ colours: string | string[]; - /** - * Indicates wether the position of these surfaces will change in time - */ updatable: boolean; - /** - * Should be hidden - */ hidden: boolean; - /** - * Surfaces mesh variable in case it already exists and needs updating - */ surfacesMesh?: T; + drawTwoSided: boolean; + backFaceColour: string; + backFaceOpacity: number; } class DrawSurfacesColoursDto { - /** - * Provide options without default values - */ - constructor(surfaces?: any[], colours?: string[], opacity?: number, updatable?: boolean, hidden?: boolean, surfacesMesh?: T); - /** - * Nurbs surfaces - */ + constructor(surfaces?: any[], colours?: string[], opacity?: number, updatable?: boolean, hidden?: boolean, surfacesMesh?: T, drawTwoSided?: boolean, backFaceColour?: string, backFaceOpacity?: number); surfaces: any[]; - /** - * Value between 0 and 1 - */ opacity: number; - /** - * Hex colour strings, there has to be a colour for every single surface and lengths of arrays need to match - */ colours: string | string[]; - /** - * Indicates wether the position of these surfaces will change in time - */ updatable: boolean; - /** - * Indicates if surface should be hidden - */ hidden: boolean; - /** - * Surfaces mesh variable in case it already exists and needs updating - */ surfacesMesh?: T; + drawTwoSided: boolean; + backFaceColour: string; + backFaceOpacity: number; } class ConeAndCylinderParametersDto { constructor(axis?: Base.Vector3, xAxis?: Base.Vector3, base?: Base.Point3, height?: number, radius?: number); - /** - * Defines main axis of the cone - */ axis: Base.Vector3; - /** - * X axis of the cone - */ xAxis: Base.Vector3; - /** - * Base point for the cone - */ base: Base.Point3; - /** - * Height of the cone - */ height: number; - /** - * Radius of the cone - */ radius: number; } class ConeDto { constructor(cone?: any); - /** - * Conical Nurbs surface - */ cone: any; } class CylinderDto { constructor(cylinder?: any); - /** - * Cylindrical Nurbs surface - */ cylinder: any; } class ExtrusionParametersDto { constructor(profile?: any, direction?: Base.Vector3); - /** - * Profile Nurbs curve - */ profile: any; - /** - * Direction vector - */ direction: Base.Vector3; } class ExtrusionDto { constructor(extrusion?: any); - /** - * Nurbs surface created through extrusion - */ extrusion: any; } class SphericalParametersDto { constructor(radius?: number, center?: number[]); - /** - * Radius of the sphere - */ radius: number; - /** - * Center point - */ center: number[]; } class SphereDto { constructor(sphere?: any); - /** - * Spherical Nurbs surface - */ sphere: any; } class RevolutionParametersDto { constructor(profile?: any, center?: number[], axis?: number[], angle?: number); - /** - * Profile Nurbs curve - */ profile: any; - /** - * Center point - */ center: number[]; - /** - * Axis around which rotation will happen - */ axis: number[]; - /** - * Angle at which to rotate in degrees - */ angle: number; } class RevolutionDto { constructor(revolution?: any); - /** - * Revolved Nurbs surface - */ revolution: any; } class SweepParametersDto { constructor(profile?: any, rail?: any); - /** - * Profile Nurbs curve - */ profile: any; - /** - * Rail Nurbs curve - */ rail: any; } class SweepDto { constructor(sweep?: any); - /** - * Revolved Nurbs surface - */ sweep: any; } class CurveCurveDto { constructor(firstCurve?: any, secondCurve?: any, tolerance?: number); - /** - * First Nurbs curve - */ firstCurve: any; - /** - * Second Nurbs curve - */ secondCurve: number[]; - /** - * Optional tolerance parameter - */ tolerance?: number; } class CurveSurfaceDto { constructor(curve?: any, surface?: any, tolerance?: number); - /** - * Nurbs curve - */ curve: any; - /** - * Nurbs surface - */ surface: any; - /** - * Optional tolerance parameter - */ tolerance?: number; } class SurfaceSurfaceDto { constructor(firstSurface?: any, secondSurface?: any, tolerance?: number); - /** - * Nurbs curve - */ firstSurface: any; - /** - * Nurbs surface - */ secondSurface: any; - /** - * Optional tolerance parameter - */ tolerance?: number; } class CurveCurveIntersectionsDto { constructor(intersections?: BaseTypes.CurveCurveIntersection[]); - /** - * Curve curve intersections - */ intersections: BaseTypes.CurveCurveIntersection[]; } class CurveSurfaceIntersectionsDto { constructor(intersections?: BaseTypes.CurveSurfaceIntersection[]); - /** - * Curve curve intersections - */ intersections: BaseTypes.CurveSurfaceIntersection[]; } } } - declare namespace Models { declare namespace Point { declare class HexGridData { @@ -18568,37 +6952,14 @@ declare namespace Bit { declare namespace Text { declare class VectorCharData { constructor(width?: number, height?: number, paths?: Base.Point3[][]); - /** - * The width of the char - * @default undefined - */ width?: number; - /** - * The height of the char - * @default undefined - */ height?: number; - /** - * The segments of the char - * @default undefined - */ paths?: Base.Point3[][]; - } declare class VectorTextData { + } + declare class VectorTextData { constructor(width?: number, height?: number, chars?: VectorCharData[]); - /** - * The width of the char - * @default undefined - */ width?: number; - /** - * The height of the char - * @default undefined - */ height?: number; - /** - * The segments of the char - * @default undefined - */ chars?: VectorCharData[]; } } @@ -18611,12 +6972,14 @@ declare namespace Bit { compound?: U; shapes?: ShapeWithId[]; data?: M; - } declare class TextWiresCharShapePart { + } + declare class TextWiresCharShapePart { id?: string; shapes?: { compound?: T; }; - } declare class TextWiresDataDto { + } + declare class TextWiresDataDto { type: string; name: string; compound?: T; @@ -18627,16 +6990,12 @@ declare namespace Bit { } } } - declare namespace Things { declare namespace Enums { declare class LodDto { - /** - * Level of detail - * @default low - */ lod: lodEnum; - } declare enum lodEnum { + } + declare enum lodEnum { low = "low", middle = "middle", high = "high" @@ -18646,140 +7005,41 @@ declare namespace Bit { declare namespace Houses { declare namespace ZenHideout { declare class ZenHideoutData { - /** - * Type of the object being configured - */ type: string; - /** - * Default name of the object - */ name: string; - /** - * Original inputs - */ originalInputs?: ZenHideoutDto; - /** - * Compounded shape representation of all of the geometric objects of the building - */ compound?: T; - /** - * All the shapes of the building - */ shapes?: Models.OCCT.ShapeWithId[]; - /** - * Representation of zen hideout parts that are useful for drawing the object efficiently - */ drawingPart?: ZenHideoutDrawingPart; - /** - * Sandwitch parts that have inner and outer panels, can have windows and doors - */ sandwitchPartsBetweenColumns?: Things.Architecture.SandwitchPart[]; - /** - * Corner part panels forming 90 degree angle - */ cornerParts?: Things.Architecture.CornerPart[]; - /** - * Column parts of the building - */ columnParts?: Things.Architecture.ColumnPart[]; - /** - * Roof parts of the building. Contain all the upper geometry, together with beams and columns. - */ roofParts?: Things.Architecture.RoofPart[]; - /** - * Entrance corner part of the building, containing interior and exterior panels, staircase, and a corner window part - */ entranceCorner?: Things.Architecture.CornerEntrancePart; - /** - * Terrace corner of the building, containing interior and exterior panels, staircase, and a corner window part - */ entranceTerrace?: Things.Architecture.CornerEntrancePart; - /** - * Floor parts of the building - */ floors?: Things.Architecture.FloorPart[]; - /** - * Ceiling parts of the building - */ ceilings?: Things.Architecture.CeilingPart[]; - }/** - * This defines useful compounded objects for representing zen hideout in optimal and fast way. - */ + } declare class ZenHideoutDrawingPartShapes { - /** - * The representation of all window glass objects in the building - */ windowGlassCompound?: T; - /** - * The representation of all glass frame objects in the building - */ glassFramesCompound?: T; - /** - * The representation of all window frame objects in the building - */ windowFrameCompound?: T; - /** - * The representation of all beam objects in the building - */ beamsCompound?: T; - /** - * The representation of all column objects in the building - */ columnsCompound?: T; - /** - * The representation of all exterior panels on the first floor - * of the building - */ firstFloorExteriorPanelsCompound?: T; - /** - * The representation of all interior panels on the first floor - * of the building - */ firstFloorInteriorPanelsCompound?: T; - /** - * The representation of all exterior panels on the roof - * of the building - */ roofExteriorPanelsCompound?: T; - /** - * The representation of all interior panels on the roof - * of the building - */ roofInteriorPanelsCompound?: T; - /** - * The representation of the first roof cover - * of the building - */ roofCoverFirstCompound?: T; - /** - * The representation of the second roof cover - * of the building - */ roofCoverSecondCompound?: T; - /** - * The representation of the floor - * of the building - */ floorCompound?: T; - /** - * The representation of the ceiling - * of the building - */ ceilingCompound?: T; - /** - * The representation of stairs - */ stairsCompound?: T; - }/** - * Information needed to draw the part in an optimal way - */ + } declare class ZenHideoutDrawingPart { - /** - * Shapes that exist in the drawing part, T can represent opancascade geometry, - * babylonjs mesh, materials or other things that map to these drawing categories. - */ shapes?: ZenHideoutDrawingPartShapes; - } declare class ZenHideoutDtoBase { + } + declare class ZenHideoutDtoBase { widthFirstWing: T; lengthFirstWing: T; terraceWidth: T; @@ -18809,230 +7069,38 @@ declare namespace Bit { lod: U; rotation?: T; origin?: V; - } declare class ZenHideoutDto implements ZenHideoutDtoBase { + } + declare class ZenHideoutDto implements ZenHideoutDtoBase { constructor(widthFirstWing?: number, lengthFirstWing?: number, terraceWidth?: number, widthSecondWing?: number, lengthSecondWing?: number, heightWalls?: number, roofAngleFirstWing?: number, roofAngleSecondWing?: number, roofOffset?: number, roofInsideOverhang?: number, roofMaxDistAttachmentBeams?: number, roofAttachmentBeamWidth?: number, roofAttachmentBeamHeight?: number, roofOutsideOverhang?: number, columnSize?: number, ceilingBeamHeight?: number, ceilingBeamWidth?: number, nrCeilingBeamsBetweenColumns?: number, distBetweenColumns?: number, floorHeight?: number, groundLevel?: number, facadePanelThickness?: number, windowWidthOffset?: number, windowHeightOffset?: number, windowFrameThickness?: number, windowGlassFrameThickness?: number, lod?: Things.Enums.lodEnum, skinOpacity?: number, rotation?: number, origin?: Inputs.Base.Point3); - /** - * Width of the first wing of L shaped building - * @default 4 - * @minimum 3 - * @maximum Infinity - * @step 0.5 - */ widthFirstWing: number; - /** - * Length of the first wing of L shaped building - * @default 10 - * @minimum 3 - * @maximum Infinity - * @step 0.5 - */ lengthFirstWing: number; - /** - * Width of the terrace - * @default 3 - * @minimum 1 - * @maximum Infinity - * @step 0.25 - */ terraceWidth: number; - /** - * Width of the second wing of L shaped building - * @default 5 - * @minimum 3 - * @maximum Infinity - * @step 0.5 - */ widthSecondWing: number; - /** - * Length of the second wing of L shaped building - * @default 10 - * @minimum 3 - * @maximum Infinity - * @step 0.5 - */ lengthSecondWing: number; - /** - * Height of the walls - * @default 3 - * @minimum 3 - * @maximum Infinity - * @step 0.1 - */ heightWalls: number; - /** - * Height of the first wing end - * @default 15 - * @minimum 5 - * @maximum Infinity - * @step 5 - */ roofAngleFirstWing: number; - /** - * Height of the first wing end - * @default 25 - * @minimum 5 - * @maximum Infinity - * @step 5 - */ roofAngleSecondWing: number; - /** - * The offset to be applied to where the roof starts - * @default 0.5 - * @minimum 0.2 - * @maximum Infinity - * @step 0.25 - */ roofOffset: number; - /** - * Roof overhang on the inside of the building (where the terrace is) - * @default 0.5 - * @minimum 0 - * @maximum Infinity - * @step 0.25 - */ roofInsideOverhang: number; - /** - * Roof max distance between top attachment beams - * @default 0.8 - * @minimum 0.1 - * @maximum Infinity - * @step 0.25 - */ roofMaxDistAttachmentBeams: number; - /** - * Roof attachment beam width - * @default 0.2 - * @minimum 0.01 - * @maximum Infinity - * @step 0.05 - */ roofAttachmentBeamWidth: number; - /** - * Roof attachment beam height - * @default 0.05 - * @minimum 0.01 - * @maximum Infinity - * @step 0.05 - */ roofAttachmentBeamHeight: number; - /** - * Roof overhang on the inside of the building - * @default 0.5 - * @minimum 0 - * @maximum Infinity - * @step 0.25 - */ roofOutsideOverhang: number; - /** - * Column size - * @default 0.3 - * @minimum 0.01 - * @maximum Infinity - * @step 0.1 - */ columnSize: number; - /** Ceiling beam height - * @default 0.25 - * @minimum 0.01 - * @maximum Infinity - * @step 0.05 - */ ceilingBeamHeight: number; - /** Ceiling beam width - * @default 0.1 - * @minimum 0.01 - * @maximum Infinity - * @step 0.05 - */ ceilingBeamWidth: number; - /** Nr ceiling beams between columns - * @default 3 - * @minimum 1 - * @maximum Infinity - * @step 1 - */ nrCeilingBeamsBetweenColumns: number; - /** Distance between columns - * @default 2 - * @minimum 0.5 - * @maximum Infinity - * @step 0.25 - */ distBetweenColumns: number; - /** The height of the floor - * @default 0.1 - * @minimum 0.1 - * @maximum Infinity - * @step 0.1 - */ floorHeight: number; - /** ground level from the floor - * @default 0.6 - * @minimum 0.1 - * @maximum Infinity - * @step 0.1 - */ groundLevel: number; - /** Facade panel thickness - * @default 0.05 - * @minimum 0.01 - * @maximum Infinity - * @step 0.01 - */ facadePanelThickness: number; - /** Window width parameter - * @default 0.1 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ windowWidthOffset: number; - /** Window bottom offset - * @default 0.2 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ windowHeightOffset: number; - /** Window frame thickness - * @default 0.1 - * @minimum 0.01 - * @maximum Infinity - * @step 0.01 - */ windowFrameThickness: number; - /** Window glass frame thickness - * @default 0.05 - * @minimum 0.01 - * @maximum Infinity - * @step 0.01 - */ windowGlassFrameThickness: number; - /** - * Level of detail to compute - * @default high - */ lod: Things.Enums.lodEnum; - /** - * The opacity of the skin - only applied if lod is set to high - * @default 1 - * @minimum 0 - * @maximum 1 - * @step 0.1 - */ skinOpacity: number; - /** - * Rotation of the zen hideout - * @default 0 - * @minimum 0 - * @maximum Infinity - * @step 10 - */ rotation: number; - /** - * Origin of the zen hideout - * @default [0, 0, 0] - */ origin: Inputs.Base.Point3; } } @@ -19046,7 +7114,8 @@ declare namespace Bit { shapes?: { beam?: T; }; - } declare class CeilingPart { + } + declare class CeilingPart { id?: string; name?: string; area?: number; @@ -19055,7 +7124,8 @@ declare namespace Bit { shapes?: { compound?: T; }; - } declare class ColumnPart { + } + declare class ColumnPart { id?: string; name?: string; width?: number; @@ -19064,148 +7134,30 @@ declare namespace Bit { shapes?: { column?: T; }; - } declare class CornerEntranceDto { - /** - * Width first wing - * @default 1 - * @minimum 0.1 - * @maximum Infinity - * @step 0.1 - */ + } + declare class CornerEntranceDto { widthFirstWing: number; - /** - * Width second wing - * @default 1 - * @minimum 0.1 - * @maximum Infinity - * @step 0.1 - */ widthSecondWing: number; - /** - * Length stair first wing - * @default 1 - * @minimum 0.1 - * @maximum Infinity - * @step 0.1 - */ lengthStairFirstWing: number; - /** - * Length stair second wing - * @default 1 - * @minimum 0.1 - * @maximum Infinity - * @step 0.1 - */ lengthStairSecondWing: number; - /** - * Length wall first wing - * @default 1 - * @minimum 0.1 - * @maximum Infinity - * @step 0.1 - */ lengthWallFirstWing: number; - /** - * Length wall second wing - * @default 1 - * @minimum 0.1 - * @maximum Infinity - * @step 0.1 - */ lengthWallSecondWing: number; - /** Facade panel thickness - * @default 0.05 - * @minimum 0.01 - * @maximum Infinity - * @step 0.01 - */ facadePanelThickness: number; - /** Wall thickness - * @default 0.3 - * @minimum 0.01 - * @maximum Infinity - * @step 0.05 - */ wallThickness: number; - /** Height of the walls on the exterior side - * @default 3 - * @minimum 0.1 - * @maximum Infinity - * @step 0.1 - */ wallHeightExterior: number; - /** Height of the walls on the interior side - * @default 3 - * @minimum 0.1 - * @maximum Infinity - * @step 0.1 - */ wallHeightInterior: number; - /** Window offset top - * @default 0.3 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ windowFrameOffsetTop: number; - /** Window frame thickness - * @default 0.1 - * @minimum 0.01 - * @maximum Infinity - * @step 0.1 - */ windowFrameThickness: number; - /** Glass frame thickness - * @default 0.1 - * @minimum 0.01 - * @maximum Infinity - * @step 0.1 - */ glassFrameThickness: number; - /** Door width - * @default 1 - * @minimum 0.7 - * @maximum Infinity - * @step 0.1 - */ doorWidth: number; - /** Corner Window Width Offset - * @default 0.3 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ windowWidthOffset: number; - /** Stair total height - * @default 1 - * @minimum 0.7 - * @maximum Infinity - * @step 0.1 - */ stairTotalHeight: number; - /** Create stairs - * @default false - */ createStair: boolean; - /** - * Flips the direction - outside things become inside and vice versa - * @default false - */ flipDirection: boolean; - /** - * Rotation of the entrance - * @default 0 - * @minimum 0 - * @maximum Infinity - * @step 15 - */ rotation: number; - /** - * Origin of the stairs - * @default [0, 0, 0] - */ origin: Inputs.Base.Point3; - } declare class CornerEntrancePart { + } + declare class CornerEntrancePart { id?: string; name?: string; panelThickness?: number; @@ -19218,109 +7170,30 @@ declare namespace Bit { panelExterior?: T; panelInterior?: T; }; - } declare class CornerPart { - /** - * Unique id of the corner part - */ + } + declare class CornerPart { id?: string; - /** - * Name of the corner part - */ name?: string; - /** - * Width of the panel - */ widthPanel?: number; - /** - * Height of the panel - */ heightPanel?: number; - /** - * Thickness of the panel - */ thicknessPanel?: number; - /** - * Corner shapes - */ shapes?: { corner?: T; }; - } declare class CornerStairDto { - /** - * Inverts the side of the stair from going out to going inside of the L shape. This kind of stair can produce self intersecting result. - * @default false - */ + } + declare class CornerStairDto { invert: boolean; - /** - * Width first wing - * @default 1 - * @minimum 0.1 - * @maximum Infinity - * @step 0.1 - */ widthFirstLanding: number; - /** - * Width second wing - * @default 1 - * @minimum 0.1 - * @maximum Infinity - * @step 0.1 - */ widthSecondLanding: number; - /** - * Length first wing - * @default 2 - * @minimum 0.1 - * @maximum Infinity - * @step 0.1 - */ lengthFirstWing: number; - /** - * Length second wing - * @default 1 - * @minimum 0.1 - * @maximum Infinity - * @step 0.1 - */ lengthSecondWing: number; - /** - * Max wished step height - * @default 0.25 - * @minimum 0.01 - * @maximum Infinity - * @step 0.05 - */ maxWishedStepHeight: number; - /** - * Max wished step height - * @default 0.25 - * @minimum 0.01 - * @maximum Infinity - * @step 0.05 - */ stepHeightWidthProportion: number; - /** - * Total height of the corner stairs - * @default 1 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ totalHeight: number; - /** - * Rotation of the stairs - * @default 0 - * @minimum 0 - * @maximum Infinity - * @step 15 - */ rotation: number; - /** - * Origin of the stairs - * @default [0, 0, 0] - */ origin: Inputs.Base.Point3; - } declare class CornerStairPart extends CornerStairDto { + } + declare class CornerStairPart extends CornerStairDto { id?: string; name?: string; steps?: number; @@ -19329,7 +7202,8 @@ declare namespace Bit { shapes?: { stair?: T; }; - } declare class FloorPart { + } + declare class FloorPart { id?: string; name?: string; area?: number; @@ -19338,141 +7212,43 @@ declare namespace Bit { shapes?: { compound?: T; }; - } declare class ZenHideoutData { - /** - * Type of the object being configured - */ + } + declare class ZenHideoutData { type: string; - /** - * Default name of the object - */ name: string; - /** - * Original inputs - */ originalInputs?: ZenHideoutDto; - /** - * Compounded shape representation of all of the geometric objects of the building - */ compound?: T; - /** - * All the shapes of the building - */ shapes?: Models.OCCT.ShapeWithId[]; - /** - * Representation of zen hideout parts that are useful for drawing the object efficiently - */ drawingPart?: ZenHideoutDrawingPart; - /** - * Sandwitch parts that have inner and outer panels, can have windows and doors - */ sandwitchPartsBetweenColumns?: Things.Architecture.SandwitchPart[]; - /** - * Corner part panels forming 90 degree angle - */ cornerParts?: Things.Architecture.CornerPart[]; - /** - * Column parts of the building - */ columnParts?: Things.Architecture.ColumnPart[]; - /** - * Roof parts of the building. Contain all the upper geometry, together with beams and columns. - */ roofParts?: Things.Architecture.RoofPart[]; - /** - * Entrance corner part of the building, containing interior and exterior panels, staircase, and a corner window part - */ entranceCorner?: Things.Architecture.CornerEntrancePart; - /** - * Terrace corner of the building, containing interior and exterior panels, staircase, and a corner window part - */ entranceTerrace?: Things.Architecture.CornerEntrancePart; - /** - * Floor parts of the building - */ floors?: Things.Architecture.FloorPart[]; - /** - * Ceiling parts of the building - */ ceilings?: Things.Architecture.CeilingPart[]; - }/** - * This defines useful compounded objects for representing zen hideout in optimal and fast way. - */ + } declare class ZenHideoutDrawingPartShapes { - /** - * The representation of all window glass objects in the building - */ windowGlassCompound?: T; - /** - * The representation of all glass frame objects in the building - */ glassFramesCompound?: T; - /** - * The representation of all window frame objects in the building - */ windowFrameCompound?: T; - /** - * The representation of all beam objects in the building - */ beamsCompound?: T; - /** - * The representation of all column objects in the building - */ columnsCompound?: T; - /** - * The representation of all exterior panels on the first floor - * of the building - */ firstFloorExteriorPanelsCompound?: T; - /** - * The representation of all interior panels on the first floor - * of the building - */ firstFloorInteriorPanelsCompound?: T; - /** - * The representation of all exterior panels on the roof - * of the building - */ roofExteriorPanelsCompound?: T; - /** - * The representation of all interior panels on the roof - * of the building - */ roofInteriorPanelsCompound?: T; - /** - * The representation of the first roof cover - * of the building - */ roofCoverFirstCompound?: T; - /** - * The representation of the second roof cover - * of the building - */ roofCoverSecondCompound?: T; - /** - * The representation of the floor - * of the building - */ floorCompound?: T; - /** - * The representation of the ceiling - * of the building - */ ceilingCompound?: T; - /** - * The representation of stairs - */ stairsCompound?: T; - }/** - * Information needed to draw the part in an optimal way - */ + } declare class ZenHideoutDrawingPart { - /** - * Shapes that exist in the drawing part, T can represent opancascade geometry, - * babylonjs mesh, materials or other things that map to these drawing categories. - */ shapes?: ZenHideoutDrawingPartShapes; - } declare class ZenHideoutDtoBase { + } + declare class ZenHideoutDtoBase { widthFirstWing: T; lengthFirstWing: T; terraceWidth: T; @@ -19502,232 +7278,41 @@ declare namespace Bit { lod: U; rotation?: T; origin?: V; - } declare class ZenHideoutDto implements ZenHideoutDtoBase { + } + declare class ZenHideoutDto implements ZenHideoutDtoBase { constructor(widthFirstWing?: number, lengthFirstWing?: number, terraceWidth?: number, widthSecondWing?: number, lengthSecondWing?: number, heightWalls?: number, roofAngleFirstWing?: number, roofAngleSecondWing?: number, roofOffset?: number, roofInsideOverhang?: number, roofMaxDistAttachmentBeams?: number, roofAttachmentBeamWidth?: number, roofAttachmentBeamHeight?: number, roofOutsideOverhang?: number, columnSize?: number, ceilingBeamHeight?: number, ceilingBeamWidth?: number, nrCeilingBeamsBetweenColumns?: number, distBetweenColumns?: number, floorHeight?: number, groundLevel?: number, facadePanelThickness?: number, windowWidthOffset?: number, windowHeightOffset?: number, windowFrameThickness?: number, windowGlassFrameThickness?: number, lod?: Things.Enums.lodEnum, skinOpacity?: number, rotation?: number, origin?: Inputs.Base.Point3); - /** - * Width of the first wing of L shaped building - * @default 4 - * @minimum 3 - * @maximum Infinity - * @step 0.5 - */ widthFirstWing: number; - /** - * Length of the first wing of L shaped building - * @default 10 - * @minimum 3 - * @maximum Infinity - * @step 0.5 - */ lengthFirstWing: number; - /** - * Width of the terrace - * @default 3 - * @minimum 1 - * @maximum Infinity - * @step 0.25 - */ terraceWidth: number; - /** - * Width of the second wing of L shaped building - * @default 5 - * @minimum 3 - * @maximum Infinity - * @step 0.5 - */ widthSecondWing: number; - /** - * Length of the second wing of L shaped building - * @default 10 - * @minimum 3 - * @maximum Infinity - * @step 0.5 - */ lengthSecondWing: number; - /** - * Height of the walls - * @default 3 - * @minimum 3 - * @maximum Infinity - * @step 0.1 - */ heightWalls: number; - /** - * Height of the first wing end - * @default 15 - * @minimum 5 - * @maximum Infinity - * @step 5 - */ roofAngleFirstWing: number; - /** - * Height of the first wing end - * @default 25 - * @minimum 5 - * @maximum Infinity - * @step 5 - */ roofAngleSecondWing: number; - /** - * The offset to be applied to where the roof starts - * @default 0.5 - * @minimum 0.2 - * @maximum Infinity - * @step 0.25 - */ roofOffset: number; - /** - * Roof overhang on the inside of the building (where the terrace is) - * @default 0.5 - * @minimum 0 - * @maximum Infinity - * @step 0.25 - */ roofInsideOverhang: number; - /** - * Roof max distance between top attachment beams - * @default 0.8 - * @minimum 0.1 - * @maximum Infinity - * @step 0.25 - */ roofMaxDistAttachmentBeams: number; - /** - * Roof attachment beam width - * @default 0.2 - * @minimum 0.01 - * @maximum Infinity - * @step 0.05 - */ roofAttachmentBeamWidth: number; - /** - * Roof attachment beam height - * @default 0.05 - * @minimum 0.01 - * @maximum Infinity - * @step 0.05 - */ roofAttachmentBeamHeight: number; - /** - * Roof overhang on the inside of the building - * @default 0.5 - * @minimum 0 - * @maximum Infinity - * @step 0.25 - */ roofOutsideOverhang: number; - /** - * Column size - * @default 0.3 - * @minimum 0.01 - * @maximum Infinity - * @step 0.1 - */ columnSize: number; - /** Ceiling beam height - * @default 0.25 - * @minimum 0.01 - * @maximum Infinity - * @step 0.05 - */ ceilingBeamHeight: number; - /** Ceiling beam width - * @default 0.1 - * @minimum 0.01 - * @maximum Infinity - * @step 0.05 - */ ceilingBeamWidth: number; - /** Nr ceiling beams between columns - * @default 3 - * @minimum 1 - * @maximum Infinity - * @step 1 - */ nrCeilingBeamsBetweenColumns: number; - /** Distance between columns - * @default 2 - * @minimum 0.5 - * @maximum Infinity - * @step 0.25 - */ distBetweenColumns: number; - /** The height of the floor - * @default 0.1 - * @minimum 0.1 - * @maximum Infinity - * @step 0.1 - */ floorHeight: number; - /** ground level from the floor - * @default 0.6 - * @minimum 0.1 - * @maximum Infinity - * @step 0.1 - */ groundLevel: number; - /** Facade panel thickness - * @default 0.05 - * @minimum 0.01 - * @maximum Infinity - * @step 0.01 - */ facadePanelThickness: number; - /** Window width parameter - * @default 0.1 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ windowWidthOffset: number; - /** Window bottom offset - * @default 0.2 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ windowHeightOffset: number; - /** Window frame thickness - * @default 0.1 - * @minimum 0.01 - * @maximum Infinity - * @step 0.01 - */ windowFrameThickness: number; - /** Window glass frame thickness - * @default 0.05 - * @minimum 0.01 - * @maximum Infinity - * @step 0.01 - */ windowGlassFrameThickness: number; - /** - * Level of detail to compute - * @default high - */ lod: Things.Enums.lodEnum; - /** - * The opacity of the skin - only applied if lod is set to high - * @default 1 - * @minimum 0 - * @maximum 1 - * @step 0.1 - */ skinOpacity: number; - /** - * Rotation of the zen hideout - * @default 0 - * @minimum 0 - * @maximum Infinity - * @step 10 - */ rotation: number; - /** - * Origin of the zen hideout - * @default [0, 0, 0] - */ origin: Inputs.Base.Point3; - } declare class RoofBeamsPart { + } + declare class RoofBeamsPart { beamsCeiling?: BeamPart[]; beamsVerticalHigh?: BeamPart[]; beamsVerticalLow?: BeamPart[]; @@ -19736,105 +7321,29 @@ declare namespace Bit { shapes?: { compound?: T; }; - } declare class RoofCoverOneSidedDto { - /** - * Roof cover name - * @default roof-cover - */ + } + declare class RoofCoverOneSidedDto { name: string; - /** - * Roof angle - * @default 15 - * @minimum 0 - * @maximum Infinity - * @step 5 - */ roofAngle: number; - /** - * Roof length - * @default 3 - * @minimum 0.1 - * @maximum Infinity - * @step 0.1 - */ roofLength: number; - /** - * Roof width along the angle part, total width contains roof inside and outside overhangs - * @default 3 - * @minimum 0.01 - * @maximum Infinity - * @step 0.1 - */ roofWidth: number; - /** - * Roof outside overhang - * @default 0.5 - * @minimum 0.1 - * @maximum Infinity - * @step 0.1 - */ roofOutsideOverhang: number; - /** - * Roof inside overhang - * @default 1 - * @minimum 0.1 - * @maximum Infinity - * @step 0.1 - */ roofInsideOverhang: number; - /** - * Roof overhang facade - * @default 0.1 - * @minimum 0.01 - * @maximum Infinity - * @step 0.1 - */ roofOverhangFacade: number; - /** - * Roof thickness - * @default 0.05 - * @minimum 0.001 - * @maximum Infinity - * @step 0.01 - */ roofThickness: number; - /** - * Roof cover height - * @default 0.3 - * @minimum 0.01 - * @maximum Infinity - * @step 0.1 - */ roofCoverHeight: number; - /** - * Rotation of the window - * @default 0 - * @minimum 0 - * @maximum Infinity - * @step 15 - */ rotation: number; - /** - * Level of detail - * @default high - */ lod: Things.Enums.lodEnum; - /** - * Origin of the stairs - * @default [0, 0, 0] - */ center: Inputs.Base.Point3; - /** - * Direction of the window - * @default [0, 1, 0] - */ direction: Inputs.Base.Vector3; - } declare class RoofCoverPart extends RoofCoverOneSidedDto { + } + declare class RoofCoverPart extends RoofCoverOneSidedDto { id?: string; shapes?: { compound?: T; }; - } declare class RoofPanelPart { + } + declare class RoofPanelPart { id?: string; name?: string; innerPanels?: SandwitchPart[]; @@ -19855,7 +7364,8 @@ declare namespace Bit { compoundEndsExteriorPanels?: T; compound?: T; }; - } declare class RoofPart { + } + declare class RoofPart { id?: string; name?: string; beams: RoofBeamsPart; @@ -19864,159 +7374,37 @@ declare namespace Bit { shapes?: { compound?: T; }; - } declare class SandwitchPanelDto { - /** Name of the sandwitch panel - * @default sandwitch-panel - */ + } + declare class SandwitchPanelDto { name: string; - /** Indicates wether a window should be created - * @default true - */ createWindow: boolean; - /** Indicates wether the inner panel should be created - * @default true - */ createInnerPanel: boolean; - /** Indicates wether the exterior panel should be created - * @default true - */ createExteriorPanel: boolean; - /** Wall thickness - * @default 0.3 - * @minimum 0.01 - * @maximum Infinity - * @step 0.05 - */ wallWidth: number; - /** Exterior panel width - * @default 0.4 - * @minimum 0.01 - * @maximum Infinity - * @step 0.05 - */ exteriorPanelWidth: number; - /** Exterior panel height - * @default 3 - * @minimum 0.01 - * @maximum Infinity - * @step 0.1 - */ exteriorPanelHeight: number; - /** Exterior panel thickness - * @default 0.05 - * @minimum 0.01 - * @maximum Infinity - * @step 0.1 - */ exteriorPanelThickness: number; - /** Exterior panel bottom offset - * @default 0 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ exteriorPanelBottomOffset: number; - /** Interior panel width - * @default 0.4 - * @minimum 0.01 - * @maximum Infinity - * @step 0.05 - */ interiorPanelWidth: number; - /** Interior panel height - * @default 3 - * @minimum 0.01 - * @maximum Infinity - * @step 0.1 - */ interiorPanelHeight: number; - /** Interior panel thickness - * @default 0.05 - * @minimum 0.01 - * @maximum Infinity - * @step 0.1 - */ interiorPanelThickness: number; - /** Interior panel bottom offset - * @default 0 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ interiorPanelBottomOffset: number; - /** Window width parameter - * @default 0.1 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ windowWidthOffset: number; - /** Window bottom offset - * @default 0.2 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ windowHeightOffset: number; - /** Window frame thickness - * @default 0.1 - * @minimum 0.01 - * @maximum Infinity - * @step 0.01 - */ windowFrameThickness: number; - /** Window glass frame thickness - * @default 0.05 - * @minimum 0.01 - * @maximum Infinity - * @step 0.01 - */ windowGlassFrameThickness: number; - } declare class SandwitchPanelFlexDto { - /** Name of the sandwitch panel - * @default sandwitch-panel - */ + } + declare class SandwitchPanelFlexDto { name: string; - /** Indicates wether a window should be created - * @default true - */ createInteriorPanel: boolean; - /** Indicates wether the exterior panel should be created - * @default true - */ createExteriorPanel: boolean; - /** Wall thickness - * @default 0.3 - * @minimum 0.01 - * @maximum Infinity - * @step 0.05 - */ wallWidth: number; - /** Exterior panel thickness - * @default 0.05 - * @minimum 0.01 - * @maximum Infinity - * @step 0.1 - */ exteriorPanelThickness: number; - /** Interior panel thickness - * @default 0.05 - * @minimum 0.01 - * @maximum Infinity - * @step 0.1 - */ interiorPanelThickness: number; - /** - * Interior wall panel polygon points - * @default [] - */ interiorPanelPolygonPoints: Inputs.Base.Point2[]; - /** - * Exterior wall panel polygon points - * @default [] - */ exteriorPanelPolygonPoints: Inputs.Base.Point2[]; - } declare class SandwitchPart extends SandwitchPanelDto { + } + declare class SandwitchPart extends SandwitchPanelDto { id?: string; rotation?: number; center?: Inputs.Base.Point3; @@ -20039,184 +7427,45 @@ declare namespace Bit { panelInterior?: T; compound?: T; }; - } declare class WindowCornerDto { - /** Wall thickness - * @default 0.4 - * @minimum 0.01 - * @maximum Infinity - * @step 0.05 - */ + } + declare class WindowCornerDto { wallThickness: number; - /** Facade panel thickness - * @default 0.05 - * @minimum 0.01 - * @maximum Infinity - * @step 0.05 - */ facadePanelThickness: number; - /** Glass frame thickness - * @default 0.02 - * @minimum 0.01 - * @maximum Infinity - * @step 0.01 - */ glassFrameThickness: number; - /** Glass thickness - * @default 0.005 - * @minimum 0.001 - * @maximum Infinity - * @step 0.001 - */ glassThickness: number; - /** Frame thickness - * @default 0.05 - * @minimum 0.01 - * @maximum Infinity - * @step 0.01 - */ frameThckness: number; - /** Window height - * @default 0.05 - * @minimum 0.01 - * @maximum Infinity - * @step 0.01 - */ height: number; - /** Length first window - * @default 1 - * @minimum 0.01 - * @maximum Infinity - * @step 0.1 - */ lengthFirst: number; - /** Length second window - * @default 1 - * @minimum 0.01 - * @maximum Infinity - * @step 0.1 - */ lengthSecond: number; - /** - * Rotation of the window - * @default 0 - * @minimum 0 - * @maximum Infinity - * @step 15 - */ rotation: number; - /** - * Origin of the stairs - * @default [0, 0, 0] - */ origin: Inputs.Base.Point3; - } declare class WindowPartShapes { - /** - * Cutout of the window - this can be used to make the hole in the wall and usually should not be visualised - */ + } + declare class WindowPartShapes { cutout?: T; - /** - * Shape of the glass of the window - */ glass?: T; - /** - * Glass frame of the window - */ glassFrame?: T; - /** - * Frame of the window that usually is as thick as the wall and that touches glass frame - */ frame?: T; - /** - * Compounded shape of the window with all other shapes joined together - */ compound?: T; - } declare class WindowRectangularPart extends WindowRectangularDto { - /** - * The name of the window part - */ + } + declare class WindowRectangularPart extends WindowRectangularDto { name: string; - /** - * The unique id of the window part - */ id?: string; - /** - * Generic shapes that represent the window part - */ shapes?: WindowPartShapes; } declare class WindowCornerPart extends WindowCornerDto { - /** - * The name of the window part - */ name: string; - /** - * The unique id of the window part - */ id?: string; - /** - * Generic shapes that represent the window part - */ shapes?: WindowPartShapes; - } declare class WindowRectangularDto { - /** Window thickness - * @default 0.3 - * @minimum 0.01 - * @maximum Infinity - * @step 0.05 - */ + } + declare class WindowRectangularDto { thickness: number; - /** Glass frame thickness - * @default 0.02 - * @minimum 0.01 - * @maximum Infinity - * @step 0.01 - */ glassFrameThickness: number; - /** Glass thickness - * @default 0.005 - * @minimum 0.001 - * @maximum Infinity - * @step 0.001 - */ glassThickness: number; - /** Frame thickness - * @default 0.05 - * @minimum 0.01 - * @maximum Infinity - * @step 0.01 - */ frameThickness: number; - /** Window height - * @default 0.05 - * @minimum 0.01 - * @maximum Infinity - * @step 0.01 - */ height: number; - /** Width first window - * @default 1 - * @minimum 0.01 - * @maximum Infinity - * @step 0.1 - */ width: number; - /** - * Rotation of the window - * @default 0 - * @minimum 0 - * @maximum Infinity - * @step 15 - */ rotation: number; - /** - * Origin of the stairs - * @default [0, 0, 0] - */ center: Inputs.Base.Point3; - /** - * Direction of the window - * @default [0, 1, 0] - */ direction: Inputs.Base.Vector3; } } @@ -20248,108 +7497,21 @@ declare namespace Bit { kind: string; point: Inputs.Base.Point3; }[]; - } declare class WingtipVillaDto { + } + declare class WingtipVillaDto { constructor(interiorWidth?: number, interiorLength?: number, interiorHeight?: number, thickness?: number, holeDiameter?: number, holeDistToBottom?: number, stickLength?: number, stickDiameter?: number, baseAttachmentHeight?: number, roofOverhang?: number, rotation?: number, chimneyHeight?: number, origin?: Inputs.Base.Point3); - /** - * Width of the house - * @default 3 - * @minimum 0 - * @maximum Infinity - * @step 0.5 - */ interiorWidth: number; - /** - * Interior length of the house - * @default 3 - * @minimum 0 - * @maximum Infinity - * @step 0.5 - */ interiorLength: number; - /** - * Interior height that goes from the floor to where the roof starts - * @default 5 - * @minimum 0 - * @maximum Infinity - * @step 0.5 - */ interiorHeight: number; - /** - * thickness of the house - * @default 0.5 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ thickness: number; - /** - * hole diameter of the house - * @default 1.5 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ holeDiameter: number; - /** - * hole distance to the bottom of the house - * @default 2.5 - * @minimum 0 - * @maximum Infinity - * @step 0.5 - */ holeDistToBottom: number; - /** - * stick length - * @default 1.2 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ stickLength: number; - /** - * stick diameter - * @default 0.5 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ stickDiameter: number; - /** - * base attachment height - * @default 2 - * @minimum 0 - * @maximum Infinity - * @step 0.5 - */ baseAttachmentHeight: number; - /** - * roof overhang - * @default 1 - * @minimum 0 - * @maximum Infinity - * @step 0.5 - */ roofOverhang: number; - /** - * Rotation of the bird house around the origin. - * @default 0 - * @minimum 0 - * @maximum Infinity - * @step 10 - */ rotation: number; - /** - * Chimney height - * @default 1 - * @minimum 0 - * @maximum Infinity - * @step 0.5 - */ chimneyHeight: number; - /** - * Origin of the bird house (where the bird house would be attached to the tree or the wall) - * @default [0, 0, 0] - */ origin: Inputs.Base.Point3; } } @@ -20376,114 +7538,26 @@ declare namespace Bit { kind: string; point: Inputs.Base.Point3; }[]; - } declare class ChirpyChaletDto { + } + declare class ChirpyChaletDto { constructor(interiorWidth?: number, interiorLength?: number, interiorHeight?: number, thickness?: number, holeDiameter?: number, holeDistToBottom?: number, stickLength?: number, stickDiameter?: number, baseAttachmentHeight?: number, roofOverhang?: number, roofAngle?: number, rotation?: number, origin?: Inputs.Base.Point3); - /** - * Width of the house - * @default 3 - * @minimum 0 - * @maximum Infinity - * @step 0.5 - */ interiorWidth: number; - /** - * Interior length of the house - * @default 3 - * @minimum 0 - * @maximum Infinity - * @step 0.5 - */ interiorLength: number; - /** - * Interior height that goes from the floor to where the roof starts - * @default 5 - * @minimum 0 - * @maximum Infinity - * @step 0.5 - */ interiorHeight: number; - /** - * thickness of the house - * @default 0.3 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ thickness: number; - /** - * hole diameter of the house - * @default 1.2 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ holeDiameter: number; - /** - * hole distance to the bottom of the house - * @default 2.5 - * @minimum 0 - * @maximum Infinity - * @step 0.5 - */ holeDistToBottom: number; - /** - * stick length - * @default 0.9 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ stickLength: number; - /** - * stick diameter - * @default 0.3 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ stickDiameter: number; - /** - * base attachment height - * @default 2 - * @minimum 0 - * @maximum Infinity - * @step 0.5 - */ baseAttachmentHeight: number; - /** - * roof overhang - * @default 0.5 - * @minimum 0 - * @maximum Infinity - * @step 0.5 - */ roofOverhang: number; - /** - * roof overhang - * @default 20 - * @minimum 0 - * @maximum 80 - * @step 5 - */ roofAngle: number; - /** - * Rotation of the bird house around the origin. - * @default 0 - * @minimum 0 - * @maximum Infinity - * @step 10 - */ rotation: number; - /** - * Origin of the bird house (where the bird house would be attached to the tree or the wall) - * @default [0, 0, 0] - */ origin: Inputs.Base.Point3; } } } } - declare namespace ThreeDPrinting { declare namespace Vases { declare namespace SerenitySwirl { @@ -20491,134 +7565,41 @@ declare namespace Bit { type: string; name: string; compound?: T; - } declare class SerenitySwirlDto { + } + declare class SerenitySwirlDto { constructor(swirl?: number, nrOfDivisions?: number, addRadiusNarrow?: number, addRadiusWide?: number, addMiddleHeight?: number, addTopHeight?: number, thickness?: number, rotation?: number, origin?: Inputs.Base.Point3); - /** - * Swirl 0 - no swirl 1 max swirl - * @default 0.6 - * @minimum 0 - * @maximum 1 - * @step 0.1 - */ swirl: number; - /** - * Nr of divisions - * @default 10 - * @minimum 1 - * @maximum Infinity - * @step 1 - */ nrOfDivisions: number; - /** - * Add to narrow radius - * @default 0.4 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ addRadiusNarrow: number; - /** - * Add to radius wide - * @default 0.2 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ addRadiusWide: number; - /** - * Add to middle height - * @default 1.6 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ addMiddleHeight: number; - /** - * Add to top height - * @default 1.5 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ addTopHeight: number; - /** - * Thickness of the vase on the widest part - * @default 1 - * @minimum 0 - * @maximum 1 - * @step 0.1 - */ thickness: number; - /** - * Rotation of the serenity swirl - * @default 0 - * @minimum 0 - * @maximum Infinity - * @step 10 - */ rotation: number; - /** - * Origin of the vase - * @default [0, 0, 0] - */ origin: Inputs.Base.Point3; } } declare namespace ArabicArchway { declare class ArabicArchwayData { - /** - * Type of the object being configured - */ type: string; - /** - * Default name of the object - */ name: string; - /** - * Compound shape of all the parts - */ compound?: T; - /** - * Original inputs - */ originalInputs: ArabicArchwayDto; - /** - * All the shapes of the vase - */ shapes?: Models.OCCT.ShapeWithId[]; - /** - * Representation of arabic archway parts that are useful for drawing the object efficiently - */ drawingPart?: ArabicArchwayDrawingPart; - } declare class ArabicArchwayDrawingPartShapes { - /** - * The representation of all objects in the vase - */ + } + declare class ArabicArchwayDrawingPartShapes { compound?: T; - /** - * The representation of all vase part objects in the vase - */ vasePartsCompound?: T; - /** - * The representation of all glass objects in the vase - */ glassPartsCompound?: T; - /** - * The representation of the base of the vase - */ vaseBaseCompound?: T; - }/** - * Information needed to draw the part in an optimal way - */ + } declare class ArabicArchwayDrawingPart { - /** - * Shapes that exist in the drawing part, T can represent opancascade geometry, - * babylonjs mesh, materials or other things that map to these drawing categories. - */ shapes?: ArabicArchwayDrawingPartShapes | { [x: string]: T; }; - } declare class ArabicArchwayDtoBase { + } + declare class ArabicArchwayDtoBase { profilePoints?: P; nrOfSides: T; nrOfVerticalArches: T; @@ -20632,93 +7613,21 @@ declare namespace Bit { direction?: V; scale?: V; origin?: V; - } declare class ArabicArchwayDto implements ArabicArchwayDtoBase { + } + declare class ArabicArchwayDto implements ArabicArchwayDtoBase { constructor(nrOfSides?: number, nrOfVerticalArches?: number, archCenterThickness?: number, edgesThickness?: number, thickness?: number, baseHeight?: number, patchHoles?: boolean, lod?: Things.Enums.lodEnum, rotation?: number, origin?: Inputs.Base.Point3, direction?: Inputs.Base.Point3, scale?: Inputs.Base.Vector3); - /** - * nr of sides for arabic archway vase - * @default [[2, 0, 0],[4, 5, 0],[1.5, 10, 0],[2, 14, 0]] - */ profilePoints: Inputs.Base.Point3[]; - /** - * nr of sides for arabic archway vase - * @default 3 - * @minimum 3 - * @maximum 30 - * @step 1 - */ nrOfSides: number; - /** - * nr of vertical arches - * @default 6 - * @minimum 2 - * @maximum 30 - * @step 1 - */ nrOfVerticalArches: number; - /** - * Arch center thickness - * @default 0.8 - * @minimum 0 - * @maximum 10 - * @step 0.1 - */ archCenterThickness: number; - /** - * Edges thickness - * @default 0.2 - * @minimum 0 - * @maximum 10 - * @step 0.1 - */ edgesThickness: number; - /** - * Thickness of the vase on the widest part - * @default 1 - * @minimum 0 - * @maximum 1 - * @step 0.1 - */ thickness: number; - /** - * Indicates how high the base should be, if 0 then no base will be made - * @default 0.4 - * @minimum 0 - * @maximum 10 - * @step 0.1 - */ baseHeight: number; - /** - * Indicates whether holes of the vase should be patched - * @default true - */ patchHoles: boolean; - /** - * Level of details for the model - * @default high - */ lod: Things.Enums.lodEnum; - /** - * Rotation of the serenity swirl - * @default 0 - * @minimum 0 - * @maximum Infinity - * @step 10 - */ rotation: number; - /** - * Origin of the vase - * @default [0, 0, 0] - */ origin: Inputs.Base.Point3; - /** - * Direction of the vase - * @default [0, 1, 0] - */ direction: Inputs.Base.Point3; - /** - * Scale of the vase - * @default [1, 1, 1] - */ scale: Inputs.Base.Vector3; } } @@ -20730,7 +7639,8 @@ declare namespace Bit { name: string; originalInputs: CalmCupDto; compound?: T; - } declare class CalmCupDtoBase { + } + declare class CalmCupDtoBase { height: T; radiusBottom: T; radiusTopOffset: T; @@ -20743,97 +7653,20 @@ declare namespace Bit { scale?: T; origin?: U; direction?: U; - } declare class CalmCupDto implements CalmCupDtoBase { + } + declare class CalmCupDto implements CalmCupDtoBase { constructor(height?: number, radiusBottom?: number, radiusTopOffset?: number, thickness?: number, fillet?: number, nrOfHandles?: number, handleDist?: number, precision?: number, rotation?: number, scale?: number, origin?: Inputs.Base.Point3, direction?: Inputs.Base.Vector3); - /** - * Height of the cup - * @default 6 - * @minimum 0.1 - * @maximum Infinity - * @step 0.1 - */ height: number; - /** - * Radius top offset - * @default 4 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ radiusBottom: number; - /** - * Radius top offset - * @default 2 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ radiusTopOffset: number; - /** - * Thickness of the cup - * @default 0.6 - * @minimum 0.05 - * @maximum 3 - * @step 0.01 - */ thickness: number; - /** - * Fillet of the cup - * @default 0.2 - * @minimum 0.01 - * @maximum Infinity - * @step 0.01 - */ fillet: number; - /** - * Nr of handles, 0 will create a cup without handles - * @default 1 - * @minimum 0 - * @maximum 2 - * @step 1 - */ nrOfHandles: number; - /** - * Handle distance from the cup - * @default 2 - * @minimum 0.1 - * @maximum Infinity - * @step 0.1 - */ handleDist: number; - /** - * Meshing precision of the drawn model. Scale scales precision as well. The lower the number the more precise the drawn model is. Keep in mind that output of this algorithm also contains pure occt shape that can be meshed separately in draw any async commands - * @default 0.01 - * @minimum 0.000001 - * @maximum 5 - * @step 0.001 - */ precision: number; - /** - * Rotation of the cup - * @default 0 - * @minimum 0 - * @maximum Infinity - * @step 10 - */ rotation: number; - /** - * Scale of the cup - affects edge width and precision - * @default 1 - * @minimum 0 - * @maximum Infinity - * @step 10 - */ scale: number; - /** - * Origin of the medal - * @default [0, 0, 0] - */ origin: Inputs.Base.Point3; - /** - * Direction of the model - * @default [0, 1, 0] - */ direction: Inputs.Base.Vector3; } } @@ -20843,7 +7676,8 @@ declare namespace Bit { name: string; originalInputs: DragonCupDto; compound?: T; - } declare class DragonCupDtoBase { + } + declare class DragonCupDtoBase { height: T; radiusBottom: T; radiusTopOffset: T; @@ -20865,175 +7699,32 @@ declare namespace Bit { scale?: T; origin?: U; direction?: U; - } declare class DragonCupDto implements DragonCupDtoBase { + } + declare class DragonCupDto implements DragonCupDtoBase { constructor(height?: number, radiusBottom?: number, radiusTopOffset?: number, radiusMidOffset?: number, rotationTopAngle?: number, rotationMidAngle?: number, nrSkinCellsVertical?: number, nrSkinCellsHorizontal?: number, nrSkinCellDivisionsTop?: number, nrSkinCellDivisionsBottom?: number, skinCellOuterHeight?: number, skinCellInnerHeight?: number, skinCellBottomHeight?: number, skinCellTopHeight?: number, thickness?: number, bottomThickness?: number, precision?: number, rotation?: number, scale?: number, origin?: Inputs.Base.Point3, direction?: Inputs.Base.Vector3); - /** - * Height of the cup - * @default 6 - * @minimum 0.1 - * @maximum Infinity - * @step 0.1 - */ height: number; - /** - * Radius top offset - * @default 4 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ radiusBottom: number; - /** - * Radius top offset - * @default 2 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ radiusTopOffset: number; - /** - * Radius middle offset - * @default 2 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ radiusMidOffset: number; - /** - * Rotation of the top from the middle (angle in degrees) - * @default 20 - * @minimum -90 - * @maximum 90 - * @step 1 - */ rotationTopAngle: number; - /** - * Rotation of the middle from the bottom (angle in degrees) - * @default 20 - * @minimum -90 - * @maximum 90 - * @step 1 - */ rotationMidAngle: number; - /** - * Nr of skin cells along vertical direction - * @default 5 - * @minimum 1 - * @maximum Infinity - * @step 1 - */ nrSkinCellsVertical: number; - /** - * Nr of skin cells along horizontal direction - * @default 10 - * @minimum 3 - * @maximum Infinity - * @step 1 - */ nrSkinCellsHorizontal: number; - /** - * Nr of skin cell divisions on the top of the cup - * @default 1 - * @minimum 1 - * @maximum Infinity - * @step 1 - */ nrSkinCellDivisionsTop: number; - /** - * Nr of skin cell divisions on the bottom of the cup - * @default 3 - * @minimum 1 - * @maximum Infinity - * @step 1 - */ nrSkinCellDivisionsBottom: number; - /** - * skin cell outer height - * @default 0.4 - * @minimum -Infinity - * @maximum Infinity - * @step 0.01 - */ skinCellOuterHeight: number; - /** - * skin cell inner height - * @default 0.3 - * @minimum -Infinity - * @maximum Infinity - * @step 0.01 - */ skinCellInnerHeight: number; - /** - * skin cell bottom height - * @default 0.4 - * @minimum -Infinity - * @maximum Infinity - * @step 0.01 - */ skinCellBottomHeight: number; - /** - * skin cell top height - * @default 0.4 - * @minimum -Infinity - * @maximum Infinity - * @step 0.01 - */ skinCellTopHeight: number; - /** - * Thickness of the cup - * @default 0.6 - * @minimum 0.05 - * @maximum Infinity - * @step 0.01 - */ thickness: number; - /** - * Bottom thickness of the cup - * @default 1 - * @minimum 0.05 - * @maximum Infinity - * @step 0.01 - */ bottomThickness: number; - /** - * Meshing precision of the drawn model. Scale scales precision as well. The lower the number the more precise the drawn model is. Keep in mind that output of this algorithm also contains pure occt shape that can be meshed separately in draw any async commands - * @default 0.01 - * @minimum 0.000001 - * @maximum 5 - * @step 0.001 - */ precision: number; - /** - * Rotation of the cup - * @default 0 - * @minimum 0 - * @maximum Infinity - * @step 10 - */ rotation: number; - /** - * Scale of the cup - affects edge width and precision - * @default 1 - * @minimum 0 - * @maximum Infinity - * @step 10 - */ scale: number; - /** - * Origin of the medal - * @default [0, 0, 0] - */ origin: Inputs.Base.Point3; - /** - * Direction of the model - * @default [0, 1, 0] - */ direction: Inputs.Base.Vector3; - } declare class DragonCupModelDto { - /** - * The model that represents result of the dragon cup - * @default undefined - */ + } + declare class DragonCupModelDto { model: DragonCupData; } } @@ -21045,7 +7736,8 @@ declare namespace Bit { name: string; originalInputs: SpicyBoxDto; compound?: T; - } declare class SpicyBoxDtoBase { + } + declare class SpicyBoxDtoBase { textTop: V; textFront: V; height: T; @@ -21065,150 +7757,30 @@ declare namespace Bit { scale?: T; origin?: U; direction?: U; - } declare class SpicyBoxDto implements SpicyBoxDtoBase { + } + declare class SpicyBoxDto implements SpicyBoxDtoBase { constructor(textTop?: string, textFront?: string, nrSides?: number, nrOffsets?: number, height?: number, coverHeight?: number, baseHeight?: number, radiusBottom?: number, radiusTopOffset?: number, thickness?: number, ornamentalThickness?: number, nrOrnamnetsPerSide?: number, invertOrnaments?: boolean, fillet?: number, precision?: number, rotation?: number, scale?: number, origin?: Inputs.Base.Point3, direction?: Inputs.Base.Vector3); - /** - * Text on the top of the box - * @default Pepper - */ textTop: string; - /** - * Text on the front of the box - * @default For Your Spicy Needs - */ textFront: string; - /** - * Nr of sides of the box - * @default 4 - * @minimum 3 - * @maximum 16 - * @step 1 - */ nrSides: number; - /** - * Nr vertical offsets - * @default 1 - * @minimum 0 - * @maximum Infinity - * @step 1 - */ nrOffsets: number; - /** - * Height of the cup - * @default 6 - * @minimum 0.1 - * @maximum Infinity - * @step 0.1 - */ height: number; - /** - * Radius top offset - * @default 4 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ radiusBase: number; - /** - * Radius top offset - * @default 2 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ radiusOffset: number; - /** - * Cover height - * @default 1 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ coverHeight: number; - /** - * Base height - * @default 1 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ baseHeight: number; - /** - * Thickness of the cup - * @default 0.6 - * @minimum 0.05 - * @maximum Infinity - * @step 0.01 - */ thickness: number; - /** - * Ornamental thickness - * @default 0.1 - * @minimum 0.05 - * @maximum Infinity - * @step 0.01 - */ ornamentalThickness: number; - /** - * Ornamental thickness - * @default 10 - * @minimum 1 - * @maximum Infinity - * @step 1 - */ nrOrnamnetsPerSide: number; - /** - * Inverst the ornaments - * @default false - */ invertOrnaments: boolean; - /** - * Fillet of the cup - * @default 0.2 - * @minimum 0.01 - * @maximum Infinity - * @step 0.01 - */ fillet: number; - /** - * Meshing precision of the drawn model. Scale scales precision as well. The lower the number the more precise the drawn model is. Keep in mind that output of this algorithm also contains pure occt shape that can be meshed separately in draw any async commands - * @default 0.01 - * @minimum 0.000001 - * @maximum 5 - * @step 0.001 - */ precision: number; - /** - * Rotation of the cup - * @default 0 - * @minimum 0 - * @maximum Infinity - * @step 10 - */ rotation: number; - /** - * Scale of the cup - affects edge width and precision - * @default 1 - * @minimum 0 - * @maximum Infinity - * @step 10 - */ scale: number; - /** - * Origin of the medal - * @default [0, 0, 0] - */ origin: Inputs.Base.Point3; - /** - * Direction of the model - * @default [0, 1, 0] - */ direction: Inputs.Base.Vector3; - } declare class SpicyBoxModelDto { - /** - * The model that represents result of the spicy box - * @default undefined - */ + } + declare class SpicyBoxModelDto { model: SpicyBoxData; } } @@ -21220,7 +7792,8 @@ declare namespace Bit { name: string; originalInputs: EternalLoveDto; compound?: T; - } declare class EternalLoveDtoBase { + } + declare class EternalLoveDtoBase { textHeading: T; textName: T; fullModel: B; @@ -21229,56 +7802,16 @@ declare namespace Bit { rotation?: U; origin?: V; direction?: V; - } declare class EternalLoveDto implements EternalLoveDtoBase { + } + declare class EternalLoveDto implements EternalLoveDtoBase { constructor(textHeading?: string, textName?: string, fullModel?: boolean, thickness?: number, decorationThickness?: number, rotation?: number, origin?: Inputs.Base.Point3, direction?: Inputs.Base.Vector3); - /** - * The head text - * @default LOVE YOU - */ textHeading: string; - /** - * Name of the person - * @default NORA - */ textName: string; - /** - * Choose whether to produce half of the model (better for 3d printing) or full model with two sides - * @default true - */ fullModel: boolean; - /** - * Thickness of the model - * @default 6 - * @minimum 0.5 - * @maximum 20 - * @step 0.1 - */ thickness: number; - /** - * Additional thickness of the decorations - * @default 1 - * @minimum 0.1 - * @maximum 3 - * @step 0.1 - */ decorationThickness: number; - /** - * Rotation of the erenal love medal - * @default 0 - * @minimum 0 - * @maximum Infinity - * @step 10 - */ rotation: number; - /** - * Origin of the medal - * @default [0, 0, 0] - */ origin: Inputs.Base.Point3; - /** - * Direction of the model - * @default [0, 1, 0] - */ direction: Inputs.Base.Vector3; } } @@ -21287,95 +7820,30 @@ declare namespace Bit { declare namespace PhoneNest { declare class PhoneNestData { type: string; - /** - * The name of the model - */ name: string; - /** - * Original inputs that were used to create the model - */ originalInputs: PhoneNestDto; - /** - * Compound shape of the table geometry - */ compound?: T; - /** - * Representation of table parts that are useful for drawing the object efficiently - */ drawingPart?: PhoneNestDrawingPart; - /** - * Data that contains information and shapes of the top part of the table - */ mainPart?: PhoneNestMainPart; - /** - * All the shapes of the vase - */ shapes?: Models.OCCT.ShapeWithId[]; - } declare class PhoneNestDrawDto { - /** - * Main material - * @defaul undefined - * @optional true - */ + } + declare class PhoneNestDrawDto { mainMaterial?: T; - /** - * Phone material - * @defaul undefined - * @optional true - */ phoneMaterial?: T; - /** - * You can turn off drawing of faces via this property - * @default true - */ drawFaces: boolean; - /** - * Meshing precision of the drawn model. The lower the number the more precise the drawn model is. Keep in mind that output of this algorithm also contains pure occt shape that can be meshed separately in draw any async commands - * @default 0.001 - * @minimum 0.000001 - * @maximum 5 - * @step 0.001 - */ precision: number; - /** - * Defines if the edges of the model should be drawn - * @default true - */ drawEdges: boolean; - /** - * Hex colour string for the edges - * @default #ffffff - */ edgeColour: Inputs.Base.Color; - /** - * Edge width - * @default 0.06 - * @minimum 0 - * @maximum Infinity - */ edgeWidth: number; - }/** - * This defines useful compounded objects for representing model in optimal and fast way. - */ + } declare class PhoneNestDrawingPartShapes { - /** - * The representation of main part of the table - */ main?: T; - /** - * The representation of the glass of the table - */ phone?: T; - }/** - * Information needed to draw the part in an optimal way - */ + } declare class PhoneNestDrawingPart extends Part { - /** - * Shapes that exist in the drawing part, T can represent opancascade geometry, - * babylonjs mesh, materials or other things that map to these drawing categories. - */ shapes?: PhoneNestDrawingPartShapes; - } declare class PhoneNestDtoBase { + } + declare class PhoneNestDtoBase { heightBottom: T; heightTop: T; widthBack: T; @@ -21393,146 +7861,32 @@ declare namespace Bit { scale?: T; origin?: U; direction?: U; - } declare class PhoneNestDto implements PhoneNestDtoBase { + } + declare class PhoneNestDto implements PhoneNestDtoBase { constructor(heightBottom?: number, heightTop?: number, widthBack?: number, widthFront?: number, length?: number, backOffset?: number, thickness?: number, applyOrnaments?: boolean, filletRadius?: number, phoneHeight?: number, phoneWidth?: number, phoneThickness?: number, precision?: number, drawEdges?: boolean, rotation?: number, scale?: number, origin?: Inputs.Base.Point3, direction?: Inputs.Base.Vector3); - /** - * Height of the phone holder at the bottom - * @default 5 - * @minimum 0 - * @maximum Infinity - * @step 0.01 - */ heightBottom: number; - /** - * Height of the phone holder at the top - * @default 16 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ heightTop: number; - /** - * Width of the phone holder on the back - * @default 25 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ widthBack: number; - /** - * Width of the phone holder on the front and holder - * @default 10 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ widthFront: number; - /** - * Length of the holder base - * @default 16 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ length: number; - /** - * The back offset - * @default 6 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ backOffset: number; - /** - * The thickness of the table - * @default 0.4 - * @minimum 0.01 - * @maximum Infinity - * @step 0.01 - */ thickness: number; - /** - * Apply final ornaments - * @default false - */ applyOrnaments: boolean; - /** - * The radius of the fillet - * @default 2 - * @minimum 0.001 - * @maximum Infinity - * @step 0.1 - */ filletRadius: number; - /** - * The height of the phone - * @default 16.8 - * @minimum 0 - * @maximum Infinitypho - * @step 0.01 - */ phoneHeight: number; - /** - * The width of the phone - * @default 7.8 - * @minimum 0 - * @maximum Infinity - * @step 0.01 - */ phoneWidth: number; - /** - * The thickness of the phone - * @default 0.7 - * @minimum 0 - * @maximum Infinity - * @step 0.01 - */ phoneThickness: number; - /** - * Meshing precision of the drawn model. The lower the number the more precise the drawn model is. Keep in mind that output of this algorithm also contains pure occt shape that can be meshed separately in draw any async commands - * @default 0.01 - * @minimum 0.000001 - * @maximum 5 - * @step 0.001 - */ precision: number; - /** - * Defines if the edges of the model should be drawn - * @default true - */ drawEdges: boolean; - /** - * Rotation of the table in degrees - * @default 0 - * @minimum 0 - * @maximum Infinity - * @step 10 - */ rotation: number; - /** - * Scale of the table - * @default 1 - * @minimum 0 - * @maximum Infinity - */ scale: number; - /** - * Origin of the medal - * @default [0, 0, 0] - */ origin: Inputs.Base.Point3; - /** - * Direction of the model - * @default [0, 1, 0] - */ direction: Inputs.Base.Vector3; - } declare class PhoneNestModelDto { - /** - * The model that represents result of the good coffee table create operation - * @default undefined - */ + } + declare class PhoneNestModelDto { model: PhoneNestData; - } declare class PhoneNestMainPart extends Part { + } + declare class PhoneNestMainPart extends Part { shapes?: { phone?: T; main?: T; @@ -21542,64 +7896,29 @@ declare namespace Bit { } } } - declare namespace LaserCutting { declare namespace Gadgets { declare namespace DropletsPhoneHolder { declare class DropletsPhoneHolderData { - /** - * Type of the object being configured - */ type: string; - /** - * Default name of the object - */ name: string; - /** - * Compound shape of all the parts - */ compound?: T; - /** - * Original inputs - */ originalInputs: DropletsPhoneHolderDto; - /** - * All the shapes of the vase - */ shapes?: Models.OCCT.ShapeWithId[]; - /** - * Representation of arabic archway parts that are useful for drawing the object efficiently - */ drawingPart?: DropletsPhoneHolderDrawingPart; - } declare class DropletsPhoneHolderDrawingPartShapes { - /** - * The representation of all the objects in the phone holder, including all wires - */ + } + declare class DropletsPhoneHolderDrawingPartShapes { compound?: T; - /** - * The representation of 3D model of the phone holder - */ phoneHolderCompound?: T; - /** - * The representation of all cut wires - */ cutWiresCompound?: T; - /** - * The representation of the engraving wires - */ engravingWiresCompound?: T; - }/** - * Information needed to draw the part in an optimal way - */ + } declare class DropletsPhoneHolderDrawingPart { - /** - * Shapes that exist in the drawing part, T can represent opancascade geometry, - * babylonjs mesh, materials or other things that map to these drawing categories. - */ shapes?: DropletsPhoneHolderDrawingPartShapes | { [x: string]: T; }; - } declare class DropletsPhoneHolderDtoBase { + } + declare class DropletsPhoneHolderDtoBase { title?: S; subtitle: S; includeLogo: B; @@ -21625,350 +7944,84 @@ declare namespace Bit { direction?: V; scale?: V; origin?: V; - } declare class DropletsPhoneHolderDto implements DropletsPhoneHolderDtoBase { + } + declare class DropletsPhoneHolderDto implements DropletsPhoneHolderDtoBase { constructor(title?: string, subtitle?: string, includeLogo?: boolean, thickness?: number, kerf?: number, phoneWidth?: number, phoneHeight?: number, phoneThickness?: number, backLength?: number, angle?: number, offsetAroundPhone?: number, penShelf?: number, phoneLockHeight?: number, filletRadius?: number, includePattern?: boolean, densityPattern?: number, holesForWire?: boolean, wireInputThickness?: number, includeModel?: boolean, includeDrawings?: boolean, spacingDrawings?: number, rotation?: number, origin?: Inputs.Base.Point3, direction?: Inputs.Base.Point3, scale?: Inputs.Base.Vector3); - /** - * Title of the phone holder - * @default Your Name - */ title: string; - /** - * Subtitle of the phone holder - * @default And Message - */ subtitle: string; - /** - * Include the logo - * @default true - */ includeLogo: boolean; - /** - * Thickness of the phone holder - * @default 0.4 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ thickness: number; - /** - * Kerf value for the laser cutting of joints - * @default 0.01 - * @minimum 0 - * @maximum Infinity - * @step 0.001 - */ kerf: number; - /** - * Width of the phone - * @default 8 - * @minimum 4 - * @maximum Infinity - * @step 0.1 - */ phoneWidth: number; - /** - * Height of the phone - * @default 16 - * @minimum 4 - * @maximum Infinity - * @step 0.1 - */ phoneHeight: number; - /** - * Thickness of the phone - * @default 1 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ phoneThickness: number; - /** - * Length of the back - * @default 10 - * @minimum 5 - * @maximum Infinity - * @step 0.1 - */ backLength: number; - /** - * Angle of the back - * @default 20 - * @minimum 0 - * @maximum 60 - * @step 1 - */ angle: number; - /** - * Offset around the phone - * @default 0.5 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ offsetAroundPhone: number; - /** - * Pen shelf - * @default 1 - * @minimum 0.5 - * @maximum Infinity - * @step 0.1 - */ penShelf: number; - /** - * Phone lock height - * @default 2 - * @minimum 0.5 - * @maximum Infinity - * @step 0.1 - */ phoneLockHeight: number; - /** - * Fillet radius - * @default 0.3 - * @minimum 0.1 - * @maximum 0.4 - * @step 0.1 - */ filletRadius: number; - /** - * Include pattern - * @default false - */ includePattern: boolean; - /** - * Density of the pattern - * @default 0.4 - * @minimum 0 - * @maximum 2 - * @step 0.1 - */ densityPattern: number; - /** - * Include pattern - * @default true - */ holesForWire: boolean; - /** - * Wire input thickness - * @default 1.5 - * @minimum 0.7 - * @maximum Infinity - * @step 0.1 - */ wireInputThickness: number; - /** - * Include 3D model - * @default true - */ includeModel: boolean; - /** - * Include drawings - * @default true - */ includeDrawings: boolean; - /** - * Spacing of the drawings - * @default 0.5 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ spacingDrawings: number; - /** - * Rotation of the model - * @default 0 - * @minimum 0 - * @maximum Infinity - * @step 10 - */ rotation: number; - /** - * Origin of the model - * @default [0, 0, 0] - */ origin: Inputs.Base.Point3; - /** - * Direction of the model - * @default [0, 1, 0] - */ direction: Inputs.Base.Point3; - /** - * Scale of the model - * @default [1, 1, 1] - */ scale: Inputs.Base.Vector3; - } declare class DropletsPhoneHolderModelDto { - /** - * The model that represents result of the model - * @default undefined - */ + } + declare class DropletsPhoneHolderModelDto { model: DropletsPhoneHolderData; - } declare class DropletsPhoneHolderModelDxfDto { - /** - * The model that represents result of the model - * @default undefined - */ + } + declare class DropletsPhoneHolderModelDxfDto { model: DropletsPhoneHolderData; - /** - * The laser cut wires color - * @default #000000 - */ cutWiresColor: Inputs.Base.Color; - /** - * The laser engraving wires color - * @default #0000ff - */ engravingWiresColor: Inputs.Base.Color; - /** - * The file name - * @default bitbybit-droplets-phone-holder - */ fileName: string; - /** - * The angular deflection - * @default 0.1 - * @minimum 0 - * @maximum Infinity - * @step 0.01 - */ angularDeflection: number; - /** - * The curvature deflection - * @default 0.1 - * @minimum 0 - * @maximum Infinity - * @step 0.001 - */ curvatureDeflection: number; - /** - * Minimum of points - * @default 2 - * @minimum 0 - * @maximum Infinity - * @step 1 - */ minimumOfPoints: number; - /** - * U tolerance - * @default 1.0e-9 - * @minimum 0 - * @maximum Infinity - * @step 1.0e-9 - */ uTolerance: number; - /** - * Minimum length - * @default 1.0e-7 - * @minimum 0 - * @maximum Infinity - * @step 1.0e-7 - */ minimumLength: number; - } declare class DropletsPhoneHolderModelStepDto { - /** - * The model that represents result of the model - * @default undefined - */ + } + declare class DropletsPhoneHolderModelStepDto { model: DropletsPhoneHolderData; - /** - * The file name - * @default bitbybit-droplets-phone-holder - */ fileName: string; - /** - * Adjust Y to Z axis - * @default true - */ adjustYZ: boolean; } } } } - declare namespace Furniture { declare namespace Chairs { declare namespace SnakeChair { declare class SnakeChairData { type: string; - /** - * The name of the model - */ name: string; - /** - * Original inputs that were used to create the model - */ originalInputs: SnakeChairDto; - /** - * Compound shape of the table geometry - */ compound?: T; - /** - * Representation of table parts that are useful for drawing the object efficiently - */ drawingPart?: SnakeChairDrawingPart; - /** - * Data that contains information and shapes of the top part of the table - */ mainPart?: SnakeChairMainPart; - /** - * All the shapes of the vase - */ shapes?: Models.OCCT.ShapeWithId[]; - } declare class SnakeChairDrawDto { - /** - * Main material - * @defaul undefined - * @optional true - */ + } + declare class SnakeChairDrawDto { mainMaterial?: T; - /** - * You can turn off drawing of faces via this property - * @default true - */ drawFaces: boolean; - /** - * Meshing precision of the drawn model. The lower the number the more precise the drawn model is. Keep in mind that output of this algorithm also contains pure occt shape that can be meshed separately in draw any async commands - * @default 0.001 - * @minimum 0.000001 - * @maximum 5 - * @step 0.001 - */ precision: number; - /** - * Defines if the edges of the model should be drawn - * @default true - */ drawEdges: boolean; - /** - * Hex colour string for the edges - * @default #ffffff - */ edgeColour: Inputs.Base.Color; - /** - * Edge width - * @default 0.06 - * @minimum 0 - * @maximum Infinity - */ edgeWidth: number; - }/** - * This defines useful compounded objects for representing model in optimal and fast way. - */ + } declare class SnakeChairDrawingPartShapes { - /** - * The representation of main part of the chair - */ main?: T; - }/** - * Information needed to draw the part in an optimal way - */ + } declare class SnakeChairDrawingPart extends Part { - /** - * Shapes that exist in the drawing part, T can represent opancascade geometry, - * babylonjs mesh, materials or other things that map to these drawing categories. - */ shapes?: SnakeChairDrawingPartShapes; - } declare class SnakeChairDtoBase { + } + declare class SnakeChairDtoBase { sittingHeight: T; backRestOffset: T; backRestHeight: T; @@ -21983,125 +8036,29 @@ declare namespace Bit { scale?: T; origin?: U; direction?: U; - } declare class SnakeChairDto implements SnakeChairDtoBase { + } + declare class SnakeChairDto implements SnakeChairDtoBase { constructor(sittingHeight?: number, backRestOffset?: number, backRestHeight?: number, width?: number, length?: number, thickness?: number, nrOrnamentPlanks?: number, ornamentDepth?: number, filletRadius?: number, precision?: number, drawEdges?: boolean, rotation?: number, scale?: number, origin?: Inputs.Base.Point3, direction?: Inputs.Base.Vector3); - /** - * Height of the sitting area - * @default 0.45 - * @minimum 0.1 - * @maximum Infinity - * @step 0.01 - */ sittingHeight: number; - /** - * Sitting top offset from perpendicular ending of the chair - * @default 0.1 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ backRestOffset: number; - /** - * Height of the back rest - * @default 0.7 - * @minimum 0.1 - * @maximum Infinity - * @step 0.01 - */ backRestHeight: number; - /** - * Width of the table - * @default 0.45 - * @minimum 0 - * @maximum Infinity - * @step 0.01 - */ width: number; - /** - * Length of the table - * @default 0.45 - * @minimum 0 - * @maximum Infinity - * @step 0.01 - */ length: number; - /** - * The thickness of the chair - * @default 0.05 - * @minimum 0.01 - * @maximum Infinity - * @step 0.01 - */ thickness: number; - /** - * The number of ornament planks - * @default 7 - * @minimum 1 - * @maximum Infinity - * @step 1 - */ nrOrnamentPlanks: number; - /** - * The ornament depth of the chair - * @default 0.01 - * @minimum 0.001 - * @maximum Infinity - * @step 0.001 - */ ornamentDepth: number; - /** - * The radius of the fillet - * @default 0.05 - * @minimum 0.001 - * @maximum Infinity - * @step 0.01 - */ filletRadius: number; - /** - * Meshing precision of the drawn model. The lower the number the more precise the drawn model is. Keep in mind that output of this algorithm also contains pure occt shape that can be meshed separately in draw any async commands - * @default 0.01 - * @minimum 0.000001 - * @maximum 5 - * @step 0.001 - */ precision: number; - /** - * Defines if the edges of the model should be drawn - * @default true - */ drawEdges: boolean; - /** - * Rotation of the table in degrees - * @default 0 - * @minimum 0 - * @maximum Infinity - * @step 10 - */ rotation: number; - /** - * Scale of the table - * @default 1 - * @minimum 0 - * @maximum Infinity - */ scale: number; - /** - * Origin of the medal - * @default [0, 0, 0] - */ origin: Inputs.Base.Point3; - /** - * Direction of the model - * @default [0, 1, 0] - */ direction: Inputs.Base.Vector3; - } declare class SnakeChairModelDto { - /** - * The model that represents result of the good coffee table create operation - * @default undefined - */ + } + declare class SnakeChairModelDto { model: SnakeChairData; - } declare class SnakeChairMainPart extends Part { + } + declare class SnakeChairMainPart extends Part { sittingCenter?: Inputs.Base.Point3; shapes?: { sittingWire?: T; @@ -22114,109 +8071,33 @@ declare namespace Bit { declare namespace ElegantTable { declare class ElegantTableData { type: string; - /** - * The name of the model - */ name: string; - /** - * Original inputs that were used to create the model - */ originalInputs: ElegantTableDto; - /** - * Compound shape of the table geometry - */ compound?: T; - /** - * Representation of table parts that are useful for drawing the object efficiently - */ drawingPart?: ElegantTableDrawingPart; - /** - * Data that contains information and shapes of the top part of the table - */ topPart?: ElegantTableTopPart; - /** - * Data that contains information and shapes repreesenting the legs of the table - */ legParts?: ElegantTableLegPart[]; - /** - * All the shapes of the vase - */ shapes?: Models.OCCT.ShapeWithId[]; - } declare class ElegantTableDrawDto { - /** - * Material of the top of the table - * @defaul undefined - * @optional true - */ + } + declare class ElegantTableDrawDto { topMaterial?: T; - /** - * Material of the top base of the table - * @defaul undefined - * @optional true - */ topBaseMaterial?: T; - /** - * Material of the legs of the table - * @defaul undefined - * @optional true - */ legsMaterial?: T; - /** - * You can turn off drawing of faces via this property - * @default true - */ drawFaces: boolean; - /** - * Meshing precision of the drawn model. The lower the number the more precise the drawn model is. Keep in mind that output of this algorithm also contains pure occt shape that can be meshed separately in draw any async commands - * @default 0.001 - * @minimum 0.000001 - * @maximum 5 - * @step 0.001 - */ precision: number; - /** - * Defines if the edges of the model should be drawn - * @default true - */ drawEdges: boolean; - /** - * Hex colour string for the edges - * @default #ffffff - */ edgeColour: Inputs.Base.Color; - /** - * Edge width - * @default 0.06 - * @minimum 0 - * @maximum Infinity - */ edgeWidth: number; - }/** - * This defines useful compounded objects for representing elegant table in optimal and fast way. - */ + } declare class ElegantTableDrawingPartShapes { - /** - * The representation of top of the table - */ top?: T; - /** - * The representation of base of the table top - */ topBase?: T; - /** - * The representation of all legs as compound of the table - */ legs?: T; - }/** - * Information needed to draw the part in an optimal way - */ + } declare class ElegantTableDrawingPart extends Part { - /** - * Shapes that exist in the drawing part, T can represent opancascade geometry, - * babylonjs mesh, materials or other things that map to these drawing categories. - */ shapes?: ElegantTableDrawingPartShapes; - } declare class ElegantTableDtoBase { + } + declare class ElegantTableDtoBase { height: T; width: T; length: T; @@ -22232,141 +8113,31 @@ declare namespace Bit { scale?: T; origin?: U; direction?: U; - } declare class ElegantTableDto implements ElegantTableDtoBase { + } + declare class ElegantTableDto implements ElegantTableDtoBase { constructor(height?: number, width?: number, length?: number, topThickness?: number, topOffset?: number, bottomThickness?: number, minFillet?: number, radiusLegTop?: number, radiusLegBottom?: number, nrLegPairs?: number, precision?: number, drawEdges?: boolean, rotation?: number, scale?: number, origin?: Inputs.Base.Point3, direction?: Inputs.Base.Vector3); - /** - * Height of the table - * @default 0.74 - * @minimum 0.1 - * @maximum Infinity - * @step 0.01 - */ height: number; - /** - * Width of the table - * @default 1 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ width: number; - /** - * Length of the table - * @default 2 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ length: number; - /** - * Top thickness of the table - * @default 0.02 - * @minimum 0.001 - * @maximum Infinity - * @step 0.001 - */ topThickness: number; - /** - * Top offset from the base of the table - * @default 0.03 - * @minimum 0 - * @maximum Infinity - * @step 0.01 - */ topOffset: number; - /** - * Bottom thickness of the table - * @default 0.05 - * @minimum 0.01 - * @maximum Infinity - * @step 0.01 - */ bottomThickness: number; - /** - * Fillet table corners - * @default 0.2 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ minFillet: number; - /** - * Radius leg top - * @default 0.03 - * @minimum 0.01 - * @maximum Infinity - * @step 0.01 - */ radiusLegTop: number; - /** - * Radius leg top - * @default 0.01 - * @minimum 0.01 - * @maximum Infinity - * @step 0.01 - */ radiusLegBottom: number; - /** - * The number of leg pairs of the table - * @default 2 - * @minimum 2 - * @maximum Infinity - * @step 1 - */ nrLegPairs: number; - /** - * Meshing precision of the drawn model. The lower the number the more precise the drawn model is. Keep in mind that output of this algorithm also contains pure occt shape that can be meshed separately in draw any async commands - * @default 0.001 - * @minimum 0.000001 - * @maximum 5 - * @step 0.001 - */ precision: number; - /** - * Defines if the edges of the model should be drawn - * @default true - */ drawEdges: boolean; - /** - * Rotation of the table in degrees - * @default 0 - * @minimum 0 - * @maximum Infinity - * @step 10 - */ rotation: number; - /** - * Scale of the table - * @default 1 - * @minimum 0 - * @maximum Infinity - */ scale: number; - /** - * Origin of the medal - * @default [0, 0, 0] - */ origin: Inputs.Base.Point3; - /** - * Direction of the model - * @default [0, 1, 0] - */ direction: Inputs.Base.Vector3; - } declare class ElegantTableLegByIndexDto { - /** - * The model that represents result of the elegant table create operation - * @default undefined - */ + } + declare class ElegantTableLegByIndexDto { model: ElegantTableData; - /** - * The index of the leg to be returned - * @default 0 - * @minimum 0 - * @maximum Infinity - * @step 1 - */ index: number; - } declare class ElegantTableLegPart extends Part { + } + declare class ElegantTableLegPart extends Part { topCenter?: Inputs.Base.Point3; bottomCenter?: Inputs.Base.Point3; topRadius?: number; @@ -22376,13 +8147,11 @@ declare namespace Bit { bottomCircleWire?: T; leg?: T; }; - } declare class ElegantTableModelDto { - /** - * The model that represents result of the elegant table create operation - * @default undefined - */ + } + declare class ElegantTableModelDto { model: ElegantTableData; - } declare class ElegantTableTopPart extends Part { + } + declare class ElegantTableTopPart extends Part { topCenter?: Inputs.Base.Point3; bottomCenter?: Inputs.Base.Point3; shapes?: { @@ -22397,123 +8166,36 @@ declare namespace Bit { declare namespace GoodCoffeeTable { declare class GoodCoffeeTableData { type: string; - /** - * The name of the model - */ name: string; - /** - * Original inputs that were used to create the model - */ originalInputs: GoodCoffeeTableDto; - /** - * Compound shape of the table geometry - */ compound?: T; - /** - * Representation of table parts that are useful for drawing the object efficiently - */ drawingPart?: GoodCoffeeTableDrawingPart; - /** - * Data that contains information and shapes of the top part of the table - */ topPart?: GoodCoffeeTableTopPart; - /** - * Data that contains information and shapes of the shelf part of the table - */ shelfPart?: GoodCoffeeTableShelfPart; - /** - * Data that contains information and shapes repreesenting the legs of the table - */ legParts?: GoodCoffeeTableLegPart[]; - /** - * All the shapes of the vase - */ shapes?: Models.OCCT.ShapeWithId[]; - } declare class GoodCoffeeTableDrawDto { - /** - * Material of the glass - * @defaul undefined - * @optional true - */ + } + declare class GoodCoffeeTableDrawDto { topGlassMaterial?: T; - /** - * Material of the top frame of the table - * @defaul undefined - * @optional true - */ topMaterial?: T; - /** - * Material of the shelf of the table - * @defaul undefined - * @optional true - */ shelfMaterial?: T; - /** - * Material of the legs of the table - * @defaul undefined - * @optional true - */ legsMaterial?: T; - /** - * You can turn off drawing of faces via this property - * @default true - */ drawFaces: boolean; - /** - * Meshing precision of the drawn model. The lower the number the more precise the drawn model is. Keep in mind that output of this algorithm also contains pure occt shape that can be meshed separately in draw any async commands - * @default 0.001 - * @minimum 0.000001 - * @maximum 5 - * @step 0.001 - */ precision: number; - /** - * Defines if the edges of the model should be drawn - * @default true - */ drawEdges: boolean; - /** - * Hex colour string for the edges - * @default #ffffff - */ edgeColour: Inputs.Base.Color; - /** - * Edge width - * @default 0.06 - * @minimum 0 - * @maximum Infinity - */ edgeWidth: number; - }/** - * This defines useful compounded objects for representing elegant table in optimal and fast way. - */ + } declare class GoodCoffeeTableDrawingPartShapes { - /** - * The representation of top of the table - */ top?: T; - /** - * The representation of glass of the table top - */ topGlass?: T; - /** - * The shelf of the table - */ shelf?: T; - /** - * The representation of all legs as compound of the table - */ legs?: T; - }/** - * Information needed to draw the part in an optimal way - */ + } declare class GoodCoffeeTableDrawingPart extends Part { - /** - * Shapes that exist in the drawing part, T can represent opancascade geometry, - * babylonjs mesh, materials or other things that map to these drawing categories. - */ shapes?: GoodCoffeeTableDrawingPartShapes; - } declare class GoodCoffeeTableDtoBase { + } + declare class GoodCoffeeTableDtoBase { height: T; width: T; length: T; @@ -22531,157 +8213,33 @@ declare namespace Bit { scale?: T; origin?: U; direction?: U; - } declare class GoodCoffeeTableDto implements GoodCoffeeTableDtoBase { + } + declare class GoodCoffeeTableDto implements GoodCoffeeTableDtoBase { constructor(height?: number, width?: number, length?: number, chamfer?: number, topThickness?: number, topGlassOffset?: number, glassThickness?: number, glassHolderLength?: number, shelfTopOffset?: number, shelfThickness?: number, legWidth?: number, legDepth?: number, precision?: number, drawEdges?: boolean, rotation?: number, scale?: number, origin?: Inputs.Base.Point3, direction?: Inputs.Base.Vector3); - /** - * Height of the table - * @default 0.4 - * @minimum 0.1 - * @maximum Infinity - * @step 0.01 - */ height: number; - /** - * Width of the table - * @default 1 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ width: number; - /** - * Length of the table - * @default 1.2 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ length: number; - /** - * Chamfer the corners - * @default 0.01 - * @minimum 0 - * @maximum Infinity - * @step 0.001 - */ chamfer: number; - /** - * Top thickness of the table - * @default 0.05 - * @minimum 0.001 - * @maximum Infinity - * @step 0.001 - */ topThickness: number; - /** - * Top offset from the edge of the table till the glass - * @default 0.2 - * @minimum 0 - * @maximum Infinity - * @step 0.01 - */ topGlassOffset: number; - /** - * Glass thickness of the table - * @default 0.005 - * @minimum 0.001 - * @maximum Infinity - * @step 0.001 - */ glassThickness: number; - /** - * Glass holder length of the table - * @default 0.02 - * @minimum 0.001 - * @maximum Infinity - * @step 0.001 - */ glassHolderLength: number; - /** - * The offset of the shelf from the bottom of the top - 0 means that no shelf is made as such shelf would be non-functional. - * @default 0.15 - * @minimum 0 - * @maximum Infinity - * @step 0.01 - */ shelfTopOffset: number; - /** - * Shelf thickness - * @default 0.03 - * @minimum 0.001 - * @maximum Infinity - * @step 0.001 - */ shelfThickness: number; - /** - * Width of the leg - * @default 0.1 - * @minimum 0.01 - * @maximum Infinity - * @step 0.01 - */ legWidth: number; - /** - * The depth of the leg - * @default 0.05 - * @minimum 0.01 - * @maximum Infinity - * @step 0.01 - */ legDepth: number; - /** - * Meshing precision of the drawn model. The lower the number the more precise the drawn model is. Keep in mind that output of this algorithm also contains pure occt shape that can be meshed separately in draw any async commands - * @default 0.001 - * @minimum 0.000001 - * @maximum 5 - * @step 0.001 - */ precision: number; - /** - * Defines if the edges of the model should be drawn - * @default true - */ drawEdges: boolean; - /** - * Rotation of the table in degrees - * @default 0 - * @minimum 0 - * @maximum Infinity - * @step 10 - */ rotation: number; - /** - * Scale of the table - * @default 1 - * @minimum 0 - * @maximum Infinity - */ scale: number; - /** - * Origin of the medal - * @default [0, 0, 0] - */ origin: Inputs.Base.Point3; - /** - * Direction of the model - * @default [0, 1, 0] - */ direction: Inputs.Base.Vector3; - } declare class GoodCoffeeTableLegByIndexDto { - /** - * The model that represents result of the elegant table create operation - * @default undefined - */ + } + declare class GoodCoffeeTableLegByIndexDto { model: GoodCoffeeTableData; - /** - * The index of the leg to be returned - * @default 0 - * @minimum 0 - * @maximum Infinity - * @step 1 - */ index: number; - } declare class GoodCoffeeTableLegPart extends Part { + } + declare class GoodCoffeeTableLegPart extends Part { topCenter?: Inputs.Base.Point3; bottomCenter?: Inputs.Base.Point3; width: number; @@ -22692,13 +8250,11 @@ declare namespace Bit { bottomWire?: T; leg?: T; }; - } declare class GoodCoffeeTableModelDto { - /** - * The model that represents result of the good coffee table create operation - * @default undefined - */ + } + declare class GoodCoffeeTableModelDto { model: GoodCoffeeTableData; - } declare class GoodCoffeeTableShelfPart extends Part { + } + declare class GoodCoffeeTableShelfPart extends Part { topCenter?: Inputs.Base.Point3; bottomCenter?: Inputs.Base.Point3; shapes?: { @@ -22706,7 +8262,8 @@ declare namespace Bit { bottomWire?: T; compound?: T; }; - } declare class GoodCoffeeTableTopPart extends Part { + } + declare class GoodCoffeeTableTopPart extends Part { topCenter?: Inputs.Base.Point3; shapes?: { topFrame?: T; @@ -22720,95 +8277,30 @@ declare namespace Bit { declare namespace SnakeTable { declare class SnakeTableData { type: string; - /** - * The name of the model - */ name: string; - /** - * Original inputs that were used to create the model - */ originalInputs: SnakeTableDto; - /** - * Compound shape of the table geometry - */ compound?: T; - /** - * Representation of table parts that are useful for drawing the object efficiently - */ drawingPart?: SnakeTableDrawingPart; - /** - * Data that contains information and shapes of the top part of the table - */ mainPart?: SnakeTableMainPart; - /** - * All the shapes of the vase - */ shapes?: Models.OCCT.ShapeWithId[]; - } declare class SnakeTableDrawDto { - /** - * Main material - * @defaul undefined - * @optional true - */ + } + declare class SnakeTableDrawDto { mainMaterial?: T; - /** - * Glass material - * @defaul undefined - * @optional true - */ glassMaterial?: T; - /** - * You can turn off drawing of faces via this property - * @default true - */ drawFaces: boolean; - /** - * Meshing precision of the drawn model. The lower the number the more precise the drawn model is. Keep in mind that output of this algorithm also contains pure occt shape that can be meshed separately in draw any async commands - * @default 0.001 - * @minimum 0.000001 - * @maximum 5 - * @step 0.001 - */ precision: number; - /** - * Defines if the edges of the model should be drawn - * @default true - */ drawEdges: boolean; - /** - * Hex colour string for the edges - * @default #ffffff - */ edgeColour: Inputs.Base.Color; - /** - * Edge width - * @default 0.06 - * @minimum 0 - * @maximum Infinity - */ edgeWidth: number; - }/** - * This defines useful compounded objects for representing model in optimal and fast way. - */ + } declare class SnakeTableDrawingPartShapes { - /** - * The representation of main part of the table - */ main?: T; - /** - * The representation of the glass of the table - */ glass?: T; - }/** - * Information needed to draw the part in an optimal way - */ + } declare class SnakeTableDrawingPart extends Part { - /** - * Shapes that exist in the drawing part, T can represent opancascade geometry, - * babylonjs mesh, materials or other things that map to these drawing categories. - */ shapes?: SnakeTableDrawingPartShapes; - } declare class SnakeTableDtoBase { + } + declare class SnakeTableDtoBase { height: T; width: T; length: T; @@ -22825,141 +8317,31 @@ declare namespace Bit { scale?: T; origin?: U; direction?: U; - } declare class SnakeTableDto implements SnakeTableDtoBase { + } + declare class SnakeTableDto implements SnakeTableDtoBase { constructor(height?: number, width?: number, length?: number, supportLength?: number, shelfHeight?: number, thickness?: number, glassThickness?: number, glassOffset?: number, nrOrnamentPlanks?: number, ornamentDepth?: number, filletRadius?: number, precision?: number, drawEdges?: boolean, rotation?: number, scale?: number, origin?: Inputs.Base.Point3, direction?: Inputs.Base.Vector3); - /** - * Height of the table - * @default 0.74 - * @minimum 0 - * @maximum Infinity - * @step 0.01 - */ height: number; - /** - * Width of the table - * @default 1 - * @minimum 0 - * @maximum Infinity - * @step 0.01 - */ width: number; - /** - * Length of the table - * @default 2 - * @minimum 0 - * @maximum Infinity - * @step 0.01 - */ length: number; - /** - * The length of the support - * @default 0.5 - * @minimum 0 - * @maximum Infinity - * @step 0.01 - */ supportLength: number; - /** - * The height of the shelf - * @default 0.2 - * @minimum 0 - * @maximum Infinity - * @step 0.01 - */ shelfHeight: number; - /** - * The thickness of the table - * @default 0.05 - * @minimum 0.01 - * @maximum Infinity - * @step 0.01 - */ thickness: number; - /** - * The thickness of the glass - * @default 0.005 - * @minimum 0.001 - * @maximum Infinity - * @step 0.001 - */ glassThickness: number; - /** - * The glass offset - goes beyond width and length limitations - * @default 0 - * @minimum 0 - * @maximum Infinity - * @step 0.01 - */ glassOffset: number; - /** - * The number of ornament planks - * @default 7 - * @minimum 1 - * @maximum Infinity - * @step 1 - */ nrOrnamentPlanks: number; - /** - * The ornament depth of the table - * @default 0.01 - * @minimum 0.001 - * @maximum Infinity - * @step 0.001 - */ ornamentDepth: number; - /** - * The radius of the fillet - * @default 0.05 - * @minimum 0.001 - * @maximum Infinity - * @step 0.01 - */ filletRadius: number; - /** - * Meshing precision of the drawn model. The lower the number the more precise the drawn model is. Keep in mind that output of this algorithm also contains pure occt shape that can be meshed separately in draw any async commands - * @default 0.01 - * @minimum 0.000001 - * @maximum 5 - * @step 0.001 - */ precision: number; - /** - * Defines if the edges of the model should be drawn - * @default true - */ drawEdges: boolean; - /** - * Rotation of the table in degrees - * @default 0 - * @minimum 0 - * @maximum Infinity - * @step 10 - */ rotation: number; - /** - * Scale of the table - * @default 1 - * @minimum 0 - * @maximum Infinity - */ scale: number; - /** - * Origin of the medal - * @default [0, 0, 0] - */ origin: Inputs.Base.Point3; - /** - * Direction of the model - * @default [0, 1, 0] - */ direction: Inputs.Base.Vector3; - } declare class SnakeTableModelDto { - /** - * The model that represents result of the good coffee table create operation - * @default undefined - */ + } + declare class SnakeTableModelDto { model: SnakeTableData; - } declare class SnakeTableMainPart extends Part { + } + declare class SnakeTableMainPart extends Part { topCenter?: Inputs.Base.Point3; shapes?: { topWire?: T; @@ -22971,8 +8353,6 @@ declare namespace Bit { } } } - - declare namespace Shared { declare class Part { id?: string; @@ -22982,7 +8362,6 @@ declare namespace Bit { direction?: Inputs.Base.Vector3; } } - } declare namespace Advanced { declare namespace Enums { @@ -22998,29 +8377,35 @@ declare namespace Bit { shapes?: { compound?: T; }; - } declare class FacePart { + } + declare class FacePart { id: string; type: faceTypeEnum; shapes?: { face?: T; }; - } declare enum faceTextVarEnum { + } + declare enum faceTextVarEnum { separatedExtrusion = "separatedExtrusion", integratedExtrusion = "integratedExtrusion", cutout = "cutout" - } declare enum faceTypeEnum { + } + declare enum faceTypeEnum { compound = "compound", cutout = "originalCutout", cutoutInsideCharacter = "cutoutInsideCharacter" - } declare class FontDefinition { + } + declare class FontDefinition { name: string; - type: fontsEnum; - variant: fontVariantsEnum; + type?: fontsEnum; + variant?: fontVariantsEnum; font: Font; - } declare const fontsModel: { + } + declare const fontsModel: { key: string; variants: string[]; - }[]; declare enum fontVariantsEnum { + }[]; + declare enum fontVariantsEnum { Regular = "Regular", Black = "Black", Bold = "Bold", @@ -23036,7 +8421,8 @@ declare namespace Bit { Thin = "Thin", ThinItalic = "ThinItalic", ExtraLight = "ExtraLight" - } declare enum fontsEnum { + } + declare enum fontsEnum { Aboreto = "Aboreto", Bungee = "Bungee", IndieFlower = "IndieFlower", @@ -23047,7 +8433,8 @@ declare namespace Bit { Silkscreen = "Silkscreen", Tektur = "Tektur", Workbench = "Workbench" - } declare enum recAlignmentEnum { + } + declare enum recAlignmentEnum { leftTop = "leftTop", leftMiddle = "leftMiddle", leftBottom = "leftBottom", @@ -23057,391 +8444,185 @@ declare namespace Bit { rightTop = "rightTop", rightMiddle = "rightMiddle", rightBottom = "rightBottom" - } declare class Text3DData { - /** - * Type of the object being configured - */ + } + declare class Text3DData { type: string; - /** - * Default name of the object - */ name: string; - /** - * The advance width of the text - */ advanceWidth: number; - /** - * The bounding box of the text - */ boundingBox: { x1: number; y1: number; x2: number; y2: number; }; - /** - * Original inputs - */ originalInputs?: Text3DDto | Texts3DFaceDto; - /** - * Compounded shape of the 3d text - */ compound?: T; - /** - * The parts of letters - */ characterParts?: CharacterPart[]; - /** - * This only applies if we use 3d text on face algorithms - */ faceParts?: FacePart[]; - /** - * All the shapes of the 3d text - */ shapes?: Models.OCCT.ShapeWithId[]; - /** - * All the letter coordinates of the 3d text - */ characterCenterCoordinates: Inputs.Base.Point3[]; - } declare class Text3DDto { + } + declare class Text3DDto { constructor(text?: string, fontType?: fontsEnum, fontVariant?: fontVariantsEnum, fontSize?: number, height?: number, rotation?: number, origin?: Inputs.Base.Vector3, direction?: Inputs.Base.Vector3, originAlignment?: recAlignmentEnum); - /** - * The type of font to use - * @default bitbybit.dev - */ text: string; - /** - * The type of font to use - * @default Roboto - */ fontType: fontsEnum; - /** - * The type of font to use - * @default Regular - */ fontVariant: fontVariantsEnum; - /** - * The size of the font - * @default 1.5 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ fontSize: number; - /** - * The height of the font extrusion, if 0 then face will be returned and not a solid - * @default 0.2 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ height: number; - /** - * The rotation of the generated text - * @default 0 - * @minimum 0 - * @maximum Infinity - * @step 15 - */ rotation: number; - /** - * Origin of the text - * @default [0, 0, 0] - */ origin: Inputs.Base.Vector3; - /** - * Direction of the text - * @default [0, 1, 0] - */ direction: Inputs.Base.Vector3; - /** - * Origin alignment - * @default centerMiddle - */ originAlignment: recAlignmentEnum; - } declare class Text3DFaceDefinitionDto { + } + declare class Text3DFaceDefinitionDto { constructor(faceTextVar?: faceTextVarEnum, text?: string, fontType?: fontsEnum, fontVariant?: fontVariantsEnum, fontSize?: number, height?: number, rotation?: number, originParamU?: number, originParamV?: number, originAlignment?: recAlignmentEnum); - /** - * You can choose how your face text will be constructed. - * Separated extrusion will only return text letters - * Integrated extrusion will create a shell from the extruded text and original face - * Integrated pull in will create a shell from the negative extrusion and original face - * Cutout will return compound with faces that are left after cutting the original face with text - * @default separatedExtrusion - */ faceTextVar: faceTextVarEnum; - /** - * The type of font to use - * @default bitbybit.dev - */ text: string; - /** - * The type of font to use - * @default Roboto - */ fontType: fontsEnum; - /** - * The type of font to use - * @default Regular - */ fontVariant: fontVariantsEnum; - /** - * The size of the font - * @default 1.5 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ fontSize: number; - /** - * The height of the font extrusion, if 0 then face will be returned and not a solid - * @default 0.2 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ height: number; - /** - * The rotation of the generated text - * @default 0 - * @minimum 0 - * @maximum Infinity - * @step 15 - */ rotation: number; - /** - * Origin u param for the text 0 - 1 - * @default 0.5 - * @minimum 0 - * @maximum 1 - * @step 0.1 - */ originParamU: number; - /** - * Origin v param for the text 0 - 1 - * @default 0.5 - * @minimum 0 - * @maximum 1 - * @step 0.1 - */ originParamV: number; - /** - * Origin alignment - * @default centerMiddle - */ originAlignment: recAlignmentEnum; - } declare class Text3DFaceDto { + } + declare class Text3DFaceDefinitionUrlDto { + constructor(faceTextVar?: faceTextVarEnum, text?: string, fontUrl?: string, fontSize?: number, height?: number, rotation?: number, originParamU?: number, originParamV?: number, originAlignment?: recAlignmentEnum); + faceTextVar: faceTextVarEnum; + text: string; + fontUrl: string; + fontSize: number; + height: number; + rotation: number; + originParamU: number; + originParamV: number; + originAlignment: recAlignmentEnum; + } + declare class Text3DFaceDefinitionUrlParsedDto { + constructor(faceTextVar?: faceTextVarEnum, text?: string, letterPaths?: any, fontSize?: number, height?: number, rotation?: number, originParamU?: number, originParamV?: number, originAlignment?: recAlignmentEnum); + faceTextVar: faceTextVarEnum; + text: string; + letterPaths: any; + fontSize: number; + height: number; + rotation: number; + originParamU: number; + originParamV: number; + originAlignment: recAlignmentEnum; + } + declare class Text3DFaceDto { constructor(face?: T, facePlanar?: boolean, faceTextVar?: faceTextVarEnum, text?: string, fontType?: fontsEnum, fontVariant?: fontVariantsEnum, fontSize?: number, height?: number, rotation?: number, originParamU?: number, originParamV?: number, originAlignment?: recAlignmentEnum); - /** - * The face of the text - * @default undefined - */ face: T; - /** - * If the face is planar it should be true - * @default false - */ facePlanar: boolean; - /** - * You can choose how your face text will be constructed. - * Separated extrusion will only return text letters - * Integrated extrusion will create a shell from the extruded text and original face - * Integrated pull in will create a shell from the negative extrusion and original face - * Cutout will return compound with faces that are left after cutting the original face with text - */ faceTextVar: faceTextVarEnum; - /** - * The type of font to use - * @default bitbybit.dev - */ text: string; - /** - * The type of font to use - * @default Roboto - */ fontType: fontsEnum; - /** - * The type of font to use - * @default Regular - */ fontVariant: fontVariantsEnum; - /** - * The size of the font - * @default 1.5 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ fontSize: number; - /** - * The height of the font extrusion, if 0 then face will be returned and not a solid - * @default 0.2 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ height: number; - /** - * The rotation of the generated text - * @default 0 - * @minimum 0 - * @maximum Infinity - * @step 15 - */ rotation: number; - /** - * Origin u param for the text 0 - 1 - * @default 0.5 - * @minimum 0 - * @maximum 1 - * @step 0.1 - */ originParamU: number; - /** - * Origin v param for the text 0 - 1 - * @default 0.5 - * @minimum 0 - * @maximum 1 - * @step 0.1 - */ originParamV: number; - /** - * Origin alignment - * @default centerMiddle - */ originAlignment: recAlignmentEnum; - } declare class Text3DLetterByIndexDto { - /** - * The model that represents result of the text3d create operation - * @default undefined - */ + } + declare class Text3DFaceUrlDto { + constructor(face?: T, facePlanar?: boolean, faceTextVar?: faceTextVarEnum, text?: string, fontUrl?: string, fontSize?: number, height?: number, rotation?: number, originParamU?: number, originParamV?: number, originAlignment?: recAlignmentEnum); + face: T; + facePlanar: boolean; + faceTextVar: faceTextVarEnum; + text: string; + fontUrl: string; + fontSize: number; + height: number; + rotation: number; + originParamU: number; + originParamV: number; + originAlignment: recAlignmentEnum; + } + declare class Text3DFaceUrlParsedDto { + constructor(face?: T, facePlanar?: boolean, faceTextVar?: faceTextVarEnum, text?: string, letterPaths?: any, fontSize?: number, height?: number, rotation?: number, originParamU?: number, originParamV?: number, originAlignment?: recAlignmentEnum); + face: T; + facePlanar: boolean; + faceTextVar: faceTextVarEnum; + text: string; + letterPaths: any; + fontSize: number; + height: number; + rotation: number; + originParamU: number; + originParamV: number; + originAlignment: recAlignmentEnum; + } + declare class Text3DLetterByIndexDto { model: Text3DData; - /** - * The index of the letter to be returned - * @default 0 - * @minimum 0 - * @maximum Infinity - * @step 1 - */ index: number; - } declare class Text3DModelDto { - /** - * The model that represents result of the text3d create operation - * @default undefined - */ + } + declare class Text3DModelDto { model: Text3DData; - } declare class Texts3DFaceDto { + } + declare class Text3DUrlDto { + constructor(text?: string, fontUrl?: string, fontSize?: number, height?: number, rotation?: number, origin?: Inputs.Base.Vector3, direction?: Inputs.Base.Vector3, originAlignment?: recAlignmentEnum); + text: string; + fontUrl: string; + fontSize: number; + height: number; + rotation: number; + origin: Inputs.Base.Vector3; + direction: Inputs.Base.Vector3; + originAlignment: recAlignmentEnum; + } + declare class Text3DUrlParsedDto { + constructor(text?: string, letterPaths?: any, fontSize?: number, height?: number, rotation?: number, origin?: Inputs.Base.Vector3, direction?: Inputs.Base.Vector3, originAlignment?: recAlignmentEnum); + text: string; + letterPaths: any; + fontSize: number; + height: number; + rotation: number; + origin: Inputs.Base.Vector3; + direction: Inputs.Base.Vector3; + originAlignment: recAlignmentEnum; + } + declare class Texts3DFaceDto { constructor(face: T, facePlanar?: boolean, definitions?: Text3DFaceDefinitionDto[]); - /** - * The face of the text - * @default undefined - */ face: T; - /** - * If the face is planar it should be true - * @default false - */ facePlanar: boolean; - /** - * The definitions of texts to create on the face - * @default undefined - */ definitions: Text3DFaceDefinitionDto[]; } + declare class Texts3DFaceUrlDto { + constructor(face: T, facePlanar?: boolean, definitions?: Text3DFaceDefinitionUrlDto[]); + face: T; + facePlanar: boolean; + definitions: Text3DFaceDefinitionUrlDto[]; + } + declare class Texts3DFaceUrlParsedDto { + constructor(face: T, facePlanar?: boolean, definitions?: Text3DFaceDefinitionUrlParsedDto[]); + face: T; + facePlanar: boolean; + definitions: Text3DFaceDefinitionUrlParsedDto[]; + } } declare namespace Patterns { declare namespace FacePatterns { declare namespace PyramidSimple { declare class PyramidSimpleAffectorsDto { constructor(faces?: T[], affectorPoints?: Inputs.Base.Point3[], uNumber?: number, vNumber?: number, minHeight?: number, maxHeight?: number, precision?: number); - /** - * The faces on which to apply the pattern - * @default undefined - */ faces: T[]; - /** - * The affector points affect the height of the pyramid elements. The distance is measured between a center point of the corner points and the attractor point. Then it is remapped to certain values. - * @default undefined - */ affectorPoints: Inputs.Base.Point3[]; - /** - * The affector radius indicates the limit of affection. Cells heights that are further away from the affector than this radius will not be adjusted. If value is not provided, all affector points will use the radius of 10. - * @default undefined - * @optional true - */ affectorRadiusList?: number[]; - /** - * The affector factors determine if a given affector attracts (value 0 to 1) or repulses (values -1 to 0) the default height of the pyramid elements. - * If value is not provided, all affector points will use the factor of 1 and will thus attract the heights. - * @default undefined - * @optional true - */ affectorFactors?: number[]; - /** - * The nr of pyramids along u direction of the face - * @default 10 - * @minimum 1 - * @maximum Infinity - * @step 1 - */ uNumber: number; - /** - * The nr of pyramids along v direction of the face - * @default 5 - * @minimum 1 - * @maximum Infinity - * @step 1 - */ vNumber: number; - /** - * The default height for the pyramid if it is not affected by any of the affectors. - * @default 0.2 - * @minimum -Infinity - * @maximum Infinity - * @step 0.1 - */ defaultHeight: number; - /** - * Min value to add to the height if affector factor is 1 or subtract from the height if affector factor is -1. - * This adds to the height if the affector factor > 0 and subtracts from the height if the affector factor is < 0. - * @default 0 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ affectMinHeight: number; - /** - * Max value to add to the height if affector factor is 1 or subtract from the height if affector factor is -1. - * This adds to the height if the affector factor > 0 and subtracts from the height if the affector factor is < 0. - * @default 1 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ affectMaxHeight: number; - /** - * Meshing precision of the drawn model. The lower the number the more precise the drawn model is. Keep in mind that output of this algorithm also contains pure occt shape that can be meshed separately in draw any async commands - * @default 0.01 - * @minimum 0.000001 - * @maximum 5 - * @step 0.001 - */ precision: number; - } declare class PyramidSimpeByIndexDto { - /** - * The model that represents result of the pyramid - * @default undefined - */ + } + declare class PyramidSimpeByIndexDto { model: PyramidSimpleData; - /** - * The index of pyramid element to be returned - * @default 0 - * @minimum 0 - * @maximum Infinity - * @step 1 - */ index: number; - } declare class PyramidSimpleCellPart { + } + declare class PyramidSimpleCellPart { id: string; uIndex: number; vIndex: number; @@ -23467,79 +8648,26 @@ declare namespace Bit { face4?: T; compound?: T; }; - } declare class PyramidSimpleData { - /** - * Type of the object being configured - */ + } + declare class PyramidSimpleData { type: string; - /** - * Default name of the object - */ name: string; - /** - * Original inputs - */ originalInputs?: PyramidSimpleDto | PyramidSimpleAffectorsDto; - /** - * Compounded shape of the pyramids - */ compound?: T; - /** - * All the shapes of the pyramid - */ shapes?: Models.OCCT.ShapeWithId[]; - /** - * Data that contains information and shapes about each face on which pyramids were computed - */ faceParts?: PyramidSimpleFacePart[]; - /** - * All the pyramid top coordinates - */ topCoordinates: Inputs.Base.Point3[]; - } declare class PyramidSimpleDto { + } + declare class PyramidSimpleDto { constructor(faces?: T[], uNumber?: number, vNumber?: number, height?: number); - /** - * The faces on which to apply the pattern - * @default undefined - */ faces: T[]; - /** - * The nr of pyramids along u direction of the face - * @default 10 - * @minimum 1 - * @maximum Infinity - * @step 1 - */ uNumber: number; - /** - * The nr of pyramids along v direction of the face - * @default 10 - * @minimum 1 - * @maximum Infinity - * @step 1 - */ vNumber: number; - /** - * The height of the pyramid - * @default 0.2 - * @minimum -Infinity - * @maximum Infinity - * @step 0.1 - */ height: number; - /** - * Meshing precision of the drawn model. The lower the number the more precise the drawn model is. Keep in mind that output of this algorithm also contains pure occt shape that can be meshed separately in draw any async commands - * @default 0.01 - * @minimum 0.000001 - * @maximum 5 - * @step 0.001 - */ precision: number; - } declare class PyramidSimpleFacePart { + } + declare class PyramidSimpleFacePart { id: string; - /** - * Data that contains information and shapes of the top part of the table - */ cells?: PyramidSimpleCellPart[]; shapes?: { compound?: T; @@ -23551,325 +8679,260 @@ declare namespace Bit { compoundPolylineWiresV?: T; compoundPolylineWiresUV?: T; }; - } declare class PyramidSimpleModelCellDto { - /** - * The part that represents the cell of the pyramid - * @default undefined - */ + } + declare class PyramidSimpleModelCellDto { cells: PyramidSimpleCellPart; - } declare class PyramidSimpleModelCellsDto { - /** - * The part that represents the cells of the pyramid - * @default undefined - */ + } + declare class PyramidSimpleModelCellsDto { cells: PyramidSimpleCellPart[]; - } declare class PyramidSimpleModelCellsIndexDto { - /** - * The part that represents the cells of the pyramid - * @default undefined - */ + } + declare class PyramidSimpleModelCellsIndexDto { cells: PyramidSimpleCellPart[]; - /** - * The index that can represent a corner, face or a wire in the pyramid - * @default 0 - * @minimum 0 - * @maximum 3 - * @step 1 - */ index: number; - } declare class PyramidSimpleModelDto { - /** - * The model that represents result of the pyramid create operation - * @default undefined - */ + } + declare class PyramidSimpleModelDto { model: PyramidSimpleData; - } declare class PyramidSimpleModelFaceCellIndexDto { - /** - * The model that represents result of the pyramid create operation - * @default undefined - */ + } + declare class PyramidSimpleModelFaceCellIndexDto { model: PyramidSimpleData; - /** - * Face index for the pyramid queries - * @default 0 - * @minimum 0 - * @maximum Infinity - * @step 1 - */ faceIndex: number; - /** - * Cell u index for the pyramid - * @default 0 - * @minimum 0 - * @maximum Infinity - * @step 1 - */ uIndex: number; - /** - * Cell v index for the pyramid - * @default 0 - * @minimum 0 - * @maximum Infinity - * @step 1 - */ vIndex: number; - } declare class PyramidSimpleModelFaceCellsUIndexDto { - /** - * The model that represents result of the pyramid create operation - * @default undefined - */ + } + declare class PyramidSimpleModelFaceCellsUIndexDto { model: PyramidSimpleData; - /** - * Face index for the pyramid queries - * @default 0 - * @minimum 0 - * @maximum Infinity - * @step 1 - */ faceIndex: number; - /** - * U index of the pyramid cells - * @default 0 - * @minimum 0 - * @maximum Infinity - * @step 1 - */ uIndex: number; - } declare class PyramidSimpleModelFaceCellsVIndexDto { - /** - * The model that represents result of the pyramid create operation - * @default undefined - */ + } + declare class PyramidSimpleModelFaceCellsVIndexDto { model: PyramidSimpleData; - /** - * Face index for the pyramid queries - * @default 0 - * @minimum 0 - * @maximum Infinity - * @step 1 - */ faceIndex: number; - /** - * V index of the pyramid cells - * @default 0 - * @minimum 0 - * @maximum Infinity - * @step 1 - */ vIndex: number; - } declare class PyramidSimpleModelFaceIndexDto { - /** - * The model that represents result of the pyramid create operation - * @default undefined - */ + } + declare class PyramidSimpleModelFaceIndexDto { model: PyramidSimpleData; - /** - * Face index for the pyramid queries - * @default 0 - * @minimum 0 - * @maximum Infinity - * @step 1 - */ faceIndex: number; } } } } - } - - /** - * This should be used only if you want to use only JSCAD worker without other of the bitbybit packages - */ - declare class BitByBitJSCAD { - jscadWorkerManager: JSCADWorkerManager; - jscad: JSCAD; - constructor(); - init(jscad: Worker): void; - }/** - * Contains various functions for Solid booleans from JSCAD library https://github.com/jscad/OpenJSCAD.org - * Thanks JSCAD community for developing this kernel - */ - declare class JSCADBooleans { - private readonly jscadWorkerManager; - constructor(jscadWorkerManager: JSCADWorkerManager); - /** - * Intersect multiple solid mesh objects - * @param inputs Contains multiple solids for intersection - * @returns Solid mesh - * @group boolean - * @shortname intersect - * @drawable true - */ - intersect(inputs: Inputs.JSCAD.BooleanObjectsDto): Promise; - /** - * Subtract multiple solid mesh objects - * @param inputs Contains multiple solids for subtraction - * @returns Solid mesh - * @group boolean - * @shortname subtract - * @drawable true - */ - subtract(inputs: Inputs.JSCAD.BooleanObjectsDto): Promise; - /** - * Union multiple solid mesh objects - * @param inputs Contains multiple solids for union - * @returns Solid mesh - * @group boolean - * @shortname union - * @drawable true - */ - union(inputs: Inputs.JSCAD.BooleanObjectsDto): Promise; - /** - * Intersect two solid mesh objects - * @param inputs Contains multiple solids for intersection - * @returns Solid mesh - * @group boolean - * @shortname intersect two - * @drawable true - */ - intersectTwo(inputs: Inputs.JSCAD.BooleanTwoObjectsDto): Promise; - /** - * Subtract two solid mesh objects - * @param inputs Contains multiple solids for subtraction - * @returns Solid mesh - * @group boolean - * @shortname subtract two - * @drawable true - */ - subtractTwo(inputs: Inputs.JSCAD.BooleanTwoObjectsDto): Promise; - /** - * Union two solid mesh objects - * @param inputs Contains multiple solids for union - * @returns Solid mesh - * @group boolean - * @shortname union two - * @drawable true - */ - unionTwo(inputs: Inputs.JSCAD.BooleanTwoObjectsDto): Promise; - /** - * Subtract multiple meshes from one mesh object - * @param inputs Contains mesh from which to subtract and multiple meshes for subtraction - * @returns mesh - * @group boolean - * @shortname subtract from - * @drawable true - */ - subtractFrom(inputs: Inputs.JSCAD.BooleanObjectsFromDto): Promise; - }/** - * Contains functions for colorizing objects - */ - declare class JSCADColors { - private readonly jscadWorkerManager; - constructor(jscadWorkerManager: JSCADWorkerManager); - /** - * Colorizes geometry of jscad. If geometry is in the array it will colorize all items and return them. If geometry is a single item it will return a single item. - * Keep in mind that colorized geometry in jscad will always be drawn in that color even if you try to change it via draw options. - * @param inputs contain geometry and hex color - * @returns Colorized geometry of jsacd - * @group colorize - * @shortname colorize geometry - * @drawable true - */ - colorize(inputs: Inputs.JSCAD.ColorizeDto): Promise; - }/** - * Contains various functions for Solid expansions from JSCAD library https://github.com/jscad/OpenJSCAD.org - * Thanks JSCAD community for developing this kernel - */ - declare class JSCADExpansions { - private readonly jscadWorkerManager; - constructor(jscadWorkerManager: JSCADWorkerManager); - /** - * Expand geometries of solid category - * @param inputs Contains options and geometries for expansion - * @returns Expanded geometry - * @group expansion - * @shortname expand - * @drawable true - */ - expand(inputs: Inputs.JSCAD.ExpansionDto): Promise; - /** - * Offset 2d geometries of solid category - * @param inputs Contains options and geometries for offset - * @returns Expanded geometry - * @group expansion - * @shortname offset - * @drawable true - */ - offset(inputs: Inputs.JSCAD.ExpansionDto): Promise; - }/** - * Contains various functions for Solid extrusions from JSCAD library https://github.com/jscad/OpenJSCAD.org - * Thanks JSCAD community for developing this kernel - */ - declare class JSCADExtrusions { - private readonly jscadWorkerManager; - constructor(jscadWorkerManager: JSCADWorkerManager); - /** - * Linear extrude 2D geometries of solid category - * @param inputs Contains options and geometries for linear extrude - * @returns Extruded geometry - * @group extrude - * @shortname linear - * @drawable true - */ - extrudeLinear(inputs: Inputs.JSCAD.ExtrudeLinearDto): Promise; - /** - * Rectangular extrude 2D geometries of solid category. Creates a wall-type extrusion of certain height and size. - * @param inputs Contains options and geometries for rectangular extrude - * @returns Extruded geometry - * @group extrude - * @shortname rectangular - * @drawable true - */ - extrudeRectangular(inputs: Inputs.JSCAD.ExtrudeRectangularDto): Promise; - /** - * Rectangular extrude a list of 2D points. Creates a wall-type extrusion of certain height and size. - * @param inputs Contains options and points for extrusion - * @returns Extruded geometry - * @group extrude - * @shortname rectangular points - * @drawable true - */ - extrudeRectangularPoints(inputs: Inputs.JSCAD.ExtrudeRectangularPointsDto): Promise; - /** - * Rectangular extrude a list of 2D points. Creates a wall-type extrusion of certain height and size. - * @param inputs Contains options and points for extrusion - * @returns Extruded geometry - * @group extrude - * @shortname rotational - * @drawable true - */ + declare namespace Navigation { + declare class FocusFromAngleDto { + constructor(meshes?: BABYLON.Mesh[], includeChildren?: boolean, orientation?: number[], distance?: number, padding?: number, animationSpeed?: number); + meshes: BABYLON.Mesh[]; + includeChildren: boolean; + orientation: number[]; + distance?: number; + padding: number; + animationSpeed: number; + } + declare class PointOfInterestDto { + constructor(name?: string, position?: Inputs.Base.Point3, cameraTarget?: Inputs.Base.Point3, cameraPosition?: Inputs.Base.Point3, style?: PointOfInterestStyleDto); + name: string; + position: Inputs.Base.Point3; + cameraTarget: Inputs.Base.Point3; + cameraPosition: Inputs.Base.Point3; + style?: PointOfInterestStyleDto; + } + declare class PointOfInterestEntity extends PointOfInterestDto { + type: string; + entityName: string; + } + declare class PointOfInterestStyleDto { + constructor(pointSize?: number, pointColor?: string, hoverPointColor?: string, pulseColor?: string, pulseMinSize?: number, pulseMaxSize?: number, pulseThickness?: number, pulseSpeed?: number, textColor?: string, hoverTextColor?: string, textSize?: number, textFontWeight?: number, textBackgroundColor?: string, textBackgroundOpacity?: number, textBackgroundStroke?: boolean, textBackgroundStrokeThickness?: number, textBackgroundRadius?: number, textPosition?: Inputs.Base.topBottomEnum, stableSize?: boolean, alwaysOnTop?: boolean); + pointSize?: number; + pointColor?: Inputs.Base.Color; + hoverPointColor?: Inputs.Base.Color; + pulseColor?: Inputs.Base.Color; + hoverPulseColor?: Inputs.Base.Color; + pulseMinSize?: number; + pulseMaxSize?: number; + pulseThickness?: number; + pulseSpeed?: number; + textColor?: Inputs.Base.Color; + hoverTextColor?: Inputs.Base.Color; + textSize?: number; + textFontWeight?: number; + textBackgroundColor?: Inputs.Base.Color; + textBackgroundOpacity: number; + textBackgroundStroke: boolean; + textBackgroundStrokeThickness: number; + textBackgroundRadius: number; + textPosition: Inputs.Base.topBottomEnum; + stableSize: boolean; + alwaysOnTop: boolean; + } + declare class ZoomOnDto { + constructor(meshes?: BABYLON.Mesh[], includeChildren?: boolean, animationSpeed?: number, offset?: number, doNotUpdateMaxZ?: boolean); + meshes: BABYLON.Mesh[]; + includeChildren: boolean; + animationSpeed: number; + offset: number; + doNotUpdateMaxZ: boolean; + } + } + declare namespace Dimensions { + declare class AngularDimensionDto { + constructor(centerPoint?: Inputs.Base.Point3, direction1?: Inputs.Base.Vector3, direction2?: Inputs.Base.Vector3, radius?: number, labelOffset?: number, decimalPlaces?: number, labelSuffix?: string, labelOverwrite?: string, radians?: boolean, removeTrailingZeros?: boolean, style?: DimensionStyleDto); + centerPoint: Inputs.Base.Point3; + direction1: Inputs.Base.Vector3; + direction2: Inputs.Base.Vector3; + radius: number; + labelOffset: number; + decimalPlaces: number; + labelSuffix: string; + labelOverwrite: string; + radians: boolean; + removeTrailingZeros: boolean; + style?: DimensionStyleDto; + } + declare class AngularDimensionEntity extends AngularDimensionDto { + type: string; + entityName: string; + id?: string; + } + declare class DiametralDimensionDto { + constructor(centerPoint?: Inputs.Base.Point3, direction?: Inputs.Base.Vector3, diameter?: number, labelOffset?: number, decimalPlaces?: number, labelSuffix?: string, labelOverwrite?: string, showCenterMark?: boolean, removeTrailingZeros?: boolean, style?: DimensionStyleDto); + centerPoint: Inputs.Base.Point3; + direction: Inputs.Base.Vector3; + diameter: number; + labelOffset: number; + decimalPlaces: number; + labelSuffix: string; + labelOverwrite: string; + showCenterMark: boolean; + removeTrailingZeros: boolean; + style?: DimensionStyleDto; + } + declare class DiametralDimensionEntity extends DiametralDimensionDto { + type: string; + entityName: string; + id?: string; + } + declare class DimensionStyleDto { + constructor(lineColor?: string, lineThickness?: number, extensionLineLength?: number, arrowTailLength?: number, textColor?: string, textSize?: number, textFontWeight?: number, textBackgroundColor?: string, textBackgroundOpacity?: number, textBackgroundStroke?: boolean, textBackgroundStrokeThickness?: number, textBackgroundRadius?: number, textStableSize?: boolean, arrowSize?: number, arrowColor?: string, showArrows?: boolean, textBillboard?: boolean, occlusionCheckInterval?: number, alwaysOnTop?: boolean); + lineColor: Inputs.Base.Color; + lineThickness: number; + extensionLineLength: number; + arrowTailLength: number; + textColor: Inputs.Base.Color; + textSize: number; + textFontWeight: number; + textBackgroundColor: Inputs.Base.Color; + textBackgroundOpacity: number; + textBackgroundStroke: boolean; + textBackgroundStrokeThickness: number; + textBackgroundRadius: number; + textStableSize: boolean; + arrowSize: number; + arrowColor: Inputs.Base.Color; + showArrows: boolean; + textBillboard: boolean; + occlusionCheckInterval: number; + alwaysOnTop: boolean; + } + declare class LinearDimensionDto { + constructor(startPoint?: Inputs.Base.Point3, endPoint?: Inputs.Base.Point3, direction?: Inputs.Base.Vector3, labelOffset?: number, decimalPlaces?: number, labelSuffix?: string, labelOverwrite?: string, removeTrailingZeros?: boolean, style?: DimensionStyleDto); + startPoint: Inputs.Base.Point3; + endPoint: Inputs.Base.Point3; + direction: Inputs.Base.Vector3; + labelOffset: number; + decimalPlaces: number; + labelSuffix: string; + labelOverwrite: string; + removeTrailingZeros: boolean; + style?: DimensionStyleDto; + } + declare class LinearDimensionEntity extends LinearDimensionDto { + type: string; + entityName: string; + id?: string; + } + declare enum ordinateAxisEnum { + x = "x", + y = "y", + z = "z" + } + declare class OrdinateDimensionDto { + constructor(measurementPoint?: Inputs.Base.Point3, referencePoint?: Inputs.Base.Point3, axis?: ordinateAxisEnum, labelOffset?: number, decimalPlaces?: number, labelSuffix?: string, labelOverwrite?: string, showLeaderLine?: boolean, removeTrailingZeros?: boolean, style?: DimensionStyleDto); + measurementPoint: Inputs.Base.Point3; + referencePoint: Inputs.Base.Point3; + axis: ordinateAxisEnum; + labelOffset: number; + decimalPlaces: number; + labelSuffix: string; + labelOverwrite: string; + showLeaderLine: boolean; + removeTrailingZeros: boolean; + style?: DimensionStyleDto; + } + declare class OrdinateDimensionEntity extends OrdinateDimensionDto { + type: string; + entityName: string; + id?: string; + } + declare class RadialDimensionDto { + constructor(centerPoint?: Inputs.Base.Point3, radiusPoint?: Inputs.Base.Point3, labelOffset?: number, decimalPlaces?: number, labelSuffix?: string, labelOverwrite?: string, showDiameter?: boolean, showCenterMark?: boolean, removeTrailingZeros?: boolean, style?: DimensionStyleDto); + centerPoint: Inputs.Base.Point3; + radiusPoint: Inputs.Base.Point3; + labelOffset: number; + decimalPlaces: number; + labelSuffix: string; + labelOverwrite: string; + showDiameter: boolean; + showCenterMark: boolean; + removeTrailingZeros: boolean; + style?: DimensionStyleDto; + } + declare class RadialDimensionEntity extends RadialDimensionDto { + type: string; + entityName: string; + id?: string; + } + } + } + declare class BitByBitJSCAD { + jscadWorkerManager: JSCADWorkerManager; + jscad: JSCAD; + constructor(); + init(jscad: Worker): void; + } + declare class JSCADBooleans { + private readonly jscadWorkerManager; + constructor(jscadWorkerManager: JSCADWorkerManager); + intersect(inputs: Inputs.JSCAD.BooleanObjectsDto): Promise; + subtract(inputs: Inputs.JSCAD.BooleanObjectsDto): Promise; + union(inputs: Inputs.JSCAD.BooleanObjectsDto): Promise; + intersectTwo(inputs: Inputs.JSCAD.BooleanTwoObjectsDto): Promise; + subtractTwo(inputs: Inputs.JSCAD.BooleanTwoObjectsDto): Promise; + unionTwo(inputs: Inputs.JSCAD.BooleanTwoObjectsDto): Promise; + subtractFrom(inputs: Inputs.JSCAD.BooleanObjectsFromDto): Promise; + } + declare class JSCADColors { + private readonly jscadWorkerManager; + constructor(jscadWorkerManager: JSCADWorkerManager); + colorize(inputs: Inputs.JSCAD.ColorizeDto): Promise; + } + declare class JSCADExpansions { + private readonly jscadWorkerManager; + constructor(jscadWorkerManager: JSCADWorkerManager); + expand(inputs: Inputs.JSCAD.ExpansionDto): Promise; + offset(inputs: Inputs.JSCAD.ExpansionDto): Promise; + } + declare class JSCADExtrusions { + private readonly jscadWorkerManager; + constructor(jscadWorkerManager: JSCADWorkerManager); + extrudeLinear(inputs: Inputs.JSCAD.ExtrudeLinearDto): Promise; + extrudeRectangular(inputs: Inputs.JSCAD.ExtrudeRectangularDto): Promise; + extrudeRectangularPoints(inputs: Inputs.JSCAD.ExtrudeRectangularPointsDto): Promise; extrudeRotate(inputs: Inputs.JSCAD.ExtrudeRotateDto): Promise; - }/** - * Contains various functions for Solid hulls from JSCAD library https://github.com/jscad/OpenJSCAD.org - * Thanks JSCAD community for developing this kernel - */ + } declare class JSCADHulls { private readonly jscadWorkerManager; constructor(jscadWorkerManager: JSCADWorkerManager); - /** - * Hull chain connects solids or 2d geometries by filling an empty space in between objects in order. - * Geometries need to be of the same type. - * @param inputs Geometries - * @returns Chain hulled geometry - * @group hulls - * @shortname hull chain - * @drawable true - */ hullChain(inputs: Inputs.JSCAD.HullDto): Promise; - /** - * Convex hull connects solids or 2d geometries by filling an empty space in between without following order. - * Geometries need to be of the same type. - * @param inputs Geometries - * @returns Hulled geometry - * @group hulls - * @shortname hull - * @drawable true - */ hull(inputs: Inputs.JSCAD.HullDto): Promise; - }/** - * Contains various functions for Solid meshes from JSCAD library https://github.com/jscad/OpenJSCAD.org - * Thanks JSCAD community for developing this kernel - */ + } declare class JSCAD { private readonly jscadWorkerManager; readonly booleans: JSCADBooleans; @@ -23882,559 +8945,91 @@ declare namespace Bit { readonly text: JSCADText; readonly colors: JSCADColors; constructor(jscadWorkerManager: JSCADWorkerManager); - /** - * Converts the Jscad mesh to polygon points representing triangles of the mesh. - * @param inputs Jscad mesh - * @returns polygon points - * @group conversions - * @shortname to polygon points - * @drawable false - */ toPolygonPoints(inputs: Inputs.JSCAD.MeshDto): Promise; - /** - * Transforms the Jscad solid meshes with a given list of transformations. - * @param inputs Solids with the transformation matrixes - * @returns Solids with a transformation - * @group transforms - * @shortname transform solids - * @drawable true - */ transformSolids(inputs: Inputs.JSCAD.TransformSolidsDto): Promise; - /** - * Transforms the Jscad solid mesh with a given list of transformations. - * @param inputs Solid with the transformation matrixes - * @returns Solid with a transformation - * @group transforms - * @shortname transform solid - * @drawable true - */ transformSolid(inputs: Inputs.JSCAD.TransformSolidDto): Promise; - /** - * Downloads the binary STL file from a 3D solid - * @param inputs 3D Solid - * @group io - * @shortname solid to stl - */ downloadSolidSTL(inputs: Inputs.JSCAD.DownloadSolidDto): Promise; - /** - * Downloads the binary STL file from a 3D solids - * @param inputs 3D Solid - * @group io - * @shortname solids to stl - */ downloadSolidsSTL(inputs: Inputs.JSCAD.DownloadSolidsDto): Promise; - /** - * Downloads the dxf file from jscad geometry. Supports paths and meshes in array. - * @param inputs 3D geometry - * @group io - * @shortname geometry to dxf - */ downloadGeometryDxf(inputs: Inputs.JSCAD.DownloadGeometryDto): Promise; - /** - * Downloads the 3MF file from jscad geometry. - * @param inputs 3D geometry - * @group io - * @shortname geometry to 3mf - */ downloadGeometry3MF(inputs: Inputs.JSCAD.DownloadGeometryDto): Promise; private downloadFile; - }/** - * Contains various functions for Path from JSCAD library https://github.com/jscad/OpenJSCAD.org - * Thanks JSCAD community for developing this kernel - */ + } declare class JSCADPath { private readonly jscadWorkerManager; constructor(jscadWorkerManager: JSCADWorkerManager); - /** - * Create a 2D path from a list of points - * @param inputs Points and indication if we want a closed path or not - * @returns Path - * @group from - * @shortname points - * @drawable true - */ createFromPoints(inputs: Inputs.JSCAD.PathFromPointsDto): Promise; - /** - * Create 2D paths from a lists of points - * @param inputs Points lists - * @returns Paths - * @group from - * @shortname paths from points - * @drawable true - */ createPathsFromPoints(inputs: Inputs.JSCAD.PathsFromPointsDto): Promise; - /** - * Create a 2D path from a polyline - * @param inputs Polyline and indication if we want a closed path or not - * @returns Path - * @group from - * @shortname polyline - * @drawable true - */ createFromPolyline(inputs: Inputs.JSCAD.PathFromPolylineDto): Promise; - /** - * Create empty 2D path - * @returns Empty path - * @group create - * @shortname empty - * @drawable false - */ createEmpty(): Promise; - /** - * Closes an open 2D path - * @param inputs Path - * @returns Closed path - * @group edit - * @shortname close - * @drawable true - */ close(inputs: Inputs.JSCAD.PathDto): Promise; - /** - * Append the path with 2D points - * @param inputs Path to append and points - * @returns Appended path - * @group append - * @shortname points - * @drawable true - */ appendPoints(inputs: Inputs.JSCAD.PathAppendPointsDto): Promise; - /** - * Append the path with polyline - * @param inputs Path to append and polyline - * @returns Appended path - * @group append - * @shortname polyline - * @drawable true - */ appendPolyline(inputs: Inputs.JSCAD.PathAppendPolylineDto): Promise; - /** - * Append the arc to the path - * @param inputs Path and arc parameters - * @returns Appended path - * @group append - * @shortname arc - * @drawable true - */ appendArc(inputs: Inputs.JSCAD.PathAppendArcDto): Promise; - }/** - * Contains various functions for Polygon from JSCAD library https://github.com/jscad/OpenJSCAD.org - * Thanks JSCAD community for developing this kernel - */ + } declare class JSCADPolygon { private readonly jscadWorkerManager; constructor(jscadWorkerManager: JSCADWorkerManager); - /** - * Create a 2D polygon from a list of points - * @param inputs Points - * @returns Polygons - * @group from - * @shortname polygon from points - * @drawable true - */ createFromPoints(inputs: Inputs.JSCAD.PointsDto): Promise; - /** - * Create a 2D polygon from a polyline - * @param inputs Polyline - * @returns Polygon - * @group from - * @shortname polyline - * @drawable true - */ createFromPolyline(inputs: Inputs.JSCAD.PolylineDto): Promise; - /** - * Create a 2D polygon from a curve - * @param inputs Nurbs curve - * @returns Polygon - * @group from - * @shortname curve - * @drawable true - */ createFromCurve(inputs: Inputs.JSCAD.CurveDto): Promise; - /** - * Create a 2D polygon from a path - * @param inputs Path - * @returns Polygon - * @group from - * @shortname path - * @drawable true - */ createFromPath(inputs: Inputs.JSCAD.PathDto): Promise; - /** - * Create a 2D polygon circle - * @param inputs Circle parameters - * @returns Circle polygon - * @group primitives - * @shortname circle - * @drawable true - */ circle(inputs: Inputs.JSCAD.CircleDto): Promise; - /** - * Create a 2D polygon ellipse - * @param inputs Ellipse parameters - * @returns Ellipse polygon - * @group primitives - * @shortname ellipse - * @drawable true - */ ellipse(inputs: Inputs.JSCAD.EllipseDto): Promise; - /** - * Create a 2D polygon rectangle - * @param inputs Rectangle parameters - * @returns Rectangle polygon - * @group primitives - * @shortname rectangle - * @drawable true - */ rectangle(inputs: Inputs.JSCAD.RectangleDto): Promise; - /** - * Create a 2D rounded rectangle - * @param inputs Rounded rectangle parameters - * @returns Rounded rectangle polygon - * @group primitives - * @shortname rounded rectangle - * @drawable true - */ roundedRectangle(inputs: Inputs.JSCAD.RoundedRectangleDto): Promise; - /** - * Create a 2D polygon square - * @param inputs Square parameters - * @returns Square polygon - * @group primitives - * @shortname square - * @drawable true - */ square(inputs: Inputs.JSCAD.SquareDto): Promise; - /** - * Create a 2D polygon star - * @param inputs Star parameters - * @returns Star polygon - * @group primitives - * @shortname star - * @drawable true - */ star(inputs: Inputs.JSCAD.StarDto): Promise; - }/** - * Contains various functions for solid 3D shapes from JSCAD library https://github.com/jscad/OpenJSCAD.org - * Thanks JSCAD community for developing this kernel - */ + } declare class JSCADShapes { private readonly jscadWorkerManager; constructor(jscadWorkerManager: JSCADWorkerManager); - /** - * Create a 3D cube shape - * @param inputs Cube parameters - * @returns Cube solid - * @group primitives - * @shortname cube - * @drawable true - */ cube(inputs: Inputs.JSCAD.CubeDto): Promise; - /** - * Create a 3D cubes on multiple center points - * @param inputs Cube with multiple center points parameters - * @returns List of cube solids - * @group primitives on centers - * @shortname cubes - * @drawable true - */ cubesOnCenterPoints(inputs: Inputs.JSCAD.CubeCentersDto): Promise; - /** - * Create a 3D cuboid shape - * @param inputs Cuboid parameters - * @returns Cuboid solid - * @group primitives - * @shortname cuboid - * @drawable true - */ cuboid(inputs: Inputs.JSCAD.CuboidDto): Promise; - /** - * Create a 3D cuboids on multiple center points - * @param inputs Cuboids with multiple center point parameters - * @returns List of cuboid solids - * @group primitives on centers - * @shortname cuboids - * @drawable true - */ cuboidsOnCenterPoints(inputs: Inputs.JSCAD.CuboidCentersDto): Promise; - /** - * Create a 3D elliptic cylinder solid - * @param inputs Elliptic cylinder parameters - * @returns Elliptic cylinder solid - * @group primitives - * @shortname cylinder elliptic - * @drawable true - */ cylinderElliptic(inputs: Inputs.JSCAD.CylidnerEllipticDto): Promise; - /** - * Create a 3D elliptic cylinders on multiple center points - * @param inputs Elliptic cylinders with multiple center point parameters - * @returns List of elliptic cylinders solids - * @group primitives on centers - * @shortname cylinder elliptic - * @drawable true - */ cylinderEllipticOnCenterPoints(inputs: Inputs.JSCAD.CylidnerCentersEllipticDto): Promise; - /** - * Create a 3D cylinder solid - * @param inputs Cylinder parameters - * @returns Cylinder solid - * @group primitives - * @shortname cylinder - * @drawable true - */ cylinder(inputs: Inputs.JSCAD.CylidnerDto): Promise; - /** - * Create a 3D cylinders on multiple center points - * @param inputs Cylinders with multiple center point parameters - * @returns List of cylinder solids - * @group primitives on centers - * @shortname cylinder - * @drawable true - */ cylindersOnCenterPoints(inputs: Inputs.JSCAD.CylidnerCentersDto): Promise; - /** - * Create a 3D ellipsoid solid - * @param inputs Ellipsoid parameters - * @returns Ellipsoid solid - * @group primitives - * @shortname ellipsoid - * @drawable true - */ ellipsoid(inputs: Inputs.JSCAD.EllipsoidDto): Promise; - /** - * Create a 3D ellipsoids on multiple center points - * @param inputs Ellipsoid parameters with multiple center points - * @returns List of ellipsoid solids - * @group primitives on centers - * @shortname ellipsoid - * @drawable true - */ ellipsoidsOnCenterPoints(inputs: Inputs.JSCAD.EllipsoidCentersDto): Promise; - /** - * Create a 3D geodesic sphere solid - * @param inputs Geodesic sphere parameters - * @returns Geodesic sphere solid - * @group primitives - * @shortname geodesic sphere - * @drawable true - */ geodesicSphere(inputs: Inputs.JSCAD.GeodesicSphereDto): Promise; - /** - * Create a 3D geodesic spheres on multiple center points - * @param inputs Geodesic sphere parameters with multiple center points - * @returns List of geodesic spheres - * @group primitives on centers - * @shortname geodesic sphere - * @drawable true - */ geodesicSpheresOnCenterPoints(inputs: Inputs.JSCAD.GeodesicSphereCentersDto): Promise; - /** - * Create a 3D rounded cuboid solid - * @param inputs Rounded cuboid parameters - * @returns Rounded cuboid solid - * @group primitives - * @shortname rounded cuboid - * @drawable true - */ roundedCuboid(inputs: Inputs.JSCAD.RoundedCuboidDto): Promise; - /** - * Create a 3D rounded cuboids on multiple center points - * @param inputs Rounded cuboids parameters with multiple center points - * @returns List of rounded cuboids - * @group primitives on centers - * @shortname rounded cuboid - * @drawable true - */ roundedCuboidsOnCenterPoints(inputs: Inputs.JSCAD.RoundedCuboidCentersDto): Promise; - /** - * Create a 3D rounded cylinder solid - * @param inputs Rounded cylinder parameters - * @returns Rounded cylinder solid - * @group primitives - * @shortname rounded cylinder - * @drawable true - */ roundedCylinder(inputs: Inputs.JSCAD.RoundedCylidnerDto): Promise; - /** - * Create a 3D rounded cylinders on multiple center points - * @param inputs Rounded cylinders parameters with multiple center points - * @returns List of rounded cylinders - * @group primitives on centers - * @shortname rounded cylinder - * @drawable true - */ roundedCylindersOnCenterPoints(inputs: Inputs.JSCAD.RoundedCylidnerCentersDto): Promise; - /** - * Create a 3D sphere solid - * @param inputs Sphere parameters - * @returns Sphere solid - * @group primitives - * @shortname sphere - * @drawable true - */ sphere(inputs: Inputs.JSCAD.SphereDto): Promise; - /** - * Create a 3D sphere on multiple center points - * @param inputs Sphere parameters with multiple center points - * @returns List of spheres - * @group primitives on centers - * @shortname sphere - * @drawable true - */ spheresOnCenterPoints(inputs: Inputs.JSCAD.SphereCentersDto): Promise; - /** - * Create a 3D torus solid - * @param inputs Torus parameters - * @returns Torus solid - * @group primitives - * @shortname torus - * @drawable true - */ torus(inputs: Inputs.JSCAD.TorusDto): Promise; - /** - * Create a 3D shape from poylgon points that have to be nested arrays of points - * @param inputs points - * @returns shape - * @group shapes - * @shortname from polygon points - * @drawable true - */ fromPolygonPoints(inputs: Inputs.JSCAD.FromPolygonPoints): Promise; - }/** - * Contains various functions for solid 3D texts from JSCAD library https://github.com/jscad/OpenJSCAD.org - * Thanks JSCAD community for developing this kernel - */ + } declare class JSCADText { private readonly jscadWorkerManager; constructor(jscadWorkerManager: JSCADWorkerManager); - /** - * Creates a text that is based on chain hulling cylinders - * @param inputs Cylindrical text parameters - * @returns List of solids for text - * @group text - * @shortname cylindrical - * @drawable true - */ cylindricalText(inputs: Inputs.JSCAD.CylinderTextDto): Promise; - /** - * Creates a text that is based on chain hulling spheres - * @param inputs Spherical text parameters - * @returns List of solids for text - * @group text - * @shortname spherical - * @drawable true - */ sphericalText(inputs: Inputs.JSCAD.SphereTextDto): Promise; - /** - * Creates a vector text - * @param inputs Vector text parameters - * @returns List of polygons - * @group text - * @shortname vector - * @drawable false - */ createVectorText(inputs: Inputs.JSCAD.TextDto): Promise; } - /** - * This should be used only if you want to use only Manifold worker without other of the bitbybit packages - */ declare class BitByBitManifold { manifoldWorkerManager: ManifoldWorkerManager; manifold: ManifoldBitByBit; constructor(); init(manifold: Worker): void; - }/** - * Contains various functions for Solid meshes from Manifold library https://github.com/elalish/manifold - * Thanks Manifold community for developing this kernel - */ + } declare class CrossSectionBooleans { private readonly manifoldWorkerManager; constructor(manifoldWorkerManager: ManifoldWorkerManager); - /** - * Subtract two cross sections - * @param inputs two cross sections - * @returns subtracted cross section - * @group a to b - * @shortname subtract - * @drawable true - */ subtract(inputs: Inputs.Manifold.TwoCrossSectionsDto): Promise; - /** - * Add two cross sections - * @param inputs two cross sections - * @returns unioned cross section - * @group a to b - * @shortname add - * @drawable true - */ add(inputs: Inputs.Manifold.TwoCrossSectionsDto): Promise; - /** - * Intersect two cross sections - * @param inputs two cross sections - * @returns intersected cross section - * @group a to b - * @shortname intersect - * @drawable true - */ intersect(inputs: Inputs.Manifold.TwoCrossSectionsDto): Promise; - /** - * Difference of two cross sections - * @param inputs two cross sections - * @returns difference of two cross sections - * @group 2 cross sections - * @shortname difference 2 cs - * @drawable true - */ differenceTwo(inputs: Inputs.Manifold.TwoCrossSectionsDto): Promise; - /** - * Union of two cross sections - * @param inputs two cross sections - * @returns union of two cross sections - * @group 2 cross sections - * @shortname union 2 cs - * @drawable true - */ unionTwo(inputs: Inputs.Manifold.TwoCrossSectionsDto): Promise; - /** - * Intersection of two cross sections - * @param inputs two shapes - * @returns intersection of two cross sections - * @group 2 cross sections - * @shortname intersect 2 cs - * @drawable true - */ intersectionTwo(inputs: Inputs.Manifold.TwoCrossSectionsDto): Promise; - /** - * Difference of multiple cross sections - * @param inputs multiple cross sections - * @returns difference of cross sections - * @group multiple - * @shortname diff cross sections - * @drawable true - */ difference(inputs: Inputs.Manifold.CrossSectionsDto): Promise; - /** - * Union of multiple cross sections - * @param inputs multiple cross sections - * @returns union of two cross sections - * @group multiple - * @shortname union cross sections - * @drawable true - */ union(inputs: Inputs.Manifold.CrossSectionsDto): Promise; - /** - * Intersection of multiple cross sections - * @param inputs two cross sections - * @returns intersection of multiple cross sections - * @group multiple - * @shortname intersection cross sections - * @drawable true - */ intersection(inputs: Inputs.Manifold.CrossSectionsDto): Promise; - }/** - * Contains various functions for Solid meshes from Manifold library https://github.com/elalish/manifold - * Thanks Manifold community for developing this kernel - */ + } declare class ManifoldCrossSection { private readonly manifoldWorkerManager; shapes: CrossSectionShapes; @@ -24443,536 +9038,88 @@ declare namespace Bit { transforms: CrossSectionTransforms; evaluate: CrossSectionEvaluate; constructor(manifoldWorkerManager: ManifoldWorkerManager); - /** - * Turns cross section into polygons - * @param inputs cross section - * @returns polygons - * @group decompose - * @shortname cross section to polygons - * @drawable false - */ + crossSectionFromPoints(inputs: Inputs.Manifold.CrossSectionFromPolygonPointsDto): Promise; + crossSectionFromPolygons(inputs: Inputs.Manifold.CrossSectionFromPolygonsPointsDto): Promise; crossSectionToPolygons(inputs: Inputs.Manifold.CrossSectionDto): Promise; - /** - * Turns cross sections into polygons - * @param inputs cross sections - * @returns polygons - * @group decompose - * @shortname cross sections to polygons - * @drawable false - */ + crossSectionToPoints(inputs: Inputs.Manifold.CrossSectionDto): Promise; crossSectionsToPolygons(inputs: Inputs.Manifold.CrossSectionsDto): Promise; - }/** - * Contains various functions for Solid meshes from Manifold library https://github.com/elalish/manifold - * Thanks Manifold community for developing this kernel - */ + crossSectionsToPoints(inputs: Inputs.Manifold.CrossSectionsDto): Promise; + } declare class CrossSectionEvaluate { private readonly manifoldWorkerManager; constructor(manifoldWorkerManager: ManifoldWorkerManager); - /** - * Get area of cross section - * @param inputs cross section - * @returns area of cross section - * @group basic - * @shortname area - * @drawable false - */ area(inputs: Inputs.Manifold.CrossSectionDto): Promise; - /** - * Check if cross section is empty - * @param inputs cross section - * @returns boolean indicating emptyness - * @group basic - * @shortname is empty - * @drawable false - */ isEmpty(inputs: Inputs.Manifold.CrossSectionDto): Promise; - /** - * Get number of vertices in cross section - * @param inputs cross section - * @returns number of vertices of cross section - * @group basic - * @shortname num vert - * @drawable false - */ numVert(inputs: Inputs.Manifold.CrossSectionDto): Promise; - /** - * Get number of contours in cross section - * @param inputs cross section - * @returns number of contour of cross section - * @group basic - * @shortname num contour - * @drawable false - */ numContour(inputs: Inputs.Manifold.CrossSectionDto): Promise; - /** - * Get the bounds of the contour as a rectangle. Output is given in two vec2 points in the array. First array is the min point and second array is the max point. - * @param inputs cross section - * @returns bounds of cross section - * @group basic - * @shortname bounds - * @drawable false - */ bounds(inputs: Inputs.Manifold.CrossSectionDto): Promise; - }/** - * Contains various functions for Solid meshes from Manifold library https://github.com/elalish/manifold - * Thanks Manifold community for developing this kernel - */ + } declare class CrossSectionOperations { private readonly manifoldWorkerManager; constructor(manifoldWorkerManager: ManifoldWorkerManager); - /** - * Compute convex hull for the cross section - * @param inputs cross section - * @returns hulled cross section - * @group basic - * @shortname hull - * @drawable true - */ hull(inputs: Inputs.Manifold.CrossSectionDto): Promise; - /** - * Extrude the cross section to create a 3D shape - * @param inputs cross section and extrusion parameters - * @returns extruded manifold shape - * @group basic - * @shortname extrude - * @drawable true - */ extrude(inputs: Inputs.Manifold.ExtrudeDto): Promise; - /** - * Revolve the cross section to create a 3D shape - * @param inputs cross section and extrusion parameters - * @returns extruded manifold shape - * @group basic - * @shortname revolve - * @drawable true - */ revolve(inputs: Inputs.Manifold.RevolveDto): Promise; - /** - * Offsets the cross section to create a new cross section with a given delta (uses Clipper2 algorithm behind). - * @param inputs cross section and offset parameters - * @returns offset cross section - * @group basic - * @shortname offset - * @drawable true - */ offset(inputs: Inputs.Manifold.OffsetDto): Promise; - /** - * Remove vertices from the contours in this CrossSection that are less than - * the specified distance epsilon from an imaginary line that passes through - * its two adjacent vertices. Near duplicate vertices and collinear points - * will be removed at lower epsilons, with elimination of line segments - * becoming increasingly aggressive with larger epsilons. - * - * It is recommended to apply this function following Offset, in order to - * clean up any spurious tiny line segments introduced that do not improve - * offseting operations are to be performed, which would compound the issue. - * @param inputs cross section and epsilon parameters - * @returns simplified cross section - * @group basic - * @shortname simplify - * @drawable true - */ simplify(inputs: Inputs.Manifold.SimplifyDto): Promise; - /** - * Composes multiple cross sections or polygons into a single cross section - * @param inputs cross sections or polygons - * @returns composed cross section - * @group composition - * @shortname compose - * @drawable true - */ compose(inputs: Inputs.Manifold.ComposeDto<(Inputs.Manifold.CrossSectionPointer | Inputs.Base.Vector2[])[]>): Promise; - /** - * Decompose cross sections that are topologically - * disconnected, each containing one outline contour with zero or more - * holes. - * @param inputs cross section - * @returns decomposed cross sections - * @group composition - * @shortname decompose - * @drawable true - */ decompose(inputs: Inputs.Manifold.CrossSectionDto): Promise; - }/** - * Contains various functions for making shapes Manifold library https://github.com/elalish/manifold - * Thanks Manifold community for developing this kernel - */ + } declare class CrossSectionShapes { private readonly manifoldWorkerManager; constructor(manifoldWorkerManager: ManifoldWorkerManager); - /** - * Create a 2d cross-section from a set of contours (complex polygons). A - * boolean union operation (with Positive filling rule by default) is - * performed to combine overlapping polygons and ensure the resulting - * CrossSection is free of intersections. - * @param inputs polygons and fill rule - * @returns cross section - * @group base - * @shortname create - * @drawable true - */ create(inputs: Inputs.Manifold.CreateContourSectionDto): Promise; - /** - * Create a 2D square cross section - * @param inputs Square parameters - * @returns square cross section - * @group primitives - * @shortname square - * @drawable true - */ square(inputs: Inputs.Manifold.SquareDto): Promise; - /** - * Create a 2D circle cross section - * @param inputs Circle parameters - * @returns circle cross section - * @group primitives - * @shortname circle - * @drawable true - */ circle(inputs: Inputs.Manifold.CircleDto): Promise; - /** - * Create a 2D rectangle cross section - * @param inputs Rectangle parameters - * @returns rectangle cross section - * @group primitives - * @shortname rectangle - * @drawable true - */ rectangle(inputs: Inputs.Manifold.RectangleDto): Promise; - }/** - * Contains various functions for transforming cross section from Manifold library https://github.com/elalish/manifold - * Thanks Manifold community for developing this kernel - */ + } declare class CrossSectionTransforms { private readonly manifoldWorkerManager; constructor(manifoldWorkerManager: ManifoldWorkerManager); - /** - * Scales a cross section shape with 2D vector - * @param inputs cross section and scale vector - * @returns Scaled cross section shape - * @group transforms - * @shortname scale 2d - * @drawable true - */ scale2D(inputs: Inputs.Manifold.Scale2DCrossSectionDto): Promise; - /** - * Scales a cross section shape with single factor - * @param inputs cross section and scale factor - * @returns Scaled cross section shape - * @group transforms - * @shortname scale uniform - * @drawable true - */ scale(inputs: Inputs.Manifold.ScaleCrossSectionDto): Promise; - /** - * Mirrors a cross section shape over a plane defined by a normal vector - * @param inputs cross section and normal vector - * @returns Mirrored cross section shape - * @group transforms - * @shortname mirror - * @drawable true - */ mirror(inputs: Inputs.Manifold.MirrorCrossSectionDto): Promise; - /** - * Translates a cross section shape along the vector - * @param inputs cross section and trnaslation vector - * @returns Translated cross section shape - * @group transforms - * @shortname translate - * @drawable true - */ translate(inputs: Inputs.Manifold.TranslateCrossSectionDto): Promise; - /** - * Translates a cross section shape along x, y - * @param inputs cross section and trnaslation coordinates - * @returns Translated cross section shape - * @group transforms - * @shortname translate xy - * @drawable true - */ translateXY(inputs: Inputs.Manifold.TranslateXYCrossSectionDto): Promise; - /** - * Rotates a cross section shape along the containing degrees - * @param inputs cross section and rotation degrees - * @returns Rotated cross section shape - * @group transforms - * @shortname rotate - * @drawable true - */ rotate(inputs: Inputs.Manifold.RotateCrossSectionDto): Promise; - /** - * Transforms a cross section shape by using the 3x3 transformation matrix - * @param inputs cross section and transformation matrix - * @returns Transformed cross section shape - * @group matrix - * @shortname transform - * @drawable true - */ transform(inputs: Inputs.Manifold.TransformCrossSectionDto): Promise; - }/** - * Contains various functions for Solid meshes from Manifold library https://github.com/elalish/manifold - * Thanks Manifold community for developing this kernel - */ + warp(inputs: Inputs.Manifold.CrossSectionWarpDto): Promise; + } declare class ManifoldBooleans { private readonly manifoldWorkerManager; constructor(manifoldWorkerManager: ManifoldWorkerManager); - /** - * Subtract two manifold shapes - * @param inputs two shapes - * @returns subtracted manifold shape - * @group a to b - * @shortname subtract - * @drawable true - */ subtract(inputs: Inputs.Manifold.TwoManifoldsDto): Promise; - /** - * Add two manifold shapes - * @param inputs two shapes - * @returns unioned manifold shape - * @group a to b - * @shortname add - * @drawable true - */ add(inputs: Inputs.Manifold.TwoManifoldsDto): Promise; - /** - * Intersect two manifold shapes - * @param inputs two shapes - * @returns intersected manifold shape - * @group a to b - * @shortname intersect - * @drawable true - */ intersect(inputs: Inputs.Manifold.TwoManifoldsDto): Promise; - /** - * Difference of two manifold shapes - * @param inputs two shapes - * @returns difference of two manifold shapes - * @group 2 manifolds - * @shortname difference 2 manifolds - * @drawable true - */ differenceTwo(inputs: Inputs.Manifold.TwoManifoldsDto): Promise; - /** - * Union of two manifold shapes - * @param inputs two shapes - * @returns union of two manifold shapes - * @group 2 manifolds - * @shortname union 2 manifolds - * @drawable true - */ unionTwo(inputs: Inputs.Manifold.TwoManifoldsDto): Promise; - /** - * Intersection of two manifold shapes - * @param inputs two shapes - * @returns intersection of two manifold shapes - * @group 2 manifolds - * @shortname intersection 2 manifolds - * @drawable true - */ intersectionTwo(inputs: Inputs.Manifold.TwoManifoldsDto): Promise; - /** - * Difference of multiple manifold shapes - * @param inputs multiple shapes - * @returns difference of two manifold shapes - * @group multiple - * @shortname difference manifolds - * @drawable true - */ difference(inputs: Inputs.Manifold.ManifoldsDto): Promise; - /** - * Union of multiple manifold shapes - * @param inputs multiple shapes - * @returns union of two manifold shapes - * @group multiple - * @shortname union manifolds - * @drawable true - */ union(inputs: Inputs.Manifold.ManifoldsDto): Promise; - /** - * Intersection of multiple manifold shapes - * @param inputs two shapes - * @returns intersection of multiple manifold shapes - * @group multiple - * @shortname intersection manifolds - * @drawable true - */ intersection(inputs: Inputs.Manifold.ManifoldsDto): Promise; - /** - * Split manifold by another manifold - * @param inputs manifold to split and manifold cutter - * @returns split manifold - * @group split - * @shortname split - * @drawable true - */ split(inputs: Inputs.Manifold.SplitManifoldsDto): Promise; - /** - * Split manifold by plane - * @param inputs manifold and plane - * @returns split manifold - * @group split - * @shortname split by plane - * @drawable true - */ splitByPlane(inputs: Inputs.Manifold.SplitByPlaneDto): Promise; - /** - * Split manifold by plane on various offsets - * @param inputs manifold, plane and the list of offsets - * @returns splitted manifolds - * @group split - * @shortname split by plane on offsets - * @drawable true - */ splitByPlaneOnOffsets(inputs: Inputs.Manifold.SplitByPlaneOnOffsetsDto): Promise; - /** - * Trim manifold by plane - * @param inputs manifold and plane - * @returns trimmed manifold - * @group trim - * @shortname trim by plane - * @drawable true - */ trimByPlane(inputs: Inputs.Manifold.TrimByPlaneDto): Promise; - }/** - * Contains various functions for Solid meshes from Manifold library https://github.com/elalish/manifold - * Thanks Manifold community for developing this kernel - */ + } declare class ManifoldEvaluate { private readonly manifoldWorkerManager; constructor(manifoldWorkerManager: ManifoldWorkerManager); - /** - * Get surface area of manifold - * @param inputs manifold - * @returns surface area of manifold - * @group basic - * @shortname surface area - * @drawable false - */ surfaceArea(inputs: Inputs.Manifold.ManifoldDto): Promise; - /** - * Get volume of manifold - * @param inputs manifold - * @returns volume of manifold - * @group basic - * @shortname volume - * @drawable false - */ volume(inputs: Inputs.Manifold.ManifoldDto): Promise; - /** - * Check if manifold contains triangles - * @param inputs manifold - * @returns boolean indicating emptyness - * @group basic - * @shortname is empty - * @drawable false - */ isEmpty(inputs: Inputs.Manifold.ManifoldDto): Promise; - /** - * Get number of vertices in manifold - * @param inputs manifold - * @returns number of vertices of manifold - * @group basic - * @shortname num vert - * @drawable false - */ numVert(inputs: Inputs.Manifold.ManifoldDto): Promise; - /** - * Get number of triangles in manifold - * @param inputs manifold - * @returns number of triangles of manifold - * @group basic - * @shortname num triangles - * @drawable false - */ numTri(inputs: Inputs.Manifold.ManifoldDto): Promise; - /** - * Get number of edges in manifold - * @param inputs manifold - * @returns number of edges of manifold - * @group basic - * @shortname num edges - * @drawable false - */ numEdge(inputs: Inputs.Manifold.ManifoldDto): Promise; - /** - * Get number of properties in manifold - * @param inputs manifold - * @returns number of properties of manifold - * @group basic - * @shortname num prop - * @drawable false - */ numProp(inputs: Inputs.Manifold.ManifoldDto): Promise; - /** - * The number of property vertices in the Manifold. This will always be >= - * numVert, as some physical vertices may be duplicated to account for - * different properties on different neighboring triangles. - * @param inputs manifold - * @returns number of properties of manifold - * @group basic - * @shortname num prop vert - * @drawable false - */ numPropVert(inputs: Inputs.Manifold.ManifoldDto): Promise; - /** - * Returns the axis-aligned bounding box of all the Manifold's vertices. - * @param inputs manifold - * @returns bounding box corner vectors of manifold - * @group basic - * @shortname bounding box - * @drawable false - */ boundingBox(inputs: Inputs.Manifold.ManifoldDto): Promise; - /** - * Returns the tolerance of this Manifold's vertices, which tracks the - * approximate rounding error over all the transforms and operations that have - * led to this state. Any triangles that are colinear within this tolerance - * are considered degenerate and removed. This is the value of ε - * defining - * [ε-valid](https://github.com/elalish/manifold/wiki/Manifold-Library#definition-of-%CE%B5-valid). - * @param inputs manifold - * @returns tolerance of manifold - * @group basic - * @shortname tolerance - * @drawable false - */ tolerance(inputs: Inputs.Manifold.ManifoldDto): Promise; - /** - * The genus is a topological property of the manifold, representing the - * number of handles. A sphere is 0, torus 1, etc. It is only meaningful for - * a single mesh, so it is best to call Decompose() first. - * @param inputs manifold - * @returns genus of manifold - * @group basic - * @shortname genus - * @drawable false - */ genus(inputs: Inputs.Manifold.ManifoldDto): Promise; - /** - * Returns the minimum gap between two manifolds. Returns a float between - * 0 and searchLength. - * @param inputs two manifolds and search length - * @returns minimum - * @group basic - * @shortname min gap - * @drawable false - */ minGap(inputs: Inputs.Manifold.ManifoldsMinGapDto): Promise; - /** - * If this mesh is an original, this returns its ID that can be referenced - * by product manifolds. If this manifold is a product, this - * returns -1. - * @param inputs manifold - * @returns original ID of manifold - * @group basic - * @shortname original id - * @drawable false - */ originalID(inputs: Inputs.Manifold.ManifoldDto): Promise; - }/** - * Contains various functions for Solid meshes from Manifold library https://github.com/elalish/manifold - * Thanks Manifold community for developing this kernel - */ + status(inputs: Inputs.Manifold.ManifoldDto): Promise; + } declare class Manifold { private readonly manifoldWorkerManager; readonly shapes: ManifoldShapes; @@ -24981,574 +9128,91 @@ declare namespace Bit { readonly transforms: ManifoldTransforms; readonly evaluate: ManifoldEvaluate; constructor(manifoldWorkerManager: ManifoldWorkerManager); - /** - * Turns manifold shape into a mesh - * @param inputs Manifold shape - * @returns Decomposed mesh definition - * @group meshing - * @shortname manifold to mesh - * @drawable false - */ manifoldToMesh(inputs: Inputs.Manifold.ManifoldToMeshDto): Promise; - /** - * Turns manifold shapes into meshes - * @param inputs Manifold shapes - * @returns Decomposed mesh definitions - * @group meshing - * @shortname manifolds to meshes - * @drawable false - */ manifoldsToMeshes(inputs: Inputs.Manifold.ManifoldsToMeshesDto): Promise; - }/** - * Contains various functions for Solid meshes from Manifold library https://github.com/elalish/manifold - * Thanks Manifold community for developing this kernel - */ + } declare class ManifoldOperations { private readonly manifoldWorkerManager; constructor(manifoldWorkerManager: ManifoldWorkerManager); - /** - * Computes convex hull of the manifold shape provided - * @param inputs two shapes - * @returns hulled manifold shape - * @group hulls - * @shortname convex hull - * @drawable true - */ hull(inputs: Inputs.Manifold.ManifoldDto): Promise; - /** - * Hull points or manifolds - * @param inputs manifold - * @returns manifold - * @group hulls - * @shortname hull points - * @drawable true - */ hullPoints(inputs: Inputs.Manifold.HullPointsDto<(Inputs.Base.Point3 | Inputs.Manifold.ManifoldPointer)[]>): Promise; - /** - * Returns the cross section of this object parallel to the X-Y plane at the - * specified height. Using a height equal to the bottom - * of the bounding box will return the bottom faces, while using a height - * equal to the top of the bounding box will return empty. - * @param inputs manifold and height - * @returns sliced cross section - * @group cross sections - * @shortname slice - * @drawable true - */ slice(inputs: Inputs.Manifold.SliceDto): Promise; - /** - * Creates a projection on xy plane from the shape outline - * @param inputs manifold - * @returns projected cross section - * @group cross sections - * @shortname project - * @drawable true - */ project(inputs: Inputs.Manifold.ManifoldDto): Promise; - /** - * Return a copy of the manifold with the set tolerance value. - * This performs mesh simplification when the tolerance value is increased. - * @param inputs manifold and tolerance - * @returns manifold with new tolerance - * @group basic - * @shortname set tolerance - * @drawable false - */ setTolerance(inputs: Inputs.Manifold.ManifoldRefineToleranceDto): Promise; - /** - * Returns the first of n sequential new unique mesh IDs for marking sets of triangles that can be looked up after further operations. Assign to Mesh.runOriginalID vector. - * @param inputs count - * @returns void - * @group basic - * @shortname reserve id - * @drawable false - */ reserveIds(inputs: Inputs.Manifold.CountDto): Promise; - /** - * If you copy a manifold, but you want this new copy to have new properties - * (e.g. a different UV mapping), you can reset its IDs to a new original, - * meaning it will now be referenced by its descendants instead of the meshes - * it was built from, allowing you to differentiate the copies when applying - * your properties to the final result. - * - * This function also condenses all coplanar faces in the relation, and - * collapses those edges. If you want to have inconsistent properties across - * these faces, meaning you want to preserve some of these edges, you should - * instead call GetMesh(), calculate your properties and use these to - * construct a new manifold. - * @param inputs manifold - * @returns original manifold - * @group basic - * @shortname as original - * @drawable true - */ asOriginal(inputs: Inputs.Manifold.ManifoldDto): Promise; - /** - * Constructs a new manifold from a list of other manifolds. This is a purely - * topological operation, so care should be taken to avoid creating - * overlapping results. It is the inverse operation of Decompose(). - * @param inputs manifold shapes - * @returns composed manifold - * @group composition - * @shortname compose - * @drawable true - */ compose(inputs: Inputs.Manifold.ManifoldsDto): Promise; - /** - * This operation returns a vector of Manifolds that are topologically - * disconnected. If everything is connected, the vector is length one, - * containing a copy of the original. It is the inverse operation of - * Compose(). - * @param inputs manifold - * @returns decomposed manifold shapes - * @group composition - * @shortname decompose - * @drawable true - */ decompose(inputs: Inputs.Manifold.ManifoldDto): Promise; - /** - * Fills in vertex properties for normal vectors, calculated from the mesh - * geometry. Flat faces composed of three or more triangles will remain flat. - * @param inputs manifold and normal index with minimum sharp angle - * @returns manifold with calculated normals - * @group adjustments - * @shortname calculate normals - * @drawable true - */ calculateNormals(inputs: Inputs.Manifold.CalculateNormalsDto): Promise; - /** - * Curvature is the inverse of the radius of curvature, and signed such that - * positive is convex and negative is concave. There are two orthogonal - * principal curvatures at any point on a manifold, with one maximum and the - * other minimum. Gaussian curvature is their product, while mean - * curvature is their sum. This approximates them for every vertex and assigns - * them as vertex properties on the given channels. - * @param inputs manifold and gaussian and mean index - * @returns manifold with calculated curvature - * @group adjustments - * @shortname calculate curvature - * @drawable true - */ calculateCurvature(inputs: Inputs.Manifold.CalculateCurvatureDto): Promise; - /** - * Increase the density of the mesh by splitting each edge into pieces such - * that any point on the resulting triangles is roughly within tolerance of - * the smoothly curved surface defined by the tangent vectors. This means - * tightly curving regions will be divided more finely than smoother regions. - * If halfedgeTangents are not present, the result will simply be a copy of - * the original. Quads will ignore their interior triangle bisector. - * @param inputs manifold and tolerance - * @returns refined manifold - * @group adjustments - * @shortname refine to tolerance - * @drawable true - */ refineToTolerance(inputs: Inputs.Manifold.ManifoldRefineToleranceDto): Promise; - /** - * Increase the density of the mesh by splitting each edge into pieces of - * roughly the input length. Interior verts are added to keep the rest of the - * triangulation edges also of roughly the same length. If halfedgeTangents - * are present (e.g. from the Smooth() constructor), the new vertices will be - * moved to the interpolated surface according to their barycentric - * coordinates. - * @param inputs manifold and length - * @returns refined manifold - * @group adjustments - * @shortname refine to length - * @drawable true - */ refineToLength(inputs: Inputs.Manifold.ManifoldRefineLengthDto): Promise; - /** - * Increase the density of the mesh by splitting every edge into n pieces. For - * instance, with n = 2, each triangle will be split into 4 triangles. These - * will all be coplanar (and will not be immediately collapsed) unless the - * Mesh/Manifold has halfedgeTangents specified (e.g. from the Smooth() - * constructor), in which case the new vertices will be moved to the - * interpolated surface according to their barycentric coordinates. - * @param inputs manifold and count - * @returns refined manifold - * @group adjustments - * @shortname refine - * @drawable true - */ refine(inputs: Inputs.Manifold.ManifoldRefineDto): Promise; - /** - * Smooths out the Manifold by filling in the halfedgeTangent vectors. The - * geometry will remain unchanged until Refine or RefineToLength is called to - * interpolate the surface. This version uses the geometry of the triangles - * and pseudo-normals to define the tangent vectors. - * @param inputs manifold and minimum sharp angle and minimum smoothness - * @returns smoothed manifold - * @group adjustments - * @shortname smooth out - * @drawable true - */ smoothOut(inputs: Inputs.Manifold.ManifoldSmoothOutDto): Promise; - /** - * Smooths out the Manifold by filling in the halfedgeTangent vectors. The - * geometry will remain unchanged until Refine or RefineToLength is called to - * interpolate the surface. This version uses the supplied vertex normal - * properties to define the tangent vectors. - * @param inputs manifold and normal index - * @returns smoothed manifold - * @group adjustments - * @shortname smooth by normals - * @drawable true - */ smoothByNormals(inputs: Inputs.Manifold.ManifoldSmoothByNormalsDto): Promise; - }/** - * Contains various functions for Solid meshes from Manifold library https://github.com/elalish/manifold - * Thanks Manifold community for developing this kernel - */ + simplify(inputs: Inputs.Manifold.ManifoldSimplifyDto): Promise; + setProperties(inputs: Inputs.Manifold.ManifoldSetPropertiesDto): Promise; + } declare class ManifoldShapes { private readonly manifoldWorkerManager; constructor(manifoldWorkerManager: ManifoldWorkerManager); - /** - * Convert a Mesh into a Manifold, retaining its properties and merging only - * the positions according to the merge vectors. Will throw an error if the - * result is not an oriented 2-manifold. Will collapse degenerate triangles - * and unnecessary vertices. - * - * All fields are read, making this structure suitable for a lossless - * round-trip of data from manifoldToMesh(). For multi-material input, use - * reserveIDs() to set a unique originalID for each material, and sort the - * materials into triangle runs. - * @param inputs mesh definition - * @returns manifold - * @group create - * @shortname manifold from mesh - * @drawable true - */ manifoldFromMesh(inputs: Inputs.Manifold.CreateFromMeshDto): Promise; - /** - * Create a Manifold from a set of polygon points describing triangles. - * @param inputs Polygon points - * @returns Manifold - * @group create - * @shortname from polygon points - * @drawable true - */ fromPolygonPoints(inputs: Inputs.Manifold.FromPolygonPointsDto): Promise; - /** - * Create a 3D cube shape - * @param inputs Cube parameters - * @returns Cube solid - * @group primitives - * @shortname cube - * @drawable true - */ cube(inputs: Inputs.Manifold.CubeDto): Promise; - /** - * Create a 3D sphere shape - * @param inputs Sphere parameters - * @returns Sphere solid - * @group primitives - * @shortname sphere - * @drawable true - */ sphere(inputs: Inputs.Manifold.SphereDto): Promise; - /** - * Create a 3D tetrahedron shape - * @returns Tetrahedron solid - * @group primitives - * @shortname tetrahedron - * @drawable true - */ tetrahedron(): Promise; - /** - * Create a 3D cylinder shape - * @param inputs Cylinder parameters - * @returns Cylinder solid - * @group primitives - * @shortname cylinder - * @drawable true - */ cylinder(inputs: Inputs.Manifold.CylinderDto): Promise; - }/** - * Contains various functions for Solid meshes from Manifold library https://github.com/elalish/manifold - * Thanks Manifold community for developing this kernel - */ + } declare class ManifoldTransforms { private readonly manifoldWorkerManager; constructor(manifoldWorkerManager: ManifoldWorkerManager); - /** - * Scales a manifold shape with 3D vector - * @param inputs manifold and scale vector - * @returns Scaled manifold shape - * @group transforms - * @shortname scale 3d - * @drawable true - */ scale3D(inputs: Inputs.Manifold.Scale3DDto): Promise; - /** - * Scales a manifold shape with single factor - * @param inputs manifold and scale factor - * @returns Scaled manifold shape - * @group transforms - * @shortname scale uniform - * @drawable true - */ scale(inputs: Inputs.Manifold.ScaleDto): Promise; - /** - * Mirrors a manifold shape over a plane defined by a normal vector - * @param inputs manifold and normal vector - * @returns Mirrored manifold shape - * @group transforms - * @shortname mirror - * @drawable true - */ mirror(inputs: Inputs.Manifold.MirrorDto): Promise; - /** - * Translates a manifold shape along the vector - * @param inputs manifold and trnaslation vector - * @returns Translated manifold shape - * @group transforms - * @shortname translate - * @drawable true - */ translate(inputs: Inputs.Manifold.TranslateDto): Promise; - /** - * Translates a manifold shape along by multiple vectors - * @param inputs manifold and trnaslation vectors - * @returns Translated manifold shapes - * @group multiple - * @shortname translate by vectors - * @drawable true - */ translateByVectors(inputs: Inputs.Manifold.TranslateByVectorsDto): Promise; - /** - * Translates a manifold shape along x, y, z - * @param inputs manifold and trnaslation coordinates - * @returns Translated manifold shape - * @group transforms - * @shortname translate xyz - * @drawable true - */ translateXYZ(inputs: Inputs.Manifold.TranslateXYZDto): Promise; - /** - * Rotates a manifold shape along the vector containing euler angles - * @param inputs manifold and rotation vector - * @returns Rotated manifold shape - * @group transforms - * @shortname rotate - * @drawable true - */ rotate(inputs: Inputs.Manifold.RotateDto): Promise; - /** - * Rotates a manifold shape along the x y z euler angles - * @param inputs manifold and rotation eulers - * @returns Rotated manifold shape - * @group transforms - * @shortname rotate xyz - * @drawable true - */ rotateXYZ(inputs: Inputs.Manifold.RotateXYZDto): Promise; - /** - * Transforms a manifold shape by using the 4x4 transformation matrix - * @param inputs manifold and transformation matrix - * @returns Transformed manifold shape - * @group matrix - * @shortname transform - * @drawable true - */ transform(inputs: Inputs.Manifold.TransformDto): Promise; - /** - * Transforms a manifold shape by using the 4x4 transformation matrixes - * @param inputs manifold and transformation matrixes - * @returns Transformed manifold shape - * @group matrix - * @shortname transforms - * @drawable true - */ transforms(inputs: Inputs.Manifold.TransformsDto): Promise; - }/** - * Contains various functions for Solid meshes from Manifold library https://github.com/elalish/manifold - * Thanks Manifold community for developing this kernel - */ + warp(inputs: Inputs.Manifold.ManifoldWarpDto): Promise; + } declare class ManifoldBitByBit { private readonly manifoldWorkerManager; readonly manifold: Manifold; readonly crossSection: ManifoldCrossSection; readonly mesh: Mesh; constructor(manifoldWorkerManager: ManifoldWorkerManager); - /** - * Turns manifold shape into a mesh pointer that lives in worker's memory. This pointer can be used with bitbybit.manifold.mesh functions - * @param inputs Manifold shape - * @returns Pointer to manifold mesh definition - * @group meshing - * @shortname manifold to mesh pointer - * @drawable false - */ manifoldToMeshPointer(inputs: Inputs.Manifold.ManifoldToMeshDto): Promise; - /** - * Decomposes manifold or cross section shape into a mesh or simple polygons - * @param inputs Manifold shape or cross section - * @returns Decomposed mesh definition or simple polygons - * @group decompose - * @shortname decompose m or cs - * @drawable false - */ decomposeManifoldOrCrossSection(inputs: Inputs.Manifold.DecomposeManifoldOrCrossSectionDto): Promise; - /** - * Turns manifold shape into a collection of polygon points representing the mesh. - * @param inputs Manifold shape - * @returns polygon points - * @group decompose - * @shortname to polygon points - * @drawable false - */ toPolygonPoints(inputs: Inputs.Manifold.ManifoldDto): Promise; - /** - * Decomposes manifold or cross section shape into a mesh or simple polygons - * @param inputs Manifold shapes or cross sections - * @returns Decomposed mesh definitions or a list of simple polygons - * @group decompose - * @shortname decompose m's or cs's - * @drawable false - */ decomposeManifoldsOrCrossSections(inputs: Inputs.Manifold.DecomposeManifoldsOrCrossSectionsDto): Promise<(Inputs.Manifold.DecomposedManifoldMeshDto | Inputs.Base.Vector2[][])[]>; - /** - * Delete manifold or cross section from memory - * @param inputs manifold or cross section - * @group cleanup - * @shortname delete m or cs - * @drawable false - */ deleteManifoldOrCrossSection(inputs: Inputs.Manifold.ManifoldOrCrossSectionDto): Promise; - /** - * Delete manifolds or cross sections from memory - * @param inputs manifolds or cross sections - * @group cleanup - * @shortname delete m's or cs's - * @drawable false - */ deleteManifoldsOrCrossSections(inputs: Inputs.Manifold.ManifoldsOrCrossSectionsDto): Promise; - }/** - * Contains various functions for Solid meshes from Manifold library https://github.com/elalish/manifold - * Thanks Manifold community for developing this kernel - */ + } declare class MeshEvaluate { private readonly manifoldWorkerManager; constructor(manifoldWorkerManager: ManifoldWorkerManager); - /** - * Get position on mesh vertex index - * @param inputs mesh - * @returns point - * @group basic - * @shortname position - * @drawable true - */ position(inputs: Inputs.Manifold.MeshVertexIndexDto): Promise; - /** - * Gets the three vertex indices of this triangle in CCW order. - * @param inputs mesh - * @returns verts - * @group basic - * @shortname verts - * @drawable false - */ verts(inputs: Inputs.Manifold.MeshTriangleIndexDto): Promise; - /** - * Gets the tangent vector starting at verts(tri)[j] pointing to the next - * Bezier point along the CCW edge. The fourth value is its weight. - * @param inputs mesh - * @returns tangent - * @group basic - * @shortname tangent - * @drawable true - */ tangent(inputs: Inputs.Manifold.MeshHalfEdgeIndexDto): Promise; - /** - * Gets any other properties associated with this vertex. - * @param inputs mesh - * @returns extras - * @group basic - * @shortname extras - * @drawable false - */ extras(inputs: Inputs.Manifold.MeshVertexIndexDto): Promise; - /** - * Gets the column-major 4x4 matrix transform from the original mesh to these - * related triangles. - * @param inputs mesh - * @returns transform matrix - * @group basic - * @shortname transform 4x4 matrix - * @drawable false - */ transform(inputs: Inputs.Manifold.MeshVertexIndexDto): Promise; - /** - * Number of properties per vertex, always >= 3. - * @param inputs mesh - * @returns number of properties - * @group basic - * @shortname number props - * @drawable false - */ numProp(inputs: Inputs.Manifold.MeshDto): Promise; - /** - * Number of property vertices - * @param inputs mesh - * @returns number of vertices - * @group basic - * @shortname number vertices - * @drawable false - */ numVert(inputs: Inputs.Manifold.MeshDto): Promise; - /** - * Get number of triangles on mesh - * @param inputs mesh - * @returns number of triangles - * @group basic - * @shortname number triangles - * @drawable false - */ numTri(inputs: Inputs.Manifold.MeshDto): Promise; - /** - * Number of triangle runs. Each triangle run is a set of consecutive - * triangles that all come from the same instance of the same input mesh. - * @param inputs mesh - * @returns number of runs - * @group basic - * @shortname number runs - * @drawable false - */ numRun(inputs: Inputs.Manifold.MeshDto): Promise; - }/** - * Contains various functions for Solid meshes from Manifold library https://github.com/elalish/manifold - * Thanks Manifold community for developing this kernel - */ + } declare class Mesh { private readonly manifoldWorkerManager; readonly operations: MeshOperations; readonly evaluate: MeshEvaluate; constructor(manifoldWorkerManager: ManifoldWorkerManager); - }/** - * Contains various functions for Solid meshes from Manifold library https://github.com/elalish/manifold - * Thanks Manifold community for developing this kernel - */ + } declare class MeshOperations { private readonly manifoldWorkerManager; constructor(manifoldWorkerManager: ManifoldWorkerManager); - /** - * Updates the mergeFromVert and mergeToVert vectors in order to create a - * manifold solid. If the MeshGL is already manifold, no change will occur and - * the function will return false. Otherwise, this will merge verts along open - * edges within tolerance (the maximum of the MeshGL tolerance and the - * baseline bounding-box tolerance), keeping any from the existing merge - * vectors. - * - * There is no guarantee the result will be manifold - this is a best-effort - * helper function designed primarily to aid in the case where a manifold - * multi-material MeshGL was produced, but its merge vectors were lost due to - * a round-trip through a file format. Constructing a Manifold from the result - * will report a Status if it is not manifold. - * @param inputs mesh - * @returns merged mesh - * @group base - * @shortname merge - * @drawable true - */ merge(inputs: Inputs.Manifold.MeshDto): Promise; } declare class BitByBitOCCT { @@ -25556,403 +9220,82 @@ declare namespace Bit { occt: OCCT; constructor(); init(occt: Worker): void; - } declare class OCCTBooleans { + } + declare class OCCTBooleans { private readonly occWorkerManager; constructor(occWorkerManager: OCCTWorkerManager); - /** - * Joins separate objects - * @param inputs Objects to join - * @returns OpenCascade joined shape - * @group booleans - * @shortname union - * @drawable true - */ union(inputs: Inputs.OCCT.UnionDto): Promise; - /** - * Does boolean difference operation between a main shape and given shapes - * @param inputs Main shape and shapes to differ - * @returns OpenCascade difference shape - * @group booleans - * @shortname difference - * @drawable true - */ difference(inputs: Inputs.OCCT.DifferenceDto): Promise; - /** - * Does boolean intersection operation between a main shape and given shapes - * @param inputs Main shape and shapes to differ - * @returns OpenCascade intersection of shapes - * @group booleans - * @shortname intersection - * @drawable true - */ intersection(inputs: Inputs.OCCT.IntersectionDto): Promise; - /** - * Does mesh mesh intersection operation between two shapes - both shapes can have their own meshing precision. - * This algorithm intersects the meshes and returns the wires of the intersection, which are polylines or polygons. - * @param inputs Two shapes to intersect - * @returns Wires where shapes intersect - * @group mesh based - * @shortname mesh mesh intersection as wires - * @drawable true - */ meshMeshIntersectionWires(inputs: Inputs.OCCT.MeshMeshIntersectionTwoShapesDto): Promise; - /** - * Does mesh mesh intersection operation between two shapes - both shapes can have their own meshing precision. - * This algorithm intersects the meshes and returns the points of the intersection, which are polylines or polygons. - * @param inputs Two shapes to intersect - * @returns Points where shapes intersect - * @group mesh based - * @shortname mesh mesh intersection as points - * @drawable true - */ meshMeshIntersectionPoints(inputs: Inputs.OCCT.MeshMeshIntersectionTwoShapesDto): Promise; - /** - * Does mesh mesh intersection operation between the shape and multiple other shapes - all shapes can have their own meshing precision. - * This algorithm intersects the meshes and returns the wires of the intersection, which are polylines or polygons. - * @param inputs Two shapes to intersect - * @returns Wires where shapes intersect - * @group mesh based - * @shortname mesh mesh intersection of shapes as wires - * @drawable true - */ meshMeshIntersectionOfShapesWires(inputs: Inputs.OCCT.MeshMeshesIntersectionOfShapesDto): Promise; - /** - * Does mesh mesh intersection operation between the shape and multiple other shapes - all shapes can have their own meshing precision. - * This algorithm intersects the meshes and returns the points of the intersection. - * @param inputs Two shapes to intersect - * @returns Wires where shapes intersect - * @group mesh based - * @shortname mesh mesh intersection of shapes as points - * @drawable true - */ meshMeshIntersectionOfShapesPoints(inputs: Inputs.OCCT.MeshMeshesIntersectionOfShapesDto): Promise; - } declare class OCCTDimensions { + } + declare class OCCTDimensions { private readonly occWorkerManager; constructor(occWorkerManager: OCCTWorkerManager); - /** - * Creates simple linear length dimension between two points - measuring units. You decide what kind of units you re using by providing a suffix. - * @param inputs two points, direction, label size, label normal direction, offset, and unit suffix, decimal rounding place - * @returns compound wires representing dimensions - * @group simple - * @shortname linear dimension - * @drawable true - */ simpleLinearLengthDimension(inputs: Inputs.OCCT.SimpleLinearLengthDimensionDto): Promise; - /** - * Creates simple angular dimension. By default we output degrees, but you can opt to use radians. - * @param inputs a center, two directions, radius and various label parameters - * @returns compound wires representing dimension - * @group simple - * @shortname angular dimension - * @drawable true - */ simpleAngularDimension(inputs: Inputs.OCCT.SimpleAngularDimensionDto): Promise; - /** - * @param inputs a start and end point, direction and parameters for the label - * @returns compound wires representing dimension - * @group simple - * @shortname pin with label - * @drawable true - */ pinWithLabel(inputs: Inputs.OCCT.PinWithLabelDto): Promise; - } declare class OCCTFillets { + } + declare class OCCTFillets { private readonly occWorkerManager; constructor(occWorkerManager: OCCTWorkerManager); - /** - * Fillets OpenCascade Shapes - * @param inputs Shape, radius and edge indexes to fillet - * @returns OpenCascade shape with filleted edges - * @group 3d fillets - * @shortname fillet edges - * @drawable true - */ filletEdges(inputs: Inputs.OCCT.FilletDto): Promise; - /** - * Fillets edges list with different radius on each edge. - * @param inputs Shape, edges and radius list - * @returns OpenCascade shape with filleted edges - * @group 3d fillets - * @shortname fillet edges list - * @drawable true - */ filletEdgesList(inputs: Inputs.OCCT.FilletEdgesListDto): Promise; - /** - * Fillets edges list with the single radius on all edges. - * @param inputs Shape, edges and radius - * @returns OpenCascade shape with filleted edges - * @group 3d fillets - * @shortname fillet edges list one r - * @drawable true - */ filletEdgesListOneRadius(inputs: Inputs.OCCT.FilletEdgesListOneRadiusDto): Promise; - /** - * Fillets a single edge with variable radius list on given u params. You need to provide a list of params to identify on which U param to apply the radius on. - * @param inputs Shape, edge, radius list and param list - * @returns OpenCascade shape with filleted edges - * @group 3d fillets - * @shortname fillet edge variable r - * @drawable true - */ filletEdgeVariableRadius(inputs: Inputs.OCCT.FilletEdgeVariableRadiusDto): Promise; - /** - * Fillets multiple provided edges with the same variable radiuses on u params for each edge. - * @param inputs Shape, edge, radius list and param list - * @returns OpenCascade shape with filleted edges - * @group 3d fillets - * @shortname fillet edges same variable r - * @drawable true - */ filletEdgesSameVariableRadius(inputs: Inputs.OCCT.FilletEdgesSameVariableRadiusDto): Promise; - /** - * Fillets multiple provided edges with variable radius lists on given params lists. You need to provide a list of params to identify on which U param to apply the radius on. - * @param inputs Shape, edge, radius list and param list - * @returns OpenCascade shape with filleted edges - * @group 3d fillets - * @shortname fillet edges variable r - * @drawable true - */ filletEdgesVariableRadius(inputs: Inputs.OCCT.FilletEdgesVariableRadiusDto): Promise; - /** - * Fillets OpenCascade 3d wire, this algorithm takes one guiding direction for fillets to be formed. - * It does not respect tangent directions on each filleted corner. This algorithm is based on extruding wire along the given direction - * to form a shell, then filleting the shell and finally extracting the filleted wire from the shell itself. - * Make sure you provide a direction that is not parallel to the wire and that forms high enough extrusion for the fillet to succeed. - * @param inputs Shape, radius and edge indexes to fillet - * @returns OpenCascade shape with filleted edges - * @group 3d fillets - * @shortname fillet 3d wire - * @drawable true - */ fillet3DWire(inputs: Inputs.OCCT.Fillet3DWireDto): Promise; - /** - * Fillets OpenCascade 3d wires, this algorithm takes one guiding direction for fillets to be formed. - * It does not respect tangent directions on each filleted corner. This algorithm is based on extruding wires along the given direction - * to form a shell, then filleting the shell and finally extracting the filleted wire from the shell itself. - * Make sure you provide a direction that is not parallel to the wire and that forms high enough extrusion for the fillet to succeed. - * @param inputs Shapes, radius and edge indexes to fillet - * @returns OpenCascade shape with filleted edges - * @group 3d fillets - * @shortname fillet 3d wires - * @drawable true - */ fillet3DWires(inputs: Inputs.OCCT.Fillet3DWiresDto): Promise; - /** - * Chamfer OpenCascade Shape edges - * @param inputs Shape, distance and edge indexes to chamfer - * @returns OpenCascade shape with chamfered edges - * @group 3d chamfers - * @shortname chamfer edges - * @drawable true - */ chamferEdges(inputs: Inputs.OCCT.ChamferDto): Promise; - /** - * Chamfers edges list with different distance on each edge. - * @param inputs Shape, edges and distance list - * @returns OpenCascade shape with chamfered edges - * @group 3d chamfers - * @shortname chamfer edges list - * @drawable true - */ chamferEdgesList(inputs: Inputs.OCCT.ChamferEdgesListDto): Promise; - /** - * Chamfers edge by a by two distances. Face indicates the first distance to be applied - * @param inputs Shape, edge, face, distance1 and distance2 - * @returns OpenCascade shape with chamfered edges - * @group 3d chamfers - * @shortname chamfer edge 2 dist - * @drawable true - */ chamferEdgeTwoDistances(inputs: Inputs.OCCT.ChamferEdgeTwoDistancesDto): Promise; - /** - * Chamfers edges by a by two distances. Face indicates the first distance to be applied - * @param inputs Shape, edges, faces, distance1 and distance2 - * @returns OpenCascade shape with chamfered edges - * @group 3d chamfers - * @shortname chamfer edges 2 dist - * @drawable true - */ chamferEdgesTwoDistances(inputs: Inputs.OCCT.ChamferEdgesTwoDistancesDto): Promise; - /** - * Chamfers edges by two distances. Face indicates the first distance to be applied - * @param inputs Shape, edges, faces, distance1 list and distance2 list - * @returns OpenCascade shape with chamfered edges - * @group 3d chamfers - * @shortname chamfer edges 2 dist lists - * @drawable true - */ chamferEdgesTwoDistancesLists(inputs: Inputs.OCCT.ChamferEdgesTwoDistancesListsDto): Promise; - /** - * Chamfers edge by a given distance and angle from the face - * @param inputs Shape, edge, face, distance and angle - * @returns OpenCascade shape with chamfered edges - * @group 3d chamfers - * @shortname chamfer edge angle - * @drawable true - */ chamferEdgeDistAngle(inputs: Inputs.OCCT.ChamferEdgeDistAngleDto): Promise; - /** - * Chamfers multiple edges by a given distance and angle from the faces - * @param inputs Shape, edge, face, distance and angle - * @returns OpenCascade shape with chamfered edges - * @group 3d chamfers - * @shortname chamfer edges angle - * @drawable true - */ chamferEdgesDistAngle(inputs: Inputs.OCCT.ChamferEdgesDistAngleDto): Promise; - /** - * Chamfers edges by a given distances and angles from the faces - * @param inputs Shape, edges, faces, distances and angles - * @returns OpenCascade shape with chamfered edges - * @group 3d chamfers - * @shortname chamfer edges angles - * @drawable true - */ chamferEdgesDistsAngles(inputs: Inputs.OCCT.ChamferEdgesDistsAnglesDto): Promise; - /** - * Fillets 2d wire or face - * @param inputs Shape - * @returns OpenCascade filleted shape result - * @group 2d fillets - * @shortname fillet 2d wire or face - * @drawable true - */ fillet2d(inputs: Inputs.OCCT.FilletDto): Promise; - /** - * Fillets 2d wires or faces - * @param inputs Shapes - * @returns OpenCascade filleted shapes result - * @group 2d fillets - * @shortname fillet 2d wires or faces - * @drawable true - */ fillet2dShapes(inputs: Inputs.OCCT.FilletShapesDto): Promise; - /** - * Fillets two planar edges into a wire by providing a radius, plane, edges and possible solution index if more than one result exists - * @param inputs Definition for fillets - * @returns OpenCascade wire shape if solution is found - * @group 2d fillets - * @shortname fillet 2 edges - * @drawable true - */ filletTwoEdgesInPlaneIntoAWire(inputs: Inputs.OCCT.FilletTwoEdgesInPlaneDto): Promise; - } declare class OCCTCurves { + } + declare class OCCTCurves { private readonly occWorkerManager; constructor(occWorkerManager: OCCTWorkerManager); - /** - * Creates a 2d ellipse. Be sure to use this geometry only for constructive purposes of modeling, but not for representation. You need to transform these curves to edges in order to draw them. - * @param inputs 2D Ellipse parameters - * @returns OpenCascade Geom2d_ellipse - * @group primitives - * @shortname ellipse 2d - */ geom2dEllipse(inputs: Inputs.OCCT.Geom2dEllipseDto): Promise; - /** - * Creates a trimmed curve from the basis curve limited between U1 and U2. This curve can't be drawn. - * @param inputs Bounds and strategy for trimming the curve - * @returns OpenCascade Geom2d_TrimmedCurve - * @group create - * @shortname trimmed 2d - */ geom2dTrimmedCurve(inputs: Inputs.OCCT.Geom2dTrimmedCurveDto): Promise; - /** - * Creates a trimmed 2d curve segment between two 2d points. This curve can't be drawn. - * @param inputs Two 2d points for start and end - * @returns OpenCascade Geom2d_Segment - * @group primitives - * @shortname segment 2d - */ geom2dSegment(inputs: Inputs.OCCT.Geom2dSegmentDto): Promise; - /** - * Gets 2d point represented by [number, number] on a curve at parameter. - * @param inputs 2D Curve shape and parameter - * @returns Point as array of 2 numbers - * @group get - * @shortname 2d point on curve - */ get2dPointFrom2dCurveOnParam(inputs: Inputs.OCCT.DataOnGeometryAtParamDto): Promise; - /** - * Creates a circle geom curve - * @param inputs Axis information and radius - * @returns Opencascade Geom_Circle curve - * @group primitives - * @shortname circle - * @drawable false - */ geomCircleCurve(inputs: Inputs.OCCT.CircleDto): Promise; - /** - * Creates an ellipse geom curve - * @param inputs Axis information and radius - * @returns Opencascade Geom_Ellipse curve - * @group primitives - * @shortname ellipse - * @drawable false - */ geomEllipseCurve(inputs: Inputs.OCCT.EllipseDto): Promise; - } declare class OCCTGeom { + } + declare class OCCTGeom { readonly curves: OCCTCurves; readonly surfaces: OCCTSurfaces; constructor(occWorkerManager: OCCTWorkerManager); - } declare class OCCTSurfaces { + } + declare class OCCTSurfaces { private readonly occWorkerManager; constructor(occWorkerManager: OCCTWorkerManager); - /** - * Creates an infinite cylindrical surface that can not be drawn. Be sure to use this geometry only for constructive purposes of modeling, but not for representation. - * @param inputs Cylinder parameters - * @returns OpenCascade cylindrical surface - * @group surfaces - * @shortname cylindrical - * @drawable false - */ cylindricalSurface(inputs: Inputs.OCCT.GeomCylindricalSurfaceDto): Promise; - /** - * Creates a surface from the face - * @param inputs Face shape - * @returns OpenCascade geom surface - * @group surfaces - * @shortname from face - * @drawable false - */ surfaceFromFace(inputs: Inputs.OCCT.ShapeDto): Promise; - } declare class OCCTIO { + } + declare class OCCTIO { readonly occWorkerManager: OCCTWorkerManager; constructor(occWorkerManager: OCCTWorkerManager); - /** - * Saves the step file - * @param inputs STEP filename and shape to be saved - * @group io - * @shortname save step - * @drawable false - */ saveShapeSTEP(inputs: Inputs.OCCT.SaveStepDto): Promise; - /** - * Saves the step file and returns the text value - * @param inputs STEP filename and shape to be saved - * @group io - * @shortname save step and return - * @drawable false - */ saveShapeSTEPAndReturn(inputs: Inputs.OCCT.SaveStepDto): Promise; - /** - * Saves the stl file - * @param inputs STL filename and shape to be saved - * @group io - * @shortname save stl - * @drawable false - */ saveShapeStl(inputs: Inputs.OCCT.SaveStlDto): Promise; - /** - * Saves the stl file and returns - * @param inputs STL filename and shape to be saved - * @group io - * @shortname save stl return - * @drawable false - */ saveShapeStlAndReturn(inputs: Inputs.OCCT.SaveStlDto): Promise; private saveSTEP; private saveStl; - }/** - * Contains various methods for OpenCascade implementation - */ + shapeToDxfPaths(inputs: Inputs.OCCT.ShapeToDxfPathsDto): Promise; + dxfPathsWithLayer(inputs: Inputs.OCCT.DxfPathsWithLayerDto): Promise; + dxfCreate(inputs: Inputs.OCCT.DxfPathsPartsListDto): Promise; + } declare class OCCT { readonly occWorkerManager: OCCTWorkerManager; readonly shapes: OCCTShapes; @@ -25965,1484 +9308,205 @@ declare namespace Bit { readonly shapeFix: OCCTShapeFix; io: OCCTIO; constructor(occWorkerManager: OCCTWorkerManager); - /** - * Creates polygon points from the shape faces - * @param inputs shape - * @group convert - * @shortname faces to polygon points - * @drawable false - */ shapeFacesToPolygonPoints(inputs: Inputs.OCCT.ShapeFacesToPolygonPointsDto): Promise; - /** - * Creates mesh from the shape - * @param inputs shape - * @group convert - * @shortname shape to mesh - * @drawable false - */ shapeToMesh(inputs: Inputs.OCCT.ShapeToMeshDto): Promise; - /** - * Creates mesh from the shape - * @param inputs shape - * @group convert - * @shortname shape to mesh - * @drawable false - */ shapesToMeshes(inputs: Inputs.OCCT.ShapesToMeshesDto): Promise; - /** - * Deletes shape from the cache to keep memory usage low - * @param inputs shape - * @group memory - * @shortname delete shape - */ deleteShape(inputs: Inputs.OCCT.ShapeDto): Promise; - /** - * Deletes shapes from the cache to keep memory usage low - * @param inputs shape - * @group memory - * @shortname delete shapes - */ deleteShapes(inputs: Inputs.OCCT.ShapesDto): Promise; - /** - * Cleans all cache and all shapes from the memory - * @param inputs shape - * @group memory - * @shortname clean all cache - */ cleanAllCache(): Promise; - } declare class OCCTOperations { + } + declare class OCCTOperations { private readonly occWorkerManager; constructor(occWorkerManager: OCCTWorkerManager); - /** - * Lofts wires into a shell - * @param inputs Loft wires - * @returns Resulting loft shape - * @group lofts - * @shortname loft - * @drawable true - */ loft(inputs: Inputs.OCCT.LoftDto): Promise; - /** - * Lofts wires into a shell by using many advanced options - * @param inputs Advanced loft parameters - * @returns Resulting loft shell - * @group lofts - * @shortname loft adv. - * @drawable true - */ loftAdvanced(inputs: Inputs.OCCT.LoftAdvancedDto): Promise; - /** - * Computes two closest points between two shapes - * @param inputs two shapes - * @returns Resulting points - * @group closest pts - * @shortname two shapes - * @drawable true - */ closestPointsBetweenTwoShapes(inputs: Inputs.OCCT.ClosestPointsBetweenTwoShapesDto): Promise; - /** - * Computes closest points between a list of points and a given shape - * @param inputs a list of points and a shape - * @returns Resulting points - * @group closest pts - * @shortname on shape - * @drawable true - */ closestPointsOnShapeFromPoints(inputs: Inputs.OCCT.ClosestPointsOnShapeFromPointsDto): Promise; - /** - * Computes closest points between a list of points and shapes - * @param inputs a list of points and a list of shapes - * @returns Resulting points - * @group closest pts - * @shortname on shapes - * @drawable true - */ closestPointsOnShapesFromPoints(inputs: Inputs.OCCT.ClosestPointsOnShapesFromPointsDto): Promise; - /** - * Computes distances between a list of points and a corresponding closest points on shapes. - * @param inputs a list of points and a shapes - * @returns Resulting distances - * @group measure - * @shortname distances points to shape - * @drawable false - */ distancesToShapeFromPoints(inputs: Inputs.OCCT.ClosestPointsOnShapeFromPointsDto): Promise; - /** - * Computes bounding box parameters of the shape - * @param inputs a shape - * @returns Min, max center and size of the bounding box - * @group measure - * @shortname bbox of shape - * @drawable false - */ boundingBoxOfShape(inputs: Inputs.OCCT.ShapeDto): Promise; - /** - * Get min point of the bounding box of the shape - * @param inputs a shape - * @returns Min point of the bounding box - * @group measure - * @shortname bbox min of shape - * @drawable true - */ boundingBoxMinOfShape(inputs: Inputs.OCCT.ShapeDto): Promise; - /** - * Get max point of the bounding box of the shape - * @param inputs a shape - * @returns Max point of the bounding box - * @group measure - * @shortname bbox max of shape - * @drawable true - */ boundingBoxMaxOfShape(inputs: Inputs.OCCT.ShapeDto): Promise; - /** - * Get center point of the bounding box of the shape - * @param inputs a shape - * @returns Center point of the bounding box - * @group measure - * @shortname bbox center of shape - * @drawable true - */ boundingBoxCenterOfShape(inputs: Inputs.OCCT.ShapeDto): Promise; - /** - * Get size point of the bounding box of the shape - * @param inputs a shape - * @returns Center point of the bounding box - * @group measure - * @shortname bbox size of shape - * @drawable false - */ boundingBoxSizeOfShape(inputs: Inputs.OCCT.ShapeDto): Promise; - /** - * Get bounding box shape of the shape - * @param inputs a shape - * @returns shape of the bounding box - * @group measure - * @shortname bbox shape of shape - * @drawable true - */ boundingBoxShapeOfShape(inputs: Inputs.OCCT.ShapeDto): Promise; - /** - * Computes bounding sphere parameters of the shape - * @param inputs a shape - * @returns Center and radius of the bounding sphere - * @group measure - * @shortname bsphere of shape - * @drawable false - */ boundingSphereOfShape(inputs: Inputs.OCCT.ShapeDto): Promise; - /** - * Get center point of the bounding sphere of the shape - * @param inputs a shape - * @returns Center point of the bounding sphere - * @group measure - * @shortname bsphere center of shape - * @drawable false - */ boundingSphereCenterOfShape(inputs: Inputs.OCCT.ShapeDto): Promise; - /** - * Get radius of the bounding sphere of the shape - * @param inputs a shape - * @returns Radius of the bounding sphere - * @group measure - * @shortname bsphere radius of shape - * @drawable false - */ boundingSphereRadiusOfShape(inputs: Inputs.OCCT.ShapeDto): Promise; - /** - * Get bounding sphere shape of the shape - * @param inputs a shape - * @returns shape of the bounding sphere - * @group measure - * @shortname bsphere shape of shape - * @drawable true - */ boundingSphereShapeOfShape(inputs: Inputs.OCCT.ShapeDto): Promise; - /** - * Extrudes the shape along direction - wire will produce shell, face will produce solid - * @param inputs Shape to extrude and direction parameter with tolerance - * @returns Resulting extruded shape - * @group extrusions - * @shortname extrude - * @drawable true - */ extrude(inputs: Inputs.OCCT.ExtrudeDto): Promise; - /** - * Extrudes the shapes along direction - * @param inputs Shapes to extrude and direction parameter with tolerance - * @returns Resulting extruded shapes - * @group extrusions - * @shortname extrude shapes - * @drawable true - */ extrudeShapes(inputs: Inputs.OCCT.ExtrudeShapesDto): Promise; - /** - * Splits the shape with shapes - * @param inputs Shape to split and shapes to split with - * @returns Resulting shapes - * @group divisions - * @shortname split - * @drawable true - */ splitShapeWithShapes(inputs: Inputs.OCCT.SplitDto): Promise; - /** - * Revolves the shape around the given direction - * @param inputs Revolve parameters - * @returns Resulting revolved shape - * @group revolutions - * @shortname revolve - * @drawable true - */ revolve(inputs: Inputs.OCCT.RevolveDto): Promise; - /** - * Rotated extrude that is perofrmed on the shape - * @param inputs Rotated extrusion inputs - * @returns OpenCascade shape - * @group extrusions - * @shortname rotated extrude - * @drawable true - */ rotatedExtrude(inputs: Inputs.OCCT.RotationExtrudeDto): Promise; - /** - * Pipe shapes along the wire - * @param inputs Path wire and shapes along the path - * @returns OpenCascade shape - * @group pipeing - * @shortname pipe - * @drawable true - */ pipe(inputs: Inputs.OCCT.ShapeShapesDto): Promise; - /** - * Pipes polyline wire with ngon profile. - * @param inputs Path polyline wire - * @returns OpenCascade piped shapes - * @group pipeing - * @shortname pipe polyline ngon - * @drawable true - */ pipePolylineWireNGon(inputs: Inputs.OCCT.PipePolygonWireNGonDto): Promise; - /** - * Pipe wires with cylindrical shape - * @param inputs Path wires and radius - * @returns OpenCascade piped shapes - * @group pipeing - * @shortname pipe wires cylindrical - * @drawable true - */ pipeWiresCylindrical(inputs: Inputs.OCCT.PipeWiresCylindricalDto): Promise; - /** - * Pipe wire with cylindrical shape - * @param inputs Path wire and radius - * @returns OpenCascade piped shapes - * @group pipeing - * @shortname pipe wire cylindrical - * @drawable true - */ pipeWireCylindrical(inputs: Inputs.OCCT.PipeWireCylindricalDto): Promise; - /** - * Offset for various shapes - * @param inputs Shape to offset and distance with tolerance - * @returns Resulting offset shape - * @group offsets - * @shortname offset - * @drawable true - */ offset(inputs: Inputs.OCCT.OffsetDto): Promise; - /** - * Offset advanced that give more options for offset, such as joinType for edges and corners - * @param inputs Shape to offset and advanced parameters - * @returns Resulting offset shape - * @group offsets - * @shortname offset adv. - * @drawable true - */ offsetAdv(inputs: Inputs.OCCT.OffsetAdvancedDto): Promise; - /** - * Thickens the shape into a solid by an offset distance - * @param inputs OpenCascade shape - * @returns OpenCascade solid shape - * @group offsets - * @shortname thicken - * @drawable true - */ makeThickSolidSimple(inputs: Inputs.OCCT.ThisckSolidSimpleDto): Promise; - /** - * Thickens the shape into a solid by joining - * @param inputs OpenCascade shape and options for thickening - * @returns OpenCascade solid shape - * @group offsets - * @shortname joined thicken - * @drawable true - */ makeThickSolidByJoin(inputs: Inputs.OCCT.ThickSolidByJoinDto): Promise; - /** - * Slices the shape - * @param inputs OpenCascade shape and options for slicing - * @returns OpenCascade shape - * @group divisions - * @shortname slice - * @drawable true - */ slice(inputs: Inputs.OCCT.SliceDto): Promise; - /** - * Slices the shape in step pattern - * @param inputs OpenCascade shape and options for slicing - * @returns OpenCascade shape - * @group divisions - * @shortname slice in step pattern - * @drawable true - */ sliceInStepPattern(inputs: Inputs.OCCT.SliceInStepPatternDto): Promise; - /** - * Offset the 3D wire. When using this method consider using it on filleted wires that do not contain sharp corners. - * You can use fillet 3D on it. - * @param inputs wire and shape - * @returns OpenCascade compound - * @group offsets - * @shortname offset 3d wire - * @drawable true - */ offset3DWire(inputs: Inputs.OCCT.Offset3DWireDto): Promise; - } declare class OCCTShapeFix { + } + declare class OCCTShapeFix { private readonly occWorkerManager; constructor(occWorkerManager: OCCTWorkerManager); - /** - * Performs the basic shape repair - * @param inputs the shape to be fixed and some options - * @returns OpenCascade fixed shape - * @group shape - * @shortname basic shape repair - * @drawable true - */ basicShapeRepair(inputs: Inputs.OCCT.BasicShapeRepairDto): Promise; - /** - * Fix small edge on wire - * @param inputs the wire to be fixed and some options - * @returns OpenCascade fixed wire - * @group wire - * @shortname fix small edge - * @drawable true - */ fixSmallEdgeOnWire(inputs: Inputs.OCCT.FixSmallEdgesInWireDto): Promise; - /** - * Fix edge orientations along wire - * @param inputs the wire to be fixed and some options - * @returns OpenCascade fixed wire - * @group wire - * @shortname fix edge orientations - * @drawable true - */ fixEdgeOrientationsAlongWire(inputs: Inputs.OCCT.ShapeDto): Promise; - } declare class OCCTCompound { + } + declare class OCCTCompound { private readonly occWorkerManager; constructor(occWorkerManager: OCCTWorkerManager); - /** - * Makes the compound shape, which can include any kind of shapes - * @param inputs OpenCascade shapes - * @returns OpenCascade compounded shape - * @group create - * @shortname make - * @drawable true - */ makeCompound(inputs: Inputs.OCCT.CompoundShapesDto): Promise; - /** - * Gets the shapes that compound is made of - * @param inputs OpenCascade shapes - * @returns OpenCascade compounded shape - * @group get - * @shortname get shapes of compound - * @drawable true - */ getShapesOfCompound(inputs: Inputs.OCCT.ShapeDto): Promise; - } declare class OCCTEdge { + } + declare class OCCTEdge { private readonly occWorkerManager; constructor(occWorkerManager: OCCTWorkerManager); - /** - * Creates linear edge from base line format {start: Point3, end: Point3} - * @param inputs base line - * @returns OpenCascade edge - * @group from base - * @shortname edge from base line - * @drawable true - */ fromBaseLine(inputs: Inputs.OCCT.LineBaseDto): Promise; - /** - * Creates linear edges from base lines format {start: Point3, end: Point3}[] - * @param inputs base lines - * @returns OpenCascade edges - * @group from base - * @shortname edges from base lines - * @drawable true - */ fromBaseLines(inputs: Inputs.OCCT.LineBaseDto): Promise; - /** - * Creates linear edge from base segment format [Point3, Point3] - * @param inputs base segment - * @returns OpenCascade edge - * @group from base - * @shortname edge from base segment - * @drawable true - */ fromBaseSegment(inputs: Inputs.OCCT.SegmentBaseDto): Promise; - /** - * Creates linear edge from base segments format [Point3, Point3][] - * @param inputs base segments - * @returns OpenCascade edges - * @group from base - * @shortname edges from base segments - * @drawable true - */ fromBaseSegments(inputs: Inputs.OCCT.SegmentsBaseDto): Promise; - /** - * Creates linear edges from collection of points - * @param inputs Points - * @returns OpenCascade edges - * @group from base - * @shortname edges from points - * @drawable true - */ fromPoints(inputs: Inputs.OCCT.PointsDto): Promise; - /** - * Creates linear edges from polyline definition - * @param inputs Polyline - * @returns OpenCascade edges - * @group from base - * @shortname edges from polyline - * @drawable true - */ fromBasePolyline(inputs: Inputs.OCCT.PolylineBaseDto): Promise; - /** - * Creates linear edges from triangle definition - * @param inputs Triangle - * @returns OpenCascade edges - * @group from base - * @shortname edges from triangle - * @drawable true - */ fromBaseTriangle(inputs: Inputs.OCCT.TriangleBaseDto): Promise; - /** - * Creates linear edges from mesh definition - * @param inputs Mesh - * @returns OpenCascade edges - * @group from base - * @shortname edges from mesh - * @drawable true - */ fromBaseMesh(inputs: Inputs.OCCT.MeshBaseDto): Promise; - /** - * Creates linear edge between two points - * @param inputs Two points between which edge should be created - * @returns OpenCascade edge - * @group primitives - * @shortname line - * @drawable true - */ line(inputs: Inputs.OCCT.LineDto): Promise; - /** - * Creates arc edge between three points - * @param inputs three points - * @returns OpenCascade edge - * @group primitives - * @shortname arc 3 points - * @drawable true - */ arcThroughThreePoints(inputs: Inputs.OCCT.ArcEdgeThreePointsDto): Promise; - /** - * Creates arc edge between two points given the tangent direction vector on first point. - * @param inputs two points and tangent vector - * @returns OpenCascade edge - * @group primitives - * @shortname arc 2 points tangent - * @drawable true - */ arcThroughTwoPointsAndTangent(inputs: Inputs.OCCT.ArcEdgeTwoPointsTangentDto): Promise; - /** - * Creates an arc edge between two points on a circle - * @param inputs two points and circle edge - * @returns OpenCascade edge - * @group primitives - * @shortname arc from circle and points - * @drawable true - */ arcFromCircleAndTwoPoints(inputs: Inputs.OCCT.ArcEdgeCircleTwoPointsDto): Promise; - /** - * Creates an arc edge between two alpha angles on a circle - * @param inputs two angles and circle edge - * @returns OpenCascade edge - * @group primitives - * @shortname arc from circle and angles - * @drawable true - */ arcFromCircleAndTwoAngles(inputs: Inputs.OCCT.ArcEdgeCircleTwoAnglesDto): Promise; - /** - * Creates an arc edge between the point on a circle and a given alpha angle - * @param inputs point, circle edge and alpha angle - * @returns OpenCascade edge - * @group primitives - * @shortname arc from circle point and angle - * @drawable true - */ arcFromCirclePointAndAngle(inputs: Inputs.OCCT.ArcEdgeCirclePointAngleDto): Promise; - /** - * Creates OpenCascade circle edge - * @param inputs Circle parameters - * @returns OpenCascade circle edge - * @group primitives - * @shortname circle - * @drawable true - */ createCircleEdge(inputs: Inputs.OCCT.CircleDto): Promise; - /** - * Creates OpenCascade ellipse edge - * @param inputs Ellipse parameters - * @returns OpenCascade ellipse edge - * @group primitives - * @shortname ellipse - * @drawable true - */ createEllipseEdge(inputs: Inputs.OCCT.EllipseDto): Promise; - /** - * Removes internal faces for the shape - * @param inputs Shape - * @returns OpenCascade shape with no internal edges - * @group shapes - * @shortname remove internal - * @drawable true - */ removeInternalEdges(inputs: Inputs.OCCT.ShapeDto): Promise; - /** - * Creates an edge from geom curve and geom surface - * @param inputs shapes are expected to contain 2 array elements - first is geom curve, second geom surface - * @returns OpenCascade TopoDS_Edge - * @group from - * @shortname 2d curve and surface - * @drawable true - */ makeEdgeFromGeom2dCurveAndSurface(inputs: Inputs.OCCT.CurveAndSurfaceDto): Promise; - /** - * Gets the edge by providing an index from the shape - * @param inputs Shape - * @returns OpenCascade edge - * @group get - * @shortname get edge - * @drawable true - */ getEdge(inputs: Inputs.OCCT.EdgeIndexDto): Promise; - /** - * Gets the edges of a shape in a list - * @param inputs Shape - * @returns OpenCascade edge list - * @group get - * @shortname get edges - * @drawable true - */ getEdges(inputs: Inputs.OCCT.ShapeDto): Promise; - /** - * Gets the edges of a wire ordered along the direction of the wire - * @param inputs wire shape - * @returns OpenCascade edge list - * @group get - * @shortname get edges along wire - * @drawable true - */ getEdgesAlongWire(inputs: Inputs.OCCT.ShapeDto): Promise; - /** - * Gets circular edges of a wire ordered along the direction of the wire - * @param inputs wire shape - * @returns OpenCascade edge list - * @group get - * @shortname get circular edges along wire - * @drawable true - */ getCircularEdgesAlongWire(inputs: Inputs.OCCT.ShapeDto): Promise; - /** - * Gets linear edges of a wire ordered along the direction of the wire - * @param inputs wire shape - * @returns OpenCascade edge list - * @group get - * @shortname get linear edges along wire - * @drawable true - */ getLinearEdgesAlongWire(inputs: Inputs.OCCT.ShapeDto): Promise; - /** - * Gets corner points of edges for a shape. There's no order guarantee here. All duplicates are removed, so when three edges form one corner, that will be represented by a single point in the list. - * @param inputs Shape that contains edges - wire, face, shell, solid - * @returns List of points - * @group get - * @shortname corners - * @drawable true - */ getCornerPointsOfEdgesForShape(inputs: Inputs.OCCT.ShapeDto): Promise; - /** - * Gets the edge length - * @param inputs edge - * @returns Length - * @group get - * @shortname edge length - * @drawable false - */ getEdgeLength(inputs: Inputs.OCCT.ShapeDto): Promise; - /** - * Gets the edge lengths of the shape - * @param inputs shape - * @returns Lengths - * @group get - * @shortname edge lengths of shape - * @drawable false - */ getEdgeLengthsOfShape(inputs: Inputs.OCCT.ShapeDto): Promise; - /** - * Gets the lengths of the edges - * @param inputs edges - * @returns Lengths - * @group get - * @shortname lengths - * @drawable false - */ getEdgesLengths(inputs: Inputs.OCCT.ShapesDto): Promise; - /** - * Gets the center of mass for the edge - * @param inputs edge - * @returns Point representing center of mass - * @group get - * @shortname center of mass - * @drawable true - */ getEdgeCenterOfMass(inputs: Inputs.OCCT.ShapeDto): Promise; - /** - * Gets the centers of mass for the edges - * @param inputs edges - * @returns Points representing centers of mass - * @group get - * @shortname centers of mass - * @drawable true - */ getEdgesCentersOfMass(inputs: Inputs.OCCT.ShapesDto): Promise; - /** - * Gets the center point of the circular edge. If edge is not circular, point will not be returned. - * @param inputs edge - * @returns Point representing center of the circular edge - * @group get circular edge - * @shortname get center of circular edge - * @drawable true - */ getCircularEdgeCenterPoint(inputs: Inputs.OCCT.ShapeDto): Promise; - /** - * Gets the radius of the circular edge. If edge is not circular, radius will not be returned. - * @param inputs edge - * @returns Radius of the circular edge - * @group get circular edge - * @shortname get radius of circular edge - * @drawable false - */ getCircularEdgeRadius(inputs: Inputs.OCCT.ShapeDto): Promise; - /** - * Gets the direction vector of the plane of the circular edge. If edge is not circular, direction vector will not be returned. - * @param inputs edge - * @returns Direction vector of the circular edge - * @group get circular edge - * @shortname get plane direction of circular edge - * @drawable true - */ getCircularEdgePlaneDirection(inputs: Inputs.OCCT.ShapeDto): Promise; - /** - * Gets the point on edge at param - * @param input edge - * @returns Point on param - * @group extract - * @shortname point at param - * @drawable true - */ pointOnEdgeAtParam(inputs: Inputs.OCCT.DataOnGeometryAtParamDto): Promise; - /** - * Gets the points on edges at param - * @param input edges - * @returns Points on param - * @group extract - * @shortname points on edges at param - * @drawable true - */ pointsOnEdgesAtParam(inputs: Inputs.OCCT.DataOnGeometryesAtParamDto): Promise; - /** - * Gets the points of all edges from a shape in separate lists for each edge - * @param inputs Shape - * @returns OpenCascade points lists - * @group extract - * @shortname edges to points - * @drawable false - */ edgesToPoints(inputs: Inputs.OCCT.EdgesToPointsDto): Promise; - /** - * Computes reversed edge from input edge - * @param inputs Shape - * @returns OpenCascade edge - * @group get - * @shortname reversed edge - * @drawable true - */ reversedEdge(inputs: Inputs.OCCT.ShapeDto): Promise; - /** - * Gets the tangent vector on edge at param - * @param input edge - * @returns Tangent vector on param - * @group extract - * @shortname tangent at param - * @drawable true - */ tangentOnEdgeAtParam(inputs: Inputs.OCCT.DataOnGeometryAtParamDto): Promise; - /** - * Gets the tangent vectors on edges at param - * @param input edges - * @returns Tangent vectors on param - * @group extract - * @shortname tangents on edges at param - * @drawable true - */ tangentsOnEdgesAtParam(inputs: Inputs.OCCT.DataOnGeometryesAtParamDto): Promise; - /** - * Gets the point on edge at length - * @param input edge and length - * @returns Point on edge - * @group extract - * @shortname point at length - * @drawable true - */ pointOnEdgeAtLength(inputs: Inputs.OCCT.DataOnGeometryAtLengthDto): Promise; - /** - * Gets the points on edges at length - * @param input edges and length - * @returns Points on edges - * @group extract - * @shortname points at length - * @drawable true - */ pointsOnEdgesAtLength(inputs: Inputs.OCCT.DataOnGeometryesAtLengthDto): Promise; - /** - * Gets the tangent vector on edge at length - * @param input edge and length - * @returns Tangent vector on edge - * @group extract - * @shortname tangent at length - * @drawable true - */ tangentOnEdgeAtLength(inputs: Inputs.OCCT.DataOnGeometryAtLengthDto): Promise; - /** - * Gets the tangent vectors on edges at length - * @param input edges and length - * @returns Tangent vectors on edges - * @group extract - * @shortname tangents at length - * @drawable true - */ tangentsOnEdgesAtLength(inputs: Inputs.OCCT.DataOnGeometryesAtLengthDto): Promise; - /** - * Gets the start point on edge - * @param input edge - * @returns Start point - * @group extract - * @shortname start point - * @drawable true - */ startPointOnEdge(inputs: Inputs.OCCT.ShapeDto): Promise; - /** - * Gets the start points on edges - * @param input edges - * @returns Start points - * @group extract - * @shortname start points - * @drawable true - */ startPointsOnEdges(inputs: Inputs.OCCT.ShapesDto): Promise; - /** - * Gets the end point on edge - * @param input edge - * @returns End point - * @group extract - * @shortname end point - * @drawable true - */ endPointOnEdge(inputs: Inputs.OCCT.ShapeDto): Promise; - /** - * Gets the end points on edges - * @param input edges - * @returns End points - * @group extract - * @shortname end points - * @drawable true - */ endPointsOnEdges(inputs: Inputs.OCCT.ShapesDto): Promise; - /** - * Divides edge by params to points - * @param input edge and division params - * @returns Points - * @group extract - * @shortname points by params - * @drawable true - */ divideEdgeByParamsToPoints(inputs: Inputs.OCCT.DivideDto): Promise; - /** - * Divides edges by params to points - * @param input edges and division params - * @returns Points - * @group extract - * @shortname points by params on edges - * @drawable false - */ divideEdgesByParamsToPoints(inputs: Inputs.OCCT.DivideShapesDto): Promise; - /** - * Divides edge by length to points - * @param input edge and division params - * @returns Points - * @group extract - * @shortname points by distance - * @drawable true - */ divideEdgeByEqualDistanceToPoints(inputs: Inputs.OCCT.DivideDto): Promise; - /** - * Divides edges by length to points - * @param input edges and division params - * @returns Points - * @group extract - * @shortname points by distance on edges - * @drawable false - */ divideEdgesByEqualDistanceToPoints(inputs: Inputs.OCCT.DivideShapesDto): Promise; - /** - * Creates lines from two given points till circle tangent locations - * @param input resulting lines - * @returns lines - * @group constraint - * @shortname tan lines from 2 pts to circle - * @drawable true - */ constraintTanLinesFromTwoPtsToCircle(inputs: Inputs.OCCT.ConstraintTanLinesFromTwoPtsToCircleDto): Promise; - /** - * Creates lines from a given point till circle tangent locations - * @param input resulting lines - * @returns lines - * @group constraint - * @shortname tan lines from pt to circle - * @drawable true - */ constraintTanLinesFromPtToCircle(inputs: Inputs.OCCT.ConstraintTanLinesFromPtToCircleDto): Promise; - /** - * Creates tangent lines between two circles. - * @param input resulting lines - * @returns lines - * @group constraint - * @shortname tan lines on two circles - * @drawable true - */ constraintTanLinesOnTwoCircles(inputs: Inputs.OCCT.ConstraintTanLinesOnTwoCirclesDto): Promise; - /** - * Creates tangent circles between two circles. - * @param input resulting circles - * @returns circles - * @group constraint - * @shortname tan circles on two circles - * @drawable true - */ constraintTanCirclesOnTwoCircles(inputs: Inputs.OCCT.ConstraintTanCirclesOnTwoCirclesDto): Promise; - /** - * Creates tangent circles between a point and a circle. - * @param input resulting circles - * @returns circles - * @group constraint - * @shortname tan circles on circle and pnt - * @drawable true - */ constraintTanCirclesOnCircleAndPnt(inputs: Inputs.OCCT.ConstraintTanCirclesOnCircleAndPntDto): Promise; - /** - * Checks whether an edge is linear - * @param input edge - * @returns boolean if is linear - * @group is - * @shortname is edge linear - * @drawable false - */ isEdgeLinear(inputs: Inputs.OCCT.ShapeDto): Promise; - /** - * Checks whether an edge is circular - * @param input edge - * @returns boolean if is circular - * @group is - * @shortname is edge circular - * @drawable false - */ isEdgeCircular(inputs: Inputs.OCCT.ShapeDto): Promise; - } declare class OCCTFace { + } + declare class OCCTFace { private readonly occWorkerManager; constructor(occWorkerManager: OCCTWorkerManager); - /** - * Creates face from triangle definition - * @param inputs Triangle - * @returns OpenCascade face - * @group from base - * @shortname face from triangle - * @drawable true - */ fromBaseTriangle(inputs: Inputs.OCCT.TriangleBaseDto): Promise; - /** - * Creates faces from mesh definition - * @param inputs Mesh - * @returns OpenCascade faces - * @group from base - * @shortname faces from mesh - * @drawable true - */ fromBaseMesh(inputs: Inputs.OCCT.MeshBaseDto): Promise; - /** - * Creates a faces from wires on face - * @param inputs OpenCascade wires and guiding face - * @returns OpenCascade faces - * @group from - * @shortname faces from wires on face - * @drawable true - */ createFacesFromWiresOnFace(inputs: Inputs.OCCT.FacesFromWiresOnFaceDto): Promise; - /** - * Creates a face from wire on face - * @param inputs OpenCascade wire shape and guiding face - * @returns OpenCascade face shape - * @group from - * @shortname face from wire on face - * @drawable true - */ createFaceFromWireOnFace(inputs: Inputs.OCCT.FaceFromWireOnFaceDto): Promise; - /** - * Creates a face from wire - * @param inputs OpenCascade wire shape and indication if face should be planar - * @returns OpenCascade face shape - * @group from - * @shortname face from wire - * @drawable true - */ createFaceFromWire(inputs: Inputs.OCCT.FaceFromWireDto): Promise; - /** - * Creates a face from wires. This can produce hollow faces. - * @param inputs OpenCascade wire shapes and indication if face should be planar - * @returns OpenCascade face shape - * @group from - * @shortname face from wires - * @drawable true - */ createFaceFromWires(inputs: Inputs.OCCT.FaceFromWiresDto): Promise; - /** - * Creates a face from wires on the guiding face. This can produce hollow faces. - * @param inputs OpenCascade wire shapes and indication if wire is inside the face - * @returns OpenCascade face shape - * @group from - * @shortname face from wires on face - * @drawable true - */ createFaceFromWiresOnFace(inputs: Inputs.OCCT.FaceFromWiresOnFaceDto): Promise; - /** - * Creates faces from wires - * @param inputs OpenCascade wire shape and indication if face should be planar - * @returns OpenCascade face shape - * @group from - * @shortname faces from wires - * @drawable true - */ createFacesFromWires(inputs: Inputs.OCCT.FacesFromWiresDto): Promise; - /** - * Creates face from multiple circle tangent wires - * @param inputs OpenCascade circle wire shapes - * @returns OpenCascade face shape - * @group from - * @shortname face from circles tan - * @drawable true - */ createFaceFromMultipleCircleTanWires(inputs: Inputs.OCCT.FaceFromMultipleCircleTanWiresDto): Promise; - /** - * Creates face from multiple circle tangent wire collections - * @param inputs OpenCascade circle wire shapes - * @returns OpenCascade face shape - * @group from - * @shortname face from multiple circle tan collections - * @drawable true - */ createFaceFromMultipleCircleTanWireCollections(inputs: Inputs.OCCT.FaceFromMultipleCircleTanWireCollectionsDto): Promise; - /** - * Creates a face from the surface - * @param inputs Face shape - * @returns OpenCascade surface - * @group from - * @shortname surface - * @drawable true - */ faceFromSurface(inputs: Inputs.OCCT.ShapeDto): Promise; - /** - * Creates a face from the surface and a wire - * @param inputs OpenCascade surface, a wire and indication wether face should be created inside or not - * @returns Face shape - * @group from - * @shortname surface and wire - * @drawable true - */ faceFromSurfaceAndWire(inputs: Inputs.OCCT.FaceFromSurfaceAndWireDto): Promise; - /** - * Creates OpenCascade Polygon face - * @param inputs Polygon points - * @returns OpenCascade polygon face - * @group primitives - * @shortname polygon - * @drawable true - */ createPolygonFace(inputs: Inputs.OCCT.PolygonDto): Promise; - /** - * Creates OpenCascade circle face - * @param inputs Circle parameters - * @returns OpenCascade circle face - * @group primitives - * @shortname circle - * @drawable true - */ createCircleFace(inputs: Inputs.OCCT.CircleDto): Promise; - /** - * Creates OpenCascade hexagons in grid - * @param inputs Hexagon parameters - * @returns OpenCascade hexagons in grid - * @group primitives - * @shortname hexagons in grid - * @drawable true - */ hexagonsInGrid(inputs: Inputs.OCCT.HexagonsInGridDto): Promise; - /** - * Creates OpenCascade ellipse face - * @param inputs Ellipse parameters - * @returns OpenCascade ellipse face - * @group primitives - * @shortname ellipse - * @drawable true - */ createEllipseFace(inputs: Inputs.OCCT.EllipseDto): Promise; - /** - * Creates OpenCascade square face - * @param inputs Square parameters - * @returns OpenCascade square face - * @group primitives - * @shortname square - * @drawable true - */ createSquareFace(inputs: Inputs.OCCT.SquareDto): Promise; - /** - * Creates OpenCascade rectangle face - * @param inputs rectangle parameters - * @returns OpenCascade rectangle - * @group primitives - * @shortname rectangle - * @drawable true - */ createRectangleFace(inputs: Inputs.OCCT.RectangleDto): Promise; - /** - * Gets the face by providing an index from the shape - * @param inputs Shape - * @returns OpenCascade face - * @group get - * @shortname face - * @drawable true - */ + createLPolygonFace(inputs: Inputs.OCCT.LPolygonDto): Promise; + createStarFace(inputs: Inputs.OCCT.StarDto): Promise; + createChristmasTreeFace(inputs: Inputs.OCCT.ChristmasTreeDto): Promise; + createParallelogramFace(inputs: Inputs.OCCT.ParallelogramDto): Promise; + createHeartFace(inputs: Inputs.OCCT.Heart2DDto): Promise; + createNGonFace(inputs: Inputs.OCCT.NGonWireDto): Promise; + createIBeamProfileFace(inputs: Inputs.OCCT.IBeamProfileDto): Promise; + createHBeamProfileFace(inputs: Inputs.OCCT.HBeamProfileDto): Promise; + createTBeamProfileFace(inputs: Inputs.OCCT.TBeamProfileDto): Promise; + createUBeamProfileFace(inputs: Inputs.OCCT.UBeamProfileDto): Promise; getFace(inputs: Inputs.OCCT.ShapeIndexDto): Promise; - /** - * Gets the faces of the shape in a list - * @param inputs Shape - * @returns OpenCascade faces array - * @group get - * @shortname faces - * @drawable true - */ getFaces(inputs: Inputs.OCCT.ShapeDto): Promise; - /** - * Computes reversed face from input face - * @param inputs Face - * @returns OpenCascade face - * @group get - * @shortname reversed - * @drawable true - */ reversedFace(inputs: Inputs.OCCT.ShapeDto): Promise; - /** - * Subdivides a face to point grid - * @param inputs Face and options for subdivision - * @returns points - * @group extract - * @shortname points - * @drawable true - */ subdivideToPoints(inputs: Inputs.OCCT.FaceSubdivisionDto): Promise; - /** - * Subdivides a face to wires - * @param inputs Face and options for subdivision - * @returns wires - * @group extract - * @shortname wires - * @drawable true - */ subdivideToWires(inputs: Inputs.OCCT.FaceSubdivisionToWiresDto): Promise; - /** - * Subdivides a face to rectangle wires - * @param inputs Face and options for subdivision - * @returns wires - * @group patterns - * @shortname rectangle wires on face - * @drawable true - */ subdivideToRectangleWires(inputs: Inputs.OCCT.FaceSubdivideToRectangleWiresDto): Promise; - /** - * Subdivides a face to rectangle wires - * @param inputs Face and options for subdivision - * @returns wires - * @group patterns - * @shortname rectangle holes on face - * @drawable true - */ subdivideToRectangleHoles(inputs: Inputs.OCCT.FaceSubdivideToRectangleHolesDto): Promise; - /** - * Subdivides a face to hexagon wires - * @param inputs Face and options for subdivision - * @returns wires - * @group patterns - * @shortname hexagon wires on face - * @drawable true - */ subdivideToHexagonWires(inputs: Inputs.OCCT.FaceSubdivideToHexagonWiresDto): Promise; - /** - * Subdivides a face to hexagon holes - * @param inputs Face and options for subdivision - * @returns faces - * @group patterns - * @shortname hexagon holes on face - * @drawable true - */ subdivideToHexagonHoles(inputs: Inputs.OCCT.FaceSubdivideToHexagonHolesDto): Promise; - /** - * Subdivides a face to point grid with shifts and removals on nth uv rows or columns - * @param inputs Face and params for subdivision - * @returns points - * @group extract - * @shortname points nth - * @drawable true - */ subdivideToPointsControlled(inputs: Inputs.OCCT.FaceSubdivisionControlledDto): Promise; - /** - * Subdivides a face to normals grid - * @param inputs Face and params for subdivision - * @returns normal vectors - * @group extract - * @shortname normals - * @drawable true - */ subdivideToNormals(inputs: Inputs.OCCT.FaceSubdivisionDto): Promise; - /** - * Subdivides a face to uv grid - * @param inputs Face and params for subdivision - * @returns uv params in array - * @group extract - * @shortname uvs - * @drawable true - */ subdivideToUV(inputs: Inputs.OCCT.FaceSubdivisionDto): Promise; - /** - * Get point on UV where U and V are described between 0 and 1. These will be mapped to real bounds. - * @param inputs Face and params for subdivision - * @returns point - * @group extract - * @shortname point on uv - * @drawable true - */ pointOnUV(inputs: Inputs.OCCT.DataOnUVDto): Promise; - /** - * Get normal on UV where U and V are described between 0 and 1. These will be mapped to real bounds. - * @param inputs Face and params for subdivision - * @returns normal vector - * @group extract - * @shortname normal on uv - * @drawable true - */ normalOnUV(inputs: Inputs.OCCT.DataOnUVDto): Promise; - /** - * Get points on UVs where U and V are described between 0 and 1 in two dimensional arrays. These will be mapped to real bounds. - * @param inputs Face and params for subdivision - * @returns points - * @group extract - * @shortname points on uvs - * @drawable true - */ pointsOnUVs(inputs: Inputs.OCCT.DataOnUVsDto): Promise; - /** - * Get normals on UVs where U and V are described between 0 and 1 in two dimensional arrays. These will be mapped to real bounds. - * @param inputs Face and params for subdivision - * @returns normals - * @group extract - * @shortname normals on uvs - * @drawable true - */ normalsOnUVs(inputs: Inputs.OCCT.DataOnUVsDto): Promise; - /** - * Subdivides a face to points along a line on parameter - * @param inputs Face and params for subdivision - * @returns points - * @group extract - * @shortname points on param - * @drawable true - */ subdivideToPointsOnParam(inputs: Inputs.OCCT.FaceLinearSubdivisionDto): Promise; - /** - * Gets the wire along the parameter on the face - * @param inputs Face and param - * @returns wire - * @group extract - * @shortname wire along param - * @drawable true - */ wireAlongParam(inputs: Inputs.OCCT.WireAlongParamDto): Promise; - /** - * Gets the wires along the parameters on the face - * @param inputs Face and params - * @returns wires - * @group extract - * @shortname wires along params - * @drawable true - */ wiresAlongParams(inputs: Inputs.OCCT.WiresAlongParamsDto): Promise; - /** - * Gets the U min bound of the face - * @param inputs OCCT Face - * @returns u min bound - * @group get - * @shortname u min - * @drawable false - */ getUMinBound(inputs: Inputs.OCCT.ShapeDto): Promise; - /** - * Gets the U max bound of the face - * @param inputs OCCT Face - * @returns u max bound - * @group get - * @shortname u max - * @drawable false - */ getUMaxBound(inputs: Inputs.OCCT.ShapeDto): Promise; - /** - * Gets the V min bound of the face - * @param inputs OCCT Face - * @returns v min bound - * @group get - * @shortname v min - * @drawable false - */ getVMinBound(inputs: Inputs.OCCT.ShapeDto): Promise; - /** - * Gets the V max bound of the face - * @param inputs OCCT Face - * @returns v max bound - * @group get - * @shortname v max - * @drawable false - */ getVMaxBound(inputs: Inputs.OCCT.ShapeDto): Promise; - /** - * Get the area of the face - * @param inputs OCCT Face - * @returns area - * @group get - * @shortname face area - * @drawable false - */ getFaceArea(inputs: Inputs.OCCT.ShapeDto): Promise; - /** - * Get the areas of the faces - * @param inputs OCCT Faces - * @returns areas - * @group get - * @shortname areas of faces - * @drawable false - */ getFacesAreas(inputs: Inputs.OCCT.ShapesDto): Promise; - /** - * Get the face center of mass point - * @param inputs OCCT Face - * @returns point - * @group get - * @shortname center of mass - * @drawable true - */ getFaceCenterOfMass(inputs: Inputs.OCCT.ShapeDto): Promise; - /** - * Get the center of mass points for faces - * @param inputs OCCT Faces - * @returns points - * @group get - * @shortname centers of mass - * @drawable true - */ getFacesCentersOfMass(inputs: Inputs.OCCT.ShapesDto): Promise; - /** - * Filters points on face - * @param inputs face and collection of points with options - * @returns filtered points - * @group filter - * @shortname filter face points - * @drawable true - */ filterFacePoints(inputs: Inputs.OCCT.FilterFacePointsDto): Promise; - /** - * Filters points on faces - * @param inputs faces and collection of points with options - * @returns filtered points - * @group filter - * @shortname filter points on faces - * @drawable true - */ filterFacesPoints(inputs: Inputs.OCCT.FilterFacesPointsDto): Promise; - } declare class OCCTShape { + } + declare class OCCTShape { private readonly occWorkerManager; constructor(occWorkerManager: OCCTWorkerManager); - /** - * Remove internal edges that are not connected to any face in the shape - * @param inputs shape - * @returns purged shape - * @group edit - * @shortname purge internal edges - * @drawable true - */ purgeInternalEdges(inputs: Inputs.OCCT.ShapeDto): Promise; - /** - * Unifies faces, edges in the same domain and has possibility to concatinate bsplines - * @param inputs shape - * @returns unified shape - * @group edit - * @shortname unify same domain - * @drawable true - */ unifySameDomain(inputs: Inputs.OCCT.UnifySameDomainDto): Promise; - /** - * Check if the shape is closed - * @param inputs shape - * @returns boolean answer - * @group analysis - * @shortname is closed - * @drawable false - */ isClosed(inputs: Inputs.OCCT.ShapeDto): Promise; - /** - * Check if the shape is convex - * @param inputs shape - * @returns boolean answer - * @group analysis - * @shortname is convex - * @drawable false - */ isConvex(inputs: Inputs.OCCT.ShapeDto): Promise; - /** - * Check if the shape is checked - * @param inputs shape - * @returns boolean answer - * @group analysis - * @shortname is checked - * @drawable false - */ isChecked(inputs: Inputs.OCCT.ShapeDto): Promise; - /** - * Check if the shape is free - * @param inputs shape - * @returns boolean answer - * @group analysis - * @shortname is free - * @drawable false - */ isFree(inputs: Inputs.OCCT.ShapeDto): Promise; - /** - * Check if the shape is infinite - * @param inputs shape - * @returns boolean answer - * @group analysis - * @shortname is infinite - * @drawable false - */ isInfinite(inputs: Inputs.OCCT.ShapeDto): Promise; - /** - * Check if the shape is modified - * @param inputs shape - * @returns boolean answer - * @group analysis - * @shortname is modified - * @drawable false - */ isModified(inputs: Inputs.OCCT.ShapeDto): Promise; - /** - * Check if the shape is locked - * @param inputs shape - * @returns boolean answer - * @group analysis - * @shortname is locked - * @drawable false - */ isLocked(inputs: Inputs.OCCT.ShapeDto): Promise; - /** - * Check if the shape is null - * @param inputs shape - * @returns boolean answer - * @group analysis - * @shortname is null - * @drawable false - */ isNull(inputs: Inputs.OCCT.ShapeDto): Promise; - /** - * Check if the shape is equal to other shape - * @param inputs shapes - * @returns boolean answer - * @group analysis - * @shortname is equal - * @drawable false - */ isEqual(inputs: Inputs.OCCT.CompareShapesDto): Promise; - /** - * Check if the shape is not equal to other shape - * @param inputs shapes - * @returns boolean answer - * @group analysis - * @shortname is not equal - * @drawable false - */ isNotEqual(inputs: Inputs.OCCT.CompareShapesDto): Promise; - /** - * Check if the shape is partner to other shape - * @param inputs shapes - * @returns boolean answer - * @group analysis - * @shortname is partner - * @drawable false - */ isPartner(inputs: Inputs.OCCT.CompareShapesDto): Promise; - /** - * Check if the shape is the same as the other shape - * @param inputs shapes - * @returns boolean answer - * @group analysis - * @shortname is same - * @drawable false - */ isSame(inputs: Inputs.OCCT.CompareShapesDto): Promise; - /** - * Get the shape orientation - * @param inputs shape - * @returns shape orientation - * @group analysis - * @shortname get orientation - * @drawable false - */ getOrientation(inputs: Inputs.OCCT.ShapeDto): Promise; - /** - * Get the shape type - * @param inputs shape - * @returns shape type - * @group analysis - * @shortname get shape type - * @drawable false - */ getShapeType(inputs: Inputs.OCCT.ShapeDto): Promise; - } declare class OCCTShapes { + } + declare class OCCTShapes { readonly vertex: OCCTVertex; readonly edge: OCCTEdge; readonly wire: OCCTWire; @@ -27452,1097 +9516,168 @@ declare namespace Bit { readonly compound: OCCTCompound; readonly shape: OCCTShape; constructor(occWorkerManager: OCCTWorkerManager); - } declare class OCCTShell { + } + declare class OCCTShell { private readonly occWorkerManager; constructor(occWorkerManager: OCCTWorkerManager); - /** - * Creates a shell from faces - * @param inputs OpenCascade shell and faces - * @returns OpenCascade shell - * @group create - * @shortname sew - * @drawable true - */ sewFaces(inputs: Inputs.OCCT.SewDto): Promise; - /** - * Get shell surface area - * @param inputs shell shape - * @returns Surface area - * @group get - * @shortname area - * @drawable false - */ getShellSurfaceArea(inputs: Inputs.OCCT.ShapeDto): Promise; - } declare class OCCTSolid { + } + declare class OCCTSolid { private readonly occWorkerManager; constructor(occWorkerManager: OCCTWorkerManager); - /** - * Creates Solid From shell that must be closed - * @param inputs Closed shell to make into solid - * @returns OpenCascade Solid - * @group from - * @shortname solid from closed shell - * @drawable true - */ fromClosedShell(inputs: Inputs.OCCT.ShapeDto): Promise; - /** - * Creates OpenCascade Box - * @param inputs Box size and center - * @returns OpenCascade Box - * @group primitives - * @shortname box - * @drawable true - */ createBox(inputs: Inputs.OCCT.BoxDto): Promise; - /** - * Creates OpenCascade Cube - * @param inputs Cube size and center - * @returns OpenCascade Cube - * @group primitives - * @shortname cube - * @drawable true - */ createCube(inputs: Inputs.OCCT.CubeDto): Promise; - /** - * Creates OpenCascade Box from corner - * @param inputs Box size and corner coordinates - * @returns OpenCascade Box - * @group primitives - * @shortname box corner - * @drawable true - */ createBoxFromCorner(inputs: Inputs.OCCT.BoxFromCornerDto): Promise; - /** - * Creates OpenCascade Cylinder - * @param inputs Cylinder parameters - * @returns OpenCascade Cylinder - * @group primitives - * @shortname cylinder - * @drawable true - */ createCylinder(inputs: Inputs.OCCT.CylinderDto): Promise; - /** - * Creates OpenCascade Cylinders on simple bit by bit lines represented by two points - * @param inputs Cylinder parameters - * @returns OpenCascade Cylinder - * @group primitives - * @shortname cylinders on lines - * @drawable true - */ createCylindersOnLines(inputs: Inputs.OCCT.CylindersOnLinesDto): Promise; - /** - * Creates OpenCascade Sphere - * @param inputs Sphere radius and center - * @returns OpenCascade Sphere - * @group primitives - * @shortname sphere - * @drawable true - */ createSphere(inputs: Inputs.OCCT.SphereDto): Promise; - /** - * Creates OpenCascade Cone - * @param inputs Cone parameters - * @returns OpenCascade cone shape - * @group primitives - * @shortname cone - * @drawable true - */ createCone(inputs: Inputs.OCCT.ConeDto): Promise; - /** - * Get solid surface area - * @param inputs Closed solid shape - * @returns Surface area - * @group get - * @shortname area - * @drawable false - */ + createStarSolid(inputs: Inputs.OCCT.StarSolidDto): Promise; + createNGonSolid(inputs: Inputs.OCCT.NGonSolidDto): Promise; + createParallelogramSolid(inputs: Inputs.OCCT.ParallelogramSolidDto): Promise; + createHeartSolid(inputs: Inputs.OCCT.HeartSolidDto): Promise; + createChristmasTreeSolid(inputs: Inputs.OCCT.ChristmasTreeSolidDto): Promise; + createLPolygonSolid(inputs: Inputs.OCCT.LPolygonSolidDto): Promise; + createIBeamProfileSolid(inputs: Inputs.OCCT.IBeamProfileSolidDto): Promise; + createHBeamProfileSolid(inputs: Inputs.OCCT.HBeamProfileSolidDto): Promise; + createTBeamProfileSolid(inputs: Inputs.OCCT.TBeamProfileSolidDto): Promise; + createUBeamProfileSolid(inputs: Inputs.OCCT.UBeamProfileSolidDto): Promise; getSolidSurfaceArea(inputs: Inputs.OCCT.ShapeDto): Promise; - /** - * Get solid volume - * @param inputs Closed solid shape - * @returns volume - * @group get - * @shortname volume - * @drawable false - */ getSolidVolume(inputs: Inputs.OCCT.ShapeDto): Promise; - /** - * Get solids volumes - * @param inputs Closed solid shapes - * @returns volumes - * @group get - * @shortname volumes - * @drawable false - */ getSolidsVolumes(inputs: Inputs.OCCT.ShapesDto): Promise; - /** - * Get solid center of mass - * @param inputs Closed solid shape - * @returns center of mass point - * @group get - * @shortname center of mass - * @drawable true - */ getSolidCenterOfMass(inputs: Inputs.OCCT.ShapeDto): Promise; - /** - * Get centers of mass of solids - * @param inputs Closed solid shapes - * @returns Points indicating centers of mass - * @group get - * @shortname centers of mass - * @drawable true - */ getSolidsCentersOfMass(inputs: Inputs.OCCT.ShapesDto): Promise; - /** - * Gets the solids of the shape in a list - * @param inputs Shape - * @returns OpenCascade solids array - * @group get - * @shortname solids - * @drawable true - */ getSolids(inputs: Inputs.OCCT.ShapeDto): Promise; - /** - * Filters collection of points based on relationship with the solid. You can choose whether to output in, on or out points. - * @param inputs OpenCascade solid and collection of points with options - * @returns filtered points - * @group filter - * @shortname filter solid points - * @drawable true - */ filterSolidPoints(inputs: Inputs.OCCT.FilterSolidPointsDto): Promise; - } declare class OCCTVertex { + } + declare class OCCTVertex { private readonly occWorkerManager; constructor(occWorkerManager: OCCTWorkerManager); - /** - * Creates vertex shape from x y z coordinates - * @param inputs x y z coordinates - * @returns OpenCascade vertex - * @group from - * @shortname vertex from xyz - * @drawable true - */ vertexFromXYZ(inputs: Inputs.OCCT.XYZDto): Promise; - /** - * Creates vertex shape from point - * @param inputs a point - * @returns OpenCascade vertex - * @group from - * @shortname vertex from point - * @drawable true - */ vertexFromPoint(inputs: Inputs.OCCT.PointDto): Promise; - /** - * Creates vertices from points - * @param inputs a point - * @returns OpenCascade vertices - * @group from - * @shortname vertices from points - * @drawable true - */ verticesFromPoints(inputs: Inputs.OCCT.PointsDto): Promise; - /** - * Creates compound shape containing multiple vertices. This simply speeds up rendering and allows to apply occt transformations easily on vertex groups. - * @param inputs points - * @returns OpenCascade vertices as compound shape - * @group from - * @shortname compound vertices from points - * @drawable true - */ verticesCompoundFromPoints(inputs: Inputs.OCCT.PointsDto): Promise; - /** - * Get all vertices in the list of a shape - * @param inputs a shape - * @returns OpenCascade vertices - * @group get - * @shortname get vertices from shape - * @drawable true - */ getVertices(inputs: Inputs.OCCT.ShapeDto): Promise; - /** - * Get all vertices in the list of a shape as points - * @param inputs a shape - * @returns Points - * @group get - * @shortname get vertices as points - * @drawable true - */ getVerticesAsPoints(inputs: Inputs.OCCT.ShapeDto): Promise; - /** - * Transforms vertices to points - * @param inputs a vertex shapes - * @returns Points - * @group transform - * @shortname vertices to points - * @drawable true - */ verticesToPoints(inputs: Inputs.OCCT.ShapesDto): Promise; - /** - * Transform vertex to point - * @param inputs a vertex shape - * @returns Point - * @group transform - * @shortname vertex to point - * @drawable true - */ vertexToPoint(inputs: Inputs.OCCT.ShapesDto): Promise; - /** - * @param inputs points, shape and direction that includes the length - * @returns Points - * @group place - * @shortname project points - * @drawable true - */ projectPoints(inputs: Inputs.OCCT.ProjectPointsOnShapeDto): Promise; - } declare class OCCTWire { + } + declare class OCCTWire { private readonly occWorkerManager; constructor(occWorkerManager: OCCTWorkerManager); - /** - * Creates linear wire from base line format {start: Point3, end: Point3} - * @param inputs base line - * @returns OpenCascade wire - * @group from base - * @shortname wire from base line - * @drawable true - */ fromBaseLine(inputs: Inputs.OCCT.LineBaseDto): Promise; - /** - * Creates linear wires from base lines format {start: Point3, end: Point3}[] - * @param inputs base lines - * @returns OpenCascade wires - * @group from base - * @shortname wires from base lines - * @drawable true - */ fromBaseLines(inputs: Inputs.OCCT.LineBaseDto): Promise; - /** - * Creates linear wire from base segment format [Point3, Point3] - * @param inputs base segment - * @returns OpenCascade wire - * @group from base - * @shortname wire from base segment - * @drawable true - */ fromBaseSegment(inputs: Inputs.OCCT.SegmentBaseDto): Promise; - /** - * Creates linear wires from base segments format [Point3, Point3][] - * @param inputs base segments - * @returns OpenCascade wires - * @group from base - * @shortname wires from base segments - * @drawable true - */ fromBaseSegments(inputs: Inputs.OCCT.SegmentsBaseDto): Promise; - /** - * Creates wire from collection of points - * @param inputs Points - * @returns OpenCascade wire - * @group from base - * @shortname wire from points - * @drawable true - */ fromPoints(inputs: Inputs.OCCT.PointsDto): Promise; - /** - * Creates wire from polyline definition - * @param inputs Polyline - * @returns OpenCascade wire - * @group from base - * @shortname wire from polyline - * @drawable true - */ fromBasePolyline(inputs: Inputs.OCCT.PolylineBaseDto): Promise; - /** - * Creates wire from triangle definition - * @param inputs Triangle - * @returns OpenCascade wire - * @group from base - * @shortname wire from triangle - * @drawable true - */ fromBaseTriangle(inputs: Inputs.OCCT.TriangleBaseDto): Promise; - /** - * Creates wires from mesh definition - * @param inputs Mesh - * @returns OpenCascade wires - * @group from base - * @shortname wires from mesh - * @drawable true - */ fromBaseMesh(inputs: Inputs.OCCT.MeshBaseDto): Promise; - /** - * Creates OpenCascade Polygon wire - * @param inputs Polygon points - * @returns OpenCascade polygon wire shape - * @group via points - * @shortname polygon - * @drawable true - */ createPolygonWire(inputs: Inputs.OCCT.PolygonDto): Promise; - /** - * Creates OpenCascade Polygons - * @param inputs Polygon points - * @returns OpenCascade polygon wires shapes - * @group multiple - * @shortname polygons - * @drawable true - */ createPolygons(inputs: Inputs.OCCT.PolygonsDto): Promise; - /** - * Creates OpenCascade line wire - * @param inputs line start and end point - * @returns OpenCascade line wire shape - * @group via points - * @shortname line - * @drawable true - */ createLineWire(inputs: Inputs.OCCT.LineDto): Promise; - /** - * Creates OpenCascade line wire with extensions - * @param inputs line start and end point and extension lengths for both start and end - * @returns OpenCascade line wire shape - * @group via points - * @shortname line with extensions - * @drawable true - */ createLineWireWithExtensions(inputs: Inputs.OCCT.LineWithExtensionsDto): Promise; - /** - * Creates OpenCascade lines - * @param inputs lines with start and end points - * @returns OpenCascade line wire shapes - * @group multiple - * @shortname lines - * @drawable true - */ createLines(inputs: Inputs.OCCT.LinesDto): Promise; - /** - * Splits a wire on a set of given points - * @param inputs wire and a list of points - * @returns OpenCascade line wire shapes - * @group extract - * @shortname split on points - * @drawable true - */ splitOnPoints(inputs: Inputs.OCCT.SplitWireOnPointsDto): Promise; - /** - * Transform shape wires to points ordered in lists. - * This also removes duplicated points between start end end points of - * consecutive edges on the wire - * @param inputs OCCT shape - * @returns point lists for wires - * @group extract - * @shortname wires to points - * @drawable false - */ wiresToPoints(inputs: Inputs.OCCT.WiresToPointsDto): Promise; - /** - * Creates OpenCascade polyline wire - * @param inputs polyline points - * @returns OpenCascade polyline wire shape - * @group via points - * @shortname polyline - * @drawable true - */ createPolylineWire(inputs: Inputs.OCCT.PolylineDto): Promise; - /** - * Creates zig zag between two wires - * @param inputs two wires and zig zag parameters - * @returns OpenCascade polyline wire shape - * @group via wires - * @shortname zig zag between two wires - * @drawable true - */ createZigZagBetweenTwoWires(inputs: Inputs.OCCT.ZigZagBetweenTwoWiresDto): Promise; - /** - * Creates a tangent wire enclosing two planar circles - * @param inputs two circle wires and tolerance - * @returns OpenCascade wire shape - * @group via wires - * @shortname tangent wire from two circles - * @drawable true - */ createWireFromTwoCirclesTan(inputs: Inputs.OCCT.WireFromTwoCirclesTanDto): Promise; - /** - * Creates OpenCascade polyline wires - * @param inputs polylines - * @returns OpenCascade polyline wire shapes - * @group multiple - * @shortname polylines - * @drawable true - */ createPolylines(inputs: Inputs.OCCT.PolylinesDto): Promise; - /** - * Creates OpenCascade Bezier wire - * @param inputs Points through which to make bezier curve - * @returns OpenCascade Bezier wire - * @group via points - * @shortname bezier - * @drawable true - */ createBezier(inputs: Inputs.OCCT.BezierDto): Promise; - /** - * Creates OpenCascade Bezier wire with weights - * @param inputs Points through which to make bezier curve and weights on those points which are used to control the curve - * @returns OpenCascade Bezier wire - * @group via points - * @shortname bezier weights - * @drawable true - */ createBezierWeights(inputs: Inputs.OCCT.BezierWeightsDto): Promise; - /** - * Creates OpenCascade Bezier wires - * @param inputs Multiple bezier wire definitions - * @returns OpenCascade Bezier wires - * @group multiple - * @shortname bezier wires - * @drawable true - */ createBezierWires(inputs: Inputs.OCCT.BezierWiresDto): Promise; - /** - * Creates OpenCascade BSpline wire from points. This method can be used to create nicely shaped (periodic) loops. - * @param inputs Points through which to make the curve, periodic bool and tolerance - * @returns OpenCascade BSpline wire - * @group via points - * @shortname interpolate - * @drawable true - */ interpolatePoints(inputs: Inputs.OCCT.InterpolationDto): Promise; - /** - * Creates OpenCascade multiple interpolated wires - * @param inputs Interpolated wire definitions - * @returns OpenCascade BSpline wires - * @group multiple - * @shortname interpolate wires - * @drawable true - */ interpolateWires(inputs: Inputs.OCCT.InterpolateWiresDto): Promise; - /** - * Creates OpenCascade BSPline wire - * @param inputs Points through which to make BSpline - * @returns OpenCascade BSpline wire - * @group via points - * @shortname bspline - * @drawable true - */ createBSpline(inputs: Inputs.OCCT.BSplineDto): Promise; - /** - * Creates OpenCascade BSPline wires - * @param inputs Points through which to make BSpline - * @returns OpenCascade BSpline wires - * @group multiple - * @shortname bsplines - * @drawable true - */ createBSplines(inputs: Inputs.OCCT.BSplinesDto): Promise; - /** - * Combines OpenCascade edges and wires into a single wire - * @param inputs List of shapes of edges and wires - * @returns OpenCascade wire - * @group build - * @shortname combine - * @drawable true - */ combineEdgesAndWiresIntoAWire(inputs: Inputs.OCCT.ShapesDto): Promise; - /** - * Creates wire from edge - * @param inputs An edge to transform into a wire - * @returns OpenCascade wire - * @group build - * @shortname wire from edge - * @drawable true - */ createWireFromEdge(inputs: Inputs.OCCT.ShapeDto): Promise; - /** - * Adds OpenCascade edges and wires into another wire - * @param inputs List of shapes of edges and wires and a single shape wire to which edges need to be added - * @returns OpenCascade wire - * @group build - * @shortname extend - * @drawable true - */ addEdgesAndWiresToWire(inputs: Inputs.OCCT.ShapeShapesDto): Promise; - /** - * Divides OpenCascade wire to points blindly following its parametric space - * @param inputs Describes into how many points should the wire be divided - * @returns Points on wire - * @group extract - * @shortname points by params - * @drawable true - */ divideWireByParamsToPoints(inputs: Inputs.OCCT.DivideDto): Promise; - /** - * Divides OpenCascade wires to points blindly following its parametric space - * @param inputs Describes into how many points should the wires be divided - * @returns Points on wire - * @group extract from wires - * @shortname points by params - * @drawable true - */ divideWiresByParamsToPoints(inputs: Inputs.OCCT.DivideShapesDto): Promise; - /** - * Divides OpenCascade wire to equal distance points - * @param inputs Describes into how many points should the wire be divided - * @returns Points on wire - * @group extract - * @shortname points by distance - * @drawable true - */ divideWireByEqualDistanceToPoints(inputs: Inputs.OCCT.DivideDto): Promise; - /** - * Divides OpenCascade wires to equal distance points - * @param inputs Describes into how many points should the wires be divided - * @returns Points on wire - * @group extract from wires - * @shortname points by distance - * @drawable true - */ divideWiresByEqualDistanceToPoints(inputs: Inputs.OCCT.DivideShapesDto): Promise; - /** - * Evaluates point on a wire at parameter value between 0 and 1, being start and end points - * @param inputs Wire shape and parameter - * @returns Point as array of 3 numbers - * @group extract - * @shortname point at param - * @drawable true - */ pointOnWireAtParam(inputs: Inputs.OCCT.DataOnGeometryAtParamDto): Promise; - /** - * Evaluates point on a wire at certain length - * @param inputs Wire shape and length value - * @returns Point as array of 3 numbers - * @group extract - * @shortname point at length - * @drawable true - */ pointOnWireAtLength(inputs: Inputs.OCCT.DataOnGeometryAtLengthDto): Promise; - /** - * Evaluates points on a wire at certain lengths - * @param inputs Wire shape and lengths array - * @returns Points as arrays of 3 numbers - * @group extract - * @shortname points at lengths - * @drawable true - */ pointsOnWireAtLengths(inputs: Inputs.OCCT.DataOnGeometryAtLengthsDto): Promise; - /** - * Evaluates points on a wire at equal length - * @param inputs Wire shape and length - * @returns Points as arrays of 3 numbers - * @group extract - * @shortname points at equal length - * @drawable true - */ pointsOnWireAtEqualLength(inputs: Inputs.OCCT.PointsOnWireAtEqualLengthDto): Promise; - /** - * Evaluates points on a wire at pattern of lengths - * @param inputs Wire shape and lengths pattern - * @returns Points as arrays of 3 numbers - * @group extract - * @shortname points at pattern of lengths - * @drawable true - */ pointsOnWireAtPatternOfLengths(inputs: Inputs.OCCT.PointsOnWireAtPatternOfLengthsDto): Promise; - /** - * Evaluates tangent vector on a wire at parameter value between 0 and 1, being start and end points - * @param inputs Wire shape and parameter - * @returns Tangent vector as array of 3 numbers - * @group extract - * @shortname tangent at param - * @drawable true - */ tangentOnWireAtParam(inputs: Inputs.OCCT.DataOnGeometryAtParamDto): Promise; - /** - * Evaluates tangent vector on a wire at certain length - * @param inputs Wire shape and length value - * @returns Tangent vector as array of 3 numbers - * @group extract - * @shortname tangent at length - * @drawable true - */ tangentOnWireAtLength(inputs: Inputs.OCCT.DataOnGeometryAtLengthDto): Promise; - /** - * Computes 3 derivative vectors of a curve at a given length - * @param inputs Wire shape and length value - * @returns Three arrays of vectors. Each vector represents derivatives in order - first, second, third - * @group extract - * @shortname derivatives at length - * @drawable false - */ - derivativesOnWireAtLength(inputs: Inputs.OCCT.DataOnGeometryAtLengthDto): Promise<[Inputs.Base.Vector3, Inputs.Base.Vector3, Inputs.Base.Vector3]>; - /** - * Computes 3 derivative vectors of a curve on parameter between 0 and 1. - * @param inputs Wire shape and parameter value - * @returns Three arrays of vectors. Each vector represents derivatives in order - first, second, third - * @group extract - * @shortname derivatives at param - * @drawable false - */ - derivativesOnWireAtParam(inputs: Inputs.OCCT.DataOnGeometryAtParamDto): Promise<[Inputs.Base.Vector3, Inputs.Base.Vector3, Inputs.Base.Vector3]>; - /** - * Computes the start point on the wire at param 0 - * @param inputs Wire shape - * @returns The start point on wire - * @group extract - * @shortname start point - * @drawable true - */ + derivativesOnWireAtLength(inputs: Inputs.OCCT.DataOnGeometryAtLengthDto): Promise<[ + Inputs.Base.Vector3, + Inputs.Base.Vector3, + Inputs.Base.Vector3 + ]>; + derivativesOnWireAtParam(inputs: Inputs.OCCT.DataOnGeometryAtParamDto): Promise<[ + Inputs.Base.Vector3, + Inputs.Base.Vector3, + Inputs.Base.Vector3 + ]>; startPointOnWire(inputs: Inputs.OCCT.ShapeDto): Promise; - /** - * Computes the middle point on the wire at param 0.5 - * @param inputs Wire shape - * @returns The middle point on wire - * @group extract - * @shortname mid point - * @drawable true - */ midPointOnWire(inputs: Inputs.OCCT.ShapeDto): Promise; - /** - * Computes the end point on the wire at param 1 - * @param inputs Wire shape - * @returns The length of the wire - * @group extract - * @shortname end point - * @drawable true - */ endPointOnWire(inputs: Inputs.OCCT.ShapeDto): Promise; - /** - * Creates OpenCascade circle wire - * @param inputs Circle parameters - * @returns OpenCascade circle wire - * @group primitives - * @shortname circle - * @drawable true - */ createCircleWire(inputs: Inputs.OCCT.CircleDto): Promise; - /** - * Creates OpenCascade hexagon wires in grid - * @param inputs grid parameters - * @returns OpenCascade hexagon wires - * @group primitives - * @shortname hegagons in grid - * @drawable true - */ hexagonsInGrid(inputs: Inputs.OCCT.HexagonsInGridDto): Promise; - /** - * Creates OpenCascade square wire - * @param inputs Square parameters - * @returns OpenCascade square wire - * @group primitives - * @shortname square - * @drawable true - */ createSquareWire(inputs: Inputs.OCCT.SquareDto): Promise; - /** - * Creates OpenCascade star wire - * @param inputs star parameters - * @returns OpenCascade star wire - * @group primitives - * @shortname star - * @drawable true - */ createStarWire(inputs: Inputs.OCCT.StarDto): Promise; - /** - * Creates Christmas tree wire - * @param inputs christmas tree parameters - * @returns OpenCascade christmas tree wire - * @group primitives - * @shortname christmas tree - * @drawable true - */ createChristmasTreeWire(inputs: Inputs.OCCT.ChristmasTreeDto): Promise; - /** - * Creates OpenCascade n-gon wire - * @param inputs ngon parameters - * @returns OpenCascade ngon wire - * @group primitives - * @shortname n-gon - * @drawable true - */ createNGonWire(inputs: Inputs.OCCT.NGonWireDto): Promise; - /** - * Creates n parallelogram wire - * @param inputs parallelogram parameters - * @returns OpenCascade parallelogram wire - * @group primitives - * @shortname parallelogram - * @drawable true - */ createParallelogramWire(inputs: Inputs.OCCT.ParallelogramDto): Promise; - /** - * Creates a heart wire - * @param inputs heart parameters - * @returns OpenCascade heart shaped wire - * @group primitives - * @shortname heart - * @drawable true - */ createHeartWire(inputs: Inputs.OCCT.Heart2DDto): Promise; - /** - * Creates OpenCascade rectangle wire - * @param inputs rectangle parameters - * @returns OpenCascade rectangle - * @group primitives - * @shortname rectangle - * @drawable true - */ createRectangleWire(inputs: Inputs.OCCT.RectangleDto): Promise; - /** - * Creates OpenCascade L polygon wire - * @param inputs L polygon parameters - * @returns OpenCascade polygon - * @group primitives - * @shortname L polygon - * @drawable true - */ createLPolygonWire(inputs: Inputs.OCCT.LPolygonDto): Promise; - /** - * Creates OpenCascade ellipse wire - * @param inputs Ellipse parameters - * @returns OpenCascade ellipse wire - * @group primitives - * @shortname ellipse - * @drawable true - */ + createIBeamProfileWire(inputs: Inputs.OCCT.IBeamProfileDto): Promise; + createHBeamProfileWire(inputs: Inputs.OCCT.HBeamProfileDto): Promise; + createTBeamProfileWire(inputs: Inputs.OCCT.TBeamProfileDto): Promise; + createUBeamProfileWire(inputs: Inputs.OCCT.UBeamProfileDto): Promise; createEllipseWire(inputs: Inputs.OCCT.EllipseDto): Promise; - /** - * Creates OpenCascade text wires based on simplex font created by Dr. A. V. Hershey - * @param inputs Text parameters - * @returns OpenCascade text wires - * @group primitives - * @shortname text wires - * @drawable true - */ textWires(inputs: Inputs.OCCT.TextWiresDto): Promise; - /** - * Creates OpenCascade compound out of text wires and returns additional information based on simplex font created by Dr. A. V. Hershey - * @param inputs Text parameters - * @returns OpenCascade text compound derivative data - * @group primitives - * @shortname text wires deriv - * @drawable true - */ textWiresWithData(inputs: Inputs.OCCT.TextWiresDto): Promise>; - /** - * Gets the wire by providing an index from the shape - * @param inputs Shape - * @returns OpenCascade wire - * @group get - * @shortname wire - * @drawable true - */ getWire(inputs: Inputs.OCCT.ShapeIndexDto): Promise; - /** - * Gets all the wires from the shape - * @param inputs Shape - * @returns OpenCascade wires - * @group get - * @shortname wires - * @drawable true - */ getWires(inputs: Inputs.OCCT.ShapeDto): Promise; - /** - * Get the wire center of mass point - * @param inputs OCCT Wire - * @returns point - * @group get - * @shortname center of mass - * @drawable true - */ getWireCenterOfMass(inputs: Inputs.OCCT.ShapeDto): Promise; - /** - * Get the wires centers of mass point - * @param inputs OCCT Wires - * @returns points - * @group get - * @shortname centers of mass - * @drawable true - */ getWiresCentersOfMass(inputs: Inputs.OCCT.ShapesDto): Promise; - /** - * Computes reversed wire from input wire - * @param inputs Shape - * @returns OpenCascade wire - * @group get - * @shortname reversed - * @drawable true - */ reversedWire(inputs: Inputs.OCCT.ShapeDto): Promise; - /** - * Computes reversed wire by reversing all edges and combining them into a new wire - * @param inputs Shape - * @returns OpenCascade wire - * @group get - * @shortname reversed wire by rev edges - * @drawable true - */ reversedWireFromReversedEdges(inputs: Inputs.OCCT.ShapeDto): Promise; - /** - * Checks whether wire is closed - * @param inputs wire - * @returns boolean - * @group get - * @shortname is wire closed - * @drawable false - */ isWireClosed(inputs: Inputs.OCCT.ShapeDto): Promise; - /** - * Gets the wire length - * @param inputs wire - * @returns Length - * @group get - * @shortname length - * @drawable false - */ getWireLength(inputs: Inputs.OCCT.ShapeDto): Promise; - /** - * Gets the lengths of wires - * @param inputs wires - * @returns Lengths - * @group get - * @shortname lengths - * @drawable false - */ getWiresLengths(inputs: Inputs.OCCT.ShapesDto): Promise; - /** - * Places a wire on the face by mapping it's 2d coordinates to UV space. Wire must be positioned on the ground XZ plane for this to work. - * @param inputs two shapes - first a wire and second a face - * @returns OpenCascade wire - * @group place - * @shortname wire on face - * @drawable true - */ placeWireOnFace(inputs: Inputs.OCCT.WireOnFaceDto): Promise; - /** - * Places multiple wires on the face by mapping it's 2d coordinates to UV space. Wires must be positioned on the ground XZ plane for this to work. - * @param inputs a face and a list of wires - * @returns OpenCascade wires - * @group place - * @shortname wires on face - * @drawable true - */ placeWiresOnFace(inputs: Inputs.OCCT.WiresOnFaceDto): Promise; - /** - * Closes the open wire with additional straight edge joining start and end points - * @param inputs Shape - * @returns OpenCascade wire - * @group edit - * @shortname close open wire - * @drawable true - */ closeOpenWire(inputs: Inputs.OCCT.ShapeDto): Promise; - /** - * Project wire on the shape - * @param inputs wire and shape - * @returns OpenCascade compound - * @group place - * @shortname project - * @drawable true - */ project(inputs: Inputs.OCCT.ProjectWireDto): Promise; - /** - * Project multiple wires on the shape - * @param inputs wire and shape - * @returns OpenCascade compound - * @group place - * @shortname project wires - * @drawable true - */ projectWires(inputs: Inputs.OCCT.ProjectWiresDto): Promise; - } declare class OCCTTransforms { + } + declare class OCCTTransforms { private readonly occWorkerManager; constructor(occWorkerManager: OCCTWorkerManager); - /** - * Transforms the shape - * @param inputs Transformation description - * @returns OpenCascade shape - * @group on single shape - * @shortname transform - * @drawable true - */ transform(inputs: Inputs.OCCT.TransformDto): Promise; - /** - * Rotate the shape - * @param inputs Rotation description - * @returns OpenCascade shape - * @group on single shape - * @shortname rotate - * @drawable true - */ rotate(inputs: Inputs.OCCT.RotateDto): Promise; - /** - * Rotate the shape around the provided center - * @param inputs Rotation description - * @returns OpenCascade shape - * @group on single shape - * @shortname rotate around center - * @drawable true - */ rotateAroundCenter(inputs: Inputs.OCCT.RotateAroundCenterDto): Promise; - /** - * Align the shape - * @param inputs Align description - * @returns OpenCascade shape - * @group on single shape - * @shortname align - * @drawable true - */ align(inputs: Inputs.OCCT.AlignDto): Promise; - /** - * Align the shape with normal and axis - * @param inputs Align description - * @returns OpenCascade shape - * @group on single shape - * @shortname align normal and axis - * @drawable true - */ alignNormAndAxis(inputs: Inputs.OCCT.AlignNormAndAxisDto): Promise; - /** - * Align and translates the shape - * @param inputs Align description - * @returns OpenCascade shape - * @group on single shape - * @shortname align and translate - * @drawable true - */ alignAndTranslate(inputs: Inputs.OCCT.AlignAndTranslateDto): Promise; - /** - * Translates the shape - * @param inputs Translation description - * @returns OpenCascade shape - * @group on single shape - * @shortname translate - * @drawable true - */ translate(inputs: Inputs.OCCT.TranslateDto): Promise; - /** - * Scales the shape - * @param inputs Scale description - * @returns OpenCascade shape - * @group on single shape - * @shortname scale - * @drawable true - */ scale(inputs: Inputs.OCCT.ScaleDto): Promise; - /** - * Scales the shape in 3D - * @param inputs Scale 3D description - * @returns OpenCascade scaled shape - * @group on single shape - * @shortname scale 3d - * @drawable true - */ scale3d(inputs: Inputs.OCCT.Scale3DDto): Promise; - /** - * Mirrors the shape - * @param inputs Mirror axis origin, axis direction and shape - * @returns OpenCascade shape - * @group on single shape - * @shortname mirror - * @drawable true - */ mirror(inputs: Inputs.OCCT.MirrorDto): Promise; - /** - * Mirrors the shape along the normal and origin - * @param inputs Normal for mirroring with origin - * @returns OpenCascade shape - * @group on single shape - * @shortname mirror normal - * @drawable true - */ mirrorAlongNormal(inputs: Inputs.OCCT.MirrorAlongNormalDto): Promise; - /** - * Transforms the array of shapes with transformations - * @param inputs Transformation descriptions - * @returns OpenCascade shapes - * @group on shapes - * @shortname transforms - * @drawable true - */ transformShapes(inputs: Inputs.OCCT.TransformShapesDto): Promise; - /** - * Rotate the shapes with rotations - * @param inputs Rotation descriptions - * @returns OpenCascade shapes - * @group on shapes - * @shortname rotations - * @drawable true - */ rotateShapes(inputs: Inputs.OCCT.RotateShapesDto): Promise; - /** - * Rotate the shapes around the center and an axis - * @param inputs Rotation descriptions - * @returns OpenCascade shapes - * @group on shapes - * @shortname rotations around center - * @drawable true - */ rotateAroundCenterShapes(inputs: Inputs.OCCT.RotateAroundCenterShapesDto): Promise; - /** - * Align the shapes with alignments - * @param inputs Align descriptions - * @returns OpenCascade shapes - * @group on shapes - * @shortname alignments - * @drawable true - */ alignShapes(inputs: Inputs.OCCT.AlignShapesDto): Promise; - /** - * Align and translate the shapes - * @param inputs Align descriptions - * @returns OpenCascade shapes - * @group on shapes - * @shortname align and translate - * @drawable true - */ alignAndTranslateShapes(inputs: Inputs.OCCT.AlignAndTranslateShapesDto): Promise; - /** - * Translates the shapes with translations - * @param inputs Translation descriptions - * @returns OpenCascade shapes - * @group on shapes - * @shortname translations - * @drawable true - */ translateShapes(inputs: Inputs.OCCT.TranslateShapesDto): Promise; - /** - * Scales the shapes with scale factors - * @param inputs Scale descriptions - * @returns OpenCascade shapes - * @group on shapes - * @shortname scales - * @drawable true - */ scaleShapes(inputs: Inputs.OCCT.ScaleShapesDto): Promise; - /** - * Scales the shape in 3D - * @param inputs Scale 3D descriptions - * @returns OpenCascade scaled shapes - * @group on shapes - * @shortname scales 3d - * @drawable true - */ scale3dShapes(inputs: Inputs.OCCT.Scale3DShapesDto): Promise; - /** - * Mirrors the shapes with multiple mirrors - * @param inputs Mirror axis origins, axis directions and shapes - * @returns OpenCascade shapes - * @group on shapes - * @shortname mirrors - * @drawable true - */ mirrorShapes(inputs: Inputs.OCCT.MirrorShapesDto): Promise; - /** - * Mirrors the shapes along the normal and origin - * @param inputs Normals for mirroring with origins - * @returns OpenCascade shapes - * @group on shapes - * @shortname mirrors normal - * @drawable true - */ mirrorAlongNormalShapes(inputs: Inputs.OCCT.MirrorAlongNormalShapesDto): Promise; } - /** - * Contains various functions that expose BABYLONJS objects - */ declare class Babylon { mesh: BabylonMesh; gaussianSplatting: BabylonGaussianSplatting; @@ -28563,416 +9698,102 @@ declare namespace Bit { gui: BabylonGui; gizmo: BabylonGizmo; constructor(context: Context, drawHelper: DrawHelper, color: Color); - } declare class BabylonArcRotateCamera { + } + declare class BabylonArcRotateCamera { private readonly context; constructor(context: Context); - /** - * Creates a camera that rotates around a given target while traveling the arc path. This camera is suitable for simple 3D navigation and is a default camera used by bitbybit. - * @param inputs Describes the arc rotate camera - * @returns BabylonJS arc rotate camera - * @group create - * @shortname new arc rotate camera - */ create(inputs: Inputs.BabylonCamera.ArcRotateCameraDto): BABYLON.ArcRotateCamera; private getRadians; - } declare class BabylonCamera { + } + declare class BabylonCamera { private readonly context; free: BabylonFreeCamera; arcRotate: BabylonArcRotateCamera; target: BabylonTargetCamera; constructor(context: Context); - /** - * Freeze projection matrix of the camera - * @param inputs camera to freeze - * @group adjust - * @shortname freeze projection matrix - */ freezeProjectionMatrix(inputs: Inputs.BabylonCamera.CameraDto): void; - /** - * Unfreeze projection matrix of the camera - * @param inputs camera to unfreeze - * @group adjust - * @shortname unfreeze projection matrix - */ unfreezeProjectionMatrix(inputs: Inputs.BabylonCamera.CameraDto): void; - /** - * Changes the position of a camera - * @param inputs camera and position - * @group set - * @shortname set camera position - */ setPosition(inputs: Inputs.BabylonCamera.PositionDto): void; - /** - * Gets the position of a camera - * @param inputs camera - * @group get - * @shortname get camera position - */ getPosition(inputs: Inputs.BabylonCamera.PositionDto): Base.Point3; - /** - * Changes the target of a camera - * @param inputs camera and target - * @group set - * @shortname set camera target - */ setTarget(inputs: Inputs.BabylonCamera.TargetDto): void; - /** - * Gets the target of a camera - * @param inputs camera - * @group get - * @shortname get camera target - */ getTarget(inputs: Inputs.BabylonCamera.PositionDto): Base.Point3; - /** - * Changes the speed of a camera - * @param inputs camera and speed - * @group set - * @shortname set camera speed - */ setSpeed(inputs: Inputs.BabylonCamera.SpeedDto): void; - /** - * Gets the speed of a camera - * @param inputs camera - * @group get - * @shortname get camera speed - */ getSpeed(inputs: Inputs.BabylonCamera.PositionDto): Base.Point3; - /** - * Changes the minZ of a camera - * @param inputs camera - * @group set - * @shortname set camera min z - */ setMinZ(inputs: Inputs.BabylonCamera.MinZDto): void; - /** - * Changes the maxZ of a camera - * @param inputs camera and maxz value - * @group set - * @shortname camera max z - */ setMaxZ(inputs: Inputs.BabylonCamera.MaxZDto): void; - /** - * Changes the the mode of the camera to orthographic - * @param inputs the camera and orthographic properties - * @group adjust - * @shortname enable orthographic mode - */ makeCameraOrthographic(inputs: Inputs.BabylonCamera.OrthographicDto): void; - /** - * Changes the mode of a camera to perspective - * @param inputs Changes the camera maxZ - * @group adjust - * @shortname enable perspective mode - */ makeCameraPerspective(inputs: Inputs.BabylonCamera.CameraDto): void; - } declare class BabylonFreeCamera { + } + declare class BabylonFreeCamera { private readonly context; constructor(context: Context); - /** - * Creates a free camera - * @param inputs Describes the free camera - * @returns BabylonJS free camera - * @group create - * @shortname new free camera - */ create(inputs: Inputs.BabylonCamera.FreeCameraDto): BABYLON.FreeCamera; - } declare class BabylonTargetCamera { + } + declare class BabylonTargetCamera { private readonly context; constructor(context: Context); - /** - * Creates a target camera - * @param inputs Describes the target camera - * @returns BabylonJS target camera - * @group create - * @shortname new target camera - */ create(inputs: Inputs.BabylonCamera.TargetCameraDto): BABYLON.TargetCamera; - } declare class BabylonEngine { + } + declare class BabylonEngine { private readonly context; constructor(context: Context); - /** - * Gets the engine for the current context - * @ignore true - * @group engine - * @shortname get engine - */ getEngine(): BABYLON.Engine | BABYLON.WebGPUEngine; - /** - * Gets the rendering canvas on which scene cameras can be attached - * @ignore true - * @group engine - * @shortname get rendering canvas - */ getRenderingCanvas(): HTMLCanvasElement; - } declare class BabylonGaussianSplatting { + } + declare class BabylonGaussianSplatting { private readonly context; constructor(context: Context); - /** Creates gaussian splatting mesh - * @param inputs Contains url of Gaussian splatting mesh - * @group create - * @shortname gaussian splatting mesh - * @disposableOutput true - */ create(inputs: Inputs.BabylonGaussianSplatting.CreateGaussianSplattingMeshDto): Promise; - /** Clones gaussian splatting mesh - * @param inputs Contains BabylonJS mesh that should be cloned - * @group multiply - * @shortname clone splat - * @disposableOutput true - */ clone(inputs: Inputs.BabylonGaussianSplatting.GaussianSplattingMeshDto): BABYLON.GaussianSplattingMesh; - /** - * Gets splat positions of the gaussian splat mesh - * @param inputs Contains BabylonJS mesh - * @group get - * @shortname get splat positions - * @drawable true - */ getSplatPositions(inputs: Inputs.BabylonGaussianSplatting.GaussianSplattingMeshDto): Inputs.Base.Point3[]; - } declare class BabylonGizmoAxisDragGizmo { + private enableShadows; + } + declare class BabylonGizmoAxisDragGizmo { private readonly context; constructor(context: Context); - /** - * Sets if axis is enabled or not - * @param inputs axis drag gizmo - * @returns axis drag gizmo - * @group set - * @shortname set is axis enabled - */ setIsEnabled(inputs: Inputs.BabylonGizmo.SetIsEnabledAxisDragGizmoDto): BABYLON.IAxisDragGizmo; - /** - * Checks if axis is enabled - * @param inputs axis drag gizmo - * @returns is enabled - * @group get - * @shortname is axis enabled - */ getIsEnabled(inputs: Inputs.BabylonGizmo.AxisDragGizmoDto): boolean; - } declare class BabylonGizmoAxisScaleGizmo { + } + declare class BabylonGizmoAxisScaleGizmo { private readonly context; constructor(context: Context); - /** - * Sets if axis is enabled or not - * @param inputs axis scale gizmo - * @returns axis scale gizmo - * @group set - * @shortname set is axis enabled - */ setIsEnabled(inputs: Inputs.BabylonGizmo.SetIsEnabledAxisScaleGizmoDto): BABYLON.IAxisScaleGizmo; - /** - * Checks if axis is enabled - * @param inputs axis scale gizmo - * @returns is enabled - * @group get - * @shortname is axis enabled - */ getIsEnabled(inputs: Inputs.BabylonGizmo.AxisScaleGizmoDto): boolean; - } declare class BabylonGizmoBoundingBoxGizmo { + } + declare class BabylonGizmoBoundingBoxGizmo { private readonly context; constructor(context: Context); - /** - * Set bounding box gizmo rotation sphere size - * @param inputs bounding box gizmo - * @returns bounding box gizmo - * @group set - * @shortname set rotation sphere size - */ setRotationSphereSize(inputs: Inputs.BabylonGizmo.SetBoundingBoxGizmoRotationSphereSizeDto): BABYLON.BoundingBoxGizmo; - /** - * If set, the rotation anchors and scale boxes will increase in size based on the distance away from the camera to have a consistent screen size (Default: false) Note : fixedDragMeshScreenSize takes precedence over fixedDragMeshBoundsSize if both are true - * @param inputs bounding box gizmo - * @returns bounding box gizmo - * @group set - * @shortname set fixed drag mesh screen size - */ setFixedDragMeshScreenSize(inputs: Inputs.BabylonGizmo.SetBoundingBoxGizmoFixedDragMeshScreenSizeDto): BABYLON.BoundingBoxGizmo; - /** - * Set bounding box gizmo fixed drag mesh bounds size - * @param inputs bounding box gizmo - * @returns bounding box gizmo - * @group set - * @shortname set fixed drag mesh bounds size - */ setFixedDragMeshBoundsSize(inputs: Inputs.BabylonGizmo.SetBoundingBoxGizmoFixedDragMeshBoundsSizeDto): BABYLON.BoundingBoxGizmo; - /** - * The distance away from the object which the draggable meshes should appear world sized when fixedDragMeshScreenSize is set to true (default: 10) - * @param inputs bounding box gizmo - * @returns bounding box gizmo - * @group set - * @shortname set fixed drag mesh screen size dist factor - */ setFixedDragMeshScreenSizeDistanceFactor(inputs: Inputs.BabylonGizmo.SetBoundingBoxGizmoFixedDragMeshScreenSizeDistanceFactorDto): BABYLON.BoundingBoxGizmo; - /** - * Set bounding box gizmo scaling snap distance. Drag distance in babylon units that the gizmo will snap scaling to when dragged. - * @param inputs bounding box gizmo - * @returns bounding box gizmo - * @group set - * @shortname set scaling snap dist. - */ setScalingSnapDistance(inputs: Inputs.BabylonGizmo.SetBoundingBoxGizmoScalingSnapDistanceDto): BABYLON.BoundingBoxGizmo; - /** - * Set bounding box gizmo rotation snap distance. Drag distance in babylon units that the gizmo will snap rotation to when dragged. - * @param inputs bounding box gizmo - * @returns bounding box gizmo - * @group set - * @shortname set rotation snap dist. - */ setRotationSnapDistance(inputs: Inputs.BabylonGizmo.SetBoundingBoxGizmoRotationSnapDistanceDto): BABYLON.BoundingBoxGizmo; - /** - * Set bounding box gizmo scale box size - * @param inputs bounding box gizmo - * @returns bounding box gizmo - * @group set - * @shortname set scale box size - */ setScaleBoxSize(inputs: Inputs.BabylonGizmo.SetBoundingBoxGizmoScaleBoxSizeDto): BABYLON.BoundingBoxGizmo; - /** - * Set bounding box gizmo incremental snap. Incremental snap scaling (default is false). When true, with a snapDistance of 0.1, scaling will be 1.1,1.2,1.3 instead of, when false: 1.1,1.21,1.33,... - * @param inputs bounding box gizmo - * @returns bounding box gizmo - * @group set - * @shortname set incremental snap - */ setIncrementalSnap(inputs: Inputs.BabylonGizmo.SetBoundingBoxGizmoIncrementalSnapDto): BABYLON.BoundingBoxGizmo; - /** - * Set bounding box gizmo scale pivot. Relative bounding box pivot used when scaling the attached node. When null object with scale from the opposite corner. 0.5,0.5,0.5 for center and 0.5,0,0.5 for bottom (Default: null) - * @param inputs bounding box gizmo and scale pivot - * @returns bounding box gizmo - * @group set - * @shortname set scale pivot - */ setScalePivot(inputs: Inputs.BabylonGizmo.SetBoundingBoxGizmoScalePivotDto): BABYLON.BoundingBoxGizmo; - /** - * Set bounding box gizmo axis factor. Set custom sensitivity value for each axis - * @param inputs bounding box gizmo and axis factor - * @returns bounding box gizmo - * @group set - * @shortname set axis factor - */ setAxisFactor(inputs: Inputs.BabylonGizmo.SetBoundingBoxGizmoAxisFactorDto): BABYLON.BoundingBoxGizmo; - /** - * Set bounding box gizmo scale drag speed - * @param inputs bounding box gizmo and scale drag speed - * @returns bounding box gizmo - * @group set - * @shortname set scale drag speed - */ setScaleDragSpeed(inputs: Inputs.BabylonGizmo.SetBoundingBoxGizmoScaleDragSpeedDto): BABYLON.BoundingBoxGizmo; - /** - * Get rotation sphere size - * @param inputs bounding box gizmo - * @returns rotation sphere size - * @group get - * @shortname get rotation sphere size - */ getRotationSphereSize(inputs: Inputs.BabylonGizmo.BoundingBoxGizmoDto): number; - /** - * Get scale box size - * @param inputs bounding box gizmo - * @returns scale box size - * @group get - * @shortname get scale box size - */ getScaleBoxSize(inputs: Inputs.BabylonGizmo.BoundingBoxGizmoDto): number; - /** - * Get fixed drag mesh screen size - * @param inputs bounding box gizmo - * @returns fixed drag mesh screen size - * @group get - * @shortname get fixed drag mesh screen size - */ getFixedDragMeshScreenSize(inputs: Inputs.BabylonGizmo.BoundingBoxGizmoDto): boolean; - /** - * Get fixed drag mesh bounds size - * @param inputs bounding box gizmo - * @returns fixed drag mesh bounds size - * @group get - * @shortname get fixed drag mesh bounds size - */ getFixedDragMeshBoundsSize(inputs: Inputs.BabylonGizmo.BoundingBoxGizmoDto): boolean; - /** - * Get fixed drag mesh screen size distance factor - * @param inputs bounding box gizmo - * @returns fixed drag mesh screen size distance factor - * @group get - * @shortname get fixed drag mesh screen size distance factor - */ getFixedDragMeshScreenSizeDistanceFactor(inputs: Inputs.BabylonGizmo.BoundingBoxGizmoDto): number; - /** - * Get scaling snap distance - * @param inputs bounding box gizmo - * @returns scaling snap distance - * @group get - * @shortname get scaling snap distance - */ getScalingSnapDistance(inputs: Inputs.BabylonGizmo.BoundingBoxGizmoDto): number; - /** - * Get rotation snap distance - * @param inputs bounding box gizmo - * @returns rotation snap distance - * @group get - * @shortname get rotation snap distance - */ getRotationSnapDistance(inputs: Inputs.BabylonGizmo.BoundingBoxGizmoDto): number; - /** - * Get incremental snap - * @param inputs bounding box gizmo - * @returns incremental snap - * @group get - * @shortname get incremental snap - */ getIncrementalSnap(inputs: Inputs.BabylonGizmo.BoundingBoxGizmoDto): boolean; - /** - * Get scale pivot - * @param inputs bounding box gizmo - * @returns scale pivot - * @group get - * @shortname get scale pivot - */ getScalePivot(inputs: Inputs.BabylonGizmo.BoundingBoxGizmoDto): Inputs.Base.Vector3; - /** - * Get axis factor - * @param inputs bounding box gizmo - * @returns axis factor - * @group get - * @shortname get axis factor - */ getAxisFactor(inputs: Inputs.BabylonGizmo.BoundingBoxGizmoDto): Inputs.Base.Vector3; - /** - * Get scale drag speed - * @param inputs bounding box gizmo - * @returns scale drag speed - * @group get - * @shortname get scale drag speed - */ getScaleDragSpeed(inputs: Inputs.BabylonGizmo.BoundingBoxGizmoDto): number; - /** - * Creates the selector of an observable for a bounding box gizmo - * @param inputs observable name - * @returns bounding box gizmo observable selector - * @group create - * @shortname bounding box gizmo observable selector - */ createBoundingBoxGizmoObservableSelector(inputs: Inputs.BabylonGizmo.BoundingBoxGizmoObservableSelectorDto): Inputs.BabylonGizmo.boundingBoxGizmoObservableSelectorEnum; - } declare class BabylonGizmoBase { + } + declare class BabylonGizmoBase { private readonly context; constructor(context: Context); - /** - * Set gizmo scale ratio - * @param inputs gizmo - * @group set - * @shortname set scale ratio - */ scaleRatio(inputs: Inputs.BabylonGizmo.SetGizmoScaleRatioDto): BABYLON.IGizmo; - /** - * Gets scale ratio - * @param inputs gizmo - * @returns scale ratio - * @group get - * @shortname get scale ratio - */ getScaleRatio(inputs: Inputs.BabylonGizmo.GizmoDto): number; - } declare class BabylonGizmo { + } + declare class BabylonGizmo { private readonly context; manager: BabylonGizmoManager; base: BabylonGizmoBase; @@ -28985,730 +9806,144 @@ declare namespace Bit { planeDragGizmo: BabylonGizmoPlaneDragGizmo; planeRotationGizmo: BabylonGizmoPlaneRotationGizmo; constructor(context: Context); - } declare class BabylonGizmoManager { + } + declare class BabylonGizmoManager { private readonly context; constructor(context: Context); - /** - * Create gizmo manager - * @param inputs gizmo manager options - * @group create - * @shortname create gizmo manager - * @disposableOutput true - */ createGizmoManager(inputs: Inputs.BabylonGizmo.CreateGizmoDto): BABYLON.GizmoManager; - /** - * Get position gizmo - * @param inputs gizmo manager - * @returns position gizmo - * @group get - * @shortname get position gizmo - */ getPositionGizmo(inputs: Inputs.BabylonGizmo.GizmoManagerDto): BABYLON.IPositionGizmo; - /** - * Get rotation gizmo - * @param inputs gizmo manager - * @returns rotation gizmo - * @group get - * @shortname get rotation gizmo - */ getRotationGizmo(inputs: Inputs.BabylonGizmo.GizmoManagerDto): BABYLON.IRotationGizmo; - /** - * Get scale gizmo - * @param inputs gizmo manager - * @returns scale gizmo - * @group get - * @shortname get scale gizmo - */ getScaleGizmo(inputs: Inputs.BabylonGizmo.GizmoManagerDto): BABYLON.IScaleGizmo; - /** - * Get bounding box gizmo - * @param inputs gizmo manager - * @returns bounding box gizmo - * @group get - * @shortname get bounding box gizmo - */ getBoundingBoxGizmo(inputs: Inputs.BabylonGizmo.GizmoManagerDto): BABYLON.IBoundingBoxGizmo; - /** - * Attach gizmo manager to mesh - * @param inputs gizmo manager, mesh - * @returns gizmo manager - * @group update - * @shortname attach to mesh - */ attachToMesh(inputs: Inputs.BabylonGizmo.AttachToMeshDto): BABYLON.GizmoManager; - /** - * Detach gizmo manager from mesh - * @param inputs gizmo manager, mesh - * @returns gizmo manager - * @group update - * @shortname detach mesh - */ detachMesh(inputs: Inputs.BabylonGizmo.GizmoManagerDto): BABYLON.GizmoManager; - } declare class BabylonGizmoPlaneDragGizmo { + } + declare class BabylonGizmoPlaneDragGizmo { private readonly context; constructor(context: Context); - /** - * Sets if plane is enabled or not - * @param inputs plane drag gizmo - * @returns plane drag gizmo - * @group set - * @shortname set is plane enabled - */ setIsEnabled(inputs: Inputs.BabylonGizmo.SetIsEnabledPlaneDragGizmoDto): BABYLON.IPlaneDragGizmo; - /** - * Checks if plane is enabled - * @param inputs plane drag gizmo - * @returns is enabled - * @group get - * @shortname is plane enabled - */ getIsEnabled(inputs: Inputs.BabylonGizmo.PlaneDragGizmoDto): boolean; - } declare class BabylonGizmoPlaneRotationGizmo { + } + declare class BabylonGizmoPlaneRotationGizmo { private readonly context; constructor(context: Context); - /** - * Sets if plane is enabled or not - * @param inputs plane rotation gizmo - * @returns plane rotation gizmo - * @group set - * @shortname set is plane enabled - */ setIsEnabled(inputs: Inputs.BabylonGizmo.SetIsEnabledPlaneRotationGizmoDto): BABYLON.IPlaneRotationGizmo; - /** - * Checks if plane is enabled - * @param inputs plane rotation gizmo - * @returns is enabled - * @group get - * @shortname is plane enabled - */ getIsEnabled(inputs: Inputs.BabylonGizmo.PlaneRotationGizmoDto): boolean; - } declare class BabylonGizmoPositionGizmo { + } + declare class BabylonGizmoPositionGizmo { private readonly context; constructor(context: Context); - /** - * Set planar gizmo enabled - * @param inputs position gizmo - * @group set - * @shortname set planar gizmo enabled - */ planarGizmoEnabled(inputs: Inputs.BabylonGizmo.SetPlanarGizmoEnabled): BABYLON.IPositionGizmo; - /** - * Set position gizmo snap distance - * @param inputs position gizmo - * @group set - * @shortname set snap distance - */ snapDistance(inputs: Inputs.BabylonGizmo.SetPositionGizmoSnapDistanceDto): BABYLON.IPositionGizmo; - /** - * Get attached mesh - * @param inputs position gizmo - * @returns attached mesh - * @group get - * @shortname get attached mesh - */ getAttachedMesh(inputs: Inputs.BabylonGizmo.PositionGizmoDto): BABYLON.AbstractMesh; - /** - * Get attached node - * @param inputs position gizmo - * @returns attached node - * @group get - * @shortname get attached node - */ getAttachedNode(inputs: Inputs.BabylonGizmo.PositionGizmoDto): BABYLON.Node; - /** - * Get x gizmo - * @param inputs position gizmo - * @returns x drag gizmo - * @group get - * @shortname get x gizmo - */ getXGizmo(inputs: Inputs.BabylonGizmo.PositionGizmoDto): BABYLON.IAxisDragGizmo; - /** - * Get y gizmo - * @param inputs position gizmo - * @returns y drag gizmo - * @group get - * @shortname get y gizmo - */ getYGizmo(inputs: Inputs.BabylonGizmo.PositionGizmoDto): BABYLON.IAxisDragGizmo; - /** - * Get z gizmo - * @param inputs position gizmo - * @returns z drag gizmo - * @group get - * @shortname get z gizmo - */ getZGizmo(inputs: Inputs.BabylonGizmo.PositionGizmoDto): BABYLON.IAxisDragGizmo; - /** - * Get x plane gizmo - * @param inputs position gizmo - * @group get - * @shortname get x plane gizmo - */ getXPlaneGizmo(inputs: Inputs.BabylonGizmo.PositionGizmoDto): BABYLON.IPlaneDragGizmo; - /** - * Get y plane gizmo - * @param inputs position gizmo - * @group get - * @shortname get y plane gizmo - */ getYPlaneGizmo(inputs: Inputs.BabylonGizmo.PositionGizmoDto): BABYLON.IPlaneDragGizmo; - /** - * Get z plane gizmo - * @param inputs position gizmo - * @group get - * @shortname get z plane gizmo - */ getZPlaneGizmo(inputs: Inputs.BabylonGizmo.PositionGizmoDto): BABYLON.IPlaneDragGizmo; - /** - * Get if planar gizmo enabled - * @param inputs position gizmo - * @returns is enabled - * @group get - * @shortname get planar gizmo enabled - */ getPlanarGizmoEnabled(inputs: Inputs.BabylonGizmo.PositionGizmoDto): boolean; - /** - * Get snap distance - * @param inputs position gizmo - * @returns snap distance - * @group get - * @shortname get snap distance - */ getSnapDistance(inputs: Inputs.BabylonGizmo.PositionGizmoDto): number; - /** - * Get if is dragging - * @param inputs position gizmo - * @returns is dragging - * @group get - * @shortname get is dragging - */ getIsDragging(inputs: Inputs.BabylonGizmo.PositionGizmoDto): boolean; - /** - * Creates the selector of an observable for a position gizmo - * @param inputs observable name - * @returns position gizmo observable selector - * @group create - * @shortname position gizmo observable selector - */ createPositionGizmoObservableSelector(inputs: Inputs.BabylonGizmo.PositionGizmoObservableSelectorDto): Inputs.BabylonGizmo.positionGizmoObservableSelectorEnum; - } declare class BabylonGizmoRotationGizmo { + } + declare class BabylonGizmoRotationGizmo { private readonly context; constructor(context: Context); - /** - * Set rotation gizmo snap distance - * @param inputs rotation gizmo - * @returns rotation gizmo - * @group set - * @shortname set snap distance - */ snapDistance(inputs: Inputs.BabylonGizmo.SetRotationGizmoSnapDistanceDto): BABYLON.IRotationGizmo; - /** - * Set rotation gizmo sensitivity - * @param inputs rotation gizmo - * @returns rotation gizmo - * @group set - * @shortname set sensitivity - */ sensitivity(inputs: Inputs.BabylonGizmo.SetRotationGizmoSensitivityDto): BABYLON.IRotationGizmo; - /** - * Get attached mesh - * @param inputs rotation gizmo - * @returns attached mesh - * @group get - * @shortname get attached mesh - */ getAttachedMesh(inputs: Inputs.BabylonGizmo.RotationGizmoDto): BABYLON.Nullable; - /** - * Get attached node - * @param inputs rotation gizmo - * @returns attached node - * @group get - * @shortname get attached node - */ getAttachedNode(inputs: Inputs.BabylonGizmo.RotationGizmoDto): BABYLON.Node; - /** - * Get x gizmo - * @param inputs rotation gizmo - * @returns x drag gizmo - * @group get - * @shortname get x gizmo - */ getXGizmo(inputs: Inputs.BabylonGizmo.RotationGizmoDto): BABYLON.IPlaneRotationGizmo; - /** - * Get y gizmo - * @param inputs rotation gizmo - * @returns y drag gizmo - * @group get - * @shortname get y gizmo - */ getYGizmo(inputs: Inputs.BabylonGizmo.RotationGizmoDto): BABYLON.IPlaneRotationGizmo; - /** - * Get z gizmo - * @param inputs rotation gizmo - * @returns z drag gizmo - * @group get - * @shortname get z gizmo - */ getZGizmo(inputs: Inputs.BabylonGizmo.RotationGizmoDto): BABYLON.IPlaneRotationGizmo; - /** - * Get snap distance - * @param inputs rotation gizmo - * @returns snap distance - * @group get - * @shortname get snap distance - */ getSnapDistance(inputs: Inputs.BabylonGizmo.RotationGizmoDto): number; - /** - * Get sensitivity - * @param inputs rotation gizmo - * @returns sensitivity - * @group get - * @shortname get sensitivity - */ getSensitivity(inputs: Inputs.BabylonGizmo.RotationGizmoDto): number; - /** - * Creates the selector of an observable for a rotation gizmo - * @param inputs observable name - * @returns rotation gizmo observable selector - * @group create - * @shortname rotation gizmo observable selector - */ createRotationGizmoObservableSelector(inputs: Inputs.BabylonGizmo.RotationGizmoObservableSelectorDto): Inputs.BabylonGizmo.rotationGizmoObservableSelectorEnum; - } declare class BabylonGizmoScaleGizmo { + } + declare class BabylonGizmoScaleGizmo { private readonly context; constructor(context: Context); - /** - * Get x gizmo - * @param inputs scale gizmo - * @returns x scale gizmo - * @group get - * @shortname get x gizmo - */ getXGizmo(inputs: Inputs.BabylonGizmo.ScaleGizmoDto): BABYLON.IAxisScaleGizmo; - /** - * Get y gizmo - * @param inputs position gizmo - * @returns y scale gizmo - * @group get - * @shortname get y gizmo - */ getYGizmo(inputs: Inputs.BabylonGizmo.ScaleGizmoDto): BABYLON.IAxisScaleGizmo; - /** - * Get z gizmo - * @param inputs scale gizmo - * @returns z scale gizmo - * @group get - * @shortname get z gizmo - */ getZGizmo(inputs: Inputs.BabylonGizmo.ScaleGizmoDto): BABYLON.IAxisScaleGizmo; - /** - * Set scale gizmo snap distance - * @param inputs scale gizmo - * @returns scale gizmo - * @group set - * @shortname set snap distance - */ snapDistance(inputs: Inputs.BabylonGizmo.SetScaleGizmoSnapDistanceDto): BABYLON.IScaleGizmo; - /** - * Set scale gizmo incremental snap - * @param inputs scale gizmo - * @returns scale gizmo - * @group set - * @shortname set incremental snap - */ setIncrementalSnap(inputs: Inputs.BabylonGizmo.SetScaleGizmoIncrementalSnapDto): BABYLON.IScaleGizmo; - /** - * Set scale gizmo sensitivity - * @param inputs scale gizmo - * @returns scale gizmo - * @group set - * @shortname set sensitivity - */ sensitivity(inputs: Inputs.BabylonGizmo.SetScaleGizmoSensitivityDto): BABYLON.IScaleGizmo; - /** - * Get incremental snap - * @param inputs scale gizmo - * @returns incremental snap - * @group get - * @shortname get incremental snap - */ getIncrementalSnap(inputs: Inputs.BabylonGizmo.ScaleGizmoDto): boolean; - /** - * Get snap distance - * @param inputs scale gizmo - * @returns snap distance - * @group get - * @shortname get snap distance - */ getSnapDistance(inputs: Inputs.BabylonGizmo.ScaleGizmoDto): number; - /** - * Get sensitivity - * @param inputs scale gizmo - * @returns sensitivity - * @group get - * @shortname get sensitivity - */ getSensitivity(inputs: Inputs.BabylonGizmo.ScaleGizmoDto): number; - /** - * Creates the selector of an observable for a scale gizmo - * @param inputs observable name - * @returns scale gizmo observable selector - * @group create - * @shortname scale gizmo observable selector - */ createScaleGizmoObservableSelector(inputs: Inputs.BabylonGizmo.ScaleGizmoObservableSelectorDto): Inputs.BabylonGizmo.scaleGizmoObservableSelectorEnum; - } declare class BabylonGuiAdvancedDynamicTexture { + } + declare class BabylonGuiAdvancedDynamicTexture { private readonly context; constructor(context: Context); - /** - * Creates full screen UI - * @param inputs with name of advanced texture, foreground, sampling and adaptive scaling - * @returns advanced dynamic texture - * @group spaces - * @shortname create full screen ui - * @disposableOutput true - */ createFullScreenUI(inputs: Inputs.BabylonGui.CreateFullScreenUIDto): BABYLON.GUI.AdvancedDynamicTexture; - /** - * Creates advanced dynamic texture for a mesh - * @param inputs with mesh, width, height, support pointer move, only alpha testing, invert y and sampling - * @returns advanced dynamic texture - * @group spaces - * @shortname create for mesh - * @disposableOutput true - */ createForMesh(inputs: Inputs.BabylonGui.CreateForMeshDto): BABYLON.GUI.AdvancedDynamicTexture; - } declare class BabylonGuiButton { + } + declare class BabylonGuiButton { private readonly context; constructor(context: Context); - /** - * Creates simple button - * @param inputs button properties - * @returns button - * @group create - * @shortname create simple button - * @disposableOutput true - */ createSimpleButton(inputs: Inputs.BabylonGui.CreateButtonDto): BABYLON.GUI.Button; - /** - * Set button text - * @param inputs button and text - * @returns button with changed text - * @group set - * @shortname set button text - */ setButtonText(inputs: Inputs.BabylonGui.SetButtonTextDto): BABYLON.GUI.Button; - /** - * Get button text - * @param inputs button - * @returns button text - * @group get - * @shortname get button text - */ getButtonText(inputs: Inputs.BabylonGui.ButtonDto): string; - } declare class BabylonGuiCheckbox { + } + declare class BabylonGuiCheckbox { private readonly context; constructor(context: Context); - /** - * Creates checkbox - * @param inputs checkbox properties - * @returns checkbox - * @group create - * @shortname create checkbox - * @disposableOutput true - */ createCheckbox(inputs: Inputs.BabylonGui.CreateCheckboxDto): BABYLON.GUI.Checkbox; - /** - * Sets the checkbox background - * @param inputs checkbox and background - * @group set - * @shortname set checkbox background - */ setBackground(inputs: Inputs.BabylonGui.SetCheckboxBackgroundDto): BABYLON.GUI.Checkbox; - /** - * Sets the checkbox check size ratio - * @param inputs checkbox and check size ratio - * @group set - * @shortname set checkbox check size ratio - */ setCheckSizeRatio(inputs: Inputs.BabylonGui.SetCheckboxCheckSizeRatioDto): BABYLON.GUI.Checkbox; - /** - * Sets the checkbox is checked - * @param inputs checkbox and is checked - * @group set - * @shortname set checkbox is checked - */ setIsChecked(inputs: Inputs.BabylonGui.SetCheckboxIsCheckedDto): BABYLON.GUI.Checkbox; - /** - * Gets the check size ratio - * @param inputs checkbox - * @group get - * @shortname get check size ratio - */ getCheckSizeRatio(inputs: Inputs.BabylonGui.CheckboxDto): number; - /** - * Gets the is checked - * @param inputs checkbox - * @group get - * @shortname get is checked - */ getIsChecked(inputs: Inputs.BabylonGui.CheckboxDto): boolean; - /** - * Gets the background - * @param inputs checkbox - * @group get - * @shortname get checkbox background - */ getBackground(inputs: Inputs.BabylonGui.CheckboxDto): string; - /** - * Creates the selector of an observable for the checkbox - * @param inputs observable name - * @group create - * @shortname checkbox observable selector - */ createCheckboxObservableSelector(inputs: Inputs.BabylonGui.CheckboxObservableSelectorDto): Inputs.BabylonGui.checkboxObservableSelectorEnum; - } declare class BabylonGuiColorPicker { + } + declare class BabylonGuiColorPicker { private readonly context; constructor(context: Context); - /** - * Creates color picker - * @param inputs color picker properties - * @returns color picker - * @group create - * @shortname color picker - * @disposableOutput true - */ createColorPicker(inputs: Inputs.BabylonGui.CreateColorPickerDto): BABYLON.GUI.ColorPicker; - /** - * Sets color picker value color - * @param inputs color picker and color - * @returns color picker - * @group set - * @shortname set colo picker value - */ setColorPickerValue(inputs: Inputs.BabylonGui.SetColorPickerValueDto): BABYLON.GUI.ColorPicker; - /** - * Sets color picker size (width and height) - * @param inputs color picker and size - * @returns color picker - * @group set - * @shortname set color picker size - */ setColorPickerSize(inputs: Inputs.BabylonGui.SetColorPickerSizeDto): BABYLON.GUI.ColorPicker; - /** - * Gets color picker value color - * @param inputs color picker - * @returns color - * @group get - * @shortname get color picker value - */ getColorPickerValue(inputs: Inputs.BabylonGui.ColorPickerDto): string; - /** - * Gets color picker size - * @param inputs color picker - * @returns size - * @group get - * @shortname get color picker size - */ getColorPickerSize(inputs: Inputs.BabylonGui.ColorPickerDto): string | number; - /** - * Creates the selector of an observable for color picker - * @param inputs observable name - * @returns color picker observable selector - * @group create - * @shortname color picker observable selector - */ createColorPickerObservableSelector(inputs: Inputs.BabylonGui.ColorPickerObservableSelectorDto): Inputs.BabylonGui.colorPickerObservableSelectorEnum; - } declare class BabylonGuiContainer { + } + declare class BabylonGuiContainer { private readonly context; constructor(context: Context); - /** - * Adds controls to container and keeps the order - * @param inputs with container and controls - * @returns container - * @group controls - * @shortname add controls to container - */ addControls(inputs: Inputs.BabylonGui.AddControlsToContainerDto): BABYLON.GUI.Container; - /** - * Sets the container background - * @param inputs container and background - * @group set - * @shortname set container background - */ setBackground(inputs: Inputs.BabylonGui.SetContainerBackgroundDto): BABYLON.GUI.Container; - /** - * Sets the container is readonly - * @param inputs container and is readonly - * @group set - * @shortname set container is readonly - */ setIsReadonly(inputs: Inputs.BabylonGui.SetContainerIsReadonlyDto): BABYLON.GUI.Container; - /** - * Gets the container background - * @param inputs container - * @group get - * @shortname get container background - */ getBackground(inputs: Inputs.BabylonGui.ContainerDto): string; - /** - * Gets the container is readonly - * @param inputs container - * @group get - * @shortname get container is readonly - */ getIsReadonly(inputs: Inputs.BabylonGui.ContainerDto): boolean; - } declare class BabylonGuiControl { + } + declare class BabylonGuiControl { private readonly context; constructor(context: Context); - /** - * Change the padding for the control - * @param inputs the control and the padding values - * @returns control that has changed padding - * @group positioning - * @shortname change padding - */ changeControlPadding(inputs: Inputs.BabylonGui.PaddingLeftRightTopBottomDto): BABYLON.GUI.Control; - /** - * Change the alignment for the control - * @param inputs the control and the alignment values - * @returns control that has changed alignment - * @group positioning - * @shortname change alignment - */ changeControlAlignment(inputs: Inputs.BabylonGui.AlignmentDto): BABYLON.GUI.Control; - /** - * Clone control - * @param inputs control to clone - * @returns cloned control - * @group create - * @shortname clone control - * @disposableOutput true - */ cloneControl(inputs: Inputs.BabylonGui.CloneControlDto): BABYLON.GUI.Control; - /** - * Creates the selector of an observable for a control - * @param inputs observable name - * @group create - * @shortname control observable selector - */ createControlObservableSelector(inputs: Inputs.BabylonGui.ControlObservableSelectorDto): Inputs.BabylonGui.controlObservableSelectorEnum; - /** - * Get control by name - * @param inputs container and control name - * @returns control with the name - * @group get - * @shortname get control by name - */ getControlByName(inputs: Inputs.BabylonGui.GetControlByNameDto): BABYLON.GUI.Control; - /** - * Set if control is visible - * @param inputs control and is visible - * @returns control with changed visibility - * @group set - * @shortname set control is visible - */ setIsVisible(inputs: Inputs.BabylonGui.SetControlIsVisibleDto): BABYLON.GUI.Control; - /** - * Set if control is readonly - * @param inputs control and is readonly - * @returns control with changed readonly - * @group set - * @shortname set control is readonly - */ setIsReadonly(inputs: Inputs.BabylonGui.SetControlIsReadonlyDto): BABYLON.GUI.Control; - /** - * Set if control is enabled - * @param inputs control and is enabled - * @returns control with changed enabled - * @group set - * @shortname set control is enabled - */ setIsEnabled(inputs: Inputs.BabylonGui.SetControlIsEnabledDto): BABYLON.GUI.Control; - /** - * Sets the control height - * @param inputs control and height - * @group set - * @shortname set control height - */ setHeight(inputs: Inputs.BabylonGui.SetControlHeightDto): BABYLON.GUI.Control; - /** - * Sets the control width - * @param inputs control and width - * @group set - * @shortname set control width - */ setWidth(inputs: Inputs.BabylonGui.SetControlWidthDto): BABYLON.GUI.Control; - /** - * Sets the control color - * @param inputs control and color - * @group set - * @shortname set control color - */ setColor(inputs: Inputs.BabylonGui.SetControlColorDto): BABYLON.GUI.Control; - /** - * Set font size - * @param inputs control and font size - * @returns control with changed font size - * @group set - * @shortname set control font size - */ setFontSize(inputs: Inputs.BabylonGui.SetControlFontSizeDto): BABYLON.GUI.Control; - /** - * Gets the height - * @param inputs control - * @group get - * @shortname get control height - */ getHeight(inputs: Inputs.BabylonGui.ControlDto): string | number; - /** - * Gets the width - * @param inputs control - * @group get - * @shortname get control width - */ getWidth(inputs: Inputs.BabylonGui.ControlDto): string | number; - /** - * Gets the color - * @param inputs control - * @group get - * @shortname get control color - */ getColor(inputs: Inputs.BabylonGui.ControlDto): string; - /** - * Get control font size - * @param inputs control - * @returns control font size. Can be in the form of a string "24px" or a number - * @group get - * @shortname get control font size - */ getFontSize(inputs: Inputs.BabylonGui.ControlDto): string | number; - /** - * Get control is visible - * @param inputs control - * @returns control visibility - * @group get - * @shortname get control is visible - */ getIsVisible(inputs: Inputs.BabylonGui.ControlDto): boolean; - /** - * Get control is readonly - * @param inputs control - * @returns control readonly - * @group get - * @shortname get control is readonly - */ getIsReadonly(inputs: Inputs.BabylonGui.ControlDto): boolean; - /** - * Get control is enabled - * @param inputs control - * @returns control enabled - * @group get - * @shortname get control is enabled - */ getIsEnabled(inputs: Inputs.BabylonGui.ControlDto): boolean; - } declare class BabylonGui { + } + declare class BabylonGui { private readonly context; advancedDynamicTexture: BabylonGuiAdvancedDynamicTexture; control: BabylonGuiControl; @@ -29723,2116 +9958,406 @@ declare namespace Bit { colorPicker: BabylonGuiColorPicker; image: BabylonGuiImage; constructor(context: Context); - } declare class BabylonGuiImage { + } + declare class BabylonGuiImage { private readonly context; constructor(context: Context); - /** - * Creates image - * @param inputs image properties - * @returns image - * @group create - * @shortname create image - * @disposableOutput true - */ createImage(inputs: Inputs.BabylonGui.CreateImageDto): BABYLON.GUI.Image; - /** - * Sets image source url - * @param inputs image and url - * @returns image - * @group set - * @shortname set image source url - */ setSourceUrl(inputs: Inputs.BabylonGui.SetImageUrlDto): BABYLON.GUI.Image; - /** - * Gets image source url - * @param inputs image - * @returns image source url - * @group get - * @shortname get image source url - */ getSourceUrl(inputs: Inputs.BabylonGui.ImageDto): string; - } declare class BabylonGuiInputText { + } + declare class BabylonGuiInputText { private readonly context; constructor(context: Context); - /** - * Creates input text - * @param inputs input text properties - * @returns input text - * @group create - * @shortname create input text - * @disposableOutput true - */ createInputText(inputs: Inputs.BabylonGui.CreateInputTextDto): BABYLON.GUI.InputText; - /** - * Sets the input text background - * @param inputs input text and background - * @returns input text - * @group set - * @shortname set input text background - */ setBackground(inputs: Inputs.BabylonGui.SetInputTextBackgroundDto): BABYLON.GUI.InputText; - /** - * Sets the input text text - * @param inputs input text and text - * @returns input text - * @group set - * @shortname set input text text - */ setText(inputs: Inputs.BabylonGui.SetInputTextTextDto): BABYLON.GUI.InputText; - /** - * Sets the input text placeholder - * @param inputs input text and placeholder - * @returns input text - * @group set - * @shortname set input text placeholder - */ setPlaceholder(inputs: Inputs.BabylonGui.SetInputTextPlaceholderDto): BABYLON.GUI.InputText; - /** - * Gets the input text background - * @param inputs input text - * @returns input text background - * @group get - * @shortname get input text background - */ getBackground(inputs: Inputs.BabylonGui.InputTextDto): string; - /** - * Gets the input text text - * @param inputs input text - * @returns input text text - * @group get - * @shortname get input text text - */ getText(inputs: Inputs.BabylonGui.InputTextDto): string; - /** - * Gets the input text placeholder - * @param inputs input text - * @returns input text placeholder - * @group get - * @shortname get input text placeholder - */ getPlaceholder(inputs: Inputs.BabylonGui.InputTextDto): string; - /** - * Creates the selector of an observable for the input text - * @param inputs observable name - * @group create - * @shortname input text observable selector - */ createInputTextObservableSelector(inputs: Inputs.BabylonGui.InputTextObservableSelectorDto): Inputs.BabylonGui.inputTextObservableSelectorEnum; - } declare class BabylonGuiRadioButton { + } + declare class BabylonGuiRadioButton { private readonly context; constructor(context: Context); - /** - * Creates radio button - * @param inputs radio button properties - * @returns radio button - * @group create - * @shortname create radio button - * @disposableOutput true - */ createRadioButton(inputs: Inputs.BabylonGui.CreateRadioButtonDto): BABYLON.GUI.RadioButton; - /** - * Sets the radio button check size ratio - * @param inputs radio button and check size ratio - * @group set - * @shortname set radio button check size ratio - */ setCheckSizeRatio(inputs: Inputs.BabylonGui.SetRadioButtonCheckSizeRatioDto): BABYLON.GUI.RadioButton; - /** - * Sets the radio button group - * @param inputs radio button and group - * @group set - * @shortname set radio button group - */ setGroup(inputs: Inputs.BabylonGui.SetRadioButtonGroupDto): BABYLON.GUI.RadioButton; - /** - * Sets the radio button background - * @param inputs radio button and background - * @group set - * @shortname set radio button background - */ setBackground(inputs: Inputs.BabylonGui.SetRadioButtonBackgroundDto): BABYLON.GUI.RadioButton; - /** - * Gets the radio button check size ratio - * @param inputs radio button - * @group get - * @shortname get radio button check size ratio - */ getCheckSizeRatio(inputs: Inputs.BabylonGui.RadioButtonDto): number; - /** - * Gets the radio button group - * @param inputs radio button - * @group get - * @shortname get radio button group - */ getGroup(inputs: Inputs.BabylonGui.RadioButtonDto): string; - /** - * Gets the radio button background - * @param inputs radio button - * @group get - * @shortname get radio button background - */ getBackground(inputs: Inputs.BabylonGui.RadioButtonDto): string; - /** - * Creates the selector of an observable for the radio button - * @param inputs observable name - * @group create - * @shortname radio button observable selector - */ createRadioButtonObservableSelector(inputs: Inputs.BabylonGui.RadioButtonObservableSelectorDto): Inputs.BabylonGui.radioButtonObservableSelectorEnum; - } declare class BabylonGuiSlider { + } + declare class BabylonGuiSlider { private readonly context; constructor(context: Context); - /** - * Creates slider - * @param inputs slider properties - * @returns slider - * @group create - * @shortname create slider - * @disposableOutput true - */ createSlider(inputs: Inputs.BabylonGui.CreateSliderDto): BABYLON.GUI.Slider; - /** - * Changes slider thumb properties - * @param inputs slider properties* - * @returns slider - * @group set - * @shortname set slider thumb - */ changeSliderThumb(inputs: Inputs.BabylonGui.SliderThumbDto): BABYLON.GUI.Slider; - /** - * Changes slider border color - * @param inputs slider border color - * @returns slider - * @group set - * @shortname set slider border color - */ setBorderColor(inputs: Inputs.BabylonGui.SliderBorderColorDto): BABYLON.GUI.Slider; - /** - * Changes slider background color - * @param inputs slider background color - * @returns slider - * @group set - * @shortname set slider background color - */ setBackgroundColor(inputs: Inputs.BabylonGui.SliderBackgroundColorDto): BABYLON.GUI.Slider; - /** - * Changes slider maximum value - * @param inputs slider maximum value - * @returns slider - * @group set - * @shortname set slider maximum - */ setMaximum(inputs: Inputs.BabylonGui.SetSliderValueDto): BABYLON.GUI.Slider; - /** - * Changes slider minimum value - * @param inputs slider minimum value - * @returns slider - * @group set - * @shortname set slider minimum - */ setMinimum(inputs: Inputs.BabylonGui.SetSliderValueDto): BABYLON.GUI.Slider; - /** - * Changes slider step value - * @param inputs slider step value - * @returns slider - * @group set - * @shortname set slider step - */ setStep(inputs: Inputs.BabylonGui.SetSliderValueDto): BABYLON.GUI.Slider; - /** - * Changes slider value - * @param inputs slider value - * @returns slider - * @group set - * @shortname set slider value - */ setValue(inputs: Inputs.BabylonGui.SetSliderValueDto): BABYLON.GUI.Slider; - /** - * Creates the selector of an observable for a slider - * @param inputs observable name - * @returns slider observable selector - * @group create - * @shortname slider observable selector - */ createSliderObservableSelector(inputs: Inputs.BabylonGui.SliderObservableSelectorDto): Inputs.BabylonGui.sliderObservableSelectorEnum; - /** - * Gets the slider border color - * @param slider slider - * @returns slider border color - * @group get - * @shortname get slider border color - */ getBorderColor(inputs: Inputs.BabylonGui.SliderDto): string; - /** - * Gets the slider background color - * @param slider slider - * @returns slider background color - * @group get - * @shortname get slider background color - */ getBackgroundColor(inputs: Inputs.BabylonGui.SliderDto): string; - /** - * Gets the slider maximum value - * @param slider slider - * @returns slider maximum value - * @group get - * @shortname get slider maximum - */ getMaximum(inputs: Inputs.BabylonGui.SliderDto): number; - /** - * Gets the slider minimum value - * @param slider slider - * @returns slider minimum value - * @group get - * @shortname get slider minimum - */ getMinimum(inputs: Inputs.BabylonGui.SliderDto): number; - /** - * Gets the slider step value - * @param slider slider - * @returns slider step value - * @group get - * @shortname get slider step - */ getStep(inputs: Inputs.BabylonGui.SliderDto): number; - /** - * Gets the slider value - * @param slider slider - * @returns slider value - * @group get - * @shortname get slider value - */ getValue(inputs: Inputs.BabylonGui.SliderDto): number; - /** - * Gets the slider thumb color - * @param slider slider - * @returns slider thumb color - * @group get - * @shortname get slider thumb color - */ getThumbColor(inputs: Inputs.BabylonGui.SliderDto): string; - /** - * Gets the slider thumb width - * @param slider slider - * @returns slider thumb width - * @group get - * @shortname get slider thumb width - */ getThumbWidth(inputs: Inputs.BabylonGui.SliderDto): string | number; - /** - * Gets the slider is vertical - * @param slider slider - * @returns slider is vertical - * @group get - * @shortname get slider is vertical - */ getIsVertical(inputs: Inputs.BabylonGui.SliderDto): boolean; - /** - * Gets the slider display thumb - * @param slider slider - * @returns slider display thumb - * @group get - * @shortname get slider display thumb - */ getDisplayThumb(inputs: Inputs.BabylonGui.SliderDto): boolean; - /** - * Gets the slider is thumb circle - * @param slider slider - * @returns slider is thumb circle - * @group get - * @shortname get slider is thumb circle - */ getIsThumbCircle(inputs: Inputs.BabylonGui.SliderDto): boolean; - /** - * Gets the slider is thumb clamped - * @param slider slider - * @returns slider is thumb clamped - * @group get - * @shortname get slider is thumb clamped - */ getIsThumbClamped(inputs: Inputs.BabylonGui.SliderDto): boolean; - } declare class BabylonGuiStackPanel { + } + declare class BabylonGuiStackPanel { private readonly context; constructor(context: Context); - /** - * Creates stack panel - * @param inputs stack panel props - * @group create - * @shortname create stack panel - * @disposableOutput true - */ createStackPanel(inputs: Inputs.BabylonGui.CreateStackPanelDto): BABYLON.GUI.StackPanel; - /** - * Set stack panel is vertical - * @param inputs with stack panel and is vertical - * @returns stack panel with changed is vertical - * @group set - * @shortname set stack panel is vertical - */ setIsVertical(inputs: Inputs.BabylonGui.SetStackPanelIsVerticalDto): BABYLON.GUI.StackPanel; - /** - * Set stack panel spacing - * @param inputs with stack panel and spacing - * @returns stack panel with changed spacing - * @group set - * @shortname set stack panel spacing - */ setSpacing(inputs: Inputs.BabylonGui.SetStackPanelSpacingDto): BABYLON.GUI.StackPanel; - /** - * Set stack panel width - * @param inputs with stack panel and width - * @returns stack panel with changed width - * @group set - * @shortname set stack panel width - */ setWidth(inputs: Inputs.BabylonGui.SetStackPanelWidthDto): BABYLON.GUI.StackPanel; - /** - * Set stack panel height - * @param inputs with stack panel and height - * @returns stack panel with changed height - * @group set - * @shortname set stack panel height - */ setHeight(inputs: Inputs.BabylonGui.SetStackPanelHeightDto): BABYLON.GUI.StackPanel; - /** - * Get stack panel is vertical - * @param inputs with stack panel - * @returns stack panel is vertical - * @group get - * @shortname get stack panel is vertical - */ getIsVertical(inputs: Inputs.BabylonGui.StackPanelDto): boolean; - /** - * Get stack panel spacing - * @param inputs with stack panel - * @returns stack panel spacing - * @group get - * @shortname get stack panel spacing - */ getSpacing(inputs: Inputs.BabylonGui.StackPanelDto): number; - /** - * Get stack panel width - * @param inputs with stack panel - * @returns stack panel width - * @group get - * @shortname get stack panel width - */ getWidth(inputs: Inputs.BabylonGui.StackPanelDto): string | number; - /** - * Get stack panel height - * @param inputs with stack panel - * @returns stack panel height - * @group get - * @shortname get stack panel height - */ getHeight(inputs: Inputs.BabylonGui.StackPanelDto): string | number; - } declare class BabylonGuiTextBlock { + } + declare class BabylonGuiTextBlock { private readonly context; constructor(context: Context); - /** - * Creates text block - * @param inputs text block properties - * @group create - * @shortname create text block - * @disposableOutput true - */ createTextBlock(inputs: Inputs.BabylonGui.CreateTextBlockDto): BABYLON.GUI.TextBlock; - /** - * Change the alignment for the text - * @param inputs the text block and the alignment values - * @returns control that has changed text alignment - * @group positioning - * @shortname align text block text - */ alignText(inputs: Inputs.BabylonGui.AlignmentDto): BABYLON.GUI.TextBlock; - /** - * Change the text outline for the text - * @param inputs the text block and the outline values - * @returns control that has changed text outline - * @group set - * @shortname text outline - */ setTextOutline(inputs: Inputs.BabylonGui.SetTextBlockTextOutlineDto): BABYLON.GUI.TextBlock; - /** - * Sets the new text to the text block - * @param inputs text block and text - * @returns control that has changed text - * @group set - * @shortname set text block text - */ setText(inputs: Inputs.BabylonGui.SetTextBlockTextDto): BABYLON.GUI.TextBlock; - /** - * Enable or disable resize to fit - * @param inputs text block and boolean value - * @returns control that has enabled or disabled resize to fit - * @group set - * @shortname set resize to fit - */ setRsizeToFit(inputs: Inputs.BabylonGui.SetTextBlockResizeToFitDto): BABYLON.GUI.TextBlock; - /** - * Sets the new text wrapping to the text block - * @param inputs text block and text wrapping - * @returns control that has changed text wrapping - * @group set - * @shortname set text wrapping - */ setTextWrapping(inputs: Inputs.BabylonGui.SetTextBlockTextWrappingDto): BABYLON.GUI.TextBlock; - /** - * Sets the line spacing of the text - * @param inputs text block and line spacing - * @returns control that has changed line spacing - * @group set - * @shortname set line spacing - */ setLineSpacing(inputs: Inputs.BabylonGui.SetTextBlockLineSpacingDto): BABYLON.GUI.TextBlock; - /** - * Gets the text of the text block - * @param inputs text block - * @returns text of the text block - * @group get - * @shortname get text block text - */ getText(inputs: Inputs.BabylonGui.TextBlockDto): string; - /** - * Gets the text wrapping of the text block - * @param inputs text block - * @returns text wrapping of the text block - * @group get - * @shortname get text wrapping - */ getTextWrapping(inputs: Inputs.BabylonGui.TextBlockDto): boolean | BABYLON.GUI.TextWrapping; - /** - * Gets the line spacing of the text block - * @param inputs text block - * @returns line spacing of the text block - * @group get - * @shortname get line spacing - */ getLineSpacing(inputs: Inputs.BabylonGui.TextBlockDto): string | number; - /** - * Gets the outline width of the text block - * @param inputs text block - * @returns outline width of the text block - * @group get - * @shortname get outline width - */ getOutlineWidth(inputs: Inputs.BabylonGui.TextBlockDto): number; - /** - * Gets the resize to fit of the text block - * @param inputs text block - * @returns resize to fit of the text block - * @group get - * @shortname get resize to fit - */ getResizeToFit(inputs: Inputs.BabylonGui.TextBlockDto): boolean; - /** - * Gets the text horizontal alignment of the text block - * @param inputs text block - * @returns text horizontal alignment of the text block - * @group get - * @shortname get text horizontal alignment - */ getTextHorizontalAlignment(inputs: Inputs.BabylonGui.TextBlockDto): number; - /** - * Gets the text vertical alignment of the text block - * @param inputs text block - * @returns text vertical alignment of the text block - * @group get - * @shortname get text vertical alignment - */ getTextVerticalAlignment(inputs: Inputs.BabylonGui.TextBlockDto): number; - /** - * Creates the selector of an observable for a text block - * @param inputs observable name - * @group create - * @shortname text block observable selector - */ createTextBlockObservableSelector(inputs: Inputs.BabylonGui.TextBlockObservableSelectorDto): Inputs.BabylonGui.textBlockObservableSelectorEnum; - } declare class BabylonIO { + } + declare class BabylonIO { private readonly context; private supportedFileFormats; private objectUrl; constructor(context: Context); - /** - * Imports mesh from the asset that you have uploaded for the project. - * You must upload your assets to your project via project management page. - * @returns scene loaded mesh - * @group load - * @shortname asset - */ loadAssetIntoScene(inputs: Inputs.Asset.AssetFileDto): Promise; - /** - * Imports mesh from the asset that you have uploaded for the project. - * You must upload your assets to your project via project management page. - * @returns scene loaded mesh - * @group load - * @shortname asset - */ loadAssetIntoSceneNoReturn(inputs: Inputs.Asset.AssetFileDto): Promise; - /** - * Imports mesh from the asset url that you have uploaded to an accessible web storage. - * Keep in mind that files need to be publically accessible for this to work, be sure that CORS access is enabled for the assets. - * @returns scene loaded mesh - * @group load - * @shortname asset from url - */ loadAssetIntoSceneFromRootUrl(inputs: Inputs.Asset.AssetFileByUrlDto): Promise; - /** - * Imports mesh from the asset url that you have uploaded to an accessible web storage. - * Keep in mind that files need to be publically accessible for this to work, be sure that CORS access is enabled for the assets. - * @returns scene loaded mesh - * @group load - * @shortname asset from url - */ loadAssetIntoSceneFromRootUrlNoReturn(inputs: Inputs.Asset.AssetFileByUrlDto): Promise; - /** - * Exports the whole scene to .babylon scene format. You can then edit it further in babylonjs editors. - * @param inputs filename - * @group export - * @shortname babylon scene - */ exportBabylon(inputs: Inputs.BabylonIO.ExportSceneDto): void; - /** - * Exports the whole scene to .glb format. This file format has become industry standard for web models. - * @param inputs filename - * @group export - * @shortname gltf scene - */ exportGLB(inputs: Inputs.BabylonIO.ExportSceneGlbDto): void; - /** - * Exports the mesh with its children to stl - * @param inputs filename and the mesh - * @group export - * @shortname babylon mesh to stl - */ exportMeshToStl(inputs: Inputs.BabylonIO.ExportMeshToStlDto): Promise; - /** - * Exports the meshes to stl - * @param inputs filename and the mesh - * @group export - * @shortname babylon meshes to stl - */ exportMeshesToStl(inputs: Inputs.BabylonIO.ExportMeshesToStlDto): Promise; private loadAsset; - } declare class BabylonLights { + } + declare class BabylonLights { private readonly context; shadowLight: BabylonShadowLight; constructor(context: Context); - } declare class BabylonShadowLight { + } + declare class BabylonShadowLight { private readonly context; constructor(context: Context); - /** - * Sets the direction of the shadow light - * @param inputs shadow light and direction - * @group set - * @shortname set target - */ setDirectionToTarget(inputs: Inputs.BabylonLight.ShadowLightDirectionToTargetDto): void; - /** - * Sets the position of the shadow light - * @param inputs shadow light and position - * @group set - * @shortname set position - */ setPosition(inputs: Inputs.BabylonLight.ShadowLightPositionDto): void; - } declare class BabylonMaterial { + } + declare class BabylonMaterial { private readonly context; private readonly color; pbrMetallicRoughness: BabylonMaterialPbrMetallicRoughness; skyMaterial: BabylonMaterialSky; constructor(context: Context, color: Color); - } declare class BabylonMaterialPbrMetallicRoughness { + } + declare class BabylonMaterialPbrMetallicRoughness { private readonly context; private readonly color; constructor(context: Context, color: Color); - /** - * Create PBR metallic roughnes material. - * @param inputs required to set up metallic roughness material - * @returns PBR metallic roughness material - * @group create - * @shortname pbr material - * @disposableOutput true - */ create(inputs: Inputs.BabylonMaterial.PBRMetallicRoughnessDto): BABYLON.PBRMetallicRoughnessMaterial; - /** - * Sets the base color of material - * @param inputs base color and material - * @group set - * @shortname set base color - */ setBaseColor(inputs: Inputs.BabylonMaterial.BaseColorDto): void; - /** - * Sets the metallic property of material - * @param inputs metallic value - * @group set - * @shortname set metallic - */ setMetallic(inputs: Inputs.BabylonMaterial.MetallicDto): void; - /** - * Sets the roughness of material - * @param inputs roughness value - * @group set - * @shortname set roughness - */ setRoughness(inputs: Inputs.BabylonMaterial.RoughnessDto): void; - /** - * Sets the alpha of material - * @param inputs alpha value - * @group set - * @shortname set alpha - */ setAlpha(inputs: Inputs.BabylonMaterial.AlphaDto): void; - /** - * Sets the back face culling of material - * @param inputs back face culling boolean - * @group set - * @shortname set back face culling - */ setBackFaceCulling(inputs: Inputs.BabylonMaterial.BackFaceCullingDto): void; - /** - * Sets the texture of material - * @param inputs texture and material - * @group set - * @shortname set base texture - */ setBaseTexture(inputs: Inputs.BabylonMaterial.BaseTextureDto): void; - /** - * Gets the base color of material - * @param inputs material - * @return base color - * @group get - * @shortname get base color - */ getBaseColor(inputs: Inputs.BabylonMaterial.MaterialPropDto): string; - /** - * Gets the metallic property of material - * @param inputs material - * @return metallic value - * @group get - * @shortname get metallic - */ getMetallic(inputs: Inputs.BabylonMaterial.MaterialPropDto): number; - /** - * Gets the roughness of material - * @param inputs material - * @return roughness value - * @group get - * @shortname get roughness - */ getRoughness(inputs: Inputs.BabylonMaterial.MaterialPropDto): number; - /** - * Gets the alpha of material - * @param inputs material - * @return alpha value - * @group get - * @shortname get alpha - */ getAlpha(inputs: Inputs.BabylonMaterial.MaterialPropDto): number; - /** - * Gets the back face culling of material - * @param inputs material - * @return backfaceculling boolean - * @group get - * @shortname get back face culling - */ getBackFaceCulling(inputs: Inputs.BabylonMaterial.MaterialPropDto): boolean; - /** - * Get the base texture of material - * @param inputs material - * @group get - * @shortname get base texture - */ getBaseTexture(inputs: Inputs.BabylonMaterial.MaterialPropDto): BABYLON.BaseTexture; - } declare class BabylonMaterialSky { + } + declare class BabylonMaterialSky { private readonly context; constructor(context: Context); - /** - * Create Sky Material - * @param inputs required to set up the sky material - * @returns Sky material - * @group create - * @shortname sky material - */ create(inputs: Inputs.BabylonMaterial.SkyMaterialDto): SkyMaterial; - /** - * Sets the luminance of the sky material - * @param inputs luminance value and material - * @group set - * @shortname set luminance - */ setLuminance(inputs: Inputs.BabylonMaterial.LuminanceDto): void; - /** - * Sets the turbidity of the sky material - * @param inputs turbidity value and material - * @group set - * @shortname set turbidity - */ setTurbidity(inputs: Inputs.BabylonMaterial.TurbidityDto): void; - /** - * Sets the rayleigh of the sky material - * @param inputs rayleigh value and material - * @group set - * @shortname set rayleigh - */ setRayleigh(inputs: Inputs.BabylonMaterial.RayleighDto): void; - /** - * Sets the mieCoefficient of the sky material - * @param inputs mieCoefficient value and material - * @group set - * @shortname set mieCoefficient - */ setMieCoefficient(inputs: Inputs.BabylonMaterial.MieCoefficientDto): void; - /** - * Sets the mieDirectionalG of the sky material - * @param inputs mieDirectionalG value and material - * @group set - * @shortname set mieDirectionalG - */ setMieDirectionalG(inputs: Inputs.BabylonMaterial.MieDirectionalGDto): void; - /** - * Sets the distance of the sky material - * @param inputs distance value and material - * @group set - * @shortname set distance - */ setDistance(inputs: Inputs.BabylonMaterial.DistanceDto): void; - /** - * Sets the inclination of the sky material - * @param inputs inclination value and material - * @group set - * @shortname set inclination - */ setInclination(inputs: Inputs.BabylonMaterial.InclinationDto): void; - /** - * Sets the azimuth of the sky material - * @param inputs azimuth value and material - * @group set - * @shortname set azimuth - */ setAzimuth(inputs: Inputs.BabylonMaterial.AzimuthDto): void; - /** - * Sets the sun position of the sky material - * @param inputs sun position value and material - * @group set - * @shortname set sun position - */ setSunPosition(inputs: Inputs.BabylonMaterial.SunPositionDto): void; - /** - * Sets the use sun position of the sky material - * @param inputs use sun position value and material - * @group set - * @shortname set use sun position - */ setUseSunPosition(inputs: Inputs.BabylonMaterial.UseSunPositionDto): void; - /** - * Sets the camera offset of the sky material - * @param inputs camera offset value and material - * @group set - * @shortname set camera offset - */ setCameraOffset(inputs: Inputs.BabylonMaterial.CameraOffsetDto): void; - /** - * Sets the up of the sky material - * @param inputs up value and material - * @group set - * @shortname set up - */ setUp(inputs: Inputs.BabylonMaterial.UpDto): void; - /** - * Sets the dithering of the sky material - * @param inputs dithering value and material - * @group set - * @shortname set dithering - */ setDithering(inputs: Inputs.BabylonMaterial.DitheringDto): void; - /** - * Gets the luminance of the sky material - * @param inputs material - * @group get - * @shortname get luminance - */ getLuminance(inputs: Inputs.BabylonMaterial.SkyMaterialPropDto): number; - /** - * Gets the turbidity of the sky material - * @param inputs material - * @group get - * @shortname get turbidity - */ getTurbidity(inputs: Inputs.BabylonMaterial.SkyMaterialPropDto): number; - /** - * Gets the rayleigh of the sky material - * @param inputs material - * @group get - * @shortname get rayleigh - */ getRayleigh(inputs: Inputs.BabylonMaterial.SkyMaterialPropDto): number; - /** - * Gets the mieCoefficient of the sky material - * @param inputs material - * @group get - * @shortname get mieCoefficient - */ getMieCoefficient(inputs: Inputs.BabylonMaterial.SkyMaterialPropDto): number; - /** - * Gets the mieDirectionalG of the sky material - * @param inputs material - * @group get - * @shortname get mieDirectionalG - */ getMieDirectionalG(inputs: Inputs.BabylonMaterial.SkyMaterialPropDto): number; - /** - * Gets the distance of the sky material - * @param inputs material - * @group get - * @shortname get distance - */ getDistance(inputs: Inputs.BabylonMaterial.SkyMaterialPropDto): number; - /** - * Gets the inclination of the sky material - * @param inputs material - * @group get - * @shortname get inclination - */ getInclination(inputs: Inputs.BabylonMaterial.SkyMaterialPropDto): number; - /** - * Gets the azimuth of the sky material - * @param inputs material - * @group get - * @shortname get azimuth - */ getAzimuth(inputs: Inputs.BabylonMaterial.SkyMaterialPropDto): number; - /** - * Gets the sun position of the sky material - * @param inputs material - * @group get - * @shortname get sun position - */ getSunPosition(inputs: Inputs.BabylonMaterial.SkyMaterialPropDto): Inputs.Base.Vector3; - /** - * Gets the use sun position of the sky material - * @param inputs material - * @group get - * @shortname get use sun position - */ getUseSunPosition(inputs: Inputs.BabylonMaterial.SkyMaterialPropDto): boolean; - /** - * Gets the camera offset of the sky material - * @param inputs material - * @group get - * @shortname get camera offset - */ getCameraOffset(inputs: Inputs.BabylonMaterial.SkyMaterialPropDto): Inputs.Base.Vector3; - /** - * Gets the up of the sky material - * @param inputs material - * @group get - * @shortname get up - */ getUp(inputs: Inputs.BabylonMaterial.SkyMaterialPropDto): Inputs.Base.Vector3; - /** - * Gets the dithering of the sky material - * @param inputs material - * @group get - * @shortname get dithering - */ getDithering(inputs: Inputs.BabylonMaterial.SkyMaterialPropDto): boolean; - } declare class BabylonMeshBuilder { + } + declare class BabylonMeshBuilder { private readonly context; private readonly mesh; constructor(context: Context, mesh: BabylonMesh); - /** - * Creates a box mesh - * @param inputs required to set up basic box - * @returns Babylon mesh - * @group create simple - * @shortname create box - * @disposableOutput true - * @drawable true - */ createBox(inputs: Inputs.BabylonMeshBuilder.CreateBoxDto): BABYLON.Mesh; - /** - * Creates a cube mesh - * @param inputs required to set up basic cube - * @returns Babylon mesh - * @group create simple - * @shortname create cube - * @disposableOutput true - * @drawable true - */ createCube(inputs: Inputs.BabylonMeshBuilder.CreateCubeDto): BABYLON.Mesh; - /** - * Creates a square plane mesh - * @param inputs required to set up basic cube - * @returns Babylon mesh - * @group create simple - * @shortname square plane - * @disposableOutput true - * @drawable true - */ createSquarePlane(inputs: Inputs.BabylonMeshBuilder.CreateSquarePlaneDto): BABYLON.Mesh; - /** - * Creates a sphere mesh - * @param inputs required to set up basic sphere - * @returns Babylon mesh - * @group create simple - * @shortname create sphere - * @disposableOutput true - * @drawable true - */ createSphere(inputs: Inputs.BabylonMeshBuilder.CreateSphereDto): BABYLON.Mesh; - /** - * Create ico sphere - * @param inputs required to set up a ico sphere - * @returns Babylon mesh - * @group create simple - * @shortname create ico sphere - * @disposableOutput true - * @drawable true - */ createIcoSphere(inputs: Inputs.BabylonMeshBuilder.CreateIcoSphereDto): BABYLON.Mesh; - /** - * Creates a disc - * @param inputs required to set up a disc - * @returns Babylon mesh - * @group create simple - * @shortname create disc - * @disposableOutput true - * @drawable true - */ createDisc(inputs: Inputs.BabylonMeshBuilder.CreateDiscDto): BABYLON.Mesh; - /** - * Create a torus mesh - * @param inputs required to set up a torus - * @returns Babylon mesh - * @group create simple - * @shortname create torus - * @disposableOutput true - * @drawable true - */ createTorus(inputs: Inputs.BabylonMeshBuilder.CreateTorusDto): BABYLON.Mesh; - /** - * Create a torus knot mesh - * @param inputs required to set up a torus knot - * @returns Babylon mesh - * @group create simple - * @shortname create torus knot - * @disposableOutput true - * @drawable true - */ createTorusKnot(inputs: Inputs.BabylonMeshBuilder.CreateTorusKnotDto): BABYLON.Mesh; - /** - * Create a polygon mesh - * @param inputs required to set up a polygon - * @returns Babylon mesh - * @group create simple - * @shortname create polygon - * @disposableOutput true - * @drawable true - */ createPolygon(inputs: Inputs.BabylonMeshBuilder.CreatePolygonDto): BABYLON.Mesh; - /** - * Create extruded polygon mesh - * @param inputs required to set up a extrude polygon - * @returns Babylon mesh - * @group create simple - * @shortname create extrude polygon - * @disposableOutput true - * @drawable true - */ extrudePolygon(inputs: Inputs.BabylonMeshBuilder.ExtrudePolygonDto): BABYLON.Mesh; - /** - * Create a tube mesh - * @param inputs required to set up a tube - * @returns Babylon mesh - * @group create simple - * @shortname create tube - * @disposableOutput true - * @drawable true - */ createTube(inputs: Inputs.BabylonMeshBuilder.CreateTubeDto): BABYLON.Mesh; - /** - * Create a polyhedron mesh - * @param inputs required to set up a polyhedron - * @returns Babylon mesh - * @group create simple - * @shortname create polyhedron - * @disposableOutput true - * @drawable true - */ createPolyhedron(inputs: Inputs.BabylonMeshBuilder.CreatePolyhedronDto): BABYLON.Mesh; - /** - * Create geodesic mesh - * @param inputs required to set up a geodesic - * @returns Babylon mesh - * @group create simple - * @shortname create geodesic - * @disposableOutput true - * @drawable true - */ createGeodesic(inputs: Inputs.BabylonMeshBuilder.CreateGeodesicDto): BABYLON.Mesh; - /** - * Create goldberg mesh - * @param inputs required to set up a goldberg mesh - * @returns Babylon mesh - * @group create simple - * @shortname create goldberg - * @disposableOutput true - * @drawable true - */ createGoldberg(inputs: Inputs.BabylonMeshBuilder.CreateGoldbergDto): BABYLON.Mesh; - /** - * Create capsule mesh - * @param inputs required to set up a capsule - * @returns Babylon mesh - * @group create simple - * @shortname create capsule - * @disposableOutput true - * @drawable true - */ createCapsule(inputs: Inputs.BabylonMeshBuilder.CreateCapsuleDto): BABYLON.Mesh; - /** - * Create a cylinder mesh - * @param inputs required to set up a cylinder - * @returns Babylon mesh - * @group create simple - * @shortname create cylinder - * @disposableOutput true - * @drawable true - */ createCylinder(inputs: Inputs.BabylonMeshBuilder.CreateCylinderDto): BABYLON.Mesh; - /** - * Create extruded shape - * @param inputs required to set up a extrude shape - * @returns Babylon mesh - * @group create simple - * @shortname create extruded shape - * @disposableOutput true - * @drawable true - */ createExtrudedSahpe(inputs: Inputs.BabylonMeshBuilder.CreateExtrudedShapeDto): BABYLON.Mesh; - /** - * Create a ribbon mesh - * @param inputs required to set up a ribbon - * @returns Babylon mesh - * @group create simple - * @shortname create ribbon - * @disposableOutput true - * @drawable true - */ createRibbon(inputs: Inputs.BabylonMeshBuilder.CreateRibbonDto): BABYLON.Mesh; - /** - * Create lathe mesh - * @param inputs required to set up a lathe - * @returns Babylon mesh - * @group create simple - * @shortname create lathe - * @disposableOutput true - * @drawable true - */ createLathe(inputs: Inputs.BabylonMeshBuilder.CreateLatheDto): BABYLON.Mesh; - /** - * Create the ground mesh - * @param inputs required to set up a ground - * @returns Babylon mesh - * @group create simple - * @shortname create ground - * @disposableOutput true - * @drawable true - */ createGround(inputs: Inputs.BabylonMeshBuilder.CreateGroundDto): BABYLON.Mesh; - /** - * Creates a rectangle plane mesh - * @param inputs required to set up basic cube - * @returns Babylon mesh - * @group create simple - * @shortname rectangle plane - * @disposableOutput true - * @drawable true - */ createRectanglePlane(inputs: Inputs.BabylonMeshBuilder.CreateRectanglePlaneDto): BABYLON.Mesh; private enableShadows; - } declare class BabylonMesh { + } + declare class BabylonMesh { private readonly context; constructor(context: Context); - /** Disposes drawn mesh object from the scene - * @param inputs Contains BabylonJS mesh that should be disposed - * @group memory - * @shortname dispose - */ dispose(inputs: Inputs.BabylonMesh.BabylonMeshDto): void; - /** Udates drawn BabylonJS mesh object without disposing it - * @param inputs Contains BabylonJS mesh that should be updated, together with position, rotation, scaling and colour info - * @returns BabylonJS Mesh - * @group updates - * @shortname update drawn - */ updateDrawn(inputs: Inputs.BabylonMesh.UpdateDrawnBabylonMesh): void; - /** - * Change the visibility of a drawn BabylonJS mesh - * @param inputs BabylonJS mesh and parent mesh - * @group visibility - * @shortname set visibility - */ setVisibility(inputs: Inputs.BabylonMesh.SetMeshVisibilityDto): void; - /** - * Hides the mesh - * @param inputs BabylonJS mesh to hide - * @group visibility - * @shortname hide - */ hide(inputs: Inputs.BabylonMesh.ShowHideMeshDto): void; - /** - * Show the mesh - * @param inputs BabylonJS mesh to hide - * @group visibility - * @shortname show - */ show(inputs: Inputs.BabylonMesh.ShowHideMeshDto): void; - /** - * Change the parent of the drawn mesh - * @param inputs BabylonJS mesh and parent mesh - * @group set - * @shortname parent - */ setParent(inputs: Inputs.BabylonMesh.SetParentDto): void; - /** - * Get the parent of the drawn mesh - * @param inputs BabylonJS mesh - * @returns Parent mesh - * @group get - * @shortname parent - */ getParent(inputs: Inputs.BabylonMesh.SetParentDto): BABYLON.Node; - /** - * Change the check collisions property of the drawn mesh - * @param inputs BabylonJS mesh and check collisions - * @group set - * @shortname check collisions - */ setCheckCollisions(inputs: Inputs.BabylonMesh.CheckCollisionsBabylonMeshDto): void; - /** - * Get the check collisions property of the drawn mesh - * @param inputs BabylonJS mesh and check collisions - * @group get - * @shortname check collisions - */ getCheckCollisions(inputs: Inputs.BabylonMesh.CheckCollisionsBabylonMeshDto): boolean; - /** - * Change the pickable property of the drawn mesh - * @param inputs BabylonJS mesh and pickable - * @group get - * @shortname check collisions - */ setPickable(inputs: Inputs.BabylonMesh.PickableBabylonMeshDto): void; - /** - * Force mesh to be pickable by pointer move events, default is false as it is performance heavy - * @param inputs BabylonJS mesh - * @group set - * @shortname enable pointer move events - */ enablePointerMoveEvents(inputs: Inputs.BabylonMesh.BabylonMeshWithChildrenDto): void; - /** - * Make mesh ignore pointer move events, default is false - * @param inputs BabylonJS mesh and pickable - * @group set - * @shortname disable pointer move events - */ disablePointerMoveEvents(inputs: Inputs.BabylonMesh.BabylonMeshWithChildrenDto): void; - /** - * Change the pickable property of the drawn mesh - * @param inputs BabylonJS mesh and pickable - * @group get - * @shortname pickable - */ getPickable(inputs: Inputs.BabylonMesh.BabylonMeshDto): boolean; - /** - * Gets meshes that have names which contain a given text - * @param inputs BabylonJS mesh and name - * @group get - * @shortname meshes where name contains - */ getMeshesWhereNameContains(inputs: Inputs.BabylonMesh.ByNameBabylonMeshDto): BABYLON.AbstractMesh[]; - /** - * Gets child meshes - * @param inputs BabylonJS mesh and whether to include only direct descendants - * @group get - * @shortname child meshes - */ getChildMeshes(inputs: Inputs.BabylonMesh.ChildMeshesBabylonMeshDto): BABYLON.AbstractMesh[]; - /** - * Gets meshes of id - * @param inputs BabylonJS mesh and name - * @group get - * @shortname meshes by id - */ getMeshesOfId(inputs: Inputs.BabylonMesh.ByIdBabylonMeshDto): BABYLON.AbstractMesh[]; - /** - * Gets mesh of id - * @param inputs BabylonJS mesh and name - * @group get - * @shortname mesh by id - */ getMeshOfId(inputs: Inputs.BabylonMesh.ByIdBabylonMeshDto): BABYLON.AbstractMesh; - /** - * Gets mesh of unique id - * @param inputs BabylonJS mesh and name - * @group get - * @shortname mesh by unique id - */ getMeshOfUniqueId(inputs: Inputs.BabylonMesh.UniqueIdBabylonMeshDto): BABYLON.AbstractMesh; - /** - * Merges multiple meshes into one - * @param inputs BabylonJS meshes and options - * @returns a new mesh - * @group edit - * @shortname merge - */ mergeMeshes(inputs: Inputs.BabylonMesh.MergeMeshesDto): BABYLON.Mesh; - /** Convers mesh to flat shaded mesh - * @param inputs BabylonJS mesh - * @returns a new mesh - * @group edit - * @shortname convert to flat shaded - */ convertToFlatShadedMesh(inputs: Inputs.BabylonMesh.BabylonMeshDto): BABYLON.Mesh; - /** - * Clones the mesh - * @param inputs BabylonJS mesh to clone - * @returns a new mesh - * @group edit - * @shortname clone - * @disposableOutput true - */ clone(inputs: Inputs.BabylonMesh.BabylonMeshDto): BABYLON.Mesh; - /** - * Clones the mesh to positions - * @param inputs BabylonJS mesh and positions - * @returns a new mesh - * @group edit - * @shortname clone to positions - * @disposableOutput true - * @drawable true - */ cloneToPositions(inputs: Inputs.BabylonMesh.CloneToPositionsDto): BABYLON.Mesh[]; - /** - * Change the id of the drawn mesh - * @param inputs BabylonJS mesh and name - * @group set - * @shortname id - */ setId(inputs: Inputs.BabylonMesh.IdBabylonMeshDto): void; - /** - * Get the id of the drawn mesh - * @param inputs BabylonJS mesh and id - * @group get - * @shortname id - */ getId(inputs: Inputs.BabylonMesh.IdBabylonMeshDto): string; - /** - * Get the unique id of the drawn mesh - * @param inputs BabylonJS mesh and id - * @returns unique id number - * @group get - * @shortname unique id - */ getUniqueId(inputs: Inputs.BabylonMesh.BabylonMeshDto): number; - /** - * Change the name of the drawn mesh - * @param inputs BabylonJS mesh and name - * @group set - * @shortname name - */ setName(inputs: Inputs.BabylonMesh.NameBabylonMeshDto): void; - /** - * Gets the vertices as polygon points. These can be used with other construction methods to create meshes. Mesh must be triangulated. - * @param inputs BabylonJS mesh and name - * @group get - * @shortname vertices as polygon points - */ getVerticesAsPolygonPoints(inputs: Inputs.BabylonMesh.BabylonMeshDto): Base.Point3[][]; - /** - * Gets the name of babylon mesh - * @param inputs BabylonJS mesh and name - * @group get - * @shortname name - */ getName(inputs: Inputs.BabylonMesh.BabylonMeshDto): string; - /** - * Change the material of the drawn mesh - * @param inputs BabylonJS mesh and material - * @group set - * @shortname material - */ setMaterial(inputs: Inputs.BabylonMesh.MaterialBabylonMeshDto): void; - /** - * Gets the material of babylon mesh - * @param inputs BabylonJS mesh - * @group get - * @shortname material - */ getMaterial(inputs: Inputs.BabylonMesh.BabylonMeshDto): BABYLON.Material; - /** - * Gets the position as point of babylonjs mesh - * @param inputs BabylonJS mesh - * @returns point - * @group get - * @shortname position - */ getPosition(inputs: Inputs.BabylonMesh.BabylonMeshDto): Base.Point3; - /** - * Gets the absolute position in the world as point of babylonjs mesh - * @param inputs BabylonJS mesh - * @returns point - * @group get - * @shortname absolute position - */ getAbsolutePosition(inputs: Inputs.BabylonMesh.BabylonMeshDto): Base.Point3; - /** - * Gets the rotation vector of babylonjs mesh - * @param inputs BabylonJS mesh - * @group get - * @shortname rotation - */ getRotation(inputs: Inputs.BabylonMesh.BabylonMeshDto): Base.Point3; - /** - * Gets the scale vector of babylonjs mesh - * @param inputs BabylonJS mesh - * @group get - * @shortname scale - */ getScale(inputs: Inputs.BabylonMesh.BabylonMeshDto): Base.Point3; - /** - * Moves babylonjs mesh forward in local space - * @param inputs BabylonJS mesh and distance - * @group move - * @shortname forward - */ moveForward(inputs: Inputs.BabylonMesh.TranslateBabylonMeshDto): void; - /** - * Moves babylonjs mesh backward in local space - * @param inputs BabylonJS mesh and distance - * @group move - * @shortname backward - */ moveBackward(inputs: Inputs.BabylonMesh.TranslateBabylonMeshDto): void; - /** - * Moves babylonjs mesh up in local space - * @param inputs BabylonJS mesh and distance - * @group move - * @shortname up - */ moveUp(inputs: Inputs.BabylonMesh.TranslateBabylonMeshDto): void; - /** - * Moves babylonjs mesh down in local space - * @param inputs BabylonJS mesh and distance - * @group move - * @shortname down - */ moveDown(inputs: Inputs.BabylonMesh.TranslateBabylonMeshDto): void; - /** - * Moves babylonjs mesh right in local space - * @param inputs BabylonJS mesh and distance - * @group move - * @shortname right - */ moveRight(inputs: Inputs.BabylonMesh.TranslateBabylonMeshDto): void; - /** - * Moves babylonjs mesh left in local space - * @param inputs BabylonJS mesh and distance - * @group move - * @shortname left - */ moveLeft(inputs: Inputs.BabylonMesh.TranslateBabylonMeshDto): void; - /** - * Rotates babylonjs mesh around local y axis - * @param inputs BabylonJS mesh and rotation in degrees - * @group move - * @shortname yaw - */ yaw(inputs: Inputs.BabylonMesh.RotateBabylonMeshDto): void; - /** - * Rotates babylonjs mesh around local x axis - * @param inputs BabylonJS mesh and rotation in degrees - * @group move - * @shortname pitch - */ pitch(inputs: Inputs.BabylonMesh.RotateBabylonMeshDto): void; - /** - * Rotates babylonjs mesh around local z axis - * @param inputs BabylonJS mesh and rotation in degrees - * @group move - * @shortname roll - */ roll(inputs: Inputs.BabylonMesh.RotateBabylonMeshDto): void; - /** - * Rotates the mesh around axis and given position by a given angle - * @param inputs Rotation around axis information - * @group move - * @shortname rotate around axis with position - */ rotateAroundAxisWithPosition(inputs: Inputs.BabylonMesh.RotateAroundAxisNodeDto): void; - /** - * Updates the position of the BabylonJS mesh or instanced mesh - * @param inputs BabylonJS mesh and position point - * @group set - * @shortname position - */ setPosition(inputs: Inputs.BabylonMesh.UpdateDrawnBabylonMeshPositionDto): void; - /** - * Updates the rotation of the BabylonJS mesh or instanced mesh - * @param inputs BabylonJS mesh and rotation along x, y and z axis in degrees - * @group set - * @shortname rotation - */ setRotation(inputs: Inputs.BabylonMesh.UpdateDrawnBabylonMeshRotationDto): void; - /** - * Updates the scale of the BabylonJS mesh or instanced mesh - * @param inputs BabylonJS mesh and scale vector - * @group set - * @shortname scale - */ setScale(inputs: Inputs.BabylonMesh.UpdateDrawnBabylonMeshScaleDto): void; - /** - * Checks wether mesh intersects another mesh mesh - * @param inputs Two BabylonJS meshes - * @group intersects - * @shortname mesh - */ + setLocalScale(inputs: Inputs.BabylonMesh.ScaleInPlaceDto): void; intersectsMesh(inputs: Inputs.BabylonMesh.IntersectsMeshDto): boolean; - /** - * Checks wether mesh intersects point - * @param inputs BabylonJS mesh and point - * @group intersects - * @shortname point - */ intersectsPoint(inputs: Inputs.BabylonMesh.IntersectsPointDto): boolean; - /** - * Creates mesh instance for optimised rendering. This method will check if mesh contains children and will create instances for each child. - * These are optimised for max performance when rendering many similar objects in the scene. This method returns instances as childrens in a new mesh. - * If the mesh has children, then every child goes a mesh instance. - * @group instance - * @shortname create and transform - * @disposableOutput true - */ createMeshInstanceAndTransformNoReturn(inputs: Inputs.BabylonMesh.MeshInstanceAndTransformDto): void; - /** - * Creates mesh instance for optimised rendering. This method will check if mesh contains children and will create instances for each child. - * These are optimised for max performance when rendering many similar objects in the scene. This method returns instances as childrens in a new mesh. - * If the mesh has children, then every child goes a mesh instance. - * @group instance - * @returns babylon mesh - * @shortname create and transform - * @disposableOutput true - */ createMeshInstanceAndTransform(inputs: Inputs.BabylonMesh.MeshInstanceAndTransformDto): BABYLON.Mesh; - /** - * Creates mesh instance. These are optimised for max performance - * when rendering many similar objects in the scene. If the mesh has children, then every child gets a mesh instance. - * @group instance - * @shortname create - * @disposableOutput true - */ createMeshInstance(inputs: Inputs.BabylonMesh.MeshInstanceDto): BABYLON.Mesh; - /** - * Gets side orientation - * @ignore true - */ getSideOrientation(sideOrientation: Inputs.BabylonMesh.sideOrientationEnum): number; private assignColorToMesh; - }/** - * Nodes help understand the space and construct more complicated space structures. Nodes can be nested together - * into child parent relationships to simplify the creation of 3D objects. - */ + } declare class BabylonNode { private readonly context; private readonly drawHelper; constructor(context: Context, drawHelper: DrawHelper); - /** - * Draws a node of given size with given colours for every axis - * @param inputs Contains node data that includes size and colour information - */ drawNode(inputs: Inputs.BabylonNode.DrawNodeDto): void; - /** - * Draws a nodes of given size with given colours for every axis - * @param inputs Contains node data that includes size and colour information - */ drawNodes(inputs: Inputs.BabylonNode.DrawNodesDto): void; - /** - * Creates a node on the origin with the given rotations in the parent coordinate system - * @param inputs Contains information for origin, rotation and parent node - * @returns A new node - */ createNodeFromRotation(inputs: Inputs.BabylonNode.CreateNodeFromRotationDto): BABYLON.TransformNode; - /** - * Creates a world node which has root node as his parent - * @returns A new node whos parent is the root node of the scene - */ createWorldNode(): BABYLON.TransformNode; - /** - * Gets the absolute forward facing vector in world space - * @param inputs Node from which to get the forward vector - * @returns Vector as an array of numbers - */ getAbsoluteForwardVector(inputs: Inputs.BabylonNode.NodeDto): number[]; - /** - * Gets the absolute right facing vector in world space - * @param inputs Node from which to get the right vector - * @returns Vector as an array of numbers - */ getAbsoluteRightVector(inputs: Inputs.BabylonNode.NodeDto): number[]; - /** - * Gets the absolute up facing vector in world space - * @param inputs Node from which to get the up vector - * @returns Vector as an array of numbers - */ getAbsoluteUpVector(inputs: Inputs.BabylonNode.NodeDto): number[]; - /** - * Gets the absolute position of the node as origin vector in world space - * @param inputs Node from which to get the absolute position - * @returns Vector as an array of numbers indicating location of origin in world space - */ getAbsolutePosition(inputs: Inputs.BabylonNode.NodeDto): number[]; - /** - * Gets the absolute rotation of the node as a transformation matrix encoded in array of 16 numbers - * @param inputs Node from which to get the rotation transformation - * @returns Transformation as an array of 16 numbers - */ getAbsoluteRotationTransformation(inputs: Inputs.BabylonNode.NodeDto): number[]; - /** - * Gets the rotation of the node in local parent coordinate space as a transformation matrix encoded in array of 16 numbers - * @param inputs Node from which to get the rotation transformation - * @returns Transformation as an array of 16 numbers - */ getRotationTransformation(inputs: Inputs.BabylonNode.NodeDto): number[]; - /** - * Gets children of the node - * @param inputs Node from which to get the children - * @returns List of children nodes in the array - */ getChildren(inputs: Inputs.BabylonNode.NodeDto): BABYLON.Node[]; - /** - * Gets parent of the node - * @param inputs Node from which to get a parent - * @returns Parent node - */ getParent(inputs: Inputs.BabylonNode.NodeDto): BABYLON.Node; - /** - * Gets the position of the node expressed in local space - * @param inputs Node from which to get the position in local space - * @returns Position vector - */ getPositionExpressedInLocalSpace(inputs: Inputs.BabylonNode.NodeDto): number[]; - /** - * Gets the root node - * @returns Root node - */ getRootNode(): BABYLON.TransformNode; - /** - * Gets the euler rotations - * @param inputs Node from which to get rotation - * @returns Euler rotations of x, y and z angles in the number array - */ getRotation(inputs: Inputs.BabylonNode.NodeDto): number[]; - /** - * Rotates the node around axis and given position by a given angle - * @param inputs Rotation around axis information - */ rotateAroundAxisWithPosition(inputs: Inputs.BabylonNode.RotateAroundAxisNodeDto): void; - /** - * Rotates the node around the origin and given axis - * @param inputs Rotation information - */ rotate(inputs: Inputs.BabylonNode.RotateNodeDto): void; - /** - * Sets the absolute position of the node - * @param inputs Node absolute position information - */ setAbsolutePosition(inputs: Inputs.BabylonNode.NodePositionDto): void; - /** - * Sets the direction of the node - * @param inputs Direction information - */ setDirection(inputs: Inputs.BabylonNode.NodeDirectionDto): void; - /** - * Sets the new parent to the node - * @param inputs Node parent information - */ setParent(inputs: Inputs.BabylonNode.NodeParentDto): void; - /** - * Translates the node by a given direction vector and a distance - * @param inputs Node translation information - */ translate(inputs: Inputs.BabylonNode.NodeTranslationDto): void; - } declare class BabylonPick { + } + declare class BabylonPick { private readonly context; constructor(context: Context); - /** - * Get a hit result of picking with ray - * @param inputs ray to use for picking - * @group pick - * @shortname pick with custom ray - * @returns Picking info - */ pickWithRay(inputs: Inputs.BabylonPick.RayDto): BABYLON.PickingInfo; - /** - * Pick with picking ray of the current mouse position in the active camera - * @group pick - * @shortname pick with picking ray - * @returns Picking info - */ pickWithPickingRay(): BABYLON.PickingInfo; - /** - * Get the distance to the object if picking result exists - * @param inputs picking result - * @group get from pick info - * @shortname pick distance - * @returns Distance - */ getDistance(inputs: Inputs.BabylonPick.PickInfo): number; - /** - * Get the picked mesh - * @param inputs picking result - * @group get from pick info - * @shortname picked mesh - * @returns Picked mesh - */ getPickedMesh(inputs: Inputs.BabylonPick.PickInfo): BABYLON.AbstractMesh; - /** - * Get the picked point - * @param inputs picking result - * @group get from pick info - * @shortname picked point - * @returns Picked point - */ getPickedPoint(inputs: Inputs.BabylonPick.PickInfo): Base.Point3; - /** - * Check if pick ray hit something in the scene or not - * @param inputs picking result - * @group get from pick info - * @shortname hit - * @returns Indication of a hit - */ hit(inputs: Inputs.BabylonPick.PickInfo): boolean; - /** - * Gets the unique submesh id if it was picked - * @param inputs picking result - * @group get from pick info - * @shortname sub mesh id - * @returns Submesh id - */ getSubMeshId(inputs: Inputs.BabylonPick.PickInfo): number; - /** - * Gets the unique submesh face id if it was picked - * @param inputs picking result - * @group get from pick info - * @shortname sub mesh face id - * @returns Submesh face id - */ getSubMeshFaceId(inputs: Inputs.BabylonPick.PickInfo): number; - /** - * Gets the the barycentric U coordinate that is used when calculating the texture coordinates of the collision - * @param inputs picking result - * @group get from pick info - * @shortname picked bu - * @returns U coordinate - */ getBU(inputs: Inputs.BabylonPick.PickInfo): number; - /** - * Gets the the barycentric V coordinate that is used when calculating the texture coordinates of the collision - * @param inputs picking result - * @group get from pick info - * @shortname picked bv - * @returns V coordinate - */ getBV(inputs: Inputs.BabylonPick.PickInfo): number; - /** - * Get the picked sprite - * @param inputs picking result - * @group get from pick info - * @shortname picked sprite - * @returns Picked sprite - */ getPickedSprite(inputs: Inputs.BabylonPick.PickInfo): BABYLON.Sprite; - } declare class BabylonRay { + } + declare class BabylonRay { private readonly context; constructor(context: Context); - /** - * Creates a picking ray of the current mouse position in the active camera - * @group create - * @shortname create picking ray - * @returns Ray - */ createPickingRay(): BABYLON.Ray; - /** - * Create a ray that start at origin, has direction vector and optionally length - * @param inputs origin, direction and length - * @group create - * @shortname create custom ray - * @returns ray - */ createRay(inputs: Inputs.BabylonRay.BaseRayDto): BABYLON.Ray; - /** - * Create a ray from one point to another - * @param inputs origin, direction and length - * @group create - * @shortname create ray from to - * @returns ray - */ createRayFromTo(inputs: Inputs.BabylonRay.FromToDto): BABYLON.Ray; - /** - * Get the origin of the ray - * @param inputs ray - * @group get - * @shortname get ray origin - * @returns origin point - */ getOrigin(inputs: Inputs.BabylonRay.RayDto): Base.Point3; - /** - * Get the direction of the ray - * @param inputs ray - * @group get - * @shortname get ray direction - * @returns direction vector - */ getDirection(inputs: Inputs.BabylonRay.RayDto): Base.Vector3; - /** - * Get the length of the ray - * @param inputs ray - * @group get - * @shortname get ray length - * @returns length - */ getLength(inputs: Inputs.BabylonRay.RayDto): number; - } declare class BabylonScene { + } + declare function initBabylonJS(inputs?: BabylonJSScene.InitBabylonJSDto): InitBabylonJSResult; + declare class BabylonScene { private readonly context; constructor(context: Context); - /** - * Gets the scene for the current context - * @ignore true - * @group scene - * @shortname get scene - */ getScene(): BABYLON.Scene; - /** - * Gets the scene for the current context - * @ignore true - * @group scene - * @shortname get scene - */ setAndAttachScene(inputs: Inputs.BabylonScene.SceneDto): BABYLON.Scene; - /** - * Changes the scene background colour for 3D space - * @param inputs Describes the colour of the scene background - * @group environment - * @shortname colour - */ - backgroundColour(inputs: Inputs.BabylonScene.SceneBackgroundColourDto): void; - /** - * Activate camera by overwriting currently active camera - * @param inputs Activates the camera - * @group camera - * @shortname activate - */ activateCamera(inputs: Inputs.BabylonScene.ActiveCameraDto): void; - /** - * Use right handed system - * @param inputs Activates the camera - * @group system - * @shortname hand right - */ useRightHandedSystem(inputs: Inputs.BabylonScene.UseRightHandedSystemDto): void; - /** - * Creates and draws a point light in the scene but does not output anything - * @param inputs Describes the light source - * @group lights - * @shortname point - * @disposableOutput true - */ drawPointLightNoReturn(inputs: Inputs.BabylonScene.PointLightDto): void; - /** - * Get shadow generators added by light sources through bitbybit - * @param inputs Describes the light source - * @group lights - * @shortname point - * @disposableOutput true - */ getShadowGenerators(): BABYLON.ShadowGenerator[]; - /** - * Creates and draws a point light in the scene - * @param inputs Describes the light source - * @returns BabylonJS point light - * @group lights - * @shortname point light - * @disposableOutput true - */ drawPointLight(inputs: Inputs.BabylonScene.PointLightDto): BABYLON.PointLight; - /** - * Creates and draws a directional light in the scene - * @param inputs Describes the light source - * @group lights - * @shortname directional - * @disposableOutput true - */ drawDirectionalLightNoReturn(inputs: Inputs.BabylonScene.DirectionalLightDto): void; - /** - * Creates and draws a directional light in the scene - * @param inputs Describes the light source - * @returns BabylonJS directional light - * @group lights - * @shortname directional light - * @disposableOutput true - */ drawDirectionalLight(inputs: Inputs.BabylonScene.DirectionalLightDto): BABYLON.DirectionalLight; - /** - * Gets the active camera of the scene - * @group camera - * @shortname get active camera - */ getActiveCamera(): BABYLON.Camera; - /** - * Adjusts the active arc rotate camera with configuration parameters - * @group camera - * @shortname adjust active camera - */ adjustActiveArcRotateCamera(inputs: Inputs.BabylonScene.CameraConfigurationDto): void; - /** - * Clears all of the drawn objects in the 3D scene - * @group environment - * @shortname clear all drawn - */ clearAllDrawn(): void; - /** - * Enables skybox - * @param inputs Skybox configuration - * @group environment - * @shortname skybox - */ enableSkybox(inputs: Inputs.BabylonScene.SkyboxDto): void; - /** - * Registers code to run when pointer is down - * @param inputs pointer statement - * @ignore true - */ + enableSkyboxCustomTexture(inputs: Inputs.BabylonScene.SkyboxCustomTextureDto): void; onPointerDown(inputs: Inputs.BabylonScene.PointerDto): void; - /** - * Registers code to run when pointer is up - * @param inputs pointer statement - * @ignore true - */ onPointerUp(inputs: Inputs.BabylonScene.PointerDto): void; - /** - * Registers code to run when pointer is moving - * @param inputs pointer statement - * @ignore true - */ onPointerMove(inputs: Inputs.BabylonScene.PointerDto): void; - /** - * Enables fog mode - * @param inputs fog options - * @group environment - * @shortname fog - */ fog(inputs: Inputs.BabylonScene.FogDto): void; - /** - * Enables the physics - * @param inputs the gravity vector - * @ignore true - * @group physics - * @shortname enable - */ enablePhysics(inputs: Inputs.BabylonScene.EnablePhysicsDto): void; + canvasCSSBackgroundImage(inputs: Inputs.BabylonScene.SceneCanvasCSSBackgroundImageDto): { + backgroundImage: string; + }; + twoColorLinearGradientBackground(inputs: Inputs.BabylonScene.SceneTwoColorLinearGradientDto): { + backgroundImage: string; + }; + twoColorRadialGradientBackground(inputs: Inputs.BabylonScene.SceneTwoColorRadialGradientDto): { + backgroundImage: string; + }; + multiColorLinearGradientBackground(inputs: Inputs.BabylonScene.SceneMultiColorLinearGradientDto): { + backgroundImage: string; + } | { + error: string; + }; + multiColorRadialGradientBackground(inputs: Inputs.BabylonScene.SceneMultiColorRadialGradientDto): { + backgroundImage: string; + } | { + error: string; + }; + canvasBackgroundImage(inputs: Inputs.BabylonScene.SceneCanvasBackgroundImageDto): { + backgroundImage: string; + backgroundRepeat: string; + backgroundSize: string; + backgroundPosition: string; + backgroundAttachment: string; + backgroundOrigin: string; + backgroundClip: string; + }; + backgroundColour(inputs: Inputs.BabylonScene.SceneBackgroundColourDto): void; private getRadians; - } declare class BabylonTexture { + private createSkyboxMesh; + } + declare class BabylonTexture { private readonly context; constructor(context: Context); - /** - * Creates texture from URL from a few basic options. If you loaded the asset via the file, create object url and pass it here. - * @param inputs required to set up basic texture - * @returns Babylon texture that can be used with materials - * @group create - * @shortname simple texture - * @disposableOutput true - */ createSimple(inputs: Inputs.BabylonTexture.TextureSimpleDto): BABYLON.Texture; - } declare class BabylonTools { + } + declare class BabylonTools { private readonly context; constructor(context: Context); - /** - * Creates a screenshot of the scene - * @group screenshots - * @shortname create screenshot - */ createScreenshot(inputs: Inputs.BabylonTools.ScreenshotDto): Promise; - /** - * Creates a screenshot of the scene and download file - * @group screenshots - * @shortname create screenshot and download - */ createScreenshotAndDownload(inputs: Inputs.BabylonTools.ScreenshotDto): Promise; - }/** - * Transformations help to move, scale, rotate and mirror objects. You can combine multiple transformations - * for object to be placed exactly into position and orientation that you want. - * Contains various methods for transformations that represent 4x4 matrixes in flat 16 number arrays. - */ + } declare class BabylonTransforms { - /** - * Creates a rotation transformations around the center and an axis - * @param inputs Rotation around center with an axis information - * @returns array of transformations - * @group rotation - * @shortname center axis - * @drawable false - */ rotationCenterAxis(inputs: Inputs.BabylonTransforms.RotationCenterAxisDto): Base.TransformMatrixes; - /** - * Creates a rotation transformations around the center and an X axis - * @param inputs Rotation around center with an X axis information - * @returns array of transformations - * @group rotation - * @shortname center x - * @drawable false - */ rotationCenterX(inputs: Inputs.BabylonTransforms.RotationCenterDto): Base.TransformMatrixes; - /** - * Creates a rotation transformations around the center and an Y axis - * @param inputs Rotation around center with an Y axis information - * @returns array of transformations - * @group rotation - * @shortname center y - * @drawable false - */ rotationCenterY(inputs: Inputs.BabylonTransforms.RotationCenterDto): Base.TransformMatrixes; - /** - * Creates a rotation transformations around the center and an Z axis - * @param inputs Rotation around center with an Z axis information - * @returns array of transformations - * @group rotation - * @shortname center z - * @drawable false - */ rotationCenterZ(inputs: Inputs.BabylonTransforms.RotationCenterDto): Base.TransformMatrixes; - /** - * Creates a rotation transformations with yaw pitch and roll - * @param inputs Yaw pitch roll rotation information - * @returns array of transformations - * @group rotation - * @shortname yaw pitch roll - * @drawable false - */ rotationCenterYawPitchRoll(inputs: Inputs.BabylonTransforms.RotationCenterYawPitchRollDto): Base.TransformMatrixes; - /** - * Scale transformation around center and xyz directions - * @param inputs Scale center xyz trnansformation - * @returns array of transformations - * @group rotation - * @shortname center xyz - * @drawable false - */ scaleCenterXYZ(inputs: Inputs.BabylonTransforms.ScaleCenterXYZDto): Base.TransformMatrixes; - /** - * Creates the scale transformation in x, y and z directions - * @param inputs Scale XYZ number array information - * @returns transformation - * @group scale - * @shortname xyz - * @drawable false - */ scaleXYZ(inputs: Inputs.BabylonTransforms.ScaleXYZDto): Base.TransformMatrixes; - /** - * Creates uniform scale transformation - * @param inputs Scale Dto - * @returns transformation - * @group scale - * @shortname uniform - * @drawable false - */ uniformScale(inputs: Inputs.BabylonTransforms.UniformScaleDto): Base.TransformMatrixes; - /** - * Creates uniform scale transformation from the center - * @param inputs Scale Dto with center point information - * @returns array of transformations - * @group scale - * @shortname uniform from center - * @drawable false - */ uniformScaleFromCenter(inputs: Inputs.BabylonTransforms.UniformScaleFromCenterDto): Base.TransformMatrixes; - /** - * Creates the translation transformation - * @param inputs Translation information - * @returns transformation - * @group translation - * @shortname xyz - * @drawable false - */ translationXYZ(inputs: Inputs.BabylonTransforms.TranslationXYZDto): Base.TransformMatrixes; - /** - * Creates the translation transformation - * @param inputs Translation information - * @returns transformation - * @group translations - * @shortname xyz - * @drawable false - */ translationsXYZ(inputs: Inputs.BabylonTransforms.TranslationsXYZDto): Base.TransformMatrixes[]; - } declare class BabylonWebXRBase { + } + declare class BabylonWebXRBase { private readonly context; constructor(context: Context); - /** - * Creates default XR experience - * @param inputs Options for basic configuration - * @group scene - * @shortname default xr experience async - * @disposableOutput true - */ createDefaultXRExperienceAsync(inputs: Inputs.BabylonWebXR.WebXRDefaultExperienceOptions): Promise; - /** - * Creates default XR experience - * @param inputs Options for basic configuration - * @group scene - * @shortname default xr experience no opt. async - * @disposableOutput true - */ createDefaultXRExperienceNoOptionsAsync(): Promise; - /** - * Returns the base experience of the default XR experience - * @param inputs Inputs with the default XR experience - * @group get - * @shortname get base experience - */ getBaseExperience(inputs: Inputs.BabylonWebXR.WebXRDefaultExperienceDto): BABYLON.WebXRExperienceHelper; - /** - * Returns the feature manager of the default XR experience - * @param inputs Inputs with the default XR experience - * @group get - * @shortname get feature manager - */ getFeatureManager(inputs: Inputs.BabylonWebXR.WebXRExperienceHelperDto): BABYLON.WebXRFeaturesManager; - } declare class BabylonWebXRSimple { + } + declare class BabylonWebXRSimple { private readonly context; constructor(context: Context); - /** - * Creates default XR experience in immersive-ar mode - * @param inputs Creates default XR experience with teleportation - * @returns Default XR experience - * @group scene - * @shortname simple immersive ar experience - * @disposableOutput true - */ createImmersiveARExperience(): Promise; - /** - * Creates default XR experience with teleportation that is very basic and works for simple scenarios - * @param inputs Creates default XR experience with teleportation - * @group scene - * @shortname simple xr with teleportation - */ createDefaultXRExperienceWithTeleportation(inputs: Inputs.BabylonWebXR.DefaultWebXRWithTeleportationDto): Promise; - /** - * Creates default XR experience with teleportation that is very basic and works for simple scenarios - * @param inputs Creates default XR experience with teleportation - * @group scene - * @shortname simple xr with teleportation return - * @disposableOutput true - */ createDefaultXRExperienceWithTeleportationReturn(inputs: Inputs.BabylonWebXR.DefaultWebXRWithTeleportationDto): Promise<{ xr: BABYLON.WebXRDefaultExperience; torusMat: BABYLON.PBRMetallicRoughnessMaterial; @@ -31842,148 +10367,37 @@ declare namespace Bit { text: TextBlock; dispose: () => void; }>; - } declare class BabylonWebXR { + } + declare class BabylonWebXR { private readonly context; simple: BabylonWebXRSimple; constructor(context: Context); - } declare class Draw extends DrawCore { - /** - * @ignore true - */ + } + declare class Draw extends DrawCore { readonly drawHelper: DrawHelper; - /** - * @ignore true - */ readonly node: BabylonNode; - /** - * @ignore true - */ readonly tag: Tag; - /** - * @ignore true - */ readonly context: Context; private defaultBasicOptions; private defaultPolylineOptions; private defaultNodeOptions; - constructor( - /** - * @ignore true - */ - drawHelper: DrawHelper, - /** - * @ignore true - */ - node: BabylonNode, - /** - * @ignore true - */ - tag: Tag, - /** - * @ignore true - */ - context: Context); - /** - * Draws any kind of geometry and does not return anything - * @param inputs Contains options and entities to be drawn - * @group draw async - * @shortname draw async void - * @disposableOutput true - * @drawable true - */ + constructor(drawHelper: DrawHelper, node: BabylonNode, tag: Tag, context: Context); drawAnyAsyncNoReturn(inputs: Inputs.Draw.DrawAny): Promise; - /** - * Draws any kind of geometry and returns the babylon mesh - * @param inputs Contains options and entities to be drawn - * @returns BabylonJS Mesh Promise - * @group draw async - * @shortname draw async - * @drawable true - * @disposableOutput true - */ drawAnyAsync(inputs: Inputs.Draw.DrawAny): Promise; private updateAny; - /** - * Draws any kind of geometry that does not need asynchronous computing, thus it cant be used with shapes coming from occt or jscad - * @param inputs Contains options and entities to be drawn - * @returns BabylonJS Mesh - * @group draw sync - * @shortname draw sync void - */ drawAnyNoReturn(inputs: Inputs.Draw.DrawAny): void; - /** - * Draws any kind of geometry that does not need asynchronous computing, thus it cant be used with shapes coming from occt or jscad - * @param inputs Contains options and entities to be drawn - * @returns BabylonJS Mesh - * @group draw sync - * @shortname draw sync - */ drawAny(inputs: Inputs.Draw.DrawAny): BABYLON.Mesh; - /** - * Draws a grid mesh on the ground plane in 3D space. This helps to orient yourself in the world. - * @param inputs Describes various parameters of the grid mesh like size, colour, etc. - * @group grid - * @shortname draw grid no return - * @disposableOutput true - */ drawGridMeshNoReturn(inputs: Inputs.Draw.SceneDrawGridMeshDto): void; - /** - * Draws a grid mesh on the ground plane in 3D space. This helps to orient yourself in the world. - * @param inputs Describes various parameters of the grid mesh like size, colour, etc. - * @returns grid mesh - * @group grid - * @shortname draw grid - * @disposableOutput true - */ drawGridMesh(inputs: Inputs.Draw.SceneDrawGridMeshDto): BABYLON.Mesh; - /** - * Creates draw options for basic geometry types like points, lines, polylines, surfaces and jscad meshes - * @param inputs option definition - * @returns options - * @group options - * @shortname simple - */ optionsSimple(inputs: Inputs.Draw.DrawBasicGeometryOptions): Inputs.Draw.DrawBasicGeometryOptions; - /** - * Creates draw options for occt shape geometry like edges, wires, faces, shells, solids and compounds - * @param inputs option definition - * @returns options - * @group options - * @shortname occt shape - */ optionsOcctShape(inputs: Inputs.Draw.DrawOcctShapeOptions): Inputs.Draw.DrawOcctShapeOptions; - /** - * Creates simple draw options for occt shape geometry - * @param inputs option definition - * @returns options - * @group options - * @shortname occt shape simple - */ optionsOcctShapeSimple(inputs: Inputs.Draw.DrawOcctShapeSimpleOptions): Inputs.Draw.DrawOcctShapeSimpleOptions; - /** - * Creates simple draw options with custom face material for occt shape geometry - * @param inputs option definition - * @returns options - * @group options - * @shortname occt shape with material - */ optionsOcctShapeMaterial(inputs: Inputs.Draw.DrawOcctShapeMaterialOptions): Inputs.Draw.DrawOcctShapeMaterialOptions; - /** - * Creates draw options for manifold gemetry - * @param inputs option definition - * @returns options - * @group options - * @shortname manifold shape draw options - */ optionsManifoldShapeMaterial(inputs: Inputs.Draw.DrawManifoldOrCrossSectionOptions): Inputs.Draw.DrawManifoldOrCrossSectionOptions; - /** - * Creates draw options for babylon js nodes - * @param inputs option definition - * @returns options - * @group options - * @shortname babylon node - */ optionsBabylonNode(inputs: Inputs.Draw.DrawNodeOptions): Inputs.Draw.DrawNodeOptions; + createTexture(inputs: Inputs.Draw.GenericTextureDto): BABYLON.Texture; + createPBRMaterial(inputs: Inputs.Draw.GenericPBRMaterialDto): BABYLON.PBRMetallicRoughnessMaterial; + private getSamplingMode; private handleTags; private handleTag; private handleVerbSurfaces; @@ -32006,3894 +10420,67 @@ declare namespace Bit { private handleJscadMesh; private applyGlobalSettingsAndMetadataAndShadowCasting; } - declare namespace Base { - type Color = string; - type ColorRGB = { - r: number; - g: number; - b: number; - }; - type Material = any; - type Point2 = [number, number]; - type Vector2 = [number, number]; - type Point3 = [number, number, number]; - type Vector3 = [number, number, number]; - type Axis3 = { - origin: Base.Point3; - direction: Base.Vector3; - }; - type Axis2 = { - origin: Base.Point2; - direction: Base.Vector2; - }; - type Segment2 = [Point2, Point2]; - type Segment3 = [Point3, Point3]; - type TrianglePlane3 = { - normal: Vector3; - d: number; - }; - type Triangle3 = [Base.Point3, Base.Point3, Base.Point3]; - type Mesh3 = Triangle3[]; - type Plane3 = { - origin: Base.Point3; - normal: Base.Vector3; - direction: Base.Vector3; - }; - type BoundingBox = { - min: Base.Point3; - max: Base.Point3; - center?: Base.Point3; - width?: number; - height?: number; - length?: number; - }; - type Line2 = { - start: Base.Point2; - end: Base.Point2; - }; - type Line3 = { - start: Base.Point3; - end: Base.Point3; - }; - type Polyline3 = { - points: Base.Point3[]; - isClosed?: boolean; - color?: number[]; - }; - type Polyline2 = { - points: Base.Point2[]; - isClosed?: boolean; - color?: number[]; - }; - type TransformMatrix3x3 = [number, number, number, number, number, number, number, number, number]; - type TransformMatrixes3x3 = TransformMatrix3x3[]; - type TransformMatrix = [number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number]; - type TransformMatrixes = TransformMatrix[]; - enum horizontalAlignEnum { - /** - * Aligns to the left - */ - left = "left", - /** - * Aligns to the center - */ - center = "center", - /** - * Aligns to the right - */ - right = "right" - } - } declare namespace Color { - class HexDto { - constructor(color?: Base.Color); - /** - * Color hex - * @default #0000ff - */ - color: Base.Color; - } - class InvertHexDto { - constructor(color?: Base.Color); - /** - * Color hex - * @default #0000ff - */ - color: Base.Color; - /** - * Choose to invert the color to black and white (useful for text color) - */ - blackAndWhite: boolean; - } - class HexDtoMapped { - constructor(color?: Base.Color, from?: number, to?: number); - /** - * Color hex - * @default #0000ff - */ - color: Base.Color; - /** - * From min bound - * @default 0 - * @minimum -Infinity - * @maximum Infinity - * @step 1 - */ - from: number; - /** - * To max bound - * @default 255 - * @minimum -Infinity - * @maximum Infinity - * @step 1 - */ - to: number; - } - class RGBObjectMaxDto { - constructor(rgb?: Base.ColorRGB, max?: number); - /** - * Red value component - * @default undefined - */ - rgb: Base.ColorRGB; - /** - * Min value of the range - * @default 0 - * @minimum 0 - * @maximum 255 - * @step 0.1 - */ - min: number; - /** - * Max value, it would automatically be remapped to whatever is needed if lower comes in - * @default 255 - * @minimum 0 - * @maximum 255 - * @step 0.1 - */ - max: number; - } - class RGBMinMaxDto { - constructor(r?: number, g?: number, b?: number, min?: number, max?: number); - /** - * Red value component - * @default 255 - * @minimum 0 - * @maximum 255 - * @step 1 - */ - r: number; - /** - * Green value component - * @default 255 - * @minimum 0 - * @maximum 255 - * @step 1 - */ - g: number; - /** - * Blue value component - * @default 255 - * @minimum 0 - * @maximum 255 - * @step 1 - */ - b: number; - /** - * Min value of the range - * @default 0 - * @minimum 0 - * @maximum 255 - * @step 0.1 - */ - min: number; - /** - * Max value of the range - * @default 255 - * @minimum 0 - * @maximum 255 - * @step 0.1 - */ - max: number; - } - class RGBObjectDto { - constructor(rgb?: Base.ColorRGB); - /** - * Red value component - * @default undefined - */ - rgb: Base.ColorRGB; - } - } declare namespace Dates { - class DateDto { - constructor(date?: Date); - /** - * The date - * @default undefined - */ - date: Date; - } - class DateStringDto { - constructor(dateString?: string); - /** - * The date string - * @default undefined - */ - dateString: string; - } - class DateSecondsDto { - constructor(date?: Date, seconds?: number); - /** - * The date to update the seconds for - * @default undefined - */ - date: Date; - /** - * The seconds of the date - * @default 30 - * @minimum 0 - * @maximum Infinity - * @step 1 - */ - seconds: number; - } - class DateDayDto { - constructor(date?: Date, day?: number); - /** - * The date - * @default undefined - */ - date: Date; - /** - * The day of the date - * @default 1 - * @minimum 0 - * @maximum Infinity - * @step 1 - */ - day: number; - } - class DateYearDto { - constructor(date?: Date, year?: number); - /** - * The date - * @default undefined - */ - date: Date; - /** - * The year of the date - * @default 1 - * @minimum 0 - * @maximum Infinity - * @step 1 - */ - year: number; - } - class DateMonthDto { - constructor(date?: Date, month?: number); - /** - * The date - * @default undefined - */ - date: Date; - /** - * The month of the date - * @default 1 - * @minimum 0 - * @maximum Infinity - * @step 1 - */ - month: number; - } - class DateHoursDto { - constructor(date?: Date, hours?: number); - /** - * The date - * @default undefined - */ - date: Date; - /** - * The hours of the date - * @default 1 - * @minimum 0 - * @maximum Infinity - * @step 1 - */ - hours: number; - } - class DateMinutesDto { - constructor(date?: Date, minutes?: number); - /** - * The date - * @default undefined - */ - date: Date; - /** - * The minutes of the date - * @default 1 - * @minimum 0 - * @maximum Infinity - * @step 1 - */ - minutes: number; - } - class DateMillisecondsDto { - constructor(date?: Date, milliseconds?: number); - /** - * The date - * @default undefined - */ - date: Date; - /** - * The milliseconds of the date - * @default 1 - * @minimum 0 - * @maximum Infinity - * @step 1 - */ - milliseconds: number; - } - class DateTimeDto { - constructor(date?: Date, time?: number); - /** - * The date - * @default undefined - */ - date: Date; - /** - * The time of the date - * @default 1 - * @minimum 0 - * @maximum Infinity - * @step 1 - */ - time: number; - } - class CreateFromUnixTimeStampDto { - constructor(unixTimeStamp?: number); - /** - * The unix time stamp - * @default 1 - * @minimum 0 - * @maximum Infinity - * @step 1 - */ - unixTimeStamp: number; - } - class CreateDateDto { - constructor(year?: number, month?: number, day?: number, hours?: number, minutes?: number, seconds?: number, milliseconds?: number); - /** - * The year of the date - * @default 1 - * @minimum 0 - * @maximum Infinity - * @step 1 - */ - year: number; - /** - * The month of the date - * @default 1 - * @minimum 0 - * @maximum Infinity - * @step 1 - */ - month: number; - /** - * The day of the month - * @default 1 - * @minimum 0 - * @maximum Infinity - * @step 1 - */ - day: number; - /** - * The hours of the date - * @default 1 - * @minimum 0 - * @maximum Infinity - * @step 1 - */ - hours: number; - /** - * The minutes of the date - * @default 1 - * @minimum 0 - * @maximum Infinity - * @step 1 - */ - minutes: number; - /** - * The seconds of the date - * @default 1 - * @minimum 0 - * @maximum Infinity - * @step 1 - */ - seconds: number; - /** - * The milliseconds of the date - * @default 1 - * @minimum 0 - * @maximum Infinity - * @step 1 - */ - milliseconds: number; - } - } declare namespace Line { - class LinePointsDto { - /** - * Provide options without default values - */ - constructor(start?: Base.Point3, end?: Base.Point3); - /** - * Start point - * @default undefined - */ - start?: Base.Point3; - /** - * End point - * @default undefined - */ - end?: Base.Point3; - } - class LineStartEndPointsDto { - /** - * Provide options without default values - */ - constructor(startPoints?: Base.Point3[], endPoints?: Base.Point3[]); - /** - * Start points - * @default undefined - */ - startPoints: Base.Point3[]; - /** - * End points - * @default undefined - */ - endPoints: Base.Point3[]; - } - class DrawLineDto { - /** - * Provide options without default values - */ - constructor(line?: LinePointsDto, opacity?: number, colours?: string | string[], size?: number, updatable?: boolean, lineMesh?: T); - /** - * Line - * @default undefined - */ - line?: LinePointsDto; - /** - * Value between 0 and 1 - * @default 1 - * @minimum 0 - * @maximum 1 - * @step 0.1 - */ - opacity?: number; - /** - * Hex colour string - * @default #444444 - */ - colours?: string | string[]; - /** - * Width of the line - * @default 3 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ - size?: number; - /** - * Indicates wether the position of this line will change in time - * @default false - */ - updatable?: boolean; - /** - * Line mesh variable in case it already exists and needs updating - * @default undefined - */ - lineMesh?: T; - } - class DrawLinesDto { - /** - * Provide options without default values - */ - constructor(lines?: LinePointsDto[], opacity?: number, colours?: string | string[], size?: number, updatable?: boolean, linesMesh?: T); - /** - * Lines - * @default undefined - */ - lines?: LinePointsDto[]; - /** - * Value between 0 and 1 - * @default 1 - * @minimum 0 - * @maximum 1 - * @step 0.1 - */ - opacity?: number; - /** - * Hex colour string - * @default #444444 - */ - colours?: string | string[]; - /** - * Width of the line - * @default 3 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ - size?: number; - /** - * Indicates wether the position of these lines will change in time - * @default false - */ - updatable?: boolean; - /** - * Line mesh variable in case it already exists and needs updating - * @default undefined - */ - linesMesh?: T; - } - class PointsLinesDto { - constructor(points?: Base.Point3[]); - /** - * Points - * @default undefined - */ - points?: Base.Point3[]; - } - class LineDto { - constructor(line?: LinePointsDto); - /** - * Line to convert - * @default undefined - */ - line?: LinePointsDto; - } - class SegmentDto { - constructor(segment?: Base.Segment3); - /** - * Segment - * @default undefined - */ - segment?: Base.Segment3; - } - class SegmentsDto { - constructor(segments?: Base.Segment3[]); - /** - * Segments - * @default undefined - */ - segments?: Base.Segment3[]; - } - class LinesDto { - constructor(lines?: LinePointsDto[]); - /** - * Lines to convert - * @default undefined - */ - lines?: LinePointsDto[]; - } - class LineLineIntersectionDto { - constructor(line1?: LinePointsDto, line2?: LinePointsDto, tolerance?: number); - /** - * First line - * @default undefined - */ - line1?: LinePointsDto; - /** - * Second line - * @default undefined - */ - line2?: LinePointsDto; - /** - * Set to false if you want to check for infinite lines - * @default true - */ - checkSegmentsOnly?: boolean; - /** - * Tolerance for intersection - * @default 0.01 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ - tolerance?: number; - } - class PointOnLineDto { - constructor(line?: LinePointsDto, param?: number); - /** - * Line to get point on - * @default undefined - */ - line?: LinePointsDto; - /** - * Param to use for point on line - * @default 0.5 - * @minimum -Infinity - * @maximum Infinity - * @step 0.1 - */ - param?: number; - } - class TransformLineDto { - constructor(line?: LinePointsDto, transformation?: Base.TransformMatrixes); - /** - * Line to transform - * @default undefined - */ - line?: LinePointsDto; - /** - * Transformation matrix or a list of transformation matrixes - * @default undefined - */ - transformation?: Base.TransformMatrixes; - } - class TransformsLinesDto { - constructor(lines?: LinePointsDto[], transformation?: Base.TransformMatrixes[]); - /** - * Lines to transform - * @default undefined - */ - lines?: LinePointsDto[]; - /** - * Transformations matrix or a list of transformations matrixes - * @default undefined - */ - transformation?: Base.TransformMatrixes[]; - } - class TransformLinesDto { - constructor(lines?: LinePointsDto[], transformation?: Base.TransformMatrixes); - /** - * Lines to transform - * @default undefined - */ - lines?: LinePointsDto[]; - /** - * Transformation matrix or a list of transformation matrixes - * @default undefined - */ - transformation?: Base.TransformMatrixes; - } - } declare namespace Lists { - enum firstLastEnum { - first = "first", - last = "last" - } - class ListItemDto { - constructor(list?: T[], index?: number, clone?: boolean); - /** - * The list to interrogate - * @default undefined - */ - list: T[]; - /** - * Index of the item in the list - 0 means first. - * @default 0 - * @minimum 0 - * @maximum Infinity - * @step 1 - */ - index: number; - /** - * Tries to make structured clone of the incoming list data in the component, sometimes it may not be possible due to circular structures or other types of error - * @default true - */ - clone?: boolean; - } - class SubListDto { - constructor(list?: T[], indexStart?: number, indexEnd?: number, clone?: boolean); - /** - * The list to split into a sublist - * @default undefined - */ - list: T[]; - /** - * Index from which to start the sublist - 0 means first. - * @default 0 - * @minimum 0 - * @maximum Infinity - * @step 1 - */ - indexStart: number; - /** - * Index to which to end the sublist - 0 means first. - * @default 1 - * @minimum 0 - * @maximum Infinity - * @step 1 - */ - indexEnd: number; - /** - * Tries to clone the data in the component, sometimes it may not be possible if structure is circular - * @default true - */ - clone?: boolean; - } - class ListCloneDto { - constructor(list?: T[], clone?: boolean); - /** - * The list to interrogate - * @default undefined - */ - list: T[]; - /** - * Tries to make structured clone of the incoming list data in the component, sometimes it may not be possible due to circular structures or other types of error - * @default true - */ - clone?: boolean; - } - class RepeatInPatternDto { - constructor(list?: T[]); - /** - * The list to interrogate - * @default undefined - */ - list: T[]; - /** - * Tries to make structured clone of the incoming list data in the component, sometimes it may not be possible due to circular structures or other types of error - * @default true - */ - clone?: boolean; - /** - * The limit of the length of the list - * @default 100 - * @minimum 1 - * @maximum Infinity - * @step 1 - */ - lengthLimit: number; - } - class SortDto { - constructor(list?: T[], clone?: boolean, orderAsc?: boolean); - /** - * The list to interrogate - * @default undefined - */ - list: T[]; - /** - * Tries to make structured clone of the incoming list data in the component, sometimes it may not be possible due to circular structures or other types of error - * @default true - */ - clone?: boolean; - /** - * If true, the list will be sorted in ascending order, otherwise in descending order - * @default true - */ - orderAsc: boolean; - } - class SortJsonDto { - constructor(list?: T[], clone?: boolean, orderAsc?: boolean); - /** - * The list to interrogate - * @default undefined - */ - list: T[]; - /** - * Tries to make structured clone of the incoming list data in the component, sometimes it may not be possible due to circular structures or other types of error - * @default true - */ - clone?: boolean; - /** - * If true, the list will be sorted in ascending order, otherwise in descending order - * @default true - */ - orderAsc: boolean; - /** - * The property to sort by - * @default propName - */ - property: string; - } - class ListDto { - constructor(list?: T[]); - /** - * The list - * @default undefined - */ - list: T[]; - } - class GroupListDto { - constructor(list?: T[], nrElements?: number, keepRemainder?: boolean); - /** - * The list of elements to group together - * @default undefined - */ - list: T[]; - /** - * The number of elements in each group - * @default 2 - * @minimum 1 - * @maximum Infinity - * @step 1 - */ - nrElements: number; - /** - * If true, the remainder of the list will be added as a separate group - * @default false - */ - keepRemainder: boolean; - } - class MultiplyItemDto { - constructor(item?: T, times?: number); - /** - * The item to multiply - * @default undefined - */ - item: T; - /** - * Times to multiply - * @default 10 - * @minimum 0 - * @maximum Infinity - * @step 1 - */ - times: number; - } - class AddItemAtIndexDto { - constructor(list?: T[], item?: T, index?: number, clone?: boolean); - /** - * The list to which item needs to be added - * @default undefined - */ - list: T[]; - /** - * The item to add - * @default undefined - */ - item: T; - /** - * The index to add the item at - * @default 0 - * @minimum 0 - * @maximum Infinity - * @step 1 - */ - index: number; - /** - * Tries to make structured clone of the incoming list data in the component, sometimes it may not be possible due to circular structures or other types of error - * @default true - */ - clone?: boolean; - } - class AddItemAtIndexesDto { - constructor(list?: T[], item?: T, indexes?: number[], clone?: boolean); - /** - * The list to which item needs to be added - * @default undefined - */ - list: T[]; - /** - * The item to add - * @default undefined - */ - item: T; - /** - * The index to add the item at - * @default [0] - */ - indexes: number[]; - /** - * Tries to make structured clone of the incoming list data in the component, sometimes it may not be possible due to circular structures or other types of error - * @default true - */ - clone?: boolean; - } - class AddItemsAtIndexesDto { - constructor(list?: T[], items?: T[], indexes?: number[], clone?: boolean); - /** - * The list to which item needs to be added - * @default undefined - */ - list: T[]; - /** - * The item to add - * @default undefined - */ - items: T[]; - /** - * The index to add the item at - * @default [0] - */ - indexes: number[]; - /** - * Tries to make structured clone of the incoming list data in the component, sometimes it may not be possible due to circular structures or other types of error - * @default true - */ - clone?: boolean; - } - class RemoveItemAtIndexDto { - constructor(list?: T[], index?: number, clone?: boolean); - /** - * The list from which item needs to be removed - * @default undefined - */ - list: T[]; - /** - * The index to on which remove item - * @default 0 - * @minimum 0 - * @maximum Infinity - * @step 1 - */ - index: number; - /** - * Tries to make structured clone of the incoming list data in the component, sometimes it may not be possible due to circular structures or other types of error - * @default true - */ - clone?: boolean; - } - class RemoveItemsAtIndexesDto { - constructor(list?: T[], indexes?: number[], clone?: boolean); - /** - * The list from which item needs to be removed - * @default undefined - */ - list: T[]; - /** - * The indexes that should be removed - * @default undefined - */ - indexes: number[]; - /** - * Tries to make structured clone of the incoming list data in the component, sometimes it may not be possible due to circular structures or other types of error - * @default true - */ - clone?: boolean; - } - class RemoveNthItemDto { - constructor(list?: T[], nth?: number, offset?: number, clone?: boolean); - /** - * The list from which item needs to be removed - * @default undefined - */ - list: T[]; - /** - * The nth item to remove - * @default 2 - * @minimum 1 - * @maximum Infinity - * @step 1 - */ - nth: number; - /** - * The offset from which to start counting - * @default 0 - * @minimum 0 - * @maximum Infinity - * @step 1 - */ - offset: number; - /** - * Tries to make structured clone of the incoming list data in the component, sometimes it may not be possible due to circular structures or other types of error - * @default true - */ - clone?: boolean; - } - class RandomThresholdDto { - constructor(list?: T[], threshold?: number, clone?: boolean); - /** - * The list from which item needs to be updated - * @default undefined - */ - list: T[]; - /** - * Threshold for items - * @default 0.5 - * @minimum 0 - * @maximum 1 - * @step 1 - */ - threshold: number; - /** - * Tries to make structured clone of the incoming list data in the component, sometimes it may not be possible due to circular structures or other types of error - * @default true - */ - clone?: boolean; - } - class RemoveDuplicatesDto { - constructor(list?: T[], clone?: boolean); - /** - * The list from which item needs to be removed - * @default undefined - */ - list: T[]; - /** - * Tries to make structured clone of the incoming list data in the component, sometimes it may not be possible due to circular structures or other types of error - * @default true - */ - clone?: boolean; - } - class RemoveDuplicatesToleranceDto { - constructor(list?: T[], clone?: boolean, tolerance?: number); - /** - * The list from which item needs to be removed - * @default undefined - */ - list: T[]; - /** - * The tolerance to apply - * @default 1e-7 - * @minimum 0 - * @maximum Infinity - * @step 1e-7 - */ - tolerance: number; - /** - * Tries to make structured clone of the incoming list data in the component, sometimes it may not be possible due to circular structures or other types of error - * @default true - */ - clone?: boolean; - } - class GetByPatternDto { - constructor(list?: T[], pattern?: boolean[]); - /** - * The list from which we need to get an item - * @default undefined - */ - list: T[]; - /** - * The list of booleans to be used as a pattern (true means get, false means skip) - * @default [true, true, false] - */ - pattern: boolean[]; - } - class GetNthItemDto { - constructor(list?: T[], nth?: number, offset?: number, clone?: boolean); - /** - * The list from which we need to get an item - * @default undefined - */ - list: T[]; - /** - * The nth item to get - * @default 2 - * @minimum 1 - * @maximum Infinity - * @step 1 - */ - nth: number; - /** - * The offset from which to start counting - * @default 0 - * @minimum 0 - * @maximum Infinity - * @step 1 - */ - offset: number; - /** - * Tries to make structured clone of the incoming list data in the component, sometimes it may not be possible due to circular structures or other types of error - * @default true - */ - clone?: boolean; - } - class GetLongestListLength { - constructor(lists?: T[]); - /** - * The list from which we need to get an item - * @default undefined - */ - lists: T[]; - } - class MergeElementsOfLists { - constructor(lists?: T[], level?: number); - /** - * The list from which we need to get an item - * @default undefined - */ - lists: T[]; - /** - * The level on which to merge the elements. 0 means first level - * @default 0 - * @minimum 0 - * @maximum Infinity - * @step 1 - */ - level: number; - } - class AddItemDto { - constructor(list?: T[], item?: T, clone?: boolean); - /** - * The list to which item needs to be added - * @default undefined - */ - list: T[]; - /** - * The item to add - * @default undefined - */ - item: T; - /** - * Tries to make structured clone of the incoming list data in the component, sometimes it may not be possible due to circular structures or other types of error - * @default true - */ - clone?: boolean; - } - class AddItemFirstLastDto { - constructor(list?: T[], item?: T, position?: firstLastEnum, clone?: boolean); - /** - * The list to which item needs to be added - * @default undefined - */ - list: T[]; - /** - * The item to add - * @default undefined - */ - item: T; - /** - * The option if the item needs to be added at the beginning or the end of the list - * @default last - */ - position: firstLastEnum; - /** - * Tries to make structured clone of the incoming list data in the component, sometimes it may not be possible due to circular structures or other types of error - * @default true - */ - clone?: boolean; - } - } declare namespace Logic { - enum BooleanOperatorsEnum { - less = "<", - lessOrEqual = "<=", - greater = ">", - greaterOrEqual = ">=", - tripleEqual = "===", - tripleNotEqual = "!==", - equal = "==", - notEqual = "!=" - } - class ComparisonDto { - constructor(first?: T, second?: T, operator?: BooleanOperatorsEnum); - /** - * First item - * @default undefined - */ - first: T; - /** - * Second item - * @default undefined - */ - second: T; - /** - * Operator - * @default less - */ - operator: BooleanOperatorsEnum; - } - class BooleanDto { - constructor(boolean?: boolean); - /** - * Boolean value - * @default false - */ - boolean: boolean; - } - class BooleanListDto { - constructor(booleans?: boolean); - /** - * Boolean value - * @default undefined - */ - booleans: any; - } - class ValueGateDto { - constructor(value?: T, boolean?: boolean); - /** - * Value to transmit when gate will be released. When value is not released we will transmit undefined value - * @default undefined - */ - value: T; - /** - * Boolean value to release the gate - * @default false - */ - boolean: boolean; - } - class TwoValueGateDto { - constructor(value1?: T, value2?: U); - /** - * First value to check - * @default undefined - * @optional true - */ - value1?: T; - /** - * Second value to check - * @default undefined - * @optional true - */ - value2?: U; - } - class RandomBooleansDto { - constructor(length?: number); - /** - * Length of the list - * @default 10 - * @minimum 1 - * @maximum Infinity - * @step 1 - */ - length: number; - /** - * Threshold for true value between 0 and 1. The closer the value is to 1 the more true values there will be in the list. - * @default 0.5 - * @minimum 0 - * @maximum 1 - * @step 0.1 - */ - trueThreshold: number; - } - class TwoThresholdRandomGradientDto { - /** - * Numbers to remap to bools - * @default undefined - */ - numbers: number[]; - /** - * Threshold for the numeric value until which the output will be true - * @default 1 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ - thresholdTotalTrue: number; - /** - * Threshold for the numeric value until which the output will be true - * @default 2 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ - thresholdTotalFalse: number; - /** - * Number of levels to go through in between thresholds for gradient - * @default 10 - * @minimum 0 - * @maximum Infinity - * @step 1 - */ - nrLevels: number; - } - class ThresholdBooleanListDto { - /** - * Numbers to remap to bools based on threshold - * @default undefined - */ - numbers: number[]; - /** - * Threshold for the numeric value until which the output will be true. - * If number in the list is larger than this threshold it will become false if inverse stays false. - * @default 1 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ - threshold: number; - /** - * True values become false and false values become true - * @default false - */ - inverse: boolean; - } - class ThresholdGapsBooleanListDto { - /** - * Numbers to remap to bools based on threshold - * @default undefined - */ - numbers: number[]; - /** - * 2D arrays representing gaps of the thresholds on which numbers should be flipped from false to true if inverse is false. - * @default undefined - */ - gapThresholds: Base.Vector2[]; - /** - * True values become false and false values become true - * @default false - */ - inverse: boolean; - } - } declare namespace Math { - enum mathTwoNrOperatorEnum { - add = "add", - subtract = "subtract", - multiply = "multiply", - divide = "divide", - power = "power", - modulus = "modulus" - } - enum mathOneNrOperatorEnum { - absolute = "absolute", - negate = "negate", - ln = "ln", - log10 = "log10", - tenPow = "tenPow", - round = "round", - floor = "floor", - ceil = "ceil", - sqrt = "sqrt", - sin = "sin", - cos = "cos", - tan = "tan", - asin = "asin", - acos = "acos", - atan = "atan", - log = "log", - exp = "exp", - radToDeg = "radToDeg", - degToRad = "degToRad" - } - enum easeEnum { - easeInSine = "easeInSine", - easeOutSine = "easeOutSine", - easeInOutSine = "easeInOutSine", - easeInQuad = "easeInQuad", - easeOutQuad = "easeOutQuad", - easeInOutQuad = "easeInOutQuad", - easeInCubic = "easeInCubic", - easeOutCubic = "easeOutCubic", - easeInOutCubic = "easeInOutCubic", - easeInQuart = "easeInQuart", - easeOutQuart = "easeOutQuart", - easeInOutQuart = "easeInOutQuart", - easeInQuint = "easeInQuint", - easeOutQuint = "easeOutQuint", - easeInOutQuint = "easeInOutQuint", - easeInExpo = "easeInExpo", - easeOutExpo = "easeOutExpo", - easeInOutExpo = "easeInOutExpo", - easeInCirc = "easeInCirc", - easeOutCirc = "easeOutCirc", - easeInOutCirc = "easeInOutCirc", - easeInElastic = "easeInElastic", - easeOutElastic = "easeOutElastic", - easeInOutElastic = "easeInOutElastic", - easeInBack = "easeInBack", - easeOutBack = "easeOutBack", - easeInOutBack = "easeInOutBack", - easeInBounce = "easeInBounce", - easeOutBounce = "easeOutBounce", - easeInOutBounce = "easeInOutBounce" - } - class ModulusDto { - constructor(number?: number, modulus?: number); - /** - * Number - * @default 1 - * @minimum -Infinity - * @maximum Infinity - * @step 0.1 - */ - number: number; - /** - * Modulus - * @default 1 - * @minimum -Infinity - * @maximum Infinity - * @step 0.1 - */ - modulus: number; - } - class NumberDto { - constructor(number?: number); - /** - * Number - * @default 1 - * @minimum -Infinity - * @maximum Infinity - * @step 0.1 - */ - number: number; - } - class EaseDto { - constructor(x?: number); - /** - * X value param between 0-1 - * @default 0.5 - * @minimum 0 - * @maximum 1 - * @step 0.1 - */ - x: number; - /** - * Minimum value - * @default 0 - * @minimum -Infinity - * @maximum Infinity - * @step 0.1 - */ - min: number; - /** - * Maximum value - * @default 1 - * @minimum -Infinity - * @maximum Infinity - * @step 0.1 - */ - max: number; - /** - * Ease function - * @default easeInSine - */ - ease: easeEnum; - } - class RoundToDecimalsDto { - constructor(number?: number, decimalPlaces?: number); - /** - * Number to round - * @default 1.123456 - * @minimum -Infinity - * @maximum Infinity - * @step 0.1 - */ - number: number; - /** - * Number of decimal places - * @default 2 - * @minimum -Infinity - * @maximum Infinity - * @step 1 - */ - decimalPlaces: number; - } - class ActionOnTwoNumbersDto { - constructor(first?: number, second?: number, operation?: mathTwoNrOperatorEnum); - /** - * First number - * @default 1 - * @minimum -Infinity - * @maximum Infinity - * @step 0.1 - */ - first: number; - /** - * Second number - * @default 1 - * @minimum -Infinity - * @maximum Infinity - * @step 0.1 - */ - second: number; - /** - * Point - * @default add - */ - operation: mathTwoNrOperatorEnum; - } - class TwoNumbersDto { - constructor(first?: number, second?: number); - /** - * First number - * @default 1 - * @minimum -Infinity - * @maximum Infinity - * @step 0.1 - */ - first: number; - /** - * Second number - * @default 2 - * @minimum -Infinity - * @maximum Infinity - * @step 0.1 - */ - second: number; - } - class ActionOnOneNumberDto { - constructor(number?: number, operation?: mathOneNrOperatorEnum); - /** - * First number - * @default 1 - * @minimum -Infinity - * @maximum Infinity - * @step 0.1 - */ - number: number; - /** - * Point - * @default absolute - */ - operation: mathOneNrOperatorEnum; - } - class RemapNumberDto { - constructor(number?: number, fromLow?: number, fromHigh?: number, toLow?: number, toHigh?: number); - /** - * Number to remap - * @default 0.5 - * @minimum -Infinity - * @maximum Infinity - * @step 0.1 - */ - number: number; - /** - * First number range min - * @default 0 - * @minimum -Infinity - * @maximum Infinity - * @step 0.1 - */ - fromLow: number; - /** - * Map to range min - * @default 1 - * @minimum -Infinity - * @maximum Infinity - * @step 0.1 - */ - fromHigh: number; - /** - * First number range max - * @default 1 - * @minimum -Infinity - * @maximum Infinity - * @step 0.1 - */ - toLow: number; - /** - * Map to range max - * @default 2 - * @minimum -Infinity - * @maximum Infinity - * @step 0.1 - */ - toHigh: number; - } - class RandomNumberDto { - constructor(low?: number, high?: number); - /** - * Low range of random value - * @default 0 - * @minimum -Infinity - * @maximum Infinity - * @step 0.1 - */ - low: number; - /** - * High range of random value - * @default 1 - * @minimum -Infinity - * @maximum Infinity - * @step 0.1 - */ - high: number; - } - class RandomNumbersDto { - constructor(low?: number, high?: number, count?: number); - /** - * Low range of random value - * @default 0 - * @minimum -Infinity - * @maximum Infinity - * @step 0.1 - */ - low: number; - /** - * High range of random value - * @default 1 - * @minimum -Infinity - * @maximum Infinity - * @step 0.1 - */ - high: number; - /** - * Number of produced random values - * @default 10 - * @minimum -Infinity - * @maximum Infinity - * @step 1 - */ - count: number; - } - class ToFixedDto { - constructor(number?: number, decimalPlaces?: number); - /** - * Number to round - * @default undefined - * @minimum -Infinity - * @maximum Infinity - * @step 0.1 - */ - number: number; - /** - * Number of decimal places - * @default 2 - * @minimum -Infinity - * @maximum Infinity - * @step 1 - */ - decimalPlaces: number; - } - } declare namespace Mesh { - class SignedDistanceFromPlaneToPointDto { - constructor(point?: Base.Point3, plane?: Base.TrianglePlane3); - /** - * Point from which to find the distance - * @default undefined - */ - point?: Base.Point3; - /** - * Triangle plane to which the distance is calculated - * @default undefined - */ - plane?: Base.TrianglePlane3; - } - class TriangleDto { - constructor(triangle?: Base.Triangle3); - /** - * Triangle to be used - * @default undefined - */ - triangle?: Base.Triangle3; - } - class TriangleToleranceDto { - constructor(triangle?: Base.Triangle3); - /** - * Triangle to be used - * @default undefined - */ - triangle?: Base.Triangle3; - /** - * Tolerance for the calculation - * @default 1e-7 - * @minimum -Infinity - * @maximum Infinity - * @step 1e-7 - */ - tolerance?: number; - } - class TriangleTriangleToleranceDto { - constructor(triangle1?: Base.Triangle3, triangle2?: Base.Triangle3, tolerance?: number); - /** - * First triangle - * @default undefined - */ - triangle1?: Base.Triangle3; - /** - * Second triangle - * @default undefined - */ - triangle2?: Base.Triangle3; - /** - * Tolerance for the calculation - * @default 1e-7 - * @minimum -Infinity - * @maximum Infinity - * @step 1e-7 - */ - tolerance?: number; - } - class MeshMeshToleranceDto { - constructor(mesh1?: Base.Mesh3, mesh2?: Base.Mesh3, tolerance?: number); - /** - * First mesh - * @default undefined - */ - mesh1?: Base.Mesh3; - /** - * Second mesh - * @default undefined - */ - mesh2?: Base.Mesh3; - /** - * Tolerance for the calculation - * @default 1e-7 - * @minimum -Infinity - * @maximum Infinity - * @step 1e-7 - */ - tolerance?: number; - } - } declare namespace Point { - class PointDto { - constructor(point?: Base.Point3); - /** - * Point - * @default undefined - */ - point: Base.Point3; - } - class PointXYZDto { - constructor(x?: number, y?: number, z?: number); - /** - * Point - * @default 0 - * @minimum -Infinity - * @maximum Infinity - * @step 0.1 - */ - x: number; - /** - * Point - * @default 0 - * @minimum -Infinity - * @maximum Infinity - * @step 0.1 - */ - y: number; - /** - * Point - * @default 0 - * @minimum -Infinity - * @maximum Infinity - * @step 0.1 - */ - z: number; - } - class PointXYDto { - constructor(x?: number, y?: number); - /** - * Point - * @default 0 - * @minimum -Infinity - * @maximum Infinity - * @step 0.1 - */ - x: number; - /** - * Point - * @default 0 - * @minimum -Infinity - * @maximum Infinity - * @step 0.1 - */ - y: number; - } - class PointsDto { - constructor(points?: Base.Point3[]); - /** - * Points - * @default undefined - */ - points: Base.Point3[]; - } - class TwoPointsDto { - constructor(point1?: Base.Point3, point2?: Base.Point3); - /** - * Point 1 - * @default undefined - */ - point1: Base.Point3; - /** - * Point 2 - * @default undefined - */ - point2: Base.Point3; - } - class DrawPointDto { - /** - * Provide options without default values - */ - constructor(point?: Base.Point3, opacity?: number, size?: number, colours?: string | string[], updatable?: boolean, pointMesh?: T); - /** - * Point - * @default undefined - */ - point: Base.Point3; - /** - * Value between 0 and 1 - * @default 1 - * @minimum 0 - * @maximum 1 - * @step 0.1 - */ - opacity: number; - /** - * Size of the point - * @default 3 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ - size: number; - /** - * Hex colour string - * @default #444444 - */ - colours: string | string[]; - /** - * Indicates wether the position of this point will change in time - * @default false - */ - updatable: boolean; - /** - * Point mesh variable in case it already exists and needs updating - * @default undefined - */ - pointMesh?: T; - } - class DrawPointsDto { - /** - * Provide options without default values - */ - constructor(points?: Base.Point3[], opacity?: number, size?: number, colours?: string | string[], updatable?: boolean, pointsMesh?: T); - /** - * Point - * @default undefined - */ - points: Base.Point3[]; - /** - * Value between 0 and 1 - * @default 1 - * @minimum 0 - * @maximum 1 - * @step 0.1 - */ - opacity: number; - /** - * Size of the points - * @default 0.1 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ - size: number; - /** - * Hex colour string or collection of strings - * @default #444444 - */ - colours: string | string[]; - /** - * Indicates wether the position of this point will change in time - * @default false - */ - updatable: boolean; - /** - * Points mesh variable in case it already exists and needs updating - * @default undefined - */ - pointsMesh?: T; - } - class TransformPointDto { - constructor(point?: Base.Point3, transformation?: Base.TransformMatrixes); - /** - * Point to transform - * @default undefined - */ - point: Base.Point3; - /** - * Transformation matrix or a list of transformation matrixes - * @default undefined - */ - transformation: Base.TransformMatrixes; - } - class TransformPointsDto { - constructor(points?: Base.Point3[], transformation?: Base.TransformMatrixes); - /** - * Points to transform - * @default undefined - */ - points: Base.Point3[]; - /** - * Transformation matrix or a list of transformation matrixes - * @default undefined - */ - transformation: Base.TransformMatrixes; - } - class TranslatePointsWithVectorsDto { - constructor(points?: Base.Point3[], translations?: Base.Vector3[]); - /** - * Points to transform - * @default undefined - */ - points: Base.Point3[]; - /** - * Translation vectors for each point - * @default undefined - */ - translations: Base.Vector3[]; - } - class TranslatePointsDto { - constructor(points?: Base.Point3[], translation?: Base.Vector3); - /** - * Points to transform - * @default undefined - */ - points: Base.Point3[]; - /** - * Translation vector with x, y and z values - * @default undefined - */ - translation: Base.Vector3; - } - class TranslateXYZPointsDto { - constructor(points?: Base.Point3[], x?: number, y?: number, z?: number); - /** - * Points to transform - * @default undefined - */ - points: Base.Point3[]; - /** - * X vector value - * @default 0 - */ - x: number; - /** - * Y vector value - * @default 1 - */ - y: number; - /** - * Z vector value - * @default 0 - */ - z: number; - } - class ScalePointsCenterXYZDto { - constructor(points?: Base.Point3[], center?: Base.Point3, scaleXyz?: Base.Vector3); - /** - * Points to transform - * @default undefined - */ - points: Base.Point3[]; - /** - * The center from which the scaling is applied - * @default [0, 0, 0] - */ - center: Base.Point3; - /** - * Scaling factors for each axis [1, 2, 1] means that Y axis will be scaled 200% and both x and z axis will remain on 100% - * @default [1, 1, 1] - */ - scaleXyz: Base.Vector3; - } - class StretchPointsDirFromCenterDto { - constructor(points?: Base.Point3[], center?: Base.Point3, direction?: Base.Vector3, scale?: number); - /** - * Points to transform - * @default undefined - */ - points?: Base.Point3[]; - /** - * The center from which the scaling is applied - * @default [0, 0, 0] - */ - center?: Base.Point3; - /** - * Stretch direction vector - * @default [0, 0, 1] - */ - direction?: Base.Vector3; - /** - * The scale factor to apply along the direction vector. 1.0 means no change. - * @default 2 - * @minimum -Infinity - * @maximum Infinity - * @step 0.1 - */ - scale?: number; - } - class RotatePointsCenterAxisDto { - constructor(points?: Base.Point3[], angle?: number, axis?: Base.Vector3, center?: Base.Point3); - /** - * Points to transform - * @default undefined - */ - points: Base.Point3[]; - /** - * Angle of rotation in degrees - * @default 90 - * @minimum -Infinity - * @maximum Infinity - * @step 1 - */ - angle: number; - /** - * Axis vector for rotation - * @default [0, 1, 0] - */ - axis: Base.Vector3; - /** - * The center from which the axis is pointing - * @default [0, 0, 0] - */ - center: Base.Point3; - } - class TransformsForPointsDto { - constructor(points?: Base.Point3[], transformation?: Base.TransformMatrixes[]); - /** - * Points to transform - * @default undefined - */ - points: Base.Point3[]; - /** - * Transformations that have to match nr of points - * @default undefined - */ - transformation: Base.TransformMatrixes[]; - } - class ThreePointsNormalDto { - constructor(point1?: Base.Point3, point2?: Base.Point3, point3?: Base.Point3, reverseNormal?: boolean); - /** - * Point 1 - * @default undefined - */ - point1: Base.Point3; - /** - * Point 2 - * @default undefined - */ - point2: Base.Point3; - /** - * Point 3 - * @default undefined - */ - point3: Base.Point3; - /** - * Reverse normal direction - * @default false - */ - reverseNormal: boolean; - } - class ThreePointsToleranceDto { - constructor(start?: Base.Point3, center?: Base.Point3, end?: Base.Point3, tolerance?: number); - /** - * Start point - * @default undefined - */ - start?: Base.Point3; - /** - * Center point - * @default undefined - */ - center?: Base.Point3; - /** - * End point - * @default undefined - */ - end?: Base.Point3; - /** - * Tolerance for the calculation - * @default 1e-7 - * @minimum -Infinity - * @maximum Infinity - * @step 1e-7 - */ - tolerance: number; - } - class PointsMaxFilletsHalfLineDto { - constructor(points?: Base.Point3[], checkLastWithFirst?: boolean, tolerance?: number); - /** - * Points to transform - * @default undefined - */ - points?: Base.Point3[]; - /** - * Check first and last point for duplicates - * @default false - */ - checkLastWithFirst?: boolean; - /** - * Tolerance for the calculation - * @default 1e-7 - * @minimum -Infinity - * @maximum Infinity - * @step 1e-7 - */ - tolerance?: number; - } - class RemoveConsecutiveDuplicatesDto { - constructor(points?: Base.Point3[], tolerance?: number, checkFirstAndLast?: boolean); - /** - * Points to transform - * @default undefined - */ - points: Base.Point3[]; - /** - * Tolerance for removing duplicates - * @default 1e-7 - * @minimum 0 - * @maximum Infinity - * @step 1e-7 - */ - tolerance: number; - /** - * Check first and last point for duplicates - */ - checkFirstAndLast: boolean; - } - class ClosestPointFromPointsDto { - constructor(points?: Base.Point3[], point?: Base.Point3); - /** - * Points to transform - * @default undefined - */ - points: Base.Point3[]; - /** - * Transformation matrix or a list of transformation matrixes - * @default undefined - */ - point: Base.Point3; - } - class TwoPointsToleranceDto { - constructor(point1?: Base.Point3, point2?: Base.Point3, tolerance?: number); - /** - * First point to compare - * @default undefined - */ - point1?: Base.Point3; - /** - * Second point to compare - * @default undefined - */ - point2?: Base.Point3; - /** - * Tolerance for the calculation - * @default 1e-7 - * @minimum -Infinity - * @maximum Infinity - * @step 1e-7 - */ - tolerance?: number; - } - class StartEndPointsDto { - constructor(startPoint?: Base.Point3, endPoint?: Base.Point3); - /** - * Start point - * @default undefined - */ - startPoint: Base.Point3; - /** - * End point - * @default undefined - */ - endPoint: Base.Point3; - } - class StartEndPointsListDto { - constructor(startPoint?: Base.Point3, endPoints?: Base.Point3[]); - /** - * Start point - * @default undefined - */ - startPoint: Base.Point3; - /** - * End point - * @default undefined - */ - endPoints: Base.Point3[]; - } - class MultiplyPointDto { - constructor(point?: Base.Point3, amountOfPoints?: number); - /** - * Point for multiplication - * @default undefined - */ - point: Base.Point3; - /** - * Number of points to create in the list - * @default undefined - */ - amountOfPoints: number; - } - class SpiralDto { - constructor(radius?: number, numberPoints?: number, widening?: number, factor?: number, phi?: number); - /** - * Identifies phi angle - * @default 0.9 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ - phi: number; - /** - * Identifies how many points will be created - * @default 200 - * @minimum 0 - * @maximum Infinity - * @step 10 - */ - numberPoints: number; - /** - * Widening factor of the spiral - * @default 3 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ - widening: number; - /** - * Radius of the spiral - * @default 6 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ - radius: number; - /** - * Factor of the spiral - * @default 1 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ - factor: number; - } - class HexGridScaledToFitDto { - constructor(wdith?: number, height?: number, nrHexagonsU?: number, nrHexagonsV?: number, centerGrid?: boolean, pointsOnGround?: boolean); - /** Total desired width for the grid area. The hexagon size will be derived from this and nrHexagonsU. - * @default 10 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ - width?: number; - /** Total desired height for the grid area. Note: due to hexagon geometry, the actual grid height might differ slightly if maintaining regular hexagons based on width. - * @default 10 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ - height?: number; - /** Number of hexagons desired in width. - * @default 10 - * @minimum 0 - * @maximum Infinity - * @step 1 - */ - nrHexagonsInWidth?: number; - /** Number of hexagons desired in height. - * @default 10 - * @minimum 0 - * @maximum Infinity - * @step 1 - */ - nrHexagonsInHeight?: number; - /** If true, the hexagons will be oriented with their flat sides facing up and down. - * @default false - */ - flatTop?: boolean; - /** If true, shift the entire grid up by half hex height. - * @default false - */ - extendTop?: boolean; - /** If true, shift the entire grid down by half hex height. - * @default false - */ - extendBottom?: boolean; - /** If true, shift the entire grid left by half hex width. - * @default false - */ - extendLeft?: boolean; - /** If true, shift the entire grid right by half hex width. - * @default false - */ - extendRight?: boolean; - /** If true, the grid center (based on totalWidth/totalHeight) will be at [0,0,0]. - * @default false - */ - centerGrid?: boolean; - /** If true, swaps Y and Z coordinates and sets Y to 0, placing points on the XZ ground plane. - * @default false - */ - pointsOnGround?: boolean; - } - class HexGridCentersDto { - constructor(nrHexagonsX?: number, nrHexagonsY?: number, radiusHexagon?: number, orientOnCenter?: boolean, pointsOnGround?: boolean); - /** - * Number of hexagons on Y direction - * @default 21 - * @minimum 0 - * @maximum Infinity - * @step 1 - */ - nrHexagonsY: number; - /** - * Number of Hexagons on Z direction - * @default 21 - * @minimum 0 - * @maximum Infinity - * @step 1 - */ - nrHexagonsX: number; - /** - * radius of a single hexagon - * @default 0.2 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ - radiusHexagon: number; - /** - * Orient hexagon points grid on center - * @default false - */ - orientOnCenter: boolean; - /** - * Orient points on the ground - * @default false - */ - pointsOnGround: boolean; - } - } declare namespace Polyline { - class PolylineCreateDto { - /** - * Provide options without default values - */ - constructor(points?: Base.Point3[], isClosed?: boolean); - /** - * Points of the polyline - * @default undefined - */ - points?: Base.Point3[]; - /** - * Can contain is closed information - * @default false - */ - isClosed?: boolean; - } - class PolylinePropertiesDto { - /** - * Provide options without default values - */ - constructor(points?: Base.Point3[], isClosed?: boolean); - /** - * Points of the polyline - * @default undefined - */ - points?: Base.Point3[]; - /** - * Can contain is closed information - * @default false - */ - isClosed?: boolean; - /** - * Optional polyline color - * @default #444444 - */ - color?: string | number[]; - } - class PolylineDto { - constructor(polyline?: PolylinePropertiesDto); - /** - * Polyline with points - * @default undefined - */ - polyline?: PolylinePropertiesDto; - } - class PolylinesDto { - constructor(polylines?: PolylinePropertiesDto[]); - /** - * Polylines array - * @default undefined - */ - polylines?: PolylinePropertiesDto[]; - } - class TransformPolylineDto { - constructor(polyline?: PolylinePropertiesDto, transformation?: Base.TransformMatrixes); - /** - * Polyline to transform - * @default undefined - */ - polyline?: PolylinePropertiesDto; - /** - * Transformation matrix or a list of transformation matrixes - * @default undefined - */ - transformation?: Base.TransformMatrixes; - } - class DrawPolylineDto { - /** - * Provide options without default values - */ - constructor(polyline?: PolylinePropertiesDto, opacity?: number, colours?: string | string[], size?: number, updatable?: boolean, polylineMesh?: T); - /** - * Polyline - * @default undefined - */ - polyline?: PolylinePropertiesDto; - /** - * Value between 0 and 1 - * @default 1 - * @minimum 0 - * @maximum 1 - * @step 0.1 - */ - opacity?: number; - /** - * Hex colour string - * @default #444444 - */ - colours?: string | string[]; - /** - * Width of the polyline - * @default 3 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ - size?: number; - /** - * Indicates wether the position of this polyline will change in time - * @default false - */ - updatable?: boolean; - /** - * Line mesh variable in case it already exists and needs updating - * @default undefined - */ - polylineMesh?: T; - } - class DrawPolylinesDto { - /** - * Provide options without default values - */ - constructor(polylines?: PolylinePropertiesDto[], opacity?: number, colours?: string | string[], size?: number, updatable?: boolean, polylinesMesh?: T); - /** - * Polylines - * @default undefined - */ - polylines?: PolylinePropertiesDto[]; - /** - * Value between 0 and 1 - * @default 1 - * @minimum 0 - * @maximum 1 - * @step 0.1 - */ - opacity?: number; - /** - * Hex colour string - * @default #444444 - */ - colours?: string | string[]; - /** - * Width of the polyline - * @default 3 - * @minimum 0 - * @maximum Infinity - * @step 0.1 - */ - size?: number; - /** - * Indicates wether the position of this polyline will change in time - * @default false - */ - updatable?: boolean; - /** - * Polyline mesh variable in case it already exists and needs updating - * @default undefined - */ - polylinesMesh?: T; - } - class SegmentsToleranceDto { - constructor(segments?: Base.Segment3[]); - /** - * Segments array - * @default undefined - */ - segments?: Base.Segment3[]; - /** - * Tolerance for the calculation - * @default 1e-5 - * @minimum -Infinity - * @maximum Infinity - * @step 1e-5 - */ - tolerance?: number; - } - class PolylineToleranceDto { - constructor(polyline?: PolylinePropertiesDto, tolerance?: number); - /** - * Polyline to check - * @default undefined - */ - polyline?: PolylinePropertiesDto; - /** - * Tolerance for the calculation - * @default 1e-5 - * @minimum -Infinity - * @maximum Infinity - * @step 1e-5 - */ - tolerance?: number; - } - class TwoPolylinesToleranceDto { - constructor(polyline1?: PolylinePropertiesDto, polyline2?: PolylinePropertiesDto, tolerance?: number); - /** - * First polyline to check - * @default undefined - */ - polyline1?: PolylinePropertiesDto; - /** - * Second polyline to check - * @default undefined - */ - polyline2?: PolylinePropertiesDto; - /** - * Tolerance for the calculation - * @default 1e-5 - * @minimum -Infinity - * @maximum Infinity - * @step 1e-5 - */ - tolerance?: number; - } - } declare namespace Text { - class TextDto { - constructor(text?: string); - /** - * The text - * @default Hello World - */ - text: string; - } - class TextSplitDto { - constructor(text?: string, separator?: string); - /** - * Text to split - * @default a,b,c - */ - text: string; - /** - * Text to split by - * @default , - */ - separator: string; - } - class TextReplaceDto { - constructor(text?: string, search?: string, replaceWith?: string); - /** - * Text to replace - * @default a-c - */ - text: string; - /** - * Text to search for - * @default - - */ - search: string; - /** - * Text to replace found occurences - * @default b - */ - replaceWith: string; - } - class TextJoinDto { - constructor(list?: string[], separator?: string); - /** - * Text to join - * @default undefined - */ - list: string[]; - /** - * Text to join by - * @default , - */ - separator: string; - } - class ToStringDto { - constructor(item?: T); - /** - * Item to stringify - * @default undefined - */ - item: T; - } - class ToStringEachDto { - constructor(list?: T[]); - /** - * Item to stringify - * @default undefined - */ - list: T[]; - } - class TextFormatDto { - constructor(text?: string, values?: string[]); - /** - * Text to format - * @default Hello {0} - */ - text: string; - /** - * Values to format - * @default ["World"] - */ - values: string[]; - } - class VectorCharDto { - constructor(char?: string, xOffset?: number, yOffset?: number, height?: number, extrudeOffset?: number); - /** - * The text - * @default A - */ - char: string; - /** - * The x offset - * @default 0 - * @minimum -Infinity - * @maximum Infinity - * @step 0.1 - */ - xOffset?: number; - /** - * The y offset - * @minimum -Infinity - * @maximum Infinity - * @step 0.1 - */ - yOffset?: number; - /** - * The height of the text - * @default 1 - * @minimum -Infinity - * @maximum Infinity - * @step 0.1 - */ - height?: number; - /** - * The extrude offset - * @default 0 - * @minimum -Infinity - * @maximum Infinity - * @step 0.1 - */ - extrudeOffset?: number; - } - class VectorTextDto { - constructor(text?: string, xOffset?: number, yOffset?: number, height?: number, lineSpacing?: number, letterSpacing?: number, align?: Base.horizontalAlignEnum, extrudeOffset?: number, centerOnOrigin?: boolean); - /** - * The text - * @default Hello World - */ - text?: string; - /** - * The x offset - * @default 0 - * @minimum -Infinity - * @maximum Infinity - * @step 0.1 - */ - xOffset?: number; - /** - * The y offset - * @default 0 - * @minimum -Infinity - * @maximum Infinity - * @step 0.1 - */ - yOffset?: number; - /** - * The height of the text - * @default 1 - * @minimum -Infinity - * @maximum Infinity - * @step 0.1 - */ - height?: number; - /** - * The line spacing - * @default 1.4 - * @minimum -Infinity - * @maximum Infinity - * @step 0.1 - */ - lineSpacing?: number; - /** - * The letter spacing offset - * @default 0 - * @minimum -Infinity - * @maximum Infinity - * @step 0.1 - */ - letterSpacing?: number; - /** - * The extrude offset - * @default left - */ - align?: Base.horizontalAlignEnum; - /** - * The extrude offset - * @default 0 - * @minimum -Infinity - * @maximum Infinity - * @step 0.1 - */ - extrudeOffset?: number; - /** - * Will center text on 0, 0, 0 - * @default false - */ - centerOnOrigin?: boolean; - } - } declare namespace Transforms { - class RotationCenterAxisDto { - constructor(angle?: number, axis?: Base.Vector3, center?: Base.Point3); - /** - * Angle of rotation in degrees - * @default 90 - * @minimum -Infinity - * @maximum Infinity - * @step 1 - */ - angle: number; - /** - * Axis vector for rotation - * @default [0, 1, 0] - */ - axis: Base.Vector3; - /** - * The center from which the axis is pointing - * @default [0, 0, 0] - */ - center: Base.Point3; - } - class RotationCenterDto { - constructor(angle?: number, center?: Base.Point3); - /** - * Angle of rotation in degrees - * @default 90 - * @minimum -Infinity - * @maximum Infinity - * @step 1 - */ - angle: number; - /** - * The center from which the axis is pointing - * @default [0, 0, 0] - */ - center: Base.Point3; - } - class RotationCenterYawPitchRollDto { - constructor(yaw?: number, pitch?: number, roll?: number, center?: Base.Point3); - /** - * Yaw angle (Rotation around X) in degrees - * @default 0 - * @minimum -Infinity - * @maximum Infinity - * @step 1 - */ - yaw: number; - /** - * Pitch angle (Rotation around Y) in degrees - * @default 0 - * @minimum -Infinity - * @maximum Infinity - * @step 1 - */ - pitch: number; - /** - * Roll angle (Rotation around Z) in degrees - * @default 0 - * @minimum -Infinity - * @maximum Infinity - * @step 1 - */ - roll: number; - /** - * The center from which the rotations are applied - * @default [0, 0, 0] - */ - center: Base.Point3; - } - class ScaleXYZDto { - constructor(scaleXyz?: Base.Vector3); - /** - * Scaling factors for each axis [1, 2, 1] means that Y axis will be scaled 200% and both x and z axis will remain on 100% - * @default [1, 1, 1] - */ - scaleXyz: Base.Vector3; - } - class StretchDirCenterDto { - constructor(scale?: number, center?: Base.Point3, direction?: Base.Vector3); - /** The center point around which to stretch. - * @default [0, 0, 0] - */ - center?: Base.Point3; - /** The direction vector along which to stretch. Does not need to be normalized initially. - * @default [0, 0, 1] - */ - direction?: Base.Vector3; - /** The scale factor to apply along the direction vector. 1.0 means no change. - * @default 2 - * @minimum -Infinity - * @maximum Infinity - * @step 0.1 - */ - scale?: number; - } - class ScaleCenterXYZDto { - constructor(center?: Base.Point3, scaleXyz?: Base.Vector3); - /** - * The center from which the scaling is applied - * @default [0, 0, 0] - */ - center: Base.Point3; - /** - * Scaling factors for each axis [1, 2, 1] means that Y axis will be scaled 200% and both x and z axis will remain on 100% - * @default [1, 1, 1] - */ - scaleXyz: Base.Vector3; - } - class UniformScaleDto { - constructor(scale?: number); - /** - * Uniform scale factor for all x, y, z directions. 1 will keep everything on original size, 2 will scale 200%; - * @default 1 - * @minimum -Infinity - * @maximum Infinity - * @step 0.1 - */ - scale: number; - } - class UniformScaleFromCenterDto { - constructor(scale?: number, center?: Base.Point3); - /** - * Scale factor for all x, y, z directions. 1 will keep everything on original size, 2 will scale 200%; - * @default 1 - * @minimum -Infinity - * @maximum Infinity - * @step 0.1 - */ - scale: number; - /** - * Center position of the scaling - * @default [0, 0, 0] - */ - center: Base.Point3; - } - class TranslationXYZDto { - constructor(translation?: Base.Vector3); - /** - * Translation vector with [x, y, z] distances - * @default [0, 0, 0] - */ - translation: Base.Vector3; - } - class TranslationsXYZDto { - constructor(translations?: Base.Vector3[]); - /** - * Translation vectors with [x, y, z] distances - * @default undefined - */ - translations: Base.Vector3[]; - } - } declare namespace Vector { - class TwoVectorsDto { - constructor(first?: number[], second?: number[]); - /** - * First vector - * @default undefined - */ - first: number[]; - /** - * Second vector - * @default undefined - */ - second: number[]; - } - class VectorBoolDto { - constructor(vector?: boolean[]); - /** - * Vector of booleans - * @default undefined - */ - vector: boolean[]; - } - class RemoveAllDuplicateVectorsDto { - constructor(vectors?: number[][], tolerance?: number); - /** - * Vectors array - * @default undefined - */ - vectors: number[][]; - /** - * Tolerance value - * @default 1e-7 - * @minimum 0 - * @maximum Infinity - */ - tolerance: number; - } - class RemoveConsecutiveDuplicateVectorsDto { - constructor(vectors?: number[][], checkFirstAndLast?: boolean, tolerance?: number); - /** - * Vectors array - * @default undefined - */ - vectors: number[][]; - /** - * Check first and last vectors - * @default false - */ - checkFirstAndLast: boolean; - /** - * Tolerance value - * @default 1e-7 - * @minimum 0 - * @maximum Infinity - */ - tolerance: number; - } - class VectorsTheSameDto { - constructor(vec1?: number[], vec2?: number[], tolerance?: number); - /** - * First vector - * @default undefined - */ - vec1: number[]; - /** - * Second vector - * @default undefined - */ - vec2: number[]; - /** - * Tolerance value - * @default 1e-7 - * @minimum 0 - * @maximum Infinity - */ - tolerance: number; - } - class VectorDto { - constructor(vector?: number[]); - /** - * Vector array of numbers - * @default undefined - */ - vector: number[]; - } - class Vector3Dto { - constructor(vector?: Base.Vector3); - /** - * Vector array of 3 numbers - * @default undefined - */ - vector: Base.Vector3; - } - class RangeMaxDto { - constructor(max?: number); - /** - * Maximum range boundary - * @default 10 - * @minimum -Infinity - * @maximum Infinity - * @step 1 - */ - max: number; - } - class VectorXYZDto { - constructor(x?: number, y?: number, z?: number); - /** - * X value of vector - * @default 0 - * @minimum -Infinity - * @maximum Infinity - * @step 0.5 - */ - x: number; - /** - * Y value of vector - * @default 0 - * @minimum -Infinity - * @maximum Infinity - * @step 0.5 - */ - y: number; - /** - * Z value of vector - * @default 0 - * @minimum -Infinity - * @maximum Infinity - * @step 0.5 - */ - z: number; - } - class VectorXYDto { - constructor(x?: number, y?: number); - /** - * X value of vector - * @default 0 - * @minimum -Infinity - * @maximum Infinity - * @step 0.5 - */ - x: number; - /** - * Y value of vector - * @default 0 - * @minimum -Infinity - * @maximum Infinity - * @step 0.5 - */ - y: number; - } - class SpanDto { - constructor(step?: number, min?: number, max?: number); - /** - * Step of the span - * @default 0.1 - * @minimum -Infinity - * @maximum Infinity - * @step 0.1 - */ - step: number; - /** - * Min value of the span - * @default 0 - * @minimum -Infinity - * @maximum Infinity - * @step 1 - */ - min: number; - /** - * Max value of the span - * @default 1 - * @minimum -Infinity - * @maximum Infinity - * @step 1 - */ - max: number; - } - class SpanEaseItemsDto { - constructor(nrItems?: number, min?: number, max?: number, ease?: Math.easeEnum); - /** - * Nr of items in the span - * @default 100 - * @minimum 2 - * @maximum Infinity - * @step 1 - */ - nrItems: number; - /** - * Min value of the span - * @default 0 - * @minimum -Infinity - * @maximum Infinity - * @step 1 - */ - min: number; - /** - * Max value of the span - * @default 1 - * @minimum -Infinity - * @maximum Infinity - * @step 1 - */ - max: number; - /** - * Ease type - * @default easeInSine - */ - ease: Math.easeEnum; - /** - * Indicates wether only intervals should be outputed. This will output step lengths between the values. - * @default false - */ - intervals: boolean; - } - class SpanLinearItemsDto { - constructor(nrItems?: number, min?: number, max?: number); - /** - * Nr of items in the span - * @default 100 - * @minimum 2 - * @maximum Infinity - * @step 1 - */ - nrItems: number; - /** - * Min value of the span - * @default 0 - * @minimum -Infinity - * @maximum Infinity - * @step 1 - */ - min: number; - /** - * Max value of the span - * @default 1 - * @minimum -Infinity - * @maximum Infinity - * @step 1 - */ - max: number; - } - class RayPointDto { - constructor(point?: Base.Point3, distance?: number, vector?: number[]); - /** - * Origin location of the ray - * @default undefined - */ - point: Base.Point3; - /** - * Distance to the point on the ray - * @default 1 - * @minimum -Infinity - * @maximum Infinity - * @step 1 - */ - distance: number; - /** - * Vector array of numbers - * @default undefined - */ - vector: number[]; - } - class VectorsDto { - constructor(vectors?: number[][]); - /** - * Vectors array - * @default undefined - */ - vectors: number[][]; - } - class FractionTwoVectorsDto { - constructor(fraction?: number, first?: Base.Vector3, second?: Base.Vector3); - /** - * Fraction number - * @default 0.5 - * @minimum -Infinity - * @maximum Infinity - * @step 0.1 - */ - fraction: number; - /** - * First vector - * @default undefined - */ - first: Base.Vector3; - /** - * Second vector - * @default undefined - */ - second: Base.Vector3; - } - class VectorScalarDto { - constructor(scalar?: number, vector?: number[]); - /** - * Scalar number - * @default 1 - * @minimum -Infinity - * @maximum Infinity - * @step 0.1 - */ - scalar: number; - /** - * Vector array of numbers - * @default undefined - */ - vector: number[]; - } - class TwoVectorsReferenceDto { - constructor(reference?: number[], first?: Base.Vector3, second?: Base.Vector3); - /** - * Reference vector - * @default undefined - */ - reference: number[]; - /** - * First vector - * @default undefined - */ - first: Base.Vector3; - /** - * Second vector - * @default undefined - */ - second: Base.Vector3; - } - } declare class HexGridData { - centers: Base.Point3[]; - hexagons: Base.Point3[][]; - shortestDistEdge: number; - longestDistEdge: number; - maxFilletRadius: number; - } declare const simplex: { - height: number; - 32: number[]; - 33: number[]; - 34: number[]; - 35: number[]; - 36: number[]; - 37: number[]; - 38: number[]; - 39: number[]; - 40: number[]; - 41: number[]; - 42: number[]; - 43: number[]; - 44: number[]; - 45: number[]; - 46: number[]; - 47: number[]; - 48: number[]; - 49: number[]; - 50: number[]; - 51: number[]; - 52: number[]; - 53: number[]; - 54: number[]; - 55: number[]; - 56: number[]; - 57: number[]; - 58: number[]; - 59: number[]; - 60: number[]; - 61: number[]; - 62: number[]; - 63: number[]; - 64: number[]; - 65: number[]; - 66: number[]; - 67: number[]; - 68: number[]; - 69: number[]; - 70: number[]; - 71: number[]; - 72: number[]; - 73: number[]; - 74: number[]; - 75: number[]; - 76: number[]; - 77: number[]; - 78: number[]; - 79: number[]; - 80: number[]; - 81: number[]; - 82: number[]; - 83: number[]; - 84: number[]; - 85: number[]; - 86: number[]; - 87: number[]; - 88: number[]; - 89: number[]; - 90: number[]; - 91: number[]; - 92: number[]; - 93: number[]; - 94: number[]; - 95: number[]; - 96: number[]; - 97: number[]; - 98: number[]; - 99: number[]; - 100: number[]; - 101: number[]; - 102: number[]; - 103: number[]; - 104: number[]; - 105: number[]; - 106: number[]; - 107: number[]; - 108: number[]; - 109: number[]; - 110: number[]; - 111: number[]; - 112: number[]; - 113: number[]; - 114: number[]; - 115: number[]; - 116: number[]; - 117: number[]; - 118: number[]; - 119: number[]; - 120: number[]; - 121: number[]; - 122: number[]; - 123: number[]; - 124: number[]; - 125: number[]; - 126: number[]; - }; - declare const defaultsVectorParams: { - xOffset: number; - yOffset: number; - input: string; - align: string; - font: { - height: number; - 32: number[]; - 33: number[]; - 34: number[]; - 35: number[]; - 36: number[]; - 37: number[]; - 38: number[]; - 39: number[]; - 40: number[]; - 41: number[]; - 42: number[]; - 43: number[]; - 44: number[]; - 45: number[]; - 46: number[]; - 47: number[]; - 48: number[]; - 49: number[]; - 50: number[]; - 51: number[]; - 52: number[]; - 53: number[]; - 54: number[]; - 55: number[]; - 56: number[]; - 57: number[]; - 58: number[]; - 59: number[]; - 60: number[]; - 61: number[]; - 62: number[]; - 63: number[]; - 64: number[]; - 65: number[]; - 66: number[]; - 67: number[]; - 68: number[]; - 69: number[]; - 70: number[]; - 71: number[]; - 72: number[]; - 73: number[]; - 74: number[]; - 75: number[]; - 76: number[]; - 77: number[]; - 78: number[]; - 79: number[]; - 80: number[]; - 81: number[]; - 82: number[]; - 83: number[]; - 84: number[]; - 85: number[]; - 86: number[]; - 87: number[]; - 88: number[]; - 89: number[]; - 90: number[]; - 91: number[]; - 92: number[]; - 93: number[]; - 94: number[]; - 95: number[]; - 96: number[]; - 97: number[]; - 98: number[]; - 99: number[]; - 100: number[]; - 101: number[]; - 102: number[]; - 103: number[]; - 104: number[]; - 105: number[]; - 106: number[]; - 107: number[]; - 108: number[]; - 109: number[]; - 110: number[]; - 111: number[]; - 112: number[]; - 113: number[]; - 114: number[]; - 115: number[]; - 116: number[]; - 117: number[]; - 118: number[]; - 119: number[]; - 120: number[]; - 121: number[]; - 122: number[]; - 123: number[]; - 124: number[]; - 125: number[]; - 126: number[]; - }; - height: number; - lineSpacing: number; - letterSpacing: number; - extrudeOffset: number; - }; declare class VectorCharData { - constructor(width?: number, height?: number, paths?: Base.Point3[][]); - /** - * The width of the char - * @default undefined - */ - width?: number; - /** - * The height of the char - * @default undefined - */ - height?: number; - /** - * The segments of the char - * @default undefined - */ - paths?: Base.Point3[][]; - } declare class VectorTextData { - constructor(width?: number, height?: number, chars?: VectorCharData[]); - /** - * The width of the char - * @default undefined - */ - width?: number; - /** - * The height of the char - * @default undefined - */ - height?: number; - /** - * The segments of the char - * @default undefined - */ - chars?: VectorCharData[]; - } declare class Color { + declare class Color { private readonly math; constructor(math: MathBitByBit); - /** - * Creates a hex color - * @param inputs Color hex - * @returns color string - * @group create - * @shortname color - * @drawable false - */ hexColor(inputs: Inputs.Color.HexDto): Inputs.Base.Color; - /** - * Creates rgb color from hex - * @param inputs Color hex - * @returns rgb color - * @group convert - * @shortname hex to rgb - * @drawable false - */ hexToRgb(inputs: Inputs.Color.HexDto): Inputs.Base.ColorRGB; - /** - * Creates hex color from rgb - * @param inputs Color hext - * @returns hex color - * @group convert - * @shortname rgb to hex - * @drawable false - */ rgbToHex(inputs: Inputs.Color.RGBMinMaxDto): Inputs.Base.Color; - /** - * Creates hex color from rgb obj that contains {r, g, b} properties in certain range - * @param inputs Color hext - * @returns hex color string - * @group convert - * @shortname rgb obj to hex - * @drawable false - */ rgbObjToHex(inputs: Inputs.Color.RGBObjectMaxDto): Inputs.Base.Color; - /** - * Creates rgb color from hex and maps to different range if needed - * @param inputs Color hext - * @returns rgb color - * @group convert - * @shortname hex to rgb mapped - * @drawable false - */ hexToRgbMapped(inputs: Inputs.Color.HexDtoMapped): Inputs.Base.ColorRGB; - /** - * Get red param - * @param inputs Color hext - * @returns rgb color - * @group hex to - * @shortname red - * @drawable false - */ getRedParam(inputs: Inputs.Color.HexDtoMapped): number; - /** - * Get green param - * @param inputs Color hext - * @returns rgb color - * @group hex to - * @shortname green - * @drawable false - */ getGreenParam(inputs: Inputs.Color.HexDtoMapped): number; - /** - * Get blue param - * @param inputs Color hext - * @returns blue param - * @group hex to - * @shortname blue - * @drawable false - */ getBlueParam(inputs: Inputs.Color.HexDtoMapped): number; - /** - * RGB to red - * @param inputs Color rgb - * @returns red param - * @group rgb to - * @shortname red - * @drawable false - */ rgbToRed(inputs: Inputs.Color.RGBObjectDto): number; - /** - * RGB to green - * @param inputs Color rgb - * @returns green param - * @group rgb to - * @shortname green - * @drawable false - */ rgbToGreen(inputs: Inputs.Color.RGBObjectDto): number; - /** - * RGB to blue - * @param inputs Color rgb - * @returns blue param - * @group rgb to - * @shortname blue - * @drawable false - */ rgbToBlue(inputs: Inputs.Color.RGBObjectDto): number; - /** - * Invert color - * @param inputs hex color and black and white option - * @returns inverted color - * @group hex to - * @shortname invert color - * @drawable false - */ invert(inputs: Inputs.Color.InvertHexDto): Inputs.Base.Color; - }/** - * Contains various date methods. - */ + } declare class Dates { - /** - * Returns a date as a string value. - * @param inputs a date - * @returns date as string - * @group convert - * @shortname date to string - * @drawable false - */ toDateString(inputs: Inputs.Dates.DateDto): string; - /** - * Returns a date as a string value in ISO format. - * @param inputs a date - * @returns date as string - * @group convert - * @shortname date to iso string - * @drawable false - */ toISOString(inputs: Inputs.Dates.DateDto): string; - /** - * Returns a date as a string value in JSON format. - * @param inputs a date - * @returns date as string - * @group convert - * @shortname date to json - * @drawable false - */ toJSON(inputs: Inputs.Dates.DateDto): string; - /** - * Returns a string representation of a date. The format of the string depends on the locale. - * @param inputs a date - * @returns date as string - * @group convert - * @shortname date to locale string - * @drawable false - */ toString(inputs: Inputs.Dates.DateDto): string; - /** - * Returns a time as a string value. - * @param inputs a date - * @returns time as string - * @group convert - * @shortname date to time string - * @drawable false - */ toTimeString(inputs: Inputs.Dates.DateDto): string; - /** - * Returns a date converted to a string using Universal Coordinated Time (UTC). - * @param inputs a date - * @returns date as utc string - * @group convert - * @shortname date to utc string - * @drawable false - */ toUTCString(inputs: Inputs.Dates.DateDto): string; - /** - * Returns the current date and time. - * @returns date - * @group create - * @shortname now - * @drawable false - */ now(): Date; - /** - * Creates a new date object using the provided date params. - * @param inputs a date - * @returns date - * @group create - * @shortname create date - * @drawable false - */ createDate(inputs: Inputs.Dates.CreateDateDto): Date; - /** - * Returns the number of milliseconds between midnight, January 1, 1970 Universal Coordinated Time (UTC) (or GMT) and the specified date. - * @param inputs a date - * @returns date - * @group create - * @shortname create utc date - * @drawable false - */ createDateUTC(inputs: Inputs.Dates.CreateDateDto): Date; - /** - * Creates a new date object using the provided unix time stamp. - * @param inputs a unix time stamp - * @returns date - * @group create - * @shortname create from unix timestamp - * @drawable false - */ createFromUnixTimeStamp(inputs: Inputs.Dates.CreateFromUnixTimeStampDto): Date; - /** - * Parses a string containing a date, and returns the number of milliseconds between that date and midnight, January 1, 1970. - * @param inputs a date string - * @returns the number of milliseconds between that date and midnight, January 1, 1970. - * @group parse - * @shortname parse date string - * @drawable false - */ parseDate(inputs: Inputs.Dates.DateStringDto): number; - /** - * Gets the day-of-the-month, using local time. - * @returns date - * @group get - * @shortname get date of month - * @drawable false - */ getDayOfMonth(inputs: Inputs.Dates.DateDto): number; - /** - * Gets the day of the week, using local time. - * @returns day - * @group get - * @shortname get weekday - * @drawable false - */ getWeekday(inputs: Inputs.Dates.DateDto): number; - /** - * Gets the year, using local time. - * @returns year - * @group get - * @shortname get year - * @drawable false - */ getYear(inputs: Inputs.Dates.DateDto): number; - /** - * Gets the month, using local time. - * @returns month - * @group get - * @shortname get month - * @drawable false - */ getMonth(inputs: Inputs.Dates.DateDto): number; - /** - * Gets the hours in a date, using local time. - * @returns hours - * @group get - * @shortname get hours - * @drawable false - */ getHours(inputs: Inputs.Dates.DateDto): number; - /** - * Gets the minutes of a Date object, using local time. - * @returns minutes - * @group get - * @shortname get minutes - * @drawable false - */ getMinutes(inputs: Inputs.Dates.DateDto): number; - /** - * Gets the seconds of a Date object, using local time. - * @returns seconds - * @group get - * @shortname get seconds - * @drawable false - */ getSeconds(inputs: Inputs.Dates.DateDto): number; - /** - * Gets the milliseconds of a Date, using local time. - * @returns milliseconds - * @group get - * @shortname get milliseconds - * @drawable false - */ getMilliseconds(inputs: Inputs.Dates.DateDto): number; - /** - * Returns the stored time value in milliseconds since midnight, January 1, 1970 UTC. - * @returns time - * @group get - * @shortname get time - * @drawable false - */ getTime(inputs: Inputs.Dates.DateDto): number; - /** - * Gets the year using Universal Coordinated Time (UTC). - * @returns year - * @group get - * @shortname get utc year - * @drawable false - */ getUTCYear(inputs: Inputs.Dates.DateDto): number; - /** - * Gets the month of a Date object using Universal Coordinated Time (UTC). - * @returns month - * @group get - * @shortname get utc month - * @drawable false - */ getUTCMonth(inputs: Inputs.Dates.DateDto): number; - /** - * Gets the day-of-the-month, using Universal Coordinated Time (UTC). - * @returns day - * @group get - * @shortname get utc day - * @drawable false - */ getUTCDay(inputs: Inputs.Dates.DateDto): number; - /** - * Gets the hours value in a Date object using Universal Coordinated Time (UTC). - * @returns hours - * @group get - * @shortname get utc hours - * @drawable false - */ getUTCHours(inputs: Inputs.Dates.DateDto): number; - /** - * Gets the minutes of a Date object using Universal Coordinated Time (UTC). - * @returns minutes - * @group get - * @shortname get utc minutes - * @drawable false - */ getUTCMinutes(inputs: Inputs.Dates.DateDto): number; - /** - * Gets the seconds of a Date object using Universal Coordinated Time (UTC). - * @returns seconds - * @group get - * @shortname get utc seconds - * @drawable false - */ getUTCSeconds(inputs: Inputs.Dates.DateDto): number; - /** - * Gets the milliseconds of a Date object using Universal Coordinated Time (UTC). - * @returns milliseconds - * @group get - * @shortname get utc milliseconds - * @drawable false - */ getUTCMilliseconds(inputs: Inputs.Dates.DateDto): number; - /** - * Sets the year of the Date object using local time. - * @param inputs a date and the year - * @returns date - * @group set - * @shortname set year - * @drawable false - * */ setYear(inputs: Inputs.Dates.DateYearDto): Date; - /** - * Sets the month value in the Date object using local time. - * @param inputs a date and the month - * @returns date - * @group set - * @shortname set month - * @drawable false - * */ setMonth(inputs: Inputs.Dates.DateMonthDto): Date; - /** - * Sets the numeric day-of-the-month value of the Date object using local time. - * @param inputs a date and the day - * @returns date - * @group set - * @shortname set day of month - * @drawable false - */ setDayOfMonth(inputs: Inputs.Dates.DateDayDto): Date; - /** - * Sets the hour value in the Date object using local time. - * @param inputs a date and the hours - * @returns date - * @group set - * @shortname set hours - * @drawable false - * */ setHours(inputs: Inputs.Dates.DateHoursDto): Date; - /** - * Sets the minutes value in the Date object using local time. - * @param inputs a date and the minutes - * @returns date - * @group set - * @shortname set minutes - * @drawable false - * */ setMinutes(inputs: Inputs.Dates.DateMinutesDto): Date; - /** - * Sets the seconds value in the Date object using local time. - * @param inputs a date and the seconds - * @returns date - * @group set - * @shortname set seconds - * @drawable false - */ setSeconds(inputs: Inputs.Dates.DateSecondsDto): Date; - /** - * Sets the milliseconds value in the Date object using local time. - * @param inputs a date and the milliseconds - * @returns date - * @group set - * @shortname set milliseconds - * @drawable false - */ setMilliseconds(inputs: Inputs.Dates.DateMillisecondsDto): Date; - /** - * Sets the date and time value in the Date object. - * @param inputs a date and the time - * @returns date - * @group set - * @shortname set time - * @drawable false - */ setTime(inputs: Inputs.Dates.DateTimeDto): Date; - /** - * Sets the year value in the Date object using Universal Coordinated Time (UTC). - * @param inputs a date and the year - * @returns date - * @group set - * @shortname set utc year - * @drawable false - * */ setUTCYear(inputs: Inputs.Dates.DateYearDto): Date; - /** - * Sets the month value in the Date object using Universal Coordinated Time (UTC). - * @param inputs a date and the month - * @returns date - * @group set - * @shortname set utc month - * @drawable false - * */ setUTCMonth(inputs: Inputs.Dates.DateMonthDto): Date; - /** - * Sets the numeric day of the month in the Date object using Universal Coordinated Time (UTC). - * @param inputs a date and the day - * @returns date - * @group set - * @shortname set utc day - * @drawable false - */ setUTCDay(inputs: Inputs.Dates.DateDayDto): Date; - /** - * Sets the hours value in the Date object using Universal Coordinated Time (UTC). - * @param inputs a date and the hours - * @returns date - * @group set - * @shortname set utc hours - * @drawable false - * */ setUTCHours(inputs: Inputs.Dates.DateHoursDto): Date; - /** - * Sets the minutes value in the Date object using Universal Coordinated Time (UTC). - * @param inputs a date and the minutes - * @returns date - * @group set - * @shortname set utc minutes - * @drawable false - * */ setUTCMinutes(inputs: Inputs.Dates.DateMinutesDto): Date; - /** - * Sets the seconds value in the Date object using Universal Coordinated Time (UTC). - * @param inputs a date and the seconds - * @returns date - * @group set - * @shortname set utc seconds - * @drawable false - */ setUTCSeconds(inputs: Inputs.Dates.DateSecondsDto): Date; - /** - * Sets the milliseconds value in the Date object using Universal Coordinated Time (UTC). - * @param inputs a date and the milliseconds - * @returns date - * @group set - * @shortname set utc milliseconds - * @drawable false - */ setUTCMilliseconds(inputs: Inputs.Dates.DateMillisecondsDto): Date; - } declare class GeometryHelper { + } + declare class GeometryHelper { transformControlPoints(transformation: number[][] | number[][][], transformedControlPoints: Inputs.Base.Point3[]): Inputs.Base.Point3[]; getFlatTransformations(transformation: number[][] | number[][][]): number[][]; getArrayDepth: (value: any) => number; @@ -35906,855 +10493,181 @@ declare namespace Bit { removeConsecutivePointDuplicates(points: Inputs.Base.Point3[], checkFirstAndLast?: boolean, tolerance?: number): Inputs.Base.Point3[]; arePointsTheSame(pointA: Inputs.Base.Point3 | Inputs.Base.Point2, pointB: Inputs.Base.Point3 | Inputs.Base.Point2, tolerance: number): boolean; private transformCoordinates; - }/** - * Contains various methods for lines and segments. Line in bitbybit is a simple object that has start and end point properties. - * { start: [ x, y, z ], end: [ x, y, z ] } - */ + } + declare class DxfGenerator { + private entityHandle; + private colorFormat; + private acadVersion; + generateDxf(dxfInputs: Inputs.IO.DxfModelDto): string; + private generateHeader; + private generateTables; + private generateLineTypeTable; + private generateStyleTable; + private generateVportTable; + private generateViewTable; + private generateUcsTable; + private generateAppidTable; + private generateDimstyleTable; + private generateBlocks; + private generateLayerTable; + private generateEntities; + private generateSegmentEntity; + private isLineSegment; + private isArcSegment; + private isCircleSegment; + private isPolylineSegment; + private isSplineSegment; + private generateLineEntity; + private generateCircleEntity; + private generateArcEntity; + private generatePolylineEntity; + private generateSplineEntity; + private isClosedPolyline; + private getNextHandle; + private convertColorToDxf; + private rgbToAciColorIndex; + } + declare class Dxf { + private dxfGenerator; + lineSegment(inputs: Inputs.IO.DxfLineSegmentDto): Inputs.IO.DxfLineSegmentDto; + arcSegment(inputs: Inputs.IO.DxfArcSegmentDto): Inputs.IO.DxfArcSegmentDto; + circleSegment(inputs: Inputs.IO.DxfCircleSegmentDto): Inputs.IO.DxfCircleSegmentDto; + polylineSegment(inputs: Inputs.IO.DxfPolylineSegmentDto): Inputs.IO.DxfPolylineSegmentDto; + splineSegment(inputs: Inputs.IO.DxfSplineSegmentDto): Inputs.IO.DxfSplineSegmentDto; + path(inputs: Inputs.IO.DxfPathDto): Inputs.IO.DxfPathDto; + pathsPart(inputs: Inputs.IO.DxfPathsPartDto): Inputs.IO.DxfPathsPartDto; + dxfCreate(inputs: Inputs.IO.DxfModelDto): string; + } + declare class IoBitByBit { + dxf: Dxf; + constructor(); + } declare class Line { private readonly vector; private readonly point; private readonly geometryHelper; constructor(vector: Vector, point: Point, geometryHelper: GeometryHelper); - /** - * Gets the start point of the line - * @param inputs a line - * @returns start point - * @group get - * @shortname line start point - * @drawable true - */ getStartPoint(inputs: Inputs.Line.LineDto): Inputs.Base.Point3; - /** - * Gets the end point of the line - * @param inputs a line - * @returns end point - * @group get - * @shortname line end point - * @drawable true - */ getEndPoint(inputs: Inputs.Line.LineDto): Inputs.Base.Point3; - /** - * Gets the length of the line - * @param inputs a line - * @returns line length - * @group get - * @shortname line length - * @drawable false - */ length(inputs: Inputs.Line.LineDto): number; - /** - * Reverse the endpoints of the line - * @param inputs a line - * @returns reversed line - * @group operations - * @shortname reversed line - * @drawable true - */ reverse(inputs: Inputs.Line.LineDto): Inputs.Base.Line3; - /** - * Transform the line - * @param inputs a line - * @returns transformed line - * @group transforms - * @shortname transform line - * @drawable true - */ transformLine(inputs: Inputs.Line.TransformLineDto): Inputs.Base.Line3; - /** - * Transforms the lines with multiple transform for each line - * @param inputs lines - * @returns transformed lines - * @group transforms - * @shortname transform lines - * @drawable true - */ transformsForLines(inputs: Inputs.Line.TransformsLinesDto): Inputs.Base.Line3[]; - /** - * Create the line - * @param inputs start and end points of the line - * @returns line - * @group create - * @shortname line - * @drawable true - */ create(inputs: Inputs.Line.LinePointsDto): Inputs.Base.Line3; - /** - * Create the segment - * @param inputs start and end points of the segment - * @returns segment - * @group create - * @shortname segment - * @drawable true - */ createSegment(inputs: Inputs.Line.LinePointsDto): Inputs.Base.Segment3; - /** - * Gets the point on the line segment at a given param - * @param inputs line - * @returns point on line - * @group get - * @shortname point on line - * @drawable true - */ getPointOnLine(inputs: Inputs.Line.PointOnLineDto): Inputs.Base.Point3; - /** - * Create the lines segments between all of the points in a list - * @param inputs points - * @returns lines - * @group create - * @shortname lines between points - * @drawable true - */ linesBetweenPoints(inputs: Inputs.Line.PointsLinesDto): Inputs.Base.Line3[]; - /** - * Create the lines between start and end points - * @param inputs start points and end points - * @returns lines - * @group create - * @shortname start and end points to lines - * @drawable true - */ linesBetweenStartAndEndPoints(inputs: Inputs.Line.LineStartEndPointsDto): Inputs.Base.Line3[]; - /** - * Convert the line to segment - * @param inputs line - * @returns segment - * @group convert - * @shortname line to segment - * @drawable false - */ lineToSegment(inputs: Inputs.Line.LineDto): Inputs.Base.Segment3; - /** - * Converts the lines to segments - * @param inputs lines - * @returns segments - * @group convert - * @shortname lines to segments - * @drawable false - */ linesToSegments(inputs: Inputs.Line.LinesDto): Inputs.Base.Segment3[]; - /** - * Converts the segment to line - * @param inputs segment - * @returns line - * @group convert - * @shortname segment to line - * @drawable true - */ segmentToLine(inputs: Inputs.Line.SegmentDto): Inputs.Base.Line3; - /** - * Converts the segments to lines - * @param inputs segments - * @returns lines - * @group convert - * @shortname segments to lines - * @drawable true - */ segmentsToLines(inputs: Inputs.Line.SegmentsDto): Inputs.Base.Line3[]; - /** - * If two lines intersect return the intersection point - * @param inputs line1 and line2 - * @returns intersection point or undefined if no intersection - * @group intersection - * @shortname line-line int - * @drawable true - */ lineLineIntersection(inputs: Inputs.Line.LineLineIntersectionDto): Inputs.Base.Point3 | undefined; - }/** - * Contains various list methods. - */ + } declare class Lists { - /** - * Gets an item from the list by using a 0 based index - * @param inputs a list and an index - * @returns item - * @group get - * @shortname item by index - * @drawable false - */ getItem(inputs: Inputs.Lists.ListItemDto): T; - /** - * Gets items randomly by using a threshold - * @param inputs a list and a threshold for randomization of items to remove - * @returns list with remaining items - * @group get - * @shortname random get threshold - * @drawable false - */ + getFirstItem(inputs: Inputs.Lists.ListCloneDto): T; + getLastItem(inputs: Inputs.Lists.ListCloneDto): T; randomGetThreshold(inputs: Inputs.Lists.RandomThresholdDto): T[]; - /** - * Gets a sub list between start and end indexes - * @param inputs a list and start and end indexes - * @returns sub list - * @group get - * @shortname sublist - * @drawable false - */ getSubList(inputs: Inputs.Lists.SubListDto): T[]; - /** - * Gets nth item in the list - * @param inputs a list and index - * @returns list with filtered items - * @group get - * @shortname every n-th - * @drawable false - */ getNthItem(inputs: Inputs.Lists.GetNthItemDto): T[]; - /** - * Gets elements by pattern - * @param inputs a list and index - * @returns list with filtered items - * @group get - * @shortname by pattern - * @drawable false - */ getByPattern(inputs: Inputs.Lists.GetByPatternDto): T[]; - /** - * Merge elements of lists on a given level and flatten output if needed - * @param inputs lists, level and flatten data - * @returns list with merged lists and flattened lists - * @group get - * @shortname merge levels - * @drawable false - */ mergeElementsOfLists(inputs: Inputs.Lists.MergeElementsOfLists): T[]; - /** - * Gets the longest list length from the list of lists - * @param inputs a list of lists - * @returns number of max length - * @group get - * @shortname longest list length - * @drawable false - */ getLongestListLength(inputs: Inputs.Lists.GetLongestListLength): number; - /** - * Reverse the list - * @param inputs a list and an index - * @returns item - * @group edit - * @shortname reverse - * @drawable false - */ reverse(inputs: Inputs.Lists.ListCloneDto): T[]; - /** - * Flip 2d lists - every nth element of each list will form a separate list - * @param inputs a list of lists to flip - * @returns item - * @group edit - * @shortname flip lists - * @drawable false - */ + shuffle(inputs: Inputs.Lists.ListCloneDto): T[]; flipLists(inputs: Inputs.Lists.ListCloneDto): T[][]; - /** - * Group in lists of n elements - * @param inputs a list - * @returns items grouped in lists of n elements - * @group edit - * @shortname group elements - * @drawable false - */ groupNth(inputs: Inputs.Lists.GroupListDto): T[][]; - /** - * Get the depth of the list - * @param inputs a list - * @returns number of depth - * @group get - * @shortname max list depth - * @drawable false - */ - getListDepth(inputs: Inputs.Lists.ListCloneDto<[]>): number; - /** - * Gets the length of the list - * @param inputs a length list - * @returns a number - * @group get - * @shortname list length - * @drawable false - */ + includes(inputs: Inputs.Lists.IncludesDto): boolean; + findIndex(inputs: Inputs.Lists.IncludesDto): number; + getListDepth(inputs: Inputs.Lists.ListCloneDto<[ + ]>): number; listLength(inputs: Inputs.Lists.ListCloneDto): number; - /** - * Add item to the list - * @param inputs a list, item and an index - * @returns list with added item - * @group add - * @shortname add item - * @drawable false - */ addItemAtIndex(inputs: Inputs.Lists.AddItemAtIndexDto): T[]; - /** - * Adds item to the list of provided indexes - * @param inputs a list, item and an indexes - * @returns list with added item - * @group add - * @shortname add item at indexes - * @drawable false - */ addItemAtIndexes(inputs: Inputs.Lists.AddItemAtIndexesDto): T[]; - /** - * Adds items to the list of provided indexes matching 1:1, first item will go to first index provided, etc. - * @param inputs a list, items and an indexes - * @returns list with added items - * @group add - * @shortname add items - * @drawable false - */ addItemsAtIndexes(inputs: Inputs.Lists.AddItemsAtIndexesDto): T[]; - /** - * Remove item from the list - * @param inputs a list and index - * @returns list with removed item - * @group remove - * @shortname remove item - * @drawable false - */ removeItemAtIndex(inputs: Inputs.Lists.RemoveItemAtIndexDto): T[]; - /** - * Remove items from the list of provided indexes - * @param inputs a list and indexes - * @returns list with removed items - * @group remove - * @shortname remove items - * @drawable false - */ + removeFirstItem(inputs: Inputs.Lists.ListCloneDto): T[]; + removeLastItem(inputs: Inputs.Lists.ListCloneDto): T[]; + removeItemAtIndexFromEnd(inputs: Inputs.Lists.RemoveItemAtIndexDto): T[]; removeItemsAtIndexes(inputs: Inputs.Lists.RemoveItemsAtIndexesDto): T[]; - /** - * Remove all items from the list - * @param inputs a list - * @returns The length is set to 0 and same array memory object is returned - * @group remove - * @shortname remove all items - * @drawable false - */ removeAllItems(inputs: Inputs.Lists.ListDto): T[]; - /** - * Remove item from the list - * @param inputs a list and index - * @returns list with removed item - * @group remove - * @shortname every n-th - * @drawable false - */ removeNthItem(inputs: Inputs.Lists.RemoveNthItemDto): T[]; - /** - * Removes items randomly by using a threshold - * @param inputs a list and a threshold for randomization of items to remove - * @returns list with removed items - * @group remove - * @shortname random remove threshold - * @drawable false - */ randomRemoveThreshold(inputs: Inputs.Lists.RandomThresholdDto): T[]; - /** - * remove duplicate numbers from the list - * @param inputs a list of numbers - * @returns list with unique numbers - * @group remove - * @shortname remove duplicates - * @drawable false - */ removeDuplicateNumbers(inputs: Inputs.Lists.RemoveDuplicatesDto): number[]; - /** - * remove duplicate numbers from the list with tolerance - * @param inputs a list of numbers and the tolerance - * @returns list with unique numbers - * @group remove - * @shortname remove duplicates tol - * @drawable false - */ removeDuplicateNumbersTolerance(inputs: Inputs.Lists.RemoveDuplicatesToleranceDto): number[]; - /** - * Add item to the end of the list - * @param inputs a list and an item - * @returns list with added item - * @group add - * @shortname add item to list - * @drawable false - */ + removeDuplicates(inputs: Inputs.Lists.RemoveDuplicatesDto): T[]; addItem(inputs: Inputs.Lists.AddItemDto): T[]; - /** - * Add item to the beginning of the list - * @param inputs a list and an item - * @returns list with added item - * @group add - * @shortname prepend item to list - * @drawable false - */ prependItem(inputs: Inputs.Lists.AddItemDto): T[]; - /** - * Add item to the beginning or the end of the list - * @param inputs a list, item and an option for first or last position - * @returns list with added item - * @group add - * @shortname item at first or last - * @drawable false - */ addItemFirstLast(inputs: Inputs.Lists.AddItemFirstLastDto): T[]; - /** - * Creates an empty list - * @returns an empty array list - * @group create - * @shortname empty list - * @drawable false - */ - createEmptyList(): []; - /** - * Repeat the item and add it in the new list - * @param inputs an item to multiply - * @returns list - * @group create - * @shortname repeat - * @drawable false - */ + concatenate(inputs: Inputs.Lists.ConcatenateDto): T[]; + createEmptyList(): [ + ]; repeat(inputs: Inputs.Lists.MultiplyItemDto): T[]; - /** - * Repeat the list items by adding them in the new list till the certain length of the list is reached - * @param inputs a list to multiply and a length limit - * @returns list - * @group create - * @shortname repeat in pattern - * @drawable false - */ repeatInPattern(inputs: Inputs.Lists.RepeatInPatternDto): T[]; - /** - * Sort the list of numbers in ascending or descending order - * @param inputs a list of numbers to sort and an option for ascending or descending order - * @returns list - * @group sorting - * @shortname sort numbers - * @drawable false - */ sortNumber(inputs: Inputs.Lists.SortDto): number[]; - /** - * Sort the list of texts in ascending or descending order alphabetically - * @param inputs a list of texts to sort and an option for ascending or descending order - * @returns list - * @group sorting - * @shortname sort texts - * @drawable false - */ sortTexts(inputs: Inputs.Lists.SortDto): string[]; - /** - * Sort by numeric JSON property value - * @param inputs a list to sort, a property to sort by and an option for ascending or descending order - * @returns list - * @group sorting - * @shortname sort json objects - * @drawable false - */ sortByPropValue(inputs: Inputs.Lists.SortJsonDto): any[]; - }/** - * Contains various logic methods. - */ + interleave(inputs: Inputs.Lists.InterleaveDto): T[]; + } declare class Logic { - /** - * Creates a boolean value - true or false - * @param inputs a true or false boolean - * @returns boolean - * @group create - * @shortname boolean - * @drawable false - */ boolean(inputs: Inputs.Logic.BooleanDto): boolean; - /** - * Creates a random boolean list of predefined length - * @param inputs a length and a threshold for randomization of true values - * @returns booleans - * @group create - * @shortname random booleans - * @drawable false - */ randomBooleans(inputs: Inputs.Logic.RandomBooleansDto): boolean[]; - /** - * Creates a random boolean list of true and false values based on a list of numbers. - * All values between true threshold will be true, all values above false threshold will be false, - * and the rest will be distributed between true and false based on the number of levels in a gradient pattern. - * That means that the closer the number gets to the false threshold the bigger the chance will be to get random false value. - * @param inputs a length and a threshold for randomization of true values - * @returns booleans - * @group create - * @shortname 2 threshold random gradient - * @drawable false - */ twoThresholdRandomGradient(inputs: Inputs.Logic.TwoThresholdRandomGradientDto): boolean[]; - /** - * Creates a boolean list based on a list of numbers and a threshold. - * @param inputs a length and a threshold for randomization of true values - * @returns booleans - * @group create - * @shortname threshold boolean list - * @drawable false - */ thresholdBooleanList(inputs: Inputs.Logic.ThresholdBooleanListDto): boolean[]; - /** - * Creates a boolean list based on a list of numbers and a gap thresholds. Gap thresholds are pairs of numbers that define a range of numbers that will be true. - * @param inputs a length and a threshold for randomization of true values - * @returns booleans - * @group create - * @shortname threshold gaps boolean list - * @drawable false - */ thresholdGapsBooleanList(inputs: Inputs.Logic.ThresholdGapsBooleanListDto): boolean[]; - /** - * Apply not operator on the boolean - * @param inputs a true or false boolean - * @returns boolean - * @group edit - * @shortname not - * @drawable false - */ not(inputs: Inputs.Logic.BooleanDto): boolean; - /** - * Apply not operator on a list of booleans - * @param inputs a list of true or false booleans - * @returns booleans - * @group edit - * @shortname not list - * @drawable false - */ notList(inputs: Inputs.Logic.BooleanListDto): boolean[]; - /** - * Does comparison between first and second values - * @param inputs two values to be compared - * @returns Result of the comparison - * @group operations - * @shortname compare - * @drawable false - */ compare(inputs: Inputs.Logic.ComparisonDto): boolean; - /** - * Transmits a value if boolean provided is true and undefined if boolean provided is false - * @param inputs a value and a boolean value - * @returns value or undefined - * @group operations - * @shortname value gate - * @drawable false - */ valueGate(inputs: Inputs.Logic.ValueGateDto): T | undefined; - /** - * Returns first defined value out of two - * @param inputs two values - * @returns value or undefined - * @group operations - * @shortname first defined value gate - * @drawable false - */ firstDefinedValueGate(inputs: Inputs.Logic.TwoValueGateDto): T | U | undefined; - }/** - * Contains various math methods. - */ + } declare class MathBitByBit { - /** - * Creates a number - * @param inputs a number to be created - * @returns number - * @group create - * @shortname number - * @drawable false - */ number(inputs: Inputs.Math.NumberDto): number; - /** - * Does basic math operations - * @param inputs two numbers and operator - * @returns Result of math operation action - * @group operations - * @shortname two numbers - * @drawable false - */ twoNrOperation(inputs: Inputs.Math.ActionOnTwoNumbersDto): number; - /** - * Does modulus operation - * @param inputs two numbers and operator - * @returns Result of modulus operation - * @group operations - * @shortname modulus - * @drawable false - */ modulus(inputs: Inputs.Math.ModulusDto): number; - /** - * Does rounding to decimals - * @param inputs a number and decimal places - * @returns Result of rounding - * @group operations - * @shortname round to decimals - * @drawable false - */ roundToDecimals(inputs: Inputs.Math.RoundToDecimalsDto): number; - /** - * Does basic math operations on one number - * @param inputs one number and operator action - * @returns Result of math operation - * @group operations - * @shortname one number - * @drawable false - */ + roundAndRemoveTrailingZeros(inputs: Inputs.Math.RoundToDecimalsDto): number; oneNrOperation(inputs: Inputs.Math.ActionOnOneNumberDto): number; - /** - * Remaps a number from one range to another - * @param inputs one number and operator action - * @returns Result of mapping - * @group operations - * @shortname remap - * @drawable false - */ remap(inputs: Inputs.Math.RemapNumberDto): number; - /** - * Creates a random number between 0 and 1 - * @returns A random number between 0 and 1 - * @group generate - * @shortname random 0 - 1 - * @drawable false - */ random(): number; - /** - * Creates a random number between low and high value - * @param inputs low and high numbers - * @returns A random number - * @group generate - * @shortname random number - * @drawable false - */ randomNumber(inputs: Inputs.Math.RandomNumberDto): number; - /** - * Creates random numbers between low and high values - * @param inputs low and high numbers - * @returns A list of random numbers - * @group generate - * @shortname random numbers - * @drawable false - */ randomNumbers(inputs: Inputs.Math.RandomNumbersDto): number[]; - /** - * Creates a PI number - * @returns A number PI - * @group generate - * @shortname π - * @drawable false - */ pi(): number; - /** - * Rounds the number to decimal places - * @param inputs a number to be rounded to decimal places - * @returns number - * @group operations - * @shortname to fixed - * @drawable false - */ toFixed(inputs: Inputs.Math.ToFixedDto): string; - /** - * Adds two numbers - * @param inputs two numbers - * @returns number - * @group basics - * @shortname add - * @drawable false - */ add(inputs: Inputs.Math.TwoNumbersDto): number; - /** - * Subtracts two numbers - * @param inputs two numbers - * @returns number - * @group basics - * @shortname subtract - * @drawable false - */ subtract(inputs: Inputs.Math.TwoNumbersDto): number; - /** - * Multiplies two numbers - * @param inputs two numbers - * @returns number - * @group basics - * @shortname multiply - * @drawable false - */ multiply(inputs: Inputs.Math.TwoNumbersDto): number; - /** - * Divides two numbers - * @param inputs two numbers - * @returns number - * @group basics - * @shortname divide - * @drawable false - */ divide(inputs: Inputs.Math.TwoNumbersDto): number; - /** - * Powers a number - * @param inputs two numbers - * @returns number - * @group basics - * @shortname power - * @drawable false - */ power(inputs: Inputs.Math.TwoNumbersDto): number; - /** - * Gets the square root of a number - * @param inputs a number - * @returns number - * @group basics - * @shortname sqrt - * @drawable false - */ sqrt(inputs: Inputs.Math.NumberDto): number; - /** - * Gets the absolute value of a number - * @param inputs a number - * @returns number - * @group basics - * @shortname abs - * @drawable false - */ abs(inputs: Inputs.Math.NumberDto): number; - /** - * Rounds a number - * @param inputs a number - * @returns number - * @group basics - * @shortname round - * @drawable false - */ round(inputs: Inputs.Math.NumberDto): number; - /** - * Floors a number - * @param inputs a number - * @returns number - * @group basics - * @shortname floor - * @drawable false - */ floor(inputs: Inputs.Math.NumberDto): number; - /** - * Ceils a number - * @param inputs a number - * @returns number - * @group basics - * @shortname ceil - * @drawable false - */ ceil(inputs: Inputs.Math.NumberDto): number; - /** - * Negates a number - * @param inputs a number - * @returns number - * @group basics - * @shortname negate - * @drawable false - */ negate(inputs: Inputs.Math.NumberDto): number; - /** - * Gets the natural logarithm of a number - * @param inputs a number - * @returns number - * @group basics - * @shortname ln - * @drawable false - */ ln(inputs: Inputs.Math.NumberDto): number; - /** - * Gets the base 10 logarithm of a number - * @param inputs a number - * @returns number - * @group basics - * @shortname log10 - * @drawable false - */ log10(inputs: Inputs.Math.NumberDto): number; - /** - * Raises 10 to the power of a number - * @param inputs a number - * @returns number - * @group basics - * @shortname ten pow - * @drawable false - */ tenPow(inputs: Inputs.Math.NumberDto): number; - /** - * Gets the sine of a number - * @param inputs a number - * @returns number - * @group basics - * @shortname sin - * @drawable false - */ sin(inputs: Inputs.Math.NumberDto): number; - /** - * Gets the cosine of a number - * @param inputs a number - * @returns number - * @group basics - * @shortname cos - * @drawable false - */ cos(inputs: Inputs.Math.NumberDto): number; - /** - * Gets the tangent of a number - * @param inputs a number - * @returns number - * @group basics - * @shortname tan - * @drawable false - */ tan(inputs: Inputs.Math.NumberDto): number; - /** - * Gets the arcsine of a number - * @param inputs a number - * @returns number - * @group basics - * @shortname asin - * @drawable false - */ asin(inputs: Inputs.Math.NumberDto): number; - /** - * Gets the arccosine of a number - * @param inputs a number - * @returns number - * @group basics - * @shortname acos - * @drawable false - */ acos(inputs: Inputs.Math.NumberDto): number; - /** - * Gets the arctangent of a number - * @param inputs a number - * @returns number - * @group basics - * @shortname atan - * @drawable false - */ atan(inputs: Inputs.Math.NumberDto): number; - /** - * Gets the natural exponent of a number - * @param inputs a number - * @returns number - * @group basics - * @shortname exp - * @drawable false - */ exp(inputs: Inputs.Math.NumberDto): number; - /** - * Converts degrees to radians - * @param inputs a number in degrees - * @returns number - * @group basics - * @shortname deg to rad - * @drawable false - */ degToRad(inputs: Inputs.Math.NumberDto): number; - /** - * Converts radians to degrees - * @param inputs a number in radians - * @returns number - * @group basics - * @shortname rad to deg - * @drawable false - */ radToDeg(inputs: Inputs.Math.NumberDto): number; - /** - * Eases a number by providing x parameter 0-1 and a range of output values - * @param inputs a number, min and max values, and ease type - * @returns number - * @group operations - * @shortname ease - * @drawable false - */ ease(inputs: Inputs.Math.EaseDto): number; + clamp(inputs: Inputs.Math.ClampDto): number; + lerp(inputs: Inputs.Math.LerpDto): number; + inverseLerp(inputs: Inputs.Math.InverseLerpDto): number; + smoothstep(inputs: Inputs.Math.NumberDto): number; + sign(inputs: Inputs.Math.NumberDto): number; + fract(inputs: Inputs.Math.NumberDto): number; + wrap(inputs: Inputs.Math.WrapDto): number; + pingPong(inputs: Inputs.Math.PingPongDto): number; + moveTowards(inputs: Inputs.Math.MoveTowardsDto): number; private easeInSine; private easeOutSine; private easeInOutSine; @@ -36785,756 +10698,139 @@ declare namespace Bit { private easeInBounce; private easeOutBounce; private easeInOutBounce; - }/** - * Contains various mesh helper methods that are not necessarily present in higher level CAD kernels that bitbybit is using. - */ + } declare class MeshBitByBit { private readonly vector; private readonly polyline; constructor(vector: Vector, polyline: Polyline); - /** - * Computes the signed distance from a point to a plane. - * @param inputs a point and a plane - * @returns signed distance - * @group base - * @shortname signed dist to plane - * @drawable false - */ signedDistanceToPlane(inputs: Inputs.Mesh.SignedDistanceFromPlaneToPointDto): number; - /** - * Calculates the triangle plane from triangle. - * @param inputs triangle and tolerance - * @returns triangle plane - * @group traingle - * @shortname triangle plane - * @drawable false - */ calculateTrianglePlane(inputs: Inputs.Mesh.TriangleToleranceDto): Inputs.Base.TrianglePlane3 | undefined; - /** - * Calculates the intersection of two triangles. - * @param inputs first triangle, second triangle, and tolerance - * @returns intersection segment or undefined if no intersection - * @group traingle - * @shortname triangle-triangle int - * @drawable false - */ triangleTriangleIntersection(inputs: Inputs.Mesh.TriangleTriangleToleranceDto): Inputs.Base.Segment3 | undefined; - /** - * Computes the intersection segments of two meshes. - * @param inputs first mesh, second mesh, and tolerance - * @returns array of intersection segments - * @group mesh - * @shortname mesh-mesh int segments - * @drawable false - */ meshMeshIntersectionSegments(inputs: Inputs.Mesh.MeshMeshToleranceDto): Inputs.Base.Segment3[]; - /** - * Computes the intersection polylines of two meshes. - * @param inputs first mesh, second mesh, and tolerance - * @returns array of intersection polylines - * @group mesh - * @shortname mesh-mesh int polylines - * @drawable true - */ meshMeshIntersectionPolylines(inputs: Inputs.Mesh.MeshMeshToleranceDto): Inputs.Base.Polyline3[]; - /** - * Computes the intersection points of two meshes. - * @param inputs first mesh, second mesh, and tolerance - * @returns array of intersection points - * @group mesh - * @shortname mesh-mesh int points - * @drawable false - */ meshMeshIntersectionPoints(inputs: Inputs.Mesh.MeshMeshToleranceDto): Inputs.Base.Point3[][]; private computeIntersectionPoint; - }/** - * Contains various methods for points. Point in bitbybit is simply an array containing 3 numbers for [x, y, z]. - * Because of this form Point can be interchanged with Vector, which also is an array in [x, y, z] form. - * When creating 2D points, z coordinate is simply set to 0 - [x, y, 0]. - */ + } declare class Point { private readonly geometryHelper; private readonly transforms; private readonly vector; private readonly lists; constructor(geometryHelper: GeometryHelper, transforms: Transforms, vector: Vector, lists: Lists); - /** - * Transforms the single point - * @param inputs Contains a point and the transformations to apply - * @returns Transformed point - * @group transforms - * @shortname transform point - * @drawable true - */ transformPoint(inputs: Inputs.Point.TransformPointDto): Inputs.Base.Point3; - /** - * Transforms multiple points - * @param inputs Contains points and the transformations to apply - * @returns Transformed points - * @group transforms - * @shortname transform points - * @drawable true - */ transformPoints(inputs: Inputs.Point.TransformPointsDto): Inputs.Base.Point3[]; - /** - * Transforms multiple points by multiple transformations - * @param inputs Contains points and the transformations to apply - * @returns Transformed points - * @group transforms - * @shortname transforms for points - * @drawable true - */ transformsForPoints(inputs: Inputs.Point.TransformsForPointsDto): Inputs.Base.Point3[]; - /** - * Translate multiple points - * @param inputs Contains points and the translation vector - * @returns Translated points - * @group transforms - * @shortname translate points - * @drawable true - */ translatePoints(inputs: Inputs.Point.TranslatePointsDto): Inputs.Base.Point3[]; - /** - * Translate multiple points - * @param inputs Contains points and the translation vector - * @returns Translated points - * @group transforms - * @shortname translate points with vectors - * @drawable true - */ translatePointsWithVectors(inputs: Inputs.Point.TranslatePointsWithVectorsDto): Inputs.Base.Point3[]; - /** - * Translate multiple points by x, y, z values provided - * @param inputs Contains points and the translation in x y and z - * @returns Translated points - * @group transforms - * @shortname translate xyz points - * @drawable true - */ translateXYZPoints(inputs: Inputs.Point.TranslateXYZPointsDto): Inputs.Base.Point3[]; - /** - * Scale multiple points by providing center point and x, y, z scale factors - * @param inputs Contains points, center point and scale factors - * @returns Scaled points - * @group transforms - * @shortname scale points on center - * @drawable true - */ scalePointsCenterXYZ(inputs: Inputs.Point.ScalePointsCenterXYZDto): Inputs.Base.Point3[]; - /** - * Stretch multiple points by providing center point, direction and uniform scale factor - * @param inputs Contains points, center point, direction and scale factor - * @returns Stretched points - * @group transforms - * @shortname stretch points dir from center - * @drawable true - */ stretchPointsDirFromCenter(inputs: Inputs.Point.StretchPointsDirFromCenterDto): Inputs.Base.Point3[]; - /** - * Rotate multiple points by providing center point, axis and degrees of rotation - * @param inputs Contains points, axis, center point and angle of rotation - * @returns Rotated points - * @group transforms - * @shortname rotate points center axis - * @drawable true - */ rotatePointsCenterAxis(inputs: Inputs.Point.RotatePointsCenterAxisDto): Inputs.Base.Point3[]; - /** - * Gets a bounding box of the points - * @param inputs Points - * @returns Bounding box of points - * @group extract - * @shortname bounding box pts - * @drawable true - */ boundingBoxOfPoints(inputs: Inputs.Point.PointsDto): Inputs.Base.BoundingBox; - /** - * Measures the closest distance between a point and a collection of points - * @param inputs Point from which to measure and points to measure the distance against - * @returns Distance to closest point - * @group extract - * @shortname distance to closest pt - * @drawable false - */ closestPointFromPointsDistance(inputs: Inputs.Point.ClosestPointFromPointsDto): number; - /** - * Finds the closest point index between a point and a collection of points. Caution, index is not 0 based, it starts with 1. - * @param inputs Point from which to find the index in a collection of points - * @returns Closest point index - * @group extract - * @shortname index of closest pt - * @drawable false - */ closestPointFromPointsIndex(inputs: Inputs.Point.ClosestPointFromPointsDto): number; - /** - * Finds the closest point in a collection - * @param inputs Point and points collection to find the closest point in - * @returns Closest point - * @group extract - * @shortname closest pt - * @drawable true - */ closestPointFromPoints(inputs: Inputs.Point.ClosestPointFromPointsDto): Inputs.Base.Point3; - /** - * Finds the distance between two points - * @param inputs Coordinates of start and end points - * @returns Distance - * @group measure - * @shortname distance - * @drawable false - */ distance(inputs: Inputs.Point.StartEndPointsDto): number; - /** - * Finds the distances between the start point and multiple end points - * @param inputs Coordinates of start and end points - * @returns Distances - * @group measure - * @shortname distances to points - * @drawable false - */ distancesToPoints(inputs: Inputs.Point.StartEndPointsListDto): number[]; - /** - * Multiply point by a specified amount - * @param inputs The point to be multiplied and the amount of points to create - * @returns Distance - * @group transforms - * @shortname multiply point - * @drawable true - */ multiplyPoint(inputs: Inputs.Point.MultiplyPointDto): Inputs.Base.Point3[]; - /** - * Get x coordinate of the point - * @param inputs The point - * @returns X coordinate - * @group get - * @shortname x coord - * @drawable false - */ getX(inputs: Inputs.Point.PointDto): number; - /** - * Get y coordinate of the point - * @param inputs The point - * @returns Y coordinate - * @group get - * @shortname y coord - * @drawable false - */ getY(inputs: Inputs.Point.PointDto): number; - /** - * Get z coordinate of the point - * @param inputs The point - * @returns Z coordinate - * @group get - * @shortname z coord - * @drawable false - */ getZ(inputs: Inputs.Point.PointDto): number; - /** - * Get average point of points - * @param inputs The points - * @returns point - * @group extract - * @shortname average point - * @drawable true - */ averagePoint(inputs: Inputs.Point.PointsDto): Inputs.Base.Point3; - /** - * Creates the xyz point - * @param inputs xyz information - * @returns point 3d - * @group create - * @shortname point xyz - * @drawable true - */ pointXYZ(inputs: Inputs.Point.PointXYZDto): Inputs.Base.Point3; - /** - * Creates the xy point - * @param inputs xy information - * @returns point 3d - * @group create - * @shortname point xy - * @drawable false - */ pointXY(inputs: Inputs.Point.PointXYDto): Inputs.Base.Point2; - /** - * Creates the spiral out of multiple points - * @param inputs Spiral information - * @returns Specified number of points in the array along the spiral - * @group create - * @shortname spiral - * @drawable true - */ spiral(inputs: Inputs.Point.SpiralDto): Inputs.Base.Point3[]; - /** - * Creates a flat point grid on XY plane. This grid contains center points for hexagons of the given radius. - * Be aware that we control only the nr of hexagons to be made and not the length and width of the grid. - * @param inputs Information about hexagon and the grid - * @returns Points in the array on the grid - * @group create - * @shortname hex grid - * @drawable true - */ hexGrid(inputs: Inputs.Point.HexGridCentersDto): Inputs.Base.Point3[]; - /** - * Creates a pointy-top or flat-top hexagon grid, scaling hexagons to fit specified dimensions exactly. - * Returns both center points and the vertices of each (potentially scaled) hexagon. - * Hexagons are ordered column-first, then row-first. - * @param inputs Information about the desired grid dimensions and hexagon counts. - * @returns An object containing the array of center points and an array of hexagon vertex arrays. - * @group create - * @shortname scaled hex grid to fit - * @drawable false - */ hexGridScaledToFit(inputs: Inputs.Point.HexGridScaledToFitDto): Models.Point.HexGridData; - /** - * Calculates the maximum possible fillet radius at a corner formed by two line segments - * sharing an endpoint (C), such that the fillet arc is tangent to both segments - * and lies entirely within them. - * @param inputs three points and the tolerance - * @returns the maximum fillet radius - * @group fillet - * @shortname max fillet radius - * @drawable false - */ maxFilletRadius(inputs: Inputs.Point.ThreePointsToleranceDto): number; - /** - * Calculates the maximum possible fillet radius at a corner C, such that the fillet arc - * is tangent to both segments (P1-C, P2-C) and the tangent points lie within - * the first half of each segment (measured from C). - * @param inputs three points and the tolerance - * @returns the maximum fillet radius - * @group fillet - * @shortname max fillet radius half line - * @drawable false - */ maxFilletRadiusHalfLine(inputs: Inputs.Point.ThreePointsToleranceDto): number; - /** - * Calculates the maximum possible fillet radius at each corner of a polyline formed by - * formed by a series of points. The fillet radius is calculated for each internal - * corner and optionally for the closing corners if the polyline is closed. - * @param inputs Points, checkLastWithFirst flag, and tolerance - * @returns Array of maximum fillet radii for each corner - * @group fillet - * @shortname max fillets half line - * @drawable false - */ maxFilletsHalfLine(inputs: Inputs.Point.PointsMaxFilletsHalfLineDto): number[]; - /** - * Calculates the single safest maximum fillet radius that can be applied - * uniformly to all corners of collection of points, based on the 'half-line' constraint. - * This is determined by finding the minimum of the maximum possible fillet - * radii calculated for each individual corner. - * @param inputs Defines the points, whether it's closed, and an optional tolerance. - * @returns The smallest value from the results of pointsMaxFilletsHalfLine. - * Returns 0 if the polyline has fewer than 3 points or if any - * calculated maximum radius is 0. - * @group fillet - * @shortname safest fillet radii points - * @drawable false - */ safestPointsMaxFilletHalfLine(inputs: Inputs.Point.PointsMaxFilletsHalfLineDto): number; - /** - * Removes consecutive duplicates from the point array with tolerance - * @param inputs points, tolerance and check first and last - * @returns Points in the array without consecutive duplicates - * @group clean - * @shortname remove duplicates - * @drawable true - */ removeConsecutiveDuplicates(inputs: Inputs.Point.RemoveConsecutiveDuplicatesDto): Inputs.Base.Point3[]; - /** - * Creates a normal vector from 3 points - * @param inputs Three points and the reverse normal flag - * @returns Normal vector - * @group create - * @shortname normal from 3 points - * @drawable true - */ normalFromThreePoints(inputs: Inputs.Point.ThreePointsNormalDto): Inputs.Base.Vector3; private closestPointFromPointData; - /** - * Checks if two points are almost equal - * @param inputs Two points and the tolerance - * @returns true if the points are almost equal - * @group measure - * @shortname two points almost equal - * @drawable false - */ twoPointsAlmostEqual(inputs: Inputs.Point.TwoPointsToleranceDto): boolean; - /** - * Sorts points lexicographically (X, then Y, then Z) - * @param inputs points - * @returns sorted points - * @group sort - * @shortname sort points - * @drawable true - */ sortPoints(inputs: Inputs.Point.PointsDto): Inputs.Base.Point3[]; - /** - * Calculates the 6 vertices of a regular flat-top hexagon. - * @param center The center point [x, y, z]. - * @param radius The radius (distance from center to vertex). - * @returns An array of 6 Point3 vertices in counter-clockwise order. - */ private getRegularHexagonVertices; - }/** - * Contains various methods for polyline. Polyline in bitbybit is a simple object that has points property containing an array of points. - * { points: number[][] } - */ + } declare class Polyline { private readonly vector; private readonly point; private readonly line; private readonly geometryHelper; constructor(vector: Vector, point: Point, line: Line, geometryHelper: GeometryHelper); - /** - * Gets the length of the polyline - * @param inputs a polyline - * @returns length - * @group get - * @shortname polyline length - * @drawable false - */ length(inputs: Inputs.Polyline.PolylineDto): number; - /** - * Gets the number of points in the polyline - * @param inputs a polyline - * @returns nr of points - * @group get - * @shortname nr polyline points - * @drawable false - */ countPoints(inputs: Inputs.Polyline.PolylineDto): number; - /** - * Gets the points of the polyline - * @param inputs a polyline - * @returns points - * @group get - * @shortname points - * @drawable true - */ getPoints(inputs: Inputs.Polyline.PolylineDto): Inputs.Base.Point3[]; - /** - * Reverse the points of the polyline - * @param inputs a polyline - * @returns reversed polyline - * @group convert - * @shortname reverse polyline - * @drawable true - */ reverse(inputs: Inputs.Polyline.PolylineDto): Inputs.Polyline.PolylinePropertiesDto; - /** - * Transform the polyline - * @param inputs a polyline - * @returns transformed polyline - * @group transforms - * @shortname transform polyline - * @drawable true - */ transformPolyline(inputs: Inputs.Polyline.TransformPolylineDto): Inputs.Polyline.PolylinePropertiesDto; - /** - * Create the polyline - * @param inputs points and info if its closed - * @returns polyline - * @group create - * @shortname polyline - * @drawable true - */ create(inputs: Inputs.Polyline.PolylineCreateDto): Inputs.Polyline.PolylinePropertiesDto; - /** - * Create the lines from the polyline - * @param inputs polyline - * @returns lines - * @group convert - * @shortname polyline to lines - * @drawable true - */ polylineToLines(inputs: Inputs.Polyline.PolylineDto): Inputs.Base.Line3[]; - /** - * Create the segments from the polyline - * @param inputs polyline - * @returns segments - * @group convert - * @shortname polyline to segments - * @drawable false - */ polylineToSegments(inputs: Inputs.Polyline.PolylineDto): Inputs.Base.Segment3[]; - /** - * Finds the points of self intersection of the polyline - * @param inputs points of self intersection - * @returns polyline - * @group intersections - * @shortname polyline self intersections - * @drawable true - */ polylineSelfIntersection(inputs: Inputs.Polyline.PolylineToleranceDto): Inputs.Base.Point3[]; - /** - * Finds the intersection points between two polylines - * @param inputs two polylines and tolerance - * @returns points - * @group intersection - * @shortname two polyline intersection - * @drawable true - */ twoPolylineIntersection(inputs: Inputs.Polyline.TwoPolylinesToleranceDto): Inputs.Base.Point3[]; - /** - * Create the polylines from segments that are potentially connected but scrambled randomly - * @param inputs segments - * @returns polylines - * @group sort - * @shortname segments to polylines - * @drawable true - */ sortSegmentsIntoPolylines(inputs: Inputs.Polyline.SegmentsToleranceDto): Inputs.Base.Polyline3[]; - /** - * Calculates the maximum possible half-line fillet radius for each corner - * of a given polyline. For a closed polyline, it includes the corners - * connecting the last segment back to the first. - * - * The calculation uses the 'half-line' constraint, meaning the fillet's - * tangent points must lie within the first half of each segment connected - * to the corner. - * - * @param inputs Defines the polyline points, whether it's closed, and an optional tolerance. - * @returns An array containing the maximum fillet radius calculated for each corner. - * The order corresponds to corners P[1]...P[n-2] for open polylines, - * and P[1]...P[n-2], P[0], P[n-1] for closed polylines. - * Returns an empty array if the polyline has fewer than 3 points. - * @group fillet - * @shortname polyline max fillet radii - * @drawable false - */ maxFilletsHalfLine(inputs: Inputs.Polyline.PolylineToleranceDto): number[]; - /** - * Calculates the single safest maximum fillet radius that can be applied - * uniformly to all corners of a polyline, based on the 'half-line' constraint. - * This is determined by finding the minimum of the maximum possible fillet - * radii calculated for each individual corner. - * - * @param inputs Defines the polyline points, whether it's closed, and an optional tolerance. - * @returns The smallest value from the results of calculatePolylineMaxFillets. - * Returns 0 if the polyline has fewer than 3 points or if any - * calculated maximum radius is 0. - * @group fillet - * @shortname polyline safest fillet radius - * @drawable false - */ safestFilletRadius(inputs: Inputs.Polyline.PolylineToleranceDto): number; - }/** - * Contains various text methods. - */ + } declare class TextBitByBit { private readonly point; constructor(point: Point); - /** - * Creates a text - * @param inputs a text - * @returns text - * @group create - * @shortname text - * @drawable false - */ create(inputs: Inputs.Text.TextDto): string; - /** - * Split the text to multiple pieces by a separator - * @param inputs a text - * @returns text - * @group transform - * @shortname split - * @drawable false - */ split(inputs: Inputs.Text.TextSplitDto): string[]; - /** - * Replace all occurrences of a text by another text - * @param inputs a text - * @returns text - * @group transform - * @shortname replaceAll - * @drawable false - */ replaceAll(inputs: Inputs.Text.TextReplaceDto): string; - /** - * Join multiple items by a separator into text - * @param inputs a list of items - * @returns text - * @group transform - * @shortname join - * @drawable false - */ join(inputs: Inputs.Text.TextJoinDto): string; - /** - * Transform any item to text - * @param inputs any item - * @returns text - * @group transform - * @shortname to string - * @drawable false - */ toString(inputs: Inputs.Text.ToStringDto): string; - /** - * Transform each item in list to text - * @param inputs list of items - * @returns texts - * @group transform - * @shortname to strings - * @drawable false - */ toStringEach(inputs: Inputs.Text.ToStringEachDto): string[]; - /** - * Format a text with values - * @param inputs a text and values - * @returns formatted text - * @group transform - * @shortname format - * @drawable false - */ format(inputs: Inputs.Text.TextFormatDto): string; - /** - * Creates a vector segments for character and includes width and height information - * @param inputs a text - * @returns width, height and segments as json - * @group vector - * @shortname vector char - * @drawable false - */ + includes(inputs: Inputs.Text.TextSearchDto): boolean; + startsWith(inputs: Inputs.Text.TextSearchDto): boolean; + endsWith(inputs: Inputs.Text.TextSearchDto): boolean; + indexOf(inputs: Inputs.Text.TextSearchDto): number; + lastIndexOf(inputs: Inputs.Text.TextSearchDto): number; + substring(inputs: Inputs.Text.TextSubstringDto): string; + slice(inputs: Inputs.Text.TextSubstringDto): string; + charAt(inputs: Inputs.Text.TextIndexDto): string; + trim(inputs: Inputs.Text.TextDto): string; + trimStart(inputs: Inputs.Text.TextDto): string; + trimEnd(inputs: Inputs.Text.TextDto): string; + padStart(inputs: Inputs.Text.TextPadDto): string; + padEnd(inputs: Inputs.Text.TextPadDto): string; + toUpperCase(inputs: Inputs.Text.TextDto): string; + toLowerCase(inputs: Inputs.Text.TextDto): string; + toUpperCaseFirst(inputs: Inputs.Text.TextDto): string; + toLowerCaseFirst(inputs: Inputs.Text.TextDto): string; + repeat(inputs: Inputs.Text.TextRepeatDto): string; + reverse(inputs: Inputs.Text.TextDto): string; + length(inputs: Inputs.Text.TextDto): number; + isEmpty(inputs: Inputs.Text.TextDto): boolean; + concat(inputs: Inputs.Text.TextConcatDto): string; + regexTest(inputs: Inputs.Text.TextRegexDto): boolean; + regexMatch(inputs: Inputs.Text.TextRegexDto): string[] | null; + regexReplace(inputs: Inputs.Text.TextRegexReplaceDto): string; + regexSearch(inputs: Inputs.Text.TextRegexDto): number; + regexSplit(inputs: Inputs.Text.TextRegexDto): string[]; vectorChar(inputs: Inputs.Text.VectorCharDto): Models.Text.VectorCharData; - /** - * Creates a vector text lines for a given text and includes width and height information - * @param inputs a text as string - * @returns segments - * @group vector - * @shortname vector text - * @drawable false - */ vectorText(inputs: Inputs.Text.VectorTextDto): Models.Text.VectorTextData[]; private vectorParamsChar; private translateLine; - }/** - * Transformations help to move, scale, rotate objects. You can combine multiple transformations - * for object to be placed exactly into position and orientation that you want. - * Contains various methods for transformations that represent 4x4 matrixes in flat 16 number arrays. - */ + } declare class Transforms { private readonly vector; private readonly math; constructor(vector: Vector, math: MathBitByBit); - /** - * Creates a rotation transformations around the center and an axis - * @param inputs Rotation around center with an axis information - * @returns array of transformations - * @group rotation - * @shortname center axis - * @drawable false - */ rotationCenterAxis(inputs: Inputs.Transforms.RotationCenterAxisDto): Base.TransformMatrixes; - /** - * Creates a rotation transformations around the center and an X axis - * @param inputs Rotation around center with an X axis information - * @returns array of transformations - * @group rotation - * @shortname center x - * @drawable false - */ rotationCenterX(inputs: Inputs.Transforms.RotationCenterDto): Base.TransformMatrixes; - /** - * Creates a rotation transformations around the center and an Y axis - * @param inputs Rotation around center with an Y axis information - * @returns array of transformations - * @group rotation - * @shortname center y - * @drawable false - */ rotationCenterY(inputs: Inputs.Transforms.RotationCenterDto): Base.TransformMatrixes; - /** - * Creates a rotation transformations around the center and an Z axis - * @param inputs Rotation around center with an Z axis information - * @returns array of transformations - * @group rotation - * @shortname center z - * @drawable false - */ rotationCenterZ(inputs: Inputs.Transforms.RotationCenterDto): Base.TransformMatrixes; - /** - * Creates a rotation transformations with yaw pitch and roll - * @param inputs Yaw pitch roll rotation information - * @returns array of transformations - * @group rotation - * @shortname yaw pitch roll - * @drawable false - */ rotationCenterYawPitchRoll(inputs: Inputs.Transforms.RotationCenterYawPitchRollDto): Base.TransformMatrixes; - /** - * Scale transformation around center and xyz directions - * @param inputs Scale center xyz trnansformation - * @returns array of transformations - * @group rotation - * @shortname center xyz - * @drawable false - */ scaleCenterXYZ(inputs: Inputs.Transforms.ScaleCenterXYZDto): Base.TransformMatrixes; - /** - * Creates the scale transformation in x, y and z directions - * @param inputs Scale XYZ number array information - * @returns transformation - * @group scale - * @shortname xyz - * @drawable false - */ scaleXYZ(inputs: Inputs.Transforms.ScaleXYZDto): Base.TransformMatrixes; - /** - * Creates a stretch transformation along a specific direction, relative to a center point. - * This scales points along the given direction vector while leaving points in the - * plane perpendicular to the direction (passing through the center) unchanged. - * @param inputs Defines the center, direction, and scale factor for the stretch. - * @returns Array of transformations: [Translate To Origin, Stretch, Translate Back]. - * @group scale - * @shortname stretch dir center - * @drawable false - */ stretchDirFromCenter(inputs: Inputs.Transforms.StretchDirCenterDto): Base.TransformMatrixes; - /** - * Creates uniform scale transformation - * @param inputs Scale Dto - * @returns transformation - * @group scale - * @shortname uniform - * @drawable false - */ uniformScale(inputs: Inputs.Transforms.UniformScaleDto): Base.TransformMatrixes; - /** - * Creates uniform scale transformation from the center - * @param inputs Scale Dto with center point information - * @returns array of transformations - * @group scale - * @shortname uniform from center - * @drawable false - */ uniformScaleFromCenter(inputs: Inputs.Transforms.UniformScaleFromCenterDto): Base.TransformMatrixes; - /** - * Creates the translation transformation - * @param inputs Translation information - * @returns transformation - * @group translation - * @shortname xyz - * @drawable false - */ translationXYZ(inputs: Inputs.Transforms.TranslationXYZDto): Base.TransformMatrixes; - /** - * Creates the translation transformation - * @param inputs Translation information - * @returns transformation - * @group translations - * @shortname xyz - * @drawable false - */ translationsXYZ(inputs: Inputs.Transforms.TranslationsXYZDto): Base.TransformMatrixes[]; - /** - * Creates the identity transformation - * @returns transformation - * @group identity - * @shortname identity - * @drawable false - */ identity(): Base.TransformMatrix; private translation; private scaling; @@ -37544,820 +10840,176 @@ declare namespace Bit { private rotationZ; private rotationYawPitchRoll; private rotationMatrixFromQuat; - /** - * Creates a 4x4 matrix that scales along a given direction vector. - * @param direction The direction vector (will be normalized). - * @param scale The scale factor along the direction. - * @returns A 4x4 column-major transformation matrix. - */ private stretchDirection; - }/** - * Contains various methods for vector mathematics. Vector in bitbybit is simply an array, usually containing numbers. - * In 3D [x, y, z] form describes space, where y is the up vector. - * Because of this form Vector can be interchanged with Point, which also is an array in [x, y, z] form. - */ + } declare class Vector { private readonly math; private readonly geometryHelper; constructor(math: MathBitByBit, geometryHelper: GeometryHelper); - /** - * Removes all duplicate vectors from the input array - * @param inputs Contains vectors and a tolerance value - * @returns Array of vectors without duplicates - * @group remove - * @shortname remove all duplicates - * @drawable false - */ removeAllDuplicateVectors(inputs: Inputs.Vector.RemoveAllDuplicateVectorsDto): number[][]; - /** - * Removes consecutive duplicate vectors from the input array - * @param inputs Contains vectors and a tolerance value - * @returns Array of vectors without duplicates - * @group remove - * @shortname remove consecutive duplicates - * @drawable false - */ removeConsecutiveDuplicateVectors(inputs: Inputs.Vector.RemoveConsecutiveDuplicateVectorsDto): number[][]; - /** - * Checks if two vectors are the same within a given tolerance - * @param inputs Contains two vectors and a tolerance value - * @returns Boolean indicating if vectors are the same - * @group validate - * @shortname vectors the same - * @drawable false - */ vectorsTheSame(inputs: Inputs.Vector.VectorsTheSameDto): boolean; - /** - * Measures the angle between two vectors in degrees - * @param inputs Contains two vectors represented as number arrays - * @group angles - * @shortname angle - * @returns Number in degrees - * @drawable false - */ angleBetween(inputs: Inputs.Vector.TwoVectorsDto): number; - /** - * Measures the normalized 2d angle between two vectors in degrees - * @param inputs Contains two vectors represented as number arrays - * @returns Number in degrees - * @group angles - * @shortname angle normalized 2d - * @drawable false - */ angleBetweenNormalized2d(inputs: Inputs.Vector.TwoVectorsDto): number; - /** - * Measures a positive angle between two vectors given the reference vector in degrees - * @param inputs Contains information of two vectors and a reference vector - * @returns Number in degrees - * @group angles - * @shortname positive angle - * @drawable false - */ positiveAngleBetween(inputs: Inputs.Vector.TwoVectorsReferenceDto): number; - /** - * Adds all vector xyz values together and create a new vector - * @param inputs Vectors to be added - * @returns New vector that has xyz values as sums of all the vectors - * @group sum - * @shortname add all - * @drawable false - */ addAll(inputs: Inputs.Vector.VectorsDto): number[]; - /** - * Adds two vectors together - * @param inputs Two vectors to be added - * @returns Number array representing vector - * @group sum - * @shortname add - * @drawable false - */ add(inputs: Inputs.Vector.TwoVectorsDto): number[]; - /** - * Checks if the boolean array contains only true values, if there's a single false it will return false. - * @param inputs Vectors to be checked - * @returns Boolean indicating if vector contains only true values - * @group sum - * @shortname all - * @drawable false - */ all(inputs: Inputs.Vector.VectorBoolDto): boolean; - /** - * Cross two vectors - * @param inputs Two vectors to be crossed - * @group base - * @shortname all - * @returns Crossed vector - * @drawable false - */ cross(inputs: Inputs.Vector.TwoVectorsDto): number[]; - /** - * Squared distance between two vectors - * @param inputs Two vectors - * @returns Number representing squared distance between two vectors - * @group distance - * @shortname dist squared - * @drawable false - */ distSquared(inputs: Inputs.Vector.TwoVectorsDto): number; - /** - * Distance between two vectors - * @param inputs Two vectors - * @returns Number representing distance between two vectors - * @group distance - * @shortname dist - * @drawable false - */ dist(inputs: Inputs.Vector.TwoVectorsDto): number; - /** - * Divide the vector by a scalar value - * @param inputs Contains vector and a scalar - * @returns Vector that is a result of division by a scalar - * @group base - * @shortname div - * @drawable false - */ div(inputs: Inputs.Vector.VectorScalarDto): number[]; - /** - * Computes the domain between minimum and maximum values of the vector - * @param inputs Vector information - * @returns Number representing distance between two vectors - * @group base - * @shortname domain - * @drawable false - */ domain(inputs: Inputs.Vector.VectorDto): number; - /** - * Dot product between two vectors - * @param inputs Two vectors - * @returns Number representing dot product of the vector - * @group base - * @shortname dot - * @drawable false - */ dot(inputs: Inputs.Vector.TwoVectorsDto): number; - /** - * Checks if vector is finite for each number and returns a boolean array - * @param inputs Vector with possibly infinite values - * @returns Vector array that contains boolean values for each number in the input - * vector that identifies if value is finite (true) or infinite (false) - * @group validate - * @shortname finite - * @drawable false - */ finite(inputs: Inputs.Vector.VectorDto): boolean[]; - /** - * Checks if the vector is zero length - * @param inputs Vector to be checked - * @returns Boolean that identifies if vector is zero length - * @group validate - * @shortname isZero - * @drawable false - */ isZero(inputs: Inputs.Vector.VectorDto): boolean; - /** - * Finds in between vector between two vectors by providing a fracture - * @param inputs Information for finding vector between two vectors using a fraction - * @returns Vector that is in between two vectors - * @group distance - * @shortname lerp - * @drawable false - */ lerp(inputs: Inputs.Vector.FractionTwoVectorsDto): number[]; - /** - * Finds the maximum value in the vector - * @param inputs Vector to be checked - * @returns Largest number in the vector - * @group extract - * @shortname max - * @drawable false - */ max(inputs: Inputs.Vector.VectorDto): number; - /** - * Finds the minimum value in the vector - * @param inputs Vector to be checked - * @returns Lowest number in the vector - * @group extract - * @shortname min - * @drawable false - */ min(inputs: Inputs.Vector.VectorDto): number; - /** - * Multiple vector with the scalar - * @param inputs Vector with a scalar - * @returns Vector that results from multiplication - * @group base - * @shortname mul - * @drawable false - */ mul(inputs: Inputs.Vector.VectorScalarDto): number[]; - /** - * Negates the vector - * @param inputs Vector to negate - * @returns Negative vector - * @group base - * @shortname neg - * @drawable false - */ neg(inputs: Inputs.Vector.VectorDto): number[]; - /** - * Compute squared norm - * @param inputs Vector for squared norm - * @returns Number that is squared norm - * @group base - * @shortname norm squared - * @drawable false - */ normSquared(inputs: Inputs.Vector.VectorDto): number; - /** - * Norm of the vector - * @param inputs Vector to compute the norm - * @returns Number that is norm of the vector - * @group base - * @shortname norm - * @drawable false - */ norm(inputs: Inputs.Vector.VectorDto): number; - /** - * Normalize the vector into a unit vector, that has a length of 1 - * @param inputs Vector to normalize - * @returns Unit vector that has length of 1 - * @group base - * @shortname normalized - * @drawable false - */ normalized(inputs: Inputs.Vector.VectorDto): number[]; - /** - * Finds a point coordinates on the given distance ray that spans between the point along the direction vector - * @param inputs Provide a point, vector and a distance for finding a point - * @returns Vector representing point on the ray - * @group base - * @shortname on ray - * @drawable false - */ onRay(inputs: Inputs.Vector.RayPointDto): number[]; - /** - * Create a xyz vector - * @param inputs Vector coordinates - * @returns Create a vector of xyz values - * @group create - * @shortname vector XYZ - * @drawable true - */ vectorXYZ(inputs: Inputs.Vector.VectorXYZDto): Inputs.Base.Vector3; - /** - * Create 2d xy vector - * @param inputs Vector coordinates - * @returns Create a vector of xy values - * @group create - * @shortname vector XY - * @drawable true - */ vectorXY(inputs: Inputs.Vector.VectorXYDto): Inputs.Base.Vector2; - /** - * Creates a vector of integers between 0 and maximum ceiling integer - * @param inputs Max value for the range - * @returns Vector containing items from 0 to max - * @group create - * @shortname range - * @drawable false - */ range(inputs: Inputs.Vector.RangeMaxDto): number[]; - /** - * Computes signed angle between two vectors and a reference. This will always return a smaller angle between two possible angles. - * @param inputs Contains information of two vectors and a reference vector - * @returns Signed angle in degrees - * @group angles - * @shortname signed angle - * @drawable false - */ signedAngleBetween(inputs: Inputs.Vector.TwoVectorsReferenceDto): number; - /** - * Creates a vector that contains numbers spanning between minimum and maximum values at a given step - * @param inputs Span information containing min, max and step values - * @returns Vector containing number between min, max and increasing at a given step - * @group create - * @shortname span - * @drawable false - */ span(inputs: Inputs.Vector.SpanDto): number[]; - /** - * Creates a vector that contains numbers spanning between minimum and maximum values at a given ease function - * @param inputs Span information containing min, max and ease function - * @returns Vector containing numbers between min, max and increasing in non-linear steps defined by nr of items in the vector and type - * @group create - * @shortname span ease items - * @drawable false - */ spanEaseItems(inputs: Inputs.Vector.SpanEaseItemsDto): number[]; - /** - * Creates a vector that contains numbers spanning between minimum and maximum values by giving nr of items - * @param inputs Span information containing min, max and step values - * @returns Vector containing number between min, max by giving nr of items - * @group create - * @shortname span linear items - * @drawable false - */ spanLinearItems(inputs: Inputs.Vector.SpanLinearItemsDto): number[]; - /** - * Subtract two vectors - * @param inputs Two vectors - * @returns Vector that result by subtraction two vectors - * @group base - * @shortname sub - * @drawable false - */ sub(inputs: Inputs.Vector.TwoVectorsDto): number[]; - /** - * Sums the values of the vector - * @param inputs Vector to sum - * @returns Number that results by adding up all values in the vector - * @group base - * @shortname sum - * @drawable false - */ sum(inputs: Inputs.Vector.VectorDto): number; - /** - * Computes the squared length of the vector - * @param inputs Vector to compute the length - * @returns Number that is squared length of the vector - * @group base - * @shortname length squared - * @drawable false - */ lengthSq(inputs: Inputs.Vector.Vector3Dto): number; - /** - * Computes the length of the vector - * @param inputs Vector to compute the length - * @returns Number that is length of the vector - * @group base - * @shortname length - * @drawable false - */ length(inputs: Inputs.Vector.Vector3Dto): number; - } declare const TOLERANCE = 1e-7; - declare class UnitTestHelper { - vector: Vector; - constructor(); - expectPointCloseTo(received: Inputs.Base.Point3 | Inputs.Base.Vector3 | undefined, expected: Inputs.Base.Point3 | Inputs.Base.Vector3): void; - expectPointsCloseTo(received: Inputs.Base.Point3[] | Inputs.Base.Vector3[], expected: Inputs.Base.Point3[] | Inputs.Base.Vector3[]): void; - expectLineCloseTo(received: Inputs.Base.Line3 | undefined, expected: Inputs.Base.Line3): void; - expectLinesCloseTo(received: Inputs.Base.Line3[], expected: Inputs.Base.Line3[]): void; - expectSegmentCloseTo(received: Inputs.Base.Segment3 | undefined, expected: Inputs.Base.Segment3, precision?: number): void; - expectPlaneCloseTo(received: Inputs.Base.TrianglePlane3 | undefined, expected: Inputs.Base.TrianglePlane3, precision?: number): void; - expectMatrixCloseTo(received: Inputs.Base.TransformMatrix | undefined, expected: Inputs.Base.TransformMatrix): void; - expectMatrixesCloseTo(received: Inputs.Base.TransformMatrixes | undefined, expected: Inputs.Base.TransformMatrixes): void; - /** Helper to compare two arrays of points for near-equality, ignoring order */ - expectPointArraysCloseTo(actual: Inputs.Base.Point3[] | undefined, expected: Inputs.Base.Point3[], tolerance?: number): void; - sortPoints(points: Inputs.Base.Point3[]): Inputs.Base.Point3[]; - sortPolylinesForComparison(polylines: Inputs.Base.Polyline3[]): Inputs.Base.Polyline3[]; - expectFloatArraysClose(actual: number[], expected: number[], precision: number): void; + parseNumbers(inputs: Inputs.Vector.VectorStringDto): number[]; } declare class Asset { assetManager: AssetManager; constructor(); - /** - * Gets the asset file - * @param inputs file name to get from project assets - * @returns Blob of asset - * @group get - * @shortname cloud file - */ getFile(inputs: Inputs.Asset.GetAssetDto): Promise; - /** - * Gets the local asset file stored in your browser. - * @param inputs asset name to get from local assets - * @returns Blob of asset - * @group get - * @shortname local file - */ + getTextFile(inputs: Inputs.Asset.GetAssetDto): Promise; getLocalFile(inputs: Inputs.Asset.GetAssetDto): Promise; - /** - * Fetches the blob from the given url, must be CORS enabled accessible endpoint - * @param inputs url of the asset - * @returns Blob - * @group fetch - * @shortname fetch blob - */ + getLocalTextFile(inputs: Inputs.Asset.GetAssetDto): Promise; fetchBlob(inputs: Inputs.Asset.FetchDto): Promise; - /** - * Fetches the file from the given url, must be CORS enabled accessible endpoint - * @param inputs url of the asset - * @returns File - * @group fetch - * @shortname fetch file - */ fetchFile(inputs: Inputs.Asset.FetchDto): Promise; - /** - * Fetches the json from the given url, must be CORS enabled accessible endpoint - * @param inputs url of the asset - * @returns JSON - * @group fetch - * @shortname fetch json - */ fetchJSON(inputs: Inputs.Asset.FetchDto): Promise; - /** - * Fetches the json from the given url, must be CORS enabled accessible endpoint - * @param inputs url of the asset - * @returns Text - * @group fetch - * @shortname fetch text - */ fetchText(inputs: Inputs.Asset.FetchDto): Promise; - /** - * Gets and creates the url string path to your file stored in your memory. - * @param File or a blob - * @returns URL string of a file - * @group create - * @shortname object url - */ createObjectURL(inputs: Inputs.Asset.FileDto): string; - /** - * Gets and creates the url string paths to your files stored in your memory. - * @param Files or a blobs - * @returns URL strings for given files - * @group create - * @shortname object urls - */ createObjectURLs(inputs: Inputs.Asset.FilesDto): string[]; - } declare namespace BaseTypes { - /** - * Interval represents an object that has two properties - min and max. - */ + download(inputs: Inputs.Asset.DownloadDto): void; + } + declare namespace BaseTypes { class IntervalDto { - /** - * Minimum value of the interval - */ min: number; - /** - * Maximum value of the interval - */ max: number; } - /** - * UV usually represents 2D coordinates on 3D or 2D surfaces. It is similar to XY coordinates in planes. - */ class UVDto { - /** - * U coordinate of the surface - */ u: number; - /** - * V coordinate of the surface - */ v: number; } - /** - * Intersection result of curve curve - */ class CurveCurveIntersection { - /** - * Point of intersection on the first curve - */ point0: number[]; - /** - * Point of intersection on the second curve - */ point1: number[]; - /** - * Parameter of intersection on the first curve - */ u0: number; - /** - * Parameter of intersection on the second curve - */ u1: number; } - /** - * Intersection result of curve and surface - */ class CurveSurfaceIntersection { - /** - * Parameter of intersection on the curve - */ u: number; - /** - * UV Parameters of intersection on the surface - */ uv: UVDto; - /** - * Point of intersection on the curve - */ curvePoint: number[]; - /** - * Point of intersection on the surface - */ surfacePoint: number[]; } - /** - * Intersection point between two surfaces - */ class SurfaceSurfaceIntersectionPoint { - /** - * UV parameters of intersection on first surface - */ uv0: UVDto; - /** - * UV parameters of intersection on second surface - */ uv1: UVDto; - /** - * Point of intersection - */ point: number[]; - /** - * Distance - */ dist: number; } - }/** - * Contains various json path methods. - */ + } + declare class CSVBitByBit { + parseToArray(inputs: Inputs.CSV.ParseToArrayDto): string[][]; + parseToJson>(inputs: Inputs.CSV.ParseToJsonDto): T[]; + parseToJsonWithHeaders>(inputs: Inputs.CSV.ParseToJsonWithHeadersDto): T[]; + queryColumn>(inputs: Inputs.CSV.QueryColumnDto): (string | number)[]; + queryRowsByValue>(inputs: Inputs.CSV.QueryRowsByValueDto): T[]; + arrayToCsv(inputs: Inputs.CSV.ArrayToCsvDto): string; + jsonToCsv>(inputs: Inputs.CSV.JsonToCsvDto): string; + jsonToCsvAuto>(inputs: Inputs.CSV.JsonToCsvAutoDto): string; + getHeaders(inputs: Inputs.CSV.GetHeadersDto): string[]; + getRowCount(inputs: Inputs.CSV.GetRowCountDto): number; + getColumnCount(inputs: Inputs.CSV.ParseToArrayDto): number; + private parseCsvLine; + private escapeCsvCell; + private convertEscapeSequences; + } declare class JSONBitByBit { private readonly context; constructor(context: ContextBase); - /** - * Stringifies the input value - * @param inputs a value to be stringified - * @returns string - * @group transform - * @shortname stringify - * @drawable false - */ stringify(inputs: Inputs.JSON.StringifyDto): string; - /** - * Parses the input value - * @param inputs a value to be parsed - * @returns any - * @group transform - * @shortname parse - * @drawable false - */ parse(inputs: Inputs.JSON.ParseDto): any; - /** - * Queries the input value - * @param inputs a value to be queried - * @returns any - * @group jsonpath - * @shortname query - * @drawable false - */ query(inputs: Inputs.JSON.QueryDto): any; - /** - * Sets value on given property of the given json - * @param inputs a value to be added, json and a property name - * @returns any - * @group props - * @shortname set value on property - * @drawable false - */ setValueOnProp(inputs: Inputs.JSON.SetValueOnPropDto): any; - /** - * Gets json from array by first property match. This is very simplistic search and only returns the first match. - * If you need more complex search, you can use jsonpath query with filters. - * @param inputs an array of json objects, a property name and a value to match - * @returns any - * @group props - * @shortname get json from array by prop match - * @drawable false - */ getJsonFromArrayByFirstPropMatch(inputs: Inputs.JSON.GetJsonFromArrayByFirstPropMatchDto): any; - /** - * Gets value of the property in the given json - * @param inputs a value to be added, json and a property name - * @returns any - * @group props - * @shortname get value on property - * @drawable false - */ getValueOnProp(inputs: Inputs.JSON.GetValueOnPropDto): any; - /** - * Sets value to the json by providing a path - * @param inputs a value to be added, json and a path - * @returns any - * @group jsonpath - * @shortname set value on path - * @drawable false - */ setValue(inputs: Inputs.JSON.SetValueDto): any; - /** - * Sets multiple values to the json by providing paths - * @param inputs a value to be added, json and a path - * @returns any - * @group jsonpath - * @shortname set values on paths - * @drawable false - */ setValuesOnPaths(inputs: Inputs.JSON.SetValuesOnPathsDto): any; - /** - * Find paths to elements in object matching path expression - * @param inputs a json value and a query - * @returns any - * @group jsonpath - * @shortname paths - * @drawable false - */ paths(inputs: Inputs.JSON.PathsDto): any; - /** - * Creates an empty JavaScript object - * @returns any - * @group create - * @shortname empty - * @drawable false - */ createEmpty(): any; - /** - * Previews json and gives option to save it - * @returns any - * @group preview - * @shortname json preview and save - * @drawable false - */ previewAndSaveJson(inputs: Inputs.JSON.JsonDto): void; - /** - * Previews json - * @returns any - * @group preview - * @shortname json preview - * @drawable false - */ previewJson(inputs: Inputs.JSON.JsonDto): void; - } declare class OCCTWIO extends OCCTIO { + } + declare class OCCTWIO extends OCCTIO { readonly occWorkerManager: OCCTWorkerManager; private readonly context; constructor(occWorkerManager: OCCTWorkerManager, context: ContextBase); - /** - * Imports the step or iges asset file - * @group io - * @shortname load step | iges - * @returns OCCT Shape - */ loadSTEPorIGES(inputs: Inputs.OCCT.ImportStepIgesDto): Promise; - /** - * Imports the step or iges asset file from text - * @group io - * @shortname load text step | iges - * @returns OCCT Shape - */ loadSTEPorIGESFromText(inputs: Inputs.OCCT.ImportStepIgesFromTextDto): Promise; - }/** - * Contains various methods for OpenCascade implementation - */ + } declare class OCCTW extends OCCT { readonly context: ContextBase; readonly occWorkerManager: OCCTWorkerManager; readonly io: OCCTWIO; constructor(context: ContextBase, occWorkerManager: OCCTWorkerManager); - }/** - * Tags help you to put text on top of your 3D objects. Tags are heavily used in data visualization scenarios - * where you need to convery additional textual information. - */ + } declare class Tag { private readonly context; constructor(context: ContextBase); - /** - * Creates a tag dto - * @param inputs Tag description - * @returns A tag - */ create(inputs: Inputs.Tag.TagDto): Inputs.Tag.TagDto; - /** - * Draws a single tag - * @param inputs Information to draw the tag - * @returns A tag - * @ignore true - */ drawTag(inputs: Inputs.Tag.DrawTagDto): Inputs.Tag.TagDto; - /** - * Draws multiple tags - * @param inputs Information to draw the tags - * @returns Tags - * @ignore true - */ drawTags(inputs: Inputs.Tag.DrawTagsDto): Inputs.Tag.TagDto[]; - }/** - * Time functions help to create various interactions which happen in time - */ + } declare class Time { private context; constructor(context: ContextBase); - /** - * Registers a function to render loop - * @param update The function to call in render loop - */ registerRenderFunction(update: (timePassedMs: number) => void): void; - }/** - * Contains various methods for nurbs circle. - * These methods wrap around Verbnurbs library that you can find here http://verbnurbs.com/. - * Thanks Peter Boyer for his work. - */ + } declare class VerbCurveCircle { private readonly context; private readonly math; constructor(context: ContextBase, math: MathBitByBit); - /** - * Creates the circle Nurbs curve - * @param inputs Circle parameters - * @returns Circle Nurbs curve - */ createCircle(inputs: Inputs.Verb.CircleParametersDto): any; - /** - * Creates the arc Nurbs curve - * @param inputs Arc parameters - * @returns Arc Nurbs curve - */ createArc(inputs: Inputs.Verb.ArcParametersDto): any; - /** - * Gets the center point of the circle or an arc - * @param inputs An arc or a circle Nurbs curve - * @returns Point - */ center(inputs: Inputs.Verb.CircleDto): number[]; - /** - * Gets the radius of the circle or an arc - * @param inputs An arc or a circle Nurbs curve - * @returns Radius - */ radius(inputs: Inputs.Verb.CircleDto): number; - /** - * Gets the max angle of the arc in degrees - * @param inputs Arc - * @returns Max angle in degrees - */ maxAngle(inputs: Inputs.Verb.CircleDto): number; - /** - * Gets the min angle of the arc in degrees - * @param inputs Arc - * @returns Min angle in degrees - */ minAngle(inputs: Inputs.Verb.CircleDto): number; - /** - * Gets the x angle of the arc - * @param inputs Circle - * @returns X axis vector - */ xAxis(inputs: Inputs.Verb.CircleDto): number[]; - /** - * Gets the y angle of the arc - * @param inputs Circle - * @returns Y axis vector - */ yAxis(inputs: Inputs.Verb.CircleDto): number[]; - }/** - * Contains various methods for nurbs ellipse. - * These methods wrap around Verbnurbs library that you can find here http://verbnurbs.com/. - * Thanks Peter Boyer for his work. - */ + } declare class VerbCurveEllipse { private readonly context; private readonly math; constructor(context: ContextBase, math: MathBitByBit); - /** - * Creates the ellipse Nurbs curve - * @param inputs Ellipse parameters - * @returns Ellipse Nurbs curve - */ createEllipse(inputs: Inputs.Verb.EllipseParametersDto): any; - /** - * Creates the ellipse arc Nurbs curve - * @param inputs Ellipse arc parameters - * @returns Ellipse arc Nurbs curve - */ createArc(inputs: Inputs.Verb.EllipseArcParametersDto): any; - /** - * Gets the center point of the ellipse or an arc - * @param inputs The arc or the ellipse Nurbs curve - * @returns Point - */ center(inputs: Inputs.Verb.EllipseDto): number[]; - /** - * Gets the max angle of the arc in degrees - * @param inputs Arc - * @returns Max angle in degrees - */ maxAngle(inputs: Inputs.Verb.EllipseDto): number; - /** - * Gets the min angle of the arc in degrees - * @param inputs Arc - * @returns Min angle in degrees - */ minAngle(inputs: Inputs.Verb.EllipseDto): number; - /** - * Gets the x angle of the arc or an ellipse - * @param inputs Ellipse or an arc - * @returns X axis vector - */ xAxis(inputs: Inputs.Verb.EllipseDto): number[]; - /** - * Gets the y angle of the arc or an ellipse - * @param inputs Ellipse or an arc - * @returns Y axis vector - */ yAxis(inputs: Inputs.Verb.EllipseDto): number[]; - }/** - * Contains various methods for nurbs curves. - * These methods wrap around Verbnurbs library that you can find here http://verbnurbs.com/. - * Thanks Peter Boyer for his work. - */ + } declare class VerbCurve { private readonly context; private readonly geometryHelper; @@ -38365,527 +11017,113 @@ declare namespace Bit { readonly circle: VerbCurveCircle; readonly ellipse: VerbCurveEllipse; constructor(context: ContextBase, geometryHelper: GeometryHelper, math: MathBitByBit); - /** - * Creates a Nurbs curve by providing knots, control points & weights - * @param inputs Contains knots, control points and weights - * @returns Nurbs curve - */ createCurveByKnotsControlPointsWeights(inputs: Inputs.Verb.CurveNurbsDataDto): any; - /** - * Creates a Nurbs curve by providing control points - * @param inputs Control points - * @returns Nurbs curve - */ createCurveByPoints(inputs: Inputs.Verb.CurvePathDataDto): any; - /** - * Converts lines to NURBS curves - * Returns array of the verbnurbs Line objects - * @param inputs Lines to be transformed to curves - * @returns Verb nurbs curves - */ convertLinesToNurbsCurves(inputs: Inputs.Verb.LinesDto): any[]; - /** - * Converts line to NURBS curve - * Returns the verbnurbs Line object - * @param inputs Line to be transformed to curve - * @returns Verb nurbs curves - */ convertLineToNurbsCurve(inputs: Inputs.Verb.LineDto): any; - /** - * Converts a polyline to a NURBS curve - * Returns the verbnurbs NurbsCurve object - * @param inputs Polyline to be transformed to curve - * @returns Verb nurbs curve - */ convertPolylineToNurbsCurve(inputs: Inputs.Verb.PolylineDto): any; - /** - * Converts a polylines to a NURBS curves - * Returns the verbnurbs NurbsCurve objects - * @param inputs Polylines to be transformed to curves - * @returns Verb nurbs curves - */ convertPolylinesToNurbsCurves(inputs: Inputs.Verb.PolylinesDto): any[]; - /** - * Creates a Bezier Nurbs curve by providing control points and weights - * @param inputs Control points - * @returns Bezier Nurbs curve - */ createBezierCurve(inputs: Inputs.Verb.BezierCurveDto): any; - /** - * Clone the Nurbs curve - * @param inputs Nurbs curve - * @returns Nurbs curve - */ clone(inputs: Inputs.Verb.CurveDto): any; - /** - * Finds the closest param on the Nurbs curve from the point - * @param inputs Nurbs curve with point - * @returns Param number - */ closestParam(inputs: Inputs.Verb.ClosestPointDto): number; - /** - * Finds the closest params on the Nurbs curve from the points - * @param inputs Nurbs curve with points - * @returns Param numbers - */ closestParams(inputs: Inputs.Verb.ClosestPointsDto): number[]; - /** - * Finds the closest point on the Nurbs curve from the point - * @param inputs Nurbs curve with point - * @returns Point - */ closestPoint(inputs: Inputs.Verb.ClosestPointDto): Inputs.Base.Point3; - /** - * Finds the closest points on the Nurbs curve from the list of points - * @param inputs Nurbs curve with points - * @returns Points - */ closestPoints(inputs: Inputs.Verb.ClosestPointsDto): Inputs.Base.Point3[]; - /** - * Finds the control points of the Nurbs curve - * @param inputs Nurbs curve - * @returns Points - */ controlPoints(inputs: Inputs.Verb.CurveDto): Inputs.Base.Point3[]; - /** - * Finds the degree of the Nurbs curve - * @param inputs Nurbs curve - * @returns Degree number - */ degree(inputs: Inputs.Verb.CurveDto): number; - /** - * Finds the derivatives of the Nurbs curve at parameter - * @param inputs Nurbs curve with specified derivative number and parameter - * @returns Derivatives - */ derivatives(inputs: Inputs.Verb.CurveDerivativesDto): number[]; - /** - * Divides the curve by equal arc length to parameters - * @param inputs Nurbs curve - * @returns Parameters - */ divideByEqualArcLengthToParams(inputs: Inputs.Verb.CurveSubdivisionsDto): number[]; - /** - * Divides the curve by equal arc length to points - * @param inputs Nurbs curve - * @returns Points - */ divideByEqualArcLengthToPoints(inputs: Inputs.Verb.CurveSubdivisionsDto): Inputs.Base.Point3[]; - /** - * Divides the curve by arc length to parameters - * @param inputs Nurbs curve - * @returns Parameters - */ divideByArcLengthToParams(inputs: Inputs.Verb.CurveDivideLengthDto): number[]; - /** - * Divides the curve by arc length to points - * @param inputs Nurbs curve - * @returns Points - */ divideByArcLengthToPoints(inputs: Inputs.Verb.CurveDivideLengthDto): Inputs.Base.Point3[]; - /** - * Divides multiple curves by equal arc length to points - * @param inputs Nurbs curves - * @returns Points placed for each curve in separate arrays - */ divideCurvesByEqualArcLengthToPoints(inputs: Inputs.Verb.CurvesSubdivisionsDto): Inputs.Base.Point3[][]; - /** - * Divides multiple curves by arc length to points - * @param inputs Nurbs curves - * @returns Points placed for each curve in separate arrays - */ divideCurvesByArcLengthToPoints(inputs: Inputs.Verb.CurvesDivideLengthDto): Inputs.Base.Point3[][]; - /** - * Finds the domain interval of the curve parameters - * @param inputs Nurbs curve - * @returns Interval domain - */ domain(inputs: Inputs.Verb.CurveDto): BaseTypes.IntervalDto; - /** - * Start point of the curve - * @param inputs Nurbs curve - * @returns Start point - */ startPoint(inputs: Inputs.Verb.CurveDto): Inputs.Base.Point3; - /** - * End point of the curve - * @param inputs Nurbs curve - * @returns End point - */ endPoint(inputs: Inputs.Verb.CurveDto): Inputs.Base.Point3; - /** - * Start points of the curves - * @param inputs Nurbs curves - * @returns Start points - */ startPoints(inputs: Inputs.Verb.CurvesDto): Inputs.Base.Point3[]; - /** - * End points of the curves - * @param inputs Nurbs curves - * @returns End points - */ endPoints(inputs: Inputs.Verb.CurvesDto): Inputs.Base.Point3[]; - /** - * Finds the knots of the Nurbs curve - * @param inputs Nurbs curve - * @returns Knots - */ knots(inputs: Inputs.Verb.CurveDto): number[]; - /** - * Gets the length of the Nurbs curve at specific parameter - * @param inputs Nurbs curve and parameter - * @returns Length - */ lengthAtParam(inputs: Inputs.Verb.CurveParameterDto): number; - /** - * Gets the length of the Nurbs curve - * @param inputs Nurbs curve - * @returns Length - */ length(inputs: Inputs.Verb.CurveDto): number; - /** - * Gets the param at specified length on the Nurbs curve - * @param inputs Nurbs curve, length and tolerance - * @returns Parameter - */ paramAtLength(inputs: Inputs.Verb.CurveLengthToleranceDto): number; - /** - * Gets the point at specified parameter on the Nurbs curve - * @param inputs Nurbs curve and a parameter - * @returns Point - */ pointAtParam(inputs: Inputs.Verb.CurveParameterDto): Inputs.Base.Point3; - /** - * Gets the points at specified parameter on the Nurbs curves - * @param inputs Nurbs curves and a parameter - * @returns Points in arrays for each curve - */ pointsAtParam(inputs: Inputs.Verb.CurvesParameterDto): Inputs.Base.Point3[]; - /** - * Reverses the Nurbs curve - * @param inputs Nurbs curve - * @returns Reversed Nurbs curve - */ reverse(inputs: Inputs.Verb.CurveDto): any; - /** - * Splits the Nurbs curve in two at a given parameter - * @param inputs Nurbs curve with parameter - * @returns Nurbs curves - */ split(inputs: Inputs.Verb.CurveParameterDto): any[]; - /** - * Tangent of the Nurbs curve at a given parameter - * @param inputs Nurbs curve with parameter - * @returns Tangent vector - */ tangent(inputs: Inputs.Verb.CurveParameterDto): Inputs.Base.Vector3; - /** - * Tessellates the Nurbs curve into a list of points - * @param inputs Nurbs curve with tolerance - * @returns Points - */ tessellate(inputs: Inputs.Verb.CurveToleranceDto): Inputs.Base.Point3[]; - /** - * Transforms the Nurbs curve - * @param inputs Nurbs curve with transformation matrixes - * @returns Transformed curve - */ transform(inputs: Inputs.Verb.CurveTransformDto): any; - /** - * Transforms the Nurbs curves - * @param inputs Nurbs curves with transformation matrixes - * @returns Transformed curves - */ transformCurves(inputs: Inputs.Verb.CurvesTransformDto): any[]; - /** - * Weights of the Nurbs curve - * @param inputs Nurbs curve - * @returns Weights - */ weights(inputs: Inputs.Verb.CurveDto): number[]; - }/** - * Functions that allow to intersect various geometric entities and get the results - */ + } declare class VerbIntersect { private readonly context; private readonly geometryHelper; constructor(context: ContextBase, geometryHelper: GeometryHelper); - /** - * Intersects two verb Nurbs curves together and returns intersection results - * @param inputs Two Nurbs curves - * @returns Intersection results - */ curves(inputs: Inputs.Verb.CurveCurveDto): BaseTypes.CurveCurveIntersection[]; - /** - * Intersects curve and surface - * @param inputs Nurbs curve and a Nurbs surface - * @returns Intersection results - */ curveAndSurface(inputs: Inputs.Verb.CurveSurfaceDto): BaseTypes.CurveSurfaceIntersection[]; - /** - * Intersects two surfaces - * @param inputs Nurbs curve and a Nurbs surface - * @returns Nurbs curves along the intersection - */ surfaces(inputs: Inputs.Verb.SurfaceSurfaceDto): any[]; - /** - * Gets intersection parameters on the first curve from curve-curve intersection - * @param inputs Intersections data - * @returns Parameters on first curve - */ curveCurveFirstParams(inputs: Inputs.Verb.CurveCurveIntersectionsDto): number[]; - /** - * Gets intersection parameters on the second curve from curve-curve intersection - * @param inputs Intersections data - * @returns Parameters on second curve - */ curveCurveSecondParams(inputs: Inputs.Verb.CurveCurveIntersectionsDto): number[]; - /** - * Gets intersection points on the first curve from curve-curve intersection - * @param inputs Intersections data - * @returns Points on first curve - */ curveCurveFirstPoints(inputs: Inputs.Verb.CurveCurveIntersectionsDto): number[][]; - /** - * Gets intersection points on the second curve from curve-curve intersection - * @param inputs Intersections data - * @returns Points on second curve - */ curveCurveSecondPoints(inputs: Inputs.Verb.CurveCurveIntersectionsDto): number[][]; - /** - * Gets intersection parameters on the curve from curve-surface intersection - * @param inputs Intersections data - * @returns Parameters on the curve - */ curveSurfaceCurveParams(inputs: Inputs.Verb.CurveSurfaceIntersectionsDto): number[]; - /** - * Gets intersection parameters on the surface from curve-surface intersection - * @param inputs Intersections data - * @returns Parameters on the surface - */ curveSurfaceSurfaceParams(inputs: Inputs.Verb.CurveSurfaceIntersectionsDto): BaseTypes.UVDto[]; - /** - * Gets intersection points on the curve from curve-surface intersection - * @param inputs Intersections data - * @returns Points on the curve - */ curveSurfaceCurvePoints(inputs: Inputs.Verb.CurveSurfaceIntersectionsDto): number[][]; - /** - * Gets intersection points on the surface from curve-surface intersection - * @param inputs Intersections data - * @returns Points on the surface - */ curveSurfaceSurfacePoints(inputs: Inputs.Verb.CurveSurfaceIntersectionsDto): number[][]; - }/** - * Conical surface functions. - * These functions wrap around Verbnurbs library that you can find here http://verbnurbs.com/. - * Thanks Peter Boyer for his work. - */ + } declare class VerbSurfaceConical { private readonly context; constructor(context: ContextBase); - /** - * Creates the conical Nurbs surface - * @param inputs Parameters for Nurbs conical surface - * @returns Conical Nurbs surface - */ create(inputs: Inputs.Verb.ConeAndCylinderParametersDto): any; - /** - * Get cone axis - * @param inputs Nurbs conical surface - * @returns Axis vector - */ axis(inputs: Inputs.Verb.ConeDto): number[]; - /** - * Get cone base - * @param inputs Nurbs conical surface - * @returns Base point - */ base(inputs: Inputs.Verb.ConeDto): number[]; - /** - * Get cone height - * @param inputs Nurbs conical surface - * @returns Height - */ height(inputs: Inputs.Verb.ConeDto): number; - /** - * Get cone radius - * @param inputs Nurbs conical surface - * @returns Radius - */ radius(inputs: Inputs.Verb.ConeDto): number; - /** - * Get cone x axis - * @param inputs Nurbs conical surface - * @returns X axis vector - */ xAxis(inputs: Inputs.Verb.ConeDto): number[]; - }/** - * Cylindrical surface functions. - * These functions wrap around Verbnurbs library that you can find here http://verbnurbs.com/. - * Thanks Peter Boyer for his work. - */ + } declare class VerbSurfaceCylindrical { private readonly context; constructor(context: ContextBase); - /** - * Creates the cylindrical Nurbs surface - * @param inputs Parameters for cylindrical Nurbs surface - * @returns Cylindrical Nurbs surface - */ create(inputs: Inputs.Verb.ConeAndCylinderParametersDto): any; - /** - * Get cylinder axis - * @param inputs Nurbs cylindrical surface - * @returns Axis vector - */ axis(inputs: Inputs.Verb.CylinderDto): number[]; - /** - * Get cylinder base - * @param inputs Nurbs cylindrical surface - * @returns Base point - */ base(inputs: Inputs.Verb.CylinderDto): number[]; - /** - * Get cylinder height - * @param inputs Nurbs cylindrical surface - * @returns Height - */ height(inputs: Inputs.Verb.CylinderDto): number; - /** - * Get cylinder radius - * @param inputs Nurbs cylindrical surface - * @returns Radius - */ radius(inputs: Inputs.Verb.CylinderDto): number; - /** - * Get cylinder x axis - * @param inputs Nurbs cylindrical surface - * @returns X axis vector - */ xAxis(inputs: Inputs.Verb.CylinderDto): number[]; - }/** - * Extrusion surface functions. - * These functions wrap around Verbnurbs library that you can find here http://verbnurbs.com/. - * Thanks Peter Boyer for his work. - */ + } declare class VerbSurfaceExtrusion { private readonly context; constructor(context: ContextBase); - /** - * Creates the Nurbs surface extrusion from the curve - * @param inputs Nurbs profile curve and direction vector - * @returns Nurbs surface - */ create(inputs: Inputs.Verb.ExtrusionParametersDto): any; - /** - * Gets the direction vector of the extrusion - * @param inputs Extruded Nurbs surface - * @returns Vector - */ direction(inputs: Inputs.Verb.ExtrusionDto): number[]; - /** - * Gets the profile Nurbs curve of the extrusion - * @param inputs Extruded Nurbs surface - * @returns Profile Nurbs curve - */ profile(inputs: Inputs.Verb.ExtrusionDto): number[]; - }/** - * Revolved surface functions. - * These functions wrap around Verbnurbs library that you can find here http://verbnurbs.com/. - * Thanks Peter Boyer for his work. - */ + } declare class VerbSurfaceRevolved { private readonly context; private readonly math; constructor(context: ContextBase, math: MathBitByBit); - /** - * Creates the revolved Nurbs surface - * @param inputs Parameters for Nurbs revolved surface - * @returns Revolved Nurbs surface - */ create(inputs: Inputs.Verb.RevolutionParametersDto): any; - /** - * Get the profile Nurbs curve of the revolved Nurbs surface - * @param inputs Revolved Nurbs surface - * @returns Nurbs curve - */ profile(inputs: Inputs.Verb.RevolutionDto): any; - /** - * Get the center Nurbs curve of the revolved Nurbs surface - * @param inputs Revolved Nurbs surface - * @returns Center point - */ center(inputs: Inputs.Verb.RevolutionDto): number[]; - /** - * Get the rotation axis of the revolved Nurbs surface - * @param inputs Revolved Nurbs surface - * @returns Axis vector of rotation - */ axis(inputs: Inputs.Verb.RevolutionDto): number[]; - /** - * Get the angle of rotation from revolved Nurbs surface - * @param inputs Revolved Nurbs surface - * @returns Angle in degrees - */ angle(inputs: Inputs.Verb.RevolutionDto): number; - }/** - * Spherical surface functions. - * These functions wrap around Verbnurbs library that you can find here http://verbnurbs.com/. - * Thanks Peter Boyer for his work. - */ + } declare class VerbSurfaceSpherical { private readonly context; constructor(context: ContextBase); - /** - * Creates the spherical Nurbs surface - * @param inputs Parameters for Nurbs spherical surface - * @returns Spherical Nurbs surface - */ create(inputs: Inputs.Verb.SphericalParametersDto): any; - /** - * Get the radius of the spherical Nurbs surface - * @param inputs Spherical Nurbs surface - * @returns Radius - */ radius(inputs: Inputs.Verb.SphereDto): number; - /** - * Get the center of the spherical Nurbs surface - * @param inputs Spherical Nurbs surface - * @returns Center point - */ center(inputs: Inputs.Verb.SphereDto): number[]; - }/** - * Sweep surface functions. - * These functions wrap around Verbnurbs library that you can find here http://verbnurbs.com/. - * Thanks Peter Boyer for his work. - */ + } declare class VerbSurfaceSweep { private readonly context; constructor(context: ContextBase); - /** - * Creates the sweep Nurbs surface - * @param inputs Parameters for Nurbs sweep surface - * @returns Sweep Nurbs surface - */ create(inputs: Inputs.Verb.SweepParametersDto): any; - /** - * Get the profile Nurbs curve of the swept Nurbs surface - * @param inputs Sweep Nurbs surface - * @returns Profile Nurbs curve - */ profile(inputs: Inputs.Verb.SweepDto): any; - /** - * Get the rail Nurbs curve of the swept Nurbs surface - * @param inputs Sweep Nurbs surface - * @returns Rail Nurbs curve - */ rail(inputs: Inputs.Verb.SweepDto): any; - }/** - * Contains various functions for Nurbs surfaces. - * These functions wrap around Verbnurbs library that you can find here http://verbnurbs.com/. - * Thanks Peter Boyer for his work. - */ + } declare class VerbSurface { private readonly context; private readonly geometryHelper; @@ -38897,155 +11135,31 @@ declare namespace Bit { readonly revolved: VerbSurfaceRevolved; readonly sweep: VerbSurfaceSweep; constructor(context: ContextBase, geometryHelper: GeometryHelper, math: MathBitByBit); - /** - * Gets the boundary edge Nurbs curves of the surface in a list - * @param inputs Nurbs surface - * @returns Array of curves - */ boundaries(inputs: Inputs.Verb.SurfaceDto): any[]; - /** - * Creates the surface by providing 4 points as corners - * @param inputs 4 points - * @returns Nurbs surface - */ createSurfaceByCorners(inputs: Inputs.Verb.CornersDto): any; - /** - * Creates the Nurbs surface by providing uv knots, uv degrees, points and weights - * @param inputs Surface creation information - * @returns Nurbs surface - */ createSurfaceByKnotsControlPointsWeights(inputs: Inputs.Verb.KnotsControlPointsWeightsDto): any; - /** - * Creates the Nurbs surface by lofting curves - * @param inputs Curves to loft through - * @returns Nurbs surface - */ createSurfaceByLoftingCurves(inputs: Inputs.Verb.LoftCurvesDto): any; - /** - * Clone the Nurbs surface - * @param inputs Nurbs surface - * @returns Nurbs surface - */ clone(inputs: Inputs.Verb.SurfaceDto): any; - /** - * Finds the closest parameter on the surface from the point - * @param inputs Nurbs surface with a point - * @returns UV parameters - */ closestParam(inputs: Inputs.Verb.SurfaceParamDto): BaseTypes.UVDto; - /** - * Finds the closest point on the surface from the point - * @param inputs Nurbs surface with a point - * @returns Point - */ closestPoint(inputs: Inputs.Verb.SurfaceParamDto): number[]; - /** - * Gets the control points on the surface - * @param inputs Nurbs surface - * @returns Two dimensional array of points - */ controlPoints(inputs: Inputs.Verb.SurfaceDto): number[][][]; - /** - * Gets the U degree of the surface - * @param inputs Nurbs surface - * @returns U degree - */ degreeU(inputs: Inputs.Verb.SurfaceDto): number; - /** - * Gets the V degree of the surface - * @param inputs Nurbs surface - * @returns V degree - */ degreeV(inputs: Inputs.Verb.SurfaceDto): number; - /** - * Gets the derivatives of the surface at specified uv coordinate - * @param inputs Nurbs surface - * @returns Two dimensional array of vectors - */ derivatives(inputs: Inputs.Verb.DerivativesDto): number[][][]; - /** - * Gets the U domain of the surface - * @param inputs Nurbs surface - * @returns U domain as interval - */ domainU(inputs: Inputs.Verb.SurfaceDto): BaseTypes.IntervalDto; - /** - * Gets the V domain of the surface - * @param inputs Nurbs surface - * @returns V domain as interval - */ domainV(inputs: Inputs.Verb.SurfaceDto): BaseTypes.IntervalDto; - /** - * Gets the Nurbs isocurve on the surface - * @param inputs Nurbs surface - * @returns Nurbs curve - */ isocurve(inputs: Inputs.Verb.SurfaceParameterDto): any; - /** - * Subdivides surface into preferred number of isocurves - * @param inputs Nurbs surface - * @returns Nurbs curves - */ isocurvesSubdivision(inputs: Inputs.Verb.IsocurveSubdivisionDto): any[]; - /** - * Subdivides surface into isocurves on specified array of parameters - * @param inputs Nurbs surface - * @returns Nurbs curves - */ isocurvesAtParams(inputs: Inputs.Verb.IsocurvesParametersDto): any[]; - /** - * Gets the U knots of the surface - * @param inputs Nurbs surface - * @returns Knots on u direction - */ knotsU(inputs: Inputs.Verb.SurfaceDto): number[]; - /** - * Gets the V knots of the surface - * @param inputs Nurbs surface - * @returns Knots on v direction - */ knotsV(inputs: Inputs.Verb.SurfaceDto): number[]; - /** - * Gets the normal on the surface at uv coordinate - * @param inputs Nurbs surface - * @returns Normal vector - */ normal(inputs: Inputs.Verb.SurfaceLocationDto): number[]; - /** - * Gets the point on the surface at uv coordinate - * @param inputs Nurbs surface - * @returns Point - */ point(inputs: Inputs.Verb.SurfaceLocationDto): number[]; - /** - * Reverse the Nurbs surface. This will reverse the UV origin and isocurve directions - * @param inputs Nurbs surface - * @returns Nurbs surface - */ reverse(inputs: Inputs.Verb.SurfaceDto): any; - /** - * Splits the Nurbs surface in two halfs. - * @param inputs Nurbs surface - * @returns Two Nurbs surfaces - */ split(inputs: Inputs.Verb.SurfaceParameterDto): any[]; - /** - * Transforms the Nurbs surface with a given list of transformations. - * @param inputs Nurbs surface with transforms - * @returns Nurbs surface - */ transformSurface(inputs: Inputs.Verb.SurfaceTransformDto): any; - /** - * Gets the weights of the surface - * @param inputs Nurbs surface - * @returns Two dimensional array of weights - */ weights(inputs: Inputs.Verb.SurfaceDto): number[][]; - }/** - * Contains various functions for Nurbs curves and surfaces. - * These functions wrap around Verbnurbs library that you can find here http://verbnurbs.com/. - * Thanks Peter Boyer for his work. - */ + } declare class Verb { private readonly math; readonly curve: VerbCurve; @@ -39057,516 +11171,350 @@ declare namespace Bit { private readonly occWorkerManager; private readonly context; private readonly draw; - private readonly occt; text3d: Text3D; patterns: Patterns; - constructor(occWorkerManager: OCCTWorkerManager, context: Context, draw: Draw, occt: OCCTW); - } declare class FacePatterns { + navigation: Navigation; + dimensions: Dimensions; + constructor(occWorkerManager: OCCTWorkerManager, context: Context, draw: Draw); + } + declare class Dimensions { + private readonly context; + constructor(context: ContextComplete); + linearDimension(inputs: Advanced.Dimensions.LinearDimensionDto): Advanced.Dimensions.LinearDimensionEntity; + angularDimension(inputs: Advanced.Dimensions.AngularDimensionDto): Advanced.Dimensions.AngularDimensionEntity; + radialDimension(inputs: Advanced.Dimensions.RadialDimensionDto): Advanced.Dimensions.RadialDimensionEntity; + diametralDimension(inputs: Advanced.Dimensions.DiametralDimensionDto): Advanced.Dimensions.DiametralDimensionEntity; + ordinateDimension(inputs: Advanced.Dimensions.OrdinateDimensionDto): Advanced.Dimensions.OrdinateDimensionEntity; + dimensionStyle(inputs: Advanced.Dimensions.DimensionStyleDto): Advanced.Dimensions.DimensionStyleDto; + drawLinearDimension(inputs: Advanced.Dimensions.LinearDimensionEntity): { + dispose: () => void; + }; + drawAngularDimension(inputs: Advanced.Dimensions.AngularDimensionEntity): { + dispose: () => void; + }; + drawRadialDimension(inputs: Advanced.Dimensions.RadialDimensionEntity): { + dispose: () => void; + }; + drawDiametralDimension(inputs: Advanced.Dimensions.DiametralDimensionEntity): { + dispose: () => void; + }; + drawOrdinateDimension(inputs: Advanced.Dimensions.OrdinateDimensionEntity): { + dispose: () => void; + }; + } + declare class AngularDimension { + private scene; + private data; + private style; + private arc; + private extensionLine1; + private extensionLine2; + private tangentExtension1; + private tangentExtension2; + private arrow1; + private arrow2; + private dimensionText3D; + private static readonly DEFAULT_STYLE; + constructor(options: AngularDimensionDto, scene: BABYLON.Scene); + private createDimension; + private createArc; + private createArrowTailExtensions; + private createLine; + private createArrow; + private createText; + dispose(): void; + } + declare class DiametralDimension { + private scene; + private data; + private style; + private diameterLine; + private centerMark; + private arrow1; + private arrow2; + private dimensionText3D; + constructor(options: DiametralDimensionDto, scene: BABYLON.Scene); + private create; + private createLine; + private createCenterMark; + private createArrow; + private createText; + dispose(): void; + } + declare class DimensionExpressionService { + static evaluate(expression: string, value: number, decimalPlaces: number, removeTrailingZeros?: boolean): string; + static formatDimensionText(value: number, labelOverwrite: string | undefined, decimalPlaces: number, labelSuffix: string, removeTrailingZeros?: boolean, prefix?: string): string; + static formatLinearText(distance: number, labelOverwrite: string | undefined, decimalPlaces: number, labelSuffix: string, removeTrailingZeros?: boolean): string; + static formatAngularText(angle: number, labelOverwrite: string | undefined, decimalPlaces: number, labelSuffix: string, removeTrailingZeros?: boolean): string; + static formatRadialText(radius: number, showDiameter: boolean, labelOverwrite: string | undefined, decimalPlaces: number, labelSuffix: string, removeTrailingZeros?: boolean): string; + static formatDiametralText(diameter: number, labelOverwrite: string | undefined, decimalPlaces: number, labelSuffix: string, removeTrailingZeros?: boolean): string; + static formatOrdinateText(coordinate: number, axisName: string, labelOverwrite: string | undefined, decimalPlaces: number, labelSuffix: string, removeTrailingZeros?: boolean): string; + } + declare class DimensionManager { + private linearDimensions; + private angularDimensions; + private radialDimensions; + private diametralDimensions; + private ordinateDimensions; + addLinearDimension(dimension: LinearDimension): void; + removeLinearDimension(dimension: LinearDimension): void; + addAngularDimension(dimension: AngularDimension): void; + removeAngularDimension(dimension: AngularDimension): void; + addRadialDimension(dimension: RadialDimension): void; + removeRadialDimension(dimension: RadialDimension): void; + addDiametralDimension(dimension: DiametralDimension): void; + removeDiametralDimension(dimension: DiametralDimension): void; + addOrdinateDimension(dimension: OrdinateDimension): void; + removeOrdinateDimension(dimension: OrdinateDimension): void; + clearAllDimensions(): void; + dispose(): void; + } + interface GuiTextElements { + textAnchor: BABYLON.TransformNode; + textContainer: GUI.Rectangle; + textBlock: GUI.TextBlock; + } + declare class DimensionRenderingService { + static createLine(scene: BABYLON.Scene, points: BABYLON.Vector3[], name: string, style: DimensionStyleDto, dimensionType: string): BABYLON.Mesh; + static createArrow(scene: BABYLON.Scene, position: BABYLON.Vector3, direction: BABYLON.Vector3, name: string, style: DimensionStyleDto, dimensionType: string): BABYLON.Mesh; + static create3DText(scene: BABYLON.Scene, text: string, position: BABYLON.Vector3, style: DimensionStyleDto): DimensionText3D; + static createGuiText(scene: BABYLON.Scene, adt: GUI.AdvancedDynamicTexture, text: string, position: BABYLON.Vector3, style: DimensionStyleDto): GuiTextElements; + static createCenterMark(scene: BABYLON.Scene, center: BABYLON.Vector3, style: DimensionStyleDto, dimensionType: string): BABYLON.Mesh; + } + declare class DimensionServiceManager { + private static idCounter; + static generateId(type: string): string; + static createVector3FromArray(arr: [ + number, + number, + number + ]): BABYLON.Vector3; + static getDimensionMaterial(scene: BABYLON.Scene, color: string, materialType?: "line" | "arrow"): BABYLON.StandardMaterial; + } + interface Text3DOptions { + text: string; + position: BABYLON.Vector3; + size?: number; + fontWeight?: number; + color?: string; + backgroundColor?: string; + backgroundOpacity?: number; + backgroundStroke?: boolean; + backgroundStrokeThickness?: number; + backgroundRadius?: number; + stableSize?: boolean; + billboardMode?: boolean; + alwaysOnTop?: boolean; + name?: string; + } + declare class DimensionText3D { + private scene; + private textMesh; + private material; + private dynamicTexture; + private options; + constructor(scene: BABYLON.Scene, options: Text3DOptions); + private createTextMesh; + private setupDistanceScaling; + private measureText; + updateText(newText: string): void; + updatePosition(position: BABYLON.Vector3): void; + getMesh(): BABYLON.Mesh | null; + dispose(): void; + } + declare class LinearDimension { + private scene; + private data; + private style; + private dimensionLine; + private extensionLine1; + private extensionLine2; + private arrow1; + private arrow2; + private arrowTail1; + private arrowTail2; + private dimensionText3D; + private static readonly DEFAULT_STYLE; + constructor(options: LinearDimensionDto, scene: BABYLON.Scene); + private createDimension; + private createLine; + private createArrow; + private createText; + dispose(): void; + } + declare class OrdinateDimension { + private scene; + private data; + private style; + private leaderLine; + private arrow; + private dimensionText3D; + constructor(options: OrdinateDimensionDto, scene: BABYLON.Scene); + private create; + private calculateOffsetDirection; + private createLine; + private createArrow; + private createText; + dispose(): void; + } + declare class RadialDimension { + private scene; + private data; + private style; + private radiusLine; + private centerMark; + private arrow; + private dimensionText3D; + constructor(options: RadialDimensionDto, scene: BABYLON.Scene); + private create; + private createLine; + private createCenterMark; + private createArrow; + private createText; + dispose(): void; + } + declare class CameraManager { + private scene; + private camera; + private readonly animationFrameRate; + private readonly animationDurationInFrames; + constructor(scene: BABYLON.Scene); + flyTo(newPosition: BABYLON.Vector3, newTarget: BABYLON.Vector3): void; + } + declare class PointOfInterest { + private scene; + private data; + private style; + private time; + private pointSphere; + private pulseRing; + private clickSphere; + private labelText; + private labelContainer; + private containerNode; + private pointMaterial; + private pulseMaterial; + private camera; + private static readonly DEFAULT_STYLE; + constructor(options: PointOfInterestDto, scene: BABYLON.Scene, onClick: () => void); + private create3DVisual; + private setupDistanceScaling; + private updateLabelPosition; + private createMaterials; + private createLabelText; + private updateLabelText; + private setupInteractions; + animatePulse(): void; + dispose(): void; + } + declare class Navigation { + private readonly context; + constructor(context: ContextComplete); + pointOfInterest(inputs: Advanced.Navigation.PointOfInterestDto): Advanced.Navigation.PointOfInterestEntity; + pointOfInterestStyle(inputs: Advanced.Navigation.PointOfInterestStyleDto): Advanced.Navigation.PointOfInterestStyleDto; + zoomOn(inputs: Advanced.Navigation.ZoomOnDto): Promise; + zoomOnAspect(inputs: Advanced.Navigation.ZoomOnDto): Promise; + focusFromAngle(inputs: Advanced.Navigation.FocusFromAngleDto): Promise; + drawPointOfInterest(inputs: Advanced.Navigation.PointOfInterestEntity): { + dispose: () => void; + }; + } + declare class FacePatterns { private readonly occWorkerManager; private readonly context; private readonly draw; - private readonly occt; pyramidSimple: PyramidSimple; - constructor(occWorkerManager: OCCTWorkerManager, context: Context, draw: Draw, occt: OCCTW); - } declare class PyramidSimple { + constructor(occWorkerManager: OCCTWorkerManager, context: Context, draw: Draw); + } + declare class PyramidSimple { private readonly occWorkerManager; private readonly context; private readonly draw; - private readonly occt; - constructor(occWorkerManager: OCCTWorkerManager, context: Context, draw: Draw, occt: OCCTW); - /** - * Creates a simple pyramid pattern on faces - * @param inputs - * @returns pyramid shapes along the wire - * @group create - * @shortname create simple pyramid - * @image https://ik.imagekit.io/bitbybit/app/assets/spec-cat/advanced/patterns/pyramid-simple.jpeg - * @drawable true - */ + constructor(occWorkerManager: OCCTWorkerManager, context: Context, draw: Draw); createPyramidSimple(inputs: Advanced.Patterns.FacePatterns.PyramidSimple.PyramidSimpleDto): Promise>; - /** - * Creates a simple pyramid pattern on faces with affectors that change the height - * @param inputs uv numbers, affector points and affector weights -1 to 1 - * @returns pyramid shapes along the wire - * @group create - * @shortname create simple pyramid affector - * @image https://ik.imagekit.io/bitbybit/app/assets/spec-cat/advanced/patterns/pyramid-simple.jpeg - * @drawable true - */ createPyramidSimpleAffectors(inputs: Advanced.Patterns.FacePatterns.PyramidSimple.PyramidSimpleAffectorsDto): Promise>; - /** - * Draws pyramids on the screen - * @param inputs Contains a model shapes to be drawn and additional information - * @returns BabylonJS Mesh - * @group drawing - * @shortname draw shape - * @drawable false - * @ignore true - */ drawModel(inputs: Advanced.Patterns.FacePatterns.PyramidSimple.PyramidSimpleData): Promise; - /** - * Gets the compound shape of all the pyramids - * @param inputs pyramid model - * @returns Compound shape of the pyramid - * @group get shapes - * @shortname get compound - * @image https://ik.imagekit.io/bitbybit/app/assets/spec-cat/advanced/patterns/pyramid-simple.jpeg - * @drawable true - */ getCompoundShape(inputs: Advanced.Patterns.FacePatterns.PyramidSimple.PyramidSimpleModelDto): Inputs.OCCT.TopoDSShapePointer; - /** - * Gets the compound shape on the face - * @param inputs pyramid model and face index - * @returns Compound shape of the pyramids on the face - * @group get shapes - * @shortname get compound on face - * @image https://ik.imagekit.io/bitbybit/app/assets/spec-cat/advanced/patterns/pyramid-simple.jpeg - * @drawable true - */ getCompoundShapeOnFace(inputs: Advanced.Patterns.FacePatterns.PyramidSimple.PyramidSimpleModelFaceIndexDto): Inputs.OCCT.TopoDSShapePointer; - /** - * Gets the compound shape of the pyramid on the face at particular index - * @param inputs - * @returns Compound shape of the pyramid - * @group get shapes - * @shortname get compound cell on face - * @image https://ik.imagekit.io/bitbybit/app/assets/spec-cat/advanced/patterns/pyramid-simple.jpeg - * @drawable true - */ getCompoundShapeCellOnFace(inputs: Advanced.Patterns.FacePatterns.PyramidSimple.PyramidSimpleModelFaceCellIndexDto): Inputs.OCCT.TopoDSShapePointer; - /** - * Gets all of the pyramid cells. This is usually in between action to then read particular information of the cells themselves. - * @param inputs - * @returns Compound shape of the pyramid - * @group get cells - * @shortname get all cells - * @image https://ik.imagekit.io/bitbybit/app/assets/spec-cat/advanced/patterns/pyramid-simple.jpeg - * @drawable false - */ getAllPyramidCells(inputs: Advanced.Patterns.FacePatterns.PyramidSimple.PyramidSimpleModelDto): Advanced.Patterns.FacePatterns.PyramidSimple.PyramidSimpleCellPart[]; - /** - * Gets pyramid cells on the face. This is usually in between action to then read particular information of the cells themselves. - * @param inputs - * @returns Cells of the pyramid - * @group get cells - * @shortname get cells on face - * @image https://ik.imagekit.io/bitbybit/app/assets/spec-cat/advanced/patterns/pyramid-simple.jpeg - * @drawable false - */ getAllPyramidCellsOnFace(inputs: Advanced.Patterns.FacePatterns.PyramidSimple.PyramidSimpleModelFaceIndexDto): Advanced.Patterns.FacePatterns.PyramidSimple.PyramidSimpleCellPart[]; - /** - * Gets pyramid cells on the face. This is usually in between action to then read particular information of the cells themselves. - * @param inputs - * @returns Cells of the pyramid - * @group get cells - * @shortname get cells on face - * @image https://ik.imagekit.io/bitbybit/app/assets/spec-cat/advanced/patterns/pyramid-simple.jpeg - * @drawable false - */ getAllPyramidUCellsOnFace(inputs: Advanced.Patterns.FacePatterns.PyramidSimple.PyramidSimpleModelFaceIndexDto): Advanced.Patterns.FacePatterns.PyramidSimple.PyramidSimpleCellPart[]; - /** - * Gets pyramid cells on the face at u index along v direction. This is usually in between action to then read particular information of the cells themselves. - * @param inputs - * @returns Cells of the pyramid - * @group get cells - * @shortname get cells on face at u - * @image https://ik.imagekit.io/bitbybit/app/assets/spec-cat/advanced/patterns/pyramid-simple.jpeg - * @drawable false - */ getAllPyramidUCellsOnFaceAtU(inputs: Advanced.Patterns.FacePatterns.PyramidSimple.PyramidSimpleModelFaceCellsUIndexDto): Advanced.Patterns.FacePatterns.PyramidSimple.PyramidSimpleCellPart[]; - /** - * Gets pyramid cells on the face at v index along u direction. This is usually in between action to then read particular information of the cells themselves. - * @param inputs - * @returns Cells of the pyramid - * @group get cells - * @shortname get cells on face at v - * @image https://ik.imagekit.io/bitbybit/app/assets/spec-cat/advanced/patterns/pyramid-simple.jpeg - * @drawable false - */ getAllPyramidUCellsOnFaceAtV(inputs: Advanced.Patterns.FacePatterns.PyramidSimple.PyramidSimpleModelFaceCellsVIndexDto): Advanced.Patterns.FacePatterns.PyramidSimple.PyramidSimpleCellPart[]; - /** - * Gets pyramid cell on the face at u and v index. This is usually in between action to then read particular information of the cell itself. - * @param inputs - * @returns Cell of the pyramid - * @group get cell - * @shortname get cell - * @image https://ik.imagekit.io/bitbybit/app/assets/spec-cat/advanced/patterns/pyramid-simple.jpeg - * @drawable false - */ getCellOnIndex(inputs: Advanced.Patterns.FacePatterns.PyramidSimple.PyramidSimpleModelFaceCellIndexDto): Advanced.Patterns.FacePatterns.PyramidSimple.PyramidSimpleCellPart; - /** - * Gets the top points of cells - * @param inputs cells of the pyramid - * @returns Top points on the cells - * @group get from cells - * @shortname get top points - * @image https://ik.imagekit.io/bitbybit/app/assets/spec-cat/advanced/patterns/pyramid-simple.jpeg - * @drawable true - */ getTopPointsOfCells(inputs: Advanced.Patterns.FacePatterns.PyramidSimple.PyramidSimpleModelCellsDto): Inputs.Base.Point3[]; - /** - * Gets the center point between cell corners - * @param inputs cells of the pyramid - * @returns Center points on the cells - * @group get from cells - * @shortname get center points - * @image https://ik.imagekit.io/bitbybit/app/assets/spec-cat/advanced/patterns/pyramid-simple.jpeg - * @drawable true - */ getCenterPointsOfCells(inputs: Advanced.Patterns.FacePatterns.PyramidSimple.PyramidSimpleModelCellsDto): Inputs.Base.Point3[]; - /** - * Gets the corner points of cells - * @param inputs cells of the pyramid - * @returns Corner points on cells provided - * @group get from cells - * @shortname get corner points of cells - * @image https://ik.imagekit.io/bitbybit/app/assets/spec-cat/advanced/patterns/pyramid-simple.jpeg - * @drawable false - */ getCornerPointsOfCells(inputs: Advanced.Patterns.FacePatterns.PyramidSimple.PyramidSimpleModelCellsDto): Inputs.Base.Point3[][]; - /** - * Gets the corner points of cells - * @param inputs cells of the pyramid - * @returns Corner points on cells provided - * @group get from cells - * @shortname get corner point of cells - * @image https://ik.imagekit.io/bitbybit/app/assets/spec-cat/advanced/patterns/pyramid-simple.jpeg - * @drawable true - */ getCornerPointOfCells(inputs: Advanced.Patterns.FacePatterns.PyramidSimple.PyramidSimpleModelCellsIndexDto): Inputs.Base.Point3[]; - /** - * Gets the corner normal of cells - * @param inputs cells of the pyramid - * @returns Corner normals on cells provided - * @group get from cells - * @shortname get corner normal of cells - * @image https://ik.imagekit.io/bitbybit/app/assets/spec-cat/advanced/patterns/pyramid-simple.jpeg - * @drawable false - */ getCornerNormalOfCells(inputs: Advanced.Patterns.FacePatterns.PyramidSimple.PyramidSimpleModelCellsIndexDto): Inputs.Base.Point3[]; - /** - * Gets the corner normals of cells - * @param inputs cells of the pyramid - * @returns Corner normals on cells provided - * @group get from cells - * @shortname get corner normals of cells - * @image https://ik.imagekit.io/bitbybit/app/assets/spec-cat/advanced/patterns/pyramid-simple.jpeg - * @drawable false - */ getCornerNormalsOfCells(inputs: Advanced.Patterns.FacePatterns.PyramidSimple.PyramidSimpleModelCellsDto): Inputs.Base.Point3[][]; - /** - * Gets the compound shapes of the pyramid cells - * @param inputs cells of the pyramid - * @returns Compound shapes on cells provided - * @group get from cells - * @shortname get compound shapes - * @image https://ik.imagekit.io/bitbybit/app/assets/spec-cat/advanced/patterns/pyramid-simple.jpeg - * @drawable true - */ getCompoundShapesOfCells(inputs: Advanced.Patterns.FacePatterns.PyramidSimple.PyramidSimpleModelCellsDto): Inputs.OCCT.TopoDSShapePointer[]; - /** - * Gets the face shapes of the pyramid cells provided - * @param inputs cells of the pyramid - * @returns Face shapes on cells provided - * @group get from cells - * @shortname get face shapes - * @image https://ik.imagekit.io/bitbybit/app/assets/spec-cat/advanced/patterns/pyramid-simple.jpeg - * @drawable true - */ getFaceShapesOfCells(inputs: Advanced.Patterns.FacePatterns.PyramidSimple.PyramidSimpleModelCellsIndexDto): Inputs.OCCT.TopoDSShapePointer[]; - /** - * Gets the face shapes of the pyramid cells provided - * @param inputs cells of the pyramid - * @returns Wire shapes on cells provided - * @group get from cells - * @shortname get wire shapes - * @image https://ik.imagekit.io/bitbybit/app/assets/spec-cat/advanced/patterns/pyramid-simple.jpeg - * @drawable true - */ getWireShapesOfCells(inputs: Advanced.Patterns.FacePatterns.PyramidSimple.PyramidSimpleModelCellsIndexDto): Inputs.OCCT.TopoDSShapePointer[]; - /** - * Gets the polyline wire along the start edge of the face's U direction - * @param inputs pyramid model and face index - * @returns Wire shapes - * @group get from face - * @shortname get start polyline wire u - * @image https://ik.imagekit.io/bitbybit/app/assets/spec-cat/advanced/patterns/pyramid-simple.jpeg - * @drawable true - */ getStartPolylineWireU(inputs: Advanced.Patterns.FacePatterns.PyramidSimple.PyramidSimpleModelFaceIndexDto): Inputs.OCCT.TopoDSShapePointer; - /** - * Gets the polyline wire along the end edge of the face's U direction - * @param inputs pyramid model and face index - * @returns Wire shapes - * @group get from face - * @shortname get end polyline wire u - * @image https://ik.imagekit.io/bitbybit/app/assets/spec-cat/advanced/patterns/pyramid-simple.jpeg - * @drawable true - */ getEndPolylineWireU(inputs: Advanced.Patterns.FacePatterns.PyramidSimple.PyramidSimpleModelFaceIndexDto): Inputs.OCCT.TopoDSShapePointer; - /** - * Gets the polyline wire along the start edge of the face's V direction - * @param inputs pyramid model and face index - * @returns Wire shapes - * @group get from face - * @shortname get start polyline wire v - * @image https://ik.imagekit.io/bitbybit/app/assets/spec-cat/advanced/patterns/pyramid-simple.jpeg - * @drawable true - */ getStartPolylineWireV(inputs: Advanced.Patterns.FacePatterns.PyramidSimple.PyramidSimpleModelFaceIndexDto): Inputs.OCCT.TopoDSShapePointer; - /** - * Gets the polyline wire along the end edge of the face's V direction - * @param inputs pyramid model and face index - * @returns Wire shapes - * @group get from face - * @shortname get end polyline wire v - * @image https://ik.imagekit.io/bitbybit/app/assets/spec-cat/advanced/patterns/pyramid-simple.jpeg - * @drawable true - */ getEndPolylineWireV(inputs: Advanced.Patterns.FacePatterns.PyramidSimple.PyramidSimpleModelFaceIndexDto): Inputs.OCCT.TopoDSShapePointer; - /** - * Gets the polyline wires along U direction - * @param inputs pyramid model and face index - * @returns Wire shapes - * @group get from face - * @shortname get compound polyline wires u - * @image https://ik.imagekit.io/bitbybit/app/assets/spec-cat/advanced/patterns/pyramid-simple.jpeg - * @drawable true - */ getPolylineWiresUCompound(inputs: Advanced.Patterns.FacePatterns.PyramidSimple.PyramidSimpleModelFaceIndexDto): Inputs.OCCT.TopoDSShapePointer; - /** - * Gets the polyline wires along V direction - * @param inputs pyramid model and face index - * @returns Wire shapes - * @group get from face - * @shortname get compound polyline wires v - * @image https://ik.imagekit.io/bitbybit/app/assets/spec-cat/advanced/patterns/pyramid-simple.jpeg - * @drawable true - */ getPolylineWiresVCompound(inputs: Advanced.Patterns.FacePatterns.PyramidSimple.PyramidSimpleModelFaceIndexDto): Inputs.OCCT.TopoDSShapePointer; - } declare class Patterns { + } + declare class Patterns { private readonly occWorkerManager; private readonly context; private readonly draw; - private readonly occt; facePatterns: FacePatterns; - constructor(occWorkerManager: OCCTWorkerManager, context: Context, draw: Draw, occt: OCCTW); - } declare class Text3D { + constructor(occWorkerManager: OCCTWorkerManager, context: Context, draw: Draw); + } + declare class Text3D { private readonly occWorkerManager; private readonly context; private readonly draw; - private readonly occt; - constructor(occWorkerManager: OCCTWorkerManager, context: Context, draw: Draw, occt: OCCTW); - /** - * Creates a 3d text - * @param inputs - * @returns 3d text - * @group create - * @shortname create 3d text - * @drawable true - */ + constructor(occWorkerManager: OCCTWorkerManager, context: Context, draw: Draw); create(inputs: Advanced.Text3D.Text3DDto): Promise>; - /** - * Creates a 3d text on the face - * @param inputs - * @returns 3d text - * @group create - * @shortname create 3d text on face - * @drawable true - */ + createWithUrl(inputs: Advanced.Text3D.Text3DUrlDto): Promise>; createTextOnFace(inputs: Advanced.Text3D.Text3DFaceDto): Promise>; - /** - * Creates 3d texts on the face from multiple definitions - * @param inputs - * @returns 3d text - * @group create - * @shortname create 3d texts on face - * @drawable true - */ + createTextOnFaceUrl(inputs: Advanced.Text3D.Text3DFaceUrlDto): Promise>; createTextsOnFace(inputs: Advanced.Text3D.Texts3DFaceDto): Promise>; - /** - * Creates 3d text that will be used on the face defintion - * @param inputs - * @returns definition - * @group definitions - * @shortname 3d text face def - * @drawable false - */ + createTextsOnFaceUrl(inputs: Advanced.Text3D.Texts3DFaceUrlDto): Promise>; definition3dTextOnFace(inputs: Advanced.Text3D.Text3DFaceDefinitionDto): Advanced.Text3D.Text3DFaceDefinitionDto; - /** - * Draws 3d text on the screen - * @param inputs Contains a model shapes to be drawn and additional information - * @returns BabylonJS Mesh - * @group drawing - * @shortname draw shape - * @drawable false - * @ignore true - */ + definition3dTextOnFaceUrl(inputs: Advanced.Text3D.Text3DFaceDefinitionUrlDto): Advanced.Text3D.Text3DFaceDefinitionUrlDto; drawModel(inputs: Advanced.Text3D.Text3DData, precision?: number): Promise; - /** - * Gets compounded shape of the 3d text result - * @param inputs - * @returns compounded OCCT shape - * @group get - * @shortname compound shape - * @drawable true - */ getCompoundShape(inputs: Advanced.Text3D.Text3DModelDto): Inputs.OCCT.TopoDSShapePointer; - /** - * Gets the character shape at particular index - * @param inputs - * @returns character OCCT shape of the 3d text result at index - * @group get - * @shortname character shape - * @drawable true - */ getCharacterShape(inputs: Advanced.Text3D.Text3DLetterByIndexDto): Inputs.OCCT.TopoDSShapePointer; - /** - * Gets character shapes of the 3d text result - * @param inputs - * @returns character OCCT shapes of the 3d text result - * @group get - * @shortname character shapes - * @drawable true - */ getCharacterShapes(inputs: Advanced.Text3D.Text3DModelDto): Inputs.OCCT.TopoDSShapePointer[]; - /** - * Gets the center of mass coordinates of all characters - * @param inputs - * @returns character coordinates as points - * @group get - * @shortname character coordinates - * @drawable true - */ getCharacterCenterCoordinates(inputs: Advanced.Text3D.Text3DModelDto): Inputs.Base.Point3[]; - /** - * Gets the face cutout from text 3d that was created on the face - * @param inputs - * @returns character coordinates as points - * @group get from face - * @shortname face cutout - * @drawable true - */ getFaceCutout(inputs: Advanced.Text3D.Text3DModelDto): Inputs.OCCT.TopoDSShapePointer; - /** - * Gets all of the face cutouts from text 3d that was created on the original face - * @param inputs - * @returns character coordinates as points - * @group get from face - * @shortname get all coutout faces - * @drawable true - */ getAllFacesOfCutout(inputs: Advanced.Text3D.Text3DModelDto): Inputs.OCCT.TopoDSShapePointer[]; - /** - * Gets character face cutouts from text 3d that was created on the original face - * @param inputs - * @returns character coordinates as points - * @group get from face - * @shortname get faces in characters - * @drawable true - */ getCutoutsInsideCharacters(inputs: Advanced.Text3D.Text3DModelDto): Inputs.OCCT.TopoDSShapePointer[]; - /** - * Get advance width - * @param inputs - * @returns width dimension - * @group dimensions - * @shortname get advance width - * @drawable false - */ getAdvanceWidth(inputs: Advanced.Text3D.Text3DModelDto): number; - } declare class DrawComplete extends Draw { - /** - * @ignore true - */ + } + declare class ContextComplete extends Context { + advancedDynamicTextureForFullscreenUI: GUI.AdvancedDynamicTexture; + pointsOfInterestSystem: { + observer: BABYLON.Observer; + pois: BABYLON.Nullable[]; + cameraManager: CameraManager; + }; + dimensionsSystem: { + dimensionManager: DimensionManager; + }; + } + declare class DrawComplete extends Draw { readonly drawHelper: DrawHelper; - /** - * @ignore true - */ readonly node: BabylonNode; - /** - * @ignore true - */ readonly tag: Tag; - /** - * @ignore true - */ private readonly things; - /** - * @ignore true - */ private readonly advanced; - /** - * @ignore true - */ readonly context: Context; - constructor( - /** - * @ignore true - */ - drawHelper: DrawHelper, - /** - * @ignore true - */ - node: BabylonNode, - /** - * @ignore true - */ - tag: Tag, - /** - * @ignore true - */ - things: ThingsAdv, - /** - * @ignore true - */ - advanced: AdvancedAdv, - /** - * @ignore true - */ - context: Context); - /** - * Draws any kind of geometry after all input promises are resolved. Inputs can also be non-promise like. - * @param inputs Contains options and entities to be drawn - * @returns BabylonJS Mesh Promise - * @group draw - * @shortname draw anything - * @disposableOutput true - */ - drawAnyAsync(inputs: Inputs.Draw.DrawAny): Promise; - /** - * Draws a grid mesh on the ground plane in 3D space. This helps to orient yourself in the world. - * @param inputs Describes various parameters of the grid mesh like size, colour, etc. - * @group draw - * @shortname draw grid - * @disposableOutput true - */ + constructor(drawHelper: DrawHelper, node: BabylonNode, tag: Tag, things: ThingsAdv, advanced: AdvancedAdv, context: Context); + drawAnyAsync(inputs: Inputs.Draw.DrawAny): Promise; drawGridMesh(inputs: Inputs.Draw.SceneDrawGridMeshDto): BABYLON.Mesh; - /** - * Creates draw options for basic geometry types like points, lines, polylines, surfaces and jscad meshes - * @param inputs option definition - * @returns options - * @group options - * @shortname simple - */ optionsSimple(inputs: Inputs.Draw.DrawBasicGeometryOptions): Inputs.Draw.DrawBasicGeometryOptions; - /** - * Creates draw options for occt shape geometry like edges, wires, faces, shells, solids and compounds - * @param inputs option definition - * @returns options - * @group options - * @shortname occt shape - */ optionsOcctShape(inputs: Inputs.Draw.DrawOcctShapeOptions): Inputs.Draw.DrawOcctShapeOptions; - /** - * Creates draw options for babylon js nodes - * @param inputs option definition - * @returns options - * @group options - * @shortname babylon node - */ optionsBabylonNode(inputs: Inputs.Draw.DrawNodeOptions): Inputs.Draw.DrawNodeOptions; - } declare class CreateMaterialDto { + } + declare class CreateMaterialDto { constructor(s: CreateMaterialDto); name: string; scene: BABYLON.Scene | undefined; @@ -39649,7 +11597,8 @@ declare namespace Bit { static roughPlastic(scene: BABYLON.Scene, color: string): BABYLON.PBRMaterial; private static createMaterial; private static createTexture; - } declare class ThreeDPrinting { + } + declare class ThreeDPrinting { private readonly occWorkerManager; private readonly context; private readonly draw; @@ -39659,87 +11608,34 @@ declare namespace Bit { cups: Cups; desktop: Desktop; constructor(occWorkerManager: OCCTWorkerManager, context: Context, draw: Draw, occt: OCCTW); - } declare class Boxes { + } + declare class Boxes { private readonly occWorkerManager; private readonly context; private readonly draw; - private readonly occt; spicyBox: SpicyBox; - constructor(occWorkerManager: OCCTWorkerManager, context: Context, draw: Draw, occt: OCCTW); - } declare class SpicyBox { + constructor(occWorkerManager: OCCTWorkerManager, context: Context, draw: Draw); + } + declare class SpicyBox { private readonly occWorkerManager; private readonly context; private readonly draw; - private readonly occt; - constructor(occWorkerManager: OCCTWorkerManager, context: Context, draw: Draw, occt: OCCTW); - /** - * Creates a spicy box model for your spices - * @param inputs - * @returns Spicy box model - * @group create - * @shortname spicy box - * @image https://ik.imagekit.io/bitbybit/app/assets/spec-cat/things/3dprinting/cups/dragon-cup.jpeg - * @drawable true - */ + constructor(occWorkerManager: OCCTWorkerManager, context: Context, draw: Draw); create(inputs: Things.ThreeDPrinting.Boxes.SpicyBox.SpicyBoxDto): Promise>; - /** - * Gets the compound shape of the spicy box - * @param inputs - * @returns Compound shape of the spicy box model - * @group get shapes - * @shortname compound - * @image https://ik.imagekit.io/bitbybit/app/assets/spec-cat/things/3dprinting/cups/dragon-cup.jpeg - * @drawable true - */ getCompoundShape(inputs: Things.ThreeDPrinting.Boxes.SpicyBox.SpicyBoxModelDto): Inputs.OCCT.TopoDSShapePointer; - /** - * Draws spicy box model in default settings - * @param inputs Contains a model shapes to be drawn and additional information - * @returns BabylonJS Mesh - * @group drawing - * @shortname draw shape - * @drawable false - * @image https://ik.imagekit.io/bitbybit/app/assets/spec-cat/things/3dprinting/cups/dragon-cup.jpeg - * @ignore true - */ drawModel(inputs: Things.ThreeDPrinting.Boxes.SpicyBox.SpicyBoxData): Promise; - } declare class CalmCup { + } + declare class CalmCup { private readonly occWorkerManager; private readonly context; private readonly draw; private readonly occt; constructor(occWorkerManager: OCCTWorkerManager, context: Context, draw: Draw, occt: OCCTW); - /** - * Creates a cup model for your calm moments - * @param inputs - * @returns Calm cup model - * @group create - * @shortname calm cup - * @image https://ik.imagekit.io/bitbybit/app/assets/spec-cat/things/3dprinting/cups/calm-cup.jpeg - * @drawable true - */ create(inputs: Things.ThreeDPrinting.Cups.CalmCup.CalmCupDto): Promise>; - /** - * Draws calm cup model in default settings - * @param inputs Contains a model shapes to be drawn and additional information - * @returns BabylonJS Mesh - * @group drawing - * @shortname draw shape - * @drawable false - * @image https://ik.imagekit.io/bitbybit/app/assets/spec-cat/things/3dprinting/cups/calm-cup.jpeg - * @ignore true - */ drawModel(inputs: Things.ThreeDPrinting.Cups.CalmCup.CalmCupData): Promise; - /** - * Disposes a cup model - * @param inputs Contains a model shapes to be disposed and additional information - * @group drawing - * @shortname dispose calm cup - * @drawable false - * @ignore true - */ dispose(inputs: Things.ThreeDPrinting.Vases.SerenitySwirl.SerenitySwirlData): Promise; - } declare class Cups { + } + declare class Cups { private readonly occWorkerManager; private readonly context; private readonly draw; @@ -39747,235 +11643,82 @@ declare namespace Bit { calmCup: CalmCup; dragonCup: DragonCup; constructor(occWorkerManager: OCCTWorkerManager, context: Context, draw: Draw, occt: OCCTW); - } declare class DragonCup { + } + declare class DragonCup { private readonly occWorkerManager; private readonly context; private readonly draw; - private readonly occt; - constructor(occWorkerManager: OCCTWorkerManager, context: Context, draw: Draw, occt: OCCTW); - /** - * Creates a cup model for your inner dragon - * @param inputs - * @returns Dragon cup model - * @group create - * @shortname dragon cup - * @image https://ik.imagekit.io/bitbybit/app/assets/spec-cat/things/3dprinting/cups/dragon-cup.jpeg - * @drawable true - */ + constructor(occWorkerManager: OCCTWorkerManager, context: Context, draw: Draw); create(inputs: Things.ThreeDPrinting.Cups.DragonCup.DragonCupDto): Promise>; - /** - * Gets the compound shape of the dragon cup - * @param inputs - * @returns Compound shape of the dragon cup model - * @group get shapes - * @shortname compound - * @image https://ik.imagekit.io/bitbybit/app/assets/spec-cat/things/3dprinting/cups/dragon-cup.jpeg - * @drawable true - */ getCompoundShape(inputs: Things.ThreeDPrinting.Cups.DragonCup.DragonCupModelDto): Inputs.OCCT.TopoDSShapePointer; - /** - * Draws dragon cup model in default settings - * @param inputs Contains a model shapes to be drawn and additional information - * @returns BabylonJS Mesh - * @group drawing - * @shortname draw shape - * @drawable false - * @image https://ik.imagekit.io/bitbybit/app/assets/spec-cat/things/3dprinting/cups/dragon-cup.jpeg - * @ignore true - */ drawModel(inputs: Things.ThreeDPrinting.Cups.DragonCup.DragonCupData): Promise; - } declare class Desktop { + } + declare class Desktop { private readonly occWorkerManager; private readonly context; private readonly draw; private readonly occt; phoneNest: PhoneNest; constructor(occWorkerManager: OCCTWorkerManager, context: Context, draw: Draw, occt: OCCTW); - } declare class PhoneNest { + } + declare class PhoneNest { private readonly occWorkerManager; private readonly context; private readonly draw; private readonly occt; private materials; constructor(occWorkerManager: OCCTWorkerManager, context: Context, draw: Draw, occt: OCCTW); - /** - * Creates a phone nest model - * @param inputs - * @returns phone nest model - * @group create - * @shortname phone nest - * @image https://ik.imagekit.io/bitbybit/app/assets/spec-cat/things/3dprinting/desktop/phone-nest.jpeg - * @drawable true - */ create(inputs: Things.ThreeDPrinting.Desktop.PhoneNest.PhoneNestDto): Promise>; - /** - * Gets the compound shape of the phone nest - * @param inputs - * @returns Compound shape of the phone nest model - * @group get shapes - * @shortname compound - * @image https://ik.imagekit.io/bitbybit/app/assets/spec-cat/things/3dprinting/desktop/phone-nest.jpeg - * @drawable true - */ getCompoundShape(inputs: Things.ThreeDPrinting.Desktop.PhoneNest.PhoneNestModelDto): Inputs.OCCT.TopoDSShapePointer; - /** - * Creates draw options for model - * @param inputs - * @returns Draw options - * @group draw - * @shortname phone nest draw options - * @image https://ik.imagekit.io/bitbybit/app/assets/spec-cat/things/3dprinting/desktop/phone-nest.jpeg - * @drawable false - */ drawOptions(inputs: Things.ThreeDPrinting.Desktop.PhoneNest.PhoneNestDrawDto): Things.ThreeDPrinting.Desktop.PhoneNest.PhoneNestDrawDto; - /** - * Draws phone nest model in default settings - * @param model Contains a model shapes to be drawn and additional information - * @returns BabylonJS Mesh - * @group drawing - * @shortname draw shape - * @drawable false - * @image https://ik.imagekit.io/bitbybit/app/assets/spec-cat/things/3dprinting/desktop/phone-nest.jpeg - * @ignore true - */ drawModel(model: Things.ThreeDPrinting.Desktop.PhoneNest.PhoneNestData, options: Things.ThreeDPrinting.Desktop.PhoneNest.PhoneNestDrawDto): Promise; - /** - * Disposes a model - * @param inputs Contains a model shapes to be disposed and additional information - * @group drawing - * @shortname dispose phone nest - * @drawable false - * @ignore true - */ dispose(inputs: Things.ThreeDPrinting.Desktop.PhoneNest.PhoneNestData): Promise; - /** - * Creates materials - * @param inputs Contains a model shapes to be disposed and additional information - * @group drawing - * @shortname creates default materials - * @drawable false - * @ignore true - */ private createMaterials; - } declare class EternalLove { + } + declare class EternalLove { private readonly occWorkerManager; private readonly context; private readonly draw; private readonly occt; constructor(occWorkerManager: OCCTWorkerManager, context: Context, draw: Draw, occt: OCCTW); - /** - * Creates a eternal love medal model - * @param inputs - * @returns Eternal love model - * @group create - * @shortname eternal love - * @image https://ik.imagekit.io/bitbybit/app/assets/spec-cat/things/3dprinting/Medals/EternalLove.jpeg - * @drawable true - */ create(inputs: Things.ThreeDPrinting.Medals.EternalLove.EternalLoveDto): Promise>; - /** - * Draws wingtip villa in default settings - * @param inputs Contains a model shapes to be drawn and additional information - * @returns BabylonJS Mesh - * @group drawing - * @shortname draw shape - * @drawable false - * @ignore true - */ drawModel(inputs: Things.ThreeDPrinting.Medals.EternalLove.EternalLoveData, precision?: number): Promise; - /** - * Disposes a wingtip villa model objects - * @param inputs Contains a model shapes to be disposed and additional information - * @group drawing - * @shortname dispose wingtip villa - * @drawable false - * @ignore true - */ dispose(inputs: Things.ThreeDPrinting.Vases.SerenitySwirl.SerenitySwirlData): Promise; - } declare class Medals { + } + declare class Medals { private readonly occWorkerManager; private readonly context; private readonly draw; private readonly occt; eternalLove: EternalLove; constructor(occWorkerManager: OCCTWorkerManager, context: Context, draw: Draw, occt: OCCTW); - } declare class ArabicArchway { + } + declare class ArabicArchway { private readonly occWorkerManager; private readonly context; private readonly draw; private readonly occt; private materials; constructor(occWorkerManager: OCCTWorkerManager, context: Context, draw: Draw, occt: OCCTW); - /** - * Creates a arabic archway vase - * @param inputs - * @returns Arabic archway mesh - * @group create - * @shortname arabic archway - * @image https://ik.imagekit.io/bitbybit/app/assets/spec-cat/things/3dprinting/Vases/ArabicArchway.jpeg - * @drawable true - */ create(inputs: Things.ThreeDPrinting.Vases.ArabicArchway.ArabicArchwayDto): Promise>; - /** - * Draws arabic archway in default settings - * @param inputs Contains a model shapes to be drawn and additional information - * @returns BabylonJS Mesh - * @group drawing - * @shortname draw shape - * @drawable false - * @ignore true - */ drawModel(model: Things.ThreeDPrinting.Vases.ArabicArchway.ArabicArchwayData, precision?: number): Promise; - /** - * Disposes a arabic archway model objects - * @param inputs Contains a model shapes to be disposed and additional information - * @group drawing - * @shortname dispose arabic archway - * @drawable false - * @ignore true - */ dispose(inputs: Things.ThreeDPrinting.Vases.ArabicArchway.ArabicArchwayData): Promise; - private disposeMaterials; private createMaterials; private createOpaqueMaterial; private createBaseMaterial; private createGlassMaterial; - } declare class SerenitySwirl { + } + declare class SerenitySwirl { private readonly occWorkerManager; private readonly context; private readonly draw; private readonly occt; constructor(occWorkerManager: OCCTWorkerManager, context: Context, draw: Draw, occt: OCCTW); - /** - * Creates a serenity swirl - * @param inputs - * @returns Serenity swirl mesh - * @group create - * @shortname serenity swirl - * @image https://ik.imagekit.io/bitbybit/app/assets/spec-cat/things/3dprinting/Vases/SerenitySwirl.webp - * @drawable true - */ create(inputs: Things.ThreeDPrinting.Vases.SerenitySwirl.SerenitySwirlDto): Promise>; - /** - * Draws wingtip villa in default settings - * @param inputs Contains a model shapes to be drawn and additional information - * @returns BabylonJS Mesh - * @group drawing - * @shortname draw shape - * @drawable false - * @ignore true - */ drawModel(inputs: Things.ThreeDPrinting.Vases.SerenitySwirl.SerenitySwirlData, precision?: number): Promise; - /** - * Disposes a wingtip villa model objects - * @param inputs Contains a model shapes to be disposed and additional information - * @group drawing - * @shortname dispose wingtip villa - * @drawable false - * @ignore true - */ dispose(inputs: Things.ThreeDPrinting.Vases.SerenitySwirl.SerenitySwirlData): Promise; - } declare class Vases { + } + declare class Vases { private readonly occWorkerManager; private readonly context; private readonly draw; @@ -39983,21 +11726,24 @@ declare namespace Bit { serenitySwirl: SerenitySwirl; arabicArchway: ArabicArchway; constructor(occWorkerManager: OCCTWorkerManager, context: Context, draw: Draw, occt: OCCTW); - } declare class Architecture { + } + declare class Architecture { private readonly occWorkerManager; private readonly context; private readonly draw; private readonly occt; houses: Houses; constructor(occWorkerManager: OCCTWorkerManager, context: Context, draw: Draw, occt: OCCTW); - } declare class Houses { + } + declare class Houses { private readonly occWorkerManager; private readonly context; private readonly draw; private readonly occt; zenHideout: ZenHideout; constructor(occWorkerManager: OCCTWorkerManager, context: Context, draw: Draw, occt: OCCTW); - } declare class ZenHideout { + } + declare class ZenHideout { private readonly occWorkerManager; private readonly context; private readonly draw; @@ -40005,149 +11751,40 @@ declare namespace Bit { private materials; skin: Things.Architecture.Houses.ZenHideout.ZenHideoutDrawingPartShapes; constructor(occWorkerManager: OCCTWorkerManager, context: Context, draw: Draw, occt: OCCTW); - /** - * Creates a zen hideout - * @param inputs - * @returns Zen hideout mesh - * @group create - * @shortname zen hideout - * @image https://ik.imagekit.io/bitbybit/app/assets/spec-cat/things/architecture/Houses/ZenHideout.jpeg - * @drawable true - */ create(inputs: Things.Architecture.Houses.ZenHideout.ZenHideoutDto): Promise>; - /** - * Draws wingtip villa in default settings - * @param model Contains a model shapes to be drawn and additional information - * @returns BabylonJS Mesh - * @group drawing - * @shortname draw shape - * @drawable false - * @ignore true - */ drawModel(model: Things.Architecture.Houses.ZenHideout.ZenHideoutData, precision?: number): Promise; - /** - * Disposes a zen hideout model objects - * @param inputs Contains a model shapes to be disposed and additional information - * @group drawing - * @shortname dispose zen hideout - * @drawable false - * @ignore true - */ dispose(inputs: Things.Architecture.Houses.ZenHideout.ZenHideoutData): Promise; - /** - * Creates materials - * @param inputs Contains a model shapes to be disposed and additional information - * @group drawing - * @shortname creates default materials for zen hideout - * @drawable false - * @ignore true - */ private createMaterials; private createSkin; - } declare class Enums { - /** - * Creates a level of detail enumeration value - * @param inputs - * @returns level of detail - * @group enums - * @shortname lod - * @drawable false - */ + } + declare class Enums { lodEnum(inputs: Things.Enums.LodDto): Things.Enums.lodEnum; - } declare class Chairs { + } + declare class Chairs { private readonly occWorkerManager; private readonly context; private readonly draw; private readonly occt; snakeChair: SnakeChair; constructor(occWorkerManager: OCCTWorkerManager, context: Context, draw: Draw, occt: OCCTW); - } declare class SnakeChair { + } + declare class SnakeChair { private readonly occWorkerManager; private readonly context; private readonly draw; private readonly occt; private materials; constructor(occWorkerManager: OCCTWorkerManager, context: Context, draw: Draw, occt: OCCTW); - /** - * Creates a snake chair model - * @param inputs - * @returns Snake chair model - * @group create - * @shortname snake chair - * @image https://ik.imagekit.io/bitbybit/app/assets/spec-cat/things/furniture/chairs/snake-chair.jpeg - * @drawable true - */ create(inputs: Things.Furniture.Chairs.SnakeChair.SnakeChairDto): Promise>; - /** - * Gets the compound shape of the chair - * @param inputs - * @returns Compound shape of the snake chair model - * @group get shapes - * @shortname compound - * @image https://ik.imagekit.io/bitbybit/app/assets/spec-cat/things/furniture/chairs/snake-chair.jpeg - * @drawable true - */ getCompoundShape(inputs: Things.Furniture.Chairs.SnakeChair.SnakeChairModelDto): Inputs.OCCT.TopoDSShapePointer; - /** - * Gets the wire shape of the chair sitting area - * @param inputs - * @returns Wire shape of the sitting area - * @group get shapes - * @shortname get sitting wire - * @image https://ik.imagekit.io/bitbybit/app/assets/spec-cat/things/furniture/chairs/snake-chair.jpeg - * @drawable true - */ getSittingWireShape(inputs: Things.Furniture.Chairs.SnakeChair.SnakeChairModelDto): Inputs.OCCT.TopoDSShapePointer; - /** - * Gets the center point of the chair sitting area - * @param inputs - * @returns The point on the center of the sitting area - * @group get points - * @shortname get sitting area center - * @image https://ik.imagekit.io/bitbybit/app/assets/spec-cat/things/furniture/chairs/snake-chair.jpeg - * @drawable true - */ getSittingAreaCenterPoint(inputs: Things.Furniture.Chairs.SnakeChair.SnakeChairModelDto): Inputs.Base.Point3; - /** - * Creates draw options for snake chair - * @param inputs - * @returns Draw options - * @group draw - * @shortname snake chair draw options - * @image https://ik.imagekit.io/bitbybit/app/assets/spec-cat/things/furniture/chairs/snake-chair.jpeg - * @drawable false - */ drawOptions(inputs: Things.Furniture.Chairs.SnakeChair.SnakeChairDrawDto): Things.Furniture.Chairs.SnakeChair.SnakeChairDrawDto; - /** - * Draws snake chair model in default settings - * @param model Contains a model shapes to be drawn and additional information - * @returns BabylonJS Mesh - * @group drawing - * @shortname draw shape - * @drawable false - * @image https://ik.imagekit.io/bitbybit/app/assets/spec-cat/things/furniture/chairs/snake-chair.jpeg - * @ignore true - */ drawModel(model: Things.Furniture.Chairs.SnakeChair.SnakeChairData, options: Things.Furniture.Chairs.SnakeChair.SnakeChairDrawDto): Promise; - /** - * Disposes a cup model - * @param inputs Contains a model shapes to be disposed and additional information - * @group drawing - * @shortname dispose calm cup - * @drawable false - * @ignore true - */ dispose(inputs: Things.Furniture.Chairs.SnakeChair.SnakeChairData): Promise; - /** - * Creates materials - * @param inputs Contains a model shapes to be disposed and additional information - * @group drawing - * @shortname creates default materials for zen hideout - * @drawable false - * @ignore true - */ private createMaterials; - } declare class Furniture { + } + declare class Furniture { private readonly occWorkerManager; private readonly context; private readonly draw; @@ -40155,475 +11792,77 @@ declare namespace Bit { chairs: Chairs; tables: Tables; constructor(occWorkerManager: OCCTWorkerManager, context: Context, draw: Draw, occt: OCCTW); - } declare class ElegantTable { + } + declare class ElegantTable { private readonly occWorkerManager; private readonly context; private readonly draw; private readonly occt; private materials; constructor(occWorkerManager: OCCTWorkerManager, context: Context, draw: Draw, occt: OCCTW); - /** - * Creates an elegant table model - * @param inputs - * @returns Elegant table model - * @group create - * @shortname elegant table - * @image https://ik.imagekit.io/bitbybit/app/assets/spec-cat/things/furniture/tables/elegant-table.jpeg - * @drawable true - */ create(inputs: Things.Furniture.Tables.ElegantTable.ElegantTableDto): Promise>; - /** - * Gets the compound shape of the table - * @param inputs - * @returns Compound shape of the elegant table model - * @group get shapes - * @shortname compound - * @image https://ik.imagekit.io/bitbybit/app/assets/spec-cat/things/furniture/tables/elegant-table.jpeg - * @drawable true - */ getCompoundShape(inputs: Things.Furniture.Tables.ElegantTable.ElegantTableModelDto): Inputs.OCCT.TopoDSShapePointer; - /** - * Gets the leg shapes as a list - * @param inputs - * @returns Leg shapes of the table - * @group get shapes - * @shortname legs - * @image https://ik.imagekit.io/bitbybit/app/assets/spec-cat/things/furniture/tables/elegant-table.jpeg - * @drawable true - */ getLegShapes(inputs: Things.Furniture.Tables.ElegantTable.ElegantTableModelDto): Inputs.OCCT.TopoDSShapePointer[]; - /** - * Gets the leg shape by index - * @param inputs - * @returns Leg shapes of the table - * @group get shapes - * @shortname leg by index - * @image https://ik.imagekit.io/bitbybit/app/assets/spec-cat/things/furniture/tables/elegant-table.jpeg - * @drawable true - */ getLegShapeByIndex(inputs: Things.Furniture.Tables.ElegantTable.ElegantTableLegByIndexDto): Inputs.OCCT.TopoDSShapePointer; - /** - * Gets the table top panel shape - * @param inputs - * @returns Top panel shape of the table - * @group get shapes - * @shortname top panel - * @image https://ik.imagekit.io/bitbybit/app/assets/spec-cat/things/furniture/tables/elegant-table.jpeg - * @drawable true - */ getTopPanelShape(inputs: Things.Furniture.Tables.ElegantTable.ElegantTableModelDto): Inputs.OCCT.TopoDSShapePointer; - /** - * Gets the table top panel wire shape - * @param inputs - * @returns Top panel wire shape of the table - * @group get shapes - * @shortname top panel wire - * @image https://ik.imagekit.io/bitbybit/app/assets/spec-cat/things/furniture/tables/elegant-table.jpeg - * @drawable true - */ getTopPanelWireShape(inputs: Things.Furniture.Tables.ElegantTable.ElegantTableModelDto): Inputs.OCCT.TopoDSShapePointer; - /** - * Gets the table bottom panel wire shape - * @param inputs - * @returns Bottom panel wire shape of the table - * @group get shapes - * @shortname bottom panel wire - * @image https://ik.imagekit.io/bitbybit/app/assets/spec-cat/things/furniture/tables/elegant-table.jpeg - * @drawable true - */ getBottomPanelWireShape(inputs: Things.Furniture.Tables.ElegantTable.ElegantTableModelDto): Inputs.OCCT.TopoDSShapePointer; - /** - * Gets the table bottom panel shape - * @param inputs - * @returns Bottom panel shape of the table - * @group get shapes - * @shortname bottom panel - * @image https://ik.imagekit.io/bitbybit/app/assets/spec-cat/things/furniture/tables/elegant-table.jpeg - * @drawable true - */ getBottomPanelShape(inputs: Things.Furniture.Tables.ElegantTable.ElegantTableModelDto): Inputs.OCCT.TopoDSShapePointer; - /** - * Gets the leg shapes as a compound shape - * @param inputs - * @returns Compound shape of the legs - * @group get shapes - * @shortname legs compound - * @image https://ik.imagekit.io/bitbybit/app/assets/spec-cat/things/furniture/tables/elegant-table.jpeg - * @drawable true - */ getLegsCompoundShape(inputs: Things.Furniture.Tables.ElegantTable.ElegantTableModelDto): Inputs.OCCT.TopoDSShapePointer; - /** - * Gets the top center point - * @param inputs - * @returns Top center point - * @group get points - * @shortname top center point - * @image https://ik.imagekit.io/bitbybit/app/assets/spec-cat/things/furniture/tables/elegant-table.jpeg - * @drawable true - */ getTableTopCenterPoint(inputs: Things.Furniture.Tables.ElegantTable.ElegantTableModelDto): Inputs.Base.Point3; - /** - * Gets the bottom center point - * @param inputs - * @returns Bottom center point - * @group get points - * @shortname bottom center point - * @image https://ik.imagekit.io/bitbybit/app/assets/spec-cat/things/furniture/tables/elegant-table.jpeg - * @drawable true - */ getTableBottomCenterPoint(inputs: Things.Furniture.Tables.ElegantTable.ElegantTableModelDto): Inputs.Base.Point3; - /** - * Gets the leg bottom points - * @param inputs - * @returns Bottom points - * @group get points - * @shortname leg bottom points - * @image https://ik.imagekit.io/bitbybit/app/assets/spec-cat/things/furniture/tables/elegant-table.jpeg - * @drawable true - */ getLegBottomPoints(inputs: Things.Furniture.Tables.ElegantTable.ElegantTableModelDto): Inputs.Base.Point3[]; - /** - * Gets the leg top points - * @param inputs - * @returns Top points - * @group get points - * @shortname leg top points - * @image https://ik.imagekit.io/bitbybit/app/assets/spec-cat/things/furniture/tables/elegant-table.jpeg - * @drawable true - */ getLegTopPoints(inputs: Things.Furniture.Tables.ElegantTable.ElegantTableModelDto): Inputs.Base.Point3[]; - /** - * Creates draw options for elegant table - * @param inputs - * @returns Draw options - * @group draw - * @shortname elegant table draw options - * @image https://ik.imagekit.io/bitbybit/app/assets/spec-cat/things/furniture/tables/elegant-table.jpeg - * @drawable false - */ drawOptions(inputs: Things.Furniture.Tables.ElegantTable.ElegantTableDrawDto): Things.Furniture.Tables.ElegantTable.ElegantTableDrawDto; - /** - * Draws elegant table model in default settings - * @param model Contains a model shapes to be drawn and additional information - * @returns BabylonJS Mesh - * @group drawing - * @shortname draw shape - * @drawable false - * @image https://ik.imagekit.io/bitbybit/app/assets/spec-cat/things/furniture/tables/elegant-table.jpeg - * @ignore true - */ drawModel(model: Things.Furniture.Tables.ElegantTable.ElegantTableData, options: Things.Furniture.Tables.ElegantTable.ElegantTableDrawDto): Promise; - /** - * Disposes a cup model - * @param inputs Contains a model shapes to be disposed and additional information - * @group drawing - * @shortname dispose calm cup - * @drawable false - * @ignore true - */ dispose(inputs: Things.Furniture.Tables.ElegantTable.ElegantTableData): Promise; - /** - * Creates materials - * @param inputs Contains a model shapes to be disposed and additional information - * @group drawing - * @shortname creates default materials for zen hideout - * @drawable false - * @ignore true - */ private createMaterials; - } declare class GoodCoffeeTable { + } + declare class GoodCoffeeTable { private readonly occWorkerManager; private readonly context; private readonly draw; private readonly occt; private materials; constructor(occWorkerManager: OCCTWorkerManager, context: Context, draw: Draw, occt: OCCTW); - /** - * Creates an good coffee table model - * @param inputs - * @returns Good coffee table model - * @group create - * @shortname good coffee table - * @image https://ik.imagekit.io/bitbybit/app/assets/spec-cat/things/furniture/tables/good-coffee-table.jpeg - * @drawable true - */ create(inputs: Things.Furniture.Tables.GoodCoffeeTable.GoodCoffeeTableDto): Promise>; - /** - * Gets the compound shape of the table - * @param inputs - * @returns Compound shape of the elegant table model - * @group get shapes - * @shortname get compound - * @image https://ik.imagekit.io/bitbybit/app/assets/spec-cat/things/furniture/tables/good-coffee-table.jpeg - * @drawable true - */ getCompoundShape(inputs: Things.Furniture.Tables.GoodCoffeeTable.GoodCoffeeTableModelDto): Inputs.OCCT.TopoDSShapePointer; - /** - * Gets the leg shapes as a list - * @param inputs - * @returns Leg shapes of the table - * @group get shapes - * @shortname get legs - * @image https://ik.imagekit.io/bitbybit/app/assets/spec-cat/things/furniture/tables/good-coffee-table.jpeg - * @drawable true - */ getLegShapes(inputs: Things.Furniture.Tables.GoodCoffeeTable.GoodCoffeeTableModelDto): Inputs.OCCT.TopoDSShapePointer[]; - /** - * Gets the leg shape by index - * @param inputs - * @returns Leg shapes of the table - * @group get shapes - * @shortname get leg by index - * @image https://ik.imagekit.io/bitbybit/app/assets/spec-cat/things/furniture/tables/good-coffee-table.jpeg - * @drawable true - */ getLegShapeByIndex(inputs: Things.Furniture.Tables.GoodCoffeeTable.GoodCoffeeTableLegByIndexDto): Inputs.OCCT.TopoDSShapePointer; - /** - * Gets the table top panel shape - * @param inputs - * @returns Top panel shape of the table - * @group get shapes - * @shortname get top panel - * @image https://ik.imagekit.io/bitbybit/app/assets/spec-cat/things/furniture/tables/good-coffee-table.jpeg - * @drawable true - */ getTopPanelShape(inputs: Things.Furniture.Tables.GoodCoffeeTable.GoodCoffeeTableModelDto): Inputs.OCCT.TopoDSShapePointer; - /** - * Gets the table top panel wire shape - * @param inputs - * @returns Top panel wire shape of the table - * @group get shapes - * @shortname get top panel wire - * @image https://ik.imagekit.io/bitbybit/app/assets/spec-cat/things/furniture/tables/good-coffee-table.jpeg - * @drawable true - */ getTopPanelWireShape(inputs: Things.Furniture.Tables.GoodCoffeeTable.GoodCoffeeTableModelDto): Inputs.OCCT.TopoDSShapePointer; - /** - * Gets the table glass panel shape - * @param inputs - * @returns Glass panel shape of the table - * @group get shapes - * @shortname get glass panel - * @image https://ik.imagekit.io/bitbybit/app/assets/spec-cat/things/furniture/tables/good-coffee-table.jpeg - * @drawable true - */ getGlassPanelShape(inputs: Things.Furniture.Tables.GoodCoffeeTable.GoodCoffeeTableModelDto): Inputs.OCCT.TopoDSShapePointer; - /** - * Gets the table glass panel wire shape - * @param inputs - * @returns Glass panel wire shape of the table - * @group get shapes - * @shortname get glass panel wire - * @image https://ik.imagekit.io/bitbybit/app/assets/spec-cat/things/furniture/tables/good-coffee-table.jpeg - * @drawable true - */ getGlassPanelWireShape(inputs: Things.Furniture.Tables.GoodCoffeeTable.GoodCoffeeTableModelDto): Inputs.OCCT.TopoDSShapePointer; - /** - * Gets the table shelf shape - * @param inputs - * @returns Shelf shape of the table - * @group get shapes - * @shortname get shelf shape - * @image https://ik.imagekit.io/bitbybit/app/assets/spec-cat/things/furniture/tables/good-coffee-table.jpeg - * @drawable true - */ getShelfShape(inputs: Things.Furniture.Tables.GoodCoffeeTable.GoodCoffeeTableModelDto): Inputs.OCCT.TopoDSShapePointer; - /** - * Gets the table shelf top wire shape - * @param inputs - * @returns Shelf wire shape of the table - * @group get shapes - * @shortname get shelf top wire - * @image https://ik.imagekit.io/bitbybit/app/assets/spec-cat/things/furniture/tables/good-coffee-table.jpeg - * @drawable true - */ getShelfTopWireShape(inputs: Things.Furniture.Tables.GoodCoffeeTable.GoodCoffeeTableModelDto): Inputs.OCCT.TopoDSShapePointer; - /** - * Gets the leg shapes as a compound shape - * @param inputs - * @returns Compound shape of the legs - * @group get shapes - * @shortname get legs compound - * @image https://ik.imagekit.io/bitbybit/app/assets/spec-cat/things/furniture/tables/good-coffee-table.jpeg - * @drawable true - */ getLegsCompoundShape(inputs: Things.Furniture.Tables.GoodCoffeeTable.GoodCoffeeTableModelDto): Inputs.OCCT.TopoDSShapePointer; - /** - * Gets the top center point - * @param inputs - * @returns Top center point - * @group get points - * @shortname get top center point - * @image https://ik.imagekit.io/bitbybit/app/assets/spec-cat/things/furniture/tables/good-coffee-table.jpeg - * @drawable true - */ getTableTopCenterPoint(inputs: Things.Furniture.Tables.GoodCoffeeTable.GoodCoffeeTableModelDto): Inputs.Base.Point3; - /** - * Gets the top center point of the shelf - * @param inputs - * @returns Top center point of the shelf - * @group get points - * @shortname get top shelf center point - * @image https://ik.imagekit.io/bitbybit/app/assets/spec-cat/things/furniture/tables/good-coffee-table.jpeg - * @drawable true - */ getTableShelfTopCenterPoint(inputs: Things.Furniture.Tables.GoodCoffeeTable.GoodCoffeeTableModelDto): Inputs.Base.Point3; - /** - * Gets the leg bottom points - * @param inputs - * @returns Bottom points - * @group get points - * @shortname get leg bottom points - * @image https://ik.imagekit.io/bitbybit/app/assets/spec-cat/things/furniture/tables/good-coffee-table.jpeg - * @drawable true - */ getLegBottomPoints(inputs: Things.Furniture.Tables.GoodCoffeeTable.GoodCoffeeTableModelDto): Inputs.Base.Point3[]; - /** - * Gets the leg top points - * @param inputs - * @returns Top points - * @group get points - * @shortname get leg top points - * @image https://ik.imagekit.io/bitbybit/app/assets/spec-cat/things/furniture/tables/good-coffee-table.jpeg - * @drawable true - */ getLegTopPoints(inputs: Things.Furniture.Tables.GoodCoffeeTable.GoodCoffeeTableModelDto): Inputs.Base.Point3[]; - /** - * Creates draw options for good coffee table - * @param inputs - * @returns Draw options - * @group draw - * @shortname good coffee table draw options - * @image https://ik.imagekit.io/bitbybit/app/assets/spec-cat/things/furniture/tables/good-coffee-table.jpeg - * @drawable false - */ drawOptions(inputs: Things.Furniture.Tables.GoodCoffeeTable.GoodCoffeeTableDrawDto): Things.Furniture.Tables.GoodCoffeeTable.GoodCoffeeTableDrawDto; - /** - * Draws good coffee table model in default settings - * @param model Contains a model shapes to be drawn and additional information - * @returns BabylonJS Mesh - * @group drawing - * @shortname get draw shape - * @drawable false - * @image https://ik.imagekit.io/bitbybit/app/assets/spec-cat/things/furniture/tables/good-coffee-table.jpeg - * @ignore true - */ drawModel(model: Things.Furniture.Tables.GoodCoffeeTable.GoodCoffeeTableData, options: Things.Furniture.Tables.GoodCoffeeTable.GoodCoffeeTableDrawDto): Promise; - /** - * Disposes a cup model - * @param inputs Contains a model shapes to be disposed and additional information - * @group drawing - * @shortname dispose calm cup - * @drawable false - * @ignore true - */ dispose(inputs: Things.Furniture.Tables.GoodCoffeeTable.GoodCoffeeTableData): Promise; - /** - * Creates materials - * @param inputs Contains a model shapes to be disposed and additional information - * @group drawing - * @shortname creates default materials for zen hideout - * @drawable false - * @ignore true - */ private createMaterials; - } declare class SnakeTable { + } + declare class SnakeTable { private readonly occWorkerManager; private readonly context; private readonly draw; private readonly occt; private materials; constructor(occWorkerManager: OCCTWorkerManager, context: Context, draw: Draw, occt: OCCTW); - /** - * Creates a snake table model - * @param inputs - * @returns Snake table model - * @group create - * @shortname snake table - * @image https://ik.imagekit.io/bitbybit/app/assets/spec-cat/things/furniture/tables/snake-table.jpeg - * @drawable true - */ create(inputs: Things.Furniture.Tables.SnakeTable.SnakeTableDto): Promise>; - /** - * Gets the compound shape of the table - * @param inputs - * @returns Compound shape of the snake table model - * @group get shapes - * @shortname get compound - * @image https://ik.imagekit.io/bitbybit/app/assets/spec-cat/things/furniture/tables/snake-table.jpeg - * @drawable true - */ getCompoundShape(inputs: Things.Furniture.Tables.SnakeTable.SnakeTableModelDto): Inputs.OCCT.TopoDSShapePointer; - /** - * Gets the glass shape of the table - * @param inputs - * @returns The glass shape solid of the table - * @group get shapes - * @shortname get glass - * @image https://ik.imagekit.io/bitbybit/app/assets/spec-cat/things/furniture/tables/snake-table.jpeg - * @drawable true - */ getGlassShape(inputs: Things.Furniture.Tables.SnakeTable.SnakeTableModelDto): Inputs.OCCT.TopoDSShapePointer; - /** - * Gets the main solid shape of the table - * @param inputs - * @returns The main shape solid of the table - * @group get shapes - * @shortname get main - * @image https://ik.imagekit.io/bitbybit/app/assets/spec-cat/things/furniture/tables/snake-table.jpeg - * @drawable true - */ getMainShape(inputs: Things.Furniture.Tables.SnakeTable.SnakeTableModelDto): Inputs.OCCT.TopoDSShapePointer; - /** - * Gets the center point of the table top - * @param inputs - * @returns The point on the center of the top area - * @group get points - * @shortname get top center - * @image https://ik.imagekit.io/bitbybit/app/assets/spec-cat/things/furniture/tables/snake-table.jpeg - * @drawable true - */ getTopCenterPoint(inputs: Things.Furniture.Tables.SnakeTable.SnakeTableModelDto): Inputs.Base.Point3; - /** - * Creates draw options for snake table - * @param inputs - * @returns Draw options - * @group draw - * @shortname snake table draw options - * @image https://ik.imagekit.io/bitbybit/app/assets/spec-cat/things/furniture/tables/snake-table.jpeg - * @drawable false - */ drawOptions(inputs: Things.Furniture.Tables.SnakeTable.SnakeTableDrawDto): Things.Furniture.Tables.SnakeTable.SnakeTableDrawDto; - /** - * Draws snake table model in default settings - * @param model Contains a model shapes to be drawn and additional information - * @returns BabylonJS Mesh - * @group drawing - * @shortname draw shape - * @drawable false - * @image https://ik.imagekit.io/bitbybit/app/assets/spec-cat/things/furniture/tables/snake-table.jpeg - * @ignore true - */ drawModel(model: Things.Furniture.Tables.SnakeTable.SnakeTableData, options: Things.Furniture.Tables.SnakeTable.SnakeTableDrawDto): Promise; - /** - * Disposes a cup model - * @param inputs Contains a model shapes to be disposed and additional information - * @group drawing - * @shortname dispose calm cup - * @drawable false - * @ignore true - */ dispose(inputs: Things.Furniture.Tables.SnakeTable.SnakeTableData): Promise; - /** - * Creates materials - * @param inputs Contains a model shapes to be disposed and additional information - * @group drawing - * @shortname creates default materials for zen hideout - * @drawable false - * @ignore true - */ private createMaterials; - } declare class Tables { + } + declare class Tables { private readonly occWorkerManager; private readonly context; private readonly draw; @@ -40632,7 +11871,8 @@ declare namespace Bit { goodCoffeeTable: GoodCoffeeTable; snakeTable: SnakeTable; constructor(occWorkerManager: OCCTWorkerManager, context: Context, draw: Draw, occt: OCCTW); - } declare class Birdhouses { + } + declare class Birdhouses { private readonly occWorkerManager; private readonly context; private readonly draw; @@ -40640,84 +11880,36 @@ declare namespace Bit { wingtipVilla: WingtipVilla; chirpyChalet: ChirpyChalet; constructor(occWorkerManager: OCCTWorkerManager, context: Context, draw: Draw, occt: OCCTW); - } declare class ChirpyChalet { + } + declare class ChirpyChalet { private readonly occWorkerManager; private readonly context; private readonly draw; private readonly occt; constructor(occWorkerManager: OCCTWorkerManager, context: Context, draw: Draw, occt: OCCTW); - /** - * Disposes a chirpy chalet model objects - * @param inputs Contains a model shapes to be disposed and additional information - * @group drawing - * @shortname dispose chirpy chalet - * @drawable false - * @ignore true - */ dispose(inputs: Things.KidsCorner.BirdHouses.ChirpyChalet.ChirpyChaletData): Promise; - /** - * Creates a chirpy chalet birdhouse with a 45 degree roof - * @param inputs Contains points and the transformations to apply - * @returns Transformed points - * @group birdhouse - * @shortname chirpy chalet - * @image https://ik.imagekit.io/bitbybit/app/assets/spec-cat/things/kids/Birdhouses/ChirpyChaletIcon.webp - * @drawable true - */ create(inputs: Things.KidsCorner.BirdHouses.ChirpyChalet.ChirpyChaletDto): Promise>; - /** - * Draws wingtip villa in default settings - * @param inputs Contains a model shapes to be drawn and additional information - * @returns BabylonJS Mesh - * @group drawing - * @shortname draw shape - * @drawable false - * @ignore true - */ drawModel(inputs: Things.KidsCorner.BirdHouses.ChirpyChalet.ChirpyChaletData): Promise; - } declare class WingtipVilla { + } + declare class WingtipVilla { private readonly occWorkerManager; private readonly context; private readonly draw; private readonly occt; constructor(occWorkerManager: OCCTWorkerManager, context: Context, draw: Draw, occt: OCCTW); - /** - * Creates a wingtip villa birdhouse with a 45 degree roof - * @param inputs Contains points and the transformations to apply - * @returns Transformed points - * @group birdhouse - * @shortname wingtip villa - * @image https://ik.imagekit.io/bitbybit/app/assets/spec-cat/things/kids/Birdhouses/WingtipVillaIcon.webp - * @drawable true - */ create(inputs: Things.KidsCorner.BirdHouses.WingtipVilla.WingtipVillaDto): Promise>; - /** - * Draws wingtip villa in default settings - * @param inputs Contains a model shapes to be drawn and additional information - * @returns BabylonJS Mesh - * @group drawing - * @shortname draw shape - * @drawable false - * @ignore true - */ drawModel(inputs: Things.KidsCorner.BirdHouses.WingtipVilla.WingtipVillaData): Promise; - /** - * Disposes a wingtip villa model objects - * @param inputs Contains a model shapes to be disposed and additional information - * @group drawing - * @shortname dispose wingtip villa - * @drawable false - * @ignore true - */ dispose(inputs: Things.KidsCorner.BirdHouses.WingtipVilla.WingtipVillaData): Promise; - } declare class KidsCorner { + } + declare class KidsCorner { private readonly occWorkerManager; private readonly context; private readonly draw; private readonly occt; birdhouses: Birdhouses; constructor(occWorkerManager: OCCTWorkerManager, context: Context, draw: Draw, occt: OCCTW); - } declare class DropletsPhoneHolder { + } + declare class DropletsPhoneHolder { private readonly occWorkerManager; private readonly context; private readonly draw; @@ -40725,98 +11917,18 @@ declare namespace Bit { private readonly jscad; private drawOptions; constructor(occWorkerManager: OCCTWorkerManager, context: Context, draw: Draw, occt: OCCTW, jscad: JSCAD); - /** - * Creates droplets phone holder - * @param inputs - * @returns Droplets phone holder data - * @group create - * @shortname droplets phone holder - * @image https://ik.imagekit.io/bitbybit/app/assets/spec-cat/things/laser-cutting/gadgets/DropletsPhoneHolder.jpeg - * @drawable true - */ create(inputs: Things.LaserCutting.Gadgets.DropletsPhoneHolder.DropletsPhoneHolderDto): Promise>; - /** - * Gets the compound shape of the droplets phone holder - * @param inputs - * @returns Compound shape of the droplets phone holder model - * @group get shapes - * @shortname compound - * @image https://ik.imagekit.io/bitbybit/app/assets/spec-cat/things/laser-cutting/gadgets/DropletsPhoneHolder.jpeg - * @drawable true - */ getCompoundShape(inputs: Things.LaserCutting.Gadgets.DropletsPhoneHolder.DropletsPhoneHolderModelDto): Inputs.OCCT.TopoDSShapePointer; - /** - * Gets the cut wires compound - * @param inputs - * @returns Compound of the cut wires - * @group get shapes - * @shortname cut wires - * @image https://ik.imagekit.io/bitbybit/app/assets/spec-cat/things/laser-cutting/gadgets/DropletsPhoneHolder.jpeg - * @drawable true - */ getCutWiresCompound(inputs: Things.LaserCutting.Gadgets.DropletsPhoneHolder.DropletsPhoneHolderModelDto): Inputs.OCCT.TopoDSShapePointer; - /** - * Gets the engraving wires compound - * @param inputs - * @returns Compound of the engraving wires - * @group get shapes - * @shortname engraving wires - * @image https://ik.imagekit.io/bitbybit/app/assets/spec-cat/things/laser-cutting/gadgets/DropletsPhoneHolder.jpeg - * @drawable true - */ getEngravingWiresCompound(inputs: Things.LaserCutting.Gadgets.DropletsPhoneHolder.DropletsPhoneHolderModelDto): Inputs.OCCT.TopoDSShapePointer; - /** - * Downloads DXF drawing - * @param inputs - * @returns DXF File - * @group download - * @shortname dxf drawings - * @image https://ik.imagekit.io/bitbybit/app/assets/spec-cat/things/laser-cutting/gadgets/DropletsPhoneHolder.jpeg - * @drawable false - */ downloadDXFDrawings(inputs: Things.LaserCutting.Gadgets.DropletsPhoneHolder.DropletsPhoneHolderModelDxfDto): Promise; - /** - * Downloads STEP drawing - * @param inputs - * @returns STEP File - * @group download - * @shortname step drawings - * @image https://ik.imagekit.io/bitbybit/app/assets/spec-cat/things/laser-cutting/gadgets/DropletsPhoneHolder.jpeg - * @drawable false - */ downloadSTEPDrawings(inputs: Things.LaserCutting.Gadgets.DropletsPhoneHolder.DropletsPhoneHolderModelStepDto): Promise; - /** - * Downloads STEP 3D model - * @param inputs - * @returns STEP File - * @group download - * @shortname 3d step model - * @image https://ik.imagekit.io/bitbybit/app/assets/spec-cat/things/laser-cutting/gadgets/DropletsPhoneHolder.jpeg - * @drawable false - */ download3dSTEPModel(inputs: Things.LaserCutting.Gadgets.DropletsPhoneHolder.DropletsPhoneHolderModelStepDto): Promise; - /** - * Draws droplets phone holder in default settings - * @param inputs Contains a model shapes to be drawn and additional information - * @returns BabylonJS Mesh - * @group drawing - * @shortname draw shape - * @drawable false - * @ignore true - */ drawModel(model: Things.LaserCutting.Gadgets.DropletsPhoneHolder.DropletsPhoneHolderData, precision?: number): Promise; - /** - * Disposes a droplets phone holder model objects - * @param inputs Contains a model shapes to be disposed and additional information - * @group drawing - * @shortname dispose droplets phone holder - * @drawable false - * @ignore true - */ dispose(inputs: Things.LaserCutting.Gadgets.DropletsPhoneHolder.DropletsPhoneHolderData): Promise; - private disposeMaterials; private createDrawOptions; - } declare class Gadgets { + } + declare class Gadgets { private readonly occWorkerManager; private readonly context; private readonly draw; @@ -40824,7 +11936,8 @@ declare namespace Bit { private readonly jscad; dropletsPhoneHolder: DropletsPhoneHolder; constructor(occWorkerManager: OCCTWorkerManager, context: Context, draw: Draw, occt: OCCTW, jscad: JSCAD); - } declare class LaserCutting { + } + declare class LaserCutting { private readonly occWorkerManager; private readonly context; private readonly draw; @@ -40832,7 +11945,8 @@ declare namespace Bit { private readonly jscad; gadgets: Gadgets; constructor(occWorkerManager: OCCTWorkerManager, context: Context, draw: Draw, occt: OCCTW, jscad: JSCAD); - } declare class ThingsAdv { + } + declare class ThingsAdv { private readonly occWorkerManager; private readonly context; private readonly draw; @@ -40846,8 +11960,6 @@ declare namespace Bit { enums: Enums; constructor(occWorkerManager: OCCTWorkerManager, context: Context, draw: Draw, occt: OCCTW, jscad: JSCAD); } - - declare class BitByBitBase { readonly draw: Draw; readonly babylon: Babylon; @@ -40868,17 +11980,18 @@ declare namespace Bit { readonly text: TextBitByBit; readonly dates: Dates; readonly json: JSONBitByBit; + readonly csv: CSVBitByBit; readonly verb: Verb; readonly tag: Tag; readonly time: Time; readonly asset: Asset; - } - declare var isRunnerContext: boolean; declare function mockBitbybitRunnerInputs(inputs: T): T; declare function getBitbybitRunnerInputs(): T; declare function setBitbybitRunnerResult(result: T): void; } +} + ``` \ No newline at end of file diff --git a/docs/blog/2024-11-08-updated-bitbybit-runners.md b/docs/blog/2024-11-08-updated-bitbybit-runners.mdx similarity index 99% rename from docs/blog/2024-11-08-updated-bitbybit-runners.md rename to docs/blog/2024-11-08-updated-bitbybit-runners.mdx index 3c47dcda6..ba08dcd48 100644 --- a/docs/blog/2024-11-08-updated-bitbybit-runners.md +++ b/docs/blog/2024-11-08-updated-bitbybit-runners.mdx @@ -155,7 +155,7 @@ For production applications requiring maximum reliability and control, consider ``` -**Note:** You should replace `` with an actual version number (e.g., `0.21.0`). You can find all the official versions of Bitbybit.dev here: +**Note:** You should replace `` with an actual version number (e.g., ``). You can find all the official versions of Bitbybit.dev here: ➡️ **[Bitbybit.dev GitHub Releases](https://github.com/bitbybit-dev/bitbybit/releases)** ### Examples of the Runners diff --git a/docs/blog/2026-01-14-create-bitbybit-app-cli.md b/docs/blog/2026-01-14-create-bitbybit-app-cli.md new file mode 100644 index 000000000..17b9bf06e --- /dev/null +++ b/docs/blog/2026-01-14-create-bitbybit-app-cli.md @@ -0,0 +1,90 @@ +--- +slug: create-bitbybit-app-cli +title: Scaffold Your 3D CAD Projects in Seconds with create-app CLI +authors: [ubarevicius] +tags: [threejs, babylonjs, playcanvas] +image: https://ik.imagekit.io/bitbybit/app/assets/blog/create-bitbybit-app-cli/create-bitbybit-app-cli.webp +--- + +![Bitbybit Create App CLI in Terminal](https://ik.imagekit.io/bitbybit/app/assets/blog/create-bitbybit-app-cli/create-bitbybit-app-cli.webp "Bitbybit Create App CLI in Terminal") + +TLDR +```bash +npx @bitbybit-dev/create-app my-awesome-project +``` + +Bitbybit version 0.21.1 brings a brand new developer experience to the table. Say hello to `@bitbybit-dev/create-app`, a CLI tool that lets you scaffold fully-configured 3D CAD projects in just a few seconds. + + + +## The Problem We're Solving + +Getting started with 3D CAD development on the web has traditionally involved quite a bit of setup work. You need to configure your bundler, set up TypeScript, install the right packages for your chosen 3D engine, and make sure all the geometry kernels are properly initialized. This process can easily take 30 minutes to an hour, especially if you're new to the ecosystem. + +We wanted to change that. With our new CLI tool, you can go from zero to a working 3D CAD application in under a minute. + +## How It Works + +The simplest way to create a new project is to run this command in your terminal: + +```bash +npx @bitbybit-dev/create-app my-awesome-project +``` + +That's it. The CLI will guide you through a quick interactive setup where you choose your preferred 3D engine. Currently, we support three popular options: Three.js for its lightweight flexibility, Babylon.js for its powerful feature set, and PlayCanvas for its fast WebGL performance. + +If you prefer to skip the prompts, you can also specify the engine directly: + +```bash +npx @bitbybit-dev/create-app my-project --engine babylonjs +``` + +## What You Get Out of the Box + +When the scaffolding completes, you'll have a fully functional project that includes everything you need to start building. The project uses Vite as the build tool, which means incredibly fast hot module replacement during development and optimized production builds. TypeScript is configured from the start, giving you type safety and excellent editor support. + +Most importantly, all three of our geometry kernels come pre-configured and ready to use. OCCT (OpenCascade Technology) is there for professional-grade CAD operations like fillets, chamfers, and boolean operations on solid models. JSCAD provides programmatic solid modeling capabilities that many developers find intuitive. And Manifold handles fast mesh boolean operations when you need high-performance geometry processing. + +The generated starter code demonstrates how to use each kernel. You'll see examples of creating rounded cubes with OCCT, performing boolean differences with Manifold, and building geodesic spheres with JSCAD. This gives you a clear starting point to understand how each kernel works and when to use which one. + +## The Development Workflow + +After scaffolding your project, the workflow is straightforward. Navigate into your project folder, install the dependencies, and start the development server: + +```bash +cd my-awesome-project +npm install +npm run dev +``` + +Your browser will open with a live preview of your 3D scene on `http://localhost:5173`. Make changes to the code, and they appear instantly thanks to Vite's hot reload. When you're ready to deploy, a simple `npm run build` creates an optimized production bundle. + +## Choose Your Engine + +Each supported 3D engine has its own strengths. Three.js is an excellent choice if you want a lightweight library with a massive community and countless examples online. It's particularly good for creative coding and visualization projects. + +Babylon.js shines when you need a complete game engine with built-in support for physics, shadows, post-processing effects, and complex scene management. If you're building something that needs to feel like a polished application or game, Babylon.js has you covered. + +PlayCanvas offers a fast and lightweight approach to WebGL development. It's designed for performance and works well for projects where load time and runtime speed are critical concerns. + +No matter which engine you choose, the Bitbybit geometry kernels work with all of them. You can create complex CAD geometry with OCCT and render it beautifully in any of these engines. + +## Why This Matters + +We believe that the future of CAD and 3D design is on the web. Browser-based tools are accessible to everyone, require no installation, and can run on virtually any device. But building these tools has been harder than it should be. + +With `@bitbybit-dev/create-app`, we're lowering the barrier to entry significantly. Whether you're a seasoned developer exploring CAD programming or a designer wanting to prototype ideas in code, you can now get started in seconds rather than hours. + +The CLI is open source and available as part of the Bitbybit monorepo on GitHub. We welcome contributions, feedback, and feature requests from the community. + +## Get Started Today + +Ready to try it out? Open your terminal and run: + +```bash +npm init @bitbybit-dev/app my-first-cad-app +``` + +If you build something cool, we'd love to see it. Share your projects with us on Discord or tag us on social media. And if you find Bitbybit valuable for your work, consider supporting the project with a Silver or Gold subscription at [bitbybit.dev/auth/pick-plan](https://bitbybit.dev/auth/pick-plan). + +Happy coding! diff --git a/docs/blog/2026-01-15-ai-prompt-contexts.md b/docs/blog/2026-01-15-ai-prompt-contexts.md new file mode 100644 index 000000000..ba2443e82 --- /dev/null +++ b/docs/blog/2026-01-15-ai-prompt-contexts.md @@ -0,0 +1,94 @@ +--- +slug: ai-prompt-contexts +title: AI Prompt Contexts - Teaching Your AI Assistant to Code with Bitbybit +authors: [ubarevicius] +tags: [ai, babylonjs, threejs, playcanvas] +image: https://ik.imagekit.io/bitbybit/app/assets/blog/ai-prompt-contexts/ai-prompt-contexts.webp +--- + +![AI Prompt Contexts for Bitbybit](https://ik.imagekit.io/bitbybit/app/assets/blog/ai-prompt-contexts/ai-prompt-contexts.webp "AI Prompt Contexts for Bitbybit") + +Modern AI assistants like Claude, Gemini, Grok or ChatGPT or are remarkably capable at writing code. However, they can struggle with specialized libraries and APIs they weren't extensively trained on. That's where AI Prompt Contexts come in - specially crafted documentation files that give your AI assistant deep knowledge of the Bitbybit API. + + + +## What Are AI Prompt Contexts? + +An AI Prompt Context is a markdown file designed to be attached to conversations with AI coding assistants. When you provide this context file, the AI gains comprehensive knowledge about Bitbybit's API, coding patterns, best practices, and integration approaches. Think of it as giving your AI assistant a complete reference manual it can consult while helping you write code. + +We've structured these context files specifically for AI consumption. They include clear role definitions that tell the AI how to behave, complete API references with all available functions and their parameters, code examples demonstrating correct usage patterns, and decision trees that help the AI recommend the right approach based on your experience level. + +## Choosing the Right Context + +We offer several context variants, and understanding their differences will help you pick the right one for your needs. + +### Engine-Specific Contexts + +Each context file is tailored to a specific 3D rendering engine. If you're building with Babylon.js, download the BabylonJS context. Building with Three.js? Grab the ThreeJS variant. Working with PlayCanvas? There's a context file for that too. The engine-specific details matter because initialization patterns, scene management, and rendering APIs differ between engines. + +### Full vs Lite Versions + +This is where the real choice comes in. For each engine, we provide two versions: Full and Lite. + +**Full contexts** contain everything an AI needs to help you from scratch. They include extensive explanations of what Bitbybit is, how to set up projects, integration guides for both NPM packages and browser-based runners, best practices for performance, scene setup recommendations, and the complete API reference with detailed descriptions. If you're new to Bitbybit or want your AI to provide comprehensive guidance, the Full context is your friend. + +**Lite contexts** strip away the explanations and focus purely on API definitions. They contain the same complete API reference but use a compressed notation to minimize token usage. This approach has a specific use case: when you already understand Bitbybit well and want to set up your own custom coding rules. You might have your own project setup preferences, your own coding style guide, or specific patterns you want the AI to follow. The Lite context gives you concise API definitions to include alongside your custom instructions. + +### Monaco Editor Context + +We also provide a special context for users of our online Monaco TypeScript editor at [bitbybit.dev](https://bitbybit.dev/app?editor=typescript). This context is simpler because it focuses only on what you need when coding in the browser-based editor. It explains the pre-initialized global variables available in that environment and the specific patterns required for that context. If you're just getting started with Bitbybit and want to experiment in our online editor, this beginner-friendly context is the perfect starting point. + +## Understanding the Lite Context Format + +The Lite contexts use an important technique to reduce file size: a translation dictionary. This is something your AI must understand to generate correct code. + +At the beginning of the API section, you'll find a dictionary that maps abbreviated terms to their full names. For example, `OC` means `OCCT`, `sp` means `shape`, `sd` means `solid`, and `cr` means `create`. The API definitions throughout the document use these abbreviations to stay compact. + +Here's the critical part: **the AI must translate these abbreviations back to full names when generating code**. We explicitly instruct the AI about this requirement in the context file. When the AI sees something like `bitbybit.oc.sh.sd.crBox(op: BoxD)` in the documentation, it should generate `bitbybit.occt.shapes.solid.createBox(boxOptions: BoxDto)` for you. The abbreviated forms are only for documentation - they would not compile if used directly in code. + +This translation system allows us to provide complete API coverage while keeping token counts reasonable. The AI handles the translation transparently, so you receive clean, readable code. If your AI agent is not able to translate these values - code will not work. If that happens - you should probably look for a better AI. + +## How to Use These Contexts + +Using a prompt context is straightforward. Download the appropriate markdown file from our homepage at bitbybit.dev, then attach it to your conversation with your AI assistant. Most modern AI interfaces support file attachments - simply drag and drop the file or use the attachment button. + +Once attached, you can start asking questions like "Create a parametric table with adjustable legs" or "Show me how to create a filleted box and export it as STEP." The AI should reference the context to generate accurate, working code that follows our recommended patterns. + +For the best experience, we recommend combining a Lite context with our Context7 MCP Server. The MCP server provides live access to our full documentation and stays current with the latest changes. The Lite context ensures the AI knows the precise API signatures. Together, they create a powerful coding assistant that understands both the big picture and the fine details. + +## Where to Download + +You'll find all context files on our homepage at [bitbybit.dev](https://bitbybit.dev). Scroll to the "Code with AI" section where you'll see download buttons for each engine and version. The page displays token counts for each file so you can gauge context window usage. + +Here are direct links to download each context file: + +**For Beginners (Monaco Editor)** +- Monaco Editor Context (~116k tokens) + +**BabylonJS** +- Full Context (~116k tokens) +- Lite Context (~114k tokens) + +**ThreeJS** +- Full Context (~95k tokens) +- Lite Context (~82k tokens) + +**PlayCanvas** +- Full Context (~94k tokens) +- Lite Context (~82k tokens) + +## Getting the Most from AI-Assisted Coding + +A few tips will help you work more effectively with AI and these contexts. First, be specific about what you want to build. Instead of asking for "a shape," describe "a rounded rectangular table top with four cylindrical legs." The more detail you provide, the more useful the generated code will be. + +Second, mention your experience level. The contexts include decision trees that help the AI adapt its responses. If you're new to web development, the AI can scaffold complete applications for you. If you're an experienced developer, it can focus on just the API calls you need. + +Third, iterate on the generated code. AI assistants are collaborative tools. If the first attempt isn't quite right, explain what you'd like changed. The AI can refine its suggestions based on your feedback while staying consistent with the Bitbybit API. + +## The Future of AI-Assisted CAD + +We believe AI assistants will become increasingly important tools for developers working with 3D and CAD applications. These prompt contexts represent our commitment to making Bitbybit as accessible as possible. Whether you're prototyping ideas quickly or building production applications, having an AI that truly understands our API makes the development process smoother and more enjoyable. + +The contexts are updated with each Bitbybit release to match the latest API. When you see a new version available, download the updated context to ensure your AI has the most current information. + +Happy building with AI at your side! diff --git a/docs/blog/tags.yml b/docs/blog/tags.yml index 0f7a5bb9d..ae1adc257 100644 --- a/docs/blog/tags.yml +++ b/docs/blog/tags.yml @@ -49,12 +49,12 @@ fitness-equipment: description: Blog posts about fitness equipment industry and 3D visualization babylonjs: - label: babylonjs + label: BabylonJS permalink: /babylonjs description: Blog posts about Babylon.js 3D engine threejs: - label: threejs + label: ThreeJS permalink: /threejs description: Blog posts about Three.js 3D library diff --git a/docs/docusaurus.config.ts b/docs/docusaurus.config.ts index bc486c644..2eaf08ab4 100644 --- a/docs/docusaurus.config.ts +++ b/docs/docusaurus.config.ts @@ -1,10 +1,14 @@ import { themes as prismThemes } from "prism-react-renderer"; import type { Config } from "@docusaurus/types"; import type * as Preset from "@docusaurus/preset-classic"; +import packageJson from "./package.json"; // This runs in Node.js - Don't use client-side code here (browser APIs, JSX...) const config: Config = { + customFields: { + bitbybitVersion: packageJson.version, + }, title: "Bitbybit", tagline: "Learn How To Use The Platform", favicon: "img/logo-gold-small.png", @@ -86,9 +90,9 @@ const config: Config = { }, { to: "/learn/code/intro", label: "Code", position: "left" }, { to: "/learn/3d-bits/intro", label: "3D Bits", position: "left" }, - { to: "/learn/npm-packages/threejs", label: "ThreeJS", position: "left" }, - { to: "/learn/npm-packages/babylonjs", label: "BabylonJS", position: "left" }, - { to: "/learn/npm-packages/playcanvas", label: "PlayCanvas", position: "left" }, + { to: "/learn/getting-started/engines/threejs", label: "ThreeJS", position: "left" }, + { to: "/learn/getting-started/engines/babylonjs", label: "BabylonJS", position: "left" }, + { to: "/learn/getting-started/engines/playcanvas", label: "PlayCanvas", position: "left" }, { to: "/blog", label: "Blog", position: "left" }, { to: "https://bitbybit.dev", label: "Home", position: "left" }, { diff --git a/docs/learn/3d-bits/theme-app-extensions/bitbybit-viewer.md b/docs/learn/3d-bits/theme-app-extensions/bitbybit-viewer.md index 67c7d367a..f13741523 100644 --- a/docs/learn/3d-bits/theme-app-extensions/bitbybit-viewer.md +++ b/docs/learn/3d-bits/theme-app-extensions/bitbybit-viewer.md @@ -110,7 +110,7 @@ Save your JSON configurator as a file, upload it to Shopify CDN as a file. Copy While our Viewer Editor is the recommended way to create and manage the Scene Config JSON, you can also edit the JSON directly using any text editor. For a better editing experience with features like syntax highlighting and autocompletion (intellisense), we provide a JSON schema. -* **JSON Schema:** You can find the schema [here](https://app-store.bitbybit.dev/files/ecommerce/viewer-editor/viewer-scene-schema-v0.21.0.json). (Note: This schema link points to version `0.21.0`. The schema may be updated in the future, so ensure you refer to the latest version compatible with your "3D Bits" app version.) +* **JSON Schema:** You can find the schema [here](https://app-store.bitbybit.dev/files/ecommerce/viewer-editor/viewer-scene-schema-v0.21.1.json). (Note: This schema link points to version `0.21.1`. The schema may be updated in the future, so ensure you refer to the latest version compatible with your "3D Bits" app version.) Many modern code editors (like VS Code) can use this schema to provide validation and autocompletion as you edit the JSON. ## Video Tutorial: BITBYBIT VIEWER Block Setup diff --git a/docs/learn/3d-bits/tutorials/bitbybit-viewer/settings.md b/docs/learn/3d-bits/tutorials/bitbybit-viewer/settings.md index 8e973a47d..b9e2b9ccf 100644 --- a/docs/learn/3d-bits/tutorials/bitbybit-viewer/settings.md +++ b/docs/learn/3d-bits/tutorials/bitbybit-viewer/settings.md @@ -203,7 +203,7 @@ The system automatically detects if you're providing a URL (starting with `http: - For complex configurations, use a URL to an external JSON file - it keeps your theme settings cleaner and makes updates easier - Use the Viewer Editor to generate valid configurations - Test your scene configuration thoroughly before going live -- The scene configuration follows a [JSON schema](https://app-store.bitbybit.dev/files/ecommerce/viewer-editor/viewer-scene-schema-v0.21.0.json) that defines all available options +- The scene configuration follows a [JSON schema](https://app-store.bitbybit.dev/files/ecommerce/viewer-editor/viewer-scene-schema-v0.21.1.json) that defines all available options ::: --- diff --git a/docs/learn/3d-bits/tutorials/getting-started/common-settings.md b/docs/learn/3d-bits/tutorials/getting-started/common-settings.md index 0391a967d..25998ab75 100644 --- a/docs/learn/3d-bits/tutorials/getting-started/common-settings.md +++ b/docs/learn/3d-bits/tutorials/getting-started/common-settings.md @@ -121,7 +121,7 @@ These settings are specific to RUNNER and APPS blocks: ### Runner CDN Link **Available in:** VIEWER, RUNNER -**Default:** `https://cdn.jsdelivr.net/gh/bitbybit-dev/bitbybit-assets@0.21.0/runner/bitbybit-runner-babylonjs.js` +**Default:** `https://cdn.jsdelivr.net/gh/bitbybit-dev/bitbybit-assets@0.21.1/runner/bitbybit-runner-babylonjs.js` Specifies which version of the Bitbybit runner library to use. The runner is the core engine that loads and renders 3D content in your browser. @@ -173,7 +173,7 @@ The URL follows this pattern: https://cdn.jsdelivr.net/gh/bitbybit-dev/bitbybit-assets@{VERSION}/runner/bitbybit-runner-babylonjs.js ``` -Replace `{VERSION}` with the desired version number (e.g., `0.21.0`). +Replace `{VERSION}` with the desired version number (e.g., `0.21.1`). **Self-Hosting on Shopify CDN:** diff --git a/docs/learn/3d-bits/tutorials/videos-tutorials/product-customizable-text.mdx b/docs/learn/3d-bits/tutorials/videos-tutorials/product-customizable-text.mdx index f434f3183..c1928ba7e 100644 --- a/docs/learn/3d-bits/tutorials/videos-tutorials/product-customizable-text.mdx +++ b/docs/learn/3d-bits/tutorials/videos-tutorials/product-customizable-text.mdx @@ -153,7 +153,7 @@ To save you time, here is the embedded Bitbybit Rete script used in this tutoria diff --git a/docs/learn/3d-bits/tutorials/videos-tutorials/product-laptop-holder.mdx b/docs/learn/3d-bits/tutorials/videos-tutorials/product-laptop-holder.mdx index 93013b721..af3405fb8 100644 --- a/docs/learn/3d-bits/tutorials/videos-tutorials/product-laptop-holder.mdx +++ b/docs/learn/3d-bits/tutorials/videos-tutorials/product-laptop-holder.mdx @@ -63,7 +63,7 @@ To save you time and provide a starting point, here is the embedded Bitbybit Typ {\n\n laptops.forEach(laptop => {\n laptop.center = [0, laptop.height / 2 + laptopLiftedHeight, 0] as Bit.Inputs.Base.Point3;\n });\n\n let laptopFillets = [];\n let totalDistance = 0;\n let previousLaptopLength = 0;\n\n laptops.forEach(async (laptop, index) => {\n totalDistance += distanceBetweenLaptops + laptop.length / 2 + previousLaptopLength / 2;\n previousLaptopLength = laptop.length;\n laptop.center[2] = totalDistance;\n const laptopBaseModel = await bitbybit.occt.shapes.solid.createBox({\n width: laptop.width,\n length: laptop.length,\n height: laptop.height,\n center: laptop.center\n });\n const laptopFillet = await bitbybit.occt.fillets.filletEdges({ shape: laptopBaseModel, indexes: undefined, radius: 0.2 });\n laptopFillets.push(laptopFillet);\n\n const laptopVisModel = await bitbybit.occt.shapes.solid.createBox({\n width: laptop.width,\n length: laptop.length - 0.01,\n height: laptop.height,\n center: laptop.center\n });\n const laptopVisFillet = await bitbybit.occt.fillets.filletEdges({ shape: laptopVisModel, indexes: undefined, radius: 0.2 });\n laptopFillets.push(laptopFillet);\n\n const di = new Bit.Inputs.Draw.DrawOcctShapeOptions();\n\n di.faceOpacity = 0.2;\n di.edgeWidth = 5;\n di.edgeOpacity = 0.6;\n di.edgeColour = whiteColor;\n di.faceColour = whiteColor;\n const laptopFilletMesh = await bitbybit.draw.drawAnyAsync({ entity: laptopVisFillet, options: di });\n laptopsFilletsMesh.push(laptopFilletMesh);\n })\n\n const polygonWire = await bitbybit.occt.shapes.wire.createPolygonWire({\n points: controlPoints\n });\n const extrusion = await bitbybit.occt.operations.extrude({\n shape: polygonWire, direction: [0, 0, totalDistance += distanceBetweenLaptops + previousLaptopLength / 2]\n });\n const laptopStandFillet = await bitbybit.occt.fillets.filletEdges({ shape: extrusion, indexes: undefined, radius: 1 });\n const laptopStandThick = await bitbybit.occt.operations.makeThickSolidSimple({ shape: laptopStandFillet, offset: -0.5 });\n\n laptopStand = await bitbybit.occt.booleans.difference({ shape: laptopStandThick, shapes: laptopFillets, keepEdges: false });\n const li = new Bit.Inputs.OCCT.DrawShapeDto(laptopStand);\n li.faceOpacity = 1;\n if (flipColor) {\n li.faceColour = \"#0000ff\";\n li.edgeColour = whiteColor;\n } else {\n li.faceColour = holderColor;\n li.edgeColour = whiteColor;\n }\n li.edgeWidth = 5;\n laptopStandMesh = await bitbybit.draw.drawAnyAsync({ entity: laptopStand, options: li });\n const laptopsMeshes = await Promise.all(laptopsFilletsMesh);\n return [laptopStandMesh, ...laptopsMeshes];\n }\n\n const meshes = await renderLaptops(laptops);\n return { meshes };\n}\n\nclass Laptop {\n width: number;\n length: number;\n height: number;\n center?: Bit.Inputs.Base.Point3;\n}\n\nBit.setBitbybitRunnerResult(start());","version":"0.21.0","type":"typescript"}} + script={{"script":"Bit.mockBitbybitRunnerInputs({\n \"Laptop Type\": \"MacBook Pro 16\",\n \"Number Laptops\": \"3\",\n \"Color\": \"Black\",\n});\nconst inputs = Bit.getBitbybitRunnerInputs();\n\nconst laptops: Laptop[] = []\n\nlet laptop: Laptop;\n\nswitch (inputs[\"Laptop Type\"]) {\n case \"MacBook Pro 16\":\n laptop = {\n length: 1.63,\n width: 35.8,\n height: 24.6\n };\n break;\n case \"MacBook Pro 14\":\n laptop = {\n length: 1.57,\n width: 31.3,\n height: 22.2\n }\n break;\n case \"MacBook Air\":\n laptop = {\n length: 1.2,\n width: 30.5,\n height: 21.6\n }\n break;\n default:\n break;\n}\n\nlet flipColor = false;\nswitch (inputs[\"Color\"]) {\n case \"Blue\":\n flipColor = true;\n break;\n default:\n break;\n}\n\nconsole.log(\"laptop \", laptop);\n\nconst nrLaptops = +inputs[\"Number Laptops\"];\n\nfor (let i = 0; i < nrLaptops; i++) {\n laptops.push({ ...laptop });\n}\n\nconst whiteColor = \"#ffffff\";\nconst holderColor = \"#333333\";\n\nconst laptopLiftedHeight = 3;\nconst distanceBetweenLaptops = 1.7;\nconst exportSTEP = false;\n\nbitbybit.babylon.scene.backgroundColour({ colour: \"#bbbbbb\" });\n\nconst pointLightConf = new Bit.Inputs.BabylonScene.PointLightDto();\npointLightConf.position = [-15, 20, -5];\npointLightConf.intensity = 8000;\npointLightConf.diffuse = \"#3333ff\";\npointLightConf.radius = 0;\nbitbybit.babylon.scene.drawPointLight(pointLightConf);\n\nconst controlPoints = [\n [-12.5, 0, 0],\n [-8, 13, 0],\n [-4, 11, 0],\n [-2, 6, 0],\n [2, 6, 0],\n [4, 14, 0],\n [8, 17, 0],\n [12.5, 0, 0]\n] as Bit.Inputs.Base.Point3[];\n\nlet laptopStand;\nlet laptopStandMesh;\n\nconst laptopsFilletsMesh = [];\n\nasync function start() {\n const ground = await bitbybit.occt.shapes.face.createCircleFace({ center: [0, 0, 0], direction: [0, 1, 0], radius: 75, });\n const groundOptions = new Bit.Inputs.Draw.DrawOcctShapeOptions();\n groundOptions.faceColour = whiteColor;\n groundOptions.drawEdges = false;\n await bitbybit.draw.drawAnyAsync({ entity: ground, options: groundOptions });\n\n const renderLaptops = async (laptops) => {\n\n laptops.forEach(laptop => {\n laptop.center = [0, laptop.height / 2 + laptopLiftedHeight, 0] as Bit.Inputs.Base.Point3;\n });\n\n let laptopFillets = [];\n let totalDistance = 0;\n let previousLaptopLength = 0;\n\n laptops.forEach(async (laptop, index) => {\n totalDistance += distanceBetweenLaptops + laptop.length / 2 + previousLaptopLength / 2;\n previousLaptopLength = laptop.length;\n laptop.center[2] = totalDistance;\n const laptopBaseModel = await bitbybit.occt.shapes.solid.createBox({\n width: laptop.width,\n length: laptop.length,\n height: laptop.height,\n center: laptop.center\n });\n const laptopFillet = await bitbybit.occt.fillets.filletEdges({ shape: laptopBaseModel, indexes: undefined, radius: 0.2 });\n laptopFillets.push(laptopFillet);\n\n const laptopVisModel = await bitbybit.occt.shapes.solid.createBox({\n width: laptop.width,\n length: laptop.length - 0.01,\n height: laptop.height,\n center: laptop.center\n });\n const laptopVisFillet = await bitbybit.occt.fillets.filletEdges({ shape: laptopVisModel, indexes: undefined, radius: 0.2 });\n laptopFillets.push(laptopFillet);\n\n const di = new Bit.Inputs.Draw.DrawOcctShapeOptions();\n\n di.faceOpacity = 0.2;\n di.edgeWidth = 5;\n di.edgeOpacity = 0.6;\n di.edgeColour = whiteColor;\n di.faceColour = whiteColor;\n const laptopFilletMesh = await bitbybit.draw.drawAnyAsync({ entity: laptopVisFillet, options: di });\n laptopsFilletsMesh.push(laptopFilletMesh);\n })\n\n const polygonWire = await bitbybit.occt.shapes.wire.createPolygonWire({\n points: controlPoints\n });\n const extrusion = await bitbybit.occt.operations.extrude({\n shape: polygonWire, direction: [0, 0, totalDistance += distanceBetweenLaptops + previousLaptopLength / 2]\n });\n const laptopStandFillet = await bitbybit.occt.fillets.filletEdges({ shape: extrusion, indexes: undefined, radius: 1 });\n const laptopStandThick = await bitbybit.occt.operations.makeThickSolidSimple({ shape: laptopStandFillet, offset: -0.5 });\n\n laptopStand = await bitbybit.occt.booleans.difference({ shape: laptopStandThick, shapes: laptopFillets, keepEdges: false });\n const li = new Bit.Inputs.OCCT.DrawShapeDto(laptopStand);\n li.faceOpacity = 1;\n if (flipColor) {\n li.faceColour = \"#0000ff\";\n li.edgeColour = whiteColor;\n } else {\n li.faceColour = holderColor;\n li.edgeColour = whiteColor;\n }\n li.edgeWidth = 5;\n laptopStandMesh = await bitbybit.draw.drawAnyAsync({ entity: laptopStand, options: li });\n const laptopsMeshes = await Promise.all(laptopsFilletsMesh);\n return [laptopStandMesh, ...laptopsMeshes];\n }\n\n const meshes = await renderLaptops(laptops);\n return { meshes };\n}\n\nclass Laptop {\n width: number;\n length: number;\n height: number;\n center?: Bit.Inputs.Base.Point3;\n}\n\nBit.setBitbybitRunnerResult(start());","type":"typescript"}} title="Bitbybit Rete Editor - 3D Laptop Holder" description="3D Laptop holder configurator" /> diff --git a/docs/learn/3d-bits/tutorials/videos-tutorials/product-palm-table.mdx b/docs/learn/3d-bits/tutorials/videos-tutorials/product-palm-table.mdx index b102aaa30..6de155406 100644 --- a/docs/learn/3d-bits/tutorials/videos-tutorials/product-palm-table.mdx +++ b/docs/learn/3d-bits/tutorials/videos-tutorials/product-palm-table.mdx @@ -157,7 +157,7 @@ To save you time, here is the embedded Rete script used in this tutorial for the diff --git a/docs/learn/code/common/base/color/color-usage-examples.md b/docs/learn/code/common/base/color/color-usage-examples.md index 0dcde0d12..5f96e4a79 100644 --- a/docs/learn/code/common/base/color/color-usage-examples.md +++ b/docs/learn/code/common/base/color/color-usage-examples.md @@ -48,21 +48,21 @@ Click through the tabs below to see the implementation. You can interact with th colorParamfaceColoredgeColorcolorParam0faceColorcolorParam255colorParam0255edgeColor#0000ff6000TRUE0.01TRUEfaceColorTRUEedgeColor10","version":"0.21.0","type":"blockly"}} + script={{"script":"colorParamfaceColoredgeColorcolorParam0faceColorcolorParam255colorParam0255edgeColor#0000ff6000TRUE0.01TRUEfaceColorTRUEedgeColor10","type":"blockly"}} title="Color Usage Example" /> {\n\n const colorParam = 55;\n const rgbToHexOptions = new Bit.Inputs.Color.RGBMinMaxDto();\n rgbToHexOptions.r = colorParam;\n rgbToHexOptions.b = colorParam;\n const faceColor = bitbybit.color.rgbToHex(rgbToHexOptions);\n\n // This might look strange as you could just assign the string to edgeColor directly, \n // but this identity function is nice to have in visual prgramming editors - check Rete & Blockly\n // examples\n \n const edgeColor = bitbybit.color.hexColor({ color: \"#ff0000\" });\n\n const cubeOptions = new Bit.Inputs.OCCT.CubeDto();\n cubeOptions.size = 6;\n const cube = await bitbybit.occt.shapes.solid.createCube(cubeOptions);\n\n const drawOpt = new Bit.Inputs.Draw.DrawOcctShapeSimpleOptions();\n drawOpt.faceColour = faceColor;\n drawOpt.edgeColour = edgeColor;\n drawOpt.edgeWidth = 10;\n bitbybit.draw.drawAnyAsync({ entity: cube, options: drawOpt });\n}\n\nstart();","version":"0.21.0","type":"typescript"}} + script={{"script":"const start = async () => {\n\n const colorParam = 55;\n const rgbToHexOptions = new Bit.Inputs.Color.RGBMinMaxDto();\n rgbToHexOptions.r = colorParam;\n rgbToHexOptions.b = colorParam;\n const faceColor = bitbybit.color.rgbToHex(rgbToHexOptions);\n\n // This might look strange as you could just assign the string to edgeColor directly, \n // but this identity function is nice to have in visual prgramming editors - check Rete & Blockly\n // examples\n \n const edgeColor = bitbybit.color.hexColor({ color: \"#ff0000\" });\n\n const cubeOptions = new Bit.Inputs.OCCT.CubeDto();\n cubeOptions.size = 6;\n const cube = await bitbybit.occt.shapes.solid.createCube(cubeOptions);\n\n const drawOpt = new Bit.Inputs.Draw.DrawOcctShapeSimpleOptions();\n drawOpt.faceColour = faceColor;\n drawOpt.edgeColour = edgeColor;\n drawOpt.edgeWidth = 10;\n bitbybit.draw.drawAnyAsync({ entity: cube, options: drawOpt });\n}\n\nstart();","type":"typescript"}} title="Color Usage Example" /> diff --git a/docs/learn/code/common/base/point/point-hex-grid-example.md b/docs/learn/code/common/base/point/point-hex-grid-example.md index d804f410f..b9f7c0b03 100644 --- a/docs/learn/code/common/base/point/point-hex-grid-example.md +++ b/docs/learn/code/common/base/point/point-hex-grid-example.md @@ -55,21 +55,21 @@ Click through the tabs below to see the implementation. Each example will genera hexagonspointshexCornershexPolylinesihexagons20101010FALSEFALSEFALSEFALSEFALSETRUEFALSEpointshexagonscentershexCornershexagonshexagonshexPolylinesihexCornersINSERTLASThexPolylinesiTRUEpointshexPolylines","version":"0.21.0","type":"blockly"}} + script={{"script":"hexagonspointshexCornershexPolylinesihexagons20101010FALSEFALSEFALSEFALSEFALSETRUEFALSEpointshexagonscentershexCornershexagonshexagonshexPolylinesihexCornersINSERTLASThexPolylinesiTRUEpointshexPolylines","type":"blockly"}} title="Point Hex Grid Example" /> {\n\n // 1. Configure the hexagonal grid options\n const hexOptions = new Bit.Inputs.Point.HexGridScaledToFitDto();\n // Set options different from defaults. \n // TypeScript IntelliSense (e.g., typing \"hexOptions.\") will show all available parameters.\n hexOptions.width = 20;\n hexOptions.height = 10;\n hexOptions.nrHexagonsInWidth = 10;\n hexOptions.nrHexagonsInHeight = 10;\n hexOptions.centerGrid = true; // Center the entire grid at the world origin [0,0,0]\n // Example: hexOptions.flatTop = true; // To get flat-topped hexagons\n // Example: hexOptions.pointsOnGround = true; // To project to XZ plane if original is XY\n\n // 2. Generate the hex grid data\n // This function returns an object like: \n // { centers: Point3[], hexagons: Point3[][], shortestDistEdge, longestDistEdge, maxFilletRadius }\n const hexResult = bitbybit.point.hexGridScaledToFit(hexOptions);\n\n // 3. Create polylines for each hexagon's outline\n // hexResult.hexagons is a list of lists (e.g., [[v1,v2..v6 for hex1], [v1,v2..v6 for hex2], ...])\n // We .map() over this list to create a Polyline object for each hexagon.\n const polylines = hexResult.hexagons.map(singleHexagonCornerPoints => {\n const polylineOptions = new Bit.Inputs.Polyline.PolylineCreateDto();\n polylineOptions.points = singleHexagonCornerPoints; // The 6 corner points\n polylineOptions.isClosed = true; // Ensure the polyline forms a closed loop\n return bitbybit.polyline.create(polylineOptions);\n }) as Bit.Inputs.Base.Polyline3[]; // Type assertion: the result is an array of Polyline3 objects\n\n // 4. Draw the center points of the hexagons\n // hexResult.centers is a list of 3D points: [[cx1,cy1,cz1], [cx2,cy2,cz2], ...]\n bitbybit.draw.drawAnyAsync({ entity: hexResult.centers });\n\n // 5. Draw the polylines representing the hexagon outlines\n bitbybit.draw.drawAnyAsync({ entity: polylines });\n\n}\n\nstart();","version":"0.21.0","type":"typescript"}} + script={{"script":"const start = () => {\n\n // 1. Configure the hexagonal grid options\n const hexOptions = new Bit.Inputs.Point.HexGridScaledToFitDto();\n // Set options different from defaults. \n // TypeScript IntelliSense (e.g., typing \"hexOptions.\") will show all available parameters.\n hexOptions.width = 20;\n hexOptions.height = 10;\n hexOptions.nrHexagonsInWidth = 10;\n hexOptions.nrHexagonsInHeight = 10;\n hexOptions.centerGrid = true; // Center the entire grid at the world origin [0,0,0]\n // Example: hexOptions.flatTop = true; // To get flat-topped hexagons\n // Example: hexOptions.pointsOnGround = true; // To project to XZ plane if original is XY\n\n // 2. Generate the hex grid data\n // This function returns an object like: \n // { centers: Point3[], hexagons: Point3[][], shortestDistEdge, longestDistEdge, maxFilletRadius }\n const hexResult = bitbybit.point.hexGridScaledToFit(hexOptions);\n\n // 3. Create polylines for each hexagon's outline\n // hexResult.hexagons is a list of lists (e.g., [[v1,v2..v6 for hex1], [v1,v2..v6 for hex2], ...])\n // We .map() over this list to create a Polyline object for each hexagon.\n const polylines = hexResult.hexagons.map(singleHexagonCornerPoints => {\n const polylineOptions = new Bit.Inputs.Polyline.PolylineCreateDto();\n polylineOptions.points = singleHexagonCornerPoints; // The 6 corner points\n polylineOptions.isClosed = true; // Ensure the polyline forms a closed loop\n return bitbybit.polyline.create(polylineOptions);\n }) as Bit.Inputs.Base.Polyline3[]; // Type assertion: the result is an array of Polyline3 objects\n\n // 4. Draw the center points of the hexagons\n // hexResult.centers is a list of 3D points: [[cx1,cy1,cz1], [cx2,cy2,cz2], ...]\n bitbybit.draw.drawAnyAsync({ entity: hexResult.centers });\n\n // 5. Draw the polylines representing the hexagon outlines\n bitbybit.draw.drawAnyAsync({ entity: polylines });\n\n}\n\nstart();","type":"typescript"}} title="Point Hex Grid Example" /> diff --git a/docs/learn/code/common/base/point/point-spiral-examples.md b/docs/learn/code/common/base/point/point-spiral-examples.md index 20ce680d3..1f321a0ee 100644 --- a/docs/learn/code/common/base/point/point-spiral-examples.md +++ b/docs/learn/code/common/base/point/point-spiral-examples.md @@ -45,21 +45,21 @@ Click through the tabs below to see the implementation. Each example will genera 0.9300361","version":"0.21.0","type":"blockly"}} + script={{"script":"0.9300361","type":"blockly"}} title="Point Spiral Example" /> {\n\n // 1. Configure the spiral parameters\n const spiralOptions = new Bit.Inputs.Point.SpiralDto();\n spiralOptions.numberPoints = 300;\n spiralOptions.radius = 6; // Overall extent of the spiral; default is 1\n spiralOptions.widening = 3; // Controls how tight the spiral is; default is 10\n spiralOptions.phi = 0.9; // Constant influencing the spiral pattern; default relates to Golden Angle\n spiralOptions.factor = 1; // General scaling factor; default is 1\n\n // 2. Generate the list of points forming the spiral\n // The bitbybit.point.spiral() function returns an array of 3D points.\n const points = bitbybit.point.spiral(spiralOptions);\n\n // 3. Draw the generated points in the scene\n // The drawAnyAsync function can take an array of points and will render them.\n bitbybit.draw.drawAnyAsync({ entity: points });\n\n}\n\nstart();","version":"0.21.0","type":"typescript"}} + script={{"script":"const start = () => {\n\n // 1. Configure the spiral parameters\n const spiralOptions = new Bit.Inputs.Point.SpiralDto();\n spiralOptions.numberPoints = 300;\n spiralOptions.radius = 6; // Overall extent of the spiral; default is 1\n spiralOptions.widening = 3; // Controls how tight the spiral is; default is 10\n spiralOptions.phi = 0.9; // Constant influencing the spiral pattern; default relates to Golden Angle\n spiralOptions.factor = 1; // General scaling factor; default is 1\n\n // 2. Generate the list of points forming the spiral\n // The bitbybit.point.spiral() function returns an array of 3D points.\n const points = bitbybit.point.spiral(spiralOptions);\n\n // 3. Draw the generated points in the scene\n // The drawAnyAsync function can take an array of points and will render them.\n bitbybit.draw.drawAnyAsync({ entity: points });\n\n}\n\nstart();","type":"typescript"}} title="Point Spiral Example" /> diff --git a/docs/learn/code/common/base/text/text-usage-examples.md b/docs/learn/code/common/base/text/text-usage-examples.md index 1cb4fbdf1..b50d5d4fd 100644 --- a/docs/learn/code/common/base/text/text-usage-examples.md +++ b/docs/learn/code/common/base/text/text-usage-examples.md @@ -53,21 +53,21 @@ Click through the tabs below to see the implementation. Each example will create namewordwordListnameJohnwordawesomewordListnamewordHi {0}, you are {1}!wordList'Roboto''Regular'20.2180000010'centerMiddle'","version":"0.21.0","type":"blockly"}} + script={{"script":"namewordwordListnameJohnwordawesomewordListnamewordHi {0}, you are {1}!wordList'Roboto''Regular'20.2180000010'centerMiddle'","type":"blockly"}} title="Text Formatting And 3D Fonts" /> {\n const name = \"John\";\n const word = \"awesome\";\n\n const formatOpt = new Bit.Inputs.Text.TextFormatDto();\n formatOpt.text = \"Hi {0}, you are {1}!\";\n formatOpt.values = [name, word];\n const formattedText = bitbybit.text.format(formatOpt);\n\n const text3dOptions = new Bit.Advanced.Text3D.Text3DDto();\n text3dOptions.text = formattedText;\n text3dOptions.rotation = 180;\n text3dOptions.fontSize = 2;\n const text3d = await bitbybit.advanced.text3d.create(text3dOptions);\n bitbybit.draw.drawAnyAsync({ entity: text3d });\n}\n\nstart();","version":"0.21.0","type":"typescript"}} + script={{"script":"const start = async () => {\n const name = \"John\";\n const word = \"awesome\";\n\n const formatOpt = new Bit.Inputs.Text.TextFormatDto();\n formatOpt.text = \"Hi {0}, you are {1}!\";\n formatOpt.values = [name, word];\n const formattedText = bitbybit.text.format(formatOpt);\n\n const text3dOptions = new Bit.Advanced.Text3D.Text3DDto();\n text3dOptions.text = formattedText;\n text3dOptions.rotation = 180;\n text3dOptions.fontSize = 2;\n const text3d = await bitbybit.advanced.text3d.create(text3dOptions);\n bitbybit.draw.drawAnyAsync({ entity: text3d });\n}\n\nstart();","type":"typescript"}} title="Text Formatting And 3D Fonts" /> diff --git a/docs/learn/code/common/base/vector/vector-usage-examples.md b/docs/learn/code/common/base/vector/vector-usage-examples.md index 6a8072c87..dcd545908 100644 --- a/docs/learn/code/common/base/vector/vector-usage-examples.md +++ b/docs/learn/code/common/base/vector/vector-usage-examples.md @@ -60,21 +60,21 @@ Click through the tabs below to see the implementation in Rete, Blockly, and Typ spanItemsspanEaseItemsvectorsj40040010100.450.50.5FALSE#ffffff#ffffffspanItems0.205spanEaseItemsspanItems05'easeInSine'FALSEvectorsj1spanItems1INSERTLASTvectorsGETFROM_STARTspanItemsjGETFROM_STARTspanEaseItemsj0vectorsvectors","version":"0.21.0","type":"blockly"}} + script={{"script":"spanItemsspanEaseItemsvectorsj40040010100.450.50.5FALSE#ffffff#ffffffspanItems0.205spanEaseItemsspanItems05'easeInSine'FALSEvectorsj1spanItems1INSERTLASTvectorsGETFROM_STARTspanItemsjGETFROM_STARTspanEaseItemsj0vectorsvectors","type":"blockly"}} title="Vector Span & Ease In Combination" /> {\n\n const spanOptions = new Bit.Inputs.Vector.SpanDto();\n spanOptions.step = 0.2;\n spanOptions.min = 0;\n spanOptions.max = 5;\n const spanItems = bitbybit.vector.span(spanOptions);\n\n const spanEaseOptions = new Bit.Inputs.Vector.SpanEaseItemsDto();\n spanEaseOptions.ease = Bit.Inputs.Math.easeEnum.easeInSine;\n spanEaseOptions.min = 0;\n spanEaseOptions.max = 5;\n spanEaseOptions.nrItems = spanItems.length;\n const spanEaseItems = bitbybit.vector.spanEaseItems(spanEaseOptions);\n\n const vectors = spanItems.map((s, index) => [s, spanEaseItems[index], 0]) as Bit.Inputs.Base.Vector3[];\n\n bitbybit.draw.drawGridMesh(new Bit.Inputs.Draw.SceneDrawGridMeshDto());\n bitbybit.draw.drawAnyAsync({ entity: vectors });\n\n}\n\nstart();","version":"0.21.0","type":"typescript"}} + script={{"script":"const start = () => {\n\n const spanOptions = new Bit.Inputs.Vector.SpanDto();\n spanOptions.step = 0.2;\n spanOptions.min = 0;\n spanOptions.max = 5;\n const spanItems = bitbybit.vector.span(spanOptions);\n\n const spanEaseOptions = new Bit.Inputs.Vector.SpanEaseItemsDto();\n spanEaseOptions.ease = Bit.Inputs.Math.easeEnum.easeInSine;\n spanEaseOptions.min = 0;\n spanEaseOptions.max = 5;\n spanEaseOptions.nrItems = spanItems.length;\n const spanEaseItems = bitbybit.vector.spanEaseItems(spanEaseOptions);\n\n const vectors = spanItems.map((s, index) => [s, spanEaseItems[index], 0]) as Bit.Inputs.Base.Vector3[];\n\n bitbybit.draw.drawGridMesh(new Bit.Inputs.Draw.SceneDrawGridMeshDto());\n bitbybit.draw.drawAnyAsync({ entity: vectors });\n\n}\n\nstart();","type":"typescript"}} title="Vector Span & Ease In Combination" /> diff --git a/docs/learn/code/common/draw/examples.mdx b/docs/learn/code/common/draw/examples.mdx index a803d9d99..6f038e96a 100644 --- a/docs/learn/code/common/draw/examples.mdx +++ b/docs/learn/code/common/draw/examples.mdx @@ -28,7 +28,7 @@ The primary component for custom drawing is typically found under the path: **Rete Example: Filleted Cube with Custom Drawing Options** @@ -44,7 +44,7 @@ The primary block for custom drawing is typically found under: 5000TRUE111#ff6600#000099#cc33cc20.3TRUETRUETRUE0.01FALSE0.06#ff00ffFALSE0.06#0000ff","version":"0.21.0","type":"blockly"}} + script={{"script":"5000TRUE111#ff6600#000099#cc33cc20.3TRUETRUETRUE0.01FALSE0.06#ff00ffFALSE0.06#0000ff","type":"blockly"}} title="Blockly Drawing Example" description="Draws simple filletted cube geometry." /> @@ -55,7 +55,7 @@ Finally, we achieve the same result using TypeScript. The code follows a similar {\n\n const cubeOptions = new Bit.Inputs.OCCT.CubeDto();\n cubeOptions.size = 5;\n const cube = await bitbybit.occt.shapes.solid.createCube(cubeOptions);\n const filletOptions = new Bit.Inputs.OCCT.FilletDto()\n filletOptions.shape = cube;\n filletOptions.radius = 1;\n const roundedCube = await bitbybit.occt.fillets.filletEdges(filletOptions);\n\n const drawOcctOptions = new Bit.Inputs.Draw.DrawOcctShapeOptions();\n drawOcctOptions.faceColour = \"#0000ff\";\n drawOcctOptions.edgeColour = \"#ff5555\";\n drawOcctOptions.drawVertices = true;\n drawOcctOptions.vertexSize = 0.3;\n // The rest of options remain default (initialized inside the instance)\n const drawnMesh = await bitbybit.draw.drawAnyAsync({ entity: roundedCube, options: drawOcctOptions })\n // drawnMesh is BABYLONJS Mesh if BabylonJS engine is used. In Three.JS it turns into Group.\n return drawnMesh;\n \n}\n\nstart();","version":"0.21.0","type":"typescript"}} + script={{"script":"const start = async () => {\n\n const cubeOptions = new Bit.Inputs.OCCT.CubeDto();\n cubeOptions.size = 5;\n const cube = await bitbybit.occt.shapes.solid.createCube(cubeOptions);\n const filletOptions = new Bit.Inputs.OCCT.FilletDto()\n filletOptions.shape = cube;\n filletOptions.radius = 1;\n const roundedCube = await bitbybit.occt.fillets.filletEdges(filletOptions);\n\n const drawOcctOptions = new Bit.Inputs.Draw.DrawOcctShapeOptions();\n drawOcctOptions.faceColour = \"#0000ff\";\n drawOcctOptions.edgeColour = \"#ff5555\";\n drawOcctOptions.drawVertices = true;\n drawOcctOptions.vertexSize = 0.3;\n // The rest of options remain default (initialized inside the instance)\n const drawnMesh = await bitbybit.draw.drawAnyAsync({ entity: roundedCube, options: drawOcctOptions })\n // drawnMesh is BABYLONJS Mesh if BabylonJS engine is used. In Three.JS it turns into Group.\n return drawnMesh;\n \n}\n\nstart();","type":"typescript"}} title="TypeScript Drawing Example" description="Draws simple filletted cube geometry." /> \ No newline at end of file diff --git a/docs/learn/code/common/occt/booleans/operations.mdx b/docs/learn/code/common/occt/booleans/operations.mdx index 323788d16..09a4f0463 100644 --- a/docs/learn/code/common/occt/booleans/operations.mdx +++ b/docs/learn/code/common/occt/booleans/operations.mdx @@ -49,21 +49,21 @@ The following scripts demonstrate creating three solids (a box, a cylinder, and **TypeScript Example: Union of Solids** {\n const boxOpt = new Bit.Inputs.OCCT.BoxDto();\n boxOpt.width = 5;\n boxOpt.length = 8;\n boxOpt.height = 5;\n const box = await bitbybit.occt.shapes.solid.createBox(boxOpt);\n\n\n const cylinderOpt = new Bit.Inputs.OCCT.CylinderDto();\n cylinderOpt.radius = 3;\n cylinderOpt.height = 7;\n cylinderOpt.center = [3, 0, 3];\n const cylinder = await bitbybit.occt.shapes.solid.createCylinder(cylinderOpt);\n\n\n const sphereOpt = new Bit.Inputs.OCCT.SphereDto();\n sphereOpt.radius = 3;\n sphereOpt.center = [-1.5, 1.5, -5];\n const sphere = await bitbybit.occt.shapes.solid.createSphere(sphereOpt);\n\n const union = await bitbybit.occt.booleans.union({\n shapes: [box, cylinder, sphere],\n keepEdges: false\n })\n\n bitbybit.draw.drawAnyAsync({\n entity: union\n });\n}\n\nstart();\n","version":"0.21.0","type":"typescript"}} + script={{"script":"const start = async () => {\n const boxOpt = new Bit.Inputs.OCCT.BoxDto();\n boxOpt.width = 5;\n boxOpt.length = 8;\n boxOpt.height = 5;\n const box = await bitbybit.occt.shapes.solid.createBox(boxOpt);\n\n\n const cylinderOpt = new Bit.Inputs.OCCT.CylinderDto();\n cylinderOpt.radius = 3;\n cylinderOpt.height = 7;\n cylinderOpt.center = [3, 0, 3];\n const cylinder = await bitbybit.occt.shapes.solid.createCylinder(cylinderOpt);\n\n\n const sphereOpt = new Bit.Inputs.OCCT.SphereDto();\n sphereOpt.radius = 3;\n sphereOpt.center = [-1.5, 1.5, -5];\n const sphere = await bitbybit.occt.shapes.solid.createSphere(sphereOpt);\n\n const union = await bitbybit.occt.booleans.union({\n shapes: [box, cylinder, sphere],\n keepEdges: false\n })\n\n bitbybit.draw.drawAnyAsync({\n entity: union\n });\n}\n\nstart();\n","type":"typescript"}} title="Union Three Solids" /> **Blockly Example: Union of Solids** boxspherecylinderbox585000sphere3-1.51.5-5cylinder37303010boxcylindersphereFALSE","version":"0.21.0","type":"blockly"}} + script={{"script":"boxspherecylinderbox585000sphere3-1.51.5-5cylinder37303010boxcylindersphereFALSE","type":"blockly"}} title="Union Three Solids" /> **Rete Example: Union of Solids** @@ -94,21 +94,21 @@ These scripts demonstrate creating a box, cylinder, and sphere, then subtracting **TypeScript Example: Difference of Solids** {\n const boxOpt = new Bit.Inputs.OCCT.BoxDto();\n boxOpt.width = 5;\n boxOpt.length = 8;\n boxOpt.height = 5;\n const box = await bitbybit.occt.shapes.solid.createBox(boxOpt);\n\n\n const cylinderOpt = new Bit.Inputs.OCCT.CylinderDto();\n cylinderOpt.radius = 3;\n cylinderOpt.height = 7;\n cylinderOpt.center = [3, 0, 3];\n const cylinder = await bitbybit.occt.shapes.solid.createCylinder(cylinderOpt);\n\n\n const sphereOpt = new Bit.Inputs.OCCT.SphereDto();\n sphereOpt.radius = 3;\n sphereOpt.center = [-1.5, 1.5, -5];\n const sphere = await bitbybit.occt.shapes.solid.createSphere(sphereOpt);\n\n const diff = await bitbybit.occt.booleans.difference({\n shape: box,\n shapes: [cylinder, sphere],\n keepEdges: false\n })\n\n bitbybit.draw.drawAnyAsync({\n entity: diff\n });\n}\n\nstart();\n","version":"0.21.0","type":"typescript"}} + script={{"script":"const start = async () => {\n const boxOpt = new Bit.Inputs.OCCT.BoxDto();\n boxOpt.width = 5;\n boxOpt.length = 8;\n boxOpt.height = 5;\n const box = await bitbybit.occt.shapes.solid.createBox(boxOpt);\n\n\n const cylinderOpt = new Bit.Inputs.OCCT.CylinderDto();\n cylinderOpt.radius = 3;\n cylinderOpt.height = 7;\n cylinderOpt.center = [3, 0, 3];\n const cylinder = await bitbybit.occt.shapes.solid.createCylinder(cylinderOpt);\n\n\n const sphereOpt = new Bit.Inputs.OCCT.SphereDto();\n sphereOpt.radius = 3;\n sphereOpt.center = [-1.5, 1.5, -5];\n const sphere = await bitbybit.occt.shapes.solid.createSphere(sphereOpt);\n\n const diff = await bitbybit.occt.booleans.difference({\n shape: box,\n shapes: [cylinder, sphere],\n keepEdges: false\n })\n\n bitbybit.draw.drawAnyAsync({\n entity: diff\n });\n}\n\nstart();\n","type":"typescript"}} title="Difference of Solids" /> **Blockly Example: Difference of Solids** boxspherecylinderbox585000sphere3-1.51.5-5cylinder37303010boxcylindersphereFALSE","version":"0.21.0","type":"blockly"}} + script={{"script":"boxspherecylinderbox585000sphere3-1.51.5-5cylinder37303010boxcylindersphereFALSE","type":"blockly"}} title="Difference of Solids" /> **Rete Example: Difference of Solids** @@ -138,21 +138,21 @@ These scripts create a box, cylinder, and sphere, and then compute their common **TypeScript Example: Intersection of Solids** {\n const boxOpt = new Bit.Inputs.OCCT.BoxDto();\n boxOpt.width = 5;\n boxOpt.length = 8;\n boxOpt.height = 5;\n const box = await bitbybit.occt.shapes.solid.createBox(boxOpt);\n\n\n const cylinderOpt = new Bit.Inputs.OCCT.CylinderDto();\n cylinderOpt.radius = 3;\n cylinderOpt.height = 7;\n cylinderOpt.center = [3, 0, 3];\n const cylinder = await bitbybit.occt.shapes.solid.createCylinder(cylinderOpt);\n\n\n const sphereOpt = new Bit.Inputs.OCCT.SphereDto();\n sphereOpt.radius = 3;\n sphereOpt.center = [-1.5, 1.5, -5];\n const sphere = await bitbybit.occt.shapes.solid.createSphere(sphereOpt);\n\n const diff = await bitbybit.occt.booleans.intersection({\n shapes: [box, cylinder, sphere],\n keepEdges: false\n })\n\n bitbybit.draw.drawAnyAsync({\n entity: diff\n });\n}\n\nstart();\n","version":"0.21.0","type":"typescript"}} + script={{"script":"const start = async () => {\n const boxOpt = new Bit.Inputs.OCCT.BoxDto();\n boxOpt.width = 5;\n boxOpt.length = 8;\n boxOpt.height = 5;\n const box = await bitbybit.occt.shapes.solid.createBox(boxOpt);\n\n\n const cylinderOpt = new Bit.Inputs.OCCT.CylinderDto();\n cylinderOpt.radius = 3;\n cylinderOpt.height = 7;\n cylinderOpt.center = [3, 0, 3];\n const cylinder = await bitbybit.occt.shapes.solid.createCylinder(cylinderOpt);\n\n\n const sphereOpt = new Bit.Inputs.OCCT.SphereDto();\n sphereOpt.radius = 3;\n sphereOpt.center = [-1.5, 1.5, -5];\n const sphere = await bitbybit.occt.shapes.solid.createSphere(sphereOpt);\n\n const diff = await bitbybit.occt.booleans.intersection({\n shapes: [box, cylinder, sphere],\n keepEdges: false\n })\n\n bitbybit.draw.drawAnyAsync({\n entity: diff\n });\n}\n\nstart();\n","type":"typescript"}} title="Intersection of Solids" /> **Blockly Example: Intersection of Solids** boxspherecylinderbox585000sphere3-1.51.5-5cylinder37303010boxcylindersphereFALSE","version":"0.21.0","type":"blockly"}} + script={{"script":"boxspherecylinderbox585000sphere3-1.51.5-5cylinder37303010boxcylindersphereFALSE","type":"blockly"}} title="Intersection of Solids" /> **Rete Example: Intersection of Solids** diff --git a/docs/learn/code/common/occt/dimensions/angular-dimension.md b/docs/learn/code/common/occt/dimensions/angular-dimension.md index 7e96fcb2e..670504380 100644 --- a/docs/learn/code/common/occt/dimensions/angular-dimension.md +++ b/docs/learn/code/common/occt/dimensions/angular-dimension.md @@ -32,21 +32,21 @@ Angular dimensions measure the angle between two direction vectors and display t direction1direction2centerdirection1100direction2011center000direction1direction2center20.30.11deg0.30.4FALSE","version":"0.21.0","type":"blockly"}} + script={{"script":"direction1direction2centerdirection1100direction2011center000direction1direction2center20.30.11deg0.30.4FALSE","type":"blockly"}} title="Simple angular dimension between two directions" /> {\n // Define two direction vectors to measure angle between\n const direction1: Vector3 = [1, 0, 0]; // X-axis direction\n const direction2: Vector3 = [0, 1, 1]; // Direction at 45deg from Y and Z\n const center: Point3 = [0, 0, 0]; // Origin point\n\n // Create an angular dimension between the directions\n const dimensionOptions = new SimpleAngularDimensionDto();\n dimensionOptions.direction1 = direction1;\n dimensionOptions.direction2 = direction2;\n dimensionOptions.center = center;\n dimensionOptions.radius = 2;\n dimensionOptions.offsetFromCenter = 0.3;\n dimensionOptions.extraSize = 0.1;\n dimensionOptions.decimalPlaces = 1;\n dimensionOptions.labelSuffix = \"deg\";\n dimensionOptions.labelSize = 0.3;\n dimensionOptions.labelOffset = 0.4;\n dimensionOptions.radians = false;\n\n // Create and draw the dimension\n const dimension = await bitbybit.occt.dimensions.simpleAngularDimension(dimensionOptions);\n bitbybit.draw.drawAnyAsync({ entity: dimension });\n}\n\n// Execute the function\nstart();","version":"0.21.0","type":"typescript"}} + script={{"script":"// Import the required DTO for angular dimensions\nconst { SimpleAngularDimensionDto } = Bit.Inputs.OCCT;\ntype Point3 = Bit.Inputs.Base.Point3;\ntype Vector3 = Bit.Inputs.Base.Vector3;\n\n// Define the main function\nconst start = async () => {\n // Define two direction vectors to measure angle between\n const direction1: Vector3 = [1, 0, 0]; // X-axis direction\n const direction2: Vector3 = [0, 1, 1]; // Direction at 45deg from Y and Z\n const center: Point3 = [0, 0, 0]; // Origin point\n\n // Create an angular dimension between the directions\n const dimensionOptions = new SimpleAngularDimensionDto();\n dimensionOptions.direction1 = direction1;\n dimensionOptions.direction2 = direction2;\n dimensionOptions.center = center;\n dimensionOptions.radius = 2;\n dimensionOptions.offsetFromCenter = 0.3;\n dimensionOptions.extraSize = 0.1;\n dimensionOptions.decimalPlaces = 1;\n dimensionOptions.labelSuffix = \"deg\";\n dimensionOptions.labelSize = 0.3;\n dimensionOptions.labelOffset = 0.4;\n dimensionOptions.radians = false;\n\n // Create and draw the dimension\n const dimension = await bitbybit.occt.dimensions.simpleAngularDimension(dimensionOptions);\n bitbybit.draw.drawAnyAsync({ entity: dimension });\n}\n\n// Execute the function\nstart();","type":"typescript"}} title="Simple angular dimension between two directions" /> @@ -62,21 +62,21 @@ Angular dimensions are particularly useful for complex 3D geometry like cones, w conerotatedConeconeEdgetranslatedEdgestartPointendPointdirection1cone52.75360000010rotatedConecone010-90coneEdgerotatedCone2translatedEdgeconeEdge-100startPointtranslatedEdgeendPointtranslatedEdgedirection1endPointstartPointrotatedConedirection1-100startPoint7202(deg)0.40.6FALSE","version":"0.21.0","type":"blockly"}} + script={{"script":"conerotatedConeconeEdgetranslatedEdgestartPointendPointdirection1cone52.75360000010rotatedConecone010-90coneEdgerotatedCone2translatedEdgeconeEdge-100startPointtranslatedEdgeendPointtranslatedEdgedirection1endPointstartPointrotatedConedirection1-100startPoint7202(deg)0.40.6FALSE","type":"blockly"}} title="Cone with apex angle measurement" /> {\n // Create a cone with specific dimensions\n const coneOptions = new ConeDto();\n coneOptions.radius1 = 5;\n coneOptions.radius2 = 2.7; // Variable radius for apex angle\n coneOptions.height = 5;\n coneOptions.angle = 360;\n coneOptions.center = [0, 0, 0];\n coneOptions.direction = [0, 1, 0];\n const cone = await solid.createCone(coneOptions);\n\n // Rotate the cone -90 degrees around Y axis for better visualization\n const rotatedCone = await transforms.rotate({\n shape: cone,\n axis: [0, 1, 0],\n angle: -90\n });\n\n // Draw the rotated cone\n bitbybit.draw.drawAnyAsync({ entity: rotatedCone });\n\n // Get edge 2 from the cone (this is a generatrix line)\n const coneEdge = await edge.getEdge({ shape: rotatedCone, index: 2 });\n\n // Translate the edge to position it for measurement\n const translatedEdge = await transforms.translate({\n shape: coneEdge,\n translation: [-1, 0, 0]\n });\n\n // Get start and end points from the translated edge\n const startPoint = await edge.startPointOnEdge({ shape: translatedEdge });\n const endPoint = await edge.endPointOnEdge({ shape: translatedEdge });\n\n // Calculate direction vector from start to end point\n const direction1 = bitbybit.vector.sub({ first: endPoint, second: startPoint }) as Vector3;\n\n // Create angular dimension to measure apex angle\n const dimensionOptions = new SimpleAngularDimensionDto();\n dimensionOptions.direction1 = direction1;\n dimensionOptions.direction2 = [-1, 0, 0]; // Reference direction\n dimensionOptions.center = startPoint; // Apex point\n dimensionOptions.radius = 7;\n dimensionOptions.offsetFromCenter = 2;\n dimensionOptions.extraSize = 0;\n dimensionOptions.decimalPlaces = 2;\n dimensionOptions.labelSuffix = \"(deg)\";\n dimensionOptions.labelSize = 0.4;\n dimensionOptions.labelOffset = 0.6;\n dimensionOptions.radians = false;\n\n // Create and draw the angular dimension\n const dimension = await dimensions.simpleAngularDimension(dimensionOptions);\n bitbybit.draw.drawAnyAsync({ entity: dimension });\n}\n\n// Execute the function\nstart();","version":"0.21.0","type":"typescript"}} + script={{"script":"// Import required DTOs for creating shapes and dimensions\nconst { ConeDto, SimpleAngularDimensionDto } = Bit.Inputs.OCCT;\n// Import types for type safety\ntype TopoDSSolidPointer = Bit.Inputs.OCCT.TopoDSSolidPointer;\ntype TopoDSEdgePointer = Bit.Inputs.OCCT.TopoDSEdgePointer;\ntype Point3 = Bit.Inputs.Base.Point3;\ntype Vector3 = Bit.Inputs.Base.Vector3;\n\n// Get access to OCCT modules\nconst { shapes, dimensions, transforms } = bitbybit.occt;\nconst { solid, edge } = shapes;\n\n// Define the main function to create a cone with angular dimension\nconst start = async () => {\n // Create a cone with specific dimensions\n const coneOptions = new ConeDto();\n coneOptions.radius1 = 5;\n coneOptions.radius2 = 2.7; // Variable radius for apex angle\n coneOptions.height = 5;\n coneOptions.angle = 360;\n coneOptions.center = [0, 0, 0];\n coneOptions.direction = [0, 1, 0];\n const cone = await solid.createCone(coneOptions);\n\n // Rotate the cone -90 degrees around Y axis for better visualization\n const rotatedCone = await transforms.rotate({\n shape: cone,\n axis: [0, 1, 0],\n angle: -90\n });\n\n // Draw the rotated cone\n bitbybit.draw.drawAnyAsync({ entity: rotatedCone });\n\n // Get edge 2 from the cone (this is a generatrix line)\n const coneEdge = await edge.getEdge({ shape: rotatedCone, index: 2 });\n\n // Translate the edge to position it for measurement\n const translatedEdge = await transforms.translate({\n shape: coneEdge,\n translation: [-1, 0, 0]\n });\n\n // Get start and end points from the translated edge\n const startPoint = await edge.startPointOnEdge({ shape: translatedEdge });\n const endPoint = await edge.endPointOnEdge({ shape: translatedEdge });\n\n // Calculate direction vector from start to end point\n const direction1 = bitbybit.vector.sub({ first: endPoint, second: startPoint }) as Vector3;\n\n // Create angular dimension to measure apex angle\n const dimensionOptions = new SimpleAngularDimensionDto();\n dimensionOptions.direction1 = direction1;\n dimensionOptions.direction2 = [-1, 0, 0]; // Reference direction\n dimensionOptions.center = startPoint; // Apex point\n dimensionOptions.radius = 7;\n dimensionOptions.offsetFromCenter = 2;\n dimensionOptions.extraSize = 0;\n dimensionOptions.decimalPlaces = 2;\n dimensionOptions.labelSuffix = \"(deg)\";\n dimensionOptions.labelSize = 0.4;\n dimensionOptions.labelOffset = 0.6;\n dimensionOptions.radians = false;\n\n // Create and draw the angular dimension\n const dimension = await dimensions.simpleAngularDimension(dimensionOptions);\n bitbybit.draw.drawAnyAsync({ entity: dimension });\n}\n\n// Execute the function\nstart();","type":"typescript"}} title="Cone with apex angle measurement" /> diff --git a/docs/learn/code/common/occt/dimensions/linear-dimension.md b/docs/learn/code/common/occt/dimensions/linear-dimension.md index 9f4324055..1a95938d8 100644 --- a/docs/learn/code/common/occt/dimensions/linear-dimension.md +++ b/docs/learn/code/common/occt/dimensions/linear-dimension.md @@ -26,21 +26,21 @@ Linear dimensions measure straight-line distances between two points and display point1point2point1-500point2500point1point2point1point20100.30.21cm0.40.80","version":"0.21.0","type":"blockly"}} + script={{"script":"point1point2point1-500point2500point1point2point1point20100.30.21cm0.40.80","type":"blockly"}} title="Simple linear dimension between two points" /> {\n // Define two points to measure between\n const startPoint: Point3 = [-5, 0, 0];\n const endPoint: Point3 = [5, 0, 0];\n\n // Draw the points for reference\n bitbybit.draw.drawAnyAsync({ entity: startPoint });\n bitbybit.draw.drawAnyAsync({ entity: endPoint });\n\n // Create a linear dimension between the points\n const dimensionOptions = new SimpleLinearLengthDimensionDto();\n dimensionOptions.start = startPoint;\n dimensionOptions.end = endPoint;\n dimensionOptions.direction = [0, 1, 0]; // Offset in Y direction\n dimensionOptions.offsetFromPoints = 0.3;\n dimensionOptions.crossingSize = 0.2;\n dimensionOptions.decimalPlaces = 1;\n dimensionOptions.labelSuffix = \"cm\";\n dimensionOptions.labelSize = 0.4;\n dimensionOptions.labelOffset = 0.8;\n dimensionOptions.labelRotation = 0;\n\n // Create and draw the dimension\n const dimension = await bitbybit.occt.dimensions.simpleLinearLengthDimension(dimensionOptions);\n bitbybit.draw.drawAnyAsync({ entity: dimension });\n}\n\n// Execute the function\nstart();","version":"0.21.0","type":"typescript"}} + script={{"script":"// Import the required DTO for linear dimensions\nconst { SimpleLinearLengthDimensionDto } = Bit.Inputs.OCCT;\ntype Point3 = Bit.Inputs.Base.Point3;\n\n// Define the main function\nconst start = async () => {\n // Define two points to measure between\n const startPoint: Point3 = [-5, 0, 0];\n const endPoint: Point3 = [5, 0, 0];\n\n // Draw the points for reference\n bitbybit.draw.drawAnyAsync({ entity: startPoint });\n bitbybit.draw.drawAnyAsync({ entity: endPoint });\n\n // Create a linear dimension between the points\n const dimensionOptions = new SimpleLinearLengthDimensionDto();\n dimensionOptions.start = startPoint;\n dimensionOptions.end = endPoint;\n dimensionOptions.direction = [0, 1, 0]; // Offset in Y direction\n dimensionOptions.offsetFromPoints = 0.3;\n dimensionOptions.crossingSize = 0.2;\n dimensionOptions.decimalPlaces = 1;\n dimensionOptions.labelSuffix = \"cm\";\n dimensionOptions.labelSize = 0.4;\n dimensionOptions.labelOffset = 0.8;\n dimensionOptions.labelRotation = 0;\n\n // Create and draw the dimension\n const dimension = await bitbybit.occt.dimensions.simpleLinearLengthDimension(dimensionOptions);\n bitbybit.draw.drawAnyAsync({ entity: dimension });\n}\n\n// Execute the function\nstart();","type":"typescript"}} title="Simple linear dimension between two points" /> @@ -51,21 +51,21 @@ Linear dimensions update automatically when geometry changes, keeping your docum widthlengthheightboxfirstEdgesecondEdgethirdEdgewidth13.2length9.1height5.3boxwidthlengthheight000TRUEfirstEdgebox1secondEdgebox8thirdEdgebox11firstEdgefirstEdge-2000.20.22(cm)0.51180secondEdgesecondEdge2000.20.22(cm)0.51180thirdEdgethirdEdge00-20.20.22(cm)0.51180box","version":"0.21.0","type":"blockly"}} + script={{"script":"widthlengthheightboxfirstEdgesecondEdgethirdEdgewidth13.2length9.1height5.3boxwidthlengthheight000TRUEfirstEdgebox1secondEdgebox8thirdEdgebox11firstEdgefirstEdge-2000.20.22(cm)0.51180secondEdgesecondEdge2000.20.22(cm)0.51180thirdEdgethirdEdge00-20.20.22(cm)0.51180box","type":"blockly"}} title="Linear dimensions applied on box" /> {\n // Create a box with specific dimensions\n const boxOptions = new BoxDto();\n boxOptions.width = 13.2;\n boxOptions.length = 9.1;\n boxOptions.height = 5.3;\n boxOptions.center = [0, 0, 0];\n boxOptions.originOnCenter = true;\n const box = await solid.createBox(boxOptions);\n\n // Draw the box first\n bitbybit.draw.drawAnyAsync({ entity: box });\n\n // Get all edges from the box for dimension measurements\n const edges = await edge.getEdges({ shape: box });\n\n // Create width dimension (measuring edge 0)\n const widthEdge = edges[0];\n const widthStartPoint = await edge.startPointOnEdge({ shape: widthEdge });\n const widthEndPoint = await edge.endPointOnEdge({ shape: widthEdge });\n\n const widthDimensionOptions = new SimpleLinearLengthDimensionDto();\n widthDimensionOptions.start = widthStartPoint;\n widthDimensionOptions.end = widthEndPoint;\n widthDimensionOptions.direction = [-2, 0, 0]; // Offset to the left\n widthDimensionOptions.offsetFromPoints = 0.2;\n widthDimensionOptions.crossingSize = 0.2;\n widthDimensionOptions.decimalPlaces = 2;\n widthDimensionOptions.labelSuffix = \"(cm)\";\n widthDimensionOptions.labelSize = 0.5;\n widthDimensionOptions.labelOffset = 1;\n widthDimensionOptions.labelRotation = 180;\n \n const widthDimension = await dimensions.simpleLinearLengthDimension(widthDimensionOptions);\n bitbybit.draw.drawAnyAsync({ entity: widthDimension });\n\n // Create height dimension (measuring edge 10)\n const heightEdge = edges[10];\n const heightStartPoint = await edge.startPointOnEdge({ shape: heightEdge });\n const heightEndPoint = await edge.endPointOnEdge({ shape: heightEdge });\n\n const heightDimensionOptions = new SimpleLinearLengthDimensionDto();\n heightDimensionOptions.start = heightStartPoint;\n heightDimensionOptions.end = heightEndPoint;\n heightDimensionOptions.direction = [0, 0, -2]; // Offset toward the back\n heightDimensionOptions.offsetFromPoints = 0.2;\n heightDimensionOptions.crossingSize = 0.2;\n heightDimensionOptions.decimalPlaces = 2;\n heightDimensionOptions.labelSuffix = \"(cm)\";\n heightDimensionOptions.labelSize = 0.5;\n heightDimensionOptions.labelOffset = 1;\n heightDimensionOptions.labelRotation = 180;\n \n const heightDimension = await dimensions.simpleLinearLengthDimension(heightDimensionOptions);\n bitbybit.draw.drawAnyAsync({ entity: heightDimension });\n\n // Create depth dimension (measuring edge 7)\n const depthEdge = edges[7];\n const depthStartPoint = await edge.endPointOnEdge({ shape: depthEdge });\n const depthEndPoint = await edge.startPointOnEdge({ shape: depthEdge });\n\n const depthDimensionOptions = new SimpleLinearLengthDimensionDto();\n depthDimensionOptions.start = depthStartPoint;\n depthDimensionOptions.end = depthEndPoint;\n depthDimensionOptions.direction = [2, 0, 0]; // Offset to the right\n depthDimensionOptions.offsetFromPoints = 0.2;\n depthDimensionOptions.crossingSize = 0.2;\n depthDimensionOptions.decimalPlaces = 2;\n depthDimensionOptions.labelSuffix = \"(cm)\";\n depthDimensionOptions.labelSize = 0.5;\n depthDimensionOptions.labelOffset = 1;\n depthDimensionOptions.labelRotation = 180;\n \n const depthDimension = await dimensions.simpleLinearLengthDimension(depthDimensionOptions);\n bitbybit.draw.drawAnyAsync({ entity: depthDimension });\n}\n\n// Execute the function\nstart();","version":"0.21.0","type":"typescript"}} + script={{"script":"// Import required DTOs for creating shapes and dimensions\nconst { BoxDto, SimpleLinearLengthDimensionDto } = Bit.Inputs.OCCT;\n// Import types for type safety\ntype TopoDSSolidPointer = Bit.Inputs.OCCT.TopoDSSolidPointer;\ntype TopoDSEdgePointer = Bit.Inputs.OCCT.TopoDSEdgePointer;\n\n// Get access to OCCT modules\nconst { shapes, dimensions } = bitbybit.occt;\nconst { solid, edge } = shapes;\n\n// Define the main function to create a box with linear dimensions\nconst start = async () => {\n // Create a box with specific dimensions\n const boxOptions = new BoxDto();\n boxOptions.width = 13.2;\n boxOptions.length = 9.1;\n boxOptions.height = 5.3;\n boxOptions.center = [0, 0, 0];\n boxOptions.originOnCenter = true;\n const box = await solid.createBox(boxOptions);\n\n // Draw the box first\n bitbybit.draw.drawAnyAsync({ entity: box });\n\n // Get all edges from the box for dimension measurements\n const edges = await edge.getEdges({ shape: box });\n\n // Create width dimension (measuring edge 0)\n const widthEdge = edges[0];\n const widthStartPoint = await edge.startPointOnEdge({ shape: widthEdge });\n const widthEndPoint = await edge.endPointOnEdge({ shape: widthEdge });\n\n const widthDimensionOptions = new SimpleLinearLengthDimensionDto();\n widthDimensionOptions.start = widthStartPoint;\n widthDimensionOptions.end = widthEndPoint;\n widthDimensionOptions.direction = [-2, 0, 0]; // Offset to the left\n widthDimensionOptions.offsetFromPoints = 0.2;\n widthDimensionOptions.crossingSize = 0.2;\n widthDimensionOptions.decimalPlaces = 2;\n widthDimensionOptions.labelSuffix = \"(cm)\";\n widthDimensionOptions.labelSize = 0.5;\n widthDimensionOptions.labelOffset = 1;\n widthDimensionOptions.labelRotation = 180;\n \n const widthDimension = await dimensions.simpleLinearLengthDimension(widthDimensionOptions);\n bitbybit.draw.drawAnyAsync({ entity: widthDimension });\n\n // Create height dimension (measuring edge 10)\n const heightEdge = edges[10];\n const heightStartPoint = await edge.startPointOnEdge({ shape: heightEdge });\n const heightEndPoint = await edge.endPointOnEdge({ shape: heightEdge });\n\n const heightDimensionOptions = new SimpleLinearLengthDimensionDto();\n heightDimensionOptions.start = heightStartPoint;\n heightDimensionOptions.end = heightEndPoint;\n heightDimensionOptions.direction = [0, 0, -2]; // Offset toward the back\n heightDimensionOptions.offsetFromPoints = 0.2;\n heightDimensionOptions.crossingSize = 0.2;\n heightDimensionOptions.decimalPlaces = 2;\n heightDimensionOptions.labelSuffix = \"(cm)\";\n heightDimensionOptions.labelSize = 0.5;\n heightDimensionOptions.labelOffset = 1;\n heightDimensionOptions.labelRotation = 180;\n \n const heightDimension = await dimensions.simpleLinearLengthDimension(heightDimensionOptions);\n bitbybit.draw.drawAnyAsync({ entity: heightDimension });\n\n // Create depth dimension (measuring edge 7)\n const depthEdge = edges[7];\n const depthStartPoint = await edge.endPointOnEdge({ shape: depthEdge });\n const depthEndPoint = await edge.startPointOnEdge({ shape: depthEdge });\n\n const depthDimensionOptions = new SimpleLinearLengthDimensionDto();\n depthDimensionOptions.start = depthStartPoint;\n depthDimensionOptions.end = depthEndPoint;\n depthDimensionOptions.direction = [2, 0, 0]; // Offset to the right\n depthDimensionOptions.offsetFromPoints = 0.2;\n depthDimensionOptions.crossingSize = 0.2;\n depthDimensionOptions.decimalPlaces = 2;\n depthDimensionOptions.labelSuffix = \"(cm)\";\n depthDimensionOptions.labelSize = 0.5;\n depthDimensionOptions.labelOffset = 1;\n depthDimensionOptions.labelRotation = 180;\n \n const depthDimension = await dimensions.simpleLinearLengthDimension(depthDimensionOptions);\n bitbybit.draw.drawAnyAsync({ entity: depthDimension });\n}\n\n// Execute the function\nstart();","type":"typescript"}} title="Linear dimensions applied on box" /> diff --git a/docs/learn/code/common/occt/dimensions/pin-with-label.md b/docs/learn/code/common/occt/dimensions/pin-with-label.md index 1408556fc..56db206f2 100644 --- a/docs/learn/code/common/occt/dimensions/pin-with-label.md +++ b/docs/learn/code/common/occt/dimensions/pin-with-label.md @@ -39,21 +39,21 @@ The most basic use case is creating a pin with static text to mark important poi 0003211000Important Point0.30.4","version":"0.21.0","type":"blockly"}} + script={{"script":"0003211000Important Point0.30.4","type":"blockly"}} title="Simple pin with static label" /> {\n // Define points for the pin\n const startPoint: Point3 = [0, 0, 0];\n const endPoint: Point3 = [3, 2, 1];\n const direction: Vector3 = [1, 0, 0];\n\n // Create pin with label options\n const pinOptions = new PinWithLabelDto();\n pinOptions.startPoint = startPoint;\n pinOptions.endPoint = endPoint;\n pinOptions.direction = direction;\n pinOptions.offsetFromStart = 0;\n pinOptions.label = \"Important Point\";\n pinOptions.labelOffset = 0.3;\n pinOptions.labelSize = 0.4;\n\n // Create and draw the pin\n const pin = await bitbybit.occt.dimensions.pinWithLabel(pinOptions);\n bitbybit.draw.drawAnyAsync({ entity: pin });\n}\n\n// Execute the function\nstart();","version":"0.21.0","type":"typescript"}} + script={{"script":"// Import the required DTO for pin with label\nconst { PinWithLabelDto } = Bit.Inputs.OCCT;\ntype Point3 = Bit.Inputs.Base.Point3;\ntype Vector3 = Bit.Inputs.Base.Vector3;\n\n// Define the main function\nconst start = async () => {\n // Define points for the pin\n const startPoint: Point3 = [0, 0, 0];\n const endPoint: Point3 = [3, 2, 1];\n const direction: Vector3 = [1, 0, 0];\n\n // Create pin with label options\n const pinOptions = new PinWithLabelDto();\n pinOptions.startPoint = startPoint;\n pinOptions.endPoint = endPoint;\n pinOptions.direction = direction;\n pinOptions.offsetFromStart = 0;\n pinOptions.label = \"Important Point\";\n pinOptions.labelOffset = 0.3;\n pinOptions.labelSize = 0.4;\n\n // Create and draw the pin\n const pin = await bitbybit.occt.dimensions.pinWithLabel(pinOptions);\n bitbybit.draw.drawAnyAsync({ entity: pin });\n}\n\n// Execute the function\nstart();","type":"typescript"}} title="Simple pin with static label" /> @@ -74,21 +74,21 @@ A more practical application combines pin labels with calculated geometric prope radiusspherevolumeradius2.5sphereradius000volumesphere00radius43ADDradius21000Vol: {0} m3volume20.30.4sphere","version":"0.21.0","type":"blockly"}} + script={{"script":"radiusspherevolumeradius2.5sphereradius000volumesphere00radius43ADDradius21000Vol: {0} m3volume20.30.4sphere","type":"blockly"}} title="Sphere with volume pin label" /> {\n // Parametric radius value\n const radius = 2.5;\n\n // Create a sphere\n const sphereOptions = new SphereDto();\n sphereOptions.radius = radius;\n sphereOptions.center = [0, 0, 0] as Point3;\n\n const sphere = await solid.createSphere(sphereOptions);\n\n // Calculate sphere volume\n const volume = await solid.getSolidVolume({ shape: sphere });\n const roundedVolume = math.roundToDecimals({ number: volume, decimalPlaces: 2 });\n\n // Format volume as text with units\n const volumeText = text.format({\n text: \"Vol: {0} m3\",\n values: [text.toString({ item: roundedVolume })]\n });\n\n // Create pin with calculated volume label\n const pinOptions = new PinWithLabelDto();\n pinOptions.startPoint = [0, 0, radius] as Point3; // Start at top of sphere\n pinOptions.endPoint = [4, 3, radius + 2] as Point3; // Position for visibility\n pinOptions.direction = [1, 0, 0] as Vector3;\n pinOptions.offsetFromStart = 0;\n pinOptions.label = volumeText;\n pinOptions.labelOffset = 0.3;\n pinOptions.labelSize = 0.4;\n\n // Create and draw the pin\n const pin = await dimensions.pinWithLabel(pinOptions);\n \n // Draw both sphere and pin\n bitbybit.draw.drawAnyAsync({ entity: sphere });\n bitbybit.draw.drawAnyAsync({ entity: pin });\n}\n\n// Execute the function\nstart();","version":"0.21.0","type":"typescript"}} + script={{"script":"// Import required DTOs and types\nconst { SphereDto, PinWithLabelDto } = Bit.Inputs.OCCT;\ntype Point3 = Bit.Inputs.Base.Point3;\ntype Vector3 = Bit.Inputs.Base.Vector3;\n\n// Get access to OCCT modules\nconst { solid } = bitbybit.occt.shapes;\nconst { dimensions } = bitbybit.occt;\nconst { math, text } = bitbybit;\n\n// Define the main function\nconst start = async () => {\n // Parametric radius value\n const radius = 2.5;\n\n // Create a sphere\n const sphereOptions = new SphereDto();\n sphereOptions.radius = radius;\n sphereOptions.center = [0, 0, 0] as Point3;\n\n const sphere = await solid.createSphere(sphereOptions);\n\n // Calculate sphere volume\n const volume = await solid.getSolidVolume({ shape: sphere });\n const roundedVolume = math.roundToDecimals({ number: volume, decimalPlaces: 2 });\n\n // Format volume as text with units\n const volumeText = text.format({\n text: \"Vol: {0} m3\",\n values: [text.toString({ item: roundedVolume })]\n });\n\n // Create pin with calculated volume label\n const pinOptions = new PinWithLabelDto();\n pinOptions.startPoint = [0, 0, radius] as Point3; // Start at top of sphere\n pinOptions.endPoint = [4, 3, radius + 2] as Point3; // Position for visibility\n pinOptions.direction = [1, 0, 0] as Vector3;\n pinOptions.offsetFromStart = 0;\n pinOptions.label = volumeText;\n pinOptions.labelOffset = 0.3;\n pinOptions.labelSize = 0.4;\n\n // Create and draw the pin\n const pin = await dimensions.pinWithLabel(pinOptions);\n \n // Draw both sphere and pin\n bitbybit.draw.drawAnyAsync({ entity: sphere });\n bitbybit.draw.drawAnyAsync({ entity: pin });\n}\n\n// Execute the function\nstart();","type":"typescript"}} title="Sphere with volume pin label" /> diff --git a/docs/learn/code/common/occt/fillets/chamfer-circular-edges.mdx b/docs/learn/code/common/occt/fillets/chamfer-circular-edges.mdx index 6182ce333..51195fd99 100644 --- a/docs/learn/code/common/occt/fillets/chamfer-circular-edges.mdx +++ b/docs/learn/code/common/occt/fillets/chamfer-circular-edges.mdx @@ -25,21 +25,21 @@ The examples below demonstrate creating a box with a cylindrical hole through it **TypeScript Example: Chamfer Circular Edge of a Hole** {\n\n const boxOpt = new Bit.Inputs.OCCT.BoxDto();\n boxOpt.width = 5;\n boxOpt.length = 8;\n boxOpt.height = 10;\n const box = await bitbybit.occt.shapes.solid.createBox(boxOpt);\n const cylinderOpt = new Bit.Inputs.OCCT.CylinderDto();\n cylinderOpt.direction = [1, 0, 0];\n cylinderOpt.center = [-5, 0, 0];\n cylinderOpt.radius = 2;\n cylinderOpt.height = 10;\n\n const cylinder = await bitbybit.occt.shapes.solid.createCylinder(cylinderOpt)\n\n const difference = await bitbybit.occt.booleans.difference({\n shape: box,\n shapes: [cylinder],\n keepEdges: false\n });\n\n const chamfered = await bitbybit.occt.fillets.chamferEdges({\n shape: difference,\n distance: 0.4\n })\n\n bitbybit.draw.drawAnyAsync({\n entity: chamfered,\n });\n}\n\nstart();\n","version":"0.21.0","type":"typescript"}} + script={{"script":"const start = async () => {\n\n const boxOpt = new Bit.Inputs.OCCT.BoxDto();\n boxOpt.width = 5;\n boxOpt.length = 8;\n boxOpt.height = 10;\n const box = await bitbybit.occt.shapes.solid.createBox(boxOpt);\n const cylinderOpt = new Bit.Inputs.OCCT.CylinderDto();\n cylinderOpt.direction = [1, 0, 0];\n cylinderOpt.center = [-5, 0, 0];\n cylinderOpt.radius = 2;\n cylinderOpt.height = 10;\n\n const cylinder = await bitbybit.occt.shapes.solid.createCylinder(cylinderOpt)\n\n const difference = await bitbybit.occt.booleans.difference({\n shape: box,\n shapes: [cylinder],\n keepEdges: false\n });\n\n const chamfered = await bitbybit.occt.fillets.chamferEdges({\n shape: difference,\n distance: 0.4\n })\n\n bitbybit.draw.drawAnyAsync({\n entity: chamfered,\n });\n}\n\nstart();\n","type":"typescript"}} title="Chamfer Circular Edge" /> **Blockly Example: Chamfer Circular Edge of a Hole** differenceSoliddifferenceSolid5810000210-500100FALSEdifferenceSolid0.4","version":"0.21.0","type":"blockly"}} + script={{"script":"differenceSoliddifferenceSolid5810000210-500100FALSEdifferenceSolid0.4","type":"blockly"}} title="Chamfer Circular Edge" /> **Rete Example: Chamfer Circular Edge of a Hole** diff --git a/docs/learn/code/common/occt/fillets/chamfers-intro.mdx b/docs/learn/code/common/occt/fillets/chamfers-intro.mdx index 65ad52413..cbc130c1e 100644 --- a/docs/learn/code/common/occt/fillets/chamfers-intro.mdx +++ b/docs/learn/code/common/occt/fillets/chamfers-intro.mdx @@ -48,21 +48,21 @@ The following examples in TypeScript, Rete, and Blockly demonstrate creating a s **TypeScript Example: Chamfer All Edges of a Solid** {\n\n const boxOpt = new Bit.Inputs.OCCT.BoxDto();\n boxOpt.width = 5;\n boxOpt.length = 8;\n boxOpt.height = 10;\n const box = await bitbybit.occt.shapes.solid.createBox(boxOpt);\n\n const chamfered = await bitbybit.occt.fillets.chamferEdges({\n shape: box,\n distance: 1,\n })\n\n bitbybit.draw.drawAnyAsync({\n entity: chamfered,\n });\n}\n\nstart();\n","version":"0.21.0","type":"typescript"}} + script={{"script":"const start = async () => {\n\n const boxOpt = new Bit.Inputs.OCCT.BoxDto();\n boxOpt.width = 5;\n boxOpt.length = 8;\n boxOpt.height = 10;\n const box = await bitbybit.occt.shapes.solid.createBox(boxOpt);\n\n const chamfered = await bitbybit.occt.fillets.chamferEdges({\n shape: box,\n distance: 1,\n })\n\n bitbybit.draw.drawAnyAsync({\n entity: chamfered,\n });\n}\n\nstart();\n","type":"typescript"}} title="Chamfer All Edges of Solid" /> **Blockly Example: Chamfer All Edges of a Solid** 58100001","version":"0.21.0","type":"blockly"}} + script={{"script":"58100001","type":"blockly"}} title="Chamfer All Edges of Solid" /> **Rete Example: Chamfer All Edges of a Solid** diff --git a/docs/learn/code/common/occt/fillets/chamfers-var-radius-on-spec-edges.mdx b/docs/learn/code/common/occt/fillets/chamfers-var-radius-on-spec-edges.mdx index cfd1a1919..8f6d1afb5 100644 --- a/docs/learn/code/common/occt/fillets/chamfers-var-radius-on-spec-edges.mdx +++ b/docs/learn/code/common/occt/fillets/chamfers-var-radius-on-spec-edges.mdx @@ -28,21 +28,21 @@ The examples below demonstrate creating a solid box and then applying chamfers w **TypeScript Example: Chamfer Specific Edges with Variable Distances** {\n\n const boxOpt = new Bit.Inputs.OCCT.BoxDto();\n boxOpt.width = 5;\n boxOpt.length = 8;\n boxOpt.height = 10;\n const box = await bitbybit.occt.shapes.solid.createBox(boxOpt);\n\n const chamfered = await bitbybit.occt.fillets.chamferEdges({\n shape: box,\n distanceList: [0.2, 1.2, 2],\n indexes: [1, 2, 3]\n })\n\n bitbybit.draw.drawAnyAsync({\n entity: chamfered,\n });\n}\n\nstart();\n","version":"0.21.0","type":"typescript"}} + script={{"script":"const start = async () => {\n\n const boxOpt = new Bit.Inputs.OCCT.BoxDto();\n boxOpt.width = 5;\n boxOpt.length = 8;\n boxOpt.height = 10;\n const box = await bitbybit.occt.shapes.solid.createBox(boxOpt);\n\n const chamfered = await bitbybit.occt.fillets.chamferEdges({\n shape: box,\n distanceList: [0.2, 1.2, 2],\n indexes: [1, 2, 3]\n })\n\n bitbybit.draw.drawAnyAsync({\n entity: chamfered,\n });\n}\n\nstart();\n","type":"typescript"}} title="Chamfer Specific Edges of Solid" /> **Blockly Example: Chamfer Specific Edges with Variable Distances** 58100000.10.31.22123","version":"0.21.0","type":"blockly"}} + script={{"script":"58100000.10.31.22123","type":"blockly"}} title="Chamfer Specific Edges of Solid" /> **Rete Example: Chamfer Specific Edges with Variable Distances** diff --git a/docs/learn/code/common/occt/fillets/fillet-3d-wires.mdx b/docs/learn/code/common/occt/fillets/fillet-3d-wires.mdx index 63c8ba936..a52911087 100644 --- a/docs/learn/code/common/occt/fillets/fillet-3d-wires.mdx +++ b/docs/learn/code/common/occt/fillets/fillet-3d-wires.mdx @@ -55,21 +55,21 @@ In these examples, we first construct a 3D star-shaped wire. Then, we apply diff **TypeScript Example: Fillet Specific Corners of a 3D Wire** {\n\n const repeatOpt = new Bit.Inputs.Lists.MultiplyItemDto([innerFillet, outerFillet], nrRays);\n const radiusList = bitbybit.lists.repeat(repeatOpt).flat();\n const spanOptions = new Bit.Inputs.Vector.SpanDto(1, 1, nrRays * 2);\n const indexes = bitbybit.vector.span(spanOptions);\n\n const starOptions = new Bit.Inputs.OCCT.StarDto(outerStarRadius, innerStarRadius, nrRays, [0, 0, 0], [0, 1, 0], 4, false);\n const star = await bitbybit.occt.shapes.wire.createStarWire(starOptions);\n\n const filletOptions = new Bit.Inputs.OCCT.Fillet3DWireDto(star, undefined, [0, 1, 0], radiusList, indexes);\n const starFillet = await bitbybit.occt.fillets.fillet3DWire(filletOptions);\n\n const startFilletTranslated1 = await bitbybit.occt.transforms.translate({ shape: starFillet, translation: [0, 5, 0] })\n const startFilletTranslated2 = await bitbybit.occt.transforms.translate({ shape: starFillet, translation: [0, 10, 0] })\n\n\n const starFace = await bitbybit.occt.shapes.face.createFaceFromWire({ shape: startFilletTranslated2, planar: false });\n const starThick = await bitbybit.occt.operations.makeThickSolidSimple({ shape: starFace, offset: -1 });\n const starThickFillet = await bitbybit.occt.fillets.filletEdges({ shape: starThick, radius: 0.3 });\n\n const drawOptions = new Bit.Inputs.Draw.DrawOcctShapeOptions();\n drawOptions.edgeWidth = 15;\n bitbybit.draw.drawAnyAsync({ entity: star, options: drawOptions });\n bitbybit.draw.drawAnyAsync({ entity: startFilletTranslated1, options: drawOptions });\n drawOptions.faceColour = \"#5555ff\";\n drawOptions.edgeColour = \"#000000\";\n drawOptions.edgeWidth = 2;\n drawOptions.precision = 0.005;\n bitbybit.draw.drawAnyAsync({ entity: starThickFillet, options: drawOptions });\n\n const gridOptions = new Bit.Inputs.Draw.SceneDrawGridMeshDto();\n bitbybit.draw.drawGridMesh(gridOptions);\n const skyboxOptions = new Bit.Inputs.BabylonScene.SkyboxDto();\n skyboxOptions.skybox = Bit.Inputs.Base.skyboxEnum.clearSky;\n bitbybit.babylon.scene.enableSkybox(skyboxOptions);\n}\n\nstart();\n","version":"0.21.0","type":"typescript"}} + script={{"script":"const nrRays = 7;\nconst outerStarRadius = 10;\nconst innerStarRadius = 4;\nconst outerFillet = 0.6;\nconst innerFillet = 1.7;\n\nconst start = async () => {\n\n const repeatOpt = new Bit.Inputs.Lists.MultiplyItemDto([innerFillet, outerFillet], nrRays);\n const radiusList = bitbybit.lists.repeat(repeatOpt).flat();\n const spanOptions = new Bit.Inputs.Vector.SpanDto(1, 1, nrRays * 2);\n const indexes = bitbybit.vector.span(spanOptions);\n\n const starOptions = new Bit.Inputs.OCCT.StarDto(outerStarRadius, innerStarRadius, nrRays, [0, 0, 0], [0, 1, 0], 4, false);\n const star = await bitbybit.occt.shapes.wire.createStarWire(starOptions);\n\n const filletOptions = new Bit.Inputs.OCCT.Fillet3DWireDto(star, undefined, [0, 1, 0], radiusList, indexes);\n const starFillet = await bitbybit.occt.fillets.fillet3DWire(filletOptions);\n\n const startFilletTranslated1 = await bitbybit.occt.transforms.translate({ shape: starFillet, translation: [0, 5, 0] })\n const startFilletTranslated2 = await bitbybit.occt.transforms.translate({ shape: starFillet, translation: [0, 10, 0] })\n\n\n const starFace = await bitbybit.occt.shapes.face.createFaceFromWire({ shape: startFilletTranslated2, planar: false });\n const starThick = await bitbybit.occt.operations.makeThickSolidSimple({ shape: starFace, offset: -1 });\n const starThickFillet = await bitbybit.occt.fillets.filletEdges({ shape: starThick, radius: 0.3 });\n\n const drawOptions = new Bit.Inputs.Draw.DrawOcctShapeOptions();\n drawOptions.edgeWidth = 15;\n bitbybit.draw.drawAnyAsync({ entity: star, options: drawOptions });\n bitbybit.draw.drawAnyAsync({ entity: startFilletTranslated1, options: drawOptions });\n drawOptions.faceColour = \"#5555ff\";\n drawOptions.edgeColour = \"#000000\";\n drawOptions.edgeWidth = 2;\n drawOptions.precision = 0.005;\n bitbybit.draw.drawAnyAsync({ entity: starThickFillet, options: drawOptions });\n\n const gridOptions = new Bit.Inputs.Draw.SceneDrawGridMeshDto();\n bitbybit.draw.drawGridMesh(gridOptions);\n const skyboxOptions = new Bit.Inputs.BabylonScene.SkyboxDto();\n skyboxOptions.skybox = Bit.Inputs.Base.skyboxEnum.clearSky;\n bitbybit.babylon.scene.enableSkybox(skyboxOptions);\n}\n\nstart();\n","type":"typescript"}} title="Fillet 3D Wire Specific Corners" /> **Blockly Example: Fillet Specific Corners of a 3D Wire** nrRaysinnerFilletRadiusouterRadiusFilletfilletIndexesradiusLististarPromisestarFilletPromisenrRays7innerFilletRadius1.7outerRadiusFillet0.6filletIndexes11MULTIPLYnrRays2'clearSky'10000.10.7radiusListi1MULTIPLYnrRays21EQi20INSERTLASTradiusListouterRadiusFilletINSERTLASTradiusListinnerFilletRadiusstarPromise000010nrRays1044FALSEstarFilletPromisestarPromiseradiusListfilletIndexes010starPromise0.01FALSE#ff0000TRUE#ffffff15starFilletPromise0500.01FALSE#ff0000TRUE#ffffff15starFilletPromise0100FALSE-10.30.005TRUE#3333ffTRUE#000000240040010100.450.50.5FALSE#ffffff#ffffff","version":"0.21.0","type":"blockly"}} + script={{"script":"nrRaysinnerFilletRadiusouterRadiusFilletfilletIndexesradiusLististarPromisestarFilletPromisenrRays7innerFilletRadius1.7outerRadiusFillet0.6filletIndexes11MULTIPLYnrRays2'clearSky'10000.10.7radiusListi1MULTIPLYnrRays21EQi20INSERTLASTradiusListouterRadiusFilletINSERTLASTradiusListinnerFilletRadiusstarPromise000010nrRays1044FALSEstarFilletPromisestarPromiseradiusListfilletIndexes010starPromise0.01FALSE#ff0000TRUE#ffffff15starFilletPromise0500.01FALSE#ff0000TRUE#ffffff15starFilletPromise0100FALSE-10.30.005TRUE#3333ffTRUE#000000240040010100.450.50.5FALSE#ffffff#ffffff","type":"blockly"}} title="Fillet 3D Wire Specific Corners" /> **Rete Example: Fillet Specific Corners of a 3D Wire** diff --git a/docs/learn/code/common/occt/fillets/fillets-intro.mdx b/docs/learn/code/common/occt/fillets/fillets-intro.mdx index 935b73e42..dfd4c534a 100644 --- a/docs/learn/code/common/occt/fillets/fillets-intro.mdx +++ b/docs/learn/code/common/occt/fillets/fillets-intro.mdx @@ -43,21 +43,21 @@ The following examples in TypeScript, Rete, and Blockly demonstrate creating a s **TypeScript Example: Fillet All Edges of a Solid** {\n\n const boxOpt = new Bit.Inputs.OCCT.BoxDto();\n boxOpt.width = 5;\n boxOpt.length = 8;\n boxOpt.height = 10;\n const box = await bitbybit.occt.shapes.solid.createBox(boxOpt);\n\n const filleted = await bitbybit.occt.fillets.filletEdges({\n shape: box,\n radius: 1,\n })\n\n bitbybit.draw.drawAnyAsync({\n entity: filleted,\n });\n}\n\nstart();\n","version":"0.21.0","type":"typescript"}} + script={{"script":"const start = async () => {\n\n const boxOpt = new Bit.Inputs.OCCT.BoxDto();\n boxOpt.width = 5;\n boxOpt.length = 8;\n boxOpt.height = 10;\n const box = await bitbybit.occt.shapes.solid.createBox(boxOpt);\n\n const filleted = await bitbybit.occt.fillets.filletEdges({\n shape: box,\n radius: 1,\n })\n\n bitbybit.draw.drawAnyAsync({\n entity: filleted,\n });\n}\n\nstart();\n","type":"typescript"}} title="Fillet Solid" /> **Blockly Example: Fillet All Edges of a Solid** 58100001","version":"0.21.0","type":"blockly"}} + script={{"script":"58100001","type":"blockly"}} title="Fillet Solid" /> **Rete Example: Fillet All Edges of a Solid** diff --git a/docs/learn/code/common/occt/fillets/fillets-on-2d-wire-corners.mdx b/docs/learn/code/common/occt/fillets/fillets-on-2d-wire-corners.mdx index da8546ea0..3bb7f63c7 100644 --- a/docs/learn/code/common/occt/fillets/fillets-on-2d-wire-corners.mdx +++ b/docs/learn/code/common/occt/fillets/fillets-on-2d-wire-corners.mdx @@ -30,21 +30,21 @@ The examples below demonstrate creating a 2D wire and then applying fillets with **TypeScript Example: Fillet Specific Corners of a Wire with Variable Radii** {\n const squareOpt = new Bit.Inputs.OCCT.SquareDto();\n const square = await bitbybit.occt.shapes.wire.createSquareWire(squareOpt);\n const squareFillet = await bitbybit.occt.fillets.fillet2d({\n shape: square,\n radiusList: [0.1, 0.3],\n indexes: [1, 3]\n });\n\n bitbybit.draw.drawAnyAsync({\n entity: squareFillet\n });\n}\n\nstart();\n","version":"0.21.0","type":"typescript"}} + script={{"script":"const start = async () => {\n const squareOpt = new Bit.Inputs.OCCT.SquareDto();\n const square = await bitbybit.occt.shapes.wire.createSquareWire(squareOpt);\n const squareFillet = await bitbybit.occt.fillets.fillet2d({\n shape: square,\n radiusList: [0.1, 0.3],\n indexes: [1, 3]\n });\n\n bitbybit.draw.drawAnyAsync({\n entity: squareFillet\n });\n}\n\nstart();\n","type":"typescript"}} title="Fillet Specific Corners of Wire" /> **Blockly Example: Fillet Specific Corners of a Wire with Variable Radii** 10000100.10.313","version":"0.21.0","type":"blockly"}} + script={{"script":"10000100.10.313","type":"blockly"}} title="Fillet Specific Corners of Wire" /> **Rete Example: Fillet Specific Corners of a Wire with Variable Radii** diff --git a/docs/learn/code/common/occt/fillets/fillets-on-2d-wires.mdx b/docs/learn/code/common/occt/fillets/fillets-on-2d-wires.mdx index eb75e3d28..d192c9f88 100644 --- a/docs/learn/code/common/occt/fillets/fillets-on-2d-wires.mdx +++ b/docs/learn/code/common/occt/fillets/fillets-on-2d-wires.mdx @@ -29,21 +29,21 @@ The examples below demonstrate how to create a simple 2D wire (e.g., a polyline **TypeScript Example: Fillet All Corners of a Wire** {\n const squareOpt = new Bit.Inputs.OCCT.SquareDto();\n const square = await bitbybit.occt.shapes.wire.createSquareWire(squareOpt);\n const squareFillet = await bitbybit.occt.fillets.fillet2d({\n shape: square,\n radius: 0.25\n });\n\n bitbybit.draw.drawAnyAsync({\n entity: squareFillet\n });\n}\n\nstart();\n","version":"0.21.0","type":"typescript"}} + script={{"script":"const start = async () => {\n const squareOpt = new Bit.Inputs.OCCT.SquareDto();\n const square = await bitbybit.occt.shapes.wire.createSquareWire(squareOpt);\n const squareFillet = await bitbybit.occt.fillets.fillet2d({\n shape: square,\n radius: 0.25\n });\n\n bitbybit.draw.drawAnyAsync({\n entity: squareFillet\n });\n}\n\nstart();\n","type":"typescript"}} title="Fillet All Corners of Wire" /> **Blockly Example: Fillet All Corners of a Wire** 10000100.24","version":"0.21.0","type":"blockly"}} + script={{"script":"10000100.24","type":"blockly"}} title="Fillet All Corners of Wire" /> **Rete Example: Fillet All Corners of a Wire** diff --git a/docs/learn/code/common/occt/fillets/fillets-var-radius-on-spec-edges.mdx b/docs/learn/code/common/occt/fillets/fillets-var-radius-on-spec-edges.mdx index 282bc92c8..91722a1ba 100644 --- a/docs/learn/code/common/occt/fillets/fillets-var-radius-on-spec-edges.mdx +++ b/docs/learn/code/common/occt/fillets/fillets-var-radius-on-spec-edges.mdx @@ -31,7 +31,7 @@ The examples below demonstrate creating a solid box and then applying fillets wi **TypeScript Example: Fillet Specific Edges with Variable Radii** {\n\n const boxOpt = new Bit.Inputs.OCCT.BoxDto();\n boxOpt.width = 5;\n boxOpt.length = 8;\n boxOpt.height = 10;\n const box = await bitbybit.occt.shapes.solid.createBox(boxOpt);\n\n const filleted = await bitbybit.occt.fillets.filletEdges({\n shape: box,\n radiusList: [1, 2, 0.3],\n indexes: [1, 2, 3]\n })\n\n bitbybit.draw.drawAnyAsync({\n entity: filleted,\n });\n}\n\nstart();\n","version":"0.21.0","type":"typescript"}} + script={{"script":"const start = async () => {\n\n const boxOpt = new Bit.Inputs.OCCT.BoxDto();\n boxOpt.width = 5;\n boxOpt.length = 8;\n boxOpt.height = 10;\n const box = await bitbybit.occt.shapes.solid.createBox(boxOpt);\n\n const filleted = await bitbybit.occt.fillets.filletEdges({\n shape: box,\n radiusList: [1, 2, 0.3],\n indexes: [1, 2, 3]\n })\n\n bitbybit.draw.drawAnyAsync({\n entity: filleted,\n });\n}\n\nstart();\n","type":"typescript"}} title="Variable Fillet Radius On Spec Edges" /> @@ -39,7 +39,7 @@ The examples below demonstrate creating a solid box and then applying fillets wi **Blockly Example: Fillet Specific Edges with Variable Radii** 5810000120.3123","version":"0.21.0","type":"blockly"}} + script={{"script":"5810000120.3123","type":"blockly"}} title="Variable Fillet Radius On Spec Edges" /> @@ -47,7 +47,7 @@ The examples below demonstrate creating a solid box and then applying fillets wi **Rete Example: Fillet Specific Edges with Variable Radii** diff --git a/docs/learn/code/common/occt/io/dxf-file-format-for-2d-drawings.md b/docs/learn/code/common/occt/io/dxf-file-format-for-2d-drawings.md index 17364a1e3..ae63ac319 100644 --- a/docs/learn/code/common/occt/io/dxf-file-format-for-2d-drawings.md +++ b/docs/learn/code/common/occt/io/dxf-file-format-for-2d-drawings.md @@ -36,21 +36,21 @@ It's worth noting that while DXF is an extensive format with numerous entity typ fontUrlorangeColorpurpleColorgreenColortext1text1Compoundtext1WiresfilletedWireswirefilletedWiretext1Compound2dxfPaths1dxfLayer1text2text2Compoundtext2Wirestext2Compound2dxfPaths2dxfLayer2hexagonshexagonsCompounddxfPaths3dxfLayer3allLayersdxfFilefontUrlhttps://cdn.jsdelivr.net/gh/bitbybit-dev/bitbybit-assets@latest/fonts/Tektur/Tektur-Bold.ttforangeColor#ffa200purpleColor#cc80ffgreenColor#80ff00text1DXF @ bitbybit.devfontUrl1.50180002.5010centerMiddletext1Compoundtext1compoundtext1Wirestext1CompoundfilletedWireswiretext1WiresfilletedWirewire0.05INSERTLASTfilletedWiresfilletedWiretext1Compound2filletedWiresdxfPaths1text1Compound20.10.12dxfLayer1dxfPaths1BitbybitorangeColortext2CAD PowerfontUrl1018000-2010centerMiddletext2Compoundtext2compoundtext2Wirestext2Compoundtext2Compound2text2WiresdxfPaths2text2Compound20.10.12dxfLayer2dxfPaths2CAD PowerpurpleColorhexagons1524010TRUE[0.8,0.3][0.8,0.3][true, true, false]hexagonsCompoundhexagonsdxfPaths3hexagonsCompound0.10.12dxfLayer3dxfPaths3Hexagons#002afaallLayersdxfLayer1dxfLayer2dxfLayer3dxfFileallLayersbitbybit-dev.dxfTRUEfilletedWires0.01FALSETRUEorangeColor5text2Wires0.01FALSETRUEpurpleColor3hexagonsCompound0.01FALSETRUEgreenColor3","version":"0.21.0","type":"blockly"}} + script={{"script":"fontUrlorangeColorpurpleColorgreenColortext1text1Compoundtext1WiresfilletedWireswirefilletedWiretext1Compound2dxfPaths1dxfLayer1text2text2Compoundtext2Wirestext2Compound2dxfPaths2dxfLayer2hexagonshexagonsCompounddxfPaths3dxfLayer3allLayersdxfFilefontUrlhttps://cdn.jsdelivr.net/gh/bitbybit-dev/bitbybit-assets@latest/fonts/Tektur/Tektur-Bold.ttforangeColor#ffa200purpleColor#cc80ffgreenColor#80ff00text1DXF @ bitbybit.devfontUrl1.50180002.5010centerMiddletext1Compoundtext1compoundtext1Wirestext1CompoundfilletedWireswiretext1WiresfilletedWirewire0.05INSERTLASTfilletedWiresfilletedWiretext1Compound2filletedWiresdxfPaths1text1Compound20.10.12dxfLayer1dxfPaths1BitbybitorangeColortext2CAD PowerfontUrl1018000-2010centerMiddletext2Compoundtext2compoundtext2Wirestext2Compoundtext2Compound2text2WiresdxfPaths2text2Compound20.10.12dxfLayer2dxfPaths2CAD PowerpurpleColorhexagons1524010TRUE[0.8,0.3][0.8,0.3][true, true, false]hexagonsCompoundhexagonsdxfPaths3hexagonsCompound0.10.12dxfLayer3dxfPaths3Hexagons#002afaallLayersdxfLayer1dxfLayer2dxfLayer3dxfFileallLayersbitbybit-dev.dxfTRUEfilletedWires0.01FALSETRUEorangeColor5text2Wires0.01FALSETRUEpurpleColor3hexagonsCompound0.01FALSETRUEgreenColor3","type":"blockly"}} title="DXF Export with Layers" /> {\n // Font URL for text creation\n const fontUrl = \"https://cdn.jsdelivr.net/gh/bitbybit-dev/bitbybit-assets@latest/fonts/Tektur/Tektur-Bold.ttf\";\n\n // Define colors\n const orangeColor = \"#ffa200\";\n const purpleColor = \"#cc80ff\";\n const blueColor = \"#80ff00\";\n\n // Create first text: \"DXF @ bitbybit.dev\" at z=2.5\n const text1Options = new Text3DUrlDto();\n text1Options.text = \"DXF @ bitbybit.dev\";\n text1Options.fontUrl = fontUrl;\n text1Options.fontSize = 1.5;\n text1Options.height = 0;\n text1Options.rotation = 180;\n text1Options.origin = [0, 0, 2.5] as Point3;\n text1Options.direction = [0, 1, 0] as Vector3;\n\n const text1 = await bitbybit.advanced.text3d.createWithUrl(text1Options);\n const text1Compound = text1.compound;\n\n // Get wires from the first text\n const text1Wires: TopoDSWirePointer[] = await bitbybit.occt.shapes.wire.getWires({ shape: text1Compound });\n\n // Apply fillet to each wire\n const filletedWires: TopoDSWirePointer[] = [];\n for (const wire of text1Wires) {\n const filletOptions = new FilletDto();\n filletOptions.shape = wire;\n filletOptions.radius = 0.05;\n\n const filletedWire = await bitbybit.occt.fillets.fillet2d(filletOptions);\n filletedWires.push(filletedWire);\n }\n\n // Create compound from filleted wires\n const text1Compound2 = await bitbybit.occt.shapes.compound.makeCompound({ shapes: filletedWires });\n\n // Convert first text to DXF paths\n const dxfPaths1Options = new ShapeToDxfPathsDto();\n dxfPaths1Options.shape = text1Compound2;\n dxfPaths1Options.angularDeflection = 0.1;\n dxfPaths1Options.curvatureDeflection = 0.1;\n dxfPaths1Options.minimumOfPoints = 2;\n\n const dxfPaths1 = await bitbybit.occt.io.shapeToDxfPaths(dxfPaths1Options);\n\n // Create layer for first text\n const dxfLayer1Options = new DxfPathsWithLayerDto();\n dxfLayer1Options.paths = dxfPaths1;\n dxfLayer1Options.layer = \"Bitbybit\";\n dxfLayer1Options.color = orangeColor;\n\n const dxfLayer1 = await bitbybit.occt.io.dxfPathsWithLayer(dxfLayer1Options);\n\n // Create second text: \"CAD Power\" at z=-2\n const text2Options = new Text3DUrlDto();\n text2Options.text = \"CAD Power\";\n text2Options.fontUrl = fontUrl;\n text2Options.fontSize = 1;\n text2Options.height = 0;\n text2Options.rotation = 180;\n text2Options.origin = [0, 0, -2] as Point3;\n text2Options.direction = [0, 1, 0] as Vector3;\n\n const text2 = await bitbybit.advanced.text3d.createWithUrl(text2Options);\n const text2Compound = text2.compound;\n\n // Get wires from the second text\n const text2Wires: TopoDSWirePointer[] = await bitbybit.occt.shapes.wire.getWires({ shape: text2Compound });\n\n // Create compound from text2 wires (no fillet for second text)\n const text2Compound2 = await bitbybit.occt.shapes.compound.makeCompound({ shapes: text2Wires });\n\n // Convert second text to DXF paths\n const dxfPaths2Options = new ShapeToDxfPathsDto();\n dxfPaths2Options.shape = text2Compound2;\n dxfPaths2Options.angularDeflection = 0.1;\n dxfPaths2Options.curvatureDeflection = 0.1;\n dxfPaths2Options.minimumOfPoints = 2;\n\n const dxfPaths2 = await bitbybit.occt.io.shapeToDxfPaths(dxfPaths2Options);\n\n // Create layer for second text\n const dxfLayer2Options = new DxfPathsWithLayerDto();\n dxfLayer2Options.paths = dxfPaths2;\n dxfLayer2Options.layer = \"CAD Power\";\n dxfLayer2Options.color = purpleColor;\n\n const dxfLayer2 = await bitbybit.occt.io.dxfPathsWithLayer(dxfLayer2Options);\n\n // Create hexagonal grid\n const hexagonsOptions = new HexagonsInGridDto();\n hexagonsOptions.width = 15;\n hexagonsOptions.height = 2;\n hexagonsOptions.nrHexagonsInWidth = 40;\n hexagonsOptions.nrHexagonsInHeight = 10;\n hexagonsOptions.flatTop = true;\n hexagonsOptions.extendTop = false;\n hexagonsOptions.extendBottom = false;\n hexagonsOptions.extendLeft = false;\n hexagonsOptions.extendRight = false;\n hexagonsOptions.scalePatternWidth = [0.8, 0.3];\n hexagonsOptions.scalePatternHeight = [0.8, 0.3];\n hexagonsOptions.inclusionPattern = [true, true, false];\n\n const hexagons = await bitbybit.occt.shapes.wire.hexagonsInGrid(hexagonsOptions);\n\n // Create compound from hexagons\n const hexagonsCompound = await bitbybit.occt.shapes.compound.makeCompound({ shapes: hexagons });\n\n // Convert hexagons to DXF paths\n const dxfPaths3Options = new ShapeToDxfPathsDto();\n dxfPaths3Options.shape = hexagonsCompound;\n dxfPaths3Options.angularDeflection = 0.1;\n dxfPaths3Options.curvatureDeflection = 0.1;\n dxfPaths3Options.minimumOfPoints = 2;\n\n const dxfPaths3 = await bitbybit.occt.io.shapeToDxfPaths(dxfPaths3Options);\n\n // Create layer for hexagons\n const dxfLayer3Options = new DxfPathsWithLayerDto();\n dxfLayer3Options.paths = dxfPaths3;\n dxfLayer3Options.layer = \"Hexagons\";\n dxfLayer3Options.color = \"#002afa\";\n\n const dxfLayer3 = await bitbybit.occt.io.dxfPathsWithLayer(dxfLayer3Options);\n\n // Combine all layers\n const allLayers = [dxfLayer1, dxfLayer2, dxfLayer3];\n\n // Create DXF file\n const dxfCreateOptions = new DxfPathsPartsListDto();\n dxfCreateOptions.pathsParts = allLayers;\n dxfCreateOptions.fileName = \"bitbybit-dev.dxf\";\n dxfCreateOptions.tryDownload = true;\n\n await bitbybit.occt.io.dxfCreate(dxfCreateOptions);\n\n // Draw the shapes for visualization\n const drawOptions1 = new Bit.Inputs.Draw.DrawOcctShapeSimpleOptions();\n drawOptions1.precision = 0.01;\n drawOptions1.drawFaces = false;\n drawOptions1.drawEdges = true;\n drawOptions1.edgeColour = orangeColor;\n drawOptions1.edgeWidth = 5;\n\n bitbybit.draw.drawAnyAsync({ entity: filletedWires, options: drawOptions1 });\n\n const drawOptions2 = new Bit.Inputs.Draw.DrawOcctShapeSimpleOptions();\n drawOptions2.precision = 0.01;\n drawOptions2.drawFaces = false;\n drawOptions2.drawEdges = true;\n drawOptions2.edgeColour = purpleColor;\n drawOptions2.edgeWidth = 3;\n\n bitbybit.draw.drawAnyAsync({ entity: text2Wires, options: drawOptions2 });\n\n // Draw the shapes for visualization\n const drawOptions3 = new Bit.Inputs.Draw.DrawOcctShapeSimpleOptions();\n drawOptions3.precision = 0.01;\n drawOptions3.drawFaces = false;\n drawOptions3.drawEdges = true;\n drawOptions3.edgeColour = blueColor;\n drawOptions3.edgeWidth = 2;\n\n bitbybit.draw.drawAnyAsync({ entity: hexagonsCompound, options: drawOptions3 });\n}\n\n// Execute the function\nstart();","version":"0.21.0","type":"typescript"}} + script={{"script":"const { Text3DUrlDto } = Bit.Advanced.Text3D;\nconst { ShapeToDxfPathsDto, DxfPathsWithLayerDto, DxfPathsPartsListDto } = Bit.Inputs.OCCT;\nconst { FilletDto } = Bit.Inputs.OCCT;\nconst { HexagonsInGridDto } = Bit.Inputs.OCCT;\n\n// Import required types\ntype TopoDSWirePointer = Bit.Inputs.OCCT.TopoDSWirePointer;\ntype TopoDSShapePointer = Bit.Inputs.OCCT.TopoDSShapePointer;\ntype Point3 = Bit.Inputs.Base.Point3;\ntype Vector3 = Bit.Inputs.Base.Vector3;\n\n// Define the main function\nconst start = async () => {\n // Font URL for text creation\n const fontUrl = \"https://cdn.jsdelivr.net/gh/bitbybit-dev/bitbybit-assets@latest/fonts/Tektur/Tektur-Bold.ttf\";\n\n // Define colors\n const orangeColor = \"#ffa200\";\n const purpleColor = \"#cc80ff\";\n const blueColor = \"#80ff00\";\n\n // Create first text: \"DXF @ bitbybit.dev\" at z=2.5\n const text1Options = new Text3DUrlDto();\n text1Options.text = \"DXF @ bitbybit.dev\";\n text1Options.fontUrl = fontUrl;\n text1Options.fontSize = 1.5;\n text1Options.height = 0;\n text1Options.rotation = 180;\n text1Options.origin = [0, 0, 2.5] as Point3;\n text1Options.direction = [0, 1, 0] as Vector3;\n\n const text1 = await bitbybit.advanced.text3d.createWithUrl(text1Options);\n const text1Compound = text1.compound;\n\n // Get wires from the first text\n const text1Wires: TopoDSWirePointer[] = await bitbybit.occt.shapes.wire.getWires({ shape: text1Compound });\n\n // Apply fillet to each wire\n const filletedWires: TopoDSWirePointer[] = [];\n for (const wire of text1Wires) {\n const filletOptions = new FilletDto();\n filletOptions.shape = wire;\n filletOptions.radius = 0.05;\n\n const filletedWire = await bitbybit.occt.fillets.fillet2d(filletOptions);\n filletedWires.push(filletedWire);\n }\n\n // Create compound from filleted wires\n const text1Compound2 = await bitbybit.occt.shapes.compound.makeCompound({ shapes: filletedWires });\n\n // Convert first text to DXF paths\n const dxfPaths1Options = new ShapeToDxfPathsDto();\n dxfPaths1Options.shape = text1Compound2;\n dxfPaths1Options.angularDeflection = 0.1;\n dxfPaths1Options.curvatureDeflection = 0.1;\n dxfPaths1Options.minimumOfPoints = 2;\n\n const dxfPaths1 = await bitbybit.occt.io.shapeToDxfPaths(dxfPaths1Options);\n\n // Create layer for first text\n const dxfLayer1Options = new DxfPathsWithLayerDto();\n dxfLayer1Options.paths = dxfPaths1;\n dxfLayer1Options.layer = \"Bitbybit\";\n dxfLayer1Options.color = orangeColor;\n\n const dxfLayer1 = await bitbybit.occt.io.dxfPathsWithLayer(dxfLayer1Options);\n\n // Create second text: \"CAD Power\" at z=-2\n const text2Options = new Text3DUrlDto();\n text2Options.text = \"CAD Power\";\n text2Options.fontUrl = fontUrl;\n text2Options.fontSize = 1;\n text2Options.height = 0;\n text2Options.rotation = 180;\n text2Options.origin = [0, 0, -2] as Point3;\n text2Options.direction = [0, 1, 0] as Vector3;\n\n const text2 = await bitbybit.advanced.text3d.createWithUrl(text2Options);\n const text2Compound = text2.compound;\n\n // Get wires from the second text\n const text2Wires: TopoDSWirePointer[] = await bitbybit.occt.shapes.wire.getWires({ shape: text2Compound });\n\n // Create compound from text2 wires (no fillet for second text)\n const text2Compound2 = await bitbybit.occt.shapes.compound.makeCompound({ shapes: text2Wires });\n\n // Convert second text to DXF paths\n const dxfPaths2Options = new ShapeToDxfPathsDto();\n dxfPaths2Options.shape = text2Compound2;\n dxfPaths2Options.angularDeflection = 0.1;\n dxfPaths2Options.curvatureDeflection = 0.1;\n dxfPaths2Options.minimumOfPoints = 2;\n\n const dxfPaths2 = await bitbybit.occt.io.shapeToDxfPaths(dxfPaths2Options);\n\n // Create layer for second text\n const dxfLayer2Options = new DxfPathsWithLayerDto();\n dxfLayer2Options.paths = dxfPaths2;\n dxfLayer2Options.layer = \"CAD Power\";\n dxfLayer2Options.color = purpleColor;\n\n const dxfLayer2 = await bitbybit.occt.io.dxfPathsWithLayer(dxfLayer2Options);\n\n // Create hexagonal grid\n const hexagonsOptions = new HexagonsInGridDto();\n hexagonsOptions.width = 15;\n hexagonsOptions.height = 2;\n hexagonsOptions.nrHexagonsInWidth = 40;\n hexagonsOptions.nrHexagonsInHeight = 10;\n hexagonsOptions.flatTop = true;\n hexagonsOptions.extendTop = false;\n hexagonsOptions.extendBottom = false;\n hexagonsOptions.extendLeft = false;\n hexagonsOptions.extendRight = false;\n hexagonsOptions.scalePatternWidth = [0.8, 0.3];\n hexagonsOptions.scalePatternHeight = [0.8, 0.3];\n hexagonsOptions.inclusionPattern = [true, true, false];\n\n const hexagons = await bitbybit.occt.shapes.wire.hexagonsInGrid(hexagonsOptions);\n\n // Create compound from hexagons\n const hexagonsCompound = await bitbybit.occt.shapes.compound.makeCompound({ shapes: hexagons });\n\n // Convert hexagons to DXF paths\n const dxfPaths3Options = new ShapeToDxfPathsDto();\n dxfPaths3Options.shape = hexagonsCompound;\n dxfPaths3Options.angularDeflection = 0.1;\n dxfPaths3Options.curvatureDeflection = 0.1;\n dxfPaths3Options.minimumOfPoints = 2;\n\n const dxfPaths3 = await bitbybit.occt.io.shapeToDxfPaths(dxfPaths3Options);\n\n // Create layer for hexagons\n const dxfLayer3Options = new DxfPathsWithLayerDto();\n dxfLayer3Options.paths = dxfPaths3;\n dxfLayer3Options.layer = \"Hexagons\";\n dxfLayer3Options.color = \"#002afa\";\n\n const dxfLayer3 = await bitbybit.occt.io.dxfPathsWithLayer(dxfLayer3Options);\n\n // Combine all layers\n const allLayers = [dxfLayer1, dxfLayer2, dxfLayer3];\n\n // Create DXF file\n const dxfCreateOptions = new DxfPathsPartsListDto();\n dxfCreateOptions.pathsParts = allLayers;\n dxfCreateOptions.fileName = \"bitbybit-dev.dxf\";\n dxfCreateOptions.tryDownload = true;\n\n await bitbybit.occt.io.dxfCreate(dxfCreateOptions);\n\n // Draw the shapes for visualization\n const drawOptions1 = new Bit.Inputs.Draw.DrawOcctShapeSimpleOptions();\n drawOptions1.precision = 0.01;\n drawOptions1.drawFaces = false;\n drawOptions1.drawEdges = true;\n drawOptions1.edgeColour = orangeColor;\n drawOptions1.edgeWidth = 5;\n\n bitbybit.draw.drawAnyAsync({ entity: filletedWires, options: drawOptions1 });\n\n const drawOptions2 = new Bit.Inputs.Draw.DrawOcctShapeSimpleOptions();\n drawOptions2.precision = 0.01;\n drawOptions2.drawFaces = false;\n drawOptions2.drawEdges = true;\n drawOptions2.edgeColour = purpleColor;\n drawOptions2.edgeWidth = 3;\n\n bitbybit.draw.drawAnyAsync({ entity: text2Wires, options: drawOptions2 });\n\n // Draw the shapes for visualization\n const drawOptions3 = new Bit.Inputs.Draw.DrawOcctShapeSimpleOptions();\n drawOptions3.precision = 0.01;\n drawOptions3.drawFaces = false;\n drawOptions3.drawEdges = true;\n drawOptions3.edgeColour = blueColor;\n drawOptions3.edgeWidth = 2;\n\n bitbybit.draw.drawAnyAsync({ entity: hexagonsCompound, options: drawOptions3 });\n}\n\n// Execute the function\nstart();","type":"typescript"}} title="DXF Export with Layers" /> diff --git a/docs/learn/code/common/occt/modeling/festive-decor/frost-flower.md b/docs/learn/code/common/occt/modeling/festive-decor/frost-flower.md index 342fdd9bd..d018fb292 100644 --- a/docs/learn/code/common/occt/modeling/festive-decor/frost-flower.md +++ b/docs/learn/code/common/occt/modeling/festive-decor/frost-flower.md @@ -34,21 +34,21 @@ The algorithm: sizebranchWirecombinedWireouterWireinnerWirehollowFacesnowflakesize0.8branchWire0000.3MULTIPLY1.5size0-0.2MULTIPLY2.5size00.4MULTIPLY3.5size00MULTIPLY4size0FALSE0.00001combinedWirebranchWirebranchWire001180outerWirecombinedWire0.40.1innerWirecombinedWire0.20.1hollowFaceouterWireinnerWireTRUEsnowflakehollowFacehollowFace00130hollowFace00160hollowFace00190hollowFace001120hollowFace001150FALSEsnowflake000.20.01Ice Material#aed6f1#5dade20.10.31FALSE2FALSE#ffffff2","version":"0.21.0","type":"blockly"}} + script={{"script":"sizebranchWirecombinedWireouterWireinnerWirehollowFacesnowflakesize0.8branchWire0000.3MULTIPLY1.5size0-0.2MULTIPLY2.5size00.4MULTIPLY3.5size00MULTIPLY4size0FALSE0.00001combinedWirebranchWirebranchWire001180outerWirecombinedWire0.40.1innerWirecombinedWire0.20.1hollowFaceouterWireinnerWireTRUEsnowflakehollowFacehollowFace00130hollowFace00160hollowFace00190hollowFace001120hollowFace001150FALSEsnowflake000.20.01Ice Material#aed6f1#5dade20.10.31FALSE2FALSE#ffffff2","type":"blockly"}} title="Star ornament with hanging hole" /> {\n const size = 0.8;\n\n const branchPoints: Point3[] = [\n [0, 0, 0],\n [0.3, 1.5 * size, 0],\n [-0.2, 2.5 * size, 0],\n [0.4, 3.5 * size, 0],\n [0, 4 * size, 0],\n ];\n\n const interpolation = new InterpolationDto();\n interpolation.points = branchPoints;\n interpolation.periodic = false;\n interpolation.tolerance = 0.00001;\n const branchWire = await wire.interpolatePoints(interpolation);\n\n const rotate180 = new RotateDto();\n rotate180.shape = branchWire;\n rotate180.axis = [0, 0, 1];\n rotate180.angle = 180;\n const branchWireRotated = await transforms.rotate(rotate180);\n\n const combine = new ShapesDto();\n combine.shapes = [branchWire, branchWireRotated];\n const combinedWire = await wire.combineEdgesAndWiresIntoAWire(combine);\n\n const offsetOuter = new OffsetDto();\n offsetOuter.shape = combinedWire;\n offsetOuter.distance = 0.4;\n offsetOuter.tolerance = 0.1;\n const outerWire = (await operations.offset(offsetOuter)) as unknown as TopoDSWirePointer;\n\n const offsetInner = new OffsetDto();\n offsetInner.shape = combinedWire;\n offsetInner.distance = 0.2;\n offsetInner.tolerance = 0.1;\n const innerWireRaw = (await operations.offset(offsetInner)) as unknown as TopoDSWirePointer;\n\n const reverse = new ShapeDto();\n reverse.shape = innerWireRaw;\n const innerWire = await wire.reversedWire(reverse);\n\n const faceFromWires = new FaceFromWiresDto();\n faceFromWires.shapes = [outerWire, innerWire];\n faceFromWires.planar = true;\n const hollowFace = await face.createFaceFromWires(faceFromWires);\n\n const angles = [0, 30, 60, 90, 120, 150];\n const rotatedFaces: TopoDSShapePointer[] = [];\n\n for (const angle of angles) {\n if (angle === 0) {\n rotatedFaces.push(hollowFace);\n continue;\n }\n const rotate = new RotateDto();\n rotate.shape = hollowFace;\n rotate.axis = [0, 0, 1];\n rotate.angle = angle;\n rotatedFaces.push(await transforms.rotate(rotate));\n }\n\n const union = new UnionDto();\n union.shapes = rotatedFaces;\n union.keepEdges = false;\n const snowflakeFace = await booleans.union(union);\n\n const extrude = new ExtrudeDto();\n extrude.shape = snowflakeFace;\n extrude.direction = [0, 0, 0.2];\n const snowflakeSolid = await operations.extrude(extrude);\n\n const materialOptions = new PBRMetallicRoughnessDto();\n materialOptions.name = 'Ice Material';\n materialOptions.baseColor = '#aed6f1';\n materialOptions.emissiveColor = '#5dade2';\n materialOptions.metallic = 0.1;\n materialOptions.roughness = 0.3;\n materialOptions.alpha = 1;\n materialOptions.backFaceCulling = false;\n materialOptions.zOffset = 2;\n const material = bitbybit.babylon.material.pbrMetallicRoughness.create(materialOptions);\n\n const drawOptions = new DrawOcctShapeOptions();\n drawOptions.precision = 0.01;\n drawOptions.drawEdges = false;\n drawOptions.edgeColour = '#ffffff';\n drawOptions.edgeWidth = 2;\n drawOptions.faceMaterial = material;\n\n const starMesh = await bitbybit.draw.drawAnyAsync({\n entity: snowflakeSolid,\n options: drawOptions,\n });\n\n const options = new ZoomOnDto();\n options.meshes = [starMesh];\n bitbybit.advanced.navigation.zoomOn(options);\n};\n\nstart();","version":"0.21.0","type":"typescript"}} + script={{"script":"const { InterpolationDto, RotateDto, ShapesDto, OffsetDto, FaceFromWiresDto, ExtrudeDto, UnionDto, ShapeDto } = Bit.Inputs.OCCT;\nconst { PBRMetallicRoughnessDto } = Bit.Inputs.BabylonMaterial;\nconst { DrawOcctShapeOptions } = Bit.Inputs.Draw;\nconst { ZoomOnDto } = Bit.Advanced.Navigation;\n\ntype Point3 = Bit.Inputs.Base.Point3;\ntype TopoDSWirePointer = Bit.Inputs.OCCT.TopoDSWirePointer;\ntype TopoDSFacePointer = Bit.Inputs.OCCT.TopoDSFacePointer;\ntype TopoDSShapePointer = Bit.Inputs.OCCT.TopoDSShapePointer;\n\nconst { wire, face } = bitbybit.occt.shapes;\nconst { operations, transforms, booleans } = bitbybit.occt;\n\nconst start = async () => {\n const size = 0.8;\n\n const branchPoints: Point3[] = [\n [0, 0, 0],\n [0.3, 1.5 * size, 0],\n [-0.2, 2.5 * size, 0],\n [0.4, 3.5 * size, 0],\n [0, 4 * size, 0],\n ];\n\n const interpolation = new InterpolationDto();\n interpolation.points = branchPoints;\n interpolation.periodic = false;\n interpolation.tolerance = 0.00001;\n const branchWire = await wire.interpolatePoints(interpolation);\n\n const rotate180 = new RotateDto();\n rotate180.shape = branchWire;\n rotate180.axis = [0, 0, 1];\n rotate180.angle = 180;\n const branchWireRotated = await transforms.rotate(rotate180);\n\n const combine = new ShapesDto();\n combine.shapes = [branchWire, branchWireRotated];\n const combinedWire = await wire.combineEdgesAndWiresIntoAWire(combine);\n\n const offsetOuter = new OffsetDto();\n offsetOuter.shape = combinedWire;\n offsetOuter.distance = 0.4;\n offsetOuter.tolerance = 0.1;\n const outerWire = (await operations.offset(offsetOuter)) as unknown as TopoDSWirePointer;\n\n const offsetInner = new OffsetDto();\n offsetInner.shape = combinedWire;\n offsetInner.distance = 0.2;\n offsetInner.tolerance = 0.1;\n const innerWireRaw = (await operations.offset(offsetInner)) as unknown as TopoDSWirePointer;\n\n const reverse = new ShapeDto();\n reverse.shape = innerWireRaw;\n const innerWire = await wire.reversedWire(reverse);\n\n const faceFromWires = new FaceFromWiresDto();\n faceFromWires.shapes = [outerWire, innerWire];\n faceFromWires.planar = true;\n const hollowFace = await face.createFaceFromWires(faceFromWires);\n\n const angles = [0, 30, 60, 90, 120, 150];\n const rotatedFaces: TopoDSShapePointer[] = [];\n\n for (const angle of angles) {\n if (angle === 0) {\n rotatedFaces.push(hollowFace);\n continue;\n }\n const rotate = new RotateDto();\n rotate.shape = hollowFace;\n rotate.axis = [0, 0, 1];\n rotate.angle = angle;\n rotatedFaces.push(await transforms.rotate(rotate));\n }\n\n const union = new UnionDto();\n union.shapes = rotatedFaces;\n union.keepEdges = false;\n const snowflakeFace = await booleans.union(union);\n\n const extrude = new ExtrudeDto();\n extrude.shape = snowflakeFace;\n extrude.direction = [0, 0, 0.2];\n const snowflakeSolid = await operations.extrude(extrude);\n\n const materialOptions = new PBRMetallicRoughnessDto();\n materialOptions.name = 'Ice Material';\n materialOptions.baseColor = '#aed6f1';\n materialOptions.emissiveColor = '#5dade2';\n materialOptions.metallic = 0.1;\n materialOptions.roughness = 0.3;\n materialOptions.alpha = 1;\n materialOptions.backFaceCulling = false;\n materialOptions.zOffset = 2;\n const material = bitbybit.babylon.material.pbrMetallicRoughness.create(materialOptions);\n\n const drawOptions = new DrawOcctShapeOptions();\n drawOptions.precision = 0.01;\n drawOptions.drawEdges = false;\n drawOptions.edgeColour = '#ffffff';\n drawOptions.edgeWidth = 2;\n drawOptions.faceMaterial = material;\n\n const starMesh = await bitbybit.draw.drawAnyAsync({\n entity: snowflakeSolid,\n options: drawOptions,\n });\n\n const options = new ZoomOnDto();\n options.meshes = [starMesh];\n bitbybit.advanced.navigation.zoomOn(options);\n};\n\nstart();","type":"typescript"}} title="Star ornament with hanging hole" /> diff --git a/docs/learn/code/common/occt/modeling/festive-decor/frozen-snowflake.md b/docs/learn/code/common/occt/modeling/festive-decor/frozen-snowflake.md index 3fc6fe4c2..bd611702c 100644 --- a/docs/learn/code/common/occt/modeling/festive-decor/frozen-snowflake.md +++ b/docs/learn/code/common/occt/modeling/festive-decor/frozen-snowflake.md @@ -33,21 +33,21 @@ The algorithm: nrZigZagsinnerHex1outerHex1zigzag1zigzag1ScaledinnerHex2outerHex2zigzag2zigzag2Scaledloft1loft2loft2Translatedloft3faces1everySecondMaineverySecondEnd1faces2everySecondEnd2faces3facesListForExtrusioncurrentFaceallExtrudedFacesextrudedFaceallExtrudedFaces2currentFace2compound1compound2'city'10000.10.7TRUEnrZigZags5innerHex100.2001063outerHex100.2001063.7zigzag1innerHex1outerHex1nrZigZagsFALSEFALSETRUEzigzag1Scaledzigzag13innerHex200001062outerHex200001062.5zigzag2innerHex2outerHex2nrZigZagsFALSEFALSETRUEzigzag2Scaledzigzag26loft1zigzag2zigzag1zigzag1Scaledzigzag2ScaledFALSEFALSEFALSETRUE10FALSE31e-7approxCentripetalloft2zigzag2Scaledzigzag1ScaledFALSEFALSEFALSETRUE10FALSE31e-7approxCentripetalloft2Translatedloft200.30loft3zigzag2zigzag1FALSEFALSEFALSETRUE10FALSE31e-7approxCentripetalfaces1loft1everySecondMainfaces121TRUEeverySecondEnd1loft2Translatedfaces2everySecondEnd120TRUEeverySecondEnd2loft3faces3everySecondEnd220TRUEfacesListForExtrusioncurrentFacefaces2INSERTLASTfacesListForExtrusioncurrentFacecurrentFacefaces3INSERTLASTfacesListForExtrusioncurrentFaceallExtrudedFacescurrentFacefacesListForExtrusionextrudedFacecurrentFace00.30INSERTLASTallExtrudedFacesextrudedFaceallExtrudedFaces2currentFace2everySecondMainextrudedFacecurrentFace200.30INSERTLASTallExtrudedFaces2extrudedFacecompound1allExtrudedFaces2compound2allExtrudedFacescompound10.01Material 1#94b4ff#0000000.80.21FALSE2FALSE#ffffff4compound20.01Material 2#33ffc2#0000000.80.21FALSE0FALSE#ffffff2","version":"0.21.0","type":"blockly"}} + script={{"script":"nrZigZagsinnerHex1outerHex1zigzag1zigzag1ScaledinnerHex2outerHex2zigzag2zigzag2Scaledloft1loft2loft2Translatedloft3faces1everySecondMaineverySecondEnd1faces2everySecondEnd2faces3facesListForExtrusioncurrentFaceallExtrudedFacesextrudedFaceallExtrudedFaces2currentFace2compound1compound2'city'10000.10.7TRUEnrZigZags5innerHex100.2001063outerHex100.2001063.7zigzag1innerHex1outerHex1nrZigZagsFALSEFALSETRUEzigzag1Scaledzigzag13innerHex200001062outerHex200001062.5zigzag2innerHex2outerHex2nrZigZagsFALSEFALSETRUEzigzag2Scaledzigzag26loft1zigzag2zigzag1zigzag1Scaledzigzag2ScaledFALSEFALSEFALSETRUE10FALSE31e-7approxCentripetalloft2zigzag2Scaledzigzag1ScaledFALSEFALSEFALSETRUE10FALSE31e-7approxCentripetalloft2Translatedloft200.30loft3zigzag2zigzag1FALSEFALSEFALSETRUE10FALSE31e-7approxCentripetalfaces1loft1everySecondMainfaces121TRUEeverySecondEnd1loft2Translatedfaces2everySecondEnd120TRUEeverySecondEnd2loft3faces3everySecondEnd220TRUEfacesListForExtrusioncurrentFacefaces2INSERTLASTfacesListForExtrusioncurrentFacecurrentFacefaces3INSERTLASTfacesListForExtrusioncurrentFaceallExtrudedFacescurrentFacefacesListForExtrusionextrudedFacecurrentFace00.30INSERTLASTallExtrudedFacesextrudedFaceallExtrudedFaces2currentFace2everySecondMainextrudedFacecurrentFace200.30INSERTLASTallExtrudedFaces2extrudedFacecompound1allExtrudedFaces2compound2allExtrudedFacescompound10.01Material 1#94b4ff#0000000.80.21FALSE2FALSE#ffffff4compound20.01Material 2#33ffc2#0000000.80.21FALSE0FALSE#ffffff2","type":"blockly"}} title="Frozen Snowflake" /> {\n const skyboxOpt = new SkyboxDto();\n skyboxOpt.skybox = skyboxEnum.city;\n skyboxOpt.hideSkybox = true;\n bitbybit.babylon.scene.enableSkybox(skyboxOpt);\n\n const nrZigZags = 5;\n\n // Create first set of hexagon wires\n const innerHex1Dto = new NGonWireDto();\n innerHex1Dto.center = [0, 0.2, 0];\n innerHex1Dto.direction = [0, 1, 0];\n innerHex1Dto.nrCorners = 6;\n innerHex1Dto.radius = 3;\n const innerHex1 = await wire.createNGonWire(innerHex1Dto);\n\n const outerHex1Dto = new NGonWireDto();\n outerHex1Dto.center = [0, 0.2, 0];\n outerHex1Dto.direction = [0, 1, 0];\n outerHex1Dto.nrCorners = 6;\n outerHex1Dto.radius = 3.7;\n const outerHex1 = await wire.createNGonWire(outerHex1Dto);\n\n const innerHex2Dto = new NGonWireDto();\n innerHex2Dto.center = [0, 0, 0];\n innerHex2Dto.direction = [0, 1, 0];\n innerHex2Dto.nrCorners = 6;\n innerHex2Dto.radius = 2;\n const innerHex2 = await wire.createNGonWire(innerHex2Dto);\n\n const outerHex2Dto = new NGonWireDto();\n outerHex2Dto.center = [0, 0, 0];\n outerHex2Dto.direction = [0, 1, 0];\n outerHex2Dto.nrCorners = 6;\n outerHex2Dto.radius = 2.5;\n const outerHex2 = await wire.createNGonWire(outerHex2Dto);\n\n // Create zigzag wires between hexagons\n const zigzag1Dto = new ZigZagBetweenTwoWiresDto();\n zigzag1Dto.wire1 = innerHex1;\n zigzag1Dto.wire2 = outerHex1;\n zigzag1Dto.nrZigZags = nrZigZags;\n zigzag1Dto.inverse = false;\n zigzag1Dto.divideByEqualDistance = false;\n zigzag1Dto.zigZagsPerEdge = true;\n const zigzag1 = await wire.createZigZagBetweenTwoWires(zigzag1Dto);\n\n const scale1Dto = new ScaleDto();\n scale1Dto.shape = zigzag1;\n scale1Dto.factor = 3;\n const zigzag1Scaled = await transforms.scale(scale1Dto);\n\n const zigzag2Dto = new ZigZagBetweenTwoWiresDto();\n zigzag2Dto.wire1 = innerHex2;\n zigzag2Dto.wire2 = outerHex2;\n zigzag2Dto.nrZigZags = nrZigZags;\n zigzag2Dto.inverse = false;\n zigzag2Dto.divideByEqualDistance = false;\n zigzag2Dto.zigZagsPerEdge = true;\n const zigzag2 = await wire.createZigZagBetweenTwoWires(zigzag2Dto);\n\n const scale2Dto = new ScaleDto();\n scale2Dto.shape = zigzag2;\n scale2Dto.factor = 6;\n const zigzag2Scaled = await transforms.scale(scale2Dto);\n\n // Create loft surfaces\n const loft1Dto = new LoftAdvancedDto();\n loft1Dto.shapes = [zigzag2, zigzag1, zigzag1Scaled, zigzag2Scaled];\n loft1Dto.makeSolid = false;\n loft1Dto.closed = false;\n loft1Dto.periodic = false;\n loft1Dto.straight = true;\n loft1Dto.nrPeriodicSections = 10;\n loft1Dto.useSmoothing = false;\n loft1Dto.maxUDegree = 3;\n loft1Dto.tolerance = 1e-7;\n loft1Dto.parType = approxParametrizationTypeEnum.approxCentripetal;\n const loft1 = await operations.loftAdvanced(loft1Dto);\n\n const loft2Dto = new LoftAdvancedDto();\n loft2Dto.shapes = [zigzag2Scaled, zigzag1Scaled];\n loft2Dto.makeSolid = false;\n loft2Dto.closed = false;\n loft2Dto.periodic = false;\n loft2Dto.straight = true;\n loft2Dto.nrPeriodicSections = 10;\n loft2Dto.useSmoothing = false;\n loft2Dto.maxUDegree = 3;\n loft2Dto.tolerance = 1e-7;\n loft1Dto.parType = approxParametrizationTypeEnum.approxCentripetal;\n const loft2 = await operations.loftAdvanced(loft2Dto);\n\n const translateDto = new TranslateDto();\n translateDto.shape = loft2;\n translateDto.translation = [0, 0.3, 0];\n const loft2Translated = await transforms.translate(translateDto);\n\n const loft3Dto = new LoftAdvancedDto();\n loft3Dto.shapes = [zigzag2, zigzag1];\n loft3Dto.makeSolid = false;\n loft3Dto.closed = false;\n loft3Dto.periodic = false;\n loft3Dto.straight = true;\n loft3Dto.nrPeriodicSections = 10;\n loft3Dto.useSmoothing = false;\n loft3Dto.maxUDegree = 3;\n loft3Dto.tolerance = 1e-7;\n loft1Dto.parType = approxParametrizationTypeEnum.approxCentripetal;\n const loft3 = await operations.loftAdvanced(loft3Dto);\n\n // Extract and filter faces\n const faces1All = await face.getFaces({ shape: loft1 });\n const everySecondMain = bitbybit.lists.getNthItem({\n list: faces1All,\n nth: 2,\n offset: 1,\n clone: true\n });\n\n const faces2All = await face.getFaces({ shape: loft2Translated });\n const everySecondEnd1 = bitbybit.lists.getNthItem({\n list: faces2All,\n nth: 2,\n offset: 0,\n clone: true\n });\n\n const faces3All = await face.getFaces({ shape: loft3 });\n const everySecondEnd2 = bitbybit.lists.getNthItem({\n list: faces3All,\n nth: 2,\n offset: 0,\n clone: true\n });\n\n // Combine faces for extrusion\n const facesForExtrusion: TopoDSFacePointer[] = [\n ...everySecondEnd1,\n ...everySecondEnd2\n ];\n\n // Extrude all faces\n const extrudedFaces: TopoDSShapePointer[] = [];\n for (const faceToExtrude of facesForExtrusion) {\n const extrudeDto = new ExtrudeDto();\n extrudeDto.shape = faceToExtrude;\n extrudeDto.direction = [0, 0.3, 0];\n const extruded = await operations.extrude(extrudeDto);\n extrudedFaces.push(extruded);\n }\n\n const extrudedFacesMain: TopoDSShapePointer[] = [];\n for (const faceToExtrude of everySecondMain) {\n const extrudeDto = new ExtrudeDto();\n extrudeDto.shape = faceToExtrude;\n extrudeDto.direction = [0, 0.3, 0];\n const extruded = await operations.extrude(extrudeDto);\n extrudedFacesMain.push(extruded);\n }\n\n // Create compounds\n const compoundDto1 = new ShapesDto();\n compoundDto1.shapes = extrudedFacesMain;\n const compound1 = await compound.makeCompound(compoundDto1);\n\n const compoundDto2 = new ShapesDto();\n compoundDto2.shapes = extrudedFaces;\n const compound2 = await compound.makeCompound(compoundDto2);\n\n // Create materials\n const material1Dto = new PBRMetallicRoughnessDto();\n material1Dto.name = 'Material 1';\n material1Dto.baseColor = '#94b4ff';\n material1Dto.emissiveColor = '#000000';\n material1Dto.metallic = 0.8;\n material1Dto.roughness = 0.2;\n material1Dto.alpha = 1;\n material1Dto.backFaceCulling = false;\n material1Dto.zOffset = 2;\n const material1 = bitbybit.babylon.material.pbrMetallicRoughness.create(material1Dto);\n\n const material2Dto = new PBRMetallicRoughnessDto();\n material2Dto.name = 'Material 2';\n material2Dto.baseColor = '#33ffc2';\n material2Dto.emissiveColor = '#000000';\n material2Dto.metallic = 0.8;\n material2Dto.roughness = 0.2;\n material2Dto.alpha = 1;\n material2Dto.backFaceCulling = false;\n material2Dto.zOffset = 0;\n const material2 = bitbybit.babylon.material.pbrMetallicRoughness.create(material2Dto);\n\n // Draw the compounds\n const drawOptions1 = new DrawOcctShapeOptions();\n drawOptions1.precision = 0.01;\n drawOptions1.faceMaterial = material1;\n drawOptions1.drawEdges = false;\n drawOptions1.edgeColour = '#ffffff';\n drawOptions1.edgeWidth = 4;\n\n await bitbybit.draw.drawAnyAsync({\n entity: compound1,\n options: drawOptions1\n });\n\n const drawOptions2 = new DrawOcctShapeOptions();\n drawOptions2.precision = 0.01;\n drawOptions2.faceMaterial = material2;\n drawOptions2.drawEdges = false;\n drawOptions2.edgeColour = '#ffffff';\n drawOptions2.edgeWidth = 2;\n\n const drawnMesh = await bitbybit.draw.drawAnyAsync({\n entity: compound2,\n options: drawOptions2\n });\n\n const zoomOnOptions = new ZoomOnDto();\n zoomOnOptions.offset = -0.1;\n zoomOnOptions.meshes = [drawnMesh];\n bitbybit.advanced.navigation.zoomOn(zoomOnOptions);\n};\n\nstart();","version":"0.21.0","type":"typescript"}} + script={{"script":"const { NGonWireDto, ZigZagBetweenTwoWiresDto, ShapesDto, ExtrudeDto, approxParametrizationTypeEnum } = Bit.Inputs.OCCT;\nconst { LoftAdvancedDto } = Bit.Inputs.OCCT;\nconst { TranslateDto, ScaleDto } = Bit.Inputs.OCCT;\nconst { PBRMetallicRoughnessDto } = Bit.Inputs.BabylonMaterial;\nconst { DrawOcctShapeOptions } = Bit.Inputs.Draw;\nconst { SkyboxDto } = Bit.Inputs.BabylonScene;\nconst { skyboxEnum } = Bit.Inputs.Base;\nconst { ZoomOnDto } = Bit.Advanced.Navigation;\n\ntype Point3 = Bit.Inputs.Base.Point3;\ntype TopoDSWirePointer = Bit.Inputs.OCCT.TopoDSWirePointer;\ntype TopoDSFacePointer = Bit.Inputs.OCCT.TopoDSFacePointer;\ntype TopoDSShapePointer = Bit.Inputs.OCCT.TopoDSShapePointer;\n\nconst { wire, face, compound } = bitbybit.occt.shapes;\nconst { operations, transforms } = bitbybit.occt;\n\nconst start = async () => {\n const skyboxOpt = new SkyboxDto();\n skyboxOpt.skybox = skyboxEnum.city;\n skyboxOpt.hideSkybox = true;\n bitbybit.babylon.scene.enableSkybox(skyboxOpt);\n\n const nrZigZags = 5;\n\n // Create first set of hexagon wires\n const innerHex1Dto = new NGonWireDto();\n innerHex1Dto.center = [0, 0.2, 0];\n innerHex1Dto.direction = [0, 1, 0];\n innerHex1Dto.nrCorners = 6;\n innerHex1Dto.radius = 3;\n const innerHex1 = await wire.createNGonWire(innerHex1Dto);\n\n const outerHex1Dto = new NGonWireDto();\n outerHex1Dto.center = [0, 0.2, 0];\n outerHex1Dto.direction = [0, 1, 0];\n outerHex1Dto.nrCorners = 6;\n outerHex1Dto.radius = 3.7;\n const outerHex1 = await wire.createNGonWire(outerHex1Dto);\n\n const innerHex2Dto = new NGonWireDto();\n innerHex2Dto.center = [0, 0, 0];\n innerHex2Dto.direction = [0, 1, 0];\n innerHex2Dto.nrCorners = 6;\n innerHex2Dto.radius = 2;\n const innerHex2 = await wire.createNGonWire(innerHex2Dto);\n\n const outerHex2Dto = new NGonWireDto();\n outerHex2Dto.center = [0, 0, 0];\n outerHex2Dto.direction = [0, 1, 0];\n outerHex2Dto.nrCorners = 6;\n outerHex2Dto.radius = 2.5;\n const outerHex2 = await wire.createNGonWire(outerHex2Dto);\n\n // Create zigzag wires between hexagons\n const zigzag1Dto = new ZigZagBetweenTwoWiresDto();\n zigzag1Dto.wire1 = innerHex1;\n zigzag1Dto.wire2 = outerHex1;\n zigzag1Dto.nrZigZags = nrZigZags;\n zigzag1Dto.inverse = false;\n zigzag1Dto.divideByEqualDistance = false;\n zigzag1Dto.zigZagsPerEdge = true;\n const zigzag1 = await wire.createZigZagBetweenTwoWires(zigzag1Dto);\n\n const scale1Dto = new ScaleDto();\n scale1Dto.shape = zigzag1;\n scale1Dto.factor = 3;\n const zigzag1Scaled = await transforms.scale(scale1Dto);\n\n const zigzag2Dto = new ZigZagBetweenTwoWiresDto();\n zigzag2Dto.wire1 = innerHex2;\n zigzag2Dto.wire2 = outerHex2;\n zigzag2Dto.nrZigZags = nrZigZags;\n zigzag2Dto.inverse = false;\n zigzag2Dto.divideByEqualDistance = false;\n zigzag2Dto.zigZagsPerEdge = true;\n const zigzag2 = await wire.createZigZagBetweenTwoWires(zigzag2Dto);\n\n const scale2Dto = new ScaleDto();\n scale2Dto.shape = zigzag2;\n scale2Dto.factor = 6;\n const zigzag2Scaled = await transforms.scale(scale2Dto);\n\n // Create loft surfaces\n const loft1Dto = new LoftAdvancedDto();\n loft1Dto.shapes = [zigzag2, zigzag1, zigzag1Scaled, zigzag2Scaled];\n loft1Dto.makeSolid = false;\n loft1Dto.closed = false;\n loft1Dto.periodic = false;\n loft1Dto.straight = true;\n loft1Dto.nrPeriodicSections = 10;\n loft1Dto.useSmoothing = false;\n loft1Dto.maxUDegree = 3;\n loft1Dto.tolerance = 1e-7;\n loft1Dto.parType = approxParametrizationTypeEnum.approxCentripetal;\n const loft1 = await operations.loftAdvanced(loft1Dto);\n\n const loft2Dto = new LoftAdvancedDto();\n loft2Dto.shapes = [zigzag2Scaled, zigzag1Scaled];\n loft2Dto.makeSolid = false;\n loft2Dto.closed = false;\n loft2Dto.periodic = false;\n loft2Dto.straight = true;\n loft2Dto.nrPeriodicSections = 10;\n loft2Dto.useSmoothing = false;\n loft2Dto.maxUDegree = 3;\n loft2Dto.tolerance = 1e-7;\n loft1Dto.parType = approxParametrizationTypeEnum.approxCentripetal;\n const loft2 = await operations.loftAdvanced(loft2Dto);\n\n const translateDto = new TranslateDto();\n translateDto.shape = loft2;\n translateDto.translation = [0, 0.3, 0];\n const loft2Translated = await transforms.translate(translateDto);\n\n const loft3Dto = new LoftAdvancedDto();\n loft3Dto.shapes = [zigzag2, zigzag1];\n loft3Dto.makeSolid = false;\n loft3Dto.closed = false;\n loft3Dto.periodic = false;\n loft3Dto.straight = true;\n loft3Dto.nrPeriodicSections = 10;\n loft3Dto.useSmoothing = false;\n loft3Dto.maxUDegree = 3;\n loft3Dto.tolerance = 1e-7;\n loft1Dto.parType = approxParametrizationTypeEnum.approxCentripetal;\n const loft3 = await operations.loftAdvanced(loft3Dto);\n\n // Extract and filter faces\n const faces1All = await face.getFaces({ shape: loft1 });\n const everySecondMain = bitbybit.lists.getNthItem({\n list: faces1All,\n nth: 2,\n offset: 1,\n clone: true\n });\n\n const faces2All = await face.getFaces({ shape: loft2Translated });\n const everySecondEnd1 = bitbybit.lists.getNthItem({\n list: faces2All,\n nth: 2,\n offset: 0,\n clone: true\n });\n\n const faces3All = await face.getFaces({ shape: loft3 });\n const everySecondEnd2 = bitbybit.lists.getNthItem({\n list: faces3All,\n nth: 2,\n offset: 0,\n clone: true\n });\n\n // Combine faces for extrusion\n const facesForExtrusion: TopoDSFacePointer[] = [\n ...everySecondEnd1,\n ...everySecondEnd2\n ];\n\n // Extrude all faces\n const extrudedFaces: TopoDSShapePointer[] = [];\n for (const faceToExtrude of facesForExtrusion) {\n const extrudeDto = new ExtrudeDto();\n extrudeDto.shape = faceToExtrude;\n extrudeDto.direction = [0, 0.3, 0];\n const extruded = await operations.extrude(extrudeDto);\n extrudedFaces.push(extruded);\n }\n\n const extrudedFacesMain: TopoDSShapePointer[] = [];\n for (const faceToExtrude of everySecondMain) {\n const extrudeDto = new ExtrudeDto();\n extrudeDto.shape = faceToExtrude;\n extrudeDto.direction = [0, 0.3, 0];\n const extruded = await operations.extrude(extrudeDto);\n extrudedFacesMain.push(extruded);\n }\n\n // Create compounds\n const compoundDto1 = new ShapesDto();\n compoundDto1.shapes = extrudedFacesMain;\n const compound1 = await compound.makeCompound(compoundDto1);\n\n const compoundDto2 = new ShapesDto();\n compoundDto2.shapes = extrudedFaces;\n const compound2 = await compound.makeCompound(compoundDto2);\n\n // Create materials\n const material1Dto = new PBRMetallicRoughnessDto();\n material1Dto.name = 'Material 1';\n material1Dto.baseColor = '#94b4ff';\n material1Dto.emissiveColor = '#000000';\n material1Dto.metallic = 0.8;\n material1Dto.roughness = 0.2;\n material1Dto.alpha = 1;\n material1Dto.backFaceCulling = false;\n material1Dto.zOffset = 2;\n const material1 = bitbybit.babylon.material.pbrMetallicRoughness.create(material1Dto);\n\n const material2Dto = new PBRMetallicRoughnessDto();\n material2Dto.name = 'Material 2';\n material2Dto.baseColor = '#33ffc2';\n material2Dto.emissiveColor = '#000000';\n material2Dto.metallic = 0.8;\n material2Dto.roughness = 0.2;\n material2Dto.alpha = 1;\n material2Dto.backFaceCulling = false;\n material2Dto.zOffset = 0;\n const material2 = bitbybit.babylon.material.pbrMetallicRoughness.create(material2Dto);\n\n // Draw the compounds\n const drawOptions1 = new DrawOcctShapeOptions();\n drawOptions1.precision = 0.01;\n drawOptions1.faceMaterial = material1;\n drawOptions1.drawEdges = false;\n drawOptions1.edgeColour = '#ffffff';\n drawOptions1.edgeWidth = 4;\n\n await bitbybit.draw.drawAnyAsync({\n entity: compound1,\n options: drawOptions1\n });\n\n const drawOptions2 = new DrawOcctShapeOptions();\n drawOptions2.precision = 0.01;\n drawOptions2.faceMaterial = material2;\n drawOptions2.drawEdges = false;\n drawOptions2.edgeColour = '#ffffff';\n drawOptions2.edgeWidth = 2;\n\n const drawnMesh = await bitbybit.draw.drawAnyAsync({\n entity: compound2,\n options: drawOptions2\n });\n\n const zoomOnOptions = new ZoomOnDto();\n zoomOnOptions.offset = -0.1;\n zoomOnOptions.meshes = [drawnMesh];\n bitbybit.advanced.navigation.zoomOn(zoomOnOptions);\n};\n\nstart();","type":"typescript"}} title="Star ornament with hanging hole" /> diff --git a/docs/learn/code/common/occt/modeling/festive-decor/gem-star.md b/docs/learn/code/common/occt/modeling/festive-decor/gem-star.md index 6a7579717..3908522a6 100644 --- a/docs/learn/code/common/occt/modeling/festive-decor/gem-star.md +++ b/docs/learn/code/common/occt/modeling/festive-decor/gem-star.md @@ -22,21 +22,21 @@ Create a gem-like star decoration by lofting a star-shaped wire profile to a sin raysouterRadiusinnerRadiusDivisorheightinnerRadiusstarWiretopPointloftShapemirroredShapeshapeListsewnShellsolidShapedrawnMesh'city'10000.10.7TRUErays5outerRadius4.5innerRadiusDivisor3.2height0.7innerRadiusDIVIDEouterRadiusinnerRadiusDivisorstarWire000010raysouterRadiusinnerRadiusFALSEtopPoint0height0loftShapestarWiretopPointFALSEFALSEFALSEFALSE10FALSE31e-7approxCentripetalmirroredShapeloftShape000010shapeListloftShapemirroredShapesewnShellshapeList1e-7solidShapesewnShelldrawnMeshsolidShape0.01Custom Material#4dffb2#0000000.80.31FALSE2TRUE#ffffff2drawnMeshTRUE0.8-0.3TRUE","version":"0.21.0","type":"blockly"}} +script={{"script":"raysouterRadiusinnerRadiusDivisorheightinnerRadiusstarWiretopPointloftShapemirroredShapeshapeListsewnShellsolidShapedrawnMesh'city'10000.10.7TRUErays5outerRadius4.5innerRadiusDivisor3.2height0.7innerRadiusDIVIDEouterRadiusinnerRadiusDivisorstarWire000010raysouterRadiusinnerRadiusFALSEtopPoint0height0loftShapestarWiretopPointFALSEFALSEFALSEFALSE10FALSE31e-7approxCentripetalmirroredShapeloftShape000010shapeListloftShapemirroredShapesewnShellshapeList1e-7solidShapesewnShelldrawnMeshsolidShape0.01Custom Material#4dffb2#0000000.80.31FALSE2TRUE#ffffff2drawnMeshTRUE0.8-0.3TRUE","type":"blockly"}} title="Gem star decoration" /> {\n const skyboxOpt = new SkyboxDto();\n skyboxOpt.skybox = skyboxEnum.city;\n skyboxOpt.hideSkybox = true;\n bitbybit.babylon.scene.enableSkybox(skyboxOpt);\n\n // 1. Variables\n const rays = 5;\n const outerRadius = 4.5;\n const innerRadiusDivisor = 3.2;\n const height = 0.7;\n const innerRadius = outerRadius / innerRadiusDivisor;\n\n // 2. Create Star Wire\n const starDto = new StarDto();\n starDto.center = [0, 0, 0];\n starDto.direction = [0, 1, 0];\n starDto.numRays = rays;\n starDto.outerRadius = outerRadius;\n starDto.innerRadius = innerRadius;\n starDto.half = false;\n const starWire = await wire.createStarWire(starDto);\n\n // 3. Loft to Top Point\n const loftDto = new LoftAdvancedDto();\n loftDto.shapes = [starWire];\n loftDto.startVertex = [0, height, 0];\n loftDto.makeSolid = false;\n loftDto.closed = false;\n loftDto.periodic = false;\n loftDto.straight = false;\n loftDto.nrPeriodicSections = 10;\n loftDto.useSmoothing = false;\n loftDto.maxUDegree = 3;\n loftDto.tolerance = 1e-7;\n loftDto.parType = approxParametrizationTypeEnum.approxCentripetal;\n const loftShape = await operations.loftAdvanced(loftDto);\n\n // 4. Mirror to create bottom half\n const mirrorDto = new MirrorAlongNormalDto();\n mirrorDto.shape = loftShape;\n mirrorDto.origin = [0, 0, 0];\n mirrorDto.normal = [0, 1, 0];\n const mirroredShape = await transforms.mirrorAlongNormal(mirrorDto);\n\n // 5. Sew Faces into a Shell\n const sewDto = new SewDto();\n sewDto.shapes = [loftShape, mirroredShape];\n sewDto.tolerance = 1e-7;\n const sewnShell = await shell.sewFaces(sewDto);\n\n // 6. Create Solid from Shell\n const solidDto = new ShapeDto();\n solidDto.shape = sewnShell;\n const solidShape = await solid.fromClosedShell(solidDto);\n\n // 7. Visualization\n const materialOptions = new PBRMetallicRoughnessDto();\n materialOptions.name = 'Custom Material';\n materialOptions.baseColor = '#4dffb2';\n materialOptions.emissiveColor = '#000000';\n materialOptions.metallic = 0.8;\n materialOptions.roughness = 0.3;\n materialOptions.alpha = 1;\n materialOptions.backFaceCulling = false;\n materialOptions.zOffset = 2;\n const material = bitbybit.babylon.material.pbrMetallicRoughness.create(materialOptions);\n\n const drawOptions = new DrawOcctShapeOptions();\n drawOptions.precision = 0.01;\n drawOptions.drawEdges = true;\n drawOptions.edgeColour = '#ffffff';\n drawOptions.edgeWidth = 2;\n drawOptions.faceMaterial = material;\n\n const drawnMesh = await bitbybit.draw.drawAnyAsync({\n entity: solidShape,\n options: drawOptions,\n });\n\n const zoomDto = new ZoomOnDto();\n zoomDto.meshes = [drawnMesh];\n zoomDto.includeChildren = true;\n zoomDto.animationSpeed = 0.8;\n zoomDto.offset = -0.3;\n zoomDto.doNotUpdateMaxZ = true;\n bitbybit.advanced.navigation.zoomOn(zoomDto);\n};\n\nstart();","version":"0.21.0","type":"typescript"}} +script={{"script":"const { StarDto, LoftAdvancedDto, MirrorAlongNormalDto, SewDto, ShapeDto } = Bit.Inputs.OCCT;\nconst { PBRMetallicRoughnessDto } = Bit.Inputs.BabylonMaterial;\nconst { SkyboxDto } = Bit.Inputs.BabylonScene;\nconst { DrawOcctShapeOptions } = Bit.Inputs.Draw;\nconst { ZoomOnDto } = Bit.Advanced.Navigation;\nconst { skyboxEnum } = Bit.Inputs.Base;\nconst { approxParametrizationTypeEnum } = Bit.Inputs.OCCT;\ntype TopoDSShapePointer = Bit.Inputs.OCCT.TopoDSShapePointer;\n\nconst { wire, shell, solid } = bitbybit.occt.shapes;\nconst { operations, transforms } = bitbybit.occt;\n\nconst start = async () => {\n const skyboxOpt = new SkyboxDto();\n skyboxOpt.skybox = skyboxEnum.city;\n skyboxOpt.hideSkybox = true;\n bitbybit.babylon.scene.enableSkybox(skyboxOpt);\n\n // 1. Variables\n const rays = 5;\n const outerRadius = 4.5;\n const innerRadiusDivisor = 3.2;\n const height = 0.7;\n const innerRadius = outerRadius / innerRadiusDivisor;\n\n // 2. Create Star Wire\n const starDto = new StarDto();\n starDto.center = [0, 0, 0];\n starDto.direction = [0, 1, 0];\n starDto.numRays = rays;\n starDto.outerRadius = outerRadius;\n starDto.innerRadius = innerRadius;\n starDto.half = false;\n const starWire = await wire.createStarWire(starDto);\n\n // 3. Loft to Top Point\n const loftDto = new LoftAdvancedDto();\n loftDto.shapes = [starWire];\n loftDto.startVertex = [0, height, 0];\n loftDto.makeSolid = false;\n loftDto.closed = false;\n loftDto.periodic = false;\n loftDto.straight = false;\n loftDto.nrPeriodicSections = 10;\n loftDto.useSmoothing = false;\n loftDto.maxUDegree = 3;\n loftDto.tolerance = 1e-7;\n loftDto.parType = approxParametrizationTypeEnum.approxCentripetal;\n const loftShape = await operations.loftAdvanced(loftDto);\n\n // 4. Mirror to create bottom half\n const mirrorDto = new MirrorAlongNormalDto();\n mirrorDto.shape = loftShape;\n mirrorDto.origin = [0, 0, 0];\n mirrorDto.normal = [0, 1, 0];\n const mirroredShape = await transforms.mirrorAlongNormal(mirrorDto);\n\n // 5. Sew Faces into a Shell\n const sewDto = new SewDto();\n sewDto.shapes = [loftShape, mirroredShape];\n sewDto.tolerance = 1e-7;\n const sewnShell = await shell.sewFaces(sewDto);\n\n // 6. Create Solid from Shell\n const solidDto = new ShapeDto();\n solidDto.shape = sewnShell;\n const solidShape = await solid.fromClosedShell(solidDto);\n\n // 7. Visualization\n const materialOptions = new PBRMetallicRoughnessDto();\n materialOptions.name = 'Custom Material';\n materialOptions.baseColor = '#4dffb2';\n materialOptions.emissiveColor = '#000000';\n materialOptions.metallic = 0.8;\n materialOptions.roughness = 0.3;\n materialOptions.alpha = 1;\n materialOptions.backFaceCulling = false;\n materialOptions.zOffset = 2;\n const material = bitbybit.babylon.material.pbrMetallicRoughness.create(materialOptions);\n\n const drawOptions = new DrawOcctShapeOptions();\n drawOptions.precision = 0.01;\n drawOptions.drawEdges = true;\n drawOptions.edgeColour = '#ffffff';\n drawOptions.edgeWidth = 2;\n drawOptions.faceMaterial = material;\n\n const drawnMesh = await bitbybit.draw.drawAnyAsync({\n entity: solidShape,\n options: drawOptions,\n });\n\n const zoomDto = new ZoomOnDto();\n zoomDto.meshes = [drawnMesh];\n zoomDto.includeChildren = true;\n zoomDto.animationSpeed = 0.8;\n zoomDto.offset = -0.3;\n zoomDto.doNotUpdateMaxZ = true;\n bitbybit.advanced.navigation.zoomOn(zoomDto);\n};\n\nstart();","type":"typescript"}} title="Gem star decoration" /> diff --git a/docs/learn/code/common/occt/modeling/festive-decor/star-ornament.md b/docs/learn/code/common/occt/modeling/festive-decor/star-ornament.md index f16e89c03..095ea7b35 100644 --- a/docs/learn/code/common/occt/modeling/festive-decor/star-ornament.md +++ b/docs/learn/code/common/occt/modeling/festive-decor/star-ornament.md @@ -28,21 +28,21 @@ Our star begins as a simple 2D wire created using the `createStarWire` function. 552000010FALSE0.3TRUE0100.150.001TRUE#0000001Star Material#ffffff#00ffcc0.80.991FALSE2","version":"0.21.0","type":"blockly"}} + script={{"script":"552000010FALSE0.3TRUE0100.150.001TRUE#0000001Star Material#ffffff#00ffcc0.80.991FALSE2","type":"blockly"}} title="Star ornament" /> {\n // Create PBR material with emissive glow\n const materialOptions = new PBRMetallicRoughnessDto();\n materialOptions.name = \"Star Material\";\n materialOptions.baseColor = \"#ffffff\";\n materialOptions.emissiveColor = \"#00ffcc\";\n materialOptions.metallic = 0.8;\n materialOptions.roughness = 0.99;\n materialOptions.alpha = 1;\n materialOptions.backFaceCulling = false;\n materialOptions.zOffset = 2;\n const material = bitbybit.babylon.material.pbrMetallicRoughness.create(materialOptions);\n\n // Create the star wire with 5 points\n const starOptions = new StarDto();\n starOptions.numRays = 5;\n starOptions.outerRadius = 5;\n starOptions.innerRadius = 2;\n starOptions.center = [0, 0, 0];\n starOptions.direction = [0, 1, 0];\n starOptions.half = false;\n const starWire = await wire.createStarWire(starOptions);\n\n // Apply 2D fillet to round the star's corners\n const fillet2dOptions = new FilletDto();\n fillet2dOptions.shape = starWire;\n fillet2dOptions.radius = 0.3;\n const filletedWire = await fillets.fillet2d(fillet2dOptions);\n\n // Create a face from the filleted wire\n const faceOptions = new FaceFromWireDto();\n faceOptions.shape = filletedWire;\n faceOptions.planar = true;\n const starFace = await face.createFaceFromWire(faceOptions);\n\n // Extrude the face to create a 3D solid\n const extrudeOptions = new ExtrudeDto();\n extrudeOptions.shape = starFace;\n extrudeOptions.direction = [0, 1, 0];\n const starSolid = await operations.extrude(extrudeOptions);\n\n // Apply 3D fillet to smooth all edges\n const fillet3dOptions = new FilletDto();\n fillet3dOptions.shape = starSolid;\n fillet3dOptions.radius = 0.15;\n const finalStar = await fillets.filletEdges(fillet3dOptions);\n\n // Draw with custom material and edge styling\n const drawOptions = new Bit.Inputs.Draw.DrawOcctShapeOptions();\n drawOptions.precision = 0.001;\n drawOptions.drawEdges = true;\n drawOptions.edgeColour = \"#000000\";\n drawOptions.edgeWidth = 1;\n drawOptions.faceMaterial = material;\n\n bitbybit.draw.drawAnyAsync({\n entity: finalStar,\n options: drawOptions\n });\n}\n\nstart();","version":"0.21.0","type":"typescript"}} + script={{"script":"const { StarDto, FilletDto, FaceFromWireDto, ExtrudeDto } = Bit.Inputs.OCCT;\nconst { PBRMetallicRoughnessDto } = Bit.Inputs.BabylonMaterial;\n\ntype TopoDSWirePointer = Bit.Inputs.OCCT.TopoDSWirePointer;\ntype TopoDSFacePointer = Bit.Inputs.OCCT.TopoDSFacePointer;\ntype TopoDSSolidPointer = Bit.Inputs.OCCT.TopoDSSolidPointer;\n\nconst { wire, face } = bitbybit.occt.shapes;\nconst { fillets, operations } = bitbybit.occt;\n\nconst start = async () => {\n // Create PBR material with emissive glow\n const materialOptions = new PBRMetallicRoughnessDto();\n materialOptions.name = \"Star Material\";\n materialOptions.baseColor = \"#ffffff\";\n materialOptions.emissiveColor = \"#00ffcc\";\n materialOptions.metallic = 0.8;\n materialOptions.roughness = 0.99;\n materialOptions.alpha = 1;\n materialOptions.backFaceCulling = false;\n materialOptions.zOffset = 2;\n const material = bitbybit.babylon.material.pbrMetallicRoughness.create(materialOptions);\n\n // Create the star wire with 5 points\n const starOptions = new StarDto();\n starOptions.numRays = 5;\n starOptions.outerRadius = 5;\n starOptions.innerRadius = 2;\n starOptions.center = [0, 0, 0];\n starOptions.direction = [0, 1, 0];\n starOptions.half = false;\n const starWire = await wire.createStarWire(starOptions);\n\n // Apply 2D fillet to round the star's corners\n const fillet2dOptions = new FilletDto();\n fillet2dOptions.shape = starWire;\n fillet2dOptions.radius = 0.3;\n const filletedWire = await fillets.fillet2d(fillet2dOptions);\n\n // Create a face from the filleted wire\n const faceOptions = new FaceFromWireDto();\n faceOptions.shape = filletedWire;\n faceOptions.planar = true;\n const starFace = await face.createFaceFromWire(faceOptions);\n\n // Extrude the face to create a 3D solid\n const extrudeOptions = new ExtrudeDto();\n extrudeOptions.shape = starFace;\n extrudeOptions.direction = [0, 1, 0];\n const starSolid = await operations.extrude(extrudeOptions);\n\n // Apply 3D fillet to smooth all edges\n const fillet3dOptions = new FilletDto();\n fillet3dOptions.shape = starSolid;\n fillet3dOptions.radius = 0.15;\n const finalStar = await fillets.filletEdges(fillet3dOptions);\n\n // Draw with custom material and edge styling\n const drawOptions = new Bit.Inputs.Draw.DrawOcctShapeOptions();\n drawOptions.precision = 0.001;\n drawOptions.drawEdges = true;\n drawOptions.edgeColour = \"#000000\";\n drawOptions.edgeWidth = 1;\n drawOptions.faceMaterial = material;\n\n bitbybit.draw.drawAnyAsync({\n entity: finalStar,\n options: drawOptions\n });\n}\n\nstart();","type":"typescript"}} title="Star ornament" /> @@ -75,21 +75,21 @@ The cylinder is positioned at the top of the star (at the outer radius on the Z- outerRadiusouterRadius5.10000105outerRadiusDIVIDEouterRadius3FALSE0.3TRUE010DIVIDEouterRadius2000100.220.150.001Star Material#ffffff#00ffcc0.80.991FALSE2TRUE#0000001","version":"0.21.0","type":"blockly"}} + script={{"script":"outerRadiusouterRadius5.10000105outerRadiusDIVIDEouterRadius3FALSE0.3TRUE010DIVIDEouterRadius2000100.220.150.001Star Material#ffffff#00ffcc0.80.991FALSE2TRUE#0000001","type":"blockly"}} title="Star ornament with hanging hole" /> {\n // Define outer radius as a variable (like the slider in Rete)\n const outerRadius = 5.1;\n const innerRadius = outerRadius / 3;\n\n // Create PBR material with emissive glow\n const materialOptions = new PBRMetallicRoughnessDto();\n materialOptions.name = \"Star Material\";\n materialOptions.baseColor = \"#ffffff\";\n materialOptions.emissiveColor = \"#00ffcc\";\n materialOptions.metallic = 0.8;\n materialOptions.roughness = 0.99;\n materialOptions.alpha = 1;\n materialOptions.backFaceCulling = false;\n materialOptions.zOffset = 2;\n const material = bitbybit.babylon.material.pbrMetallicRoughness.create(materialOptions);\n\n // Create the star wire with 5 points\n const starOptions = new StarDto();\n starOptions.numRays = 5;\n starOptions.outerRadius = outerRadius;\n starOptions.innerRadius = innerRadius;\n starOptions.center = [0, 0, 0];\n starOptions.direction = [0, 1, 0];\n starOptions.half = false;\n const starWire = await wire.createStarWire(starOptions);\n\n // Apply 2D fillet to round the star's corners\n const fillet2dOptions = new FilletDto();\n fillet2dOptions.shape = starWire;\n fillet2dOptions.radius = 0.3;\n const filletedWire = await fillets.fillet2d(fillet2dOptions);\n\n // Create a face from the filleted wire\n const faceOptions = new FaceFromWireDto();\n faceOptions.shape = filletedWire;\n faceOptions.planar = true;\n const starFace = await face.createFaceFromWire(faceOptions);\n\n // Extrude the face to create a 3D solid\n const extrudeOptions = new ExtrudeDto();\n extrudeOptions.shape = starFace;\n extrudeOptions.direction = [0, 1, 0];\n const starSolid = await operations.extrude(extrudeOptions);\n\n // Create cylinder for the hanging hole\n const cylinderOptions = new CylinderDto();\n cylinderOptions.center = [outerRadius / 2, 0, 0]; // Position based on outer radius\n cylinderOptions.direction = [0, 1, 0];\n cylinderOptions.radius = 0.2;\n cylinderOptions.height = 2;\n const holeCylinder = await solid.createCylinder(cylinderOptions);\n\n // Boolean difference to cut the hole (before filleting edges)\n const diffOptions = new DifferenceDto();\n diffOptions.shape = starSolid;\n diffOptions.shapes = [holeCylinder];\n diffOptions.keepEdges = false;\n const starWithHole = await booleans.difference(diffOptions);\n\n // Apply 3D fillet to smooth all edges (after boolean)\n const fillet3dOptions = new FilletDto();\n fillet3dOptions.shape = starWithHole;\n fillet3dOptions.radius = 0.15;\n const finalStar = await fillets.filletEdges(fillet3dOptions);\n\n // Draw with custom material and edge styling\n const drawOptions = new Bit.Inputs.Draw.DrawOcctShapeOptions();\n drawOptions.precision = 0.001;\n drawOptions.drawEdges = true;\n drawOptions.edgeColour = \"#000000\";\n drawOptions.edgeWidth = 1;\n drawOptions.faceMaterial = material;\n\n bitbybit.draw.drawAnyAsync({\n entity: finalStar,\n options: drawOptions\n });\n}\n\nstart();","version":"0.21.0","type":"typescript"}} + script={{"script":"const { StarDto, FilletDto, FaceFromWireDto, ExtrudeDto, CylinderDto, DifferenceDto } = Bit.Inputs.OCCT;\nconst { PBRMetallicRoughnessDto } = Bit.Inputs.BabylonMaterial;\n\ntype TopoDSWirePointer = Bit.Inputs.OCCT.TopoDSWirePointer;\ntype TopoDSFacePointer = Bit.Inputs.OCCT.TopoDSFacePointer;\ntype TopoDSShapePointer = Bit.Inputs.OCCT.TopoDSShapePointer;\n\nconst { wire, face, solid } = bitbybit.occt.shapes;\nconst { fillets, operations, booleans } = bitbybit.occt;\n\nconst start = async () => {\n // Define outer radius as a variable (like the slider in Rete)\n const outerRadius = 5.1;\n const innerRadius = outerRadius / 3;\n\n // Create PBR material with emissive glow\n const materialOptions = new PBRMetallicRoughnessDto();\n materialOptions.name = \"Star Material\";\n materialOptions.baseColor = \"#ffffff\";\n materialOptions.emissiveColor = \"#00ffcc\";\n materialOptions.metallic = 0.8;\n materialOptions.roughness = 0.99;\n materialOptions.alpha = 1;\n materialOptions.backFaceCulling = false;\n materialOptions.zOffset = 2;\n const material = bitbybit.babylon.material.pbrMetallicRoughness.create(materialOptions);\n\n // Create the star wire with 5 points\n const starOptions = new StarDto();\n starOptions.numRays = 5;\n starOptions.outerRadius = outerRadius;\n starOptions.innerRadius = innerRadius;\n starOptions.center = [0, 0, 0];\n starOptions.direction = [0, 1, 0];\n starOptions.half = false;\n const starWire = await wire.createStarWire(starOptions);\n\n // Apply 2D fillet to round the star's corners\n const fillet2dOptions = new FilletDto();\n fillet2dOptions.shape = starWire;\n fillet2dOptions.radius = 0.3;\n const filletedWire = await fillets.fillet2d(fillet2dOptions);\n\n // Create a face from the filleted wire\n const faceOptions = new FaceFromWireDto();\n faceOptions.shape = filletedWire;\n faceOptions.planar = true;\n const starFace = await face.createFaceFromWire(faceOptions);\n\n // Extrude the face to create a 3D solid\n const extrudeOptions = new ExtrudeDto();\n extrudeOptions.shape = starFace;\n extrudeOptions.direction = [0, 1, 0];\n const starSolid = await operations.extrude(extrudeOptions);\n\n // Create cylinder for the hanging hole\n const cylinderOptions = new CylinderDto();\n cylinderOptions.center = [outerRadius / 2, 0, 0]; // Position based on outer radius\n cylinderOptions.direction = [0, 1, 0];\n cylinderOptions.radius = 0.2;\n cylinderOptions.height = 2;\n const holeCylinder = await solid.createCylinder(cylinderOptions);\n\n // Boolean difference to cut the hole (before filleting edges)\n const diffOptions = new DifferenceDto();\n diffOptions.shape = starSolid;\n diffOptions.shapes = [holeCylinder];\n diffOptions.keepEdges = false;\n const starWithHole = await booleans.difference(diffOptions);\n\n // Apply 3D fillet to smooth all edges (after boolean)\n const fillet3dOptions = new FilletDto();\n fillet3dOptions.shape = starWithHole;\n fillet3dOptions.radius = 0.15;\n const finalStar = await fillets.filletEdges(fillet3dOptions);\n\n // Draw with custom material and edge styling\n const drawOptions = new Bit.Inputs.Draw.DrawOcctShapeOptions();\n drawOptions.precision = 0.001;\n drawOptions.drawEdges = true;\n drawOptions.edgeColour = \"#000000\";\n drawOptions.edgeWidth = 1;\n drawOptions.faceMaterial = material;\n\n bitbybit.draw.drawAnyAsync({\n entity: finalStar,\n options: drawOptions\n });\n}\n\nstart();","type":"typescript"}} title="Star ornament with hanging hole" /> @@ -117,21 +117,21 @@ Now that we have our star ornament ready, let's export it as an STL file for 3D outerRadiusfinalStarouterRadius5.1finalStar0000105outerRadiusDIVIDEouterRadius3FALSE0.3TRUE010DIVIDEouterRadius2000100.220.15finalStar0.001Star Material#ffffff#00ffcc0.80.991FALSE2TRUE#0000001finalStarstar.stl0.001FALSETRUE","version":"0.21.0","type":"blockly"}} + script={{"script":"outerRadiusfinalStarouterRadius5.1finalStar0000105outerRadiusDIVIDEouterRadius3FALSE0.3TRUE010DIVIDEouterRadius2000100.220.15finalStar0.001Star Material#ffffff#00ffcc0.80.991FALSE2TRUE#0000001finalStarstar.stl0.001FALSETRUE","type":"blockly"}} title="Star ornament with STL export" /> {\n // Define outer radius as a variable (like the slider in Rete)\n const outerRadius = 5.1;\n const innerRadius = outerRadius / 3;\n\n // Create PBR material with emissive glow\n const materialOptions = new PBRMetallicRoughnessDto();\n materialOptions.name = \"Star Material\";\n materialOptions.baseColor = \"#ffffff\";\n materialOptions.emissiveColor = \"#00ffcc\";\n materialOptions.metallic = 0.8;\n materialOptions.roughness = 0.99;\n materialOptions.alpha = 1;\n materialOptions.backFaceCulling = false;\n materialOptions.zOffset = 2;\n const material = bitbybit.babylon.material.pbrMetallicRoughness.create(materialOptions);\n\n // Create the star wire with 5 points\n const starOptions = new StarDto();\n starOptions.numRays = 5;\n starOptions.outerRadius = outerRadius;\n starOptions.innerRadius = innerRadius;\n starOptions.center = [0, 0, 0];\n starOptions.direction = [0, 1, 0];\n starOptions.half = false;\n const starWire = await wire.createStarWire(starOptions);\n\n // Apply 2D fillet to round the star's corners\n const fillet2dOptions = new FilletDto();\n fillet2dOptions.shape = starWire;\n fillet2dOptions.radius = 0.3;\n const filletedWire = await fillets.fillet2d(fillet2dOptions);\n\n // Create a face from the filleted wire\n const faceOptions = new FaceFromWireDto();\n faceOptions.shape = filletedWire;\n faceOptions.planar = true;\n const starFace = await face.createFaceFromWire(faceOptions);\n\n // Extrude the face to create a 3D solid\n const extrudeOptions = new ExtrudeDto();\n extrudeOptions.shape = starFace;\n extrudeOptions.direction = [0, 1, 0];\n const starSolid = await operations.extrude(extrudeOptions);\n\n // Create cylinder for the hanging hole\n const cylinderOptions = new CylinderDto();\n cylinderOptions.center = [outerRadius / 2, 0, 0]; // Position based on outer radius\n cylinderOptions.direction = [0, 1, 0];\n cylinderOptions.radius = 0.2;\n cylinderOptions.height = 2;\n const holeCylinder = await solid.createCylinder(cylinderOptions);\n\n // Boolean difference to cut the hole (before filleting edges)\n const diffOptions = new DifferenceDto();\n diffOptions.shape = starSolid;\n diffOptions.shapes = [holeCylinder];\n diffOptions.keepEdges = false;\n const starWithHole = await booleans.difference(diffOptions);\n\n // Apply 3D fillet to smooth all edges (after boolean)\n const fillet3dOptions = new FilletDto();\n fillet3dOptions.shape = starWithHole;\n fillet3dOptions.radius = 0.15;\n const finalStar = await fillets.filletEdges(fillet3dOptions);\n\n // Draw with custom material and edge styling\n const drawOptions = new Bit.Inputs.Draw.DrawOcctShapeOptions();\n drawOptions.precision = 0.001;\n drawOptions.drawEdges = true;\n drawOptions.edgeColour = \"#000000\";\n drawOptions.edgeWidth = 1;\n drawOptions.faceMaterial = material;\n\n bitbybit.draw.drawAnyAsync({\n entity: finalStar,\n options: drawOptions\n });\n\n // Export to STL for 3D printing\n const stlOptions = new SaveStlDto();\n stlOptions.shape = finalStar;\n stlOptions.fileName = \"star.stl\";\n stlOptions.precision = 0.001;\n stlOptions.adjustYtoZ = false;\n stlOptions.tryDownload = true;\n stlOptions.binary = true;\n await io.saveShapeStl(stlOptions);\n}\n\nstart();","version":"0.21.0","type":"typescript"}} + script={{"script":"const { StarDto, FilletDto, FaceFromWireDto, ExtrudeDto, CylinderDto, DifferenceDto } = Bit.Inputs.OCCT;\nconst { PBRMetallicRoughnessDto } = Bit.Inputs.BabylonMaterial;\nconst { SaveStlDto } = Bit.Inputs.OCCT;\n\ntype TopoDSWirePointer = Bit.Inputs.OCCT.TopoDSWirePointer;\ntype TopoDSFacePointer = Bit.Inputs.OCCT.TopoDSFacePointer;\ntype TopoDSShapePointer = Bit.Inputs.OCCT.TopoDSShapePointer;\n\nconst { wire, face, solid } = bitbybit.occt.shapes;\nconst { fillets, operations, booleans, io } = bitbybit.occt;\n\nconst start = async () => {\n // Define outer radius as a variable (like the slider in Rete)\n const outerRadius = 5.1;\n const innerRadius = outerRadius / 3;\n\n // Create PBR material with emissive glow\n const materialOptions = new PBRMetallicRoughnessDto();\n materialOptions.name = \"Star Material\";\n materialOptions.baseColor = \"#ffffff\";\n materialOptions.emissiveColor = \"#00ffcc\";\n materialOptions.metallic = 0.8;\n materialOptions.roughness = 0.99;\n materialOptions.alpha = 1;\n materialOptions.backFaceCulling = false;\n materialOptions.zOffset = 2;\n const material = bitbybit.babylon.material.pbrMetallicRoughness.create(materialOptions);\n\n // Create the star wire with 5 points\n const starOptions = new StarDto();\n starOptions.numRays = 5;\n starOptions.outerRadius = outerRadius;\n starOptions.innerRadius = innerRadius;\n starOptions.center = [0, 0, 0];\n starOptions.direction = [0, 1, 0];\n starOptions.half = false;\n const starWire = await wire.createStarWire(starOptions);\n\n // Apply 2D fillet to round the star's corners\n const fillet2dOptions = new FilletDto();\n fillet2dOptions.shape = starWire;\n fillet2dOptions.radius = 0.3;\n const filletedWire = await fillets.fillet2d(fillet2dOptions);\n\n // Create a face from the filleted wire\n const faceOptions = new FaceFromWireDto();\n faceOptions.shape = filletedWire;\n faceOptions.planar = true;\n const starFace = await face.createFaceFromWire(faceOptions);\n\n // Extrude the face to create a 3D solid\n const extrudeOptions = new ExtrudeDto();\n extrudeOptions.shape = starFace;\n extrudeOptions.direction = [0, 1, 0];\n const starSolid = await operations.extrude(extrudeOptions);\n\n // Create cylinder for the hanging hole\n const cylinderOptions = new CylinderDto();\n cylinderOptions.center = [outerRadius / 2, 0, 0]; // Position based on outer radius\n cylinderOptions.direction = [0, 1, 0];\n cylinderOptions.radius = 0.2;\n cylinderOptions.height = 2;\n const holeCylinder = await solid.createCylinder(cylinderOptions);\n\n // Boolean difference to cut the hole (before filleting edges)\n const diffOptions = new DifferenceDto();\n diffOptions.shape = starSolid;\n diffOptions.shapes = [holeCylinder];\n diffOptions.keepEdges = false;\n const starWithHole = await booleans.difference(diffOptions);\n\n // Apply 3D fillet to smooth all edges (after boolean)\n const fillet3dOptions = new FilletDto();\n fillet3dOptions.shape = starWithHole;\n fillet3dOptions.radius = 0.15;\n const finalStar = await fillets.filletEdges(fillet3dOptions);\n\n // Draw with custom material and edge styling\n const drawOptions = new Bit.Inputs.Draw.DrawOcctShapeOptions();\n drawOptions.precision = 0.001;\n drawOptions.drawEdges = true;\n drawOptions.edgeColour = \"#000000\";\n drawOptions.edgeWidth = 1;\n drawOptions.faceMaterial = material;\n\n bitbybit.draw.drawAnyAsync({\n entity: finalStar,\n options: drawOptions\n });\n\n // Export to STL for 3D printing\n const stlOptions = new SaveStlDto();\n stlOptions.shape = finalStar;\n stlOptions.fileName = \"star.stl\";\n stlOptions.precision = 0.001;\n stlOptions.adjustYtoZ = false;\n stlOptions.tryDownload = true;\n stlOptions.binary = true;\n await io.saveShapeStl(stlOptions);\n}\n\nstart();","type":"typescript"}} title="Star ornament with STL export" /> diff --git a/docs/learn/code/common/occt/modeling/festive-decor/tree-decoration.md b/docs/learn/code/common/occt/modeling/festive-decor/tree-decoration.md index 63d178a04..5b5edec0f 100644 --- a/docs/learn/code/common/occt/modeling/festive-decor/tree-decoration.md +++ b/docs/learn/code/common/occt/modeling/festive-decor/tree-decoration.md @@ -81,7 +81,7 @@ All controls use observable listeners to trigger geometry regeneration when valu {\\n // ADD YOUR CODE HERE\\n if (inputs === true) {\\n window.open(\\\"https://bitbybit.dev/app/bitbybit/KtIymkYFZ8Qty9h8mhew/Y7NQIgaXLy0dqffnc825?editor=rete\\\", '_blank').focus();\\n }\\n return inputs;\\n}\"}},\"inputs\":{\"inputs\":{\"connections\":[{\"node\":\"fbe1705ff510913a\",\"output\":\"isA\",\"data\":{}}]},\"exec\":{\"connections\":[{\"node\":\"fbe1705ff510913a\",\"output\":\"execA\",\"data\":{}},{\"node\":\"fbe1705ff510913a\",\"output\":\"execB\",\"data\":{}}]}},\"position\":[1749.7763306366996,10636.786904135595]},\"af7350efdb0b85b3\":{\"id\":\"af7350efdb0b85b3\",\"name\":\"bitbybit.babylon.gui.control.createControlObservableSelector\",\"customName\":\"control observable selector\",\"async\":false,\"drawable\":false,\"data\":{\"genericNodeData\":{\"hide\":false,\"oneOnOne\":false,\"flatten\":0,\"forceExecution\":false},\"selector\":\"onPointerUpObservable\"},\"inputs\":{},\"position\":[686.4715121547069,8508.681235887017]},\"f2e18ffd18566787\":{\"id\":\"f2e18ffd18566787\",\"name\":\"bitbybit.flow.babylon.observableListener\",\"customName\":\"babylon observable listener\",\"data\":{},\"inputs\":{\"object\":{\"connections\":[{\"node\":\"22b0aaced3db29ad\",\"output\":\"result\",\"data\":{}}]},\"observableSelector\":{\"connections\":[{\"node\":\"af7350efdb0b85b3\",\"output\":\"result\",\"data\":{}}]}},\"position\":[1453.070365919411,8258.538315404885]},\"70259fc69f3db105\":{\"id\":\"70259fc69f3db105\",\"name\":\"bitbybit.flow.time.delay\",\"customName\":\"delay\",\"data\":{\"timeout\":0},\"inputs\":{\"exec\":{\"connections\":[{\"node\":\"f2e18ffd18566787\",\"output\":\"exec\",\"data\":{}}]}},\"position\":[1987.6045976314351,8437.042718662588]},\"291c95f88aae5725\":{\"id\":\"291c95f88aae5725\",\"name\":\"bitbybit.flow.logic.flipFlop\",\"customName\":\"flip flop\",\"data\":{},\"inputs\":{\"exec\":{\"connections\":[{\"node\":\"70259fc69f3db105\",\"output\":\"exec\",\"data\":{}},{\"node\":\"f2e18ffd18566787\",\"output\":\"exec\",\"data\":{}}]}},\"position\":[2323.4070267726706,8288.053843144928]},\"ac5f02670de06852\":{\"id\":\"ac5f02670de06852\",\"name\":\"bitbybit.code.typeScriptEditor\",\"customName\":\"typescript editor\",\"async\":true,\"drawable\":true,\"data\":{\"genericNodeData\":{\"hide\":false,\"oneOnOne\":false,\"flatten\":0,\"forceExecution\":true},\"code\":{\"code\":\"// DO NOT REMOVE THIS FUNCTION\\nconst startac5f02670de06852 = async (inputs: any, index: number) => {\\n // ADD YOUR CODE HERE\\n if (inputs === true) {\\n window.open(\\\"https://bitbybit.dev/auth/sign-up\\\", '_blank').focus();\\n }\\n return inputs;\\n}\"}},\"inputs\":{\"inputs\":{\"connections\":[{\"node\":\"291c95f88aae5725\",\"output\":\"isA\",\"data\":{}}]},\"exec\":{\"connections\":[{\"node\":\"291c95f88aae5725\",\"output\":\"execA\",\"data\":{}},{\"node\":\"291c95f88aae5725\",\"output\":\"execB\",\"data\":{}}]}},\"position\":[2681.990286952205,8287.587249893892]},\"b5af9279ffdd84e5\":{\"id\":\"b5af9279ffdd84e5\",\"name\":\"bitbybit.babylon.scene.enableSkybox\",\"customName\":\"enable skybox\",\"async\":false,\"drawable\":false,\"data\":{\"genericNodeData\":{\"hide\":false,\"oneOnOne\":false,\"flatten\":0,\"forceExecution\":false},\"skybox\":\"city\",\"size\":1000,\"blur\":0.5,\"environmentIntensity\":0.7,\"hideSkybox\":false},\"inputs\":{},\"position\":[2884.1306675480555,-186.0490873535386]},\"9dca219fedacecca\":{\"id\":\"9dca219fedacecca\",\"name\":\"bitbybit.flow.babylon.observableListener\",\"customName\":\"babylon observable listener\",\"data\":{},\"inputs\":{\"observableSelector\":{\"connections\":[{\"node\":\"f1f8cf3eadfa0ebb\",\"output\":\"result\",\"data\":{}}]},\"object\":{\"connections\":[{\"node\":\"71fbc1ccee37d577\",\"output\":\"result\",\"data\":{}}]}},\"position\":[385.9268891419183,10329.874563653837]},\"bb201b1ec9f17a1e\":{\"id\":\"bb201b1ec9f17a1e\",\"name\":\"bitbybit.flow.babylon.observableListener\",\"customName\":\"babylon observable listener\",\"data\":{},\"inputs\":{\"observableSelector\":{\"connections\":[{\"node\":\"f1f8cf3eadfa0ebb\",\"output\":\"result\",\"data\":{}}]},\"object\":{\"connections\":[{\"node\":\"fc36f702c3f8146e\",\"output\":\"result\",\"data\":{}}]}},\"position\":[394.16500271911553,10076.96114156523]},\"4a5d1c196a0b447e\":{\"id\":\"4a5d1c196a0b447e\",\"name\":\"bitbybit.flow.time.delay\",\"customName\":\"delay\",\"data\":{\"timeout\":0},\"inputs\":{\"exec\":{\"connections\":[{\"node\":\"9dca219fedacecca\",\"output\":\"exec\",\"data\":{}}]}},\"position\":[936.4095297912264,10457.862715124222]},\"4fd171db189ad173\":{\"id\":\"4fd171db189ad173\",\"name\":\"bitbybit.flow.logic.flipFlop\",\"customName\":\"flip flop\",\"data\":{},\"inputs\":{\"exec\":{\"connections\":[{\"node\":\"9dca219fedacecca\",\"output\":\"exec\",\"data\":{}},{\"node\":\"4a5d1c196a0b447e\",\"output\":\"exec\",\"data\":{}}]}},\"position\":[1273.654131279585,10355.281487174021]},\"94b6dd1354940df2\":{\"id\":\"94b6dd1354940df2\",\"name\":\"bitbybit.flow.time.delay\",\"customName\":\"delay\",\"data\":{\"timeout\":0},\"inputs\":{\"exec\":{\"connections\":[{\"node\":\"bb201b1ec9f17a1e\",\"output\":\"exec\",\"data\":{}}]}},\"position\":[926.4956949832613,10212.522265939324]},\"27eac850201a9701\":{\"id\":\"27eac850201a9701\",\"name\":\"bitbybit.flow.logic.flipFlop\",\"customName\":\"flip flop\",\"data\":{},\"inputs\":{\"exec\":{\"connections\":[{\"node\":\"bb201b1ec9f17a1e\",\"output\":\"exec\",\"data\":{}},{\"node\":\"94b6dd1354940df2\",\"output\":\"exec\",\"data\":{}}]}},\"position\":[1272.0778730255988,10103.055278248028]},\"9190095ec9cfd394\":{\"id\":\"9190095ec9cfd394\",\"name\":\"bitbybit.logic.valueGate\",\"customName\":\"value gate\",\"async\":false,\"drawable\":false,\"data\":{\"genericNodeData\":{\"hide\":false,\"oneOnOne\":false,\"flatten\":0,\"forceExecution\":false},\"boolean\":false},\"inputs\":{\"value\":{\"connections\":[{\"node\":\"73ee3cd6670755bb\",\"output\":\"result\",\"data\":{}}]},\"boolean\":{\"connections\":[{\"node\":\"27eac850201a9701\",\"output\":\"isA\",\"data\":{}}]},\"exec\":{\"connections\":[{\"node\":\"27eac850201a9701\",\"output\":\"execA\",\"data\":{}},{\"node\":\"27eac850201a9701\",\"output\":\"execB\",\"data\":{}}]}},\"position\":[2098.7596218076405,9630.876889007699]},\"73ee3cd6670755bb\":{\"id\":\"73ee3cd6670755bb\",\"name\":\"bitbybit.text.create\",\"customName\":\"create\",\"async\":false,\"drawable\":false,\"data\":{\"genericNodeData\":{\"hide\":false,\"oneOnOne\":false,\"flatten\":0,\"forceExecution\":false},\"text\":\"bitbybit-toy.step\"},\"inputs\":{},\"position\":[1701.8222304032442,9540.575618331815]},\"f9a87606405961ae\":{\"id\":\"f9a87606405961ae\",\"name\":\"bitbybit.text.create\",\"customName\":\"create\",\"async\":false,\"drawable\":false,\"data\":{\"genericNodeData\":{\"hide\":false,\"oneOnOne\":false,\"flatten\":0,\"forceExecution\":false},\"text\":\"bitbybit-toy.stl\"},\"inputs\":{},\"position\":[1934.0481177357838,10057.705993169464]},\"f8db44954a566616\":{\"id\":\"f8db44954a566616\",\"name\":\"bitbybit.logic.valueGate\",\"customName\":\"value gate\",\"async\":false,\"drawable\":false,\"data\":{\"genericNodeData\":{\"hide\":false,\"oneOnOne\":false,\"flatten\":0,\"forceExecution\":false},\"boolean\":false},\"inputs\":{\"value\":{\"connections\":[{\"node\":\"f9a87606405961ae\",\"output\":\"result\",\"data\":{}}]},\"boolean\":{\"connections\":[{\"node\":\"4fd171db189ad173\",\"output\":\"isA\",\"data\":{}}]},\"exec\":{\"connections\":[{\"node\":\"4fd171db189ad173\",\"output\":\"execA\",\"data\":{}},{\"node\":\"4fd171db189ad173\",\"output\":\"execB\",\"data\":{}}]}},\"position\":[2360.5651787274305,10179.991268481712]},\"7ae3f1f373ab7ce8\":{\"id\":\"7ae3f1f373ab7ce8\",\"name\":\"bitbybit.occt.io.saveShapeSTEPAndReturn\",\"customName\":\"save shape step and return\",\"async\":true,\"drawable\":false,\"data\":{\"genericNodeData\":{\"hide\":false,\"oneOnOne\":false,\"flatten\":0,\"forceExecution\":false},\"fileName\":\"\",\"adjustYtoZ\":true,\"fromRightHanded\":false,\"tryDownload\":true},\"inputs\":{\"shape\":{\"connections\":[{\"node\":\"ff3a5dfe26c1203f\",\"output\":\"result\",\"data\":{}}]},\"fileName\":{\"connections\":[{\"node\":\"9190095ec9cfd394\",\"output\":\"result\",\"data\":{}}]},\"exec\":{\"connections\":[{\"node\":\"9190095ec9cfd394\",\"output\":\"exec\",\"data\":{}}]}},\"position\":[4105.580503617983,9860.933809645778]},\"b358af77da1782cf\":{\"id\":\"b358af77da1782cf\",\"name\":\"bitbybit.occt.io.saveShapeStl\",\"customName\":\"save shape stl\",\"async\":true,\"drawable\":false,\"data\":{\"genericNodeData\":{\"hide\":false,\"oneOnOne\":false,\"flatten\":0,\"forceExecution\":false},\"fileName\":\"shape.stl\",\"precision\":0.01,\"adjustYtoZ\":true,\"tryDownload\":true,\"binary\":true},\"inputs\":{\"fileName\":{\"connections\":[{\"node\":\"f8db44954a566616\",\"output\":\"result\",\"data\":{}}]},\"exec\":{\"connections\":[{\"node\":\"f8db44954a566616\",\"output\":\"exec\",\"data\":{}}]},\"shape\":{\"connections\":[{\"node\":\"ff3a5dfe26c1203f\",\"output\":\"result\",\"data\":{}}]}},\"position\":[4097.343815578738,10313.986149668373]},\"feef4ec0e40282e7\":{\"id\":\"feef4ec0e40282e7\",\"name\":\"bitbybit.math.number\",\"customName\":\"number\",\"async\":false,\"drawable\":false,\"data\":{\"genericNodeData\":{\"hide\":false,\"oneOnOne\":false,\"flatten\":0,\"forceExecution\":false},\"number\":0.5},\"inputs\":{},\"position\":[2389.4392361815517,2241.565476619029]},\"03303a3d3cb2a6b5\":{\"id\":\"03303a3d3cb2a6b5\",\"name\":\"bitbybit.json.parse\",\"customName\":\"parse\",\"async\":false,\"drawable\":false,\"data\":{\"genericNodeData\":{\"hide\":false,\"oneOnOne\":false,\"flatten\":0,\"forceExecution\":false},\"text\":\"[true,false,true,true]\"},\"inputs\":{},\"position\":[2389.302212365796,2597.6283579746796]},\"f39c312f7e1e1bef\":{\"id\":\"f39c312f7e1e1bef\",\"name\":\"bitbybit.flow.babylon.observableListener\",\"customName\":\"babylon observable listener\",\"data\":{},\"inputs\":{\"observableSelector\":{\"connections\":[{\"node\":\"19dd5abb3a2ed30a\",\"output\":\"result\",\"data\":{}}]},\"object\":{\"connections\":[{\"node\":\"dda72ba4bc855075\",\"output\":\"result\",\"data\":{}}]}},\"position\":[634.3045048773648,6411.35023828563]},\"19dd5abb3a2ed30a\":{\"id\":\"19dd5abb3a2ed30a\",\"name\":\"bitbybit.babylon.gui.slider.createSliderObservableSelector\",\"customName\":\"slider observable selector\",\"async\":false,\"drawable\":false,\"data\":{\"genericNodeData\":{\"hide\":false,\"oneOnOne\":false,\"flatten\":0,\"forceExecution\":false},\"selector\":\"onValueChangedObservable\"},\"inputs\":{},\"position\":[119.33402358269528,6252.634270289916]},\"3f3e9efb919889cb\":{\"id\":\"3f3e9efb919889cb\",\"name\":\"bitbybit.flow.babylon.observableListener\",\"customName\":\"babylon observable listener\",\"data\":{},\"inputs\":{\"observableSelector\":{\"connections\":[{\"node\":\"19dd5abb3a2ed30a\",\"output\":\"result\",\"data\":{}}]},\"object\":{\"connections\":[{\"node\":\"eb164cb9f2c3d0b2\",\"output\":\"result\",\"data\":{}}]}},\"position\":[626.2393558517689,6035.026931379336]},\"b85e303f418ea094\":{\"id\":\"b85e303f418ea094\",\"name\":\"bitbybit.flow.babylon.getEventDataFromObservedResult\",\"customName\":\"get event data\",\"async\":false,\"drawable\":false,\"data\":{\"genericNodeData\":{\"hide\":false,\"oneOnOne\":false,\"flatten\":0,\"forceExecution\":false}},\"inputs\":{\"json\":{\"connections\":[{\"node\":\"3f3e9efb919889cb\",\"output\":\"result\",\"data\":{}}]},\"exec\":{\"connections\":[{\"node\":\"3f3e9efb919889cb\",\"output\":\"exec\",\"data\":{}}]}},\"position\":[1213.8284182083087,6031.8004190176025]},\"0ae184887b347212\":{\"id\":\"0ae184887b347212\",\"name\":\"bitbybit.flow.babylon.getEventDataFromObservedResult\",\"customName\":\"get event data\",\"async\":false,\"drawable\":false,\"data\":{\"genericNodeData\":{\"hide\":false,\"oneOnOne\":false,\"flatten\":0,\"forceExecution\":false}},\"inputs\":{\"exec\":{\"connections\":[{\"node\":\"f39c312f7e1e1bef\",\"output\":\"exec\",\"data\":{}}]},\"json\":{\"connections\":[{\"node\":\"f39c312f7e1e1bef\",\"output\":\"result\",\"data\":{}}]}},\"position\":[1212.113699374194,6401.279001431719]},\"ffecd6164df0c288\":{\"id\":\"ffecd6164df0c288\",\"name\":\"bitbybit.logic.firstDefinedValueGate\",\"customName\":\"first defined value gate\",\"async\":false,\"drawable\":false,\"data\":{\"genericNodeData\":{\"hide\":false,\"oneOnOne\":false,\"flatten\":0,\"forceExecution\":false}},\"inputs\":{\"value1\":{\"connections\":[{\"node\":\"b85e303f418ea094\",\"output\":\"result\",\"data\":{}}]},\"value2\":{\"connections\":[{\"node\":\"6e51a85f13ab5259\",\"output\":\"result\",\"data\":{}}]},\"exec\":{\"connections\":[{\"node\":\"b85e303f418ea094\",\"output\":\"exec\",\"data\":{}}]}},\"position\":[1795.1547936226411,6012.662361553964]},\"d90e74b18631a7e7\":{\"id\":\"d90e74b18631a7e7\",\"name\":\"bitbybit.logic.firstDefinedValueGate\",\"customName\":\"first defined value gate\",\"async\":false,\"drawable\":false,\"data\":{\"genericNodeData\":{\"hide\":false,\"oneOnOne\":false,\"flatten\":0,\"forceExecution\":false}},\"inputs\":{\"exec\":{\"connections\":[{\"node\":\"0ae184887b347212\",\"output\":\"exec\",\"data\":{}}]},\"value2\":{\"connections\":[{\"node\":\"dc27ec58598933e4\",\"output\":\"result\",\"data\":{}}]},\"value1\":{\"connections\":[{\"node\":\"0ae184887b347212\",\"output\":\"result\",\"data\":{}}]}},\"position\":[1827.0393870782336,6490.834733956343]},\"9ed742a672a607ce\":{\"id\":\"9ed742a672a607ce\",\"name\":\"bitbybit.lists.createList\",\"customName\":\"create list\",\"data\":{},\"inputs\":{\"listElements\":{\"connections\":[{\"node\":\"ffecd6164df0c288\",\"output\":\"result\",\"data\":{}}]},\"exec\":{\"connections\":[{\"node\":\"ffecd6164df0c288\",\"output\":\"exec\",\"data\":{}}]}},\"position\":[2408.212815313349,6050.3207511429555]},\"48046af83dbc9299\":{\"id\":\"48046af83dbc9299\",\"name\":\"bitbybit.lists.createList\",\"customName\":\"create list\",\"data\":{},\"inputs\":{\"listElements\":{\"connections\":[{\"node\":\"d90e74b18631a7e7\",\"output\":\"result\",\"data\":{}}]},\"exec\":{\"connections\":[{\"node\":\"d90e74b18631a7e7\",\"output\":\"exec\",\"data\":{}}]}},\"position\":[2407.3069815807094,6523.841211518347]},\"46f99a9e9cfc9152\":{\"id\":\"46f99a9e9cfc9152\",\"name\":\"bitbybit.text.format\",\"customName\":\"format\",\"async\":false,\"drawable\":false,\"data\":{\"genericNodeData\":{\"hide\":false,\"oneOnOne\":false,\"flatten\":0,\"forceExecution\":false},\"text\":\"Number Of Rays - {0}\",\"values\":[\"World\"]},\"inputs\":{\"values\":{\"connections\":[{\"node\":\"9ed742a672a607ce\",\"output\":\"list\",\"data\":{}}]},\"exec\":{\"connections\":[{\"node\":\"9ed742a672a607ce\",\"output\":\"exec\",\"data\":{}}]}},\"position\":[2774.3846965928947,5974.2361780617475]},\"ced830dd20fb5b02\":{\"id\":\"ced830dd20fb5b02\",\"name\":\"bitbybit.text.format\",\"customName\":\"format\",\"async\":false,\"drawable\":false,\"data\":{\"genericNodeData\":{\"hide\":false,\"oneOnOne\":false,\"flatten\":0,\"forceExecution\":false},\"text\":\"Vertical Divsions - {0}\",\"values\":[\"World\"]},\"inputs\":{\"exec\":{\"connections\":[{\"node\":\"48046af83dbc9299\",\"output\":\"exec\",\"data\":{}}]},\"values\":{\"connections\":[{\"node\":\"48046af83dbc9299\",\"output\":\"list\",\"data\":{}}]}},\"position\":[2794.9763891153702,6450.397669292677]},\"af2cb4893a5bc1cb\":{\"id\":\"af2cb4893a5bc1cb\",\"name\":\"bitbybit.babylon.gui.textBlock.setText\",\"customName\":\"set text\",\"async\":false,\"drawable\":false,\"data\":{\"genericNodeData\":{\"hide\":false,\"oneOnOne\":false,\"flatten\":0,\"forceExecution\":false},\"text\":\"\"},\"inputs\":{\"text\":{\"connections\":[{\"node\":\"46f99a9e9cfc9152\",\"output\":\"result\",\"data\":{}}]},\"exec\":{\"connections\":[{\"node\":\"46f99a9e9cfc9152\",\"output\":\"exec\",\"data\":{}}]},\"textBlock\":{\"connections\":[{\"node\":\"f80263a3d6977ea4\",\"output\":\"result\",\"data\":{}}]}},\"position\":[3408.9286383465733,6175.853417797766]},\"bb5fa4b16d910cb5\":{\"id\":\"bb5fa4b16d910cb5\",\"name\":\"bitbybit.babylon.gui.textBlock.setText\",\"customName\":\"set text\",\"async\":false,\"drawable\":false,\"data\":{\"genericNodeData\":{\"hide\":false,\"oneOnOne\":false,\"flatten\":0,\"forceExecution\":false},\"text\":\"\"},\"inputs\":{\"textBlock\":{\"connections\":[{\"node\":\"a3006cf7f5041ef6\",\"output\":\"result\",\"data\":{}}]},\"text\":{\"connections\":[{\"node\":\"ced830dd20fb5b02\",\"output\":\"result\",\"data\":{}}]},\"exec\":{\"connections\":[{\"node\":\"ced830dd20fb5b02\",\"output\":\"exec\",\"data\":{}}]}},\"position\":[3443.5303027369487,6538.552534619226]},\"8ecfa2d91d973882\":{\"id\":\"8ecfa2d91d973882\",\"name\":\"bitbybit.babylon.gui.control.createControlObservableSelector\",\"customName\":\"control observable selector\",\"async\":false,\"drawable\":false,\"data\":{\"genericNodeData\":{\"hide\":false,\"oneOnOne\":false,\"flatten\":0,\"forceExecution\":false},\"selector\":\"onPointerUpObservable\"},\"inputs\":{},\"position\":[112.53197228874697,7216.911800887681]},\"8478c18af95701d2\":{\"id\":\"8478c18af95701d2\",\"name\":\"bitbybit.flow.babylon.observableListener\",\"customName\":\"babylon observable listener\",\"data\":{},\"inputs\":{\"observableSelector\":{\"connections\":[{\"node\":\"8ecfa2d91d973882\",\"output\":\"result\",\"data\":{}}]},\"object\":{\"connections\":[{\"node\":\"dda72ba4bc855075\",\"output\":\"result\",\"data\":{}}]}},\"position\":[666.0061734678349,7042.204203322666]},\"fa5a486b0621317a\":{\"id\":\"fa5a486b0621317a\",\"name\":\"bitbybit.flow.babylon.observableListener\",\"customName\":\"babylon observable listener\",\"data\":{},\"inputs\":{\"observableSelector\":{\"connections\":[{\"node\":\"8ecfa2d91d973882\",\"output\":\"result\",\"data\":{}}]},\"object\":{\"connections\":[{\"node\":\"eb164cb9f2c3d0b2\",\"output\":\"result\",\"data\":{}}]}},\"position\":[667.4427756519425,6826.609623951564]},\"7299a501c8e860c5\":{\"id\":\"7299a501c8e860c5\",\"name\":\"bitbybit.lists.passThrough\",\"customName\":\"pass through\",\"data\":{},\"inputs\":{\"exec\":{\"connections\":[{\"node\":\"fa5a486b0621317a\",\"output\":\"exec\",\"data\":{}},{\"node\":\"8478c18af95701d2\",\"output\":\"exec\",\"data\":{}}]}},\"position\":[6778.4019145441225,6945.999036012015]},\"68fc3da5a920f715\":{\"id\":\"68fc3da5a920f715\",\"name\":\"bitbybit.babylon.scene.adjustActiveArcRotateCamera\",\"customName\":\"adjust active arc rotate camera\",\"async\":false,\"drawable\":false,\"data\":{\"genericNodeData\":{\"hide\":false,\"oneOnOne\":false,\"flatten\":0,\"forceExecution\":false},\"position\":[10,10,10],\"lookAt\":[0,0,0],\"lowerBetaLimit\":1,\"upperBetaLimit\":179,\"angularSensibilityX\":1000,\"angularSensibilityY\":1000,\"maxZ\":1000,\"panningSensibility\":1000,\"wheelPrecision\":3},\"inputs\":{\"position\":{\"connections\":[{\"node\":\"2c23a73974610198\",\"output\":\"result\",\"data\":{}}]},\"lookAt\":{\"connections\":[{\"node\":\"4b908f56b3ed505c\",\"output\":\"result\",\"data\":{}}]}},\"position\":[2457.6836534900826,-2687.8751308577216]},\"2c23a73974610198\":{\"id\":\"2c23a73974610198\",\"name\":\"bitbybit.vector.vectorXYZ\",\"customName\":\"vector xyz\",\"async\":false,\"drawable\":true,\"data\":{\"genericNodeData\":{\"hide\":true,\"oneOnOne\":false,\"flatten\":0,\"forceExecution\":false},\"x\":30,\"y\":25,\"z\":0},\"inputs\":{},\"position\":[2028.1960653764377,-2763.197379436671]},\"4b908f56b3ed505c\":{\"id\":\"4b908f56b3ed505c\",\"name\":\"bitbybit.vector.vectorXYZ\",\"customName\":\"vector xyz\",\"async\":false,\"drawable\":true,\"data\":{\"genericNodeData\":{\"hide\":true,\"oneOnOne\":false,\"flatten\":0,\"forceExecution\":false},\"x\":0,\"y\":4,\"z\":0},\"inputs\":{},\"position\":[2033.62438677469,-2317.355175655833]}}}","version":"0.21.0","type":"rete"}} + script={{"script":"{\"id\":\"rete-v2-json\",\"nodes\":{\"4534540d6856552d\":{\"id\":\"4534540d6856552d\",\"name\":\"bitbybit.occt.shapes.wire.createStarWire\",\"customName\":\"star wire\",\"async\":true,\"drawable\":true,\"data\":{\"genericNodeData\":{\"hide\":true,\"oneOnOne\":false,\"flatten\":0,\"forceExecution\":false},\"center\":[0,0,0],\"direction\":[0,1,0],\"numRays\":12,\"outerRadius\":20,\"innerRadius\":12,\"offsetOuterEdges\":0,\"half\":false},\"inputs\":{\"numRays\":{\"connections\":[{\"node\":\"ffecd6164df0c288\",\"output\":\"result\",\"data\":{}}]}},\"position\":[29.498322548778063,508.0780203076317]},\"b983a207fda22099\":{\"id\":\"b983a207fda22099\",\"name\":\"bitbybit.occt.transforms.translate\",\"customName\":\"translate\",\"async\":true,\"drawable\":true,\"data\":{\"genericNodeData\":{\"hide\":true,\"oneOnOne\":false,\"flatten\":0,\"forceExecution\":false},\"translation\":[0,0,0]},\"inputs\":{\"translation\":{\"connections\":[{\"node\":\"76bf07ac6376dd9d\",\"output\":\"result\",\"data\":{}}]},\"shape\":{\"connections\":[{\"node\":\"892079e9447f3eae\",\"output\":\"result\",\"data\":{}}]}},\"position\":[1421.0202335352003,1035.739426279123]},\"76bf07ac6376dd9d\":{\"id\":\"76bf07ac6376dd9d\",\"name\":\"bitbybit.vector.vectorXYZ\",\"customName\":\"vector xyz\",\"async\":false,\"drawable\":true,\"data\":{\"genericNodeData\":{\"hide\":true,\"oneOnOne\":false,\"flatten\":0,\"forceExecution\":false},\"x\":0,\"y\":20,\"z\":0},\"inputs\":{},\"position\":[4.113044262054515,1088.1382664289113]},\"892079e9447f3eae\":{\"id\":\"892079e9447f3eae\",\"name\":\"bitbybit.occt.transforms.scale\",\"customName\":\"scale\",\"async\":true,\"drawable\":true,\"data\":{\"genericNodeData\":{\"hide\":true,\"oneOnOne\":false,\"flatten\":0,\"forceExecution\":false},\"factor\":0.15},\"inputs\":{\"shape\":{\"connections\":[{\"node\":\"4534540d6856552d\",\"output\":\"result\",\"data\":{}}]}},\"position\":[1039.174244697755,869.9580356533191]},\"11549f1b45ea9b19\":{\"id\":\"11549f1b45ea9b19\",\"name\":\"bitbybit.occt.transforms.translate\",\"customName\":\"translate\",\"async\":true,\"drawable\":true,\"data\":{\"genericNodeData\":{\"hide\":true,\"oneOnOne\":false,\"flatten\":0,\"forceExecution\":false},\"translation\":[0,0,0]},\"inputs\":{\"translation\":{\"connections\":[{\"node\":\"ed8b1944898e2ce1\",\"output\":\"result\",\"data\":{}}]},\"shape\":{\"connections\":[{\"node\":\"cb6929579b17268b\",\"output\":\"result\",\"data\":{}}]}},\"position\":[843.9071289289463,1724.0141995434674]},\"ed8b1944898e2ce1\":{\"id\":\"ed8b1944898e2ce1\",\"name\":\"bitbybit.vector.vectorXYZ\",\"customName\":\"vector xyz\",\"async\":false,\"drawable\":true,\"data\":{\"genericNodeData\":{\"hide\":true,\"oneOnOne\":false,\"flatten\":0,\"forceExecution\":false},\"x\":0,\"y\":-5,\"z\":0},\"inputs\":{},\"position\":[407.2814628248683,1768.0222128529601]},\"c7bdc15abbc2ba7d\":{\"id\":\"c7bdc15abbc2ba7d\",\"name\":\"bitbybit.occt.operations.loft\",\"customName\":\"loft\",\"async\":true,\"drawable\":true,\"data\":{\"genericNodeData\":{\"hide\":true,\"oneOnOne\":false,\"flatten\":0,\"forceExecution\":false},\"makeSolid\":false},\"inputs\":{\"shapes\":{\"connections\":[{\"node\":\"875673f0ab1bb510\",\"output\":\"list\",\"data\":{}}]}},\"position\":[2071.471395598051,848.4908460058068]},\"875673f0ab1bb510\":{\"id\":\"875673f0ab1bb510\",\"name\":\"bitbybit.lists.createList\",\"customName\":\"create list\",\"data\":{},\"inputs\":{\"listElements\":{\"connections\":[{\"node\":\"47f69e3aabe06071\",\"output\":\"result\",\"data\":{}},{\"node\":\"b983a207fda22099\",\"output\":\"result\",\"data\":{}},{\"node\":\"4534540d6856552d\",\"output\":\"result\",\"data\":{}}]}},\"position\":[1782.785359527408,889.106870548469]},\"47f69e3aabe06071\":{\"id\":\"47f69e3aabe06071\",\"name\":\"bitbybit.occt.transforms.translate\",\"customName\":\"translate\",\"async\":true,\"drawable\":true,\"data\":{\"genericNodeData\":{\"hide\":true,\"oneOnOne\":false,\"flatten\":0,\"forceExecution\":false},\"translation\":[0,0,0]},\"inputs\":{\"translation\":{\"connections\":[{\"node\":\"a15b2d55874ba400\",\"output\":\"result\",\"data\":{}}]},\"shape\":{\"connections\":[{\"node\":\"f360184ff5aba2df\",\"output\":\"result\",\"data\":{}}]}},\"position\":[1245.2288399130869,247.04605010960086]},\"f360184ff5aba2df\":{\"id\":\"f360184ff5aba2df\",\"name\":\"bitbybit.occt.transforms.scale\",\"customName\":\"scale\",\"async\":true,\"drawable\":true,\"data\":{\"genericNodeData\":{\"hide\":true,\"oneOnOne\":false,\"flatten\":0,\"forceExecution\":false},\"factor\":0.25},\"inputs\":{\"shape\":{\"connections\":[{\"node\":\"4534540d6856552d\",\"output\":\"result\",\"data\":{}}]}},\"position\":[793.2018829015179,318.06376415603927]},\"a15b2d55874ba400\":{\"id\":\"a15b2d55874ba400\",\"name\":\"bitbybit.vector.vectorXYZ\",\"customName\":\"vector xyz\",\"async\":false,\"drawable\":true,\"data\":{\"genericNodeData\":{\"hide\":true,\"oneOnOne\":false,\"flatten\":0,\"forceExecution\":false},\"x\":0,\"y\":30,\"z\":0},\"inputs\":{},\"position\":[794.3690505014016,-54.119980109301466]},\"16e58d428c0abb1e\":{\"id\":\"16e58d428c0abb1e\",\"name\":\"bitbybit.babylon.scene.drawDirectionalLight\",\"customName\":\"draw directional light\",\"async\":false,\"drawable\":false,\"data\":{\"genericNodeData\":{\"hide\":false,\"oneOnOne\":false,\"flatten\":0,\"forceExecution\":false},\"direction\":[-100,-100,-100],\"intensity\":3,\"diffuse\":\"#ffffff\",\"specular\":\"#ffffff\",\"shadowGeneratorMapSize\":1024,\"enableShadows\":true,\"shadowDarkness\":0,\"shadowUsePercentageCloserFiltering\":true,\"shadowContactHardeningLightSizeUVRatio\":0.2,\"shadowBias\":0.0001,\"shadowNormalBias\":0.002,\"shadowMaxZ\":1000,\"shadowMinZ\":0},\"inputs\":{\"direction\":{\"connections\":[{\"node\":\"fa96ae89f95b4b18\",\"output\":\"result\",\"data\":{}}]}},\"position\":[2410.2001319497786,-1854.3247886875574]},\"cb6929579b17268b\":{\"id\":\"cb6929579b17268b\",\"name\":\"bitbybit.occt.transforms.scale\",\"customName\":\"scale\",\"async\":true,\"drawable\":true,\"data\":{\"genericNodeData\":{\"hide\":true,\"oneOnOne\":false,\"flatten\":0,\"forceExecution\":false},\"factor\":0.3},\"inputs\":{\"shape\":{\"connections\":[{\"node\":\"4534540d6856552d\",\"output\":\"result\",\"data\":{}}]}},\"position\":[457.0402990348086,1405.480031322518]},\"e9b4d2a7926e953f\":{\"id\":\"e9b4d2a7926e953f\",\"name\":\"bitbybit.occt.operations.loftAdvanced\",\"customName\":\"loft advanced\",\"async\":true,\"drawable\":true,\"data\":{\"genericNodeData\":{\"hide\":true,\"oneOnOne\":false,\"flatten\":0,\"forceExecution\":false},\"makeSolid\":false,\"closed\":false,\"periodic\":false,\"straight\":false,\"nrPeriodicSections\":10,\"useSmoothing\":false,\"maxUDegree\":3,\"tolerance\":1e-7,\"parType\":\"approxCentripetal\"},\"inputs\":{\"shapes\":{\"connections\":[{\"node\":\"570ca0cbda09cb78\",\"output\":\"list\",\"data\":{}}]},\"startVertex\":{\"connections\":[{\"node\":\"294942bd7a13ef3b\",\"output\":\"result\",\"data\":{}}]}},\"position\":[1793.6009797350105,1402.1120964226682]},\"570ca0cbda09cb78\":{\"id\":\"570ca0cbda09cb78\",\"name\":\"bitbybit.lists.createList\",\"customName\":\"create list\",\"data\":{},\"inputs\":{\"listElements\":{\"connections\":[{\"node\":\"11549f1b45ea9b19\",\"output\":\"result\",\"data\":{}},{\"node\":\"4534540d6856552d\",\"output\":\"result\",\"data\":{}}]}},\"position\":[1321.0103546184212,1396.929370018355]},\"294942bd7a13ef3b\":{\"id\":\"294942bd7a13ef3b\",\"name\":\"bitbybit.vector.vectorXYZ\",\"customName\":\"vector xyz\",\"async\":false,\"drawable\":true,\"data\":{\"genericNodeData\":{\"hide\":true,\"oneOnOne\":false,\"flatten\":0,\"forceExecution\":false},\"x\":0,\"y\":-10,\"z\":0},\"inputs\":{},\"position\":[1348.5723772315805,1760.5007306049315]},\"14ff0cda52cd7ce0\":{\"id\":\"14ff0cda52cd7ce0\",\"name\":\"bitbybit.occt.shapes.face.createFaceFromWire\",\"customName\":\"face from wire\",\"async\":true,\"drawable\":true,\"data\":{\"genericNodeData\":{\"hide\":true,\"oneOnOne\":false,\"flatten\":0,\"forceExecution\":false},\"planar\":true},\"inputs\":{\"shape\":{\"connections\":[{\"node\":\"47f69e3aabe06071\",\"output\":\"result\",\"data\":{}}]}},\"position\":[1836.8581524949377,110.6324723551911]},\"a153773318fd229a\":{\"id\":\"a153773318fd229a\",\"name\":\"bitbybit.lists.createList\",\"customName\":\"create list\",\"data\":{},\"inputs\":{\"listElements\":{\"connections\":[{\"node\":\"fda5ede008aae952\",\"output\":\"result\",\"data\":{}},{\"node\":\"e5331e883d23938e\",\"output\":\"result\",\"data\":{}},{\"node\":\"3bc9cf346fc8ef2a\",\"output\":\"result\",\"data\":{}},{\"node\":\"5a762f02bed474cd\",\"output\":\"result\",\"data\":{}},{\"node\":\"e9b4d2a7926e953f\",\"output\":\"result\",\"data\":{}},{\"node\":\"ed8dca56f5a8e402\",\"output\":\"result\",\"data\":{}},{\"node\":\"14ff0cda52cd7ce0\",\"output\":\"result\",\"data\":{}}]}},\"position\":[7499.583074067741,153.2312211535806]},\"ec6a4cb0d7105988\":{\"id\":\"ec6a4cb0d7105988\",\"name\":\"bitbybit.occt.shapes.shell.sewFaces\",\"customName\":\"sew faces\",\"async\":true,\"drawable\":true,\"data\":{\"genericNodeData\":{\"hide\":true,\"oneOnOne\":false,\"flatten\":0,\"forceExecution\":false},\"tolerance\":1e-7},\"inputs\":{\"shapes\":{\"connections\":[{\"node\":\"a153773318fd229a\",\"output\":\"list\",\"data\":{}}]}},\"position\":[7778.252945194093,116.96317643777269]},\"d533f9b2b358e932\":{\"id\":\"d533f9b2b358e932\",\"name\":\"bitbybit.occt.shapes.solid.fromClosedShell\",\"customName\":\"from closed shell\",\"async\":true,\"drawable\":true,\"data\":{\"genericNodeData\":{\"hide\":true,\"oneOnOne\":false,\"flatten\":0,\"forceExecution\":false}},\"inputs\":{\"shape\":{\"connections\":[{\"node\":\"ec6a4cb0d7105988\",\"output\":\"result\",\"data\":{}}]}},\"position\":[8740.894126518644,641.4684856178552]},\"65118a904f1bcadd\":{\"id\":\"65118a904f1bcadd\",\"name\":\"bitbybit.draw.drawAnyAsync\",\"customName\":\"draw any async\",\"async\":true,\"drawable\":true,\"data\":{\"genericNodeData\":{\"hide\":false,\"oneOnOne\":false,\"flatten\":0,\"forceExecution\":false}},\"inputs\":{\"options\":{\"connections\":[{\"node\":\"9d5759bf6abda9ea\",\"output\":\"result\",\"data\":{}}]},\"entity\":{\"connections\":[{\"node\":\"ff3a5dfe26c1203f\",\"output\":\"result\",\"data\":{}}]},\"exec\":{\"connections\":[{\"node\":\"7299a501c8e860c5\",\"output\":\"exec\",\"data\":{}}]}},\"position\":[10417.684603457687,1646.8416215802954]},\"9d5759bf6abda9ea\":{\"id\":\"9d5759bf6abda9ea\",\"name\":\"bitbybit.draw.optionsOcctShape\",\"customName\":\"options occt shape\",\"async\":false,\"drawable\":false,\"data\":{\"genericNodeData\":{\"hide\":false,\"oneOnOne\":false,\"flatten\":0,\"forceExecution\":false},\"faceOpacity\":1,\"edgeOpacity\":1,\"edgeColour\":\"#005e99\",\"faceColour\":\"#ffffff\",\"vertexColour\":\"#ff00ff\",\"edgeWidth\":1,\"vertexSize\":0.03,\"drawEdges\":true,\"drawFaces\":true,\"drawVertices\":false,\"precision\":0.005,\"drawEdgeIndexes\":false,\"edgeIndexHeight\":0.06,\"edgeIndexColour\":\"#ff00ff\",\"drawFaceIndexes\":false,\"faceIndexHeight\":0.06,\"faceIndexColour\":\"#0000ff\"},\"inputs\":{\"faceMaterial\":{\"connections\":[{\"node\":\"9cd68061ec4fd9e0\",\"output\":\"result\",\"data\":{}}]}},\"position\":[9991.876413478969,2364.565814067178]},\"825b687b6334e027\":{\"id\":\"825b687b6334e027\",\"name\":\"bitbybit.occt.shapes.face.getFaces\",\"customName\":\"get faces\",\"async\":true,\"drawable\":true,\"data\":{\"genericNodeData\":{\"hide\":true,\"oneOnOne\":false,\"flatten\":0,\"forceExecution\":false}},\"inputs\":{\"shape\":{\"connections\":[{\"node\":\"c7bdc15abbc2ba7d\",\"output\":\"result\",\"data\":{}}]}},\"position\":[2383.6709076575817,1519.6762847896136]},\"74d09b8bdb4c5048\":{\"id\":\"74d09b8bdb4c5048\",\"name\":\"bitbybit.occt.shapes.face.subdivideToRectangleHoles\",\"customName\":\"subdivide to rectangle holes\",\"async\":true,\"drawable\":true,\"data\":{\"genericNodeData\":{\"hide\":true,\"oneOnOne\":false,\"flatten\":0,\"forceExecution\":false},\"nrRectanglesU\":1,\"nrRectanglesV\":1,\"holesToFaces\":true,\"offsetFromBorderU\":0,\"offsetFromBorderV\":0.02},\"inputs\":{\"shape\":{\"connections\":[{\"node\":\"db2f29c28fce9a44\",\"output\":\"result\",\"data\":{}}]},\"scalePatternV\":{\"connections\":[{\"node\":\"6f4928a56906774a\",\"output\":\"list\",\"data\":{}}]},\"inclusionPattern\":{\"connections\":[{\"node\":\"03303a3d3cb2a6b5\",\"output\":\"result\",\"data\":{}}]},\"nrRectanglesV\":{\"connections\":[{\"node\":\"d90e74b18631a7e7\",\"output\":\"result\",\"data\":{}}]}},\"position\":[3092.608348037154,1633.6879372044598]},\"db2f29c28fce9a44\":{\"id\":\"db2f29c28fce9a44\",\"name\":\"bitbybit.lists.flatten\",\"customName\":\"flatten\",\"data\":{\"nrLevels\":1},\"inputs\":{\"list\":{\"connections\":[{\"node\":\"825b687b6334e027\",\"output\":\"result\",\"data\":{}}]}},\"position\":[2676.745386245579,1557.1555615832751]},\"ed8dca56f5a8e402\":{\"id\":\"ed8dca56f5a8e402\",\"name\":\"bitbybit.occt.shapes.shell.sewFaces\",\"customName\":\"sew faces\",\"async\":true,\"drawable\":true,\"data\":{\"genericNodeData\":{\"hide\":true,\"oneOnOne\":false,\"flatten\":0,\"forceExecution\":false},\"tolerance\":1e-7},\"inputs\":{\"shapes\":{\"connections\":[{\"node\":\"f3620701c3c1ae55\",\"output\":\"list\",\"data\":{}}]}},\"position\":[4717.860180433169,974.4537366731146]},\"f3620701c3c1ae55\":{\"id\":\"f3620701c3c1ae55\",\"name\":\"bitbybit.lists.createList\",\"customName\":\"create list\",\"data\":{},\"inputs\":{\"listElements\":{\"connections\":[{\"node\":\"7ea739c655493f9b\",\"output\":\"result\",\"data\":{}}]}},\"position\":[4391.51664332526,1126.3749180224165]},\"5a31954b0015e697\":{\"id\":\"5a31954b0015e697\",\"name\":\"bitbybit.lists.getItem\",\"customName\":\"get item\",\"async\":false,\"drawable\":false,\"data\":{\"genericNodeData\":{\"hide\":false,\"oneOnOne\":false,\"flatten\":0,\"forceExecution\":false},\"index\":0,\"clone\":true},\"inputs\":{\"list\":{\"connections\":[{\"node\":\"74d09b8bdb4c5048\",\"output\":\"result\",\"data\":{}}]}},\"position\":[3583.928722911858,1609.7248549515402]},\"198a03b80b487592\":{\"id\":\"198a03b80b487592\",\"name\":\"bitbybit.math.number\",\"customName\":\"number\",\"async\":false,\"drawable\":false,\"data\":{\"genericNodeData\":{\"hide\":false,\"oneOnOne\":false,\"flatten\":0,\"forceExecution\":false},\"number\":0.75},\"inputs\":{},\"position\":[2390.350829226262,1944.6338134400619]},\"6f4928a56906774a\":{\"id\":\"6f4928a56906774a\",\"name\":\"bitbybit.lists.createList\",\"customName\":\"create list\",\"data\":{},\"inputs\":{\"listElements\":{\"connections\":[{\"node\":\"198a03b80b487592\",\"output\":\"result\",\"data\":{}},{\"node\":\"feef4ec0e40282e7\",\"output\":\"result\",\"data\":{}}]}},\"position\":[2699.5900851326587,1981.4990347629055]},\"b14378ceb8bf7fc5\":{\"id\":\"b14378ceb8bf7fc5\",\"name\":\"bitbybit.occt.transforms.scale3d\",\"customName\":\"scale 3d\",\"async\":true,\"drawable\":true,\"data\":{\"genericNodeData\":{\"hide\":true,\"oneOnOne\":false,\"flatten\":0,\"forceExecution\":false},\"scale\":[1,1,1],\"center\":[0,0,0]},\"inputs\":{\"center\":{\"connections\":[{\"node\":\"719d567df8fbd349\",\"output\":\"result\",\"data\":{}}]},\"scale\":{\"connections\":[{\"node\":\"efb0980b63aa8487\",\"output\":\"result\",\"data\":{}}]},\"shape\":{\"connections\":[{\"node\":\"a385c2492e4ef6f1\",\"output\":\"result\",\"data\":{}}]}},\"position\":[4341.167538667826,2759.8646823683453]},\"719d567df8fbd349\":{\"id\":\"719d567df8fbd349\",\"name\":\"bitbybit.vector.vectorXYZ\",\"customName\":\"vector xyz\",\"async\":false,\"drawable\":true,\"data\":{\"genericNodeData\":{\"hide\":true,\"oneOnOne\":false,\"flatten\":0,\"forceExecution\":false},\"x\":0,\"y\":0,\"z\":0},\"inputs\":{},\"position\":[3112.9806205260847,3674.4933141041506]},\"efb0980b63aa8487\":{\"id\":\"efb0980b63aa8487\",\"name\":\"bitbybit.vector.vectorXYZ\",\"customName\":\"vector xyz\",\"async\":false,\"drawable\":true,\"data\":{\"genericNodeData\":{\"hide\":true,\"oneOnOne\":false,\"flatten\":0,\"forceExecution\":false},\"x\":2,\"y\":1,\"z\":2},\"inputs\":{\"x\":{\"connections\":[{\"node\":\"80d8c2210e2c8ada\",\"output\":\"result\",\"data\":{}}]},\"z\":{\"connections\":[{\"node\":\"80d8c2210e2c8ada\",\"output\":\"result\",\"data\":{}}]}},\"position\":[3116.886056928245,2953.518975707273]},\"e5331e883d23938e\":{\"id\":\"e5331e883d23938e\",\"name\":\"bitbybit.occt.transforms.scale3d\",\"customName\":\"scale 3d\",\"async\":true,\"drawable\":true,\"data\":{\"genericNodeData\":{\"hide\":true,\"oneOnOne\":false,\"flatten\":0,\"forceExecution\":false},\"scale\":[1,1,1],\"center\":[0,0,0]},\"inputs\":{\"scale\":{\"connections\":[{\"node\":\"efb0980b63aa8487\",\"output\":\"result\",\"data\":{}}]},\"center\":{\"connections\":[{\"node\":\"719d567df8fbd349\",\"output\":\"result\",\"data\":{}}]},\"shape\":{\"connections\":[{\"node\":\"5a31954b0015e697\",\"output\":\"result\",\"data\":{}}]}},\"position\":[4356.028359232859,1903.9072650668625]},\"0a8bd4a673a282d0\":{\"id\":\"0a8bd4a673a282d0\",\"name\":\"bitbybit.lists.createList\",\"customName\":\"create list\",\"data\":{},\"inputs\":{\"listElements\":{\"connections\":[{\"node\":\"b6dab3ff34eb97a4\",\"output\":\"list\",\"data\":{}},{\"node\":\"a2a0a302a67ae9ff\",\"output\":\"list\",\"data\":{}}]}},\"position\":[5446.717449196535,2603.210206102196]},\"b6dab3ff34eb97a4\":{\"id\":\"b6dab3ff34eb97a4\",\"name\":\"bitbybit.lists.createList\",\"customName\":\"create list\",\"data\":{},\"inputs\":{\"listElements\":{\"connections\":[{\"node\":\"dd44e69c6aba7a0d\",\"output\":\"result\",\"data\":{}}]}},\"position\":[5014.862418857628,2443.6518849559025]},\"a2a0a302a67ae9ff\":{\"id\":\"a2a0a302a67ae9ff\",\"name\":\"bitbybit.lists.createList\",\"customName\":\"create list\",\"data\":{},\"inputs\":{\"listElements\":{\"connections\":[{\"node\":\"f9fb91cec187f7f0\",\"output\":\"result\",\"data\":{}}]}},\"position\":[5008.316988126108,2795.910343024419]},\"82d90ff3973291d4\":{\"id\":\"82d90ff3973291d4\",\"name\":\"bitbybit.lists.flipLists\",\"customName\":\"flip lists\",\"async\":false,\"drawable\":false,\"data\":{\"genericNodeData\":{\"hide\":false,\"oneOnOne\":false,\"flatten\":0,\"forceExecution\":false},\"clone\":true},\"inputs\":{\"list\":{\"connections\":[{\"node\":\"0a8bd4a673a282d0\",\"output\":\"list\",\"data\":{}}]}},\"position\":[5738.875610128508,2566.2260951248236]},\"9df5fcaa8f7c02cc\":{\"id\":\"9df5fcaa8f7c02cc\",\"name\":\"bitbybit.lists.flatten\",\"customName\":\"flatten\",\"data\":{\"nrLevels\":1},\"inputs\":{\"list\":{\"connections\":[{\"node\":\"82d90ff3973291d4\",\"output\":\"result\",\"data\":{}}]}},\"position\":[6058.59415221766,2603.0978039381016]},\"5a762f02bed474cd\":{\"id\":\"5a762f02bed474cd\",\"name\":\"bitbybit.occt.operations.loft\",\"customName\":\"loft\",\"async\":true,\"drawable\":true,\"data\":{\"genericNodeData\":{\"hide\":true,\"oneOnOne\":false,\"flatten\":0,\"forceExecution\":false},\"makeSolid\":false},\"inputs\":{\"shapes\":{\"connections\":[{\"node\":\"9df5fcaa8f7c02cc\",\"output\":\"result\",\"data\":{}}]}},\"position\":[6404.947065733184,2560.232098026223]},\"80d8c2210e2c8ada\":{\"id\":\"80d8c2210e2c8ada\",\"name\":\"bitbybit.math.number\",\"customName\":\"number\",\"async\":false,\"drawable\":false,\"data\":{\"genericNodeData\":{\"hide\":false,\"oneOnOne\":false,\"flatten\":0,\"forceExecution\":false},\"number\":1.2},\"inputs\":{},\"position\":[2535.8992541451094,3162.3018861132055]},\"fa96ae89f95b4b18\":{\"id\":\"fa96ae89f95b4b18\",\"name\":\"bitbybit.vector.vectorXYZ\",\"customName\":\"vector xyz\",\"async\":false,\"drawable\":true,\"data\":{\"genericNodeData\":{\"hide\":true,\"oneOnOne\":false,\"flatten\":0,\"forceExecution\":false},\"x\":-100,\"y\":-100,\"z\":-100},\"inputs\":{},\"position\":[1862.3555027829957,-1849.8844786271547]},\"9cd68061ec4fd9e0\":{\"id\":\"9cd68061ec4fd9e0\",\"name\":\"bitbybit.babylon.material.pbrMetallicRoughness.create\",\"customName\":\"pbr metallic roughness\",\"async\":false,\"drawable\":false,\"data\":{\"genericNodeData\":{\"hide\":false,\"oneOnOne\":false,\"flatten\":0,\"forceExecution\":false},\"name\":\"Custom Material\",\"baseColor\":\"#94c2ff\",\"emissiveColor\":\"#3b77b0\",\"metallic\":0.8,\"roughness\":0.29,\"alpha\":1,\"backFaceCulling\":false,\"zOffset\":2},\"inputs\":{},\"position\":[9605.741806654112,2831.949431044085]},\"3901011d12c76eef\":{\"id\":\"3901011d12c76eef\",\"name\":\"bitbybit.occt.transforms.scale3d\",\"customName\":\"scale 3d\",\"async\":true,\"drawable\":true,\"data\":{\"genericNodeData\":{\"hide\":true,\"oneOnOne\":false,\"flatten\":0,\"forceExecution\":false},\"scale\":[1,1,1],\"center\":[0,0,0]},\"inputs\":{\"shape\":{\"connections\":[{\"node\":\"47f69e3aabe06071\",\"output\":\"result\",\"data\":{}}]},\"scale\":{\"connections\":[{\"node\":\"efb0980b63aa8487\",\"output\":\"result\",\"data\":{}}]},\"center\":{\"connections\":[{\"node\":\"719d567df8fbd349\",\"output\":\"result\",\"data\":{}}]}},\"position\":[4364.581071106104,1476.346832014063]},\"3bc9cf346fc8ef2a\":{\"id\":\"3bc9cf346fc8ef2a\",\"name\":\"bitbybit.occt.transforms.scale3d\",\"customName\":\"scale 3d\",\"async\":true,\"drawable\":true,\"data\":{\"genericNodeData\":{\"hide\":true,\"oneOnOne\":false,\"flatten\":0,\"forceExecution\":false},\"scale\":[1,1,1],\"center\":[0,0,0]},\"inputs\":{\"shape\":{\"connections\":[{\"node\":\"e9b4d2a7926e953f\",\"output\":\"result\",\"data\":{}}]},\"center\":{\"connections\":[{\"node\":\"719d567df8fbd349\",\"output\":\"result\",\"data\":{}}]},\"scale\":{\"connections\":[{\"node\":\"43f2efdf3003002e\",\"output\":\"result\",\"data\":{}}]}},\"position\":[4345.11797828289,3210.3573065763057]},\"b313faa82fc7f582\":{\"id\":\"b313faa82fc7f582\",\"name\":\"bitbybit.lists.createList\",\"customName\":\"create list\",\"data\":{},\"inputs\":{\"listElements\":{\"connections\":[{\"node\":\"3901011d12c76eef\",\"output\":\"result\",\"data\":{}}]}},\"position\":[4860.068544678273,1517.2274588686575]},\"fda5ede008aae952\":{\"id\":\"fda5ede008aae952\",\"name\":\"bitbybit.occt.operations.loftAdvanced\",\"customName\":\"loft advanced\",\"async\":true,\"drawable\":true,\"data\":{\"genericNodeData\":{\"hide\":true,\"oneOnOne\":false,\"flatten\":0,\"forceExecution\":false},\"makeSolid\":false,\"closed\":false,\"periodic\":false,\"straight\":false,\"nrPeriodicSections\":10,\"useSmoothing\":false,\"maxUDegree\":3,\"tolerance\":1e-7,\"parType\":\"approxCentripetal\"},\"inputs\":{\"shapes\":{\"connections\":[{\"node\":\"b313faa82fc7f582\",\"output\":\"list\",\"data\":{}}]},\"startVertex\":{\"connections\":[{\"node\":\"cbacaf56751f477c\",\"output\":\"result\",\"data\":{}}]}},\"position\":[5327.662487993239,1465.5007248302118]},\"cbacaf56751f477c\":{\"id\":\"cbacaf56751f477c\",\"name\":\"bitbybit.vector.vectorXYZ\",\"customName\":\"vector xyz\",\"async\":false,\"drawable\":true,\"data\":{\"genericNodeData\":{\"hide\":true,\"oneOnOne\":false,\"flatten\":0,\"forceExecution\":false},\"x\":0,\"y\":32,\"z\":0},\"inputs\":{},\"position\":[4910.618536230501,1875.6153539025163]},\"43f2efdf3003002e\":{\"id\":\"43f2efdf3003002e\",\"name\":\"bitbybit.vector.vectorXYZ\",\"customName\":\"vector xyz\",\"async\":false,\"drawable\":true,\"data\":{\"genericNodeData\":{\"hide\":true,\"oneOnOne\":false,\"flatten\":0,\"forceExecution\":false},\"x\":2,\"y\":1,\"z\":2},\"inputs\":{\"x\":{\"connections\":[{\"node\":\"80d8c2210e2c8ada\",\"output\":\"result\",\"data\":{}}]},\"y\":{\"connections\":[{\"node\":\"80d8c2210e2c8ada\",\"output\":\"result\",\"data\":{}}]},\"z\":{\"connections\":[{\"node\":\"80d8c2210e2c8ada\",\"output\":\"result\",\"data\":{}}]}},\"position\":[3110.961471038728,3310.5951164909416]},\"7ea739c655493f9b\":{\"id\":\"7ea739c655493f9b\",\"name\":\"bitbybit.occt.shapes.face.reversedFace\",\"customName\":\"reversed face\",\"async\":true,\"drawable\":true,\"data\":{\"genericNodeData\":{\"hide\":true,\"oneOnOne\":false,\"flatten\":0,\"forceExecution\":false}},\"inputs\":{\"shape\":{\"connections\":[{\"node\":\"5a31954b0015e697\",\"output\":\"result\",\"data\":{}}]}},\"position\":[4008.2380004947863,1087.5384630463477]},\"ff3a5dfe26c1203f\":{\"id\":\"ff3a5dfe26c1203f\",\"name\":\"bitbybit.occt.transforms.scale\",\"customName\":\"scale\",\"async\":true,\"drawable\":true,\"data\":{\"genericNodeData\":{\"hide\":true,\"oneOnOne\":false,\"flatten\":0,\"forceExecution\":false},\"factor\":0.5},\"inputs\":{\"shape\":{\"connections\":[{\"node\":\"d533f9b2b358e932\",\"output\":\"result\",\"data\":{}}]}},\"position\":[9189.222022342807,640.7663938760614]},\"36d87d3e5dda7cfb\":{\"id\":\"36d87d3e5dda7cfb\",\"name\":\"bitbybit.babylon.scene.drawDirectionalLight\",\"customName\":\"draw directional light\",\"async\":false,\"drawable\":false,\"data\":{\"genericNodeData\":{\"hide\":false,\"oneOnOne\":false,\"flatten\":0,\"forceExecution\":false},\"direction\":[-100,-100,-100],\"intensity\":3,\"diffuse\":\"#0084ff\",\"specular\":\"#ffffff\",\"shadowGeneratorMapSize\":1024,\"enableShadows\":true,\"shadowDarkness\":0,\"shadowUsePercentageCloserFiltering\":true,\"shadowContactHardeningLightSizeUVRatio\":0.2,\"shadowBias\":0.0001,\"shadowNormalBias\":0.002,\"shadowMaxZ\":1000,\"shadowMinZ\":0},\"inputs\":{\"direction\":{\"connections\":[{\"node\":\"9c598c3fd358e209\",\"output\":\"result\",\"data\":{}}]}},\"position\":[2410.492548455645,-1108.187459661422]},\"9c598c3fd358e209\":{\"id\":\"9c598c3fd358e209\",\"name\":\"bitbybit.vector.vectorXYZ\",\"customName\":\"vector xyz\",\"async\":false,\"drawable\":true,\"data\":{\"genericNodeData\":{\"hide\":true,\"oneOnOne\":false,\"flatten\":0,\"forceExecution\":false},\"x\":-100,\"y\":50,\"z\":-100},\"inputs\":{},\"position\":[1866.1241234045078,-1104.6216865423542]},\"dd44e69c6aba7a0d\":{\"id\":\"dd44e69c6aba7a0d\",\"name\":\"bitbybit.occt.shapes.wire.getWires\",\"customName\":\"get wires\",\"async\":true,\"drawable\":true,\"data\":{\"genericNodeData\":{\"hide\":true,\"oneOnOne\":false,\"flatten\":1,\"forceExecution\":false}},\"inputs\":{\"shape\":{\"connections\":[{\"node\":\"a385c2492e4ef6f1\",\"output\":\"result\",\"data\":{}}]}},\"position\":[4354.892794420823,2367.2120176828043]},\"f9fb91cec187f7f0\":{\"id\":\"f9fb91cec187f7f0\",\"name\":\"bitbybit.occt.shapes.wire.getWires\",\"customName\":\"get wires\",\"async\":true,\"drawable\":true,\"data\":{\"genericNodeData\":{\"hide\":true,\"oneOnOne\":false,\"flatten\":1,\"forceExecution\":false}},\"inputs\":{\"shape\":{\"connections\":[{\"node\":\"b14378ceb8bf7fc5\",\"output\":\"result\",\"data\":{}}]}},\"position\":[4682.071021905679,2782.246685007575]},\"ca83297771d11aa5\":{\"id\":\"ca83297771d11aa5\",\"name\":\"bitbybit.lists.removeItemAtIndex\",\"customName\":\"remove item at index\",\"async\":false,\"drawable\":false,\"data\":{\"genericNodeData\":{\"hide\":false,\"oneOnOne\":false,\"flatten\":0,\"forceExecution\":false},\"index\":0,\"clone\":true},\"inputs\":{\"list\":{\"connections\":[{\"node\":\"74d09b8bdb4c5048\",\"output\":\"result\",\"data\":{}}]}},\"position\":[3558.8739387013798,1967.9824675636294]},\"a385c2492e4ef6f1\":{\"id\":\"a385c2492e4ef6f1\",\"name\":\"bitbybit.lists.flatten\",\"customName\":\"flatten\",\"data\":{\"nrLevels\":1},\"inputs\":{\"list\":{\"connections\":[{\"node\":\"ca83297771d11aa5\",\"output\":\"result\",\"data\":{}}]}},\"position\":[4016.6293284317,2616.607395641203]},\"42f74d68d23d3247\":{\"id\":\"42f74d68d23d3247\",\"name\":\"bitbybit.babylon.scene.fog\",\"customName\":\"fog\",\"async\":false,\"drawable\":false,\"data\":{\"genericNodeData\":{\"hide\":false,\"oneOnOne\":false,\"flatten\":0,\"forceExecution\":false},\"mode\":\"linear\",\"color\":\"#c9c9c9\",\"density\":0.1,\"start\":35,\"end\":100},\"inputs\":{\"color\":{\"connections\":[{\"node\":\"7b75db43179570c8\",\"output\":\"result\",\"data\":{}}]}},\"position\":[2442.8735698720834,-42.14590401627983]},\"7b75db43179570c8\":{\"id\":\"7b75db43179570c8\",\"name\":\"bitbybit.color.hexColor\",\"customName\":\"hex color\",\"async\":false,\"drawable\":false,\"data\":{\"genericNodeData\":{\"hide\":false,\"oneOnOne\":false,\"flatten\":0,\"forceExecution\":false},\"color\":\"#8397aa\"},\"inputs\":{},\"position\":[2098.232163729327,-306.933632265146]},\"8f5c08c8c98f4eb6\":{\"id\":\"8f5c08c8c98f4eb6\",\"name\":\"bitbybit.babylon.gui.advancedDynamicTexture.createFullScreenUI\",\"customName\":\"full screen ui\",\"async\":false,\"drawable\":false,\"data\":{\"genericNodeData\":{\"hide\":false,\"oneOnOne\":false,\"flatten\":0,\"forceExecution\":false},\"name\":\"fullscreen\",\"foreground\":true,\"adaptiveScaling\":false},\"inputs\":{},\"position\":[-1056.7184739683328,2836.232260686571]},\"62013821226fbd05\":{\"id\":\"62013821226fbd05\",\"name\":\"bitbybit.babylon.gui.container.addControls\",\"customName\":\"add controls\",\"async\":false,\"drawable\":false,\"data\":{\"genericNodeData\":{\"hide\":false,\"oneOnOne\":false,\"flatten\":0,\"forceExecution\":false},\"clearControlsFirst\":true},\"inputs\":{\"controls\":{\"connections\":[{\"node\":\"5d70cbf01bf83e55\",\"output\":\"list\",\"data\":{}}]},\"container\":{\"connections\":[{\"node\":\"8f5c08c8c98f4eb6\",\"output\":\"result\",\"data\":{}}]}},\"position\":[1051.4522897911515,2825.729196003556]},\"5d70cbf01bf83e55\":{\"id\":\"5d70cbf01bf83e55\",\"name\":\"bitbybit.lists.createList\",\"customName\":\"create list\",\"data\":{},\"inputs\":{\"listElements\":{\"connections\":[{\"node\":\"d7157cf9080bd8c5\",\"output\":\"result\",\"data\":{}}]}},\"position\":[779.1858107406395,3260.0028960769355]},\"6ea6f5c19d2c3679\":{\"id\":\"6ea6f5c19d2c3679\",\"name\":\"bitbybit.babylon.gui.stackPanel.createStackPanel\",\"customName\":\"stack panel\",\"async\":false,\"drawable\":false,\"data\":{\"genericNodeData\":{\"hide\":false,\"oneOnOne\":false,\"flatten\":0,\"forceExecution\":false},\"name\":\"stackPanel\",\"isVertical\":true,\"spacing\":25,\"color\":\"#00000000\",\"background\":\"#00000000\"},\"inputs\":{\"width\":{\"connections\":[{\"node\":\"1c3567b107487ab7\",\"output\":\"result\",\"data\":{}}]},\"height\":{\"connections\":[{\"node\":\"2cfa0a89722e88ad\",\"output\":\"result\",\"data\":{}}]}},\"position\":[-644.7439786868175,3305.091365601621]},\"1c3567b107487ab7\":{\"id\":\"1c3567b107487ab7\",\"name\":\"bitbybit.text.create\",\"customName\":\"create\",\"async\":false,\"drawable\":false,\"data\":{\"genericNodeData\":{\"hide\":false,\"oneOnOne\":false,\"flatten\":0,\"forceExecution\":false},\"text\":\"740px\"},\"inputs\":{},\"position\":[-1005.9218465842323,3360.972335833377]},\"2cfa0a89722e88ad\":{\"id\":\"2cfa0a89722e88ad\",\"name\":\"bitbybit.text.create\",\"customName\":\"create\",\"async\":false,\"drawable\":false,\"data\":{\"genericNodeData\":{\"hide\":false,\"oneOnOne\":false,\"flatten\":0,\"forceExecution\":false},\"text\":\"850px\"},\"inputs\":{},\"position\":[-1015.568499809784,3636.3340536899586]},\"7256842476045eb7\":{\"id\":\"7256842476045eb7\",\"name\":\"bitbybit.babylon.gui.control.changeControlAlignment\",\"customName\":\"change control alignment\",\"async\":false,\"drawable\":false,\"data\":{\"genericNodeData\":{\"hide\":false,\"oneOnOne\":false,\"flatten\":0,\"forceExecution\":false},\"horizontalAlignment\":\"left\",\"verticalAlignment\":\"bottom\"},\"inputs\":{\"control\":{\"connections\":[{\"node\":\"6ea6f5c19d2c3679\",\"output\":\"result\",\"data\":{}}]}},\"position\":[-55.86693666910121,3469.4026625427564]},\"d7157cf9080bd8c5\":{\"id\":\"d7157cf9080bd8c5\",\"name\":\"bitbybit.babylon.gui.control.changeControlPadding\",\"customName\":\"change control padding\",\"async\":false,\"drawable\":false,\"data\":{\"genericNodeData\":{\"hide\":false,\"oneOnOne\":false,\"flatten\":0,\"forceExecution\":false}},\"inputs\":{\"control\":{\"connections\":[{\"node\":\"7256842476045eb7\",\"output\":\"result\",\"data\":{}}]},\"paddingLeft\":{\"connections\":[{\"node\":\"2e27ec0382325605\",\"output\":\"result\",\"data\":{}}]},\"paddingRight\":{\"connections\":[{\"node\":\"2e27ec0382325605\",\"output\":\"result\",\"data\":{}}]},\"paddingTop\":{\"connections\":[{\"node\":\"2e27ec0382325605\",\"output\":\"result\",\"data\":{}}]},\"paddingBottom\":{\"connections\":[{\"node\":\"2e27ec0382325605\",\"output\":\"result\",\"data\":{}}]}},\"position\":[374.0302769524635,3524.3010854904096]},\"2e27ec0382325605\":{\"id\":\"2e27ec0382325605\",\"name\":\"bitbybit.text.create\",\"customName\":\"create\",\"async\":false,\"drawable\":false,\"data\":{\"genericNodeData\":{\"hide\":false,\"oneOnOne\":false,\"flatten\":0,\"forceExecution\":false},\"text\":\"35px\"},\"inputs\":{},\"position\":[38.94193286015155,3917.4311588521]},\"bbd88144625e447e\":{\"id\":\"bbd88144625e447e\",\"name\":\"bitbybit.babylon.gui.container.addControls\",\"customName\":\"add controls\",\"async\":false,\"drawable\":false,\"data\":{\"genericNodeData\":{\"hide\":false,\"oneOnOne\":false,\"flatten\":0,\"forceExecution\":false},\"clearControlsFirst\":true},\"inputs\":{\"container\":{\"connections\":[{\"node\":\"d7157cf9080bd8c5\",\"output\":\"result\",\"data\":{}}]},\"controls\":{\"connections\":[{\"node\":\"688df756a4d3edd8\",\"output\":\"list\",\"data\":{}}]}},\"position\":[1117.0240712398745,3999.2649441995045]},\"688df756a4d3edd8\":{\"id\":\"688df756a4d3edd8\",\"name\":\"bitbybit.lists.createList\",\"customName\":\"create list\",\"data\":{},\"inputs\":{\"listElements\":{\"connections\":[{\"node\":\"a67fb013d25c1008\",\"output\":\"result\",\"data\":{}}]}},\"position\":[808.172430927605,4141.539962993023]},\"a67fb013d25c1008\":{\"id\":\"a67fb013d25c1008\",\"name\":\"bitbybit.babylon.gui.control.changeControlPadding\",\"customName\":\"change control padding\",\"async\":false,\"drawable\":false,\"data\":{\"genericNodeData\":{\"hide\":false,\"oneOnOne\":false,\"flatten\":0,\"forceExecution\":false}},\"inputs\":{\"paddingLeft\":{\"connections\":[{\"node\":\"2e27ec0382325605\",\"output\":\"result\",\"data\":{}}]},\"paddingRight\":{\"connections\":[{\"node\":\"2e27ec0382325605\",\"output\":\"result\",\"data\":{}}]},\"paddingTop\":{\"connections\":[{\"node\":\"2e27ec0382325605\",\"output\":\"result\",\"data\":{}}]},\"paddingBottom\":{\"connections\":[{\"node\":\"2e27ec0382325605\",\"output\":\"result\",\"data\":{}}]},\"control\":{\"connections\":[{\"node\":\"8019c3f4a93360fc\",\"output\":\"result\",\"data\":{}}]}},\"position\":[381.53080329328145,4124.938450095269]},\"8019c3f4a93360fc\":{\"id\":\"8019c3f4a93360fc\",\"name\":\"bitbybit.babylon.gui.stackPanel.createStackPanel\",\"customName\":\"stack panel\",\"async\":false,\"drawable\":false,\"data\":{\"genericNodeData\":{\"hide\":false,\"oneOnOne\":false,\"flatten\":0,\"forceExecution\":false},\"name\":\"stackPanel\",\"isVertical\":true,\"spacing\":32,\"color\":\"#00000000\",\"background\":\"#00000055\"},\"inputs\":{\"width\":{\"connections\":[{\"node\":\"c7771b05bfece223\",\"output\":\"result\",\"data\":{}}]},\"height\":{\"connections\":[{\"node\":\"c7771b05bfece223\",\"output\":\"result\",\"data\":{}}]}},\"position\":[-634.5679617178588,4122.829976185915]},\"c7771b05bfece223\":{\"id\":\"c7771b05bfece223\",\"name\":\"bitbybit.math.number\",\"customName\":\"number\",\"async\":false,\"drawable\":false,\"data\":{\"genericNodeData\":{\"hide\":false,\"oneOnOne\":false,\"flatten\":0,\"forceExecution\":false},\"number\":1},\"inputs\":{},\"position\":[-1030.5012301905765,4255.332320202711]},\"3cdac0a2da52d477\":{\"id\":\"3cdac0a2da52d477\",\"name\":\"bitbybit.babylon.gui.textBlock.createTextBlock\",\"customName\":\"text block\",\"async\":false,\"drawable\":false,\"data\":{\"genericNodeData\":{\"hide\":false,\"oneOnOne\":false,\"flatten\":0,\"forceExecution\":false},\"name\":\"textBlockName\",\"text\":\"❄️❄️❄️🎄 TOY 🎄❄️❄️❄️\",\"color\":\"#f0cebb\",\"fontSize\":43},\"inputs\":{\"color\":{\"connections\":[{\"node\":\"14ea460327313f84\",\"output\":\"result\",\"data\":{}}]},\"height\":{\"connections\":[{\"node\":\"8fdac6b820e66385\",\"output\":\"result\",\"data\":{}}]}},\"position\":[-853.8406515994363,5107.457479372801]},\"4c68d9ac771b698a\":{\"id\":\"4c68d9ac771b698a\",\"name\":\"bitbybit.babylon.gui.container.addControls\",\"customName\":\"add controls\",\"async\":false,\"drawable\":false,\"data\":{\"genericNodeData\":{\"hide\":false,\"oneOnOne\":false,\"flatten\":0,\"forceExecution\":false},\"clearControlsFirst\":true},\"inputs\":{\"container\":{\"connections\":[{\"node\":\"a67fb013d25c1008\",\"output\":\"result\",\"data\":{}}]},\"controls\":{\"connections\":[{\"node\":\"40ad5c91b680fe5b\",\"output\":\"list\",\"data\":{}}]}},\"position\":[1081.1735221113568,4989.645601752394]},\"40ad5c91b680fe5b\":{\"id\":\"40ad5c91b680fe5b\",\"name\":\"bitbybit.lists.createList\",\"customName\":\"create list\",\"data\":{},\"inputs\":{\"listElements\":{\"connections\":[{\"node\":\"3cdac0a2da52d477\",\"output\":\"result\",\"data\":{}},{\"node\":\"eb164cb9f2c3d0b2\",\"output\":\"result\",\"data\":{}},{\"node\":\"f80263a3d6977ea4\",\"output\":\"result\",\"data\":{}},{\"node\":\"dda72ba4bc855075\",\"output\":\"result\",\"data\":{}},{\"node\":\"a3006cf7f5041ef6\",\"output\":\"result\",\"data\":{}},{\"node\":\"22b0aaced3db29ad\",\"output\":\"result\",\"data\":{}},{\"node\":\"9de26dfa0b6980e6\",\"output\":\"result\",\"data\":{}}]}},\"position\":[131.27159201850196,6807.45958474214]},\"14ea460327313f84\":{\"id\":\"14ea460327313f84\",\"name\":\"bitbybit.color.hexColor\",\"customName\":\"hex color\",\"async\":false,\"drawable\":false,\"data\":{\"genericNodeData\":{\"hide\":false,\"oneOnOne\":false,\"flatten\":0,\"forceExecution\":false},\"color\":\"#75a3ff\"},\"inputs\":{},\"position\":[-2524.347102647334,9183.15923769915]},\"be55efccc9dd82ed\":{\"id\":\"be55efccc9dd82ed\",\"name\":\"bitbybit.babylon.gui.control.changeControlPadding\",\"customName\":\"change control padding\",\"async\":false,\"drawable\":false,\"data\":{\"genericNodeData\":{\"hide\":false,\"oneOnOne\":false,\"flatten\":0,\"forceExecution\":false}},\"inputs\":{\"control\":{\"connections\":[{\"node\":\"3cdac0a2da52d477\",\"output\":\"result\",\"data\":{}}]},\"paddingTop\":{\"connections\":[{\"node\":\"96b4e817c4c14f20\",\"output\":\"result\",\"data\":{}}]},\"paddingBottom\":{\"connections\":[{\"node\":\"f6b793e8e89edda0\",\"output\":\"result\",\"data\":{}}]}},\"position\":[310.06370891276634,5361.812652019315]},\"96b4e817c4c14f20\":{\"id\":\"96b4e817c4c14f20\",\"name\":\"bitbybit.text.create\",\"customName\":\"create\",\"async\":false,\"drawable\":false,\"data\":{\"genericNodeData\":{\"hide\":false,\"oneOnOne\":false,\"flatten\":0,\"forceExecution\":false},\"text\":\"25px\"},\"inputs\":{},\"position\":[-216.81270824516469,5476.663754188035]},\"8fdac6b820e66385\":{\"id\":\"8fdac6b820e66385\",\"name\":\"bitbybit.text.create\",\"customName\":\"create\",\"async\":false,\"drawable\":false,\"data\":{\"genericNodeData\":{\"hide\":false,\"oneOnOne\":false,\"flatten\":0,\"forceExecution\":false},\"text\":\"105px\"},\"inputs\":{},\"position\":[-1181.045524940636,5460.547434196808]},\"eb164cb9f2c3d0b2\":{\"id\":\"eb164cb9f2c3d0b2\",\"name\":\"bitbybit.babylon.gui.slider.createSlider\",\"customName\":\"slider\",\"async\":false,\"drawable\":false,\"data\":{\"genericNodeData\":{\"hide\":false,\"oneOnOne\":false,\"flatten\":0,\"forceExecution\":false},\"name\":\"rays\",\"minimum\":3,\"maximum\":12,\"value\":6,\"step\":1,\"isVertical\":false,\"color\":\"#f0cebb\",\"background\":\"black\",\"displayThumb\":true},\"inputs\":{\"value\":{\"connections\":[{\"node\":\"6e51a85f13ab5259\",\"output\":\"result\",\"data\":{}}]},\"color\":{\"connections\":[{\"node\":\"14ea460327313f84\",\"output\":\"result\",\"data\":{}}]}},\"position\":[-821.5978737310934,5908.02843885303]},\"6e51a85f13ab5259\":{\"id\":\"6e51a85f13ab5259\",\"name\":\"bitbybit.math.numberSlider\",\"customName\":\"number slider\",\"data\":{\"options\":{\"min\":3,\"max\":12,\"step\":1,\"width\":350,\"updateOnDrag\":false},\"number\":5},\"inputs\":{},\"position\":[-1455.2743568834462,6056.45799565296]},\"f80263a3d6977ea4\":{\"id\":\"f80263a3d6977ea4\",\"name\":\"bitbybit.babylon.gui.textBlock.createTextBlock\",\"customName\":\"text block\",\"async\":false,\"drawable\":false,\"data\":{\"genericNodeData\":{\"hide\":false,\"oneOnOne\":false,\"flatten\":0,\"forceExecution\":false},\"name\":\"textBlockName\",\"text\":\"Number Of Rays\",\"color\":\"#f0cebb\",\"fontSize\":32},\"inputs\":{\"color\":{\"connections\":[{\"node\":\"14ea460327313f84\",\"output\":\"result\",\"data\":{}}]}},\"position\":[-853.88650164059,6570.290388610167]},\"dda72ba4bc855075\":{\"id\":\"dda72ba4bc855075\",\"name\":\"bitbybit.babylon.gui.slider.createSlider\",\"customName\":\"slider\",\"async\":false,\"drawable\":false,\"data\":{\"genericNodeData\":{\"hide\":false,\"oneOnOne\":false,\"flatten\":0,\"forceExecution\":false},\"name\":\"verticalOpeningsSlider\",\"minimum\":1,\"maximum\":25,\"value\":6,\"step\":1,\"isVertical\":false,\"color\":\"#f0cebb\",\"background\":\"black\",\"displayThumb\":true},\"inputs\":{\"value\":{\"connections\":[{\"node\":\"dc27ec58598933e4\",\"output\":\"result\",\"data\":{}}]},\"color\":{\"connections\":[{\"node\":\"14ea460327313f84\",\"output\":\"result\",\"data\":{}}]}},\"position\":[-831.8855421151479,7040.183968957487]},\"dc27ec58598933e4\":{\"id\":\"dc27ec58598933e4\",\"name\":\"bitbybit.math.numberSlider\",\"customName\":\"number slider\",\"data\":{\"options\":{\"min\":1,\"max\":25,\"step\":1,\"width\":350,\"updateOnDrag\":false},\"number\":5},\"inputs\":{},\"position\":[-1548.5643926124947,7215.153436337072]},\"a3006cf7f5041ef6\":{\"id\":\"a3006cf7f5041ef6\",\"name\":\"bitbybit.babylon.gui.textBlock.createTextBlock\",\"customName\":\"text block\",\"async\":false,\"drawable\":false,\"data\":{\"genericNodeData\":{\"hide\":false,\"oneOnOne\":false,\"flatten\":0,\"forceExecution\":false},\"name\":\"textBlockName\",\"text\":\"Vertical Divisions\",\"color\":\"#f0cebb\",\"fontSize\":32},\"inputs\":{\"color\":{\"connections\":[{\"node\":\"14ea460327313f84\",\"output\":\"result\",\"data\":{}}]}},\"position\":[-829.5105024166364,7718.522342332688]},\"22b0aaced3db29ad\":{\"id\":\"22b0aaced3db29ad\",\"name\":\"bitbybit.babylon.gui.button.createSimpleButton\",\"customName\":\"simple button\",\"async\":false,\"drawable\":false,\"data\":{\"genericNodeData\":{\"hide\":false,\"oneOnOne\":false,\"flatten\":0,\"forceExecution\":false},\"name\":\"buttonName\",\"label\":\"S I G N U P F O R M O R E !\",\"color\":\"white\",\"background\":\"#f0cebb\",\"fontSize\":32},\"inputs\":{\"background\":{\"connections\":[{\"node\":\"14ea460327313f84\",\"output\":\"result\",\"data\":{}}]},\"height\":{\"connections\":[{\"node\":\"b5ab513337ea1f9c\",\"output\":\"result\",\"data\":{}}]}},\"position\":[-846.86829904502,8223.84317108378]},\"b5ab513337ea1f9c\":{\"id\":\"b5ab513337ea1f9c\",\"name\":\"bitbybit.text.create\",\"customName\":\"create\",\"async\":false,\"drawable\":false,\"data\":{\"genericNodeData\":{\"hide\":false,\"oneOnOne\":false,\"flatten\":0,\"forceExecution\":false},\"text\":\"95px\"},\"inputs\":{},\"position\":[-1211.515140544501,8409.866247193688]},\"3d74af9c8a8b1dd3\":{\"id\":\"3d74af9c8a8b1dd3\",\"name\":\"bitbybit.babylon.gui.control.changeControlPadding\",\"customName\":\"change control padding\",\"async\":false,\"drawable\":false,\"data\":{\"genericNodeData\":{\"hide\":false,\"oneOnOne\":false,\"flatten\":0,\"forceExecution\":false}},\"inputs\":{\"control\":{\"connections\":[{\"node\":\"22b0aaced3db29ad\",\"output\":\"result\",\"data\":{}}]},\"paddingLeft\":{\"connections\":[{\"node\":\"f49f0b323ff33034\",\"output\":\"result\",\"data\":{}}]},\"paddingRight\":{\"connections\":[{\"node\":\"f49f0b323ff33034\",\"output\":\"result\",\"data\":{}}]}},\"position\":[147.85415967299022,8465.334888215139]},\"f49f0b323ff33034\":{\"id\":\"f49f0b323ff33034\",\"name\":\"bitbybit.text.create\",\"customName\":\"create\",\"async\":false,\"drawable\":false,\"data\":{\"genericNodeData\":{\"hide\":false,\"oneOnOne\":false,\"flatten\":0,\"forceExecution\":false},\"text\":\"32px\"},\"inputs\":{},\"position\":[-351.90583473376483,8527.624810198047]},\"9de26dfa0b6980e6\":{\"id\":\"9de26dfa0b6980e6\",\"name\":\"bitbybit.babylon.gui.stackPanel.createStackPanel\",\"customName\":\"stack panel\",\"async\":false,\"drawable\":false,\"data\":{\"genericNodeData\":{\"hide\":false,\"oneOnOne\":false,\"flatten\":0,\"forceExecution\":false},\"name\":\"actions\",\"isVertical\":false,\"spacing\":20,\"color\":\"#00000000\",\"background\":\"#00000055\"},\"inputs\":{\"height\":{\"connections\":[{\"node\":\"94be48fa3d341e2f\",\"output\":\"result\",\"data\":{}}]}},\"position\":[-860.4566955224043,8845.655587065246]},\"94be48fa3d341e2f\":{\"id\":\"94be48fa3d341e2f\",\"name\":\"bitbybit.text.create\",\"customName\":\"create\",\"async\":false,\"drawable\":false,\"data\":{\"genericNodeData\":{\"hide\":false,\"oneOnOne\":false,\"flatten\":0,\"forceExecution\":false},\"text\":\"150px\"},\"inputs\":{},\"position\":[-1243.8502616502608,8996.109487316298]},\"386aa0fba070069e\":{\"id\":\"386aa0fba070069e\",\"name\":\"bitbybit.lists.createList\",\"customName\":\"create list\",\"data\":{},\"inputs\":{\"listElements\":{\"connections\":[{\"node\":\"fc36f702c3f8146e\",\"output\":\"result\",\"data\":{}},{\"node\":\"71fbc1ccee37d577\",\"output\":\"result\",\"data\":{}},{\"node\":\"dfd5ec0585a0e37f\",\"output\":\"result\",\"data\":{}}]}},\"position\":[86.09946070310812,9675.048597360192]},\"fc36f702c3f8146e\":{\"id\":\"fc36f702c3f8146e\",\"name\":\"bitbybit.babylon.gui.button.createSimpleButton\",\"customName\":\"simple button\",\"async\":false,\"drawable\":false,\"data\":{\"genericNodeData\":{\"hide\":false,\"oneOnOne\":false,\"flatten\":0,\"forceExecution\":false},\"name\":\"getStep\",\"label\":\"Get STEP\",\"color\":\"white\",\"background\":\"black\",\"fontSize\":24},\"inputs\":{\"width\":{\"connections\":[{\"node\":\"9627abcea218d31f\",\"output\":\"result\",\"data\":{}}]},\"height\":{\"connections\":[{\"node\":\"5189291d4a0b99c3\",\"output\":\"result\",\"data\":{}}]},\"color\":{\"connections\":[{\"node\":\"14ea460327313f84\",\"output\":\"result\",\"data\":{}}]}},\"position\":[-906.5263779292032,9503.72186483339]},\"9627abcea218d31f\":{\"id\":\"9627abcea218d31f\",\"name\":\"bitbybit.text.create\",\"customName\":\"create\",\"async\":false,\"drawable\":false,\"data\":{\"genericNodeData\":{\"hide\":false,\"oneOnOne\":false,\"flatten\":0,\"forceExecution\":false},\"text\":\"186px\"},\"inputs\":{},\"position\":[-1280.2041644956794,9443.521680268339]},\"5189291d4a0b99c3\":{\"id\":\"5189291d4a0b99c3\",\"name\":\"bitbybit.math.number\",\"customName\":\"number\",\"async\":false,\"drawable\":false,\"data\":{\"genericNodeData\":{\"hide\":false,\"oneOnOne\":false,\"flatten\":0,\"forceExecution\":false},\"number\":0.5},\"inputs\":{},\"position\":[-1336.124164455853,9763.964706483723]},\"b42caf22b316e228\":{\"id\":\"b42caf22b316e228\",\"name\":\"bitbybit.babylon.gui.container.addControls\",\"customName\":\"add controls\",\"async\":false,\"drawable\":false,\"data\":{\"genericNodeData\":{\"hide\":false,\"oneOnOne\":false,\"flatten\":0,\"forceExecution\":false},\"clearControlsFirst\":true},\"inputs\":{\"controls\":{\"connections\":[{\"node\":\"386aa0fba070069e\",\"output\":\"list\",\"data\":{}}]},\"container\":{\"connections\":[{\"node\":\"9de5622b3e543a8a\",\"output\":\"result\",\"data\":{}}]}},\"position\":[1052.8239083530739,9110.88729112261]},\"27161889f007dc04\":{\"id\":\"27161889f007dc04\",\"name\":\"bitbybit.babylon.gui.control.changeControlAlignment\",\"customName\":\"change control alignment\",\"async\":false,\"drawable\":false,\"data\":{\"genericNodeData\":{\"hide\":false,\"oneOnOne\":false,\"flatten\":0,\"forceExecution\":false},\"horizontalAlignment\":\"center\",\"verticalAlignment\":\"center\"},\"inputs\":{\"control\":{\"connections\":[{\"node\":\"9de26dfa0b6980e6\",\"output\":\"result\",\"data\":{}}]}},\"position\":[-269.69695321588506,8927.379602739795]},\"71fbc1ccee37d577\":{\"id\":\"71fbc1ccee37d577\",\"name\":\"bitbybit.babylon.gui.button.createSimpleButton\",\"customName\":\"simple button\",\"async\":false,\"drawable\":false,\"data\":{\"genericNodeData\":{\"hide\":false,\"oneOnOne\":false,\"flatten\":0,\"forceExecution\":false},\"name\":\"getStl\",\"label\":\"Get STL\",\"color\":\"white\",\"background\":\"black\",\"fontSize\":24},\"inputs\":{\"width\":{\"connections\":[{\"node\":\"9627abcea218d31f\",\"output\":\"result\",\"data\":{}}]},\"height\":{\"connections\":[{\"node\":\"5189291d4a0b99c3\",\"output\":\"result\",\"data\":{}}]},\"color\":{\"connections\":[{\"node\":\"14ea460327313f84\",\"output\":\"result\",\"data\":{}}]}},\"position\":[-906.6855973027857,10056.533240815332]},\"dfd5ec0585a0e37f\":{\"id\":\"dfd5ec0585a0e37f\",\"name\":\"bitbybit.babylon.gui.button.createSimpleButton\",\"customName\":\"simple button\",\"async\":false,\"drawable\":false,\"data\":{\"genericNodeData\":{\"hide\":false,\"oneOnOne\":false,\"flatten\":0,\"forceExecution\":false},\"name\":\"sourceCode\",\"label\":\"Source Code\",\"color\":\"white\",\"background\":\"black\",\"fontSize\":24},\"inputs\":{\"color\":{\"connections\":[{\"node\":\"14ea460327313f84\",\"output\":\"result\",\"data\":{}}]},\"height\":{\"connections\":[{\"node\":\"5189291d4a0b99c3\",\"output\":\"result\",\"data\":{}}]},\"width\":{\"connections\":[{\"node\":\"9627abcea218d31f\",\"output\":\"result\",\"data\":{}}]}},\"position\":[-906.7686354515675,10569.423308562755]},\"9de5622b3e543a8a\":{\"id\":\"9de5622b3e543a8a\",\"name\":\"bitbybit.babylon.gui.control.changeControlPadding\",\"customName\":\"change control padding\",\"async\":false,\"drawable\":false,\"data\":{\"genericNodeData\":{\"hide\":false,\"oneOnOne\":false,\"flatten\":0,\"forceExecution\":false}},\"inputs\":{\"paddingTop\":{\"connections\":[{\"node\":\"ce084356ce41072e\",\"output\":\"result\",\"data\":{}}]},\"control\":{\"connections\":[{\"node\":\"27161889f007dc04\",\"output\":\"result\",\"data\":{}}]},\"paddingLeft\":{\"connections\":[{\"node\":\"ce084356ce41072e\",\"output\":\"result\",\"data\":{}}]},\"paddingRight\":{\"connections\":[{\"node\":\"ce084356ce41072e\",\"output\":\"result\",\"data\":{}}]},\"paddingBottom\":{\"connections\":[{\"node\":\"ce084356ce41072e\",\"output\":\"result\",\"data\":{}}]}},\"position\":[386.5736003150091,9022.420560407636]},\"ce084356ce41072e\":{\"id\":\"ce084356ce41072e\",\"name\":\"bitbybit.text.create\",\"customName\":\"create\",\"async\":false,\"drawable\":false,\"data\":{\"genericNodeData\":{\"hide\":false,\"oneOnOne\":false,\"flatten\":0,\"forceExecution\":false},\"text\":\"0px\"},\"inputs\":{},\"position\":[-150.892111299047,9269.41326836467]},\"3b1402c27d9aa4d9\":{\"id\":\"3b1402c27d9aa4d9\",\"name\":\"bitbybit.babylon.gui.control.changeControlPadding\",\"customName\":\"change control padding\",\"async\":false,\"drawable\":false,\"data\":{\"genericNodeData\":{\"hide\":false,\"oneOnOne\":false,\"flatten\":0,\"forceExecution\":false}},\"inputs\":{\"paddingTop\":{\"connections\":[{\"node\":\"7c43fbf3b4039859\",\"output\":\"result\",\"data\":{}}]},\"control\":{\"connections\":[{\"node\":\"22b0aaced3db29ad\",\"output\":\"result\",\"data\":{}}]}},\"position\":[468.6889889862706,7806.3724958885105]},\"7c43fbf3b4039859\":{\"id\":\"7c43fbf3b4039859\",\"name\":\"bitbybit.text.create\",\"customName\":\"create\",\"async\":false,\"drawable\":false,\"data\":{\"genericNodeData\":{\"hide\":false,\"oneOnOne\":false,\"flatten\":0,\"forceExecution\":false},\"text\":\"40px\"},\"inputs\":{},\"position\":[38.94985237381003,8082.178454308819]},\"bf021b750fd00e30\":{\"id\":\"bf021b750fd00e30\",\"name\":\"bitbybit.text.create\",\"customName\":\"create\",\"async\":false,\"drawable\":false,\"data\":{\"genericNodeData\":{\"hide\":false,\"oneOnOne\":false,\"flatten\":0,\"forceExecution\":false},\"text\":\"45px\"},\"inputs\":{},\"position\":[-26.956821924678025,4278.492442388621]},\"f6b793e8e89edda0\":{\"id\":\"f6b793e8e89edda0\",\"name\":\"bitbybit.text.create\",\"customName\":\"create\",\"async\":false,\"drawable\":false,\"data\":{\"genericNodeData\":{\"hide\":false,\"oneOnOne\":false,\"flatten\":0,\"forceExecution\":false},\"text\":\"35px\"},\"inputs\":{},\"position\":[-204.24116761177675,5756.856375833485]},\"f1f8cf3eadfa0ebb\":{\"id\":\"f1f8cf3eadfa0ebb\",\"name\":\"bitbybit.babylon.gui.control.createControlObservableSelector\",\"customName\":\"control observable selector\",\"async\":false,\"drawable\":false,\"data\":{\"genericNodeData\":{\"hide\":false,\"oneOnOne\":false,\"flatten\":0,\"forceExecution\":false},\"selector\":\"onPointerUpObservable\"},\"inputs\":{},\"position\":[-284.4470112110814,10728.8905088672]},\"43441120529c36e3\":{\"id\":\"43441120529c36e3\",\"name\":\"bitbybit.flow.babylon.observableListener\",\"customName\":\"babylon observable listener\",\"data\":{},\"inputs\":{\"observableSelector\":{\"connections\":[{\"node\":\"f1f8cf3eadfa0ebb\",\"output\":\"result\",\"data\":{}}]},\"object\":{\"connections\":[{\"node\":\"dfd5ec0585a0e37f\",\"output\":\"result\",\"data\":{}}]}},\"position\":[379.3161481874706,10607.903050757823]},\"38f701184db60233\":{\"id\":\"38f701184db60233\",\"name\":\"bitbybit.flow.time.delay\",\"customName\":\"delay\",\"data\":{\"timeout\":0},\"inputs\":{\"exec\":{\"connections\":[{\"node\":\"43441120529c36e3\",\"output\":\"exec\",\"data\":{}}]}},\"position\":[933.2062286858425,10749.580736333644]},\"fbe1705ff510913a\":{\"id\":\"fbe1705ff510913a\",\"name\":\"bitbybit.flow.logic.flipFlop\",\"customName\":\"flip flop\",\"data\":{},\"inputs\":{\"exec\":{\"connections\":[{\"node\":\"43441120529c36e3\",\"output\":\"exec\",\"data\":{}},{\"node\":\"38f701184db60233\",\"output\":\"exec\",\"data\":{}}]}},\"position\":[1286.7786245546422,10638.06142237177]},\"83ffa041662302e3\":{\"id\":\"83ffa041662302e3\",\"name\":\"bitbybit.code.typeScriptEditor\",\"customName\":\"typescript editor\",\"async\":true,\"drawable\":true,\"data\":{\"genericNodeData\":{\"hide\":false,\"oneOnOne\":false,\"flatten\":0,\"forceExecution\":true},\"code\":{\"code\":\"// DO NOT REMOVE THIS FUNCTION\\nconst start83ffa041662302e3 = async (inputs: any, index: number) => {\\n // ADD YOUR CODE HERE\\n if (inputs === true) {\\n window.open(\\\"https://bitbybit.dev/app/bitbybit/KtIymkYFZ8Qty9h8mhew/Y7NQIgaXLy0dqffnc825?editor=rete\\\", '_blank').focus();\\n }\\n return inputs;\\n}\"}},\"inputs\":{\"inputs\":{\"connections\":[{\"node\":\"fbe1705ff510913a\",\"output\":\"isA\",\"data\":{}}]},\"exec\":{\"connections\":[{\"node\":\"fbe1705ff510913a\",\"output\":\"execA\",\"data\":{}},{\"node\":\"fbe1705ff510913a\",\"output\":\"execB\",\"data\":{}}]}},\"position\":[1749.7763306366996,10636.786904135595]},\"af7350efdb0b85b3\":{\"id\":\"af7350efdb0b85b3\",\"name\":\"bitbybit.babylon.gui.control.createControlObservableSelector\",\"customName\":\"control observable selector\",\"async\":false,\"drawable\":false,\"data\":{\"genericNodeData\":{\"hide\":false,\"oneOnOne\":false,\"flatten\":0,\"forceExecution\":false},\"selector\":\"onPointerUpObservable\"},\"inputs\":{},\"position\":[686.4715121547069,8508.681235887017]},\"f2e18ffd18566787\":{\"id\":\"f2e18ffd18566787\",\"name\":\"bitbybit.flow.babylon.observableListener\",\"customName\":\"babylon observable listener\",\"data\":{},\"inputs\":{\"object\":{\"connections\":[{\"node\":\"22b0aaced3db29ad\",\"output\":\"result\",\"data\":{}}]},\"observableSelector\":{\"connections\":[{\"node\":\"af7350efdb0b85b3\",\"output\":\"result\",\"data\":{}}]}},\"position\":[1453.070365919411,8258.538315404885]},\"70259fc69f3db105\":{\"id\":\"70259fc69f3db105\",\"name\":\"bitbybit.flow.time.delay\",\"customName\":\"delay\",\"data\":{\"timeout\":0},\"inputs\":{\"exec\":{\"connections\":[{\"node\":\"f2e18ffd18566787\",\"output\":\"exec\",\"data\":{}}]}},\"position\":[1987.6045976314351,8437.042718662588]},\"291c95f88aae5725\":{\"id\":\"291c95f88aae5725\",\"name\":\"bitbybit.flow.logic.flipFlop\",\"customName\":\"flip flop\",\"data\":{},\"inputs\":{\"exec\":{\"connections\":[{\"node\":\"70259fc69f3db105\",\"output\":\"exec\",\"data\":{}},{\"node\":\"f2e18ffd18566787\",\"output\":\"exec\",\"data\":{}}]}},\"position\":[2323.4070267726706,8288.053843144928]},\"ac5f02670de06852\":{\"id\":\"ac5f02670de06852\",\"name\":\"bitbybit.code.typeScriptEditor\",\"customName\":\"typescript editor\",\"async\":true,\"drawable\":true,\"data\":{\"genericNodeData\":{\"hide\":false,\"oneOnOne\":false,\"flatten\":0,\"forceExecution\":true},\"code\":{\"code\":\"// DO NOT REMOVE THIS FUNCTION\\nconst startac5f02670de06852 = async (inputs: any, index: number) => {\\n // ADD YOUR CODE HERE\\n if (inputs === true) {\\n window.open(\\\"https://bitbybit.dev/auth/sign-up\\\", '_blank').focus();\\n }\\n return inputs;\\n}\"}},\"inputs\":{\"inputs\":{\"connections\":[{\"node\":\"291c95f88aae5725\",\"output\":\"isA\",\"data\":{}}]},\"exec\":{\"connections\":[{\"node\":\"291c95f88aae5725\",\"output\":\"execA\",\"data\":{}},{\"node\":\"291c95f88aae5725\",\"output\":\"execB\",\"data\":{}}]}},\"position\":[2681.990286952205,8287.587249893892]},\"b5af9279ffdd84e5\":{\"id\":\"b5af9279ffdd84e5\",\"name\":\"bitbybit.babylon.scene.enableSkybox\",\"customName\":\"enable skybox\",\"async\":false,\"drawable\":false,\"data\":{\"genericNodeData\":{\"hide\":false,\"oneOnOne\":false,\"flatten\":0,\"forceExecution\":false},\"skybox\":\"city\",\"size\":1000,\"blur\":0.5,\"environmentIntensity\":0.7,\"hideSkybox\":false},\"inputs\":{},\"position\":[2884.1306675480555,-186.0490873535386]},\"9dca219fedacecca\":{\"id\":\"9dca219fedacecca\",\"name\":\"bitbybit.flow.babylon.observableListener\",\"customName\":\"babylon observable listener\",\"data\":{},\"inputs\":{\"observableSelector\":{\"connections\":[{\"node\":\"f1f8cf3eadfa0ebb\",\"output\":\"result\",\"data\":{}}]},\"object\":{\"connections\":[{\"node\":\"71fbc1ccee37d577\",\"output\":\"result\",\"data\":{}}]}},\"position\":[385.9268891419183,10329.874563653837]},\"bb201b1ec9f17a1e\":{\"id\":\"bb201b1ec9f17a1e\",\"name\":\"bitbybit.flow.babylon.observableListener\",\"customName\":\"babylon observable listener\",\"data\":{},\"inputs\":{\"observableSelector\":{\"connections\":[{\"node\":\"f1f8cf3eadfa0ebb\",\"output\":\"result\",\"data\":{}}]},\"object\":{\"connections\":[{\"node\":\"fc36f702c3f8146e\",\"output\":\"result\",\"data\":{}}]}},\"position\":[394.16500271911553,10076.96114156523]},\"4a5d1c196a0b447e\":{\"id\":\"4a5d1c196a0b447e\",\"name\":\"bitbybit.flow.time.delay\",\"customName\":\"delay\",\"data\":{\"timeout\":0},\"inputs\":{\"exec\":{\"connections\":[{\"node\":\"9dca219fedacecca\",\"output\":\"exec\",\"data\":{}}]}},\"position\":[936.4095297912264,10457.862715124222]},\"4fd171db189ad173\":{\"id\":\"4fd171db189ad173\",\"name\":\"bitbybit.flow.logic.flipFlop\",\"customName\":\"flip flop\",\"data\":{},\"inputs\":{\"exec\":{\"connections\":[{\"node\":\"9dca219fedacecca\",\"output\":\"exec\",\"data\":{}},{\"node\":\"4a5d1c196a0b447e\",\"output\":\"exec\",\"data\":{}}]}},\"position\":[1273.654131279585,10355.281487174021]},\"94b6dd1354940df2\":{\"id\":\"94b6dd1354940df2\",\"name\":\"bitbybit.flow.time.delay\",\"customName\":\"delay\",\"data\":{\"timeout\":0},\"inputs\":{\"exec\":{\"connections\":[{\"node\":\"bb201b1ec9f17a1e\",\"output\":\"exec\",\"data\":{}}]}},\"position\":[926.4956949832613,10212.522265939324]},\"27eac850201a9701\":{\"id\":\"27eac850201a9701\",\"name\":\"bitbybit.flow.logic.flipFlop\",\"customName\":\"flip flop\",\"data\":{},\"inputs\":{\"exec\":{\"connections\":[{\"node\":\"bb201b1ec9f17a1e\",\"output\":\"exec\",\"data\":{}},{\"node\":\"94b6dd1354940df2\",\"output\":\"exec\",\"data\":{}}]}},\"position\":[1272.0778730255988,10103.055278248028]},\"9190095ec9cfd394\":{\"id\":\"9190095ec9cfd394\",\"name\":\"bitbybit.logic.valueGate\",\"customName\":\"value gate\",\"async\":false,\"drawable\":false,\"data\":{\"genericNodeData\":{\"hide\":false,\"oneOnOne\":false,\"flatten\":0,\"forceExecution\":false},\"boolean\":false},\"inputs\":{\"value\":{\"connections\":[{\"node\":\"73ee3cd6670755bb\",\"output\":\"result\",\"data\":{}}]},\"boolean\":{\"connections\":[{\"node\":\"27eac850201a9701\",\"output\":\"isA\",\"data\":{}}]},\"exec\":{\"connections\":[{\"node\":\"27eac850201a9701\",\"output\":\"execA\",\"data\":{}},{\"node\":\"27eac850201a9701\",\"output\":\"execB\",\"data\":{}}]}},\"position\":[2098.7596218076405,9630.876889007699]},\"73ee3cd6670755bb\":{\"id\":\"73ee3cd6670755bb\",\"name\":\"bitbybit.text.create\",\"customName\":\"create\",\"async\":false,\"drawable\":false,\"data\":{\"genericNodeData\":{\"hide\":false,\"oneOnOne\":false,\"flatten\":0,\"forceExecution\":false},\"text\":\"bitbybit-toy.step\"},\"inputs\":{},\"position\":[1701.8222304032442,9540.575618331815]},\"f9a87606405961ae\":{\"id\":\"f9a87606405961ae\",\"name\":\"bitbybit.text.create\",\"customName\":\"create\",\"async\":false,\"drawable\":false,\"data\":{\"genericNodeData\":{\"hide\":false,\"oneOnOne\":false,\"flatten\":0,\"forceExecution\":false},\"text\":\"bitbybit-toy.stl\"},\"inputs\":{},\"position\":[1934.0481177357838,10057.705993169464]},\"f8db44954a566616\":{\"id\":\"f8db44954a566616\",\"name\":\"bitbybit.logic.valueGate\",\"customName\":\"value gate\",\"async\":false,\"drawable\":false,\"data\":{\"genericNodeData\":{\"hide\":false,\"oneOnOne\":false,\"flatten\":0,\"forceExecution\":false},\"boolean\":false},\"inputs\":{\"value\":{\"connections\":[{\"node\":\"f9a87606405961ae\",\"output\":\"result\",\"data\":{}}]},\"boolean\":{\"connections\":[{\"node\":\"4fd171db189ad173\",\"output\":\"isA\",\"data\":{}}]},\"exec\":{\"connections\":[{\"node\":\"4fd171db189ad173\",\"output\":\"execA\",\"data\":{}},{\"node\":\"4fd171db189ad173\",\"output\":\"execB\",\"data\":{}}]}},\"position\":[2360.5651787274305,10179.991268481712]},\"7ae3f1f373ab7ce8\":{\"id\":\"7ae3f1f373ab7ce8\",\"name\":\"bitbybit.occt.io.saveShapeSTEPAndReturn\",\"customName\":\"save shape step and return\",\"async\":true,\"drawable\":false,\"data\":{\"genericNodeData\":{\"hide\":false,\"oneOnOne\":false,\"flatten\":0,\"forceExecution\":false},\"fileName\":\"\",\"adjustYtoZ\":true,\"fromRightHanded\":false,\"tryDownload\":true},\"inputs\":{\"shape\":{\"connections\":[{\"node\":\"ff3a5dfe26c1203f\",\"output\":\"result\",\"data\":{}}]},\"fileName\":{\"connections\":[{\"node\":\"9190095ec9cfd394\",\"output\":\"result\",\"data\":{}}]},\"exec\":{\"connections\":[{\"node\":\"9190095ec9cfd394\",\"output\":\"exec\",\"data\":{}}]}},\"position\":[4105.580503617983,9860.933809645778]},\"b358af77da1782cf\":{\"id\":\"b358af77da1782cf\",\"name\":\"bitbybit.occt.io.saveShapeStl\",\"customName\":\"save shape stl\",\"async\":true,\"drawable\":false,\"data\":{\"genericNodeData\":{\"hide\":false,\"oneOnOne\":false,\"flatten\":0,\"forceExecution\":false},\"fileName\":\"shape.stl\",\"precision\":0.01,\"adjustYtoZ\":true,\"tryDownload\":true,\"binary\":true},\"inputs\":{\"fileName\":{\"connections\":[{\"node\":\"f8db44954a566616\",\"output\":\"result\",\"data\":{}}]},\"exec\":{\"connections\":[{\"node\":\"f8db44954a566616\",\"output\":\"exec\",\"data\":{}}]},\"shape\":{\"connections\":[{\"node\":\"ff3a5dfe26c1203f\",\"output\":\"result\",\"data\":{}}]}},\"position\":[4097.343815578738,10313.986149668373]},\"feef4ec0e40282e7\":{\"id\":\"feef4ec0e40282e7\",\"name\":\"bitbybit.math.number\",\"customName\":\"number\",\"async\":false,\"drawable\":false,\"data\":{\"genericNodeData\":{\"hide\":false,\"oneOnOne\":false,\"flatten\":0,\"forceExecution\":false},\"number\":0.5},\"inputs\":{},\"position\":[2389.4392361815517,2241.565476619029]},\"03303a3d3cb2a6b5\":{\"id\":\"03303a3d3cb2a6b5\",\"name\":\"bitbybit.json.parse\",\"customName\":\"parse\",\"async\":false,\"drawable\":false,\"data\":{\"genericNodeData\":{\"hide\":false,\"oneOnOne\":false,\"flatten\":0,\"forceExecution\":false},\"text\":\"[true,false,true,true]\"},\"inputs\":{},\"position\":[2389.302212365796,2597.6283579746796]},\"f39c312f7e1e1bef\":{\"id\":\"f39c312f7e1e1bef\",\"name\":\"bitbybit.flow.babylon.observableListener\",\"customName\":\"babylon observable listener\",\"data\":{},\"inputs\":{\"observableSelector\":{\"connections\":[{\"node\":\"19dd5abb3a2ed30a\",\"output\":\"result\",\"data\":{}}]},\"object\":{\"connections\":[{\"node\":\"dda72ba4bc855075\",\"output\":\"result\",\"data\":{}}]}},\"position\":[634.3045048773648,6411.35023828563]},\"19dd5abb3a2ed30a\":{\"id\":\"19dd5abb3a2ed30a\",\"name\":\"bitbybit.babylon.gui.slider.createSliderObservableSelector\",\"customName\":\"slider observable selector\",\"async\":false,\"drawable\":false,\"data\":{\"genericNodeData\":{\"hide\":false,\"oneOnOne\":false,\"flatten\":0,\"forceExecution\":false},\"selector\":\"onValueChangedObservable\"},\"inputs\":{},\"position\":[119.33402358269528,6252.634270289916]},\"3f3e9efb919889cb\":{\"id\":\"3f3e9efb919889cb\",\"name\":\"bitbybit.flow.babylon.observableListener\",\"customName\":\"babylon observable listener\",\"data\":{},\"inputs\":{\"observableSelector\":{\"connections\":[{\"node\":\"19dd5abb3a2ed30a\",\"output\":\"result\",\"data\":{}}]},\"object\":{\"connections\":[{\"node\":\"eb164cb9f2c3d0b2\",\"output\":\"result\",\"data\":{}}]}},\"position\":[626.2393558517689,6035.026931379336]},\"b85e303f418ea094\":{\"id\":\"b85e303f418ea094\",\"name\":\"bitbybit.flow.babylon.getEventDataFromObservedResult\",\"customName\":\"get event data\",\"async\":false,\"drawable\":false,\"data\":{\"genericNodeData\":{\"hide\":false,\"oneOnOne\":false,\"flatten\":0,\"forceExecution\":false}},\"inputs\":{\"json\":{\"connections\":[{\"node\":\"3f3e9efb919889cb\",\"output\":\"result\",\"data\":{}}]},\"exec\":{\"connections\":[{\"node\":\"3f3e9efb919889cb\",\"output\":\"exec\",\"data\":{}}]}},\"position\":[1213.8284182083087,6031.8004190176025]},\"0ae184887b347212\":{\"id\":\"0ae184887b347212\",\"name\":\"bitbybit.flow.babylon.getEventDataFromObservedResult\",\"customName\":\"get event data\",\"async\":false,\"drawable\":false,\"data\":{\"genericNodeData\":{\"hide\":false,\"oneOnOne\":false,\"flatten\":0,\"forceExecution\":false}},\"inputs\":{\"exec\":{\"connections\":[{\"node\":\"f39c312f7e1e1bef\",\"output\":\"exec\",\"data\":{}}]},\"json\":{\"connections\":[{\"node\":\"f39c312f7e1e1bef\",\"output\":\"result\",\"data\":{}}]}},\"position\":[1212.113699374194,6401.279001431719]},\"ffecd6164df0c288\":{\"id\":\"ffecd6164df0c288\",\"name\":\"bitbybit.logic.firstDefinedValueGate\",\"customName\":\"first defined value gate\",\"async\":false,\"drawable\":false,\"data\":{\"genericNodeData\":{\"hide\":false,\"oneOnOne\":false,\"flatten\":0,\"forceExecution\":false}},\"inputs\":{\"value1\":{\"connections\":[{\"node\":\"b85e303f418ea094\",\"output\":\"result\",\"data\":{}}]},\"value2\":{\"connections\":[{\"node\":\"6e51a85f13ab5259\",\"output\":\"result\",\"data\":{}}]},\"exec\":{\"connections\":[{\"node\":\"b85e303f418ea094\",\"output\":\"exec\",\"data\":{}}]}},\"position\":[1795.1547936226411,6012.662361553964]},\"d90e74b18631a7e7\":{\"id\":\"d90e74b18631a7e7\",\"name\":\"bitbybit.logic.firstDefinedValueGate\",\"customName\":\"first defined value gate\",\"async\":false,\"drawable\":false,\"data\":{\"genericNodeData\":{\"hide\":false,\"oneOnOne\":false,\"flatten\":0,\"forceExecution\":false}},\"inputs\":{\"exec\":{\"connections\":[{\"node\":\"0ae184887b347212\",\"output\":\"exec\",\"data\":{}}]},\"value2\":{\"connections\":[{\"node\":\"dc27ec58598933e4\",\"output\":\"result\",\"data\":{}}]},\"value1\":{\"connections\":[{\"node\":\"0ae184887b347212\",\"output\":\"result\",\"data\":{}}]}},\"position\":[1827.0393870782336,6490.834733956343]},\"9ed742a672a607ce\":{\"id\":\"9ed742a672a607ce\",\"name\":\"bitbybit.lists.createList\",\"customName\":\"create list\",\"data\":{},\"inputs\":{\"listElements\":{\"connections\":[{\"node\":\"ffecd6164df0c288\",\"output\":\"result\",\"data\":{}}]},\"exec\":{\"connections\":[{\"node\":\"ffecd6164df0c288\",\"output\":\"exec\",\"data\":{}}]}},\"position\":[2408.212815313349,6050.3207511429555]},\"48046af83dbc9299\":{\"id\":\"48046af83dbc9299\",\"name\":\"bitbybit.lists.createList\",\"customName\":\"create list\",\"data\":{},\"inputs\":{\"listElements\":{\"connections\":[{\"node\":\"d90e74b18631a7e7\",\"output\":\"result\",\"data\":{}}]},\"exec\":{\"connections\":[{\"node\":\"d90e74b18631a7e7\",\"output\":\"exec\",\"data\":{}}]}},\"position\":[2407.3069815807094,6523.841211518347]},\"46f99a9e9cfc9152\":{\"id\":\"46f99a9e9cfc9152\",\"name\":\"bitbybit.text.format\",\"customName\":\"format\",\"async\":false,\"drawable\":false,\"data\":{\"genericNodeData\":{\"hide\":false,\"oneOnOne\":false,\"flatten\":0,\"forceExecution\":false},\"text\":\"Number Of Rays - {0}\",\"values\":[\"World\"]},\"inputs\":{\"values\":{\"connections\":[{\"node\":\"9ed742a672a607ce\",\"output\":\"list\",\"data\":{}}]},\"exec\":{\"connections\":[{\"node\":\"9ed742a672a607ce\",\"output\":\"exec\",\"data\":{}}]}},\"position\":[2774.3846965928947,5974.2361780617475]},\"ced830dd20fb5b02\":{\"id\":\"ced830dd20fb5b02\",\"name\":\"bitbybit.text.format\",\"customName\":\"format\",\"async\":false,\"drawable\":false,\"data\":{\"genericNodeData\":{\"hide\":false,\"oneOnOne\":false,\"flatten\":0,\"forceExecution\":false},\"text\":\"Vertical Divsions - {0}\",\"values\":[\"World\"]},\"inputs\":{\"exec\":{\"connections\":[{\"node\":\"48046af83dbc9299\",\"output\":\"exec\",\"data\":{}}]},\"values\":{\"connections\":[{\"node\":\"48046af83dbc9299\",\"output\":\"list\",\"data\":{}}]}},\"position\":[2794.9763891153702,6450.397669292677]},\"af2cb4893a5bc1cb\":{\"id\":\"af2cb4893a5bc1cb\",\"name\":\"bitbybit.babylon.gui.textBlock.setText\",\"customName\":\"set text\",\"async\":false,\"drawable\":false,\"data\":{\"genericNodeData\":{\"hide\":false,\"oneOnOne\":false,\"flatten\":0,\"forceExecution\":false},\"text\":\"\"},\"inputs\":{\"text\":{\"connections\":[{\"node\":\"46f99a9e9cfc9152\",\"output\":\"result\",\"data\":{}}]},\"exec\":{\"connections\":[{\"node\":\"46f99a9e9cfc9152\",\"output\":\"exec\",\"data\":{}}]},\"textBlock\":{\"connections\":[{\"node\":\"f80263a3d6977ea4\",\"output\":\"result\",\"data\":{}}]}},\"position\":[3408.9286383465733,6175.853417797766]},\"bb5fa4b16d910cb5\":{\"id\":\"bb5fa4b16d910cb5\",\"name\":\"bitbybit.babylon.gui.textBlock.setText\",\"customName\":\"set text\",\"async\":false,\"drawable\":false,\"data\":{\"genericNodeData\":{\"hide\":false,\"oneOnOne\":false,\"flatten\":0,\"forceExecution\":false},\"text\":\"\"},\"inputs\":{\"textBlock\":{\"connections\":[{\"node\":\"a3006cf7f5041ef6\",\"output\":\"result\",\"data\":{}}]},\"text\":{\"connections\":[{\"node\":\"ced830dd20fb5b02\",\"output\":\"result\",\"data\":{}}]},\"exec\":{\"connections\":[{\"node\":\"ced830dd20fb5b02\",\"output\":\"exec\",\"data\":{}}]}},\"position\":[3443.5303027369487,6538.552534619226]},\"8ecfa2d91d973882\":{\"id\":\"8ecfa2d91d973882\",\"name\":\"bitbybit.babylon.gui.control.createControlObservableSelector\",\"customName\":\"control observable selector\",\"async\":false,\"drawable\":false,\"data\":{\"genericNodeData\":{\"hide\":false,\"oneOnOne\":false,\"flatten\":0,\"forceExecution\":false},\"selector\":\"onPointerUpObservable\"},\"inputs\":{},\"position\":[112.53197228874697,7216.911800887681]},\"8478c18af95701d2\":{\"id\":\"8478c18af95701d2\",\"name\":\"bitbybit.flow.babylon.observableListener\",\"customName\":\"babylon observable listener\",\"data\":{},\"inputs\":{\"observableSelector\":{\"connections\":[{\"node\":\"8ecfa2d91d973882\",\"output\":\"result\",\"data\":{}}]},\"object\":{\"connections\":[{\"node\":\"dda72ba4bc855075\",\"output\":\"result\",\"data\":{}}]}},\"position\":[666.0061734678349,7042.204203322666]},\"fa5a486b0621317a\":{\"id\":\"fa5a486b0621317a\",\"name\":\"bitbybit.flow.babylon.observableListener\",\"customName\":\"babylon observable listener\",\"data\":{},\"inputs\":{\"observableSelector\":{\"connections\":[{\"node\":\"8ecfa2d91d973882\",\"output\":\"result\",\"data\":{}}]},\"object\":{\"connections\":[{\"node\":\"eb164cb9f2c3d0b2\",\"output\":\"result\",\"data\":{}}]}},\"position\":[667.4427756519425,6826.609623951564]},\"7299a501c8e860c5\":{\"id\":\"7299a501c8e860c5\",\"name\":\"bitbybit.lists.passThrough\",\"customName\":\"pass through\",\"data\":{},\"inputs\":{\"exec\":{\"connections\":[{\"node\":\"fa5a486b0621317a\",\"output\":\"exec\",\"data\":{}},{\"node\":\"8478c18af95701d2\",\"output\":\"exec\",\"data\":{}}]}},\"position\":[6778.4019145441225,6945.999036012015]},\"68fc3da5a920f715\":{\"id\":\"68fc3da5a920f715\",\"name\":\"bitbybit.babylon.scene.adjustActiveArcRotateCamera\",\"customName\":\"adjust active arc rotate camera\",\"async\":false,\"drawable\":false,\"data\":{\"genericNodeData\":{\"hide\":false,\"oneOnOne\":false,\"flatten\":0,\"forceExecution\":false},\"position\":[10,10,10],\"lookAt\":[0,0,0],\"lowerBetaLimit\":1,\"upperBetaLimit\":179,\"angularSensibilityX\":1000,\"angularSensibilityY\":1000,\"maxZ\":1000,\"panningSensibility\":1000,\"wheelPrecision\":3},\"inputs\":{\"position\":{\"connections\":[{\"node\":\"2c23a73974610198\",\"output\":\"result\",\"data\":{}}]},\"lookAt\":{\"connections\":[{\"node\":\"4b908f56b3ed505c\",\"output\":\"result\",\"data\":{}}]}},\"position\":[2457.6836534900826,-2687.8751308577216]},\"2c23a73974610198\":{\"id\":\"2c23a73974610198\",\"name\":\"bitbybit.vector.vectorXYZ\",\"customName\":\"vector xyz\",\"async\":false,\"drawable\":true,\"data\":{\"genericNodeData\":{\"hide\":true,\"oneOnOne\":false,\"flatten\":0,\"forceExecution\":false},\"x\":30,\"y\":25,\"z\":0},\"inputs\":{},\"position\":[2028.1960653764377,-2763.197379436671]},\"4b908f56b3ed505c\":{\"id\":\"4b908f56b3ed505c\",\"name\":\"bitbybit.vector.vectorXYZ\",\"customName\":\"vector xyz\",\"async\":false,\"drawable\":true,\"data\":{\"genericNodeData\":{\"hide\":true,\"oneOnOne\":false,\"flatten\":0,\"forceExecution\":false},\"x\":0,\"y\":4,\"z\":0},\"inputs\":{},\"position\":[2033.62438677469,-2317.355175655833]}}}","type":"rete"}} title="Christmas tree ornament" /> diff --git a/docs/learn/code/common/occt/modeling/festive-decor/tree.md b/docs/learn/code/common/occt/modeling/festive-decor/tree.md index bc11ea9c8..ee98e2e94 100644 --- a/docs/learn/code/common/occt/modeling/festive-decor/tree.md +++ b/docs/learn/code/common/occt/modeling/festive-decor/tree.md @@ -28,21 +28,21 @@ Our tree starts with the `createChristmasTreeWire` function, which generates a s heightnrSkirtsthicknesstreeWireoffsetWirereversedWiretreeFacetreeSolidfinalTreedrawnTreeMeshheight8nrSkirts4thickness2treeWireheight1.53nrSkirts11FALSE0000010offsetWiretreeWire-0.20.1reversedWireoffsetWiretreeFacetreeWirereversedWireTRUEtreeSolidtreeFace00thicknessfinalTreetreeSolid00DIVIDENEGthickness2drawnTreeMeshfinalTree0.001Tree Material#ffffff#00ffcc0.80.991FALSE2TRUE#0000001drawnTreeMeshTRUE0.80TRUE","version":"0.21.0","type":"blockly"}} + script={{"script":"heightnrSkirtsthicknesstreeWireoffsetWirereversedWiretreeFacetreeSolidfinalTreedrawnTreeMeshheight8nrSkirts4thickness2treeWireheight1.53nrSkirts11FALSE0000010offsetWiretreeWire-0.20.1reversedWireoffsetWiretreeFacetreeWirereversedWireTRUEtreeSolidtreeFace00thicknessfinalTreetreeSolid00DIVIDENEGthickness2drawnTreeMeshfinalTree0.001Tree Material#ffffff#00ffcc0.80.991FALSE2TRUE#0000001drawnTreeMeshTRUE0.80TRUE","type":"blockly"}} title="Christmas tree ornament" /> {\n // Define control variables\n const height = 6.5;\n const nrSkirts = 5;\n const thickness = 0.5;\n\n // Create PBR material with emissive glow\n const materialOptions = new PBRMetallicRoughnessDto();\n materialOptions.name = \"Tree Material\";\n materialOptions.baseColor = \"#ffffff\";\n materialOptions.emissiveColor = \"#00ffcc\";\n materialOptions.metallic = 0.8;\n materialOptions.roughness = 0.99;\n materialOptions.alpha = 1;\n materialOptions.backFaceCulling = false;\n materialOptions.zOffset = 2;\n const material = bitbybit.babylon.material.pbrMetallicRoughness.create(materialOptions);\n\n // Create the Christmas tree wire\n const treeOptions = new ChristmasTreeDto();\n treeOptions.height = height;\n treeOptions.nrSkirts = nrSkirts;\n treeOptions.innerDist = 1.5;\n treeOptions.outerDist = 3;\n treeOptions.trunkHeight = 1;\n treeOptions.trunkWidth = 1;\n treeOptions.origin = [0, 0, 0];\n treeOptions.direction = [0, 1, 0];\n treeOptions.half = false;\n const treeWire = await wire.createChristmasTreeWire(treeOptions);\n\n // Create offset wire (inner boundary)\n const offsetOptions = new OffsetDto();\n offsetOptions.shape = treeWire;\n offsetOptions.distance = -0.2;\n offsetOptions.tolerance = 0.1;\n const offsetWire = await operations.offset(offsetOptions);\n\n // Reverse the inner wire for proper face creation\n const reversedWire = await wire.reversedWire({ shape: offsetWire });\n\n // Create face from both wires (outer and reversed inner)\n const faceOptions = new FaceFromWiresDto();\n faceOptions.shapes = [treeWire, reversedWire];\n faceOptions.planar = true;\n const treeFace = await face.createFaceFromWires(faceOptions);\n\n // Extrude the face to create thickness\n const extrudeOptions = new ExtrudeDto();\n extrudeOptions.shape = treeFace;\n extrudeOptions.direction = [0, 0, thickness];\n const treeSolid = await operations.extrude(extrudeOptions);\n\n // Translate to center the shape\n const translateOptions = new TranslateDto();\n translateOptions.shape = treeSolid;\n translateOptions.translation = [0, 0, -thickness / 2];\n const finalTree = await transforms.translate(translateOptions);\n\n // Draw with custom material and edge styling\n const drawOptions = new Bit.Inputs.Draw.DrawOcctShapeOptions();\n drawOptions.precision = 0.001;\n drawOptions.drawEdges = true;\n drawOptions.edgeColour = \"#000000\";\n drawOptions.edgeWidth = 1;\n drawOptions.faceMaterial = material;\n\n const drawnTreeMesh = await bitbybit.draw.drawAnyAsync({\n entity: finalTree,\n options: drawOptions\n });\n\n const zoomOptions = new ZoomOnDto([drawnTreeMesh]);\n bitbybit.advanced.navigation.zoomOn(zoomOptions);\n}\n\nstart();","version":"0.21.0","type":"typescript"}} + script={{"script":"const { ChristmasTreeDto, OffsetDto, FaceFromWiresDto, ExtrudeDto, TranslateDto } = Bit.Inputs.OCCT;\nconst { PBRMetallicRoughnessDto } = Bit.Inputs.BabylonMaterial;\nconst { ZoomOnDto } = Bit.Advanced.Navigation;\n\ntype TopoDSWirePointer = Bit.Inputs.OCCT.TopoDSWirePointer;\ntype TopoDSFacePointer = Bit.Inputs.OCCT.TopoDSFacePointer;\ntype TopoDSShapePointer = Bit.Inputs.OCCT.TopoDSShapePointer;\n\nconst { wire, face } = bitbybit.occt.shapes;\nconst { operations, transforms } = bitbybit.occt;\n\nconst start = async () => {\n // Define control variables\n const height = 6.5;\n const nrSkirts = 5;\n const thickness = 0.5;\n\n // Create PBR material with emissive glow\n const materialOptions = new PBRMetallicRoughnessDto();\n materialOptions.name = \"Tree Material\";\n materialOptions.baseColor = \"#ffffff\";\n materialOptions.emissiveColor = \"#00ffcc\";\n materialOptions.metallic = 0.8;\n materialOptions.roughness = 0.99;\n materialOptions.alpha = 1;\n materialOptions.backFaceCulling = false;\n materialOptions.zOffset = 2;\n const material = bitbybit.babylon.material.pbrMetallicRoughness.create(materialOptions);\n\n // Create the Christmas tree wire\n const treeOptions = new ChristmasTreeDto();\n treeOptions.height = height;\n treeOptions.nrSkirts = nrSkirts;\n treeOptions.innerDist = 1.5;\n treeOptions.outerDist = 3;\n treeOptions.trunkHeight = 1;\n treeOptions.trunkWidth = 1;\n treeOptions.origin = [0, 0, 0];\n treeOptions.direction = [0, 1, 0];\n treeOptions.half = false;\n const treeWire = await wire.createChristmasTreeWire(treeOptions);\n\n // Create offset wire (inner boundary)\n const offsetOptions = new OffsetDto();\n offsetOptions.shape = treeWire;\n offsetOptions.distance = -0.2;\n offsetOptions.tolerance = 0.1;\n const offsetWire = await operations.offset(offsetOptions);\n\n // Reverse the inner wire for proper face creation\n const reversedWire = await wire.reversedWire({ shape: offsetWire });\n\n // Create face from both wires (outer and reversed inner)\n const faceOptions = new FaceFromWiresDto();\n faceOptions.shapes = [treeWire, reversedWire];\n faceOptions.planar = true;\n const treeFace = await face.createFaceFromWires(faceOptions);\n\n // Extrude the face to create thickness\n const extrudeOptions = new ExtrudeDto();\n extrudeOptions.shape = treeFace;\n extrudeOptions.direction = [0, 0, thickness];\n const treeSolid = await operations.extrude(extrudeOptions);\n\n // Translate to center the shape\n const translateOptions = new TranslateDto();\n translateOptions.shape = treeSolid;\n translateOptions.translation = [0, 0, -thickness / 2];\n const finalTree = await transforms.translate(translateOptions);\n\n // Draw with custom material and edge styling\n const drawOptions = new Bit.Inputs.Draw.DrawOcctShapeOptions();\n drawOptions.precision = 0.001;\n drawOptions.drawEdges = true;\n drawOptions.edgeColour = \"#000000\";\n drawOptions.edgeWidth = 1;\n drawOptions.faceMaterial = material;\n\n const drawnTreeMesh = await bitbybit.draw.drawAnyAsync({\n entity: finalTree,\n options: drawOptions\n });\n\n const zoomOptions = new ZoomOnDto([drawnTreeMesh]);\n bitbybit.advanced.navigation.zoomOn(zoomOptions);\n}\n\nstart();","type":"typescript"}} title="Christmas tree ornament" /> diff --git a/docs/learn/code/common/occt/modeling/festive-decor/twisted-polygon-ornament.md b/docs/learn/code/common/occt/modeling/festive-decor/twisted-polygon-ornament.md index 95a0aaea7..0e9f70974 100644 --- a/docs/learn/code/common/occt/modeling/festive-decor/twisted-polygon-ornament.md +++ b/docs/learn/code/common/occt/modeling/festive-decor/twisted-polygon-ornament.md @@ -22,21 +22,21 @@ Create an elegant twisted ornament by systematically rotating and scaling hexago nrCornerswire1wire2wire3wire4list1list2ianglefactortempShapefinalListitemloftShapeunifiedShape'city'10000.230.7TRUEnrCorners6wire1000010nrCorners1wire200.10010nrCorners1wire300.20010nrCorners1wire400.30010nrCorners1list1list2i0101angleMULTIPLYi9factorADDi1tempShapewire1001angletempShapetempShapefactorINSERTLASTlist1tempShapetempShapewire2001angletempShapetempShapefactorINSERTLASTlist1tempShapetempShapewire4001angletempShapetempShapefactorINSERTLASTlist2tempShapetempShapewire3001angletempShapetempShapefactorINSERTLASTlist2tempShapelist1list1TRUElist2list2TRUETRUEfinalListitemlist2INSERTLASTfinalListitemitemlist1INSERTLASTfinalListitemfinalListfinalListTRUEloftShapefinalListFALSETRUEFALSETRUE10FALSE31e-7approxCentripetalunifiedShapeloftShapeTRUETRUETRUEunifiedShape0.01Custom Material#94ffd1#0000000.90.31FALSE2TRUE#ffffff2","version":"0.21.0","type":"blockly"}} + script={{"script":"nrCornerswire1wire2wire3wire4list1list2ianglefactortempShapefinalListitemloftShapeunifiedShape'city'10000.230.7TRUEnrCorners6wire1000010nrCorners1wire200.10010nrCorners1wire300.20010nrCorners1wire400.30010nrCorners1list1list2i0101angleMULTIPLYi9factorADDi1tempShapewire1001angletempShapetempShapefactorINSERTLASTlist1tempShapetempShapewire2001angletempShapetempShapefactorINSERTLASTlist1tempShapetempShapewire4001angletempShapetempShapefactorINSERTLASTlist2tempShapetempShapewire3001angletempShapetempShapefactorINSERTLASTlist2tempShapelist1list1TRUElist2list2TRUETRUEfinalListitemlist2INSERTLASTfinalListitemitemlist1INSERTLASTfinalListitemfinalListfinalListTRUEloftShapefinalListFALSETRUEFALSETRUE10FALSE31e-7approxCentripetalunifiedShapeloftShapeTRUETRUETRUEunifiedShape0.01Custom Material#94ffd1#0000000.90.31FALSE2TRUE#ffffff2","type":"blockly"}} title="Twisted Polygon Ornament" /> {\n\n const skyboxOpt = new SkyboxDto();\n skyboxOpt.skybox = skyboxEnum.city;\n skyboxOpt.hideSkybox = true;\n bitbybit.babylon.scene.enableSkybox(skyboxOpt);\n\n const nrCorners = 6;\n\n // 1. Create Base Wires\n const ngonDto = new NGonWireDto();\n ngonDto.nrCorners = nrCorners;\n ngonDto.direction = [0, 1, 0];\n ngonDto.radius = 1;\n\n ngonDto.center = [0, 0, 0];\n const wire1 = await wire.createNGonWire(ngonDto);\n\n ngonDto.center = [0, 0.1, 0];\n const wire2 = await wire.createNGonWire(ngonDto);\n\n ngonDto.center = [0, 0.2, 0];\n const wire3 = await wire.createNGonWire(ngonDto);\n\n ngonDto.center = [0, 0.3, 0];\n const wire4 = await wire.createNGonWire(ngonDto);\n\n // 2. Generate Lists of Transformed Wires\n const list1: TopoDSShapePointer[] = [];\n const list2: TopoDSShapePointer[] = [];\n\n for (let i = 0; i <= 10; i++) {\n const angle = i * 9;\n const factor = i + 1;\n\n // Helper to rotate and scale\n const transform = async (w: TopoDSShapePointer) => {\n const rotDto = new RotateDto();\n rotDto.shape = w;\n rotDto.axis = [0, 0, 1];\n rotDto.angle = angle;\n const rotated = await transforms.rotate(rotDto);\n\n const scaleDto = new ScaleDto();\n scaleDto.shape = rotated;\n scaleDto.factor = factor;\n return await transforms.scale(scaleDto);\n };\n\n list1.push(await transform(wire1));\n list1.push(await transform(wire2));\n list2.push(await transform(wire3));\n list2.push(await transform(wire4));\n }\n\n // 3. Process Lists\n // Remove first item from list1\n list1.shift();\n // Reverse list2 and remove last item\n list2.reverse();\n list2.shift();\n list2.pop();\n\n // 4. Merge and Reverse Final List\n // Merge: list2 items then list1 items\n let finalList = [...list2, ...list1];\n\n // Reverse the final list for the loft direction\n finalList.reverse();\n\n // 5. Loft\n const loftDto = new LoftAdvancedDto();\n loftDto.shapes = finalList;\n loftDto.makeSolid = false;\n loftDto.closed = true;\n loftDto.periodic = false;\n loftDto.straight = true;\n loftDto.nrPeriodicSections = 10;\n loftDto.useSmoothing = false;\n loftDto.maxUDegree = 3;\n loftDto.tolerance = 1e-7;\n loftDto.parType = approxParametrizationTypeEnum.approxCentripetal;\n const loftShape = await operations.loftAdvanced(loftDto);\n\n // 6. Unify Domain\n const unifyDto = new UnifySameDomainDto();\n unifyDto.shape = loftShape;\n unifyDto.unifyEdges = true;\n unifyDto.unifyFaces = true;\n unifyDto.concatBSplines = true;\n const unifiedShape = await shape.unifySameDomain(unifyDto);\n\n // 7. Draw\n const materialOptions = new PBRMetallicRoughnessDto();\n materialOptions.name = 'Custom Material';\n materialOptions.baseColor = '#94ffd1';\n materialOptions.emissiveColor = '#000000';\n materialOptions.metallic = 0.9;\n materialOptions.roughness = 0.3;\n materialOptions.alpha = 1;\n materialOptions.backFaceCulling = false;\n materialOptions.zOffset = 2;\n const material = bitbybit.babylon.material.pbrMetallicRoughness.create(materialOptions);\n\n const drawOptions = new DrawOcctShapeOptions();\n drawOptions.precision = 0.01;\n drawOptions.drawEdges = true;\n drawOptions.edgeColour = '#ffffff';\n drawOptions.edgeWidth = 2;\n drawOptions.faceMaterial = material;\n\n const drawnMesh = await bitbybit.draw.drawAnyAsync({\n entity: unifiedShape,\n options: drawOptions,\n });\n\n const zoomDto = new ZoomOnDto();\n zoomDto.meshes = [drawnMesh];\n bitbybit.advanced.navigation.zoomOn(zoomDto);\n};\n\nstart();","version":"0.21.0","type":"typescript"}} +script={{"script":"const { NGonWireDto, RotateDto, ScaleDto, LoftAdvancedDto, UnifySameDomainDto } = Bit.Inputs.OCCT;\nconst { PBRMetallicRoughnessDto } = Bit.Inputs.BabylonMaterial;\nconst { SkyboxDto } = Bit.Inputs.BabylonScene;\nconst { DrawOcctShapeOptions } = Bit.Inputs.Draw;\nconst { skyboxEnum } = Bit.Inputs.Base;\nconst { ZoomOnDto } = Bit.Advanced.Navigation;\nconst { approxParametrizationTypeEnum } = Bit.Inputs.OCCT;\ntype TopoDSShapePointer = Bit.Inputs.OCCT.TopoDSShapePointer;\n\nconst { wire, shape } = bitbybit.occt.shapes;\nconst { operations, transforms } = bitbybit.occt;\n\nconst start = async () => {\n\n const skyboxOpt = new SkyboxDto();\n skyboxOpt.skybox = skyboxEnum.city;\n skyboxOpt.hideSkybox = true;\n bitbybit.babylon.scene.enableSkybox(skyboxOpt);\n\n const nrCorners = 6;\n\n // 1. Create Base Wires\n const ngonDto = new NGonWireDto();\n ngonDto.nrCorners = nrCorners;\n ngonDto.direction = [0, 1, 0];\n ngonDto.radius = 1;\n\n ngonDto.center = [0, 0, 0];\n const wire1 = await wire.createNGonWire(ngonDto);\n\n ngonDto.center = [0, 0.1, 0];\n const wire2 = await wire.createNGonWire(ngonDto);\n\n ngonDto.center = [0, 0.2, 0];\n const wire3 = await wire.createNGonWire(ngonDto);\n\n ngonDto.center = [0, 0.3, 0];\n const wire4 = await wire.createNGonWire(ngonDto);\n\n // 2. Generate Lists of Transformed Wires\n const list1: TopoDSShapePointer[] = [];\n const list2: TopoDSShapePointer[] = [];\n\n for (let i = 0; i <= 10; i++) {\n const angle = i * 9;\n const factor = i + 1;\n\n // Helper to rotate and scale\n const transform = async (w: TopoDSShapePointer) => {\n const rotDto = new RotateDto();\n rotDto.shape = w;\n rotDto.axis = [0, 0, 1];\n rotDto.angle = angle;\n const rotated = await transforms.rotate(rotDto);\n\n const scaleDto = new ScaleDto();\n scaleDto.shape = rotated;\n scaleDto.factor = factor;\n return await transforms.scale(scaleDto);\n };\n\n list1.push(await transform(wire1));\n list1.push(await transform(wire2));\n list2.push(await transform(wire3));\n list2.push(await transform(wire4));\n }\n\n // 3. Process Lists\n // Remove first item from list1\n list1.shift();\n // Reverse list2 and remove last item\n list2.reverse();\n list2.shift();\n list2.pop();\n\n // 4. Merge and Reverse Final List\n // Merge: list2 items then list1 items\n let finalList = [...list2, ...list1];\n\n // Reverse the final list for the loft direction\n finalList.reverse();\n\n // 5. Loft\n const loftDto = new LoftAdvancedDto();\n loftDto.shapes = finalList;\n loftDto.makeSolid = false;\n loftDto.closed = true;\n loftDto.periodic = false;\n loftDto.straight = true;\n loftDto.nrPeriodicSections = 10;\n loftDto.useSmoothing = false;\n loftDto.maxUDegree = 3;\n loftDto.tolerance = 1e-7;\n loftDto.parType = approxParametrizationTypeEnum.approxCentripetal;\n const loftShape = await operations.loftAdvanced(loftDto);\n\n // 6. Unify Domain\n const unifyDto = new UnifySameDomainDto();\n unifyDto.shape = loftShape;\n unifyDto.unifyEdges = true;\n unifyDto.unifyFaces = true;\n unifyDto.concatBSplines = true;\n const unifiedShape = await shape.unifySameDomain(unifyDto);\n\n // 7. Draw\n const materialOptions = new PBRMetallicRoughnessDto();\n materialOptions.name = 'Custom Material';\n materialOptions.baseColor = '#94ffd1';\n materialOptions.emissiveColor = '#000000';\n materialOptions.metallic = 0.9;\n materialOptions.roughness = 0.3;\n materialOptions.alpha = 1;\n materialOptions.backFaceCulling = false;\n materialOptions.zOffset = 2;\n const material = bitbybit.babylon.material.pbrMetallicRoughness.create(materialOptions);\n\n const drawOptions = new DrawOcctShapeOptions();\n drawOptions.precision = 0.01;\n drawOptions.drawEdges = true;\n drawOptions.edgeColour = '#ffffff';\n drawOptions.edgeWidth = 2;\n drawOptions.faceMaterial = material;\n\n const drawnMesh = await bitbybit.draw.drawAnyAsync({\n entity: unifiedShape,\n options: drawOptions,\n });\n\n const zoomDto = new ZoomOnDto();\n zoomDto.meshes = [drawnMesh];\n bitbybit.advanced.navigation.zoomOn(zoomDto);\n};\n\nstart();","type":"typescript"}} title="Twisted Polygon Ornament" /> diff --git a/docs/learn/code/common/occt/modeling/hollow-shapes/hexagon-hive-flat.md b/docs/learn/code/common/occt/modeling/hollow-shapes/hexagon-hive-flat.md index 7b1fcd988..9767e1b98 100644 --- a/docs/learn/code/common/occt/modeling/hollow-shapes/hexagon-hive-flat.md +++ b/docs/learn/code/common/occt/modeling/hollow-shapes/hexagon-hive-flat.md @@ -22,21 +22,21 @@ Flat hexagon hive construction creates optimized honeycomb panels by treating th widthheightnrHexWidthnrHexHeightwiresHexLargewiresHexSmallrandomHeightshexagonFacesiwidth10height20nrHexWidth10nrHexHeight20wiresHexLargewidthheightnrHexWidthnrHexHeightFALSEFALSEFALSEFALSEFALSEwiresHexSmallwidthheightnrHexWidthnrHexHeightFALSEFALSEFALSEFALSEFALSE0.70.7randomHeights12wiresHexLargehexagonFacesi1wiresHexLarge1INSERTLASThexagonFacesGETFROM_STARTwiresHexLargeiGETFROM_STARTwiresHexSmalliTRUEhexagonFaces1e-7TRUETRUETRUE010","version":"0.21.0","type":"blockly"}} + script={{"script":"widthheightnrHexWidthnrHexHeightwiresHexLargewiresHexSmallrandomHeightshexagonFacesiwidth10height20nrHexWidth10nrHexHeight20wiresHexLargewidthheightnrHexWidthnrHexHeightFALSEFALSEFALSEFALSEFALSEwiresHexSmallwidthheightnrHexWidthnrHexHeightFALSEFALSEFALSEFALSEFALSE0.70.7randomHeights12wiresHexLargehexagonFacesi1wiresHexLarge1INSERTLASThexagonFacesGETFROM_STARTwiresHexLargeiGETFROM_STARTwiresHexSmalliTRUEhexagonFaces1e-7TRUETRUETRUE010","type":"blockly"}} title="Hexagon hive" /> {\n // Create hexagonal grid parameters\n const gridWidth = 10;\n const gridHeight = 20;\n const hexagonsInWidth = 10;\n const hexagonsInHeight = 20;\n\n // Generate large hexagonal wire grid (outer walls)\n const hexGridLargeOptions = new HexagonsInGridDto();\n hexGridLargeOptions.width = gridWidth;\n hexGridLargeOptions.height = gridHeight;\n hexGridLargeOptions.nrHexagonsInWidth = hexagonsInWidth;\n hexGridLargeOptions.nrHexagonsInHeight = hexagonsInHeight;\n hexGridLargeOptions.flatTop = false;\n hexGridLargeOptions.extendTop = false;\n hexGridLargeOptions.extendBottom = false;\n hexGridLargeOptions.extendLeft = false;\n hexGridLargeOptions.extendRight = false;\n\n const wiresHexLarge = await wire.hexagonsInGrid(hexGridLargeOptions);\n\n // Generate small hexagonal wire grid (inner holes)\n const hexGridSmallOptions = new HexagonsInGridDto();\n hexGridSmallOptions.width = gridWidth;\n hexGridSmallOptions.height = gridHeight;\n hexGridSmallOptions.nrHexagonsInWidth = hexagonsInWidth;\n hexGridSmallOptions.nrHexagonsInHeight = hexagonsInHeight;\n hexGridSmallOptions.flatTop = false;\n hexGridSmallOptions.extendTop = false;\n hexGridSmallOptions.extendBottom = false;\n hexGridSmallOptions.extendLeft = false;\n hexGridSmallOptions.extendRight = false;\n hexGridSmallOptions.scalePatternWidth = [0.7];\n hexGridSmallOptions.scalePatternHeight = [0.7];\n\n const wiresHexSmall = await wire.hexagonsInGrid(hexGridSmallOptions);\n\n // Generate random heights for creating individual faces\n const randomHeights = math.randomNumbers({\n low: 1,\n high: 2,\n count: wiresHexLarge.length\n });\n\n // Create faces with holes for each hexagon cell\n const hexagonFaces: TopoDSFacePointer[] = [];\n for (let i = 0; i < wiresHexLarge.length; i++) {\n // Get the outer and inner wires for this cell\n const outerWire = wiresHexLarge[i];\n const innerWire = wiresHexSmall[i];\n\n // Reverse the inner wire to create a hole\n const reverseOptions = new ShapeDto();\n reverseOptions.shape = innerWire;\n const reversedInnerWire = await wire.reversedWire(reverseOptions);\n\n // Create face with hole\n const faceOptions = new FaceFromWiresDto();\n faceOptions.shapes = [outerWire, reversedInnerWire];\n faceOptions.planar = true;\n const hexFaceWithHole = await face.createFaceFromWires(faceOptions);\n\n hexagonFaces.push(hexFaceWithHole);\n }\n\n // Sew faces together\n const sewOptions = new SewDto(hexagonFaces);\n sewOptions.tolerance = 1e-7;\n const sewedFaces = await shell.sewFaces(sewOptions);\n\n // Unify same domain for cleaner geometry\n const unifyOptions = new UnifySameDomainDto();\n unifyOptions.shape = sewedFaces;\n unifyOptions.unifyEdges = true;\n unifyOptions.unifyFaces = true;\n unifyOptions.concatBSplines = true;\n const unifiedShape = await shape.unifySameDomain(unifyOptions);\n\n // Extrude the unified shape\n const extrudeOptions = new ExtrudeDto();\n extrudeOptions.shape = unifiedShape;\n extrudeOptions.direction = [0, 1, 0];\n const extrudedHive = await operations.extrude(extrudeOptions);\n\n // Draw the resulting flat hive structure\n bitbybit.draw.drawAnyAsync({\n entity: extrudedHive\n });\n}\n\n// Execute the function\nstart();","version":"0.21.0","type":"typescript"}} + script={{"script":"// Import required DTOs for hexagon grid creation and operations\nconst { HexagonsInGridDto, FaceFromWiresDto, ExtrudeDto, ShapesDto, SewDto, UnifySameDomainDto, ShapeDto } = Bit.Inputs.OCCT;\n// Import type definitions for type safety\ntype TopoDSWirePointer = Bit.Inputs.OCCT.TopoDSWirePointer;\ntype TopoDSFacePointer = Bit.Inputs.OCCT.TopoDSFacePointer;\ntype TopoDSShellPointer = Bit.Inputs.OCCT.TopoDSShellPointer;\ntype TopoDSSolidPointer = Bit.Inputs.OCCT.TopoDSSolidPointer;\n\n// Get access to OCCT modules and utilities\nconst { wire, face, shell, shape } = bitbybit.occt.shapes;\nconst { operations } = bitbybit.occt;\nconst { math } = bitbybit;\n\n// Define the main function to create a flat hexagon hive\nconst start = async () => {\n // Create hexagonal grid parameters\n const gridWidth = 10;\n const gridHeight = 20;\n const hexagonsInWidth = 10;\n const hexagonsInHeight = 20;\n\n // Generate large hexagonal wire grid (outer walls)\n const hexGridLargeOptions = new HexagonsInGridDto();\n hexGridLargeOptions.width = gridWidth;\n hexGridLargeOptions.height = gridHeight;\n hexGridLargeOptions.nrHexagonsInWidth = hexagonsInWidth;\n hexGridLargeOptions.nrHexagonsInHeight = hexagonsInHeight;\n hexGridLargeOptions.flatTop = false;\n hexGridLargeOptions.extendTop = false;\n hexGridLargeOptions.extendBottom = false;\n hexGridLargeOptions.extendLeft = false;\n hexGridLargeOptions.extendRight = false;\n\n const wiresHexLarge = await wire.hexagonsInGrid(hexGridLargeOptions);\n\n // Generate small hexagonal wire grid (inner holes)\n const hexGridSmallOptions = new HexagonsInGridDto();\n hexGridSmallOptions.width = gridWidth;\n hexGridSmallOptions.height = gridHeight;\n hexGridSmallOptions.nrHexagonsInWidth = hexagonsInWidth;\n hexGridSmallOptions.nrHexagonsInHeight = hexagonsInHeight;\n hexGridSmallOptions.flatTop = false;\n hexGridSmallOptions.extendTop = false;\n hexGridSmallOptions.extendBottom = false;\n hexGridSmallOptions.extendLeft = false;\n hexGridSmallOptions.extendRight = false;\n hexGridSmallOptions.scalePatternWidth = [0.7];\n hexGridSmallOptions.scalePatternHeight = [0.7];\n\n const wiresHexSmall = await wire.hexagonsInGrid(hexGridSmallOptions);\n\n // Generate random heights for creating individual faces\n const randomHeights = math.randomNumbers({\n low: 1,\n high: 2,\n count: wiresHexLarge.length\n });\n\n // Create faces with holes for each hexagon cell\n const hexagonFaces: TopoDSFacePointer[] = [];\n for (let i = 0; i < wiresHexLarge.length; i++) {\n // Get the outer and inner wires for this cell\n const outerWire = wiresHexLarge[i];\n const innerWire = wiresHexSmall[i];\n\n // Reverse the inner wire to create a hole\n const reverseOptions = new ShapeDto();\n reverseOptions.shape = innerWire;\n const reversedInnerWire = await wire.reversedWire(reverseOptions);\n\n // Create face with hole\n const faceOptions = new FaceFromWiresDto();\n faceOptions.shapes = [outerWire, reversedInnerWire];\n faceOptions.planar = true;\n const hexFaceWithHole = await face.createFaceFromWires(faceOptions);\n\n hexagonFaces.push(hexFaceWithHole);\n }\n\n // Sew faces together\n const sewOptions = new SewDto(hexagonFaces);\n sewOptions.tolerance = 1e-7;\n const sewedFaces = await shell.sewFaces(sewOptions);\n\n // Unify same domain for cleaner geometry\n const unifyOptions = new UnifySameDomainDto();\n unifyOptions.shape = sewedFaces;\n unifyOptions.unifyEdges = true;\n unifyOptions.unifyFaces = true;\n unifyOptions.concatBSplines = true;\n const unifiedShape = await shape.unifySameDomain(unifyOptions);\n\n // Extrude the unified shape\n const extrudeOptions = new ExtrudeDto();\n extrudeOptions.shape = unifiedShape;\n extrudeOptions.direction = [0, 1, 0];\n const extrudedHive = await operations.extrude(extrudeOptions);\n\n // Draw the resulting flat hive structure\n bitbybit.draw.drawAnyAsync({\n entity: extrudedHive\n });\n}\n\n// Execute the function\nstart();","type":"typescript"}} title="Hexagon hive" /> diff --git a/docs/learn/code/common/occt/modeling/hollow-shapes/hexagon-hive.md b/docs/learn/code/common/occt/modeling/hollow-shapes/hexagon-hive.md index 62b6f954f..24d6a8928 100644 --- a/docs/learn/code/common/occt/modeling/hollow-shapes/hexagon-hive.md +++ b/docs/learn/code/common/occt/modeling/hollow-shapes/hexagon-hive.md @@ -22,21 +22,21 @@ Moving beyond simple perforated patterns, three-dimensional hive structures crea widthheightnrHexWidthnrHexHeightwiresHexLargewiresHexSmallrandomHeightshexagons3DicompoundShapeForFastRenderingwidth10height20nrHexWidth10nrHexHeight20wiresHexLargewidthheightnrHexWidthnrHexHeightFALSEFALSEFALSEFALSEFALSEwiresHexSmallwidthheightnrHexWidthnrHexHeightFALSEFALSEFALSEFALSEFALSE0.80.8randomHeights12wiresHexLargehexagons3Di1wiresHexLarge1INSERTLASThexagons3DGETFROM_STARTwiresHexLargeiGETFROM_STARTwiresHexSmalliTRUE0GETFROM_STARTrandomHeightsi0compoundShapeForFastRenderinghexagons3DcompoundShapeForFastRendering","version":"0.21.0","type":"blockly"}} + script={{"script":"widthheightnrHexWidthnrHexHeightwiresHexLargewiresHexSmallrandomHeightshexagons3DicompoundShapeForFastRenderingwidth10height20nrHexWidth10nrHexHeight20wiresHexLargewidthheightnrHexWidthnrHexHeightFALSEFALSEFALSEFALSEFALSEwiresHexSmallwidthheightnrHexWidthnrHexHeightFALSEFALSEFALSEFALSEFALSE0.80.8randomHeights12wiresHexLargehexagons3Di1wiresHexLarge1INSERTLASThexagons3DGETFROM_STARTwiresHexLargeiGETFROM_STARTwiresHexSmalliTRUE0GETFROM_STARTrandomHeightsi0compoundShapeForFastRenderinghexagons3DcompoundShapeForFastRendering","type":"blockly"}} title="Hexagon hive" /> {\n // Create hexagonal grid parameters\n const gridWidth = 10;\n const gridHeight = 20;\n const hexagonsInWidth = 10;\n const hexagonsInHeight = 20;\n\n // Generate large hexagonal wire grid (outer walls)\n const hexGridLargeOptions = new HexagonsInGridDto();\n hexGridLargeOptions.width = gridWidth;\n hexGridLargeOptions.height = gridHeight;\n hexGridLargeOptions.nrHexagonsInWidth = hexagonsInWidth;\n hexGridLargeOptions.nrHexagonsInHeight = hexagonsInHeight;\n\n const wiresHexLarge = await wire.hexagonsInGrid(hexGridLargeOptions);\n\n // Generate small hexagonal wire grid (inner holes)\n const hexGridSmallOptions = new HexagonsInGridDto();\n hexGridSmallOptions.width = gridWidth;\n hexGridSmallOptions.height = gridHeight;\n hexGridSmallOptions.nrHexagonsInWidth = hexagonsInWidth;\n hexGridSmallOptions.nrHexagonsInHeight = hexagonsInHeight;\n hexGridSmallOptions.scalePatternWidth = [0.8];\n hexGridSmallOptions.scalePatternHeight = [0.8];\n\n const wiresHexSmall = await wire.hexagonsInGrid(hexGridSmallOptions);\n\n // Generate random heights for each hexagon cell\n const randomHeights = math.randomNumbers({\n low: 1,\n high: 2,\n count: wiresHexLarge.length\n });\n\n // Process each hexagon to create 3D cells with holes\n const hexagons3D: TopoDSSolidPointer[] = [];\n\n for (let i = 0; i < wiresHexLarge.length; i++) {\n // Get the outer and inner wires for this cell\n const outerWire = wiresHexLarge[i];\n const innerWire = wiresHexSmall[i];\n\n // Reverse the inner wire to create a hole\n const reverseOptions = new ShapeDto();\n reverseOptions.shape = innerWire;\n const reversedInnerWire = await wire.reversedWire(reverseOptions);\n\n // Create face with hole\n const faceOptions = new FaceFromWiresDto();\n faceOptions.shapes = [outerWire, reversedInnerWire];\n faceOptions.planar = true;\n const hexFaceWithHole = await face.createFaceFromWires(faceOptions);\n\n // Extrude the face with random height\n const extrudeOptions = new ExtrudeDto();\n extrudeOptions.shape = hexFaceWithHole;\n extrudeOptions.direction = [0, randomHeights[i], 0];\n\n const extrudedCell = await operations.extrude(extrudeOptions);\n hexagons3D.push(extrudedCell);\n }\n\n // Combine all extruded cells into a compound shape for fast rendering\n const compoundOptions = new CompoundShapesDto();\n compoundOptions.shapes = hexagons3D;\n const compoundShapeForFastRendering = await compound.makeCompound(compoundOptions);\n\n // Draw the resulting three-dimensional hive structure\n bitbybit.draw.drawAnyAsync({\n entity: compoundShapeForFastRendering\n });\n}\n\n// Execute the function\nstart();","version":"0.21.0","type":"typescript"}} + script={{"script":"// Import required DTOs for hexagon grid creation and operations\nconst { HexagonsInGridDto, FaceFromWiresDto, ExtrudeDto, CompoundShapesDto, ShapeDto } = Bit.Inputs.OCCT;\n// Import type definitions for type safety\ntype TopoDSWirePointer = Bit.Inputs.OCCT.TopoDSWirePointer;\ntype TopoDSFacePointer = Bit.Inputs.OCCT.TopoDSFacePointer;\ntype TopoDSSolidPointer = Bit.Inputs.OCCT.TopoDSSolidPointer;\n\n// Get access to OCCT modules and utilities\nconst { wire, face, compound } = bitbybit.occt.shapes;\nconst { operations } = bitbybit.occt;\nconst { math } = bitbybit;\n\n// Define the main function to create a three-dimensional hexagon hive\nconst start = async () => {\n // Create hexagonal grid parameters\n const gridWidth = 10;\n const gridHeight = 20;\n const hexagonsInWidth = 10;\n const hexagonsInHeight = 20;\n\n // Generate large hexagonal wire grid (outer walls)\n const hexGridLargeOptions = new HexagonsInGridDto();\n hexGridLargeOptions.width = gridWidth;\n hexGridLargeOptions.height = gridHeight;\n hexGridLargeOptions.nrHexagonsInWidth = hexagonsInWidth;\n hexGridLargeOptions.nrHexagonsInHeight = hexagonsInHeight;\n\n const wiresHexLarge = await wire.hexagonsInGrid(hexGridLargeOptions);\n\n // Generate small hexagonal wire grid (inner holes)\n const hexGridSmallOptions = new HexagonsInGridDto();\n hexGridSmallOptions.width = gridWidth;\n hexGridSmallOptions.height = gridHeight;\n hexGridSmallOptions.nrHexagonsInWidth = hexagonsInWidth;\n hexGridSmallOptions.nrHexagonsInHeight = hexagonsInHeight;\n hexGridSmallOptions.scalePatternWidth = [0.8];\n hexGridSmallOptions.scalePatternHeight = [0.8];\n\n const wiresHexSmall = await wire.hexagonsInGrid(hexGridSmallOptions);\n\n // Generate random heights for each hexagon cell\n const randomHeights = math.randomNumbers({\n low: 1,\n high: 2,\n count: wiresHexLarge.length\n });\n\n // Process each hexagon to create 3D cells with holes\n const hexagons3D: TopoDSSolidPointer[] = [];\n\n for (let i = 0; i < wiresHexLarge.length; i++) {\n // Get the outer and inner wires for this cell\n const outerWire = wiresHexLarge[i];\n const innerWire = wiresHexSmall[i];\n\n // Reverse the inner wire to create a hole\n const reverseOptions = new ShapeDto();\n reverseOptions.shape = innerWire;\n const reversedInnerWire = await wire.reversedWire(reverseOptions);\n\n // Create face with hole\n const faceOptions = new FaceFromWiresDto();\n faceOptions.shapes = [outerWire, reversedInnerWire];\n faceOptions.planar = true;\n const hexFaceWithHole = await face.createFaceFromWires(faceOptions);\n\n // Extrude the face with random height\n const extrudeOptions = new ExtrudeDto();\n extrudeOptions.shape = hexFaceWithHole;\n extrudeOptions.direction = [0, randomHeights[i], 0];\n\n const extrudedCell = await operations.extrude(extrudeOptions);\n hexagons3D.push(extrudedCell);\n }\n\n // Combine all extruded cells into a compound shape for fast rendering\n const compoundOptions = new CompoundShapesDto();\n compoundOptions.shapes = hexagons3D;\n const compoundShapeForFastRendering = await compound.makeCompound(compoundOptions);\n\n // Draw the resulting three-dimensional hive structure\n bitbybit.draw.drawAnyAsync({\n entity: compoundShapeForFastRendering\n });\n}\n\n// Execute the function\nstart();","type":"typescript"}} title="Hexagon hive" /> diff --git a/docs/learn/code/common/occt/modeling/hollow-shapes/hexagon-holes-on-face.md b/docs/learn/code/common/occt/modeling/hollow-shapes/hexagon-holes-on-face.md index 7277fa02e..9a25f3581 100644 --- a/docs/learn/code/common/occt/modeling/hollow-shapes/hexagon-holes-on-face.md +++ b/docs/learn/code/common/occt/modeling/hollow-shapes/hexagon-holes-on-face.md @@ -22,21 +22,21 @@ Hexagonal patterns are found throughout nature - from honeycomb structures to cr recFacefacesrecFace2014000010facesrecFace1010[0.9][0.9]FALSEFALSE0.010.01GETFIRSTfaces010","version":"0.21.0","type":"blockly"}} + script={{"script":"recFacefacesrecFace2014000010facesrecFace1010[0.9][0.9]FALSEFALSE0.010.01GETFIRSTfaces010","type":"blockly"}} title="Hexagon holes on face" /> {\n // Create a rectangular face as the base shape\n const faceOptions = new RectangleDto();\n faceOptions.width = 20;\n faceOptions.length = 14;\n faceOptions.center = [0, 0, 0];\n faceOptions.direction = [0, 1, 0];\n const rectangleFace = await face.createRectangleFace(faceOptions);\n\n // Define scale patterns for U and V directions\n // For hexagons, uniform scaling often works best due to natural packing\n const scalePatternU = [0.9]; // Uniform hexagon size in U direction\n const scalePatternV = [0.9]; // Uniform hexagon size in V direction\n\n // Subdivide the face into hexagonal holes\n const subdivideOptions = new FaceSubdivideToHexagonHolesDto();\n subdivideOptions.shape = rectangleFace;\n subdivideOptions.nrHexagonsU = 10; // Number of hexagon divisions in U direction\n subdivideOptions.nrHexagonsV = 10; // Number of hexagon divisions in V direction\n subdivideOptions.flatU = false; // Pointy-top orientation (false) vs flat-top (true)\n subdivideOptions.holesToFaces = false; // Return wires instead of faces\n subdivideOptions.offsetFromBorderU = 0.01; // Small border offset in U direction\n subdivideOptions.offsetFromBorderV = 0.01; // Small border offset in V direction\n subdivideOptions.scalePatternU = scalePatternU;\n subdivideOptions.scalePatternV = scalePatternV;\n\n const holes = await face.subdivideToHexagonHoles(subdivideOptions);\n\n // Get the first hole (the outer boundary with hexagonal holes)\n const firstHole = lists.getItem({ list: holes, index: 0, clone: true });\n\n // Extrude the face with holes to create a 3D honeycomb structure\n const extrudeOptions = new ExtrudeDto();\n extrudeOptions.shape = firstHole;\n extrudeOptions.direction = [0, 1, 0];\n const extrudedSolid = await operations.extrude(extrudeOptions);\n\n // Draw the resulting 3D solid with hexagonal holes\n bitbybit.draw.drawAnyAsync({\n entity: extrudedSolid\n });\n}\n\n// Execute the function\nstart();","version":"0.21.0","type":"typescript"}} + script={{"script":"// Import required DTOs for face creation, subdivision, and extrusion\nconst { RectangleDto, FaceSubdivideToHexagonHolesDto, ExtrudeDto } = Bit.Inputs.OCCT;\n// Import type definitions for type safety\ntype TopoDSFacePointer = Bit.Inputs.OCCT.TopoDSFacePointer;\ntype TopoDSWirePointer = Bit.Inputs.OCCT.TopoDSWirePointer;\n\n// Get access to OCCT modules for face operations\nconst { face } = bitbybit.occt.shapes;\nconst { operations } = bitbybit.occt;\nconst { lists } = bitbybit;\n\n// Define the main function to create hexagon holes on a face\nconst start = async () => {\n // Create a rectangular face as the base shape\n const faceOptions = new RectangleDto();\n faceOptions.width = 20;\n faceOptions.length = 14;\n faceOptions.center = [0, 0, 0];\n faceOptions.direction = [0, 1, 0];\n const rectangleFace = await face.createRectangleFace(faceOptions);\n\n // Define scale patterns for U and V directions\n // For hexagons, uniform scaling often works best due to natural packing\n const scalePatternU = [0.9]; // Uniform hexagon size in U direction\n const scalePatternV = [0.9]; // Uniform hexagon size in V direction\n\n // Subdivide the face into hexagonal holes\n const subdivideOptions = new FaceSubdivideToHexagonHolesDto();\n subdivideOptions.shape = rectangleFace;\n subdivideOptions.nrHexagonsU = 10; // Number of hexagon divisions in U direction\n subdivideOptions.nrHexagonsV = 10; // Number of hexagon divisions in V direction\n subdivideOptions.flatU = false; // Pointy-top orientation (false) vs flat-top (true)\n subdivideOptions.holesToFaces = false; // Return wires instead of faces\n subdivideOptions.offsetFromBorderU = 0.01; // Small border offset in U direction\n subdivideOptions.offsetFromBorderV = 0.01; // Small border offset in V direction\n subdivideOptions.scalePatternU = scalePatternU;\n subdivideOptions.scalePatternV = scalePatternV;\n\n const holes = await face.subdivideToHexagonHoles(subdivideOptions);\n\n // Get the first hole (the outer boundary with hexagonal holes)\n const firstHole = lists.getItem({ list: holes, index: 0, clone: true });\n\n // Extrude the face with holes to create a 3D honeycomb structure\n const extrudeOptions = new ExtrudeDto();\n extrudeOptions.shape = firstHole;\n extrudeOptions.direction = [0, 1, 0];\n const extrudedSolid = await operations.extrude(extrudeOptions);\n\n // Draw the resulting 3D solid with hexagonal holes\n bitbybit.draw.drawAnyAsync({\n entity: extrudedSolid\n });\n}\n\n// Execute the function\nstart();","type":"typescript"}} title="Hexagon holes on face" /> diff --git a/docs/learn/code/common/occt/modeling/hollow-shapes/rectangle-holes-on-face.md b/docs/learn/code/common/occt/modeling/hollow-shapes/rectangle-holes-on-face.md index 8788f06f0..42500fe2b 100644 --- a/docs/learn/code/common/occt/modeling/hollow-shapes/rectangle-holes-on-face.md +++ b/docs/learn/code/common/occt/modeling/hollow-shapes/rectangle-holes-on-face.md @@ -22,21 +22,21 @@ Creating regular patterns of holes manually can be time-consuming and error-pron recFacefacesrecFace2014000010facesrecFace1010[0.8,0.5,0.5][0.8,0.5,0.5]FALSE00GETFIRSTfaces010","version":"0.21.0","type":"blockly"}} + script={{"script":"recFacefacesrecFace2014000010facesrecFace1010[0.8,0.5,0.5][0.8,0.5,0.5]FALSE00GETFIRSTfaces010","type":"blockly"}} title="Rectangle holes on face" /> {\n // Create a rectangular face as the base shape\n const faceOptions = new RectangleDto();\n faceOptions.width = 20;\n faceOptions.length = 14;\n faceOptions.center = [0, 0, 0];\n faceOptions.direction = [0, 1, 0];\n const rectangleFace = await face.createRectangleFace(faceOptions);\n\n // Define scale patterns for U and V directions\n // These arrays control the size of holes in each row and column\n const scalePatternU = [0.8, 0.5, 0.5]; // Varying hole sizes in U direction\n const scalePatternV = [0.8, 0.5, 0.5]; // Varying hole sizes in V direction\n\n // Subdivide the face into rectangular holes\n const subdivideOptions = new FaceSubdivideToRectangleHolesDto();\n subdivideOptions.shape = rectangleFace;\n subdivideOptions.nrRectanglesU = 10; // Number of divisions in U direction\n subdivideOptions.nrRectanglesV = 10; // Number of divisions in V direction\n subdivideOptions.holesToFaces = false; // Return wires instead of faces\n subdivideOptions.offsetFromBorderU = 0.05; // Border offset in U direction\n subdivideOptions.offsetFromBorderV = 0.05; // Border offset in V direction\n subdivideOptions.scalePatternU = scalePatternU;\n subdivideOptions.scalePatternV = scalePatternV;\n\n const holes = await face.subdivideToRectangleHoles(subdivideOptions);\n\n // Get the first hole (the outer boundary with holes)\n const firstHole = lists.getItem({ list: holes, index: 0, clone: true });\n\n // Extrude the face with holes to create a 3D solid\n const extrudeOptions = new ExtrudeDto();\n extrudeOptions.shape = firstHole;\n extrudeOptions.direction = [0, 1, 0];\n const extrudedSolid = await operations.extrude(extrudeOptions);\n\n // Draw the resulting 3D solid with rectangular holes\n bitbybit.draw.drawAnyAsync({\n entity: extrudedSolid\n });\n}\n\n// Execute the function\nstart();","version":"0.21.0","type":"typescript"}} + script={{"script":"// Import required DTOs for face creation, subdivision, and extrusion\nconst { RectangleDto, FaceSubdivideToRectangleHolesDto, ExtrudeDto } = Bit.Inputs.OCCT;\n// Import type definitions for type safety\ntype TopoDSFacePointer = Bit.Inputs.OCCT.TopoDSFacePointer;\ntype TopoDSWirePointer = Bit.Inputs.OCCT.TopoDSWirePointer;\n\n// Get access to OCCT modules for face operations\nconst { face } = bitbybit.occt.shapes;\nconst { operations } = bitbybit.occt;\nconst { lists } = bitbybit;\n\n// Define the main function to create rectangle holes on a face\nconst start = async () => {\n // Create a rectangular face as the base shape\n const faceOptions = new RectangleDto();\n faceOptions.width = 20;\n faceOptions.length = 14;\n faceOptions.center = [0, 0, 0];\n faceOptions.direction = [0, 1, 0];\n const rectangleFace = await face.createRectangleFace(faceOptions);\n\n // Define scale patterns for U and V directions\n // These arrays control the size of holes in each row and column\n const scalePatternU = [0.8, 0.5, 0.5]; // Varying hole sizes in U direction\n const scalePatternV = [0.8, 0.5, 0.5]; // Varying hole sizes in V direction\n\n // Subdivide the face into rectangular holes\n const subdivideOptions = new FaceSubdivideToRectangleHolesDto();\n subdivideOptions.shape = rectangleFace;\n subdivideOptions.nrRectanglesU = 10; // Number of divisions in U direction\n subdivideOptions.nrRectanglesV = 10; // Number of divisions in V direction\n subdivideOptions.holesToFaces = false; // Return wires instead of faces\n subdivideOptions.offsetFromBorderU = 0.05; // Border offset in U direction\n subdivideOptions.offsetFromBorderV = 0.05; // Border offset in V direction\n subdivideOptions.scalePatternU = scalePatternU;\n subdivideOptions.scalePatternV = scalePatternV;\n\n const holes = await face.subdivideToRectangleHoles(subdivideOptions);\n\n // Get the first hole (the outer boundary with holes)\n const firstHole = lists.getItem({ list: holes, index: 0, clone: true });\n\n // Extrude the face with holes to create a 3D solid\n const extrudeOptions = new ExtrudeDto();\n extrudeOptions.shape = firstHole;\n extrudeOptions.direction = [0, 1, 0];\n const extrudedSolid = await operations.extrude(extrudeOptions);\n\n // Draw the resulting 3D solid with rectangular holes\n bitbybit.draw.drawAnyAsync({\n entity: extrudedSolid\n });\n}\n\n// Execute the function\nstart();","type":"typescript"}} title="Rectangle holes on face" /> diff --git a/docs/learn/code/common/occt/modeling/hollow-shapes/simple-hole.md b/docs/learn/code/common/occt/modeling/hollow-shapes/simple-hole.md index cfc75d464..e51a5593a 100644 --- a/docs/learn/code/common/occt/modeling/hollow-shapes/simple-hole.md +++ b/docs/learn/code/common/occt/modeling/hollow-shapes/simple-hole.md @@ -30,21 +30,21 @@ This technique is fundamental because it establishes the basic principle that ap 200000107000010TRUE","version":"0.21.0","type":"blockly"}} + script={{"script":"200000107000010TRUE","type":"blockly"}} title="Simple hole from two wires" /> {\n // Create the outer square wire (boundary of the shape)\n const outerWireOptions = new SquareDto();\n outerWireOptions.size = 20;\n outerWireOptions.center = [0, 0, 0];\n outerWireOptions.direction = [0, 1, 0];\n const outerWire = await wire.createSquareWire(outerWireOptions);\n\n // Create the inner square wire (defines the hole)\n const innerWireOptions = new SquareDto();\n innerWireOptions.size = 7;\n innerWireOptions.center = [0, 0, 0];\n innerWireOptions.direction = [0, 1, 0];\n const innerWire = await wire.createSquareWire(innerWireOptions);\n\n // Reverse the inner wire - this is crucial for proper hole creation\n const reversedInnerWire = await wire.reversedWire({ shape: innerWire });\n\n // Create a face from both wires - outer boundary and inner hole\n const faceOptions = new FaceFromWiresDto();\n faceOptions.shapes = [outerWire, reversedInnerWire];\n faceOptions.planar = true;\n const faceWithHole = await face.createFaceFromWires(faceOptions);\n\n // Draw the resulting face with hole\n bitbybit.draw.drawAnyAsync({\n entity: faceWithHole\n });\n}\n\n// Execute the function\nstart();","version":"0.21.0","type":"typescript"}} + script={{"script":"// Import required types and DTOs for creating wire shapes and faces\nconst { SquareDto, FaceFromWiresDto } = Bit.Inputs.OCCT;\n// Import the wire pointer type for type safety\ntype TopoDSWirePointer = Bit.Inputs.OCCT.TopoDSWirePointer;\n\n// Get direct access to OCCT wire and face creation functions\nconst { wire } = bitbybit.occt.shapes;\nconst { face } = bitbybit.occt.shapes;\n\n// Define the main function to create a simple hole\nconst start = async () => {\n // Create the outer square wire (boundary of the shape)\n const outerWireOptions = new SquareDto();\n outerWireOptions.size = 20;\n outerWireOptions.center = [0, 0, 0];\n outerWireOptions.direction = [0, 1, 0];\n const outerWire = await wire.createSquareWire(outerWireOptions);\n\n // Create the inner square wire (defines the hole)\n const innerWireOptions = new SquareDto();\n innerWireOptions.size = 7;\n innerWireOptions.center = [0, 0, 0];\n innerWireOptions.direction = [0, 1, 0];\n const innerWire = await wire.createSquareWire(innerWireOptions);\n\n // Reverse the inner wire - this is crucial for proper hole creation\n const reversedInnerWire = await wire.reversedWire({ shape: innerWire });\n\n // Create a face from both wires - outer boundary and inner hole\n const faceOptions = new FaceFromWiresDto();\n faceOptions.shapes = [outerWire, reversedInnerWire];\n faceOptions.planar = true;\n const faceWithHole = await face.createFaceFromWires(faceOptions);\n\n // Draw the resulting face with hole\n bitbybit.draw.drawAnyAsync({\n entity: faceWithHole\n });\n}\n\n// Execute the function\nstart();","type":"typescript"}} title="Simple hole from two wires" /> @@ -60,21 +60,21 @@ The transition from a 2D hollow face to a 3D hollow solid is achieved through ex 2014000010177000010101045TRUE020","version":"0.21.0","type":"blockly"}} + script={{"script":"2014000010177000010101045TRUE020","type":"blockly"}} title="More complex solid with the hole" /> {\n // Create the outer rectangular wire\n const outerWireOptions = new RectangleDto();\n outerWireOptions.width = 20;\n outerWireOptions.length = 14;\n outerWireOptions.center = [0, 0, 0];\n outerWireOptions.direction = [0, 1, 0];\n const outerWire = await wire.createRectangleWire(outerWireOptions);\n\n // Apply fillet to the outer wire for rounded corners\n const outerFilletOptions = new FilletDto();\n outerFilletOptions.radius = 1;\n outerFilletOptions.shape = outerWire;\n const filletedOuterWire = await fillets.fillet2d(outerFilletOptions);\n\n // Create the inner rectangular wire (hole)\n const innerWireOptions = new RectangleDto();\n innerWireOptions.width = 7;\n innerWireOptions.length = 7;\n innerWireOptions.center = [0, 0, 0];\n innerWireOptions.direction = [0, 1, 0];\n const innerWire = await wire.createRectangleWire(innerWireOptions);\n\n // Apply fillet to the inner wire\n const innerFilletOptions = new FilletDto();\n innerFilletOptions.radius = 1;\n innerFilletOptions.shape = innerWire;\n const filletedInnerWire = await fillets.fillet2d(innerFilletOptions);\n\n // Rotate the inner wire by 45 degrees for visual interest\n const rotatedInnerWire = await transforms.rotate({\n shape: filletedInnerWire,\n axis: [0, 1, 0],\n angle: 45\n });\n\n // Reverse the rotated inner wire for proper hole creation\n const reversedInnerWire = await wire.reversedWire({ shape: rotatedInnerWire });\n\n // Create a face from both wires\n const faceOptions = new FaceFromWiresDto();\n faceOptions.shapes = [filletedOuterWire, reversedInnerWire];\n faceOptions.planar = true;\n const faceWithHole = await face.createFaceFromWires(faceOptions);\n\n // Extrude the face to create a 3D solid\n const extrudeOptions = new ExtrudeDto();\n extrudeOptions.shape = faceWithHole;\n extrudeOptions.direction = [0, 2, 0]; // Extrude 2 units in Y direction\n const solidWithHole = await operations.extrude(extrudeOptions);\n\n // Draw the resulting 3D solid with hole\n bitbybit.draw.drawAnyAsync({\n entity: solidWithHole\n });\n}\n\n// Execute the function\nstart();","version":"0.21.0","type":"typescript"}} + script={{"script":"// Import required DTOs for creating wires, fillets, faces, and extrusion operations\nconst { RectangleDto, FilletDto, FaceFromWiresDto, ExtrudeDto } = Bit.Inputs.OCCT;\n// Import wire pointer type for type safety\ntype TopoDSWirePointer = Bit.Inputs.OCCT.TopoDSWirePointer;\ntype TopoDSFacePointer = Bit.Inputs.OCCT.TopoDSFacePointer;\n\n// Get access to OCCT modules for creating shapes and operations\nconst { wire, face } = bitbybit.occt.shapes;\nconst { fillets, operations, transforms } = bitbybit.occt;\n\n// Define the main function to create an extruded solid with a hole\nconst start = async () => {\n // Create the outer rectangular wire\n const outerWireOptions = new RectangleDto();\n outerWireOptions.width = 20;\n outerWireOptions.length = 14;\n outerWireOptions.center = [0, 0, 0];\n outerWireOptions.direction = [0, 1, 0];\n const outerWire = await wire.createRectangleWire(outerWireOptions);\n\n // Apply fillet to the outer wire for rounded corners\n const outerFilletOptions = new FilletDto();\n outerFilletOptions.radius = 1;\n outerFilletOptions.shape = outerWire;\n const filletedOuterWire = await fillets.fillet2d(outerFilletOptions);\n\n // Create the inner rectangular wire (hole)\n const innerWireOptions = new RectangleDto();\n innerWireOptions.width = 7;\n innerWireOptions.length = 7;\n innerWireOptions.center = [0, 0, 0];\n innerWireOptions.direction = [0, 1, 0];\n const innerWire = await wire.createRectangleWire(innerWireOptions);\n\n // Apply fillet to the inner wire\n const innerFilletOptions = new FilletDto();\n innerFilletOptions.radius = 1;\n innerFilletOptions.shape = innerWire;\n const filletedInnerWire = await fillets.fillet2d(innerFilletOptions);\n\n // Rotate the inner wire by 45 degrees for visual interest\n const rotatedInnerWire = await transforms.rotate({\n shape: filletedInnerWire,\n axis: [0, 1, 0],\n angle: 45\n });\n\n // Reverse the rotated inner wire for proper hole creation\n const reversedInnerWire = await wire.reversedWire({ shape: rotatedInnerWire });\n\n // Create a face from both wires\n const faceOptions = new FaceFromWiresDto();\n faceOptions.shapes = [filletedOuterWire, reversedInnerWire];\n faceOptions.planar = true;\n const faceWithHole = await face.createFaceFromWires(faceOptions);\n\n // Extrude the face to create a 3D solid\n const extrudeOptions = new ExtrudeDto();\n extrudeOptions.shape = faceWithHole;\n extrudeOptions.direction = [0, 2, 0]; // Extrude 2 units in Y direction\n const solidWithHole = await operations.extrude(extrudeOptions);\n\n // Draw the resulting 3D solid with hole\n bitbybit.draw.drawAnyAsync({\n entity: solidWithHole\n });\n}\n\n// Execute the function\nstart();","type":"typescript"}} title="More complex solid with the hole" /> @@ -90,21 +90,21 @@ The process simply involves creating additional inner wires and including them a 231400001017700001010104550077000010101045-500TRUE020","version":"0.21.0","type":"blockly"}} + script={{"script":"231400001017700001010104550077000010101045-500TRUE020","type":"blockly"}} title="Solid with 2 holes" /> {\n // Create the outer rectangular wire (larger this time)\n const outerWireOptions = new RectangleDto();\n outerWireOptions.width = 23;\n outerWireOptions.length = 14;\n outerWireOptions.center = [0, 0, 0];\n outerWireOptions.direction = [0, 1, 0];\n const outerWire = await wire.createRectangleWire(outerWireOptions);\n\n // Apply fillet to the outer wire\n const outerFilletOptions = new FilletDto();\n outerFilletOptions.radius = 1;\n outerFilletOptions.shape = outerWire;\n const filletedOuterWire = await fillets.fillet2d(outerFilletOptions);\n\n // Reverse the outer wire (optimization - reverse once instead of multiple inner wires)\n const reversedOuterWire = await wire.reversedWire({ shape: filletedOuterWire });\n\n // Create the base inner rectangular wire\n const innerWireOptions = new RectangleDto();\n innerWireOptions.width = 7;\n innerWireOptions.length = 7;\n innerWireOptions.center = [0, 0, 0];\n innerWireOptions.direction = [0, 1, 0];\n const innerWire = await wire.createRectangleWire(innerWireOptions);\n\n // Apply fillet to the inner wire\n const innerFilletOptions = new FilletDto();\n innerFilletOptions.radius = 1;\n innerFilletOptions.shape = innerWire;\n const filletedInnerWire = await fillets.fillet2d(innerFilletOptions);\n\n // Rotate the inner wire for visual interest\n const rotatedInnerWire = await transforms.rotate({\n shape: filletedInnerWire,\n axis: [0, 1, 0],\n angle: 45\n });\n\n // Create first hole by translating the rotated wire to the right\n const firstHole = await transforms.translate({\n shape: rotatedInnerWire,\n translation: [5, 0, 0]\n });\n\n // Create second hole by translating the rotated wire to the left\n const secondHole = await transforms.translate({\n shape: rotatedInnerWire,\n translation: [-5, 0, 0]\n });\n\n // Create a face from the outer boundary and multiple holes\n const faceOptions = new FaceFromWiresDto();\n faceOptions.shapes = [reversedOuterWire, firstHole, secondHole];\n faceOptions.planar = true;\n const faceWithHoles = await face.createFaceFromWires(faceOptions);\n\n // Extrude the face to create a 3D solid with multiple holes\n const extrudeOptions = new ExtrudeDto();\n extrudeOptions.shape = faceWithHoles;\n extrudeOptions.direction = [0, 2, 0];\n const solidWithHoles = await operations.extrude(extrudeOptions);\n\n // Draw the resulting 3D solid with multiple holes\n bitbybit.draw.drawAnyAsync({\n entity: solidWithHoles\n });\n}\n\n// Execute the function\nstart();","version":"0.21.0","type":"typescript"}} + script={{"script":"// Import required DTOs for creating complex shapes with multiple holes\nconst { RectangleDto, FilletDto, FaceFromWiresDto, ExtrudeDto } = Bit.Inputs.OCCT;\n// Import type definitions for type safety\ntype TopoDSWirePointer = Bit.Inputs.OCCT.TopoDSWirePointer;\ntype TopoDSFacePointer = Bit.Inputs.OCCT.TopoDSFacePointer;\n\n// Get access to OCCT modules\nconst { wire, face } = bitbybit.occt.shapes;\nconst { fillets, operations, transforms } = bitbybit.occt;\n\n// Define the main function to create a solid with multiple holes\nconst start = async () => {\n // Create the outer rectangular wire (larger this time)\n const outerWireOptions = new RectangleDto();\n outerWireOptions.width = 23;\n outerWireOptions.length = 14;\n outerWireOptions.center = [0, 0, 0];\n outerWireOptions.direction = [0, 1, 0];\n const outerWire = await wire.createRectangleWire(outerWireOptions);\n\n // Apply fillet to the outer wire\n const outerFilletOptions = new FilletDto();\n outerFilletOptions.radius = 1;\n outerFilletOptions.shape = outerWire;\n const filletedOuterWire = await fillets.fillet2d(outerFilletOptions);\n\n // Reverse the outer wire (optimization - reverse once instead of multiple inner wires)\n const reversedOuterWire = await wire.reversedWire({ shape: filletedOuterWire });\n\n // Create the base inner rectangular wire\n const innerWireOptions = new RectangleDto();\n innerWireOptions.width = 7;\n innerWireOptions.length = 7;\n innerWireOptions.center = [0, 0, 0];\n innerWireOptions.direction = [0, 1, 0];\n const innerWire = await wire.createRectangleWire(innerWireOptions);\n\n // Apply fillet to the inner wire\n const innerFilletOptions = new FilletDto();\n innerFilletOptions.radius = 1;\n innerFilletOptions.shape = innerWire;\n const filletedInnerWire = await fillets.fillet2d(innerFilletOptions);\n\n // Rotate the inner wire for visual interest\n const rotatedInnerWire = await transforms.rotate({\n shape: filletedInnerWire,\n axis: [0, 1, 0],\n angle: 45\n });\n\n // Create first hole by translating the rotated wire to the right\n const firstHole = await transforms.translate({\n shape: rotatedInnerWire,\n translation: [5, 0, 0]\n });\n\n // Create second hole by translating the rotated wire to the left\n const secondHole = await transforms.translate({\n shape: rotatedInnerWire,\n translation: [-5, 0, 0]\n });\n\n // Create a face from the outer boundary and multiple holes\n const faceOptions = new FaceFromWiresDto();\n faceOptions.shapes = [reversedOuterWire, firstHole, secondHole];\n faceOptions.planar = true;\n const faceWithHoles = await face.createFaceFromWires(faceOptions);\n\n // Extrude the face to create a 3D solid with multiple holes\n const extrudeOptions = new ExtrudeDto();\n extrudeOptions.shape = faceWithHoles;\n extrudeOptions.direction = [0, 2, 0];\n const solidWithHoles = await operations.extrude(extrudeOptions);\n\n // Draw the resulting 3D solid with multiple holes\n bitbybit.draw.drawAnyAsync({\n entity: solidWithHoles\n });\n}\n\n// Execute the function\nstart();","type":"typescript"}} title="Solid with 2 holes" /> diff --git a/docs/learn/code/common/occt/modeling/hollow-shapes/simple-hollow-grids.md b/docs/learn/code/common/occt/modeling/hollow-shapes/simple-hollow-grids.md index ab2aead8d..b94c42d5a 100644 --- a/docs/learn/code/common/occt/modeling/hollow-shapes/simple-hollow-grids.md +++ b/docs/learn/code/common/occt/modeling/hollow-shapes/simple-hollow-grids.md @@ -30,21 +30,21 @@ This approach not only saves time but also ensures perfect regularity and makes gridSizeholeRadiusholeSpacingextrudeHeighthalfGridboundarySizesquarexPositionsyPositionswiresxzhollowFacehollowGridSolidgridSize14holeRadius0.8holeSpacing2extrudeHeight0.5halfGridDIVIDEgridSize2boundarySizeADDgridSize4squareboundarySize000010xPositionsholeSpacingNEGhalfGridhalfGridyPositionsholeSpacingNEGhalfGridhalfGridwiressquarex1xPositions1z1xPositions1INSERTLASTwiresholeRadiusGETFROM_STARTxPositionsx0GETFROM_STARTyPositionsz010hollowFacewiresTRUEhollowGridSolidhollowFace0extrudeHeight0hollowGridSolid","version":"0.21.0","type":"blockly"}} + script={{"script":"gridSizeholeRadiusholeSpacingextrudeHeighthalfGridboundarySizesquarexPositionsyPositionswiresxzhollowFacehollowGridSolidgridSize14holeRadius0.8holeSpacing2extrudeHeight0.5halfGridDIVIDEgridSize2boundarySizeADDgridSize4squareboundarySize000010xPositionsholeSpacingNEGhalfGridhalfGridyPositionsholeSpacingNEGhalfGridhalfGridwiressquarex1xPositions1z1xPositions1INSERTLASTwiresholeRadiusGETFROM_STARTxPositionsx0GETFROM_STARTyPositionsz010hollowFacewiresTRUEhollowGridSolidhollowFace0extrudeHeight0hollowGridSolid","type":"blockly"}} title="Simple hollow grid" /> {\n // Grid parameters - easily adjustable for different requirements\n const gridSize = 14; // Overall grid dimension\n const holeRadius = 0.8; // Radius of each circular hole\n const holeSpacing = 2; // Distance between hole centers\n const extrudeHeight = 0.5; // Thickness of the final solid\n \n // Calculate grid boundaries\n const halfGrid = gridSize / 2;\n const boundarySize = gridSize + 4; // Add padding around holes\n \n // Create the outer boundary wire (square frame)\n const boundaryOptions = new SquareDto();\n boundaryOptions.size = boundarySize;\n boundaryOptions.center = [0, 0, 0];\n boundaryOptions.direction = [0, 1, 0];\n const boundaryWire = await wire.createSquareWire(boundaryOptions);\n \n // Generate grid positions using span functions\n const xPositions = vector.span({\n min: -halfGrid,\n max: halfGrid,\n step: holeSpacing\n });\n \n const zPositions = vector.span({\n min: -halfGrid,\n max: halfGrid,\n step: holeSpacing\n });\n \n // Create grid points by combining X and Z coordinates\n const gridPoints: Point3[] = [];\n for (const xPos of xPositions) {\n for (const zPos of zPositions) {\n gridPoints.push([xPos, 0, zPos]);\n }\n }\n \n // Create the hole template (circular wire)\n const holeOptions = new CircleDto();\n holeOptions.radius = holeRadius;\n holeOptions.center = [0, 0, 0];\n holeOptions.direction = [0, 1, 0];\n const holeTemplate = await wire.createCircleWire(holeOptions);\n \n // Create holes at each grid position\n const holes: TopoDSWirePointer[] = [];\n for (const position of gridPoints) {\n const translatedHole = await transforms.translate({\n shape: holeTemplate,\n translation: position\n });\n \n // Reverse each hole wire for proper orientation\n const reversedHole = await wire.reversedWire({ shape: translatedHole });\n holes.push(reversedHole);\n }\n \n // Combine boundary and all holes into a single wire list\n const allWires = [boundaryWire, ...holes];\n \n // Create a face from the boundary and all holes\n const faceOptions = new FaceFromWiresDto();\n faceOptions.shapes = allWires;\n faceOptions.planar = true;\n const gridFace = await face.createFaceFromWires(faceOptions);\n \n // Extrude the face to create a 3D hollow grid\n const extrudeOptions = new ExtrudeDto();\n extrudeOptions.shape = gridFace;\n extrudeOptions.direction = [0, extrudeHeight, 0];\n const hollowGrid = await operations.extrude(extrudeOptions);\n \n // Draw the resulting hollow grid\n bitbybit.draw.drawAnyAsync({\n entity: hollowGrid\n });\n}\n\n// Execute the function\nstart();","version":"0.21.0","type":"typescript"}} + script={{"script":"// Import required DTOs for creating grids, shapes, and operations\nconst { SquareDto, CircleDto, FaceFromWiresDto, ExtrudeDto } = Bit.Inputs.OCCT;\n// Import type definitions for type safety\ntype Point3 = Bit.Inputs.Base.Point3;\ntype TopoDSWirePointer = Bit.Inputs.OCCT.TopoDSWirePointer;\ntype TopoDSFacePointer = Bit.Inputs.OCCT.TopoDSFacePointer;\n\n// Get access to OCCT modules and utility functions\nconst { wire, face } = bitbybit.occt.shapes;\nconst { operations, transforms } = bitbybit.occt;\nconst { vector } = bitbybit;\n\n// Define the main function to create a parametric hollow grid\nconst start = async () => {\n // Grid parameters - easily adjustable for different requirements\n const gridSize = 14; // Overall grid dimension\n const holeRadius = 0.8; // Radius of each circular hole\n const holeSpacing = 2; // Distance between hole centers\n const extrudeHeight = 0.5; // Thickness of the final solid\n \n // Calculate grid boundaries\n const halfGrid = gridSize / 2;\n const boundarySize = gridSize + 4; // Add padding around holes\n \n // Create the outer boundary wire (square frame)\n const boundaryOptions = new SquareDto();\n boundaryOptions.size = boundarySize;\n boundaryOptions.center = [0, 0, 0];\n boundaryOptions.direction = [0, 1, 0];\n const boundaryWire = await wire.createSquareWire(boundaryOptions);\n \n // Generate grid positions using span functions\n const xPositions = vector.span({\n min: -halfGrid,\n max: halfGrid,\n step: holeSpacing\n });\n \n const zPositions = vector.span({\n min: -halfGrid,\n max: halfGrid,\n step: holeSpacing\n });\n \n // Create grid points by combining X and Z coordinates\n const gridPoints: Point3[] = [];\n for (const xPos of xPositions) {\n for (const zPos of zPositions) {\n gridPoints.push([xPos, 0, zPos]);\n }\n }\n \n // Create the hole template (circular wire)\n const holeOptions = new CircleDto();\n holeOptions.radius = holeRadius;\n holeOptions.center = [0, 0, 0];\n holeOptions.direction = [0, 1, 0];\n const holeTemplate = await wire.createCircleWire(holeOptions);\n \n // Create holes at each grid position\n const holes: TopoDSWirePointer[] = [];\n for (const position of gridPoints) {\n const translatedHole = await transforms.translate({\n shape: holeTemplate,\n translation: position\n });\n \n // Reverse each hole wire for proper orientation\n const reversedHole = await wire.reversedWire({ shape: translatedHole });\n holes.push(reversedHole);\n }\n \n // Combine boundary and all holes into a single wire list\n const allWires = [boundaryWire, ...holes];\n \n // Create a face from the boundary and all holes\n const faceOptions = new FaceFromWiresDto();\n faceOptions.shapes = allWires;\n faceOptions.planar = true;\n const gridFace = await face.createFaceFromWires(faceOptions);\n \n // Extrude the face to create a 3D hollow grid\n const extrudeOptions = new ExtrudeDto();\n extrudeOptions.shape = gridFace;\n extrudeOptions.direction = [0, extrudeHeight, 0];\n const hollowGrid = await operations.extrude(extrudeOptions);\n \n // Draw the resulting hollow grid\n bitbybit.draw.drawAnyAsync({\n entity: hollowGrid\n });\n}\n\n// Execute the function\nstart();","type":"typescript"}} title="Simple hollow grid" /> diff --git a/docs/learn/code/common/occt/modeling/parametric-art/simple-flower.md b/docs/learn/code/common/occt/modeling/parametric-art/simple-flower.md index acaee7cbe..5ecdc67a4 100644 --- a/docs/learn/code/common/occt/modeling/parametric-art/simple-flower.md +++ b/docs/learn/code/common/occt/modeling/parametric-art/simple-flower.md @@ -30,21 +30,21 @@ This method is highly parametric—by adjusting the control points, rotation ang controlPointscurvemirrorNormalmirroredCurvecombinedWiresflowerFacethickFlowerrotationAxisrotationAnglesflowerPetalsanglerotatedPetalfinalFlowercontrolPoints00020.531.1-0.570010curvecontrolPointsFALSE1e-7mirrorNormal100mirroredCurvecurve000mirrorNormalcombinedWirescurvemirroredCurveflowerFacecombinedWiresFALSEthickFlowerflowerFace0.1rotationAxis220rotationAngles300360flowerPetalsangle1rotationAngles1rotatedPetalthickFlowerrotationAxisGETFROM_STARTrotationAnglesangleINSERTLASTflowerPetalsrotatedPetalfinalFlowerflowerPetalsfinalFlower0.01Custom Material#14ffa5#0000000.60.51FALSE2TRUE#0000002-100-100-1003#ffffff#ffffff1024TRUE0TRUE0.20.00010.00210000#090a0b#a4f9ef'to top'0100","version":"0.21.0","type":"blockly"}} + script={{"script":"controlPointscurvemirrorNormalmirroredCurvecombinedWiresflowerFacethickFlowerrotationAxisrotationAnglesflowerPetalsanglerotatedPetalfinalFlowercontrolPoints00020.531.1-0.570010curvecontrolPointsFALSE1e-7mirrorNormal100mirroredCurvecurve000mirrorNormalcombinedWirescurvemirroredCurveflowerFacecombinedWiresFALSEthickFlowerflowerFace0.1rotationAxis220rotationAngles300360flowerPetalsangle1rotationAngles1rotatedPetalthickFlowerrotationAxisGETFROM_STARTrotationAnglesangleINSERTLASTflowerPetalsrotatedPetalfinalFlowerflowerPetalsfinalFlower0.01Custom Material#14ffa5#0000000.60.51FALSE2TRUE#0000002-100-100-1003#ffffff#ffffff1024TRUE0TRUE0.20.00010.00210000#090a0b#a4f9ef'to top'0100","type":"blockly"}} title="Simple flower" /> {\n const backgroundOpt = new SceneTwoColorLinearGradientDto();\n backgroundOpt.colorFrom = \"#090a0b\";\n backgroundOpt.colorTo = \"#a4f9ef\";\n backgroundOpt.direction = gradientDirectionEnum.toTop;\n scene.twoColorLinearGradient(backgroundOpt);\n\n const dirLightOpt = new DirectionalLightDto();\n dirLightOpt.intensity = 3;\n scene.drawDirectionalLight(dirLightOpt);\n}\n\n// Define the main function to create a parametric flower\nconst start = async () => {\n createEnvironment();\n // Flower parameters - easily adjustable for different designs\n const thickness = 0.1; // Thickness of the flower petals\n const rotationStep = 30; // Degrees between each petal (12 petals total)\n const rotationAxis: Vector3 = [2, 2, 0]; // Axis for petal rotation\n\n // Define control points for the flower petal curve\n const controlPoints: Point3[] = [\n [0, 0, 0], // Start point (flower center)\n [2, 0.5, 3], // First control point (petal width)\n [1.1, -0.5, 7], // Second control point (petal curve)\n [0, 0, 10] // End point (petal tip)\n ];\n\n // Create interpolated curve through control points\n const curveOptions = new InterpolationDto();\n curveOptions.points = controlPoints;\n curveOptions.periodic = false;\n curveOptions.tolerance = 1e-7;\n const petalCurve = await wire.interpolatePoints(curveOptions);\n\n // Mirror the curve to create symmetry for the petal\n const mirrorOptions = new MirrorAlongNormalDto();\n mirrorOptions.shape = petalCurve;\n mirrorOptions.origin = [0, 0, 0];\n mirrorOptions.normal = [1, 0, 0]; // Mirror along X-axis\n const mirroredCurve = await transforms.mirrorAlongNormal(mirrorOptions);\n\n // Combine the original and mirrored curves into a single wire\n const combineOptions = new ShapesDto();\n combineOptions.shapes = [petalCurve, mirroredCurve];\n const combinedWire = await wire.combineEdgesAndWiresIntoAWire(combineOptions);\n\n // Create a face from the combined wire\n const faceOptions = new FaceFromWireDto();\n faceOptions.shape = combinedWire;\n faceOptions.planar = false; // Allow non-planar surface\n const petalFace = await face.createFaceFromWire(faceOptions);\n\n // Create a thick solid from the face\n const thickOptions = new ThisckSolidSimpleDto();\n thickOptions.shape = petalFace;\n thickOptions.offset = thickness;\n const thickPetal = await operations.makeThickSolidSimple(thickOptions);\n\n // Generate rotation angles for petals (0° to 360° in steps)\n const rotationAngles = vector.span({\n min: 0,\n max: 360,\n step: rotationStep\n });\n\n // Create all flower petals by rotating the base petal\n const flowerPetalPromises: Promise[] = [];\n for (const angle of rotationAngles) {\n const rotateOptions = new RotateDto();\n rotateOptions.shape = thickPetal;\n rotateOptions.axis = rotationAxis;\n rotateOptions.angle = angle;\n\n const rotatedPetal = transforms.rotate(rotateOptions);\n flowerPetalPromises.push(rotatedPetal);\n }\n\n const flowerPetals = await Promise.all(flowerPetalPromises);\n\n // Combine all petals into a single compound shape\n const compoundOptions = new CompoundShapesDto();\n compoundOptions.shapes = flowerPetals;\n const flower = await compound.makeCompound(compoundOptions);\n\n const pbrOptions = new Bit.Inputs.BabylonMaterial.PBRMetallicRoughnessDto();\n pbrOptions.baseColor = \"#14ffa5\";\n pbrOptions.metallic = 0.6;\n pbrOptions.roughness = 0.6;\n pbrOptions.zOffset = 2;\n const pbrMaterial = pbrMetallicRoughness.create(pbrOptions);\n\n const drawOpt = new Bit.Inputs.Draw.DrawOcctShapeMaterialOptions();\n drawOpt.faceMaterial = pbrMaterial;\n drawOpt.edgeColour = \"#000000\";\n\n // Draw the completed flower with material options\n bitbybit.draw.drawAnyAsync({\n entity: flower,\n options: drawOpt\n });\n}\n\n// Execute the flower creation function\nstart();","version":"0.21.0","type":"typescript"}} + script={{"script":"// Import required DTOs for creating curves, shapes, and operations\nconst { InterpolationDto, MirrorAlongNormalDto, ShapesDto, CompoundShapesDto,\n FaceFromWireDto, ThisckSolidSimpleDto, RotateDto } = Bit.Inputs.OCCT;\nconst { SceneTwoColorLinearGradientDto, DirectionalLightDto } = Bit.Inputs.BabylonScene;\nconst { gradientDirectionEnum } = Bit.Inputs.Base;\n\n// Import type definitions for type safety\ntype Point3 = Bit.Inputs.Base.Point3;\ntype Vector3 = Bit.Inputs.Base.Vector3;\ntype TopoDSWirePointer = Bit.Inputs.OCCT.TopoDSWirePointer;\ntype TopoDSFacePointer = Bit.Inputs.OCCT.TopoDSFacePointer;\ntype TopoDSShapePointer = Bit.Inputs.OCCT.TopoDSShapePointer;\n\n// Get access to OCCT modules and utility functions\nconst { wire, face, compound } = bitbybit.occt.shapes;\nconst { operations, transforms } = bitbybit.occt;\nconst { vector } = bitbybit;\nconst { scene } = bitbybit.babylon;\nconst { pbrMetallicRoughness } = bitbybit.babylon.material;\n\n\nconst createEnvironment = async () => {\n const backgroundOpt = new SceneTwoColorLinearGradientDto();\n backgroundOpt.colorFrom = \"#090a0b\";\n backgroundOpt.colorTo = \"#a4f9ef\";\n backgroundOpt.direction = gradientDirectionEnum.toTop;\n scene.twoColorLinearGradient(backgroundOpt);\n\n const dirLightOpt = new DirectionalLightDto();\n dirLightOpt.intensity = 3;\n scene.drawDirectionalLight(dirLightOpt);\n}\n\n// Define the main function to create a parametric flower\nconst start = async () => {\n createEnvironment();\n // Flower parameters - easily adjustable for different designs\n const thickness = 0.1; // Thickness of the flower petals\n const rotationStep = 30; // Degrees between each petal (12 petals total)\n const rotationAxis: Vector3 = [2, 2, 0]; // Axis for petal rotation\n\n // Define control points for the flower petal curve\n const controlPoints: Point3[] = [\n [0, 0, 0], // Start point (flower center)\n [2, 0.5, 3], // First control point (petal width)\n [1.1, -0.5, 7], // Second control point (petal curve)\n [0, 0, 10] // End point (petal tip)\n ];\n\n // Create interpolated curve through control points\n const curveOptions = new InterpolationDto();\n curveOptions.points = controlPoints;\n curveOptions.periodic = false;\n curveOptions.tolerance = 1e-7;\n const petalCurve = await wire.interpolatePoints(curveOptions);\n\n // Mirror the curve to create symmetry for the petal\n const mirrorOptions = new MirrorAlongNormalDto();\n mirrorOptions.shape = petalCurve;\n mirrorOptions.origin = [0, 0, 0];\n mirrorOptions.normal = [1, 0, 0]; // Mirror along X-axis\n const mirroredCurve = await transforms.mirrorAlongNormal(mirrorOptions);\n\n // Combine the original and mirrored curves into a single wire\n const combineOptions = new ShapesDto();\n combineOptions.shapes = [petalCurve, mirroredCurve];\n const combinedWire = await wire.combineEdgesAndWiresIntoAWire(combineOptions);\n\n // Create a face from the combined wire\n const faceOptions = new FaceFromWireDto();\n faceOptions.shape = combinedWire;\n faceOptions.planar = false; // Allow non-planar surface\n const petalFace = await face.createFaceFromWire(faceOptions);\n\n // Create a thick solid from the face\n const thickOptions = new ThisckSolidSimpleDto();\n thickOptions.shape = petalFace;\n thickOptions.offset = thickness;\n const thickPetal = await operations.makeThickSolidSimple(thickOptions);\n\n // Generate rotation angles for petals (0° to 360° in steps)\n const rotationAngles = vector.span({\n min: 0,\n max: 360,\n step: rotationStep\n });\n\n // Create all flower petals by rotating the base petal\n const flowerPetalPromises: Promise[] = [];\n for (const angle of rotationAngles) {\n const rotateOptions = new RotateDto();\n rotateOptions.shape = thickPetal;\n rotateOptions.axis = rotationAxis;\n rotateOptions.angle = angle;\n\n const rotatedPetal = transforms.rotate(rotateOptions);\n flowerPetalPromises.push(rotatedPetal);\n }\n\n const flowerPetals = await Promise.all(flowerPetalPromises);\n\n // Combine all petals into a single compound shape\n const compoundOptions = new CompoundShapesDto();\n compoundOptions.shapes = flowerPetals;\n const flower = await compound.makeCompound(compoundOptions);\n\n const pbrOptions = new Bit.Inputs.BabylonMaterial.PBRMetallicRoughnessDto();\n pbrOptions.baseColor = \"#14ffa5\";\n pbrOptions.metallic = 0.6;\n pbrOptions.roughness = 0.6;\n pbrOptions.zOffset = 2;\n const pbrMaterial = pbrMetallicRoughness.create(pbrOptions);\n\n const drawOpt = new Bit.Inputs.Draw.DrawOcctShapeMaterialOptions();\n drawOpt.faceMaterial = pbrMaterial;\n drawOpt.edgeColour = \"#000000\";\n\n // Draw the completed flower with material options\n bitbybit.draw.drawAnyAsync({\n entity: flower,\n options: drawOpt\n });\n}\n\n// Execute the flower creation function\nstart();","type":"typescript"}} title="Simple flower" /> @@ -107,7 +107,7 @@ Despite managing up to 25,000 particles simultaneously, the system maintains smo {\n const dirLightOpt = new DirectionalLightDto();\n dirLightOpt.intensity = 3;\n scene.drawDirectionalLight(dirLightOpt);\n}\n\n// Define the main function to create a parametric flower\nconst start = async () => {\n createEnvironment();\n // Flower parameters - easily adjustable for different designs\n const thickness = 0.1; // Thickness of the flower petals\n const rotationStep = 60; // Degrees between each petal (12 petals total)\n const rotationAxis: Vector3 = [2, 2, 0]; // Axis for petal rotation\n\n // Define control points for the flower petal curve\n const controlPoints: Point3[] = [\n [0, 0, 0], // Start point (flower center)\n [5, 1.25, 7.5], // First control point (petal width)\n [2.75, -1.25, 17.5], // Second control point (petal curve)\n [0, 0, 25] // End point (petal tip)\n ];\n\n // Create interpolated curve through control points\n const curveOptions = new InterpolationDto();\n curveOptions.points = controlPoints;\n curveOptions.periodic = false;\n curveOptions.tolerance = 1e-7;\n const petalCurve = await wire.interpolatePoints(curveOptions);\n\n // Mirror the curve to create symmetry for the petal\n const mirrorOptions = new MirrorAlongNormalDto();\n mirrorOptions.shape = petalCurve;\n mirrorOptions.origin = [0, 0, 0];\n mirrorOptions.normal = [1, 0, 0]; // Mirror along X-axis\n const mirroredCurve = await transforms.mirrorAlongNormal(mirrorOptions);\n\n // Combine the original and mirrored curves into a single wire\n const combineOptions = new ShapesDto();\n combineOptions.shapes = [petalCurve, mirroredCurve];\n const combinedWire = await wire.combineEdgesAndWiresIntoAWire(combineOptions);\n\n // Create a face from the combined wire\n const faceOptions = new FaceFromWireDto();\n faceOptions.shape = combinedWire;\n faceOptions.planar = false; // Allow non-planar surface\n const petalFace = await face.createFaceFromWire(faceOptions);\n\n // Create a thick solid from the face\n const thickOptions = new ThisckSolidSimpleDto();\n thickOptions.shape = petalFace;\n thickOptions.offset = thickness;\n const thickPetal = await operations.makeThickSolidSimple(thickOptions);\n\n // Generate rotation angles for petals (0° to 360° in steps)\n const rotationAngles = vector.span({\n min: 0,\n max: 360,\n step: rotationStep\n });\n\n const rotationAngles2 = vector.span({\n min: 30,\n max: 360,\n step: rotationStep\n });\n\n // Create all flower petals by rotating the base petal\n const flowerPetalPromises: Promise[] = [];\n const flowerPetalPromises2: Promise[] = [];\n\n for (const angle of rotationAngles) {\n const rotateOptions = new RotateDto();\n rotateOptions.shape = thickPetal;\n rotateOptions.axis = rotationAxis;\n rotateOptions.angle = angle;\n\n const rotatedPetal = transforms.rotate(rotateOptions);\n flowerPetalPromises.push(rotatedPetal);\n }\n\n for (const angle of rotationAngles2) {\n const rotateOptions = new RotateDto();\n rotateOptions.shape = thickPetal;\n rotateOptions.axis = rotationAxis;\n rotateOptions.angle = angle;\n\n const rotatedPetal = transforms.rotate(rotateOptions);\n flowerPetalPromises2.push(rotatedPetal);\n }\n\n const flowerPetals = await Promise.all(flowerPetalPromises);\n const flowerPetals2 = await Promise.all(flowerPetalPromises2);\n\n // Combine all petals into a single compound shape\n const compoundOptions = new CompoundShapesDto();\n compoundOptions.shapes = flowerPetals;\n const flower = await compound.makeCompound(compoundOptions);\n compoundOptions.shapes = flowerPetals2;\n const flower2 = await compound.makeCompound(compoundOptions);\n\n const pbrOptions = new Bit.Inputs.BabylonMaterial.PBRMetallicRoughnessDto();\n pbrOptions.baseColor = \"#111111\";\n pbrOptions.metallic = 0.6;\n pbrOptions.roughness = 0.6;\n pbrOptions.alpha = 0.4;\n pbrOptions.zOffset = 2;\n const pbrMaterial = pbrMetallicRoughness.create(pbrOptions);\n\n const drawOpt = new Bit.Inputs.Draw.DrawOcctShapeMaterialOptions();\n drawOpt.faceMaterial = pbrMaterial;\n drawOpt.edgeColour = \"#ffffff\";\n drawOpt.drawEdges = true;\n drawOpt.precision = 0.1;\n\n // Draw the completed flower with material options\n const flowerMesh = await bitbybit.draw.drawAnyAsync({\n entity: flower,\n options: drawOpt\n });\n\n const flowerMesh2 = await bitbybit.draw.drawAnyAsync({\n entity: flower2,\n options: drawOpt\n });\n\n const emitterMesh = flowerMesh.getChildMeshes()[0] as BABYLON.Mesh;\n emitterMesh.isPickable = false;\n\n const emitterMesh2 = flowerMesh2.getChildMeshes()[0] as BABYLON.Mesh;\n emitterMesh2.isPickable = false;\n\n const scene = bitbybit.babylon.scene.getScene();\n\n const purpleStartColor = new BABYLON.Color4(0.7, 0.3, 1.0, 1.0);\n const purpleMidColor = new BABYLON.Color4(1.0, 0.4, 0.8, 1.0);\n\n const blueStartColor = new BABYLON.Color4(0.2, 0.7, 1.0, 1.0);\n const blueMidColor = new BABYLON.Color4(0.5, 0.8, 1.0, 1.0);\n\n // This object will be shared with both particle systems to track the mouse.\n const mouseTracker = { position: null as BABYLON.Vector3 | null };\n\n // Create all the 3D assets: emitters, particle systems, and the interaction plane.\n\n // Remove any old observable before adding a new one.\n if (scene.metadata && scene.metadata.observable) {\n scene.metadata.observable.remove();\n }\n\n // Centralized mouse interaction logic.\n const resObs = scene.onPointerObservable.add((pointerInfo) => {\n if (pointerInfo.type === BABYLON.PointerEventTypes.POINTERMOVE) {\n // We only check for hits against our single, invisible interaction plane.\n const pickInfo = scene.pick(scene.pointerX, scene.pointerY, (mesh) => mesh === emitterMesh);\n if (pickInfo.hit) {\n // If we hit the plane, update the shared tracker object's position.\n mouseTracker.position = pickInfo.pickedPoint;\n } else {\n // If the mouse is not over the plane, clear the position.\n mouseTracker.position = null;\n }\n }\n });\n\n if (scene.metadata) {\n scene.metadata.observable = resObs;\n } else {\n scene.metadata = { observable: resObs };\n }\n\n createParticleSystemForMesh(emitterMesh, scene, purpleStartColor, purpleMidColor, mouseTracker);\n createParticleSystemForMesh(emitterMesh2, scene, blueStartColor, blueMidColor, mouseTracker);\n\n}\n\n// Execute the flower creation function\nstart();\n\n\n// The core particle system definition.\nfunction createParticleSystemForMesh(\n emitterMesh: BABYLON.Mesh,\n scene: BABYLON.Scene,\n animStartColor: BABYLON.Color4,\n animMidColor: BABYLON.Color4,\n mouseTracker: { position: BABYLON.Vector3 | null }\n): BABYLON.ParticleSystem {\n\n const animEndColor = new BABYLON.Color4(0.1, 0.2, 0.8, 0.0);\n const DRIFTER_CHANCE = 0.07;\n const DRIFTER_SPEED = 0.4;\n\n const particleSystem = new BABYLON.ParticleSystem(\"particles_\" + emitterMesh.name, 25000, scene);\n particleSystem.particleTexture = new BABYLON.Texture(\"https://assets.babylonjs.com/textures/flare.png\", scene);\n particleSystem.emitter = emitterMesh;\n particleSystem.particleEmitterType = createUniformMeshParticleEmitter(emitterMesh);\n\n particleSystem.color1 = animEndColor.clone();\n particleSystem.color2 = animEndColor.clone();\n particleSystem.colorDead = animEndColor.clone();\n particleSystem.minSize = 0;\n particleSystem.maxSize = 0;\n particleSystem.blendMode = BABYLON.ParticleSystem.BLENDMODE_ONEONE;\n particleSystem.minLifeTime = 4.0;\n particleSystem.maxLifeTime = 8.0;\n particleSystem.emitRate = 2000;\n particleSystem.minEmitPower = 0.1;\n particleSystem.maxEmitPower = 0.5;\n particleSystem.gravity = new BABYLON.Vector3(0, -1.0, 0);\n (particleSystem as any).dragFactor = 0.97;\n\n particleSystem.updateFunction = function (particles) {\n const repulsionRadius = 20.0, repulsionStrength = 30;\n const scaledUpdateSpeed = this._scaledUpdateSpeed;\n const mousePickPosition = mouseTracker.position;\n const regularStartSize = 0.35, regularEndSize = 0.1;\n const largeStartSize = 0.8, largeEndSize = 0.2;\n\n for (let index = 0; index < particles.length; index++) {\n const particle = particles[index] as Particle;\n particle.age += scaledUpdateSpeed;\n if (particle.age >= particle.lifeTime) {\n particles.splice(index, 1); this._stockParticles.push(particle); index--; continue;\n }\n\n if (particle.age === scaledUpdateSpeed) {\n particle.isLarge = (Math.random() < 0.05);\n particle.isDrifter = (Math.random() < DRIFTER_CHANCE);\n if (particle.isDrifter) {\n const driftVector = new BABYLON.Vector3(Math.random() - 0.5, Math.random() - 0.5, Math.random() - 0.5);\n particle.driftDirection = driftVector.normalize();\n }\n }\n\n particle.direction.scaleInPlace(this.dragFactor);\n if (particle.isDrifter) {\n const driftForce = particle.driftDirection.scale(DRIFTER_SPEED * scaledUpdateSpeed);\n particle.direction.addInPlace(driftForce);\n } else {\n particle.direction.addInPlace(this.gravity.scale(scaledUpdateSpeed));\n }\n\n if (mousePickPosition) {\n const distance = BABYLON.Vector3.Distance(particle.position, mousePickPosition);\n if (distance < repulsionRadius) {\n const forceDirection = particle.position.subtract(mousePickPosition).normalize();\n const forceMagnitude = repulsionStrength * (1 - distance / repulsionRadius);\n const forceVector = forceDirection.scale(forceMagnitude * scaledUpdateSpeed);\n particle.direction.addInPlace(forceVector);\n }\n }\n\n particle.position.addInPlace(particle.direction.scale(scaledUpdateSpeed));\n\n const startSize = particle.isLarge ? largeStartSize : regularStartSize;\n const endSize = particle.isLarge ? largeEndSize : regularEndSize;\n const lifeRatio = particle.age / particle.lifeTime;\n const fadeInDuration = 0.1;\n\n if (lifeRatio < fadeInDuration) {\n const fadeInRatio = lifeRatio / fadeInDuration;\n particle.size = BABYLON.Scalar.Lerp(0, startSize, fadeInRatio);\n BABYLON.Color4.LerpToRef(animEndColor, animStartColor, fadeInRatio, particle.color);\n } else {\n const mainLifeRatio = (lifeRatio - fadeInDuration) / (1 - fadeInDuration);\n particle.size = BABYLON.Scalar.Lerp(startSize, endSize, mainLifeRatio);\n if (mainLifeRatio < 0.5) {\n BABYLON.Color4.LerpToRef(animStartColor, animMidColor, mainLifeRatio * 2, particle.color);\n } else {\n BABYLON.Color4.LerpToRef(animMidColor, animEndColor, (mainLifeRatio - 0.5) * 2, particle.color);\n }\n }\n }\n };\n\n particleSystem.start();\n return particleSystem;\n}\n\n// Creates a custom emitter to ensure particles are distributed evenly across a mesh surface.\nfunction createUniformMeshParticleEmitter(mesh: BABYLON.Mesh): BABYLON.CustomParticleEmitter {\n const positions = mesh.getVerticesData(BABYLON.VertexBuffer.PositionKind);\n const indices = mesh.getIndices();\n const totalFaces = indices.length / 3;\n const cumulativeTriangleAreas: number[] = [];\n let totalArea = 0;\n const vA = new BABYLON.Vector3(), vB = new BABYLON.Vector3(), vC = new BABYLON.Vector3();\n const edge1 = new BABYLON.Vector3(), edge2 = new BABYLON.Vector3();\n\n for (let i = 0; i < totalFaces; i++) {\n const indexA = indices[i * 3], indexB = indices[i * 3 + 1], indexC = indices[i * 3 + 2];\n BABYLON.Vector3.FromArrayToRef(positions, indexA * 3, vA);\n BABYLON.Vector3.FromArrayToRef(positions, indexB * 3, vB);\n BABYLON.Vector3.FromArrayToRef(positions, indexC * 3, vC);\n vB.subtractToRef(vA, edge1);\n vC.subtractToRef(vA, edge2);\n const area = BABYLON.Vector3.Cross(edge1, edge2).length() * 0.5;\n totalArea += area;\n cumulativeTriangleAreas.push(totalArea);\n }\n\n for (let i = 0; i < totalFaces; i++) cumulativeTriangleAreas[i] /= totalArea;\n\n const customEmitter = new BABYLON.CustomParticleEmitter();\n customEmitter.particlePositionGenerator = (index, particle, out) => {\n const random = Math.random();\n let triangleIndex = 0;\n for (let i = 0; i < totalFaces; i++) if (random < cumulativeTriangleAreas[i]) { triangleIndex = i; break; }\n const iA = indices[triangleIndex * 3], iB = indices[triangleIndex * 3 + 1], iC = indices[triangleIndex * 3 + 2];\n BABYLON.Vector3.FromArrayToRef(positions, iA * 3, vA);\n BABYLON.Vector3.FromArrayToRef(positions, iB * 3, vB);\n BABYLON.Vector3.FromArrayToRef(positions, iC * 3, vC);\n let r1 = Math.random(), r2 = Math.random();\n if (r1 + r2 > 1) { r1 = 1 - r1; r2 = 1 - r2; }\n vB.subtractToRef(vA, edge1);\n vC.subtractToRef(vA, edge2);\n out.copyFrom(vA).addInPlace(edge1.scaleInPlace(r1)).addInPlace(edge2.scaleInPlace(r2));\n };\n customEmitter.particleDestinationGenerator = (index, particle, out) => {\n out.set(Math.random() - 0.5, Math.random() - 0.5, Math.random() - 0.5);\n };\n return customEmitter;\n}\n","version":"0.21.0","type":"typescript"}} + script={{"script":"// Import required DTOs for creating curves, shapes, and operations\nconst { InterpolationDto, MirrorAlongNormalDto, ShapesDto, CompoundShapesDto,\n FaceFromWireDto, ThisckSolidSimpleDto, RotateDto } = Bit.Inputs.OCCT;\nconst { SceneTwoColorLinearGradientDto, DirectionalLightDto } = Bit.Inputs.BabylonScene;\nconst { gradientDirectionEnum } = Bit.Inputs.Base;\n\n// Import type definitions for type safety\ntype Point3 = Bit.Inputs.Base.Point3;\ntype Vector3 = Bit.Inputs.Base.Vector3;\ntype TopoDSWirePointer = Bit.Inputs.OCCT.TopoDSWirePointer;\ntype TopoDSFacePointer = Bit.Inputs.OCCT.TopoDSFacePointer;\ntype TopoDSShapePointer = Bit.Inputs.OCCT.TopoDSShapePointer;\n\ninterface Particle extends BABYLON.Particle {\n isLarge: boolean,\n isDrifter: boolean,\n driftDirection: BABYLON.Vector3\n}\n\n// Get access to OCCT modules and utility functions\nconst { wire, face, compound } = bitbybit.occt.shapes;\nconst { operations, transforms } = bitbybit.occt;\nconst { vector } = bitbybit;\nconst { scene } = bitbybit.babylon;\nconst { pbrMetallicRoughness } = bitbybit.babylon.material;\n\n\nconst createEnvironment = async () => {\n const dirLightOpt = new DirectionalLightDto();\n dirLightOpt.intensity = 3;\n scene.drawDirectionalLight(dirLightOpt);\n}\n\n// Define the main function to create a parametric flower\nconst start = async () => {\n createEnvironment();\n // Flower parameters - easily adjustable for different designs\n const thickness = 0.1; // Thickness of the flower petals\n const rotationStep = 60; // Degrees between each petal (12 petals total)\n const rotationAxis: Vector3 = [2, 2, 0]; // Axis for petal rotation\n\n // Define control points for the flower petal curve\n const controlPoints: Point3[] = [\n [0, 0, 0], // Start point (flower center)\n [5, 1.25, 7.5], // First control point (petal width)\n [2.75, -1.25, 17.5], // Second control point (petal curve)\n [0, 0, 25] // End point (petal tip)\n ];\n\n // Create interpolated curve through control points\n const curveOptions = new InterpolationDto();\n curveOptions.points = controlPoints;\n curveOptions.periodic = false;\n curveOptions.tolerance = 1e-7;\n const petalCurve = await wire.interpolatePoints(curveOptions);\n\n // Mirror the curve to create symmetry for the petal\n const mirrorOptions = new MirrorAlongNormalDto();\n mirrorOptions.shape = petalCurve;\n mirrorOptions.origin = [0, 0, 0];\n mirrorOptions.normal = [1, 0, 0]; // Mirror along X-axis\n const mirroredCurve = await transforms.mirrorAlongNormal(mirrorOptions);\n\n // Combine the original and mirrored curves into a single wire\n const combineOptions = new ShapesDto();\n combineOptions.shapes = [petalCurve, mirroredCurve];\n const combinedWire = await wire.combineEdgesAndWiresIntoAWire(combineOptions);\n\n // Create a face from the combined wire\n const faceOptions = new FaceFromWireDto();\n faceOptions.shape = combinedWire;\n faceOptions.planar = false; // Allow non-planar surface\n const petalFace = await face.createFaceFromWire(faceOptions);\n\n // Create a thick solid from the face\n const thickOptions = new ThisckSolidSimpleDto();\n thickOptions.shape = petalFace;\n thickOptions.offset = thickness;\n const thickPetal = await operations.makeThickSolidSimple(thickOptions);\n\n // Generate rotation angles for petals (0° to 360° in steps)\n const rotationAngles = vector.span({\n min: 0,\n max: 360,\n step: rotationStep\n });\n\n const rotationAngles2 = vector.span({\n min: 30,\n max: 360,\n step: rotationStep\n });\n\n // Create all flower petals by rotating the base petal\n const flowerPetalPromises: Promise[] = [];\n const flowerPetalPromises2: Promise[] = [];\n\n for (const angle of rotationAngles) {\n const rotateOptions = new RotateDto();\n rotateOptions.shape = thickPetal;\n rotateOptions.axis = rotationAxis;\n rotateOptions.angle = angle;\n\n const rotatedPetal = transforms.rotate(rotateOptions);\n flowerPetalPromises.push(rotatedPetal);\n }\n\n for (const angle of rotationAngles2) {\n const rotateOptions = new RotateDto();\n rotateOptions.shape = thickPetal;\n rotateOptions.axis = rotationAxis;\n rotateOptions.angle = angle;\n\n const rotatedPetal = transforms.rotate(rotateOptions);\n flowerPetalPromises2.push(rotatedPetal);\n }\n\n const flowerPetals = await Promise.all(flowerPetalPromises);\n const flowerPetals2 = await Promise.all(flowerPetalPromises2);\n\n // Combine all petals into a single compound shape\n const compoundOptions = new CompoundShapesDto();\n compoundOptions.shapes = flowerPetals;\n const flower = await compound.makeCompound(compoundOptions);\n compoundOptions.shapes = flowerPetals2;\n const flower2 = await compound.makeCompound(compoundOptions);\n\n const pbrOptions = new Bit.Inputs.BabylonMaterial.PBRMetallicRoughnessDto();\n pbrOptions.baseColor = \"#111111\";\n pbrOptions.metallic = 0.6;\n pbrOptions.roughness = 0.6;\n pbrOptions.alpha = 0.4;\n pbrOptions.zOffset = 2;\n const pbrMaterial = pbrMetallicRoughness.create(pbrOptions);\n\n const drawOpt = new Bit.Inputs.Draw.DrawOcctShapeMaterialOptions();\n drawOpt.faceMaterial = pbrMaterial;\n drawOpt.edgeColour = \"#ffffff\";\n drawOpt.drawEdges = true;\n drawOpt.precision = 0.1;\n\n // Draw the completed flower with material options\n const flowerMesh = await bitbybit.draw.drawAnyAsync({\n entity: flower,\n options: drawOpt\n });\n\n const flowerMesh2 = await bitbybit.draw.drawAnyAsync({\n entity: flower2,\n options: drawOpt\n });\n\n const emitterMesh = flowerMesh.getChildMeshes()[0] as BABYLON.Mesh;\n emitterMesh.isPickable = false;\n\n const emitterMesh2 = flowerMesh2.getChildMeshes()[0] as BABYLON.Mesh;\n emitterMesh2.isPickable = false;\n\n const scene = bitbybit.babylon.scene.getScene();\n\n const purpleStartColor = new BABYLON.Color4(0.7, 0.3, 1.0, 1.0);\n const purpleMidColor = new BABYLON.Color4(1.0, 0.4, 0.8, 1.0);\n\n const blueStartColor = new BABYLON.Color4(0.2, 0.7, 1.0, 1.0);\n const blueMidColor = new BABYLON.Color4(0.5, 0.8, 1.0, 1.0);\n\n // This object will be shared with both particle systems to track the mouse.\n const mouseTracker = { position: null as BABYLON.Vector3 | null };\n\n // Create all the 3D assets: emitters, particle systems, and the interaction plane.\n\n // Remove any old observable before adding a new one.\n if (scene.metadata && scene.metadata.observable) {\n scene.metadata.observable.remove();\n }\n\n // Centralized mouse interaction logic.\n const resObs = scene.onPointerObservable.add((pointerInfo) => {\n if (pointerInfo.type === BABYLON.PointerEventTypes.POINTERMOVE) {\n // We only check for hits against our single, invisible interaction plane.\n const pickInfo = scene.pick(scene.pointerX, scene.pointerY, (mesh) => mesh === emitterMesh);\n if (pickInfo.hit) {\n // If we hit the plane, update the shared tracker object's position.\n mouseTracker.position = pickInfo.pickedPoint;\n } else {\n // If the mouse is not over the plane, clear the position.\n mouseTracker.position = null;\n }\n }\n });\n\n if (scene.metadata) {\n scene.metadata.observable = resObs;\n } else {\n scene.metadata = { observable: resObs };\n }\n\n createParticleSystemForMesh(emitterMesh, scene, purpleStartColor, purpleMidColor, mouseTracker);\n createParticleSystemForMesh(emitterMesh2, scene, blueStartColor, blueMidColor, mouseTracker);\n\n}\n\n// Execute the flower creation function\nstart();\n\n\n// The core particle system definition.\nfunction createParticleSystemForMesh(\n emitterMesh: BABYLON.Mesh,\n scene: BABYLON.Scene,\n animStartColor: BABYLON.Color4,\n animMidColor: BABYLON.Color4,\n mouseTracker: { position: BABYLON.Vector3 | null }\n): BABYLON.ParticleSystem {\n\n const animEndColor = new BABYLON.Color4(0.1, 0.2, 0.8, 0.0);\n const DRIFTER_CHANCE = 0.07;\n const DRIFTER_SPEED = 0.4;\n\n const particleSystem = new BABYLON.ParticleSystem(\"particles_\" + emitterMesh.name, 25000, scene);\n particleSystem.particleTexture = new BABYLON.Texture(\"https://assets.babylonjs.com/textures/flare.png\", scene);\n particleSystem.emitter = emitterMesh;\n particleSystem.particleEmitterType = createUniformMeshParticleEmitter(emitterMesh);\n\n particleSystem.color1 = animEndColor.clone();\n particleSystem.color2 = animEndColor.clone();\n particleSystem.colorDead = animEndColor.clone();\n particleSystem.minSize = 0;\n particleSystem.maxSize = 0;\n particleSystem.blendMode = BABYLON.ParticleSystem.BLENDMODE_ONEONE;\n particleSystem.minLifeTime = 4.0;\n particleSystem.maxLifeTime = 8.0;\n particleSystem.emitRate = 2000;\n particleSystem.minEmitPower = 0.1;\n particleSystem.maxEmitPower = 0.5;\n particleSystem.gravity = new BABYLON.Vector3(0, -1.0, 0);\n (particleSystem as any).dragFactor = 0.97;\n\n particleSystem.updateFunction = function (particles) {\n const repulsionRadius = 20.0, repulsionStrength = 30;\n const scaledUpdateSpeed = this._scaledUpdateSpeed;\n const mousePickPosition = mouseTracker.position;\n const regularStartSize = 0.35, regularEndSize = 0.1;\n const largeStartSize = 0.8, largeEndSize = 0.2;\n\n for (let index = 0; index < particles.length; index++) {\n const particle = particles[index] as Particle;\n particle.age += scaledUpdateSpeed;\n if (particle.age >= particle.lifeTime) {\n particles.splice(index, 1); this._stockParticles.push(particle); index--; continue;\n }\n\n if (particle.age === scaledUpdateSpeed) {\n particle.isLarge = (Math.random() < 0.05);\n particle.isDrifter = (Math.random() < DRIFTER_CHANCE);\n if (particle.isDrifter) {\n const driftVector = new BABYLON.Vector3(Math.random() - 0.5, Math.random() - 0.5, Math.random() - 0.5);\n particle.driftDirection = driftVector.normalize();\n }\n }\n\n particle.direction.scaleInPlace(this.dragFactor);\n if (particle.isDrifter) {\n const driftForce = particle.driftDirection.scale(DRIFTER_SPEED * scaledUpdateSpeed);\n particle.direction.addInPlace(driftForce);\n } else {\n particle.direction.addInPlace(this.gravity.scale(scaledUpdateSpeed));\n }\n\n if (mousePickPosition) {\n const distance = BABYLON.Vector3.Distance(particle.position, mousePickPosition);\n if (distance < repulsionRadius) {\n const forceDirection = particle.position.subtract(mousePickPosition).normalize();\n const forceMagnitude = repulsionStrength * (1 - distance / repulsionRadius);\n const forceVector = forceDirection.scale(forceMagnitude * scaledUpdateSpeed);\n particle.direction.addInPlace(forceVector);\n }\n }\n\n particle.position.addInPlace(particle.direction.scale(scaledUpdateSpeed));\n\n const startSize = particle.isLarge ? largeStartSize : regularStartSize;\n const endSize = particle.isLarge ? largeEndSize : regularEndSize;\n const lifeRatio = particle.age / particle.lifeTime;\n const fadeInDuration = 0.1;\n\n if (lifeRatio < fadeInDuration) {\n const fadeInRatio = lifeRatio / fadeInDuration;\n particle.size = BABYLON.Scalar.Lerp(0, startSize, fadeInRatio);\n BABYLON.Color4.LerpToRef(animEndColor, animStartColor, fadeInRatio, particle.color);\n } else {\n const mainLifeRatio = (lifeRatio - fadeInDuration) / (1 - fadeInDuration);\n particle.size = BABYLON.Scalar.Lerp(startSize, endSize, mainLifeRatio);\n if (mainLifeRatio < 0.5) {\n BABYLON.Color4.LerpToRef(animStartColor, animMidColor, mainLifeRatio * 2, particle.color);\n } else {\n BABYLON.Color4.LerpToRef(animMidColor, animEndColor, (mainLifeRatio - 0.5) * 2, particle.color);\n }\n }\n }\n };\n\n particleSystem.start();\n return particleSystem;\n}\n\n// Creates a custom emitter to ensure particles are distributed evenly across a mesh surface.\nfunction createUniformMeshParticleEmitter(mesh: BABYLON.Mesh): BABYLON.CustomParticleEmitter {\n const positions = mesh.getVerticesData(BABYLON.VertexBuffer.PositionKind);\n const indices = mesh.getIndices();\n const totalFaces = indices.length / 3;\n const cumulativeTriangleAreas: number[] = [];\n let totalArea = 0;\n const vA = new BABYLON.Vector3(), vB = new BABYLON.Vector3(), vC = new BABYLON.Vector3();\n const edge1 = new BABYLON.Vector3(), edge2 = new BABYLON.Vector3();\n\n for (let i = 0; i < totalFaces; i++) {\n const indexA = indices[i * 3], indexB = indices[i * 3 + 1], indexC = indices[i * 3 + 2];\n BABYLON.Vector3.FromArrayToRef(positions, indexA * 3, vA);\n BABYLON.Vector3.FromArrayToRef(positions, indexB * 3, vB);\n BABYLON.Vector3.FromArrayToRef(positions, indexC * 3, vC);\n vB.subtractToRef(vA, edge1);\n vC.subtractToRef(vA, edge2);\n const area = BABYLON.Vector3.Cross(edge1, edge2).length() * 0.5;\n totalArea += area;\n cumulativeTriangleAreas.push(totalArea);\n }\n\n for (let i = 0; i < totalFaces; i++) cumulativeTriangleAreas[i] /= totalArea;\n\n const customEmitter = new BABYLON.CustomParticleEmitter();\n customEmitter.particlePositionGenerator = (index, particle, out) => {\n const random = Math.random();\n let triangleIndex = 0;\n for (let i = 0; i < totalFaces; i++) if (random < cumulativeTriangleAreas[i]) { triangleIndex = i; break; }\n const iA = indices[triangleIndex * 3], iB = indices[triangleIndex * 3 + 1], iC = indices[triangleIndex * 3 + 2];\n BABYLON.Vector3.FromArrayToRef(positions, iA * 3, vA);\n BABYLON.Vector3.FromArrayToRef(positions, iB * 3, vB);\n BABYLON.Vector3.FromArrayToRef(positions, iC * 3, vC);\n let r1 = Math.random(), r2 = Math.random();\n if (r1 + r2 > 1) { r1 = 1 - r1; r2 = 1 - r2; }\n vB.subtractToRef(vA, edge1);\n vC.subtractToRef(vA, edge2);\n out.copyFrom(vA).addInPlace(edge1.scaleInPlace(r1)).addInPlace(edge2.scaleInPlace(r2));\n };\n customEmitter.particleDestinationGenerator = (index, particle, out) => {\n out.set(Math.random() - 0.5, Math.random() - 0.5, Math.random() - 0.5);\n };\n return customEmitter;\n}\n","type":"typescript"}} title="Simple flower" /> diff --git a/docs/learn/code/common/occt/operations/advanced-loft.md b/docs/learn/code/common/occt/operations/advanced-loft.md index 79c539706..655411f5d 100644 --- a/docs/learn/code/common/occt/operations/advanced-loft.md +++ b/docs/learn/code/common/occt/operations/advanced-loft.md @@ -45,21 +45,21 @@ Here's a breakdown of the process described: nrCornerswire1wire2wire3nrCorners10151515030117910001000100010003wire1000010nrCorners31wire2030010nrCorners10.3wire3070010nrCorners60.5wire3wire2wire1FALSEFALSEFALSEFALSE10FALSE31e-7'approxChordLength'01000-300.01TRUE#cc33ccTRUE#ffffff2","version":"0.21.0","type":"blockly"}} + script={{"script":"nrCornerswire1wire2wire3nrCorners10151515030117910001000100010003wire1000010nrCorners31wire2030010nrCorners10.3wire3070010nrCorners60.5wire3wire2wire1FALSEFALSEFALSEFALSE10FALSE31e-7'approxChordLength'01000-300.01TRUE#cc33ccTRUE#ffffff2","type":"blockly"}} title="Advanced Loft Operation" /> {\n\n // --- 1. Camera Configuration ---\n // Create a new configuration object for the scene's Arc Rotate Camera.\n const arcCameraOptions = new CameraConfigurationDto();\n // Set the camera's position in 3D space (x, y, z).\n arcCameraOptions.position = [15, 15, 15];\n // Set the point the camera will look at.\n arcCameraOptions.lookAt = [0, 3, 0];\n // Apply these settings to the active camera in the scene.\n scene.adjustActiveArcRotateCamera(arcCameraOptions);\n\n // Define the number of corners for the polygonal profiles.\n const nrCorners = 10;\n\n // --- 2. Create the First Profile (Bottom) ---\n // Create a DTO to define an n-sided polygon wire.\n const ngonOpt = new NGonWireDto();\n ngonOpt.nrCorners = nrCorners;\n ngonOpt.radius = 3;\n // Asynchronously create the first polygon wire shape at the default center [0,0,0].\n const wire1 = await wire.createNGonWire(ngonOpt);\n\n // Create a DTO for a 2D fillet operation to round the corners of a wire.\n const filletOpt = new FilletDto();\n filletOpt.radius = 0.3; // The radius of the rounded corners.\n filletOpt.shape = wire1; // Specify that the fillet should be applied to wire1.\n // Asynchronously apply the fillet and store the new, smoothed wire.\n const filletedWire1 = await fillets.fillet2d(filletOpt);\n\n // --- 3. Create the Second Profile (Middle) ---\n // Reuse the ngonOpt DTO but modify its properties for the next shape.\n ngonOpt.center = [0, 3, 0]; // Move the center up along the Y-axis.\n ngonOpt.radius = 1; // Make this polygon smaller.\n const wire2 = await wire.createNGonWire(ngonOpt);\n\n // Reuse the filletOpt DTO to apply the same fillet radius to the new wire.\n filletOpt.shape = wire2;\n const filletedWire2 = await fillets.fillet2d(filletOpt);\n\n // --- 4. Create the Third Profile (Top) ---\n // Reuse and modify the DTOs again for the third and final profile.\n ngonOpt.center = [0, 7, 0]; // Move this one even higher.\n ngonOpt.radius = 6; // Make this polygon the largest.\n const wire3 = await wire.createNGonWire(ngonOpt);\n\n // Use a larger fillet radius for this larger wire.\n filletOpt.radius = 0.5;\n filletOpt.shape = wire3;\n const filletedWire3 = await fillets.fillet2d(filletOpt);\n\n // --- 5. Perform the Loft Operation ---\n // A loft creates a 3D solid by connecting a series of 2D profiles.\n const loftAdvancedOptions = new LoftAdvancedDto();\n // Specify a single point where the loft should begin, creating a pointed top.\n loftAdvancedOptions.startVertex = [0, 10, 0];\n // Specify a single point where the loft should end, creating a pointed bottom.\n loftAdvancedOptions.endVertex = [0, -3, 0];\n // Provide the array of profiles to connect. The order matters.\n loftAdvancedOptions.shapes = [filletedWire3, filletedWire2, filletedWire1];\n // Asynchronously execute the loft operation to create the final 3D shape.\n const loftedShape = await operations.loftAdvanced(loftAdvancedOptions)\n\n // --- 6. Draw the Final Shape ---\n // Create a DTO to define how the shape should be drawn.\n const drawOptions = new DrawOcctShapeSimpleOptions();\n // Set the color of the shape's faces to magenta.\n drawOptions.faceColour = \"#ff00ff\";\n\n // Call the generic drawing function to render the OCCT shape in the scene.\n bitbybit.draw.drawAnyAsync({\n entity: loftedShape, // The shape to draw.\n options: drawOptions // The drawing options to apply.\n });\n\n}\n\n// Execute the main function to start the script.\nstart();","version":"0.21.0","type":"typescript"}} + script={{"script":"\n// Import DTOs for configuring various operations. DTOs are objects used to pass data.\n// Import camera configuration for setting up the scene view.\nconst { CameraConfigurationDto } = Bit.Inputs.BabylonScene;\n// Import DTOs for OpenCASCADE (OCCT) geometric modeling: creating polygons, fillets, and lofts.\nconst { NGonWireDto, FilletDto, LoftAdvancedDto } = Bit.Inputs.OCCT;\n// Import DTO for specifying drawing options, like color and opacity.\nconst { DrawOcctShapeSimpleOptions } = Bit.Inputs.Draw;\n// Import a specific type for an OCCT wire, ensuring type safety in our code.\ntype TopoDSWirePointer = Bit.Inputs.OCCT.TopoDSWirePointer;\n\n// Destructure the bitbybit API to get direct access to its main modules.\n// 'scene' provides access to BabylonJS scene controls.\nconst { scene } = bitbybit.babylon;\n// 'wire', 'fillets', and 'operations' are part of the OCCT module for creating and manipulating shapes.\nconst { wire } = bitbybit.occt.shapes;\nconst { fillets, operations } = bitbybit.occt;\n\n// Define an asynchronous function to execute the main logic.\n// Using async/await is necessary because geometry creation and drawing are non-blocking operations.\nconst start = async () => {\n\n // --- 1. Camera Configuration ---\n // Create a new configuration object for the scene's Arc Rotate Camera.\n const arcCameraOptions = new CameraConfigurationDto();\n // Set the camera's position in 3D space (x, y, z).\n arcCameraOptions.position = [15, 15, 15];\n // Set the point the camera will look at.\n arcCameraOptions.lookAt = [0, 3, 0];\n // Apply these settings to the active camera in the scene.\n scene.adjustActiveArcRotateCamera(arcCameraOptions);\n\n // Define the number of corners for the polygonal profiles.\n const nrCorners = 10;\n\n // --- 2. Create the First Profile (Bottom) ---\n // Create a DTO to define an n-sided polygon wire.\n const ngonOpt = new NGonWireDto();\n ngonOpt.nrCorners = nrCorners;\n ngonOpt.radius = 3;\n // Asynchronously create the first polygon wire shape at the default center [0,0,0].\n const wire1 = await wire.createNGonWire(ngonOpt);\n\n // Create a DTO for a 2D fillet operation to round the corners of a wire.\n const filletOpt = new FilletDto();\n filletOpt.radius = 0.3; // The radius of the rounded corners.\n filletOpt.shape = wire1; // Specify that the fillet should be applied to wire1.\n // Asynchronously apply the fillet and store the new, smoothed wire.\n const filletedWire1 = await fillets.fillet2d(filletOpt);\n\n // --- 3. Create the Second Profile (Middle) ---\n // Reuse the ngonOpt DTO but modify its properties for the next shape.\n ngonOpt.center = [0, 3, 0]; // Move the center up along the Y-axis.\n ngonOpt.radius = 1; // Make this polygon smaller.\n const wire2 = await wire.createNGonWire(ngonOpt);\n\n // Reuse the filletOpt DTO to apply the same fillet radius to the new wire.\n filletOpt.shape = wire2;\n const filletedWire2 = await fillets.fillet2d(filletOpt);\n\n // --- 4. Create the Third Profile (Top) ---\n // Reuse and modify the DTOs again for the third and final profile.\n ngonOpt.center = [0, 7, 0]; // Move this one even higher.\n ngonOpt.radius = 6; // Make this polygon the largest.\n const wire3 = await wire.createNGonWire(ngonOpt);\n\n // Use a larger fillet radius for this larger wire.\n filletOpt.radius = 0.5;\n filletOpt.shape = wire3;\n const filletedWire3 = await fillets.fillet2d(filletOpt);\n\n // --- 5. Perform the Loft Operation ---\n // A loft creates a 3D solid by connecting a series of 2D profiles.\n const loftAdvancedOptions = new LoftAdvancedDto();\n // Specify a single point where the loft should begin, creating a pointed top.\n loftAdvancedOptions.startVertex = [0, 10, 0];\n // Specify a single point where the loft should end, creating a pointed bottom.\n loftAdvancedOptions.endVertex = [0, -3, 0];\n // Provide the array of profiles to connect. The order matters.\n loftAdvancedOptions.shapes = [filletedWire3, filletedWire2, filletedWire1];\n // Asynchronously execute the loft operation to create the final 3D shape.\n const loftedShape = await operations.loftAdvanced(loftAdvancedOptions)\n\n // --- 6. Draw the Final Shape ---\n // Create a DTO to define how the shape should be drawn.\n const drawOptions = new DrawOcctShapeSimpleOptions();\n // Set the color of the shape's faces to magenta.\n drawOptions.faceColour = \"#ff00ff\";\n\n // Call the generic drawing function to render the OCCT shape in the scene.\n bitbybit.draw.drawAnyAsync({\n entity: loftedShape, // The shape to draw.\n options: drawOptions // The drawing options to apply.\n });\n\n}\n\n// Execute the main function to start the script.\nstart();","type":"typescript"}} title="Advanced Loft Operation" /> diff --git a/docs/learn/code/common/occt/operations/extrusions.md b/docs/learn/code/common/occt/operations/extrusions.md index 34ab5df55..ecafd1be7 100644 --- a/docs/learn/code/common/occt/operations/extrusions.md +++ b/docs/learn/code/common/occt/operations/extrusions.md @@ -35,21 +35,21 @@ By understanding extrusion, you gain a powerful tool for your 3D modeling toolki heightheight40000107740FALSE0.50height0","version":"0.21.0","type":"blockly"}} + script={{"script":"heightheight40000107740FALSE0.50height0","type":"blockly"}} title="Extrude the wire into shell kind of shape" /> {\n\n // Define a constant 'height' for the extrusion operation.\n const height = 4;\n\n // Create a new StarDto instance to configure the properties of a star-shaped wire.\n const starOpt = new StarDto();\n // Set the inner radius of the star.\n starOpt.innerRadius = 4;\n // Set the outer radius of the star.\n starOpt.outerRadius = 7;\n // Asynchronously create the star-shaped wire using the configured options.\n // The 'await' keyword pauses execution until the wire creation is complete.\n // Bitbybit runs such CAD operations in the worker thread, which doesn't block UI\n // and is usually faster.\n const star = await wire.createStarWire(starOpt);\n\n // Create a new FilletDto instance to configure a 2D fillet operation.\n // The generic type specifies that this fillet will be applied to a wire.\n const filletOpt = new FilletDto();\n // Set the shape to be filleted to the previously created star wire.\n filletOpt.shape = star;\n // Set the radius for the fillet (rounding of corners).\n filletOpt.radius = 0.5;\n // Asynchronously apply the 2D fillet to the star wire.\n const roundedStar = await fillets.fillet2d(filletOpt);\n\n // Create a new ExtrudeDto instance to configure an extrusion operation.\n // The generic type specifies that a wire will be extruded.\n const extrudeOpt = new ExtrudeDto();\n // Set the shape to be extruded to the previously created rounded star wire.\n extrudeOpt.shape = roundedStar;\n // Set the direction and magnitude of the extrusion as a 3D vector [x, y, z].\n // Here, it extrudes along the Y-axis by the value of 'height'.\n extrudeOpt.direction = [0, height, 0];\n // Asynchronously perform the extrusion operation on the rounded star wire.\n const extrudedRoundStar = await operations.extrude(extrudeOpt);\n\n // Asynchronously draw the final extruded shape in the 3D scene.\n // 'entity' specifies the shape to be drawn.\n bitbybit.draw.drawAnyAsync({ entity: extrudedRoundStar });\n\n}\n\n// Call the 'start' function to execute the script.\nstart();","version":"0.21.0","type":"typescript"}} + script={{"script":"// Import the 'wire' module for creating wire shapes from the OCCT (OpenCASCADE Technology) library.\nconst { wire } = bitbybit.occt.shapes;\n// Import 'fillets' and 'operations' modules for performing filleting and extrusion operations on OCCT shapes.\nconst { fillets, operations } = bitbybit.occt;\n// Import Data Transfer Objects (DTOs) for configuring star creation, filleting, and extrusion.\n// DTOs are used to pass parameters to the respective functions.\nconst { StarDto, FilletDto, ExtrudeDto } = Bit.Inputs.OCCT;\n// Define a type alias for a pointer to a TopoDS_Wire, which is an OCCT data structure representing a wire.\ntype TopoDSWirePointer = Bit.Inputs.OCCT.TopoDSWirePointer;\n\n// Define an asynchronous function named 'start' which will contain the main logic for creating and drawing the shape.\n// The 'async' keyword allows the use of 'await' for operations that might take time, like geometry creation.\nconst start = async () => {\n\n // Define a constant 'height' for the extrusion operation.\n const height = 4;\n\n // Create a new StarDto instance to configure the properties of a star-shaped wire.\n const starOpt = new StarDto();\n // Set the inner radius of the star.\n starOpt.innerRadius = 4;\n // Set the outer radius of the star.\n starOpt.outerRadius = 7;\n // Asynchronously create the star-shaped wire using the configured options.\n // The 'await' keyword pauses execution until the wire creation is complete.\n // Bitbybit runs such CAD operations in the worker thread, which doesn't block UI\n // and is usually faster.\n const star = await wire.createStarWire(starOpt);\n\n // Create a new FilletDto instance to configure a 2D fillet operation.\n // The generic type specifies that this fillet will be applied to a wire.\n const filletOpt = new FilletDto();\n // Set the shape to be filleted to the previously created star wire.\n filletOpt.shape = star;\n // Set the radius for the fillet (rounding of corners).\n filletOpt.radius = 0.5;\n // Asynchronously apply the 2D fillet to the star wire.\n const roundedStar = await fillets.fillet2d(filletOpt);\n\n // Create a new ExtrudeDto instance to configure an extrusion operation.\n // The generic type specifies that a wire will be extruded.\n const extrudeOpt = new ExtrudeDto();\n // Set the shape to be extruded to the previously created rounded star wire.\n extrudeOpt.shape = roundedStar;\n // Set the direction and magnitude of the extrusion as a 3D vector [x, y, z].\n // Here, it extrudes along the Y-axis by the value of 'height'.\n extrudeOpt.direction = [0, height, 0];\n // Asynchronously perform the extrusion operation on the rounded star wire.\n const extrudedRoundStar = await operations.extrude(extrudeOpt);\n\n // Asynchronously draw the final extruded shape in the 3D scene.\n // 'entity' specifies the shape to be drawn.\n bitbybit.draw.drawAnyAsync({ entity: extrudedRoundStar });\n\n}\n\n// Call the 'start' function to execute the script.\nstart();","type":"typescript"}} title="Extrude the wire into shell kind of shape" /> @@ -69,21 +69,21 @@ In the following examples, we first construct a complex wire, then create a plan heightheight4000010070000100520FALSEFALSETRUETRUE0height0","version":"0.21.0","type":"blockly"}} + script={{"script":"heightheight4000010070000100520FALSEFALSETRUETRUE0height0","type":"blockly"}} title="Extrude the face into solid shape" /> {\n\n const height = 4;\n\n const heartOpt = new Heart2DDto();\n heartOpt.sizeApprox = 7;\n const heart1 = await wire.createHeartWire(heartOpt);\n\n heartOpt.sizeApprox = 5;\n const heart2 = await wire.createHeartWire(heartOpt);\n\n const zigZagOpt = new ZigZagBetweenTwoWiresDto(heart1, heart2, 31);\n const zigZagWire = await wire.createZigZagBetweenTwoWires(zigZagOpt);\n\n const faceFromWireOpt = new FaceFromWireDto(zigZagWire, true);\n const zigZagFace = await face.createFaceFromWire(faceFromWireOpt);\n \n const extrudeOpt = new ExtrudeDto();\n extrudeOpt.shape = zigZagFace;\n extrudeOpt.direction = [0, height, 0];\n const extrudedZigZag = await operations.extrude(extrudeOpt);\n\n bitbybit.draw.drawAnyAsync({ entity: extrudedZigZag });\n\n}\n\nstart();","version":"0.21.0","type":"typescript"}} + script={{"script":"const { wire, face } = bitbybit.occt.shapes;\nconst { fillets, operations } = bitbybit.occt;\nconst { FilletDto, ExtrudeDto, Heart2DDto, ZigZagBetweenTwoWiresDto, FaceFromWireDto } = Bit.Inputs.OCCT;\ntype TopoDSWirePointer = Bit.Inputs.OCCT.TopoDSWirePointer;\ntype TopoDSFacePointer = Bit.Inputs.OCCT.TopoDSFacePointer;\nconst start = async () => {\n\n const height = 4;\n\n const heartOpt = new Heart2DDto();\n heartOpt.sizeApprox = 7;\n const heart1 = await wire.createHeartWire(heartOpt);\n\n heartOpt.sizeApprox = 5;\n const heart2 = await wire.createHeartWire(heartOpt);\n\n const zigZagOpt = new ZigZagBetweenTwoWiresDto(heart1, heart2, 31);\n const zigZagWire = await wire.createZigZagBetweenTwoWires(zigZagOpt);\n\n const faceFromWireOpt = new FaceFromWireDto(zigZagWire, true);\n const zigZagFace = await face.createFaceFromWire(faceFromWireOpt);\n \n const extrudeOpt = new ExtrudeDto();\n extrudeOpt.shape = zigZagFace;\n extrudeOpt.direction = [0, height, 0];\n const extrudedZigZag = await operations.extrude(extrudeOpt);\n\n bitbybit.draw.drawAnyAsync({ entity: extrudedZigZag });\n\n}\n\nstart();","type":"typescript"}} title="Extrude the face into solid shape" /> diff --git a/docs/learn/code/common/occt/operations/offset-operations.md b/docs/learn/code/common/occt/operations/offset-operations.md index a43204000..3b060a9b0 100644 --- a/docs/learn/code/common/occt/operations/offset-operations.md +++ b/docs/learn/code/common/occt/operations/offset-operations.md @@ -44,21 +44,21 @@ Key parameters for wire offset include: hexagonoffsetDistanceoffsetShapehexagon00001046offsetDistance1.2offsetShapehexagonoffsetDistance0.1hexagon#00ff004offsetShape#ff00004","version":"0.21.0","type":"blockly"}} + script={{"script":"hexagonoffsetDistanceoffsetShapehexagon00001046offsetDistance1.2offsetShapehexagonoffsetDistance0.1hexagon#00ff004offsetShape#ff00004","type":"blockly"}} title="Basic Wire Offset Operation" /> {\n\n // Define the offset distance - positive values expand the shape, negative values contract it\n const offsetDistance = 1.2;\n\n // Create a new NGonWireDto instance to configure a hexagonal wire\n const hexagonOpt = new Bit.Inputs.OCCT.NGonWireDto();\n // Set the center point of the polygon\n hexagonOpt.center = [0, 0, 0];\n // Set the direction vector (normal to the plane of the polygon)\n hexagonOpt.direction = [0, 1, 0];\n // Set the radius from center to vertices\n hexagonOpt.radius = 4;\n // Set the number of corners (6 for hexagon)\n hexagonOpt.nrCorners = 6;\n \n // Create the hexagonal wire\n const hexagon = await wire.createNGonWire(hexagonOpt);\n\n // Create a new OffsetDto instance to configure the offset operation\n const offsetOpt = new OffsetDto();\n // Set the shape to be offset\n offsetOpt.shape = hexagon;\n // Set the offset distance (positive = outward, negative = inward)\n offsetOpt.distance = offsetDistance;\n // Set the tolerance for the offset calculation\n offsetOpt.tolerance = 0.1;\n \n // Perform the offset operation\n const offsetShape = await operations.offset(offsetOpt);\n\n // Draw both the original and offset shapes with different colors for comparison\n const originalOptions = new Bit.Inputs.Draw.DrawOcctShapeSimpleOptions();\n originalOptions.edgeWidth = 4;\n originalOptions.edgeColour = \"#00ff00\"; // Green for original\n \n const offsetOptions = new Bit.Inputs.Draw.DrawOcctShapeSimpleOptions();\n offsetOptions.edgeWidth = 4;\n offsetOptions.edgeColour = \"#ff0000\"; // Red for offset\n \n bitbybit.draw.drawAnyAsync({ entity: hexagon, options: originalOptions });\n bitbybit.draw.drawAnyAsync({ entity: offsetShape, options: offsetOptions });\n\n}\n\n// Call the 'start' function to execute the script\nstart();","version":"0.21.0","type":"typescript"}} + script={{"script":"// Import the 'wire' module for creating wire shapes from the OCCT library\nconst { wire } = bitbybit.occt.shapes;\n// Import the 'operations' module for offset operations\nconst { operations } = bitbybit.occt;\n// Import Data Transfer Objects (DTOs) for configuring polygon creation and offset operations\nconst { NGonWireDto, OffsetDto } = Bit.Inputs.OCCT;\n// Define a type alias for a pointer to a TopoDS_Wire\ntype TopoDSWirePointer = Bit.Inputs.OCCT.TopoDSWirePointer;\n\n// Define an asynchronous function named 'start' which will contain the main logic\nconst start = async () => {\n\n // Define the offset distance - positive values expand the shape, negative values contract it\n const offsetDistance = 1.2;\n\n // Create a new NGonWireDto instance to configure a hexagonal wire\n const hexagonOpt = new Bit.Inputs.OCCT.NGonWireDto();\n // Set the center point of the polygon\n hexagonOpt.center = [0, 0, 0];\n // Set the direction vector (normal to the plane of the polygon)\n hexagonOpt.direction = [0, 1, 0];\n // Set the radius from center to vertices\n hexagonOpt.radius = 4;\n // Set the number of corners (6 for hexagon)\n hexagonOpt.nrCorners = 6;\n \n // Create the hexagonal wire\n const hexagon = await wire.createNGonWire(hexagonOpt);\n\n // Create a new OffsetDto instance to configure the offset operation\n const offsetOpt = new OffsetDto();\n // Set the shape to be offset\n offsetOpt.shape = hexagon;\n // Set the offset distance (positive = outward, negative = inward)\n offsetOpt.distance = offsetDistance;\n // Set the tolerance for the offset calculation\n offsetOpt.tolerance = 0.1;\n \n // Perform the offset operation\n const offsetShape = await operations.offset(offsetOpt);\n\n // Draw both the original and offset shapes with different colors for comparison\n const originalOptions = new Bit.Inputs.Draw.DrawOcctShapeSimpleOptions();\n originalOptions.edgeWidth = 4;\n originalOptions.edgeColour = \"#00ff00\"; // Green for original\n \n const offsetOptions = new Bit.Inputs.Draw.DrawOcctShapeSimpleOptions();\n offsetOptions.edgeWidth = 4;\n offsetOptions.edgeColour = \"#ff0000\"; // Red for offset\n \n bitbybit.draw.drawAnyAsync({ entity: hexagon, options: originalOptions });\n bitbybit.draw.drawAnyAsync({ entity: offsetShape, options: offsetOptions });\n\n}\n\n// Call the 'start' function to execute the script\nstart();","type":"typescript"}} title="Basic Wire Offset Operation" /> @@ -83,21 +83,21 @@ The join types available are: starWireoffsetDistanceoffsetShapestarWire000010531.50FALSEoffsetDistance0.8offsetShapestarWireoffsetDistance0.1intersectionFALSEstarWire#00ff004offsetShape#ff00004","version":"0.21.0","type":"blockly"}} + script={{"script":"starWireoffsetDistanceoffsetShapestarWire000010531.50FALSEoffsetDistance0.8offsetShapestarWireoffsetDistance0.1intersectionFALSEstarWire#00ff004offsetShape#ff00004","type":"blockly"}} title="Advanced Offset with Join Type Control" /> {\n\n // Define the offset distance\n const offsetDistance = 0.8;\n\n // Create a star-shaped wire for demonstration\n const starOpt = new StarDto();\n starOpt.center = [0, 0, 0];\n starOpt.direction = [0, 1, 0];\n starOpt.numRays = 5;\n starOpt.outerRadius = 3;\n starOpt.innerRadius = 1.5;\n \n const starWire = await wire.createStarWire(starOpt);\n\n // Create an advanced offset with specific join type\n const offsetAdvOpt = new OffsetAdvancedDto();\n offsetAdvOpt.shape = starWire;\n offsetAdvOpt.distance = offsetDistance;\n offsetAdvOpt.tolerance = 0.1;\n // Set join type to 'intersection' for sharp corners\n // Other options: 'arc' (rounded), 'tangent' (beveled)\n offsetAdvOpt.joinType = Bit.Inputs.OCCT.joinTypeEnum.intersection;\n offsetAdvOpt.removeIntEdges = false;\n \n const offsetShape = await operations.offsetAdv(offsetAdvOpt);\n\n // Draw both shapes with different colors for comparison\n const originalOptions = new Bit.Inputs.Draw.DrawOcctShapeSimpleOptions();\n originalOptions.edgeWidth = 4;\n originalOptions.edgeColour = \"#00ff00\"; // Green for original\n \n const offsetOptions = new Bit.Inputs.Draw.DrawOcctShapeSimpleOptions();\n offsetOptions.edgeWidth = 4;\n offsetOptions.edgeColour = \"#ff0000\"; // Red for offset\n \n bitbybit.draw.drawAnyAsync({ entity: starWire, options: originalOptions });\n bitbybit.draw.drawAnyAsync({ entity: offsetShape, options: offsetOptions });\n\n}\n\nstart();","version":"0.21.0","type":"typescript"}} + script={{"script":"// Import required modules for wire creation and operations\nconst { wire } = bitbybit.occt.shapes;\nconst { operations } = bitbybit.occt;\n// Import DTOs and enums for star creation and advanced offset\nconst { StarDto, OffsetAdvancedDto } = Bit.Inputs.OCCT;\ntype TopoDSWirePointer = Bit.Inputs.OCCT.TopoDSWirePointer;\n\nconst start = async () => {\n\n // Define the offset distance\n const offsetDistance = 0.8;\n\n // Create a star-shaped wire for demonstration\n const starOpt = new StarDto();\n starOpt.center = [0, 0, 0];\n starOpt.direction = [0, 1, 0];\n starOpt.numRays = 5;\n starOpt.outerRadius = 3;\n starOpt.innerRadius = 1.5;\n \n const starWire = await wire.createStarWire(starOpt);\n\n // Create an advanced offset with specific join type\n const offsetAdvOpt = new OffsetAdvancedDto();\n offsetAdvOpt.shape = starWire;\n offsetAdvOpt.distance = offsetDistance;\n offsetAdvOpt.tolerance = 0.1;\n // Set join type to 'intersection' for sharp corners\n // Other options: 'arc' (rounded), 'tangent' (beveled)\n offsetAdvOpt.joinType = Bit.Inputs.OCCT.joinTypeEnum.intersection;\n offsetAdvOpt.removeIntEdges = false;\n \n const offsetShape = await operations.offsetAdv(offsetAdvOpt);\n\n // Draw both shapes with different colors for comparison\n const originalOptions = new Bit.Inputs.Draw.DrawOcctShapeSimpleOptions();\n originalOptions.edgeWidth = 4;\n originalOptions.edgeColour = \"#00ff00\"; // Green for original\n \n const offsetOptions = new Bit.Inputs.Draw.DrawOcctShapeSimpleOptions();\n offsetOptions.edgeWidth = 4;\n offsetOptions.edgeColour = \"#ff0000\"; // Red for offset\n \n bitbybit.draw.drawAnyAsync({ entity: starWire, options: originalOptions });\n bitbybit.draw.drawAnyAsync({ entity: offsetShape, options: offsetOptions });\n\n}\n\nstart();","type":"typescript"}} title="Advanced Offset with Join Type Control" /> @@ -117,21 +117,21 @@ The thick solid operation takes a shell (collection of connected faces) or a fac circleWirecircularFacethicknessthickSolidcircleWire0000103circularFacecircleWireTRUEthickness0.5thickSolidcircularFacethicknesstranslatedSolidthickSolid010circularFace#00ff004translatedSolid#ff00004","version":"0.21.0","type":"blockly"}} + script={{"script":"circleWirecircularFacethicknessthickSolidcircleWire0000103circularFacecircleWireTRUEthickness0.5thickSolidcircularFacethicknesstranslatedSolidthickSolid010circularFace#00ff004translatedSolid#ff00004","type":"blockly"}} title="Creating Thick Solid from Face" /> {\n\n // Define the thickness for the solid\n const thickness = 0.5;\n\n // Step 1: Create a circular wire\n const circleOpt = new CircleDto();\n circleOpt.center = [0, 0, 0];\n circleOpt.direction = [0, 1, 0];\n circleOpt.radius = 3;\n \n const circleWire = await wire.createCircleWire(circleOpt);\n\n // Step 2: Convert the wire to a face\n const faceOpt = new FaceFromWireDto();\n faceOpt.shape = circleWire;\n faceOpt.planar = true;\n \n const circularFace = await face.createFaceFromWire(faceOpt);\n\n // Step 3: Create a thick solid from the face\n const thickSolidOpt = new ThisckSolidSimpleDto();\n thickSolidOpt.shape = circularFace;\n // Positive offset creates thickness in the direction of the face normal\n thickSolidOpt.offset = thickness;\n \n const thickSolid = await operations.makeThickSolidSimple(thickSolidOpt);\n\n // Step 4: Translate the thick solid upwards to make the original face visible\n const translationOpt = new TranslateDto();\n translationOpt.shape = thickSolid;\n translationOpt.translation = [0, 1, 0]; // Move up by 1 unit\n \n const translatedSolid = await transforms.translate(translationOpt);\n\n // Draw both the original face and resulting thick solid with different colors for comparison\n const originalOptions = new Bit.Inputs.Draw.DrawOcctShapeSimpleOptions();\n originalOptions.edgeWidth = 4;\n originalOptions.edgeColour = \"#00ff00\"; // Green for original\n \n const thickSolidOptions = new Bit.Inputs.Draw.DrawOcctShapeSimpleOptions();\n thickSolidOptions.edgeWidth = 4;\n thickSolidOptions.edgeColour = \"#ff0000\"; // Red for thick solid\n \n bitbybit.draw.drawAnyAsync({ entity: circularFace, options: originalOptions });\n bitbybit.draw.drawAnyAsync({ entity: translatedSolid, options: thickSolidOptions });\n\n}\n\nstart();","version":"0.21.0","type":"typescript"}} + script={{"script":"// Import required modules for wire, face creation and operations\nconst { wire, face } = bitbybit.occt.shapes;\nconst { operations, transforms } = bitbybit.occt;\n// Import DTOs for circle, face and thick solid creation\nconst { CircleDto, FaceFromWireDto, ThisckSolidSimpleDto, TranslateDto } = Bit.Inputs.OCCT;\ntype TopoDSWirePointer = Bit.Inputs.OCCT.TopoDSWirePointer;\ntype TopoDSFacePointer = Bit.Inputs.OCCT.TopoDSFacePointer;\n\nconst start = async () => {\n\n // Define the thickness for the solid\n const thickness = 0.5;\n\n // Step 1: Create a circular wire\n const circleOpt = new CircleDto();\n circleOpt.center = [0, 0, 0];\n circleOpt.direction = [0, 1, 0];\n circleOpt.radius = 3;\n \n const circleWire = await wire.createCircleWire(circleOpt);\n\n // Step 2: Convert the wire to a face\n const faceOpt = new FaceFromWireDto();\n faceOpt.shape = circleWire;\n faceOpt.planar = true;\n \n const circularFace = await face.createFaceFromWire(faceOpt);\n\n // Step 3: Create a thick solid from the face\n const thickSolidOpt = new ThisckSolidSimpleDto();\n thickSolidOpt.shape = circularFace;\n // Positive offset creates thickness in the direction of the face normal\n thickSolidOpt.offset = thickness;\n \n const thickSolid = await operations.makeThickSolidSimple(thickSolidOpt);\n\n // Step 4: Translate the thick solid upwards to make the original face visible\n const translationOpt = new TranslateDto();\n translationOpt.shape = thickSolid;\n translationOpt.translation = [0, 1, 0]; // Move up by 1 unit\n \n const translatedSolid = await transforms.translate(translationOpt);\n\n // Draw both the original face and resulting thick solid with different colors for comparison\n const originalOptions = new Bit.Inputs.Draw.DrawOcctShapeSimpleOptions();\n originalOptions.edgeWidth = 4;\n originalOptions.edgeColour = \"#00ff00\"; // Green for original\n \n const thickSolidOptions = new Bit.Inputs.Draw.DrawOcctShapeSimpleOptions();\n thickSolidOptions.edgeWidth = 4;\n thickSolidOptions.edgeColour = \"#ff0000\"; // Red for thick solid\n \n bitbybit.draw.drawAnyAsync({ entity: circularFace, options: originalOptions });\n bitbybit.draw.drawAnyAsync({ entity: translatedSolid, options: thickSolidOptions });\n\n}\n\nstart();","type":"typescript"}} title="Creating Thick Solid from Face" /> @@ -151,21 +151,21 @@ This operation works by: curvedWireoffsetDistanceextrusionDirectionoffset3DWirecurvedWire0002124-11623FALSEoffsetDistance0.5extrusionDirection010offset3DWirecurvedWireextrusionDirectionoffsetDistancecurvedWire#00ff004offset3DWire#ff00004","version":"0.21.0","type":"blockly"}} + script={{"script":"curvedWireoffsetDistanceextrusionDirectionoffset3DWirecurvedWire0002124-11623FALSEoffsetDistance0.5extrusionDirection010offset3DWirecurvedWireextrusionDirectionoffsetDistancecurvedWire#00ff004offset3DWire#ff00004","type":"blockly"}} title="3D Wire Offset Operation" /> {\n\n // Define parameters for the 3D offset\n const offsetDistance = 0.5;\n const extrusionDirection = [0, 1, 0]; // Y-axis direction\n\n // Step 1: Create a curved 3D wire using B-spline\n const curveOpt = new BSplineDto();\n // Define control points for a truly 3D curve with varying Y coordinates\n curveOpt.points = [\n [0, 0, 0], // Start point\n [2, 1, 2], // First control point (elevated in Y)\n [4, -1, 1], // Second control point (lowered in Y)\n [6, 2, 3] // End point (elevated in Y and Z)\n ];\n curveOpt.closed = false;\n \n const curvedWire = await wire.createBSpline(curveOpt);\n\n // Step 2: Create 3D offset of the wire\n const offset3DOpt = new Offset3DWireDto();\n offset3DOpt.shape = curvedWire;\n // Direction for the temporary extrusion used in the offset calculation\n offset3DOpt.direction = extrusionDirection as Bit.Inputs.Base.Point3;\n // Distance to offset the wire\n offset3DOpt.offset = offsetDistance;\n \n const offset3DWire = await operations.offset3DWire(offset3DOpt);\n\n // Draw both the original and offset wires with different colors for comparison\n const originalOptions = new Bit.Inputs.Draw.DrawOcctShapeSimpleOptions();\n originalOptions.edgeWidth = 4;\n originalOptions.edgeColour = \"#00ff00\"; // Green for original\n \n const offsetOptions = new Bit.Inputs.Draw.DrawOcctShapeSimpleOptions();\n offsetOptions.edgeWidth = 4;\n offsetOptions.edgeColour = \"#ff0000\"; // Red for offset\n \n bitbybit.draw.drawAnyAsync({ entity: curvedWire, options: originalOptions });\n bitbybit.draw.drawAnyAsync({ entity: offset3DWire, options: offsetOptions });\n\n}\n\nstart();","version":"0.21.0","type":"typescript"}} + script={{"script":"// Import required modules for wire creation and operations\nconst { wire } = bitbybit.occt.shapes;\nconst { operations } = bitbybit.occt;\n// Import DTOs for BSpline and 3D wire offset\nconst { BSplineDto, Offset3DWireDto } = Bit.Inputs.OCCT;\ntype TopoDSWirePointer = Bit.Inputs.OCCT.TopoDSWirePointer;\n\nconst start = async () => {\n\n // Define parameters for the 3D offset\n const offsetDistance = 0.5;\n const extrusionDirection = [0, 1, 0]; // Y-axis direction\n\n // Step 1: Create a curved 3D wire using B-spline\n const curveOpt = new BSplineDto();\n // Define control points for a truly 3D curve with varying Y coordinates\n curveOpt.points = [\n [0, 0, 0], // Start point\n [2, 1, 2], // First control point (elevated in Y)\n [4, -1, 1], // Second control point (lowered in Y)\n [6, 2, 3] // End point (elevated in Y and Z)\n ];\n curveOpt.closed = false;\n \n const curvedWire = await wire.createBSpline(curveOpt);\n\n // Step 2: Create 3D offset of the wire\n const offset3DOpt = new Offset3DWireDto();\n offset3DOpt.shape = curvedWire;\n // Direction for the temporary extrusion used in the offset calculation\n offset3DOpt.direction = extrusionDirection as Bit.Inputs.Base.Point3;\n // Distance to offset the wire\n offset3DOpt.offset = offsetDistance;\n \n const offset3DWire = await operations.offset3DWire(offset3DOpt);\n\n // Draw both the original and offset wires with different colors for comparison\n const originalOptions = new Bit.Inputs.Draw.DrawOcctShapeSimpleOptions();\n originalOptions.edgeWidth = 4;\n originalOptions.edgeColour = \"#00ff00\"; // Green for original\n \n const offsetOptions = new Bit.Inputs.Draw.DrawOcctShapeSimpleOptions();\n offsetOptions.edgeWidth = 4;\n offsetOptions.edgeColour = \"#ff0000\"; // Red for offset\n \n bitbybit.draw.drawAnyAsync({ entity: curvedWire, options: originalOptions });\n bitbybit.draw.drawAnyAsync({ entity: offset3DWire, options: offsetOptions });\n\n}\n\nstart();","type":"typescript"}} title="3D Wire Offset Operation" /> diff --git a/docs/learn/code/common/occt/operations/rotated-extrusions.md b/docs/learn/code/common/occt/operations/rotated-extrusions.md index 622ea449f..d6c9ee279 100644 --- a/docs/learn/code/common/occt/operations/rotated-extrusions.md +++ b/docs/learn/code/common/occt/operations/rotated-extrusions.md @@ -34,21 +34,21 @@ In the examples below, we will demonstrate how to create a simple solid 3D helic 130000104360TRUE","version":"0.21.0","type":"blockly"}} + script={{"script":"130000104360TRUE","type":"blockly"}} title="Extrude the wire into shell kind of shape" /> {\n\n const recOpt = new Bit.Inputs.OCCT.RectangleDto(1, 3);\n const rectangle = await bitbybit.occt.shapes.wire.createRectangleWire(recOpt);\n const rotatedExtrudeOpt = new Bit.Inputs.OCCT.RotationExtrudeDto(rectangle, 4);\n const rotatedExtrude = await bitbybit.occt.operations.rotatedExtrude(rotatedExtrudeOpt)\n\n bitbybit.draw.drawAnyAsync({ entity: rotatedExtrude });\n\n}\n\nstart();","version":"0.21.0","type":"typescript"}} + script={{"script":"const start = async () => {\n\n const recOpt = new Bit.Inputs.OCCT.RectangleDto(1, 3);\n const rectangle = await bitbybit.occt.shapes.wire.createRectangleWire(recOpt);\n const rotatedExtrudeOpt = new Bit.Inputs.OCCT.RotationExtrudeDto(rectangle, 4);\n const rotatedExtrude = await bitbybit.occt.operations.rotatedExtrude(rotatedExtrudeOpt)\n\n bitbybit.draw.drawAnyAsync({ entity: rotatedExtrude });\n\n}\n\nstart();","type":"typescript"}} title="Extrude the wire into shell kind of shape" /> @@ -62,21 +62,21 @@ When the profile is further from the center it will form a helix like shape. Thi pointPromisespointsngonRotationPromisesi3050300150117910001000100010003pointPromises00001061012FALSETRUEpointspointPromisesngonRotationPromisesipointsINSERTLASTngonRotationPromisesi01061.530270TRUEngonRotationPromises","version":"0.21.0","type":"blockly"}} + script={{"script":"pointPromisespointsngonRotationPromisesi3050300150117910001000100010003pointPromises00001061012FALSETRUEpointspointPromisesngonRotationPromisesipointsINSERTLASTngonRotationPromisesi01061.530270TRUEngonRotationPromises","type":"blockly"}} title="Extrude the wire into shell kind of shape" /> {\n\n // Adjust the default camera position to face the object\n const cameraOptions = new CameraConfigurationDto();\n cameraOptions.position = [30, 50, 50];\n cameraOptions.lookAt = [0, 15, 0];\n scene.adjustActiveArcRotateCamera(cameraOptions);\n\n // This ellipse will be used to derive origins for ngons on the ground plane\n const ellipseOptions = new EllipseDto();\n ellipseOptions.radiusMinor = 6;\n ellipseOptions.radiusMajor = 10;\n const ellipse = await wire.createEllipseWire(ellipseOptions);\n\n // We divide the wire into 12 segments and return the points\n const divideOptions = new DivideDto(ellipse);\n divideOptions.removeEndPoint = true;\n divideOptions.nrOfDivisions = 12;\n const points = await wire.divideWireByEqualDistanceToPoints(divideOptions);\n\n // Create ngons on these points\n const ngonOptions = new NGonWireDto();\n ngonOptions.radius = 1.5;\n const ngonPromises = points.map(point => {\n ngonOptions.center = point;\n return wire.createNGonWire(ngonOptions);\n });\n\n const ngons = await Promise.all(ngonPromises);\n\n // Form rotated extrusions on all of the points\n const rotatedExtrudeOptions = new RotationExtrudeDto();\n rotatedExtrudeOptions.angle = 270;\n rotatedExtrudeOptions.height = 30;\n const rotatedExtrusionPromises = ngons.map(ngon => {\n rotatedExtrudeOptions.shape = ngon;\n return operations.rotatedExtrude(rotatedExtrudeOptions);\n });\n\n const rotatedExtrusions = await Promise.all(rotatedExtrusionPromises);\n\n // Compounding multiple shapes will generally deliver much better rendering performance\n // as it will form a single mesh for all of the geometries involved in compound\n const compoundOptions = new CompoundShapesDto(rotatedExtrusions);\n const ngonCompound = await compound.makeCompound(compoundOptions);\n\n // As a last step we draw the ngon with default occt settings (defualt because we omit specifying options property)\n bitbybit.draw.drawAnyAsync({ entity: ngonCompound });\n\n}\n\n// Let's not forget to execute the start function, otherwise nothing will happen.\nstart();","version":"0.21.0","type":"typescript"}} + script={{"script":"// These destructured imports are optional, but convenient later on - option DTO's are classes\nconst { EllipseDto, RotationExtrudeDto, DivideDto, NGonWireDto, CompoundShapesDto } = Bit.Inputs.OCCT;\nconst { CameraConfigurationDto } = Bit.Inputs.BabylonScene;\n// These are parts of the bitbybit API that will be used in the script\nconst { wire, compound } = bitbybit.occt.shapes;\nconst { operations } = bitbybit.occt;\nconst { scene } = bitbybit.babylon;\n// Types need to be destructured one by one\ntype TopoDSWirePointer = Bit.Inputs.OCCT.TopoDSWirePointer;\n\n// Async definition of the start function where we can await on asynchronous CAD algorithms running inside the web workers\nconst start = async () => {\n\n // Adjust the default camera position to face the object\n const cameraOptions = new CameraConfigurationDto();\n cameraOptions.position = [30, 50, 50];\n cameraOptions.lookAt = [0, 15, 0];\n scene.adjustActiveArcRotateCamera(cameraOptions);\n\n // This ellipse will be used to derive origins for ngons on the ground plane\n const ellipseOptions = new EllipseDto();\n ellipseOptions.radiusMinor = 6;\n ellipseOptions.radiusMajor = 10;\n const ellipse = await wire.createEllipseWire(ellipseOptions);\n\n // We divide the wire into 12 segments and return the points\n const divideOptions = new DivideDto(ellipse);\n divideOptions.removeEndPoint = true;\n divideOptions.nrOfDivisions = 12;\n const points = await wire.divideWireByEqualDistanceToPoints(divideOptions);\n\n // Create ngons on these points\n const ngonOptions = new NGonWireDto();\n ngonOptions.radius = 1.5;\n const ngonPromises = points.map(point => {\n ngonOptions.center = point;\n return wire.createNGonWire(ngonOptions);\n });\n\n const ngons = await Promise.all(ngonPromises);\n\n // Form rotated extrusions on all of the points\n const rotatedExtrudeOptions = new RotationExtrudeDto();\n rotatedExtrudeOptions.angle = 270;\n rotatedExtrudeOptions.height = 30;\n const rotatedExtrusionPromises = ngons.map(ngon => {\n rotatedExtrudeOptions.shape = ngon;\n return operations.rotatedExtrude(rotatedExtrudeOptions);\n });\n\n const rotatedExtrusions = await Promise.all(rotatedExtrusionPromises);\n\n // Compounding multiple shapes will generally deliver much better rendering performance\n // as it will form a single mesh for all of the geometries involved in compound\n const compoundOptions = new CompoundShapesDto(rotatedExtrusions);\n const ngonCompound = await compound.makeCompound(compoundOptions);\n\n // As a last step we draw the ngon with default occt settings (defualt because we omit specifying options property)\n bitbybit.draw.drawAnyAsync({ entity: ngonCompound });\n\n}\n\n// Let's not forget to execute the start function, otherwise nothing will happen.\nstart();","type":"typescript"}} title="Extrude the wire into shell kind of shape" /> diff --git a/docs/learn/code/common/occt/operations/simple-loft.md b/docs/learn/code/common/occt/operations/simple-loft.md index 9dca8132c..b3e2ed74c 100644 --- a/docs/learn/code/common/occt/operations/simple-loft.md +++ b/docs/learn/code/common/occt/operations/simple-loft.md @@ -37,21 +37,21 @@ In this tutorial, we'll walk through the process of creating a simple lofted sha ellipse1ellipse2ellipse3ellipsesloftellipse100001048ellipse203001014ellipse307001026ellipsesellipse1ellipse2ellipse3loftellipsesFALSEloft0.001TRUE#6600ccTRUE#ffffff2","version":"0.21.0","type":"blockly"}} + script={{"script":"ellipse1ellipse2ellipse3ellipsesloftellipse100001048ellipse203001014ellipse307001026ellipsesellipse1ellipse2ellipse3loftellipsesFALSEloft0.001TRUE#6600ccTRUE#ffffff2","type":"blockly"}} title="Simple Loft Operation" /> {\n\n // Create an instance of EllipseDto to define the properties of the first ellipse.\n const ellipseOpt = new EllipseDto();\n // Set the minor radius of the ellipse.\n ellipseOpt.radiusMinor = 4;\n // Set the major radius of the ellipse.\n ellipseOpt.radiusMajor = 8;\n // Create the first elliptical wire. The center defaults to [0,0,0] and direction to [0,1,0] if not specified.\n // 'await' is used because shape creation is an asynchronous operation.\n const ellipse1 = await shapes.wire.createEllipseWire(ellipseOpt);\n\n // Modify the ellipseOpt for the second ellipse.\n // Set the center of the second ellipse.\n ellipseOpt.center = [0, 3, 0];\n // Set the minor radius for the second ellipse.\n ellipseOpt.radiusMinor = 1;\n // Set the major radius for the second ellipse.\n ellipseOpt.radiusMajor = 4;\n // Create the second elliptical wire with the updated options.\n const ellipse2 = await shapes.wire.createEllipseWire(ellipseOpt);\n\n // Modify the ellipseOpt for the third ellipse.\n // Set the center of the third ellipse.\n ellipseOpt.center = [0, 7, 0];\n // Set the minor radius for the third ellipse.\n ellipseOpt.radiusMinor = 2;\n // Set the major radius for the third ellipse.\n ellipseOpt.radiusMajor = 6;\n // Create the third elliptical wire with the updated options.\n const ellipse3 = await shapes.wire.createEllipseWire(ellipseOpt);\n\n // Create an instance of LoftDto to define the parameters for the loft operation.\n // The generic type TopoDSShapePointer indicates the type of shapes to be lofted.\n const loftOpt = new LoftDto();\n // Assign an array of the created ellipse wires to the 'shapes' property of loftOpt.\n // These are the profiles that will be connected by the loft.\n loftOpt.shapes = [ellipse1, ellipse2, ellipse3];\n // Perform the loft operation using the defined options.\n // This will create a surface (or shell) connecting the three ellipses.\n // 'makeSolid' defaults to false, creating a shell.\n const loft = await operations.loft(loftOpt);\n\n // Create an instance of DrawOcctShapeSimpleOptions to define how the lofted shape will be displayed.\n const drawOpt = new DrawOcctShapeSimpleOptions();\n // Set the precision for drawing the shape. This affects the tessellation quality.\n drawOpt.precision = 0.001;\n // Set the color of the faces of the lofted shape.\n drawOpt.faceColour = \"#ff00ff\"; // Magenta\n // Draw the lofted shape asynchronously using the specified entity and drawing options.\n draw.drawAnyAsync({ entity: loft, options: drawOpt });\n\n}\n\n// Call the start function to execute the script.\nstart();","version":"0.21.0","type":"typescript"}} + script={{"script":"// Import necessary modules from the bitbybit library.\n// 'operations' and 'shapes' are for OpenCascade Technology (OCCT) functionalities like lofting and creating wires.\nconst { operations, shapes } = bitbybit.occt;\n// 'draw' module is used for rendering shapes on the canvas.\nconst { draw } = bitbybit;\n// Import Data Transfer Objects (DTOs) for defining OCCT inputs.\n// 'EllipseDto' for creating ellipses, 'LoftDto' for loft operation parameters.\nconst { EllipseDto, LoftDto } = Bit.Inputs.OCCT;\n// Import DTO for drawing options.\nconst { DrawOcctShapeSimpleOptions } = Bit.Inputs.Draw;\n// Define a type alias for OCCT shape pointers for better readability.\ntype TopoDSShapePointer = Bit.Inputs.OCCT.TopoDSShapePointer;\n\n// Define an asynchronous function 'start' which will contain the main logic.\nconst start = async () => {\n\n // Create an instance of EllipseDto to define the properties of the first ellipse.\n const ellipseOpt = new EllipseDto();\n // Set the minor radius of the ellipse.\n ellipseOpt.radiusMinor = 4;\n // Set the major radius of the ellipse.\n ellipseOpt.radiusMajor = 8;\n // Create the first elliptical wire. The center defaults to [0,0,0] and direction to [0,1,0] if not specified.\n // 'await' is used because shape creation is an asynchronous operation.\n const ellipse1 = await shapes.wire.createEllipseWire(ellipseOpt);\n\n // Modify the ellipseOpt for the second ellipse.\n // Set the center of the second ellipse.\n ellipseOpt.center = [0, 3, 0];\n // Set the minor radius for the second ellipse.\n ellipseOpt.radiusMinor = 1;\n // Set the major radius for the second ellipse.\n ellipseOpt.radiusMajor = 4;\n // Create the second elliptical wire with the updated options.\n const ellipse2 = await shapes.wire.createEllipseWire(ellipseOpt);\n\n // Modify the ellipseOpt for the third ellipse.\n // Set the center of the third ellipse.\n ellipseOpt.center = [0, 7, 0];\n // Set the minor radius for the third ellipse.\n ellipseOpt.radiusMinor = 2;\n // Set the major radius for the third ellipse.\n ellipseOpt.radiusMajor = 6;\n // Create the third elliptical wire with the updated options.\n const ellipse3 = await shapes.wire.createEllipseWire(ellipseOpt);\n\n // Create an instance of LoftDto to define the parameters for the loft operation.\n // The generic type TopoDSShapePointer indicates the type of shapes to be lofted.\n const loftOpt = new LoftDto();\n // Assign an array of the created ellipse wires to the 'shapes' property of loftOpt.\n // These are the profiles that will be connected by the loft.\n loftOpt.shapes = [ellipse1, ellipse2, ellipse3];\n // Perform the loft operation using the defined options.\n // This will create a surface (or shell) connecting the three ellipses.\n // 'makeSolid' defaults to false, creating a shell.\n const loft = await operations.loft(loftOpt);\n\n // Create an instance of DrawOcctShapeSimpleOptions to define how the lofted shape will be displayed.\n const drawOpt = new DrawOcctShapeSimpleOptions();\n // Set the precision for drawing the shape. This affects the tessellation quality.\n drawOpt.precision = 0.001;\n // Set the color of the faces of the lofted shape.\n drawOpt.faceColour = \"#ff00ff\"; // Magenta\n // Draw the lofted shape asynchronously using the specified entity and drawing options.\n draw.drawAnyAsync({ entity: loft, options: drawOpt });\n\n}\n\n// Call the start function to execute the script.\nstart();","type":"typescript"}} title="Simple Loft Operation" /> diff --git a/docs/learn/code/common/occt/operations/thick-solids.md b/docs/learn/code/common/occt/operations/thick-solids.md index 676a080d8..cd0819877 100644 --- a/docs/learn/code/common/occt/operations/thick-solids.md +++ b/docs/learn/code/common/occt/operations/thick-solids.md @@ -63,21 +63,21 @@ The following examples demonstrate creating thick solids from complex lofted sur bottomPointsmiddlePointstopPointsbottomWiremiddleWiretopWirewireListloftSurfacethickSolidtranslatedSolidthicknessoffsetVectorsurfaceOptionssolidOptionsbottomPoints-30-2-10000110030-2middlePoints-22-1-0.521.50220.521.522-1topPoints-1.540-0.540.50410.540.51.540bottomWirebottomPointsFALSE0.1middleWiremiddlePointsFALSE0.1topWiretopPointsFALSE0.1wireListbottomWiremiddleWiretopWireloftSurfacewireListFALSEthickness0.1thickSolidloftSurfacethicknessoffsetVector003translatedSolidthickSolidoffsetVectorsurfaceOptions0.01TRUE#00ff00TRUE#ffffff2solidOptions0.01TRUE#ff6600TRUE#ffffff2loftSurfacesurfaceOptionstranslatedSolidsolidOptions","version":"0.21.0","type":"blockly"}} + script={{"script":"bottomPointsmiddlePointstopPointsbottomWiremiddleWiretopWirewireListloftSurfacethickSolidtranslatedSolidthicknessoffsetVectorsurfaceOptionssolidOptionsbottomPoints-30-2-10000110030-2middlePoints-22-1-0.521.50220.521.522-1topPoints-1.540-0.540.50410.540.51.540bottomWirebottomPointsFALSE0.1middleWiremiddlePointsFALSE0.1topWiretopPointsFALSE0.1wireListbottomWiremiddleWiretopWireloftSurfacewireListFALSEthickness0.1thickSolidloftSurfacethicknessoffsetVector003translatedSolidthickSolidoffsetVectorsurfaceOptions0.01TRUE#00ff00TRUE#ffffff2solidOptions0.01TRUE#ff6600TRUE#ffffff2loftSurfacesurfaceOptionstranslatedSolidsolidOptions","type":"blockly"}} title="Thick Solid from Lofted Surface (Blockly)" /> {\n\n // Define points for bottom curve (wave-like pattern)\n const bottomPoints = [\n [-3, 0, -2],\n [-1, 0, 0],\n [0, 0, 1],\n [1, 0, 0],\n [3, 0, -2]\n ] as Point3[];\n\n // Define points for middle curve (elevated and more curved)\n const middlePoints = [\n [-2, 2, -1],\n [-0.5, 2, 1.5],\n [0, 2, 2],\n [0.5, 2, 1.5],\n [2, 2, -1]\n ] as Point3[];\n\n // Define points for top curve (simpler, less curved)\n const topPoints = [\n [-1.5, 4, 0],\n [-0.5, 4, 0.5],\n [0, 4, 1],\n [0.5, 4, 0.5],\n [1.5, 4, 0]\n ] as Point3[];\n\n // Create interpolated wires from points\n const bottomWireOpt = new InterpolationDto();\n bottomWireOpt.points = bottomPoints;\n bottomWireOpt.periodic = false;\n bottomWireOpt.tolerance = 0.1;\n const bottomWire = await wire.interpolatePoints(bottomWireOpt);\n\n const middleWireOpt = new InterpolationDto();\n middleWireOpt.points = middlePoints;\n middleWireOpt.periodic = false;\n middleWireOpt.tolerance = 0.1;\n const middleWire = await wire.interpolatePoints(middleWireOpt);\n\n const topWireOpt = new InterpolationDto();\n topWireOpt.points = topPoints;\n topWireOpt.periodic = false;\n topWireOpt.tolerance = 0.1;\n const topWire = await wire.interpolatePoints(topWireOpt);\n\n // Create lofted surface from the three wires\n const loftOpt = new LoftDto();\n loftOpt.shapes = [bottomWire, middleWire, topWire];\n loftOpt.makeSolid = false;\n const loftSurface = await operations.loft(loftOpt);\n\n // Create thick solid from the lofted surface\n const thickness = 0.1;\n const thickSolidOpt = new ThisckSolidSimpleDto();\n thickSolidOpt.shape = loftSurface;\n thickSolidOpt.offset = thickness;\n const thickSolid = await operations.makeThickSolidSimple(thickSolidOpt);\n\n // Translate the thick solid for better visualization\n const offsetVector = [0, 0, 3] as Vector3;\n const translateOpt = new TranslateDto();\n translateOpt.shape = thickSolid;\n translateOpt.translation = offsetVector;\n const translatedSolid = await transforms.translate(translateOpt);\n\n // Create drawing options for the original surface (green)\n const surfaceOptions = new Bit.Inputs.Draw.DrawOcctShapeSimpleOptions();\n surfaceOptions.precision = 0.01;\n surfaceOptions.drawFaces = true;\n surfaceOptions.faceColour = \"#00ff00\";\n surfaceOptions.drawEdges = true;\n surfaceOptions.edgeColour = \"#ffffff\";\n surfaceOptions.edgeWidth = 2;\n\n // Create drawing options for the thick solid (orange)\n const solidOptions = new Bit.Inputs.Draw.DrawOcctShapeSimpleOptions();\n solidOptions.precision = 0.01;\n solidOptions.drawFaces = true;\n solidOptions.faceColour = \"#ff6600\";\n solidOptions.drawEdges = true;\n solidOptions.edgeColour = \"#ffffff\";\n solidOptions.edgeWidth = 2;\n\n // Draw both the original lofted surface and the thick solid\n bitbybit.draw.drawAnyAsync({ entity: loftSurface, options: surfaceOptions });\n bitbybit.draw.drawAnyAsync({ entity: translatedSolid, options: solidOptions });\n\n}\n\nstart();","version":"0.21.0","type":"typescript"}} + script={{"script":"// Import required modules from global bitbybit variable\nconst { wire } = bitbybit.occt.shapes;\nconst { operations } = bitbybit.occt;\nconst { transforms } = bitbybit.occt;\n\nconst { InterpolationDto, LoftDto, ThisckSolidSimpleDto, TranslateDto } = Bit.Inputs.OCCT;\ntype Point3 = Bit.Inputs.Base.Point3;\ntype Vector3 = Bit.Inputs.Base.Vector3;\n\n// Define a type alias for pointers\ntype TopoDSWirePointer = Bit.Inputs.OCCT.TopoDSWirePointer;\ntype TopoDSFacePointer = Bit.Inputs.OCCT.TopoDSFacePointer;\ntype TopoDSShapePointer = Bit.Inputs.OCCT.TopoDSShapePointer;\n\nconst start = async () => {\n\n // Define points for bottom curve (wave-like pattern)\n const bottomPoints = [\n [-3, 0, -2],\n [-1, 0, 0],\n [0, 0, 1],\n [1, 0, 0],\n [3, 0, -2]\n ] as Point3[];\n\n // Define points for middle curve (elevated and more curved)\n const middlePoints = [\n [-2, 2, -1],\n [-0.5, 2, 1.5],\n [0, 2, 2],\n [0.5, 2, 1.5],\n [2, 2, -1]\n ] as Point3[];\n\n // Define points for top curve (simpler, less curved)\n const topPoints = [\n [-1.5, 4, 0],\n [-0.5, 4, 0.5],\n [0, 4, 1],\n [0.5, 4, 0.5],\n [1.5, 4, 0]\n ] as Point3[];\n\n // Create interpolated wires from points\n const bottomWireOpt = new InterpolationDto();\n bottomWireOpt.points = bottomPoints;\n bottomWireOpt.periodic = false;\n bottomWireOpt.tolerance = 0.1;\n const bottomWire = await wire.interpolatePoints(bottomWireOpt);\n\n const middleWireOpt = new InterpolationDto();\n middleWireOpt.points = middlePoints;\n middleWireOpt.periodic = false;\n middleWireOpt.tolerance = 0.1;\n const middleWire = await wire.interpolatePoints(middleWireOpt);\n\n const topWireOpt = new InterpolationDto();\n topWireOpt.points = topPoints;\n topWireOpt.periodic = false;\n topWireOpt.tolerance = 0.1;\n const topWire = await wire.interpolatePoints(topWireOpt);\n\n // Create lofted surface from the three wires\n const loftOpt = new LoftDto();\n loftOpt.shapes = [bottomWire, middleWire, topWire];\n loftOpt.makeSolid = false;\n const loftSurface = await operations.loft(loftOpt);\n\n // Create thick solid from the lofted surface\n const thickness = 0.1;\n const thickSolidOpt = new ThisckSolidSimpleDto();\n thickSolidOpt.shape = loftSurface;\n thickSolidOpt.offset = thickness;\n const thickSolid = await operations.makeThickSolidSimple(thickSolidOpt);\n\n // Translate the thick solid for better visualization\n const offsetVector = [0, 0, 3] as Vector3;\n const translateOpt = new TranslateDto();\n translateOpt.shape = thickSolid;\n translateOpt.translation = offsetVector;\n const translatedSolid = await transforms.translate(translateOpt);\n\n // Create drawing options for the original surface (green)\n const surfaceOptions = new Bit.Inputs.Draw.DrawOcctShapeSimpleOptions();\n surfaceOptions.precision = 0.01;\n surfaceOptions.drawFaces = true;\n surfaceOptions.faceColour = \"#00ff00\";\n surfaceOptions.drawEdges = true;\n surfaceOptions.edgeColour = \"#ffffff\";\n surfaceOptions.edgeWidth = 2;\n\n // Create drawing options for the thick solid (orange)\n const solidOptions = new Bit.Inputs.Draw.DrawOcctShapeSimpleOptions();\n solidOptions.precision = 0.01;\n solidOptions.drawFaces = true;\n solidOptions.faceColour = \"#ff6600\";\n solidOptions.drawEdges = true;\n solidOptions.edgeColour = \"#ffffff\";\n solidOptions.edgeWidth = 2;\n\n // Draw both the original lofted surface and the thick solid\n bitbybit.draw.drawAnyAsync({ entity: loftSurface, options: surfaceOptions });\n bitbybit.draw.drawAnyAsync({ entity: translatedSolid, options: solidOptions });\n\n}\n\nstart();","type":"typescript"}} title="Thick Solid from Lofted Surface" /> diff --git a/docs/learn/code/common/occt/operations/wire-offset-multiple.md b/docs/learn/code/common/occt/operations/wire-offset-multiple.md index f6daecab0..8f74925b2 100644 --- a/docs/learn/code/common/occt/operations/wire-offset-multiple.md +++ b/docs/learn/code/common/occt/operations/wire-offset-multiple.md @@ -31,7 +31,7 @@ The following example demonstrates creating multiple offset curves from a single @@ -39,7 +39,7 @@ The following example demonstrates creating multiple offset curves from a single controlPointsbaseWirestepoverDistanceoffset1offset2offset3baseStyleoffset1Styleoffset2Styleoffset3StylecontrolPoints-40-2-202001203400stepoverDistance0.5baseWirecontrolPointsFALSE0.01offset1baseWirestepoverDistance0.01offset2baseWireMULTIPLYstepoverDistance20.01offset3baseWireMULTIPLYstepoverDistance30.01baseStyle0.01FALSETRUE#00ff004offset1Style0.01FALSETRUE#ff99003offset2Style0.01FALSETRUE#ff66003offset3Style0.01FALSETRUE#ff33003baseWirebaseStyleoffset1offset1Styleoffset2offset2Styleoffset3offset3Style","version":"0.21.0","type":"blockly"}} + script={{"script":"controlPointsbaseWirestepoverDistanceoffset1offset2offset3baseStyleoffset1Styleoffset2Styleoffset3StylecontrolPoints-40-2-202001203400stepoverDistance0.5baseWirecontrolPointsFALSE0.01offset1baseWirestepoverDistance0.01offset2baseWireMULTIPLYstepoverDistance20.01offset3baseWireMULTIPLYstepoverDistance30.01baseStyle0.01FALSETRUE#00ff004offset1Style0.01FALSETRUE#ff99003offset2Style0.01FALSETRUE#ff66003offset3Style0.01FALSETRUE#ff33003baseWirebaseStyleoffset1offset1Styleoffset2offset2Styleoffset3offset3Style","type":"blockly"}} title="Multiple Wire Offsets" /> @@ -47,7 +47,7 @@ The following example demonstrates creating multiple offset curves from a single {\n\n // Define the stepover distance for CNC toolpaths\n const stepoverDistance = 0.5;\n\n // Step 1: Define control points for the base toolpath\n const points = [\n [-4, 0, -2],\n [-2, 0, 2],\n [0, 0, 1],\n [2, 0, 3],\n [4, 0, 0]\n ] as Point3[];\n\n // Step 2: Create base wire through interpolation\n const interpolationOpt = new InterpolationDto();\n interpolationOpt.points = points;\n interpolationOpt.periodic = false;\n interpolationOpt.tolerance = 0.01;\n \n const baseWire = await wire.interpolatePoints(interpolationOpt);\n\n // Step 3: Create multiple offset toolpaths\n // First offset\n const offset1Opt = new OffsetDto();\n offset1Opt.shape = baseWire;\n offset1Opt.distance = stepoverDistance;\n offset1Opt.tolerance = 0.01;\n \n const offset1 = await operations.offset(offset1Opt);\n\n // Second offset\n const offset2Opt = new OffsetDto();\n offset2Opt.shape = baseWire;\n offset2Opt.distance = stepoverDistance * 2;\n offset2Opt.tolerance = 0.01;\n \n const offset2 = await operations.offset(offset2Opt);\n\n // Third offset\n const offset3Opt = new OffsetDto();\n offset3Opt.shape = baseWire;\n offset3Opt.distance = stepoverDistance * 3;\n offset3Opt.tolerance = 0.01;\n \n const offset3 = await operations.offset(offset3Opt);\n\n // Step 4: Visualize all toolpaths with different colors\n // Base wire (green - reference path)\n const baseOptions = new Bit.Inputs.Draw.DrawOcctShapeSimpleOptions();\n baseOptions.edgeWidth = 4;\n baseOptions.edgeColour = \"#00ff00\"; // Green\n baseOptions.drawFaces = false;\n \n // Offset 1 (orange)\n const offset1Options = new Bit.Inputs.Draw.DrawOcctShapeSimpleOptions();\n offset1Options.edgeWidth = 3;\n offset1Options.edgeColour = \"#ff9900\"; // Orange\n offset1Options.drawFaces = false;\n \n // Offset 2 (red-orange)\n const offset2Options = new Bit.Inputs.Draw.DrawOcctShapeSimpleOptions();\n offset2Options.edgeWidth = 3;\n offset2Options.edgeColour = \"#ff6600\"; // Red-orange\n offset2Options.drawFaces = false;\n \n // Offset 3 (red)\n const offset3Options = new Bit.Inputs.Draw.DrawOcctShapeSimpleOptions();\n offset3Options.edgeWidth = 3;\n offset3Options.edgeColour = \"#ff3300\"; // Red\n offset3Options.drawFaces = false;\n \n // Draw all toolpaths\n bitbybit.draw.drawAnyAsync({ entity: baseWire, options: baseOptions });\n bitbybit.draw.drawAnyAsync({ entity: offset1, options: offset1Options });\n bitbybit.draw.drawAnyAsync({ entity: offset2, options: offset2Options });\n bitbybit.draw.drawAnyAsync({ entity: offset3, options: offset3Options });\n\n}\n\nstart();","version":"0.21.0","type":"typescript"}} + script={{"script":"// Import required modules for wire creation and operations\nconst { wire } = bitbybit.occt.shapes;\nconst { operations } = bitbybit.occt;\n// Import DTOs for interpolation and offset operations\nconst { InterpolationDto, OffsetDto } = Bit.Inputs.OCCT;\ntype TopoDSWirePointer = Bit.Inputs.OCCT.TopoDSWirePointer;\ntype Point3 = Bit.Inputs.Base.Point3;\n\nconst start = async () => {\n\n // Define the stepover distance for CNC toolpaths\n const stepoverDistance = 0.5;\n\n // Step 1: Define control points for the base toolpath\n const points = [\n [-4, 0, -2],\n [-2, 0, 2],\n [0, 0, 1],\n [2, 0, 3],\n [4, 0, 0]\n ] as Point3[];\n\n // Step 2: Create base wire through interpolation\n const interpolationOpt = new InterpolationDto();\n interpolationOpt.points = points;\n interpolationOpt.periodic = false;\n interpolationOpt.tolerance = 0.01;\n \n const baseWire = await wire.interpolatePoints(interpolationOpt);\n\n // Step 3: Create multiple offset toolpaths\n // First offset\n const offset1Opt = new OffsetDto();\n offset1Opt.shape = baseWire;\n offset1Opt.distance = stepoverDistance;\n offset1Opt.tolerance = 0.01;\n \n const offset1 = await operations.offset(offset1Opt);\n\n // Second offset\n const offset2Opt = new OffsetDto();\n offset2Opt.shape = baseWire;\n offset2Opt.distance = stepoverDistance * 2;\n offset2Opt.tolerance = 0.01;\n \n const offset2 = await operations.offset(offset2Opt);\n\n // Third offset\n const offset3Opt = new OffsetDto();\n offset3Opt.shape = baseWire;\n offset3Opt.distance = stepoverDistance * 3;\n offset3Opt.tolerance = 0.01;\n \n const offset3 = await operations.offset(offset3Opt);\n\n // Step 4: Visualize all toolpaths with different colors\n // Base wire (green - reference path)\n const baseOptions = new Bit.Inputs.Draw.DrawOcctShapeSimpleOptions();\n baseOptions.edgeWidth = 4;\n baseOptions.edgeColour = \"#00ff00\"; // Green\n baseOptions.drawFaces = false;\n \n // Offset 1 (orange)\n const offset1Options = new Bit.Inputs.Draw.DrawOcctShapeSimpleOptions();\n offset1Options.edgeWidth = 3;\n offset1Options.edgeColour = \"#ff9900\"; // Orange\n offset1Options.drawFaces = false;\n \n // Offset 2 (red-orange)\n const offset2Options = new Bit.Inputs.Draw.DrawOcctShapeSimpleOptions();\n offset2Options.edgeWidth = 3;\n offset2Options.edgeColour = \"#ff6600\"; // Red-orange\n offset2Options.drawFaces = false;\n \n // Offset 3 (red)\n const offset3Options = new Bit.Inputs.Draw.DrawOcctShapeSimpleOptions();\n offset3Options.edgeWidth = 3;\n offset3Options.edgeColour = \"#ff3300\"; // Red\n offset3Options.drawFaces = false;\n \n // Draw all toolpaths\n bitbybit.draw.drawAnyAsync({ entity: baseWire, options: baseOptions });\n bitbybit.draw.drawAnyAsync({ entity: offset1, options: offset1Options });\n bitbybit.draw.drawAnyAsync({ entity: offset2, options: offset2Options });\n bitbybit.draw.drawAnyAsync({ entity: offset3, options: offset3Options });\n\n}\n\nstart();","type":"typescript"}} title="Multiple Wire Offsets" /> diff --git a/docs/learn/code/common/occt/shapes/compound/compounded-drawing.md b/docs/learn/code/common/occt/shapes/compound/compounded-drawing.md index 4c65c2ae8..b8308ff9e 100644 --- a/docs/learn/code/common/occt/shapes/compound/compounded-drawing.md +++ b/docs/learn/code/common/occt/shapes/compound/compounded-drawing.md @@ -40,21 +40,21 @@ The example below demonstrates this principle through a complex workflow that cr bottomPointsmiddlePointstopPointsbottomWiremiddleWiretopWirewiresListloftedSurfacemainFacenrHexagonsUnrHexagonsVscalePatternhexWires1hexWires2reversedWiresiframesfirstFramesCompoundsecondFramesCompoundmaterial1material2bottomPoints[[-30, 0, -20], [-10, 0, 0], [0, 0, 10], [10, 0, 0],[30, 0, -20]]middlePoints[[-20, 20, -10], [-5, 20, 15], [0, 20, 20], [5, 20, 15],[20, 20, -10]]topPoints[[-15, 30, 0], [-5, 30, 5], [0, 30, 10], [5, 30, 5],[15, 30, 0]]bottomWirebottomPointsFALSE0.1middleWiremiddlePointsFALSE0.1topWiretopPointsFALSE0.1wiresListbottomWiremiddleWiretopWireloftedSurfacewiresListFALSEmainFaceloftedSurface0nrHexagonsU28nrHexagonsV10scalePattern0.7hexWires1mainFacenrHexagonsUnrHexagonsVFALSE00FALSEFALSEFALSEFALSEhexWires2mainFacenrHexagonsUnrHexagonsVFALSEscalePatternscalePattern00FALSEFALSEFALSEFALSEreversedWiresi1hexWires21INSERTLASTreversedWiresGETFROM_STARThexWires2iframesi1hexWires11INSERTLASTframesGETFROM_STARThexWires1iGETFROM_STARTreversedWiresiFALSEfirstFramesCompoundframes[true, true, false]secondFramesCompoundframes[false,false,true]material1First#9155ff#0000000.150.91FALSE3material2Second#000000#0000000.90.151FALSE3firstFramesCompound0.01material1TRUE#00000010secondFramesCompound0.01material2TRUE#00000010-100-100-1003#ffffff#ffffff1024TRUE0TRUE0.20.00010.00210000'default'10000.10.7TRUE442244015011791000100010001000340040010100.450.50.5FALSE#ffffff#ffffff#050506#627a9d'to top'0100","version":"0.21.0","type":"blockly"}} + script={{"script":"bottomPointsmiddlePointstopPointsbottomWiremiddleWiretopWirewiresListloftedSurfacemainFacenrHexagonsUnrHexagonsVscalePatternhexWires1hexWires2reversedWiresiframesfirstFramesCompoundsecondFramesCompoundmaterial1material2bottomPoints[[-30, 0, -20], [-10, 0, 0], [0, 0, 10], [10, 0, 0],[30, 0, -20]]middlePoints[[-20, 20, -10], [-5, 20, 15], [0, 20, 20], [5, 20, 15],[20, 20, -10]]topPoints[[-15, 30, 0], [-5, 30, 5], [0, 30, 10], [5, 30, 5],[15, 30, 0]]bottomWirebottomPointsFALSE0.1middleWiremiddlePointsFALSE0.1topWiretopPointsFALSE0.1wiresListbottomWiremiddleWiretopWireloftedSurfacewiresListFALSEmainFaceloftedSurface0nrHexagonsU28nrHexagonsV10scalePattern0.7hexWires1mainFacenrHexagonsUnrHexagonsVFALSE00FALSEFALSEFALSEFALSEhexWires2mainFacenrHexagonsUnrHexagonsVFALSEscalePatternscalePattern00FALSEFALSEFALSEFALSEreversedWiresi1hexWires21INSERTLASTreversedWiresGETFROM_STARThexWires2iframesi1hexWires11INSERTLASTframesGETFROM_STARThexWires1iGETFROM_STARTreversedWiresiFALSEfirstFramesCompoundframes[true, true, false]secondFramesCompoundframes[false,false,true]material1First#9155ff#0000000.150.91FALSE3material2Second#000000#0000000.90.151FALSE3firstFramesCompound0.01material1TRUE#00000010secondFramesCompound0.01material2TRUE#00000010-100-100-1003#ffffff#ffffff1024TRUE0TRUE0.20.00010.00210000'default'10000.10.7TRUE442244015011791000100010001000340040010100.450.50.5FALSE#ffffff#ffffff#050506#627a9d'to top'0100","type":"blockly"}} title="Compounding hex frames into single entity will render faster" /> {\n // Define point sets for three different wire levels\n const bottomPoints: Point3[] = [\n [-30, 0, -20],\n [-10, 0, 0],\n [0, 0, 10],\n [10, 0, 0],\n [30, 0, -20]\n ];\n\n const middlePoints: Point3[] = [\n [-20, 20, -10],\n [-5, 20, 15],\n [0, 20, 20],\n [5, 20, 15],\n [20, 20, -10]\n ];\n\n const topPoints: Point3[] = [\n [-15, 30, 0],\n [-5, 30, 5],\n [0, 30, 10],\n [5, 30, 5],\n [15, 30, 0]\n ];\n\n // Create wires by interpolating points\n const bottomWireOptions = new InterpolationDto();\n bottomWireOptions.points = bottomPoints;\n bottomWireOptions.periodic = false;\n bottomWireOptions.tolerance = 0.1;\n const bottomWire = await wire.interpolatePoints(bottomWireOptions);\n\n const middleWireOptions = new InterpolationDto();\n middleWireOptions.points = middlePoints;\n middleWireOptions.periodic = false;\n middleWireOptions.tolerance = 0.1;\n const middleWire = await wire.interpolatePoints(middleWireOptions);\n\n const topWireOptions = new InterpolationDto();\n topWireOptions.points = topPoints;\n topWireOptions.periodic = false;\n topWireOptions.tolerance = 0.1;\n const topWire = await wire.interpolatePoints(topWireOptions);\n\n // Create list of wires for lofting\n const wiresList = [bottomWire, middleWire, topWire];\n\n // Loft the wires to create a surface\n const loftOptions = new LoftDto();\n loftOptions.shapes = wiresList;\n loftOptions.makeSolid = false;\n const loftedSurface = await operations.loft(loftOptions);\n\n // Get the face from the lofted surface\n const getFaceOptions = new ShapeIndexDto();\n getFaceOptions.shape = loftedSurface;\n getFaceOptions.index = 0;\n const mainFace = await face.getFace(getFaceOptions);\n\n // Subdivision parameters\n const nrHexagonsU = 28;\n const nrHexagonsV = 10;\n const scalePattern = [0.7];\n\n // Create first hexagon subdivision (regular pattern)\n const hexSubdivision1Options = new FaceSubdivideToHexagonWiresDto();\n hexSubdivision1Options.shape = mainFace;\n hexSubdivision1Options.nrHexagonsU = nrHexagonsU;\n hexSubdivision1Options.nrHexagonsV = nrHexagonsV;\n const hexWires1 = await face.subdivideToHexagonWires(hexSubdivision1Options);\n\n // Create second hexagon subdivision (scaled pattern)\n const hexSubdivision2Options = new FaceSubdivideToHexagonWiresDto();\n hexSubdivision2Options.shape = mainFace;\n hexSubdivision2Options.nrHexagonsU = nrHexagonsU;\n hexSubdivision2Options.nrHexagonsV = nrHexagonsV;\n hexSubdivision2Options.scalePatternU = scalePattern;\n hexSubdivision2Options.scalePatternV = scalePattern;\n const hexWires2 = await face.subdivideToHexagonWires(hexSubdivision2Options);\n\n // Reverse the wires from the second subdivision using for loop\n const reversedWiresPromises: Promise[] = [];\n for (const hexWire of hexWires2) {\n const reversedWire = wire.reversedWire({ shape: hexWire });\n reversedWiresPromises.push(reversedWire);\n }\n\n const reversedWires = await Promise.all(reversedWiresPromises);\n\n // Combine both wire sets - equivalent to flip lists operation in Rete\n const frameWiresGrouped = hexWires1.map((h, i) => [h, reversedWires[i]]);\n\n // Create frames\n const framePromises = frameWiresGrouped.map(f => {\n const faceFromWires2Options = new FaceFromWiresDto();\n faceFromWires2Options.shapes = f;\n faceFromWires2Options.planar = false;\n return face.createFaceFromWires(faceFromWires2Options);\n });\n\n const frames = await Promise.all(framePromises);\n\n const firstFrames = await bitbybit.lists.getByPattern({\n list: frames,\n pattern: [true, true, false]\n });\n\n const secondFrames = await bitbybit.lists.getByPattern({\n list: frames,\n pattern: [false, false, true]\n })\n\n // Create first compound from the first pattern of hexagon faces\n const compoundOptions = new CompoundShapesDto();\n compoundOptions.shapes = firstFrames;\n const firstCompound = await compound.makeCompound(compoundOptions);\n\n // Create second compound from the first pattern of hexagon faces\n compoundOptions.shapes = secondFrames;\n const secondCompound = await compound.makeCompound(compoundOptions);\n\n // Create materials for rendering\n const firstMaterial = new PBRMetallicRoughnessDto();\n firstMaterial.name = \"Blue Material\";\n firstMaterial.baseColor = \"#9155ff\";\n firstMaterial.metallic = 0.1;\n firstMaterial.roughness = 0.9;\n firstMaterial.backFaceCulling = false;\n firstMaterial.zOffset = 3;\n const blueMatResult = material.pbrMetallicRoughness.create(firstMaterial);\n\n // Create drawing options for the first frames\n const firstDrawOptions = new DrawOcctShapeOptions();\n firstDrawOptions.drawEdges = true;\n firstDrawOptions.edgeColour = \"#000000\";\n firstDrawOptions.edgeWidth = 10;\n firstDrawOptions.faceMaterial = blueMatResult;\n\n bitbybit.draw.drawAnyAsync({\n entity: firstCompound,\n options: firstDrawOptions\n });\n\n // Create materials for rendering\n const secondMaterial = new PBRMetallicRoughnessDto();\n secondMaterial.name = \"Black Material\";\n secondMaterial.baseColor = \"#000000\";\n secondMaterial.metallic = 0.9;\n secondMaterial.roughness = 0.23;\n secondMaterial.backFaceCulling = false;\n secondMaterial.zOffset = 3;\n const secondMatResult = material.pbrMetallicRoughness.create(secondMaterial);\n\n // Create drawing options for the first frames\n const secondDrawOptions = new DrawOcctShapeOptions();\n secondDrawOptions.drawEdges = true;\n secondDrawOptions.edgeColour = \"#000000\";\n secondDrawOptions.edgeWidth = 10;\n secondDrawOptions.faceMaterial = secondMatResult;\n\n bitbybit.draw.drawAnyAsync({\n entity: secondCompound,\n options: secondDrawOptions\n });\n\n // Set up scene lighting and camera\n const skyboxOptions = new SkyboxDto();\n skyboxOptions.skybox = skyboxEnum.city;\n skyboxOptions.hideSkybox = true;\n scene.enableSkybox(skyboxOptions);\n\n const dirLightOptions = new DirectionalLightDto();\n dirLightOptions.intensity = 3;\n scene.drawDirectionalLight(dirLightOptions);\n\n const gradientBackgroundOptions = new SceneTwoColorLinearGradientDto();\n gradientBackgroundOptions.colorFrom = \"#050506\";\n gradientBackgroundOptions.colorTo = \"#627a9d\";\n gradientBackgroundOptions.direction = gradientDirectionEnum.toTop;\n scene.twoColorLinearGradient(gradientBackgroundOptions);\n\n const cameraConfigurationOptions = new CameraConfigurationDto();\n cameraConfigurationOptions.position = [44, 30, 44];\n cameraConfigurationOptions.lookAt = [0, 15, 0];\n scene.adjustActiveArcRotateCamera(cameraConfigurationOptions);\n\n const gridOptions = new SceneDrawGridMeshDto();\n bitbybit.draw.drawGridMesh(gridOptions);\n}\n\n// Execute the function\nstart();","version":"0.21.0","type":"typescript"}} + script={{"script":"// Import required DTOs for wire creation, lofting, face operations, and compounds\nconst { InterpolationDto, LoftDto, ShapeIndexDto, FaceSubdivideToHexagonWiresDto, FaceFromWiresDto, CompoundShapesDto } = Bit.Inputs.OCCT;\nconst { DrawOcctShapeOptions, SceneDrawGridMeshDto } = Bit.Inputs.Draw;\nconst { PBRMetallicRoughnessDto } = Bit.Inputs.BabylonMaterial;\nconst { CameraConfigurationDto, DirectionalLightDto, SceneTwoColorLinearGradientDto, SkyboxDto } = Bit.Inputs.BabylonScene;\nconst { skyboxEnum, gradientDirectionEnum } = Bit.Inputs.Base;\n\n\n// Import type definitions for type safety\ntype Point3 = Bit.Inputs.Base.Point3;\ntype Vector3 = Bit.Inputs.Base.Vector3;\ntype TopoDSWirePointer = Bit.Inputs.OCCT.TopoDSWirePointer;\ntype TopoDSFacePointer = Bit.Inputs.OCCT.TopoDSFacePointer;\ntype TopoDSCompoundPointer = Bit.Inputs.OCCT.TopoDSCompoundPointer;\n// Get access to OCCT modules\nconst { wire, face, compound } = bitbybit.occt.shapes;\nconst { operations } = bitbybit.occt;\nconst { material } = bitbybit.babylon;\nconst { scene } = bitbybit.babylon;\n\n// Define the main function to create complex face compound\nconst start = async () => {\n // Define point sets for three different wire levels\n const bottomPoints: Point3[] = [\n [-30, 0, -20],\n [-10, 0, 0],\n [0, 0, 10],\n [10, 0, 0],\n [30, 0, -20]\n ];\n\n const middlePoints: Point3[] = [\n [-20, 20, -10],\n [-5, 20, 15],\n [0, 20, 20],\n [5, 20, 15],\n [20, 20, -10]\n ];\n\n const topPoints: Point3[] = [\n [-15, 30, 0],\n [-5, 30, 5],\n [0, 30, 10],\n [5, 30, 5],\n [15, 30, 0]\n ];\n\n // Create wires by interpolating points\n const bottomWireOptions = new InterpolationDto();\n bottomWireOptions.points = bottomPoints;\n bottomWireOptions.periodic = false;\n bottomWireOptions.tolerance = 0.1;\n const bottomWire = await wire.interpolatePoints(bottomWireOptions);\n\n const middleWireOptions = new InterpolationDto();\n middleWireOptions.points = middlePoints;\n middleWireOptions.periodic = false;\n middleWireOptions.tolerance = 0.1;\n const middleWire = await wire.interpolatePoints(middleWireOptions);\n\n const topWireOptions = new InterpolationDto();\n topWireOptions.points = topPoints;\n topWireOptions.periodic = false;\n topWireOptions.tolerance = 0.1;\n const topWire = await wire.interpolatePoints(topWireOptions);\n\n // Create list of wires for lofting\n const wiresList = [bottomWire, middleWire, topWire];\n\n // Loft the wires to create a surface\n const loftOptions = new LoftDto();\n loftOptions.shapes = wiresList;\n loftOptions.makeSolid = false;\n const loftedSurface = await operations.loft(loftOptions);\n\n // Get the face from the lofted surface\n const getFaceOptions = new ShapeIndexDto();\n getFaceOptions.shape = loftedSurface;\n getFaceOptions.index = 0;\n const mainFace = await face.getFace(getFaceOptions);\n\n // Subdivision parameters\n const nrHexagonsU = 28;\n const nrHexagonsV = 10;\n const scalePattern = [0.7];\n\n // Create first hexagon subdivision (regular pattern)\n const hexSubdivision1Options = new FaceSubdivideToHexagonWiresDto();\n hexSubdivision1Options.shape = mainFace;\n hexSubdivision1Options.nrHexagonsU = nrHexagonsU;\n hexSubdivision1Options.nrHexagonsV = nrHexagonsV;\n const hexWires1 = await face.subdivideToHexagonWires(hexSubdivision1Options);\n\n // Create second hexagon subdivision (scaled pattern)\n const hexSubdivision2Options = new FaceSubdivideToHexagonWiresDto();\n hexSubdivision2Options.shape = mainFace;\n hexSubdivision2Options.nrHexagonsU = nrHexagonsU;\n hexSubdivision2Options.nrHexagonsV = nrHexagonsV;\n hexSubdivision2Options.scalePatternU = scalePattern;\n hexSubdivision2Options.scalePatternV = scalePattern;\n const hexWires2 = await face.subdivideToHexagonWires(hexSubdivision2Options);\n\n // Reverse the wires from the second subdivision using for loop\n const reversedWiresPromises: Promise[] = [];\n for (const hexWire of hexWires2) {\n const reversedWire = wire.reversedWire({ shape: hexWire });\n reversedWiresPromises.push(reversedWire);\n }\n\n const reversedWires = await Promise.all(reversedWiresPromises);\n\n // Combine both wire sets - equivalent to flip lists operation in Rete\n const frameWiresGrouped = hexWires1.map((h, i) => [h, reversedWires[i]]);\n\n // Create frames\n const framePromises = frameWiresGrouped.map(f => {\n const faceFromWires2Options = new FaceFromWiresDto();\n faceFromWires2Options.shapes = f;\n faceFromWires2Options.planar = false;\n return face.createFaceFromWires(faceFromWires2Options);\n });\n\n const frames = await Promise.all(framePromises);\n\n const firstFrames = await bitbybit.lists.getByPattern({\n list: frames,\n pattern: [true, true, false]\n });\n\n const secondFrames = await bitbybit.lists.getByPattern({\n list: frames,\n pattern: [false, false, true]\n })\n\n // Create first compound from the first pattern of hexagon faces\n const compoundOptions = new CompoundShapesDto();\n compoundOptions.shapes = firstFrames;\n const firstCompound = await compound.makeCompound(compoundOptions);\n\n // Create second compound from the first pattern of hexagon faces\n compoundOptions.shapes = secondFrames;\n const secondCompound = await compound.makeCompound(compoundOptions);\n\n // Create materials for rendering\n const firstMaterial = new PBRMetallicRoughnessDto();\n firstMaterial.name = \"Blue Material\";\n firstMaterial.baseColor = \"#9155ff\";\n firstMaterial.metallic = 0.1;\n firstMaterial.roughness = 0.9;\n firstMaterial.backFaceCulling = false;\n firstMaterial.zOffset = 3;\n const blueMatResult = material.pbrMetallicRoughness.create(firstMaterial);\n\n // Create drawing options for the first frames\n const firstDrawOptions = new DrawOcctShapeOptions();\n firstDrawOptions.drawEdges = true;\n firstDrawOptions.edgeColour = \"#000000\";\n firstDrawOptions.edgeWidth = 10;\n firstDrawOptions.faceMaterial = blueMatResult;\n\n bitbybit.draw.drawAnyAsync({\n entity: firstCompound,\n options: firstDrawOptions\n });\n\n // Create materials for rendering\n const secondMaterial = new PBRMetallicRoughnessDto();\n secondMaterial.name = \"Black Material\";\n secondMaterial.baseColor = \"#000000\";\n secondMaterial.metallic = 0.9;\n secondMaterial.roughness = 0.23;\n secondMaterial.backFaceCulling = false;\n secondMaterial.zOffset = 3;\n const secondMatResult = material.pbrMetallicRoughness.create(secondMaterial);\n\n // Create drawing options for the first frames\n const secondDrawOptions = new DrawOcctShapeOptions();\n secondDrawOptions.drawEdges = true;\n secondDrawOptions.edgeColour = \"#000000\";\n secondDrawOptions.edgeWidth = 10;\n secondDrawOptions.faceMaterial = secondMatResult;\n\n bitbybit.draw.drawAnyAsync({\n entity: secondCompound,\n options: secondDrawOptions\n });\n\n // Set up scene lighting and camera\n const skyboxOptions = new SkyboxDto();\n skyboxOptions.skybox = skyboxEnum.city;\n skyboxOptions.hideSkybox = true;\n scene.enableSkybox(skyboxOptions);\n\n const dirLightOptions = new DirectionalLightDto();\n dirLightOptions.intensity = 3;\n scene.drawDirectionalLight(dirLightOptions);\n\n const gradientBackgroundOptions = new SceneTwoColorLinearGradientDto();\n gradientBackgroundOptions.colorFrom = \"#050506\";\n gradientBackgroundOptions.colorTo = \"#627a9d\";\n gradientBackgroundOptions.direction = gradientDirectionEnum.toTop;\n scene.twoColorLinearGradient(gradientBackgroundOptions);\n\n const cameraConfigurationOptions = new CameraConfigurationDto();\n cameraConfigurationOptions.position = [44, 30, 44];\n cameraConfigurationOptions.lookAt = [0, 15, 0];\n scene.adjustActiveArcRotateCamera(cameraConfigurationOptions);\n\n const gridOptions = new SceneDrawGridMeshDto();\n bitbybit.draw.drawGridMesh(gridOptions);\n}\n\n// Execute the function\nstart();","type":"typescript"}} title="Compounding hex frames into single entity will render faster" /> diff --git a/docs/learn/code/common/occt/shapes/compound/intro.md b/docs/learn/code/common/occt/shapes/compound/intro.md index 30d4f7c1d..21602b0ae 100644 --- a/docs/learn/code/common/occt/shapes/compound/intro.md +++ b/docs/learn/code/common/occt/shapes/compound/intro.md @@ -48,21 +48,21 @@ If you're not experiencing noticeable performance issues in the first example, t gridSizesphereRadiusspacinghalfGridxPositionsyPositionszPositionsxyzgridSize3sphereRadius1spacing2.5halfGridDIVIDEMULTIPLYgridSizespacing2xPositionsspacingNEGhalfGridhalfGridyPositionsspacingNEGhalfGridhalfGridzPositionsspacingNEGhalfGridhalfGridx1xPositions1y1yPositions1z1zPositions1GETFROM_STARTxPositionsxGETFROM_STARTyPositionsyGETFROM_STARTzPositionsz","version":"0.21.0","type":"blockly"}} + script={{"script":"gridSizesphereRadiusspacinghalfGridxPositionsyPositionszPositionsxyzgridSize3sphereRadius1spacing2.5halfGridDIVIDEMULTIPLYgridSizespacing2xPositionsspacingNEGhalfGridhalfGridyPositionsspacingNEGhalfGridhalfGridzPositionsspacingNEGhalfGridhalfGridx1xPositions1y1yPositions1z1zPositions1GETFROM_STARTxPositionsxGETFROM_STARTyPositionsyGETFROM_STARTzPositionsz","type":"blockly"}} title="Creating individual spheres leads to performance issues" /> {\n // Grid parameters\n const gridSize = 3; // Number of spheres per side\n const sphereRadius = 1; // Radius of each sphere\n const spacing = 2.5; // Distance between sphere centers\n \n // Calculate grid boundaries\n const halfGrid = (gridSize * spacing) / 2;\n \n // Generate grid positions using span functions for 3D grid\n const xPositions = vector.span({\n min: -halfGrid,\n max: halfGrid,\n step: spacing\n });\n \n const yPositions = vector.span({\n min: -halfGrid,\n max: halfGrid,\n step: spacing\n });\n \n const zPositions = vector.span({\n min: -halfGrid,\n max: halfGrid,\n step: spacing\n });\n \n // Create individual spheres using nested loops for 3D grid\n // This approach creates each sphere separately, leading to performance issues\n for (const xPos of xPositions) {\n for (const yPos of yPositions) {\n for (const zPos of zPositions) {\n // Define sphere creation options\n const sphereOptions = new SphereDto();\n sphereOptions.radius = sphereRadius;\n sphereOptions.center = [xPos, yPos, zPos];\n \n // Create and immediately draw each sphere individually\n // This is inefficient as each sphere requires its own mesh and draw call\n const sphere = await solid.createSphere(sphereOptions);\n \n // Each draw call is separate, creating performance overhead\n bitbybit.draw.drawAnyAsync({\n entity: sphere\n });\n }\n }\n }\n}\n\n// Execute the function\nstart();","version":"0.21.0","type":"typescript"}} + script={{"script":"// Import required DTOs for creating spheres\nconst { SphereDto } = Bit.Inputs.OCCT;\n// Import type definitions for type safety\ntype Point3 = Bit.Inputs.Base.Point3;\n\n// Get access to OCCT modules and utility functions\nconst { solid } = bitbybit.occt.shapes;\nconst { vector } = bitbybit;\n\n// Define the main function to create individual spheres (performance problem)\nconst start = async () => {\n // Grid parameters\n const gridSize = 3; // Number of spheres per side\n const sphereRadius = 1; // Radius of each sphere\n const spacing = 2.5; // Distance between sphere centers\n \n // Calculate grid boundaries\n const halfGrid = (gridSize * spacing) / 2;\n \n // Generate grid positions using span functions for 3D grid\n const xPositions = vector.span({\n min: -halfGrid,\n max: halfGrid,\n step: spacing\n });\n \n const yPositions = vector.span({\n min: -halfGrid,\n max: halfGrid,\n step: spacing\n });\n \n const zPositions = vector.span({\n min: -halfGrid,\n max: halfGrid,\n step: spacing\n });\n \n // Create individual spheres using nested loops for 3D grid\n // This approach creates each sphere separately, leading to performance issues\n for (const xPos of xPositions) {\n for (const yPos of yPositions) {\n for (const zPos of zPositions) {\n // Define sphere creation options\n const sphereOptions = new SphereDto();\n sphereOptions.radius = sphereRadius;\n sphereOptions.center = [xPos, yPos, zPos];\n \n // Create and immediately draw each sphere individually\n // This is inefficient as each sphere requires its own mesh and draw call\n const sphere = await solid.createSphere(sphereOptions);\n \n // Each draw call is separate, creating performance overhead\n bitbybit.draw.drawAnyAsync({\n entity: sphere\n });\n }\n }\n }\n}\n\n// Execute the function\nstart();","type":"typescript"}} title="Creating individual spheres leads to performance issues" /> @@ -76,21 +76,21 @@ The solution to this performance problem is to use compounds. Instead of creatin gridSizesphereRadiusspacinghalfGridxPositionsyPositionszPositionsspheresxycompoundzgridSize3sphereRadius1spacing2.5halfGridDIVIDEMULTIPLYgridSizespacing2xPositionsspacingNEGhalfGridhalfGridyPositionsspacingNEGhalfGridhalfGridzPositionsspacingNEGhalfGridhalfGridspheresx1xPositions1y1yPositions1z1zPositions1INSERTLASTspheressphereRadiusGETFROM_STARTxPositionsxGETFROM_STARTyPositionsyGETFROM_STARTzPositionszcompoundspherescompound","version":"0.21.0","type":"blockly"}} + script={{"script":"gridSizesphereRadiusspacinghalfGridxPositionsyPositionszPositionsspheresxycompoundzgridSize3sphereRadius1spacing2.5halfGridDIVIDEMULTIPLYgridSizespacing2xPositionsspacingNEGhalfGridhalfGridyPositionsspacingNEGhalfGridhalfGridzPositionsspacingNEGhalfGridhalfGridspheresx1xPositions1y1yPositions1z1zPositions1INSERTLASTspheressphereRadiusGETFROM_STARTxPositionsxGETFROM_STARTyPositionsyGETFROM_STARTzPositionszcompoundspherescompound","type":"blockly"}} title="Compounded spheres provide significantly better performance" /> {\n // Grid parameters\n const gridSize = 5; // Number of spheres per side\n const sphereRadius = 1; // Radius of each sphere\n const spacing = 2.5; // Distance between sphere centers\n\n // Calculate grid boundaries\n const halfGrid = (gridSize * spacing) / 2;\n\n // Generate grid positions using span functions\n const xPositions = vector.span({\n min: -halfGrid,\n max: halfGrid,\n step: spacing\n });\n\n const yPositions = vector.span({\n min: -halfGrid,\n max: halfGrid,\n step: spacing\n });\n\n const zPositions = vector.span({\n min: -halfGrid,\n max: halfGrid,\n step: spacing\n });\n\n // Create array to store all spheres before compounding\n const spheres: TopoDSSolidPointer[] = [];\n\n // Create all spheres first and store them in the array\n for (const xPos of xPositions) {\n for (const yPos of yPositions) {\n for (const zPos of zPositions) {\n // Define sphere creation options\n const sphereOptions = new SphereDto();\n sphereOptions.radius = sphereRadius;\n sphereOptions.center = [xPos, yPos, zPos];\n\n // Create sphere and add to array\n const sphere = await solid.createSphere(sphereOptions);\n spheres.push(sphere);\n }\n }\n }\n\n // Create compound from all spheres\n const compoundOptions = new CompoundShapesDto();\n compoundOptions.shapes = spheres;\n const sphereCompound = await compound.makeCompound(compoundOptions);\n\n // Draw compound\n bitbybit.draw.drawAnyAsync({\n entity: sphereCompound\n });\n\n}\n\n// Execute the function\nstart();","version":"0.21.0","type":"typescript"}} + script={{"script":"// Import required DTOs for creating spheres, compounds, and transformations\nconst { SphereDto, CompoundShapesDto, RotateDto, TranslateDto } = Bit.Inputs.OCCT;\n// Import type definitions for type safety\ntype Point3 = Bit.Inputs.Base.Point3;\ntype Vector3 = Bit.Inputs.Base.Vector3;\ntype TopoDSSolidPointer = Bit.Inputs.OCCT.TopoDSSolidPointer;\ntype TopoDSCompoundPointer = Bit.Inputs.OCCT.TopoDSCompoundPointer;\n\n// Get access to OCCT modules and utility functions\nconst { solid, compound } = bitbybit.occt.shapes;\nconst { transforms } = bitbybit.occt;\nconst { vector } = bitbybit;\n\n// Define the main function to create a compound\nconst start = async () => {\n // Grid parameters\n const gridSize = 5; // Number of spheres per side\n const sphereRadius = 1; // Radius of each sphere\n const spacing = 2.5; // Distance between sphere centers\n\n // Calculate grid boundaries\n const halfGrid = (gridSize * spacing) / 2;\n\n // Generate grid positions using span functions\n const xPositions = vector.span({\n min: -halfGrid,\n max: halfGrid,\n step: spacing\n });\n\n const yPositions = vector.span({\n min: -halfGrid,\n max: halfGrid,\n step: spacing\n });\n\n const zPositions = vector.span({\n min: -halfGrid,\n max: halfGrid,\n step: spacing\n });\n\n // Create array to store all spheres before compounding\n const spheres: TopoDSSolidPointer[] = [];\n\n // Create all spheres first and store them in the array\n for (const xPos of xPositions) {\n for (const yPos of yPositions) {\n for (const zPos of zPositions) {\n // Define sphere creation options\n const sphereOptions = new SphereDto();\n sphereOptions.radius = sphereRadius;\n sphereOptions.center = [xPos, yPos, zPos];\n\n // Create sphere and add to array\n const sphere = await solid.createSphere(sphereOptions);\n spheres.push(sphere);\n }\n }\n }\n\n // Create compound from all spheres\n const compoundOptions = new CompoundShapesDto();\n compoundOptions.shapes = spheres;\n const sphereCompound = await compound.makeCompound(compoundOptions);\n\n // Draw compound\n bitbybit.draw.drawAnyAsync({\n entity: sphereCompound\n });\n\n}\n\n// Execute the function\nstart();","type":"typescript"}} title="Compounded spheres provide significantly better performance" /> @@ -105,21 +105,21 @@ Another major advantage of compounds is the ability to transform the entire grou gridSizesphereRadiusspacinghalfGridxPositionsyPositionszPositionsspheresxycompoundzrotatedCompoundgridSize5sphereRadius1spacing2.5halfGridDIVIDEMULTIPLYgridSizespacing2xPositionsspacingNEGhalfGridhalfGridyPositionsspacingNEGhalfGridhalfGridzPositionsspacingNEGhalfGridhalfGridspheresx1xPositions1y1yPositions1z1zPositions1INSERTLASTspheressphereRadiusGETFROM_STARTxPositionsxGETFROM_STARTyPositionsyGETFROM_STARTzPositionszcompoundspheresrotatedCompoundcompound00145rotatedCompound","version":"0.21.0","type":"blockly"}} + script={{"script":"gridSizesphereRadiusspacinghalfGridxPositionsyPositionszPositionsspheresxycompoundzrotatedCompoundgridSize5sphereRadius1spacing2.5halfGridDIVIDEMULTIPLYgridSizespacing2xPositionsspacingNEGhalfGridhalfGridyPositionsspacingNEGhalfGridhalfGridzPositionsspacingNEGhalfGridhalfGridspheresx1xPositions1y1yPositions1z1zPositions1INSERTLASTspheressphereRadiusGETFROM_STARTxPositionsxGETFROM_STARTyPositionsyGETFROM_STARTzPositionszcompoundspheresrotatedCompoundcompound00145rotatedCompound","type":"blockly"}} title="Compound can be rotated and translated as a single grouped entity" /> {\n // Grid parameters\n const gridSize = 5; // Number of spheres per side\n const sphereRadius = 1; // Radius of each sphere\n const spacing = 2.5; // Distance between sphere centers\n\n // Calculate grid boundaries\n const halfGrid = (gridSize * spacing) / 2;\n\n // Generate grid positions using span functions\n const xPositions = vector.span({\n min: -halfGrid,\n max: halfGrid,\n step: spacing\n });\n\n const yPositions = vector.span({\n min: -halfGrid,\n max: halfGrid,\n step: spacing\n });\n\n const zPositions = vector.span({\n min: -halfGrid,\n max: halfGrid,\n step: spacing\n });\n\n // Create array to store all spheres before compounding\n const spheres: TopoDSSolidPointer[] = [];\n\n // Create all spheres first and store them in the array\n for (const xPos of xPositions) {\n for (const yPos of yPositions) {\n for (const zPos of zPositions) {\n // Define sphere creation options\n const sphereOptions = new SphereDto();\n sphereOptions.radius = sphereRadius;\n sphereOptions.center = [xPos, yPos, zPos];\n\n // Create sphere and add to array\n const sphere = await solid.createSphere(sphereOptions);\n spheres.push(sphere);\n }\n }\n }\n\n // Create compound from all spheres\n const compoundOptions = new CompoundShapesDto();\n compoundOptions.shapes = spheres;\n const sphereCompound = await compound.makeCompound(compoundOptions);\n\n // Transform the entire compound as a single entity\n // First, rotate the compound around the Z-axis\n const rotateOptions = new RotateDto();\n rotateOptions.shape = sphereCompound;\n rotateOptions.axis = [0, 0, 1]; // Z-axis rotation\n rotateOptions.angle = 45; // 45 degrees\n const rotatedCompound = await transforms.rotate(rotateOptions);\n\n // Draw the transformed compound\n // All spheres move together as a single unified entity\n bitbybit.draw.drawAnyAsync({\n entity: rotatedCompound\n });\n}\n\n// Execute the function\nstart();","version":"0.21.0","type":"typescript"}} + script={{"script":"// Import required DTOs for creating spheres, compounds, and transformations\nconst { SphereDto, CompoundShapesDto, RotateDto, TranslateDto } = Bit.Inputs.OCCT;\n// Import type definitions for type safety\ntype Point3 = Bit.Inputs.Base.Point3;\ntype Vector3 = Bit.Inputs.Base.Vector3;\ntype TopoDSSolidPointer = Bit.Inputs.OCCT.TopoDSSolidPointer;\ntype TopoDSCompoundPointer = Bit.Inputs.OCCT.TopoDSCompoundPointer;\n\n// Get access to OCCT modules and utility functions\nconst { solid, compound } = bitbybit.occt.shapes;\nconst { transforms } = bitbybit.occt;\nconst { vector } = bitbybit;\n\n// Define the main function to create and transform a compound (unified transformation)\nconst start = async () => {\n // Grid parameters\n const gridSize = 5; // Number of spheres per side\n const sphereRadius = 1; // Radius of each sphere\n const spacing = 2.5; // Distance between sphere centers\n\n // Calculate grid boundaries\n const halfGrid = (gridSize * spacing) / 2;\n\n // Generate grid positions using span functions\n const xPositions = vector.span({\n min: -halfGrid,\n max: halfGrid,\n step: spacing\n });\n\n const yPositions = vector.span({\n min: -halfGrid,\n max: halfGrid,\n step: spacing\n });\n\n const zPositions = vector.span({\n min: -halfGrid,\n max: halfGrid,\n step: spacing\n });\n\n // Create array to store all spheres before compounding\n const spheres: TopoDSSolidPointer[] = [];\n\n // Create all spheres first and store them in the array\n for (const xPos of xPositions) {\n for (const yPos of yPositions) {\n for (const zPos of zPositions) {\n // Define sphere creation options\n const sphereOptions = new SphereDto();\n sphereOptions.radius = sphereRadius;\n sphereOptions.center = [xPos, yPos, zPos];\n\n // Create sphere and add to array\n const sphere = await solid.createSphere(sphereOptions);\n spheres.push(sphere);\n }\n }\n }\n\n // Create compound from all spheres\n const compoundOptions = new CompoundShapesDto();\n compoundOptions.shapes = spheres;\n const sphereCompound = await compound.makeCompound(compoundOptions);\n\n // Transform the entire compound as a single entity\n // First, rotate the compound around the Z-axis\n const rotateOptions = new RotateDto();\n rotateOptions.shape = sphereCompound;\n rotateOptions.axis = [0, 0, 1]; // Z-axis rotation\n rotateOptions.angle = 45; // 45 degrees\n const rotatedCompound = await transforms.rotate(rotateOptions);\n\n // Draw the transformed compound\n // All spheres move together as a single unified entity\n bitbybit.draw.drawAnyAsync({\n entity: rotatedCompound\n });\n}\n\n// Execute the function\nstart();","type":"typescript"}} title="Compound can be rotated and translated as a single grouped entity" /> diff --git a/docs/learn/code/common/occt/shapes/edge/edge-constraints.md b/docs/learn/code/common/occt/shapes/edge/edge-constraints.md index b7a1912b6..5a78f767b 100644 --- a/docs/learn/code/common/occt/shapes/edge/edge-constraints.md +++ b/docs/learn/code/common/occt/shapes/edge/edge-constraints.md @@ -46,21 +46,21 @@ This is particularly useful in mechanical design when you need to connect two sp circlepoint1point2tangentLinescircle4000010point1007point2909tangentLinescirclepoint1point21e-7'all''none'tangentLinescirclepoint1point2","version":"0.21.0","type":"blockly"}} + script={{"script":"circlepoint1point2tangentLinescircle4000010point1007point2909tangentLinescirclepoint1point21e-7'all''none'tangentLinescirclepoint1point2","type":"blockly"}} title="Constraint tangent lines from two points to circle" /> {\n // Create a circle edge\n const circleOptions = new CircleDto();\n circleOptions.radius = 4;\n circleOptions.center = [0, 0, 0] as Point3;\n circleOptions.direction = [0, 1, 0] as Vector3;\n\n const circle = await bitbybit.occt.shapes.edge.createCircleEdge(circleOptions);\n\n // Define two points\n const point1: Point3 = [0, 0, 7];\n const point2: Point3 = [9, 0, 9];\n\n // Create constraint options for tangent lines from two points to circle\n const constraintOptions = new ConstraintTanLinesFromTwoPtsToCircleDto();\n constraintOptions.circle = circle;\n constraintOptions.point1 = point1;\n constraintOptions.point2 = point2;\n constraintOptions.tolerance = 1e-7;\n constraintOptions.positionResult = positionResultEnum.all;\n constraintOptions.circleRemainder = circleInclusionEnum.none;\n\n // Create the constraint tangent lines\n const tangentLines = await bitbybit.occt.shapes.edge.constraintTanLinesFromTwoPtsToCircle(constraintOptions);\n\n // Draw the tangent lines\n bitbybit.draw.drawAnyAsync({ entity: tangentLines });\n // Draw the circle\n bitbybit.draw.drawAnyAsync({ entity: circle });\n // Draw the two points\n bitbybit.draw.drawAnyAsync({ entity: [point1] });\n bitbybit.draw.drawAnyAsync({ entity: [point2] });\n}\n\n// Execute the function\nstart();","version":"0.21.0","type":"typescript"}} + script={{"script":"const { CircleDto, ConstraintTanLinesFromTwoPtsToCircleDto, positionResultEnum, circleInclusionEnum } = Bit.Inputs.OCCT;\n// Import required types\ntype Point3 = Bit.Inputs.Base.Point3;\ntype Vector3 = Bit.Inputs.Base.Vector3;\ntype TopoDSEdgePointer = Bit.Inputs.OCCT.TopoDSEdgePointer;\n\n// Define the main function\nconst start = async () => {\n // Create a circle edge\n const circleOptions = new CircleDto();\n circleOptions.radius = 4;\n circleOptions.center = [0, 0, 0] as Point3;\n circleOptions.direction = [0, 1, 0] as Vector3;\n\n const circle = await bitbybit.occt.shapes.edge.createCircleEdge(circleOptions);\n\n // Define two points\n const point1: Point3 = [0, 0, 7];\n const point2: Point3 = [9, 0, 9];\n\n // Create constraint options for tangent lines from two points to circle\n const constraintOptions = new ConstraintTanLinesFromTwoPtsToCircleDto();\n constraintOptions.circle = circle;\n constraintOptions.point1 = point1;\n constraintOptions.point2 = point2;\n constraintOptions.tolerance = 1e-7;\n constraintOptions.positionResult = positionResultEnum.all;\n constraintOptions.circleRemainder = circleInclusionEnum.none;\n\n // Create the constraint tangent lines\n const tangentLines = await bitbybit.occt.shapes.edge.constraintTanLinesFromTwoPtsToCircle(constraintOptions);\n\n // Draw the tangent lines\n bitbybit.draw.drawAnyAsync({ entity: tangentLines });\n // Draw the circle\n bitbybit.draw.drawAnyAsync({ entity: circle });\n // Draw the two points\n bitbybit.draw.drawAnyAsync({ entity: [point1] });\n bitbybit.draw.drawAnyAsync({ entity: [point2] });\n}\n\n// Execute the function\nstart();","type":"typescript"}} title="Constraint tangent lines from two points to circle" /> @@ -77,21 +77,21 @@ This operation is commonly used in architectural drawings when you need to creat circlepointtangentLinescircle4000010point807tangentLinescirclepoint1e-7'all''none'tangentLinescirclepoint","version":"0.21.0","type":"blockly"}} + script={{"script":"circlepointtangentLinescircle4000010point807tangentLinescirclepoint1e-7'all''none'tangentLinescirclepoint","type":"blockly"}} title="Constraint tangent lines from point to circle" /> {\n // Create a circle edge\n const circleOptions = new CircleDto();\n circleOptions.radius = 4;\n circleOptions.center = [0, 0, 0] as Point3;\n circleOptions.direction = [0, 1, 0] as Vector3;\n\n const circle = await bitbybit.occt.shapes.edge.createCircleEdge(circleOptions);\n\n // Define a point\n const point: Point3 = [8, 0, 7];\n\n // Create constraint options for tangent lines from point to circle\n const constraintOptions = new ConstraintTanLinesFromPtToCircleDto();\n constraintOptions.circle = circle;\n constraintOptions.point = point;\n constraintOptions.tolerance = 1e-7;\n constraintOptions.positionResult = positionResultEnum.all;\n constraintOptions.circleRemainder = circleInclusionEnum.none;\n\n // Create the constraint tangent lines\n const tangentLines = await bitbybit.occt.shapes.edge.constraintTanLinesFromPtToCircle(constraintOptions);\n\n // Draw the tangent lines\n bitbybit.draw.drawAnyAsync({ entity: tangentLines });\n // Draw the circle\n bitbybit.draw.drawAnyAsync({ entity: circle });\n // Draw the point\n bitbybit.draw.drawAnyAsync({ entity: point });\n}\n\n// Execute the function\nstart();","version":"0.21.0","type":"typescript"}} + script={{"script":"const { CircleDto, ConstraintTanLinesFromPtToCircleDto, positionResultEnum, circleInclusionEnum } = Bit.Inputs.OCCT;\n// Import required types\ntype Point3 = Bit.Inputs.Base.Point3;\ntype Vector3 = Bit.Inputs.Base.Vector3;\ntype TopoDSEdgePointer = Bit.Inputs.OCCT.TopoDSEdgePointer;\n\n// Define the main function\nconst start = async () => {\n // Create a circle edge\n const circleOptions = new CircleDto();\n circleOptions.radius = 4;\n circleOptions.center = [0, 0, 0] as Point3;\n circleOptions.direction = [0, 1, 0] as Vector3;\n\n const circle = await bitbybit.occt.shapes.edge.createCircleEdge(circleOptions);\n\n // Define a point\n const point: Point3 = [8, 0, 7];\n\n // Create constraint options for tangent lines from point to circle\n const constraintOptions = new ConstraintTanLinesFromPtToCircleDto();\n constraintOptions.circle = circle;\n constraintOptions.point = point;\n constraintOptions.tolerance = 1e-7;\n constraintOptions.positionResult = positionResultEnum.all;\n constraintOptions.circleRemainder = circleInclusionEnum.none;\n\n // Create the constraint tangent lines\n const tangentLines = await bitbybit.occt.shapes.edge.constraintTanLinesFromPtToCircle(constraintOptions);\n\n // Draw the tangent lines\n bitbybit.draw.drawAnyAsync({ entity: tangentLines });\n // Draw the circle\n bitbybit.draw.drawAnyAsync({ entity: circle });\n // Draw the point\n bitbybit.draw.drawAnyAsync({ entity: point });\n}\n\n// Execute the function\nstart();","type":"typescript"}} title="Constraint tangent lines from point to circle" /> @@ -107,21 +107,21 @@ This is especially valuable in gear design, pulley systems, or any mechanical ap circle1circle2tangentLinescircle13000010circle22700010tangentLinescircle1circle21e-7'all''none'tangentLinescircle1circle2","version":"0.21.0","type":"blockly"}} + script={{"script":"circle1circle2tangentLinescircle13000010circle22700010tangentLinescircle1circle21e-7'all''none'tangentLinescircle1circle2","type":"blockly"}} title="Constraint tangent lines on two circles" /> {\n // Create first circle edge\n const circle1Options = new CircleDto();\n circle1Options.radius = 3;\n circle1Options.center = [0, 0, 0] as Point3;\n circle1Options.direction = [0, 1, 0] as Vector3;\n\n const circle1 = await bitbybit.occt.shapes.edge.createCircleEdge(circle1Options);\n\n // Create second circle edge\n const circle2Options = new CircleDto();\n circle2Options.radius = 2;\n circle2Options.center = [7, 0, 0] as Point3;\n circle2Options.direction = [0, 1, 0] as Vector3;\n\n const circle2 = await bitbybit.occt.shapes.edge.createCircleEdge(circle2Options);\n\n // Create constraint options for tangent lines between two circles\n const constraintOptions = new ConstraintTanLinesOnTwoCirclesDto();\n constraintOptions.circle1 = circle1;\n constraintOptions.circle2 = circle2;\n constraintOptions.tolerance = 1e-7;\n constraintOptions.positionResult = positionResultEnum.all;\n constraintOptions.circleRemainders = twoCircleInclusionEnum.none;\n\n // Create the constraint tangent lines\n const tangentLines = await bitbybit.occt.shapes.edge.constraintTanLinesOnTwoCircles(constraintOptions);\n\n // Draw the tangent lines\n bitbybit.draw.drawAnyAsync({ entity: tangentLines });\n // Draw the first circle\n bitbybit.draw.drawAnyAsync({ entity: circle1 });\n // Draw the second circle\n bitbybit.draw.drawAnyAsync({ entity: circle2 });\n}\n\n// Execute the function\nstart();","version":"0.21.0","type":"typescript"}} + script={{"script":"const { CircleDto, ConstraintTanLinesOnTwoCirclesDto, positionResultEnum, twoCircleInclusionEnum } = Bit.Inputs.OCCT;\n// Import required types\ntype Point3 = Bit.Inputs.Base.Point3;\ntype Vector3 = Bit.Inputs.Base.Vector3;\ntype TopoDSEdgePointer = Bit.Inputs.OCCT.TopoDSEdgePointer;\n\n// Define the main function\nconst start = async () => {\n // Create first circle edge\n const circle1Options = new CircleDto();\n circle1Options.radius = 3;\n circle1Options.center = [0, 0, 0] as Point3;\n circle1Options.direction = [0, 1, 0] as Vector3;\n\n const circle1 = await bitbybit.occt.shapes.edge.createCircleEdge(circle1Options);\n\n // Create second circle edge\n const circle2Options = new CircleDto();\n circle2Options.radius = 2;\n circle2Options.center = [7, 0, 0] as Point3;\n circle2Options.direction = [0, 1, 0] as Vector3;\n\n const circle2 = await bitbybit.occt.shapes.edge.createCircleEdge(circle2Options);\n\n // Create constraint options for tangent lines between two circles\n const constraintOptions = new ConstraintTanLinesOnTwoCirclesDto();\n constraintOptions.circle1 = circle1;\n constraintOptions.circle2 = circle2;\n constraintOptions.tolerance = 1e-7;\n constraintOptions.positionResult = positionResultEnum.all;\n constraintOptions.circleRemainders = twoCircleInclusionEnum.none;\n\n // Create the constraint tangent lines\n const tangentLines = await bitbybit.occt.shapes.edge.constraintTanLinesOnTwoCircles(constraintOptions);\n\n // Draw the tangent lines\n bitbybit.draw.drawAnyAsync({ entity: tangentLines });\n // Draw the first circle\n bitbybit.draw.drawAnyAsync({ entity: circle1 });\n // Draw the second circle\n bitbybit.draw.drawAnyAsync({ entity: circle2 });\n}\n\n// Execute the function\nstart();","type":"typescript"}} title="Constraint tangent lines on two circles" /> @@ -138,21 +138,21 @@ This is particularly useful for creating buffer zones around existing circular f circle1circle2tangentCirclescircle13000010circle21.5500010tangentCirclescircle1circle21e-70.8tangentCirclescircle1circle2","version":"0.21.0","type":"blockly"}} + script={{"script":"circle1circle2tangentCirclescircle13000010circle21.5500010tangentCirclescircle1circle21e-70.8tangentCirclescircle1circle2","type":"blockly"}} title="Constraint tangent circles on two circles" /> {\n // Create first circle edge\n const circle1Options = new CircleDto();\n circle1Options.radius = 3;\n circle1Options.center = [0, 0, 0] as Point3;\n circle1Options.direction = [0, 1, 0] as Vector3;\n\n const circle1 = await bitbybit.occt.shapes.edge.createCircleEdge(circle1Options);\n\n // Create second circle edge\n const circle2Options = new CircleDto();\n circle2Options.radius = 1.5;\n circle2Options.center = [5, 0, 0] as Point3;\n circle2Options.direction = [0, 1, 0] as Vector3;\n\n const circle2 = await bitbybit.occt.shapes.edge.createCircleEdge(circle2Options);\n\n // Create constraint options for tangent circles between two circles\n const constraintOptions = new ConstraintTanCirclesOnTwoCirclesDto();\n constraintOptions.circle1 = circle1;\n constraintOptions.circle2 = circle2;\n constraintOptions.tolerance = 1e-7;\n constraintOptions.radius = 0.8;\n\n // Create the constraint tangent circles\n const tangentCircles = await bitbybit.occt.shapes.edge.constraintTanCirclesOnTwoCircles(constraintOptions);\n\n // Draw the tangent circles\n bitbybit.draw.drawAnyAsync({ entity: tangentCircles });\n // Draw the first circle\n bitbybit.draw.drawAnyAsync({ entity: circle1 });\n // Draw the second circle\n bitbybit.draw.drawAnyAsync({ entity: circle2 });\n}\n\n// Execute the function\nstart();","version":"0.21.0","type":"typescript"}} + script={{"script":"const { CircleDto, ConstraintTanCirclesOnTwoCirclesDto } = Bit.Inputs.OCCT;\n// Import required types\ntype Point3 = Bit.Inputs.Base.Point3;\ntype Vector3 = Bit.Inputs.Base.Vector3;\ntype TopoDSEdgePointer = Bit.Inputs.OCCT.TopoDSEdgePointer;\n\n// Define the main function\nconst start = async () => {\n // Create first circle edge\n const circle1Options = new CircleDto();\n circle1Options.radius = 3;\n circle1Options.center = [0, 0, 0] as Point3;\n circle1Options.direction = [0, 1, 0] as Vector3;\n\n const circle1 = await bitbybit.occt.shapes.edge.createCircleEdge(circle1Options);\n\n // Create second circle edge\n const circle2Options = new CircleDto();\n circle2Options.radius = 1.5;\n circle2Options.center = [5, 0, 0] as Point3;\n circle2Options.direction = [0, 1, 0] as Vector3;\n\n const circle2 = await bitbybit.occt.shapes.edge.createCircleEdge(circle2Options);\n\n // Create constraint options for tangent circles between two circles\n const constraintOptions = new ConstraintTanCirclesOnTwoCirclesDto();\n constraintOptions.circle1 = circle1;\n constraintOptions.circle2 = circle2;\n constraintOptions.tolerance = 1e-7;\n constraintOptions.radius = 0.8;\n\n // Create the constraint tangent circles\n const tangentCircles = await bitbybit.occt.shapes.edge.constraintTanCirclesOnTwoCircles(constraintOptions);\n\n // Draw the tangent circles\n bitbybit.draw.drawAnyAsync({ entity: tangentCircles });\n // Draw the first circle\n bitbybit.draw.drawAnyAsync({ entity: circle1 });\n // Draw the second circle\n bitbybit.draw.drawAnyAsync({ entity: circle2 });\n}\n\n// Execute the function\nstart();","type":"typescript"}} title="Constraint tangent circles on two circles" /> @@ -169,21 +169,21 @@ This constraint is perfect for creating rounded transitions in designs where you circlepointtangentCirclescircle3000010point400tangentCirclescirclepoint1e-72tangentCirclescirclepoint","version":"0.21.0","type":"blockly"}} + script={{"script":"circlepointtangentCirclescircle3000010point400tangentCirclescirclepoint1e-72tangentCirclescirclepoint","type":"blockly"}} title="Constraint tangent circles on circle and point" /> {\n // Create a circle edge\n const circleOptions = new CircleDto();\n circleOptions.radius = 3;\n circleOptions.center = [0, 0, 0] as Point3;\n circleOptions.direction = [0, 1, 0] as Vector3;\n\n const circle = await bitbybit.occt.shapes.edge.createCircleEdge(circleOptions);\n\n // Define a point\n const point: Point3 = [4, 0, 0];\n\n // Create constraint options for tangent circles between circle and point\n const constraintOptions = new ConstraintTanCirclesOnCircleAndPntDto();\n constraintOptions.circle = circle;\n constraintOptions.point = point;\n constraintOptions.tolerance = 1e-7;\n constraintOptions.radius = 2;\n\n // Create the constraint tangent circles\n const tangentCircles = await bitbybit.occt.shapes.edge.constraintTanCirclesOnCircleAndPnt(constraintOptions);\n\n // Draw the tangent circles\n bitbybit.draw.drawAnyAsync({ entity: tangentCircles });\n // Draw the circle\n bitbybit.draw.drawAnyAsync({ entity: circle });\n // Draw the point\n bitbybit.draw.drawAnyAsync({ entity: point });\n}\n\n// Execute the function\nstart();","version":"0.21.0","type":"typescript"}} + script={{"script":"const { CircleDto, ConstraintTanCirclesOnCircleAndPntDto } = Bit.Inputs.OCCT;\n// Import required types\ntype Point3 = Bit.Inputs.Base.Point3;\ntype Vector3 = Bit.Inputs.Base.Vector3;\ntype TopoDSEdgePointer = Bit.Inputs.OCCT.TopoDSEdgePointer;\n\n// Define the main function\nconst start = async () => {\n // Create a circle edge\n const circleOptions = new CircleDto();\n circleOptions.radius = 3;\n circleOptions.center = [0, 0, 0] as Point3;\n circleOptions.direction = [0, 1, 0] as Vector3;\n\n const circle = await bitbybit.occt.shapes.edge.createCircleEdge(circleOptions);\n\n // Define a point\n const point: Point3 = [4, 0, 0];\n\n // Create constraint options for tangent circles between circle and point\n const constraintOptions = new ConstraintTanCirclesOnCircleAndPntDto();\n constraintOptions.circle = circle;\n constraintOptions.point = point;\n constraintOptions.tolerance = 1e-7;\n constraintOptions.radius = 2;\n\n // Create the constraint tangent circles\n const tangentCircles = await bitbybit.occt.shapes.edge.constraintTanCirclesOnCircleAndPnt(constraintOptions);\n\n // Draw the tangent circles\n bitbybit.draw.drawAnyAsync({ entity: tangentCircles });\n // Draw the circle\n bitbybit.draw.drawAnyAsync({ entity: circle });\n // Draw the point\n bitbybit.draw.drawAnyAsync({ entity: point });\n}\n\n// Execute the function\nstart();","type":"typescript"}} title="Constraint tangent circles on circle and point" /> diff --git a/docs/learn/code/common/occt/shapes/edge/edge-indexes.mdx b/docs/learn/code/common/occt/shapes/edge/edge-indexes.mdx index e16719afc..728d09d61 100644 --- a/docs/learn/code/common/occt/shapes/edge/edge-indexes.mdx +++ b/docs/learn/code/common/occt/shapes/edge/edge-indexes.mdx @@ -42,21 +42,21 @@ Below are examples in TypeScript, Blockly, and Rete that demonstrate creating a **TypeScript Example: Drawing Edge Indexes** {\n\n const boxOpt = new Bit.Inputs.OCCT.BoxDto();\n boxOpt.width = 5;\n boxOpt.length = 8;\n boxOpt.height = 10;\n const box = await bitbybit.occt.shapes.solid.createBox(boxOpt);\n\n const drawOpt = new Bit.Inputs.Draw.DrawOcctShapeOptions();\n drawOpt.drawEdgeIndexes = true;\n drawOpt.faceOpacity = 0.3;\n drawOpt.edgeOpacity = 0.3;\n drawOpt.edgeIndexHeight = 0.24\n\n bitbybit.draw.drawAnyAsync({\n entity: box,\n options: drawOpt\n });\n}\n\nstart();\n","version":"0.21.0","type":"typescript"}} + script={{"script":"const start = async () => {\n\n const boxOpt = new Bit.Inputs.OCCT.BoxDto();\n boxOpt.width = 5;\n boxOpt.length = 8;\n boxOpt.height = 10;\n const box = await bitbybit.occt.shapes.solid.createBox(boxOpt);\n\n const drawOpt = new Bit.Inputs.Draw.DrawOcctShapeOptions();\n drawOpt.drawEdgeIndexes = true;\n drawOpt.faceOpacity = 0.3;\n drawOpt.edgeOpacity = 0.3;\n drawOpt.edgeIndexHeight = 0.24\n\n bitbybit.draw.drawAnyAsync({\n entity: box,\n options: drawOpt\n });\n}\n\nstart();\n","type":"typescript"}} title="Edge Indexing" /> **Blockly Example: Drawing Edge Indexes** 58100000.30.3#ffffff#ff00002TRUETRUE0.01TRUE0.24#ff00ffFALSE0.06#0000ff","version":"0.21.0","type":"blockly"}} + script={{"script":"58100000.30.3#ffffff#ff00002TRUETRUE0.01TRUE0.24#ff00ffFALSE0.06#0000ff","type":"blockly"}} title="Edge Indexing" /> **Rete Example: Drawing Edge Indexes** diff --git a/docs/learn/code/common/occt/shapes/edge/edge-primitives.md b/docs/learn/code/common/occt/shapes/edge/edge-primitives.md index 282b011c3..d7a6cb22f 100644 --- a/docs/learn/code/common/occt/shapes/edge/edge-primitives.md +++ b/docs/learn/code/common/occt/shapes/edge/edge-primitives.md @@ -48,21 +48,21 @@ Let's start with the most basic edge primitive - the line edge. startPointendPointstartPoint-500endPoint500startPointendPointstartPointendPoint","version":"0.21.0","type":"blockly"}} + script={{"script":"startPointendPointstartPoint-500endPoint500startPointendPointstartPointendPoint","type":"blockly"}} title="Creating primitive solids" /> {\n // Create start and end points\n const startPoint: Point3 = [-5, 0, 0];\n const endPoint: Point3 = [5, 0, 0];\n\n // Create a line between the points\n const lineOptions = new LineDto();\n lineOptions.start = startPoint;\n lineOptions.end = endPoint;\n\n const line = await bitbybit.occt.shapes.edge.line(lineOptions);\n\n // Draw the line and points\n bitbybit.draw.drawAnyAsync({ entity: line });\n bitbybit.draw.drawAnyAsync({ entity: startPoint });\n bitbybit.draw.drawAnyAsync({ entity: endPoint });\n}\n\n// Execute the function\nstart();","version":"0.21.0","type":"typescript"}} + script={{"script":"const { LineDto } = Bit.Inputs.OCCT;\n// Import required types\ntype Point3 = Bit.Inputs.Base.Point3;\n\n// Define the main function\nconst start = async () => {\n // Create start and end points\n const startPoint: Point3 = [-5, 0, 0];\n const endPoint: Point3 = [5, 0, 0];\n\n // Create a line between the points\n const lineOptions = new LineDto();\n lineOptions.start = startPoint;\n lineOptions.end = endPoint;\n\n const line = await bitbybit.occt.shapes.edge.line(lineOptions);\n\n // Draw the line and points\n bitbybit.draw.drawAnyAsync({ entity: line });\n bitbybit.draw.drawAnyAsync({ entity: startPoint });\n bitbybit.draw.drawAnyAsync({ entity: endPoint });\n}\n\n// Execute the function\nstart();","type":"typescript"}} title="Creating primitive solids" /> @@ -88,21 +88,21 @@ This example demonstrates how to create a simple straight line edge in 3D space. startPointmidPointendPointstartPoint-500midPoint060endPoint500startPointmidPointendPointstartPointmidPointendPoint","version":"0.21.0","type":"blockly"}} + script={{"script":"startPointmidPointendPointstartPoint-500midPoint060endPoint500startPointmidPointendPointstartPointmidPointendPoint","type":"blockly"}} title="Arc edge through 3 points" /> {\n // Create start and end points\n const startPoint: Point3 = [-5, 0, 0];\n const midPoint: Point3 = [0, 6, 0];\n const endPoint: Point3 = [5, 0, 0];\n\n // Create a arc between three points\n const arcOptions = new ArcEdgeThreePointsDto();\n arcOptions.start = startPoint;\n arcOptions.middle = midPoint;\n arcOptions.end = endPoint;\n\n const arc = await bitbybit.occt.shapes.edge.arcThroughThreePoints(arcOptions);\n\n // Draw the arc and points\n bitbybit.draw.drawAnyAsync({ entity: arc });\n bitbybit.draw.drawAnyAsync({ entity: [startPoint, midPoint, endPoint] });\n}\n\n// Execute the function\nstart();","version":"0.21.0","type":"typescript"}} + script={{"script":"const { ArcEdgeThreePointsDto } = Bit.Inputs.OCCT;\n// Import required types\ntype Point3 = Bit.Inputs.Base.Point3;\n\n// Define the main function\nconst start = async () => {\n // Create start and end points\n const startPoint: Point3 = [-5, 0, 0];\n const midPoint: Point3 = [0, 6, 0];\n const endPoint: Point3 = [5, 0, 0];\n\n // Create a arc between three points\n const arcOptions = new ArcEdgeThreePointsDto();\n arcOptions.start = startPoint;\n arcOptions.middle = midPoint;\n arcOptions.end = endPoint;\n\n const arc = await bitbybit.occt.shapes.edge.arcThroughThreePoints(arcOptions);\n\n // Draw the arc and points\n bitbybit.draw.drawAnyAsync({ entity: arc });\n bitbybit.draw.drawAnyAsync({ entity: [startPoint, midPoint, endPoint] });\n}\n\n// Execute the function\nstart();","type":"typescript"}} title="Arc edge through 3 points" /> @@ -128,21 +128,21 @@ This example shows how to create an arc edge that passes through three specific startPointvecEndPtendPointvectorstartPoint-500vecEndPt-230endPoint500vectorstartPointvecEndPtstartPointvectorendPointstartPointvecEndPtendPointstartPointvecEndPt","version":"0.21.0","type":"blockly"}} + script={{"script":"startPointvecEndPtendPointvectorstartPoint-500vecEndPt-230endPoint500vectorstartPointvecEndPtstartPointvectorendPointstartPointvecEndPtendPointstartPointvecEndPt","type":"blockly"}} title="Arc edge from two points and tangent" /> {\n // Create start and end points\n const startPoint: Point3 = [-5, 0, 0];\n const vecEndPt: Point3 = [-2, 3, 0];\n const endPoint: Point3 = [5, 0, 0];\n\n // Create tangent vector\n const vecOpt = new TwoVectorsDto();\n vecOpt.first = startPoint;\n vecOpt.second = vecEndPt;\n const vector = bitbybit.vector.sub(vecOpt) as Vector3;\n\n // Create an arc\n const arcOptions = new ArcEdgeTwoPointsTangentDto();\n arcOptions.start = startPoint;\n arcOptions.tangentVec = vector;\n arcOptions.end = endPoint;\n\n const arc = await bitbybit.occt.shapes.edge.arcThroughTwoPointsAndTangent(arcOptions);\n\n // Draw the arc, points and tangent\n bitbybit.draw.drawAnyAsync({ entity: arc });\n bitbybit.draw.drawAnyAsync({ entity: [startPoint, vecEndPt, endPoint] });\n\n // When two points are provided Bitbybit draws them as a line segment\n bitbybit.draw.drawAnyAsync({ entity: [startPoint, vecEndPt] });\n}\n\n// Execute the function\nstart();","version":"0.21.0","type":"typescript"}} + script={{"script":"const { ArcEdgeTwoPointsTangentDto } = Bit.Inputs.OCCT;\nconst { TwoVectorsDto } = Bit.Inputs.Vector;\n\n// Import required types\ntype Point3 = Bit.Inputs.Base.Point3;\ntype Vector3 = Bit.Inputs.Base.Vector3;\n\n\n// Define the main function\nconst start = async () => {\n // Create start and end points\n const startPoint: Point3 = [-5, 0, 0];\n const vecEndPt: Point3 = [-2, 3, 0];\n const endPoint: Point3 = [5, 0, 0];\n\n // Create tangent vector\n const vecOpt = new TwoVectorsDto();\n vecOpt.first = startPoint;\n vecOpt.second = vecEndPt;\n const vector = bitbybit.vector.sub(vecOpt) as Vector3;\n\n // Create an arc\n const arcOptions = new ArcEdgeTwoPointsTangentDto();\n arcOptions.start = startPoint;\n arcOptions.tangentVec = vector;\n arcOptions.end = endPoint;\n\n const arc = await bitbybit.occt.shapes.edge.arcThroughTwoPointsAndTangent(arcOptions);\n\n // Draw the arc, points and tangent\n bitbybit.draw.drawAnyAsync({ entity: arc });\n bitbybit.draw.drawAnyAsync({ entity: [startPoint, vecEndPt, endPoint] });\n\n // When two points are provided Bitbybit draws them as a line segment\n bitbybit.draw.drawAnyAsync({ entity: [startPoint, vecEndPt] });\n}\n\n// Execute the function\nstart();","type":"typescript"}} title="Arc edge from two points and tangent" /> @@ -169,21 +169,21 @@ This example demonstrates creating an arc using two endpoints and a tangent vect circlestartPointendPointcenterPointarccircle5000010startPoint800endPoint808centerPoint000arccirclestartPointendPointTRUEarccenterPointstartPointcenterPointendPointstartPointcenterPointendPoint","version":"0.21.0","type":"blockly"}} + script={{"script":"circlestartPointendPointcenterPointarccircle5000010startPoint800endPoint808centerPoint000arccirclestartPointendPointTRUEarccenterPointstartPointcenterPointendPointstartPointcenterPointendPoint","type":"blockly"}} title="Arc edge from circle and two points" /> {\n // Create a circle edge\n const circleOptions = new CircleDto();\n circleOptions.radius = 5;\n circleOptions.center = [0, 0, 0] as Point3;\n circleOptions.direction = [0, 1, 0] as Vector3;\n\n const circle = await bitbybit.occt.shapes.edge.createCircleEdge(circleOptions);\n\n // Create start and end points for the arc\n const startPoint: Point3 = [8, 0, 0];\n const endPoint: Point3 = [8, 0, 8];\n const centerPoint: Point3 = [0, 0, 0];\n\n // Create arc from circle and two points\n const arcOptions = new ArcEdgeCircleTwoPointsDto();\n arcOptions.circle = circle;\n arcOptions.start = startPoint;\n arcOptions.end = endPoint;\n arcOptions.sense = true;\n\n const arc = await bitbybit.occt.shapes.edge.arcFromCircleAndTwoPoints(arcOptions);\n // Draw the arc and helper points\n bitbybit.draw.drawAnyAsync({ entity: arc });\n bitbybit.draw.drawAnyAsync({ entity: [endPoint, centerPoint, startPoint] });\n bitbybit.draw.drawAnyAsync({ entity: [centerPoint, endPoint] });\n bitbybit.draw.drawAnyAsync({ entity: [centerPoint, startPoint] });\n}\n\n// Execute the function\nstart();","version":"0.21.0","type":"typescript"}} + script={{"script":"const { CircleDto, ArcEdgeCircleTwoPointsDto } = Bit.Inputs.OCCT;\n// Import required types\ntype TopoDSEdgePointer = Bit.Inputs.OCCT.TopoDSEdgePointer;\ntype Point3 = Bit.Inputs.Base.Point3;\ntype Vector3 = Bit.Inputs.Base.Vector3;\n\n// Define the main function\nconst start = async () => {\n // Create a circle edge\n const circleOptions = new CircleDto();\n circleOptions.radius = 5;\n circleOptions.center = [0, 0, 0] as Point3;\n circleOptions.direction = [0, 1, 0] as Vector3;\n\n const circle = await bitbybit.occt.shapes.edge.createCircleEdge(circleOptions);\n\n // Create start and end points for the arc\n const startPoint: Point3 = [8, 0, 0];\n const endPoint: Point3 = [8, 0, 8];\n const centerPoint: Point3 = [0, 0, 0];\n\n // Create arc from circle and two points\n const arcOptions = new ArcEdgeCircleTwoPointsDto();\n arcOptions.circle = circle;\n arcOptions.start = startPoint;\n arcOptions.end = endPoint;\n arcOptions.sense = true;\n\n const arc = await bitbybit.occt.shapes.edge.arcFromCircleAndTwoPoints(arcOptions);\n // Draw the arc and helper points\n bitbybit.draw.drawAnyAsync({ entity: arc });\n bitbybit.draw.drawAnyAsync({ entity: [endPoint, centerPoint, startPoint] });\n bitbybit.draw.drawAnyAsync({ entity: [centerPoint, endPoint] });\n bitbybit.draw.drawAnyAsync({ entity: [centerPoint, startPoint] });\n}\n\n// Execute the function\nstart();","type":"typescript"}} title="Arc edge from circle and two points" /> @@ -211,21 +211,21 @@ This example shows how to create an arc by extracting a portion of an existing c 500001045270TRUE","version":"0.21.0","type":"blockly"}} + script={{"script":"500001045270TRUE","type":"blockly"}} title="Arc edge from circle and two points" /> {\n // Create a circle edge\n const circleOptions = new CircleDto();\n circleOptions.radius = 5;\n circleOptions.center = [0, 0, 0] as Point3;\n circleOptions.direction = [0, 1, 0] as Vector3;\n\n const circle = await bitbybit.occt.shapes.edge.createCircleEdge(circleOptions);\n\n // Create arc from circle and two angles\n const arcOptions = new ArcEdgeCircleTwoAnglesDto();\n arcOptions.circle = circle;\n arcOptions.alphaAngle1 = 45;\n arcOptions.alphaAngle2 = 270;\n arcOptions.sense = true;\n\n const arc = await bitbybit.occt.shapes.edge.arcFromCircleAndTwoAngles(arcOptions);\n\n // Draw the arc\n bitbybit.draw.drawAnyAsync({ entity: arc });\n}\n\n// Execute the function\nstart();","version":"0.21.0","type":"typescript"}} + script={{"script":"const { CircleDto, ArcEdgeCircleTwoAnglesDto } = Bit.Inputs.OCCT;\n// Import required types\ntype Point3 = Bit.Inputs.Base.Point3;\ntype Vector3 = Bit.Inputs.Base.Vector3;\ntype TopoDSEdgePointer = Bit.Inputs.OCCT.TopoDSEdgePointer;\n\n\n// Define the main function\nconst start = async () => {\n // Create a circle edge\n const circleOptions = new CircleDto();\n circleOptions.radius = 5;\n circleOptions.center = [0, 0, 0] as Point3;\n circleOptions.direction = [0, 1, 0] as Vector3;\n\n const circle = await bitbybit.occt.shapes.edge.createCircleEdge(circleOptions);\n\n // Create arc from circle and two angles\n const arcOptions = new ArcEdgeCircleTwoAnglesDto();\n arcOptions.circle = circle;\n arcOptions.alphaAngle1 = 45;\n arcOptions.alphaAngle2 = 270;\n arcOptions.sense = true;\n\n const arc = await bitbybit.occt.shapes.edge.arcFromCircleAndTwoAngles(arcOptions);\n\n // Draw the arc\n bitbybit.draw.drawAnyAsync({ entity: arc });\n}\n\n// Execute the function\nstart();","type":"typescript"}} title="Arc edge from circle and two angles" /> @@ -252,21 +252,21 @@ This example demonstrates creating an arc by specifying a base circle and two an circlepointcenterPointarccircle5000010point808centerPoint000arccirclepoint360TRUEarccenterPointpointcenterPointpoint","version":"0.21.0","type":"blockly"}} + script={{"script":"circlepointcenterPointarccircle5000010point808centerPoint000arccirclepoint360TRUEarccenterPointpointcenterPointpoint","type":"blockly"}} title="Arc edge from circle point and an angle" /> {\n // Create a circle edge\n const circleOptions = new CircleDto();\n circleOptions.radius = 5;\n circleOptions.center = [0, 0, 0] as Point3;\n circleOptions.direction = [0, 1, 0] as Vector3;\n\n const circle = await bitbybit.occt.shapes.edge.createCircleEdge(circleOptions);\n\n // Create a point on the circle\n const point: Point3 = [8, 0, 8];\n const centerPoint: Point3 = [0, 0, 0];\n\n // Create arc from circle, point and angle\n const arcOptions = new ArcEdgeCirclePointAngleDto();\n arcOptions.circle = circle;\n arcOptions.point = point;\n arcOptions.alphaAngle = 360;\n arcOptions.sense = true;\n\n const arc = await bitbybit.occt.shapes.edge.arcFromCirclePointAndAngle(arcOptions);\n\n // Draw the arc and helper elements\n bitbybit.draw.drawAnyAsync({ entity: arc });\n bitbybit.draw.drawAnyAsync({ entity: [centerPoint, point] });\n bitbybit.draw.drawAnyAsync({ entity: [centerPoint] });\n bitbybit.draw.drawAnyAsync({ entity: [point] });\n\n}\n\n// Execute the function\nstart();","version":"0.21.0","type":"typescript"}} + script={{"script":"const { CircleDto, ArcEdgeCirclePointAngleDto } = Bit.Inputs.OCCT;\n// Import required types\ntype Point3 = Bit.Inputs.Base.Point3;\ntype Vector3 = Bit.Inputs.Base.Vector3;\ntype TopoDSEdgePointer = Bit.Inputs.OCCT.TopoDSEdgePointer;\n\n// Define the main function\nconst start = async () => {\n // Create a circle edge\n const circleOptions = new CircleDto();\n circleOptions.radius = 5;\n circleOptions.center = [0, 0, 0] as Point3;\n circleOptions.direction = [0, 1, 0] as Vector3;\n\n const circle = await bitbybit.occt.shapes.edge.createCircleEdge(circleOptions);\n\n // Create a point on the circle\n const point: Point3 = [8, 0, 8];\n const centerPoint: Point3 = [0, 0, 0];\n\n // Create arc from circle, point and angle\n const arcOptions = new ArcEdgeCirclePointAngleDto();\n arcOptions.circle = circle;\n arcOptions.point = point;\n arcOptions.alphaAngle = 360;\n arcOptions.sense = true;\n\n const arc = await bitbybit.occt.shapes.edge.arcFromCirclePointAndAngle(arcOptions);\n\n // Draw the arc and helper elements\n bitbybit.draw.drawAnyAsync({ entity: arc });\n bitbybit.draw.drawAnyAsync({ entity: [centerPoint, point] });\n bitbybit.draw.drawAnyAsync({ entity: [centerPoint] });\n bitbybit.draw.drawAnyAsync({ entity: [point] });\n\n}\n\n// Execute the function\nstart();","type":"typescript"}} title="Arc edge from circle point and an angle" /> @@ -294,21 +294,21 @@ This example shows how to create an arc starting from a specific point on a circ 5000010","version":"0.21.0","type":"blockly"}} + script={{"script":"5000010","type":"blockly"}} title="Circle edge" /> {\n // Create a circle edge\n const circleOptions = new CircleDto();\n circleOptions.radius = 5;\n circleOptions.center = [0, 0, 0] as Point3;\n circleOptions.direction = [0, 1, 0] as Vector3;\n\n const circle = await bitbybit.occt.shapes.edge.createCircleEdge(circleOptions);\n\n // Draw the circle\n bitbybit.draw.drawAnyAsync({ entity: circle });\n}\n\n// Execute the function\nstart();","version":"0.21.0","type":"typescript"}} + script={{"script":"const { CircleDto } = Bit.Inputs.OCCT;\n// Import required types\ntype Point3 = Bit.Inputs.Base.Point3;\ntype Vector3 = Bit.Inputs.Base.Vector3;\n\n// Define the main function\nconst start = async () => {\n // Create a circle edge\n const circleOptions = new CircleDto();\n circleOptions.radius = 5;\n circleOptions.center = [0, 0, 0] as Point3;\n circleOptions.direction = [0, 1, 0] as Vector3;\n\n const circle = await bitbybit.occt.shapes.edge.createCircleEdge(circleOptions);\n\n // Draw the circle\n bitbybit.draw.drawAnyAsync({ entity: circle });\n}\n\n// Execute the function\nstart();","type":"typescript"}} title="Circle edge" /> @@ -335,21 +335,21 @@ This example demonstrates creating a complete circular edge, which is one of the 000010310","version":"0.21.0","type":"blockly"}} + script={{"script":"000010310","type":"blockly"}} title="Ellipse edge" /> {\n // Create an ellipse edge\n const ellipseOptions = new EllipseDto();\n ellipseOptions.center = [0, 0, 0] as Point3;\n ellipseOptions.direction = [0, 1, 0] as Vector3;\n ellipseOptions.radiusMinor = 3;\n ellipseOptions.radiusMajor = 10;\n\n const ellipse = await bitbybit.occt.shapes.edge.createEllipseEdge(ellipseOptions);\n\n // Draw the ellipse\n bitbybit.draw.drawAnyAsync({ entity: ellipse });\n}\n\n// Execute the function\nstart();","version":"0.21.0","type":"typescript"}} + script={{"script":"const { EllipseDto } = Bit.Inputs.OCCT;\n// Import required types\ntype Point3 = Bit.Inputs.Base.Point3;\ntype Vector3 = Bit.Inputs.Base.Vector3;\n\n// Define the main function\nconst start = async () => {\n // Create an ellipse edge\n const ellipseOptions = new EllipseDto();\n ellipseOptions.center = [0, 0, 0] as Point3;\n ellipseOptions.direction = [0, 1, 0] as Vector3;\n ellipseOptions.radiusMinor = 3;\n ellipseOptions.radiusMajor = 10;\n\n const ellipse = await bitbybit.occt.shapes.edge.createEllipseEdge(ellipseOptions);\n\n // Draw the ellipse\n bitbybit.draw.drawAnyAsync({ entity: ellipse });\n}\n\n// Execute the function\nstart();","type":"typescript"}} title="Ellipse edge" /> diff --git a/docs/learn/code/common/occt/shapes/face/face-basic-primitives.md b/docs/learn/code/common/occt/shapes/face/face-basic-primitives.md index e349889d6..b033459c1 100644 --- a/docs/learn/code/common/occt/shapes/face/face-basic-primitives.md +++ b/docs/learn/code/common/occt/shapes/face/face-basic-primitives.md @@ -26,21 +26,21 @@ Think of wires as the frame of a window, and faces as the glass that fills the f circleFacesquareFacerectangleFaceellipseFacecircleFace4000010squareFace3700010rectangleFace37-700010ellipseFace00-901013circleFacesquareFacerectangleFaceellipseFace","version":"0.21.0","type":"blockly"}} + script={{"script":"circleFacesquareFacerectangleFaceellipseFacecircleFace4000010squareFace3700010rectangleFace37-700010ellipseFace00-901013circleFacesquareFacerectangleFaceellipseFace","type":"blockly"}} title="Creating basic face primitives" /> {\n // Create a circle face\n const circleOptions = new CircleDto();\n circleOptions.radius = 4;\n circleOptions.center = [0, 0, 0] as Point3;\n circleOptions.direction = [0, 1, 0] as Vector3;\n\n const circleFace = await face.createCircleFace(circleOptions);\n\n // Create a square face at a different position\n const squareOptions = new SquareDto();\n squareOptions.size = 3;\n squareOptions.center = [7, 0, 0] as Point3;\n squareOptions.direction = [0, 1, 0] as Vector3;\n\n const squareFace = await face.createSquareFace(squareOptions);\n\n // Create a rectangle face\n const rectangleOptions = new RectangleDto();\n rectangleOptions.width = 3;\n rectangleOptions.length = 7;\n rectangleOptions.center = [-7, 0, 0] as Point3;\n rectangleOptions.direction = [0, 1, 0] as Vector3;\n\n const rectangleFace = await face.createRectangleFace(rectangleOptions);\n\n // Create an ellipse face\n const ellipseOptions = new EllipseDto();\n ellipseOptions.center = [0, 0, -9] as Point3;\n ellipseOptions.direction = [0, 1, 0] as Vector3;\n ellipseOptions.radiusMinor = 1;\n ellipseOptions.radiusMajor = 3;\n\n const ellipseFace = await face.createEllipseFace(ellipseOptions);\n\n // Draw all the created faces\n bitbybit.draw.drawAnyAsync({ entity: circleFace });\n bitbybit.draw.drawAnyAsync({ entity: squareFace });\n bitbybit.draw.drawAnyAsync({ entity: rectangleFace });\n bitbybit.draw.drawAnyAsync({ entity: ellipseFace });\n}\n\n// Execute the function\nstart();","version":"0.21.0","type":"typescript"}} + script={{"script":"// Import required DTOs and types for face creation\nconst { CircleDto, SquareDto, RectangleDto, EllipseDto } = Bit.Inputs.OCCT;\ntype Point3 = Bit.Inputs.Base.Point3;\ntype Vector3 = Bit.Inputs.Base.Vector3;\n\n// Get access to OCCT face creation functions\nconst { face } = bitbybit.occt.shapes;\n\n// Define the main function to create various primitive faces\nconst start = async () => {\n // Create a circle face\n const circleOptions = new CircleDto();\n circleOptions.radius = 4;\n circleOptions.center = [0, 0, 0] as Point3;\n circleOptions.direction = [0, 1, 0] as Vector3;\n\n const circleFace = await face.createCircleFace(circleOptions);\n\n // Create a square face at a different position\n const squareOptions = new SquareDto();\n squareOptions.size = 3;\n squareOptions.center = [7, 0, 0] as Point3;\n squareOptions.direction = [0, 1, 0] as Vector3;\n\n const squareFace = await face.createSquareFace(squareOptions);\n\n // Create a rectangle face\n const rectangleOptions = new RectangleDto();\n rectangleOptions.width = 3;\n rectangleOptions.length = 7;\n rectangleOptions.center = [-7, 0, 0] as Point3;\n rectangleOptions.direction = [0, 1, 0] as Vector3;\n\n const rectangleFace = await face.createRectangleFace(rectangleOptions);\n\n // Create an ellipse face\n const ellipseOptions = new EllipseDto();\n ellipseOptions.center = [0, 0, -9] as Point3;\n ellipseOptions.direction = [0, 1, 0] as Vector3;\n ellipseOptions.radiusMinor = 1;\n ellipseOptions.radiusMajor = 3;\n\n const ellipseFace = await face.createEllipseFace(ellipseOptions);\n\n // Draw all the created faces\n bitbybit.draw.drawAnyAsync({ entity: circleFace });\n bitbybit.draw.drawAnyAsync({ entity: squareFace });\n bitbybit.draw.drawAnyAsync({ entity: rectangleFace });\n bitbybit.draw.drawAnyAsync({ entity: ellipseFace });\n}\n\n// Execute the function\nstart();","type":"typescript"}} title="Creating basic face primitives" /> diff --git a/docs/learn/code/common/occt/shapes/face/face-from-points.md b/docs/learn/code/common/occt/shapes/face/face-from-points.md index d769cf044..d26b2693c 100644 --- a/docs/learn/code/common/occt/shapes/face/face-from-points.md +++ b/docs/learn/code/common/occt/shapes/face/face-from-points.md @@ -28,21 +28,21 @@ This example demonstrates creating a quadrilateral face from four strategically point1point2point3point4pointsListpolygonFacepoint1-30-8point2-303point3303point4500pointsListpoint1point2point3point4polygonFacepointsListpolygonFacepointsList","version":"0.21.0","type":"blockly"}} + script={{"script":"point1point2point3point4pointsListpolygonFacepoint1-30-8point2-303point3303point4500pointsListpoint1point2point3point4polygonFacepointsListpolygonFacepointsList","type":"blockly"}} title="Creating face from points" /> {\n // Define the four points that will form the polygon face\n const point1: Point3 = [-3, 0, -8];\n const point2: Point3 = [-3, 0, 3];\n const point3: Point3 = [3, 0, 3];\n const point4: Point3 = [5, 0, 0];\n\n // Create a list of points in the correct order\n const points: Point3[] = [point1, point2, point3, point4];\n\n // Create the polygon face options\n const polygonOptions = new PolygonDto();\n polygonOptions.points = points;\n\n // Create the polygon face from the points\n const polygonFace = await face.createPolygonFace(polygonOptions);\n\n // Draw the polygon face\n bitbybit.draw.drawAnyAsync({ entity: polygonFace });\n\n // Optionally, draw the points to visualize the vertices\n bitbybit.draw.drawAnyAsync({ entity: points });\n}\n\n// Execute the function\nstart();","version":"0.21.0","type":"typescript"}} + script={{"script":"// Import required DTOs and types for polygon face creation\nconst { PolygonDto } = Bit.Inputs.OCCT;\ntype Point3 = Bit.Inputs.Base.Point3;\n\n// Get access to OCCT face creation functions\nconst { face } = bitbybit.occt.shapes;\n\n// Define the main function to create a polygon face from points\nconst start = async () => {\n // Define the four points that will form the polygon face\n const point1: Point3 = [-3, 0, -8];\n const point2: Point3 = [-3, 0, 3];\n const point3: Point3 = [3, 0, 3];\n const point4: Point3 = [5, 0, 0];\n\n // Create a list of points in the correct order\n const points: Point3[] = [point1, point2, point3, point4];\n\n // Create the polygon face options\n const polygonOptions = new PolygonDto();\n polygonOptions.points = points;\n\n // Create the polygon face from the points\n const polygonFace = await face.createPolygonFace(polygonOptions);\n\n // Draw the polygon face\n bitbybit.draw.drawAnyAsync({ entity: polygonFace });\n\n // Optionally, draw the points to visualize the vertices\n bitbybit.draw.drawAnyAsync({ entity: points });\n}\n\n// Execute the function\nstart();","type":"typescript"}} title="Creating face from points" /> diff --git a/docs/learn/code/common/occt/shapes/face/face-from-wire.md b/docs/learn/code/common/occt/shapes/face/face-from-wire.md index eca1050f6..05c483d03 100644 --- a/docs/learn/code/common/occt/shapes/face/face-from-wire.md +++ b/docs/learn/code/common/occt/shapes/face/face-from-wire.md @@ -36,21 +36,21 @@ This example demonstrates creating a star-shaped face from a reversed wire to co starWirereversedWirefaceFromWirestarWire0000107730FALSEreversedWirestarWirefaceFromWirereversedWireTRUEfaceFromWire","version":"0.21.0","type":"blockly"}} + script={{"script":"starWirereversedWirefaceFromWirestarWire0000107730FALSEreversedWirestarWirefaceFromWirereversedWireTRUEfaceFromWire","type":"blockly"}} title="Creating face from wire" /> {\n // Create a star wire\n const starOptions = new StarDto();\n starOptions.center = [0, 0, 0] as Point3;\n starOptions.direction = [0, 1, 0] as Vector3;\n starOptions.numRays = 7;\n starOptions.outerRadius = 7;\n starOptions.innerRadius = 3;\n starOptions.offsetOuterEdges = 0;\n starOptions.half = false;\n\n const starWire = await wire.createStarWire(starOptions);\n\n // Reverse the wire orientation\n const reversedWire = await wire.reversedWire({ shape: starWire });\n\n // Create a face from the reversed wire\n const faceOptions = new FaceFromWireDto();\n faceOptions.shape = reversedWire;\n faceOptions.planar = true;\n\n const faceFromWire = await face.createFaceFromWire(faceOptions);\n\n // Draw the created face\n bitbybit.draw.drawAnyAsync({ entity: faceFromWire });\n}\n\n// Execute the function\nstart();","version":"0.21.0","type":"typescript"}} + script={{"script":"// Import required DTOs and types for wire and face creation\nconst { StarDto, FaceFromWireDto } = Bit.Inputs.OCCT;\ntype Point3 = Bit.Inputs.Base.Point3;\ntype Vector3 = Bit.Inputs.Base.Vector3;\ntype TopoDSWirePointer = Bit.Inputs.OCCT.TopoDSWirePointer;\n\n// Get access to OCCT wire and face creation functions\nconst { wire, face } = bitbybit.occt.shapes;\n\n// Define the main function to create a face from a wire\nconst start = async () => {\n // Create a star wire\n const starOptions = new StarDto();\n starOptions.center = [0, 0, 0] as Point3;\n starOptions.direction = [0, 1, 0] as Vector3;\n starOptions.numRays = 7;\n starOptions.outerRadius = 7;\n starOptions.innerRadius = 3;\n starOptions.offsetOuterEdges = 0;\n starOptions.half = false;\n\n const starWire = await wire.createStarWire(starOptions);\n\n // Reverse the wire orientation\n const reversedWire = await wire.reversedWire({ shape: starWire });\n\n // Create a face from the reversed wire\n const faceOptions = new FaceFromWireDto();\n faceOptions.shape = reversedWire;\n faceOptions.planar = true;\n\n const faceFromWire = await face.createFaceFromWire(faceOptions);\n\n // Draw the created face\n bitbybit.draw.drawAnyAsync({ entity: faceFromWire });\n}\n\n// Execute the function\nstart();","type":"typescript"}} title="Creating face from wire" /> diff --git a/docs/learn/code/common/occt/shapes/face/face-hex-grid-pattern.md b/docs/learn/code/common/occt/shapes/face/face-hex-grid-pattern.md index 5a3f2f861..4a7414fe7 100644 --- a/docs/learn/code/common/occt/shapes/face/face-hex-grid-pattern.md +++ b/docs/learn/code/common/occt/shapes/face/face-hex-grid-pattern.md @@ -23,21 +23,21 @@ Learn how to create hexagonal face patterns that respond to a control point. Hex gridWidthgridHeighthexagonsInWidthhexagonsInHeightcontrolPointUcontrolPointVrectangleFacecontrolPointhexGridhexCentersdistancesminDistancemaxDistancescalePatterndistancescaledValueinclusionPatternhexagonFacesaffectorPointpingridWidth16.5gridHeight9hexagonsInWidth29hexagonsInHeight29controlPointU0controlPointV0.49rectangleFacegridWidthgridHeight000010controlPointrectangleFacecontrolPointUcontrolPointVhexGridgridWidthgridHeighthexagonsInWidthhexagonsInHeightTRUEFALSEFALSEFALSEFALSETRUETRUEhexCentershexGridcentersdistancescontrolPointhexCentersminDistancedistancesmaxDistancedistancesscalePatterndistancedistancesscaledValuedistanceminDistancemaxDistance0.2110.9INSERTLASTscalePatternscaledValueinclusionPattern[true, true, true, true, false]hexagonFacesgridWidthgridHeighthexagonsInWidthhexagonsInHeightTRUEFALSEFALSEFALSEFALSEscalePatternscalePatterninclusionPatternaffectorPointcontrolPoint030pincontrolPointaffectorPoint0010.1Affector0.30.1hexagonFacespincontrolPoint","version":"0.21.0","type":"blockly"}} + script={{"script":"gridWidthgridHeighthexagonsInWidthhexagonsInHeightcontrolPointUcontrolPointVrectangleFacecontrolPointhexGridhexCentersdistancesminDistancemaxDistancescalePatterndistancescaledValueinclusionPatternhexagonFacesaffectorPointpingridWidth16.5gridHeight9hexagonsInWidth29hexagonsInHeight29controlPointU0controlPointV0.49rectangleFacegridWidthgridHeight000010controlPointrectangleFacecontrolPointUcontrolPointVhexGridgridWidthgridHeighthexagonsInWidthhexagonsInHeightTRUEFALSEFALSEFALSEFALSETRUETRUEhexCentershexGridcentersdistancescontrolPointhexCentersminDistancedistancesmaxDistancedistancesscalePatterndistancedistancesscaledValuedistanceminDistancemaxDistance0.2110.9INSERTLASTscalePatternscaledValueinclusionPattern[true, true, true, true, false]hexagonFacesgridWidthgridHeighthexagonsInWidthhexagonsInHeightTRUEFALSEFALSEFALSEFALSEscalePatternscalePatterninclusionPatternaffectorPointcontrolPoint030pincontrolPointaffectorPoint0010.1Affector0.30.1hexagonFacespincontrolPoint","type":"blockly"}} title="Creating face from wire" /> {\n // Define grid parameters\n const gridWidth = 16.5;\n const gridHeight = 9;\n const hexagonsInWidth = 29;\n const hexagonsInHeight = 29;\n const controlPointU = 0; // UV parameter for control point position\n const controlPointV = 0.49; // UV parameter for control point position\n\n // Create a reference rectangle face to define the control point\n const rectangleOptions = new RectangleDto();\n rectangleOptions.width = gridWidth;\n rectangleOptions.length = gridHeight;\n rectangleOptions.center = [0, 0, 0] as Point3;\n rectangleOptions.direction = [0, 1, 0] as Vector3;\n\n const rectangleFace = await face.createRectangleFace(rectangleOptions);\n\n // Create control point on the rectangle face using UV parameters\n const pointOnUVOptions = new DataOnUVDto();\n pointOnUVOptions.shape = rectangleFace;\n pointOnUVOptions.paramU = controlPointU;\n pointOnUVOptions.paramV = controlPointV;\n\n const controlPoint = await face.pointOnUV(pointOnUVOptions);\n\n // Generate hexagon grid centers for distance calculation\n const hexGridOptions = new HexGridScaledToFitDto();\n hexGridOptions.width = gridWidth;\n hexGridOptions.height = gridHeight;\n hexGridOptions.nrHexagonsInWidth = hexagonsInWidth;\n hexGridOptions.nrHexagonsInHeight = hexagonsInHeight;\n hexGridOptions.flatTop = true;\n hexGridOptions.extendTop = false;\n hexGridOptions.extendBottom = false;\n hexGridOptions.extendLeft = false;\n hexGridOptions.extendRight = false;\n hexGridOptions.centerGrid = true;\n hexGridOptions.pointsOnGround = true;\n\n const hexGrid = point.hexGridScaledToFit(hexGridOptions);\n const hexCenters = hexGrid.centers;\n\n // Calculate distances from control point to all hexagon centers\n const distances = point.distancesToPoints({\n startPoint: controlPoint,\n endPoints: hexCenters\n });\n\n // Flatten the distance array and find min/max values\n const minDistance = vector.min({ vector: distances });\n const maxDistance = vector.max({ vector: distances });\n\n // Remap distances to scale factors (0.211 to 0.9)\n const remapOptions = new RemapNumberDto();\n remapOptions.fromLow = minDistance;\n remapOptions.fromHigh = maxDistance;\n remapOptions.toLow = 0.211;\n remapOptions.toHigh = 0.9;\n\n const scalePattern = distances.map(x => {\n remapOptions.number = x;\n return math.remap(remapOptions);\n })\n\n // Create inclusion pattern for selective hexagon removal\n const inclusionPattern = json.parse({ text: \"[true, true, true, true, false]\" });\n\n // Create the hexagon faces with advanced patterns\n const hexFaceOptions = new HexagonsInGridDto();\n hexFaceOptions.width = gridWidth;\n hexFaceOptions.height = gridHeight;\n hexFaceOptions.nrHexagonsInWidth = hexagonsInWidth;\n hexFaceOptions.nrHexagonsInHeight = hexagonsInHeight;\n hexFaceOptions.flatTop = true;\n hexFaceOptions.extendTop = false;\n hexFaceOptions.extendBottom = false;\n hexFaceOptions.extendLeft = false;\n hexFaceOptions.extendRight = false;\n hexFaceOptions.scalePatternWidth = scalePattern;\n hexFaceOptions.scalePatternHeight = scalePattern;\n hexFaceOptions.inclusionPattern = inclusionPattern;\n\n const hexagonFaces = await face.hexagonsInGrid(hexFaceOptions);\n\n // Create affector point visualization (control point elevated)\n const affectorPoint = vector.add({\n first: controlPoint,\n second: [0, 3, 0] as Vector3\n }) as Point3;\n\n // Create pin with label to show the affector point\n const pinOptions = new PinWithLabelDto();\n pinOptions.startPoint = controlPoint;\n pinOptions.endPoint = affectorPoint;\n pinOptions.direction = [0, 0, 1] as Vector3;\n pinOptions.offsetFromStart = 0.1;\n pinOptions.label = \"Affector\";\n pinOptions.labelOffset = 0.3;\n pinOptions.labelSize = 0.1;\n\n const pin = await dimensions.pinWithLabel(pinOptions);\n\n // Draw the hexagon faces and affector pin\n bitbybit.draw.drawAnyAsync({ entity: hexagonFaces });\n bitbybit.draw.drawAnyAsync({ entity: pin });\n\n // Optional: Draw the control point for reference\n bitbybit.draw.drawAnyAsync({\n entity: controlPoint,\n });\n}\n\n// Execute the function\nstart();","version":"0.21.0","type":"typescript"}} + script={{"script":"// Import required DTOs and types for face hexagon grid creation\nconst { HexagonsInGridDto, RectangleDto, DataOnUVDto, PinWithLabelDto } = Bit.Inputs.OCCT;\nconst { HexGridScaledToFitDto } = Bit.Inputs.Point;\nconst { RemapNumberDto } = Bit.Inputs.Math;\nconst { HexGridData } = Bit.Models.Point;\n\ntype Point3 = Bit.Inputs.Base.Point3;\ntype Vector3 = Bit.Inputs.Base.Vector3;\ntype TopoDSFacePointer = Bit.Inputs.OCCT.TopoDSFacePointer;\n\n// Get access to OCCT face, point, and utility functions\nconst { face } = bitbybit.occt.shapes;\nconst { point } = bitbybit;\nconst { math, vector, json, lists } = bitbybit;\nconst { dimensions } = bitbybit.occt;\n\n// Define the main function to create advanced hexagon face pattern\nconst start = async () => {\n // Define grid parameters\n const gridWidth = 16.5;\n const gridHeight = 9;\n const hexagonsInWidth = 29;\n const hexagonsInHeight = 29;\n const controlPointU = 0; // UV parameter for control point position\n const controlPointV = 0.49; // UV parameter for control point position\n\n // Create a reference rectangle face to define the control point\n const rectangleOptions = new RectangleDto();\n rectangleOptions.width = gridWidth;\n rectangleOptions.length = gridHeight;\n rectangleOptions.center = [0, 0, 0] as Point3;\n rectangleOptions.direction = [0, 1, 0] as Vector3;\n\n const rectangleFace = await face.createRectangleFace(rectangleOptions);\n\n // Create control point on the rectangle face using UV parameters\n const pointOnUVOptions = new DataOnUVDto();\n pointOnUVOptions.shape = rectangleFace;\n pointOnUVOptions.paramU = controlPointU;\n pointOnUVOptions.paramV = controlPointV;\n\n const controlPoint = await face.pointOnUV(pointOnUVOptions);\n\n // Generate hexagon grid centers for distance calculation\n const hexGridOptions = new HexGridScaledToFitDto();\n hexGridOptions.width = gridWidth;\n hexGridOptions.height = gridHeight;\n hexGridOptions.nrHexagonsInWidth = hexagonsInWidth;\n hexGridOptions.nrHexagonsInHeight = hexagonsInHeight;\n hexGridOptions.flatTop = true;\n hexGridOptions.extendTop = false;\n hexGridOptions.extendBottom = false;\n hexGridOptions.extendLeft = false;\n hexGridOptions.extendRight = false;\n hexGridOptions.centerGrid = true;\n hexGridOptions.pointsOnGround = true;\n\n const hexGrid = point.hexGridScaledToFit(hexGridOptions);\n const hexCenters = hexGrid.centers;\n\n // Calculate distances from control point to all hexagon centers\n const distances = point.distancesToPoints({\n startPoint: controlPoint,\n endPoints: hexCenters\n });\n\n // Flatten the distance array and find min/max values\n const minDistance = vector.min({ vector: distances });\n const maxDistance = vector.max({ vector: distances });\n\n // Remap distances to scale factors (0.211 to 0.9)\n const remapOptions = new RemapNumberDto();\n remapOptions.fromLow = minDistance;\n remapOptions.fromHigh = maxDistance;\n remapOptions.toLow = 0.211;\n remapOptions.toHigh = 0.9;\n\n const scalePattern = distances.map(x => {\n remapOptions.number = x;\n return math.remap(remapOptions);\n })\n\n // Create inclusion pattern for selective hexagon removal\n const inclusionPattern = json.parse({ text: \"[true, true, true, true, false]\" });\n\n // Create the hexagon faces with advanced patterns\n const hexFaceOptions = new HexagonsInGridDto();\n hexFaceOptions.width = gridWidth;\n hexFaceOptions.height = gridHeight;\n hexFaceOptions.nrHexagonsInWidth = hexagonsInWidth;\n hexFaceOptions.nrHexagonsInHeight = hexagonsInHeight;\n hexFaceOptions.flatTop = true;\n hexFaceOptions.extendTop = false;\n hexFaceOptions.extendBottom = false;\n hexFaceOptions.extendLeft = false;\n hexFaceOptions.extendRight = false;\n hexFaceOptions.scalePatternWidth = scalePattern;\n hexFaceOptions.scalePatternHeight = scalePattern;\n hexFaceOptions.inclusionPattern = inclusionPattern;\n\n const hexagonFaces = await face.hexagonsInGrid(hexFaceOptions);\n\n // Create affector point visualization (control point elevated)\n const affectorPoint = vector.add({\n first: controlPoint,\n second: [0, 3, 0] as Vector3\n }) as Point3;\n\n // Create pin with label to show the affector point\n const pinOptions = new PinWithLabelDto();\n pinOptions.startPoint = controlPoint;\n pinOptions.endPoint = affectorPoint;\n pinOptions.direction = [0, 0, 1] as Vector3;\n pinOptions.offsetFromStart = 0.1;\n pinOptions.label = \"Affector\";\n pinOptions.labelOffset = 0.3;\n pinOptions.labelSize = 0.1;\n\n const pin = await dimensions.pinWithLabel(pinOptions);\n\n // Draw the hexagon faces and affector pin\n bitbybit.draw.drawAnyAsync({ entity: hexagonFaces });\n bitbybit.draw.drawAnyAsync({ entity: pin });\n\n // Optional: Draw the control point for reference\n bitbybit.draw.drawAnyAsync({\n entity: controlPoint,\n });\n}\n\n// Execute the function\nstart();","type":"typescript"}} title="Creating face from wire" /> diff --git a/docs/learn/code/common/occt/shapes/shells/intro-shells.md b/docs/learn/code/common/occt/shapes/shells/intro-shells.md index 4946f8d54..e72c3743f 100644 --- a/docs/learn/code/common/occt/shapes/shells/intro-shells.md +++ b/docs/learn/code/common/occt/shapes/shells/intro-shells.md @@ -40,21 +40,21 @@ This first example demonstrates the fundamental concept of shell creation by sew sizeface1face2rotatedFace2translatedFace2facesshellsize5face1size000010face2size000010rotatedFace2face200190translatedFace2rotatedFace2DIVIDEsize2DIVIDEsize20facesface1translatedFace2shellfaces0.0000001shell","version":"0.21.0","type":"blockly"}} + script={{"script":"sizeface1face2rotatedFace2translatedFace2facesshellsize5face1size000010face2size000010rotatedFace2face200190translatedFace2rotatedFace2DIVIDEsize2DIVIDEsize20facesface1translatedFace2shellfaces0.0000001shell","type":"blockly"}} title="Creating shells by sewing two square faces" /> {\n // Define the size for both square faces\n const size = 5;\n\n // Create first square face at origin\n const face1Options = new SquareDto();\n face1Options.size = size;\n face1Options.center = [0, 0, 0] as Point3;\n face1Options.direction = [0, 1, 0] as Vector3; // Y-up orientation\n\n const face1 = await face.createSquareFace(face1Options);\n\n // Create second square face (initially identical to first)\n const face2Options = new SquareDto();\n face2Options.size = size;\n face2Options.center = [0, 0, 0] as Point3;\n face2Options.direction = [0, 1, 0] as Vector3;\n\n const face2 = await face.createSquareFace(face2Options);\n\n // Rotate the second face 90 degrees around Z-axis to create perpendicular orientation\n const rotateOptions = new RotateDto();\n rotateOptions.shape = face2;\n rotateOptions.axis = [0, 0, 1] as Vector3; // Z-axis\n rotateOptions.angle = 90; // 90 degrees\n\n const rotatedFace2 = await transforms.rotate(rotateOptions);\n\n // Translate the rotated face to share an edge with the first face\n const translateOptions = new TranslateDto();\n translateOptions.shape = rotatedFace2;\n translateOptions.translation = [size / 2, size / 2, 0] as Vector3;\n\n const translatedFace2 = await transforms.translate(translateOptions);\n\n // Create array of faces to sew together\n const faces = [face1, translatedFace2];\n\n // Sew the faces together to create a shell\n const sewOptions = new SewDto(faces);\n sewOptions.tolerance = 1e-7; // Very tight tolerance for precise sewing\n\n const resultShell = await shell.sewFaces(sewOptions);\n\n // Verify that we created a shell (not just individual faces)\n const shapeType = await shape.getShapeType({ shape: resultShell });\n console.log('Shell shape type:', shapeType); // Should output \"shell\"\n\n // Draw the resulting shell\n bitbybit.draw.drawAnyAsync({\n entity: resultShell\n });\n}\n\n// Execute the function\nstart();","version":"0.21.0","type":"typescript"}} + script={{"script":"// Import required DTOs for creating faces, shells, and transformations\nconst { SquareDto, SewDto, RotateDto, TranslateDto } = Bit.Inputs.OCCT;\n// Import type definitions for type safety\ntype Point3 = Bit.Inputs.Base.Point3;\ntype Vector3 = Bit.Inputs.Base.Vector3;\ntype TopoDSFacePointer = Bit.Inputs.OCCT.TopoDSFacePointer;\ntype TopoDSShellPointer = Bit.Inputs.OCCT.TopoDSShellPointer;\n\n// Get access to OCCT modules and utility functions\nconst { face, shell, shape } = bitbybit.occt.shapes;\nconst { transforms } = bitbybit.occt;\n\n// Define the main function to create a simple shell from two faces\nconst start = async () => {\n // Define the size for both square faces\n const size = 5;\n\n // Create first square face at origin\n const face1Options = new SquareDto();\n face1Options.size = size;\n face1Options.center = [0, 0, 0] as Point3;\n face1Options.direction = [0, 1, 0] as Vector3; // Y-up orientation\n\n const face1 = await face.createSquareFace(face1Options);\n\n // Create second square face (initially identical to first)\n const face2Options = new SquareDto();\n face2Options.size = size;\n face2Options.center = [0, 0, 0] as Point3;\n face2Options.direction = [0, 1, 0] as Vector3;\n\n const face2 = await face.createSquareFace(face2Options);\n\n // Rotate the second face 90 degrees around Z-axis to create perpendicular orientation\n const rotateOptions = new RotateDto();\n rotateOptions.shape = face2;\n rotateOptions.axis = [0, 0, 1] as Vector3; // Z-axis\n rotateOptions.angle = 90; // 90 degrees\n\n const rotatedFace2 = await transforms.rotate(rotateOptions);\n\n // Translate the rotated face to share an edge with the first face\n const translateOptions = new TranslateDto();\n translateOptions.shape = rotatedFace2;\n translateOptions.translation = [size / 2, size / 2, 0] as Vector3;\n\n const translatedFace2 = await transforms.translate(translateOptions);\n\n // Create array of faces to sew together\n const faces = [face1, translatedFace2];\n\n // Sew the faces together to create a shell\n const sewOptions = new SewDto(faces);\n sewOptions.tolerance = 1e-7; // Very tight tolerance for precise sewing\n\n const resultShell = await shell.sewFaces(sewOptions);\n\n // Verify that we created a shell (not just individual faces)\n const shapeType = await shape.getShapeType({ shape: resultShell });\n console.log('Shell shape type:', shapeType); // Should output \"shell\"\n\n // Draw the resulting shell\n bitbybit.draw.drawAnyAsync({\n entity: resultShell\n });\n}\n\n// Execute the function\nstart();","type":"typescript"}} title="Creating shells by sewing two square faces" /> @@ -81,21 +81,21 @@ While this cylindrical solid **can be constructed in Bitbybit using the simple s radiusheightcircleWireextrusionVectorcylindricalSurfacebottomFacetopFacefacesshellsolidradius5height5circleWireradius000010extrusionVector0height0cylindricalSurfacecircleWireextrusionVectorbottomFacecircleWireTRUEtopFacebottomFaceextrusionVectorfacestopFacecylindricalSurfacebottomFaceshellfaces1e-7solidshellsolid","version":"0.21.0","type":"blockly"}} + script={{"script":"radiusheightcircleWireextrusionVectorcylindricalSurfacebottomFacetopFacefacesshellsolidradius5height5circleWireradius000010extrusionVector0height0cylindricalSurfacecircleWireextrusionVectorbottomFacecircleWireTRUEtopFacebottomFaceextrusionVectorfacestopFacecylindricalSurfacebottomFaceshellfaces1e-7solidshellsolid","type":"blockly"}} title="Creating closed shells and converting to solids" /> {\n // Define geometric parameters\n const radius = 5;\n const height = 5;\n\n // Step 1: Create base circle wire\n const circleOptions = new CircleDto();\n circleOptions.radius = radius;\n circleOptions.center = [0, 0, 0] as Point3;\n circleOptions.direction = [0, 1, 0] as Vector3; // Y-up orientation\n\n const circleWire = await wire.createCircleWire(circleOptions);\n\n // Step 2: Create extrusion vector for cylindrical surface\n const extrusionVector: Vector3 = [0, height, 0];\n\n // Step 3: Create cylindrical surface by extruding the circle wire\n const extrudeOptions = new ExtrudeDto();\n extrudeOptions.shape = circleWire;\n extrudeOptions.direction = extrusionVector;\n\n const cylindricalSurface = await operations.extrude(extrudeOptions);\n\n // Step 4: Create bottom face from the circle wire\n const bottomFaceOptions = new FaceFromWireDto();\n bottomFaceOptions.shape = circleWire;\n bottomFaceOptions.planar = true; // Ensure flat circular face\n\n const bottomFace = await face.createFaceFromWire(bottomFaceOptions);\n\n // Step 5: Create top face by translating bottom face\n const translateOptions = new TranslateDto();\n translateOptions.shape = bottomFace;\n translateOptions.translation = extrusionVector;\n\n const topFace = await transforms.translate(translateOptions);\n\n // Step 6: Collect all faces that will form the closed shell\n const faces = [topFace, cylindricalSurface, bottomFace];\n\n // Step 7: Sew faces together to create a closed shell\n const sewOptions = new SewDto(faces);\n sewOptions.tolerance = 1e-7; // High precision for closed shell\n\n const closedShell = await shell.sewFaces(sewOptions);\n\n // Step 8: Convert closed shell to solid\n const solidOptions = new ShapeDto();\n solidOptions.shape = closedShell;\n\n const cylinderSolid = await solid.fromClosedShell(solidOptions);\n\n // Step 9: Verify the shape types\n const shellType = await shape.getShapeType({ shape: closedShell });\n const solidType = await shape.getShapeType({ shape: cylinderSolid });\n\n console.log('Shell type:', shellType); // Should output \"shell\"\n console.log('Solid type:', solidType); // Should output \"solid\"\n\n // Step 10: Draw the final solid\n bitbybit.draw.drawAnyAsync({\n entity: cylinderSolid\n });\n}\n\n// Execute the function\nstart();","version":"0.21.0","type":"typescript"}} + script={{"script":"// Import required DTOs for creating complex geometries\nconst { CircleDto, FaceFromWireDto, ShapeDto, SewDto, ExtrudeDto, TranslateDto } = Bit.Inputs.OCCT;\n\n// Import type definitions for type safety\ntype Point3 = Bit.Inputs.Base.Point3;\ntype Vector3 = Bit.Inputs.Base.Vector3;\ntype TopoDSWirePointer = Bit.Inputs.OCCT.TopoDSWirePointer;\ntype TopoDSFacePointer = Bit.Inputs.OCCT.TopoDSFacePointer;\ntype TopoDSShellPointer = Bit.Inputs.OCCT.TopoDSShellPointer;\n\n// Get access to OCCT modules and utility functions\nconst { wire, face, shell, solid, shape } = bitbybit.occt.shapes;\nconst { operations, transforms } = bitbybit.occt;\n\n// Define the main function to create a complex shell and convert to solid\nconst start = async () => {\n // Define geometric parameters\n const radius = 5;\n const height = 5;\n\n // Step 1: Create base circle wire\n const circleOptions = new CircleDto();\n circleOptions.radius = radius;\n circleOptions.center = [0, 0, 0] as Point3;\n circleOptions.direction = [0, 1, 0] as Vector3; // Y-up orientation\n\n const circleWire = await wire.createCircleWire(circleOptions);\n\n // Step 2: Create extrusion vector for cylindrical surface\n const extrusionVector: Vector3 = [0, height, 0];\n\n // Step 3: Create cylindrical surface by extruding the circle wire\n const extrudeOptions = new ExtrudeDto();\n extrudeOptions.shape = circleWire;\n extrudeOptions.direction = extrusionVector;\n\n const cylindricalSurface = await operations.extrude(extrudeOptions);\n\n // Step 4: Create bottom face from the circle wire\n const bottomFaceOptions = new FaceFromWireDto();\n bottomFaceOptions.shape = circleWire;\n bottomFaceOptions.planar = true; // Ensure flat circular face\n\n const bottomFace = await face.createFaceFromWire(bottomFaceOptions);\n\n // Step 5: Create top face by translating bottom face\n const translateOptions = new TranslateDto();\n translateOptions.shape = bottomFace;\n translateOptions.translation = extrusionVector;\n\n const topFace = await transforms.translate(translateOptions);\n\n // Step 6: Collect all faces that will form the closed shell\n const faces = [topFace, cylindricalSurface, bottomFace];\n\n // Step 7: Sew faces together to create a closed shell\n const sewOptions = new SewDto(faces);\n sewOptions.tolerance = 1e-7; // High precision for closed shell\n\n const closedShell = await shell.sewFaces(sewOptions);\n\n // Step 8: Convert closed shell to solid\n const solidOptions = new ShapeDto();\n solidOptions.shape = closedShell;\n\n const cylinderSolid = await solid.fromClosedShell(solidOptions);\n\n // Step 9: Verify the shape types\n const shellType = await shape.getShapeType({ shape: closedShell });\n const solidType = await shape.getShapeType({ shape: cylinderSolid });\n\n console.log('Shell type:', shellType); // Should output \"shell\"\n console.log('Solid type:', solidType); // Should output \"solid\"\n\n // Step 10: Draw the final solid\n bitbybit.draw.drawAnyAsync({\n entity: cylinderSolid\n });\n}\n\n// Execute the function\nstart();","type":"typescript"}} title="Creating closed shells and converting to solids" /> diff --git a/docs/learn/code/common/occt/shapes/solids/intro-solids.md b/docs/learn/code/common/occt/shapes/solids/intro-solids.md index f54fba82a..0e1e2ff0a 100644 --- a/docs/learn/code/common/occt/shapes/solids/intro-solids.md +++ b/docs/learn/code/common/occt/shapes/solids/intro-solids.md @@ -32,21 +32,21 @@ This example demonstrates the creation of the most common primitive solid types: boxcubecylindersphereconebox378000TRUEcube5500TRUEcylinder23-500010360TRUEsphere1.51000cone213360-1000010boxcubecylinderspherecone","version":"0.21.0","type":"blockly"}} + script={{"script":"boxcubecylindersphereconebox378000TRUEcube5500TRUEcylinder23-500010360TRUEsphere1.51000cone213360-1000010boxcubecylinderspherecone","type":"blockly"}} title="Creating primitive solids" /> {\n // Create a rectangular box\n const boxOptions = new BoxDto();\n boxOptions.width = 3;\n boxOptions.length = 7;\n boxOptions.height = 8;\n boxOptions.center = [0, 0, 0] as Point3;\n boxOptions.originOnCenter = true;\n \n const box = await solid.createBox(boxOptions);\n \n // Create a cube at a different position\n const cubeOptions = new CubeDto();\n cubeOptions.size = 5;\n cubeOptions.center = [5, 0, 0] as Point3;\n cubeOptions.originOnCenter = true;\n \n const cube = await solid.createCube(cubeOptions);\n \n // Create a cylinder\n const cylinderOptions = new CylinderDto();\n cylinderOptions.radius = 2;\n cylinderOptions.height = 3;\n cylinderOptions.center = [-5, 0, 0] as Point3;\n cylinderOptions.direction = [0, 1, 0] as Vector3;\n cylinderOptions.angle = 360;\n cylinderOptions.originOnCenter = true;\n \n const cylinder = await solid.createCylinder(cylinderOptions);\n \n // Create a sphere\n const sphereOptions = new SphereDto();\n sphereOptions.radius = 1.5;\n sphereOptions.center = [10, 0, 0] as Point3;\n \n const sphere = await solid.createSphere(sphereOptions);\n \n // Create a cone\n const coneOptions = new ConeDto();\n coneOptions.radius1 = 2;\n coneOptions.radius2 = 1;\n coneOptions.height = 3;\n coneOptions.angle = 360;\n coneOptions.center = [-10, 0, 0] as Point3;\n coneOptions.direction = [0, 1, 0] as Vector3;\n \n const cone = await solid.createCone(coneOptions);\n \n // Draw all the created solids\n bitbybit.draw.drawAnyAsync({ entity: box });\n bitbybit.draw.drawAnyAsync({ entity: cube });\n bitbybit.draw.drawAnyAsync({ entity: cylinder });\n bitbybit.draw.drawAnyAsync({ entity: sphere });\n bitbybit.draw.drawAnyAsync({ entity: cone });\n}\n\n// Execute the function\nstart();","version":"0.21.0","type":"typescript"}} + script={{"script":"// Import required DTOs and types for solid creation\nconst { BoxDto, CubeDto, CylinderDto, SphereDto, ConeDto } = Bit.Inputs.OCCT;\ntype Point3 = Bit.Inputs.Base.Point3;\ntype Vector3 = Bit.Inputs.Base.Vector3;\n\n// Get access to OCCT solid creation functions\nconst { solid } = bitbybit.occt.shapes;\n\n// Define the main function to create various primitive solids\nconst start = async () => {\n // Create a rectangular box\n const boxOptions = new BoxDto();\n boxOptions.width = 3;\n boxOptions.length = 7;\n boxOptions.height = 8;\n boxOptions.center = [0, 0, 0] as Point3;\n boxOptions.originOnCenter = true;\n \n const box = await solid.createBox(boxOptions);\n \n // Create a cube at a different position\n const cubeOptions = new CubeDto();\n cubeOptions.size = 5;\n cubeOptions.center = [5, 0, 0] as Point3;\n cubeOptions.originOnCenter = true;\n \n const cube = await solid.createCube(cubeOptions);\n \n // Create a cylinder\n const cylinderOptions = new CylinderDto();\n cylinderOptions.radius = 2;\n cylinderOptions.height = 3;\n cylinderOptions.center = [-5, 0, 0] as Point3;\n cylinderOptions.direction = [0, 1, 0] as Vector3;\n cylinderOptions.angle = 360;\n cylinderOptions.originOnCenter = true;\n \n const cylinder = await solid.createCylinder(cylinderOptions);\n \n // Create a sphere\n const sphereOptions = new SphereDto();\n sphereOptions.radius = 1.5;\n sphereOptions.center = [10, 0, 0] as Point3;\n \n const sphere = await solid.createSphere(sphereOptions);\n \n // Create a cone\n const coneOptions = new ConeDto();\n coneOptions.radius1 = 2;\n coneOptions.radius2 = 1;\n coneOptions.height = 3;\n coneOptions.angle = 360;\n coneOptions.center = [-10, 0, 0] as Point3;\n coneOptions.direction = [0, 1, 0] as Vector3;\n \n const cone = await solid.createCone(coneOptions);\n \n // Draw all the created solids\n bitbybit.draw.drawAnyAsync({ entity: box });\n bitbybit.draw.drawAnyAsync({ entity: cube });\n bitbybit.draw.drawAnyAsync({ entity: cylinder });\n bitbybit.draw.drawAnyAsync({ entity: sphere });\n bitbybit.draw.drawAnyAsync({ entity: cone });\n}\n\n// Execute the function\nstart();","type":"typescript"}} title="Creating primitive solids" /> diff --git a/docs/learn/code/common/occt/shapes/solids/volume-and-surface-area.md b/docs/learn/code/common/occt/shapes/solids/volume-and-surface-area.md index f2b719275..02b47a4b2 100644 --- a/docs/learn/code/common/occt/shapes/solids/volume-and-surface-area.md +++ b/docs/learn/code/common/occt/shapes/solids/volume-and-surface-area.md @@ -32,21 +32,21 @@ The example shows a practical workflow for measuring and displaying geometric pr heightconevolumesurfaceArearoundedVolumeroundedSurfaceAreavolumeTextareaTextvolumePinareaPinheight5cone21height360000010volumeconesurfaceAreaconeroundedVolumevolume2roundedSurfaceAreasurfaceArea2volumeTextVolume {0} m3roundedVolumeareaTextArea {0} m3roundedSurfaceAreavolumePin0height01ADDheight301000volumeText0.30.3areaPin0height01ADDheight401000areaText0.30.3conevolumePinareaPin","version":"0.21.0","type":"blockly"}} + script={{"script":"heightconevolumesurfaceArearoundedVolumeroundedSurfaceAreavolumeTextareaTextvolumePinareaPinheight5cone21height360000010volumeconesurfaceAreaconeroundedVolumevolume2roundedSurfaceAreasurfaceArea2volumeTextVolume {0} m3roundedVolumeareaTextArea {0} m3roundedSurfaceAreavolumePin0height01ADDheight301000volumeText0.30.3areaPin0height01ADDheight401000areaText0.30.3conevolumePinareaPin","type":"blockly"}} title="Get volume and surface area from solid" /> {\n // Parametric height value\n const height = 5;\n\n // Create a cone\n const coneOptions = new ConeDto();\n coneOptions.radius1 = 2;\n coneOptions.radius2 = 1;\n coneOptions.height = height;\n coneOptions.angle = 360;\n coneOptions.center = [0, 0, 0] as Point3;\n coneOptions.direction = [0, 1, 0] as Vector3;\n\n const cone = await solid.createCone(coneOptions);\n\n // Get volume and surface area\n const volume = await solid.getSolidVolume({ shape: cone });\n const surfaceArea = await solid.getSolidSurfaceArea({ shape: cone });\n\n // Round to 2 decimal places\n const roundedVolume = math.roundToDecimals({ number: volume, decimalPlaces: 2 });\n const roundedSurfaceArea = math.roundToDecimals({ number: surfaceArea, decimalPlaces: 2 });\n\n // Format as text with units\n const volumeText = text.format({\n text: \"Volume {0} m3\",\n values: [text.toString({ item: roundedVolume })]\n });\n const areaText = text.format({\n text: \"Area {0} m2\",\n values: [text.toString({ item: roundedSurfaceArea })]\n });\n\n // Create pin labels to display the measurements\n const volumePinOptions = new PinWithLabelDto();\n volumePinOptions.startPoint = [0, height, 0] as Point3;\n volumePinOptions.endPoint = [1, height + 3, 0] as Point3;\n volumePinOptions.direction = [1, 0, 0] as Vector3;\n volumePinOptions.offsetFromStart = 0;\n volumePinOptions.label = volumeText;\n volumePinOptions.labelOffset = 0.3;\n volumePinOptions.labelSize = 0.3;\n\n const volumePin = await dimensions.pinWithLabel(volumePinOptions);\n\n const areaPinOptions = new PinWithLabelDto();\n areaPinOptions.startPoint = [0, height, 0] as Point3;\n areaPinOptions.endPoint = [1, height + 4, 0] as Point3;\n areaPinOptions.direction = [1, 0, 0] as Vector3;\n areaPinOptions.offsetFromStart = 0;\n areaPinOptions.label = areaText;\n areaPinOptions.labelOffset = 0.3;\n areaPinOptions.labelSize = 0.3;\n\n const areaPin = await dimensions.pinWithLabel(areaPinOptions);\n\n // Draw the cone and labels\n bitbybit.draw.drawAnyAsync({ entity: cone });\n bitbybit.draw.drawAnyAsync({ entity: volumePin });\n bitbybit.draw.drawAnyAsync({ entity: areaPin });\n}\n\n// Execute the function\nstart();","version":"0.21.0","type":"typescript"}} + script={{"script":"// Import required DTOs and types\nconst { ConeDto, PinWithLabelDto } = Bit.Inputs.OCCT;\ntype Point3 = Bit.Inputs.Base.Point3;\ntype Vector3 = Bit.Inputs.Base.Vector3;\n\n// Get access to OCCT modules\nconst { solid } = bitbybit.occt.shapes;\nconst { dimensions } = bitbybit.occt;\nconst { math, text } = bitbybit;\n\n// Define the main function to demonstrate volume and surface area calculation\nconst start = async () => {\n // Parametric height value\n const height = 5;\n\n // Create a cone\n const coneOptions = new ConeDto();\n coneOptions.radius1 = 2;\n coneOptions.radius2 = 1;\n coneOptions.height = height;\n coneOptions.angle = 360;\n coneOptions.center = [0, 0, 0] as Point3;\n coneOptions.direction = [0, 1, 0] as Vector3;\n\n const cone = await solid.createCone(coneOptions);\n\n // Get volume and surface area\n const volume = await solid.getSolidVolume({ shape: cone });\n const surfaceArea = await solid.getSolidSurfaceArea({ shape: cone });\n\n // Round to 2 decimal places\n const roundedVolume = math.roundToDecimals({ number: volume, decimalPlaces: 2 });\n const roundedSurfaceArea = math.roundToDecimals({ number: surfaceArea, decimalPlaces: 2 });\n\n // Format as text with units\n const volumeText = text.format({\n text: \"Volume {0} m3\",\n values: [text.toString({ item: roundedVolume })]\n });\n const areaText = text.format({\n text: \"Area {0} m2\",\n values: [text.toString({ item: roundedSurfaceArea })]\n });\n\n // Create pin labels to display the measurements\n const volumePinOptions = new PinWithLabelDto();\n volumePinOptions.startPoint = [0, height, 0] as Point3;\n volumePinOptions.endPoint = [1, height + 3, 0] as Point3;\n volumePinOptions.direction = [1, 0, 0] as Vector3;\n volumePinOptions.offsetFromStart = 0;\n volumePinOptions.label = volumeText;\n volumePinOptions.labelOffset = 0.3;\n volumePinOptions.labelSize = 0.3;\n\n const volumePin = await dimensions.pinWithLabel(volumePinOptions);\n\n const areaPinOptions = new PinWithLabelDto();\n areaPinOptions.startPoint = [0, height, 0] as Point3;\n areaPinOptions.endPoint = [1, height + 4, 0] as Point3;\n areaPinOptions.direction = [1, 0, 0] as Vector3;\n areaPinOptions.offsetFromStart = 0;\n areaPinOptions.label = areaText;\n areaPinOptions.labelOffset = 0.3;\n areaPinOptions.labelSize = 0.3;\n\n const areaPin = await dimensions.pinWithLabel(areaPinOptions);\n\n // Draw the cone and labels\n bitbybit.draw.drawAnyAsync({ entity: cone });\n bitbybit.draw.drawAnyAsync({ entity: volumePin });\n bitbybit.draw.drawAnyAsync({ entity: areaPin });\n}\n\n// Execute the function\nstart();","type":"typescript"}} title="Get volume and surface area from solid" /> diff --git a/docs/learn/code/common/occt/shapes/wire/wire-basic-primitives.md b/docs/learn/code/common/occt/shapes/wire/wire-basic-primitives.md index 4404b6adc..dd14f50c1 100644 --- a/docs/learn/code/common/occt/shapes/wire/wire-basic-primitives.md +++ b/docs/learn/code/common/occt/shapes/wire/wire-basic-primitives.md @@ -33,21 +33,21 @@ This example demonstrates the creation of the most common primitive wire types: circleWiresquareWirengonWireparallelogramWirerectangleWireellipseWirecircleWire3000010squareWire3500010ngonWire-60001062parallelogramWire-1100010TRUE3230rectangleWire26900010ellipseWire120001014circleWiresquareWirengonWireparallelogramWirerectangleWireellipseWire","version":"0.21.0","type":"blockly"}} + script={{"script":"circleWiresquareWirengonWireparallelogramWirerectangleWireellipseWirecircleWire3000010squareWire3500010ngonWire-60001062parallelogramWire-1100010TRUE3230rectangleWire26900010ellipseWire120001014circleWiresquareWirengonWireparallelogramWirerectangleWireellipseWire","type":"blockly"}} title="Creating basic wire primitives" /> {\n // Create a circle wire\n const circleOptions = new CircleDto();\n circleOptions.radius = 3;\n circleOptions.center = [0, 0, 0] as Point3;\n circleOptions.direction = [0, 1, 0] as Vector3;\n\n const circleWire = await wire.createCircleWire(circleOptions);\n\n // Create a square wire at a different position\n const squareOptions = new SquareDto();\n squareOptions.size = 3;\n squareOptions.center = [5, 0, 0] as Point3;\n squareOptions.direction = [0, 1, 0] as Vector3;\n\n const squareWire = await wire.createSquareWire(squareOptions);\n\n // Create an NGon wire (hexagon)\n const ngonOptions = new NGonWireDto();\n ngonOptions.center = [-6, 0, 0] as Point3;\n ngonOptions.direction = [0, 1, 0] as Vector3;\n ngonOptions.nrCorners = 6;\n ngonOptions.radius = 2;\n\n const ngonWire = await wire.createNGonWire(ngonOptions);\n\n // Create a parallelogram wire\n const parallelogramOptions = new ParallelogramDto();\n parallelogramOptions.center = [-11, 0, 0] as Point3;\n parallelogramOptions.direction = [0, 1, 0] as Vector3;\n parallelogramOptions.aroundCenter = true;\n parallelogramOptions.width = 3;\n parallelogramOptions.height = 2;\n parallelogramOptions.angle = 30;\n\n const parallelogramWire = await wire.createParallelogramWire(parallelogramOptions);\n\n // Create a rectangle wire\n const rectangleOptions = new RectangleDto();\n rectangleOptions.width = 2;\n rectangleOptions.length = 6;\n rectangleOptions.center = [9, 0, 0] as Point3;\n rectangleOptions.direction = [0, 1, 0] as Vector3;\n\n const rectangleWire = await wire.createRectangleWire(rectangleOptions);\n\n // Create an ellipse wire\n const ellipseOptions = new EllipseDto();\n ellipseOptions.center = [12, 0, 0] as Point3;\n ellipseOptions.direction = [0, 1, 0] as Vector3;\n ellipseOptions.radiusMinor = 1;\n ellipseOptions.radiusMajor = 4;\n\n const ellipseWire = await wire.createEllipseWire(ellipseOptions);\n\n // Draw all the created wires\n bitbybit.draw.drawAnyAsync({ entity: circleWire });\n bitbybit.draw.drawAnyAsync({ entity: squareWire });\n bitbybit.draw.drawAnyAsync({ entity: ngonWire });\n bitbybit.draw.drawAnyAsync({ entity: parallelogramWire });\n bitbybit.draw.drawAnyAsync({ entity: rectangleWire });\n bitbybit.draw.drawAnyAsync({ entity: ellipseWire });\n}\n\n// Execute the function\nstart();","version":"0.21.0","type":"typescript"}} + script={{"script":"// Import required DTOs and types for wire creation\nconst { CircleDto, SquareDto, NGonWireDto, ParallelogramDto, RectangleDto, EllipseDto } = Bit.Inputs.OCCT;\ntype Point3 = Bit.Inputs.Base.Point3;\ntype Vector3 = Bit.Inputs.Base.Vector3;\n\n// Get access to OCCT wire creation functions\nconst { wire } = bitbybit.occt.shapes;\n\n// Define the main function to create various primitive wires\nconst start = async () => {\n // Create a circle wire\n const circleOptions = new CircleDto();\n circleOptions.radius = 3;\n circleOptions.center = [0, 0, 0] as Point3;\n circleOptions.direction = [0, 1, 0] as Vector3;\n\n const circleWire = await wire.createCircleWire(circleOptions);\n\n // Create a square wire at a different position\n const squareOptions = new SquareDto();\n squareOptions.size = 3;\n squareOptions.center = [5, 0, 0] as Point3;\n squareOptions.direction = [0, 1, 0] as Vector3;\n\n const squareWire = await wire.createSquareWire(squareOptions);\n\n // Create an NGon wire (hexagon)\n const ngonOptions = new NGonWireDto();\n ngonOptions.center = [-6, 0, 0] as Point3;\n ngonOptions.direction = [0, 1, 0] as Vector3;\n ngonOptions.nrCorners = 6;\n ngonOptions.radius = 2;\n\n const ngonWire = await wire.createNGonWire(ngonOptions);\n\n // Create a parallelogram wire\n const parallelogramOptions = new ParallelogramDto();\n parallelogramOptions.center = [-11, 0, 0] as Point3;\n parallelogramOptions.direction = [0, 1, 0] as Vector3;\n parallelogramOptions.aroundCenter = true;\n parallelogramOptions.width = 3;\n parallelogramOptions.height = 2;\n parallelogramOptions.angle = 30;\n\n const parallelogramWire = await wire.createParallelogramWire(parallelogramOptions);\n\n // Create a rectangle wire\n const rectangleOptions = new RectangleDto();\n rectangleOptions.width = 2;\n rectangleOptions.length = 6;\n rectangleOptions.center = [9, 0, 0] as Point3;\n rectangleOptions.direction = [0, 1, 0] as Vector3;\n\n const rectangleWire = await wire.createRectangleWire(rectangleOptions);\n\n // Create an ellipse wire\n const ellipseOptions = new EllipseDto();\n ellipseOptions.center = [12, 0, 0] as Point3;\n ellipseOptions.direction = [0, 1, 0] as Vector3;\n ellipseOptions.radiusMinor = 1;\n ellipseOptions.radiusMajor = 4;\n\n const ellipseWire = await wire.createEllipseWire(ellipseOptions);\n\n // Draw all the created wires\n bitbybit.draw.drawAnyAsync({ entity: circleWire });\n bitbybit.draw.drawAnyAsync({ entity: squareWire });\n bitbybit.draw.drawAnyAsync({ entity: ngonWire });\n bitbybit.draw.drawAnyAsync({ entity: parallelogramWire });\n bitbybit.draw.drawAnyAsync({ entity: rectangleWire });\n bitbybit.draw.drawAnyAsync({ entity: ellipseWire });\n}\n\n// Execute the function\nstart();","type":"typescript"}} title="Creating basic wire primitives" /> diff --git a/docs/learn/code/common/occt/shapes/wire/wire-bezier-weights.md b/docs/learn/code/common/occt/shapes/wire/wire-bezier-weights.md index b48754539..d3c6c8ed1 100644 --- a/docs/learn/code/common/occt/shapes/wire/wire-bezier-weights.md +++ b/docs/learn/code/common/occt/shapes/wire/wire-bezier-weights.md @@ -34,21 +34,21 @@ This technique is invaluable for design work where you need the curve to emphasi point1point2point3point4point5pointsListweightsbezierWirepolylineRefminWeightmaxWeightspheressphere1sphere2sphere3sphere4sphere5point1-1000point2-503point307-5point4503point51000pointsListpoint1point2point3point4point5weights10602003010bezierWirepointsListweightsFALSEbezierWire0.01FALSETRUE#e4ff1a10polylineRefpointsListFALSEpolylineRefminWeightweightsmaxWeightweightssphere1point110minWeightmaxWeight0.30.9sphere2point260minWeightmaxWeight0.30.9sphere3point3200minWeightmaxWeight0.30.9sphere4point430minWeightmaxWeight0.30.9sphere5point510minWeightmaxWeight0.30.9spheressphere1sphere2sphere3sphere4sphere5spheres0.05TRUEFALSE#37ff00","version":"0.21.0","type":"blockly"}} + script={{"script":"point1point2point3point4point5pointsListweightsbezierWirepolylineRefminWeightmaxWeightspheressphere1sphere2sphere3sphere4sphere5point1-1000point2-503point307-5point4503point51000pointsListpoint1point2point3point4point5weights10602003010bezierWirepointsListweightsFALSEbezierWire0.01FALSETRUE#e4ff1a10polylineRefpointsListFALSEpolylineRefminWeightweightsmaxWeightweightssphere1point110minWeightmaxWeight0.30.9sphere2point260minWeightmaxWeight0.30.9sphere3point3200minWeightmaxWeight0.30.9sphere4point430minWeightmaxWeight0.30.9sphere5point510minWeightmaxWeight0.30.9spheressphere1sphere2sphere3sphere4sphere5spheres0.05TRUEFALSE#37ff00","type":"blockly"}} title="Bezier curves with different weight distributions" /> {\n // Define control points for the Bezier curve\n const controlPoints: Point3[] = [\n [-10, 0, 0],\n [-5, 0, 3],\n [0, 7, -5],\n [5, 0, 3],\n [10, 0, 0]\n ];\n\n // Weight values - higher weights pull the curve closer to that point\n const weights: number[] = [10, 60, 200, 30, 10];\n \n // Create weighted Bezier curve\n const bezierOptions = new BezierWeightsDto();\n bezierOptions.points = controlPoints;\n bezierOptions.weights = weights;\n bezierOptions.closed = false;\n const bezierWire = await wire.createBezierWeights(bezierOptions);\n\n // Draw the Bezier curve with thick yellow line\n const wireDrawOptions = new DrawOcctShapeSimpleOptions();\n wireDrawOptions.precision = 0.01;\n wireDrawOptions.drawFaces = false;\n wireDrawOptions.drawEdges = true;\n wireDrawOptions.edgeColour = \"#e4ff1a\";\n wireDrawOptions.edgeWidth = 10;\n\n await draw.drawAnyAsync({ entity: bezierWire, options: wireDrawOptions });\n\n // Draw reference polyline connecting control points\n const plnOptions = new PolylineCreateDto();\n plnOptions.points = controlPoints;\n const pln = polyline.create(plnOptions) as Bit.Inputs.Draw.Entity;\n await draw.drawAnyAsync({ entity: pln });\n\n // Calculate weight range for sphere scaling\n const minWeight = vector.min({ vector: weights });\n const maxWeight = vector.max({ vector: weights });\n\n // Create spheres at control points, sized by their weights\n const spherePromises = [];\n for (let i = 0; i < controlPoints.length; i++) {\n // Remap weight to sphere radius (0.3 to 0.9)\n const remapOptions = new RemapNumberDto();\n remapOptions.number = weights[i];\n remapOptions.fromLow = minWeight;\n remapOptions.fromHigh = maxWeight;\n remapOptions.toLow = 0.3;\n remapOptions.toHigh = 0.9;\n\n const sphereOptions = new SphereDto();\n sphereOptions.center = controlPoints[i];\n sphereOptions.radius = bitbybit.math.remap(remapOptions);\n\n spherePromises.push(shapes.solid.createSphere(sphereOptions));\n }\n\n const spheres = await Promise.all(spherePromises);\n\n // Draw spheres in green\n const sphereDrawOptions = new DrawOcctShapeSimpleOptions();\n sphereDrawOptions.precision = 0.05;\n sphereDrawOptions.drawFaces = true;\n sphereDrawOptions.drawEdges = false;\n sphereDrawOptions.faceColour = \"#37ff00\";\n \n draw.drawAnyAsync({ entity: spheres, options: sphereDrawOptions });\n};\n\nstart();","version":"0.21.0","type":"typescript"}} + script={{"script":"// Import required DTOs and types\nconst { BezierWeightsDto, SphereDto } = Bit.Inputs.OCCT;\nconst { DrawOcctShapeSimpleOptions } = Bit.Inputs.Draw;\nconst { RemapNumberDto } = Bit.Inputs.Math;\nconst { PolylineCreateDto } = Bit.Inputs.Polyline;\n\ntype Point3 = Bit.Inputs.Base.Point3;\ntype Vector3 = Bit.Inputs.Base.Vector3;\ntype TopoDSShapePointer = Bit.Inputs.OCCT.TopoDSShapePointer;\n\n// Get access to BitByBit functions\nconst { wire } = bitbybit.occt.shapes;\nconst { shapes } = bitbybit.occt;\nconst { draw, vector, polyline } = bitbybit;\n\nconst start = async () => {\n // Define control points for the Bezier curve\n const controlPoints: Point3[] = [\n [-10, 0, 0],\n [-5, 0, 3],\n [0, 7, -5],\n [5, 0, 3],\n [10, 0, 0]\n ];\n\n // Weight values - higher weights pull the curve closer to that point\n const weights: number[] = [10, 60, 200, 30, 10];\n \n // Create weighted Bezier curve\n const bezierOptions = new BezierWeightsDto();\n bezierOptions.points = controlPoints;\n bezierOptions.weights = weights;\n bezierOptions.closed = false;\n const bezierWire = await wire.createBezierWeights(bezierOptions);\n\n // Draw the Bezier curve with thick yellow line\n const wireDrawOptions = new DrawOcctShapeSimpleOptions();\n wireDrawOptions.precision = 0.01;\n wireDrawOptions.drawFaces = false;\n wireDrawOptions.drawEdges = true;\n wireDrawOptions.edgeColour = \"#e4ff1a\";\n wireDrawOptions.edgeWidth = 10;\n\n await draw.drawAnyAsync({ entity: bezierWire, options: wireDrawOptions });\n\n // Draw reference polyline connecting control points\n const plnOptions = new PolylineCreateDto();\n plnOptions.points = controlPoints;\n const pln = polyline.create(plnOptions) as Bit.Inputs.Draw.Entity;\n await draw.drawAnyAsync({ entity: pln });\n\n // Calculate weight range for sphere scaling\n const minWeight = vector.min({ vector: weights });\n const maxWeight = vector.max({ vector: weights });\n\n // Create spheres at control points, sized by their weights\n const spherePromises = [];\n for (let i = 0; i < controlPoints.length; i++) {\n // Remap weight to sphere radius (0.3 to 0.9)\n const remapOptions = new RemapNumberDto();\n remapOptions.number = weights[i];\n remapOptions.fromLow = minWeight;\n remapOptions.fromHigh = maxWeight;\n remapOptions.toLow = 0.3;\n remapOptions.toHigh = 0.9;\n\n const sphereOptions = new SphereDto();\n sphereOptions.center = controlPoints[i];\n sphereOptions.radius = bitbybit.math.remap(remapOptions);\n\n spherePromises.push(shapes.solid.createSphere(sphereOptions));\n }\n\n const spheres = await Promise.all(spherePromises);\n\n // Draw spheres in green\n const sphereDrawOptions = new DrawOcctShapeSimpleOptions();\n sphereDrawOptions.precision = 0.05;\n sphereDrawOptions.drawFaces = true;\n sphereDrawOptions.drawEdges = false;\n sphereDrawOptions.faceColour = \"#37ff00\";\n \n draw.drawAnyAsync({ entity: spheres, options: sphereDrawOptions });\n};\n\nstart();","type":"typescript"}} title="Bezier curves with different weight distributions" /> diff --git a/docs/learn/code/common/occt/shapes/wire/wire-from-edges.md b/docs/learn/code/common/occt/shapes/wire/wire-from-edges.md index 60c1ce6a0..4ee481dd9 100644 --- a/docs/learn/code/common/occt/shapes/wire/wire-from-edges.md +++ b/docs/learn/code/common/occt/shapes/wire/wire-from-edges.md @@ -60,21 +60,21 @@ This example showcases how simple geometric operations (arc creation and rotatio arc1arc2arc3arc4edgesListcombinedWirearc1505003-505arc2arc101090arc3arc201090arc4arc301090edgesListarc1arc2arc3arc4combinedWireedgesListcombinedWire","version":"0.21.0","type":"blockly"}} + script={{"script":"arc1arc2arc3arc4edgesListcombinedWirearc1505003-505arc2arc101090arc3arc201090arc4arc301090edgesListarc1arc2arc3arc4combinedWireedgesListcombinedWire","type":"blockly"}} title="Combining edges into a wire" /> {\n // Create the first arc through three points\n const arcOptions = new ArcEdgeThreePointsDto();\n arcOptions.start = [5, 0, 5] as Point3;\n arcOptions.middle = [0, 0, 3] as Point3;\n arcOptions.end = [-5, 0, 5] as Point3;\n\n const arc1 = await edge.arcThroughThreePoints(arcOptions);\n\n // Create rotation options for Y-axis rotation\n const rotateOptions = new RotateDto();\n rotateOptions.axis = [0, 1, 0] as Vector3;\n rotateOptions.angle = 90; // 90 degrees\n\n // Create three more arcs by rotating the first arc\n rotateOptions.shape = arc1;\n const arc2 = await transforms.rotate(rotateOptions);\n\n rotateOptions.shape = arc2;\n const arc3 = await transforms.rotate(rotateOptions);\n\n rotateOptions.shape = arc3;\n const arc4 = await transforms.rotate(rotateOptions);\n\n // Combine all arc edges into a single wire\n const combineOptions = new ShapesDto();\n combineOptions.shapes = [arc1, arc2, arc3, arc4];\n\n const combinedWire = await wire.combineEdgesAndWiresIntoAWire(combineOptions);\n\n // Draw the combined wire\n bitbybit.draw.drawAnyAsync({ entity: combinedWire });\n}\n\n// Execute the function\nstart();","version":"0.21.0","type":"typescript"}} + script={{"script":"// Import required DTOs and types for edge and wire creation\nconst { ArcEdgeThreePointsDto, RotateDto, ShapesDto } = Bit.Inputs.OCCT;\ntype Point3 = Bit.Inputs.Base.Point3;\ntype Vector3 = Bit.Inputs.Base.Vector3;\ntype TopoDSShapePointer = Bit.Inputs.OCCT.TopoDSShapePointer;\ntype TopoDSEdgePointer = Bit.Inputs.OCCT.TopoDSEdgePointer;\n\n// Get access to OCCT edge, wire, and transform functions\nconst { edge, wire } = bitbybit.occt.shapes;\nconst { transforms } = bitbybit.occt;\n\n// Define the main function to create a wire from multiple edges\nconst start = async () => {\n // Create the first arc through three points\n const arcOptions = new ArcEdgeThreePointsDto();\n arcOptions.start = [5, 0, 5] as Point3;\n arcOptions.middle = [0, 0, 3] as Point3;\n arcOptions.end = [-5, 0, 5] as Point3;\n\n const arc1 = await edge.arcThroughThreePoints(arcOptions);\n\n // Create rotation options for Y-axis rotation\n const rotateOptions = new RotateDto();\n rotateOptions.axis = [0, 1, 0] as Vector3;\n rotateOptions.angle = 90; // 90 degrees\n\n // Create three more arcs by rotating the first arc\n rotateOptions.shape = arc1;\n const arc2 = await transforms.rotate(rotateOptions);\n\n rotateOptions.shape = arc2;\n const arc3 = await transforms.rotate(rotateOptions);\n\n rotateOptions.shape = arc3;\n const arc4 = await transforms.rotate(rotateOptions);\n\n // Combine all arc edges into a single wire\n const combineOptions = new ShapesDto();\n combineOptions.shapes = [arc1, arc2, arc3, arc4];\n\n const combinedWire = await wire.combineEdgesAndWiresIntoAWire(combineOptions);\n\n // Draw the combined wire\n bitbybit.draw.drawAnyAsync({ entity: combinedWire });\n}\n\n// Execute the function\nstart();","type":"typescript"}} title="Combining edges into a wire" /> diff --git a/docs/learn/code/common/occt/shapes/wire/wire-hexagons-advanced-pattern.md b/docs/learn/code/common/occt/shapes/wire/wire-hexagons-advanced-pattern.md index 5a0e78e61..6ef23af62 100644 --- a/docs/learn/code/common/occt/shapes/wire/wire-hexagons-advanced-pattern.md +++ b/docs/learn/code/common/occt/shapes/wire/wire-hexagons-advanced-pattern.md @@ -35,21 +35,21 @@ This approach demonstrates the power of parametric design thinking, where simple gridWidthgridHeighthexagonsInWidthhexagonsInHeightcontrolPointXcontrolPointZcontrolPointhexGridhexCentersdistancesminDistancemaxDistancescalePatternidistancescaledValueinclusionPatternhexagonWiresboundaryWiregridWidth16.5gridHeight9hexagonsInWidth20hexagonsInHeight20controlPointX2.2controlPointZ2.8controlPointcontrolPointX0controlPointZhexGridgridWidthgridHeighthexagonsInWidthhexagonsInHeightTRUEFALSEFALSEFALSEFALSETRUETRUEhexCentershexGridcentersdistancescontrolPointhexCentersminDistancedistancesmaxDistancedistancesscalePatterndistancedistancesscaledValuedistanceminDistancemaxDistance0.1110.999INSERTLASTscalePatternscaledValueinclusionPattern[true, true, false]hexagonWiresgridWidthgridHeighthexagonsInWidthhexagonsInHeightTRUEFALSEFALSEFALSEFALSEscalePatternscalePatterninclusionPatternboundaryWiregridWidthgridHeight000010hexagonWiresboundaryWirecontrolPoint","version":"0.21.0","type":"blockly"}} + script={{"script":"gridWidthgridHeighthexagonsInWidthhexagonsInHeightcontrolPointXcontrolPointZcontrolPointhexGridhexCentersdistancesminDistancemaxDistancescalePatternidistancescaledValueinclusionPatternhexagonWiresboundaryWiregridWidth16.5gridHeight9hexagonsInWidth20hexagonsInHeight20controlPointX2.2controlPointZ2.8controlPointcontrolPointX0controlPointZhexGridgridWidthgridHeighthexagonsInWidthhexagonsInHeightTRUEFALSEFALSEFALSEFALSETRUETRUEhexCentershexGridcentersdistancescontrolPointhexCentersminDistancedistancesmaxDistancedistancesscalePatterndistancedistancesscaledValuedistanceminDistancemaxDistance0.1110.999INSERTLASTscalePatternscaledValueinclusionPattern[true, true, false]hexagonWiresgridWidthgridHeighthexagonsInWidthhexagonsInHeightTRUEFALSEFALSEFALSEFALSEscalePatternscalePatterninclusionPatternboundaryWiregridWidthgridHeight000010hexagonWiresboundaryWirecontrolPoint","type":"blockly"}} title="Creating hexagon grids in beautiful patterns" /> {\n // Define grid dimensions\n const gridWidth = 16.5;\n const gridHeight = 9;\n const hexagonsInWidth = 20;\n const hexagonsInHeight = 20;\n\n // Control point for distance calculation\n const controlPointX = 2.2;\n const controlPointZ = 2.8;\n const controlPoint: Point3 = [controlPointX, 0, controlPointZ];\n\n // Generate hex grid to get center points\n const hexGridOptions = new HexGridScaledToFitDto();\n hexGridOptions.width = gridWidth;\n hexGridOptions.height = gridHeight;\n hexGridOptions.nrHexagonsInWidth = hexagonsInWidth;\n hexGridOptions.nrHexagonsInHeight = hexagonsInHeight;\n hexGridOptions.flatTop = true;\n hexGridOptions.extendTop = false;\n hexGridOptions.extendBottom = false;\n hexGridOptions.extendLeft = false;\n hexGridOptions.extendRight = false;\n hexGridOptions.centerGrid = true;\n hexGridOptions.pointsOnGround = true;\n\n const hexGrid: HexGridData = bitbybit.point.hexGridScaledToFit(hexGridOptions);\n const hexCenters = hexGrid.centers;\n\n // Calculate distances from control point to all hex centers\n const distanceOptions = new StartEndPointsListDto();\n distanceOptions.startPoint = controlPoint;\n distanceOptions.endPoints = hexCenters;\n\n const distances = bitbybit.point.distancesToPoints(distanceOptions);\n\n // Find min and max distances for remapping\n const minDistance = bitbybit.vector.min({ vector: distances });\n const maxDistance = bitbybit.vector.max({ vector: distances });\n\n // Remap distances to scale values between 0.111 and 0.999\n const scalePattern: number[] = [];\n\n for (const distance of distances) {\n const remapOptions = new RemapNumberDto();\n remapOptions.number = distance;\n remapOptions.fromLow = minDistance;\n remapOptions.fromHigh = maxDistance;\n remapOptions.toLow = 0.111;\n remapOptions.toHigh = 0.999;\n\n const scaledValue = bitbybit.math.remap(remapOptions);\n scalePattern.push(scaledValue);\n }\n\n // Create hexagonal grid with patterns\n const hexGridPatternOptions = new HexagonsInGridDto();\n hexGridPatternOptions.width = gridWidth;\n hexGridPatternOptions.height = gridHeight;\n hexGridPatternOptions.nrHexagonsInWidth = hexagonsInWidth;\n hexGridPatternOptions.nrHexagonsInHeight = hexagonsInHeight;\n hexGridPatternOptions.flatTop = true;\n hexGridPatternOptions.extendTop = false;\n hexGridPatternOptions.extendBottom = false;\n hexGridPatternOptions.extendLeft = false;\n hexGridPatternOptions.extendRight = false;\n\n // Apply the distance-based scale pattern to both width and height\n hexGridPatternOptions.scalePatternWidth = scalePattern;\n hexGridPatternOptions.scalePatternHeight = scalePattern;\n\n // Apply inclusion pattern to selectively remove some hexagons\n const inclusionPattern = [true, true, false]; // Pattern repeats across the grid\n hexGridPatternOptions.inclusionPattern = inclusionPattern;\n\n // Generate the patterned hexagon grid\n const hexagonWires = await bitbybit.occt.shapes.wire.hexagonsInGrid(hexGridPatternOptions);\n\n // Create a boundary rectangle for reference\n const boundaryOptions = new RectangleDto();\n boundaryOptions.width = gridWidth;\n boundaryOptions.length = gridHeight;\n boundaryOptions.center = [0, 0, 0] as Point3;\n boundaryOptions.direction = [0, 1, 0] as Vector3;\n\n const boundaryWire = await bitbybit.occt.shapes.wire.createRectangleWire(boundaryOptions);\n\n // Draw the patterned hexagon grid and boundary\n bitbybit.draw.drawAnyAsync({ entity: hexagonWires });\n bitbybit.draw.drawAnyAsync({ entity: boundaryWire });\n\n // Optionally draw the control point for reference\n bitbybit.draw.drawAnyAsync({ entity: controlPoint });\n}\n\n// Execute the function\nstart();","version":"0.21.0","type":"typescript"}} + script={{"script":"const { HexagonsInGridDto, RectangleDto } = Bit.Inputs.OCCT;\nconst { HexGridScaledToFitDto, StartEndPointsListDto } = Bit.Inputs.Point;\nconst { RemapNumberDto } = Bit.Inputs.Math;\n// Import required types\ntype TopoDSWirePointer = Bit.Inputs.OCCT.TopoDSWirePointer;\ntype Point3 = Bit.Inputs.Base.Point3;\ntype Vector3 = Bit.Inputs.Base.Vector3;\ntype HexGridData = Bit.Models.Point.HexGridData;\n\n// Define the main function\nconst start = async () => {\n // Define grid dimensions\n const gridWidth = 16.5;\n const gridHeight = 9;\n const hexagonsInWidth = 20;\n const hexagonsInHeight = 20;\n\n // Control point for distance calculation\n const controlPointX = 2.2;\n const controlPointZ = 2.8;\n const controlPoint: Point3 = [controlPointX, 0, controlPointZ];\n\n // Generate hex grid to get center points\n const hexGridOptions = new HexGridScaledToFitDto();\n hexGridOptions.width = gridWidth;\n hexGridOptions.height = gridHeight;\n hexGridOptions.nrHexagonsInWidth = hexagonsInWidth;\n hexGridOptions.nrHexagonsInHeight = hexagonsInHeight;\n hexGridOptions.flatTop = true;\n hexGridOptions.extendTop = false;\n hexGridOptions.extendBottom = false;\n hexGridOptions.extendLeft = false;\n hexGridOptions.extendRight = false;\n hexGridOptions.centerGrid = true;\n hexGridOptions.pointsOnGround = true;\n\n const hexGrid: HexGridData = bitbybit.point.hexGridScaledToFit(hexGridOptions);\n const hexCenters = hexGrid.centers;\n\n // Calculate distances from control point to all hex centers\n const distanceOptions = new StartEndPointsListDto();\n distanceOptions.startPoint = controlPoint;\n distanceOptions.endPoints = hexCenters;\n\n const distances = bitbybit.point.distancesToPoints(distanceOptions);\n\n // Find min and max distances for remapping\n const minDistance = bitbybit.vector.min({ vector: distances });\n const maxDistance = bitbybit.vector.max({ vector: distances });\n\n // Remap distances to scale values between 0.111 and 0.999\n const scalePattern: number[] = [];\n\n for (const distance of distances) {\n const remapOptions = new RemapNumberDto();\n remapOptions.number = distance;\n remapOptions.fromLow = minDistance;\n remapOptions.fromHigh = maxDistance;\n remapOptions.toLow = 0.111;\n remapOptions.toHigh = 0.999;\n\n const scaledValue = bitbybit.math.remap(remapOptions);\n scalePattern.push(scaledValue);\n }\n\n // Create hexagonal grid with patterns\n const hexGridPatternOptions = new HexagonsInGridDto();\n hexGridPatternOptions.width = gridWidth;\n hexGridPatternOptions.height = gridHeight;\n hexGridPatternOptions.nrHexagonsInWidth = hexagonsInWidth;\n hexGridPatternOptions.nrHexagonsInHeight = hexagonsInHeight;\n hexGridPatternOptions.flatTop = true;\n hexGridPatternOptions.extendTop = false;\n hexGridPatternOptions.extendBottom = false;\n hexGridPatternOptions.extendLeft = false;\n hexGridPatternOptions.extendRight = false;\n\n // Apply the distance-based scale pattern to both width and height\n hexGridPatternOptions.scalePatternWidth = scalePattern;\n hexGridPatternOptions.scalePatternHeight = scalePattern;\n\n // Apply inclusion pattern to selectively remove some hexagons\n const inclusionPattern = [true, true, false]; // Pattern repeats across the grid\n hexGridPatternOptions.inclusionPattern = inclusionPattern;\n\n // Generate the patterned hexagon grid\n const hexagonWires = await bitbybit.occt.shapes.wire.hexagonsInGrid(hexGridPatternOptions);\n\n // Create a boundary rectangle for reference\n const boundaryOptions = new RectangleDto();\n boundaryOptions.width = gridWidth;\n boundaryOptions.length = gridHeight;\n boundaryOptions.center = [0, 0, 0] as Point3;\n boundaryOptions.direction = [0, 1, 0] as Vector3;\n\n const boundaryWire = await bitbybit.occt.shapes.wire.createRectangleWire(boundaryOptions);\n\n // Draw the patterned hexagon grid and boundary\n bitbybit.draw.drawAnyAsync({ entity: hexagonWires });\n bitbybit.draw.drawAnyAsync({ entity: boundaryWire });\n\n // Optionally draw the control point for reference\n bitbybit.draw.drawAnyAsync({ entity: controlPoint });\n}\n\n// Execute the function\nstart();","type":"typescript"}} title="Creating hexagon grids" /> diff --git a/docs/learn/code/common/occt/shapes/wire/wire-hexagons-in-grid.md b/docs/learn/code/common/occt/shapes/wire/wire-hexagons-in-grid.md index 45688c921..a19023e2a 100644 --- a/docs/learn/code/common/occt/shapes/wire/wire-hexagons-in-grid.md +++ b/docs/learn/code/common/occt/shapes/wire/wire-hexagons-in-grid.md @@ -50,21 +50,21 @@ The component also includes advanced patterning capabilities through optional ar widthheightwidth16.5height9widthheight2318FALSEFALSEFALSEFALSEFALSEwidthheight000010","version":"0.21.0","type":"blockly"}} + script={{"script":"widthheightwidth16.5height9widthheight2318FALSEFALSEFALSEFALSEFALSEwidthheight000010","type":"blockly"}} title="Creating hexagon grids" /> {\n // Define grid dimensions\n const gridWidth = 16.5;\n const gridHeight = 9;\n const hexagonsInWidth = 23;\n const hexagonsInHeight = 18;\n\n // Create hexagonal grid parameters\n const hexGridOptions = new HexagonsInGridDto();\n hexGridOptions.width = gridWidth;\n hexGridOptions.height = gridHeight;\n hexGridOptions.nrHexagonsInWidth = hexagonsInWidth;\n hexGridOptions.nrHexagonsInHeight = hexagonsInHeight;\n hexGridOptions.flatTop = false; // Pointed-top hexagons\n hexGridOptions.extendTop = false;\n hexGridOptions.extendBottom = false;\n hexGridOptions.extendLeft = false;\n hexGridOptions.extendRight = false;\n\n // Generate the hexagon grid\n const hexagonWires = await bitbybit.occt.shapes.wire.hexagonsInGrid(hexGridOptions);\n\n // Create a boundary rectangle for reference\n const boundaryOptions = new RectangleDto();\n boundaryOptions.width = gridWidth;\n boundaryOptions.length = gridHeight;\n boundaryOptions.center = [0, 0, 0] as Point3;\n boundaryOptions.direction = [0, 1, 0] as Vector3;\n\n const boundaryWire = await bitbybit.occt.shapes.wire.createRectangleWire(boundaryOptions);\n\n // Draw the hexagon grid and boundary\n bitbybit.draw.drawAnyAsync({ entity: hexagonWires });\n bitbybit.draw.drawAnyAsync({ entity: boundaryWire });\n}\n\n// Execute the function\nstart();","version":"0.21.0","type":"typescript"}} + script={{"script":"const { HexagonsInGridDto, RectangleDto } = Bit.Inputs.OCCT;\n// Import required types\ntype TopoDSWirePointer = Bit.Inputs.OCCT.TopoDSWirePointer;\ntype Point3 = Bit.Inputs.Base.Point3;\ntype Vector3 = Bit.Inputs.Base.Vector3;\n\n// Define the main function\nconst start = async () => {\n // Define grid dimensions\n const gridWidth = 16.5;\n const gridHeight = 9;\n const hexagonsInWidth = 23;\n const hexagonsInHeight = 18;\n\n // Create hexagonal grid parameters\n const hexGridOptions = new HexagonsInGridDto();\n hexGridOptions.width = gridWidth;\n hexGridOptions.height = gridHeight;\n hexGridOptions.nrHexagonsInWidth = hexagonsInWidth;\n hexGridOptions.nrHexagonsInHeight = hexagonsInHeight;\n hexGridOptions.flatTop = false; // Pointed-top hexagons\n hexGridOptions.extendTop = false;\n hexGridOptions.extendBottom = false;\n hexGridOptions.extendLeft = false;\n hexGridOptions.extendRight = false;\n\n // Generate the hexagon grid\n const hexagonWires = await bitbybit.occt.shapes.wire.hexagonsInGrid(hexGridOptions);\n\n // Create a boundary rectangle for reference\n const boundaryOptions = new RectangleDto();\n boundaryOptions.width = gridWidth;\n boundaryOptions.length = gridHeight;\n boundaryOptions.center = [0, 0, 0] as Point3;\n boundaryOptions.direction = [0, 1, 0] as Vector3;\n\n const boundaryWire = await bitbybit.occt.shapes.wire.createRectangleWire(boundaryOptions);\n\n // Draw the hexagon grid and boundary\n bitbybit.draw.drawAnyAsync({ entity: hexagonWires });\n bitbybit.draw.drawAnyAsync({ entity: boundaryWire });\n}\n\n// Execute the function\nstart();","type":"typescript"}} title="Creating hexagon grids" /> diff --git a/docs/learn/code/common/occt/shapes/wire/wire-shape-primitives.md b/docs/learn/code/common/occt/shapes/wire/wire-shape-primitives.md index 86a92a6f1..af465383a 100644 --- a/docs/learn/code/common/occt/shapes/wire/wire-shape-primitives.md +++ b/docs/learn/code/common/occt/shapes/wire/wire-shape-primitives.md @@ -50,21 +50,21 @@ The star wire creates beautiful star-shaped patterns with customizable rays, rad starWirestarWire000010107.83.70FALSEstarWire","version":"0.21.0","type":"blockly"}} + script={{"script":"starWirestarWire000010107.83.70FALSEstarWire","type":"blockly"}} title="Creating basic wire star primitive" /> {\n // Create a star wire with customizable parameters\n const starOptions = new StarDto();\n starOptions.center = [0, 0, 0] as Point3;\n starOptions.direction = [0, 1, 0] as Vector3;\n starOptions.numRays = 10;\n starOptions.outerRadius = 7.8;\n starOptions.innerRadius = 3.7;\n starOptions.offsetOuterEdges = 0;\n starOptions.half = false;\n\n const starWire = await wire.createStarWire(starOptions);\n\n // Draw the created star wire\n bitbybit.draw.drawAnyAsync({ entity: starWire });\n}\n\n// Execute the function\nstart();","version":"0.21.0","type":"typescript"}} + script={{"script":"// Import required DTOs and types for star wire creation\nconst { StarDto } = Bit.Inputs.OCCT;\ntype Point3 = Bit.Inputs.Base.Point3;\ntype Vector3 = Bit.Inputs.Base.Vector3;\n\n// Get access to OCCT wire creation functions\nconst { wire } = bitbybit.occt.shapes;\n\n// Define the main function to create a star wire\nconst start = async () => {\n // Create a star wire with customizable parameters\n const starOptions = new StarDto();\n starOptions.center = [0, 0, 0] as Point3;\n starOptions.direction = [0, 1, 0] as Vector3;\n starOptions.numRays = 10;\n starOptions.outerRadius = 7.8;\n starOptions.innerRadius = 3.7;\n starOptions.offsetOuterEdges = 0;\n starOptions.half = false;\n\n const starWire = await wire.createStarWire(starOptions);\n\n // Draw the created star wire\n bitbybit.draw.drawAnyAsync({ entity: starWire });\n}\n\n// Execute the function\nstart();","type":"typescript"}} title="Creating basic wire star primitive" /> @@ -86,21 +86,21 @@ The Christmas tree wire creates detailed tree-like structures perfect for season christmasTreeWirechristmasTreeWire61.53511FALSE0000010christmasTreeWire","version":"0.21.0","type":"blockly"}} + script={{"script":"christmasTreeWirechristmasTreeWire61.53511FALSE0000010christmasTreeWire","type":"blockly"}} title="Creating basic wire primitive of christmass tree" /> {\n // Create a Christmas tree wire with customizable parameters\n const treeOptions = new ChristmasTreeDto();\n treeOptions.height = 6;\n treeOptions.innerDist = 1.5;\n treeOptions.outerDist = 3;\n treeOptions.nrSkirts = 5;\n treeOptions.trunkHeight = 1;\n treeOptions.trunkWidth = 1;\n treeOptions.half = false;\n treeOptions.rotation = 0;\n treeOptions.origin = [0, 0, 0] as Point3;\n treeOptions.direction = [0, 1, 0] as Vector3;\n\n const christmasTreeWire = await wire.createChristmasTreeWire(treeOptions);\n\n // Draw the created Christmas tree wire\n bitbybit.draw.drawAnyAsync({ entity: christmasTreeWire });\n}\n\n// Execute the function\nstart();","version":"0.21.0","type":"typescript"}} + script={{"script":"// Import required DTOs and types for Christmas tree wire creation\nconst { ChristmasTreeDto } = Bit.Inputs.OCCT;\ntype Point3 = Bit.Inputs.Base.Point3;\ntype Vector3 = Bit.Inputs.Base.Vector3;\n\n// Get access to OCCT wire creation functions\nconst { wire } = bitbybit.occt.shapes;\n\n// Define the main function to create a Christmas tree wire\nconst start = async () => {\n // Create a Christmas tree wire with customizable parameters\n const treeOptions = new ChristmasTreeDto();\n treeOptions.height = 6;\n treeOptions.innerDist = 1.5;\n treeOptions.outerDist = 3;\n treeOptions.nrSkirts = 5;\n treeOptions.trunkHeight = 1;\n treeOptions.trunkWidth = 1;\n treeOptions.half = false;\n treeOptions.rotation = 0;\n treeOptions.origin = [0, 0, 0] as Point3;\n treeOptions.direction = [0, 1, 0] as Vector3;\n\n const christmasTreeWire = await wire.createChristmasTreeWire(treeOptions);\n\n // Draw the created Christmas tree wire\n bitbybit.draw.drawAnyAsync({ entity: christmasTreeWire });\n}\n\n// Execute the function\nstart();","type":"typescript"}} title="Creating basic wire primitive of christmass tree" /> @@ -122,21 +122,21 @@ The heart wire creates elegant heart-shaped curves, perfect for decorative appli heartWireheartWire00001008heartWire","version":"0.21.0","type":"blockly"}} + script={{"script":"heartWireheartWire00001008heartWire","type":"blockly"}} title="Creating basic wire primitive of heart" /> {\n // Create a heart wire with customizable parameters\n const heartOptions = new Heart2DDto();\n heartOptions.center = [0, 0, 0] as Point3;\n heartOptions.direction = [0, 1, 0] as Vector3;\n heartOptions.rotation = 0;\n heartOptions.sizeApprox = 8;\n\n const heartWire = await wire.createHeartWire(heartOptions);\n\n // Draw the created heart wire\n bitbybit.draw.drawAnyAsync({ entity: heartWire });\n}\n\n// Execute the function\nstart();","version":"0.21.0","type":"typescript"}} + script={{"script":"// Import required DTOs and types for heart wire creation\nconst { Heart2DDto } = Bit.Inputs.OCCT;\ntype Point3 = Bit.Inputs.Base.Point3;\ntype Vector3 = Bit.Inputs.Base.Vector3;\n\n// Get access to OCCT wire creation functions\nconst { wire } = bitbybit.occt.shapes;\n\n// Define the main function to create a heart wire\nconst start = async () => {\n // Create a heart wire with customizable parameters\n const heartOptions = new Heart2DDto();\n heartOptions.center = [0, 0, 0] as Point3;\n heartOptions.direction = [0, 1, 0] as Vector3;\n heartOptions.rotation = 0;\n heartOptions.sizeApprox = 8;\n\n const heartWire = await wire.createHeartWire(heartOptions);\n\n // Draw the created heart wire\n bitbybit.draw.drawAnyAsync({ entity: heartWire });\n}\n\n// Execute the function\nstart();","type":"typescript"}} title="Creating basic wire primitive of heart" /> @@ -156,21 +156,21 @@ The L-polygon wire creates precise L-shaped structures essential for architectur lPolygonWirelPolygonWire3537'outside'0000010lPolygonWire","version":"0.21.0","type":"blockly"}} + script={{"script":"lPolygonWirelPolygonWire3537'outside'0000010lPolygonWire","type":"blockly"}} title="Creating basic wire primitive of L polygon" /> {\n // Create an L polygon wire with customizable parameters\n const lPolygonOptions = new LPolygonDto();\n lPolygonOptions.widthFirst = 3;\n lPolygonOptions.lengthFirst = 5;\n lPolygonOptions.widthSecond = 3;\n lPolygonOptions.lengthSecond = 7;\n lPolygonOptions.align = directionEnum.outside;\n lPolygonOptions.rotation = 0;\n lPolygonOptions.center = [0, 0, 0] as Point3;\n lPolygonOptions.direction = [0, 1, 0] as Vector3;\n\n const lPolygonWire = await wire.createLPolygonWire(lPolygonOptions);\n\n // Draw the created L polygon wire\n bitbybit.draw.drawAnyAsync({ entity: lPolygonWire });\n}\n\n// Execute the function\nstart();","version":"0.21.0","type":"typescript"}} + script={{"script":"// Import required DTOs and types for L polygon wire creation\nconst { LPolygonDto, directionEnum } = Bit.Inputs.OCCT;\ntype Point3 = Bit.Inputs.Base.Point3;\ntype Vector3 = Bit.Inputs.Base.Vector3;\n\n// Get access to OCCT wire creation functions\nconst { wire } = bitbybit.occt.shapes;\n\n// Define the main function to create an L polygon wire\nconst start = async () => {\n // Create an L polygon wire with customizable parameters\n const lPolygonOptions = new LPolygonDto();\n lPolygonOptions.widthFirst = 3;\n lPolygonOptions.lengthFirst = 5;\n lPolygonOptions.widthSecond = 3;\n lPolygonOptions.lengthSecond = 7;\n lPolygonOptions.align = directionEnum.outside;\n lPolygonOptions.rotation = 0;\n lPolygonOptions.center = [0, 0, 0] as Point3;\n lPolygonOptions.direction = [0, 1, 0] as Vector3;\n\n const lPolygonWire = await wire.createLPolygonWire(lPolygonOptions);\n\n // Draw the created L polygon wire\n bitbybit.draw.drawAnyAsync({ entity: lPolygonWire });\n}\n\n// Execute the function\nstart();","type":"typescript"}} title="Creating basic wire primitive of L polygon" /> diff --git a/docs/learn/code/common/occt/shapes/wire/wire-via-points.md b/docs/learn/code/common/occt/shapes/wire/wire-via-points.md index da02562fc..91a08f69e 100644 --- a/docs/learn/code/common/occt/shapes/wire/wire-via-points.md +++ b/docs/learn/code/common/occt/shapes/wire/wire-via-points.md @@ -75,21 +75,21 @@ This example demonstrates all major methods for creating wires from points, show point1point2point3point4point5pointsListlineWirepolylineWirepolygonWireinterpolatedWireinterpolatedPeriodicWirebezierWirebsplineWirepoint1-400point2-201point300-1point4202point5400pointsListpoint1point2point3point4point5lineWirepoint1point5polylineWirepointsList010polygonWirepointsList020interpolatedWirepointsListFALSE1e-7030interpolatedPeriodicWirepointsListTRUE1e-7040bezierWirepointsList050bsplineWirepointsListFALSE3060lineWirepolylineWirepolygonWireinterpolatedWireinterpolatedPeriodicWirebezierWirebsplineWire","version":"0.21.0","type":"blockly"}} + script={{"script":"point1point2point3point4point5pointsListlineWirepolylineWirepolygonWireinterpolatedWireinterpolatedPeriodicWirebezierWirebsplineWirepoint1-400point2-201point300-1point4202point5400pointsListpoint1point2point3point4point5lineWirepoint1point5polylineWirepointsList010polygonWirepointsList020interpolatedWirepointsListFALSE1e-7030interpolatedPeriodicWirepointsListTRUE1e-7040bezierWirepointsList050bsplineWirepointsListFALSE3060lineWirepolylineWirepolygonWireinterpolatedWireinterpolatedPeriodicWirebezierWirebsplineWire","type":"blockly"}} title="Comprehensive wire creation from points" /> {\n // Define a set of control points for wire creation\n const points: Point3[] = [\n [-4, 0, 0], // Start point\n [-2, 0, 1], // First control point\n [0, 0, -1], // Second control point\n [2, 0, 2], // Third control point\n [4, 0, 0] // End point\n ];\n\n // 1. Create a simple line wire between first and last points\n const lineOptions = new LineDto();\n lineOptions.start = points[0];\n lineOptions.end = points[4];\n const lineWire = await wire.createLineWire(lineOptions);\n\n // 2. Create a polyline wire connecting all points with straight segments\n const polylineOptions = new PolylineDto();\n polylineOptions.points = points;\n const polylineWire = await wire.createPolylineWire(polylineOptions);\n\n // 3. Create a polygon wire (closed shape) from the points\n const polygonOptions = new PolygonDto();\n polygonOptions.points = points;\n const polygonWire = await wire.createPolygonWire(polygonOptions);\n\n // 4. Create an interpolated wire that passes smoothly through all points\n const interpolationOptions = new InterpolationDto();\n interpolationOptions.points = points;\n interpolationOptions.periodic = false;\n interpolationOptions.tolerance = 1e-7;\n const interpolatedWire = await wire.interpolatePoints(interpolationOptions);\n\n // 5. Create an interpolated periodic wire that creates a closed smooth curve\n const interpolationPeriodicOptions = new InterpolationDto();\n interpolationPeriodicOptions.points = points;\n interpolationPeriodicOptions.periodic = true;\n interpolationPeriodicOptions.tolerance = 1e-7;\n const interpolatedPeriodicWire = await wire.interpolatePoints(interpolationPeriodicOptions);\n\n // 6. Create a Bezier curve using points as control points\n const bezierOptions = new BezierDto();\n bezierOptions.points = points;\n bezierOptions.closed = false;\n const bezierWire = await wire.createBezier(bezierOptions);\n\n // 7. Create a BSpline curve with specified degree\n const bsplineOptions = new BSplineDto();\n bsplineOptions.points = points;\n bsplineOptions.closed = false;\n const bsplineWire = await wire.createBSpline(bsplineOptions);\n\n // Translate wires to different Y positions for better visualization\n const translateOptions = new TranslateDto();\n\n // Translate polyline\n translateOptions.shape = polylineWire;\n translateOptions.translation = [0, 1, 0] as Vector3;\n const translatedPolyline = await transforms.translate(translateOptions);\n\n // Translate polygon\n translateOptions.shape = polygonWire;\n translateOptions.translation = [0, 2, 0] as Vector3;\n const translatedPolygon = await transforms.translate(translateOptions);\n\n // Translate interpolated wire\n translateOptions.shape = interpolatedWire;\n translateOptions.translation = [0, 3, 0] as Vector3;\n const translatedInterpolated = await transforms.translate(translateOptions);\n\n // Translate interpolated periodic wire\n translateOptions.shape = interpolatedPeriodicWire;\n translateOptions.translation = [0, 4, 0] as Vector3;\n const translatedInterpolatedPeriodic = await transforms.translate(translateOptions);\n\n // Translate Bezier wire\n translateOptions.shape = bezierWire;\n translateOptions.translation = [0, 5, 0] as Vector3;\n const translatedBezier = await transforms.translate(translateOptions);\n\n // Translate BSpline wire\n translateOptions.shape = bsplineWire;\n translateOptions.translation = [0, 6, 0] as Vector3;\n const translatedBSpline = await transforms.translate(translateOptions);\n\n // Draw all the created wires\n bitbybit.draw.drawAnyAsync({ entity: lineWire });\n bitbybit.draw.drawAnyAsync({ entity: translatedPolyline });\n bitbybit.draw.drawAnyAsync({ entity: translatedPolygon });\n bitbybit.draw.drawAnyAsync({ entity: translatedInterpolated });\n bitbybit.draw.drawAnyAsync({ entity: translatedInterpolatedPeriodic });\n bitbybit.draw.drawAnyAsync({ entity: translatedBezier });\n bitbybit.draw.drawAnyAsync({ entity: translatedBSpline });\n}\n\n// Execute the function\nstart();","version":"0.21.0","type":"typescript"}} + script={{"script":"// Import required DTOs and types for wire creation\nconst { LineDto, PolylineDto, PolygonDto, InterpolationDto, BezierDto, BSplineDto, TranslateDto } = Bit.Inputs.OCCT;\ntype Point3 = Bit.Inputs.Base.Point3;\ntype Vector3 = Bit.Inputs.Base.Vector3;\ntype TopoDSShapePointer = Bit.Inputs.OCCT.TopoDSShapePointer;\n\n// Get access to OCCT wire creation and transform functions\nconst { wire } = bitbybit.occt.shapes;\nconst { transforms } = bitbybit.occt;\n\n// Define the main function to demonstrate various wire creation methods\nconst start = async () => {\n // Define a set of control points for wire creation\n const points: Point3[] = [\n [-4, 0, 0], // Start point\n [-2, 0, 1], // First control point\n [0, 0, -1], // Second control point\n [2, 0, 2], // Third control point\n [4, 0, 0] // End point\n ];\n\n // 1. Create a simple line wire between first and last points\n const lineOptions = new LineDto();\n lineOptions.start = points[0];\n lineOptions.end = points[4];\n const lineWire = await wire.createLineWire(lineOptions);\n\n // 2. Create a polyline wire connecting all points with straight segments\n const polylineOptions = new PolylineDto();\n polylineOptions.points = points;\n const polylineWire = await wire.createPolylineWire(polylineOptions);\n\n // 3. Create a polygon wire (closed shape) from the points\n const polygonOptions = new PolygonDto();\n polygonOptions.points = points;\n const polygonWire = await wire.createPolygonWire(polygonOptions);\n\n // 4. Create an interpolated wire that passes smoothly through all points\n const interpolationOptions = new InterpolationDto();\n interpolationOptions.points = points;\n interpolationOptions.periodic = false;\n interpolationOptions.tolerance = 1e-7;\n const interpolatedWire = await wire.interpolatePoints(interpolationOptions);\n\n // 5. Create an interpolated periodic wire that creates a closed smooth curve\n const interpolationPeriodicOptions = new InterpolationDto();\n interpolationPeriodicOptions.points = points;\n interpolationPeriodicOptions.periodic = true;\n interpolationPeriodicOptions.tolerance = 1e-7;\n const interpolatedPeriodicWire = await wire.interpolatePoints(interpolationPeriodicOptions);\n\n // 6. Create a Bezier curve using points as control points\n const bezierOptions = new BezierDto();\n bezierOptions.points = points;\n bezierOptions.closed = false;\n const bezierWire = await wire.createBezier(bezierOptions);\n\n // 7. Create a BSpline curve with specified degree\n const bsplineOptions = new BSplineDto();\n bsplineOptions.points = points;\n bsplineOptions.closed = false;\n const bsplineWire = await wire.createBSpline(bsplineOptions);\n\n // Translate wires to different Y positions for better visualization\n const translateOptions = new TranslateDto();\n\n // Translate polyline\n translateOptions.shape = polylineWire;\n translateOptions.translation = [0, 1, 0] as Vector3;\n const translatedPolyline = await transforms.translate(translateOptions);\n\n // Translate polygon\n translateOptions.shape = polygonWire;\n translateOptions.translation = [0, 2, 0] as Vector3;\n const translatedPolygon = await transforms.translate(translateOptions);\n\n // Translate interpolated wire\n translateOptions.shape = interpolatedWire;\n translateOptions.translation = [0, 3, 0] as Vector3;\n const translatedInterpolated = await transforms.translate(translateOptions);\n\n // Translate interpolated periodic wire\n translateOptions.shape = interpolatedPeriodicWire;\n translateOptions.translation = [0, 4, 0] as Vector3;\n const translatedInterpolatedPeriodic = await transforms.translate(translateOptions);\n\n // Translate Bezier wire\n translateOptions.shape = bezierWire;\n translateOptions.translation = [0, 5, 0] as Vector3;\n const translatedBezier = await transforms.translate(translateOptions);\n\n // Translate BSpline wire\n translateOptions.shape = bsplineWire;\n translateOptions.translation = [0, 6, 0] as Vector3;\n const translatedBSpline = await transforms.translate(translateOptions);\n\n // Draw all the created wires\n bitbybit.draw.drawAnyAsync({ entity: lineWire });\n bitbybit.draw.drawAnyAsync({ entity: translatedPolyline });\n bitbybit.draw.drawAnyAsync({ entity: translatedPolygon });\n bitbybit.draw.drawAnyAsync({ entity: translatedInterpolated });\n bitbybit.draw.drawAnyAsync({ entity: translatedInterpolatedPeriodic });\n bitbybit.draw.drawAnyAsync({ entity: translatedBezier });\n bitbybit.draw.drawAnyAsync({ entity: translatedBSpline });\n}\n\n// Execute the function\nstart();","type":"typescript"}} title="Comprehensive wire creation from points" /> diff --git a/docs/learn/getting-started/basics/assets/local/gltf.mdx b/docs/learn/getting-started/basics/assets/local/gltf.mdx index 324ca0908..ac8695374 100644 --- a/docs/learn/getting-started/basics/assets/local/gltf.mdx +++ b/docs/learn/getting-started/basics/assets/local/gltf.mdx @@ -59,7 +59,7 @@ Your Rete graph should now look similar to the setup in the embedded editor belo **Rete Editor Example:** @@ -101,7 +101,7 @@ After assembling the blocks, click "Run". You should see the BoomBox model. **Blockly Editor Example:** TRUEBoomBoxFALSE","version":"0.21.0","type":"blockly"}} + script={{"script":"TRUEBoomBoxFALSE","type":"blockly"}} title="Bitbybit Blockly Editor - Using Local glTF Asset" description="Upload local asset from tutorial named accordingly and it will appear in 3D scene after you hit run." /> @@ -126,7 +126,7 @@ Here's the example code, which should be fairly self-explanatory for those famil **TypeScript Editor Example:** {\n bitbybit.babylon.scene.useRightHandedSystem({\n use: true,\n });\n const file = await bitbybit.asset.getLocalFile({\n fileName: \"BoomBox\"\n }) as File;\n await bitbybit.babylon.io.loadAssetIntoScene({\n assetFile: file,\n hidden: false\n });\n}\n\nstart();\n","version":"0.21.0","type":"typescript"}} + script={{"script":"const start = async () => {\n bitbybit.babylon.scene.useRightHandedSystem({\n use: true,\n });\n const file = await bitbybit.asset.getLocalFile({\n fileName: \"BoomBox\"\n }) as File;\n await bitbybit.babylon.io.loadAssetIntoScene({\n assetFile: file,\n hidden: false\n });\n}\n\nstart();\n","type":"typescript"}} title="Bitbybit Blockly Editor - Using Local glTF Asset" description="Upload local asset from tutorial named accordingly and it will appear in 3D scene after you hit run." /> diff --git a/docs/learn/getting-started/basics/assets/local/step.mdx b/docs/learn/getting-started/basics/assets/local/step.mdx index 2dc2d9cf8..b36fd5688 100644 --- a/docs/learn/getting-started/basics/assets/local/step.mdx +++ b/docs/learn/getting-started/basics/assets/local/step.mdx @@ -54,7 +54,7 @@ That's it! Your Rete graph should be set up. It might take a moment for the Kuka **Rete Editor Example:** @@ -95,7 +95,7 @@ After assembling the blocks, click "Run". **Blockly Editor Example:** KukaRobotTRUE","version":"0.21.0","type":"blockly"}} + script={{"script":"KukaRobotTRUE","type":"blockly"}} title="Bitbybit Blockly Editor - Using Local STEP Asset" description="Upload local asset from tutorial named accordingly and it will appear in 3D scene after you hit run." /> @@ -122,7 +122,7 @@ Here's an example of how to do that: **TypeScript Editor Example:** {\n\n const file = await bitbybit.asset.getLocalFile({\n fileName: \"KukaRobot\"\n }) as File;\n\n const shape = await bitbybit.occt.io.loadSTEPorIGES({\n assetFile: file,\n adjustZtoY: true,\n });\n\n bitbybit.draw.drawAnyAsync({\n entity: shape\n })\n}\n\nstart();\n","version":"0.21.0","type":"typescript"}} + script={{"script":"const start = async () => {\n\n const file = await bitbybit.asset.getLocalFile({\n fileName: \"KukaRobot\"\n }) as File;\n\n const shape = await bitbybit.occt.io.loadSTEPorIGES({\n assetFile: file,\n adjustZtoY: true,\n });\n\n bitbybit.draw.drawAnyAsync({\n entity: shape\n })\n}\n\nstart();\n","type":"typescript"}} title="Bitbybit TypeScript Editor - Using Local STEP Asset" description="Upload local asset from tutorial named accordingly and it will appear in 3D scene after you hit run." /> diff --git a/docs/learn/getting-started/blockly/hello-world.mdx b/docs/learn/getting-started/blockly/hello-world.mdx index 45eaae9e5..8fe297b8b 100644 --- a/docs/learn/getting-started/blockly/hello-world.mdx +++ b/docs/learn/getting-started/blockly/hello-world.mdx @@ -56,7 +56,7 @@ Your setup should resemble this interactive example: Hello World!'Aboreto''Regular'1.50.20000010'leftTop'","version":"0.21.0","type":"blockly"}} + script={{"script":"Hello World!'Aboreto''Regular'1.50.20000010'leftTop'","type":"blockly"}} title="Draw 3D Text" description="Draws the text on the screen." /> @@ -88,7 +88,7 @@ After completing these steps, your Blockly script should look similar to this: 40040010100.450.50.5FALSE#ffffff#ffffffHello World!'Roboto''Regular'1.50.2-9000000-1'centerBottom'","version":"0.21.0","type":"blockly"}} + script={{"script":"40040010100.450.50.5FALSE#ffffff#ffffffHello World!'Roboto''Regular'1.50.2-9000000-1'centerBottom'","type":"blockly"}} title="Draw 3D text and grid" description="Draws 3D text and the grid on the screen. Text is placed in better orientation." /> diff --git a/docs/learn/getting-started/blockly/parametric-cube.mdx b/docs/learn/getting-started/blockly/parametric-cube.mdx index c8dfadb48..4b38518a6 100644 --- a/docs/learn/getting-started/blockly/parametric-cube.mdx +++ b/docs/learn/getting-started/blockly/parametric-cube.mdx @@ -69,7 +69,7 @@ Your Blockly workspace should now look something like this interactive example: sizesize3size000","version":"0.21.0","type":"blockly"}} + script={{"script":"sizesize3size000","type":"blockly"}} title="Parametric cube example" description="Draws the parametrically controlled cube." /> diff --git a/docs/learn/getting-started/engines/_category_.json b/docs/learn/getting-started/engines/_category_.json new file mode 100644 index 000000000..71313548f --- /dev/null +++ b/docs/learn/getting-started/engines/_category_.json @@ -0,0 +1,10 @@ +{ + "label": "Game Engines", + "position": 7, + "link": { + "type": "generated-index", + "title": "Getting Started with Game Engines", + "description": "Choose your preferred 3D game engine and learn how to integrate Bitbybit's CAD capabilities. We support BabylonJS, ThreeJS, and PlayCanvas.", + "slug": "/getting-started/engines" + } +} diff --git a/docs/learn/getting-started/engines/babylonjs.mdx b/docs/learn/getting-started/engines/babylonjs.mdx new file mode 100644 index 000000000..b95e2265e --- /dev/null +++ b/docs/learn/getting-started/engines/babylonjs.mdx @@ -0,0 +1,112 @@ +--- +sidebar_position: 1 +title: "Getting Started with BabylonJS" +sidebar_label: "BabylonJS" +description: "Get started with Bitbybit and BabylonJS - our fully integrated 3D game engine. Learn about integration approaches including visual editors, NPM packages, and runners." +tags: [getting-started, babylonjs] +--- + +import Admonition from '@theme/Admonition'; + +# Getting Started with BabylonJS + +BabylonJS Logo + +BabylonJS is a powerful, open-source game and rendering engine for the web. It's also the native rendering engine for all Bitbybit visual programming editors, which means you get the most complete integration experience with this engine. + +**Official homepage:** babylonjs.com + +--- + +## Three Ways to Use BabylonJS with Bitbybit + +### 1. Visual Editors (No Setup Required) + +The easiest way to get started. Just open one of our online editors and start building: + +- **Rete Editor** - Connect visual nodes to create parametric 3D models. If you've used Grasshopper, Dynamo, or Blender Nodes, this will feel familiar. + +- **Blockly Editor** - Drag and drop blocks to build 3D models. Great for beginners and educational settings. + +- **Monaco Editor** - Write TypeScript code directly in your browser with full intellisense. + +Scripts created in any of these editors can be exported as JavaScript and run on your own website using Bitbybit Runners. + +--- + +### 2. NPM Packages (For Developers) + +If you're building a production application or prefer working with TypeScript in your own development environment, use our NPM packages. + +The quickest way to start a new project: + +```bash +npx @bitbybit-dev/create-app my-project --engine babylonjs +cd my-project +npm install +npm run dev +``` + +This creates a ready-to-run project with Vite, TypeScript, and all three CAD kernels (OCCT, JSCAD, Manifold) pre-configured. + +NPM packages give you full TypeScript support with intellisense, optimized bundle sizes through tree-shaking, and are the recommended approach for production applications. + +Note that NPM packages only include our open-source algorithms. To understand which parts of Bitbybit are open-source and which are not, see our [Open Source Approach](/learn/open-source-approach) guide. + +**Detailed setup guide:** [Quick Start with BabylonJS](/learn/npm-packages/babylonjs/start-with-babylon-js) + +--- + +### 3. Runners (Quick Prototypes) + +Runners are single JavaScript files that bundle everything you need. They're perfect when you want to quickly prototype something without setting up a build environment. + +**Full Runner** - Includes both BabylonJS and Bitbybit in one file: + +```html + +``` + +**Lite Runner** - Just Bitbybit, you load BabylonJS separately (smaller download): + +```html + + +``` + +Runners work great for demos on CodePen, JSFiddle, or StackBlitz. However, they only support JavaScript (no TypeScript) and have larger bundle sizes, so NPM packages are better for production work. + +**Learn more:** [Introduction to Runners](/learn/runners/intro) - Understand runner capabilities, limitations, and how to export visual scripts as JavaScript. + +**Runner guides:** [Full Runner](/learn/runners/engines/babylonjs/full-runner) | [Lite Runner](/learn/runners/engines/babylonjs/lite-runner) + +--- + +## NPM vs Runners - Which Should I Use? + +**Choose NPM packages** when you're building something for production, want TypeScript support, or need optimized bundle sizes. + +**Choose Runners** when you're prototyping, creating quick demos, or just want to experiment without any setup. + +--- + +## Next Steps + +If you're new to 3D programming, start with the Rete Editor to get familiar with the concepts visually. + +If you're a developer ready to build, run the NPX command above and check out the [starter template guide](/learn/npm-packages/babylonjs/start-with-babylon-js). + +If you want to understand BabylonJS better, read [About BabylonJS](/learn/npm-packages/babylonjs/about-babylonjs) for a deeper look at the engine's capabilities. + +--- + +## Resources + +- [About BabylonJS](/learn/npm-packages/babylonjs/about-babylonjs) - Engine overview and features +- [NPM Package](https://www.npmjs.com/package/@bitbybit-dev/babylonjs) +- [GitHub Examples](https://github.com/bitbybit-dev/bitbybit/tree/master/examples/vite/babylonjs) +- [BabylonJS Documentation](https://doc.babylonjs.com/) diff --git a/docs/learn/getting-started/engines/playcanvas.mdx b/docs/learn/getting-started/engines/playcanvas.mdx new file mode 100644 index 000000000..8ab82545f --- /dev/null +++ b/docs/learn/getting-started/engines/playcanvas.mdx @@ -0,0 +1,107 @@ +--- +sidebar_position: 3 +title: "Getting Started with PlayCanvas" +sidebar_label: "PlayCanvas" +description: "Get started with Bitbybit and PlayCanvas - a powerful WebGL game engine. Learn about NPM packages and runners integration approaches." +tags: [getting-started, playcanvas] +--- + +import Admonition from '@theme/Admonition'; + +# Getting Started with PlayCanvas + +PlayCanvas Logo + +PlayCanvas is a high-performance WebGL game engine known for its speed and mobile optimization. It features an open-source engine (MIT licensed) and is particularly well-suited for interactive 3D experiences that need to run smoothly across devices. + +**Official homepage:** playcanvas.com + + +Our visual programming editors (Rete, Blockly, Monaco) use BabylonJS as their rendering engine. For PlayCanvas, you'll work with NPM packages or Runners directly. + + +--- + +## Two Ways to Use PlayCanvas with Bitbybit + +### 1. NPM Packages (Recommended) + +If you're building a production application or prefer working with TypeScript, use our NPM packages. + +The quickest way to start a new project: + +```bash +npx @bitbybit-dev/create-app my-project --engine playcanvas +cd my-project +npm install +npm run dev +``` + +This creates a ready-to-run project with Vite, TypeScript, and all three CAD kernels (OCCT, JSCAD, Manifold) pre-configured. + +NPM packages give you full TypeScript support with intellisense, optimized bundle sizes through tree-shaking, and are the recommended approach for production applications. + +Note that NPM packages only include our open-source algorithms. To understand which parts of Bitbybit are open-source and which are not, see our [Open Source Approach](/learn/open-source-approach) guide. + +**Detailed setup guide:** [Quick Start with PlayCanvas](/learn/npm-packages/playcanvas/start-with-playcanvas) + +--- + +### 2. Runners (Quick Prototypes) + +Runners are single JavaScript files that bundle everything you need. They're perfect when you want to quickly prototype something without setting up a build environment. + +**Full Runner** - Includes both PlayCanvas and Bitbybit in one file: + +```html + +``` + +**Lite Runner** - Just Bitbybit, you load PlayCanvas separately (smaller download): + +```html + + +``` + +Runners work great for demos on CodePen, JSFiddle, or StackBlitz. However, they only support JavaScript (no TypeScript) and have larger bundle sizes, so NPM packages are better for production work. + +**Learn more:** [Introduction to Runners](/learn/runners/intro) - Understand runner capabilities, limitations, and how to export visual scripts as JavaScript. + +**Runner guides:** [Full Runner](/learn/runners/engines/playcanvas/full-runner) | [Lite Runner](/learn/runners/engines/playcanvas/lite-runner) + +--- + +## NPM vs Runners - Which Should I Use? + +**Choose NPM packages** when you're building something for production, want TypeScript support, or need optimized bundle sizes. + +**Choose Runners** when you're prototyping, creating quick demos, or just want to experiment without any setup. + +--- + +## What About Visual Editors? + +Our visual editors use BabylonJS for rendering, but the CAD algorithms are engine-agnostic. This means you can prototype ideas in our visual editors, export the script, and adapt it for PlayCanvas. The Bitbybit API is largely the same across engines - the main differences are in initialization and drawing functions. + +--- + +## Next Steps + +If you're ready to build, run the NPX command above and check out the [starter template guide](/learn/npm-packages/playcanvas/start-with-playcanvas). + +If you want to understand PlayCanvas better, read [About PlayCanvas](/learn/npm-packages/playcanvas/about-playcanvas) for a deeper look at the engine's capabilities. + +--- + +## Resources + +- [About PlayCanvas](/learn/npm-packages/playcanvas/about-playcanvas) - Engine overview and features +- [NPM Package](https://www.npmjs.com/package/@bitbybit-dev/playcanvas) +- [GitHub Examples](https://github.com/bitbybit-dev/bitbybit/tree/master/examples/vite/playcanvas) +- [PlayCanvas Documentation](https://developer.playcanvas.com/) +- [PlayCanvas Examples](https://playcanvas.github.io/) diff --git a/docs/learn/getting-started/engines/threejs.mdx b/docs/learn/getting-started/engines/threejs.mdx new file mode 100644 index 000000000..62034a73e --- /dev/null +++ b/docs/learn/getting-started/engines/threejs.mdx @@ -0,0 +1,107 @@ +--- +sidebar_position: 2 +title: "Getting Started with ThreeJS" +sidebar_label: "ThreeJS" +description: "Get started with Bitbybit and ThreeJS - the world's most popular WebGL library. Learn about NPM packages and runners integration approaches." +tags: [getting-started, threejs] +--- + +import Admonition from '@theme/Admonition'; + +# Getting Started with ThreeJS + +ThreeJS Logo + +ThreeJS is a popular JavaScript library for creating 3D graphics in the browser. It provides a simpler API on top of WebGL and has a huge community with countless examples and resources. + +**Official homepage:** threejs.org + + +Our visual programming editors (Rete, Blockly, Monaco) use BabylonJS as their rendering engine. For ThreeJS, you'll work with NPM packages or Runners directly. + + +--- + +## Two Ways to Use ThreeJS with Bitbybit + +### 1. NPM Packages (Recommended) + +If you're building a production application or prefer working with TypeScript, use our NPM packages. + +The quickest way to start a new project: + +```bash +npx @bitbybit-dev/create-app my-project --engine threejs +cd my-project +npm install +npm run dev +``` + +This creates a ready-to-run project with Vite, TypeScript, and all three CAD kernels (OCCT, JSCAD, Manifold) pre-configured. + +NPM packages give you full TypeScript support with intellisense, optimized bundle sizes through tree-shaking, and are the recommended approach for production applications. + +Note that NPM packages only include our open-source algorithms. To understand which parts of Bitbybit are open-source and which are not, see our [Open Source Approach](/learn/open-source-approach) guide. + +**Detailed setup guide:** [Quick Start with ThreeJS](/learn/npm-packages/threejs/start-with-three-js) + +--- + +### 2. Runners (Quick Prototypes) + +Runners are single JavaScript files that bundle everything you need. They're perfect when you want to quickly prototype something without setting up a build environment. + +**Full Runner** - Includes both ThreeJS and Bitbybit in one file: + +```html + +``` + +**Lite Runner** - Just Bitbybit, you load ThreeJS separately (smaller download): + +```html + + +``` + +Runners work great for demos on CodePen, JSFiddle, or StackBlitz. However, they only support JavaScript (no TypeScript) and have larger bundle sizes, so NPM packages are better for production work. + +**Learn more:** [Introduction to Runners](/learn/runners/intro) - Understand runner capabilities, limitations, and how to export visual scripts as JavaScript. + +**Runner guides:** [Full Runner](/learn/runners/engines/threejs/full-runner) | [Lite Runner](/learn/runners/engines/threejs/lite-runner) + +--- + +## NPM vs Runners - Which Should I Use? + +**Choose NPM packages** when you're building something for production, want TypeScript support, or need optimized bundle sizes. + +**Choose Runners** when you're prototyping, creating quick demos, or just want to experiment without any setup. + +--- + +## What About Visual Editors? + +Our visual editors use BabylonJS for rendering, but the CAD algorithms are engine-agnostic. This means you can prototype ideas in our visual editors, export the script, and adapt it for ThreeJS. The Bitbybit API is largely the same across engines - the main differences are in initialization and drawing functions. + +--- + +## Next Steps + +If you're ready to build, run the NPX command above and check out the [starter template guide](/learn/npm-packages/threejs/start-with-three-js). + +If you want to understand ThreeJS better, read [About ThreeJS](/learn/npm-packages/threejs/about-threejs) for a deeper look at the library's capabilities. + +--- + +## Resources + +- [About ThreeJS](/learn/npm-packages/threejs/about-threejs) - Library overview and features +- [NPM Package](https://www.npmjs.com/package/@bitbybit-dev/threejs) +- [GitHub Examples](https://github.com/bitbybit-dev/bitbybit/tree/master/examples/vite/threejs) +- [ThreeJS Documentation](https://threejs.org/docs/) +- [ThreeJS Examples](https://threejs.org/examples/) diff --git a/docs/learn/getting-started/overview.md b/docs/learn/getting-started/overview.md index 518155642..69e057ce7 100644 --- a/docs/learn/getting-started/overview.md +++ b/docs/learn/getting-started/overview.md @@ -75,19 +75,29 @@ The Monaco editor provides a full code-based environment using TypeScript, aimed ## Open-Source NPM Packages (MIT Licensed) -For developers who want to integrate our core geometric algorithms and functionalities directly into their own web applications, we offer a suite of **open-source NPM packages**. Our two main game engine-based libraries are: +For developers who want to integrate our core geometric algorithms and functionalities directly into their own web applications, we offer a suite of **open-source NPM packages**. Our game engine-based libraries include: -* `@bitbybit-dev/threejs` -* `@bitbybit-dev/babylonjs` +* `@bitbybit-dev/babylonjs` - [Getting Started Guide](/learn/getting-started/engines/babylonjs) +* `@bitbybit-dev/threejs` - [Getting Started Guide](/learn/getting-started/engines/threejs) +* `@bitbybit-dev/playcanvas` - [Getting Started Guide](/learn/getting-started/engines/playcanvas) These allow you to leverage our CAD capabilities within your preferred 3D rendering environment. **Key Features & Benefits:** * **Flexibility:** Build custom 3D tools, viewers, or applications tailored to your specific needs. -* **Integration:** Seamlessly incorporate our computational geometry capabilities into your existing JavaScript or TypeScript projects using either ThreeJS or BabylonJS. +* **Integration:** Seamlessly incorporate our computational geometry capabilities into your existing JavaScript or TypeScript projects. * **Community & Control:** Leverage the power of open-source, contribute, or fork as needed. * **MIT Licensed:** All our core NPM packages are licensed under the permissive MIT license, granting you broad freedom to use, modify, and distribute your projects. + +The fastest way to get started is using our NPX scaffolding tool: +```bash +npx @bitbybit-dev/create-app my-project --engine babylonjs +# or --engine threejs +# or --engine playcanvas +``` + +

Our NPM packages provide the foundational geometric algorithms and data structures that power our platform, along with rendering integrations for ThreeJS and BabylonJS.

They generally **do not** include:

diff --git a/docs/learn/getting-started/rete/hello-world.mdx b/docs/learn/getting-started/rete/hello-world.mdx index 30dd5e632..81098bb3f 100644 --- a/docs/learn/getting-started/rete/hello-world.mdx +++ b/docs/learn/getting-started/rete/hello-world.mdx @@ -41,7 +41,7 @@ If you've done it correctly, your canvas should have the "Draw Grid Mesh" compon @@ -79,7 +79,7 @@ The setup should resemble this: @@ -109,7 +109,7 @@ Here's the final result you should aim for: diff --git a/docs/learn/getting-started/rete/parametric-cube.mdx b/docs/learn/getting-started/rete/parametric-cube.mdx index 16e6073eb..fd82c4003 100644 --- a/docs/learn/getting-started/rete/parametric-cube.mdx +++ b/docs/learn/getting-started/rete/parametric-cube.mdx @@ -44,7 +44,7 @@ We'll use the OpenCascade Technology (OCCT) geometry kernel to create our cube. @@ -69,7 +69,7 @@ If you've connected them correctly, your setup should resemble the following int diff --git a/docs/learn/getting-started/typescript/hello-world.mdx b/docs/learn/getting-started/typescript/hello-world.mdx index 0268ef33a..f958db67c 100644 --- a/docs/learn/getting-started/typescript/hello-world.mdx +++ b/docs/learn/getting-started/typescript/hello-world.mdx @@ -26,7 +26,7 @@ Check out the script below: {\n const gridOptions = new Bit.Inputs.Draw.SceneDrawGridMeshDto();\n bitbybit.draw.drawGridMesh(gridOptions);\n}\n\nstart();\n","version":"0.21.0","type":"typescript"}} + script={{"script":"const start = async () => {\n const gridOptions = new Bit.Inputs.Draw.SceneDrawGridMeshDto();\n bitbybit.draw.drawGridMesh(gridOptions);\n}\n\nstart();\n","type":"typescript"}} title="Draw the grid" description="Draws the grid mesh with lines in 3D space." /> @@ -51,7 +51,7 @@ The script below shows a working example. We've set the `rotation` to -90 degree {\n const gridOptions = new Bit.Inputs.Draw.SceneDrawGridMeshDto();\n bitbybit.draw.drawGridMesh(gridOptions);\n\n const textOpt = new Bit.Advanced.Text3D.Text3DDto();\n textOpt.text = \"Hello World!\";\n textOpt.rotation = -90;\n textOpt.originAlignment = Bit.Advanced.Text3D.recAlignmentEnum.centerBottom;\n textOpt.direction = [0, 0, -1];\n const text3D = await bitbybit.advanced.text3d.create(textOpt);\n\n bitbybit.draw.drawAnyAsync({\n entity: text3D\n });\n}\n\nstart();\n","version":"0.21.0","type":"typescript"}} + script={{"script":"const start = async () => {\n const gridOptions = new Bit.Inputs.Draw.SceneDrawGridMeshDto();\n bitbybit.draw.drawGridMesh(gridOptions);\n\n const textOpt = new Bit.Advanced.Text3D.Text3DDto();\n textOpt.text = \"Hello World!\";\n textOpt.rotation = -90;\n textOpt.originAlignment = Bit.Advanced.Text3D.recAlignmentEnum.centerBottom;\n textOpt.direction = [0, 0, -1];\n const text3D = await bitbybit.advanced.text3d.create(textOpt);\n\n bitbybit.draw.drawAnyAsync({\n entity: text3D\n });\n}\n\nstart();\n","type":"typescript"}} title="Draw the text & grid" description="Draws the grid mesh with text in 3D space." /> diff --git a/docs/learn/getting-started/typescript/how-to-code-in-monaco.md b/docs/learn/getting-started/typescript/how-to-code-in-monaco.md index 997b0b99b..bc8a4d141 100644 --- a/docs/learn/getting-started/typescript/how-to-code-in-monaco.md +++ b/docs/learn/getting-started/typescript/how-to-code-in-monaco.md @@ -197,7 +197,7 @@ start(); {\n // Step 3a: Create input objects (DTOs) and set their properties for a cube\n const cubeOptions = new CubeDto(); // Instantiate the DTO\n cubeOptions.size = 6; // Set the cube's size\n // Call the bitbybit function to create the cube, awaiting its promise\n const cube: TopoDSShapePointer = await solid.createCube(cubeOptions);\n\n // Step 3b: Create input objects (DTOs) for a sphere\n const sphereOptions = new SphereDto();\n sphereOptions.radius = 3;\n sphereOptions.center = [3, 3, -3]; // Define center as [x, y, z] coordinates\n const sphere: TopoDSShapePointer = await solid.createSphere(sphereOptions);\n\n // Step 4: Perform geometric operations\n // Example: Boolean difference (subtract sphere from cube)\n const diffOptions = new DifferenceDto(); // Generic type for the shapes involved\n diffOptions.shape = cube; // The base shape\n diffOptions.shapes = [sphere]; // An array of shapes to subtract\n const diff: TopoDSShapePointer = await booleans.difference(diffOptions);\n\n // Example: Apply fillets (round edges) to the result of the difference\n const roundingOptions = new FilletDto();\n roundingOptions.shape = diff; // The shape to fillet\n roundingOptions.radius = 1; // The radius of the fillet\n // Note: Some operations might have specific methods like 'filletEdges' for common tasks\n const solidRoundedCorners: TopoDSShapePointer = await fillets.filletEdges(roundingOptions);\n\n // Step 5: Visualize the result in the 3D viewer\n // Prepare drawing options to customize appearance\n const occtDrawOptions = new DrawOcctShapeOptions();\n occtDrawOptions.faceColour = \"#0000ff\"; // Blue faces\n occtDrawOptions.edgeColour = \"#ff00ff\"; // Magenta edges\n occtDrawOptions.edgeWidth = 5; // Width of the edges\n occtDrawOptions.precision = 0.001; // Rendering precision for complex shapes (lower is finer)\n // Draw the final shape. 'drawAnyAsync' is a versatile function for drawing various entity types.\n draw.drawAnyAsync({ entity: solidRoundedCorners, options: occtDrawOptions });\n\n // Step 6: (Optional) Adjust scene elements like lighting for better visualization\n const dirLight = new DirectionalLightDto();\n dirLight.shadowGeneratorMapSize = 2000; // Higher values for better shadow quality\n dirLight.intensity = 3; // Light intensity\n scene.drawDirectionalLight(dirLight); // Adds or updates a directional light in the scene\n\n // Step 7: (Optional) Export your model to common CAD file formats\n // Export as STEP file (a common format for solid models)\n const stepExportOptions = new SaveStepDto();\n stepExportOptions.shape = solidRoundedCorners;\n stepExportOptions.adjustYtoZ = true; // Optional: Adjusts coordinate system (Y-up to Z-up) if needed\n stepExportOptions.fileName = \"cube_with_sphere_cutout.step\";\n stepExportOptions.tryDownload = true; // Attempts to trigger a browser download of the file\n await io.saveShapeSTEP(stepExportOptions); // Use the destructured 'io'\n\n // Export as STL file (a common format for 3D printing)\n const stlExportOptions = new SaveStlDto();\n stlExportOptions.shape = solidRoundedCorners;\n stlExportOptions.adjustYtoZ = true;\n stlExportOptions.fileName = \"cube_with_sphere_cutout.stl\";\n stlExportOptions.precision = 0.001; // Affects STL mesh quality (smaller values for finer mesh)\n stlExportOptions.tryDownload = true;\n await io.saveShapeStl(stlExportOptions); // Use the destructured 'io'\n};\n\n// Step 8: Call the start function to execute your script\nstart();","version":"0.21.0","type":"typescript"}} + script={{"script":"// Step 1: (Optional but Recommended) Destructure for convenience\n// This makes your code less verbose and easier to read.\nconst { solid } = bitbybit.occt.shapes;\nconst { booleans, fillets, io } = bitbybit.occt; // Added 'io' for export functions\nconst { draw } = bitbybit;\nconst { scene } = bitbybit.babylon;\n\n// Step 2: Import type definitions for input objects and shapes\n// This enables type checking and autocompletion.\ntype TopoDSShapePointer = Bit.Inputs.OCCT.TopoDSShapePointer; // Represents an OCCT shape\n\nconst { CubeDto, SphereDto, FilletDto, DifferenceDto, SaveStepDto, SaveStlDto } = Bit.Inputs.OCCT;\nconst DrawOcctShapeOptions = Bit.Inputs.Draw.DrawOcctShapeOptions;\nconst DirectionalLightDto = Bit.Inputs.BabylonScene.DirectionalLightDto;\n\n// Step 3: Define your main logic within an async function\nconst start = async () => {\n // Step 3a: Create input objects (DTOs) and set their properties for a cube\n const cubeOptions = new CubeDto(); // Instantiate the DTO\n cubeOptions.size = 6; // Set the cube's size\n // Call the bitbybit function to create the cube, awaiting its promise\n const cube: TopoDSShapePointer = await solid.createCube(cubeOptions);\n\n // Step 3b: Create input objects (DTOs) for a sphere\n const sphereOptions = new SphereDto();\n sphereOptions.radius = 3;\n sphereOptions.center = [3, 3, -3]; // Define center as [x, y, z] coordinates\n const sphere: TopoDSShapePointer = await solid.createSphere(sphereOptions);\n\n // Step 4: Perform geometric operations\n // Example: Boolean difference (subtract sphere from cube)\n const diffOptions = new DifferenceDto(); // Generic type for the shapes involved\n diffOptions.shape = cube; // The base shape\n diffOptions.shapes = [sphere]; // An array of shapes to subtract\n const diff: TopoDSShapePointer = await booleans.difference(diffOptions);\n\n // Example: Apply fillets (round edges) to the result of the difference\n const roundingOptions = new FilletDto();\n roundingOptions.shape = diff; // The shape to fillet\n roundingOptions.radius = 1; // The radius of the fillet\n // Note: Some operations might have specific methods like 'filletEdges' for common tasks\n const solidRoundedCorners: TopoDSShapePointer = await fillets.filletEdges(roundingOptions);\n\n // Step 5: Visualize the result in the 3D viewer\n // Prepare drawing options to customize appearance\n const occtDrawOptions = new DrawOcctShapeOptions();\n occtDrawOptions.faceColour = \"#0000ff\"; // Blue faces\n occtDrawOptions.edgeColour = \"#ff00ff\"; // Magenta edges\n occtDrawOptions.edgeWidth = 5; // Width of the edges\n occtDrawOptions.precision = 0.001; // Rendering precision for complex shapes (lower is finer)\n // Draw the final shape. 'drawAnyAsync' is a versatile function for drawing various entity types.\n draw.drawAnyAsync({ entity: solidRoundedCorners, options: occtDrawOptions });\n\n // Step 6: (Optional) Adjust scene elements like lighting for better visualization\n const dirLight = new DirectionalLightDto();\n dirLight.shadowGeneratorMapSize = 2000; // Higher values for better shadow quality\n dirLight.intensity = 3; // Light intensity\n scene.drawDirectionalLight(dirLight); // Adds or updates a directional light in the scene\n\n // Step 7: (Optional) Export your model to common CAD file formats\n // Export as STEP file (a common format for solid models)\n const stepExportOptions = new SaveStepDto();\n stepExportOptions.shape = solidRoundedCorners;\n stepExportOptions.adjustYtoZ = true; // Optional: Adjusts coordinate system (Y-up to Z-up) if needed\n stepExportOptions.fileName = \"cube_with_sphere_cutout.step\";\n stepExportOptions.tryDownload = true; // Attempts to trigger a browser download of the file\n await io.saveShapeSTEP(stepExportOptions); // Use the destructured 'io'\n\n // Export as STL file (a common format for 3D printing)\n const stlExportOptions = new SaveStlDto();\n stlExportOptions.shape = solidRoundedCorners;\n stlExportOptions.adjustYtoZ = true;\n stlExportOptions.fileName = \"cube_with_sphere_cutout.stl\";\n stlExportOptions.precision = 0.001; // Affects STL mesh quality (smaller values for finer mesh)\n stlExportOptions.tryDownload = true;\n await io.saveShapeStl(stlExportOptions); // Use the destructured 'io'\n};\n\n// Step 8: Call the start function to execute your script\nstart();","type":"typescript"}} title="Create And Download STEP & STL 3D Models" description="Contains example code that can be executed directly inside the editor by clicking Run button." /> diff --git a/docs/learn/getting-started/typescript/parametric-cube.mdx b/docs/learn/getting-started/typescript/parametric-cube.mdx index aae81a37c..b211ff2ef 100644 --- a/docs/learn/getting-started/typescript/parametric-cube.mdx +++ b/docs/learn/getting-started/typescript/parametric-cube.mdx @@ -35,7 +35,7 @@ The script shown in the editor below is fairly straightforward, but let's break {\n const size = 10;\n const cubeOptions = new Bit.Inputs.OCCT.CubeDto();\n cubeOptions.size = size;\n const cube = await bitbybit.occt.shapes.solid.createCube(cubeOptions);\n\n bitbybit.draw.drawAnyAsync({\n entity: cube\n });\n}\n\nstart();\n","version":"0.21.0","type":"typescript"}} + script={{"script":"const start = async () => {\n const size = 10;\n const cubeOptions = new Bit.Inputs.OCCT.CubeDto();\n cubeOptions.size = size;\n const cube = await bitbybit.occt.shapes.solid.createCube(cubeOptions);\n\n bitbybit.draw.drawAnyAsync({\n entity: cube\n });\n}\n\nstart();\n","type":"typescript"}} title="Draw the grid" description="Draws the grid mesh with lines in 3D space." /> diff --git a/docs/learn/getting-started/viewer-editor/basics/_category_.json b/docs/learn/getting-started/viewer-editor/basics/_category_.json index 43a556b76..df253cdc3 100644 --- a/docs/learn/getting-started/viewer-editor/basics/_category_.json +++ b/docs/learn/getting-started/viewer-editor/basics/_category_.json @@ -1,10 +1,10 @@ { - "label": "Basics", + "label": "Bitbybit Basics", "position": 1, "link": { "type": "generated-index", - "title": "Viewer Editor Basics", - "description": "Learn the fundamentals of using the Viewer Editor interface, from accessing the tool to understanding its core components.", + "title": "Bitbybit Basics", + "description": "Learn the fundamentals of Bitbybit, from accessing the editors to understanding its cloud features.", "slug": "/getting-started/viewer-editor/basics" } } diff --git a/docs/learn/getting-started/viewer-editor/basics/getting-started.md b/docs/learn/getting-started/viewer-editor/basics/getting-started.md index 5f06fd4d2..389798952 100644 --- a/docs/learn/getting-started/viewer-editor/basics/getting-started.md +++ b/docs/learn/getting-started/viewer-editor/basics/getting-started.md @@ -139,7 +139,7 @@ When you export, you get JSON like this: ```json { - "$schema": "https://app-store.bitbybit.dev/files/ecommerce/viewer-editor/viewer-scene-schema-v0.21.0.json", + "$schema": "https://app-store.bitbybit.dev/files/ecommerce/viewer-editor/viewer-scene-schema-v0.21.1.json", "models": [ { "name": "Main Product", diff --git a/docs/learn/getting-started/viewer-editor/basics/overview.md b/docs/learn/getting-started/viewer-editor/basics/overview.md index 22956577f..c8382ca2d 100644 --- a/docs/learn/getting-started/viewer-editor/basics/overview.md +++ b/docs/learn/getting-started/viewer-editor/basics/overview.md @@ -78,7 +78,7 @@ For Shopify users, see [Subscription Plans](../../../3d-bits/plans/subscription- ## Generated Output -The Viewer Editor generates valid JSON that conforms to the [**Viewer Scene Schema**](https://app-store.bitbybit.dev/files/ecommerce/viewer-editor/viewer-scene-schema-v0.21.0.json). This JSON can be: +The Viewer Editor generates valid JSON that conforms to the [**Viewer Scene Schema**](https://app-store.bitbybit.dev/files/ecommerce/viewer-editor/viewer-scene-schema-v0.21.1.json). This JSON can be: - Copied to clipboard and pasted into Shopify product metafields - Downloaded as a file and hosted on your CDN diff --git a/docs/learn/intro.md b/docs/learn/intro.md index 3c71afca6..a17a8ce5d 100644 --- a/docs/learn/intro.md +++ b/docs/learn/intro.md @@ -35,7 +35,7 @@ To get started: * We offer [**NPM packages**](/learn/npm-packages/intro) that you can incorporate into your own websites. * *Note: These packages do not include our proprietary advanced algorithms or the models available in the 3D Models section.* -* Check out how to set up our algorithms with [**Three.JS**](/learn/npm-packages/threejs/intro) or [**Babylon.JS**](/learn/npm-packages/babylonjs/intro). We include some complete powerful demos with explanations. +* Check out how to set up our algorithms with [**Three.JS**](/learn/npm-packages/threejs), [**Babylon.JS**](/learn/npm-packages/babylonjs) or [**PlayCanvas**](/learn/npm-packages/playcanvas). We include some complete powerful demos with explanations. * Also consider our course: [**Introduction To Programming 3D In TypeScript**](https://bitbybit.dev/school/courses/introduction-to-programming-3d-in-typescript). * Or, if you're familiar with BabylonJS: [**Bitbybit For BabylonJS Developers**](https://bitbybit.dev/school/courses/bitbybit-for-babylonjs-developers). These courses explore how our algorithms can create 3D CAD applications. diff --git a/docs/learn/npm-packages/babylonjs/intro.md b/docs/learn/npm-packages/babylonjs/about-babylonjs.md similarity index 98% rename from docs/learn/npm-packages/babylonjs/intro.md rename to docs/learn/npm-packages/babylonjs/about-babylonjs.md index 1e95f82ca..9580612a3 100644 --- a/docs/learn/npm-packages/babylonjs/intro.md +++ b/docs/learn/npm-packages/babylonjs/about-babylonjs.md @@ -1,7 +1,7 @@ --- -sidebar_position: 1 -title: "Introduction to BabylonJS" -sidebar_label: "BabylonJS Overview" +sidebar_position: 2 +title: "About BabylonJS" +sidebar_label: "About BabylonJS" description: "An overview of BabylonJS, a powerful and easy-to-use WebGL-based 3D game engine, and its integration with Bitbybit." tags: [npm-packages, babylonjs] --- diff --git a/docs/learn/npm-packages/babylonjs/advanced-parametric-3d-model.md b/docs/learn/npm-packages/babylonjs/advanced-parametric-3d-model.md index e64849320..d60a14c0d 100644 --- a/docs/learn/npm-packages/babylonjs/advanced-parametric-3d-model.md +++ b/docs/learn/npm-packages/babylonjs/advanced-parametric-3d-model.md @@ -58,19 +58,16 @@ A well-organized project structure is key for managing more complex applications * `src/main.ts`: The primary TypeScript file that orchestrates the entire application, from scene setup and Bitbybit initialization to GUI interactions and geometry updates. * `src/models/`: A directory to define the data structures (TypeScript interfaces/types and initial values) for: * `model.ts`: Parameters controlling the 3D shape's geometry. - * `kernel-options.ts`: Configuration for enabling Bitbybit geometry kernels. * `current.ts`: References to current scene objects (meshes, lights, GUI instance). * `src/helpers/`: This directory houses utility functions, each with a distinct responsibility: * `init-babylonjs.ts`: Responsible for setting up the BabylonJS `Engine`, `Scene`, `Camera`, default lighting, and a ground plane. - * `init-kernels.ts`: Manages the initialization of the selected Bitbybit geometry kernels (e.g., OCCT). * `create-shape.ts`: The core of the geometric logic, containing the functions that use Bitbybit's OCCT API to generate the parametric "Hex Shell" model. * `create-gui.ts`: Configures the `lil-gui` panel, linking its controls to the parameters in `model.ts` and connecting them to the geometry update functions. * `downloads.ts`: Implements the logic for exporting the generated 3D model to STEP, STL, and GLB file formats. * `gui-helper.ts`: Provides simple utility functions for managing the GUI's visual state (e.g., showing/hiding a loading spinner, enabling/disabling GUI controls). -* `src/workers/`: This directory would contain the individual Web Worker files for each geometry kernel Bitbybit uses (e.g., `occt.worker.ts`). - - For a detailed explanation on setting up the Web Worker files (e.g., `occt.worker.ts`), which are essential for running geometry kernels in a separate thread, please refer to our [**BabylonJS Integration Starter Tutorial**](./start-with-babylon-js) or a general guide on using workers with Bitbybit. This tutorial assumes that foundation is in place and focuses on the application logic. + + Since version 0.21.1, Bitbybit provides a simplified `initBitByBit()` helper function that handles all worker creation and kernel initialization automatically by loading kernels from CDN. This eliminates the need for manual worker file setup. For details, see our [**BabylonJS Integration Starter Tutorial**](./start-with-babylon-js). If you need to host assets on your own infrastructure, see [Self-Hosting Assets](/learn/hosting-and-cdn). ## 1. HTML Setup (`index.html`) @@ -117,10 +114,14 @@ This file is the central coordinator for our application, bringing together the {`import './style.css'; -import { BitByBitBase, Inputs } from '@bitbybit-dev/babylonjs'; -import { model, type KernelOptions, current } from './models'; import { - initKernels, + BitByBitBase, + Inputs, + initBitByBit, + type InitBitByBitOptions, +} from '@bitbybit-dev/babylonjs'; +import { model, current } from './models'; +import { initBabylonJS, createGui, createShapeLod1, @@ -136,7 +137,7 @@ import { } from './helpers'; // Configuration for enabling Bitbybit geometry kernels -const kernelOptions: KernelOptions = { +const options: InitBitByBitOptions = { enableOCCT: true, // This example primarily uses OCCT for its CAD operations enableJSCAD: false, enableManifold: false, @@ -151,16 +152,13 @@ async function start() { // 2. Initialize BitByBitBase for BabylonJS const bitbybit = new BitByBitBase(); - // Provide the BabylonJS context to the Bitbybit library. - // This allows Bitbybit to create and manage BabylonJS-specific objects. - bitbybit.context.scene = scene; - bitbybit.context.engine = engine; // Add default lighting and a ground plane to the scene createDirLightsAndGround(bitbybit, current); - // Initialize the selected Bitbybit geometry kernels (OCCT in this case) - await initKernels(scene, bitbybit, kernelOptions); + // Initialize Bitbybit with the selected geometry kernels using the helper function. + // This automatically creates workers and loads kernels from CDN. + await initBitByBit(scene, bitbybit, options); // Variables to store the final OCCT shape and intermediate shapes for cleanup let finalShape: Inputs.OCCT.TopoDSShapePointer | undefined; @@ -240,13 +238,12 @@ async function start() { **Explanation of `main.ts`:** -1. **Imports:** Includes `BitByBitBase` and `Inputs` from `@bitbybit-dev/babylonjs`, along with local models and helper functions. -2. **`kernelOptions`:** Specifies that only the OCCT kernel should be enabled and initialized for this particular application, as it's the one used for the Hex Shell's CAD operations. +1. **Imports:** Includes `BitByBitBase`, `Inputs`, `initBitByBit`, and `InitBitByBitOptions` from `@bitbybit-dev/babylonjs`, along with local models and helper functions. +2. **`options`:** Specifies that only the OCCT kernel should be enabled and initialized for this particular application, as it's the one used for the Hex Shell's CAD operations. 3. **`start()` function (Main Application Flow):** * **BabylonJS Setup:** `initBabylonJS()` initializes the BabylonJS `Engine` and `Scene`. - * **Bitbybit Initialization:** An instance of `BitByBitBase` is created. Crucially, `bitbybit.context.scene` and `bitbybit.context.engine` are assigned the BabylonJS scene and engine instances. This step is vital for the `@bitbybit-dev/babylonjs` integration package to correctly interact with the BabylonJS environment (e.g., for creating materials, adding meshes to the scene). + * **Bitbybit Initialization:** An instance of `BitByBitBase` is created. The `initBitByBit()` helper function is then called to initialize the Bitbybit instance with the scene and the kernel options. This helper automatically creates web workers, loads kernel WASM files from CDN, and waits for the selected kernels to be ready. * **Scene Elements:** `createDirLightsAndGround()` adds basic lighting and a ground plane using Bitbybit's BabylonJS helpers. - * **Kernel Initialization:** `initKernels()` ensures the OCCT worker is started and ready. * **Shape Management:** `finalShape` will store the primary OCCT geometry. `shapesToClean` is an array used to track intermediate OCCT shapes created during geometry generation; these need to be explicitly deleted using `bitbybit.occt.deleteShapes()` to manage memory effectively, especially with complex CAD operations. * **Download Functions:** The `downloadStep`, `downloadGLB`, and `downloadSTL` functions (from `helpers/downloads.ts`) are attached to the `model` object so they can be easily triggered by GUI buttons. * **GUI Creation:** `createGui()` sets up the `lil-gui` panel, linking its controls to the parameters defined in `model.ts`. Changes in the GUI will trigger the `updateShape` function. @@ -264,7 +261,7 @@ async function start() { Helper functions promote modularity and code organization. -### `init-babylonjs.ts` & `init-kernels.ts` +### `init-babylonjs.ts` * **`initBabylonJS()`:** This module is responsible for all the initial BabylonJS setup. It: * Gets the `` element. @@ -275,11 +272,6 @@ Helper functions promote modularity and code organization. * Initializes the render loop via `engine.runRenderLoop()`. * Handles window resize events to keep the rendering correct. * **`createDirLightsAndGround()`:** This helper specifically adds directional lights (important for casting shadows and defining highlights) and a ground mesh (e.g., a cylinder or plane) to the BabylonJS scene. It might use Bitbybit's BabylonJS API helpers for convenience. -* **`initKernels()`:** This function's role is identical regardless of the rendering engine. It: - 1. Looks at the `kernelOptions` (from `main.ts`). - 2. For each enabled kernel, it creates a new `Worker` instance, pointing to the respective worker script (e.g., `../workers/occt.worker.ts`). - 3. Calls `await bitbybit.init(...)`, passing the BabylonJS `scene` and the worker instances. - 4. It then patiently waits for each selected and available kernel to confirm its full initialization by observing their state streams (e.g., `bitbybit.occtWorkerManager.occWorkerState$`). The function only resolves after all required kernels are ready for use. ### `create-shape.ts` (Core OCCT Geometry Logic) @@ -343,7 +335,6 @@ These DOM manipulation utilities (disable/enable GUI, show/hide spinner) are gen ## 4. Data Models (`src/models/`) -* **`kernel-options.ts`:** Defines the `KernelOptions` interface (same as before). * **`model.ts`:** Defines the `Model` type for geometric parameters and an initial `model` object (same structure as before). * **`current.ts`:** This is where BabylonJS types become apparent. The `Current` type now holds references to BabylonJS objects: diff --git a/docs/learn/npm-packages/babylonjs/hex-house-concept.md b/docs/learn/npm-packages/babylonjs/hex-house-concept.md index 1396f8095..5526e977e 100644 --- a/docs/learn/npm-packages/babylonjs/hex-house-concept.md +++ b/docs/learn/npm-packages/babylonjs/hex-house-concept.md @@ -47,7 +47,7 @@ This example will guide you through:

This tutorial focuses on the core application logic for generating the Hex House. For a detailed explanation of:

Here, we'll concentrate on the essential files that bring the Hex House concept to life.

@@ -96,15 +96,16 @@ This file coordinates the setup and dynamic updates of our Hex House. {`import './style.css'; -import { BitByBitBase, Inputs } from '@bitbybit-dev/babylonjs'; -import { model, type KernelOptions, current } from './models'; +import { BitByBitBase, Inputs } from '@bitbybit-dev/core'; +import { initBitByBit, type InitBitByBitOptions } from '@bitbybit-dev/babylonjs'; +import { model, current } from './models'; import { /* Assuming these are correctly imported from your helpers index */ - initKernels, initBabylonJS, createGui, createShape, + initBabylonJS, createGui, createShape, createDirLightsAndGround, disableGUI, enableGUI, hideSpinner, showSpinner, downloadGLTF, downloadSTL, downloadStep, } from './helpers'; -const kernelOptions: KernelOptions = { +const options: InitBitByBitOptions = { enableOCCT: true, enableJSCAD: false, enableManifold: false, }; @@ -114,11 +115,9 @@ async function start() { const { scene, engine } = initBabylonJS(); const bitbybit = new BitByBitBase(); - bitbybit.context.scene = scene; // Link Bitbybit to BabylonJS scene - bitbybit.context.engine = engine; // Link Bitbybit to BabylonJS engine createDirLightsAndGround(bitbybit, current); - await initKernels(scene, bitbybit, kernelOptions); // Initialize OCCT + await initBitByBit(scene, bitbybit, options); // Initialize OCCT let finalShape: Inputs.OCCT.TopoDSShapePointer | undefined; let shapesToClean: Inputs.OCCT.TopoDSShapePointer[] = []; @@ -161,8 +160,8 @@ async function start() { **Core Logic in `main.ts`:** -1. Initializes BabylonJS (`initBabylonJS`) and then Bitbybit, crucially setting `bitbybit.context.scene` and `bitbybit.context.engine`. -2. Initializes the OCCT kernel via `initKernels`. +1. Initializes BabylonJS (`initBabylonJS`) and then Bitbybit. +2. Initializes the OCCT kernel via `initBitByBit()` from `@bitbybit-dev/babylonjs`, which automatically creates workers from CDN. 3. Sets up download functions and the `lil-gui` interface using `createGui`. The GUI will call `updateShape` when parameters change. 4. Implements a simple rotation for the generated model parts. 5. The `updateShape` function is key: diff --git a/docs/learn/npm-packages/babylonjs/start-with-babylon-js.md b/docs/learn/npm-packages/babylonjs/start-with-babylon-js.md index 32fc38cfc..a2fe08f95 100644 --- a/docs/learn/npm-packages/babylonjs/start-with-babylon-js.md +++ b/docs/learn/npm-packages/babylonjs/start-with-babylon-js.md @@ -1,7 +1,7 @@ --- -sidebar_position: 2 -title: Using Bitbybit with BabylonJS -sidebar_label: BabylonJS Starter Template +sidebar_position: 1 +title: Quick Start with BabylonJS +sidebar_label: Quick Start description: Learn how to set up and use the @bitbybit-dev/babylonjs package with Vite to create 3D CAD applications, and control which geometry kernels (OCCT, JSCAD, Manifold) are initialized. tags: [npm-packages, babylonjs, occt, manifold, jscad] --- @@ -12,20 +12,41 @@ import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; import CodeBlock from '@theme/CodeBlock'; -# Using Bitbybit with BabylonJS +# Quick Start with BabylonJS -This guide will walk you through setting up and using the `@bitbybit-dev/babylonjs` package to integrate Bitbybit's 3D CAD functionalities into your BabylonJS applications. We'll use Vite as our build tool, which simplifies the setup process. +Get up and running with Bitbybit and BabylonJS in under 2 minutes! + +## Fastest Way: Use NPX Scaffolding + + +{`npx @bitbybit-dev/create-app my-project --engine babylonjs +cd my-project +npm install +npm run dev`} + + +This creates a complete project with Vite, TypeScript, and all three CAD kernels (OCCT, JSCAD, Manifold) pre-configured. + + +Check out the [Getting Started with BabylonJS](/learn/getting-started/engines/babylonjs) page for an overview of all integration approaches including visual editors and runners. + + +--- + +## Manual Setup (Alternative) + +If you prefer to set up the project manually or integrate into an existing project, follow these steps. The `@bitbybit-dev/babylonjs` package conveniently includes `@babylonjs/core` as a dependency, so you don't need to install it separately. -## Prerequisites +### Prerequisites * Node.js and npm (or yarn) installed. * A basic understanding of TypeScript and BabylonJS. -## [Example on Bitbybit Github Repo](https://github.com/bitbybit-dev/bitbybit/tree/master/examples/vite/babylonjs/starter-template) +### [Example on Bitbybit Github Repo](https://github.com/bitbybit-dev/bitbybit/tree/master/examples/vite/babylonjs/starter-template) -## 1. Project Setup with Vite +### 1. Project Setup with Vite First, create a new Vite project with a TypeScript template: @@ -36,7 +57,7 @@ First, create a new Vite project with a TypeScript template: cd my-bitbybit-babylonjs-app`}
-Next, install the Bitbybit BabylonJS package and its necessary worker dependencies: +Next, install the Bitbybit BabylonJS package: {`npm install @bitbybit-dev/babylonjs @@ -82,367 +103,88 @@ This is a standard HTML setup. The key parts are: - ``: This is where our 3D scene will be drawn. - ``: This loads our main TypeScript application logic. -## 3. Setting up Web Workers - -Bitbybit utilizes Web Workers to run computationally intensive geometry kernels (OCCT, JSCAD, Manifold) off the main browser thread, preventing UI freezes. You need to create simple worker files that initialize these kernels. - -Create a `workers` directory inside your `src` folder (`src/workers/`). - - - - - -{`import initOpenCascade from '@bitbybit-dev/occt/bitbybit-dev-occt/cdn'; -import type { OpenCascadeInstance } from '@bitbybit-dev/occt/bitbybit-dev-occt/bitbybit-dev-occt.js'; -import { - initializationComplete, - onMessageInput, -} from '@bitbybit-dev/occt-worker'; - -// Initialize OpenCascade (OCCT) -initOpenCascade().then((occ: OpenCascadeInstance) => { - // Notify the main thread that OCCT is ready - initializationComplete(occ, undefined); -}); - -// Listen for messages from the main thread -addEventListener('message', ({ data }) => { - // Process messages using the occt-worker helper - onMessageInput(data, postMessage); -});`} - -**Explanation:** -- Imports `initOpenCascade` to load the OCCT WebAssembly module. -- Calls `initializationComplete` once OCCT is loaded, signaling to the main Bitbybit instance that this kernel is ready. -- `onMessageInput` handles communication between the main thread and the OCCT worker. - - - - - -{`import { - initializationComplete, - onMessageInput, -} from '@bitbybit-dev/jscad-worker'; - -// Dynamically import and initialize JSCAD -import('@bitbybit-dev/jscad/jscad-generated').then((s) => { - // Notify the main thread that JSCAD is ready - initializationComplete(s.default()); -}); - -// Listen for messages from the main thread -addEventListener('message', ({ data }) => { - // Process messages using the jscad-worker helper - onMessageInput(data, postMessage); -});`} - -**Explanation:** -- Dynamically imports the JSCAD module. -- Calls `initializationComplete` once JSCAD is loaded. -- `onMessageInput` handles communication. - - - - - -{`import { - initializationComplete, - onMessageInput, -} from '@bitbybit-dev/manifold-worker'; -import Module from 'manifold-3d'; // Imports the Manifold JS bindings - -const init = async () => { - // Initialize the Manifold WASM module - const wasm = await Module({ - // Manifold requires its WASM file to be loaded. - // This CDN link provides a hosted version. - // For production, you might want to host this yourself. - locateFile: () => { - return 'https://cdn.jsdelivr.net/gh/bitbybit-dev/bitbybit-assets@0.21.0/wasm/manifold-3-3-2.wasm'; - }, - }); - wasm.setup(); // Additional setup step for Manifold - // Notify the main thread that Manifold is ready - initializationComplete(wasm); -}; - -init(); - -// Listen for messages from the main thread -addEventListener('message', ({ data }) => { - // Process messages using the manifold-worker helper - onMessageInput(data, postMessage); -});`} - -**Explanation:** -- Imports the `manifold-3d` JavaScript bindings. -- The `Module` function initializes the Manifold WASM. The `locateFile` function is crucial for pointing to the Manifold WASM file. -- Calls `initializationComplete` after setup. -- `onMessageInput` handles communication. - - - - - - Vite handles these worker files automatically when you instantiate them using `new Worker(new URL('./path/to/worker.ts', import.meta.url), ...)`. Ensure the paths in `main.ts` correctly point to these files within your `src/workers/` directory. - - -## 4. Main Application Logic (`main.ts`) +## 3. Main Application Logic (`main.ts`) Replace the content of `src/main.ts` with the following: {`import './style.css'; // Basic styling -import { BitByBitBase, Inputs } from '@bitbybit-dev/babylonjs'; -import { OccStateEnum } from '@bitbybit-dev/occt-worker'; -import { JscadStateEnum } from '@bitbybit-dev/jscad-worker'; -import { ManifoldStateEnum } from '@bitbybit-dev/manifold-worker'; - import { - Engine, - Scene, - ArcRotateCamera, - Vector3, - HemisphericLight, - DirectionalLight, - Color4, -} from '@babylonjs/core'; -import { first, firstValueFrom, map } from 'rxjs'; - -// Define an interface for kernel options -interface KernelOptions { - enableOCCT: boolean; - enableJSCAD: boolean; - enableManifold: boolean; -} + BitByBitBase, + Inputs, + initBitByBit, + initBabylonJS, + type InitBitByBitOptions, +} from '@bitbybit-dev/babylonjs'; // --- 1. Main Application Entry Point --- start(); async function start() { - // Initialize basic BabylonJS scene - const { scene, engine } = initBabylonJS(); + // Initialize BabylonJS scene using Bitbybit's helper function + const sceneOptions = new Inputs.BabylonJSScene.InitBabylonJSDto(); + sceneOptions.canvasId = 'babylon-canvas'; + sceneOptions.sceneSize = 10; + sceneOptions.enableShadows = true; + sceneOptions.enableGround = true; + sceneOptions.groundColor = '#333333'; + + const { scene, engine } = initBabylonJS(sceneOptions); + // Create an instance of BitByBitBase for BabylonJS const bitbybit = new BitByBitBase(); // --- 2. Configure and Initialize Kernels --- - // Users can control which kernels are loaded - const kernelOptions: KernelOptions = { + // Users can control which kernels are loaded. + // The initBitByBit helper function handles all worker setup automatically + // by loading the kernels from CDN. + const options: InitBitByBitOptions = { enableOCCT: true, enableJSCAD: true, enableManifold: true, }; + // Initialize Bitbybit with the selected kernels - await initWithKernels(scene, bitbybit, kernelOptions); + await initBitByBit(scene, bitbybit, options); // --- 3. Create Geometry with Active Kernels --- - if (kernelOptions.enableOCCT) { + if (options.enableOCCT) { await createOCCTGeometry(bitbybit, '#ff0000'); // Red } - if (kernelOptions.enableManifold) { + if (options.enableManifold) { await createManifoldGeometry(bitbybit, '#00ff00'); // Green } - if (kernelOptions.enableJSCAD) { + if (options.enableJSCAD) { await createJSCADGeometry(bitbybit, '#0000ff'); // Blue } // Start the BabylonJS render loop engine.runRenderLoop(() => { if (scene.activeCamera) { - // Ensure camera is ready scene.render(); } }); } -// --- 4. BabylonJS Scene Initialization --- -function initBabylonJS() { - const canvas = document.getElementById('babylon-canvas') as HTMLCanvasElement; - const engine = new Engine(canvas, true, { - preserveDrawingBuffer: true, - stencil: true, - }); - const scene = new Scene(engine); - scene.metadata = { shadowGenerators: [] }; // Important for Bitbybit till we have better implementation... - scene.clearColor = new Color4(0.1, 0.11, 0.12, 1); // Set background color - - const camera = new ArcRotateCamera( - 'camera', - -Math.PI / 2, - Math.PI / 2.5, - 150, // Adjusted radius for typical scenes - new Vector3(0, 0, 0), - scene - ); - camera.attachControl(canvas, true); - camera.wheelPrecision = 5; // Control zoom speed - camera.zoomOnFactor = 1.2; - camera.angularSensibilityX = 1000; - camera.angularSensibilityY = 1000; - camera.panningSensibility = 100; - camera.lowerRadiusLimit = 10; - camera.upperRadiusLimit = 500; - - const light = new HemisphericLight('light', new Vector3(0, 1, 0), scene); - light.intensity = 0.7; - - // Add a directional light for better shadows and lighting - const directionalLight = new DirectionalLight( - 'directionalLight', - new Vector3(-1, -2, -1), - scene - ); - directionalLight.intensity = 1; - - const onWindowResize = () => { - engine.resize(); - }; - window.addEventListener('resize', onWindowResize, false); - - return { scene, engine, camera }; -} - -// --- 5. Bitbybit Kernel Initialization Logic --- -async function initWithKernels( - scene: Scene, - bitbybit: BitByBitBase, - options: KernelOptions -): Promise<{ message: string; initializedKernels: string[] }> { - let occtWorkerInstance: Worker | undefined; - let jscadWorkerInstance: Worker | undefined; - let manifoldWorkerInstance: Worker | undefined; - - // 1. Conditionally create worker instances - if (options.enableOCCT) { - occtWorkerInstance = new Worker( - new URL('./workers/occt.worker.ts', import.meta.url), - { name: 'OCC_WORKER', type: 'module' } - ); - } - if (options.enableJSCAD) { - jscadWorkerInstance = new Worker( - new URL('./workers/jscad.worker.ts', import.meta.url), - { name: 'JSCAD_WORKER', type: 'module' } - ); - } - if (options.enableManifold) { - manifoldWorkerInstance = new Worker( - new URL('./workers/manifold.worker.ts', import.meta.url), - { name: 'MANIFOLD_WORKER', type: 'module' } - ); - } - - // 2. Initialize Bitbybit - await bitbybit.init( - scene, - occtWorkerInstance, - jscadWorkerInstance, - manifoldWorkerInstance - ); - - // 3. Collect promises for kernel initializations - const initializationPromises: Promise[] = []; - let anyKernelSelectedForInit = false; - - if (options.enableOCCT) { - anyKernelSelectedForInit = true; - if (bitbybit.occtWorkerManager) { - initializationPromises.push( - firstValueFrom( - bitbybit.occtWorkerManager.occWorkerState$.pipe( - first((s) => s.state === OccStateEnum.initialised), - map(() => 'OCCT') - ) - ) - ); - } else { - console.warn( - 'OCCT enabled in options, but occtWorkerManager not found after init.' - ); - } - } - - if (options.enableJSCAD) { - anyKernelSelectedForInit = true; - if (bitbybit.jscadWorkerManager) { - initializationPromises.push( - firstValueFrom( - bitbybit.jscadWorkerManager.jscadWorkerState$.pipe( - first((s) => s.state === JscadStateEnum.initialised), - map(() => 'JSCAD') - ) - ) - ); - } else { - console.warn( - 'JSCAD enabled in options, but jscadWorkerManager not found after init.' - ); - } - } - - if (options.enableManifold) { - anyKernelSelectedForInit = true; - if (bitbybit.manifoldWorkerManager && bitbybit.manifoldWorkerManager.manifoldWorkerState$) { - initializationPromises.push( - firstValueFrom( - bitbybit.manifoldWorkerManager.manifoldWorkerState$.pipe( - first((s) => s.state === ManifoldStateEnum.initialised), - map(() => 'Manifold') - ) - ) - ); - } else { - console.warn( - 'Manifold enabled in options, but manifoldWorkerManager not found after init.' - ); - } - } - - // 4. Wait for selected & available kernels or handle no selection/availability - if (!anyKernelSelectedForInit) { - console.log('No kernels selected for initialization.'); - return { message: 'No kernels selected for initialization.', initializedKernels: [] }; - } - - if (initializationPromises.length === 0) { - // Kernels were selected, but none were awaitable (e.g., managers missing for all selected) - console.log( - 'Kernels were selected, but none had managers available for awaiting initialization.' - ); - return { - message: 'Selected kernels were not awaitable for initialization state.', - initializedKernels: [], - }; - } - - const initializedKernels = await Promise.all(initializationPromises); - console.log('Kernels initialized:', initializedKernels.join(', ')); - return { - message: \`Successfully initialized: \${initializedKernels.join(', ')}\`, - initializedKernels, - }; -} - -// --- 6. Geometry Creation Functions (Examples) --- +// --- 4. Geometry Creation Functions (Examples) --- async function createOCCTGeometry(bitbybit: BitByBitBase, color: string) { console.log('Creating OCCT geometry...'); const cubeOptions = new Inputs.OCCT.CubeDto(); - cubeOptions.size = 25; - cubeOptions.center = [0, 0, 0]; + cubeOptions.size = 2.5; + cubeOptions.center = [0, 1.25, 0]; const cube = await bitbybit.occt.shapes.solid.createCube(cubeOptions); const filletOptions = new Inputs.OCCT.FilletDto(); filletOptions.shape = cube; - filletOptions.radius = 4; + filletOptions.radius = 0.4; const roundedCube = await bitbybit.occt.fillets.filletEdges(filletOptions); const drawOptions = new Inputs.Draw.DrawOcctShapeOptions(); - drawOptions.edgeWidth = 5; + drawOptions.edgeWidth = 0.5; drawOptions.faceColour = color; drawOptions.drawVertices = true; - drawOptions.vertexSize = 0.5; + drawOptions.vertexSize = 0.05; drawOptions.vertexColour = '#ffffff'; await bitbybit.draw.drawAnyAsync({ entity: roundedCube, @@ -450,14 +192,16 @@ async function createOCCTGeometry(bitbybit: BitByBitBase, color: string) { }); console.log('OCCT geometry created and drawn.'); } + async function createManifoldGeometry(bitbybit: BitByBitBase, color: string) { console.log('Creating Manifold geometry...'); const sphereOptions = new Inputs.Manifold.SphereDto(); - sphereOptions.radius = 15; + sphereOptions.radius = 1.5; + sphereOptions.circularSegments = 32; const sphere = await bitbybit.manifold.manifold.shapes.sphere(sphereOptions); const cubeOptions = new Inputs.Manifold.CubeDto(); - cubeOptions.size = 25; + cubeOptions.size = 2.5; const cube = await bitbybit.manifold.manifold.shapes.cube(cubeOptions); const diffedShape = await bitbybit.manifold.manifold.booleans.differenceTwo({ @@ -467,7 +211,7 @@ async function createManifoldGeometry(bitbybit: BitByBitBase, color: string) { const translationOptions = new Inputs.Manifold.TranslateDto(); translationOptions.manifold = diffedShape; - translationOptions.vector = [0, -40, 0]; // Position below OCCT + translationOptions.vector = [0, 1.25, -4]; // Position below OCCT const movedShape = await bitbybit.manifold.manifold.transforms.translate( translationOptions ); @@ -484,16 +228,15 @@ async function createManifoldGeometry(bitbybit: BitByBitBase, color: string) { async function createJSCADGeometry(bitbybit: BitByBitBase, color: string) { console.log('Creating JSCAD geometry...'); const geodesicSphereOptions = new Inputs.JSCAD.GeodesicSphereDto(); - geodesicSphereOptions.radius = 15; - geodesicSphereOptions.center = [0, 40, 0]; // Position above OCCT + geodesicSphereOptions.radius = 1.5; + geodesicSphereOptions.center = [0, 1.5, 4]; // Position above OCCT const geodesicSphere = await bitbybit.jscad.shapes.geodesicSphere( geodesicSphereOptions ); - // Example: Create another simple sphere for a boolean operation const sphereOptions = new Inputs.JSCAD.SphereDto(); - sphereOptions.radius = 10; // Smaller sphere - sphereOptions.center = [5, 45, 0]; // Slightly offset + sphereOptions.radius = 1; + sphereOptions.center = [0, 3, 4.5]; const simpleSphere = await bitbybit.jscad.shapes.sphere(sphereOptions); const unionOptions = new Inputs.JSCAD.BooleanTwoObjectsDto(); @@ -502,7 +245,7 @@ async function createJSCADGeometry(bitbybit: BitByBitBase, color: string) { const unionShape = await bitbybit.jscad.booleans.unionTwo(unionOptions); const drawOptions = new Inputs.Draw.DrawBasicGeometryOptions(); - drawOptions.colours = color; // Note: 'colours' for JSCAD draw options + drawOptions.colours = color; await bitbybit.draw.drawAnyAsync({ entity: unionShape, options: drawOptions, @@ -514,42 +257,23 @@ async function createJSCADGeometry(bitbybit: BitByBitBase, color: string) { ### Explanation of `main.ts`: 1. **Imports:** - * `BitByBitBase` and `Inputs`: Core components from `@bitbybit-dev/babylonjs`. `Inputs` provides DTOs (Data Transfer Objects) for specifying parameters for geometry operations. - * `...StateEnum`: Enums used to check the initialization state of each kernel worker. - * Standard BabylonJS modules for scene setup: `Engine`, `Scene`, `ArcRotateCamera`, `Vector3`, `HemisphericLight`, `DirectionalLight`, `Color4`. - * `first`, `firstValueFrom`, `map` from `rxjs`: Used to subscribe to and transform the kernel state observables. - -2. **`KernelOptions` Interface:** Defines the structure for selecting which kernels to initialize. + * `BitByBitBase`, `Inputs`, `initBitByBit`, `initBabylonJS`, and `InitBitByBitOptions`: Core components from `@bitbybit-dev/babylonjs`. `Inputs` provides DTOs (Data Transfer Objects) for specifying parameters for geometry operations and scene configuration. `initBitByBit` is the helper function that handles all kernel initialization automatically, `initBabylonJS` sets up the BabylonJS scene, and `InitBitByBitOptions` is the type for kernel configuration options. -3. **`start()` function (Main Entry Point):** - * Calls `initBabylonJS()` to set up the basic BabylonJS `Engine`, `Scene`, `Camera`, and `Lights`. +2. **`start()` function (Main Entry Point):** + * Uses `Inputs.BabylonJSScene.InitBabylonJSDto()` to configure scene options like canvas ID, scene size, shadows, and ground settings. + * Calls `initBabylonJS(sceneOptions)` to set up the complete BabylonJS environment (engine, scene, camera, lights) with a single function call. * Creates an instance of `BitByBitBase` from the `@bitbybit-dev/babylonjs` package. - * **`kernelOptions`**: This object is key. By setting `enableOCCT`, `enableJSCAD`, and `enableManifold` to `true` or `false`, you control which kernels Bitbybit attempts to initialize. This allows for optimizing load times and resource usage if not all kernels are needed. - * Calls `initWithKernels()` to initialize Bitbybit with the selected kernels, passing the BabylonJS `scene`. - * Conditionally calls geometry creation functions (`createOCCTGeometry`, `createManifoldGeometry`, `createJSCADGeometry`) based on which kernels were enabled and successfully initialized. + * **`options`**: This object is key. By setting `enableOCCT`, `enableJSCAD`, and `enableManifold` to `true` or `false`, you control which kernels Bitbybit attempts to initialize. This allows for optimizing load times and resource usage if not all kernels are needed. + * **`initBitByBit()`**: This helper function handles all the complexity of initializing Bitbybit with the selected kernels. It automatically creates web workers, loads kernel WASM files from CDN, and waits for all selected kernels to be ready. You simply pass the scene, the bitbybit instance, and your options. + * Conditionally calls geometry creation functions (`createOCCTGeometry`, `createManifoldGeometry`, `createJSCADGeometry`) based on which kernels were enabled. * Starts the BabylonJS render loop using `engine.runRenderLoop(...)`. -4. **`initBabylonJS()` function:** - * Standard BabylonJS boilerplate: sets up the `Engine` attached to the canvas. - * Creates a `Scene` and sets its clear color (background). - * Creates an `ArcRotateCamera` for user interaction with configured sensitivities and limits. - * Adds a `HemisphericLight` and a `DirectionalLight` for better lighting. - * Includes a window resize listener to ensure the `engine` adapts to viewport changes. - -5. **`initWithKernels()` function:** - * This is the core of Bitbybit's initialization. - * It conditionally creates `Worker` instances for OCCT, JSCAD, and Manifold based on the `options` passed in. The `new URL('./workers/worker-name.worker.ts', import.meta.url)` syntax is Vite's way of correctly bundling and referencing web worker files. - * Calls `await bitbybit.init(scene, occtWorkerInstance, jscadWorkerInstance, manifoldWorkerInstance)`. The `@bitbybit-dev/babylonjs` package's `BitByBitBase` is designed to work with a BabylonJS `Scene` object and can handle `undefined` for worker instances it shouldn't initialize. - * Uses RxJS `pipe(first(...), map(...))` to subscribe to the state observables of each enabled kernel and transform the result to a string identifying the kernel. - * The `Promise` resolves only after all *selected and enabled* kernels have emitted an `initialised` state. This ensures that you don't try to use a kernel before it's ready. - * Returns an object with a message and an array of initialized kernel names. - -6. **Geometry Creation Functions (`createOCCTGeometry`, `createManifoldGeometry`, `createJSCADGeometry`):** +3. **Geometry Creation Functions (`createOCCTGeometry`, `createManifoldGeometry`, `createJSCADGeometry`):** * These are example functions illustrating how to use Bitbybit's core geometry API (e.g., `bitbybit.occt.*`, `bitbybit.manifold.*`, `bitbybit.jscad.*`). * **`Inputs` DTOs**: You'll notice the use of `Inputs.OCCT.CubeDto()`, `Inputs.Manifold.SphereDto()`, etc. These objects are used to pass parameters to Bitbybit's geometry creation and modification functions. They provide type safety and often mirror the inputs you'd find in a visual programming environment. Intellisense (auto-completion in your IDE) will be very helpful here. * **Drawing**: After creating a geometric entity, `bitbybit.draw.drawAnyAsync()` (from `@bitbybit-dev/babylonjs`) is used to render it into the BabylonJS scene. Different kernels might have slightly different drawing option DTOs (e.g., `DrawOcctShapeOptions`, `DrawManifoldOrCrossSectionOptions`, `DrawBasicGeometryOptions`), but `drawAnyAsync` handles many common cases. The OCCT draw options now support additional properties like `edgeWidth`, `drawVertices`, `vertexSize`, and `vertexColour`. -## 5. Basic Styling (Optional) +## 4. Basic Styling (Optional) Create an `src/style.css` file if you haven't already: @@ -568,7 +292,7 @@ Create an `src/style.css` file if you haven't already: }`} -## 6. Running the Application +## 5. Running the Application {`npm run dev @@ -595,11 +319,11 @@ You can explore and interact with a live example of this setup on StackBlitz. ## Key Takeaways -* **Vite Simplifies Setup:** Vite handles worker bundling and module resolution effectively for a smooth development experience. -* **`KernelOptions` for Control:** You have fine-grained control over which geometry kernels are loaded, allowing you to tailor the application to specific needs and optimize performance. +* **Vite Simplifies Setup:** Vite handles module resolution effectively for a smooth development experience. +* **`initBitByBit()` for Easy Initialization:** The `initBitByBit()` helper function handles all the complexity of creating web workers and loading kernel WASM files from CDN. You simply configure which kernels to enable. If you need to host assets on your own infrastructure, see [Self-Hosting Assets](/learn/hosting-and-cdn). +* **`InitBitByBitOptions` for Control:** You have fine-grained control over which geometry kernels are loaded, allowing you to tailor the application to specific needs and optimize performance. * **Asynchronous Operations:** Most Bitbybit operations are `async` because they communicate with Web Workers, ensuring the main thread remains responsive. * **`Inputs` DTOs:** Use these typed objects to configure geometry operations, promoting code clarity and type safety. -* **Separate Worker Files:** Each geometry kernel runs in its own dedicated worker, maximizing performance for computationally intensive tasks. * **Modular Design:** The `@bitbybit-dev/babylonjs` package seamlessly integrates Bitbybit's powerful geometry kernels and functionalities with your BabylonJS applications. This setup provides a robust foundation for building sophisticated 3D CAD applications in the browser with Bitbybit and BabylonJS. \ No newline at end of file diff --git a/docs/learn/npm-packages/intro.md b/docs/learn/npm-packages/intro.md index fff22961d..466e4e63e 100644 --- a/docs/learn/npm-packages/intro.md +++ b/docs/learn/npm-packages/intro.md @@ -10,6 +10,46 @@ tags: [npm-packages, threejs, babylonjs, playcanvas, occt, manifold, jscad] When developing standalone applications in TypeScript or JavaScript, you often use third-party libraries and frameworks. We've developed several open-source NPM packages (MIT Licensed) to help you integrate our powerful 3D CAD algorithms directly into your applications. +--- + +## Quick Start with CLI + +The fastest way to get started is with our CLI tool. Scaffold a fully-configured 3D CAD project in seconds: + +```bash +npx @bitbybit-dev/create-app my-awesome-project +``` + +The CLI guides you through an interactive setup where you choose your preferred 3D engine (Three.js, Babylon.js, or PlayCanvas). You can also specify the engine directly: + +```bash +npx @bitbybit-dev/create-app my-project --engine babylonjs +``` + +### What You Get + +Your scaffolded project includes: + +- **Vite** for fast development and optimized production builds +- **TypeScript** configured out of the box +- **All three geometry kernels** pre-configured and ready to use: + - **OCCT** (OpenCascade) for professional CAD operations + - **JSCAD** for programmatic solid modeling + - **Manifold** for fast mesh boolean operations +- **Starter code** demonstrating each kernel's capabilities + +### Development Workflow + +```bash +cd my-awesome-project +npm install +npm run dev +``` + +Your browser opens with a live 3D preview at `http://localhost:5173`. Changes appear instantly with hot reload. + +--- + ## Architecture of NPM Packages The following diagram illustrates the architecture of our NPM packages. Each game engine-specific package (`@bitbybit-dev/threejs`, `@bitbybit-dev/babylonjs`, `@bitbybit-dev/playcanvas`) connects through the `@bitbybit-dev/core` layer. This creates a streamlined, extensible structure that supports a range of integrations with various geometry kernels like OCCT, JSCAD, and Manifold. diff --git a/docs/learn/npm-packages/playcanvas/intro.md b/docs/learn/npm-packages/playcanvas/about-playcanvas.md similarity index 98% rename from docs/learn/npm-packages/playcanvas/intro.md rename to docs/learn/npm-packages/playcanvas/about-playcanvas.md index c2cbc2e79..ccbe7af4c 100644 --- a/docs/learn/npm-packages/playcanvas/intro.md +++ b/docs/learn/npm-packages/playcanvas/about-playcanvas.md @@ -1,7 +1,7 @@ --- -sidebar_position: 1 -title: "Introduction to PlayCanvas" -sidebar_label: "PlayCanvas Overview" +sidebar_position: 2 +title: "About PlayCanvas" +sidebar_label: "About PlayCanvas" description: "An overview of PlayCanvas, a powerful WebGL game engine for creating and displaying 3D graphics in web browsers, and how it's integrated with Bitbybit." tags: [npm-packages, playcanvas] --- diff --git a/docs/learn/npm-packages/playcanvas/advanced-parametric-3d-model.md b/docs/learn/npm-packages/playcanvas/advanced-parametric-3d-model.md index 693f5adc1..fbfca24e6 100644 --- a/docs/learn/npm-packages/playcanvas/advanced-parametric-3d-model.md +++ b/docs/learn/npm-packages/playcanvas/advanced-parametric-3d-model.md @@ -59,18 +59,16 @@ This project is typically structured with: * `index.html`: The main HTML file to host the canvas and load scripts. * `style.css`: For basic styling of the page and UI elements like a loading spinner. * `src/main.ts`: The main entry point of our application, orchestrating app setup, Bitbybit initialization, GUI, and geometry updates. -* `src/models/`: A directory to define data structures for our model parameters (`model.ts`), kernel initialization options (`kernel-options.ts`), and current scene state (`current.ts`). +* `src/models/`: A directory to define data structures for our model parameters (`model.ts`) and current scene state (`current.ts`). * `src/helpers/`: A directory for utility functions, broken down by responsibility: * `init-playcanvas.ts`: Sets up the PlayCanvas application, camera, lighting, and ground. - * `init-kernels.ts`: Handles the initialization of selected Bitbybit geometry kernels. * `create-shape.ts`: Contains the core logic for generating the parametric 3D geometry using OCCT. This is where the detailed CAD operations happen. * `create-gui.ts`: Sets up the `lil-gui` panel and links its controls to the model parameters and update functions. * `downloads.ts`: Implements functions for exporting the model to various file formats. * `gui-helper.ts`: Provides utility functions for managing the GUI state (e.g., showing/hiding a spinner, disabling/enabling GUI). -* `src/workers/`: Directory containing the individual worker files for each geometry kernel (e.g., `occt.worker.ts`). - - For a detailed explanation of how to set up the Web Worker files (`occt.worker.ts`, `jscad.worker.ts`, `manifold.worker.ts`), please refer to our [**PlayCanvas Integration Starter Tutorial**](./start-with-playcanvas). This current tutorial focuses on the application logic built upon that foundation. + + Starting with version 0.21.1, Bitbybit provides a simplified initialization helper that handles worker creation automatically from CDN. For more details, see the [**PlayCanvas Integration Starter Tutorial**](./start-with-playcanvas). If you need to host assets on your own infrastructure, see [Self-Hosting Assets](/learn/hosting-and-cdn). ## 1. HTML Setup (`index.html`) @@ -118,10 +116,10 @@ This is the heart of our application, orchestrating all the major components. {`import './style.css'; -import { BitByBitBase, Inputs } from '@bitbybit-dev/playcanvas'; -import { model, type KernelOptions, current } from './models'; +import { BitByBitBase, Inputs } from '@bitbybit-dev/core'; +import { initBitByBit, type InitBitByBitOptions } from '@bitbybit-dev/playcanvas'; +import { model, current } from './models'; import { - initKernels, initPlayCanvas, createGui, createShapeLod1, @@ -135,7 +133,7 @@ import { } from './helpers'; // Configure which geometry kernels to enable -const kernelOptions: KernelOptions = { +const options: InitBitByBitOptions = { enableOCCT: true, // We'll use OCCT for this parametric model enableJSCAD: false, enableManifold: false, @@ -151,7 +149,7 @@ async function start() { // 2. Initialize Bitbybit with the PlayCanvas app and selected kernels const bitbybit = new BitByBitBase(); - await initKernels(app, bitbybit, kernelOptions); + await initBitByBit(app, bitbybit, options); // Variables to hold the OCCT shape representation and shapes to clean up let finalShape: Inputs.OCCT.TopoDSShapePointer | undefined; @@ -222,11 +220,11 @@ async function start() { **Explanation of `main.ts`:** -1. **Imports:** Pulls in necessary Bitbybit modules, data models, and helper functions. -2. **`kernelOptions`:** Configures which Bitbybit geometry kernels (OCCT, JSCAD, Manifold) will be initialized. For this example, only OCCT is enabled as it's used for the parametric modeling. +1. **Imports:** Pulls in necessary Bitbybit modules, data models, and helper functions. The `initBitByBit` helper and `InitBitByBitOptions` type are imported from `@bitbybit-dev/playcanvas`. +2. **`options`:** Configures which Bitbybit geometry kernels (OCCT, JSCAD, Manifold) will be initialized using the `InitBitByBitOptions` type. For this example, only OCCT is enabled as it's used for the parametric modeling. 3. **`start()` function:** The main asynchronous function that orchestrates the application. * **`initPlayCanvas()` & `createLightsAndGround()`:** Sets up the basic PlayCanvas environment. - * **`BitByBitBase` & `initKernels()`:** Initializes the Bitbybit library, linking it to the PlayCanvas app and loading the configured OCCT kernel worker. + * **`BitByBitBase` & `initBitByBit()`:** Initializes the Bitbybit library by calling the `initBitByBit(app, bitbybit, options)` helper function. This automatically creates workers from CDN and initializes the selected geometry kernels. * **`finalShape` & `shapesToClean`:** `finalShape` will hold a reference to the main OCCT geometry. `shapesToClean` is crucial for managing memory in OCCT by keeping track of intermediate shapes that need to be explicitly deleted after they are no longer needed. * **Download Functions:** Attaches download helper functions to the `model` object. These will be triggered by buttons in the GUI. * **`createGui()`:** Initializes the `lil-gui` panel, connecting its controls to the properties defined in `model.ts` and providing the `updateShape` function as a callback when parameters change. @@ -244,32 +242,14 @@ async function start() { The `helpers` directory modularizes different aspects of the application. -### `init-playcanvas.ts` & `init-kernels.ts` +### `init-playcanvas.ts` * **`initPlayCanvas()`:** Contains PlayCanvas setup for the application, camera, lighting (directional and ambient), a ground plane, and camera controls. It also starts the application. * **`createLightsAndGround()`:** A helper to specifically add directional lights (for shadows) and a ground plane to the app. -* **`initKernels()`:** This function is responsible for: - 1. Conditionally creating Web Worker instances for each kernel specified in `kernelOptions`. - 2. Calling `bitbybit.init(...)` to link Bitbybit with the PlayCanvas app and these worker instances. - 3. Asynchronously waiting for each selected and available kernel to report that it has been fully initialized before resolving. This ensures kernels are ready before use. - - -{`// ... imports ... -export async function initKernels( - app: pc.Application, - bitbybit: BitByBitBase, - options: KernelOptions -): Promise<{ message: string }> { - // 1. Conditionally create worker instances based on options - // (e.g., new Worker(new URL('../workers/occt.worker.ts', import.meta.url), ...)) - // 2. Initialize Bitbybit with app and worker instances - // await bitbybit.init(app, occtWorker, jscadWorker, manifoldWorker); - // 3. Collect and await promises for kernel initializations - // (e.g., using firstValueFrom on bitbybit.occtWorkerManager.occWorkerState$) - // 4. Resolve once selected kernels are ready - return { message: "Kernels initialized" }; -}`} - + + + Note that kernel initialization is now handled by the `initBitByBit()` helper function from `@bitbybit-dev/playcanvas`. This function automatically creates workers from CDN and initializes the selected geometry kernels based on the `InitBitByBitOptions` configuration. No separate `init-kernels.ts` file is needed. + ### `create-shape.ts` (Core Geometry Logic) @@ -344,9 +324,12 @@ Simple utility functions to manage the UI during processing: ## 4. Data Models (`src/models/`) * **`current.ts`:** Defines a `Current` type and an instance to hold references to currently active PlayCanvas entities (like entities for different model parts, lights, ground) and the `lil-gui` instance. This helps in easily accessing and manipulating these objects from different parts of the code. -* **`kernel-options.ts`:** Defines the `KernelOptions` interface used in `main.ts` to specify which geometry kernels (OCCT, JSCAD, Manifold) should be initialized by Bitbybit. * **`model.ts`:** Defines the `Model` type and a default `model` object. This object holds all the parameters that control the geometry of the 3D shape (e.g., `uHex`, `vHex`, `height`, colors, precision). The `lil-gui` directly manipulates this object. It also includes optional function signatures for `update` and download methods, which are later assigned in `main.ts` and `create-gui.ts`. + + Note that the `KernelOptions` type is no longer needed as a separate file. The `InitBitByBitOptions` type is now imported directly from `@bitbybit-dev/playcanvas` and used to configure which geometry kernels to initialize. + + ## 5. Styles (`style.css`) The `style.css` file provides basic styling: diff --git a/docs/learn/npm-packages/playcanvas/hex-house-concept.md b/docs/learn/npm-packages/playcanvas/hex-house-concept.md index 384e6da13..338572969 100644 --- a/docs/learn/npm-packages/playcanvas/hex-house-concept.md +++ b/docs/learn/npm-packages/playcanvas/hex-house-concept.md @@ -51,8 +51,8 @@ This example will demonstrate how to:

This tutorial focuses on the core application logic for generating the Hex House with PlayCanvas. For a detailed explanation of:

Here, we'll concentrate on the essential files and logic that bring the Hex House concept to life: main.ts, create-gui.ts, and particularly create-shape.ts.

@@ -101,17 +101,18 @@ This file coordinates the setup and dynamic updates of our Hex House within the {`import './style.css'; -import { BitByBitBase, Inputs } from '@bitbybit-dev/playcanvas'; // PlayCanvas integration -import { model, type KernelOptions, current } from './models'; +import { BitByBitBase, Inputs } from '@bitbybit-dev/core'; // Core package +import { initBitByBit, type InitBitByBitOptions } from '@bitbybit-dev/playcanvas'; // PlayCanvas integration +import { model, current } from './models'; import { - initKernels, initPlayCanvas, createGui, createShape, + initPlayCanvas, createGui, createShape, createLightsAndGround, disableGUI, enableGUI, hideSpinner, showSpinner, downloadSTEP } from './helpers'; import * as pc from 'playcanvas'; // Configure which geometry kernels to enable -const kernelOptions: KernelOptions = { +const options: InitBitByBitOptions = { enableOCCT: true, // This example relies heavily on OCCT for its CAD operations enableJSCAD: false, enableManifold: false, @@ -128,7 +129,7 @@ async function start() { // 2. Initialize Bitbybit, linking it to the PlayCanvas app and selected kernels const bitbybit = new BitByBitBase(); - await initKernels(app, bitbybit, kernelOptions); // From helpers/init-kernels.ts + await initBitByBit(app, bitbybit, options); // Automatically creates workers from CDN // Variables to hold the OCCT shape representation and shapes to clean up let finalShape: Inputs.OCCT.TopoDSShapePointer | undefined; @@ -189,7 +190,7 @@ async function start() { **Core Logic in `main.ts`:** 1. Initializes the PlayCanvas application using `initPlayCanvas()` and adds lighting/ground via `createLightsAndGround()`. -2. Initializes `BitByBitBase` for PlayCanvas and then the OCCT kernel using `initKernels()`. +2. Initializes `BitByBitBase` for PlayCanvas and then the OCCT kernel using `initBitByBit()` from `@bitbybit-dev/playcanvas`, which automatically creates workers from CDN. 3. Sets up download functions and the `lil-gui` interface through `createGui()`. Changes in the GUI trigger `updateShape`. 4. A simple `rotateEntities` animation is tied to PlayCanvas's update loop. 5. The `updateShape` function is central to interactivity: @@ -198,7 +199,7 @@ async function start() { ## 3. Essential Helper Functions (`src/helpers/`) -We'll focus on the provided `create-gui.ts` and `create-shape.ts`. For `init-playcanvas.ts` and `init-kernels.ts`, their roles are analogous to those described in the "Advanced Parametric Model (PlayCanvas)" tutorial (setting up the PlayCanvas environment and initializing Bitbybit kernels, respectively). +We'll focus on the provided `create-gui.ts` and `create-shape.ts`. For `init-playcanvas.ts`, its role is to set up the PlayCanvas environment as described in the "Advanced Parametric Model (PlayCanvas)" tutorial. Note that kernel initialization is now handled by the `initBitByBit()` helper from `@bitbybit-dev/playcanvas`. ### Creating the GUI (`create-gui.ts`) diff --git a/docs/learn/npm-packages/playcanvas/start-with-playcanvas.md b/docs/learn/npm-packages/playcanvas/start-with-playcanvas.md index 4e3efa4f0..e5a6c357e 100644 --- a/docs/learn/npm-packages/playcanvas/start-with-playcanvas.md +++ b/docs/learn/npm-packages/playcanvas/start-with-playcanvas.md @@ -1,7 +1,7 @@ --- -sidebar_position: 2 -title: Using Bitbybit with PlayCanvas -sidebar_label: PlayCanvas Starter Template +sidebar_position: 1 +title: Quick Start with PlayCanvas +sidebar_label: Quick Start description: Learn how to set up and use the @bitbybit-dev/playcanvas package with Vite to create 3D CAD applications, and control which geometry kernels (OCCT, JSCAD, Manifold) are initialized. tags: [npm-packages, playcanvas, occt, manifold, jscad] --- @@ -12,20 +12,41 @@ import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; import CodeBlock from '@theme/CodeBlock'; -# Using Bitbybit with PlayCanvas +# Quick Start with PlayCanvas -This guide will walk you through setting up and using the `@bitbybit-dev/playcanvas` package to integrate Bitbybit's 3D CAD functionalities into your PlayCanvas applications. We'll use Vite as our build tool, which simplifies the setup process. +Get up and running with Bitbybit and PlayCanvas in under 2 minutes! + +## Fastest Way: Use NPX Scaffolding + + +{`npx @bitbybit-dev/create-app my-project --engine playcanvas +cd my-project +npm install +npm run dev`} + + +This creates a complete project with Vite, TypeScript, and all three CAD kernels (OCCT, JSCAD, Manifold) pre-configured. + + +Check out the [Getting Started with PlayCanvas](/learn/getting-started/engines/playcanvas) page for an overview of all integration approaches including runners. + + +--- + +## Manual Setup (Alternative) + +If you prefer to set up the project manually or integrate into an existing project, follow these steps. The `@bitbybit-dev/playcanvas` package conveniently includes `playcanvas` as a dependency, so you don't need to install it separately. -## Prerequisites +### Prerequisites * Node.js and npm (or yarn) installed. * A basic understanding of TypeScript and PlayCanvas. -## [Example on Bitbybit Github Repo](https://github.com/bitbybit-dev/bitbybit/tree/master/examples/vite/playcanvas/starter-template) +### [Example on Bitbybit Github Repo](https://github.com/bitbybit-dev/bitbybit/tree/master/examples/vite/playcanvas/starter-template) -## 1. Project Setup with Vite +### 1. Project Setup with Vite First, create a new Vite project with a TypeScript template: @@ -36,7 +57,7 @@ First, create a new Vite project with a TypeScript template: cd my-bitbybit-playcanvas-app`} -Next, install the Bitbybit PlayCanvas package and its necessary worker dependencies: +Next, install the Bitbybit PlayCanvas package: {`npm install @bitbybit-dev/playcanvas @@ -82,380 +103,78 @@ This is a standard HTML setup. The key parts are: - ``: This is where our 3D scene will be drawn. - ``: This loads our main TypeScript application logic. -## 3. Setting up Web Workers - -Bitbybit utilizes Web Workers to run computationally intensive geometry kernels (OCCT, JSCAD, Manifold) off the main browser thread, preventing UI freezes. You need to create simple worker files that initialize these kernels. - -Create a `workers` directory inside your `src` folder (`src/workers/`). - - - - - -{`import initOpenCascade from '@bitbybit-dev/occt/bitbybit-dev-occt/cdn'; -import type { OpenCascadeInstance } from '@bitbybit-dev/occt/bitbybit-dev-occt/bitbybit-dev-occt.js'; -import { - initializationComplete, - onMessageInput, -} from '@bitbybit-dev/occt-worker'; - -// Initialize OpenCascade (OCCT) -initOpenCascade().then((occ: OpenCascadeInstance) => { - // Notify the main thread that OCCT is ready - initializationComplete(occ, undefined); -}); - -// Listen for messages from the main thread -addEventListener('message', ({ data }) => { - // Process messages using the occt-worker helper - onMessageInput(data, postMessage); -});`} - -**Explanation:** -- Imports `initOpenCascade` to load the OCCT WebAssembly module. -- Calls `initializationComplete` once OCCT is loaded, signaling to the main Bitbybit instance that this kernel is ready. -- `onMessageInput` handles communication between the main thread and the OCCT worker. - - - - - -{`import { - initializationComplete, - onMessageInput, -} from '@bitbybit-dev/jscad-worker'; - -// Dynamically import and initialize JSCAD -import('@bitbybit-dev/jscad/jscad-generated').then((s) => { - // Notify the main thread that JSCAD is ready - initializationComplete(s.default()); -}); - -// Listen for messages from the main thread -addEventListener('message', ({ data }) => { - // Process messages using the jscad-worker helper - onMessageInput(data, postMessage); -});`} - -**Explanation:** -- Dynamically imports the JSCAD module. -- Calls `initializationComplete` once JSCAD is loaded. -- `onMessageInput` handles communication. - - - - - -{`import { - initializationComplete, - onMessageInput, -} from '@bitbybit-dev/manifold-worker'; -import Module from 'manifold-3d'; // Imports the Manifold JS bindings - -const init = async () => { - // Initialize the Manifold WASM module - const wasm = await Module({ - // Manifold requires its WASM file to be loaded. - // This CDN link provides a hosted version. - // For production, you might want to host this yourself. - locateFile: () => { - return 'https://cdn.jsdelivr.net/gh/bitbybit-dev/bitbybit-assets@0.21.0/wasm/manifold-3-3-2.wasm'; - }, - }); - wasm.setup(); // Additional setup step for Manifold - // Notify the main thread that Manifold is ready - initializationComplete(wasm); -}; - -init(); - -// Listen for messages from the main thread -addEventListener('message', ({ data }) => { - // Process messages using the manifold-worker helper - onMessageInput(data, postMessage); -});`} - -**Explanation:** -- Imports the `manifold-3d` JavaScript bindings. -- The `Module` function initializes the Manifold WASM. The `locateFile` function is crucial for pointing to the Manifold WASM file. -- Calls `initializationComplete` after setup. -- `onMessageInput` handles communication. - - - - - - Vite handles these worker files automatically when you instantiate them using `new Worker(new URL('./path/to/worker.ts', import.meta.url), ...)`. Ensure the paths in `main.ts` correctly point to these files within your `src/workers/` directory. - - -## 4. Main Application Logic (`main.ts`) +## 3. Main Application Logic (`main.ts`) Replace the content of `src/main.ts` with the following: {`import './style.css'; // Basic styling -import { BitByBitBase, Inputs } from '@bitbybit-dev/playcanvas'; -import { OccStateEnum } from '@bitbybit-dev/occt-worker'; -import { JscadStateEnum } from '@bitbybit-dev/jscad-worker'; -import { ManifoldStateEnum } from '@bitbybit-dev/manifold-worker'; - -import { first, firstValueFrom, map } from 'rxjs'; import { - Application, - Color, - Entity, - FILLMODE_FILL_WINDOW, - Mouse, - RESOLUTION_AUTO, - TouchDevice, -} from 'playcanvas'; - -// Define an interface for kernel options -interface KernelOptions { - enableOCCT: boolean; - enableJSCAD: boolean; - enableManifold: boolean; -} + BitByBitBase, + Inputs, + initBitByBit, + initPlayCanvas, + type InitBitByBitOptions, +} from '@bitbybit-dev/playcanvas'; // --- 1. Main Application Entry Point --- start(); async function start() { - // Initialize basic PlayCanvas scene - const { app, scene, camera } = initPlayCanvas(); - + // Initialize PlayCanvas scene using Bitbybit's helper function + const sceneOptions = new Inputs.PlayCanvasScene.InitPlayCanvasDto(); + sceneOptions.canvasId = 'playcanvas-canvas'; + sceneOptions.sceneSize = 10; + + const { scene, app } = initPlayCanvas(sceneOptions); + // Create an instance of BitByBitBase for PlayCanvas const bitbybit = new BitByBitBase(); // --- 2. Configure and Initialize Kernels --- - // Users can control which kernels are loaded - const kernelOptions: KernelOptions = { + // Users can control which kernels are loaded. + // The initBitByBit helper function handles all worker setup automatically + // by loading the kernels from CDN. + const options: InitBitByBitOptions = { enableOCCT: true, enableJSCAD: true, enableManifold: true, }; + // Initialize Bitbybit with the selected kernels - await initWithKernels(app, scene, bitbybit, kernelOptions); - - // Setup orbit camera controls using bitbybit library - const cameraOptions = new Inputs.PlayCanvasCamera.OrbitCameraDto(); - cameraOptions.distance = 125; - cameraOptions.pitch = -24; - cameraOptions.yaw = 27; - cameraOptions.frameOnStart = false; - cameraOptions.inertiaFactor = 0.2; - cameraOptions.distanceSensitivity = 0.3; - cameraOptions.focusEntity = camera; - bitbybit.playcanvas.camera.orbitCamera.create(cameraOptions); + await initBitByBit(app, scene, bitbybit, options); // --- 3. Create Geometry with Active Kernels --- - if (kernelOptions.enableOCCT) { - await createOCCTGeometry(bitbybit, '#ff0000'); // Red - } - if (kernelOptions.enableManifold) { - await createManifoldGeometry(bitbybit, '#00ff00'); // Green - } - if (kernelOptions.enableJSCAD) { - await createJSCADGeometry(bitbybit, '#0000ff'); // Blue - } -} - -// --- 4. PlayCanvas Scene Initialization --- -function initPlayCanvas() { - const canvas = document.getElementById('playcanvas-canvas') as HTMLCanvasElement; - - // Create a PlayCanvas application - const app = new Application(canvas, { - graphicsDeviceOptions: { - antialias: true, - alpha: false, - }, - mouse: new Mouse(canvas), - touch: new TouchDevice(canvas), - }); - - // Fill the window and automatically change resolution to be the same as the canvas size - app.setCanvasFillMode(FILLMODE_FILL_WINDOW); - app.setCanvasResolution(RESOLUTION_AUTO); - - // Ensure canvas is resized when window changes size - window.addEventListener('resize', () => app.resizeCanvas()); - - // Create root scene entity - const scene = new Entity('scene'); - app.root.addChild(scene); - - // Create camera entity - const camera = new Entity('camera'); - camera.addComponent('camera', { - clearColor: new Color(0x1a / 255, 0x1c / 255, 0x1f / 255, 1), - fov: 70, - nearClip: 0.1, - farClip: 1000, - }); - scene.addChild(camera); - - // Create directional light - const light = new Entity('directionalLight'); - light.addComponent('light', { - type: 'directional', - color: new Color(1, 1, 1), - intensity: 1, - }); - light.setEulerAngles(45, 30, 0); - scene.addChild(light); - - // Create ambient/hemisphere-like lighting - app.scene.ambientLight = new Color(0.4, 0.4, 0.4); - - // Start the application update loop - app.start(); - - return { app, scene, camera }; -} - -// --- 5. Bitbybit Kernel Initialization Logic --- -async function initWithKernels( - app: pc.AppBase, - scene: pc.Entity, - bitbybit: BitByBitBase, - options: KernelOptions -): Promise<{ message: string; initializedKernels: string[] }> { - let occtWorkerInstance: Worker | undefined; - let jscadWorkerInstance: Worker | undefined; - let manifoldWorkerInstance: Worker | undefined; - - // 1. Conditionally create worker instances if (options.enableOCCT) { - occtWorkerInstance = new Worker( - new URL('./workers/occt.worker.ts', import.meta.url), - { name: 'OCC_WORKER', type: 'module' } - ); - } - if (options.enableJSCAD) { - jscadWorkerInstance = new Worker( - new URL('./workers/jscad.worker.ts', import.meta.url), - { name: 'JSCAD_WORKER', type: 'module' } - ); + await createOCCTGeometry(bitbybit, '#ff0000'); // Red } if (options.enableManifold) { - manifoldWorkerInstance = new Worker( - new URL('./workers/manifold.worker.ts', import.meta.url), - { name: 'MANIFOLD_WORKER', type: 'module' } - ); - } - - // 2. Initialize Bitbybit with PlayCanvas app and scene - bitbybit.init( - app, - scene, - occtWorkerInstance, - jscadWorkerInstance, - manifoldWorkerInstance - ); - - // 3. Collect promises for kernel initializations - const initializationPromises: Promise[] = []; - let anyKernelSelectedForInit = false; - - if (options.enableOCCT) { - anyKernelSelectedForInit = true; - if (bitbybit.occtWorkerManager) { - initializationPromises.push( - firstValueFrom( - bitbybit.occtWorkerManager.occWorkerState$.pipe( - first((s) => s.state === OccStateEnum.initialised), - map(() => 'OCCT') - ) - ) - ); - } else { - console.warn( - 'OCCT enabled in options, but occtWorkerManager not found after init.' - ); - } + await createManifoldGeometry(bitbybit, '#00ff00'); // Green } - if (options.enableJSCAD) { - anyKernelSelectedForInit = true; - if (bitbybit.jscadWorkerManager) { - initializationPromises.push( - firstValueFrom( - bitbybit.jscadWorkerManager.jscadWorkerState$.pipe( - first((s) => s.state === JscadStateEnum.initialised), - map(() => 'JSCAD') - ) - ) - ); - } else { - console.warn( - 'JSCAD enabled in options, but jscadWorkerManager not found after init.' - ); - } - } - - if (options.enableManifold) { - anyKernelSelectedForInit = true; - if (bitbybit.manifoldWorkerManager && bitbybit.manifoldWorkerManager.manifoldWorkerState$) { - initializationPromises.push( - firstValueFrom( - bitbybit.manifoldWorkerManager.manifoldWorkerState$.pipe( - first((s) => s.state === ManifoldStateEnum.initialised), - map(() => 'Manifold') - ) - ) - ); - } else { - console.warn( - 'Manifold enabled in options, but manifoldWorkerManager not found after init.' - ); - } - } - - // 4. Wait for selected & available kernels or handle no selection/availability - if (!anyKernelSelectedForInit) { - console.log('No kernels selected for initialization.'); - return { message: 'No kernels selected for initialization.', initializedKernels: [] }; - } - - if (initializationPromises.length === 0) { - console.log( - 'Kernels were selected, but none had managers available for awaiting initialization.' - ); - return { - message: 'Selected kernels were not awaitable for initialization state.', - initializedKernels: [], - }; + await createJSCADGeometry(bitbybit, '#0000ff'); // Blue } - - const initializedKernels = await Promise.all(initializationPromises); - console.log('Kernels initialized:', initializedKernels.join(', ')); - console.log('Kernels initialized:', initializedKernels.join(', ')); - return { - message: \`Successfully initialized: \${initializedKernels.join(', ')}\`, - initializedKernels, - }; } -// --- 6. Geometry Creation Functions (Examples) --- +// --- 4. Geometry Creation Functions (Examples) --- async function createOCCTGeometry(bitbybit: BitByBitBase, color: string) { console.log('Creating OCCT geometry...'); const cubeOptions = new Inputs.OCCT.CubeDto(); - cubeOptions.size = 25; - cubeOptions.center = [0, 0, 0]; + cubeOptions.size = 2.5; + cubeOptions.center = [0, 1.25, 0]; const cube = await bitbybit.occt.shapes.solid.createCube(cubeOptions); const filletOptions = new Inputs.OCCT.FilletDto(); filletOptions.shape = cube; - filletOptions.radius = 4; + filletOptions.radius = 0.4; const roundedCube = await bitbybit.occt.fillets.filletEdges(filletOptions); const drawOptions = new Inputs.Draw.DrawOcctShapeOptions(); - drawOptions.edgeWidth = 5; + drawOptions.edgeWidth = 0.5; drawOptions.faceColour = color; drawOptions.drawVertices = true; - drawOptions.vertexSize = 0.5; + drawOptions.vertexSize = 0.05; drawOptions.vertexColour = '#ffffff'; await bitbybit.draw.drawAnyAsync({ entity: roundedCube, @@ -467,11 +186,12 @@ async function createOCCTGeometry(bitbybit: BitByBitBase, color: string) { async function createManifoldGeometry(bitbybit: BitByBitBase, color: string) { console.log('Creating Manifold geometry...'); const sphereOptions = new Inputs.Manifold.SphereDto(); - sphereOptions.radius = 15; + sphereOptions.radius = 1.5; + sphereOptions.circularSegments = 32; const sphere = await bitbybit.manifold.manifold.shapes.sphere(sphereOptions); const cubeOptions = new Inputs.Manifold.CubeDto(); - cubeOptions.size = 25; + cubeOptions.size = 2.5; const cube = await bitbybit.manifold.manifold.shapes.cube(cubeOptions); const diffedShape = await bitbybit.manifold.manifold.booleans.differenceTwo({ @@ -481,7 +201,7 @@ async function createManifoldGeometry(bitbybit: BitByBitBase, color: string) { const translationOptions = new Inputs.Manifold.TranslateDto(); translationOptions.manifold = diffedShape; - translationOptions.vector = [0, -40, 0]; // Position below OCCT + translationOptions.vector = [0, 1.25, -4]; // Position below OCCT const movedShape = await bitbybit.manifold.manifold.transforms.translate( translationOptions ); @@ -498,16 +218,15 @@ async function createManifoldGeometry(bitbybit: BitByBitBase, color: string) { async function createJSCADGeometry(bitbybit: BitByBitBase, color: string) { console.log('Creating JSCAD geometry...'); const geodesicSphereOptions = new Inputs.JSCAD.GeodesicSphereDto(); - geodesicSphereOptions.radius = 15; - geodesicSphereOptions.center = [0, 40, 0]; // Position above OCCT + geodesicSphereOptions.radius = 1.5; + geodesicSphereOptions.center = [0, 1.5, 4]; // Position above OCCT const geodesicSphere = await bitbybit.jscad.shapes.geodesicSphere( geodesicSphereOptions ); - // Example: Create another simple sphere for a boolean operation const sphereOptions = new Inputs.JSCAD.SphereDto(); - sphereOptions.radius = 10; // Smaller sphere - sphereOptions.center = [5, 45, 0]; // Slightly offset + sphereOptions.radius = 1; + sphereOptions.center = [0, 3, 4.5]; const simpleSphere = await bitbybit.jscad.shapes.sphere(sphereOptions); const unionOptions = new Inputs.JSCAD.BooleanTwoObjectsDto(); @@ -516,7 +235,7 @@ async function createJSCADGeometry(bitbybit: BitByBitBase, color: string) { const unionShape = await bitbybit.jscad.booleans.unionTwo(unionOptions); const drawOptions = new Inputs.Draw.DrawBasicGeometryOptions(); - drawOptions.colours = color; // Note: 'colours' for JSCAD draw options + drawOptions.colours = color; await bitbybit.draw.drawAnyAsync({ entity: unionShape, options: drawOptions, @@ -528,44 +247,23 @@ async function createJSCADGeometry(bitbybit: BitByBitBase, color: string) { ### Explanation of `main.ts`: 1. **Imports:** - * `BitByBitBase` and `Inputs`: Core components from `@bitbybit-dev/playcanvas`. `Inputs` provides DTOs (Data Transfer Objects) for specifying parameters for geometry operations. - * `...StateEnum`: Enums used to check the initialization state of each kernel worker. - * PlayCanvas modules (`Application`, `Color`, `Entity`, etc.) for scene setup. - * `first`, `firstValueFrom`, `map` from `rxjs`: Used to subscribe to and transform the kernel state observables. - -2. **`KernelOptions` Interface:** Defines the structure for selecting which kernels to initialize. + * `BitByBitBase`, `Inputs`, `initBitByBit`, `initPlayCanvas`, and `InitBitByBitOptions`: Core components from `@bitbybit-dev/playcanvas`. `Inputs` provides DTOs (Data Transfer Objects) for specifying parameters for geometry operations and scene configuration. `initBitByBit` is the helper function that handles all kernel initialization automatically, `initPlayCanvas` sets up the PlayCanvas scene, and `InitBitByBitOptions` is the type for kernel configuration options. -3. **`start()` function (Main Entry Point):** - * Calls `initPlayCanvas()` to set up the basic PlayCanvas application, scene entity, camera, and lights. +2. **`start()` function (Main Entry Point):** + * Uses `Inputs.PlayCanvasScene.InitPlayCanvasDto()` to configure scene options like canvas ID and scene size. + * Calls `initPlayCanvas(sceneOptions)` to set up the complete PlayCanvas environment (application, scene entity, camera, lights) with a single function call. * Creates an instance of `BitByBitBase`. - * **`kernelOptions`**: This object is key. By setting `enableOCCT`, `enableJSCAD`, and `enableManifold` to `true` or `false`, you control which kernels Bitbybit attempts to initialize. This allows for optimizing load times and resource usage if not all kernels are needed. - * Calls `initWithKernels()` to initialize Bitbybit with the selected kernels. - * Sets up orbit camera controls using bitbybit's built-in camera helper. + * **`options`**: This object is key. By setting `enableOCCT`, `enableJSCAD`, and `enableManifold` to `true` or `false`, you control which kernels Bitbybit attempts to initialize. This allows for optimizing load times and resource usage if not all kernels are needed. + * **`initBitByBit()`**: This helper function handles all the complexity of initializing Bitbybit with the selected kernels. It automatically creates web workers, loads kernel WASM files from CDN, and waits for all selected kernels to be ready. You pass the app, scene, the bitbybit instance, and your options. * Conditionally calls geometry creation functions based on which kernels were enabled. -4. **`initPlayCanvas()` function:** - * Creates a PlayCanvas `Application` instance with the canvas element. - * Sets up proper canvas fill mode and resolution handling. - * Creates a root `scene` entity and adds it to the app root. - * Creates a `camera` entity with configured clear color, FOV, and clipping planes. - * Adds directional and ambient lighting. - * Starts the application and returns the `app`, `scene`, and `camera`. - -5. **`initWithKernels()` function:** - * This is the core of Bitbybit's initialization. - * Conditionally creates `Worker` instances for OCCT, JSCAD, and Manifold based on the `options` passed in. - * Calls `bitbybit.init(app, scene, occtWorkerInstance, jscadWorkerInstance, manifoldWorkerInstance)`. Both the PlayCanvas `app` and `scene` entity are passed. - * Uses RxJS `pipe(first(...), map(...))` to subscribe to the state observables of each enabled kernel and transform the result to a string identifying the kernel. - * The `Promise` resolves only after all selected kernels have emitted an `initialised` state. - * Returns an object with a message and an array of initialized kernel names. - -6. **Geometry Creation Functions:** +3. **Geometry Creation Functions:** * These demonstrate how to use the APIs for each kernel. * **`Inputs` DTOs**: Typed objects to pass parameters to Bitbybit's geometry functions. * **API Structure**: Operations are namespaced under `bitbybit.occt.*`, `bitbybit.manifold.*`, and `bitbybit.jscad.*`. * **Drawing**: `bitbybit.draw.drawAnyAsync()` renders entities into the PlayCanvas scene. The OCCT draw options now support additional properties like `edgeWidth`, `drawVertices`, `vertexSize`, and `vertexColour`. -## 5. Basic Styling (Optional) +## 4. Basic Styling (Optional) Create an `src/style.css` file: @@ -583,7 +281,7 @@ Create an `src/style.css` file: }`} -## 6. Running the Application +## 5. Running the Application {`npm run dev @@ -608,11 +306,11 @@ You can explore and interact with a live example of this setup on StackBlitz: ## Key Takeaways -* **Vite Simplifies Setup:** Vite handles worker bundling and module resolution effectively. -* **`KernelOptions` for Control:** You have fine-grained control over which geometry kernels are loaded, allowing you to tailor the application to specific needs and optimize performance. +* **Vite Simplifies Setup:** Vite handles module resolution effectively for a smooth development experience. +* **`initBitByBit()` for Easy Initialization:** The `initBitByBit()` helper function handles all the complexity of creating web workers and loading kernel WASM files from CDN. You simply configure which kernels to enable. If you need to host assets on your own infrastructure, see [Self-Hosting Assets](/learn/hosting-and-cdn). +* **`InitBitByBitOptions` for Control:** You have fine-grained control over which geometry kernels are loaded, allowing you to tailor the application to specific needs and optimize performance. * **Asynchronous Operations:** Most Bitbybit operations are `async` because they communicate with Web Workers. * **`Inputs` DTOs:** Use these typed objects to configure geometry operations. -* **Separate Worker Files:** Each kernel runs in its own dedicated worker. * **Modular Design:** The `@bitbybit-dev/playcanvas` package neatly integrates these complex components for use with PlayCanvas. * **Entity-Based Rendering:** PlayCanvas uses an entity-component system, and Bitbybit creates entities that are added to the app root. diff --git a/docs/learn/npm-packages/threejs/intro.md b/docs/learn/npm-packages/threejs/about-threejs.md similarity index 98% rename from docs/learn/npm-packages/threejs/intro.md rename to docs/learn/npm-packages/threejs/about-threejs.md index 80cc13f0b..189ebf1bc 100644 --- a/docs/learn/npm-packages/threejs/intro.md +++ b/docs/learn/npm-packages/threejs/about-threejs.md @@ -1,7 +1,7 @@ --- -sidebar_position: 1 -title: "Introduction to ThreeJS" -sidebar_label: "ThreeJS Overview" +sidebar_position: 2 +title: "About ThreeJS" +sidebar_label: "About ThreeJS" description: "An overview of ThreeJS, a powerful JavaScript library for creating and displaying 3D graphics in web browsers, and how it's integrated with Bitbybit." tags: [npm-packages, threejs] --- diff --git a/docs/learn/npm-packages/threejs/advanced-parametric-3d-model.md b/docs/learn/npm-packages/threejs/advanced-parametric-3d-model.md index d5fbda49f..485b2eb06 100644 --- a/docs/learn/npm-packages/threejs/advanced-parametric-3d-model.md +++ b/docs/learn/npm-packages/threejs/advanced-parametric-3d-model.md @@ -55,18 +55,16 @@ This project is typically structured with: * `index.html`: The main HTML file to host the canvas and load scripts. * `style.css`: For basic styling of the page and UI elements like a loading spinner. * `src/main.ts`: The main entry point of our application, orchestrating scene setup, Bitbybit initialization, GUI, and geometry updates. -* `src/models/`: A directory to define data structures for our model parameters (`model.ts`), kernel initialization options (`kernel-options.ts`), and current scene state (`current.ts`). +* `src/models/`: A directory to define data structures for our model parameters (`model.ts`) and current scene state (`current.ts`). * `src/helpers/`: A directory for utility functions, broken down by responsibility: * `init-threejs.ts`: Sets up the ThreeJS scene, camera, renderer, lights, and ground. - * `init-kernels.ts`: Handles the initialization of selected Bitbybit geometry kernels. * `create-shape.ts`: Contains the core logic for generating the parametric 3D geometry using OCCT. This is where the detailed CAD operations happen. * `create-gui.ts`: Sets up the `lil-gui` panel and links its controls to the model parameters and update functions. * `downloads.ts`: Implements functions for exporting the model to various file formats. * `gui-helper.ts`: Provides utility functions for managing the GUI state (e.g., showing/hiding a spinner, disabling/enabling GUI). -* `src/workers/`: Directory containing the individual worker files for each geometry kernel (e.g., `occt.worker.ts`). - - For a detailed explanation of how to set up the Web Worker files (`occt.worker.ts`, `jscad.worker.ts`, `manifold.worker.ts`), please refer to our [**ThreeJS Integration Starter Tutorial**](./start-with-three-js). This current tutorial focuses on the application logic built upon that foundation. + + Since version 0.21.1, Bitbybit provides a simplified `initBitByBit()` helper function that handles all worker creation and kernel initialization automatically by loading kernels from CDN. This eliminates the need for manual worker file setup. For details, see our [**ThreeJS Integration Starter Tutorial**](./start-with-three-js). If you need to host assets on your own infrastructure, see [Self-Hosting Assets](/learn/hosting-and-cdn). ## 1. HTML Setup (`index.html`) @@ -114,10 +112,14 @@ This is the heart of our application, orchestrating all the major components. {`import './style.css'; -import { BitByBitBase, Inputs } from '@bitbybit-dev/threejs'; -import { model, type KernelOptions, current } from './models'; import { - initKernels, + BitByBitBase, + Inputs, + initBitByBit, + type InitBitByBitOptions, +} from '@bitbybit-dev/threejs'; +import { model, current } from './models'; +import { initThreeJS, createGui, createShapeLod1, @@ -133,7 +135,7 @@ import { } from './helpers'; // Configure which geometry kernels to enable -const kernelOptions: KernelOptions = { +const options: InitBitByBitOptions = { enableOCCT: true, // We'll use OCCT for this parametric model enableJSCAD: false, enableManifold: false, @@ -149,7 +151,10 @@ async function start() { // 2. Initialize Bitbybit with the ThreeJS scene and selected kernels const bitbybit = new BitByBitBase(); - await initKernels(scene, bitbybit, kernelOptions); + + // Initialize Bitbybit with the selected geometry kernels using the helper function. + // This automatically creates workers and loads kernels from CDN. + await initBitByBit(scene, bitbybit, options); // Variables to hold the OCCT shape representation and shapes to clean up let finalShape: Inputs.OCCT.TopoDSShapePointer | undefined; @@ -222,11 +227,11 @@ async function start() { **Explanation of `main.ts`:** -1. **Imports:** Pulls in necessary Bitbybit modules, data models, and helper functions. -2. **`kernelOptions`:** Configures which Bitbybit geometry kernels (OCCT, JSCAD, Manifold) will be initialized. For this example, only OCCT is enabled as it's used for the parametric modeling. +1. **Imports:** Pulls in necessary Bitbybit modules (`BitByBitBase`, `Inputs`, `initBitByBit`, `InitBitByBitOptions`), data models, and helper functions. +2. **`options`:** Configures which Bitbybit geometry kernels (OCCT, JSCAD, Manifold) will be initialized. For this example, only OCCT is enabled as it's used for the parametric modeling. 3. **`start()` function:** The main asynchronous function that orchestrates the application. * **`initThreeJS()` & `createDirLightsAndGround()`:** Sets up the basic ThreeJS environment. - * **`BitByBitBase` & `initKernels()`:** Initializes the Bitbybit library, linking it to the ThreeJS scene and loading the configured OCCT kernel worker. + * **`BitByBitBase` & `initBitByBit()`:** Initializes the Bitbybit library with the ThreeJS scene. The `initBitByBit()` helper function automatically creates workers, loads kernel WASM files from CDN, and waits for the selected kernels to be ready. * **`finalShape` & `shapesToClean`:** `finalShape` will hold a reference to the main OCCT geometry. `shapesToClean` is crucial for managing memory in OCCT by keeping track of intermediate shapes that need to be explicitly deleted after they are no longer needed. * **Download Functions:** Attaches download helper functions to the `model` object. These will be triggered by buttons in the GUI. @@ -245,32 +250,10 @@ async function start() { The `helpers` directory modularizes different aspects of the application. -### `init-threejs.ts` & `init-kernels.ts` +### `init-threejs.ts` * **`initThreeJS()`:** Contains standard ThreeJS setup for scene, camera, WebGL renderer, basic lighting (HemisphereLight, DirectionalLights), a ground plane, and OrbitControls for camera manipulation. It also sets up the animation loop. * **`createDirLightsAndGround()`:** A helper to specifically add directional lights (for shadows) and a ground plane to the scene. -* **`initKernels()`:** This function is responsible for: - 1. Conditionally creating Web Worker instances for each kernel specified in `kernelOptions`. - 2. Calling `bitbybit.init(...)` to link Bitbybit with the ThreeJS scene and these worker instances. - 3. Asynchronously waiting for each selected and available kernel to report that it has been fully initialized before resolving. This ensures kernels are ready before use. - - -{`// ... imports ... -export async function initKernels( - scene: Scene, - bitbybit: BitByBitBase, - options: KernelOptions -): Promise<{ message: string }> { - // 1. Conditionally create worker instances based on options - // (e.g., new Worker(new URL('../workers/occt.worker.ts', import.meta.url), ...)) - // 2. Initialize Bitbybit with scene and worker instances - // await bitbybit.init(scene, occtWorker, jscadWorker, manifoldWorker); - // 3. Collect and await promises for kernel initializations - // (e.g., using firstValueFrom on bitbybit.occtWorkerManager.occWorkerState$) - // 4. Resolve once selected kernels are ready - return { message: "Kernels initialized" }; -}`} - ### `create-shape.ts` (Core Geometry Logic) @@ -348,7 +331,6 @@ Simple utility functions to manage the UI during processing: ## 4. Data Models (`src/models/`) * **`current.ts`:** Defines a `Current` type and an instance to hold references to currently active ThreeJS objects (like `Group`s for different model parts, lights, ground) and the `lil-gui` instance. This helps in easily accessing and manipulating these objects from different parts of the code. -* **`kernel-options.ts`:** Defines the `KernelOptions` interface used in `main.ts` to specify which geometry kernels (OCCT, JSCAD, Manifold) should be initialized by Bitbybit. * **`model.ts`:** Defines the `Model` type and a default `model` object. This object holds all the parameters that control the geometry of the 3D shape (e.g., `uHex`, `vHex`, `height`, colors, precision). The `lil-gui` directly manipulates this object. It also includes optional function signatures for `update` and download methods, which are later assigned in `main.ts` and `create-gui.ts`. ## 5. Styles (`style.css`) diff --git a/docs/learn/npm-packages/threejs/hex-house-concept.md b/docs/learn/npm-packages/threejs/hex-house-concept.md index 26ec9fcd5..211cd9270 100644 --- a/docs/learn/npm-packages/threejs/hex-house-concept.md +++ b/docs/learn/npm-packages/threejs/hex-house-concept.md @@ -48,8 +48,8 @@ This example will demonstrate how to:

This tutorial focuses on the core application logic for generating the Hex House with ThreeJS. For a detailed explanation of:

Here, we'll concentrate on the essential files and logic that bring the Hex House concept to life: main.ts, create-gui.ts, and particularly create-shape.ts.

@@ -98,16 +98,17 @@ This file coordinates the setup and dynamic updates of our Hex House within the {`import './style.css'; -import { BitByBitBase, Inputs } from '@bitbybit-dev/threejs'; // ThreeJS integration -import { model, type KernelOptions, current } from './models'; +import { BitByBitBase, Inputs } from '@bitbybit-dev/core'; // Core package +import { initBitByBit, type InitBitByBitOptions } from '@bitbybit-dev/threejs'; // ThreeJS integration +import { model, current } from './models'; import { - initKernels, initThreeJS, createGui, createShape, + initThreeJS, createGui, createShape, createDirLightsAndGround, disableGUI, enableGUI, hideSpinner, showSpinner, downloadGLB, downloadSTL, downloadStep, } from './helpers'; // Configure which geometry kernels to enable -const kernelOptions: KernelOptions = { +const options: InitBitByBitOptions = { enableOCCT: true, // This example relies heavily on OCCT for its CAD operations enableJSCAD: false, enableManifold: false, @@ -124,7 +125,7 @@ async function start() { // 2. Initialize Bitbybit, linking it to the ThreeJS scene and selected kernels const bitbybit = new BitByBitBase(); - await initKernels(scene, bitbybit, kernelOptions); // From helpers/init-kernels.ts + await initBitByBit(scene, bitbybit, options); // Automatically creates workers from CDN // Variables to hold the OCCT shape representation and shapes to clean up let finalShape: Inputs.OCCT.TopoDSShapePointer | undefined; @@ -193,7 +194,7 @@ async function start() { **Core Logic in `main.ts`:** 1. Initializes the ThreeJS scene using `initThreeJS()` and adds lighting/ground via `createDirLightsAndGround()`. -2. Initializes `BitByBitBase` for ThreeJS and then the OCCT kernel using `initKernels()`. +2. Initializes `BitByBitBase` for ThreeJS and then the OCCT kernel using `initBitByBit()` from `@bitbybit-dev/threejs`, which automatically creates workers from CDN. 3. Sets up download functions and the `lil-gui` interface through `createGui()`. Changes in the GUI trigger `updateShape`. 4. A simple `rotateGroup` animation is tied to ThreeJS's `scene.onBeforeRender`. 5. The `updateShape` function is central to interactivity: @@ -202,7 +203,7 @@ async function start() { ## 3. Essential Helper Functions (`src/helpers/`) -We'll focus on the provided `create-gui.ts` and `create-shape.ts`. For `init-threejs.ts` and `init-kernels.ts`, their roles are analogous to those described in the "Advanced Parametric Model (ThreeJS)" tutorial (setting up the ThreeJS environment and initializing Bitbybit kernels, respectively). +We'll focus on the provided `create-gui.ts` and `create-shape.ts`. For `init-threejs.ts`, its role is to set up the ThreeJS environment as described in the "Advanced Parametric Model (ThreeJS)" tutorial. Note that kernel initialization is now handled by the `initBitByBit()` helper from `@bitbybit-dev/threejs`. ### Creating the GUI (`create-gui.ts`) diff --git a/docs/learn/npm-packages/threejs/start-with-three-js.md b/docs/learn/npm-packages/threejs/start-with-three-js.md index e8ecc821a..7bedeabac 100644 --- a/docs/learn/npm-packages/threejs/start-with-three-js.md +++ b/docs/learn/npm-packages/threejs/start-with-three-js.md @@ -1,7 +1,7 @@ --- -sidebar_position: 2 -title: Using Bitbybit with ThreeJS -sidebar_label: ThreeJS Starter Template +sidebar_position: 1 +title: Quick Start with ThreeJS +sidebar_label: Quick Start description: Learn how to set up and use the @bitbybit-dev/threejs package with Vite to create 3D CAD applications, and control which geometry kernels (OCCT, JSCAD, Manifold) are initialized. tags: [npm-packages, threejs, occt, manifold, jscad] --- @@ -12,20 +12,41 @@ import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; import CodeBlock from '@theme/CodeBlock'; -# Using Bitbybit with ThreeJS +# Quick Start with ThreeJS -This guide will walk you through setting up and using the `@bitbybit-dev/threejs` package to integrate Bitbybit's 3D CAD functionalities into your ThreeJS applications. We'll use Vite as our build tool, which simplifies the setup process. +Get up and running with Bitbybit and ThreeJS in under 2 minutes! + +## Fastest Way: Use NPX Scaffolding + + +{`npx @bitbybit-dev/create-app my-project --engine threejs +cd my-project +npm install +npm run dev`} + + +This creates a complete project with Vite, TypeScript, and all three CAD kernels (OCCT, JSCAD, Manifold) pre-configured. + + +Check out the [Getting Started with ThreeJS](/learn/getting-started/engines/threejs) page for an overview of all integration approaches including runners. + + +--- + +## Manual Setup (Alternative) + +If you prefer to set up the project manually or integrate into an existing project, follow these steps. The `@bitbybit-dev/threejs` package conveniently includes `three` as a dependency, so you don't need to install it separately. -## Prerequisites +### Prerequisites * Node.js and npm (or yarn) installed. * A basic understanding of TypeScript and ThreeJS. -## [Example on Bitbybit Github Repo](https://github.com/bitbybit-dev/bitbybit/tree/master/examples/vite/threejs/starter-template) +### [Example on Bitbybit Github Repo](https://github.com/bitbybit-dev/bitbybit/tree/master/examples/vite/threejs/starter-template) -## 1. Project Setup with Vite +### 1. Project Setup with Vite First, create a new Vite project with a TypeScript template: @@ -36,7 +57,7 @@ First, create a new Vite project with a TypeScript template: cd my-bitbybit-threejs-app`} -Next, install the Bitbybit ThreeJS package and its necessary worker dependencies: +Next, install the Bitbybit ThreeJS package: {`npm install @bitbybit-dev/threejs @@ -82,368 +103,81 @@ This is a standard HTML setup. The key parts are: - ``: This is where our 3D scene will be drawn. - ``: This loads our main TypeScript application logic. -## 3. Setting up Web Workers - -Bitbybit utilizes Web Workers to run computationally intensive geometry kernels (OCCT, JSCAD, Manifold) off the main browser thread, preventing UI freezes. You need to create simple worker files that initialize these kernels. - -Create a `workers` directory inside your `src` folder (`src/workers/`). - - - - - -{`import initOpenCascade from '@bitbybit-dev/occt/bitbybit-dev-occt/cdn'; -import type { OpenCascadeInstance } from '@bitbybit-dev/occt/bitbybit-dev-occt/bitbybit-dev-occt.js'; -import { - initializationComplete, - onMessageInput, -} from '@bitbybit-dev/occt-worker'; - -// Initialize OpenCascade (OCCT) -initOpenCascade().then((occ: OpenCascadeInstance) => { - // Notify the main thread that OCCT is ready - initializationComplete(occ, undefined); -}); - -// Listen for messages from the main thread -addEventListener('message', ({ data }) => { - // Process messages using the occt-worker helper - onMessageInput(data, postMessage); -});`} - -**Explanation:** -- Imports `initOpenCascade` to load the OCCT WebAssembly module. -- Calls `initializationComplete` once OCCT is loaded, signaling to the main Bitbybit instance that this kernel is ready. -- `onMessageInput` handles communication between the main thread and the OCCT worker. - - - - - -{`import { - initializationComplete, - onMessageInput, -} from '@bitbybit-dev/jscad-worker'; - -// Dynamically import and initialize JSCAD -import('@bitbybit-dev/jscad/jscad-generated').then((s) => { - // Notify the main thread that JSCAD is ready - initializationComplete(s.default()); -}); - -// Listen for messages from the main thread -addEventListener('message', ({ data }) => { - // Process messages using the jscad-worker helper - onMessageInput(data, postMessage); -});`} - -**Explanation:** -- Dynamically imports the JSCAD module. -- Calls `initializationComplete` once JSCAD is loaded. -- `onMessageInput` handles communication. - - - - - -{`import { - initializationComplete, - onMessageInput, -} from '@bitbybit-dev/manifold-worker'; -import Module from 'manifold-3d'; // Imports the Manifold JS bindings - -const init = async () => { - // Initialize the Manifold WASM module - const wasm = await Module({ - // Manifold requires its WASM file to be loaded. - // This CDN link provides a hosted version. - // For production, you might want to host this yourself. - locateFile: () => { - return 'https://cdn.jsdelivr.net/gh/bitbybit-dev/bitbybit-assets@0.21.0/wasm/manifold-3-3-2.wasm'; - }, - }); - wasm.setup(); // Additional setup step for Manifold - // Notify the main thread that Manifold is ready - initializationComplete(wasm); -}; - -init(); - -// Listen for messages from the main thread -addEventListener('message', ({ data }) => { - // Process messages using the manifold-worker helper - onMessageInput(data, postMessage); -});`} - -**Explanation:** -- Imports the `manifold-3d` JavaScript bindings. -- The `Module` function initializes the Manifold WASM. The `locateFile` function is crucial for pointing to the Manifold WASM file. -- Calls `initializationComplete` after setup. -- `onMessageInput` handles communication. - - - - - - Vite handles these worker files automatically when you instantiate them using `new Worker(new URL('./path/to/worker.ts', import.meta.url), ...)`. Ensure the paths in `main.ts` correctly point to these files within your `src/workers/` directory. - - -## 4. Main Application Logic (`main.ts`) +## 3. Main Application Logic (`main.ts`) Replace the content of `src/main.ts` with the following: {`import './style.css'; // Basic styling -import { BitByBitBase, Inputs } from '@bitbybit-dev/threejs'; -import { OccStateEnum } from '@bitbybit-dev/occt-worker'; -import { JscadStateEnum } from '@bitbybit-dev/jscad-worker'; -import { ManifoldStateEnum } from '@bitbybit-dev/manifold-worker'; - -import { OrbitControls } from 'three/examples/jsm/controls/OrbitControls'; import { - Color, - HemisphereLight, - PerspectiveCamera, - Scene, - WebGLRenderer, -} from 'three'; -import { first, firstValueFrom, map } from 'rxjs'; - -// Define an interface for kernel options -interface KernelOptions { - enableOCCT: boolean; - enableJSCAD: boolean; - enableManifold: boolean; -} + BitByBitBase, + Inputs, + initBitByBit, + initThreeJS, + type InitBitByBitOptions, +} from '@bitbybit-dev/threejs'; // --- 1. Main Application Entry Point --- start(); async function start() { - // Initialize basic ThreeJS scene - const { scene } = initThreeJS(); - + // Initialize ThreeJS scene using Bitbybit's helper function + const sceneOptions = new Inputs.ThreeJSScene.InitThreeJSDto(); + sceneOptions.canvasId = 'three-canvas'; + sceneOptions.sceneSize = 10; + + const { scene, startAnimationLoop } = initThreeJS(sceneOptions); + startAnimationLoop(); + // Create an instance of BitByBitBase for ThreeJS const bitbybit = new BitByBitBase(); // --- 2. Configure and Initialize Kernels --- - // Users can control which kernels are loaded - const kernelOptions: KernelOptions = { + // Users can control which kernels are loaded. + // The initBitByBit helper function handles all worker setup automatically + // by loading the kernels from CDN. + const options: InitBitByBitOptions = { enableOCCT: true, enableJSCAD: true, enableManifold: true, }; + // Initialize Bitbybit with the selected kernels - await initWithKernels(scene, bitbybit, kernelOptions); + await initBitByBit(scene, bitbybit, options); // --- 3. Create Geometry with Active Kernels --- - if (kernelOptions.enableOCCT) { - await createOCCTGeometry(bitbybit, '#ff0000'); // Red - } - if (kernelOptions.enableManifold) { - await createManifoldGeometry(bitbybit, '#00ff00'); // Green - } - if (kernelOptions.enableJSCAD) { - await createJSCADGeometry(bitbybit, '#0000ff'); // Blue - } -} - -// --- 4. ThreeJS Scene Initialization --- -function initThreeJS() { - const domNode = document.getElementById('three-canvas') as HTMLCanvasElement; - - const camera = new PerspectiveCamera( - 70, - window.innerWidth / window.innerHeight, - 0.1, // Adjusted near plane for typical scenes - 1000 - ); - const scene = new Scene(); - scene.background = new Color(0x1a1c1f); // Set background color - - const light = new HemisphereLight(0xffffff, 0x444444, 2); // Adjusted intensity - scene.add(light); - - const renderer = new WebGLRenderer({ antialias: true, canvas: domNode }); - renderer.setSize(window.innerWidth, window.innerHeight); - // Set pixel ratio for sharper rendering - renderer.setPixelRatio(window.devicePixelRatio); - - camera.position.set(50, 50, 100); // Adjusted camera position - camera.lookAt(0, 0, 0); - - const controls = new OrbitControls(camera, renderer.domElement); - controls.enableDamping = true; - controls.dampingFactor = 0.05; // Smoother damping - controls.target.set(0, 0, 0); // Ensure controls target the origin - controls.update(); // Initial update - - const onWindowResize = () => { - camera.aspect = window.innerWidth / window.innerHeight; - camera.updateProjectionMatrix(); - renderer.setSize(window.innerWidth, window.innerHeight); - }; - window.addEventListener('resize', onWindowResize, false); - - const animate = () => { - controls.update(); // Important for damping - renderer.render(scene, camera); - }; - renderer.setAnimationLoop(animate); - - return { scene, camera, renderer }; // Return renderer and camera if needed elsewhere -} - -// --- 5. Bitbybit Kernel Initialization Logic --- -async function initWithKernels( - scene: Scene, - bitbybit: BitByBitBase, - options: KernelOptions -): Promise<{ message: string; initializedKernels: string[] }> { - let occtWorkerInstance: Worker | undefined; - let jscadWorkerInstance: Worker | undefined; - let manifoldWorkerInstance: Worker | undefined; - - // 1. Conditionally create worker instances if (options.enableOCCT) { - occtWorkerInstance = new Worker( - new URL('./workers/occt.worker.ts', import.meta.url), - { name: 'OCC_WORKER', type: 'module' } - ); - } - if (options.enableJSCAD) { - jscadWorkerInstance = new Worker( - new URL('./workers/jscad.worker.ts', import.meta.url), - { name: 'JSCAD_WORKER', type: 'module' } - ); + await createOCCTGeometry(bitbybit, '#ff0000'); // Red } if (options.enableManifold) { - manifoldWorkerInstance = new Worker( - new URL('./workers/manifold.worker.ts', import.meta.url), - { name: 'MANIFOLD_WORKER', type: 'module' } - ); - } - - // 2. Initialize Bitbybit - await bitbybit.init( - scene, - occtWorkerInstance, - jscadWorkerInstance, - manifoldWorkerInstance - ); - - // 3. Collect promises for kernel initializations - const initializationPromises: Promise[] = []; - let anyKernelSelectedForInit = false; - - if (options.enableOCCT) { - anyKernelSelectedForInit = true; - if (bitbybit.occtWorkerManager) { - initializationPromises.push( - firstValueFrom( - bitbybit.occtWorkerManager.occWorkerState$.pipe( - first((s) => s.state === OccStateEnum.initialised), - map(() => 'OCCT') - ) - ) - ); - } else { - console.warn( - 'OCCT enabled in options, but occtWorkerManager not found after init.' - ); - } + await createManifoldGeometry(bitbybit, '#00ff00'); // Green } - if (options.enableJSCAD) { - anyKernelSelectedForInit = true; - if (bitbybit.jscadWorkerManager) { - initializationPromises.push( - firstValueFrom( - bitbybit.jscadWorkerManager.jscadWorkerState$.pipe( - first((s) => s.state === JscadStateEnum.initialised), - map(() => 'JSCAD') - ) - ) - ); - } else { - console.warn( - 'JSCAD enabled in options, but jscadWorkerManager not found after init.' - ); - } - } - - if (options.enableManifold) { - anyKernelSelectedForInit = true; - if (bitbybit.manifoldWorkerManager && bitbybit.manifoldWorkerManager.manifoldWorkerState$) { - initializationPromises.push( - firstValueFrom( - bitbybit.manifoldWorkerManager.manifoldWorkerState$.pipe( - first((s) => s.state === ManifoldStateEnum.initialised), - map(() => 'Manifold') - ) - ) - ); - } else { - console.warn( - 'Manifold enabled in options, but manifoldWorkerManager not found after init.' - ); - } - } - - // 4. Wait for selected & available kernels or handle no selection/availability - if (!anyKernelSelectedForInit) { - console.log('No kernels selected for initialization.'); - return { message: 'No kernels selected for initialization.', initializedKernels: [] }; - } - - if (initializationPromises.length === 0) { - // Kernels were selected, but none were awaitable (e.g., managers missing for all selected) - console.log( - 'Kernels were selected, but none had managers available for awaiting initialization.' - ); - return { - message: 'Selected kernels were not awaitable for initialization state.', - initializedKernels: [], - }; + await createJSCADGeometry(bitbybit, '#0000ff'); // Blue } - - const initializedKernels = await Promise.all(initializationPromises); - console.log('Kernels initialized:', initializedKernels.join(', ')); - return { - message: \`Successfully initialized: \${initializedKernels.join(', ')}\`, - initializedKernels, - }; } -// --- 6. Geometry Creation Functions (Examples) --- +// --- 4. Geometry Creation Functions (Examples) --- async function createOCCTGeometry(bitbybit: BitByBitBase, color: string) { console.log('Creating OCCT geometry...'); const cubeOptions = new Inputs.OCCT.CubeDto(); - cubeOptions.size = 25; - cubeOptions.center = [0, 0, 0]; + cubeOptions.size = 2.5; + cubeOptions.center = [0, 1.25, 0]; const cube = await bitbybit.occt.shapes.solid.createCube(cubeOptions); const filletOptions = new Inputs.OCCT.FilletDto(); filletOptions.shape = cube; - filletOptions.radius = 4; + filletOptions.radius = 0.4; const roundedCube = await bitbybit.occt.fillets.filletEdges(filletOptions); const drawOptions = new Inputs.Draw.DrawOcctShapeOptions(); - drawOptions.edgeWidth = 5; + drawOptions.edgeWidth = 0.5; drawOptions.faceColour = color; drawOptions.drawVertices = true; - // Kernels were selected, but none were awaitable (e.g., managers missing for all selected) - console.log( - 'Kernels were selected, but none had managers available for awaiting initialization.' - ); - return { - message: 'Selected kernels were not awaitable for initialization state.', - }; - } - - drawOptions.vertexSize = 0.5; + drawOptions.vertexSize = 0.05; drawOptions.vertexColour = '#ffffff'; + await bitbybit.draw.drawAnyAsync({ entity: roundedCube, options: drawOptions, @@ -454,11 +188,12 @@ async function createOCCTGeometry(bitbybit: BitByBitBase, color: string) { async function createManifoldGeometry(bitbybit: BitByBitBase, color: string) { console.log('Creating Manifold geometry...'); const sphereOptions = new Inputs.Manifold.SphereDto(); - sphereOptions.radius = 15; + sphereOptions.radius = 1.5; + sphereOptions.circularSegments = 32; const sphere = await bitbybit.manifold.manifold.shapes.sphere(sphereOptions); const cubeOptions = new Inputs.Manifold.CubeDto(); - cubeOptions.size = 25; + cubeOptions.size = 2.5; const cube = await bitbybit.manifold.manifold.shapes.cube(cubeOptions); const diffedShape = await bitbybit.manifold.manifold.booleans.differenceTwo({ @@ -468,7 +203,7 @@ async function createManifoldGeometry(bitbybit: BitByBitBase, color: string) { const translationOptions = new Inputs.Manifold.TranslateDto(); translationOptions.manifold = diffedShape; - translationOptions.vector = [0, -40, 0]; // Position below OCCT + translationOptions.vector = [0, 1.25, -4]; // Position below OCCT const movedShape = await bitbybit.manifold.manifold.transforms.translate( translationOptions ); @@ -485,16 +220,15 @@ async function createManifoldGeometry(bitbybit: BitByBitBase, color: string) { async function createJSCADGeometry(bitbybit: BitByBitBase, color: string) { console.log('Creating JSCAD geometry...'); const geodesicSphereOptions = new Inputs.JSCAD.GeodesicSphereDto(); - geodesicSphereOptions.radius = 15; - geodesicSphereOptions.center = [0, 40, 0]; // Position above OCCT + geodesicSphereOptions.radius = 1.5; + geodesicSphereOptions.center = [0, 1.5, 4]; // Position above OCCT const geodesicSphere = await bitbybit.jscad.shapes.geodesicSphere( geodesicSphereOptions ); - // Example: Create another simple sphere for a boolean operation const sphereOptions = new Inputs.JSCAD.SphereDto(); - sphereOptions.radius = 10; // Smaller sphere - sphereOptions.center = [5, 45, 0]; // Slightly offset + sphereOptions.radius = 1; + sphereOptions.center = [0, 3, 4.5]; const simpleSphere = await bitbybit.jscad.shapes.sphere(sphereOptions); const unionOptions = new Inputs.JSCAD.BooleanTwoObjectsDto(); @@ -503,7 +237,7 @@ async function createJSCADGeometry(bitbybit: BitByBitBase, color: string) { const unionShape = await bitbybit.jscad.booleans.unionTwo(unionOptions); const drawOptions = new Inputs.Draw.DrawBasicGeometryOptions(); - drawOptions.colours = color; // Note: 'colours' for JSCAD draw options + drawOptions.colours = color; await bitbybit.draw.drawAnyAsync({ entity: unionShape, options: drawOptions, @@ -515,40 +249,23 @@ async function createJSCADGeometry(bitbybit: BitByBitBase, color: string) { ### Explanation of `main.ts`: 1. **Imports:** - * `BitByBitBase` and `Inputs`: Core components from `@bitbybit-dev/threejs`. `Inputs` provides DTOs (Data Transfer Objects) for specifying parameters for geometry operations. - * `...StateEnum`: Enums used to check the initialization state of each kernel worker. - * Standard ThreeJS modules for scene setup. - * `first`, `firstValueFrom`, `map` from `rxjs`: Used to subscribe to and transform the kernel state observables. + * `BitByBitBase`, `Inputs`, `initBitByBit`, `initThreeJS`, and `InitBitByBitOptions`: Core components from `@bitbybit-dev/threejs`. `Inputs` provides DTOs (Data Transfer Objects) for specifying parameters for geometry operations and scene configuration. `initBitByBit` is the helper function that handles all kernel initialization automatically, `initThreeJS` sets up the ThreeJS scene, and `InitBitByBitOptions` is the type for kernel configuration options. -2. **`KernelOptions` Interface:** Defines the structure for selecting which kernels to initialize. - -3. **`start()` function (Main Entry Point):** - * Calls `initThreeJS()` to set up the basic ThreeJS scene, camera, renderer, and controls. +2. **`start()` function (Main Entry Point):** + * Uses `Inputs.ThreeJSScene.InitThreeJSDto()` to configure scene options like canvas ID and scene size. + * Calls `initThreeJS(sceneOptions)` to set up the complete ThreeJS environment (scene, camera, renderer, lights, controls) with a single function call. The function returns a `startAnimationLoop` function that you call to begin the render loop. * Creates an instance of `BitByBitBase`. - * **`kernelOptions`**: This object is key. By setting `enableOCCT`, `enableJSCAD`, and `enableManifold` to `true` or `false`, you control which kernels Bitbybit attempts to initialize. This allows for optimizing load times and resource usage if not all kernels are needed. - * Calls `initWithKernels()` to initialize Bitbybit with the selected kernels. - * Conditionally calls geometry creation functions (`createOCCTGeometry`, `createManifoldGeometry`, `createJSCADGeometry`) based on which kernels were enabled and successfully initialized. - -4. **`initThreeJS()` function:** - * Standard ThreeJS boilerplate: sets up the `Scene`, `PerspectiveCamera`, `WebGLRenderer`, `HemisphereLight`, and `OrbitControls`. - * Sets pixel ratio for sharper rendering on high-DPI displays. - * Includes a window resize listener and an animation loop. - -5. **`initWithKernels()` function:** - * This is the core of Bitbybit's initialization. - * It conditionally creates `Worker` instances for OCCT, JSCAD, and Manifold based on the `options` passed in. The `new URL('./workers/worker-name.worker.ts', import.meta.url)` syntax is Vite's way of correctly bundling and referencing web worker files. - * Calls `await bitbybit.init(scene, occtWorkerInstance, jscadWorkerInstance, manifoldWorkerInstance)`. `BitByBitBase` can handle `undefined` for worker instances it shouldn't initialize. - * Uses RxJS `pipe(first(...), map(...))` to subscribe to the state observables of each enabled kernel and transform the result to a string identifying the kernel. - * The `Promise` resolves only after all *selected and enabled* kernels have emitted an `initialised` state. This ensures that you don't try to use a kernel before it's ready. - * Returns an object with a message and an array of initialized kernel names. - -6. **Geometry Creation Functions (`createOCCTGeometry`, `createManifoldGeometry`, `createJSCADGeometry`):** + * **`options`**: This object is key. By setting `enableOCCT`, `enableJSCAD`, and `enableManifold` to `true` or `false`, you control which kernels Bitbybit attempts to initialize. This allows for optimizing load times and resource usage if not all kernels are needed. + * **`initBitByBit()`**: This helper function handles all the complexity of initializing Bitbybit with the selected kernels. It automatically creates web workers, loads kernel WASM files from CDN, and waits for all selected kernels to be ready. You simply pass the scene, the bitbybit instance, and your options. + * Conditionally calls geometry creation functions (`createOCCTGeometry`, `createManifoldGeometry`, `createJSCADGeometry`) based on which kernels were enabled. + +3. **Geometry Creation Functions (`createOCCTGeometry`, `createManifoldGeometry`, `createJSCADGeometry`):** * These are example functions demonstrating how to use the APIs for each kernel. * **`Inputs` DTOs**: You'll notice the use of `Inputs.OCCT.CubeDto()`, `Inputs.Manifold.SphereDto()`, etc. These objects are used to pass parameters to Bitbybit's geometry creation and modification functions. They provide type safety and often mirror the inputs you'd find in a visual programming environment. Intellisense (auto-completion in your IDE) will be very helpful here. * **API Structure**: Operations are typically namespaced under `bitbybit.occt.*`, `bitbybit.manifold.*`, and `bitbybit.jscad.*`. * **Drawing**: After creating a geometric entity, `bitbybit.draw.drawAnyAsync()` is used to render it into the ThreeJS scene. Different kernels might have slightly different drawing option DTOs (e.g., `DrawOcctShapeOptions`, `DrawManifoldOrCrossSectionOptions`, `DrawBasicGeometryOptions`). The OCCT draw options now support additional properties like `edgeWidth`, `drawVertices`, `vertexSize`, and `vertexColour`. -## 5. Basic Styling (Optional) +## 4. Basic Styling (Optional) Create an `src/style.css` file if you haven't already: @@ -566,7 +283,7 @@ Create an `src/style.css` file if you haven't already: }`} -## 6. Running the Application +## 5. Running the Application {`npm run dev @@ -592,11 +309,11 @@ You can explore and interact with a live example of this setup on StackBlitz: ## Key Takeaways -* **Vite Simplifies Setup:** Vite handles worker bundling and module resolution effectively. -* **`KernelOptions` for Control:** You have fine-grained control over which geometry kernels are loaded, allowing you to tailor the application to specific needs and optimize performance. +* **Vite Simplifies Setup:** Vite handles module resolution effectively for a smooth development experience. +* **`initBitByBit()` for Easy Initialization:** The `initBitByBit()` helper function handles all the complexity of creating web workers and loading kernel WASM files from CDN. You simply configure which kernels to enable. If you need to host assets on your own infrastructure, see [Self-Hosting Assets](/learn/hosting-and-cdn). +* **`InitBitByBitOptions` for Control:** You have fine-grained control over which geometry kernels are loaded, allowing you to tailor the application to specific needs and optimize performance. * **Asynchronous Operations:** Most Bitbybit operations are `async` because they communicate with Web Workers. * **`Inputs` DTOs:** Use these typed objects to configure geometry operations. -* **Separate Worker Files:** Each kernel runs in its own dedicated worker. * **Modular Design:** The `@bitbybit-dev/threejs` package neatly integrates these complex components for use with ThreeJS. This setup provides a robust foundation for building sophisticated 3D CAD applications in the browser with Bitbybit and ThreeJS. \ No newline at end of file diff --git a/docs/learn/runners/engines/babylonjs/hello-world-occt-bottle-demo.mdx b/docs/learn/runners/engines/babylonjs/hello-world-occt-bottle-demo.mdx new file mode 100644 index 000000000..6ba681a26 --- /dev/null +++ b/docs/learn/runners/engines/babylonjs/hello-world-occt-bottle-demo.mdx @@ -0,0 +1,671 @@ +--- +sidebar_position: 3 +title: OCCT Bottle Example +description: Learn how to use the full version of the Bitbybit BabylonJS runner for CAD operations +--- + +import BitByBitRenderCanvas from '@site/src/components/BitByBitRenderCanvas'; + +## Complete Example - Parametric Bottle + +Below is a complete example that creates a parametric bottle with threading using OCCT, with lil-gui controls for adjusting parameters: + +## Live Example + + + +```html + + + + Bitbybit Runner BabylonJS - Parametric Bottle + + + + + + + + + + + +
+ + +
+
+ +
+ + +``` + +## Key Points + +### Runner Script +```html + +``` + +The full runner includes BabylonJS, so you don't need to load it separately. + +### Using setTimeout +```javascript +setTimeout(async () => { + // Your code here +}, 0); +``` + +Unlike PlayCanvas and ThreeJS runners, the BabylonJS runner uses `setTimeout` to ensure the canvas element is fully rendered before initialization. + +### lil-gui Integration +```html + +``` + +Use lil-gui to create interactive parameter controls. The `onFinishChange` callback regenerates the model when parameters are adjusted. + +### Initialization +```javascript +const runner = window.bitbybitRunner.getRunnerInstance(); +const { bitbybit, Bit, BABYLON, scene } = await runner.run(runnerOptions); +``` + +The `run()` method returns: +- `bitbybit` - The main Bitbybit API object +- `Bit` - Helper classes including input DTOs +- `BABYLON` - The BabylonJS library itself +- `scene` - The BabylonJS Scene + +### BabylonJS Lights + +In BabylonJS, point lights are created directly: +```javascript +const light = new BABYLON.PointLight( + 'pointLight', + new BABYLON.Vector3(x, y, z), + scene +); +light.intensity = 200; +light.diffuse = new BABYLON.Color3(1, 1, 1); +``` + +### Model Cleanup + +In BabylonJS, use `.dispose()` to clean up meshes: +```javascript +if (currentGroup) { + currentGroup.dispose(); + currentGroup = null; +} +``` + +### Runner Options + +| Option | Type | Description | +|--------|------|-------------| +| `canvasId` | string | The ID of your canvas element | +| `canvasZoneClass` | string | CSS class for the canvas container | +| `enableOCCT` | boolean | Enable OpenCASCADE kernel | +| `enableJSCAD` | boolean | Enable JSCAD kernel | +| `enableManifold` | boolean | Enable Manifold kernel | +| `cameraPosition` | number[] | Initial camera position [x, y, z] | +| `cameraTarget` | number[] | Camera look-at target [x, y, z] | +| `backgroundColor` | string | Scene background color (hex) | +| `loadFonts` | string[] | Fonts to load for text operations | + +### Downloading STEP & STL Files + +Use `bitbybit.occt.io` to export shapes in various formats: + +```javascript +// Download STEP file +await bitbybit.occt.io.saveShapeSTEP({ + shape: myShape, + fileName: 'model.step', + adjustYtoZ: true, + tryDownload: true, +}); + +// Download STL file +await bitbybit.occt.io.saveShapeStl({ + shape: myShape, + fileName: 'model.stl', + precision: 0.01, + adjustYtoZ: true, + tryDownload: true, + binary: true, +}); +``` + +### Adding Dimensions + +Use `bitbybit.occt.dimensions` to create linear dimensions: + +```javascript +// Create dimension options DTO with default values +const dimOpt = new Bit.Inputs.OCCT.SimpleLinearLengthDimensionDto(); +dimOpt.start = [5, 0, 0]; +dimOpt.end = [0, 0, 0]; +dimOpt.direction = [0, 0, -1]; // Note: BabylonJS uses right-handed coordinates +dimOpt.offsetFromPoints = 0; +dimOpt.labelSize = 0.3; +dimOpt.labelSuffix = 'cm'; +dimOpt.labelRotation = 180; +dimOpt.endType = 'arrow'; +dimOpt.arrowSize = 0.3; +dimOpt.crossingSize = 0.2; +dimOpt.decimalPlaces = 1; + +const dimension = await bitbybit.occt.dimensions.simpleLinearLengthDimension(dimOpt); + +// Draw dimensions as wire geometry +const dimOptions = new Bit.Inputs.Draw.DrawOcctShapeOptions(); +dimOptions.edgeColour = '#ffffff'; +dimOptions.edgeWidth = 2; +dimOptions.drawEdges = true; +dimOptions.drawFaces = false; + +await bitbybit.draw.drawAnyAsync({ + entity: dimension, + options: dimOptions, +}); +``` + +## GitHub Source + +View the full source code on GitHub: [BabylonJS Full Runner Examples](https://github.com/bitbybit-dev/bitbybit/tree/master/examples/runner/babylonjs/full) diff --git a/docs/learn/runners/engines/playcanvas/hello-world-occt-bottle-demo.mdx b/docs/learn/runners/engines/playcanvas/hello-world-occt-bottle-demo.mdx new file mode 100644 index 000000000..4e82c27b2 --- /dev/null +++ b/docs/learn/runners/engines/playcanvas/hello-world-occt-bottle-demo.mdx @@ -0,0 +1,642 @@ +--- +sidebar_position: 3 +title: OCCT Bottle Example +description: Learn how to use the full version of the Bitbybit PlayCanvas runner for CAD operations +--- + +import BitByBitRenderCanvas from '@site/src/components/BitByBitRenderCanvas'; + +## Complete Example - Parametric OCCT Bottle + +Below is a complete example that creates a parametric bottle with threading using OCCT, with lil-gui controls for adjusting parameters: + +## Live Example + + + +```html + + + + Bitbybit Runner PlayCanvas - Parametric Bottle + + + + + + + + + + + +
+ + +
+
+ +
+ + +``` + +## Key Points + +### Runner Script +```html + +``` + +The full runner includes PlayCanvas, so you don't need to load it separately. + +### lil-gui Integration +```html + +``` + +Use lil-gui to create interactive parameter controls. The `onFinishChange` callback regenerates the model when parameters are adjusted. + +### Initialization +```javascript +const runner = window.bitbybitRunner.getRunnerInstance(); +const { bitbybit, Bit, camera, scene, app, pc } = await runner.run(runnerOptions); +``` + +The `run()` method returns: +- `bitbybit` - The main Bitbybit API object +- `Bit` - Helper classes including input DTOs +- `camera` - The PlayCanvas camera entity +- `scene` - The PlayCanvas scene (root entity) +- `app` - The PlayCanvas Application instance +- `pc` - The PlayCanvas library itself + +### PlayCanvas Lights vs Babylon.js + +In PlayCanvas, point lights are created as entities: +```javascript +const light = new pc.Entity('pointLight'); +light.addComponent('light', { + type: 'point', + color: new pc.Color(1, 1, 1), + intensity: 2, + range: 50, + castShadows: true, + shadowBias: 0.2, + normalOffsetBias: 0.05, + shadowResolution: 2048, +}); +light.setPosition(x, y, z); +scene.addChild(light); +``` + +### Runner Options + +| Option | Type | Description | +|--------|------|-------------| +| `canvasId` | string | The ID of your canvas element | +| `canvasZoneClass` | string | CSS class for the canvas container | +| `enableOCCT` | boolean | Enable OpenCASCADE kernel | +| `enableJSCAD` | boolean | Enable JSCAD kernel | +| `enableManifold` | boolean | Enable Manifold kernel | +| `cameraPosition` | number[] | Initial camera position [x, y, z] | +| `cameraTarget` | number[] | Camera look-at target [x, y, z] | +| `backgroundColor` | string | Scene background color (hex) | +| `loadFonts` | string[] | Fonts to load for text operations | + +### Downloading STEP & STL Files + +Use `bitbybit.occt.io` to export shapes in various formats: + +```javascript +// Download STEP file +await bitbybit.occt.io.saveShapeSTEP({ + shape: myShape, + fileName: 'model.step', + adjustYtoZ: true, // Convert Y-up to Z-up coordinate system + tryDownload: true, +}); + +// Download STL file +await bitbybit.occt.io.saveShapeStl({ + shape: myShape, + fileName: 'model.stl', + precision: 0.01, // Mesh precision (lower = higher resolution) + adjustYtoZ: true, + tryDownload: true, + binary: true, // Binary format for smaller file size +}); +``` + +### Adding Dimensions + +Use `bitbybit.occt.dimensions` to create linear dimensions: + +```javascript +// Create dimension options DTO with default values +const dimOpt = new Bit.Inputs.OCCT.SimpleLinearLengthDimensionDto(); +dimOpt.start = [0, 0, 0]; // Start point +dimOpt.end = [5, 0, 0]; // End point +dimOpt.direction = [0, 0, 1]; // Direction to offset the dimension line +dimOpt.offsetFromPoints = 0; // Distance from measurement points +dimOpt.labelSize = 0.3; // Size of the label text +dimOpt.labelSuffix = 'cm'; // Unit suffix (no space) +dimOpt.labelRotation = 180; // Rotate label for readability +dimOpt.endType = 'arrow'; // Arrow style endpoints +dimOpt.arrowSize = 0.3; // Arrow size +dimOpt.crossingSize = 0.2; // Size of endpoint markers +dimOpt.decimalPlaces = 1; // Number of decimal places + +const dimension = await bitbybit.occt.dimensions.simpleLinearLengthDimension(dimOpt); + +// Draw dimensions as wire geometry +const dimOptions = new Bit.Inputs.Draw.DrawOcctShapeOptions(); +dimOptions.edgeColour = '#ffffff'; +dimOptions.edgeWidth = 2; +dimOptions.drawEdges = true; +dimOptions.drawFaces = false; + +await bitbybit.draw.drawAnyAsync({ + entity: dimension, + options: dimOptions, +}); +``` + +## GitHub Source + +View the full source code on GitHub: [PlayCanvas Full Runner Examples](https://github.com/bitbybit-dev/bitbybit/tree/master/examples/runner/playcanvas/full) diff --git a/docs/learn/runners/engines/threejs/hello-world-occt-bottle-demo.mdx b/docs/learn/runners/engines/threejs/hello-world-occt-bottle-demo.mdx new file mode 100644 index 000000000..95501f0c2 --- /dev/null +++ b/docs/learn/runners/engines/threejs/hello-world-occt-bottle-demo.mdx @@ -0,0 +1,692 @@ +--- +sidebar_position: 3 +title: OCCT Bottle Example +description: Learn how to use the full version of the Bitbybit ThreeJS runner for CAD operations +--- + +import BitByBitRenderCanvas from '@site/src/components/BitByBitRenderCanvas'; + +## Complete Example - Parametric OCCT Bottle + +Below is a complete example that creates a parametric bottle with threading using OCCT, with lil-gui controls for adjusting parameters: + +## Live Example + + + +```html + + + + Bitbybit Runner ThreeJS - Parametric Bottle + + + + + + + + + + + +
+ + +
+
+ +
+ + +``` + +## Key Points + +### Runner Script +```html + +``` + +The full runner includes ThreeJS, so you don't need to load it separately. + +### lil-gui Integration +```html + +``` + +Use lil-gui to create interactive parameter controls. The `onFinishChange` callback regenerates the model when parameters are adjusted. + +### Initialization +```javascript +const runner = window.bitbybitRunner.getRunnerInstance(); +const { bitbybit, Bit, camera, scene, renderer, THREEJS } = await runner.run(runnerOptions); +``` + +The `run()` method returns: +- `bitbybit` - The main Bitbybit API object +- `Bit` - Helper classes including input DTOs +- `camera` - The ThreeJS PerspectiveCamera +- `scene` - The ThreeJS Scene +- `renderer` - The ThreeJS WebGLRenderer +- `THREEJS` - The ThreeJS library itself + +### ThreeJS Lights + +In ThreeJS, point lights are created directly: +```javascript +const light = new THREEJS.PointLight(0xffffff, 500); +light.position.set(x, y, z); +light.castShadow = true; +scene.add(light); +``` + +### Custom Materials + +ThreeJS allows you to create custom materials for your CAD geometry: + +```javascript +const mat = new THREEJS.MeshPhongMaterial({ + color: new THREEJS.Color(color) +}); +mat.polygonOffset = true; +mat.polygonOffsetFactor = 1; +options.faceMaterial = mat; +``` + +### Model Cleanup + +In ThreeJS, use `scene.remove()` to clean up meshes: +```javascript +if (currentGroup) { + scene.remove(currentGroup); + currentGroup = null; +} +``` + +### Runner Options + +| Option | Type | Description | +|--------|------|-------------| +| `canvasId` | string | The ID of your canvas element | +| `canvasZoneClass` | string | CSS class for the canvas container | +| `enableOCCT` | boolean | Enable OpenCASCADE kernel | +| `enableJSCAD` | boolean | Enable JSCAD kernel | +| `enableManifold` | boolean | Enable Manifold kernel | +| `cameraPosition` | number[] | Initial camera position [x, y, z] | +| `cameraTarget` | number[] | Camera look-at target [x, y, z] | +| `backgroundColor` | string | Scene background color (hex) | +| `loadFonts` | string[] | Fonts to load for text operations | + +### Downloading STEP & STL Files + +Use `bitbybit.occt.io` to export shapes in various formats: + +```javascript +// Download STEP file +await bitbybit.occt.io.saveShapeSTEP({ + shape: myShape, + fileName: 'model.step', + adjustYtoZ: true, + tryDownload: true, +}); + +// Download STL file +await bitbybit.occt.io.saveShapeStl({ + shape: myShape, + fileName: 'model.stl', + precision: 0.01, + adjustYtoZ: true, + tryDownload: true, + binary: true, +}); +``` + +### Adding Dimensions + +Use `bitbybit.occt.dimensions` to create linear dimensions: + +```javascript +// Create dimension options DTO with default values +const dimOpt = new Bit.Inputs.OCCT.SimpleLinearLengthDimensionDto(); +dimOpt.start = [0, 0, 0]; +dimOpt.end = [5, 0, 0]; +dimOpt.direction = [0, 0, 1]; +dimOpt.offsetFromPoints = 0; +dimOpt.labelSize = 0.3; +dimOpt.labelSuffix = 'cm'; +dimOpt.labelRotation = 180; +dimOpt.endType = 'arrow'; +dimOpt.arrowSize = 0.3; +dimOpt.crossingSize = 0.2; +dimOpt.decimalPlaces = 1; + +const dimension = await bitbybit.occt.dimensions.simpleLinearLengthDimension(dimOpt); + +// Draw dimensions as wire geometry +const dimOptions = new Bit.Inputs.Draw.DrawOcctShapeOptions(); +dimOptions.edgeColour = '#ffffff'; +dimOptions.edgeWidth = 2; +dimOptions.drawEdges = true; +dimOptions.drawFaces = false; + +await bitbybit.draw.drawAnyAsync({ + entity: dimension, + options: dimOptions, +}); +``` + +## GitHub Source + +View the full source code on GitHub: [ThreeJS Full Runner Examples](https://github.com/bitbybit-dev/bitbybit/tree/master/examples/runner/threejs/full) diff --git a/docs/learn/runners/intro-blockly.mdx b/docs/learn/runners/intro-blockly.mdx index 48e3e04b5..51ebcfc29 100644 --- a/docs/learn/runners/intro-blockly.mdx +++ b/docs/learn/runners/intro-blockly.mdx @@ -48,7 +48,7 @@ The following Bitbybit Blockly script is the visual program we'll be creating. T sizecubeMeshsizesizesizesize1cubeMeshsize0000.40.005TRUE#000099TRUE#ffffff1cubeMeshcubeMesh","version":"0.21.0","type":"blockly"}} + script={{"script":"sizecubeMeshsizesizesizesize1cubeMeshsize0000.40.005TRUE#000099TRUE#ffffff1cubeMeshcubeMesh","type":"blockly"}} title="Bitbybit Blockly Editor - Simple Cube for Runner Tutorial" description="Draws 3D Cube and controls its size via inputs coming from external executing program" /> @@ -68,7 +68,7 @@ Below are the `index.html` and `script.js` files you would use on StackBlitz or - + diff --git a/docs/learn/runners/intro-rete.mdx b/docs/learn/runners/intro-rete.mdx index 592a86d4b..264590f5b 100644 --- a/docs/learn/runners/intro-rete.mdx +++ b/docs/learn/runners/intro-rete.mdx @@ -51,7 +51,7 @@ The following Bitbybit Rete script is the visual program we'll be creating. The diff --git a/docs/learn/runners/intro-typescript.mdx b/docs/learn/runners/intro-typescript.mdx index ac365a39e..536a169ae 100644 --- a/docs/learn/runners/intro-typescript.mdx +++ b/docs/learn/runners/intro-typescript.mdx @@ -46,7 +46,7 @@ The following is the Bitbybit TypeScript script we'll be creating. The JavaScrip {\n const cube = await occt.shapes.solid.createCube({\n size: inputs.size,\n center: [0, 0, 0],\n });\n const filletCube = await occt.fillets.filletEdges({\n shape: cube,\n radius: 0.4\n });\n const drawOptions = new Bit.Inputs.Draw.DrawOcctShapeSimpleOptions();\n drawOptions.faceColour = \"#0000ff\";\n drawOptions.edgeWidth = 1;\n drawOptions.precision = 0.005;\n const cubeMesh = await bitbybit.draw.drawAnyAsync({\n entity: filletCube,\n options: drawOptions,\n });\n return { cubeMesh };\n}\n\nconst runnerOutput = start();\nBit.setBitbybitRunnerResult(runnerOutput);\n","version":"0.21.0","type":"typescript"}} + script={{"script":"type Inputs = {\n size: number;\n}\n\nBit.mockBitbybitRunnerInputs({ size: 1 });\nconst inputs: Inputs = Bit.getBitbybitRunnerInputs();\n\nconst { occt } = bitbybit;\n\nconst start = async () => {\n const cube = await occt.shapes.solid.createCube({\n size: inputs.size,\n center: [0, 0, 0],\n });\n const filletCube = await occt.fillets.filletEdges({\n shape: cube,\n radius: 0.4\n });\n const drawOptions = new Bit.Inputs.Draw.DrawOcctShapeSimpleOptions();\n drawOptions.faceColour = \"#0000ff\";\n drawOptions.edgeWidth = 1;\n drawOptions.precision = 0.005;\n const cubeMesh = await bitbybit.draw.drawAnyAsync({\n entity: filletCube,\n options: drawOptions,\n });\n return { cubeMesh };\n}\n\nconst runnerOutput = start();\nBit.setBitbybitRunnerResult(runnerOutput);\n","type":"typescript"}} title="Bitbybit TypeScript Editor - Simple Cube for Runner Tutorial" description="Draws 3D Cube and controls its size via inputs coming from external executing program" /> diff --git a/docs/learn/runners/live-examples/configurable-cad-part.mdx b/docs/learn/runners/live-examples/configurable-cad-part.mdx index 3b380d420..0f101fc37 100644 --- a/docs/learn/runners/live-examples/configurable-cad-part.mdx +++ b/docs/learn/runners/live-examples/configurable-cad-part.mdx @@ -30,7 +30,7 @@ Below is an interactive preview of the Rete visual program. Notice how this scri @@ -129,7 +129,7 @@ await runner.run(runnerOptions); // Asynchronously initializes the runner and Ba function exportedScript() { // This is the very long JavaScript string generated by "Export to Runner" from Rete. // It starts with "!async function(e,t,s,n,r){..." where e=BitByBit, t=bitbybit, etc. - return '{"type":"rete","version":"0.21.0","script":"!async function(e,t,s,n,r){let a={};a={x:[0],y:[0],z:[1],...a};const o=[{result:e.HS.executeBasedOnType(a,!1,(e=>t.vector.vectorXYZ(e))),transformers:[]}]; ... (rest of the very long exported JS string) ... }(BitByBit,bitbybit,bitbybitRunnerResult,bitbybitRunnerInputs,Bit);"}' + return '{"type":"rete","script":"!async function(e,t,s,n,r){let a={};a={x:[0],y:[0],z:[1],...a};const o=[{result:e.HS.executeBasedOnType(a,!1,(e=>t.vector.vectorXYZ(e))),transformers:[]}]; ... (rest of the very long exported JS string) ... }(BitByBit,bitbybit,bitbybitRunnerResult,bitbybitRunnerInputs,Bit);"}' } // Step 4: Execute the Script diff --git a/docs/learn/runners/table-configurator-blockly.mdx b/docs/learn/runners/table-configurator-blockly.mdx index f4c7b0515..666dcd905 100644 --- a/docs/learn/runners/table-configurator-blockly.mdx +++ b/docs/learn/runners/table-configurator-blockly.mdx @@ -46,7 +46,7 @@ The following Bitbybit Blockly script is the visual program that defines the log widthlengthlegHeightheighthalfLegheightthicknesshalfThicknesswidthOffsetlengthOffsetlegShapecompoundShapetable'clearSky'10000.10.7-100-100-1003#ffffff#ffffff1024TRUE0legHeightMINUSheightthicknesshalfLegheightDIVIDElegHeight2halfThicknessDIVIDEthickness2widthOffsetMINUSDIVIDEwidth2halfThicknesslengthOffsetMINUSDIVIDElength2halfThicknesslegShapethicknessthicknesslegHeight000compoundShapewidthlengththickness0MINUSheighthalfThickness0legShapewidthOffsethalfLegheightlengthOffsetlegShapeNEGwidthOffsethalfLegheightlengthOffsetlegShapewidthOffsethalfLegheightNEGlengthOffsetlegShapeNEGwidthOffsethalfLegheightNEGlengthOffset2000010tablecompoundShape0.01TRUE#999999TRUE#ffffff1tabletablesetupParamsDescribe this function...widthwidthlengthlengthheightheightthicknessthicknesswidthwidth1lengthlength1heightheight0.5thicknessthickness0.05","version":"0.21.0","type":"blockly"}} + script={{"script":"widthlengthlegHeightheighthalfLegheightthicknesshalfThicknesswidthOffsetlengthOffsetlegShapecompoundShapetable'clearSky'10000.10.7-100-100-1003#ffffff#ffffff1024TRUE0legHeightMINUSheightthicknesshalfLegheightDIVIDElegHeight2halfThicknessDIVIDEthickness2widthOffsetMINUSDIVIDEwidth2halfThicknesslengthOffsetMINUSDIVIDElength2halfThicknesslegShapethicknessthicknesslegHeight000compoundShapewidthlengththickness0MINUSheighthalfThickness0legShapewidthOffsethalfLegheightlengthOffsetlegShapeNEGwidthOffsethalfLegheightlengthOffsetlegShapewidthOffsethalfLegheightNEGlengthOffsetlegShapeNEGwidthOffsethalfLegheightNEGlengthOffset2000010tablecompoundShape0.01TRUE#999999TRUE#ffffff1tabletablesetupParamsDescribe this function...widthwidthlengthlengthheightheightthicknessthicknesswidthwidth1lengthlength1heightheight0.5thicknessthickness0.05","type":"blockly"}} title="Bitbybit Blockly Editor - Simple Cube for Runner Tutorial" description="Draws 3D Table and controls its size via inputs coming from external executing program" /> @@ -66,7 +66,7 @@ Below are the `index.html` and `script.js` files you would use on StackBlitz or - + diff --git a/docs/learn/runners/table-configurator-rete.mdx b/docs/learn/runners/table-configurator-rete.mdx index 0b42f2ef8..f6c9aa9b8 100644 --- a/docs/learn/runners/table-configurator-rete.mdx +++ b/docs/learn/runners/table-configurator-rete.mdx @@ -46,7 +46,7 @@ The following Bitbybit Rete script is the visual program that defines the logic diff --git a/docs/learn/runners/table-configurator-typescript.mdx b/docs/learn/runners/table-configurator-typescript.mdx index 9bee2a174..dde6398e0 100644 --- a/docs/learn/runners/table-configurator-typescript.mdx +++ b/docs/learn/runners/table-configurator-typescript.mdx @@ -51,7 +51,7 @@ The following Bitbybit TypeScript script is the program that defines the logic f {\n\n const skyboxOptions = new Bit.Inputs.BabylonScene.SkyboxDto();\n skyboxOptions.skybox = Bit.Inputs.Base.skyboxEnum.clearSky;\n bitbybit.babylon.scene.enableSkybox(skyboxOptions);\n\n const lightOptions = new Bit.Inputs.BabylonScene.DirectionalLightDto();\n lightOptions.intensity = 3;\n bitbybit.babylon.scene.drawDirectionalLight(lightOptions);\n\n const tableTopShape = await solid.createBox({\n width: inputs.width,\n length: inputs.length,\n height: inputs.thickness,\n center: [0, inputs.height - halfThickness, 0],\n });\n\n const leg1Shape = await solid.createBox({\n width: inputs.thickness,\n length: inputs.thickness,\n height: legHeight,\n center: [widthOffset, halfLegHeight, lengthOffset],\n });\n const leg2Shape = await solid.createBox({\n width: inputs.thickness,\n length: inputs.thickness,\n height: legHeight,\n center: [-widthOffset, halfLegHeight, lengthOffset],\n });\n const leg3Shape = await solid.createBox({\n width: inputs.thickness,\n length: inputs.thickness,\n height: legHeight,\n center: [widthOffset, halfLegHeight, -lengthOffset],\n });\n const leg4Shape = await solid.createBox({\n width: inputs.thickness,\n length: inputs.thickness,\n height: legHeight,\n center: [-widthOffset, halfLegHeight, -lengthOffset],\n });\n\n const groundShape = await face.createCircleFace({\n radius: 2,\n center: [0, 0, 0],\n direction: [0, 1, 0]\n });\n\n const compoundShape = await compound.makeCompound({\n shapes: [tableTopShape, leg1Shape, leg2Shape, leg3Shape, leg4Shape, groundShape],\n });\n\n const drawOptions = new Bit.Inputs.Draw.DrawOcctShapeSimpleOptions();\n drawOptions.faceColour = \"#555577\";\n drawOptions.edgeWidth = 1;\n const table = await bitbybit.draw.drawAnyAsync({ entity: compoundShape, options: drawOptions });\n return { table };\n}\n\nconst runnerOutput = start();\nBit.setBitbybitRunnerResult(runnerOutput);\n","version":"0.21.0","type":"typescript"}} + script={{"script":"type Inputs = {\n width: number;\n length: number;\n height: number;\n thickness: number;\n};\n\nconst defaultValues: Inputs = {\n width: 1,\n length: 1,\n height: 0.5,\n thickness: 0.05,\n};\n\nBit.mockBitbybitRunnerInputs(defaultValues);\nconst inputs: Inputs = Bit.getBitbybitRunnerInputs();\n\nconst { solid, compound, face } = bitbybit.occt.shapes;\n\nconst legHeight = inputs.height - inputs.thickness;\nconst halfLegHeight = legHeight / 2;\nconst halfThickness = inputs.thickness / 2;\nconst widthOffset = inputs.width / 2 - halfThickness;\nconst lengthOffset = inputs.length / 2 - halfThickness;\n\n\nconst start = async () => {\n\n const skyboxOptions = new Bit.Inputs.BabylonScene.SkyboxDto();\n skyboxOptions.skybox = Bit.Inputs.Base.skyboxEnum.clearSky;\n bitbybit.babylon.scene.enableSkybox(skyboxOptions);\n\n const lightOptions = new Bit.Inputs.BabylonScene.DirectionalLightDto();\n lightOptions.intensity = 3;\n bitbybit.babylon.scene.drawDirectionalLight(lightOptions);\n\n const tableTopShape = await solid.createBox({\n width: inputs.width,\n length: inputs.length,\n height: inputs.thickness,\n center: [0, inputs.height - halfThickness, 0],\n });\n\n const leg1Shape = await solid.createBox({\n width: inputs.thickness,\n length: inputs.thickness,\n height: legHeight,\n center: [widthOffset, halfLegHeight, lengthOffset],\n });\n const leg2Shape = await solid.createBox({\n width: inputs.thickness,\n length: inputs.thickness,\n height: legHeight,\n center: [-widthOffset, halfLegHeight, lengthOffset],\n });\n const leg3Shape = await solid.createBox({\n width: inputs.thickness,\n length: inputs.thickness,\n height: legHeight,\n center: [widthOffset, halfLegHeight, -lengthOffset],\n });\n const leg4Shape = await solid.createBox({\n width: inputs.thickness,\n length: inputs.thickness,\n height: legHeight,\n center: [-widthOffset, halfLegHeight, -lengthOffset],\n });\n\n const groundShape = await face.createCircleFace({\n radius: 2,\n center: [0, 0, 0],\n direction: [0, 1, 0]\n });\n\n const compoundShape = await compound.makeCompound({\n shapes: [tableTopShape, leg1Shape, leg2Shape, leg3Shape, leg4Shape, groundShape],\n });\n\n const drawOptions = new Bit.Inputs.Draw.DrawOcctShapeSimpleOptions();\n drawOptions.faceColour = \"#555577\";\n drawOptions.edgeWidth = 1;\n const table = await bitbybit.draw.drawAnyAsync({ entity: compoundShape, options: drawOptions });\n return { table };\n}\n\nconst runnerOutput = start();\nBit.setBitbybitRunnerResult(runnerOutput);\n","type":"typescript"}} title="Bitbybit TypeScript Editor - 3D Table Configurator" description="Draws 3D Table and controls its size via inputs coming from external executing program" /> diff --git a/docs/learn/using-ai-with-bitbybit/intro.md b/docs/learn/using-ai-with-bitbybit/intro.md index a25d83e41..b0badf7ee 100644 --- a/docs/learn/using-ai-with-bitbybit/intro.md +++ b/docs/learn/using-ai-with-bitbybit/intro.md @@ -1,29 +1,47 @@ --- sidebar_position: 1 -title: Introduction to AI with Bitbybit +title: AI-Powered 3D Development sidebar_label: Introduction -description: Learn how to leverage Artificial Intelligence within the Bitbybit platform for enhanced coding and design workflows. +description: Supercharge your Bitbybit workflow with AI coding assistants like Claude, ChatGPT, and GitHub Copilot. tags: [ai] --- -# Leveraging AI with Bitbybit: Enhancing Your Design and Coding Workflow +# AI-Powered 3D Development -Bitbybit is an extensive web platform for parametric coding and design, offering a wide array of tools and functionalities. Given its breadth, Artificial Intelligence (AI) can serve as a powerful co-pilot, helping you navigate its features, accelerate your development process, and unlock new creative possibilities. It's important to note that Bitbybit itself **does not provide proprietary Large Language Models (LLMs)**. Instead, we focus on seamless integration with leading third-party AI services and models, allowing you to leverage the best available technologies. +Bitbybit has 1300+ API functions across three CAD kernels. That's a lot to remember. AI coding assistants can help you write Bitbybit code faster and more accurately - if you give them the right context. -The landscape of AI technology is in a state of constant and rapid evolution. At Bitbybit, we are committed to integrating the latest and most impactful advancements. This includes exploring and incorporating: +## The Challenge -* **Cutting-Edge Models:** Primarily LLMs from various providers that can understand and generate human-like text and code. These assist with tasks ranging from script generation and autocompletion to documentation and conceptual brainstorming. The open-source nature of many Bitbybit components and its extensive documentation also plays a crucial role here, as it provides a rich dataset for these foundation models to learn about Bitbybit's core APIs and functionalities, leading to more accurate and relevant AI assistance. Read more about [Our Approach to Open Source](/learn/open-source-approach). -* **Model Context Protocol (MCPs):** an open standard that standardizes how AI applications, like large language models (LLMs), interact with external data sources and tools. It essentially acts as a "universal translator" allowing AI models to communicate with various systems and services. MCP facilitates seamless integration and context sharing, enabling AI models to access information and take actions beyond simple text generation. [Learn More](https://modelcontextprotocol.io/introduction) -* **Specialized Coding Agents:** AI agents fine-tuned for specific programming languages or tasks, such as generating boilerplate code, debugging, or even suggesting more efficient algorithms for your Bitbybit scripts. +AI models like Claude, ChatGPT, and GitHub Copilot are trained on public code, but Bitbybit's specialized 3D/CAD APIs aren't as widely documented as mainstream libraries. This means AI assistants often: -While our "Getting Started" guides and detailed coding documentation provide the foundational knowledge for using Bitbybit, this section focuses specifically on the practical application of AI within the platform. We will explore various ways AI models can be utilized, from simple code completion and generation to more advanced collaborative design processes. We'll also provide guidance on setting up and configuring these AI tools to work with your Bitbybit environment. +- Hallucinate function names that don't exist +- Use incorrect parameter types +- Miss important patterns specific to CAD workflows -**Key Concepts You'll Encounter:** +## The Solution -* **Prompt Engineering:** The art and science of crafting effective inputs (prompts) to guide AI models to produce the desired outputs. This involves being clear, concise, and providing sufficient context. -* **Contextual Awareness:** How AI can leverage the context of your current project, active code files, or design intent within Bitbybit to provide more relevant and useful assistance. -* **Iterative Refinement:** Using AI as a partner in an iterative process. You might generate initial ideas or code snippets with AI and then progressively refine them based on your expertise and specific project requirements. -* **Vibe Coding:** An emerging concept where developers communicate their intent to an AI coding assistant in a more natural, high-level, or even abstract way—expressing the "vibe" or desired outcome rather than precise algorithmic steps. The AI then attempts to translate this "vibe" into functional code. This can speed up prototyping and exploration of ideas. -* **Ethical Considerations:** Understanding the limitations, potential biases, and responsible use of AI models in your creative and technical work. This includes data privacy, intellectual property, and the reliability of AI-generated content. +We provide two ways to give AI assistants deep knowledge of our APIs: -It is crucial to remember that AI is a field characterized by its incredibly fast pace of innovation. Information, tools, and best practices can become outdated quickly. Therefore, we encourage you to approach these guides with an understanding of this dynamic environment and to check back regularly for updates and new insights. Think of this section as a living document, evolving alongside the AI technologies it describes. +1. **[Context Files](./prompt-contexts)** - Download a markdown file containing our complete API reference. Attach it to your AI conversation and get accurate code generation. + +2. **[Context7 MCP](./mcp/context-7)** - Use the Model Context Protocol to give AI agents like Claude live access to our documentation. + +## What You Can Do + +With proper context, AI assistants can: + +- Generate complete parametric models from natural language descriptions +- Scaffold new projects with correct initialization patterns +- Debug and optimize existing Bitbybit code +- Explain unfamiliar API functions +- Convert between different geometry representations + +## Getting Started + +**Beginners:** Download the [Full Context File](./prompt-contexts) for your engine and attach it to ChatGPT, Claude, or your preferred AI assistant. + +**Developers:** Combine a [Lite Context](./prompt-contexts) with [Context7 MCP](./mcp/context-7) for the best balance of token efficiency and comprehensive documentation access. + +:::tip Vibe Coding +Describe what you want in plain English - "Create a rounded box with four legs" - and let the AI figure out which Bitbybit functions to use. The context files include decision trees that help AI choose the right approach. +::: diff --git a/docs/learn/using-ai-with-bitbybit/prompt-contexts.mdx b/docs/learn/using-ai-with-bitbybit/prompt-contexts.mdx new file mode 100644 index 000000000..2665c1b5b --- /dev/null +++ b/docs/learn/using-ai-with-bitbybit/prompt-contexts.mdx @@ -0,0 +1,189 @@ +--- +id: prompt-contexts +sidebar_position: 2 +title: AI Prompt Context Files +sidebar_label: Prompt Context Files +description: Learn how to use AI Prompt Context files to give your AI coding assistant comprehensive knowledge of the Bitbybit API for more accurate code generation. +tags: [ai, babylonjs, threejs, playcanvas] +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; +import { DownloadButton } from '@site/src/components/DownloadButton'; + +# AI Prompt Context Files + +Modern AI assistants like Claude, Gemini, Grok, or ChatGPT are remarkably capable at writing code. However, they can struggle with specialized libraries and APIs they weren't extensively trained on. That's where **AI Prompt Contexts** come in - specially crafted documentation files that give your AI assistant deep knowledge of the Bitbybit API. + +--- + +## Download Context Files + +Choose the context file that matches your 3D rendering engine. **Right-click and "Save As"** to download, or open and copy the content. + + + +
+

Monaco Editor Context (Beginner-Friendly)

+

For users of our online TypeScript editor at bitbybit.dev/app

+
+ +
+
+
+ +
+

BabylonJS Context Files

+

Full-featured 3D engine with powerful rendering capabilities

+
+ + +
+
+
+ +
+

ThreeJS Context Files

+

Popular, lightweight 3D library for web applications

+
+ + +
+
+
+ +
+

PlayCanvas Context Files

+

Game engine with visual editor and runtime

+
+ + +
+
+
+
+ +:::tip Which version should I choose? +- **Full Context** - Best for beginners. Includes explanations, setup guides, and complete API reference. +- **Lite Context** - Best for experienced developers. Minimal size, just API definitions with abbreviated notation. +::: + +--- + +## What Are AI Prompt Contexts? + +An AI Prompt Context is a markdown file designed to be attached to conversations with AI coding assistants. When you provide this context file, the AI gains comprehensive knowledge about: + +- **Bitbybit's complete API** with all available functions and their parameters +- **Coding patterns and best practices** for 3D/CAD development +- **Integration approaches** for different rendering engines +- **Code examples** demonstrating correct usage patterns +- **Decision trees** that help the AI recommend the right approach based on your experience level + +Think of it as giving your AI assistant a complete reference manual it can consult while helping you write code. + +--- + +## How to Use Context Files + +### Step 1: Download or Copy + +Click the download button above for your engine, then either: +- **Right-click → Save As** to download the file +- Or open the file and copy its entire content + +### Step 2: Attach to Your AI Conversation + +Most modern AI interfaces support file attachments: +- Drag and drop the file into the chat +- Use the attachment button +- Or paste the content directly + +### Step 3: Start Coding with AI + +Once attached, ask questions like: + +- *"Create a parametric table with adjustable legs"* +- *"Show me how to create a filleted box and export it as STEP"* +- *"Build a gear with 24 teeth and a 5mm module"* + +The AI will reference the context to generate accurate, working code that follows Bitbybit's recommended patterns. + +--- + +## Understanding the Lite Context Format + +Lite contexts use an important technique to reduce file size: **a translation dictionary**. + +At the beginning of the API section, you'll find a dictionary that maps abbreviated terms to their full names: + +| Abbreviation | Full Name | +|--------------|-----------| +| `OC` | `OCCT` | +| `sp` | `shape` | +| `sd` | `solid` | +| `cr` | `create` | + +### Critical: AI Must Translate Abbreviations + +The AI must translate these abbreviations back to full names when generating code. When the AI sees something like: + +``` +bitbybit.oc.sh.sd.crBox(op: BoxD) +``` + +It should generate: + +```typescript +bitbybit.occt.shapes.solid.createBox(boxOptions: BoxDto) +``` + +The abbreviated forms are only for documentation - they would not compile if used directly in code. The AI handles this translation transparently, so you receive clean, readable code. + +:::warning +If your AI agent cannot translate these abbreviated values, the code will not work. If that happens, consider using the Full context version or a more capable AI model. +::: + +--- + +## Combining with Context7 MCP + +For the best experience, we recommend combining a **Lite context** with our **[Context7 MCP Server](./mcp/context-7.md)**: + +- **Context7 MCP** provides live access to full documentation and stays current with the latest changes +- **Lite context** ensures the AI knows precise API signatures + +Together, they create a powerful coding assistant that understands both the big picture and the fine details. + +--- + +## Tips for Effective AI-Assisted Coding + +### Be Specific About Your Goals + +Instead of asking for "a shape," describe what you actually need: + +> *"Create a rounded rectangular table top with four cylindrical legs, where the leg height and table dimensions are parametric."* + +### Mention Your Experience Level + +The contexts include decision trees that help the AI adapt: + +- **Beginners:** The AI can scaffold complete applications +- **Experienced developers:** The AI can focus on just the API calls you need + +### Iterate and Refine + +AI assistants are collaborative tools. If the first attempt isn't quite right: + +1. Explain what you'd like changed +2. Ask for specific modifications +3. The AI can refine suggestions while staying consistent with the Bitbybit API + +--- + +## Staying Up to Date + +The context files are updated with each Bitbybit release to match the latest API. When you see a new version available, download the updated context to ensure your AI has the most current information. + +Check the version number in your context file and compare it with the latest version on [bitbybit.dev GitHub](https://github.com/bitbybit-dev/bitbybit/releases) to ensure you're using the most recent documentation. diff --git a/docs/package.json b/docs/package.json index 6daa28722..c6169039e 100644 --- a/docs/package.json +++ b/docs/package.json @@ -1,11 +1,12 @@ { "name": "docs", - "version": "0.0.0", + "version": "0.21.1", "private": true, "scripts": { "docusaurus": "docusaurus", - "start": "docusaurus start", - "build": "docusaurus build", + "generate-llms": "node scripts/generate-llms.js", + "start": "npm run generate-llms && docusaurus start", + "build": "npm run generate-llms && docusaurus build", "swizzle": "docusaurus swizzle", "deploy": "docusaurus deploy", "clear": "docusaurus clear", diff --git a/docs/scripts/generate-llms.js b/docs/scripts/generate-llms.js new file mode 100644 index 000000000..c49e2183b --- /dev/null +++ b/docs/scripts/generate-llms.js @@ -0,0 +1,30 @@ +/* eslint-disable @typescript-eslint/no-var-requires */ +/* eslint-disable no-undef */ +/** + * Script to generate llms.txt from llms.template.txt + * Replaces {{VERSION}} placeholders with the version from package.json + * + * Run this script as part of the build process: + * node scripts/generate-llms.js + */ + +const fs = require("fs"); +const path = require("path"); + +const packageJson = require("../package.json"); +const version = packageJson.version; + +const templatePath = path.join(__dirname, "../static/llms.template.txt"); +const outputPath = path.join(__dirname, "../static/llms.txt"); + +console.log(`Generating llms.txt with version: ${version}`); + +try { + const template = fs.readFileSync(templatePath, "utf8"); + const output = template.replace(/\{\{VERSION\}\}/g, version); + fs.writeFileSync(outputPath, output, "utf8"); + console.log("Successfully generated llms.txt"); +} catch (error) { + console.error("Error generating llms.txt:", error); + process.exit(1); +} diff --git a/docs/src/components/BitByBitRenderCanvas/index.tsx b/docs/src/components/BitByBitRenderCanvas/index.tsx index d5fe0eca5..bfb7b45fa 100644 --- a/docs/src/components/BitByBitRenderCanvas/index.tsx +++ b/docs/src/components/BitByBitRenderCanvas/index.tsx @@ -1,12 +1,13 @@ import React, { useRef, useEffect, useState, useCallback, useId, CSSProperties } from "react"; import Admonition from "@theme/Admonition"; import CodeBlock from "@theme/CodeBlock"; +import useDocusaurusContext from "@docusaurus/useDocusaurusContext"; type ScriptType = "rete" | "blockly" | "typescript"; interface ScriptProp { script: string; - version: string; + version?: string; // Made optional - will use default from config if not provided type: ScriptType; } @@ -62,6 +63,8 @@ const BitByBitRenderCanvas: React.FC = React.memo(({ const iframeRef = useRef(null); const canvasContainerRef = useRef(null); const uniqueId = useId(); + const { siteConfig } = useDocusaurusContext(); + const defaultVersion = siteConfig.customFields?.bitbybitVersion as string || "0.21.1"; const [isIframeReady, setIsIframeReady] = useState(false); const [loadIframe, setLoadIframe] = useState(!requireManualStart); @@ -83,14 +86,19 @@ const BitByBitRenderCanvas: React.FC = React.memo(({ const dataToPost = React.useMemo(() => { if (!scriptProp || !scriptProp.script) return null; try { - const stringifiedFullScriptProp = JSON.stringify(scriptProp); + // Use version from script prop if provided, otherwise use default from config + const scriptWithVersion = { + ...scriptProp, + version: scriptProp.version || defaultVersion + }; + const stringifiedFullScriptProp = JSON.stringify(scriptWithVersion); return { script: { script: stringifiedFullScriptProp, type: scriptProp.type }, type: "openScript" as const }; } catch (error) { console.error("Error stringifying scriptProp:", error, scriptProp); return null; } - }, [scriptProp]); + }, [scriptProp, defaultVersion]); const postMessageToIframe = useCallback((message: PostMessageData) => { if (iframeRef.current?.contentWindow && fullIframeUrl) { diff --git a/docs/src/components/DownloadButton/index.tsx b/docs/src/components/DownloadButton/index.tsx new file mode 100644 index 000000000..c3cc8a7de --- /dev/null +++ b/docs/src/components/DownloadButton/index.tsx @@ -0,0 +1,54 @@ +import React from "react"; + +interface DownloadButtonProps { + href: string; + label: string; + variant?: "full" | "lite"; +} + +export const DownloadButton: React.FC = ({ href, label, variant = "full" }) => { + const colors = variant === "full" + ? { bg: "linear-gradient(135deg, #F0CEBB 0%, #d6b39f 100%)", text: "#1a1c1f", border: "#d6b39f" } + : { bg: "linear-gradient(135deg, #2a2d32 0%, #1a1c1f 100%)", text: "#F0CEBB", border: "#F0CEBB" }; + + return ( + + + + + + + {label} + + ); +}; + +export default DownloadButton; diff --git a/docs/src/components/Icons/index.tsx b/docs/src/components/Icons/index.tsx index 7c28a82da..29636135f 100644 --- a/docs/src/components/Icons/index.tsx +++ b/docs/src/components/Icons/index.tsx @@ -408,3 +408,68 @@ export const TypeScriptEditorIcon: React.FC = ({ size = defaultSize, TS ); + +export const TerminalIcon: React.FC = ({ size = defaultSize, color = defaultColor, className }) => ( + + {/* Terminal window frame */} + + {/* Title bar */} + + {/* Window controls */} + + + + {/* Command prompt arrow */} + + {/* Cursor/command line */} + + {/* Blinking cursor */} + + +); + +export const AIRobotIcon: React.FC = ({ size = defaultSize, color = defaultColor, className }) => ( + + {/* Robot Head */} + + {/* Antenna */} + + + {/* Left eye */} + + + {/* Right eye */} + + + {/* Smile */} + + {/* Body */} + + {/* Code lines on body */} + + + {/* Arms */} + + + + + +); + +export const Context7Icon: React.FC = ({ size = defaultSize, color = defaultColor, className }) => ( + + {/* Circle with 7 */} + + {/* The number 7 */} + + {/* Context dots around */} + + + + + + + + + +); diff --git a/docs/src/components/Version/index.tsx b/docs/src/components/Version/index.tsx new file mode 100644 index 000000000..833353849 --- /dev/null +++ b/docs/src/components/Version/index.tsx @@ -0,0 +1,33 @@ +import React, { type ReactNode } from "react"; +import useDocusaurusContext from "@docusaurus/useDocusaurusContext"; + +interface VersionProps { + /** Optional prefix to add before the version (e.g., "v" for "v0.21.1") */ + prefix?: string; + /** Optional suffix to add after the version */ + suffix?: string; +} + +/** + * A component that displays the current Bitbybit version from package.json. + * + * Usage in MDX files: + * - Just the version: → "0.21.1" + * - With v prefix: → "v0.21.1" + * - In a link: [Download](https://example.com//file.md) + */ +export default function Version({ prefix = "", suffix = "" }: VersionProps): ReactNode { + const { siteConfig } = useDocusaurusContext(); + const version = siteConfig.customFields?.bitbybitVersion as string; + + return <>{prefix}{version}{suffix}; +} + +/** + * Hook to get the current Bitbybit version. + * Useful when you need the version as a string value in code. + */ +export function useBitbybitVersion(): string { + const { siteConfig } = useDocusaurusContext(); + return siteConfig.customFields?.bitbybitVersion as string; +} diff --git a/docs/src/pages/index.module.css b/docs/src/pages/index.module.css index 9cce9cd8e..e10231310 100644 --- a/docs/src/pages/index.module.css +++ b/docs/src/pages/index.module.css @@ -1350,4 +1350,424 @@ .editorDescription { font-size: 14px; } + + .quickStartContent { + flex-direction: column; + text-align: center; + } + + .quickStartCommand { + flex-direction: column; + gap: 12px; + } + + .quickStartCommand code { + font-size: 12px; + word-break: break-all; + } + + .copyButton { + width: 100%; + justify-content: center; + padding: 12px; + } + + .quickStartEngines { + flex-direction: column; + gap: 12px; + } +} + +/* ===== QUICK START SECTION ===== */ +.quickStartSection { + padding: 5rem 0; + background: linear-gradient(180deg, #121315 0%, #1a1c1f 100%); +} + +.quickStartCard { + position: relative; + background: linear-gradient(145deg, rgba(30, 33, 38, 0.95) 0%, rgba(22, 24, 28, 0.98) 100%); + border: 1px solid rgba(240, 206, 187, 0.2); + border-radius: 24px; + padding: 48px; + overflow: hidden; + max-width: 900px; + margin: 0 auto; +} + +.quickStartGlow { + position: absolute; + top: -100px; + left: 50%; + transform: translateX(-50%); + width: 400px; + height: 400px; + background: radial-gradient(circle, rgba(240, 206, 187, 0.08) 0%, transparent 70%); + pointer-events: none; +} + +.quickStartContent { + display: flex; + align-items: flex-start; + gap: 24px; + margin-bottom: 32px; +} + +.quickStartIcon { + flex-shrink: 0; + width: 72px; + height: 72px; + display: flex; + align-items: center; + justify-content: center; + background: rgba(240, 206, 187, 0.1); + border-radius: 16px; + border: 1px solid rgba(240, 206, 187, 0.2); +} + +.quickStartIcon svg { + color: #F0CEBB; +} + +.quickStartText h2 { + color: #F0CEBB; + font-size: 1.75rem; + font-weight: 700; + margin-bottom: 12px; + letter-spacing: -0.5px; +} + +.quickStartText p { + color: rgba(255, 255, 255, 0.7); + font-size: 1rem; + line-height: 1.7; + margin: 0; +} + +.quickStartCommand { + display: flex; + align-items: center; + gap: 12px; + background: rgba(0, 0, 0, 0.4); + border: 1px solid rgba(240, 206, 187, 0.15); + border-radius: 12px; + padding: 16px 20px; + margin-bottom: 24px; +} + +.quickStartCommand code { + flex: 1; + font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace; + font-size: 15px; + color: #F0CEBB; + background: none; + border: none; + letter-spacing: 0.3px; +} + +.copyButton { + display: flex; + align-items: center; + justify-content: center; + width: 40px; + height: 40px; + background: rgba(240, 206, 187, 0.1); + border: 1px solid rgba(240, 206, 187, 0.2); + border-radius: 8px; + color: #F0CEBB; + cursor: pointer; + transition: all 0.3s ease; +} + +.copyButton:hover { + background: rgba(240, 206, 187, 0.2); + border-color: rgba(240, 206, 187, 0.4); + transform: scale(1.05); +} + +.quickStartEngines { + display: flex; + align-items: center; + gap: 16px; + margin-bottom: 24px; +} + +.quickStartEngines > span { + color: rgba(255, 255, 255, 0.5); + font-size: 14px; + font-weight: 500; +} + +.engineBadges { + display: flex; + gap: 10px; + flex-wrap: wrap; +} + +.engineBadge { + background: rgba(240, 206, 187, 0.08); + border: 1px solid rgba(240, 206, 187, 0.15); + border-radius: 20px; + padding: 6px 14px; + font-size: 13px; + color: rgba(240, 206, 187, 0.9); + font-weight: 500; +} + +.quickStartLink { + display: inline-flex; + align-items: center; + color: #F0CEBB; + font-weight: 600; + font-size: 15px; + text-decoration: none; + transition: all 0.3s ease; +} + +.quickStartLink:hover { + color: #fff6f3; + text-decoration: none; + transform: translateX(4px); +} + +/* AI Coding Section */ +.aiSection { + position: relative; + padding: 100px 0; + background: linear-gradient(180deg, #121315 0%, #1a1c1f 50%, #121315 100%); + overflow: hidden; +} + +.aiBackground { + position: absolute; + top: 0; + left: 0; + right: 0; + bottom: 0; + pointer-events: none; + overflow: hidden; +} + +.aiGradientOrb1 { + position: absolute; + top: -150px; + left: -100px; + width: 500px; + height: 500px; + background: radial-gradient(circle, rgba(138, 43, 226, 0.15) 0%, rgba(138, 43, 226, 0.05) 40%, transparent 70%); + border-radius: 50%; + filter: blur(60px); + animation: aiOrbFloat1 15s ease-in-out infinite; +} + +.aiGradientOrb2 { + position: absolute; + bottom: -150px; + right: -100px; + width: 600px; + height: 600px; + background: radial-gradient(circle, rgba(0, 200, 255, 0.12) 0%, rgba(0, 200, 255, 0.04) 40%, transparent 70%); + border-radius: 50%; + filter: blur(80px); + animation: aiOrbFloat2 18s ease-in-out infinite; +} + +@keyframes aiOrbFloat1 { + 0%, 100% { transform: translate(0, 0) scale(1); } + 50% { transform: translate(50px, 30px) scale(1.1); } +} + +@keyframes aiOrbFloat2 { + 0%, 100% { transform: translate(0, 0) scale(1); } + 50% { transform: translate(-40px, -30px) scale(1.15); } +} + +.aiParticles { + position: absolute; + width: 100%; + height: 100%; +} + +.aiParticle { + position: absolute; + width: 4px; + height: 4px; + background: rgba(138, 43, 226, 0.6); + border-radius: 50%; + animation: aiParticleFloat 12s ease-in-out infinite; +} + +.aiParticle:nth-child(1) { top: 20%; left: 15%; animation-delay: 0s; } +.aiParticle:nth-child(2) { top: 60%; left: 80%; animation-delay: 2s; background: rgba(0, 200, 255, 0.6); } +.aiParticle:nth-child(3) { top: 40%; left: 50%; animation-delay: 4s; } +.aiParticle:nth-child(4) { top: 75%; left: 25%; animation-delay: 6s; background: rgba(240, 206, 187, 0.6); } +.aiParticle:nth-child(5) { top: 30%; left: 70%; animation-delay: 8s; background: rgba(0, 200, 255, 0.6); } +.aiParticle:nth-child(6) { top: 85%; left: 60%; animation-delay: 10s; } + +@keyframes aiParticleFloat { + 0%, 100% { transform: translateY(0) scale(1); opacity: 0.6; } + 50% { transform: translateY(-30px) scale(1.5); opacity: 1; } +} + +.aiContent { + position: relative; + z-index: 1; +} + +.aiHeader { + text-align: center; + margin-bottom: 60px; +} + +.aiBadge { + display: inline-flex; + align-items: center; + gap: 8px; + background: linear-gradient(135deg, rgba(138, 43, 226, 0.15) 0%, rgba(0, 200, 255, 0.1) 100%); + border: 1px solid rgba(138, 43, 226, 0.3); + border-radius: 30px; + padding: 8px 20px; + margin-bottom: 24px; + font-size: 14px; + color: #c792ea; + backdrop-filter: blur(10px); +} + +.aiBadgeIcon { + font-size: 16px; + animation: sparkle 2s ease-in-out infinite; +} + +.aiHeader h2 { + font-size: clamp(32px, 5vw, 48px); + font-weight: 300; + color: #ffffff; + margin-bottom: 20px; + letter-spacing: 2px; +} + +.aiHeader > p { + max-width: 700px; + margin: 0 auto; + color: rgba(255, 255, 255, 0.7); + font-size: 18px; + line-height: 1.7; +} + +.aiCardsGrid { + display: grid; + grid-template-columns: repeat(3, 1fr); + gap: 30px; + margin-bottom: 50px; +} + +@media (max-width: 996px) { + .aiCardsGrid { + grid-template-columns: repeat(2, 1fr); + } +} + +@media (max-width: 640px) { + .aiCardsGrid { + grid-template-columns: 1fr; + } +} + +.aiCard { + position: relative; + background: linear-gradient(145deg, rgba(30, 32, 36, 0.8) 0%, rgba(20, 22, 25, 0.9) 100%); + border: 1px solid rgba(138, 43, 226, 0.2); + border-radius: 20px; + padding: 32px 28px; + text-decoration: none; + overflow: hidden; + transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94); +} + +.aiCard:hover { + transform: translateY(-8px); + border-color: rgba(138, 43, 226, 0.5); + box-shadow: + 0 20px 40px rgba(0, 0, 0, 0.4), + 0 0 60px rgba(138, 43, 226, 0.15); + text-decoration: none; +} + +.aiCardGlow { + position: absolute; + top: 0; + left: 0; + right: 0; + height: 150px; + background: radial-gradient(ellipse at 50% 0%, rgba(138, 43, 226, 0.1) 0%, transparent 70%); + pointer-events: none; + opacity: 0; + transition: opacity 0.4s ease; +} + +.aiCard:hover .aiCardGlow { + opacity: 1; +} + +.aiCardIcon { + display: flex; + justify-content: center; + align-items: center; + width: 80px; + height: 80px; + background: linear-gradient(135deg, rgba(138, 43, 226, 0.15) 0%, rgba(0, 200, 255, 0.08) 100%); + border-radius: 16px; + margin-bottom: 24px; + border: 1px solid rgba(138, 43, 226, 0.2); + transition: all 0.3s ease; +} + +.aiCard:hover .aiCardIcon { + background: linear-gradient(135deg, rgba(138, 43, 226, 0.25) 0%, rgba(0, 200, 255, 0.15) 100%); + border-color: rgba(138, 43, 226, 0.4); + transform: scale(1.05); +} + +.aiCardIcon svg { + color: #c792ea; +} + +.aiCard h3 { + font-size: 22px; + font-weight: 600; + color: #ffffff; + margin-bottom: 14px; + letter-spacing: 0.5px; +} + +.aiCard p { + color: rgba(255, 255, 255, 0.65); + font-size: 15px; + line-height: 1.65; + margin-bottom: 20px; +} + +.aiCardCta { + display: inline-flex; + align-items: center; + color: #c792ea; + font-weight: 600; + font-size: 14px; + transition: all 0.3s ease; +} + +.aiCard:hover .aiCardCta { + color: #e0b0ff; + transform: translateX(4px); +} + +.aiFooter { + text-align: center; +} + +.aiFooter p { + color: rgba(255, 255, 255, 0.5); + font-size: 14px; + max-width: 600px; + margin: 0 auto; } diff --git a/docs/src/pages/index.tsx b/docs/src/pages/index.tsx index 5bc1f0c80..3921d766f 100644 --- a/docs/src/pages/index.tsx +++ b/docs/src/pages/index.tsx @@ -12,19 +12,20 @@ import { GamepadIcon, SofaIcon, BuildingIcon, - TargetIcon, OpenSourceIcon, BookIcon, RingIcon, - BlocksIcon, UserPlusIcon, - MonacoIcon, ShopifyBagIcon, NoCodeIcon, ReteEditorIcon, BlocklyEditorIcon, TypeScriptEditorIcon, + TerminalIcon, + AIRobotIcon, + Context7Icon, } from "@site/src/components/Icons"; +import { useState } from "react"; import styles from "./index.module.css"; @@ -35,7 +36,7 @@ const learningPaths = [ subtitle: "No coding required", description: "Create 3D models using intuitive node-based editors like Rete and Blockly. Perfect for designers and beginners.", IconComponent: ArtIcon, - link: "/learn/getting-started/overview", + link: "/learn/getting-started/rete/hello-world", features: ["Drag & drop nodes", "Real-time preview", "Export ready models"], }, { @@ -43,7 +44,7 @@ const learningPaths = [ subtitle: "Full programmatic control", description: "Write code in our Monaco editor with full TypeScript support, autocomplete, and access to the complete API.", IconComponent: CodeIcon, - link: "/learn/code/intro", + link: "/learn/npm-packages/intro", features: ["Type-safe API", "Monaco editor", "NPM packages"], }, { @@ -61,7 +62,7 @@ const technologies = [ { name: "Three.js", description: "Integrate Bitbybit's CAD capabilities with the popular Three.js rendering engine.", - link: "/learn/npm-packages/threejs", + link: "/learn/getting-started/engines/threejs", color: "#049EF4", logo: "https://bitbybit.dev/assets/threejs-logo.png", isGameEngine: true, @@ -69,7 +70,7 @@ const technologies = [ { name: "Babylon.js", description: "Build powerful 3D experiences combining Bitbybit geometry with Babylon.js features.", - link: "/learn/npm-packages/babylonjs", + link: "/learn/getting-started/engines/babylonjs", color: "#BB464B", logo: "https://bitbybit.dev/assets/babylon_logo.png", isGameEngine: true, @@ -77,7 +78,7 @@ const technologies = [ { name: "PlayCanvas", description: "Create high-performance 3D applications with Bitbybit and PlayCanvas game engine.", - link: "/learn/npm-packages/playcanvas", + link: "/learn/getting-started/engines/playcanvas", color: "#FF6B35", logo: "/img/playcanvas.png", isGameEngine: true, @@ -169,7 +170,7 @@ function HeroSection() {

Learn to create stunning parametric 3D models using visual programming or code. Understand how to use our E-Commerce solutions.
- From beginners to professionals — your journey to 3D mastery starts here. + From beginners to professionals - your journey to 3D mastery starts here.

@@ -285,6 +286,68 @@ function TechnologiesSection() { ); } +function QuickStartSection() { + const [copied, setCopied] = useState(false); + const command = "npx @bitbybit-dev/create-app my-awesome-project"; + + const copyToClipboard = () => { + navigator.clipboard.writeText(command); + setCopied(true); + setTimeout(() => setCopied(false), 2000); + }; + + return ( +
+
+
+
+
+
+ +
+
+

Quick Start with NPM Packages

+

+ Scaffold a fully-configured 3D CAD project in seconds. Includes Vite, TypeScript, and all three geometry kernels (OCCT, JSCAD, Manifold) ready to use. +

+
+
+
+ {command} + +
+
+ Supports: +
+ Three.js + Babylon.js + PlayCanvas +
+
+ + Learn more about NPM packages → + +
+
+
+ ); +} + function CommunitySection() { return (
@@ -383,6 +446,83 @@ function ShopifyBitsSection() { ); } +function AICodingSection() { + return ( +
+
+
+
+
+ + + + + + +
+
+
+
+
+
+ + AI-Powered Development +
+ Code with AI Assistants +

+ Supercharge your 3D development workflow by leveraging AI coding assistants like GitHub Copilot, + Claude, and ChatGPT. Use our specialized context files to help AI understand Bitbybit's APIs. +

+
+
+ +
+
+ +
+

Getting Started with AI

+

+ Learn how to effectively prompt AI assistants to generate Bitbybit code, understand our patterns, + and accelerate your 3D development. +

+ Learn More → + + +
+
+ +
+

Context Files

+

+ Download engine-specific context files for BabylonJS, Three.js, and PlayCanvas to enhance + AI understanding of your development environment. +

+ Get Contexts → + + +
+
+ +
+

Context7 MCP

+

+ Use the Context7 Model Context Protocol server to automatically provide Bitbybit documentation + to AI models like Claude. +

+ Setup MCP → + +
+
+

+ Works with popular AI assistants including GitHub Copilot, Claude, ChatGPT, and any MCP-compatible tool. +

+
+
+
+
+ ); +} + function CTASection() { return (
@@ -482,6 +622,8 @@ export default function Home(): ReactNode { + + diff --git a/docs/src/theme/MDXComponents/index.tsx b/docs/src/theme/MDXComponents/index.tsx new file mode 100644 index 000000000..cdb6969b5 --- /dev/null +++ b/docs/src/theme/MDXComponents/index.tsx @@ -0,0 +1,23 @@ +import React from "react"; +import MDXComponents from "@theme-original/MDXComponents"; +import Version, { useBitbybitVersion } from "@site/src/components/Version"; + +/** + * VersionLink - A component for creating links with version numbers. + * This allows dynamic version insertion in markdown links. + * + * Usage: Link Text + */ +function VersionLink({ href, children }: { href: string; children: React.ReactNode }): JSX.Element { + const version = useBitbybitVersion(); + const processedHref = href.replace(/\{version\}/g, version); + return {children}; +} + +export default { + // Re-use the default mapping + ...MDXComponents, + // Add custom components available in all MDX files + Version, + VersionLink, +}; diff --git a/docs/static/llms.template.txt b/docs/static/llms.template.txt new file mode 100644 index 000000000..4b5abaf6f --- /dev/null +++ b/docs/static/llms.template.txt @@ -0,0 +1,324 @@ +# Bitbybit Documentation + +> Learn how to use the Bitbybit 3D creative coding platform—from visual programming to TypeScript APIs and NPM package integration. Build parametric 3D models, product configurators, and CAD applications directly in the browser. + +This is the official documentation site for Bitbybit. The platform enables designers and developers to create 3D geometry using visual programming or TypeScript code, with integration for BabylonJS, Three.js, and PlayCanvas game engines. + +## Quick Links + +- Main Platform: https://bitbybit.dev +- TypeScript API Reference: https://docs.bitbybit.dev +- GitHub Repository: https://github.com/bitbybit-dev/bitbybit + +## Getting Started + +Comprehensive guides for new users to understand the platform basics. + +- Welcome Guide: https://learn.bitbybit.dev/learn/intro +- Platform Overview: https://learn.bitbybit.dev/learn/getting-started/overview +- Open Source Approach: https://learn.bitbybit.dev/learn/open-source-approach + +### Understanding Scripts & Projects + +Scripts are the core building blocks in Bitbybit projects. Each project can contain multiple scripts of different types: + +- Scripts Overview: https://learn.bitbybit.dev/learn/getting-started/basics/scripts/intro + +Learn about: +- What scripts are and how they work within projects +- The three script types (Blockly, Rete, TypeScript) +- Script visibility settings (public/private) +- Combining multiple script types in a single project +- Exporting scripts for external use + +### Blockly Editor (Visual Block-Based Programming) + +Blockly provides an intuitive block-based visual programming interface, ideal for beginners: + +- Introduction to Blockly: https://learn.bitbybit.dev/learn/getting-started/blockly/intro + +### Rete Editor (Node-Based Visual Programming) + +Rete offers a node-based visual programming interface for complex workflows: + +- Introduction to Rete: https://learn.bitbybit.dev/learn/getting-started/rete/intro +- Parametric Cube Tutorial: https://learn.bitbybit.dev/learn/getting-started/rete/parametric-cube +- TypeScript in Rete Editor: https://learn.bitbybit.dev/learn/getting-started/rete/typescript-editor-component + +The Rete editor includes embedded TypeScript, JavaScript, and JSON editors. This allows users to: +- Write custom code within visual programming workflows +- Access algorithms not yet available as visual components +- Combine the intuitiveness of visual programming with the power of text-based scripting + +### TypeScript Editor (Monaco) + +For advanced users who prefer text-based programming: + +- Introduction to TypeScript: https://learn.bitbybit.dev/learn/getting-started/typescript/intro +- Hello World Tutorial: https://learn.bitbybit.dev/learn/getting-started/typescript/hello-world + +The Monaco editor (based on core technologies of VS Code) provides: +- Full IntelliSense and autocompletion +- Type safety and early error detection +- Maximum flexibility and control + +### Assets & File Management + +Working with local and external assets: + +- Importing Local glTF Files: https://learn.bitbybit.dev/learn/getting-started/basics/assets/local/gltf + +## Code & Algorithm Organization + +Understanding how algorithms are organized across all three editors (TypeScript, Blockly, and Rete). + +- Algorithm Organization Introduction: https://learn.bitbybit.dev/learn/code/intro + +This section explains: +- How algorithms are organized into common categories across all editors +- Why the same core algorithms (OCCT, JSCAD, BabylonJS) are available in TypeScript, Blockly, and Rete +- Editor-specific differences (e.g., Blockly has Functions/Variables categories, Rete uses dataflow approach) +- The DRY (Don't Repeat Yourself) principle in algorithm design + +Key insight: The fundamental algorithms are identical regardless of editor choice—only the method of interaction differs. + +## NPM Packages + +Integration guides for embedding Bitbybit in your web applications. + +### Quick Start + +```bash +npx @bitbybit-dev/create-app my-project +``` + +Choose your game engine (BabylonJS, Three.js, or PlayCanvas) and start coding immediately. + +### Overview + +- Introduction: https://learn.bitbybit.dev/learn/npm-packages/intro +- Engine Agnostic Core: https://learn.bitbybit.dev/learn/npm-packages/game-engine-agnostic + +### Game Engine Integration + +- Three.js Integration: https://learn.bitbybit.dev/learn/npm-packages/threejs +- BabylonJS Integration: https://learn.bitbybit.dev/learn/npm-packages/babylonjs +- PlayCanvas Integration: https://learn.bitbybit.dev/learn/npm-packages/playcanvas + +### All NPM Packages + +Game Engine Packages: +- @bitbybit-dev/babylonjs - BabylonJS visualization and drawing +- @bitbybit-dev/threejs - Three.js visualization and drawing +- @bitbybit-dev/playcanvas - PlayCanvas visualization and drawing + +Core Packages: +- @bitbybit-dev/core - Combined CAD kernel features +- @bitbybit-dev/base - Base algorithms (vector math, transformations) + +CAD Kernel Packages (Main Thread): +- @bitbybit-dev/occt - OpenCascade for industrial B-rep CAD +- @bitbybit-dev/jscad - JSCAD for CSG modeling +- @bitbybit-dev/manifold - Manifold for fast mesh booleans + +Web Worker Packages (Non-blocking, Recommended): +- @bitbybit-dev/occt-worker - OpenCascade via web worker +- @bitbybit-dev/jscad-worker - JSCAD via web worker +- @bitbybit-dev/manifold-worker - Manifold via web worker + +## Runners + +Script runners enable executing Bitbybit scripts in external web applications. Scripts can be created in any editor (Blockly, Rete, or TypeScript) and exported for use in standalone websites. + +- Runners Overview: https://learn.bitbybit.dev/learn/runners +- Runner with TypeScript: https://learn.bitbybit.dev/learn/runners/intro-typescript + +### Engine-Specific Runners + +- BabylonJS Full Runner: https://learn.bitbybit.dev/learn/runners/engines/babylonjs/full-runner +- Three.js Full Runner: https://learn.bitbybit.dev/learn/runners/engines/threejs/full-runner +- PlayCanvas Full Runner: https://learn.bitbybit.dev/learn/runners/engines/playcanvas/full-runner + +### Export Workflow + +1. Create your parametric design in any Bitbybit editor (Blockly, Rete, or TypeScript) +2. Click "Export to Runner" button +3. Copy the generated script +4. Integrate into your web application using the bitbybit-runner.js library + +## 3D Bits (Shopify App) + +Add 3D product configurators to Shopify stores with both Low-Code and Pro-Code options. + +- 3D Bits Introduction: https://learn.bitbybit.dev/learn/3d-bits/intro +- Shopify App: https://apps.shopify.com/3d-bits-1 + +### Theme App Extensions + +- BITBYBIT RUNNER Block: https://learn.bitbybit.dev/learn/3d-bits/tutorials/bitbybit-runner/settings +- BITBYBIT APPS Block: https://learn.bitbybit.dev/learn/3d-bits/tutorials/bitbybit-apps/settings + +### Programming Options + +**Low-Code (Visual Programming):** +- Blockly Editor - Block-based visual programming +- Rete Editor - Node-based visual programming + +**Pro-Code:** +- TypeScript with Monaco Editor +- Custom Vite/TypeScript templates for production apps + +### Tutorials + +- Product Laptop Holder (TypeScript): https://learn.bitbybit.dev/learn/3d-bits/tutorials/videos-tutorials/product-laptop-holder + +## AI Integration + +Using AI assistants with Bitbybit for enhanced coding workflows. Bitbybit does not provide proprietary LLMs—instead, it integrates with leading third-party AI services. + +- AI Introduction: https://learn.bitbybit.dev/learn/using-ai-with-bitbybit/intro + +### Key Concepts + +- **Model Context Protocol (MCP)**: Open standard for AI applications to interact with external data sources +- **Specialized Coding Agents**: AI agents for generating code, debugging, and suggesting algorithms +- **Open Source Advantage**: Bitbybit's open-source components provide rich training data for foundation models + +### MCP Integration + +- Context7 MCP Integration: https://learn.bitbybit.dev/learn/using-ai-with-bitbybit/mcp/context-7 + +Context7 provides live AI context with always up-to-date documentation: +- Context7 Library: https://context7.com/bitbybit-dev/bitbybit + +VS Code MCP Setup: +```json +{ + "servers": [ + { + "command": "npx", + "args": ["-y", "@upstash/context7-mcp@latest"], + "env": { + "DEFAULT_MINIMUM_TOKENS": "10000" + } + } + ] +} +``` + +### AI Context Files (v{{VERSION}}) + +Attach these files to your AI coding assistant for Bitbybit API knowledge. + +#### Beginner Context (Monaco Editor) + +For online TypeScript editor at bitbybit.dev: +- Full Context (116k tokens): https://app.bitbybit.dev/assets/ai-prompt-context/v{{VERSION}}/bitbybit-babylon-monaco-ai-context-v{{VERSION}}.md + +#### BabylonJS Context + +- Full (116k tokens): https://app.bitbybit.dev/assets/ai-prompt-context/v{{VERSION}}/bitbybit-babylon-ai-context-v{{VERSION}}.md +- Lite (114k tokens): https://app.bitbybit.dev/assets/ai-prompt-context/v{{VERSION}}/bitbybit-babylon-no-comment-min-ai-v{{VERSION}}.md + +#### Three.js Context + +- Full (95k tokens): https://app.bitbybit.dev/assets/ai-prompt-context/v{{VERSION}}/bitbybit-three-ai-context-v{{VERSION}}.md +- Lite (82k tokens): https://app.bitbybit.dev/assets/ai-prompt-context/v{{VERSION}}/bitbybit-three-no-comment-min-ai-v{{VERSION}}.md + +#### PlayCanvas Context + +- Full (94k tokens): https://app.bitbybit.dev/assets/ai-prompt-context/v{{VERSION}}/bitbybit-playcanvas-ai-context-v{{VERSION}}.md +- Lite (82k tokens): https://app.bitbybit.dev/assets/ai-prompt-context/v{{VERSION}}/bitbybit-playcanvas-no-comment-min-ai-v{{VERSION}}.md + +### Full API on Github +- API with short explanations: https://github.com/bitbybit-dev/bitbybit/blob/master/docs/API.md + +## GitHub & Contributing + +- Main Repository: https://github.com/bitbybit-dev/bitbybit +- Contributing Guide: https://learn.bitbybit.dev/learn/github +- Unit Testing Guide: https://learn.bitbybit.dev/learn/github/unit-tests +- Live Test Coverage: https://learn.bitbybit.dev/learn/github/live-unit-test-coverage + +## Blog + +Latest updates, tutorials, and announcements: + +- Blog: https://learn.bitbybit.dev/blog +- PlayCanvas Support Announcement: https://learn.bitbybit.dev/blog/playcanvas-support + +## Security + +- Hosting & CDN: https://learn.bitbybit.dev/learn/hosting-and-cdn + +## Community + +- Discord: https://discord.gg/GSe3VMe +- YouTube: https://www.youtube.com/@bitbybitdev +- LinkedIn: https://www.linkedin.com/company/bitbybit-dev +- X/Twitter: https://x.com/bitbybit_dev + +## Key Concepts + +### Three Editor Types + +Bitbybit offers three ways to create 3D geometry, all sharing the same underlying algorithms: + +1. **Blockly (Visual Block-Based)** + - Beginner-friendly drag-and-drop blocks + - Similar to Scratch programming + - Best for learning programming concepts + - Has dedicated Functions and Variables categories + +2. **Rete (Node-Based Visual)** + - Professional node-based dataflow programming + - Over 1,300 pre-built components + - Includes embedded TypeScript/JavaScript/JSON editors + - Best for complex visual workflows + +3. **Monaco (TypeScript)** + - Full text-based TypeScript programming + - Same editor as VS Code + - Maximum flexibility and control + - Best for experienced developers + +### Geometry Kernels + +Bitbybit supports multiple CAD kernels: + +- **OpenCascade (OCCT)**: Industrial-grade B-rep kernel for precise CAD operations, boolean operations, fillets, chamfers, STEP export +- **JSCAD**: JavaScript-based CSG modeling for simple shapes +- **Manifold**: Fast mesh boolean operations for real-time applications + +### Game Engines + +Visualization and rendering: + +- **BabylonJS**: Full-featured WebGL engine with PBR, physics, audio +- **Three.js**: Lightweight, popular 3D library with vast ecosystem +- **PlayCanvas**: Professional engine with online collaborative editor + +### Web Workers + +All geometry kernels have web worker variants (-worker packages) for non-blocking UI: +- Asynchronous operations that don't freeze the browser +- Recommended for production applications +- Same API as main thread packages + +## School & Courses + +Educational content organized by topic and skill level: + +- DIY 3D Model Configurators for Makers +- Introduction to Programming 3D in TypeScript +- OpenCascade in Rete Editor +- Control Flow in Rete Editor +- TypeScript Component for Magical Powers in Rete +- STEM Lessons for Kids and Beginners (Rete Editor) +- Using AI with Bitbybit +- Make 3D Websites with Runners +- Shopify 3D Bits App + +## Optional + +- Main site llms.txt: https://bitbybit.dev/llms.txt diff --git a/docs/static/llms.txt b/docs/static/llms.txt new file mode 100644 index 000000000..28012971a --- /dev/null +++ b/docs/static/llms.txt @@ -0,0 +1,324 @@ +# Bitbybit Documentation + +> Learn how to use the Bitbybit 3D creative coding platform—from visual programming to TypeScript APIs and NPM package integration. Build parametric 3D models, product configurators, and CAD applications directly in the browser. + +This is the official documentation site for Bitbybit. The platform enables designers and developers to create 3D geometry using visual programming or TypeScript code, with integration for BabylonJS, Three.js, and PlayCanvas game engines. + +## Quick Links + +- Main Platform: https://bitbybit.dev +- TypeScript API Reference: https://docs.bitbybit.dev +- GitHub Repository: https://github.com/bitbybit-dev/bitbybit + +## Getting Started + +Comprehensive guides for new users to understand the platform basics. + +- Welcome Guide: https://learn.bitbybit.dev/learn/intro +- Platform Overview: https://learn.bitbybit.dev/learn/getting-started/overview +- Open Source Approach: https://learn.bitbybit.dev/learn/open-source-approach + +### Understanding Scripts & Projects + +Scripts are the core building blocks in Bitbybit projects. Each project can contain multiple scripts of different types: + +- Scripts Overview: https://learn.bitbybit.dev/learn/getting-started/basics/scripts/intro + +Learn about: +- What scripts are and how they work within projects +- The three script types (Blockly, Rete, TypeScript) +- Script visibility settings (public/private) +- Combining multiple script types in a single project +- Exporting scripts for external use + +### Blockly Editor (Visual Block-Based Programming) + +Blockly provides an intuitive block-based visual programming interface, ideal for beginners: + +- Introduction to Blockly: https://learn.bitbybit.dev/learn/getting-started/blockly/intro + +### Rete Editor (Node-Based Visual Programming) + +Rete offers a node-based visual programming interface for complex workflows: + +- Introduction to Rete: https://learn.bitbybit.dev/learn/getting-started/rete/intro +- Parametric Cube Tutorial: https://learn.bitbybit.dev/learn/getting-started/rete/parametric-cube +- TypeScript in Rete Editor: https://learn.bitbybit.dev/learn/getting-started/rete/typescript-editor-component + +The Rete editor includes embedded TypeScript, JavaScript, and JSON editors. This allows users to: +- Write custom code within visual programming workflows +- Access algorithms not yet available as visual components +- Combine the intuitiveness of visual programming with the power of text-based scripting + +### TypeScript Editor (Monaco) + +For advanced users who prefer text-based programming: + +- Introduction to TypeScript: https://learn.bitbybit.dev/learn/getting-started/typescript/intro +- Hello World Tutorial: https://learn.bitbybit.dev/learn/getting-started/typescript/hello-world + +The Monaco editor (based on core technologies of VS Code) provides: +- Full IntelliSense and autocompletion +- Type safety and early error detection +- Maximum flexibility and control + +### Assets & File Management + +Working with local and external assets: + +- Importing Local glTF Files: https://learn.bitbybit.dev/learn/getting-started/basics/assets/local/gltf + +## Code & Algorithm Organization + +Understanding how algorithms are organized across all three editors (TypeScript, Blockly, and Rete). + +- Algorithm Organization Introduction: https://learn.bitbybit.dev/learn/code/intro + +This section explains: +- How algorithms are organized into common categories across all editors +- Why the same core algorithms (OCCT, JSCAD, BabylonJS) are available in TypeScript, Blockly, and Rete +- Editor-specific differences (e.g., Blockly has Functions/Variables categories, Rete uses dataflow approach) +- The DRY (Don't Repeat Yourself) principle in algorithm design + +Key insight: The fundamental algorithms are identical regardless of editor choice—only the method of interaction differs. + +## NPM Packages + +Integration guides for embedding Bitbybit in your web applications. + +### Quick Start + +```bash +npx @bitbybit-dev/create-app my-project +``` + +Choose your game engine (BabylonJS, Three.js, or PlayCanvas) and start coding immediately. + +### Overview + +- Introduction: https://learn.bitbybit.dev/learn/npm-packages/intro +- Engine Agnostic Core: https://learn.bitbybit.dev/learn/npm-packages/game-engine-agnostic + +### Game Engine Integration + +- Three.js Integration: https://learn.bitbybit.dev/learn/npm-packages/threejs +- BabylonJS Integration: https://learn.bitbybit.dev/learn/npm-packages/babylonjs +- PlayCanvas Integration: https://learn.bitbybit.dev/learn/npm-packages/playcanvas + +### All NPM Packages + +Game Engine Packages: +- @bitbybit-dev/babylonjs - BabylonJS visualization and drawing +- @bitbybit-dev/threejs - Three.js visualization and drawing +- @bitbybit-dev/playcanvas - PlayCanvas visualization and drawing + +Core Packages: +- @bitbybit-dev/core - Combined CAD kernel features +- @bitbybit-dev/base - Base algorithms (vector math, transformations) + +CAD Kernel Packages (Main Thread): +- @bitbybit-dev/occt - OpenCascade for industrial B-rep CAD +- @bitbybit-dev/jscad - JSCAD for CSG modeling +- @bitbybit-dev/manifold - Manifold for fast mesh booleans + +Web Worker Packages (Non-blocking, Recommended): +- @bitbybit-dev/occt-worker - OpenCascade via web worker +- @bitbybit-dev/jscad-worker - JSCAD via web worker +- @bitbybit-dev/manifold-worker - Manifold via web worker + +## Runners + +Script runners enable executing Bitbybit scripts in external web applications. Scripts can be created in any editor (Blockly, Rete, or TypeScript) and exported for use in standalone websites. + +- Runners Overview: https://learn.bitbybit.dev/learn/runners +- Runner with TypeScript: https://learn.bitbybit.dev/learn/runners/intro-typescript + +### Engine-Specific Runners + +- BabylonJS Full Runner: https://learn.bitbybit.dev/learn/runners/engines/babylonjs/full-runner +- Three.js Full Runner: https://learn.bitbybit.dev/learn/runners/engines/threejs/full-runner +- PlayCanvas Full Runner: https://learn.bitbybit.dev/learn/runners/engines/playcanvas/full-runner + +### Export Workflow + +1. Create your parametric design in any Bitbybit editor (Blockly, Rete, or TypeScript) +2. Click "Export to Runner" button +3. Copy the generated script +4. Integrate into your web application using the bitbybit-runner.js library + +## 3D Bits (Shopify App) + +Add 3D product configurators to Shopify stores with both Low-Code and Pro-Code options. + +- 3D Bits Introduction: https://learn.bitbybit.dev/learn/3d-bits/intro +- Shopify App: https://apps.shopify.com/3d-bits-1 + +### Theme App Extensions + +- BITBYBIT RUNNER Block: https://learn.bitbybit.dev/learn/3d-bits/tutorials/bitbybit-runner/settings +- BITBYBIT APPS Block: https://learn.bitbybit.dev/learn/3d-bits/tutorials/bitbybit-apps/settings + +### Programming Options + +**Low-Code (Visual Programming):** +- Blockly Editor - Block-based visual programming +- Rete Editor - Node-based visual programming + +**Pro-Code:** +- TypeScript with Monaco Editor +- Custom Vite/TypeScript templates for production apps + +### Tutorials + +- Product Laptop Holder (TypeScript): https://learn.bitbybit.dev/learn/3d-bits/tutorials/videos-tutorials/product-laptop-holder + +## AI Integration + +Using AI assistants with Bitbybit for enhanced coding workflows. Bitbybit does not provide proprietary LLMs—instead, it integrates with leading third-party AI services. + +- AI Introduction: https://learn.bitbybit.dev/learn/using-ai-with-bitbybit/intro + +### Key Concepts + +- **Model Context Protocol (MCP)**: Open standard for AI applications to interact with external data sources +- **Specialized Coding Agents**: AI agents for generating code, debugging, and suggesting algorithms +- **Open Source Advantage**: Bitbybit's open-source components provide rich training data for foundation models + +### MCP Integration + +- Context7 MCP Integration: https://learn.bitbybit.dev/learn/using-ai-with-bitbybit/mcp/context-7 + +Context7 provides live AI context with always up-to-date documentation: +- Context7 Library: https://context7.com/bitbybit-dev/bitbybit + +VS Code MCP Setup: +```json +{ + "servers": [ + { + "command": "npx", + "args": ["-y", "@upstash/context7-mcp@latest"], + "env": { + "DEFAULT_MINIMUM_TOKENS": "10000" + } + } + ] +} +``` + +### AI Context Files (v0.21.1) + +Attach these files to your AI coding assistant for Bitbybit API knowledge. + +#### Beginner Context (Monaco Editor) + +For online TypeScript editor at bitbybit.dev: +- Full Context (116k tokens): https://app.bitbybit.dev/assets/ai-prompt-context/v0.21.1/bitbybit-babylon-monaco-ai-context-v0.21.1.md + +#### BabylonJS Context + +- Full (116k tokens): https://app.bitbybit.dev/assets/ai-prompt-context/v0.21.1/bitbybit-babylon-ai-context-v0.21.1.md +- Lite (114k tokens): https://app.bitbybit.dev/assets/ai-prompt-context/v0.21.1/bitbybit-babylon-no-comment-min-ai-v0.21.1.md + +#### Three.js Context + +- Full (95k tokens): https://app.bitbybit.dev/assets/ai-prompt-context/v0.21.1/bitbybit-three-ai-context-v0.21.1.md +- Lite (82k tokens): https://app.bitbybit.dev/assets/ai-prompt-context/v0.21.1/bitbybit-three-no-comment-min-ai-v0.21.1.md + +#### PlayCanvas Context + +- Full (94k tokens): https://app.bitbybit.dev/assets/ai-prompt-context/v0.21.1/bitbybit-playcanvas-ai-context-v0.21.1.md +- Lite (82k tokens): https://app.bitbybit.dev/assets/ai-prompt-context/v0.21.1/bitbybit-playcanvas-no-comment-min-ai-v0.21.1.md + +### Full API on Github +- API with short explanations: https://github.com/bitbybit-dev/bitbybit/blob/master/docs/API.md + +## GitHub & Contributing + +- Main Repository: https://github.com/bitbybit-dev/bitbybit +- Contributing Guide: https://learn.bitbybit.dev/learn/github +- Unit Testing Guide: https://learn.bitbybit.dev/learn/github/unit-tests +- Live Test Coverage: https://learn.bitbybit.dev/learn/github/live-unit-test-coverage + +## Blog + +Latest updates, tutorials, and announcements: + +- Blog: https://learn.bitbybit.dev/blog +- PlayCanvas Support Announcement: https://learn.bitbybit.dev/blog/playcanvas-support + +## Security + +- Hosting & CDN: https://learn.bitbybit.dev/learn/hosting-and-cdn + +## Community + +- Discord: https://discord.gg/GSe3VMe +- YouTube: https://www.youtube.com/@bitbybitdev +- LinkedIn: https://www.linkedin.com/company/bitbybit-dev +- X/Twitter: https://x.com/bitbybit_dev + +## Key Concepts + +### Three Editor Types + +Bitbybit offers three ways to create 3D geometry, all sharing the same underlying algorithms: + +1. **Blockly (Visual Block-Based)** + - Beginner-friendly drag-and-drop blocks + - Similar to Scratch programming + - Best for learning programming concepts + - Has dedicated Functions and Variables categories + +2. **Rete (Node-Based Visual)** + - Professional node-based dataflow programming + - Over 1,300 pre-built components + - Includes embedded TypeScript/JavaScript/JSON editors + - Best for complex visual workflows + +3. **Monaco (TypeScript)** + - Full text-based TypeScript programming + - Same editor as VS Code + - Maximum flexibility and control + - Best for experienced developers + +### Geometry Kernels + +Bitbybit supports multiple CAD kernels: + +- **OpenCascade (OCCT)**: Industrial-grade B-rep kernel for precise CAD operations, boolean operations, fillets, chamfers, STEP export +- **JSCAD**: JavaScript-based CSG modeling for simple shapes +- **Manifold**: Fast mesh boolean operations for real-time applications + +### Game Engines + +Visualization and rendering: + +- **BabylonJS**: Full-featured WebGL engine with PBR, physics, audio +- **Three.js**: Lightweight, popular 3D library with vast ecosystem +- **PlayCanvas**: Professional engine with online collaborative editor + +### Web Workers + +All geometry kernels have web worker variants (-worker packages) for non-blocking UI: +- Asynchronous operations that don't freeze the browser +- Recommended for production applications +- Same API as main thread packages + +## School & Courses + +Educational content organized by topic and skill level: + +- DIY 3D Model Configurators for Makers +- Introduction to Programming 3D in TypeScript +- OpenCascade in Rete Editor +- Control Flow in Rete Editor +- TypeScript Component for Magical Powers in Rete +- STEM Lessons for Kids and Beginners (Rete Editor) +- Using AI with Bitbybit +- Make 3D Websites with Runners +- Shopify 3D Bits App + +## Optional + +- Main site llms.txt: https://bitbybit.dev/llms.txt diff --git a/docs/static/robots.txt b/docs/static/robots.txt new file mode 100644 index 000000000..eef3bf1cb --- /dev/null +++ b/docs/static/robots.txt @@ -0,0 +1,8 @@ +User-agent: * +Allow: / + +Sitemap: https://learn.bitbybit.dev/sitemap.xml + +# LLM Context +# For AI assistants and language models +llms.txt: https://learn.bitbybit.dev/llms.txt diff --git a/docs/tsconfig.json b/docs/tsconfig.json index 920d7a652..8d4583a70 100644 --- a/docs/tsconfig.json +++ b/docs/tsconfig.json @@ -2,7 +2,9 @@ // This file is not used in compilation. It is here just for a nice editor experience. "extends": "@docusaurus/tsconfig", "compilerOptions": { - "baseUrl": "." + "baseUrl": ".", + "resolveJsonModule": true, + "esModuleInterop": true }, "exclude": [".docusaurus", "build"] } diff --git a/examples/angular/babylonjs/laptop-holder/package-lock.json b/examples/angular/babylonjs/laptop-holder/package-lock.json index fe74d691c..2ddfb3f3d 100644 --- a/examples/angular/babylonjs/laptop-holder/package-lock.json +++ b/examples/angular/babylonjs/laptop-holder/package-lock.json @@ -17,7 +17,7 @@ "@angular/platform-browser": "13.3.0", "@angular/platform-browser-dynamic": "13.3.0", "@angular/router": "13.3.0", - "@bitbybit-dev/babylonjs": "0.21.0", + "@bitbybit-dev/babylonjs": "0.21.1", "rxjs": "7.5.5", "tslib": "2.3.1", "zone.js": "0.11.5" @@ -2331,15 +2331,15 @@ } }, "node_modules/@babylonjs/core": { - "version": "8.44.1", - "resolved": "https://registry.npmjs.org/@babylonjs/core/-/core-8.44.1.tgz", - "integrity": "sha512-sF2WWK2d7lg18ESOCxUoRG4d1SzCWz42asjRjRGxZ8r3D7w9ZM3H2wftJIqwaZvD3zWr+wmCVKpQ6hWkboHIXw==", + "version": "8.45.4", + "resolved": "https://registry.npmjs.org/@babylonjs/core/-/core-8.45.4.tgz", + "integrity": "sha512-fmpaitVpe+bB3PCLY0RKYO/e5n1vLNvueJrglt6SENVE/frZNS4har8odAd1UDNf5KFgOdb8YK91jK4BUwIgcQ==", "license": "Apache-2.0" }, "node_modules/@babylonjs/gui": { - "version": "8.44.1", - "resolved": "https://registry.npmjs.org/@babylonjs/gui/-/gui-8.44.1.tgz", - "integrity": "sha512-6STDK+Hr8GpY29YMLKnTVhEnWw1NKPrIpz+MqgWuoAAmmpiFtNCr0nnAnCj5fhgGf25L89jy51ogXyg3jfiuDA==", + "version": "8.45.4", + "resolved": "https://registry.npmjs.org/@babylonjs/gui/-/gui-8.45.4.tgz", + "integrity": "sha512-1pMjQs7fgSEvUQoXyit96kNRqzX74oMNkMkAOmz7NjOkBX3tacAfNfoEC6aw+AB+iAjlCO5/DXatZU5m6EYyIQ==", "license": "Apache-2.0", "peerDependencies": { "@babylonjs/core": "^8.0.0" @@ -2354,9 +2354,9 @@ } }, "node_modules/@babylonjs/loaders": { - "version": "8.44.1", - "resolved": "https://registry.npmjs.org/@babylonjs/loaders/-/loaders-8.44.1.tgz", - "integrity": "sha512-h5rUGCwhdWv3Hq48DP8sy4/+3QUYjOprxu2i6zXKb69LHMnYE0tZ1xQHBJEOUF60hxA+TwhzdjC8bxInKoeojA==", + "version": "8.45.4", + "resolved": "https://registry.npmjs.org/@babylonjs/loaders/-/loaders-8.45.4.tgz", + "integrity": "sha512-P1H8XpIJK7NnrtGGSGkCJZIPBvtJ+0+l7yGXDY2UaNFKU80y2Oty8DZ8JRKdbJdSc4cOe8ucBY5w7x+Bbllxuw==", "license": "Apache-2.0", "peerDependencies": { "@babylonjs/core": "^8.0.0", @@ -2364,18 +2364,18 @@ } }, "node_modules/@babylonjs/materials": { - "version": "8.44.1", - "resolved": "https://registry.npmjs.org/@babylonjs/materials/-/materials-8.44.1.tgz", - "integrity": "sha512-FD0S/aA68oEjKCSNY5ydGkiHbsyo08KlhQ+6R8swtJhx5aq7ojWBt3P9KC78+wjZiCJW37176CIObcV8QcjMAQ==", + "version": "8.45.4", + "resolved": "https://registry.npmjs.org/@babylonjs/materials/-/materials-8.45.4.tgz", + "integrity": "sha512-ElTXhC83alnMFFyv2sPG/Im5UwTZoDzd1R8otPQwbEEERcRK8A71Hu1gFdBu/8l9O752IWnZcPSEj1WwLqeR5A==", "license": "Apache-2.0", "peerDependencies": { "@babylonjs/core": "^8.6.0" } }, "node_modules/@babylonjs/serializers": { - "version": "8.44.1", - "resolved": "https://registry.npmjs.org/@babylonjs/serializers/-/serializers-8.44.1.tgz", - "integrity": "sha512-3FRRdKpHr2qTkALHEvq0ih0P59iTINUFrGZWFUfO3Wu24UBSuTxY9Kq820dvUUWaRtWkXEnMSQbR+5glzcfqBw==", + "version": "8.45.4", + "resolved": "https://registry.npmjs.org/@babylonjs/serializers/-/serializers-8.45.4.tgz", + "integrity": "sha512-i83RQIP3XSi3DFJwhc/+JNNPm49DdtNyDobuyBBwIDyMpQdbcFLhkL0DW/7/H+vFUWz0xWx+mgmsb6HY/ePGmg==", "license": "Apache-2.0", "peerDependencies": { "@babylonjs/core": "^8.0.0", @@ -2383,49 +2383,49 @@ } }, "node_modules/@bitbybit-dev/babylonjs": { - "version": "0.21.0", - "resolved": "https://registry.npmjs.org/@bitbybit-dev/babylonjs/-/babylonjs-0.21.0.tgz", - "integrity": "sha512-8aPJ+XTXzcnO4bXfmW34lTnVCzC6Hy6TMkh7/ziQSoUsjPp7e7LFHoBBfqCk09LdTLa85gb5x/f6WNAn306Odg==", + "version": "0.21.1", + "resolved": "https://registry.npmjs.org/@bitbybit-dev/babylonjs/-/babylonjs-0.21.1.tgz", + "integrity": "sha512-OyQI5FC4qI5EYW/RFZt/6WR2We2bEpbhM8I8ptiJkviY0e1yIjiV11A4aF8B6fpjS5Bd7Rb30LrUdWNHbAo1Nw==", "license": "MIT", "dependencies": { - "@babylonjs/core": "8.44.1", - "@babylonjs/gui": "8.44.1", + "@babylonjs/core": "8.45.4", + "@babylonjs/gui": "8.45.4", "@babylonjs/havok": "1.3.10", - "@babylonjs/loaders": "8.44.1", - "@babylonjs/materials": "8.44.1", - "@babylonjs/serializers": "8.44.1", - "@bitbybit-dev/core": "0.21.0", + "@babylonjs/loaders": "8.45.4", + "@babylonjs/materials": "8.45.4", + "@babylonjs/serializers": "8.45.4", + "@bitbybit-dev/core": "0.21.1", "earcut": "2.2.3" } }, "node_modules/@bitbybit-dev/base": { - "version": "0.21.0", - "resolved": "https://registry.npmjs.org/@bitbybit-dev/base/-/base-0.21.0.tgz", - "integrity": "sha512-dNfsf2tu3/QUD1mvZzzTze8RwHyK2Jrt+Ary8EDKdNKMw+abtCpQYNerdrg0ZQPxvwu/OOQz6N1xCsCwsPkQJg==", + "version": "0.21.1", + "resolved": "https://registry.npmjs.org/@bitbybit-dev/base/-/base-0.21.1.tgz", + "integrity": "sha512-d3aHPpLHigeNTceMi0U/wOIzCqkvHg8S2gNa4b8VGSTifbn7Fo1XbQ2pzetbcOtwtJhkcLgNYn3nFqW8S2MUpw==", "license": "MIT" }, "node_modules/@bitbybit-dev/core": { - "version": "0.21.0", - "resolved": "https://registry.npmjs.org/@bitbybit-dev/core/-/core-0.21.0.tgz", - "integrity": "sha512-IbeQ8ROreu0/RkkngUE+Eb19ecvqKOWhGefXvIqQmplxt3zEc0FI4Kw8wR3vYl2XMannuVt1xAIYtqqH0tjBzg==", + "version": "0.21.1", + "resolved": "https://registry.npmjs.org/@bitbybit-dev/core/-/core-0.21.1.tgz", + "integrity": "sha512-Zr2w4h1eBRgOHevKevTaDeL1KlOju6Q8uT62zLeKAAAAn5P1RNn2jOVnHEJtd7y4wPn7G2rZwlwtBQlYe5t9AQ==", "license": "MIT", "dependencies": { - "@bitbybit-dev/base": "0.21.0", - "@bitbybit-dev/jscad-worker": "0.21.0", - "@bitbybit-dev/manifold-worker": "0.21.0", - "@bitbybit-dev/occt-worker": "0.21.0", - "jsonpath-plus": "10.1.0", + "@bitbybit-dev/base": "0.21.1", + "@bitbybit-dev/jscad-worker": "0.21.1", + "@bitbybit-dev/manifold-worker": "0.21.1", + "@bitbybit-dev/occt-worker": "0.21.1", + "jsonpath-plus": "10.3.0", "rxjs": "7.5.5", "verb-nurbs-web": "2.1.3" } }, "node_modules/@bitbybit-dev/jscad": { - "version": "0.21.0", - "resolved": "https://registry.npmjs.org/@bitbybit-dev/jscad/-/jscad-0.21.0.tgz", - "integrity": "sha512-Q7eE2ILrJRstW4L1711aJZdpwPf1kuhZJqB+KLkkBLsneRsGsh82lBcCbVYAOMuF/q8Lnd4JHxPiIG/m+LYmPQ==", + "version": "0.21.1", + "resolved": "https://registry.npmjs.org/@bitbybit-dev/jscad/-/jscad-0.21.1.tgz", + "integrity": "sha512-nw8dHGYy3GPXoX0xLZeVsB0Z013mzIy4GoniLKvzN7ApnTruPxSFisxrvFajCcQpL5UbU8SW4k+LhJDI8FTlRg==", "license": "MIT", "dependencies": { - "@bitbybit-dev/base": "0.21.0", + "@bitbybit-dev/base": "0.21.1", "@jscad/3mf-serializer": "2.1.12", "@jscad/dxf-serializer": "2.1.18", "@jscad/io-utils": "2.0.28", @@ -2434,51 +2434,51 @@ } }, "node_modules/@bitbybit-dev/jscad-worker": { - "version": "0.21.0", - "resolved": "https://registry.npmjs.org/@bitbybit-dev/jscad-worker/-/jscad-worker-0.21.0.tgz", - "integrity": "sha512-nIvd7GH5Gg51u6PmFXOADXVYTIvixTkNf0YapS1uix7D2JS9Mx10Z4wHAeRKzvJxUAAbEPPRFNkakE22HFGtLQ==", + "version": "0.21.1", + "resolved": "https://registry.npmjs.org/@bitbybit-dev/jscad-worker/-/jscad-worker-0.21.1.tgz", + "integrity": "sha512-ccaXGTnKseWGDGEdgf3HfQqBWmM4Q384NQWO2kdzZ4EHaZlSp9tEHY8NHOxyxPoMol+qK9u9puH4ux13zY+FrQ==", "license": "MIT", "dependencies": { - "@bitbybit-dev/jscad": "0.21.0", + "@bitbybit-dev/jscad": "0.21.1", "rxjs": "7.5.5" } }, "node_modules/@bitbybit-dev/manifold": { - "version": "0.21.0", - "resolved": "https://registry.npmjs.org/@bitbybit-dev/manifold/-/manifold-0.21.0.tgz", - "integrity": "sha512-DPpwK9ESB+auDeAbzXcfWRVEzWoMDkpkjc+/uwh+zuSiHSx92PSkzx1/LVTbQCsK+aOfOOy03HQCF5Bu2KQYtw==", + "version": "0.21.1", + "resolved": "https://registry.npmjs.org/@bitbybit-dev/manifold/-/manifold-0.21.1.tgz", + "integrity": "sha512-/UqejYCN9YIyBzf5yQXPdSawoKqEUd1aQAKdmge4LoUaZ19eQyRHLK4WpZQ8K+7lTr7qcNQARr7mLx0FQMBFew==", "license": "MIT", "dependencies": { - "@bitbybit-dev/base": "0.21.0", + "@bitbybit-dev/base": "0.21.1", "manifold-3d": "3.3.2" } }, "node_modules/@bitbybit-dev/manifold-worker": { - "version": "0.21.0", - "resolved": "https://registry.npmjs.org/@bitbybit-dev/manifold-worker/-/manifold-worker-0.21.0.tgz", - "integrity": "sha512-6Cqv3BP+uI8mHKHI6Jx9TzCxRg1/kMHhCe18+B3KD/rTl9B5mnScCKRBnDansR3bH7aYZGnIw9PmiFnWLkQWEQ==", + "version": "0.21.1", + "resolved": "https://registry.npmjs.org/@bitbybit-dev/manifold-worker/-/manifold-worker-0.21.1.tgz", + "integrity": "sha512-A+oV172dZzehkeF5kdCFzQuyyfj9FLixq5nGNviOpJX3zaF+0efl1ung1o45V5pLtZkuGCgCZaQ6lY0zNQcYig==", "license": "MIT", "dependencies": { - "@bitbybit-dev/manifold": "0.21.0", + "@bitbybit-dev/manifold": "0.21.1", "rxjs": "7.5.5" } }, "node_modules/@bitbybit-dev/occt": { - "version": "0.21.0", - "resolved": "https://registry.npmjs.org/@bitbybit-dev/occt/-/occt-0.21.0.tgz", - "integrity": "sha512-vPu3NmF1kBZMOkOdysolGfFxEEnwdHNGORoX3eWbMWT2JL/Tag5Q2CAc5jwa2VvZnS1nE/9x+DVlFQSo8LQnIg==", + "version": "0.21.1", + "resolved": "https://registry.npmjs.org/@bitbybit-dev/occt/-/occt-0.21.1.tgz", + "integrity": "sha512-0+yffQRmph9W1qLSyRBUvaQDiZ9OHA2kD2/LsCgxR3NVtKs3GZaAYYhoUfaRqtt2I8Go99e8WBB5daaQceudjA==", "license": "MIT", "dependencies": { - "@bitbybit-dev/base": "0.21.0" + "@bitbybit-dev/base": "0.21.1" } }, "node_modules/@bitbybit-dev/occt-worker": { - "version": "0.21.0", - "resolved": "https://registry.npmjs.org/@bitbybit-dev/occt-worker/-/occt-worker-0.21.0.tgz", - "integrity": "sha512-xG1sgo6q/RdVA8AgG72wPe4qxcQlrO1V7/Ksn6MqIhZVTsJcm5RbVYlK+nziIWhvlMc1sKE0GNQFcPdALISLuQ==", + "version": "0.21.1", + "resolved": "https://registry.npmjs.org/@bitbybit-dev/occt-worker/-/occt-worker-0.21.1.tgz", + "integrity": "sha512-3BW0lTiY8muPSiCWplAT/VQHaHFVUvljMGD1ynQo7cqv/Zna9ACn+SHOMY2HJ7m1MnZq5d2dGjJJXo8k19iV8Q==", "license": "MIT", "dependencies": { - "@bitbybit-dev/occt": "0.21.0", + "@bitbybit-dev/occt": "0.21.1", "rxjs": "7.5.5" } }, @@ -4225,9 +4225,9 @@ } }, "node_modules/babylonjs-gltf2interface": { - "version": "8.44.1", - "resolved": "https://registry.npmjs.org/babylonjs-gltf2interface/-/babylonjs-gltf2interface-8.44.1.tgz", - "integrity": "sha512-+z0P0wms1FD5xuVpuRJ1qjvGAbPAWhEWGBWENRPD0Hbz6nd9cnL28/pjxgk39/QhlIuJKL9JZ0o8G0JgLHEnRQ==", + "version": "8.45.5", + "resolved": "https://registry.npmjs.org/babylonjs-gltf2interface/-/babylonjs-gltf2interface-8.45.5.tgz", + "integrity": "sha512-o1OMBVdeKCK7b+L1VUW1w1+KIi1DTP7Po+SAJ3vwPqRG6xD2eTL+w5IaFHVue3dVjnlU8Z+9y3BP3AadmK0H9w==", "license": "Apache-2.0", "peer": true }, @@ -8002,14 +8002,14 @@ ] }, "node_modules/jsonpath-plus": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/jsonpath-plus/-/jsonpath-plus-10.1.0.tgz", - "integrity": "sha512-gHfV1IYqH8uJHYVTs8BJX1XKy2/rR93+f8QQi0xhx95aCiXn1ettYAd5T+7FU6wfqyDoX/wy0pm/fL3jOKJ9Lg==", + "version": "10.3.0", + "resolved": "https://registry.npmjs.org/jsonpath-plus/-/jsonpath-plus-10.3.0.tgz", + "integrity": "sha512-8TNmfeTCk2Le33A3vRRwtuworG/L5RrgMvdjhKZxvyShO+mBu2fP50OWUjRLNtvw344DdDarFh9buFAZs5ujeA==", "license": "MIT", "dependencies": { - "@jsep-plugin/assignment": "^1.2.1", - "@jsep-plugin/regex": "^1.0.3", - "jsep": "^1.3.9" + "@jsep-plugin/assignment": "^1.3.0", + "@jsep-plugin/regex": "^1.0.4", + "jsep": "^1.4.0" }, "bin": { "jsonpath": "bin/jsonpath-cli.js", @@ -14469,14 +14469,14 @@ } }, "@babylonjs/core": { - "version": "8.44.1", - "resolved": "https://registry.npmjs.org/@babylonjs/core/-/core-8.44.1.tgz", - "integrity": "sha512-sF2WWK2d7lg18ESOCxUoRG4d1SzCWz42asjRjRGxZ8r3D7w9ZM3H2wftJIqwaZvD3zWr+wmCVKpQ6hWkboHIXw==" + "version": "8.45.4", + "resolved": "https://registry.npmjs.org/@babylonjs/core/-/core-8.45.4.tgz", + "integrity": "sha512-fmpaitVpe+bB3PCLY0RKYO/e5n1vLNvueJrglt6SENVE/frZNS4har8odAd1UDNf5KFgOdb8YK91jK4BUwIgcQ==" }, "@babylonjs/gui": { - "version": "8.44.1", - "resolved": "https://registry.npmjs.org/@babylonjs/gui/-/gui-8.44.1.tgz", - "integrity": "sha512-6STDK+Hr8GpY29YMLKnTVhEnWw1NKPrIpz+MqgWuoAAmmpiFtNCr0nnAnCj5fhgGf25L89jy51ogXyg3jfiuDA==", + "version": "8.45.4", + "resolved": "https://registry.npmjs.org/@babylonjs/gui/-/gui-8.45.4.tgz", + "integrity": "sha512-1pMjQs7fgSEvUQoXyit96kNRqzX74oMNkMkAOmz7NjOkBX3tacAfNfoEC6aw+AB+iAjlCO5/DXatZU5m6EYyIQ==", "requires": {} }, "@babylonjs/havok": { @@ -14488,63 +14488,63 @@ } }, "@babylonjs/loaders": { - "version": "8.44.1", - "resolved": "https://registry.npmjs.org/@babylonjs/loaders/-/loaders-8.44.1.tgz", - "integrity": "sha512-h5rUGCwhdWv3Hq48DP8sy4/+3QUYjOprxu2i6zXKb69LHMnYE0tZ1xQHBJEOUF60hxA+TwhzdjC8bxInKoeojA==", + "version": "8.45.4", + "resolved": "https://registry.npmjs.org/@babylonjs/loaders/-/loaders-8.45.4.tgz", + "integrity": "sha512-P1H8XpIJK7NnrtGGSGkCJZIPBvtJ+0+l7yGXDY2UaNFKU80y2Oty8DZ8JRKdbJdSc4cOe8ucBY5w7x+Bbllxuw==", "requires": {} }, "@babylonjs/materials": { - "version": "8.44.1", - "resolved": "https://registry.npmjs.org/@babylonjs/materials/-/materials-8.44.1.tgz", - "integrity": "sha512-FD0S/aA68oEjKCSNY5ydGkiHbsyo08KlhQ+6R8swtJhx5aq7ojWBt3P9KC78+wjZiCJW37176CIObcV8QcjMAQ==", + "version": "8.45.4", + "resolved": "https://registry.npmjs.org/@babylonjs/materials/-/materials-8.45.4.tgz", + "integrity": "sha512-ElTXhC83alnMFFyv2sPG/Im5UwTZoDzd1R8otPQwbEEERcRK8A71Hu1gFdBu/8l9O752IWnZcPSEj1WwLqeR5A==", "requires": {} }, "@babylonjs/serializers": { - "version": "8.44.1", - "resolved": "https://registry.npmjs.org/@babylonjs/serializers/-/serializers-8.44.1.tgz", - "integrity": "sha512-3FRRdKpHr2qTkALHEvq0ih0P59iTINUFrGZWFUfO3Wu24UBSuTxY9Kq820dvUUWaRtWkXEnMSQbR+5glzcfqBw==", + "version": "8.45.4", + "resolved": "https://registry.npmjs.org/@babylonjs/serializers/-/serializers-8.45.4.tgz", + "integrity": "sha512-i83RQIP3XSi3DFJwhc/+JNNPm49DdtNyDobuyBBwIDyMpQdbcFLhkL0DW/7/H+vFUWz0xWx+mgmsb6HY/ePGmg==", "requires": {} }, "@bitbybit-dev/babylonjs": { - "version": "0.21.0", - "resolved": "https://registry.npmjs.org/@bitbybit-dev/babylonjs/-/babylonjs-0.21.0.tgz", - "integrity": "sha512-8aPJ+XTXzcnO4bXfmW34lTnVCzC6Hy6TMkh7/ziQSoUsjPp7e7LFHoBBfqCk09LdTLa85gb5x/f6WNAn306Odg==", + "version": "0.21.1", + "resolved": "https://registry.npmjs.org/@bitbybit-dev/babylonjs/-/babylonjs-0.21.1.tgz", + "integrity": "sha512-OyQI5FC4qI5EYW/RFZt/6WR2We2bEpbhM8I8ptiJkviY0e1yIjiV11A4aF8B6fpjS5Bd7Rb30LrUdWNHbAo1Nw==", "requires": { - "@babylonjs/core": "8.44.1", - "@babylonjs/gui": "8.44.1", + "@babylonjs/core": "8.45.4", + "@babylonjs/gui": "8.45.4", "@babylonjs/havok": "1.3.10", - "@babylonjs/loaders": "8.44.1", - "@babylonjs/materials": "8.44.1", - "@babylonjs/serializers": "8.44.1", - "@bitbybit-dev/core": "0.21.0", + "@babylonjs/loaders": "8.45.4", + "@babylonjs/materials": "8.45.4", + "@babylonjs/serializers": "8.45.4", + "@bitbybit-dev/core": "0.21.1", "earcut": "2.2.3" } }, "@bitbybit-dev/base": { - "version": "0.21.0", - "resolved": "https://registry.npmjs.org/@bitbybit-dev/base/-/base-0.21.0.tgz", - "integrity": "sha512-dNfsf2tu3/QUD1mvZzzTze8RwHyK2Jrt+Ary8EDKdNKMw+abtCpQYNerdrg0ZQPxvwu/OOQz6N1xCsCwsPkQJg==" + "version": "0.21.1", + "resolved": "https://registry.npmjs.org/@bitbybit-dev/base/-/base-0.21.1.tgz", + "integrity": "sha512-d3aHPpLHigeNTceMi0U/wOIzCqkvHg8S2gNa4b8VGSTifbn7Fo1XbQ2pzetbcOtwtJhkcLgNYn3nFqW8S2MUpw==" }, "@bitbybit-dev/core": { - "version": "0.21.0", - "resolved": "https://registry.npmjs.org/@bitbybit-dev/core/-/core-0.21.0.tgz", - "integrity": "sha512-IbeQ8ROreu0/RkkngUE+Eb19ecvqKOWhGefXvIqQmplxt3zEc0FI4Kw8wR3vYl2XMannuVt1xAIYtqqH0tjBzg==", - "requires": { - "@bitbybit-dev/base": "0.21.0", - "@bitbybit-dev/jscad-worker": "0.21.0", - "@bitbybit-dev/manifold-worker": "0.21.0", - "@bitbybit-dev/occt-worker": "0.21.0", - "jsonpath-plus": "10.1.0", + "version": "0.21.1", + "resolved": "https://registry.npmjs.org/@bitbybit-dev/core/-/core-0.21.1.tgz", + "integrity": "sha512-Zr2w4h1eBRgOHevKevTaDeL1KlOju6Q8uT62zLeKAAAAn5P1RNn2jOVnHEJtd7y4wPn7G2rZwlwtBQlYe5t9AQ==", + "requires": { + "@bitbybit-dev/base": "0.21.1", + "@bitbybit-dev/jscad-worker": "0.21.1", + "@bitbybit-dev/manifold-worker": "0.21.1", + "@bitbybit-dev/occt-worker": "0.21.1", + "jsonpath-plus": "10.3.0", "rxjs": "7.5.5", "verb-nurbs-web": "2.1.3" } }, "@bitbybit-dev/jscad": { - "version": "0.21.0", - "resolved": "https://registry.npmjs.org/@bitbybit-dev/jscad/-/jscad-0.21.0.tgz", - "integrity": "sha512-Q7eE2ILrJRstW4L1711aJZdpwPf1kuhZJqB+KLkkBLsneRsGsh82lBcCbVYAOMuF/q8Lnd4JHxPiIG/m+LYmPQ==", + "version": "0.21.1", + "resolved": "https://registry.npmjs.org/@bitbybit-dev/jscad/-/jscad-0.21.1.tgz", + "integrity": "sha512-nw8dHGYy3GPXoX0xLZeVsB0Z013mzIy4GoniLKvzN7ApnTruPxSFisxrvFajCcQpL5UbU8SW4k+LhJDI8FTlRg==", "requires": { - "@bitbybit-dev/base": "0.21.0", + "@bitbybit-dev/base": "0.21.1", "@jscad/3mf-serializer": "2.1.12", "@jscad/dxf-serializer": "2.1.18", "@jscad/io-utils": "2.0.28", @@ -14553,46 +14553,46 @@ } }, "@bitbybit-dev/jscad-worker": { - "version": "0.21.0", - "resolved": "https://registry.npmjs.org/@bitbybit-dev/jscad-worker/-/jscad-worker-0.21.0.tgz", - "integrity": "sha512-nIvd7GH5Gg51u6PmFXOADXVYTIvixTkNf0YapS1uix7D2JS9Mx10Z4wHAeRKzvJxUAAbEPPRFNkakE22HFGtLQ==", + "version": "0.21.1", + "resolved": "https://registry.npmjs.org/@bitbybit-dev/jscad-worker/-/jscad-worker-0.21.1.tgz", + "integrity": "sha512-ccaXGTnKseWGDGEdgf3HfQqBWmM4Q384NQWO2kdzZ4EHaZlSp9tEHY8NHOxyxPoMol+qK9u9puH4ux13zY+FrQ==", "requires": { - "@bitbybit-dev/jscad": "0.21.0", + "@bitbybit-dev/jscad": "0.21.1", "rxjs": "7.5.5" } }, "@bitbybit-dev/manifold": { - "version": "0.21.0", - "resolved": "https://registry.npmjs.org/@bitbybit-dev/manifold/-/manifold-0.21.0.tgz", - "integrity": "sha512-DPpwK9ESB+auDeAbzXcfWRVEzWoMDkpkjc+/uwh+zuSiHSx92PSkzx1/LVTbQCsK+aOfOOy03HQCF5Bu2KQYtw==", + "version": "0.21.1", + "resolved": "https://registry.npmjs.org/@bitbybit-dev/manifold/-/manifold-0.21.1.tgz", + "integrity": "sha512-/UqejYCN9YIyBzf5yQXPdSawoKqEUd1aQAKdmge4LoUaZ19eQyRHLK4WpZQ8K+7lTr7qcNQARr7mLx0FQMBFew==", "requires": { - "@bitbybit-dev/base": "0.21.0", + "@bitbybit-dev/base": "0.21.1", "manifold-3d": "3.3.2" } }, "@bitbybit-dev/manifold-worker": { - "version": "0.21.0", - "resolved": "https://registry.npmjs.org/@bitbybit-dev/manifold-worker/-/manifold-worker-0.21.0.tgz", - "integrity": "sha512-6Cqv3BP+uI8mHKHI6Jx9TzCxRg1/kMHhCe18+B3KD/rTl9B5mnScCKRBnDansR3bH7aYZGnIw9PmiFnWLkQWEQ==", + "version": "0.21.1", + "resolved": "https://registry.npmjs.org/@bitbybit-dev/manifold-worker/-/manifold-worker-0.21.1.tgz", + "integrity": "sha512-A+oV172dZzehkeF5kdCFzQuyyfj9FLixq5nGNviOpJX3zaF+0efl1ung1o45V5pLtZkuGCgCZaQ6lY0zNQcYig==", "requires": { - "@bitbybit-dev/manifold": "0.21.0", + "@bitbybit-dev/manifold": "0.21.1", "rxjs": "7.5.5" } }, "@bitbybit-dev/occt": { - "version": "0.21.0", - "resolved": "https://registry.npmjs.org/@bitbybit-dev/occt/-/occt-0.21.0.tgz", - "integrity": "sha512-vPu3NmF1kBZMOkOdysolGfFxEEnwdHNGORoX3eWbMWT2JL/Tag5Q2CAc5jwa2VvZnS1nE/9x+DVlFQSo8LQnIg==", + "version": "0.21.1", + "resolved": "https://registry.npmjs.org/@bitbybit-dev/occt/-/occt-0.21.1.tgz", + "integrity": "sha512-0+yffQRmph9W1qLSyRBUvaQDiZ9OHA2kD2/LsCgxR3NVtKs3GZaAYYhoUfaRqtt2I8Go99e8WBB5daaQceudjA==", "requires": { - "@bitbybit-dev/base": "0.21.0" + "@bitbybit-dev/base": "0.21.1" } }, "@bitbybit-dev/occt-worker": { - "version": "0.21.0", - "resolved": "https://registry.npmjs.org/@bitbybit-dev/occt-worker/-/occt-worker-0.21.0.tgz", - "integrity": "sha512-xG1sgo6q/RdVA8AgG72wPe4qxcQlrO1V7/Ksn6MqIhZVTsJcm5RbVYlK+nziIWhvlMc1sKE0GNQFcPdALISLuQ==", + "version": "0.21.1", + "resolved": "https://registry.npmjs.org/@bitbybit-dev/occt-worker/-/occt-worker-0.21.1.tgz", + "integrity": "sha512-3BW0lTiY8muPSiCWplAT/VQHaHFVUvljMGD1ynQo7cqv/Zna9ACn+SHOMY2HJ7m1MnZq5d2dGjJJXo8k19iV8Q==", "requires": { - "@bitbybit-dev/occt": "0.21.0", + "@bitbybit-dev/occt": "0.21.1", "rxjs": "7.5.5" } }, @@ -15834,9 +15834,9 @@ } }, "babylonjs-gltf2interface": { - "version": "8.44.1", - "resolved": "https://registry.npmjs.org/babylonjs-gltf2interface/-/babylonjs-gltf2interface-8.44.1.tgz", - "integrity": "sha512-+z0P0wms1FD5xuVpuRJ1qjvGAbPAWhEWGBWENRPD0Hbz6nd9cnL28/pjxgk39/QhlIuJKL9JZ0o8G0JgLHEnRQ==", + "version": "8.45.5", + "resolved": "https://registry.npmjs.org/babylonjs-gltf2interface/-/babylonjs-gltf2interface-8.45.5.tgz", + "integrity": "sha512-o1OMBVdeKCK7b+L1VUW1w1+KIi1DTP7Po+SAJ3vwPqRG6xD2eTL+w5IaFHVue3dVjnlU8Z+9y3BP3AadmK0H9w==", "peer": true }, "balanced-match": { @@ -18573,13 +18573,13 @@ "dev": true }, "jsonpath-plus": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/jsonpath-plus/-/jsonpath-plus-10.1.0.tgz", - "integrity": "sha512-gHfV1IYqH8uJHYVTs8BJX1XKy2/rR93+f8QQi0xhx95aCiXn1ettYAd5T+7FU6wfqyDoX/wy0pm/fL3jOKJ9Lg==", + "version": "10.3.0", + "resolved": "https://registry.npmjs.org/jsonpath-plus/-/jsonpath-plus-10.3.0.tgz", + "integrity": "sha512-8TNmfeTCk2Le33A3vRRwtuworG/L5RrgMvdjhKZxvyShO+mBu2fP50OWUjRLNtvw344DdDarFh9buFAZs5ujeA==", "requires": { - "@jsep-plugin/assignment": "^1.2.1", - "@jsep-plugin/regex": "^1.0.3", - "jsep": "^1.3.9" + "@jsep-plugin/assignment": "^1.3.0", + "@jsep-plugin/regex": "^1.0.4", + "jsep": "^1.4.0" } }, "karma": { diff --git a/examples/angular/babylonjs/laptop-holder/package.json b/examples/angular/babylonjs/laptop-holder/package.json index 9f8dd5fff..d385d3373 100644 --- a/examples/angular/babylonjs/laptop-holder/package.json +++ b/examples/angular/babylonjs/laptop-holder/package.json @@ -10,7 +10,7 @@ }, "private": true, "dependencies": { - "@bitbybit-dev/babylonjs": "0.21.0", + "@bitbybit-dev/babylonjs": "0.21.1", "@angular/animations": "13.3.0", "@angular/common": "13.3.0", "@angular/compiler": "13.3.0", diff --git a/examples/angular/threejs/simple/package-lock.json b/examples/angular/threejs/simple/package-lock.json index cbee6b1a3..a4aa416c3 100644 --- a/examples/angular/threejs/simple/package-lock.json +++ b/examples/angular/threejs/simple/package-lock.json @@ -17,7 +17,7 @@ "@angular/platform-browser": "13.3.0", "@angular/platform-browser-dynamic": "13.3.0", "@angular/router": "13.3.0", - "@bitbybit-dev/threejs": "0.21.0", + "@bitbybit-dev/threejs": "0.21.1", "rxjs": "7.5.5", "tslib": "2.3.1", "zone.js": "0.11.5" @@ -2331,33 +2331,33 @@ } }, "node_modules/@bitbybit-dev/base": { - "version": "0.21.0", - "resolved": "https://registry.npmjs.org/@bitbybit-dev/base/-/base-0.21.0.tgz", - "integrity": "sha512-dNfsf2tu3/QUD1mvZzzTze8RwHyK2Jrt+Ary8EDKdNKMw+abtCpQYNerdrg0ZQPxvwu/OOQz6N1xCsCwsPkQJg==", + "version": "0.21.1", + "resolved": "https://registry.npmjs.org/@bitbybit-dev/base/-/base-0.21.1.tgz", + "integrity": "sha512-d3aHPpLHigeNTceMi0U/wOIzCqkvHg8S2gNa4b8VGSTifbn7Fo1XbQ2pzetbcOtwtJhkcLgNYn3nFqW8S2MUpw==", "license": "MIT" }, "node_modules/@bitbybit-dev/core": { - "version": "0.21.0", - "resolved": "https://registry.npmjs.org/@bitbybit-dev/core/-/core-0.21.0.tgz", - "integrity": "sha512-IbeQ8ROreu0/RkkngUE+Eb19ecvqKOWhGefXvIqQmplxt3zEc0FI4Kw8wR3vYl2XMannuVt1xAIYtqqH0tjBzg==", + "version": "0.21.1", + "resolved": "https://registry.npmjs.org/@bitbybit-dev/core/-/core-0.21.1.tgz", + "integrity": "sha512-Zr2w4h1eBRgOHevKevTaDeL1KlOju6Q8uT62zLeKAAAAn5P1RNn2jOVnHEJtd7y4wPn7G2rZwlwtBQlYe5t9AQ==", "license": "MIT", "dependencies": { - "@bitbybit-dev/base": "0.21.0", - "@bitbybit-dev/jscad-worker": "0.21.0", - "@bitbybit-dev/manifold-worker": "0.21.0", - "@bitbybit-dev/occt-worker": "0.21.0", - "jsonpath-plus": "10.1.0", + "@bitbybit-dev/base": "0.21.1", + "@bitbybit-dev/jscad-worker": "0.21.1", + "@bitbybit-dev/manifold-worker": "0.21.1", + "@bitbybit-dev/occt-worker": "0.21.1", + "jsonpath-plus": "10.3.0", "rxjs": "7.5.5", "verb-nurbs-web": "2.1.3" } }, "node_modules/@bitbybit-dev/jscad": { - "version": "0.21.0", - "resolved": "https://registry.npmjs.org/@bitbybit-dev/jscad/-/jscad-0.21.0.tgz", - "integrity": "sha512-Q7eE2ILrJRstW4L1711aJZdpwPf1kuhZJqB+KLkkBLsneRsGsh82lBcCbVYAOMuF/q8Lnd4JHxPiIG/m+LYmPQ==", + "version": "0.21.1", + "resolved": "https://registry.npmjs.org/@bitbybit-dev/jscad/-/jscad-0.21.1.tgz", + "integrity": "sha512-nw8dHGYy3GPXoX0xLZeVsB0Z013mzIy4GoniLKvzN7ApnTruPxSFisxrvFajCcQpL5UbU8SW4k+LhJDI8FTlRg==", "license": "MIT", "dependencies": { - "@bitbybit-dev/base": "0.21.0", + "@bitbybit-dev/base": "0.21.1", "@jscad/3mf-serializer": "2.1.12", "@jscad/dxf-serializer": "2.1.18", "@jscad/io-utils": "2.0.28", @@ -2366,61 +2366,61 @@ } }, "node_modules/@bitbybit-dev/jscad-worker": { - "version": "0.21.0", - "resolved": "https://registry.npmjs.org/@bitbybit-dev/jscad-worker/-/jscad-worker-0.21.0.tgz", - "integrity": "sha512-nIvd7GH5Gg51u6PmFXOADXVYTIvixTkNf0YapS1uix7D2JS9Mx10Z4wHAeRKzvJxUAAbEPPRFNkakE22HFGtLQ==", + "version": "0.21.1", + "resolved": "https://registry.npmjs.org/@bitbybit-dev/jscad-worker/-/jscad-worker-0.21.1.tgz", + "integrity": "sha512-ccaXGTnKseWGDGEdgf3HfQqBWmM4Q384NQWO2kdzZ4EHaZlSp9tEHY8NHOxyxPoMol+qK9u9puH4ux13zY+FrQ==", "license": "MIT", "dependencies": { - "@bitbybit-dev/jscad": "0.21.0", + "@bitbybit-dev/jscad": "0.21.1", "rxjs": "7.5.5" } }, "node_modules/@bitbybit-dev/manifold": { - "version": "0.21.0", - "resolved": "https://registry.npmjs.org/@bitbybit-dev/manifold/-/manifold-0.21.0.tgz", - "integrity": "sha512-DPpwK9ESB+auDeAbzXcfWRVEzWoMDkpkjc+/uwh+zuSiHSx92PSkzx1/LVTbQCsK+aOfOOy03HQCF5Bu2KQYtw==", + "version": "0.21.1", + "resolved": "https://registry.npmjs.org/@bitbybit-dev/manifold/-/manifold-0.21.1.tgz", + "integrity": "sha512-/UqejYCN9YIyBzf5yQXPdSawoKqEUd1aQAKdmge4LoUaZ19eQyRHLK4WpZQ8K+7lTr7qcNQARr7mLx0FQMBFew==", "license": "MIT", "dependencies": { - "@bitbybit-dev/base": "0.21.0", + "@bitbybit-dev/base": "0.21.1", "manifold-3d": "3.3.2" } }, "node_modules/@bitbybit-dev/manifold-worker": { - "version": "0.21.0", - "resolved": "https://registry.npmjs.org/@bitbybit-dev/manifold-worker/-/manifold-worker-0.21.0.tgz", - "integrity": "sha512-6Cqv3BP+uI8mHKHI6Jx9TzCxRg1/kMHhCe18+B3KD/rTl9B5mnScCKRBnDansR3bH7aYZGnIw9PmiFnWLkQWEQ==", + "version": "0.21.1", + "resolved": "https://registry.npmjs.org/@bitbybit-dev/manifold-worker/-/manifold-worker-0.21.1.tgz", + "integrity": "sha512-A+oV172dZzehkeF5kdCFzQuyyfj9FLixq5nGNviOpJX3zaF+0efl1ung1o45V5pLtZkuGCgCZaQ6lY0zNQcYig==", "license": "MIT", "dependencies": { - "@bitbybit-dev/manifold": "0.21.0", + "@bitbybit-dev/manifold": "0.21.1", "rxjs": "7.5.5" } }, "node_modules/@bitbybit-dev/occt": { - "version": "0.21.0", - "resolved": "https://registry.npmjs.org/@bitbybit-dev/occt/-/occt-0.21.0.tgz", - "integrity": "sha512-vPu3NmF1kBZMOkOdysolGfFxEEnwdHNGORoX3eWbMWT2JL/Tag5Q2CAc5jwa2VvZnS1nE/9x+DVlFQSo8LQnIg==", + "version": "0.21.1", + "resolved": "https://registry.npmjs.org/@bitbybit-dev/occt/-/occt-0.21.1.tgz", + "integrity": "sha512-0+yffQRmph9W1qLSyRBUvaQDiZ9OHA2kD2/LsCgxR3NVtKs3GZaAYYhoUfaRqtt2I8Go99e8WBB5daaQceudjA==", "license": "MIT", "dependencies": { - "@bitbybit-dev/base": "0.21.0" + "@bitbybit-dev/base": "0.21.1" } }, "node_modules/@bitbybit-dev/occt-worker": { - "version": "0.21.0", - "resolved": "https://registry.npmjs.org/@bitbybit-dev/occt-worker/-/occt-worker-0.21.0.tgz", - "integrity": "sha512-xG1sgo6q/RdVA8AgG72wPe4qxcQlrO1V7/Ksn6MqIhZVTsJcm5RbVYlK+nziIWhvlMc1sKE0GNQFcPdALISLuQ==", + "version": "0.21.1", + "resolved": "https://registry.npmjs.org/@bitbybit-dev/occt-worker/-/occt-worker-0.21.1.tgz", + "integrity": "sha512-3BW0lTiY8muPSiCWplAT/VQHaHFVUvljMGD1ynQo7cqv/Zna9ACn+SHOMY2HJ7m1MnZq5d2dGjJJXo8k19iV8Q==", "license": "MIT", "dependencies": { - "@bitbybit-dev/occt": "0.21.0", + "@bitbybit-dev/occt": "0.21.1", "rxjs": "7.5.5" } }, "node_modules/@bitbybit-dev/threejs": { - "version": "0.21.0", - "resolved": "https://registry.npmjs.org/@bitbybit-dev/threejs/-/threejs-0.21.0.tgz", - "integrity": "sha512-p0fHuLTjoXs3UIWoC2TFUBAhu0F4sTPU//PCvwwPLmLrbrVmpEFV61tGs0739hbU4eKS5goCTUM99RfjbRxW6A==", + "version": "0.21.1", + "resolved": "https://registry.npmjs.org/@bitbybit-dev/threejs/-/threejs-0.21.1.tgz", + "integrity": "sha512-BXQXMB0QIpvUNCRuVM6KJKn0Of/XBY0+Mt+GlyBe/s0Npk5XX9D4WYUX4A7byKGfhQxE/+FczLGs4ibcuipfmA==", "license": "MIT", "dependencies": { - "@bitbybit-dev/core": "0.21.0", + "@bitbybit-dev/core": "0.21.1", "three": "0.182.0" } }, @@ -7927,14 +7927,14 @@ ] }, "node_modules/jsonpath-plus": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/jsonpath-plus/-/jsonpath-plus-10.1.0.tgz", - "integrity": "sha512-gHfV1IYqH8uJHYVTs8BJX1XKy2/rR93+f8QQi0xhx95aCiXn1ettYAd5T+7FU6wfqyDoX/wy0pm/fL3jOKJ9Lg==", + "version": "10.3.0", + "resolved": "https://registry.npmjs.org/jsonpath-plus/-/jsonpath-plus-10.3.0.tgz", + "integrity": "sha512-8TNmfeTCk2Le33A3vRRwtuworG/L5RrgMvdjhKZxvyShO+mBu2fP50OWUjRLNtvw344DdDarFh9buFAZs5ujeA==", "license": "MIT", "dependencies": { - "@jsep-plugin/assignment": "^1.2.1", - "@jsep-plugin/regex": "^1.0.3", - "jsep": "^1.3.9" + "@jsep-plugin/assignment": "^1.3.0", + "@jsep-plugin/regex": "^1.0.4", + "jsep": "^1.4.0" }, "bin": { "jsonpath": "bin/jsonpath-cli.js", @@ -14400,30 +14400,30 @@ } }, "@bitbybit-dev/base": { - "version": "0.21.0", - "resolved": "https://registry.npmjs.org/@bitbybit-dev/base/-/base-0.21.0.tgz", - "integrity": "sha512-dNfsf2tu3/QUD1mvZzzTze8RwHyK2Jrt+Ary8EDKdNKMw+abtCpQYNerdrg0ZQPxvwu/OOQz6N1xCsCwsPkQJg==" + "version": "0.21.1", + "resolved": "https://registry.npmjs.org/@bitbybit-dev/base/-/base-0.21.1.tgz", + "integrity": "sha512-d3aHPpLHigeNTceMi0U/wOIzCqkvHg8S2gNa4b8VGSTifbn7Fo1XbQ2pzetbcOtwtJhkcLgNYn3nFqW8S2MUpw==" }, "@bitbybit-dev/core": { - "version": "0.21.0", - "resolved": "https://registry.npmjs.org/@bitbybit-dev/core/-/core-0.21.0.tgz", - "integrity": "sha512-IbeQ8ROreu0/RkkngUE+Eb19ecvqKOWhGefXvIqQmplxt3zEc0FI4Kw8wR3vYl2XMannuVt1xAIYtqqH0tjBzg==", - "requires": { - "@bitbybit-dev/base": "0.21.0", - "@bitbybit-dev/jscad-worker": "0.21.0", - "@bitbybit-dev/manifold-worker": "0.21.0", - "@bitbybit-dev/occt-worker": "0.21.0", - "jsonpath-plus": "10.1.0", + "version": "0.21.1", + "resolved": "https://registry.npmjs.org/@bitbybit-dev/core/-/core-0.21.1.tgz", + "integrity": "sha512-Zr2w4h1eBRgOHevKevTaDeL1KlOju6Q8uT62zLeKAAAAn5P1RNn2jOVnHEJtd7y4wPn7G2rZwlwtBQlYe5t9AQ==", + "requires": { + "@bitbybit-dev/base": "0.21.1", + "@bitbybit-dev/jscad-worker": "0.21.1", + "@bitbybit-dev/manifold-worker": "0.21.1", + "@bitbybit-dev/occt-worker": "0.21.1", + "jsonpath-plus": "10.3.0", "rxjs": "7.5.5", "verb-nurbs-web": "2.1.3" } }, "@bitbybit-dev/jscad": { - "version": "0.21.0", - "resolved": "https://registry.npmjs.org/@bitbybit-dev/jscad/-/jscad-0.21.0.tgz", - "integrity": "sha512-Q7eE2ILrJRstW4L1711aJZdpwPf1kuhZJqB+KLkkBLsneRsGsh82lBcCbVYAOMuF/q8Lnd4JHxPiIG/m+LYmPQ==", + "version": "0.21.1", + "resolved": "https://registry.npmjs.org/@bitbybit-dev/jscad/-/jscad-0.21.1.tgz", + "integrity": "sha512-nw8dHGYy3GPXoX0xLZeVsB0Z013mzIy4GoniLKvzN7ApnTruPxSFisxrvFajCcQpL5UbU8SW4k+LhJDI8FTlRg==", "requires": { - "@bitbybit-dev/base": "0.21.0", + "@bitbybit-dev/base": "0.21.1", "@jscad/3mf-serializer": "2.1.12", "@jscad/dxf-serializer": "2.1.18", "@jscad/io-utils": "2.0.28", @@ -14432,55 +14432,55 @@ } }, "@bitbybit-dev/jscad-worker": { - "version": "0.21.0", - "resolved": "https://registry.npmjs.org/@bitbybit-dev/jscad-worker/-/jscad-worker-0.21.0.tgz", - "integrity": "sha512-nIvd7GH5Gg51u6PmFXOADXVYTIvixTkNf0YapS1uix7D2JS9Mx10Z4wHAeRKzvJxUAAbEPPRFNkakE22HFGtLQ==", + "version": "0.21.1", + "resolved": "https://registry.npmjs.org/@bitbybit-dev/jscad-worker/-/jscad-worker-0.21.1.tgz", + "integrity": "sha512-ccaXGTnKseWGDGEdgf3HfQqBWmM4Q384NQWO2kdzZ4EHaZlSp9tEHY8NHOxyxPoMol+qK9u9puH4ux13zY+FrQ==", "requires": { - "@bitbybit-dev/jscad": "0.21.0", + "@bitbybit-dev/jscad": "0.21.1", "rxjs": "7.5.5" } }, "@bitbybit-dev/manifold": { - "version": "0.21.0", - "resolved": "https://registry.npmjs.org/@bitbybit-dev/manifold/-/manifold-0.21.0.tgz", - "integrity": "sha512-DPpwK9ESB+auDeAbzXcfWRVEzWoMDkpkjc+/uwh+zuSiHSx92PSkzx1/LVTbQCsK+aOfOOy03HQCF5Bu2KQYtw==", + "version": "0.21.1", + "resolved": "https://registry.npmjs.org/@bitbybit-dev/manifold/-/manifold-0.21.1.tgz", + "integrity": "sha512-/UqejYCN9YIyBzf5yQXPdSawoKqEUd1aQAKdmge4LoUaZ19eQyRHLK4WpZQ8K+7lTr7qcNQARr7mLx0FQMBFew==", "requires": { - "@bitbybit-dev/base": "0.21.0", + "@bitbybit-dev/base": "0.21.1", "manifold-3d": "3.3.2" } }, "@bitbybit-dev/manifold-worker": { - "version": "0.21.0", - "resolved": "https://registry.npmjs.org/@bitbybit-dev/manifold-worker/-/manifold-worker-0.21.0.tgz", - "integrity": "sha512-6Cqv3BP+uI8mHKHI6Jx9TzCxRg1/kMHhCe18+B3KD/rTl9B5mnScCKRBnDansR3bH7aYZGnIw9PmiFnWLkQWEQ==", + "version": "0.21.1", + "resolved": "https://registry.npmjs.org/@bitbybit-dev/manifold-worker/-/manifold-worker-0.21.1.tgz", + "integrity": "sha512-A+oV172dZzehkeF5kdCFzQuyyfj9FLixq5nGNviOpJX3zaF+0efl1ung1o45V5pLtZkuGCgCZaQ6lY0zNQcYig==", "requires": { - "@bitbybit-dev/manifold": "0.21.0", + "@bitbybit-dev/manifold": "0.21.1", "rxjs": "7.5.5" } }, "@bitbybit-dev/occt": { - "version": "0.21.0", - "resolved": "https://registry.npmjs.org/@bitbybit-dev/occt/-/occt-0.21.0.tgz", - "integrity": "sha512-vPu3NmF1kBZMOkOdysolGfFxEEnwdHNGORoX3eWbMWT2JL/Tag5Q2CAc5jwa2VvZnS1nE/9x+DVlFQSo8LQnIg==", + "version": "0.21.1", + "resolved": "https://registry.npmjs.org/@bitbybit-dev/occt/-/occt-0.21.1.tgz", + "integrity": "sha512-0+yffQRmph9W1qLSyRBUvaQDiZ9OHA2kD2/LsCgxR3NVtKs3GZaAYYhoUfaRqtt2I8Go99e8WBB5daaQceudjA==", "requires": { - "@bitbybit-dev/base": "0.21.0" + "@bitbybit-dev/base": "0.21.1" } }, "@bitbybit-dev/occt-worker": { - "version": "0.21.0", - "resolved": "https://registry.npmjs.org/@bitbybit-dev/occt-worker/-/occt-worker-0.21.0.tgz", - "integrity": "sha512-xG1sgo6q/RdVA8AgG72wPe4qxcQlrO1V7/Ksn6MqIhZVTsJcm5RbVYlK+nziIWhvlMc1sKE0GNQFcPdALISLuQ==", + "version": "0.21.1", + "resolved": "https://registry.npmjs.org/@bitbybit-dev/occt-worker/-/occt-worker-0.21.1.tgz", + "integrity": "sha512-3BW0lTiY8muPSiCWplAT/VQHaHFVUvljMGD1ynQo7cqv/Zna9ACn+SHOMY2HJ7m1MnZq5d2dGjJJXo8k19iV8Q==", "requires": { - "@bitbybit-dev/occt": "0.21.0", + "@bitbybit-dev/occt": "0.21.1", "rxjs": "7.5.5" } }, "@bitbybit-dev/threejs": { - "version": "0.21.0", - "resolved": "https://registry.npmjs.org/@bitbybit-dev/threejs/-/threejs-0.21.0.tgz", - "integrity": "sha512-p0fHuLTjoXs3UIWoC2TFUBAhu0F4sTPU//PCvwwPLmLrbrVmpEFV61tGs0739hbU4eKS5goCTUM99RfjbRxW6A==", + "version": "0.21.1", + "resolved": "https://registry.npmjs.org/@bitbybit-dev/threejs/-/threejs-0.21.1.tgz", + "integrity": "sha512-BXQXMB0QIpvUNCRuVM6KJKn0Of/XBY0+Mt+GlyBe/s0Npk5XX9D4WYUX4A7byKGfhQxE/+FczLGs4ibcuipfmA==", "requires": { - "@bitbybit-dev/core": "0.21.0", + "@bitbybit-dev/core": "0.21.1", "three": "0.182.0" } }, @@ -18445,13 +18445,13 @@ "dev": true }, "jsonpath-plus": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/jsonpath-plus/-/jsonpath-plus-10.1.0.tgz", - "integrity": "sha512-gHfV1IYqH8uJHYVTs8BJX1XKy2/rR93+f8QQi0xhx95aCiXn1ettYAd5T+7FU6wfqyDoX/wy0pm/fL3jOKJ9Lg==", + "version": "10.3.0", + "resolved": "https://registry.npmjs.org/jsonpath-plus/-/jsonpath-plus-10.3.0.tgz", + "integrity": "sha512-8TNmfeTCk2Le33A3vRRwtuworG/L5RrgMvdjhKZxvyShO+mBu2fP50OWUjRLNtvw344DdDarFh9buFAZs5ujeA==", "requires": { - "@jsep-plugin/assignment": "^1.2.1", - "@jsep-plugin/regex": "^1.0.3", - "jsep": "^1.3.9" + "@jsep-plugin/assignment": "^1.3.0", + "@jsep-plugin/regex": "^1.0.4", + "jsep": "^1.4.0" } }, "karma": { diff --git a/examples/angular/threejs/simple/package.json b/examples/angular/threejs/simple/package.json index b3122257c..19b517eb2 100644 --- a/examples/angular/threejs/simple/package.json +++ b/examples/angular/threejs/simple/package.json @@ -10,7 +10,7 @@ }, "private": true, "dependencies": { - "@bitbybit-dev/threejs": "0.21.0", + "@bitbybit-dev/threejs": "0.21.1", "@angular/animations": "13.3.0", "@angular/common": "13.3.0", "@angular/compiler": "13.3.0", diff --git a/examples/angular/threejs/vite-basic-example/package-lock.json b/examples/angular/threejs/vite-basic-example/package-lock.json index 88c4c0473..ecae6a35f 100644 --- a/examples/angular/threejs/vite-basic-example/package-lock.json +++ b/examples/angular/threejs/vite-basic-example/package-lock.json @@ -13,7 +13,7 @@ "@angular/forms": "^20.0.0", "@angular/platform-browser": "^20.0.0", "@angular/router": "^20.0.0", - "@bitbybit-dev/threejs": "0.21.0", + "@bitbybit-dev/threejs": "0.21.1", "rxjs": "7.5.5", "tslib": "^2.5.0", "zone.js": "~0.15.0" @@ -929,33 +929,33 @@ } }, "node_modules/@bitbybit-dev/base": { - "version": "0.21.0", - "resolved": "https://registry.npmjs.org/@bitbybit-dev/base/-/base-0.21.0.tgz", - "integrity": "sha512-dNfsf2tu3/QUD1mvZzzTze8RwHyK2Jrt+Ary8EDKdNKMw+abtCpQYNerdrg0ZQPxvwu/OOQz6N1xCsCwsPkQJg==", + "version": "0.21.1", + "resolved": "https://registry.npmjs.org/@bitbybit-dev/base/-/base-0.21.1.tgz", + "integrity": "sha512-d3aHPpLHigeNTceMi0U/wOIzCqkvHg8S2gNa4b8VGSTifbn7Fo1XbQ2pzetbcOtwtJhkcLgNYn3nFqW8S2MUpw==", "license": "MIT" }, "node_modules/@bitbybit-dev/core": { - "version": "0.21.0", - "resolved": "https://registry.npmjs.org/@bitbybit-dev/core/-/core-0.21.0.tgz", - "integrity": "sha512-IbeQ8ROreu0/RkkngUE+Eb19ecvqKOWhGefXvIqQmplxt3zEc0FI4Kw8wR3vYl2XMannuVt1xAIYtqqH0tjBzg==", + "version": "0.21.1", + "resolved": "https://registry.npmjs.org/@bitbybit-dev/core/-/core-0.21.1.tgz", + "integrity": "sha512-Zr2w4h1eBRgOHevKevTaDeL1KlOju6Q8uT62zLeKAAAAn5P1RNn2jOVnHEJtd7y4wPn7G2rZwlwtBQlYe5t9AQ==", "license": "MIT", "dependencies": { - "@bitbybit-dev/base": "0.21.0", - "@bitbybit-dev/jscad-worker": "0.21.0", - "@bitbybit-dev/manifold-worker": "0.21.0", - "@bitbybit-dev/occt-worker": "0.21.0", - "jsonpath-plus": "10.1.0", + "@bitbybit-dev/base": "0.21.1", + "@bitbybit-dev/jscad-worker": "0.21.1", + "@bitbybit-dev/manifold-worker": "0.21.1", + "@bitbybit-dev/occt-worker": "0.21.1", + "jsonpath-plus": "10.3.0", "rxjs": "7.5.5", "verb-nurbs-web": "2.1.3" } }, "node_modules/@bitbybit-dev/jscad": { - "version": "0.21.0", - "resolved": "https://registry.npmjs.org/@bitbybit-dev/jscad/-/jscad-0.21.0.tgz", - "integrity": "sha512-Q7eE2ILrJRstW4L1711aJZdpwPf1kuhZJqB+KLkkBLsneRsGsh82lBcCbVYAOMuF/q8Lnd4JHxPiIG/m+LYmPQ==", + "version": "0.21.1", + "resolved": "https://registry.npmjs.org/@bitbybit-dev/jscad/-/jscad-0.21.1.tgz", + "integrity": "sha512-nw8dHGYy3GPXoX0xLZeVsB0Z013mzIy4GoniLKvzN7ApnTruPxSFisxrvFajCcQpL5UbU8SW4k+LhJDI8FTlRg==", "license": "MIT", "dependencies": { - "@bitbybit-dev/base": "0.21.0", + "@bitbybit-dev/base": "0.21.1", "@jscad/3mf-serializer": "2.1.12", "@jscad/dxf-serializer": "2.1.18", "@jscad/io-utils": "2.0.28", @@ -964,61 +964,61 @@ } }, "node_modules/@bitbybit-dev/jscad-worker": { - "version": "0.21.0", - "resolved": "https://registry.npmjs.org/@bitbybit-dev/jscad-worker/-/jscad-worker-0.21.0.tgz", - "integrity": "sha512-nIvd7GH5Gg51u6PmFXOADXVYTIvixTkNf0YapS1uix7D2JS9Mx10Z4wHAeRKzvJxUAAbEPPRFNkakE22HFGtLQ==", + "version": "0.21.1", + "resolved": "https://registry.npmjs.org/@bitbybit-dev/jscad-worker/-/jscad-worker-0.21.1.tgz", + "integrity": "sha512-ccaXGTnKseWGDGEdgf3HfQqBWmM4Q384NQWO2kdzZ4EHaZlSp9tEHY8NHOxyxPoMol+qK9u9puH4ux13zY+FrQ==", "license": "MIT", "dependencies": { - "@bitbybit-dev/jscad": "0.21.0", + "@bitbybit-dev/jscad": "0.21.1", "rxjs": "7.5.5" } }, "node_modules/@bitbybit-dev/manifold": { - "version": "0.21.0", - "resolved": "https://registry.npmjs.org/@bitbybit-dev/manifold/-/manifold-0.21.0.tgz", - "integrity": "sha512-DPpwK9ESB+auDeAbzXcfWRVEzWoMDkpkjc+/uwh+zuSiHSx92PSkzx1/LVTbQCsK+aOfOOy03HQCF5Bu2KQYtw==", + "version": "0.21.1", + "resolved": "https://registry.npmjs.org/@bitbybit-dev/manifold/-/manifold-0.21.1.tgz", + "integrity": "sha512-/UqejYCN9YIyBzf5yQXPdSawoKqEUd1aQAKdmge4LoUaZ19eQyRHLK4WpZQ8K+7lTr7qcNQARr7mLx0FQMBFew==", "license": "MIT", "dependencies": { - "@bitbybit-dev/base": "0.21.0", + "@bitbybit-dev/base": "0.21.1", "manifold-3d": "3.3.2" } }, "node_modules/@bitbybit-dev/manifold-worker": { - "version": "0.21.0", - "resolved": "https://registry.npmjs.org/@bitbybit-dev/manifold-worker/-/manifold-worker-0.21.0.tgz", - "integrity": "sha512-6Cqv3BP+uI8mHKHI6Jx9TzCxRg1/kMHhCe18+B3KD/rTl9B5mnScCKRBnDansR3bH7aYZGnIw9PmiFnWLkQWEQ==", + "version": "0.21.1", + "resolved": "https://registry.npmjs.org/@bitbybit-dev/manifold-worker/-/manifold-worker-0.21.1.tgz", + "integrity": "sha512-A+oV172dZzehkeF5kdCFzQuyyfj9FLixq5nGNviOpJX3zaF+0efl1ung1o45V5pLtZkuGCgCZaQ6lY0zNQcYig==", "license": "MIT", "dependencies": { - "@bitbybit-dev/manifold": "0.21.0", + "@bitbybit-dev/manifold": "0.21.1", "rxjs": "7.5.5" } }, "node_modules/@bitbybit-dev/occt": { - "version": "0.21.0", - "resolved": "https://registry.npmjs.org/@bitbybit-dev/occt/-/occt-0.21.0.tgz", - "integrity": "sha512-vPu3NmF1kBZMOkOdysolGfFxEEnwdHNGORoX3eWbMWT2JL/Tag5Q2CAc5jwa2VvZnS1nE/9x+DVlFQSo8LQnIg==", + "version": "0.21.1", + "resolved": "https://registry.npmjs.org/@bitbybit-dev/occt/-/occt-0.21.1.tgz", + "integrity": "sha512-0+yffQRmph9W1qLSyRBUvaQDiZ9OHA2kD2/LsCgxR3NVtKs3GZaAYYhoUfaRqtt2I8Go99e8WBB5daaQceudjA==", "license": "MIT", "dependencies": { - "@bitbybit-dev/base": "0.21.0" + "@bitbybit-dev/base": "0.21.1" } }, "node_modules/@bitbybit-dev/occt-worker": { - "version": "0.21.0", - "resolved": "https://registry.npmjs.org/@bitbybit-dev/occt-worker/-/occt-worker-0.21.0.tgz", - "integrity": "sha512-xG1sgo6q/RdVA8AgG72wPe4qxcQlrO1V7/Ksn6MqIhZVTsJcm5RbVYlK+nziIWhvlMc1sKE0GNQFcPdALISLuQ==", + "version": "0.21.1", + "resolved": "https://registry.npmjs.org/@bitbybit-dev/occt-worker/-/occt-worker-0.21.1.tgz", + "integrity": "sha512-3BW0lTiY8muPSiCWplAT/VQHaHFVUvljMGD1ynQo7cqv/Zna9ACn+SHOMY2HJ7m1MnZq5d2dGjJJXo8k19iV8Q==", "license": "MIT", "dependencies": { - "@bitbybit-dev/occt": "0.21.0", + "@bitbybit-dev/occt": "0.21.1", "rxjs": "7.5.5" } }, "node_modules/@bitbybit-dev/threejs": { - "version": "0.21.0", - "resolved": "https://registry.npmjs.org/@bitbybit-dev/threejs/-/threejs-0.21.0.tgz", - "integrity": "sha512-p0fHuLTjoXs3UIWoC2TFUBAhu0F4sTPU//PCvwwPLmLrbrVmpEFV61tGs0739hbU4eKS5goCTUM99RfjbRxW6A==", + "version": "0.21.1", + "resolved": "https://registry.npmjs.org/@bitbybit-dev/threejs/-/threejs-0.21.1.tgz", + "integrity": "sha512-BXQXMB0QIpvUNCRuVM6KJKn0Of/XBY0+Mt+GlyBe/s0Npk5XX9D4WYUX4A7byKGfhQxE/+FczLGs4ibcuipfmA==", "license": "MIT", "dependencies": { - "@bitbybit-dev/core": "0.21.0", + "@bitbybit-dev/core": "0.21.1", "three": "0.182.0" } }, @@ -6149,14 +6149,14 @@ "license": "MIT" }, "node_modules/jsonpath-plus": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/jsonpath-plus/-/jsonpath-plus-10.1.0.tgz", - "integrity": "sha512-gHfV1IYqH8uJHYVTs8BJX1XKy2/rR93+f8QQi0xhx95aCiXn1ettYAd5T+7FU6wfqyDoX/wy0pm/fL3jOKJ9Lg==", + "version": "10.3.0", + "resolved": "https://registry.npmjs.org/jsonpath-plus/-/jsonpath-plus-10.3.0.tgz", + "integrity": "sha512-8TNmfeTCk2Le33A3vRRwtuworG/L5RrgMvdjhKZxvyShO+mBu2fP50OWUjRLNtvw344DdDarFh9buFAZs5ujeA==", "license": "MIT", "dependencies": { - "@jsep-plugin/assignment": "^1.2.1", - "@jsep-plugin/regex": "^1.0.3", - "jsep": "^1.3.9" + "@jsep-plugin/assignment": "^1.3.0", + "@jsep-plugin/regex": "^1.0.4", + "jsep": "^1.4.0" }, "bin": { "jsonpath": "bin/jsonpath-cli.js", @@ -7842,10 +7842,13 @@ } }, "node_modules/sax": { - "version": "1.4.3", - "resolved": "https://registry.npmjs.org/sax/-/sax-1.4.3.tgz", - "integrity": "sha512-yqYn1JhPczigF94DMS+shiDMjDowYO6y9+wB/4WgO0Y19jWYk0lQ4tuG5KI7kj4FTp1wxPj5IFfcrz/s1c3jjQ==", - "license": "BlueOak-1.0.0" + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/sax/-/sax-1.4.4.tgz", + "integrity": "sha512-1n3r/tGXO6b6VXMdFT54SHzT9ytu9yr7TaELowdYpMqY/Ao7EnlQGmAQ1+RatX7Tkkdm6hONI2owqNx2aZj5Sw==", + "license": "BlueOak-1.0.0", + "engines": { + "node": ">=11.0.0" + } }, "node_modules/semver": { "version": "7.7.2", diff --git a/examples/angular/threejs/vite-basic-example/package.json b/examples/angular/threejs/vite-basic-example/package.json index 06a235381..3bd2e6d5a 100644 --- a/examples/angular/threejs/vite-basic-example/package.json +++ b/examples/angular/threejs/vite-basic-example/package.json @@ -14,7 +14,7 @@ "@angular/forms": "^20.0.0", "@angular/platform-browser": "^20.0.0", "@angular/router": "^20.0.0", - "@bitbybit-dev/threejs": "0.21.0", + "@bitbybit-dev/threejs": "0.21.1", "rxjs": "7.5.5", "tslib": "^2.5.0", "zone.js": "~0.15.0" diff --git a/examples/angular/threejs/vite-basic-example/src/workers/manifold.worker.ts b/examples/angular/threejs/vite-basic-example/src/workers/manifold.worker.ts index 09625fcb9..01d47f90e 100644 --- a/examples/angular/threejs/vite-basic-example/src/workers/manifold.worker.ts +++ b/examples/angular/threejs/vite-basic-example/src/workers/manifold.worker.ts @@ -7,7 +7,7 @@ import Module from "manifold-3d"; const init = async () => { const wasm = await Module({ locateFile: () => { - return "https://cdn.jsdelivr.net/gh/bitbybit-dev/bitbybit-assets@0.21.0/wasm/manifold-3-3-2.wasm"; + return "https://cdn.jsdelivr.net/gh/bitbybit-dev/bitbybit-assets@0.21.1/wasm/manifold-3-3-2.wasm"; }, }); wasm.setup(); diff --git a/examples/nextjs/babylonjs/simple/package-lock.json b/examples/nextjs/babylonjs/simple/package-lock.json index c83a835a7..564a198c1 100644 --- a/examples/nextjs/babylonjs/simple/package-lock.json +++ b/examples/nextjs/babylonjs/simple/package-lock.json @@ -8,7 +8,7 @@ "name": "simple", "version": "0.1.0", "dependencies": { - "@bitbybit-dev/babylonjs": "0.21.0", + "@bitbybit-dev/babylonjs": "0.21.1", "file-loader": "6.2.0", "next": "15.0.1", "react": "19.0.0-rc-69d4b800-20241021", @@ -38,15 +38,15 @@ } }, "node_modules/@babylonjs/core": { - "version": "8.44.1", - "resolved": "https://registry.npmjs.org/@babylonjs/core/-/core-8.44.1.tgz", - "integrity": "sha512-sF2WWK2d7lg18ESOCxUoRG4d1SzCWz42asjRjRGxZ8r3D7w9ZM3H2wftJIqwaZvD3zWr+wmCVKpQ6hWkboHIXw==", + "version": "8.45.4", + "resolved": "https://registry.npmjs.org/@babylonjs/core/-/core-8.45.4.tgz", + "integrity": "sha512-fmpaitVpe+bB3PCLY0RKYO/e5n1vLNvueJrglt6SENVE/frZNS4har8odAd1UDNf5KFgOdb8YK91jK4BUwIgcQ==", "license": "Apache-2.0" }, "node_modules/@babylonjs/gui": { - "version": "8.44.1", - "resolved": "https://registry.npmjs.org/@babylonjs/gui/-/gui-8.44.1.tgz", - "integrity": "sha512-6STDK+Hr8GpY29YMLKnTVhEnWw1NKPrIpz+MqgWuoAAmmpiFtNCr0nnAnCj5fhgGf25L89jy51ogXyg3jfiuDA==", + "version": "8.45.4", + "resolved": "https://registry.npmjs.org/@babylonjs/gui/-/gui-8.45.4.tgz", + "integrity": "sha512-1pMjQs7fgSEvUQoXyit96kNRqzX74oMNkMkAOmz7NjOkBX3tacAfNfoEC6aw+AB+iAjlCO5/DXatZU5m6EYyIQ==", "license": "Apache-2.0", "peerDependencies": { "@babylonjs/core": "^8.0.0" @@ -61,9 +61,9 @@ } }, "node_modules/@babylonjs/loaders": { - "version": "8.44.1", - "resolved": "https://registry.npmjs.org/@babylonjs/loaders/-/loaders-8.44.1.tgz", - "integrity": "sha512-h5rUGCwhdWv3Hq48DP8sy4/+3QUYjOprxu2i6zXKb69LHMnYE0tZ1xQHBJEOUF60hxA+TwhzdjC8bxInKoeojA==", + "version": "8.45.4", + "resolved": "https://registry.npmjs.org/@babylonjs/loaders/-/loaders-8.45.4.tgz", + "integrity": "sha512-P1H8XpIJK7NnrtGGSGkCJZIPBvtJ+0+l7yGXDY2UaNFKU80y2Oty8DZ8JRKdbJdSc4cOe8ucBY5w7x+Bbllxuw==", "license": "Apache-2.0", "peerDependencies": { "@babylonjs/core": "^8.0.0", @@ -71,18 +71,18 @@ } }, "node_modules/@babylonjs/materials": { - "version": "8.44.1", - "resolved": "https://registry.npmjs.org/@babylonjs/materials/-/materials-8.44.1.tgz", - "integrity": "sha512-FD0S/aA68oEjKCSNY5ydGkiHbsyo08KlhQ+6R8swtJhx5aq7ojWBt3P9KC78+wjZiCJW37176CIObcV8QcjMAQ==", + "version": "8.45.4", + "resolved": "https://registry.npmjs.org/@babylonjs/materials/-/materials-8.45.4.tgz", + "integrity": "sha512-ElTXhC83alnMFFyv2sPG/Im5UwTZoDzd1R8otPQwbEEERcRK8A71Hu1gFdBu/8l9O752IWnZcPSEj1WwLqeR5A==", "license": "Apache-2.0", "peerDependencies": { "@babylonjs/core": "^8.6.0" } }, "node_modules/@babylonjs/serializers": { - "version": "8.44.1", - "resolved": "https://registry.npmjs.org/@babylonjs/serializers/-/serializers-8.44.1.tgz", - "integrity": "sha512-3FRRdKpHr2qTkALHEvq0ih0P59iTINUFrGZWFUfO3Wu24UBSuTxY9Kq820dvUUWaRtWkXEnMSQbR+5glzcfqBw==", + "version": "8.45.4", + "resolved": "https://registry.npmjs.org/@babylonjs/serializers/-/serializers-8.45.4.tgz", + "integrity": "sha512-i83RQIP3XSi3DFJwhc/+JNNPm49DdtNyDobuyBBwIDyMpQdbcFLhkL0DW/7/H+vFUWz0xWx+mgmsb6HY/ePGmg==", "license": "Apache-2.0", "peerDependencies": { "@babylonjs/core": "^8.0.0", @@ -90,49 +90,49 @@ } }, "node_modules/@bitbybit-dev/babylonjs": { - "version": "0.21.0", - "resolved": "https://registry.npmjs.org/@bitbybit-dev/babylonjs/-/babylonjs-0.21.0.tgz", - "integrity": "sha512-8aPJ+XTXzcnO4bXfmW34lTnVCzC6Hy6TMkh7/ziQSoUsjPp7e7LFHoBBfqCk09LdTLa85gb5x/f6WNAn306Odg==", + "version": "0.21.1", + "resolved": "https://registry.npmjs.org/@bitbybit-dev/babylonjs/-/babylonjs-0.21.1.tgz", + "integrity": "sha512-OyQI5FC4qI5EYW/RFZt/6WR2We2bEpbhM8I8ptiJkviY0e1yIjiV11A4aF8B6fpjS5Bd7Rb30LrUdWNHbAo1Nw==", "license": "MIT", "dependencies": { - "@babylonjs/core": "8.44.1", - "@babylonjs/gui": "8.44.1", + "@babylonjs/core": "8.45.4", + "@babylonjs/gui": "8.45.4", "@babylonjs/havok": "1.3.10", - "@babylonjs/loaders": "8.44.1", - "@babylonjs/materials": "8.44.1", - "@babylonjs/serializers": "8.44.1", - "@bitbybit-dev/core": "0.21.0", + "@babylonjs/loaders": "8.45.4", + "@babylonjs/materials": "8.45.4", + "@babylonjs/serializers": "8.45.4", + "@bitbybit-dev/core": "0.21.1", "earcut": "2.2.3" } }, "node_modules/@bitbybit-dev/base": { - "version": "0.21.0", - "resolved": "https://registry.npmjs.org/@bitbybit-dev/base/-/base-0.21.0.tgz", - "integrity": "sha512-dNfsf2tu3/QUD1mvZzzTze8RwHyK2Jrt+Ary8EDKdNKMw+abtCpQYNerdrg0ZQPxvwu/OOQz6N1xCsCwsPkQJg==", + "version": "0.21.1", + "resolved": "https://registry.npmjs.org/@bitbybit-dev/base/-/base-0.21.1.tgz", + "integrity": "sha512-d3aHPpLHigeNTceMi0U/wOIzCqkvHg8S2gNa4b8VGSTifbn7Fo1XbQ2pzetbcOtwtJhkcLgNYn3nFqW8S2MUpw==", "license": "MIT" }, "node_modules/@bitbybit-dev/core": { - "version": "0.21.0", - "resolved": "https://registry.npmjs.org/@bitbybit-dev/core/-/core-0.21.0.tgz", - "integrity": "sha512-IbeQ8ROreu0/RkkngUE+Eb19ecvqKOWhGefXvIqQmplxt3zEc0FI4Kw8wR3vYl2XMannuVt1xAIYtqqH0tjBzg==", + "version": "0.21.1", + "resolved": "https://registry.npmjs.org/@bitbybit-dev/core/-/core-0.21.1.tgz", + "integrity": "sha512-Zr2w4h1eBRgOHevKevTaDeL1KlOju6Q8uT62zLeKAAAAn5P1RNn2jOVnHEJtd7y4wPn7G2rZwlwtBQlYe5t9AQ==", "license": "MIT", "dependencies": { - "@bitbybit-dev/base": "0.21.0", - "@bitbybit-dev/jscad-worker": "0.21.0", - "@bitbybit-dev/manifold-worker": "0.21.0", - "@bitbybit-dev/occt-worker": "0.21.0", - "jsonpath-plus": "10.1.0", + "@bitbybit-dev/base": "0.21.1", + "@bitbybit-dev/jscad-worker": "0.21.1", + "@bitbybit-dev/manifold-worker": "0.21.1", + "@bitbybit-dev/occt-worker": "0.21.1", + "jsonpath-plus": "10.3.0", "rxjs": "7.5.5", "verb-nurbs-web": "2.1.3" } }, "node_modules/@bitbybit-dev/jscad": { - "version": "0.21.0", - "resolved": "https://registry.npmjs.org/@bitbybit-dev/jscad/-/jscad-0.21.0.tgz", - "integrity": "sha512-Q7eE2ILrJRstW4L1711aJZdpwPf1kuhZJqB+KLkkBLsneRsGsh82lBcCbVYAOMuF/q8Lnd4JHxPiIG/m+LYmPQ==", + "version": "0.21.1", + "resolved": "https://registry.npmjs.org/@bitbybit-dev/jscad/-/jscad-0.21.1.tgz", + "integrity": "sha512-nw8dHGYy3GPXoX0xLZeVsB0Z013mzIy4GoniLKvzN7ApnTruPxSFisxrvFajCcQpL5UbU8SW4k+LhJDI8FTlRg==", "license": "MIT", "dependencies": { - "@bitbybit-dev/base": "0.21.0", + "@bitbybit-dev/base": "0.21.1", "@jscad/3mf-serializer": "2.1.12", "@jscad/dxf-serializer": "2.1.18", "@jscad/io-utils": "2.0.28", @@ -141,51 +141,51 @@ } }, "node_modules/@bitbybit-dev/jscad-worker": { - "version": "0.21.0", - "resolved": "https://registry.npmjs.org/@bitbybit-dev/jscad-worker/-/jscad-worker-0.21.0.tgz", - "integrity": "sha512-nIvd7GH5Gg51u6PmFXOADXVYTIvixTkNf0YapS1uix7D2JS9Mx10Z4wHAeRKzvJxUAAbEPPRFNkakE22HFGtLQ==", + "version": "0.21.1", + "resolved": "https://registry.npmjs.org/@bitbybit-dev/jscad-worker/-/jscad-worker-0.21.1.tgz", + "integrity": "sha512-ccaXGTnKseWGDGEdgf3HfQqBWmM4Q384NQWO2kdzZ4EHaZlSp9tEHY8NHOxyxPoMol+qK9u9puH4ux13zY+FrQ==", "license": "MIT", "dependencies": { - "@bitbybit-dev/jscad": "0.21.0", + "@bitbybit-dev/jscad": "0.21.1", "rxjs": "7.5.5" } }, "node_modules/@bitbybit-dev/manifold": { - "version": "0.21.0", - "resolved": "https://registry.npmjs.org/@bitbybit-dev/manifold/-/manifold-0.21.0.tgz", - "integrity": "sha512-DPpwK9ESB+auDeAbzXcfWRVEzWoMDkpkjc+/uwh+zuSiHSx92PSkzx1/LVTbQCsK+aOfOOy03HQCF5Bu2KQYtw==", + "version": "0.21.1", + "resolved": "https://registry.npmjs.org/@bitbybit-dev/manifold/-/manifold-0.21.1.tgz", + "integrity": "sha512-/UqejYCN9YIyBzf5yQXPdSawoKqEUd1aQAKdmge4LoUaZ19eQyRHLK4WpZQ8K+7lTr7qcNQARr7mLx0FQMBFew==", "license": "MIT", "dependencies": { - "@bitbybit-dev/base": "0.21.0", + "@bitbybit-dev/base": "0.21.1", "manifold-3d": "3.3.2" } }, "node_modules/@bitbybit-dev/manifold-worker": { - "version": "0.21.0", - "resolved": "https://registry.npmjs.org/@bitbybit-dev/manifold-worker/-/manifold-worker-0.21.0.tgz", - "integrity": "sha512-6Cqv3BP+uI8mHKHI6Jx9TzCxRg1/kMHhCe18+B3KD/rTl9B5mnScCKRBnDansR3bH7aYZGnIw9PmiFnWLkQWEQ==", + "version": "0.21.1", + "resolved": "https://registry.npmjs.org/@bitbybit-dev/manifold-worker/-/manifold-worker-0.21.1.tgz", + "integrity": "sha512-A+oV172dZzehkeF5kdCFzQuyyfj9FLixq5nGNviOpJX3zaF+0efl1ung1o45V5pLtZkuGCgCZaQ6lY0zNQcYig==", "license": "MIT", "dependencies": { - "@bitbybit-dev/manifold": "0.21.0", + "@bitbybit-dev/manifold": "0.21.1", "rxjs": "7.5.5" } }, "node_modules/@bitbybit-dev/occt": { - "version": "0.21.0", - "resolved": "https://registry.npmjs.org/@bitbybit-dev/occt/-/occt-0.21.0.tgz", - "integrity": "sha512-vPu3NmF1kBZMOkOdysolGfFxEEnwdHNGORoX3eWbMWT2JL/Tag5Q2CAc5jwa2VvZnS1nE/9x+DVlFQSo8LQnIg==", + "version": "0.21.1", + "resolved": "https://registry.npmjs.org/@bitbybit-dev/occt/-/occt-0.21.1.tgz", + "integrity": "sha512-0+yffQRmph9W1qLSyRBUvaQDiZ9OHA2kD2/LsCgxR3NVtKs3GZaAYYhoUfaRqtt2I8Go99e8WBB5daaQceudjA==", "license": "MIT", "dependencies": { - "@bitbybit-dev/base": "0.21.0" + "@bitbybit-dev/base": "0.21.1" } }, "node_modules/@bitbybit-dev/occt-worker": { - "version": "0.21.0", - "resolved": "https://registry.npmjs.org/@bitbybit-dev/occt-worker/-/occt-worker-0.21.0.tgz", - "integrity": "sha512-xG1sgo6q/RdVA8AgG72wPe4qxcQlrO1V7/Ksn6MqIhZVTsJcm5RbVYlK+nziIWhvlMc1sKE0GNQFcPdALISLuQ==", + "version": "0.21.1", + "resolved": "https://registry.npmjs.org/@bitbybit-dev/occt-worker/-/occt-worker-0.21.1.tgz", + "integrity": "sha512-3BW0lTiY8muPSiCWplAT/VQHaHFVUvljMGD1ynQo7cqv/Zna9ACn+SHOMY2HJ7m1MnZq5d2dGjJJXo8k19iV8Q==", "license": "MIT", "dependencies": { - "@bitbybit-dev/occt": "0.21.0", + "@bitbybit-dev/occt": "0.21.1", "rxjs": "7.5.5" } }, @@ -1934,9 +1934,9 @@ } }, "node_modules/babylonjs-gltf2interface": { - "version": "8.44.1", - "resolved": "https://registry.npmjs.org/babylonjs-gltf2interface/-/babylonjs-gltf2interface-8.44.1.tgz", - "integrity": "sha512-+z0P0wms1FD5xuVpuRJ1qjvGAbPAWhEWGBWENRPD0Hbz6nd9cnL28/pjxgk39/QhlIuJKL9JZ0o8G0JgLHEnRQ==", + "version": "8.45.5", + "resolved": "https://registry.npmjs.org/babylonjs-gltf2interface/-/babylonjs-gltf2interface-8.45.5.tgz", + "integrity": "sha512-o1OMBVdeKCK7b+L1VUW1w1+KIi1DTP7Po+SAJ3vwPqRG6xD2eTL+w5IaFHVue3dVjnlU8Z+9y3BP3AadmK0H9w==", "license": "Apache-2.0", "peer": true }, @@ -4196,14 +4196,14 @@ } }, "node_modules/jsonpath-plus": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/jsonpath-plus/-/jsonpath-plus-10.1.0.tgz", - "integrity": "sha512-gHfV1IYqH8uJHYVTs8BJX1XKy2/rR93+f8QQi0xhx95aCiXn1ettYAd5T+7FU6wfqyDoX/wy0pm/fL3jOKJ9Lg==", + "version": "10.3.0", + "resolved": "https://registry.npmjs.org/jsonpath-plus/-/jsonpath-plus-10.3.0.tgz", + "integrity": "sha512-8TNmfeTCk2Le33A3vRRwtuworG/L5RrgMvdjhKZxvyShO+mBu2fP50OWUjRLNtvw344DdDarFh9buFAZs5ujeA==", "license": "MIT", "dependencies": { - "@jsep-plugin/assignment": "^1.2.1", - "@jsep-plugin/regex": "^1.0.3", - "jsep": "^1.3.9" + "@jsep-plugin/assignment": "^1.3.0", + "@jsep-plugin/regex": "^1.0.4", + "jsep": "^1.4.0" }, "bin": { "jsonpath": "bin/jsonpath-cli.js", @@ -5818,10 +5818,13 @@ } }, "node_modules/sax": { - "version": "1.4.3", - "resolved": "https://registry.npmjs.org/sax/-/sax-1.4.3.tgz", - "integrity": "sha512-yqYn1JhPczigF94DMS+shiDMjDowYO6y9+wB/4WgO0Y19jWYk0lQ4tuG5KI7kj4FTp1wxPj5IFfcrz/s1c3jjQ==", - "license": "BlueOak-1.0.0" + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/sax/-/sax-1.4.4.tgz", + "integrity": "sha512-1n3r/tGXO6b6VXMdFT54SHzT9ytu9yr7TaELowdYpMqY/Ao7EnlQGmAQ1+RatX7Tkkdm6hONI2owqNx2aZj5Sw==", + "license": "BlueOak-1.0.0", + "engines": { + "node": ">=11.0.0" + } }, "node_modules/scheduler": { "version": "0.25.0-rc-69d4b800-20241021", diff --git a/examples/nextjs/babylonjs/simple/package.json b/examples/nextjs/babylonjs/simple/package.json index 0783b369b..60c40354b 100644 --- a/examples/nextjs/babylonjs/simple/package.json +++ b/examples/nextjs/babylonjs/simple/package.json @@ -9,7 +9,7 @@ "lint": "next lint" }, "dependencies": { - "@bitbybit-dev/babylonjs": "0.21.0", + "@bitbybit-dev/babylonjs": "0.21.1", "react": "19.0.0-rc-69d4b800-20241021", "react-dom": "19.0.0-rc-69d4b800-20241021", "next": "15.0.1", diff --git a/examples/node/basic/package-lock.json b/examples/node/basic/package-lock.json index 6f5bf751c..d9657fa5c 100644 --- a/examples/node/basic/package-lock.json +++ b/examples/node/basic/package-lock.json @@ -9,7 +9,7 @@ "version": "1.0.0", "license": "MIT", "dependencies": { - "@bitbybit-dev/occt": "^0.21.0" + "@bitbybit-dev/occt": "^0.21.1" }, "devDependencies": { "concurrently": "^7.6.0", @@ -34,18 +34,18 @@ } }, "node_modules/@bitbybit-dev/base": { - "version": "0.21.0", - "resolved": "https://registry.npmjs.org/@bitbybit-dev/base/-/base-0.21.0.tgz", - "integrity": "sha512-dNfsf2tu3/QUD1mvZzzTze8RwHyK2Jrt+Ary8EDKdNKMw+abtCpQYNerdrg0ZQPxvwu/OOQz6N1xCsCwsPkQJg==", + "version": "0.21.1", + "resolved": "https://registry.npmjs.org/@bitbybit-dev/base/-/base-0.21.1.tgz", + "integrity": "sha512-d3aHPpLHigeNTceMi0U/wOIzCqkvHg8S2gNa4b8VGSTifbn7Fo1XbQ2pzetbcOtwtJhkcLgNYn3nFqW8S2MUpw==", "license": "MIT" }, "node_modules/@bitbybit-dev/occt": { - "version": "0.21.0", - "resolved": "https://registry.npmjs.org/@bitbybit-dev/occt/-/occt-0.21.0.tgz", - "integrity": "sha512-vPu3NmF1kBZMOkOdysolGfFxEEnwdHNGORoX3eWbMWT2JL/Tag5Q2CAc5jwa2VvZnS1nE/9x+DVlFQSo8LQnIg==", + "version": "0.21.1", + "resolved": "https://registry.npmjs.org/@bitbybit-dev/occt/-/occt-0.21.1.tgz", + "integrity": "sha512-0+yffQRmph9W1qLSyRBUvaQDiZ9OHA2kD2/LsCgxR3NVtKs3GZaAYYhoUfaRqtt2I8Go99e8WBB5daaQceudjA==", "license": "MIT", "dependencies": { - "@bitbybit-dev/base": "0.21.0" + "@bitbybit-dev/base": "0.21.1" } }, "node_modules/ansi-regex": { diff --git a/examples/node/basic/package.json b/examples/node/basic/package.json index c5f5dd6ef..9e42551a5 100644 --- a/examples/node/basic/package.json +++ b/examples/node/basic/package.json @@ -15,7 +15,7 @@ "node": ">=20.19.4" }, "dependencies": { - "@bitbybit-dev/occt": "^0.21.0" + "@bitbybit-dev/occt": "^0.21.1" }, "devDependencies": { "extensionless": "1.9.9", diff --git a/examples/node/express-app/package-lock.json b/examples/node/express-app/package-lock.json index d041066df..24c666392 100644 --- a/examples/node/express-app/package-lock.json +++ b/examples/node/express-app/package-lock.json @@ -9,7 +9,7 @@ "version": "1.0.0", "license": "MIT", "dependencies": { - "@bitbybit-dev/core": "0.21.0", + "@bitbybit-dev/core": "0.21.1", "cors": "^2.8.5", "dotenv": "^16.0.3", "express": "^4.18.2", @@ -41,33 +41,33 @@ } }, "node_modules/@bitbybit-dev/base": { - "version": "0.21.0", - "resolved": "https://registry.npmjs.org/@bitbybit-dev/base/-/base-0.21.0.tgz", - "integrity": "sha512-dNfsf2tu3/QUD1mvZzzTze8RwHyK2Jrt+Ary8EDKdNKMw+abtCpQYNerdrg0ZQPxvwu/OOQz6N1xCsCwsPkQJg==", + "version": "0.21.1", + "resolved": "https://registry.npmjs.org/@bitbybit-dev/base/-/base-0.21.1.tgz", + "integrity": "sha512-d3aHPpLHigeNTceMi0U/wOIzCqkvHg8S2gNa4b8VGSTifbn7Fo1XbQ2pzetbcOtwtJhkcLgNYn3nFqW8S2MUpw==", "license": "MIT" }, "node_modules/@bitbybit-dev/core": { - "version": "0.21.0", - "resolved": "https://registry.npmjs.org/@bitbybit-dev/core/-/core-0.21.0.tgz", - "integrity": "sha512-IbeQ8ROreu0/RkkngUE+Eb19ecvqKOWhGefXvIqQmplxt3zEc0FI4Kw8wR3vYl2XMannuVt1xAIYtqqH0tjBzg==", + "version": "0.21.1", + "resolved": "https://registry.npmjs.org/@bitbybit-dev/core/-/core-0.21.1.tgz", + "integrity": "sha512-Zr2w4h1eBRgOHevKevTaDeL1KlOju6Q8uT62zLeKAAAAn5P1RNn2jOVnHEJtd7y4wPn7G2rZwlwtBQlYe5t9AQ==", "license": "MIT", "dependencies": { - "@bitbybit-dev/base": "0.21.0", - "@bitbybit-dev/jscad-worker": "0.21.0", - "@bitbybit-dev/manifold-worker": "0.21.0", - "@bitbybit-dev/occt-worker": "0.21.0", - "jsonpath-plus": "10.1.0", + "@bitbybit-dev/base": "0.21.1", + "@bitbybit-dev/jscad-worker": "0.21.1", + "@bitbybit-dev/manifold-worker": "0.21.1", + "@bitbybit-dev/occt-worker": "0.21.1", + "jsonpath-plus": "10.3.0", "rxjs": "7.5.5", "verb-nurbs-web": "2.1.3" } }, "node_modules/@bitbybit-dev/jscad": { - "version": "0.21.0", - "resolved": "https://registry.npmjs.org/@bitbybit-dev/jscad/-/jscad-0.21.0.tgz", - "integrity": "sha512-Q7eE2ILrJRstW4L1711aJZdpwPf1kuhZJqB+KLkkBLsneRsGsh82lBcCbVYAOMuF/q8Lnd4JHxPiIG/m+LYmPQ==", + "version": "0.21.1", + "resolved": "https://registry.npmjs.org/@bitbybit-dev/jscad/-/jscad-0.21.1.tgz", + "integrity": "sha512-nw8dHGYy3GPXoX0xLZeVsB0Z013mzIy4GoniLKvzN7ApnTruPxSFisxrvFajCcQpL5UbU8SW4k+LhJDI8FTlRg==", "license": "MIT", "dependencies": { - "@bitbybit-dev/base": "0.21.0", + "@bitbybit-dev/base": "0.21.1", "@jscad/3mf-serializer": "2.1.12", "@jscad/dxf-serializer": "2.1.18", "@jscad/io-utils": "2.0.28", @@ -76,51 +76,51 @@ } }, "node_modules/@bitbybit-dev/jscad-worker": { - "version": "0.21.0", - "resolved": "https://registry.npmjs.org/@bitbybit-dev/jscad-worker/-/jscad-worker-0.21.0.tgz", - "integrity": "sha512-nIvd7GH5Gg51u6PmFXOADXVYTIvixTkNf0YapS1uix7D2JS9Mx10Z4wHAeRKzvJxUAAbEPPRFNkakE22HFGtLQ==", + "version": "0.21.1", + "resolved": "https://registry.npmjs.org/@bitbybit-dev/jscad-worker/-/jscad-worker-0.21.1.tgz", + "integrity": "sha512-ccaXGTnKseWGDGEdgf3HfQqBWmM4Q384NQWO2kdzZ4EHaZlSp9tEHY8NHOxyxPoMol+qK9u9puH4ux13zY+FrQ==", "license": "MIT", "dependencies": { - "@bitbybit-dev/jscad": "0.21.0", + "@bitbybit-dev/jscad": "0.21.1", "rxjs": "7.5.5" } }, "node_modules/@bitbybit-dev/manifold": { - "version": "0.21.0", - "resolved": "https://registry.npmjs.org/@bitbybit-dev/manifold/-/manifold-0.21.0.tgz", - "integrity": "sha512-DPpwK9ESB+auDeAbzXcfWRVEzWoMDkpkjc+/uwh+zuSiHSx92PSkzx1/LVTbQCsK+aOfOOy03HQCF5Bu2KQYtw==", + "version": "0.21.1", + "resolved": "https://registry.npmjs.org/@bitbybit-dev/manifold/-/manifold-0.21.1.tgz", + "integrity": "sha512-/UqejYCN9YIyBzf5yQXPdSawoKqEUd1aQAKdmge4LoUaZ19eQyRHLK4WpZQ8K+7lTr7qcNQARr7mLx0FQMBFew==", "license": "MIT", "dependencies": { - "@bitbybit-dev/base": "0.21.0", + "@bitbybit-dev/base": "0.21.1", "manifold-3d": "3.3.2" } }, "node_modules/@bitbybit-dev/manifold-worker": { - "version": "0.21.0", - "resolved": "https://registry.npmjs.org/@bitbybit-dev/manifold-worker/-/manifold-worker-0.21.0.tgz", - "integrity": "sha512-6Cqv3BP+uI8mHKHI6Jx9TzCxRg1/kMHhCe18+B3KD/rTl9B5mnScCKRBnDansR3bH7aYZGnIw9PmiFnWLkQWEQ==", + "version": "0.21.1", + "resolved": "https://registry.npmjs.org/@bitbybit-dev/manifold-worker/-/manifold-worker-0.21.1.tgz", + "integrity": "sha512-A+oV172dZzehkeF5kdCFzQuyyfj9FLixq5nGNviOpJX3zaF+0efl1ung1o45V5pLtZkuGCgCZaQ6lY0zNQcYig==", "license": "MIT", "dependencies": { - "@bitbybit-dev/manifold": "0.21.0", + "@bitbybit-dev/manifold": "0.21.1", "rxjs": "7.5.5" } }, "node_modules/@bitbybit-dev/occt": { - "version": "0.21.0", - "resolved": "https://registry.npmjs.org/@bitbybit-dev/occt/-/occt-0.21.0.tgz", - "integrity": "sha512-vPu3NmF1kBZMOkOdysolGfFxEEnwdHNGORoX3eWbMWT2JL/Tag5Q2CAc5jwa2VvZnS1nE/9x+DVlFQSo8LQnIg==", + "version": "0.21.1", + "resolved": "https://registry.npmjs.org/@bitbybit-dev/occt/-/occt-0.21.1.tgz", + "integrity": "sha512-0+yffQRmph9W1qLSyRBUvaQDiZ9OHA2kD2/LsCgxR3NVtKs3GZaAYYhoUfaRqtt2I8Go99e8WBB5daaQceudjA==", "license": "MIT", "dependencies": { - "@bitbybit-dev/base": "0.21.0" + "@bitbybit-dev/base": "0.21.1" } }, "node_modules/@bitbybit-dev/occt-worker": { - "version": "0.21.0", - "resolved": "https://registry.npmjs.org/@bitbybit-dev/occt-worker/-/occt-worker-0.21.0.tgz", - "integrity": "sha512-xG1sgo6q/RdVA8AgG72wPe4qxcQlrO1V7/Ksn6MqIhZVTsJcm5RbVYlK+nziIWhvlMc1sKE0GNQFcPdALISLuQ==", + "version": "0.21.1", + "resolved": "https://registry.npmjs.org/@bitbybit-dev/occt-worker/-/occt-worker-0.21.1.tgz", + "integrity": "sha512-3BW0lTiY8muPSiCWplAT/VQHaHFVUvljMGD1ynQo7cqv/Zna9ACn+SHOMY2HJ7m1MnZq5d2dGjJJXo8k19iV8Q==", "license": "MIT", "dependencies": { - "@bitbybit-dev/occt": "0.21.0", + "@bitbybit-dev/occt": "0.21.1", "rxjs": "7.5.5" } }, @@ -726,6 +726,7 @@ "version": "1.3.0", "resolved": "https://registry.npmjs.org/@jsep-plugin/assignment/-/assignment-1.3.0.tgz", "integrity": "sha512-VVgV+CXrhbMI3aSusQyclHkenWSAm95WaiKrMxRFam3JSUiIaQjoMIw2sEs/OX4XifnqeQUN4DYbJjlA8EfktQ==", + "license": "MIT", "engines": { "node": ">= 10.16.0" }, @@ -737,6 +738,7 @@ "version": "1.0.4", "resolved": "https://registry.npmjs.org/@jsep-plugin/regex/-/regex-1.0.4.tgz", "integrity": "sha512-q7qL4Mgjs1vByCaTnDFcBnV9HS7GVPJX5vyVoCgZHNSC9rjwIlmbXG5sUuorR5ndfHAIlJ8pVStxvjXHbNvtUg==", + "license": "MIT", "engines": { "node": ">= 10.16.0" }, @@ -1704,18 +1706,20 @@ "version": "1.4.0", "resolved": "https://registry.npmjs.org/jsep/-/jsep-1.4.0.tgz", "integrity": "sha512-B7qPcEVE3NVkmSJbaYxvv4cHkVW7DQsZz13pUMrfS8z8Q/BuShN+gcTXrUlPiGqM2/t/EEaI030bpxMqY8gMlw==", + "license": "MIT", "engines": { "node": ">= 10.16.0" } }, "node_modules/jsonpath-plus": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/jsonpath-plus/-/jsonpath-plus-10.1.0.tgz", - "integrity": "sha512-gHfV1IYqH8uJHYVTs8BJX1XKy2/rR93+f8QQi0xhx95aCiXn1ettYAd5T+7FU6wfqyDoX/wy0pm/fL3jOKJ9Lg==", + "version": "10.3.0", + "resolved": "https://registry.npmjs.org/jsonpath-plus/-/jsonpath-plus-10.3.0.tgz", + "integrity": "sha512-8TNmfeTCk2Le33A3vRRwtuworG/L5RrgMvdjhKZxvyShO+mBu2fP50OWUjRLNtvw344DdDarFh9buFAZs5ujeA==", + "license": "MIT", "dependencies": { - "@jsep-plugin/assignment": "^1.2.1", - "@jsep-plugin/regex": "^1.0.3", - "jsep": "^1.3.9" + "@jsep-plugin/assignment": "^1.3.0", + "@jsep-plugin/regex": "^1.0.4", + "jsep": "^1.4.0" }, "bin": { "jsonpath": "bin/jsonpath-cli.js", @@ -2171,10 +2175,13 @@ "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" }, "node_modules/sax": { - "version": "1.4.3", - "resolved": "https://registry.npmjs.org/sax/-/sax-1.4.3.tgz", - "integrity": "sha512-yqYn1JhPczigF94DMS+shiDMjDowYO6y9+wB/4WgO0Y19jWYk0lQ4tuG5KI7kj4FTp1wxPj5IFfcrz/s1c3jjQ==", - "license": "BlueOak-1.0.0" + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/sax/-/sax-1.4.4.tgz", + "integrity": "sha512-1n3r/tGXO6b6VXMdFT54SHzT9ytu9yr7TaELowdYpMqY/Ao7EnlQGmAQ1+RatX7Tkkdm6hONI2owqNx2aZj5Sw==", + "license": "BlueOak-1.0.0", + "engines": { + "node": ">=11.0.0" + } }, "node_modules/semver": { "version": "5.7.2", @@ -2633,30 +2640,30 @@ } }, "@bitbybit-dev/base": { - "version": "0.21.0", - "resolved": "https://registry.npmjs.org/@bitbybit-dev/base/-/base-0.21.0.tgz", - "integrity": "sha512-dNfsf2tu3/QUD1mvZzzTze8RwHyK2Jrt+Ary8EDKdNKMw+abtCpQYNerdrg0ZQPxvwu/OOQz6N1xCsCwsPkQJg==" + "version": "0.21.1", + "resolved": "https://registry.npmjs.org/@bitbybit-dev/base/-/base-0.21.1.tgz", + "integrity": "sha512-d3aHPpLHigeNTceMi0U/wOIzCqkvHg8S2gNa4b8VGSTifbn7Fo1XbQ2pzetbcOtwtJhkcLgNYn3nFqW8S2MUpw==" }, "@bitbybit-dev/core": { - "version": "0.21.0", - "resolved": "https://registry.npmjs.org/@bitbybit-dev/core/-/core-0.21.0.tgz", - "integrity": "sha512-IbeQ8ROreu0/RkkngUE+Eb19ecvqKOWhGefXvIqQmplxt3zEc0FI4Kw8wR3vYl2XMannuVt1xAIYtqqH0tjBzg==", + "version": "0.21.1", + "resolved": "https://registry.npmjs.org/@bitbybit-dev/core/-/core-0.21.1.tgz", + "integrity": "sha512-Zr2w4h1eBRgOHevKevTaDeL1KlOju6Q8uT62zLeKAAAAn5P1RNn2jOVnHEJtd7y4wPn7G2rZwlwtBQlYe5t9AQ==", "requires": { - "@bitbybit-dev/base": "0.21.0", - "@bitbybit-dev/jscad-worker": "0.21.0", - "@bitbybit-dev/manifold-worker": "0.21.0", - "@bitbybit-dev/occt-worker": "0.21.0", - "jsonpath-plus": "10.1.0", + "@bitbybit-dev/base": "0.21.1", + "@bitbybit-dev/jscad-worker": "0.21.1", + "@bitbybit-dev/manifold-worker": "0.21.1", + "@bitbybit-dev/occt-worker": "0.21.1", + "jsonpath-plus": "10.3.0", "rxjs": "7.5.5", "verb-nurbs-web": "2.1.3" } }, "@bitbybit-dev/jscad": { - "version": "0.21.0", - "resolved": "https://registry.npmjs.org/@bitbybit-dev/jscad/-/jscad-0.21.0.tgz", - "integrity": "sha512-Q7eE2ILrJRstW4L1711aJZdpwPf1kuhZJqB+KLkkBLsneRsGsh82lBcCbVYAOMuF/q8Lnd4JHxPiIG/m+LYmPQ==", + "version": "0.21.1", + "resolved": "https://registry.npmjs.org/@bitbybit-dev/jscad/-/jscad-0.21.1.tgz", + "integrity": "sha512-nw8dHGYy3GPXoX0xLZeVsB0Z013mzIy4GoniLKvzN7ApnTruPxSFisxrvFajCcQpL5UbU8SW4k+LhJDI8FTlRg==", "requires": { - "@bitbybit-dev/base": "0.21.0", + "@bitbybit-dev/base": "0.21.1", "@jscad/3mf-serializer": "2.1.12", "@jscad/dxf-serializer": "2.1.18", "@jscad/io-utils": "2.0.28", @@ -2665,46 +2672,46 @@ } }, "@bitbybit-dev/jscad-worker": { - "version": "0.21.0", - "resolved": "https://registry.npmjs.org/@bitbybit-dev/jscad-worker/-/jscad-worker-0.21.0.tgz", - "integrity": "sha512-nIvd7GH5Gg51u6PmFXOADXVYTIvixTkNf0YapS1uix7D2JS9Mx10Z4wHAeRKzvJxUAAbEPPRFNkakE22HFGtLQ==", + "version": "0.21.1", + "resolved": "https://registry.npmjs.org/@bitbybit-dev/jscad-worker/-/jscad-worker-0.21.1.tgz", + "integrity": "sha512-ccaXGTnKseWGDGEdgf3HfQqBWmM4Q384NQWO2kdzZ4EHaZlSp9tEHY8NHOxyxPoMol+qK9u9puH4ux13zY+FrQ==", "requires": { - "@bitbybit-dev/jscad": "0.21.0", + "@bitbybit-dev/jscad": "0.21.1", "rxjs": "7.5.5" } }, "@bitbybit-dev/manifold": { - "version": "0.21.0", - "resolved": "https://registry.npmjs.org/@bitbybit-dev/manifold/-/manifold-0.21.0.tgz", - "integrity": "sha512-DPpwK9ESB+auDeAbzXcfWRVEzWoMDkpkjc+/uwh+zuSiHSx92PSkzx1/LVTbQCsK+aOfOOy03HQCF5Bu2KQYtw==", + "version": "0.21.1", + "resolved": "https://registry.npmjs.org/@bitbybit-dev/manifold/-/manifold-0.21.1.tgz", + "integrity": "sha512-/UqejYCN9YIyBzf5yQXPdSawoKqEUd1aQAKdmge4LoUaZ19eQyRHLK4WpZQ8K+7lTr7qcNQARr7mLx0FQMBFew==", "requires": { - "@bitbybit-dev/base": "0.21.0", + "@bitbybit-dev/base": "0.21.1", "manifold-3d": "3.3.2" } }, "@bitbybit-dev/manifold-worker": { - "version": "0.21.0", - "resolved": "https://registry.npmjs.org/@bitbybit-dev/manifold-worker/-/manifold-worker-0.21.0.tgz", - "integrity": "sha512-6Cqv3BP+uI8mHKHI6Jx9TzCxRg1/kMHhCe18+B3KD/rTl9B5mnScCKRBnDansR3bH7aYZGnIw9PmiFnWLkQWEQ==", + "version": "0.21.1", + "resolved": "https://registry.npmjs.org/@bitbybit-dev/manifold-worker/-/manifold-worker-0.21.1.tgz", + "integrity": "sha512-A+oV172dZzehkeF5kdCFzQuyyfj9FLixq5nGNviOpJX3zaF+0efl1ung1o45V5pLtZkuGCgCZaQ6lY0zNQcYig==", "requires": { - "@bitbybit-dev/manifold": "0.21.0", + "@bitbybit-dev/manifold": "0.21.1", "rxjs": "7.5.5" } }, "@bitbybit-dev/occt": { - "version": "0.21.0", - "resolved": "https://registry.npmjs.org/@bitbybit-dev/occt/-/occt-0.21.0.tgz", - "integrity": "sha512-vPu3NmF1kBZMOkOdysolGfFxEEnwdHNGORoX3eWbMWT2JL/Tag5Q2CAc5jwa2VvZnS1nE/9x+DVlFQSo8LQnIg==", + "version": "0.21.1", + "resolved": "https://registry.npmjs.org/@bitbybit-dev/occt/-/occt-0.21.1.tgz", + "integrity": "sha512-0+yffQRmph9W1qLSyRBUvaQDiZ9OHA2kD2/LsCgxR3NVtKs3GZaAYYhoUfaRqtt2I8Go99e8WBB5daaQceudjA==", "requires": { - "@bitbybit-dev/base": "0.21.0" + "@bitbybit-dev/base": "0.21.1" } }, "@bitbybit-dev/occt-worker": { - "version": "0.21.0", - "resolved": "https://registry.npmjs.org/@bitbybit-dev/occt-worker/-/occt-worker-0.21.0.tgz", - "integrity": "sha512-xG1sgo6q/RdVA8AgG72wPe4qxcQlrO1V7/Ksn6MqIhZVTsJcm5RbVYlK+nziIWhvlMc1sKE0GNQFcPdALISLuQ==", + "version": "0.21.1", + "resolved": "https://registry.npmjs.org/@bitbybit-dev/occt-worker/-/occt-worker-0.21.1.tgz", + "integrity": "sha512-3BW0lTiY8muPSiCWplAT/VQHaHFVUvljMGD1ynQo7cqv/Zna9ACn+SHOMY2HJ7m1MnZq5d2dGjJJXo8k19iV8Q==", "requires": { - "@bitbybit-dev/occt": "0.21.0", + "@bitbybit-dev/occt": "0.21.1", "rxjs": "7.5.5" } }, @@ -3733,13 +3740,13 @@ "integrity": "sha512-B7qPcEVE3NVkmSJbaYxvv4cHkVW7DQsZz13pUMrfS8z8Q/BuShN+gcTXrUlPiGqM2/t/EEaI030bpxMqY8gMlw==" }, "jsonpath-plus": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/jsonpath-plus/-/jsonpath-plus-10.1.0.tgz", - "integrity": "sha512-gHfV1IYqH8uJHYVTs8BJX1XKy2/rR93+f8QQi0xhx95aCiXn1ettYAd5T+7FU6wfqyDoX/wy0pm/fL3jOKJ9Lg==", + "version": "10.3.0", + "resolved": "https://registry.npmjs.org/jsonpath-plus/-/jsonpath-plus-10.3.0.tgz", + "integrity": "sha512-8TNmfeTCk2Le33A3vRRwtuworG/L5RrgMvdjhKZxvyShO+mBu2fP50OWUjRLNtvw344DdDarFh9buFAZs5ujeA==", "requires": { - "@jsep-plugin/assignment": "^1.2.1", - "@jsep-plugin/regex": "^1.0.3", - "jsep": "^1.3.9" + "@jsep-plugin/assignment": "^1.3.0", + "@jsep-plugin/regex": "^1.0.4", + "jsep": "^1.4.0" } }, "ktx-parse": { @@ -4072,9 +4079,9 @@ "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" }, "sax": { - "version": "1.4.3", - "resolved": "https://registry.npmjs.org/sax/-/sax-1.4.3.tgz", - "integrity": "sha512-yqYn1JhPczigF94DMS+shiDMjDowYO6y9+wB/4WgO0Y19jWYk0lQ4tuG5KI7kj4FTp1wxPj5IFfcrz/s1c3jjQ==" + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/sax/-/sax-1.4.4.tgz", + "integrity": "sha512-1n3r/tGXO6b6VXMdFT54SHzT9ytu9yr7TaELowdYpMqY/Ao7EnlQGmAQ1+RatX7Tkkdm6hONI2owqNx2aZj5Sw==" }, "semver": { "version": "5.7.2", diff --git a/examples/node/express-app/package.json b/examples/node/express-app/package.json index fc99a1d2f..f3cad1bf5 100644 --- a/examples/node/express-app/package.json +++ b/examples/node/express-app/package.json @@ -11,7 +11,7 @@ "author": "Bit By Bit Developers", "license": "MIT", "dependencies": { - "@bitbybit-dev/core": "0.21.0", + "@bitbybit-dev/core": "0.21.1", "cors": "^2.8.5", "dotenv": "^16.0.3", "express": "^4.18.2", diff --git a/examples/nuxt/babylonjs/basic/package-lock.json b/examples/nuxt/babylonjs/basic/package-lock.json index cb4a0b5c9..db6ae3a77 100644 --- a/examples/nuxt/babylonjs/basic/package-lock.json +++ b/examples/nuxt/babylonjs/basic/package-lock.json @@ -8,7 +8,7 @@ "hasInstallScript": true, "license": "MIT", "dependencies": { - "@bitbybit-dev/babylonjs": "0.21.0", + "@bitbybit-dev/babylonjs": "0.21.1", "@pinia/nuxt": "^0.5.4", "nuxt": "^3.13.0", "pinia": "^2.2.2", @@ -486,15 +486,15 @@ } }, "node_modules/@babylonjs/core": { - "version": "8.44.1", - "resolved": "https://registry.npmjs.org/@babylonjs/core/-/core-8.44.1.tgz", - "integrity": "sha512-sF2WWK2d7lg18ESOCxUoRG4d1SzCWz42asjRjRGxZ8r3D7w9ZM3H2wftJIqwaZvD3zWr+wmCVKpQ6hWkboHIXw==", + "version": "8.45.4", + "resolved": "https://registry.npmjs.org/@babylonjs/core/-/core-8.45.4.tgz", + "integrity": "sha512-fmpaitVpe+bB3PCLY0RKYO/e5n1vLNvueJrglt6SENVE/frZNS4har8odAd1UDNf5KFgOdb8YK91jK4BUwIgcQ==", "license": "Apache-2.0" }, "node_modules/@babylonjs/gui": { - "version": "8.44.1", - "resolved": "https://registry.npmjs.org/@babylonjs/gui/-/gui-8.44.1.tgz", - "integrity": "sha512-6STDK+Hr8GpY29YMLKnTVhEnWw1NKPrIpz+MqgWuoAAmmpiFtNCr0nnAnCj5fhgGf25L89jy51ogXyg3jfiuDA==", + "version": "8.45.4", + "resolved": "https://registry.npmjs.org/@babylonjs/gui/-/gui-8.45.4.tgz", + "integrity": "sha512-1pMjQs7fgSEvUQoXyit96kNRqzX74oMNkMkAOmz7NjOkBX3tacAfNfoEC6aw+AB+iAjlCO5/DXatZU5m6EYyIQ==", "license": "Apache-2.0", "peerDependencies": { "@babylonjs/core": "^8.0.0" @@ -509,9 +509,9 @@ } }, "node_modules/@babylonjs/loaders": { - "version": "8.44.1", - "resolved": "https://registry.npmjs.org/@babylonjs/loaders/-/loaders-8.44.1.tgz", - "integrity": "sha512-h5rUGCwhdWv3Hq48DP8sy4/+3QUYjOprxu2i6zXKb69LHMnYE0tZ1xQHBJEOUF60hxA+TwhzdjC8bxInKoeojA==", + "version": "8.45.4", + "resolved": "https://registry.npmjs.org/@babylonjs/loaders/-/loaders-8.45.4.tgz", + "integrity": "sha512-P1H8XpIJK7NnrtGGSGkCJZIPBvtJ+0+l7yGXDY2UaNFKU80y2Oty8DZ8JRKdbJdSc4cOe8ucBY5w7x+Bbllxuw==", "license": "Apache-2.0", "peerDependencies": { "@babylonjs/core": "^8.0.0", @@ -519,18 +519,18 @@ } }, "node_modules/@babylonjs/materials": { - "version": "8.44.1", - "resolved": "https://registry.npmjs.org/@babylonjs/materials/-/materials-8.44.1.tgz", - "integrity": "sha512-FD0S/aA68oEjKCSNY5ydGkiHbsyo08KlhQ+6R8swtJhx5aq7ojWBt3P9KC78+wjZiCJW37176CIObcV8QcjMAQ==", + "version": "8.45.4", + "resolved": "https://registry.npmjs.org/@babylonjs/materials/-/materials-8.45.4.tgz", + "integrity": "sha512-ElTXhC83alnMFFyv2sPG/Im5UwTZoDzd1R8otPQwbEEERcRK8A71Hu1gFdBu/8l9O752IWnZcPSEj1WwLqeR5A==", "license": "Apache-2.0", "peerDependencies": { "@babylonjs/core": "^8.6.0" } }, "node_modules/@babylonjs/serializers": { - "version": "8.44.1", - "resolved": "https://registry.npmjs.org/@babylonjs/serializers/-/serializers-8.44.1.tgz", - "integrity": "sha512-3FRRdKpHr2qTkALHEvq0ih0P59iTINUFrGZWFUfO3Wu24UBSuTxY9Kq820dvUUWaRtWkXEnMSQbR+5glzcfqBw==", + "version": "8.45.4", + "resolved": "https://registry.npmjs.org/@babylonjs/serializers/-/serializers-8.45.4.tgz", + "integrity": "sha512-i83RQIP3XSi3DFJwhc/+JNNPm49DdtNyDobuyBBwIDyMpQdbcFLhkL0DW/7/H+vFUWz0xWx+mgmsb6HY/ePGmg==", "license": "Apache-2.0", "peerDependencies": { "@babylonjs/core": "^8.0.0", @@ -538,49 +538,49 @@ } }, "node_modules/@bitbybit-dev/babylonjs": { - "version": "0.21.0", - "resolved": "https://registry.npmjs.org/@bitbybit-dev/babylonjs/-/babylonjs-0.21.0.tgz", - "integrity": "sha512-8aPJ+XTXzcnO4bXfmW34lTnVCzC6Hy6TMkh7/ziQSoUsjPp7e7LFHoBBfqCk09LdTLa85gb5x/f6WNAn306Odg==", + "version": "0.21.1", + "resolved": "https://registry.npmjs.org/@bitbybit-dev/babylonjs/-/babylonjs-0.21.1.tgz", + "integrity": "sha512-OyQI5FC4qI5EYW/RFZt/6WR2We2bEpbhM8I8ptiJkviY0e1yIjiV11A4aF8B6fpjS5Bd7Rb30LrUdWNHbAo1Nw==", "license": "MIT", "dependencies": { - "@babylonjs/core": "8.44.1", - "@babylonjs/gui": "8.44.1", + "@babylonjs/core": "8.45.4", + "@babylonjs/gui": "8.45.4", "@babylonjs/havok": "1.3.10", - "@babylonjs/loaders": "8.44.1", - "@babylonjs/materials": "8.44.1", - "@babylonjs/serializers": "8.44.1", - "@bitbybit-dev/core": "0.21.0", + "@babylonjs/loaders": "8.45.4", + "@babylonjs/materials": "8.45.4", + "@babylonjs/serializers": "8.45.4", + "@bitbybit-dev/core": "0.21.1", "earcut": "2.2.3" } }, "node_modules/@bitbybit-dev/base": { - "version": "0.21.0", - "resolved": "https://registry.npmjs.org/@bitbybit-dev/base/-/base-0.21.0.tgz", - "integrity": "sha512-dNfsf2tu3/QUD1mvZzzTze8RwHyK2Jrt+Ary8EDKdNKMw+abtCpQYNerdrg0ZQPxvwu/OOQz6N1xCsCwsPkQJg==", + "version": "0.21.1", + "resolved": "https://registry.npmjs.org/@bitbybit-dev/base/-/base-0.21.1.tgz", + "integrity": "sha512-d3aHPpLHigeNTceMi0U/wOIzCqkvHg8S2gNa4b8VGSTifbn7Fo1XbQ2pzetbcOtwtJhkcLgNYn3nFqW8S2MUpw==", "license": "MIT" }, "node_modules/@bitbybit-dev/core": { - "version": "0.21.0", - "resolved": "https://registry.npmjs.org/@bitbybit-dev/core/-/core-0.21.0.tgz", - "integrity": "sha512-IbeQ8ROreu0/RkkngUE+Eb19ecvqKOWhGefXvIqQmplxt3zEc0FI4Kw8wR3vYl2XMannuVt1xAIYtqqH0tjBzg==", + "version": "0.21.1", + "resolved": "https://registry.npmjs.org/@bitbybit-dev/core/-/core-0.21.1.tgz", + "integrity": "sha512-Zr2w4h1eBRgOHevKevTaDeL1KlOju6Q8uT62zLeKAAAAn5P1RNn2jOVnHEJtd7y4wPn7G2rZwlwtBQlYe5t9AQ==", "license": "MIT", "dependencies": { - "@bitbybit-dev/base": "0.21.0", - "@bitbybit-dev/jscad-worker": "0.21.0", - "@bitbybit-dev/manifold-worker": "0.21.0", - "@bitbybit-dev/occt-worker": "0.21.0", - "jsonpath-plus": "10.1.0", + "@bitbybit-dev/base": "0.21.1", + "@bitbybit-dev/jscad-worker": "0.21.1", + "@bitbybit-dev/manifold-worker": "0.21.1", + "@bitbybit-dev/occt-worker": "0.21.1", + "jsonpath-plus": "10.3.0", "rxjs": "7.5.5", "verb-nurbs-web": "2.1.3" } }, "node_modules/@bitbybit-dev/jscad": { - "version": "0.21.0", - "resolved": "https://registry.npmjs.org/@bitbybit-dev/jscad/-/jscad-0.21.0.tgz", - "integrity": "sha512-Q7eE2ILrJRstW4L1711aJZdpwPf1kuhZJqB+KLkkBLsneRsGsh82lBcCbVYAOMuF/q8Lnd4JHxPiIG/m+LYmPQ==", + "version": "0.21.1", + "resolved": "https://registry.npmjs.org/@bitbybit-dev/jscad/-/jscad-0.21.1.tgz", + "integrity": "sha512-nw8dHGYy3GPXoX0xLZeVsB0Z013mzIy4GoniLKvzN7ApnTruPxSFisxrvFajCcQpL5UbU8SW4k+LhJDI8FTlRg==", "license": "MIT", "dependencies": { - "@bitbybit-dev/base": "0.21.0", + "@bitbybit-dev/base": "0.21.1", "@jscad/3mf-serializer": "2.1.12", "@jscad/dxf-serializer": "2.1.18", "@jscad/io-utils": "2.0.28", @@ -589,51 +589,51 @@ } }, "node_modules/@bitbybit-dev/jscad-worker": { - "version": "0.21.0", - "resolved": "https://registry.npmjs.org/@bitbybit-dev/jscad-worker/-/jscad-worker-0.21.0.tgz", - "integrity": "sha512-nIvd7GH5Gg51u6PmFXOADXVYTIvixTkNf0YapS1uix7D2JS9Mx10Z4wHAeRKzvJxUAAbEPPRFNkakE22HFGtLQ==", + "version": "0.21.1", + "resolved": "https://registry.npmjs.org/@bitbybit-dev/jscad-worker/-/jscad-worker-0.21.1.tgz", + "integrity": "sha512-ccaXGTnKseWGDGEdgf3HfQqBWmM4Q384NQWO2kdzZ4EHaZlSp9tEHY8NHOxyxPoMol+qK9u9puH4ux13zY+FrQ==", "license": "MIT", "dependencies": { - "@bitbybit-dev/jscad": "0.21.0", + "@bitbybit-dev/jscad": "0.21.1", "rxjs": "7.5.5" } }, "node_modules/@bitbybit-dev/manifold": { - "version": "0.21.0", - "resolved": "https://registry.npmjs.org/@bitbybit-dev/manifold/-/manifold-0.21.0.tgz", - "integrity": "sha512-DPpwK9ESB+auDeAbzXcfWRVEzWoMDkpkjc+/uwh+zuSiHSx92PSkzx1/LVTbQCsK+aOfOOy03HQCF5Bu2KQYtw==", + "version": "0.21.1", + "resolved": "https://registry.npmjs.org/@bitbybit-dev/manifold/-/manifold-0.21.1.tgz", + "integrity": "sha512-/UqejYCN9YIyBzf5yQXPdSawoKqEUd1aQAKdmge4LoUaZ19eQyRHLK4WpZQ8K+7lTr7qcNQARr7mLx0FQMBFew==", "license": "MIT", "dependencies": { - "@bitbybit-dev/base": "0.21.0", + "@bitbybit-dev/base": "0.21.1", "manifold-3d": "3.3.2" } }, "node_modules/@bitbybit-dev/manifold-worker": { - "version": "0.21.0", - "resolved": "https://registry.npmjs.org/@bitbybit-dev/manifold-worker/-/manifold-worker-0.21.0.tgz", - "integrity": "sha512-6Cqv3BP+uI8mHKHI6Jx9TzCxRg1/kMHhCe18+B3KD/rTl9B5mnScCKRBnDansR3bH7aYZGnIw9PmiFnWLkQWEQ==", + "version": "0.21.1", + "resolved": "https://registry.npmjs.org/@bitbybit-dev/manifold-worker/-/manifold-worker-0.21.1.tgz", + "integrity": "sha512-A+oV172dZzehkeF5kdCFzQuyyfj9FLixq5nGNviOpJX3zaF+0efl1ung1o45V5pLtZkuGCgCZaQ6lY0zNQcYig==", "license": "MIT", "dependencies": { - "@bitbybit-dev/manifold": "0.21.0", + "@bitbybit-dev/manifold": "0.21.1", "rxjs": "7.5.5" } }, "node_modules/@bitbybit-dev/occt": { - "version": "0.21.0", - "resolved": "https://registry.npmjs.org/@bitbybit-dev/occt/-/occt-0.21.0.tgz", - "integrity": "sha512-vPu3NmF1kBZMOkOdysolGfFxEEnwdHNGORoX3eWbMWT2JL/Tag5Q2CAc5jwa2VvZnS1nE/9x+DVlFQSo8LQnIg==", + "version": "0.21.1", + "resolved": "https://registry.npmjs.org/@bitbybit-dev/occt/-/occt-0.21.1.tgz", + "integrity": "sha512-0+yffQRmph9W1qLSyRBUvaQDiZ9OHA2kD2/LsCgxR3NVtKs3GZaAYYhoUfaRqtt2I8Go99e8WBB5daaQceudjA==", "license": "MIT", "dependencies": { - "@bitbybit-dev/base": "0.21.0" + "@bitbybit-dev/base": "0.21.1" } }, "node_modules/@bitbybit-dev/occt-worker": { - "version": "0.21.0", - "resolved": "https://registry.npmjs.org/@bitbybit-dev/occt-worker/-/occt-worker-0.21.0.tgz", - "integrity": "sha512-xG1sgo6q/RdVA8AgG72wPe4qxcQlrO1V7/Ksn6MqIhZVTsJcm5RbVYlK+nziIWhvlMc1sKE0GNQFcPdALISLuQ==", + "version": "0.21.1", + "resolved": "https://registry.npmjs.org/@bitbybit-dev/occt-worker/-/occt-worker-0.21.1.tgz", + "integrity": "sha512-3BW0lTiY8muPSiCWplAT/VQHaHFVUvljMGD1ynQo7cqv/Zna9ACn+SHOMY2HJ7m1MnZq5d2dGjJJXo8k19iV8Q==", "license": "MIT", "dependencies": { - "@bitbybit-dev/occt": "0.21.0", + "@bitbybit-dev/occt": "0.21.1", "rxjs": "7.5.5" } }, @@ -3559,9 +3559,9 @@ "integrity": "sha512-5Tk1HLk6b6ctmjIkAcU/Ujv/1WqiDl0F0JdRCR80VsOcUlHcu7pWeWRlOqQLHfDEsVx9YH/aif5AG4ehoCtTmg==" }, "node_modules/babylonjs-gltf2interface": { - "version": "8.44.1", - "resolved": "https://registry.npmjs.org/babylonjs-gltf2interface/-/babylonjs-gltf2interface-8.44.1.tgz", - "integrity": "sha512-+z0P0wms1FD5xuVpuRJ1qjvGAbPAWhEWGBWENRPD0Hbz6nd9cnL28/pjxgk39/QhlIuJKL9JZ0o8G0JgLHEnRQ==", + "version": "8.45.5", + "resolved": "https://registry.npmjs.org/babylonjs-gltf2interface/-/babylonjs-gltf2interface-8.45.5.tgz", + "integrity": "sha512-o1OMBVdeKCK7b+L1VUW1w1+KIi1DTP7Po+SAJ3vwPqRG6xD2eTL+w5IaFHVue3dVjnlU8Z+9y3BP3AadmK0H9w==", "license": "Apache-2.0", "peer": true }, @@ -5698,14 +5698,14 @@ } }, "node_modules/jsonpath-plus": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/jsonpath-plus/-/jsonpath-plus-10.1.0.tgz", - "integrity": "sha512-gHfV1IYqH8uJHYVTs8BJX1XKy2/rR93+f8QQi0xhx95aCiXn1ettYAd5T+7FU6wfqyDoX/wy0pm/fL3jOKJ9Lg==", + "version": "10.3.0", + "resolved": "https://registry.npmjs.org/jsonpath-plus/-/jsonpath-plus-10.3.0.tgz", + "integrity": "sha512-8TNmfeTCk2Le33A3vRRwtuworG/L5RrgMvdjhKZxvyShO+mBu2fP50OWUjRLNtvw344DdDarFh9buFAZs5ujeA==", "license": "MIT", "dependencies": { - "@jsep-plugin/assignment": "^1.2.1", - "@jsep-plugin/regex": "^1.0.3", - "jsep": "^1.3.9" + "@jsep-plugin/assignment": "^1.3.0", + "@jsep-plugin/regex": "^1.0.4", + "jsep": "^1.4.0" }, "bin": { "jsonpath": "bin/jsonpath-cli.js", @@ -8163,10 +8163,13 @@ ] }, "node_modules/sax": { - "version": "1.4.3", - "resolved": "https://registry.npmjs.org/sax/-/sax-1.4.3.tgz", - "integrity": "sha512-yqYn1JhPczigF94DMS+shiDMjDowYO6y9+wB/4WgO0Y19jWYk0lQ4tuG5KI7kj4FTp1wxPj5IFfcrz/s1c3jjQ==", - "license": "BlueOak-1.0.0" + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/sax/-/sax-1.4.4.tgz", + "integrity": "sha512-1n3r/tGXO6b6VXMdFT54SHzT9ytu9yr7TaELowdYpMqY/Ao7EnlQGmAQ1+RatX7Tkkdm6hONI2owqNx2aZj5Sw==", + "license": "BlueOak-1.0.0", + "engines": { + "node": ">=11.0.0" + } }, "node_modules/scule": { "version": "1.3.0", diff --git a/examples/nuxt/babylonjs/basic/package.json b/examples/nuxt/babylonjs/basic/package.json index 6583831e6..623ccd387 100644 --- a/examples/nuxt/babylonjs/basic/package.json +++ b/examples/nuxt/babylonjs/basic/package.json @@ -11,7 +11,7 @@ "postinstall": "nuxt prepare" }, "dependencies": { - "@bitbybit-dev/babylonjs": "0.21.0", + "@bitbybit-dev/babylonjs": "0.21.1", "@pinia/nuxt": "^0.5.4", "nuxt": "^3.13.0", "pinia": "^2.2.2", diff --git a/examples/package.json b/examples/package.json index 630afa9da..46a09baca 100644 --- a/examples/package.json +++ b/examples/package.json @@ -1,6 +1,6 @@ { "name": "bitbybit-examples", - "version": "0.21.0", + "version": "0.21.1", "description": "Monorepo for browser CAD which holds bitbybit.dev npm packages", "main": "index.js", "scripts": { @@ -17,12 +17,18 @@ "ci-vite-babylonjs-hex-house-concept": "cd vite/babylonjs/hex-house-concept && npm install", "ci-vite-babylonjs-hex-shell": "cd vite/babylonjs/hex-shell && npm install", "ci-vite-babylonjs-starter-template": "cd vite/babylonjs/starter-template && npm install", + "ci-vite-babylonjs-starter-template-full": "cd vite/babylonjs/starter-template-full && npm install", "ci-vite-threejs-cup": "cd vite/threejs/cup && npm install", "ci-vite-threejs-hex-house-concept": "cd vite/threejs/hex-house-concept && npm install", "ci-vite-threejs-hex-shell": "cd vite/threejs/hex-shell && npm install", "ci-vite-threejs-starter-template": "cd vite/threejs/starter-template && npm install", + "ci-vite-threejs-starter-template-full": "cd vite/threejs/starter-template-full && npm install", + "ci-vite-playcanvas-hex-house-concept": "cd vite/playcanvas/hex-house-concept && npm install", + "ci-vite-playcanvas-hex-shell": "cd vite/playcanvas/hex-shell && npm install", + "ci-vite-playcanvas-starter-template": "cd vite/playcanvas/starter-template && npm install", + "ci-vite-playcanvas-starter-template-full": "cd vite/playcanvas/starter-template-full && npm install", "ci-webpack-threejs": "cd webpack/threejs && npm install", - "ci-packages": "npm run ci-angular-babylonjs-laptop-holder && npm run ci-angular-threejs-simple-viewer && npm run ci-angular-three-vite-basic-example && npm run ci-nextjs-babylonjs-simple && npm run ci-node-basic && npm run ci-node-express-app && npm run ci-nuxt-babylonjs-basic && npm run ci-react-babylonjs-cup && npm run ci-react-babylonjs-laptop-holder && npm run ci-react-threejs-vase && npm run ci-vite-babylonjs-hex-house-concept && npm run ci-vite-babylonjs-hex-shell && npm run ci-vite-babylonjs-starter-template && npm run ci-vite-threejs-cup && npm run ci-vite-threejs-hex-house-concept && npm run ci-vite-threejs-hex-shell && npm run ci-vite-threejs-starter-template && npm run ci-webpack-threejs" + "ci-packages": "npm run ci-angular-babylonjs-laptop-holder && npm run ci-angular-threejs-simple-viewer && npm run ci-angular-three-vite-basic-example && npm run ci-nextjs-babylonjs-simple && npm run ci-node-basic && npm run ci-node-express-app && npm run ci-nuxt-babylonjs-basic && npm run ci-react-babylonjs-cup && npm run ci-react-babylonjs-laptop-holder && npm run ci-react-threejs-vase && npm run ci-vite-babylonjs-hex-house-concept && npm run ci-vite-babylonjs-hex-shell && npm run ci-vite-babylonjs-starter-template && npm run ci-vite-babylonjs-starter-template-full && npm run ci-vite-threejs-cup && npm run ci-vite-threejs-hex-house-concept && npm run ci-vite-threejs-hex-shell && npm run ci-vite-threejs-starter-template && npm run ci-vite-threejs-starter-template-full && npm run ci-webpack-threejs && npm run ci-vite-playcanvas-hex-house-concept && npm run ci-vite-playcanvas-hex-shell && npm run ci-vite-playcanvas-starter-template && npm run ci-vite-playcanvas-starter-template-full" }, "repository": { "type": "git", diff --git a/examples/react/babylonjs/cup/package-lock.json b/examples/react/babylonjs/cup/package-lock.json index fcef378cf..7bc548b24 100644 --- a/examples/react/babylonjs/cup/package-lock.json +++ b/examples/react/babylonjs/cup/package-lock.json @@ -8,7 +8,7 @@ "name": "cup", "version": "0.1.0", "dependencies": { - "@bitbybit-dev/babylonjs": "0.21.0", + "@bitbybit-dev/babylonjs": "0.21.1", "@emotion/react": "11.9.0", "@emotion/styled": "11.8.1", "@mui/icons-material": "5.6.2", @@ -1809,15 +1809,15 @@ } }, "node_modules/@babylonjs/core": { - "version": "8.44.1", - "resolved": "https://registry.npmjs.org/@babylonjs/core/-/core-8.44.1.tgz", - "integrity": "sha512-sF2WWK2d7lg18ESOCxUoRG4d1SzCWz42asjRjRGxZ8r3D7w9ZM3H2wftJIqwaZvD3zWr+wmCVKpQ6hWkboHIXw==", + "version": "8.45.4", + "resolved": "https://registry.npmjs.org/@babylonjs/core/-/core-8.45.4.tgz", + "integrity": "sha512-fmpaitVpe+bB3PCLY0RKYO/e5n1vLNvueJrglt6SENVE/frZNS4har8odAd1UDNf5KFgOdb8YK91jK4BUwIgcQ==", "license": "Apache-2.0" }, "node_modules/@babylonjs/gui": { - "version": "8.44.1", - "resolved": "https://registry.npmjs.org/@babylonjs/gui/-/gui-8.44.1.tgz", - "integrity": "sha512-6STDK+Hr8GpY29YMLKnTVhEnWw1NKPrIpz+MqgWuoAAmmpiFtNCr0nnAnCj5fhgGf25L89jy51ogXyg3jfiuDA==", + "version": "8.45.4", + "resolved": "https://registry.npmjs.org/@babylonjs/gui/-/gui-8.45.4.tgz", + "integrity": "sha512-1pMjQs7fgSEvUQoXyit96kNRqzX74oMNkMkAOmz7NjOkBX3tacAfNfoEC6aw+AB+iAjlCO5/DXatZU5m6EYyIQ==", "license": "Apache-2.0", "peerDependencies": { "@babylonjs/core": "^8.0.0" @@ -1832,9 +1832,9 @@ } }, "node_modules/@babylonjs/loaders": { - "version": "8.44.1", - "resolved": "https://registry.npmjs.org/@babylonjs/loaders/-/loaders-8.44.1.tgz", - "integrity": "sha512-h5rUGCwhdWv3Hq48DP8sy4/+3QUYjOprxu2i6zXKb69LHMnYE0tZ1xQHBJEOUF60hxA+TwhzdjC8bxInKoeojA==", + "version": "8.45.4", + "resolved": "https://registry.npmjs.org/@babylonjs/loaders/-/loaders-8.45.4.tgz", + "integrity": "sha512-P1H8XpIJK7NnrtGGSGkCJZIPBvtJ+0+l7yGXDY2UaNFKU80y2Oty8DZ8JRKdbJdSc4cOe8ucBY5w7x+Bbllxuw==", "license": "Apache-2.0", "peerDependencies": { "@babylonjs/core": "^8.0.0", @@ -1842,18 +1842,18 @@ } }, "node_modules/@babylonjs/materials": { - "version": "8.44.1", - "resolved": "https://registry.npmjs.org/@babylonjs/materials/-/materials-8.44.1.tgz", - "integrity": "sha512-FD0S/aA68oEjKCSNY5ydGkiHbsyo08KlhQ+6R8swtJhx5aq7ojWBt3P9KC78+wjZiCJW37176CIObcV8QcjMAQ==", + "version": "8.45.4", + "resolved": "https://registry.npmjs.org/@babylonjs/materials/-/materials-8.45.4.tgz", + "integrity": "sha512-ElTXhC83alnMFFyv2sPG/Im5UwTZoDzd1R8otPQwbEEERcRK8A71Hu1gFdBu/8l9O752IWnZcPSEj1WwLqeR5A==", "license": "Apache-2.0", "peerDependencies": { "@babylonjs/core": "^8.6.0" } }, "node_modules/@babylonjs/serializers": { - "version": "8.44.1", - "resolved": "https://registry.npmjs.org/@babylonjs/serializers/-/serializers-8.44.1.tgz", - "integrity": "sha512-3FRRdKpHr2qTkALHEvq0ih0P59iTINUFrGZWFUfO3Wu24UBSuTxY9Kq820dvUUWaRtWkXEnMSQbR+5glzcfqBw==", + "version": "8.45.4", + "resolved": "https://registry.npmjs.org/@babylonjs/serializers/-/serializers-8.45.4.tgz", + "integrity": "sha512-i83RQIP3XSi3DFJwhc/+JNNPm49DdtNyDobuyBBwIDyMpQdbcFLhkL0DW/7/H+vFUWz0xWx+mgmsb6HY/ePGmg==", "license": "Apache-2.0", "peerDependencies": { "@babylonjs/core": "^8.0.0", @@ -1866,49 +1866,49 @@ "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==" }, "node_modules/@bitbybit-dev/babylonjs": { - "version": "0.21.0", - "resolved": "https://registry.npmjs.org/@bitbybit-dev/babylonjs/-/babylonjs-0.21.0.tgz", - "integrity": "sha512-8aPJ+XTXzcnO4bXfmW34lTnVCzC6Hy6TMkh7/ziQSoUsjPp7e7LFHoBBfqCk09LdTLa85gb5x/f6WNAn306Odg==", + "version": "0.21.1", + "resolved": "https://registry.npmjs.org/@bitbybit-dev/babylonjs/-/babylonjs-0.21.1.tgz", + "integrity": "sha512-OyQI5FC4qI5EYW/RFZt/6WR2We2bEpbhM8I8ptiJkviY0e1yIjiV11A4aF8B6fpjS5Bd7Rb30LrUdWNHbAo1Nw==", "license": "MIT", "dependencies": { - "@babylonjs/core": "8.44.1", - "@babylonjs/gui": "8.44.1", + "@babylonjs/core": "8.45.4", + "@babylonjs/gui": "8.45.4", "@babylonjs/havok": "1.3.10", - "@babylonjs/loaders": "8.44.1", - "@babylonjs/materials": "8.44.1", - "@babylonjs/serializers": "8.44.1", - "@bitbybit-dev/core": "0.21.0", + "@babylonjs/loaders": "8.45.4", + "@babylonjs/materials": "8.45.4", + "@babylonjs/serializers": "8.45.4", + "@bitbybit-dev/core": "0.21.1", "earcut": "2.2.3" } }, "node_modules/@bitbybit-dev/base": { - "version": "0.21.0", - "resolved": "https://registry.npmjs.org/@bitbybit-dev/base/-/base-0.21.0.tgz", - "integrity": "sha512-dNfsf2tu3/QUD1mvZzzTze8RwHyK2Jrt+Ary8EDKdNKMw+abtCpQYNerdrg0ZQPxvwu/OOQz6N1xCsCwsPkQJg==", + "version": "0.21.1", + "resolved": "https://registry.npmjs.org/@bitbybit-dev/base/-/base-0.21.1.tgz", + "integrity": "sha512-d3aHPpLHigeNTceMi0U/wOIzCqkvHg8S2gNa4b8VGSTifbn7Fo1XbQ2pzetbcOtwtJhkcLgNYn3nFqW8S2MUpw==", "license": "MIT" }, "node_modules/@bitbybit-dev/core": { - "version": "0.21.0", - "resolved": "https://registry.npmjs.org/@bitbybit-dev/core/-/core-0.21.0.tgz", - "integrity": "sha512-IbeQ8ROreu0/RkkngUE+Eb19ecvqKOWhGefXvIqQmplxt3zEc0FI4Kw8wR3vYl2XMannuVt1xAIYtqqH0tjBzg==", + "version": "0.21.1", + "resolved": "https://registry.npmjs.org/@bitbybit-dev/core/-/core-0.21.1.tgz", + "integrity": "sha512-Zr2w4h1eBRgOHevKevTaDeL1KlOju6Q8uT62zLeKAAAAn5P1RNn2jOVnHEJtd7y4wPn7G2rZwlwtBQlYe5t9AQ==", "license": "MIT", "dependencies": { - "@bitbybit-dev/base": "0.21.0", - "@bitbybit-dev/jscad-worker": "0.21.0", - "@bitbybit-dev/manifold-worker": "0.21.0", - "@bitbybit-dev/occt-worker": "0.21.0", - "jsonpath-plus": "10.1.0", + "@bitbybit-dev/base": "0.21.1", + "@bitbybit-dev/jscad-worker": "0.21.1", + "@bitbybit-dev/manifold-worker": "0.21.1", + "@bitbybit-dev/occt-worker": "0.21.1", + "jsonpath-plus": "10.3.0", "rxjs": "7.5.5", "verb-nurbs-web": "2.1.3" } }, "node_modules/@bitbybit-dev/jscad": { - "version": "0.21.0", - "resolved": "https://registry.npmjs.org/@bitbybit-dev/jscad/-/jscad-0.21.0.tgz", - "integrity": "sha512-Q7eE2ILrJRstW4L1711aJZdpwPf1kuhZJqB+KLkkBLsneRsGsh82lBcCbVYAOMuF/q8Lnd4JHxPiIG/m+LYmPQ==", + "version": "0.21.1", + "resolved": "https://registry.npmjs.org/@bitbybit-dev/jscad/-/jscad-0.21.1.tgz", + "integrity": "sha512-nw8dHGYy3GPXoX0xLZeVsB0Z013mzIy4GoniLKvzN7ApnTruPxSFisxrvFajCcQpL5UbU8SW4k+LhJDI8FTlRg==", "license": "MIT", "dependencies": { - "@bitbybit-dev/base": "0.21.0", + "@bitbybit-dev/base": "0.21.1", "@jscad/3mf-serializer": "2.1.12", "@jscad/dxf-serializer": "2.1.18", "@jscad/io-utils": "2.0.28", @@ -1917,51 +1917,51 @@ } }, "node_modules/@bitbybit-dev/jscad-worker": { - "version": "0.21.0", - "resolved": "https://registry.npmjs.org/@bitbybit-dev/jscad-worker/-/jscad-worker-0.21.0.tgz", - "integrity": "sha512-nIvd7GH5Gg51u6PmFXOADXVYTIvixTkNf0YapS1uix7D2JS9Mx10Z4wHAeRKzvJxUAAbEPPRFNkakE22HFGtLQ==", + "version": "0.21.1", + "resolved": "https://registry.npmjs.org/@bitbybit-dev/jscad-worker/-/jscad-worker-0.21.1.tgz", + "integrity": "sha512-ccaXGTnKseWGDGEdgf3HfQqBWmM4Q384NQWO2kdzZ4EHaZlSp9tEHY8NHOxyxPoMol+qK9u9puH4ux13zY+FrQ==", "license": "MIT", "dependencies": { - "@bitbybit-dev/jscad": "0.21.0", + "@bitbybit-dev/jscad": "0.21.1", "rxjs": "7.5.5" } }, "node_modules/@bitbybit-dev/manifold": { - "version": "0.21.0", - "resolved": "https://registry.npmjs.org/@bitbybit-dev/manifold/-/manifold-0.21.0.tgz", - "integrity": "sha512-DPpwK9ESB+auDeAbzXcfWRVEzWoMDkpkjc+/uwh+zuSiHSx92PSkzx1/LVTbQCsK+aOfOOy03HQCF5Bu2KQYtw==", + "version": "0.21.1", + "resolved": "https://registry.npmjs.org/@bitbybit-dev/manifold/-/manifold-0.21.1.tgz", + "integrity": "sha512-/UqejYCN9YIyBzf5yQXPdSawoKqEUd1aQAKdmge4LoUaZ19eQyRHLK4WpZQ8K+7lTr7qcNQARr7mLx0FQMBFew==", "license": "MIT", "dependencies": { - "@bitbybit-dev/base": "0.21.0", + "@bitbybit-dev/base": "0.21.1", "manifold-3d": "3.3.2" } }, "node_modules/@bitbybit-dev/manifold-worker": { - "version": "0.21.0", - "resolved": "https://registry.npmjs.org/@bitbybit-dev/manifold-worker/-/manifold-worker-0.21.0.tgz", - "integrity": "sha512-6Cqv3BP+uI8mHKHI6Jx9TzCxRg1/kMHhCe18+B3KD/rTl9B5mnScCKRBnDansR3bH7aYZGnIw9PmiFnWLkQWEQ==", + "version": "0.21.1", + "resolved": "https://registry.npmjs.org/@bitbybit-dev/manifold-worker/-/manifold-worker-0.21.1.tgz", + "integrity": "sha512-A+oV172dZzehkeF5kdCFzQuyyfj9FLixq5nGNviOpJX3zaF+0efl1ung1o45V5pLtZkuGCgCZaQ6lY0zNQcYig==", "license": "MIT", "dependencies": { - "@bitbybit-dev/manifold": "0.21.0", + "@bitbybit-dev/manifold": "0.21.1", "rxjs": "7.5.5" } }, "node_modules/@bitbybit-dev/occt": { - "version": "0.21.0", - "resolved": "https://registry.npmjs.org/@bitbybit-dev/occt/-/occt-0.21.0.tgz", - "integrity": "sha512-vPu3NmF1kBZMOkOdysolGfFxEEnwdHNGORoX3eWbMWT2JL/Tag5Q2CAc5jwa2VvZnS1nE/9x+DVlFQSo8LQnIg==", + "version": "0.21.1", + "resolved": "https://registry.npmjs.org/@bitbybit-dev/occt/-/occt-0.21.1.tgz", + "integrity": "sha512-0+yffQRmph9W1qLSyRBUvaQDiZ9OHA2kD2/LsCgxR3NVtKs3GZaAYYhoUfaRqtt2I8Go99e8WBB5daaQceudjA==", "license": "MIT", "dependencies": { - "@bitbybit-dev/base": "0.21.0" + "@bitbybit-dev/base": "0.21.1" } }, "node_modules/@bitbybit-dev/occt-worker": { - "version": "0.21.0", - "resolved": "https://registry.npmjs.org/@bitbybit-dev/occt-worker/-/occt-worker-0.21.0.tgz", - "integrity": "sha512-xG1sgo6q/RdVA8AgG72wPe4qxcQlrO1V7/Ksn6MqIhZVTsJcm5RbVYlK+nziIWhvlMc1sKE0GNQFcPdALISLuQ==", + "version": "0.21.1", + "resolved": "https://registry.npmjs.org/@bitbybit-dev/occt-worker/-/occt-worker-0.21.1.tgz", + "integrity": "sha512-3BW0lTiY8muPSiCWplAT/VQHaHFVUvljMGD1ynQo7cqv/Zna9ACn+SHOMY2HJ7m1MnZq5d2dGjJJXo8k19iV8Q==", "license": "MIT", "dependencies": { - "@bitbybit-dev/occt": "0.21.0", + "@bitbybit-dev/occt": "0.21.1", "rxjs": "7.5.5" } }, @@ -6225,9 +6225,9 @@ } }, "node_modules/babylonjs-gltf2interface": { - "version": "8.44.1", - "resolved": "https://registry.npmjs.org/babylonjs-gltf2interface/-/babylonjs-gltf2interface-8.44.1.tgz", - "integrity": "sha512-+z0P0wms1FD5xuVpuRJ1qjvGAbPAWhEWGBWENRPD0Hbz6nd9cnL28/pjxgk39/QhlIuJKL9JZ0o8G0JgLHEnRQ==", + "version": "8.45.5", + "resolved": "https://registry.npmjs.org/babylonjs-gltf2interface/-/babylonjs-gltf2interface-8.45.5.tgz", + "integrity": "sha512-o1OMBVdeKCK7b+L1VUW1w1+KIi1DTP7Po+SAJ3vwPqRG6xD2eTL+w5IaFHVue3dVjnlU8Z+9y3BP3AadmK0H9w==", "license": "Apache-2.0", "peer": true }, @@ -12753,14 +12753,14 @@ } }, "node_modules/jsonpath-plus": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/jsonpath-plus/-/jsonpath-plus-10.1.0.tgz", - "integrity": "sha512-gHfV1IYqH8uJHYVTs8BJX1XKy2/rR93+f8QQi0xhx95aCiXn1ettYAd5T+7FU6wfqyDoX/wy0pm/fL3jOKJ9Lg==", + "version": "10.3.0", + "resolved": "https://registry.npmjs.org/jsonpath-plus/-/jsonpath-plus-10.3.0.tgz", + "integrity": "sha512-8TNmfeTCk2Le33A3vRRwtuworG/L5RrgMvdjhKZxvyShO+mBu2fP50OWUjRLNtvw344DdDarFh9buFAZs5ujeA==", "license": "MIT", "dependencies": { - "@jsep-plugin/assignment": "^1.2.1", - "@jsep-plugin/regex": "^1.0.3", - "jsep": "^1.3.9" + "@jsep-plugin/assignment": "^1.3.0", + "@jsep-plugin/regex": "^1.0.4", + "jsep": "^1.4.0" }, "bin": { "jsonpath": "bin/jsonpath-cli.js", @@ -19819,14 +19819,14 @@ } }, "@babylonjs/core": { - "version": "8.44.1", - "resolved": "https://registry.npmjs.org/@babylonjs/core/-/core-8.44.1.tgz", - "integrity": "sha512-sF2WWK2d7lg18ESOCxUoRG4d1SzCWz42asjRjRGxZ8r3D7w9ZM3H2wftJIqwaZvD3zWr+wmCVKpQ6hWkboHIXw==" + "version": "8.45.4", + "resolved": "https://registry.npmjs.org/@babylonjs/core/-/core-8.45.4.tgz", + "integrity": "sha512-fmpaitVpe+bB3PCLY0RKYO/e5n1vLNvueJrglt6SENVE/frZNS4har8odAd1UDNf5KFgOdb8YK91jK4BUwIgcQ==" }, "@babylonjs/gui": { - "version": "8.44.1", - "resolved": "https://registry.npmjs.org/@babylonjs/gui/-/gui-8.44.1.tgz", - "integrity": "sha512-6STDK+Hr8GpY29YMLKnTVhEnWw1NKPrIpz+MqgWuoAAmmpiFtNCr0nnAnCj5fhgGf25L89jy51ogXyg3jfiuDA==", + "version": "8.45.4", + "resolved": "https://registry.npmjs.org/@babylonjs/gui/-/gui-8.45.4.tgz", + "integrity": "sha512-1pMjQs7fgSEvUQoXyit96kNRqzX74oMNkMkAOmz7NjOkBX3tacAfNfoEC6aw+AB+iAjlCO5/DXatZU5m6EYyIQ==", "requires": {} }, "@babylonjs/havok": { @@ -19838,21 +19838,21 @@ } }, "@babylonjs/loaders": { - "version": "8.44.1", - "resolved": "https://registry.npmjs.org/@babylonjs/loaders/-/loaders-8.44.1.tgz", - "integrity": "sha512-h5rUGCwhdWv3Hq48DP8sy4/+3QUYjOprxu2i6zXKb69LHMnYE0tZ1xQHBJEOUF60hxA+TwhzdjC8bxInKoeojA==", + "version": "8.45.4", + "resolved": "https://registry.npmjs.org/@babylonjs/loaders/-/loaders-8.45.4.tgz", + "integrity": "sha512-P1H8XpIJK7NnrtGGSGkCJZIPBvtJ+0+l7yGXDY2UaNFKU80y2Oty8DZ8JRKdbJdSc4cOe8ucBY5w7x+Bbllxuw==", "requires": {} }, "@babylonjs/materials": { - "version": "8.44.1", - "resolved": "https://registry.npmjs.org/@babylonjs/materials/-/materials-8.44.1.tgz", - "integrity": "sha512-FD0S/aA68oEjKCSNY5ydGkiHbsyo08KlhQ+6R8swtJhx5aq7ojWBt3P9KC78+wjZiCJW37176CIObcV8QcjMAQ==", + "version": "8.45.4", + "resolved": "https://registry.npmjs.org/@babylonjs/materials/-/materials-8.45.4.tgz", + "integrity": "sha512-ElTXhC83alnMFFyv2sPG/Im5UwTZoDzd1R8otPQwbEEERcRK8A71Hu1gFdBu/8l9O752IWnZcPSEj1WwLqeR5A==", "requires": {} }, "@babylonjs/serializers": { - "version": "8.44.1", - "resolved": "https://registry.npmjs.org/@babylonjs/serializers/-/serializers-8.44.1.tgz", - "integrity": "sha512-3FRRdKpHr2qTkALHEvq0ih0P59iTINUFrGZWFUfO3Wu24UBSuTxY9Kq820dvUUWaRtWkXEnMSQbR+5glzcfqBw==", + "version": "8.45.4", + "resolved": "https://registry.npmjs.org/@babylonjs/serializers/-/serializers-8.45.4.tgz", + "integrity": "sha512-i83RQIP3XSi3DFJwhc/+JNNPm49DdtNyDobuyBBwIDyMpQdbcFLhkL0DW/7/H+vFUWz0xWx+mgmsb6HY/ePGmg==", "requires": {} }, "@bcoe/v8-coverage": { @@ -19861,45 +19861,45 @@ "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==" }, "@bitbybit-dev/babylonjs": { - "version": "0.21.0", - "resolved": "https://registry.npmjs.org/@bitbybit-dev/babylonjs/-/babylonjs-0.21.0.tgz", - "integrity": "sha512-8aPJ+XTXzcnO4bXfmW34lTnVCzC6Hy6TMkh7/ziQSoUsjPp7e7LFHoBBfqCk09LdTLa85gb5x/f6WNAn306Odg==", + "version": "0.21.1", + "resolved": "https://registry.npmjs.org/@bitbybit-dev/babylonjs/-/babylonjs-0.21.1.tgz", + "integrity": "sha512-OyQI5FC4qI5EYW/RFZt/6WR2We2bEpbhM8I8ptiJkviY0e1yIjiV11A4aF8B6fpjS5Bd7Rb30LrUdWNHbAo1Nw==", "requires": { - "@babylonjs/core": "8.44.1", - "@babylonjs/gui": "8.44.1", + "@babylonjs/core": "8.45.4", + "@babylonjs/gui": "8.45.4", "@babylonjs/havok": "1.3.10", - "@babylonjs/loaders": "8.44.1", - "@babylonjs/materials": "8.44.1", - "@babylonjs/serializers": "8.44.1", - "@bitbybit-dev/core": "0.21.0", + "@babylonjs/loaders": "8.45.4", + "@babylonjs/materials": "8.45.4", + "@babylonjs/serializers": "8.45.4", + "@bitbybit-dev/core": "0.21.1", "earcut": "2.2.3" } }, "@bitbybit-dev/base": { - "version": "0.21.0", - "resolved": "https://registry.npmjs.org/@bitbybit-dev/base/-/base-0.21.0.tgz", - "integrity": "sha512-dNfsf2tu3/QUD1mvZzzTze8RwHyK2Jrt+Ary8EDKdNKMw+abtCpQYNerdrg0ZQPxvwu/OOQz6N1xCsCwsPkQJg==" + "version": "0.21.1", + "resolved": "https://registry.npmjs.org/@bitbybit-dev/base/-/base-0.21.1.tgz", + "integrity": "sha512-d3aHPpLHigeNTceMi0U/wOIzCqkvHg8S2gNa4b8VGSTifbn7Fo1XbQ2pzetbcOtwtJhkcLgNYn3nFqW8S2MUpw==" }, "@bitbybit-dev/core": { - "version": "0.21.0", - "resolved": "https://registry.npmjs.org/@bitbybit-dev/core/-/core-0.21.0.tgz", - "integrity": "sha512-IbeQ8ROreu0/RkkngUE+Eb19ecvqKOWhGefXvIqQmplxt3zEc0FI4Kw8wR3vYl2XMannuVt1xAIYtqqH0tjBzg==", - "requires": { - "@bitbybit-dev/base": "0.21.0", - "@bitbybit-dev/jscad-worker": "0.21.0", - "@bitbybit-dev/manifold-worker": "0.21.0", - "@bitbybit-dev/occt-worker": "0.21.0", - "jsonpath-plus": "10.1.0", + "version": "0.21.1", + "resolved": "https://registry.npmjs.org/@bitbybit-dev/core/-/core-0.21.1.tgz", + "integrity": "sha512-Zr2w4h1eBRgOHevKevTaDeL1KlOju6Q8uT62zLeKAAAAn5P1RNn2jOVnHEJtd7y4wPn7G2rZwlwtBQlYe5t9AQ==", + "requires": { + "@bitbybit-dev/base": "0.21.1", + "@bitbybit-dev/jscad-worker": "0.21.1", + "@bitbybit-dev/manifold-worker": "0.21.1", + "@bitbybit-dev/occt-worker": "0.21.1", + "jsonpath-plus": "10.3.0", "rxjs": "7.5.5", "verb-nurbs-web": "2.1.3" } }, "@bitbybit-dev/jscad": { - "version": "0.21.0", - "resolved": "https://registry.npmjs.org/@bitbybit-dev/jscad/-/jscad-0.21.0.tgz", - "integrity": "sha512-Q7eE2ILrJRstW4L1711aJZdpwPf1kuhZJqB+KLkkBLsneRsGsh82lBcCbVYAOMuF/q8Lnd4JHxPiIG/m+LYmPQ==", + "version": "0.21.1", + "resolved": "https://registry.npmjs.org/@bitbybit-dev/jscad/-/jscad-0.21.1.tgz", + "integrity": "sha512-nw8dHGYy3GPXoX0xLZeVsB0Z013mzIy4GoniLKvzN7ApnTruPxSFisxrvFajCcQpL5UbU8SW4k+LhJDI8FTlRg==", "requires": { - "@bitbybit-dev/base": "0.21.0", + "@bitbybit-dev/base": "0.21.1", "@jscad/3mf-serializer": "2.1.12", "@jscad/dxf-serializer": "2.1.18", "@jscad/io-utils": "2.0.28", @@ -19908,46 +19908,46 @@ } }, "@bitbybit-dev/jscad-worker": { - "version": "0.21.0", - "resolved": "https://registry.npmjs.org/@bitbybit-dev/jscad-worker/-/jscad-worker-0.21.0.tgz", - "integrity": "sha512-nIvd7GH5Gg51u6PmFXOADXVYTIvixTkNf0YapS1uix7D2JS9Mx10Z4wHAeRKzvJxUAAbEPPRFNkakE22HFGtLQ==", + "version": "0.21.1", + "resolved": "https://registry.npmjs.org/@bitbybit-dev/jscad-worker/-/jscad-worker-0.21.1.tgz", + "integrity": "sha512-ccaXGTnKseWGDGEdgf3HfQqBWmM4Q384NQWO2kdzZ4EHaZlSp9tEHY8NHOxyxPoMol+qK9u9puH4ux13zY+FrQ==", "requires": { - "@bitbybit-dev/jscad": "0.21.0", + "@bitbybit-dev/jscad": "0.21.1", "rxjs": "7.5.5" } }, "@bitbybit-dev/manifold": { - "version": "0.21.0", - "resolved": "https://registry.npmjs.org/@bitbybit-dev/manifold/-/manifold-0.21.0.tgz", - "integrity": "sha512-DPpwK9ESB+auDeAbzXcfWRVEzWoMDkpkjc+/uwh+zuSiHSx92PSkzx1/LVTbQCsK+aOfOOy03HQCF5Bu2KQYtw==", + "version": "0.21.1", + "resolved": "https://registry.npmjs.org/@bitbybit-dev/manifold/-/manifold-0.21.1.tgz", + "integrity": "sha512-/UqejYCN9YIyBzf5yQXPdSawoKqEUd1aQAKdmge4LoUaZ19eQyRHLK4WpZQ8K+7lTr7qcNQARr7mLx0FQMBFew==", "requires": { - "@bitbybit-dev/base": "0.21.0", + "@bitbybit-dev/base": "0.21.1", "manifold-3d": "3.3.2" } }, "@bitbybit-dev/manifold-worker": { - "version": "0.21.0", - "resolved": "https://registry.npmjs.org/@bitbybit-dev/manifold-worker/-/manifold-worker-0.21.0.tgz", - "integrity": "sha512-6Cqv3BP+uI8mHKHI6Jx9TzCxRg1/kMHhCe18+B3KD/rTl9B5mnScCKRBnDansR3bH7aYZGnIw9PmiFnWLkQWEQ==", + "version": "0.21.1", + "resolved": "https://registry.npmjs.org/@bitbybit-dev/manifold-worker/-/manifold-worker-0.21.1.tgz", + "integrity": "sha512-A+oV172dZzehkeF5kdCFzQuyyfj9FLixq5nGNviOpJX3zaF+0efl1ung1o45V5pLtZkuGCgCZaQ6lY0zNQcYig==", "requires": { - "@bitbybit-dev/manifold": "0.21.0", + "@bitbybit-dev/manifold": "0.21.1", "rxjs": "7.5.5" } }, "@bitbybit-dev/occt": { - "version": "0.21.0", - "resolved": "https://registry.npmjs.org/@bitbybit-dev/occt/-/occt-0.21.0.tgz", - "integrity": "sha512-vPu3NmF1kBZMOkOdysolGfFxEEnwdHNGORoX3eWbMWT2JL/Tag5Q2CAc5jwa2VvZnS1nE/9x+DVlFQSo8LQnIg==", + "version": "0.21.1", + "resolved": "https://registry.npmjs.org/@bitbybit-dev/occt/-/occt-0.21.1.tgz", + "integrity": "sha512-0+yffQRmph9W1qLSyRBUvaQDiZ9OHA2kD2/LsCgxR3NVtKs3GZaAYYhoUfaRqtt2I8Go99e8WBB5daaQceudjA==", "requires": { - "@bitbybit-dev/base": "0.21.0" + "@bitbybit-dev/base": "0.21.1" } }, "@bitbybit-dev/occt-worker": { - "version": "0.21.0", - "resolved": "https://registry.npmjs.org/@bitbybit-dev/occt-worker/-/occt-worker-0.21.0.tgz", - "integrity": "sha512-xG1sgo6q/RdVA8AgG72wPe4qxcQlrO1V7/Ksn6MqIhZVTsJcm5RbVYlK+nziIWhvlMc1sKE0GNQFcPdALISLuQ==", + "version": "0.21.1", + "resolved": "https://registry.npmjs.org/@bitbybit-dev/occt-worker/-/occt-worker-0.21.1.tgz", + "integrity": "sha512-3BW0lTiY8muPSiCWplAT/VQHaHFVUvljMGD1ynQo7cqv/Zna9ACn+SHOMY2HJ7m1MnZq5d2dGjJJXo8k19iV8Q==", "requires": { - "@bitbybit-dev/occt": "0.21.0", + "@bitbybit-dev/occt": "0.21.1", "rxjs": "7.5.5" } }, @@ -22807,9 +22807,9 @@ } }, "babylonjs-gltf2interface": { - "version": "8.44.1", - "resolved": "https://registry.npmjs.org/babylonjs-gltf2interface/-/babylonjs-gltf2interface-8.44.1.tgz", - "integrity": "sha512-+z0P0wms1FD5xuVpuRJ1qjvGAbPAWhEWGBWENRPD0Hbz6nd9cnL28/pjxgk39/QhlIuJKL9JZ0o8G0JgLHEnRQ==", + "version": "8.45.5", + "resolved": "https://registry.npmjs.org/babylonjs-gltf2interface/-/babylonjs-gltf2interface-8.45.5.tgz", + "integrity": "sha512-o1OMBVdeKCK7b+L1VUW1w1+KIi1DTP7Po+SAJ3vwPqRG6xD2eTL+w5IaFHVue3dVjnlU8Z+9y3BP3AadmK0H9w==", "peer": true }, "balanced-match": { @@ -27538,13 +27538,13 @@ } }, "jsonpath-plus": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/jsonpath-plus/-/jsonpath-plus-10.1.0.tgz", - "integrity": "sha512-gHfV1IYqH8uJHYVTs8BJX1XKy2/rR93+f8QQi0xhx95aCiXn1ettYAd5T+7FU6wfqyDoX/wy0pm/fL3jOKJ9Lg==", + "version": "10.3.0", + "resolved": "https://registry.npmjs.org/jsonpath-plus/-/jsonpath-plus-10.3.0.tgz", + "integrity": "sha512-8TNmfeTCk2Le33A3vRRwtuworG/L5RrgMvdjhKZxvyShO+mBu2fP50OWUjRLNtvw344DdDarFh9buFAZs5ujeA==", "requires": { - "@jsep-plugin/assignment": "^1.2.1", - "@jsep-plugin/regex": "^1.0.3", - "jsep": "^1.3.9" + "@jsep-plugin/assignment": "^1.3.0", + "@jsep-plugin/regex": "^1.0.4", + "jsep": "^1.4.0" } }, "jsonpointer": { diff --git a/examples/react/babylonjs/cup/package.json b/examples/react/babylonjs/cup/package.json index b6e0b4543..33c5f0b4a 100644 --- a/examples/react/babylonjs/cup/package.json +++ b/examples/react/babylonjs/cup/package.json @@ -4,7 +4,7 @@ "private": true, "homepage": "https://app-store.bitbybit.dev/cup", "dependencies": { - "@bitbybit-dev/babylonjs": "0.21.0", + "@bitbybit-dev/babylonjs": "0.21.1", "@emotion/react": "11.9.0", "@emotion/styled": "11.8.1", "web-ifc": "0.0.68", diff --git a/examples/react/babylonjs/laptop-holder/package-lock.json b/examples/react/babylonjs/laptop-holder/package-lock.json index 8354f5e15..0790d7d2d 100644 --- a/examples/react/babylonjs/laptop-holder/package-lock.json +++ b/examples/react/babylonjs/laptop-holder/package-lock.json @@ -8,7 +8,7 @@ "name": "laptop-holder", "version": "0.1.0", "dependencies": { - "@bitbybit-dev/babylonjs": "0.21.0", + "@bitbybit-dev/babylonjs": "0.21.1", "@emotion/react": "11.9.0", "@emotion/styled": "11.8.1", "@mui/icons-material": "5.6.2", @@ -1847,15 +1847,15 @@ } }, "node_modules/@babylonjs/core": { - "version": "8.44.1", - "resolved": "https://registry.npmjs.org/@babylonjs/core/-/core-8.44.1.tgz", - "integrity": "sha512-sF2WWK2d7lg18ESOCxUoRG4d1SzCWz42asjRjRGxZ8r3D7w9ZM3H2wftJIqwaZvD3zWr+wmCVKpQ6hWkboHIXw==", + "version": "8.45.4", + "resolved": "https://registry.npmjs.org/@babylonjs/core/-/core-8.45.4.tgz", + "integrity": "sha512-fmpaitVpe+bB3PCLY0RKYO/e5n1vLNvueJrglt6SENVE/frZNS4har8odAd1UDNf5KFgOdb8YK91jK4BUwIgcQ==", "license": "Apache-2.0" }, "node_modules/@babylonjs/gui": { - "version": "8.44.1", - "resolved": "https://registry.npmjs.org/@babylonjs/gui/-/gui-8.44.1.tgz", - "integrity": "sha512-6STDK+Hr8GpY29YMLKnTVhEnWw1NKPrIpz+MqgWuoAAmmpiFtNCr0nnAnCj5fhgGf25L89jy51ogXyg3jfiuDA==", + "version": "8.45.4", + "resolved": "https://registry.npmjs.org/@babylonjs/gui/-/gui-8.45.4.tgz", + "integrity": "sha512-1pMjQs7fgSEvUQoXyit96kNRqzX74oMNkMkAOmz7NjOkBX3tacAfNfoEC6aw+AB+iAjlCO5/DXatZU5m6EYyIQ==", "license": "Apache-2.0", "peerDependencies": { "@babylonjs/core": "^8.0.0" @@ -1870,9 +1870,9 @@ } }, "node_modules/@babylonjs/loaders": { - "version": "8.44.1", - "resolved": "https://registry.npmjs.org/@babylonjs/loaders/-/loaders-8.44.1.tgz", - "integrity": "sha512-h5rUGCwhdWv3Hq48DP8sy4/+3QUYjOprxu2i6zXKb69LHMnYE0tZ1xQHBJEOUF60hxA+TwhzdjC8bxInKoeojA==", + "version": "8.45.4", + "resolved": "https://registry.npmjs.org/@babylonjs/loaders/-/loaders-8.45.4.tgz", + "integrity": "sha512-P1H8XpIJK7NnrtGGSGkCJZIPBvtJ+0+l7yGXDY2UaNFKU80y2Oty8DZ8JRKdbJdSc4cOe8ucBY5w7x+Bbllxuw==", "license": "Apache-2.0", "peerDependencies": { "@babylonjs/core": "^8.0.0", @@ -1880,18 +1880,18 @@ } }, "node_modules/@babylonjs/materials": { - "version": "8.44.1", - "resolved": "https://registry.npmjs.org/@babylonjs/materials/-/materials-8.44.1.tgz", - "integrity": "sha512-FD0S/aA68oEjKCSNY5ydGkiHbsyo08KlhQ+6R8swtJhx5aq7ojWBt3P9KC78+wjZiCJW37176CIObcV8QcjMAQ==", + "version": "8.45.4", + "resolved": "https://registry.npmjs.org/@babylonjs/materials/-/materials-8.45.4.tgz", + "integrity": "sha512-ElTXhC83alnMFFyv2sPG/Im5UwTZoDzd1R8otPQwbEEERcRK8A71Hu1gFdBu/8l9O752IWnZcPSEj1WwLqeR5A==", "license": "Apache-2.0", "peerDependencies": { "@babylonjs/core": "^8.6.0" } }, "node_modules/@babylonjs/serializers": { - "version": "8.44.1", - "resolved": "https://registry.npmjs.org/@babylonjs/serializers/-/serializers-8.44.1.tgz", - "integrity": "sha512-3FRRdKpHr2qTkALHEvq0ih0P59iTINUFrGZWFUfO3Wu24UBSuTxY9Kq820dvUUWaRtWkXEnMSQbR+5glzcfqBw==", + "version": "8.45.4", + "resolved": "https://registry.npmjs.org/@babylonjs/serializers/-/serializers-8.45.4.tgz", + "integrity": "sha512-i83RQIP3XSi3DFJwhc/+JNNPm49DdtNyDobuyBBwIDyMpQdbcFLhkL0DW/7/H+vFUWz0xWx+mgmsb6HY/ePGmg==", "license": "Apache-2.0", "peerDependencies": { "@babylonjs/core": "^8.0.0", @@ -1904,49 +1904,49 @@ "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==" }, "node_modules/@bitbybit-dev/babylonjs": { - "version": "0.21.0", - "resolved": "https://registry.npmjs.org/@bitbybit-dev/babylonjs/-/babylonjs-0.21.0.tgz", - "integrity": "sha512-8aPJ+XTXzcnO4bXfmW34lTnVCzC6Hy6TMkh7/ziQSoUsjPp7e7LFHoBBfqCk09LdTLa85gb5x/f6WNAn306Odg==", + "version": "0.21.1", + "resolved": "https://registry.npmjs.org/@bitbybit-dev/babylonjs/-/babylonjs-0.21.1.tgz", + "integrity": "sha512-OyQI5FC4qI5EYW/RFZt/6WR2We2bEpbhM8I8ptiJkviY0e1yIjiV11A4aF8B6fpjS5Bd7Rb30LrUdWNHbAo1Nw==", "license": "MIT", "dependencies": { - "@babylonjs/core": "8.44.1", - "@babylonjs/gui": "8.44.1", + "@babylonjs/core": "8.45.4", + "@babylonjs/gui": "8.45.4", "@babylonjs/havok": "1.3.10", - "@babylonjs/loaders": "8.44.1", - "@babylonjs/materials": "8.44.1", - "@babylonjs/serializers": "8.44.1", - "@bitbybit-dev/core": "0.21.0", + "@babylonjs/loaders": "8.45.4", + "@babylonjs/materials": "8.45.4", + "@babylonjs/serializers": "8.45.4", + "@bitbybit-dev/core": "0.21.1", "earcut": "2.2.3" } }, "node_modules/@bitbybit-dev/base": { - "version": "0.21.0", - "resolved": "https://registry.npmjs.org/@bitbybit-dev/base/-/base-0.21.0.tgz", - "integrity": "sha512-dNfsf2tu3/QUD1mvZzzTze8RwHyK2Jrt+Ary8EDKdNKMw+abtCpQYNerdrg0ZQPxvwu/OOQz6N1xCsCwsPkQJg==", + "version": "0.21.1", + "resolved": "https://registry.npmjs.org/@bitbybit-dev/base/-/base-0.21.1.tgz", + "integrity": "sha512-d3aHPpLHigeNTceMi0U/wOIzCqkvHg8S2gNa4b8VGSTifbn7Fo1XbQ2pzetbcOtwtJhkcLgNYn3nFqW8S2MUpw==", "license": "MIT" }, "node_modules/@bitbybit-dev/core": { - "version": "0.21.0", - "resolved": "https://registry.npmjs.org/@bitbybit-dev/core/-/core-0.21.0.tgz", - "integrity": "sha512-IbeQ8ROreu0/RkkngUE+Eb19ecvqKOWhGefXvIqQmplxt3zEc0FI4Kw8wR3vYl2XMannuVt1xAIYtqqH0tjBzg==", + "version": "0.21.1", + "resolved": "https://registry.npmjs.org/@bitbybit-dev/core/-/core-0.21.1.tgz", + "integrity": "sha512-Zr2w4h1eBRgOHevKevTaDeL1KlOju6Q8uT62zLeKAAAAn5P1RNn2jOVnHEJtd7y4wPn7G2rZwlwtBQlYe5t9AQ==", "license": "MIT", "dependencies": { - "@bitbybit-dev/base": "0.21.0", - "@bitbybit-dev/jscad-worker": "0.21.0", - "@bitbybit-dev/manifold-worker": "0.21.0", - "@bitbybit-dev/occt-worker": "0.21.0", - "jsonpath-plus": "10.1.0", + "@bitbybit-dev/base": "0.21.1", + "@bitbybit-dev/jscad-worker": "0.21.1", + "@bitbybit-dev/manifold-worker": "0.21.1", + "@bitbybit-dev/occt-worker": "0.21.1", + "jsonpath-plus": "10.3.0", "rxjs": "7.5.5", "verb-nurbs-web": "2.1.3" } }, "node_modules/@bitbybit-dev/jscad": { - "version": "0.21.0", - "resolved": "https://registry.npmjs.org/@bitbybit-dev/jscad/-/jscad-0.21.0.tgz", - "integrity": "sha512-Q7eE2ILrJRstW4L1711aJZdpwPf1kuhZJqB+KLkkBLsneRsGsh82lBcCbVYAOMuF/q8Lnd4JHxPiIG/m+LYmPQ==", + "version": "0.21.1", + "resolved": "https://registry.npmjs.org/@bitbybit-dev/jscad/-/jscad-0.21.1.tgz", + "integrity": "sha512-nw8dHGYy3GPXoX0xLZeVsB0Z013mzIy4GoniLKvzN7ApnTruPxSFisxrvFajCcQpL5UbU8SW4k+LhJDI8FTlRg==", "license": "MIT", "dependencies": { - "@bitbybit-dev/base": "0.21.0", + "@bitbybit-dev/base": "0.21.1", "@jscad/3mf-serializer": "2.1.12", "@jscad/dxf-serializer": "2.1.18", "@jscad/io-utils": "2.0.28", @@ -1955,51 +1955,51 @@ } }, "node_modules/@bitbybit-dev/jscad-worker": { - "version": "0.21.0", - "resolved": "https://registry.npmjs.org/@bitbybit-dev/jscad-worker/-/jscad-worker-0.21.0.tgz", - "integrity": "sha512-nIvd7GH5Gg51u6PmFXOADXVYTIvixTkNf0YapS1uix7D2JS9Mx10Z4wHAeRKzvJxUAAbEPPRFNkakE22HFGtLQ==", + "version": "0.21.1", + "resolved": "https://registry.npmjs.org/@bitbybit-dev/jscad-worker/-/jscad-worker-0.21.1.tgz", + "integrity": "sha512-ccaXGTnKseWGDGEdgf3HfQqBWmM4Q384NQWO2kdzZ4EHaZlSp9tEHY8NHOxyxPoMol+qK9u9puH4ux13zY+FrQ==", "license": "MIT", "dependencies": { - "@bitbybit-dev/jscad": "0.21.0", + "@bitbybit-dev/jscad": "0.21.1", "rxjs": "7.5.5" } }, "node_modules/@bitbybit-dev/manifold": { - "version": "0.21.0", - "resolved": "https://registry.npmjs.org/@bitbybit-dev/manifold/-/manifold-0.21.0.tgz", - "integrity": "sha512-DPpwK9ESB+auDeAbzXcfWRVEzWoMDkpkjc+/uwh+zuSiHSx92PSkzx1/LVTbQCsK+aOfOOy03HQCF5Bu2KQYtw==", + "version": "0.21.1", + "resolved": "https://registry.npmjs.org/@bitbybit-dev/manifold/-/manifold-0.21.1.tgz", + "integrity": "sha512-/UqejYCN9YIyBzf5yQXPdSawoKqEUd1aQAKdmge4LoUaZ19eQyRHLK4WpZQ8K+7lTr7qcNQARr7mLx0FQMBFew==", "license": "MIT", "dependencies": { - "@bitbybit-dev/base": "0.21.0", + "@bitbybit-dev/base": "0.21.1", "manifold-3d": "3.3.2" } }, "node_modules/@bitbybit-dev/manifold-worker": { - "version": "0.21.0", - "resolved": "https://registry.npmjs.org/@bitbybit-dev/manifold-worker/-/manifold-worker-0.21.0.tgz", - "integrity": "sha512-6Cqv3BP+uI8mHKHI6Jx9TzCxRg1/kMHhCe18+B3KD/rTl9B5mnScCKRBnDansR3bH7aYZGnIw9PmiFnWLkQWEQ==", + "version": "0.21.1", + "resolved": "https://registry.npmjs.org/@bitbybit-dev/manifold-worker/-/manifold-worker-0.21.1.tgz", + "integrity": "sha512-A+oV172dZzehkeF5kdCFzQuyyfj9FLixq5nGNviOpJX3zaF+0efl1ung1o45V5pLtZkuGCgCZaQ6lY0zNQcYig==", "license": "MIT", "dependencies": { - "@bitbybit-dev/manifold": "0.21.0", + "@bitbybit-dev/manifold": "0.21.1", "rxjs": "7.5.5" } }, "node_modules/@bitbybit-dev/occt": { - "version": "0.21.0", - "resolved": "https://registry.npmjs.org/@bitbybit-dev/occt/-/occt-0.21.0.tgz", - "integrity": "sha512-vPu3NmF1kBZMOkOdysolGfFxEEnwdHNGORoX3eWbMWT2JL/Tag5Q2CAc5jwa2VvZnS1nE/9x+DVlFQSo8LQnIg==", + "version": "0.21.1", + "resolved": "https://registry.npmjs.org/@bitbybit-dev/occt/-/occt-0.21.1.tgz", + "integrity": "sha512-0+yffQRmph9W1qLSyRBUvaQDiZ9OHA2kD2/LsCgxR3NVtKs3GZaAYYhoUfaRqtt2I8Go99e8WBB5daaQceudjA==", "license": "MIT", "dependencies": { - "@bitbybit-dev/base": "0.21.0" + "@bitbybit-dev/base": "0.21.1" } }, "node_modules/@bitbybit-dev/occt-worker": { - "version": "0.21.0", - "resolved": "https://registry.npmjs.org/@bitbybit-dev/occt-worker/-/occt-worker-0.21.0.tgz", - "integrity": "sha512-xG1sgo6q/RdVA8AgG72wPe4qxcQlrO1V7/Ksn6MqIhZVTsJcm5RbVYlK+nziIWhvlMc1sKE0GNQFcPdALISLuQ==", + "version": "0.21.1", + "resolved": "https://registry.npmjs.org/@bitbybit-dev/occt-worker/-/occt-worker-0.21.1.tgz", + "integrity": "sha512-3BW0lTiY8muPSiCWplAT/VQHaHFVUvljMGD1ynQo7cqv/Zna9ACn+SHOMY2HJ7m1MnZq5d2dGjJJXo8k19iV8Q==", "license": "MIT", "dependencies": { - "@bitbybit-dev/occt": "0.21.0", + "@bitbybit-dev/occt": "0.21.1", "rxjs": "7.5.5" } }, @@ -5933,9 +5933,9 @@ } }, "node_modules/babylonjs-gltf2interface": { - "version": "8.44.1", - "resolved": "https://registry.npmjs.org/babylonjs-gltf2interface/-/babylonjs-gltf2interface-8.44.1.tgz", - "integrity": "sha512-+z0P0wms1FD5xuVpuRJ1qjvGAbPAWhEWGBWENRPD0Hbz6nd9cnL28/pjxgk39/QhlIuJKL9JZ0o8G0JgLHEnRQ==", + "version": "8.45.5", + "resolved": "https://registry.npmjs.org/babylonjs-gltf2interface/-/babylonjs-gltf2interface-8.45.5.tgz", + "integrity": "sha512-o1OMBVdeKCK7b+L1VUW1w1+KIi1DTP7Po+SAJ3vwPqRG6xD2eTL+w5IaFHVue3dVjnlU8Z+9y3BP3AadmK0H9w==", "license": "Apache-2.0", "peer": true }, @@ -11995,14 +11995,14 @@ } }, "node_modules/jsonpath-plus": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/jsonpath-plus/-/jsonpath-plus-10.1.0.tgz", - "integrity": "sha512-gHfV1IYqH8uJHYVTs8BJX1XKy2/rR93+f8QQi0xhx95aCiXn1ettYAd5T+7FU6wfqyDoX/wy0pm/fL3jOKJ9Lg==", + "version": "10.3.0", + "resolved": "https://registry.npmjs.org/jsonpath-plus/-/jsonpath-plus-10.3.0.tgz", + "integrity": "sha512-8TNmfeTCk2Le33A3vRRwtuworG/L5RrgMvdjhKZxvyShO+mBu2fP50OWUjRLNtvw344DdDarFh9buFAZs5ujeA==", "license": "MIT", "dependencies": { - "@jsep-plugin/assignment": "^1.2.1", - "@jsep-plugin/regex": "^1.0.3", - "jsep": "^1.3.9" + "@jsep-plugin/assignment": "^1.3.0", + "@jsep-plugin/regex": "^1.0.4", + "jsep": "^1.4.0" }, "bin": { "jsonpath": "bin/jsonpath-cli.js", @@ -18897,14 +18897,14 @@ } }, "@babylonjs/core": { - "version": "8.44.1", - "resolved": "https://registry.npmjs.org/@babylonjs/core/-/core-8.44.1.tgz", - "integrity": "sha512-sF2WWK2d7lg18ESOCxUoRG4d1SzCWz42asjRjRGxZ8r3D7w9ZM3H2wftJIqwaZvD3zWr+wmCVKpQ6hWkboHIXw==" + "version": "8.45.4", + "resolved": "https://registry.npmjs.org/@babylonjs/core/-/core-8.45.4.tgz", + "integrity": "sha512-fmpaitVpe+bB3PCLY0RKYO/e5n1vLNvueJrglt6SENVE/frZNS4har8odAd1UDNf5KFgOdb8YK91jK4BUwIgcQ==" }, "@babylonjs/gui": { - "version": "8.44.1", - "resolved": "https://registry.npmjs.org/@babylonjs/gui/-/gui-8.44.1.tgz", - "integrity": "sha512-6STDK+Hr8GpY29YMLKnTVhEnWw1NKPrIpz+MqgWuoAAmmpiFtNCr0nnAnCj5fhgGf25L89jy51ogXyg3jfiuDA==", + "version": "8.45.4", + "resolved": "https://registry.npmjs.org/@babylonjs/gui/-/gui-8.45.4.tgz", + "integrity": "sha512-1pMjQs7fgSEvUQoXyit96kNRqzX74oMNkMkAOmz7NjOkBX3tacAfNfoEC6aw+AB+iAjlCO5/DXatZU5m6EYyIQ==", "requires": {} }, "@babylonjs/havok": { @@ -18916,21 +18916,21 @@ } }, "@babylonjs/loaders": { - "version": "8.44.1", - "resolved": "https://registry.npmjs.org/@babylonjs/loaders/-/loaders-8.44.1.tgz", - "integrity": "sha512-h5rUGCwhdWv3Hq48DP8sy4/+3QUYjOprxu2i6zXKb69LHMnYE0tZ1xQHBJEOUF60hxA+TwhzdjC8bxInKoeojA==", + "version": "8.45.4", + "resolved": "https://registry.npmjs.org/@babylonjs/loaders/-/loaders-8.45.4.tgz", + "integrity": "sha512-P1H8XpIJK7NnrtGGSGkCJZIPBvtJ+0+l7yGXDY2UaNFKU80y2Oty8DZ8JRKdbJdSc4cOe8ucBY5w7x+Bbllxuw==", "requires": {} }, "@babylonjs/materials": { - "version": "8.44.1", - "resolved": "https://registry.npmjs.org/@babylonjs/materials/-/materials-8.44.1.tgz", - "integrity": "sha512-FD0S/aA68oEjKCSNY5ydGkiHbsyo08KlhQ+6R8swtJhx5aq7ojWBt3P9KC78+wjZiCJW37176CIObcV8QcjMAQ==", + "version": "8.45.4", + "resolved": "https://registry.npmjs.org/@babylonjs/materials/-/materials-8.45.4.tgz", + "integrity": "sha512-ElTXhC83alnMFFyv2sPG/Im5UwTZoDzd1R8otPQwbEEERcRK8A71Hu1gFdBu/8l9O752IWnZcPSEj1WwLqeR5A==", "requires": {} }, "@babylonjs/serializers": { - "version": "8.44.1", - "resolved": "https://registry.npmjs.org/@babylonjs/serializers/-/serializers-8.44.1.tgz", - "integrity": "sha512-3FRRdKpHr2qTkALHEvq0ih0P59iTINUFrGZWFUfO3Wu24UBSuTxY9Kq820dvUUWaRtWkXEnMSQbR+5glzcfqBw==", + "version": "8.45.4", + "resolved": "https://registry.npmjs.org/@babylonjs/serializers/-/serializers-8.45.4.tgz", + "integrity": "sha512-i83RQIP3XSi3DFJwhc/+JNNPm49DdtNyDobuyBBwIDyMpQdbcFLhkL0DW/7/H+vFUWz0xWx+mgmsb6HY/ePGmg==", "requires": {} }, "@bcoe/v8-coverage": { @@ -18939,45 +18939,45 @@ "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==" }, "@bitbybit-dev/babylonjs": { - "version": "0.21.0", - "resolved": "https://registry.npmjs.org/@bitbybit-dev/babylonjs/-/babylonjs-0.21.0.tgz", - "integrity": "sha512-8aPJ+XTXzcnO4bXfmW34lTnVCzC6Hy6TMkh7/ziQSoUsjPp7e7LFHoBBfqCk09LdTLa85gb5x/f6WNAn306Odg==", + "version": "0.21.1", + "resolved": "https://registry.npmjs.org/@bitbybit-dev/babylonjs/-/babylonjs-0.21.1.tgz", + "integrity": "sha512-OyQI5FC4qI5EYW/RFZt/6WR2We2bEpbhM8I8ptiJkviY0e1yIjiV11A4aF8B6fpjS5Bd7Rb30LrUdWNHbAo1Nw==", "requires": { - "@babylonjs/core": "8.44.1", - "@babylonjs/gui": "8.44.1", + "@babylonjs/core": "8.45.4", + "@babylonjs/gui": "8.45.4", "@babylonjs/havok": "1.3.10", - "@babylonjs/loaders": "8.44.1", - "@babylonjs/materials": "8.44.1", - "@babylonjs/serializers": "8.44.1", - "@bitbybit-dev/core": "0.21.0", + "@babylonjs/loaders": "8.45.4", + "@babylonjs/materials": "8.45.4", + "@babylonjs/serializers": "8.45.4", + "@bitbybit-dev/core": "0.21.1", "earcut": "2.2.3" } }, "@bitbybit-dev/base": { - "version": "0.21.0", - "resolved": "https://registry.npmjs.org/@bitbybit-dev/base/-/base-0.21.0.tgz", - "integrity": "sha512-dNfsf2tu3/QUD1mvZzzTze8RwHyK2Jrt+Ary8EDKdNKMw+abtCpQYNerdrg0ZQPxvwu/OOQz6N1xCsCwsPkQJg==" + "version": "0.21.1", + "resolved": "https://registry.npmjs.org/@bitbybit-dev/base/-/base-0.21.1.tgz", + "integrity": "sha512-d3aHPpLHigeNTceMi0U/wOIzCqkvHg8S2gNa4b8VGSTifbn7Fo1XbQ2pzetbcOtwtJhkcLgNYn3nFqW8S2MUpw==" }, "@bitbybit-dev/core": { - "version": "0.21.0", - "resolved": "https://registry.npmjs.org/@bitbybit-dev/core/-/core-0.21.0.tgz", - "integrity": "sha512-IbeQ8ROreu0/RkkngUE+Eb19ecvqKOWhGefXvIqQmplxt3zEc0FI4Kw8wR3vYl2XMannuVt1xAIYtqqH0tjBzg==", - "requires": { - "@bitbybit-dev/base": "0.21.0", - "@bitbybit-dev/jscad-worker": "0.21.0", - "@bitbybit-dev/manifold-worker": "0.21.0", - "@bitbybit-dev/occt-worker": "0.21.0", - "jsonpath-plus": "10.1.0", + "version": "0.21.1", + "resolved": "https://registry.npmjs.org/@bitbybit-dev/core/-/core-0.21.1.tgz", + "integrity": "sha512-Zr2w4h1eBRgOHevKevTaDeL1KlOju6Q8uT62zLeKAAAAn5P1RNn2jOVnHEJtd7y4wPn7G2rZwlwtBQlYe5t9AQ==", + "requires": { + "@bitbybit-dev/base": "0.21.1", + "@bitbybit-dev/jscad-worker": "0.21.1", + "@bitbybit-dev/manifold-worker": "0.21.1", + "@bitbybit-dev/occt-worker": "0.21.1", + "jsonpath-plus": "10.3.0", "rxjs": "7.5.5", "verb-nurbs-web": "2.1.3" } }, "@bitbybit-dev/jscad": { - "version": "0.21.0", - "resolved": "https://registry.npmjs.org/@bitbybit-dev/jscad/-/jscad-0.21.0.tgz", - "integrity": "sha512-Q7eE2ILrJRstW4L1711aJZdpwPf1kuhZJqB+KLkkBLsneRsGsh82lBcCbVYAOMuF/q8Lnd4JHxPiIG/m+LYmPQ==", + "version": "0.21.1", + "resolved": "https://registry.npmjs.org/@bitbybit-dev/jscad/-/jscad-0.21.1.tgz", + "integrity": "sha512-nw8dHGYy3GPXoX0xLZeVsB0Z013mzIy4GoniLKvzN7ApnTruPxSFisxrvFajCcQpL5UbU8SW4k+LhJDI8FTlRg==", "requires": { - "@bitbybit-dev/base": "0.21.0", + "@bitbybit-dev/base": "0.21.1", "@jscad/3mf-serializer": "2.1.12", "@jscad/dxf-serializer": "2.1.18", "@jscad/io-utils": "2.0.28", @@ -18986,46 +18986,46 @@ } }, "@bitbybit-dev/jscad-worker": { - "version": "0.21.0", - "resolved": "https://registry.npmjs.org/@bitbybit-dev/jscad-worker/-/jscad-worker-0.21.0.tgz", - "integrity": "sha512-nIvd7GH5Gg51u6PmFXOADXVYTIvixTkNf0YapS1uix7D2JS9Mx10Z4wHAeRKzvJxUAAbEPPRFNkakE22HFGtLQ==", + "version": "0.21.1", + "resolved": "https://registry.npmjs.org/@bitbybit-dev/jscad-worker/-/jscad-worker-0.21.1.tgz", + "integrity": "sha512-ccaXGTnKseWGDGEdgf3HfQqBWmM4Q384NQWO2kdzZ4EHaZlSp9tEHY8NHOxyxPoMol+qK9u9puH4ux13zY+FrQ==", "requires": { - "@bitbybit-dev/jscad": "0.21.0", + "@bitbybit-dev/jscad": "0.21.1", "rxjs": "7.5.5" } }, "@bitbybit-dev/manifold": { - "version": "0.21.0", - "resolved": "https://registry.npmjs.org/@bitbybit-dev/manifold/-/manifold-0.21.0.tgz", - "integrity": "sha512-DPpwK9ESB+auDeAbzXcfWRVEzWoMDkpkjc+/uwh+zuSiHSx92PSkzx1/LVTbQCsK+aOfOOy03HQCF5Bu2KQYtw==", + "version": "0.21.1", + "resolved": "https://registry.npmjs.org/@bitbybit-dev/manifold/-/manifold-0.21.1.tgz", + "integrity": "sha512-/UqejYCN9YIyBzf5yQXPdSawoKqEUd1aQAKdmge4LoUaZ19eQyRHLK4WpZQ8K+7lTr7qcNQARr7mLx0FQMBFew==", "requires": { - "@bitbybit-dev/base": "0.21.0", + "@bitbybit-dev/base": "0.21.1", "manifold-3d": "3.3.2" } }, "@bitbybit-dev/manifold-worker": { - "version": "0.21.0", - "resolved": "https://registry.npmjs.org/@bitbybit-dev/manifold-worker/-/manifold-worker-0.21.0.tgz", - "integrity": "sha512-6Cqv3BP+uI8mHKHI6Jx9TzCxRg1/kMHhCe18+B3KD/rTl9B5mnScCKRBnDansR3bH7aYZGnIw9PmiFnWLkQWEQ==", + "version": "0.21.1", + "resolved": "https://registry.npmjs.org/@bitbybit-dev/manifold-worker/-/manifold-worker-0.21.1.tgz", + "integrity": "sha512-A+oV172dZzehkeF5kdCFzQuyyfj9FLixq5nGNviOpJX3zaF+0efl1ung1o45V5pLtZkuGCgCZaQ6lY0zNQcYig==", "requires": { - "@bitbybit-dev/manifold": "0.21.0", + "@bitbybit-dev/manifold": "0.21.1", "rxjs": "7.5.5" } }, "@bitbybit-dev/occt": { - "version": "0.21.0", - "resolved": "https://registry.npmjs.org/@bitbybit-dev/occt/-/occt-0.21.0.tgz", - "integrity": "sha512-vPu3NmF1kBZMOkOdysolGfFxEEnwdHNGORoX3eWbMWT2JL/Tag5Q2CAc5jwa2VvZnS1nE/9x+DVlFQSo8LQnIg==", + "version": "0.21.1", + "resolved": "https://registry.npmjs.org/@bitbybit-dev/occt/-/occt-0.21.1.tgz", + "integrity": "sha512-0+yffQRmph9W1qLSyRBUvaQDiZ9OHA2kD2/LsCgxR3NVtKs3GZaAYYhoUfaRqtt2I8Go99e8WBB5daaQceudjA==", "requires": { - "@bitbybit-dev/base": "0.21.0" + "@bitbybit-dev/base": "0.21.1" } }, "@bitbybit-dev/occt-worker": { - "version": "0.21.0", - "resolved": "https://registry.npmjs.org/@bitbybit-dev/occt-worker/-/occt-worker-0.21.0.tgz", - "integrity": "sha512-xG1sgo6q/RdVA8AgG72wPe4qxcQlrO1V7/Ksn6MqIhZVTsJcm5RbVYlK+nziIWhvlMc1sKE0GNQFcPdALISLuQ==", + "version": "0.21.1", + "resolved": "https://registry.npmjs.org/@bitbybit-dev/occt-worker/-/occt-worker-0.21.1.tgz", + "integrity": "sha512-3BW0lTiY8muPSiCWplAT/VQHaHFVUvljMGD1ynQo7cqv/Zna9ACn+SHOMY2HJ7m1MnZq5d2dGjJJXo8k19iV8Q==", "requires": { - "@bitbybit-dev/occt": "0.21.0", + "@bitbybit-dev/occt": "0.21.1", "rxjs": "7.5.5" } }, @@ -21688,9 +21688,9 @@ } }, "babylonjs-gltf2interface": { - "version": "8.44.1", - "resolved": "https://registry.npmjs.org/babylonjs-gltf2interface/-/babylonjs-gltf2interface-8.44.1.tgz", - "integrity": "sha512-+z0P0wms1FD5xuVpuRJ1qjvGAbPAWhEWGBWENRPD0Hbz6nd9cnL28/pjxgk39/QhlIuJKL9JZ0o8G0JgLHEnRQ==", + "version": "8.45.5", + "resolved": "https://registry.npmjs.org/babylonjs-gltf2interface/-/babylonjs-gltf2interface-8.45.5.tgz", + "integrity": "sha512-o1OMBVdeKCK7b+L1VUW1w1+KIi1DTP7Po+SAJ3vwPqRG6xD2eTL+w5IaFHVue3dVjnlU8Z+9y3BP3AadmK0H9w==", "peer": true }, "balanced-match": { @@ -26074,13 +26074,13 @@ } }, "jsonpath-plus": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/jsonpath-plus/-/jsonpath-plus-10.1.0.tgz", - "integrity": "sha512-gHfV1IYqH8uJHYVTs8BJX1XKy2/rR93+f8QQi0xhx95aCiXn1ettYAd5T+7FU6wfqyDoX/wy0pm/fL3jOKJ9Lg==", + "version": "10.3.0", + "resolved": "https://registry.npmjs.org/jsonpath-plus/-/jsonpath-plus-10.3.0.tgz", + "integrity": "sha512-8TNmfeTCk2Le33A3vRRwtuworG/L5RrgMvdjhKZxvyShO+mBu2fP50OWUjRLNtvw344DdDarFh9buFAZs5ujeA==", "requires": { - "@jsep-plugin/assignment": "^1.2.1", - "@jsep-plugin/regex": "^1.0.3", - "jsep": "^1.3.9" + "@jsep-plugin/assignment": "^1.3.0", + "@jsep-plugin/regex": "^1.0.4", + "jsep": "^1.4.0" } }, "jsonpointer": { diff --git a/examples/react/babylonjs/laptop-holder/package.json b/examples/react/babylonjs/laptop-holder/package.json index 4935f85fd..8d88d1b63 100644 --- a/examples/react/babylonjs/laptop-holder/package.json +++ b/examples/react/babylonjs/laptop-holder/package.json @@ -16,7 +16,7 @@ "react-scripts": "5.0.1", "typescript": "^4.6.2", "web-vitals": "^2.1.4", - "@bitbybit-dev/babylonjs": "0.21.0", + "@bitbybit-dev/babylonjs": "0.21.1", "file-loader": "6.2.0", "@mui/icons-material": "5.6.2", "@mui/material": "5.6.4", diff --git a/examples/react/threejs/vase/package-lock.json b/examples/react/threejs/vase/package-lock.json index 6fff5bd8d..5b7e0822c 100644 --- a/examples/react/threejs/vase/package-lock.json +++ b/examples/react/threejs/vase/package-lock.json @@ -9,7 +9,7 @@ "version": "0.1.0", "dependencies": { "@babel/plugin-proposal-private-property-in-object": "7.21.11", - "@bitbybit-dev/threejs": "0.21.0", + "@bitbybit-dev/threejs": "0.21.1", "@emotion/react": "11.11.0", "@emotion/styled": "11.11.0", "@mui/icons-material": "5.11.16", @@ -1995,33 +1995,33 @@ "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==" }, "node_modules/@bitbybit-dev/base": { - "version": "0.21.0", - "resolved": "https://registry.npmjs.org/@bitbybit-dev/base/-/base-0.21.0.tgz", - "integrity": "sha512-dNfsf2tu3/QUD1mvZzzTze8RwHyK2Jrt+Ary8EDKdNKMw+abtCpQYNerdrg0ZQPxvwu/OOQz6N1xCsCwsPkQJg==", + "version": "0.21.1", + "resolved": "https://registry.npmjs.org/@bitbybit-dev/base/-/base-0.21.1.tgz", + "integrity": "sha512-d3aHPpLHigeNTceMi0U/wOIzCqkvHg8S2gNa4b8VGSTifbn7Fo1XbQ2pzetbcOtwtJhkcLgNYn3nFqW8S2MUpw==", "license": "MIT" }, "node_modules/@bitbybit-dev/core": { - "version": "0.21.0", - "resolved": "https://registry.npmjs.org/@bitbybit-dev/core/-/core-0.21.0.tgz", - "integrity": "sha512-IbeQ8ROreu0/RkkngUE+Eb19ecvqKOWhGefXvIqQmplxt3zEc0FI4Kw8wR3vYl2XMannuVt1xAIYtqqH0tjBzg==", + "version": "0.21.1", + "resolved": "https://registry.npmjs.org/@bitbybit-dev/core/-/core-0.21.1.tgz", + "integrity": "sha512-Zr2w4h1eBRgOHevKevTaDeL1KlOju6Q8uT62zLeKAAAAn5P1RNn2jOVnHEJtd7y4wPn7G2rZwlwtBQlYe5t9AQ==", "license": "MIT", "dependencies": { - "@bitbybit-dev/base": "0.21.0", - "@bitbybit-dev/jscad-worker": "0.21.0", - "@bitbybit-dev/manifold-worker": "0.21.0", - "@bitbybit-dev/occt-worker": "0.21.0", - "jsonpath-plus": "10.1.0", + "@bitbybit-dev/base": "0.21.1", + "@bitbybit-dev/jscad-worker": "0.21.1", + "@bitbybit-dev/manifold-worker": "0.21.1", + "@bitbybit-dev/occt-worker": "0.21.1", + "jsonpath-plus": "10.3.0", "rxjs": "7.5.5", "verb-nurbs-web": "2.1.3" } }, "node_modules/@bitbybit-dev/jscad": { - "version": "0.21.0", - "resolved": "https://registry.npmjs.org/@bitbybit-dev/jscad/-/jscad-0.21.0.tgz", - "integrity": "sha512-Q7eE2ILrJRstW4L1711aJZdpwPf1kuhZJqB+KLkkBLsneRsGsh82lBcCbVYAOMuF/q8Lnd4JHxPiIG/m+LYmPQ==", + "version": "0.21.1", + "resolved": "https://registry.npmjs.org/@bitbybit-dev/jscad/-/jscad-0.21.1.tgz", + "integrity": "sha512-nw8dHGYy3GPXoX0xLZeVsB0Z013mzIy4GoniLKvzN7ApnTruPxSFisxrvFajCcQpL5UbU8SW4k+LhJDI8FTlRg==", "license": "MIT", "dependencies": { - "@bitbybit-dev/base": "0.21.0", + "@bitbybit-dev/base": "0.21.1", "@jscad/3mf-serializer": "2.1.12", "@jscad/dxf-serializer": "2.1.18", "@jscad/io-utils": "2.0.28", @@ -2030,61 +2030,61 @@ } }, "node_modules/@bitbybit-dev/jscad-worker": { - "version": "0.21.0", - "resolved": "https://registry.npmjs.org/@bitbybit-dev/jscad-worker/-/jscad-worker-0.21.0.tgz", - "integrity": "sha512-nIvd7GH5Gg51u6PmFXOADXVYTIvixTkNf0YapS1uix7D2JS9Mx10Z4wHAeRKzvJxUAAbEPPRFNkakE22HFGtLQ==", + "version": "0.21.1", + "resolved": "https://registry.npmjs.org/@bitbybit-dev/jscad-worker/-/jscad-worker-0.21.1.tgz", + "integrity": "sha512-ccaXGTnKseWGDGEdgf3HfQqBWmM4Q384NQWO2kdzZ4EHaZlSp9tEHY8NHOxyxPoMol+qK9u9puH4ux13zY+FrQ==", "license": "MIT", "dependencies": { - "@bitbybit-dev/jscad": "0.21.0", + "@bitbybit-dev/jscad": "0.21.1", "rxjs": "7.5.5" } }, "node_modules/@bitbybit-dev/manifold": { - "version": "0.21.0", - "resolved": "https://registry.npmjs.org/@bitbybit-dev/manifold/-/manifold-0.21.0.tgz", - "integrity": "sha512-DPpwK9ESB+auDeAbzXcfWRVEzWoMDkpkjc+/uwh+zuSiHSx92PSkzx1/LVTbQCsK+aOfOOy03HQCF5Bu2KQYtw==", + "version": "0.21.1", + "resolved": "https://registry.npmjs.org/@bitbybit-dev/manifold/-/manifold-0.21.1.tgz", + "integrity": "sha512-/UqejYCN9YIyBzf5yQXPdSawoKqEUd1aQAKdmge4LoUaZ19eQyRHLK4WpZQ8K+7lTr7qcNQARr7mLx0FQMBFew==", "license": "MIT", "dependencies": { - "@bitbybit-dev/base": "0.21.0", + "@bitbybit-dev/base": "0.21.1", "manifold-3d": "3.3.2" } }, "node_modules/@bitbybit-dev/manifold-worker": { - "version": "0.21.0", - "resolved": "https://registry.npmjs.org/@bitbybit-dev/manifold-worker/-/manifold-worker-0.21.0.tgz", - "integrity": "sha512-6Cqv3BP+uI8mHKHI6Jx9TzCxRg1/kMHhCe18+B3KD/rTl9B5mnScCKRBnDansR3bH7aYZGnIw9PmiFnWLkQWEQ==", + "version": "0.21.1", + "resolved": "https://registry.npmjs.org/@bitbybit-dev/manifold-worker/-/manifold-worker-0.21.1.tgz", + "integrity": "sha512-A+oV172dZzehkeF5kdCFzQuyyfj9FLixq5nGNviOpJX3zaF+0efl1ung1o45V5pLtZkuGCgCZaQ6lY0zNQcYig==", "license": "MIT", "dependencies": { - "@bitbybit-dev/manifold": "0.21.0", + "@bitbybit-dev/manifold": "0.21.1", "rxjs": "7.5.5" } }, "node_modules/@bitbybit-dev/occt": { - "version": "0.21.0", - "resolved": "https://registry.npmjs.org/@bitbybit-dev/occt/-/occt-0.21.0.tgz", - "integrity": "sha512-vPu3NmF1kBZMOkOdysolGfFxEEnwdHNGORoX3eWbMWT2JL/Tag5Q2CAc5jwa2VvZnS1nE/9x+DVlFQSo8LQnIg==", + "version": "0.21.1", + "resolved": "https://registry.npmjs.org/@bitbybit-dev/occt/-/occt-0.21.1.tgz", + "integrity": "sha512-0+yffQRmph9W1qLSyRBUvaQDiZ9OHA2kD2/LsCgxR3NVtKs3GZaAYYhoUfaRqtt2I8Go99e8WBB5daaQceudjA==", "license": "MIT", "dependencies": { - "@bitbybit-dev/base": "0.21.0" + "@bitbybit-dev/base": "0.21.1" } }, "node_modules/@bitbybit-dev/occt-worker": { - "version": "0.21.0", - "resolved": "https://registry.npmjs.org/@bitbybit-dev/occt-worker/-/occt-worker-0.21.0.tgz", - "integrity": "sha512-xG1sgo6q/RdVA8AgG72wPe4qxcQlrO1V7/Ksn6MqIhZVTsJcm5RbVYlK+nziIWhvlMc1sKE0GNQFcPdALISLuQ==", + "version": "0.21.1", + "resolved": "https://registry.npmjs.org/@bitbybit-dev/occt-worker/-/occt-worker-0.21.1.tgz", + "integrity": "sha512-3BW0lTiY8muPSiCWplAT/VQHaHFVUvljMGD1ynQo7cqv/Zna9ACn+SHOMY2HJ7m1MnZq5d2dGjJJXo8k19iV8Q==", "license": "MIT", "dependencies": { - "@bitbybit-dev/occt": "0.21.0", + "@bitbybit-dev/occt": "0.21.1", "rxjs": "7.5.5" } }, "node_modules/@bitbybit-dev/threejs": { - "version": "0.21.0", - "resolved": "https://registry.npmjs.org/@bitbybit-dev/threejs/-/threejs-0.21.0.tgz", - "integrity": "sha512-p0fHuLTjoXs3UIWoC2TFUBAhu0F4sTPU//PCvwwPLmLrbrVmpEFV61tGs0739hbU4eKS5goCTUM99RfjbRxW6A==", + "version": "0.21.1", + "resolved": "https://registry.npmjs.org/@bitbybit-dev/threejs/-/threejs-0.21.1.tgz", + "integrity": "sha512-BXQXMB0QIpvUNCRuVM6KJKn0Of/XBY0+Mt+GlyBe/s0Npk5XX9D4WYUX4A7byKGfhQxE/+FczLGs4ibcuipfmA==", "license": "MIT", "dependencies": { - "@bitbybit-dev/core": "0.21.0", + "@bitbybit-dev/core": "0.21.1", "three": "0.182.0" } }, @@ -13008,14 +13008,14 @@ } }, "node_modules/jsonpath-plus": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/jsonpath-plus/-/jsonpath-plus-10.1.0.tgz", - "integrity": "sha512-gHfV1IYqH8uJHYVTs8BJX1XKy2/rR93+f8QQi0xhx95aCiXn1ettYAd5T+7FU6wfqyDoX/wy0pm/fL3jOKJ9Lg==", + "version": "10.3.0", + "resolved": "https://registry.npmjs.org/jsonpath-plus/-/jsonpath-plus-10.3.0.tgz", + "integrity": "sha512-8TNmfeTCk2Le33A3vRRwtuworG/L5RrgMvdjhKZxvyShO+mBu2fP50OWUjRLNtvw344DdDarFh9buFAZs5ujeA==", "license": "MIT", "dependencies": { - "@jsep-plugin/assignment": "^1.2.1", - "@jsep-plugin/regex": "^1.0.3", - "jsep": "^1.3.9" + "@jsep-plugin/assignment": "^1.3.0", + "@jsep-plugin/regex": "^1.0.4", + "jsep": "^1.4.0" }, "bin": { "jsonpath": "bin/jsonpath-cli.js", @@ -16460,10 +16460,13 @@ } }, "node_modules/sax": { - "version": "1.4.3", - "resolved": "https://registry.npmjs.org/sax/-/sax-1.4.3.tgz", - "integrity": "sha512-yqYn1JhPczigF94DMS+shiDMjDowYO6y9+wB/4WgO0Y19jWYk0lQ4tuG5KI7kj4FTp1wxPj5IFfcrz/s1c3jjQ==", - "license": "BlueOak-1.0.0" + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/sax/-/sax-1.4.4.tgz", + "integrity": "sha512-1n3r/tGXO6b6VXMdFT54SHzT9ytu9yr7TaELowdYpMqY/Ao7EnlQGmAQ1+RatX7Tkkdm6hONI2owqNx2aZj5Sw==", + "license": "BlueOak-1.0.0", + "engines": { + "node": ">=11.0.0" + } }, "node_modules/saxes": { "version": "5.0.1", diff --git a/examples/react/threejs/vase/package.json b/examples/react/threejs/vase/package.json index 0356dbcab..8cbc55945 100644 --- a/examples/react/threejs/vase/package.json +++ b/examples/react/threejs/vase/package.json @@ -4,7 +4,7 @@ "private": true, "homepage": "https://app-store.bitbybit.dev/bitbybit-threejs", "dependencies": { - "@bitbybit-dev/threejs": "0.21.0", + "@bitbybit-dev/threejs": "0.21.1", "@testing-library/jest-dom": "5.16.5", "@testing-library/react": "14.0.0", "@testing-library/user-event": "14.4.3", diff --git a/examples/runner/babylon/full/inline-include/index.html b/examples/runner/babylon/full/inline-include/index.html index fd54a69b0..b84bd7f57 100644 --- a/examples/runner/babylon/full/inline-include/index.html +++ b/examples/runner/babylon/full/inline-include/index.html @@ -34,7 +34,7 @@ // This function simply outputs the script that was exported from the Rete editor by clicking "Export to Runner" and selecting Minify option. function exportedScript() { - return '{\"type\":\"rete\",\"version\":\"0.21.0\",\"script\":\"!async function(e,t,s,n,r){let a={};a={x:[0],y:[0],z:[1],...a};const o=[{result:e.HS.executeBasedOnType(a,!1,(e=>t.vector.vectorXYZ(e))),transformers:[]}];let i={};i={text:[\\"[true,false]\\"],...i};const c=[{result:e.HS.executeBasedOnType(i,!1,(e=>t.json.parse(e))),transformers:[]}];let p={};p={text:[\\"[false,true]\\"],...p};const u=[{result:e.HS.executeBasedOnType(p,!1,(e=>t.json.parse(e))),transformers:[]}],l=[{result:[5],transformers:[]}];let d={};d={x:[1],y:[0],z:[0],...d};const m=[{result:e.HS.executeBasedOnType(d,!1,(e=>t.vector.vectorXYZ(e))),transformers:[]}],y=[{result:[12],transformers:[]}],S=[{result:[7],transformers:[]}];let H={};H={x:[0],y:[1],z:[0],...H};const f=[{result:e.HS.executeBasedOnType(H,!1,(e=>t.vector.vectorXYZ(e))),transformers:[]}];let h={};h={x:[0],y:[0],z:[1],...h};const x=[{result:e.HS.executeBasedOnType(h,!1,(e=>t.vector.vectorXYZ(e))),transformers:[]}];let v={};v={number:[.4],...v};const O=[{result:e.HS.executeBasedOnType(v,!1,(e=>t.math.number(e))),transformers:[]}];let I={};I={x:[0],y:[0],z:[-1],...I};const L=[{result:e.HS.executeBasedOnType(I,!1,(e=>t.vector.vectorXYZ(e))),transformers:[]}];let B={};B={x:[0],y:[0],z:[-2],...B};const w=[{result:e.HS.executeBasedOnType(B,!1,(e=>t.vector.vectorXYZ(e))),transformers:[]}];let T={};T={x:[0],y:[0],z:[1],...T};const g=[{result:e.HS.executeBasedOnType(T,!1,(e=>t.vector.vectorXYZ(e))),transformers:[]}];let A={};A={x:[0],y:[1.5],z:[0],...A};const E=[{result:e.HS.executeBasedOnType(A,!1,(e=>t.vector.vectorXYZ(e))),transformers:[]}];let b={};b={...{faceOpacity:[.5],edgeOpacity:[.5],edgeColour:[\\"#000000\\"],faceColour:[\\"#212121\\"],vertexColour:[\\"#ff00ff\\"],faceMaterial:[void 0],edgeWidth:[2],vertexSize:[.03],drawEdges:[!0],drawFaces:[!0],drawVertices:[!1],precision:[.02],drawEdgeIndexes:[!1],edgeIndexHeight:[.06],edgeIndexColour:[\\"ff00ff\\"],drawFaceIndexes:[!1],faceIndexHeight:[.06],faceIndexColour:[\\"#0000ff\\"]},...b};const z=[{result:e.HS.executeBasedOnType(b,!1,(e=>t.draw.optionsOcctShape(e))),transformers:[]}];let W={};W={name:[\\"Custom Material\\"],baseColor:[\\"#9c9cba\\"],emissiveColor:[\\"#000000\\"],metallic:[.9],roughness:[.1],alpha:[1],backFaceCulling:[!1],zOffset:[2],...W};const C=[{result:e.HS.executeBasedOnType(W,!1,(e=>t.babylon.material.pbrMetallicRoughness.create(e))),transformers:[]}];let P={};P={x:[0],y:[0],z:[-1],...P};const X=[{result:e.HS.executeBasedOnType(P,!1,(e=>t.vector.vectorXYZ(e))),transformers:[]}];let Y={};Y={x:[0],y:[0],z:[-1.5],...Y};const Z=[{result:e.HS.executeBasedOnType(Y,!1,(e=>t.vector.vectorXYZ(e))),transformers:[]}];let N={};N={x:[0],y:[0],z:[1],...N};const k=[{result:e.HS.executeBasedOnType(N,!1,(e=>t.vector.vectorXYZ(e))),transformers:[]}];let M={};M={skybox:[\\"city\\"],size:[1e3],blur:[.4],environmentIntensity:[.4],...M};e.HS.executeBasedOnType(M,!1,(e=>t.babylon.scene.enableSkybox(e)));let F={number:[{result:[20],transformers:[]}]};e.HS.updateListInputs(F),F={number:[20],...F};const D=[{result:e.HS.executeBasedOnType(F,!1,(e=>t.math.number(e))),transformers:[]}];let R={};R.y=y,e.HS.updateListInputs(R),R={x:[0],y:[0],z:[0],...R};const j=[{result:e.HS.executeBasedOnType(R,!1,(e=>t.vector.vectorXYZ(e))),transformers:[]}];let q={};q.item=y,e.HS.updateListInputs(q),q={...q};const V=[{result:q.item}];let G={};G.first=S,e.HS.updateListInputs(G),G={first:[1],second:[-2],operation:[\\"divide\\"],...G};const J=[{result:e.HS.executeBasedOnType(G,!1,(e=>t.math.twoNrOperation(e))),transformers:[]}];let K={};K.first=S,e.HS.updateListInputs(K),K={first:[1],second:[-4],operation:[\\"divide\\"],...K};const Q=[{result:e.HS.executeBasedOnType(K,!1,(e=>t.math.twoNrOperation(e))),transformers:[]}];let U={};U.first=y,U.second=O,e.HS.updateListInputs(U),U={first:[1],second:[.4],operation:[\\"add\\"],...U};const $=[{result:e.HS.executeBasedOnType(U,!1,(e=>t.math.twoNrOperation(e))),transformers:[]}];let _={};_.item=S,e.HS.updateListInputs(_),_={..._};const ee=[{result:_.item}],te={faceOpacity:[1],edgeOpacity:[1],edgeColour:[\\"#1c1c1c\\"],faceColour:[\\"#bdbdbd\\"],vertexColour:[\\"#ff00ff\\"],faceMaterial:[void 0],edgeWidth:[2],vertexSize:[.03],drawEdges:[!0],drawFaces:[!0],drawVertices:[!1],precision:[.01],drawEdgeIndexes:[!1],edgeIndexHeight:[.06],edgeIndexColour:[\\"ff00ff\\"],drawFaceIndexes:[!1],faceIndexHeight:[.06],faceIndexColour:[\\"#0000ff\\"]};let se={};se.faceMaterial=C,e.HS.updateListInputs(se),se={...te,...se};const ne=[{result:e.HS.executeBasedOnType(se,!1,(e=>t.draw.optionsOcctShape(e))),transformers:[]}];let re={};re.center=Z,re.direction=X,e.HS.updateListInputs(re),re={radius:[3],height:[1.9],center:[[0,0,0]],direction:[[0,1,0]],...re};const ae=[{result:await e.HS.executeBasedOnTypeAsync(re,!1,(e=>t.occt.shapes.solid.createCylinder(e))),transformers:[]}];let oe={};oe.y=$,e.HS.updateListInputs(oe),oe={x:[0],y:[12],z:[0],...oe};const ie=[{result:e.HS.executeBasedOnType(oe,!1,(e=>t.vector.vectorXYZ(e))),transformers:[]}];let ce={};ce.first=D,e.HS.updateListInputs(ce),ce={first:[1],second:[3],operation:[\\"multiply\\"],...ce};const pe=[{result:e.HS.executeBasedOnType(ce,!1,(e=>t.math.twoNrOperation(e))),transformers:[]}];let ue={};ue.first=V,ue.second=O,e.HS.updateListInputs(ue),ue={first:[1],second:[.4],operation:[\\"add\\"],...ue};const le=[{result:e.HS.executeBasedOnType(ue,!1,(e=>t.math.twoNrOperation(e))),transformers:[]}];let de={};de.first=V,de.second=O,e.HS.updateListInputs(de),de={first:[1],second:[.4],operation:[\\"subtract\\"],...de};const me=[{result:e.HS.executeBasedOnType(de,!1,(e=>t.math.twoNrOperation(e))),transformers:[]}];let ye={};ye.first=ee,e.HS.updateListInputs(ye),ye={first:[1],second:[-.2],operation:[\\"multiply\\"],...ye};const Se=[{result:e.HS.executeBasedOnType(ye,!1,(e=>t.math.twoNrOperation(e))),transformers:[]}];let He={};He.second=D,e.HS.updateListInputs(He),He={first:[360],second:[1],operation:[\\"divide\\"],...He};const fe=[{result:e.HS.executeBasedOnType(He,!1,(e=>t.math.twoNrOperation(e))),transformers:[]}],he={shape:[void 0],radius:[.3],radiusList:[void 0],indexes:[void 0]};let xe={};xe.shape=ae,e.HS.updateListInputs(xe),xe={...he,...xe};const ve=[{result:await e.HS.executeBasedOnTypeAsync(xe,!1,(e=>t.occt.fillets.filletEdges(e))),transformers:[]}];let Oe={};Oe.start=L,Oe.end=ie,e.HS.updateListInputs(Oe),Oe={start:[[0,0,0]],end:[[0,1,0]],...Oe};const Ie=[{result:await e.HS.executeBasedOnTypeAsync(Oe,!1,(e=>t.occt.shapes.wire.createLineWire(e))),transformers:[]}];let Le={};Le.second=pe,e.HS.updateListInputs(Le),Le={first:[360],second:[1],operation:[\\"divide\\"],...Le};const Be=[{result:e.HS.executeBasedOnType(Le,!1,(e=>t.math.twoNrOperation(e))),transformers:[]}];let we={};we.start=w,we.end=ie,e.HS.updateListInputs(we),we={start:[[0,0,0]],end:[[0,1,0]],...we};const Te=[{result:await e.HS.executeBasedOnTypeAsync(we,!1,(e=>t.occt.shapes.wire.createLineWire(e))),transformers:[]}];let ge={};ge.y=le,e.HS.updateListInputs(ge),ge={x:[0],y:[0],z:[.05],...ge};const Ae=[{result:e.HS.executeBasedOnType(ge,!1,(e=>t.vector.vectorXYZ(e))),transformers:[]}];let Ee={};Ee.y=me,Ee.z=Q,e.HS.updateListInputs(Ee),Ee={x:[0],y:[0],z:[-1],...Ee};const be=[{result:e.HS.executeBasedOnType(Ee,!1,(e=>t.vector.vectorXYZ(e))),transformers:[]}];let ze={};ze.y=me,ze.z=J,e.HS.updateListInputs(ze),ze={x:[0],y:[0],z:[0],...ze};const We=[{result:e.HS.executeBasedOnType(ze,!1,(e=>t.vector.vectorXYZ(e))),transformers:[]}];let Ce={};Ce.z=Se,e.HS.updateListInputs(Ce),Ce={x:[0],y:[0],z:[0],...Ce};const Pe=[{result:e.HS.executeBasedOnType(Ce,!1,(e=>t.vector.vectorXYZ(e))),transformers:[]}];let Xe={};Xe.step=fe,e.HS.updateListInputs(Xe),Xe={step:[.1],min:[0],max:[360],...Xe};const Ye=e.HS.executeBasedOnType(Xe,!1,(e=>t.vector.span(e))),Ze=[];for(let e=0;e<1;e++)Ze.push({type:\\"flat\\"});const Ne=[{result:Ye,transformers:Ze}];let ke={};ke.first=Se,e.HS.updateListInputs(ke),ke={first:[2],second:[-2],operation:[\\"multiply\\"],...ke};e.HS.executeBasedOnType(ke,!1,(e=>t.math.twoNrOperation(e)));let Me={};Me.listElements=ve,e.HS.updateListInputs(Me),Me={...Me};const Fe=[{result:[Me.listElements?Me.listElements:[]]}],De={shape:[void 0],axis:[[0,0,1]],angle:[0]};let Re={};Re.shape=Ie,Re.axis=o,Re.angle=Be,e.HS.updateListInputs(Re),Re={...De,...Re};const je=[{result:await e.HS.executeBasedOnTypeAsync(Re,!1,(e=>t.occt.transforms.rotate(e))),transformers:[]}];let qe={};qe.first=Be,e.HS.updateListInputs(qe),qe={first:[1],second:[.4],operation:[\\"multiply\\"],...qe};const Ve=[{result:e.HS.executeBasedOnType(qe,!1,(e=>t.math.twoNrOperation(e))),transformers:[]}];let Ge={};Ge.first=Be,e.HS.updateListInputs(Ge),Ge={first:[1],second:[.6],operation:[\\"multiply\\"],...Ge};const Je=[{result:e.HS.executeBasedOnType(Ge,!1,(e=>t.math.twoNrOperation(e))),transformers:[]}];let Ke={};Ke.listElements=[Ae[0],j[0],be[0],We[0]],e.HS.updateListInputs(Ke),Ke={...Ke};const Qe=[{result:[Ke.listElements?Ke.listElements:[]]}];let Ue={};Ue.item=Ne,e.HS.updateListInputs(Ue),Ue={...Ue};const $e=[{result:Ue.item}],_e={shape:[void 0],nrOfDivisions:[11],removeStartPoint:[!1],removeEndPoint:[!1]};let et={};et.shape=je,et.nrOfDivisions=l,e.HS.updateListInputs(et),et={..._e,...et};const tt=[{result:await e.HS.executeBasedOnTypeAsync(et,!1,(e=>t.occt.shapes.wire.divideWireByEqualDistanceToPoints(e))),transformers:[]}],st={shape:[void 0],axis:[[0,0,1]],angle:[0]};let nt={};nt.shape=Te,nt.axis=o,nt.angle=[Ve[0],Je[0]],e.HS.updateListInputs(nt),nt={...st,...nt};const rt=[{result:await e.HS.executeBasedOnTypeAsync(nt,!1,(e=>t.occt.transforms.rotate(e))),transformers:[]}];let at={};at.number=Ve,e.HS.updateListInputs(at),at={number:[1],operation:[\\"negate\\"],...at};const ot=[{result:e.HS.executeBasedOnType(at,!1,(e=>t.math.oneNrOperation(e))),transformers:[]}],it={points:[void 0]};let ct={};ct.points=Qe,e.HS.updateListInputs(ct),ct={...it,...ct};const pt=[{result:await e.HS.executeBasedOnTypeAsync(ct,!1,(e=>t.occt.shapes.wire.createPolylineWire(e))),transformers:[]}];e.HS.drawNodeMeshes(pt,t);const ut={list:[void 0],pattern:[[!0,!0,!1]]};let lt={};lt.list=tt,lt.pattern=u,e.HS.updateListInputs(lt),lt={...ut,...lt};const dt=[{result:e.HS.executeBasedOnType(lt,!0,(e=>t.lists.getByPattern(e))),transformers:[]}];let mt={};mt.listElements=rt,e.HS.updateListInputs(mt),mt={...mt};const yt=[{result:[mt.listElements?mt.listElements:[]]}],St={shape:[void 0],origin:[[0,0,0]],direction:[[0,0,1]]};let Ht={};Ht.shape=pt,Ht.origin=We,Ht.direction=f,e.HS.updateListInputs(Ht),Ht={...St,...Ht};const ft=[{result:await e.HS.executeBasedOnTypeAsync(Ht,!1,(e=>t.occt.transforms.mirror(e))),transformers:[]}],ht={shape:[void 0]};let xt={};xt.shape=pt,e.HS.updateListInputs(xt),xt={...ht,...xt};const vt=await e.HS.executeBasedOnTypeAsync(xt,!1,(e=>t.occt.shapes.edge.getCornerPointsOfEdgesForShape(e))),Ot=[];for(let e=0;e<1;e++)Ot.push({type:\\"flat\\"});const It=[{result:vt,transformers:Ot}],Lt={list:[void 0],index:[0],clone:[!0]};let Bt={};Bt.list=yt,e.HS.updateListInputs(Bt),Bt={...Lt,...Bt};const wt=[{result:e.HS.executeBasedOnType(Bt,!1,(e=>t.lists.getItem(e))),transformers:[]}],Tt={shape:[void 0]};let gt={};gt.shape=ft,e.HS.updateListInputs(gt),gt={...Tt,...gt};const At=[{result:await e.HS.executeBasedOnTypeAsync(gt,!1,(e=>t.occt.shapes.edge.getCornerPointsOfEdgesForShape(e))),transformers:[]}],Et={shape:[void 0],nrOfDivisions:[11],removeStartPoint:[!1],removeEndPoint:[!1]};let bt={};bt.shape=wt,bt.nrOfDivisions=l,e.HS.updateListInputs(bt),bt={...Et,...bt};const zt=[{result:await e.HS.executeBasedOnTypeAsync(bt,!1,(e=>t.occt.shapes.wire.divideWireByEqualDistanceToPoints(e))),transformers:[]}],Wt={list:[void 0],index:[3],clone:[!0]};let Ct={};Ct.list=At,e.HS.updateListInputs(Ct),Ct={...Wt,...Ct};const Pt=[{result:e.HS.executeBasedOnType(Ct,!1,(e=>t.lists.removeItemAtIndex(e))),transformers:[]}],Xt={list:[void 0],pattern:[[!0,!0,!1]]};let Yt={};Yt.list=zt,Yt.pattern=c,e.HS.updateListInputs(Yt),Yt={...Xt,...Yt};const Zt=[{result:e.HS.executeBasedOnType(Yt,!1,(e=>t.lists.getByPattern(e))),transformers:[]}],Nt={list:[void 0],clone:[!0]};let kt={};kt.list=Pt,e.HS.updateListInputs(kt),kt={...Nt,...kt};const Mt=e.HS.executeBasedOnType(kt,!1,(e=>t.lists.reverse(e))),Ft=[];for(let e=0;e<1;e++)Ft.push({type:\\"flat\\"});const Dt=[{result:Mt,transformers:Ft}];let Rt={};Rt.listElements=[Zt[0],dt[0]],e.HS.updateListInputs(Rt),Rt={...Rt};const jt=[{result:[Rt.listElements?Rt.listElements:[]]}];let qt={};qt.listElements=[It[0],Dt[0]],e.HS.updateListInputs(qt),qt={...qt};const Vt=[{result:[qt.listElements?qt.listElements:[]]}],Gt={list:[void 0],clone:[!0]};let Jt={};Jt.list=jt,e.HS.updateListInputs(Jt),Jt={...Gt,...Jt};const Kt=e.HS.executeBasedOnType(Jt,!1,(e=>t.lists.flipLists(e))),Qt=[];for(let e=0;e<2;e++)Qt.push({type:\\"flat\\"});const Ut=[{result:Kt,transformers:Qt}],$t={points:[void 0]};let _t={};_t.points=Vt,e.HS.updateListInputs(_t),_t={...$t,..._t};const es=[{result:await e.HS.executeBasedOnTypeAsync(_t,!1,(e=>t.occt.shapes.wire.createPolylineWire(e))),transformers:[]}];let ts={};ts.listElements=Ut,e.HS.updateListInputs(ts),ts={...ts};const ss=[{result:[ts.listElements?ts.listElements:[]]}],ns={shape:[void 0],radius:[.3],radiusList:[void 0],indexes:[void 0]};let rs={};rs.shape=es,e.HS.updateListInputs(rs),rs={...ns,...rs};const as=[{result:await e.HS.executeBasedOnTypeAsync(rs,!1,(e=>t.occt.fillets.fillet2d(e))),transformers:[]}],os={points:[void 0]};let is={};is.points=ss,e.HS.updateListInputs(is),is={...os,...is};const cs=[{result:await e.HS.executeBasedOnTypeAsync(is,!1,(e=>t.occt.shapes.wire.createPolylineWire(e))),transformers:[]}],ps={shape:[void 0],angle:[360],direction:[[0,1,0]],copy:[!1]};let us={};us.shape=as,us.direction=x,e.HS.updateListInputs(us),us={...ps,...us};const ls=[{result:await e.HS.executeBasedOnTypeAsync(us,!1,(e=>t.occt.operations.revolve(e))),transformers:[]}],ds={shape:[void 0]};let ms={};ms.shape=as,e.HS.updateListInputs(ms),ms={...ds,...ms};const ys=[{result:await e.HS.executeBasedOnTypeAsync(ms,!1,(e=>t.occt.shapes.wire.startPointOnWire(e))),transformers:[]}],Ss={shape:[void 0]};let Hs={};Hs.shape=as,e.HS.updateListInputs(Hs),Hs={...Ss,...Hs};const fs=[{result:await e.HS.executeBasedOnTypeAsync(Hs,!1,(e=>t.occt.shapes.wire.endPointOnWire(e))),transformers:[]}],hs={shape:[void 0]};let xs={};xs.shape=as,e.HS.updateListInputs(xs),xs={...hs,...xs};const vs=[{result:await e.HS.executeBasedOnTypeAsync(xs,!1,(e=>t.occt.shapes.wire.closeOpenWire(e))),transformers:[]}],Os={shape:[void 0],angle:[360],direction:[[0,1,0]],copy:[!1]};let Is={};Is.shape=vs,Is.direction=x,e.HS.updateListInputs(Is),Is={...Os,...Is};const Ls=[{result:await e.HS.executeBasedOnTypeAsync(Is,!1,(e=>t.occt.operations.revolve(e))),transformers:[]}],Bs={shape:[void 0],radius:[1],radiusList:[void 0],indexes:[void 0],direction:[[0,1,0]]};let ws={};ws.shape=cs,ws.direction=g,e.HS.updateListInputs(ws),ws={...Bs,...ws};const Ts=[{result:await e.HS.executeBasedOnTypeAsync(ws,!1,(e=>t.occt.fillets.fillet3DWire(e))),transformers:[]}],gs={shape:[void 0],face:[void 0],distance:[-.2],tolerance:[.1]};let As={};As.shape=ls,e.HS.updateListInputs(As),As={...gs,...As};const Es=[{result:await e.HS.executeBasedOnTypeAsync(As,!1,(e=>t.occt.operations.offset(e))),transformers:[]}],bs={shape:[void 0],index:[0]};let zs={};zs.shape=ls,e.HS.updateListInputs(zs),zs={...bs,...zs};const Ws=[{result:await e.HS.executeBasedOnTypeAsync(zs,!1,(e=>t.occt.shapes.wire.getWire(e))),transformers:[]}];let Cs={};Cs.item=ys,e.HS.updateListInputs(Cs),Cs={...Cs};const Ps=[{result:Cs.item}];let Xs={};Xs.item=fs,e.HS.updateListInputs(Xs),Xs={...Xs};const Ys=[{result:Xs.item}];let Zs={};Zs.start=fs,Zs.end=ys,e.HS.updateListInputs(Zs),Zs={start:[[0,0,0]],end:[[0,1,0]],...Zs};const Ns=[{result:await e.HS.executeBasedOnTypeAsync(Zs,!1,(e=>t.occt.shapes.wire.createLineWire(e))),transformers:[]}];e.HS.drawNodeMeshes(Ns,t);const ks={shape:[void 0],angle:[360],direction:[[0,1,0]],copy:[!1]};let Ms={};Ms.shape=Ts,Ms.angle=ot,Ms.direction=o,e.HS.updateListInputs(Ms),Ms={...ks,...Ms};const Fs=[{result:await e.HS.executeBasedOnTypeAsync(Ms,!1,(e=>t.occt.operations.revolve(e))),transformers:[]}],Ds={shape:[void 0]};let Rs={};Rs.shape=Ls,e.HS.updateListInputs(Rs),Rs={...Ds,...Rs};const js=[{result:await e.HS.executeBasedOnTypeAsync(Rs,!1,(e=>t.occt.shapes.solid.fromClosedShell(e))),transformers:[]}],qs={shape:[void 0],index:[1]};let Vs={};Vs.shape=Ws,e.HS.updateListInputs(Vs),Vs={...qs,...Vs};const Gs=[{result:await e.HS.executeBasedOnTypeAsync(Vs,!1,(e=>t.occt.shapes.edge.getEdge(e))),transformers:[]}],Js={shape:[void 0],index:[0]};let Ks={};Ks.shape=Es,e.HS.updateListInputs(Ks),Ks={...Js,...Ks};const Qs=[{result:await e.HS.executeBasedOnTypeAsync(Ks,!1,(e=>t.occt.shapes.wire.getWire(e))),transformers:[]}],Us={shape:[void 0],translation:[[0,0,0]]};let $s={};$s.shape=Ns,$s.translation=E,e.HS.updateListInputs($s),$s={...Us,...$s};const _s=[{result:await e.HS.executeBasedOnTypeAsync($s,!1,(e=>t.occt.transforms.translate(e))),transformers:[]}],en={shape:[void 0],direction:[[0,1,0]]};let tn={};tn.shape=Fs,tn.direction=Pe,e.HS.updateListInputs(tn),tn={...en,...tn};const sn=[{result:await e.HS.executeBasedOnTypeAsync(tn,!1,(e=>t.occt.operations.extrude(e))),transformers:[]}];let nn={};nn.listElements=js,e.HS.updateListInputs(nn),nn={...nn};const rn=[{result:[nn.listElements?nn.listElements:[]]}],an={shape:[void 0],index:[1]};let on={};on.shape=Qs,e.HS.updateListInputs(on),on={...an,...on};const cn=[{result:await e.HS.executeBasedOnTypeAsync(on,!1,(e=>t.occt.shapes.edge.getEdge(e))),transformers:[]}];let pn={};pn.listElements=Gs,e.HS.updateListInputs(pn),pn={...pn};const un=[{result:[pn.listElements?pn.listElements:[]]}],ln={shape:[void 0]};let dn={};dn.shape=_s,e.HS.updateListInputs(dn),dn={...ln,...dn};const mn=[{result:await e.HS.executeBasedOnTypeAsync(dn,!1,(e=>t.occt.shapes.wire.startPointOnWire(e))),transformers:[]}],yn={shape:[void 0]};let Sn={};Sn.shape=_s,e.HS.updateListInputs(Sn),Sn={...yn,...Sn};const Hn=[{result:await e.HS.executeBasedOnTypeAsync(Sn,!1,(e=>t.occt.shapes.wire.endPointOnWire(e))),transformers:[]}],fn={shapes:[void 0]};let hn={};hn.shapes=un,e.HS.updateListInputs(hn),hn={...fn,...hn};const xn=[{result:await e.HS.executeBasedOnTypeAsync(hn,!1,(e=>t.occt.shapes.wire.combineEdgesAndWiresIntoAWire(e))),transformers:[]}];let vn={};vn.listElements=cn,e.HS.updateListInputs(vn),vn={...vn};const On=[{result:[vn.listElements?vn.listElements:[]]}],In={shape:[void 0],shapes:[void 0],keepEdges:[!1]};let Ln={};Ln.shape=sn,Ln.shapes=Fe,e.HS.updateListInputs(Ln),Ln={...In,...Ln};const Bn=[{result:await e.HS.executeBasedOnTypeAsync(Ln,!1,(e=>t.occt.booleans.difference(e))),transformers:[]}];let wn={};wn.item=Hn,e.HS.updateListInputs(wn),wn={...wn};const Tn=[{result:wn.item}];let gn={};gn.item=mn,e.HS.updateListInputs(gn),gn={...gn};const An=[{result:gn.item}],En={shape:[void 0],shapes:[void 0],keepEdges:[!1]};let bn={};bn.shape=Bn,bn.shapes=rn,e.HS.updateListInputs(bn),bn={...En,...bn};const zn=[{result:await e.HS.executeBasedOnTypeAsync(bn,!1,(e=>t.occt.booleans.difference(e))),transformers:[]}],Wn={shapes:[void 0]};let Cn={};Cn.shapes=On,e.HS.updateListInputs(Cn),Cn={...Wn,...Cn};const Pn=[{result:await e.HS.executeBasedOnTypeAsync(Cn,!1,(e=>t.occt.shapes.wire.combineEdgesAndWiresIntoAWire(e))),transformers:[]}];let Xn={};Xn.listElements=[Ps[0],Tn[0],An[0],Ys[0]],e.HS.updateListInputs(Xn),Xn={...Xn};const Yn=[{result:[Xn.listElements?Xn.listElements:[]]}],Zn={shape:[void 0],origin:[[0,0,0]],normal:[[0,0,1]]};let Nn={};Nn.shape=zn,Nn.normal=m,e.HS.updateListInputs(Nn),Nn={...Zn,...Nn};const kn=[{result:await e.HS.executeBasedOnTypeAsync(Nn,!1,(e=>t.occt.transforms.mirrorAlongNormal(e))),transformers:[]}];let Mn={};Mn.listElements=[xn[0],Pn[0]],e.HS.updateListInputs(Mn),Mn={...Mn};const Fn=[{result:[Mn.listElements?Mn.listElements:[]]}],Dn={points:[void 0]};let Rn={};Rn.points=Yn,e.HS.updateListInputs(Rn),Rn={...Dn,...Rn};const jn=[{result:await e.HS.executeBasedOnTypeAsync(Rn,!1,(e=>t.occt.shapes.wire.createPolylineWire(e))),transformers:[]}];let qn={};qn.listElements=[kn[0],zn[0]],e.HS.updateListInputs(qn),qn={...qn};const Vn=[{result:[qn.listElements?qn.listElements:[]]}],Gn={shapes:[void 0],makeSolid:[!1]};let Jn={};Jn.shapes=Fn,e.HS.updateListInputs(Jn),Jn={...Gn,...Jn};const Kn=[{result:await e.HS.executeBasedOnTypeAsync(Jn,!1,(e=>t.occt.operations.loft(e))),transformers:[]}],Qn={shape:[void 0],radius:[.5],radiusList:[void 0],indexes:[void 0]};let Un={};Un.shape=jn,e.HS.updateListInputs(Un),Un={...Qn,...Un};const $n=[{result:await e.HS.executeBasedOnTypeAsync(Un,!1,(e=>t.occt.fillets.fillet2d(e))),transformers:[]}],_n={shapes:[void 0]};let er={};er.shapes=Vn,e.HS.updateListInputs(er),er={..._n,...er};const tr=[{result:await e.HS.executeBasedOnTypeAsync(er,!1,(e=>t.occt.shapes.compound.makeCompound(e))),transformers:[]}],sr={shape:[void 0],origin:[[0,0,0]],direction:[[0,0,1]]};let nr={};nr.shape=Kn,nr.origin=We,nr.direction=f,e.HS.updateListInputs(nr),nr={...sr,...nr};const rr=[{result:await e.HS.executeBasedOnTypeAsync(nr,!1,(e=>t.occt.transforms.mirror(e))),transformers:[]}],ar={shape:[void 0],angle:[360],direction:[[0,1,0]],copy:[!1]};let or={};or.shape=$n,or.direction=x,e.HS.updateListInputs(or),or={...ar,...or};const ir=[{result:await e.HS.executeBasedOnTypeAsync(or,!1,(e=>t.occt.operations.revolve(e))),transformers:[]}];let cr={};cr.listElements=[ls[0],Es[0],Kn[0],rr[0]],e.HS.updateListInputs(cr),cr={...cr};const pr=[{result:[cr.listElements?cr.listElements:[]]}],ur={shape:[void 0],offset:[-.1]};let lr={};lr.shape=ir,e.HS.updateListInputs(lr),lr={...ur,...lr};const dr=[{result:await e.HS.executeBasedOnTypeAsync(lr,!1,(e=>t.occt.operations.makeThickSolidSimple(e))),transformers:[]}],mr={shape:[void 0],angle:[0],center:[[0,0,0]],axis:[[0,0,1]]};let yr={};yr.shape=tr,yr.angle=$e,yr.axis=k,e.HS.updateListInputs(yr),yr={...mr,...yr};const Sr=[{result:await e.HS.executeBasedOnTypeAsync(yr,!1,(e=>t.occt.transforms.rotateAroundCenter(e))),transformers:[]}],Hr={shapes:[void 0],tolerance:[1e-7]};let fr={};fr.shapes=pr,e.HS.updateListInputs(fr),fr={...Hr,...fr};const hr=[{result:await e.HS.executeBasedOnTypeAsync(fr,!1,(e=>t.occt.shapes.shell.sewFaces(e))),transformers:[]}],xr={entity:[void 0],options:[void 0],babylonMesh:[void 0]};let vr={};vr.entity=dr,vr.options=z,e.HS.updateListInputs(vr),vr={...xr,...vr};await e.HS.executeBasedOnTypeAsync(vr,!1,(e=>t.draw.drawAnyAsync(e)));let Or={};Or.listElements=Sr,e.HS.updateListInputs(Or),Or={...Or};const Ir=[{result:[Or.listElements?Or.listElements:[]]}],Lr={shapes:[void 0]};let Br={};Br.shapes=Ir,e.HS.updateListInputs(Br),Br={...Lr,...Br};const wr=[{result:await e.HS.executeBasedOnTypeAsync(Br,!1,(e=>t.occt.shapes.compound.makeCompound(e))),transformers:[]}];let Tr={};Tr.listElements=[hr[0],ve[0],wr[0]],e.HS.updateListInputs(Tr),Tr={...Tr};const gr=[{result:[Tr.listElements?Tr.listElements:[]]}],Ar={shapes:[void 0]};let Er={};Er.shapes=gr,e.HS.updateListInputs(Er),Er={...Ar,...Er};const br=[{result:await e.HS.executeBasedOnTypeAsync(Er,!1,(e=>t.occt.shapes.compound.makeCompound(e))),transformers:[]}],zr={entity:[void 0],options:[void 0],babylonMesh:[void 0]};let Wr={};Wr.entity=br,Wr.options=ne,e.HS.updateListInputs(Wr),Wr={...zr,...Wr};await e.HS.executeBasedOnTypeAsync(Wr,!1,(e=>t.draw.drawAnyAsync(e)))}(BitByBit,bitbybit,bitbybitRunnerResult,bitbybitRunnerInputs,Bit);\"}' + return '{\"type\":\"rete\",\"version\":\"0.21.1\",\"script\":\"!async function(e,t,s,n,r){let a={};a={x:[0],y:[0],z:[1],...a};const o=[{result:e.HS.executeBasedOnType(a,!1,(e=>t.vector.vectorXYZ(e))),transformers:[]}];let i={};i={text:[\\"[true,false]\\"],...i};const c=[{result:e.HS.executeBasedOnType(i,!1,(e=>t.json.parse(e))),transformers:[]}];let p={};p={text:[\\"[false,true]\\"],...p};const u=[{result:e.HS.executeBasedOnType(p,!1,(e=>t.json.parse(e))),transformers:[]}],l=[{result:[5],transformers:[]}];let d={};d={x:[1],y:[0],z:[0],...d};const m=[{result:e.HS.executeBasedOnType(d,!1,(e=>t.vector.vectorXYZ(e))),transformers:[]}],y=[{result:[12],transformers:[]}],S=[{result:[7],transformers:[]}];let H={};H={x:[0],y:[1],z:[0],...H};const f=[{result:e.HS.executeBasedOnType(H,!1,(e=>t.vector.vectorXYZ(e))),transformers:[]}];let h={};h={x:[0],y:[0],z:[1],...h};const x=[{result:e.HS.executeBasedOnType(h,!1,(e=>t.vector.vectorXYZ(e))),transformers:[]}];let v={};v={number:[.4],...v};const O=[{result:e.HS.executeBasedOnType(v,!1,(e=>t.math.number(e))),transformers:[]}];let I={};I={x:[0],y:[0],z:[-1],...I};const L=[{result:e.HS.executeBasedOnType(I,!1,(e=>t.vector.vectorXYZ(e))),transformers:[]}];let B={};B={x:[0],y:[0],z:[-2],...B};const w=[{result:e.HS.executeBasedOnType(B,!1,(e=>t.vector.vectorXYZ(e))),transformers:[]}];let T={};T={x:[0],y:[0],z:[1],...T};const g=[{result:e.HS.executeBasedOnType(T,!1,(e=>t.vector.vectorXYZ(e))),transformers:[]}];let A={};A={x:[0],y:[1.5],z:[0],...A};const E=[{result:e.HS.executeBasedOnType(A,!1,(e=>t.vector.vectorXYZ(e))),transformers:[]}];let b={};b={...{faceOpacity:[.5],edgeOpacity:[.5],edgeColour:[\\"#000000\\"],faceColour:[\\"#212121\\"],vertexColour:[\\"#ff00ff\\"],faceMaterial:[void 0],edgeWidth:[2],vertexSize:[.03],drawEdges:[!0],drawFaces:[!0],drawVertices:[!1],precision:[.02],drawEdgeIndexes:[!1],edgeIndexHeight:[.06],edgeIndexColour:[\\"ff00ff\\"],drawFaceIndexes:[!1],faceIndexHeight:[.06],faceIndexColour:[\\"#0000ff\\"]},...b};const z=[{result:e.HS.executeBasedOnType(b,!1,(e=>t.draw.optionsOcctShape(e))),transformers:[]}];let W={};W={name:[\\"Custom Material\\"],baseColor:[\\"#9c9cba\\"],emissiveColor:[\\"#000000\\"],metallic:[.9],roughness:[.1],alpha:[1],backFaceCulling:[!1],zOffset:[2],...W};const C=[{result:e.HS.executeBasedOnType(W,!1,(e=>t.babylon.material.pbrMetallicRoughness.create(e))),transformers:[]}];let P={};P={x:[0],y:[0],z:[-1],...P};const X=[{result:e.HS.executeBasedOnType(P,!1,(e=>t.vector.vectorXYZ(e))),transformers:[]}];let Y={};Y={x:[0],y:[0],z:[-1.5],...Y};const Z=[{result:e.HS.executeBasedOnType(Y,!1,(e=>t.vector.vectorXYZ(e))),transformers:[]}];let N={};N={x:[0],y:[0],z:[1],...N};const k=[{result:e.HS.executeBasedOnType(N,!1,(e=>t.vector.vectorXYZ(e))),transformers:[]}];let M={};M={skybox:[\\"city\\"],size:[1e3],blur:[.4],environmentIntensity:[.4],...M};e.HS.executeBasedOnType(M,!1,(e=>t.babylon.scene.enableSkybox(e)));let F={number:[{result:[20],transformers:[]}]};e.HS.updateListInputs(F),F={number:[20],...F};const D=[{result:e.HS.executeBasedOnType(F,!1,(e=>t.math.number(e))),transformers:[]}];let R={};R.y=y,e.HS.updateListInputs(R),R={x:[0],y:[0],z:[0],...R};const j=[{result:e.HS.executeBasedOnType(R,!1,(e=>t.vector.vectorXYZ(e))),transformers:[]}];let q={};q.item=y,e.HS.updateListInputs(q),q={...q};const V=[{result:q.item}];let G={};G.first=S,e.HS.updateListInputs(G),G={first:[1],second:[-2],operation:[\\"divide\\"],...G};const J=[{result:e.HS.executeBasedOnType(G,!1,(e=>t.math.twoNrOperation(e))),transformers:[]}];let K={};K.first=S,e.HS.updateListInputs(K),K={first:[1],second:[-4],operation:[\\"divide\\"],...K};const Q=[{result:e.HS.executeBasedOnType(K,!1,(e=>t.math.twoNrOperation(e))),transformers:[]}];let U={};U.first=y,U.second=O,e.HS.updateListInputs(U),U={first:[1],second:[.4],operation:[\\"add\\"],...U};const $=[{result:e.HS.executeBasedOnType(U,!1,(e=>t.math.twoNrOperation(e))),transformers:[]}];let _={};_.item=S,e.HS.updateListInputs(_),_={..._};const ee=[{result:_.item}],te={faceOpacity:[1],edgeOpacity:[1],edgeColour:[\\"#1c1c1c\\"],faceColour:[\\"#bdbdbd\\"],vertexColour:[\\"#ff00ff\\"],faceMaterial:[void 0],edgeWidth:[2],vertexSize:[.03],drawEdges:[!0],drawFaces:[!0],drawVertices:[!1],precision:[.01],drawEdgeIndexes:[!1],edgeIndexHeight:[.06],edgeIndexColour:[\\"ff00ff\\"],drawFaceIndexes:[!1],faceIndexHeight:[.06],faceIndexColour:[\\"#0000ff\\"]};let se={};se.faceMaterial=C,e.HS.updateListInputs(se),se={...te,...se};const ne=[{result:e.HS.executeBasedOnType(se,!1,(e=>t.draw.optionsOcctShape(e))),transformers:[]}];let re={};re.center=Z,re.direction=X,e.HS.updateListInputs(re),re={radius:[3],height:[1.9],center:[[0,0,0]],direction:[[0,1,0]],...re};const ae=[{result:await e.HS.executeBasedOnTypeAsync(re,!1,(e=>t.occt.shapes.solid.createCylinder(e))),transformers:[]}];let oe={};oe.y=$,e.HS.updateListInputs(oe),oe={x:[0],y:[12],z:[0],...oe};const ie=[{result:e.HS.executeBasedOnType(oe,!1,(e=>t.vector.vectorXYZ(e))),transformers:[]}];let ce={};ce.first=D,e.HS.updateListInputs(ce),ce={first:[1],second:[3],operation:[\\"multiply\\"],...ce};const pe=[{result:e.HS.executeBasedOnType(ce,!1,(e=>t.math.twoNrOperation(e))),transformers:[]}];let ue={};ue.first=V,ue.second=O,e.HS.updateListInputs(ue),ue={first:[1],second:[.4],operation:[\\"add\\"],...ue};const le=[{result:e.HS.executeBasedOnType(ue,!1,(e=>t.math.twoNrOperation(e))),transformers:[]}];let de={};de.first=V,de.second=O,e.HS.updateListInputs(de),de={first:[1],second:[.4],operation:[\\"subtract\\"],...de};const me=[{result:e.HS.executeBasedOnType(de,!1,(e=>t.math.twoNrOperation(e))),transformers:[]}];let ye={};ye.first=ee,e.HS.updateListInputs(ye),ye={first:[1],second:[-.2],operation:[\\"multiply\\"],...ye};const Se=[{result:e.HS.executeBasedOnType(ye,!1,(e=>t.math.twoNrOperation(e))),transformers:[]}];let He={};He.second=D,e.HS.updateListInputs(He),He={first:[360],second:[1],operation:[\\"divide\\"],...He};const fe=[{result:e.HS.executeBasedOnType(He,!1,(e=>t.math.twoNrOperation(e))),transformers:[]}],he={shape:[void 0],radius:[.3],radiusList:[void 0],indexes:[void 0]};let xe={};xe.shape=ae,e.HS.updateListInputs(xe),xe={...he,...xe};const ve=[{result:await e.HS.executeBasedOnTypeAsync(xe,!1,(e=>t.occt.fillets.filletEdges(e))),transformers:[]}];let Oe={};Oe.start=L,Oe.end=ie,e.HS.updateListInputs(Oe),Oe={start:[[0,0,0]],end:[[0,1,0]],...Oe};const Ie=[{result:await e.HS.executeBasedOnTypeAsync(Oe,!1,(e=>t.occt.shapes.wire.createLineWire(e))),transformers:[]}];let Le={};Le.second=pe,e.HS.updateListInputs(Le),Le={first:[360],second:[1],operation:[\\"divide\\"],...Le};const Be=[{result:e.HS.executeBasedOnType(Le,!1,(e=>t.math.twoNrOperation(e))),transformers:[]}];let we={};we.start=w,we.end=ie,e.HS.updateListInputs(we),we={start:[[0,0,0]],end:[[0,1,0]],...we};const Te=[{result:await e.HS.executeBasedOnTypeAsync(we,!1,(e=>t.occt.shapes.wire.createLineWire(e))),transformers:[]}];let ge={};ge.y=le,e.HS.updateListInputs(ge),ge={x:[0],y:[0],z:[.05],...ge};const Ae=[{result:e.HS.executeBasedOnType(ge,!1,(e=>t.vector.vectorXYZ(e))),transformers:[]}];let Ee={};Ee.y=me,Ee.z=Q,e.HS.updateListInputs(Ee),Ee={x:[0],y:[0],z:[-1],...Ee};const be=[{result:e.HS.executeBasedOnType(Ee,!1,(e=>t.vector.vectorXYZ(e))),transformers:[]}];let ze={};ze.y=me,ze.z=J,e.HS.updateListInputs(ze),ze={x:[0],y:[0],z:[0],...ze};const We=[{result:e.HS.executeBasedOnType(ze,!1,(e=>t.vector.vectorXYZ(e))),transformers:[]}];let Ce={};Ce.z=Se,e.HS.updateListInputs(Ce),Ce={x:[0],y:[0],z:[0],...Ce};const Pe=[{result:e.HS.executeBasedOnType(Ce,!1,(e=>t.vector.vectorXYZ(e))),transformers:[]}];let Xe={};Xe.step=fe,e.HS.updateListInputs(Xe),Xe={step:[.1],min:[0],max:[360],...Xe};const Ye=e.HS.executeBasedOnType(Xe,!1,(e=>t.vector.span(e))),Ze=[];for(let e=0;e<1;e++)Ze.push({type:\\"flat\\"});const Ne=[{result:Ye,transformers:Ze}];let ke={};ke.first=Se,e.HS.updateListInputs(ke),ke={first:[2],second:[-2],operation:[\\"multiply\\"],...ke};e.HS.executeBasedOnType(ke,!1,(e=>t.math.twoNrOperation(e)));let Me={};Me.listElements=ve,e.HS.updateListInputs(Me),Me={...Me};const Fe=[{result:[Me.listElements?Me.listElements:[]]}],De={shape:[void 0],axis:[[0,0,1]],angle:[0]};let Re={};Re.shape=Ie,Re.axis=o,Re.angle=Be,e.HS.updateListInputs(Re),Re={...De,...Re};const je=[{result:await e.HS.executeBasedOnTypeAsync(Re,!1,(e=>t.occt.transforms.rotate(e))),transformers:[]}];let qe={};qe.first=Be,e.HS.updateListInputs(qe),qe={first:[1],second:[.4],operation:[\\"multiply\\"],...qe};const Ve=[{result:e.HS.executeBasedOnType(qe,!1,(e=>t.math.twoNrOperation(e))),transformers:[]}];let Ge={};Ge.first=Be,e.HS.updateListInputs(Ge),Ge={first:[1],second:[.6],operation:[\\"multiply\\"],...Ge};const Je=[{result:e.HS.executeBasedOnType(Ge,!1,(e=>t.math.twoNrOperation(e))),transformers:[]}];let Ke={};Ke.listElements=[Ae[0],j[0],be[0],We[0]],e.HS.updateListInputs(Ke),Ke={...Ke};const Qe=[{result:[Ke.listElements?Ke.listElements:[]]}];let Ue={};Ue.item=Ne,e.HS.updateListInputs(Ue),Ue={...Ue};const $e=[{result:Ue.item}],_e={shape:[void 0],nrOfDivisions:[11],removeStartPoint:[!1],removeEndPoint:[!1]};let et={};et.shape=je,et.nrOfDivisions=l,e.HS.updateListInputs(et),et={..._e,...et};const tt=[{result:await e.HS.executeBasedOnTypeAsync(et,!1,(e=>t.occt.shapes.wire.divideWireByEqualDistanceToPoints(e))),transformers:[]}],st={shape:[void 0],axis:[[0,0,1]],angle:[0]};let nt={};nt.shape=Te,nt.axis=o,nt.angle=[Ve[0],Je[0]],e.HS.updateListInputs(nt),nt={...st,...nt};const rt=[{result:await e.HS.executeBasedOnTypeAsync(nt,!1,(e=>t.occt.transforms.rotate(e))),transformers:[]}];let at={};at.number=Ve,e.HS.updateListInputs(at),at={number:[1],operation:[\\"negate\\"],...at};const ot=[{result:e.HS.executeBasedOnType(at,!1,(e=>t.math.oneNrOperation(e))),transformers:[]}],it={points:[void 0]};let ct={};ct.points=Qe,e.HS.updateListInputs(ct),ct={...it,...ct};const pt=[{result:await e.HS.executeBasedOnTypeAsync(ct,!1,(e=>t.occt.shapes.wire.createPolylineWire(e))),transformers:[]}];e.HS.drawNodeMeshes(pt,t);const ut={list:[void 0],pattern:[[!0,!0,!1]]};let lt={};lt.list=tt,lt.pattern=u,e.HS.updateListInputs(lt),lt={...ut,...lt};const dt=[{result:e.HS.executeBasedOnType(lt,!0,(e=>t.lists.getByPattern(e))),transformers:[]}];let mt={};mt.listElements=rt,e.HS.updateListInputs(mt),mt={...mt};const yt=[{result:[mt.listElements?mt.listElements:[]]}],St={shape:[void 0],origin:[[0,0,0]],direction:[[0,0,1]]};let Ht={};Ht.shape=pt,Ht.origin=We,Ht.direction=f,e.HS.updateListInputs(Ht),Ht={...St,...Ht};const ft=[{result:await e.HS.executeBasedOnTypeAsync(Ht,!1,(e=>t.occt.transforms.mirror(e))),transformers:[]}],ht={shape:[void 0]};let xt={};xt.shape=pt,e.HS.updateListInputs(xt),xt={...ht,...xt};const vt=await e.HS.executeBasedOnTypeAsync(xt,!1,(e=>t.occt.shapes.edge.getCornerPointsOfEdgesForShape(e))),Ot=[];for(let e=0;e<1;e++)Ot.push({type:\\"flat\\"});const It=[{result:vt,transformers:Ot}],Lt={list:[void 0],index:[0],clone:[!0]};let Bt={};Bt.list=yt,e.HS.updateListInputs(Bt),Bt={...Lt,...Bt};const wt=[{result:e.HS.executeBasedOnType(Bt,!1,(e=>t.lists.getItem(e))),transformers:[]}],Tt={shape:[void 0]};let gt={};gt.shape=ft,e.HS.updateListInputs(gt),gt={...Tt,...gt};const At=[{result:await e.HS.executeBasedOnTypeAsync(gt,!1,(e=>t.occt.shapes.edge.getCornerPointsOfEdgesForShape(e))),transformers:[]}],Et={shape:[void 0],nrOfDivisions:[11],removeStartPoint:[!1],removeEndPoint:[!1]};let bt={};bt.shape=wt,bt.nrOfDivisions=l,e.HS.updateListInputs(bt),bt={...Et,...bt};const zt=[{result:await e.HS.executeBasedOnTypeAsync(bt,!1,(e=>t.occt.shapes.wire.divideWireByEqualDistanceToPoints(e))),transformers:[]}],Wt={list:[void 0],index:[3],clone:[!0]};let Ct={};Ct.list=At,e.HS.updateListInputs(Ct),Ct={...Wt,...Ct};const Pt=[{result:e.HS.executeBasedOnType(Ct,!1,(e=>t.lists.removeItemAtIndex(e))),transformers:[]}],Xt={list:[void 0],pattern:[[!0,!0,!1]]};let Yt={};Yt.list=zt,Yt.pattern=c,e.HS.updateListInputs(Yt),Yt={...Xt,...Yt};const Zt=[{result:e.HS.executeBasedOnType(Yt,!1,(e=>t.lists.getByPattern(e))),transformers:[]}],Nt={list:[void 0],clone:[!0]};let kt={};kt.list=Pt,e.HS.updateListInputs(kt),kt={...Nt,...kt};const Mt=e.HS.executeBasedOnType(kt,!1,(e=>t.lists.reverse(e))),Ft=[];for(let e=0;e<1;e++)Ft.push({type:\\"flat\\"});const Dt=[{result:Mt,transformers:Ft}];let Rt={};Rt.listElements=[Zt[0],dt[0]],e.HS.updateListInputs(Rt),Rt={...Rt};const jt=[{result:[Rt.listElements?Rt.listElements:[]]}];let qt={};qt.listElements=[It[0],Dt[0]],e.HS.updateListInputs(qt),qt={...qt};const Vt=[{result:[qt.listElements?qt.listElements:[]]}],Gt={list:[void 0],clone:[!0]};let Jt={};Jt.list=jt,e.HS.updateListInputs(Jt),Jt={...Gt,...Jt};const Kt=e.HS.executeBasedOnType(Jt,!1,(e=>t.lists.flipLists(e))),Qt=[];for(let e=0;e<2;e++)Qt.push({type:\\"flat\\"});const Ut=[{result:Kt,transformers:Qt}],$t={points:[void 0]};let _t={};_t.points=Vt,e.HS.updateListInputs(_t),_t={...$t,..._t};const es=[{result:await e.HS.executeBasedOnTypeAsync(_t,!1,(e=>t.occt.shapes.wire.createPolylineWire(e))),transformers:[]}];let ts={};ts.listElements=Ut,e.HS.updateListInputs(ts),ts={...ts};const ss=[{result:[ts.listElements?ts.listElements:[]]}],ns={shape:[void 0],radius:[.3],radiusList:[void 0],indexes:[void 0]};let rs={};rs.shape=es,e.HS.updateListInputs(rs),rs={...ns,...rs};const as=[{result:await e.HS.executeBasedOnTypeAsync(rs,!1,(e=>t.occt.fillets.fillet2d(e))),transformers:[]}],os={points:[void 0]};let is={};is.points=ss,e.HS.updateListInputs(is),is={...os,...is};const cs=[{result:await e.HS.executeBasedOnTypeAsync(is,!1,(e=>t.occt.shapes.wire.createPolylineWire(e))),transformers:[]}],ps={shape:[void 0],angle:[360],direction:[[0,1,0]],copy:[!1]};let us={};us.shape=as,us.direction=x,e.HS.updateListInputs(us),us={...ps,...us};const ls=[{result:await e.HS.executeBasedOnTypeAsync(us,!1,(e=>t.occt.operations.revolve(e))),transformers:[]}],ds={shape:[void 0]};let ms={};ms.shape=as,e.HS.updateListInputs(ms),ms={...ds,...ms};const ys=[{result:await e.HS.executeBasedOnTypeAsync(ms,!1,(e=>t.occt.shapes.wire.startPointOnWire(e))),transformers:[]}],Ss={shape:[void 0]};let Hs={};Hs.shape=as,e.HS.updateListInputs(Hs),Hs={...Ss,...Hs};const fs=[{result:await e.HS.executeBasedOnTypeAsync(Hs,!1,(e=>t.occt.shapes.wire.endPointOnWire(e))),transformers:[]}],hs={shape:[void 0]};let xs={};xs.shape=as,e.HS.updateListInputs(xs),xs={...hs,...xs};const vs=[{result:await e.HS.executeBasedOnTypeAsync(xs,!1,(e=>t.occt.shapes.wire.closeOpenWire(e))),transformers:[]}],Os={shape:[void 0],angle:[360],direction:[[0,1,0]],copy:[!1]};let Is={};Is.shape=vs,Is.direction=x,e.HS.updateListInputs(Is),Is={...Os,...Is};const Ls=[{result:await e.HS.executeBasedOnTypeAsync(Is,!1,(e=>t.occt.operations.revolve(e))),transformers:[]}],Bs={shape:[void 0],radius:[1],radiusList:[void 0],indexes:[void 0],direction:[[0,1,0]]};let ws={};ws.shape=cs,ws.direction=g,e.HS.updateListInputs(ws),ws={...Bs,...ws};const Ts=[{result:await e.HS.executeBasedOnTypeAsync(ws,!1,(e=>t.occt.fillets.fillet3DWire(e))),transformers:[]}],gs={shape:[void 0],face:[void 0],distance:[-.2],tolerance:[.1]};let As={};As.shape=ls,e.HS.updateListInputs(As),As={...gs,...As};const Es=[{result:await e.HS.executeBasedOnTypeAsync(As,!1,(e=>t.occt.operations.offset(e))),transformers:[]}],bs={shape:[void 0],index:[0]};let zs={};zs.shape=ls,e.HS.updateListInputs(zs),zs={...bs,...zs};const Ws=[{result:await e.HS.executeBasedOnTypeAsync(zs,!1,(e=>t.occt.shapes.wire.getWire(e))),transformers:[]}];let Cs={};Cs.item=ys,e.HS.updateListInputs(Cs),Cs={...Cs};const Ps=[{result:Cs.item}];let Xs={};Xs.item=fs,e.HS.updateListInputs(Xs),Xs={...Xs};const Ys=[{result:Xs.item}];let Zs={};Zs.start=fs,Zs.end=ys,e.HS.updateListInputs(Zs),Zs={start:[[0,0,0]],end:[[0,1,0]],...Zs};const Ns=[{result:await e.HS.executeBasedOnTypeAsync(Zs,!1,(e=>t.occt.shapes.wire.createLineWire(e))),transformers:[]}];e.HS.drawNodeMeshes(Ns,t);const ks={shape:[void 0],angle:[360],direction:[[0,1,0]],copy:[!1]};let Ms={};Ms.shape=Ts,Ms.angle=ot,Ms.direction=o,e.HS.updateListInputs(Ms),Ms={...ks,...Ms};const Fs=[{result:await e.HS.executeBasedOnTypeAsync(Ms,!1,(e=>t.occt.operations.revolve(e))),transformers:[]}],Ds={shape:[void 0]};let Rs={};Rs.shape=Ls,e.HS.updateListInputs(Rs),Rs={...Ds,...Rs};const js=[{result:await e.HS.executeBasedOnTypeAsync(Rs,!1,(e=>t.occt.shapes.solid.fromClosedShell(e))),transformers:[]}],qs={shape:[void 0],index:[1]};let Vs={};Vs.shape=Ws,e.HS.updateListInputs(Vs),Vs={...qs,...Vs};const Gs=[{result:await e.HS.executeBasedOnTypeAsync(Vs,!1,(e=>t.occt.shapes.edge.getEdge(e))),transformers:[]}],Js={shape:[void 0],index:[0]};let Ks={};Ks.shape=Es,e.HS.updateListInputs(Ks),Ks={...Js,...Ks};const Qs=[{result:await e.HS.executeBasedOnTypeAsync(Ks,!1,(e=>t.occt.shapes.wire.getWire(e))),transformers:[]}],Us={shape:[void 0],translation:[[0,0,0]]};let $s={};$s.shape=Ns,$s.translation=E,e.HS.updateListInputs($s),$s={...Us,...$s};const _s=[{result:await e.HS.executeBasedOnTypeAsync($s,!1,(e=>t.occt.transforms.translate(e))),transformers:[]}],en={shape:[void 0],direction:[[0,1,0]]};let tn={};tn.shape=Fs,tn.direction=Pe,e.HS.updateListInputs(tn),tn={...en,...tn};const sn=[{result:await e.HS.executeBasedOnTypeAsync(tn,!1,(e=>t.occt.operations.extrude(e))),transformers:[]}];let nn={};nn.listElements=js,e.HS.updateListInputs(nn),nn={...nn};const rn=[{result:[nn.listElements?nn.listElements:[]]}],an={shape:[void 0],index:[1]};let on={};on.shape=Qs,e.HS.updateListInputs(on),on={...an,...on};const cn=[{result:await e.HS.executeBasedOnTypeAsync(on,!1,(e=>t.occt.shapes.edge.getEdge(e))),transformers:[]}];let pn={};pn.listElements=Gs,e.HS.updateListInputs(pn),pn={...pn};const un=[{result:[pn.listElements?pn.listElements:[]]}],ln={shape:[void 0]};let dn={};dn.shape=_s,e.HS.updateListInputs(dn),dn={...ln,...dn};const mn=[{result:await e.HS.executeBasedOnTypeAsync(dn,!1,(e=>t.occt.shapes.wire.startPointOnWire(e))),transformers:[]}],yn={shape:[void 0]};let Sn={};Sn.shape=_s,e.HS.updateListInputs(Sn),Sn={...yn,...Sn};const Hn=[{result:await e.HS.executeBasedOnTypeAsync(Sn,!1,(e=>t.occt.shapes.wire.endPointOnWire(e))),transformers:[]}],fn={shapes:[void 0]};let hn={};hn.shapes=un,e.HS.updateListInputs(hn),hn={...fn,...hn};const xn=[{result:await e.HS.executeBasedOnTypeAsync(hn,!1,(e=>t.occt.shapes.wire.combineEdgesAndWiresIntoAWire(e))),transformers:[]}];let vn={};vn.listElements=cn,e.HS.updateListInputs(vn),vn={...vn};const On=[{result:[vn.listElements?vn.listElements:[]]}],In={shape:[void 0],shapes:[void 0],keepEdges:[!1]};let Ln={};Ln.shape=sn,Ln.shapes=Fe,e.HS.updateListInputs(Ln),Ln={...In,...Ln};const Bn=[{result:await e.HS.executeBasedOnTypeAsync(Ln,!1,(e=>t.occt.booleans.difference(e))),transformers:[]}];let wn={};wn.item=Hn,e.HS.updateListInputs(wn),wn={...wn};const Tn=[{result:wn.item}];let gn={};gn.item=mn,e.HS.updateListInputs(gn),gn={...gn};const An=[{result:gn.item}],En={shape:[void 0],shapes:[void 0],keepEdges:[!1]};let bn={};bn.shape=Bn,bn.shapes=rn,e.HS.updateListInputs(bn),bn={...En,...bn};const zn=[{result:await e.HS.executeBasedOnTypeAsync(bn,!1,(e=>t.occt.booleans.difference(e))),transformers:[]}],Wn={shapes:[void 0]};let Cn={};Cn.shapes=On,e.HS.updateListInputs(Cn),Cn={...Wn,...Cn};const Pn=[{result:await e.HS.executeBasedOnTypeAsync(Cn,!1,(e=>t.occt.shapes.wire.combineEdgesAndWiresIntoAWire(e))),transformers:[]}];let Xn={};Xn.listElements=[Ps[0],Tn[0],An[0],Ys[0]],e.HS.updateListInputs(Xn),Xn={...Xn};const Yn=[{result:[Xn.listElements?Xn.listElements:[]]}],Zn={shape:[void 0],origin:[[0,0,0]],normal:[[0,0,1]]};let Nn={};Nn.shape=zn,Nn.normal=m,e.HS.updateListInputs(Nn),Nn={...Zn,...Nn};const kn=[{result:await e.HS.executeBasedOnTypeAsync(Nn,!1,(e=>t.occt.transforms.mirrorAlongNormal(e))),transformers:[]}];let Mn={};Mn.listElements=[xn[0],Pn[0]],e.HS.updateListInputs(Mn),Mn={...Mn};const Fn=[{result:[Mn.listElements?Mn.listElements:[]]}],Dn={points:[void 0]};let Rn={};Rn.points=Yn,e.HS.updateListInputs(Rn),Rn={...Dn,...Rn};const jn=[{result:await e.HS.executeBasedOnTypeAsync(Rn,!1,(e=>t.occt.shapes.wire.createPolylineWire(e))),transformers:[]}];let qn={};qn.listElements=[kn[0],zn[0]],e.HS.updateListInputs(qn),qn={...qn};const Vn=[{result:[qn.listElements?qn.listElements:[]]}],Gn={shapes:[void 0],makeSolid:[!1]};let Jn={};Jn.shapes=Fn,e.HS.updateListInputs(Jn),Jn={...Gn,...Jn};const Kn=[{result:await e.HS.executeBasedOnTypeAsync(Jn,!1,(e=>t.occt.operations.loft(e))),transformers:[]}],Qn={shape:[void 0],radius:[.5],radiusList:[void 0],indexes:[void 0]};let Un={};Un.shape=jn,e.HS.updateListInputs(Un),Un={...Qn,...Un};const $n=[{result:await e.HS.executeBasedOnTypeAsync(Un,!1,(e=>t.occt.fillets.fillet2d(e))),transformers:[]}],_n={shapes:[void 0]};let er={};er.shapes=Vn,e.HS.updateListInputs(er),er={..._n,...er};const tr=[{result:await e.HS.executeBasedOnTypeAsync(er,!1,(e=>t.occt.shapes.compound.makeCompound(e))),transformers:[]}],sr={shape:[void 0],origin:[[0,0,0]],direction:[[0,0,1]]};let nr={};nr.shape=Kn,nr.origin=We,nr.direction=f,e.HS.updateListInputs(nr),nr={...sr,...nr};const rr=[{result:await e.HS.executeBasedOnTypeAsync(nr,!1,(e=>t.occt.transforms.mirror(e))),transformers:[]}],ar={shape:[void 0],angle:[360],direction:[[0,1,0]],copy:[!1]};let or={};or.shape=$n,or.direction=x,e.HS.updateListInputs(or),or={...ar,...or};const ir=[{result:await e.HS.executeBasedOnTypeAsync(or,!1,(e=>t.occt.operations.revolve(e))),transformers:[]}];let cr={};cr.listElements=[ls[0],Es[0],Kn[0],rr[0]],e.HS.updateListInputs(cr),cr={...cr};const pr=[{result:[cr.listElements?cr.listElements:[]]}],ur={shape:[void 0],offset:[-.1]};let lr={};lr.shape=ir,e.HS.updateListInputs(lr),lr={...ur,...lr};const dr=[{result:await e.HS.executeBasedOnTypeAsync(lr,!1,(e=>t.occt.operations.makeThickSolidSimple(e))),transformers:[]}],mr={shape:[void 0],angle:[0],center:[[0,0,0]],axis:[[0,0,1]]};let yr={};yr.shape=tr,yr.angle=$e,yr.axis=k,e.HS.updateListInputs(yr),yr={...mr,...yr};const Sr=[{result:await e.HS.executeBasedOnTypeAsync(yr,!1,(e=>t.occt.transforms.rotateAroundCenter(e))),transformers:[]}],Hr={shapes:[void 0],tolerance:[1e-7]};let fr={};fr.shapes=pr,e.HS.updateListInputs(fr),fr={...Hr,...fr};const hr=[{result:await e.HS.executeBasedOnTypeAsync(fr,!1,(e=>t.occt.shapes.shell.sewFaces(e))),transformers:[]}],xr={entity:[void 0],options:[void 0],babylonMesh:[void 0]};let vr={};vr.entity=dr,vr.options=z,e.HS.updateListInputs(vr),vr={...xr,...vr};await e.HS.executeBasedOnTypeAsync(vr,!1,(e=>t.draw.drawAnyAsync(e)));let Or={};Or.listElements=Sr,e.HS.updateListInputs(Or),Or={...Or};const Ir=[{result:[Or.listElements?Or.listElements:[]]}],Lr={shapes:[void 0]};let Br={};Br.shapes=Ir,e.HS.updateListInputs(Br),Br={...Lr,...Br};const wr=[{result:await e.HS.executeBasedOnTypeAsync(Br,!1,(e=>t.occt.shapes.compound.makeCompound(e))),transformers:[]}];let Tr={};Tr.listElements=[hr[0],ve[0],wr[0]],e.HS.updateListInputs(Tr),Tr={...Tr};const gr=[{result:[Tr.listElements?Tr.listElements:[]]}],Ar={shapes:[void 0]};let Er={};Er.shapes=gr,e.HS.updateListInputs(Er),Er={...Ar,...Er};const br=[{result:await e.HS.executeBasedOnTypeAsync(Er,!1,(e=>t.occt.shapes.compound.makeCompound(e))),transformers:[]}],zr={entity:[void 0],options:[void 0],babylonMesh:[void 0]};let Wr={};Wr.entity=br,Wr.options=ne,e.HS.updateListInputs(Wr),Wr={...zr,...Wr};await e.HS.executeBasedOnTypeAsync(Wr,!1,(e=>t.draw.drawAnyAsync(e)))}(BitByBit,bitbybit,bitbybitRunnerResult,bitbybitRunnerInputs,Bit);\"}' };