@bitbybit-dev/occt
Version:
Bit By Bit Developers CAD algorithms using OpenCascade Technology kernel. Run in Node and in Browser.
1,353 lines (1,352 loc) • 225 kB
JavaScript
export var OCCT;
(function (OCCT) {
let joinTypeEnum;
(function (joinTypeEnum) {
joinTypeEnum["arc"] = "arc";
joinTypeEnum["intersection"] = "intersection";
joinTypeEnum["tangent"] = "tangent";
})(joinTypeEnum = OCCT.joinTypeEnum || (OCCT.joinTypeEnum = {}));
let bRepOffsetModeEnum;
(function (bRepOffsetModeEnum) {
bRepOffsetModeEnum["skin"] = "skin";
bRepOffsetModeEnum["pipe"] = "pipe";
bRepOffsetModeEnum["rectoVerso"] = "rectoVerso";
})(bRepOffsetModeEnum = OCCT.bRepOffsetModeEnum || (OCCT.bRepOffsetModeEnum = {}));
let approxParametrizationTypeEnum;
(function (approxParametrizationTypeEnum) {
approxParametrizationTypeEnum["approxChordLength"] = "approxChordLength";
approxParametrizationTypeEnum["approxCentripetal"] = "approxCentripetal";
approxParametrizationTypeEnum["approxIsoParametric"] = "approxIsoParametric";
})(approxParametrizationTypeEnum = OCCT.approxParametrizationTypeEnum || (OCCT.approxParametrizationTypeEnum = {}));
let directionEnum;
(function (directionEnum) {
directionEnum["outside"] = "outside";
directionEnum["inside"] = "inside";
directionEnum["middle"] = "middle";
})(directionEnum = OCCT.directionEnum || (OCCT.directionEnum = {}));
let fileTypeEnum;
(function (fileTypeEnum) {
fileTypeEnum["iges"] = "iges";
fileTypeEnum["step"] = "step";
})(fileTypeEnum = OCCT.fileTypeEnum || (OCCT.fileTypeEnum = {}));
let topAbsOrientationEnum;
(function (topAbsOrientationEnum) {
topAbsOrientationEnum["forward"] = "forward";
topAbsOrientationEnum["reversed"] = "reversed";
topAbsOrientationEnum["internal"] = "internal";
topAbsOrientationEnum["external"] = "external";
})(topAbsOrientationEnum = OCCT.topAbsOrientationEnum || (OCCT.topAbsOrientationEnum = {}));
let topAbsStateEnum;
(function (topAbsStateEnum) {
topAbsStateEnum["in"] = "in";
topAbsStateEnum["out"] = "out";
topAbsStateEnum["on"] = "on";
topAbsStateEnum["unknown"] = "unknown";
})(topAbsStateEnum = OCCT.topAbsStateEnum || (OCCT.topAbsStateEnum = {}));
let shapeTypeEnum;
(function (shapeTypeEnum) {
shapeTypeEnum["unknown"] = "unknown";
shapeTypeEnum["vertex"] = "vertex";
shapeTypeEnum["edge"] = "edge";
shapeTypeEnum["wire"] = "wire";
shapeTypeEnum["face"] = "face";
shapeTypeEnum["shell"] = "shell";
shapeTypeEnum["solid"] = "solid";
shapeTypeEnum["compSolid"] = "compSolid";
shapeTypeEnum["compound"] = "compound";
shapeTypeEnum["shape"] = "shape";
})(shapeTypeEnum = OCCT.shapeTypeEnum || (OCCT.shapeTypeEnum = {}));
let gccEntPositionEnum;
(function (gccEntPositionEnum) {
gccEntPositionEnum["unqualified"] = "unqualified";
gccEntPositionEnum["enclosing"] = "enclosing";
gccEntPositionEnum["enclosed"] = "enclosed";
gccEntPositionEnum["outside"] = "outside";
gccEntPositionEnum["noqualifier"] = "noqualifier";
})(gccEntPositionEnum = OCCT.gccEntPositionEnum || (OCCT.gccEntPositionEnum = {}));
let positionResultEnum;
(function (positionResultEnum) {
positionResultEnum["keepSide1"] = "keepSide1";
positionResultEnum["keepSide2"] = "keepSide2";
positionResultEnum["all"] = "all";
})(positionResultEnum = OCCT.positionResultEnum || (OCCT.positionResultEnum = {}));
let circleInclusionEnum;
(function (circleInclusionEnum) {
circleInclusionEnum["none"] = "none";
circleInclusionEnum["keepSide1"] = "keepSide1";
circleInclusionEnum["keepSide2"] = "keepSide2";
})(circleInclusionEnum = OCCT.circleInclusionEnum || (OCCT.circleInclusionEnum = {}));
let twoCircleInclusionEnum;
(function (twoCircleInclusionEnum) {
twoCircleInclusionEnum["none"] = "none";
twoCircleInclusionEnum["outside"] = "outside";
twoCircleInclusionEnum["inside"] = "inside";
twoCircleInclusionEnum["outsideInside"] = "outsideInside";
twoCircleInclusionEnum["insideOutside"] = "insideOutside";
})(twoCircleInclusionEnum = OCCT.twoCircleInclusionEnum || (OCCT.twoCircleInclusionEnum = {}));
let fourSidesStrictEnum;
(function (fourSidesStrictEnum) {
fourSidesStrictEnum["outside"] = "outside";
fourSidesStrictEnum["inside"] = "inside";
fourSidesStrictEnum["outsideInside"] = "outsideInside";
fourSidesStrictEnum["insideOutside"] = "insideOutside";
})(fourSidesStrictEnum = OCCT.fourSidesStrictEnum || (OCCT.fourSidesStrictEnum = {}));
let twoSidesStrictEnum;
(function (twoSidesStrictEnum) {
twoSidesStrictEnum["outside"] = "outside";
twoSidesStrictEnum["inside"] = "inside";
})(twoSidesStrictEnum = OCCT.twoSidesStrictEnum || (OCCT.twoSidesStrictEnum = {}));
let combinationCirclesForFaceEnum;
(function (combinationCirclesForFaceEnum) {
combinationCirclesForFaceEnum["allWithAll"] = "allWithAll";
combinationCirclesForFaceEnum["inOrder"] = "inOrder";
combinationCirclesForFaceEnum["inOrderClosed"] = "inOrderClosed";
})(combinationCirclesForFaceEnum = OCCT.combinationCirclesForFaceEnum || (OCCT.combinationCirclesForFaceEnum = {}));
let typeSpecificityEnum;
(function (typeSpecificityEnum) {
typeSpecificityEnum[typeSpecificityEnum["curve"] = 0] = "curve";
typeSpecificityEnum[typeSpecificityEnum["edge"] = 1] = "edge";
typeSpecificityEnum[typeSpecificityEnum["wire"] = 2] = "wire";
typeSpecificityEnum[typeSpecificityEnum["face"] = 3] = "face";
})(typeSpecificityEnum = OCCT.typeSpecificityEnum || (OCCT.typeSpecificityEnum = {}));
let pointProjectionTypeEnum;
(function (pointProjectionTypeEnum) {
pointProjectionTypeEnum["all"] = "all";
pointProjectionTypeEnum["closest"] = "closest";
pointProjectionTypeEnum["furthest"] = "furthest";
pointProjectionTypeEnum["closestAndFurthest"] = "closestAndFurthest";
})(pointProjectionTypeEnum = OCCT.pointProjectionTypeEnum || (OCCT.pointProjectionTypeEnum = {}));
let geomFillTrihedronEnum;
(function (geomFillTrihedronEnum) {
geomFillTrihedronEnum["isCorrectedFrenet"] = "isCorrectedFrenet";
geomFillTrihedronEnum["isFixed"] = "isFixed";
geomFillTrihedronEnum["isFrenet"] = "isFrenet";
geomFillTrihedronEnum["isConstantNormal"] = "isConstantNormal";
geomFillTrihedronEnum["isDarboux"] = "isDarboux";
geomFillTrihedronEnum["isGuideAC"] = "isGuideAC";
geomFillTrihedronEnum["isGuidePlan"] = "isGuidePlan";
geomFillTrihedronEnum["isGuideACWithContact"] = "isGuideACWithContact";
geomFillTrihedronEnum["isGuidePlanWithContact"] = "isGuidePlanWithContact";
geomFillTrihedronEnum["isDiscreteTrihedron"] = "isDiscreteTrihedron";
})(geomFillTrihedronEnum = OCCT.geomFillTrihedronEnum || (OCCT.geomFillTrihedronEnum = {}));
class DecomposedMeshDto {
constructor(faceList, edgeList) {
if (faceList !== undefined) {
this.faceList = faceList;
}
if (edgeList !== undefined) {
this.edgeList = edgeList;
}
}
}
OCCT.DecomposedMeshDto = DecomposedMeshDto;
class DecomposedFaceDto {
}
OCCT.DecomposedFaceDto = DecomposedFaceDto;
class DecomposedEdgeDto {
}
OCCT.DecomposedEdgeDto = DecomposedEdgeDto;
class ShapesDto {
constructor(shapes) {
if (shapes !== undefined) {
this.shapes = shapes;
}
}
}
OCCT.ShapesDto = ShapesDto;
class PointDto {
constructor(point) {
/**
* The point
* @default [0, 0, 0]
*/
this.point = [0, 0, 0];
if (point !== undefined) {
this.point = point;
}
}
}
OCCT.PointDto = PointDto;
class XYZDto {
constructor(x, y, z) {
if (x !== undefined) {
this.x = x;
}
if (y !== undefined) {
this.y = y;
}
if (z !== undefined) {
this.z = z;
}
}
}
OCCT.XYZDto = XYZDto;
class PointsDto {
constructor(points) {
if (points !== undefined) {
this.points = points;
}
}
}
OCCT.PointsDto = PointsDto;
class ConstraintTanLinesFromPtToCircleDto {
constructor(circle, point, tolerance, positionResult, circleRemainder) {
/**
* tolerance
* @default 1e-7
* @minimum 0
* @maximum Infinity
* @step 0.00001
*/
this.tolerance = 1e-7;
/**
* Filters resulting lines by position
* @default all
*/
this.positionResult = positionResultEnum.all;
/**
* 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
*/
this.circleRemainder = circleInclusionEnum.none;
if (circle !== undefined) {
this.circle = circle;
}
if (point !== undefined) {
this.point = point;
}
if (tolerance !== undefined) {
this.tolerance = tolerance;
}
if (positionResult !== undefined) {
this.positionResult = positionResult;
}
if (circleRemainder !== undefined) {
this.circleRemainder = circleRemainder;
}
}
}
OCCT.ConstraintTanLinesFromPtToCircleDto = ConstraintTanLinesFromPtToCircleDto;
class ConstraintTanLinesFromTwoPtsToCircleDto {
constructor(circle, point1, point2, tolerance, positionResult, circleRemainder) {
/**
* tolerance
* @default 1e-7
* @minimum 0
* @maximum Infinity
* @step 0.00001
*/
this.tolerance = 1e-7;
/**
* Filters resulting lines by position
* @default all
*/
this.positionResult = positionResultEnum.all;
/**
* 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
*/
this.circleRemainder = circleInclusionEnum.none;
if (circle !== undefined) {
this.circle = circle;
}
if (point1 !== undefined) {
this.point1 = point1;
}
if (point2 !== undefined) {
this.point1 = point2;
}
if (tolerance !== undefined) {
this.tolerance = tolerance;
}
if (positionResult !== undefined) {
this.positionResult = positionResult;
}
if (circleRemainder !== undefined) {
this.circleRemainder = circleRemainder;
}
}
}
OCCT.ConstraintTanLinesFromTwoPtsToCircleDto = ConstraintTanLinesFromTwoPtsToCircleDto;
class ConstraintTanLinesOnTwoCirclesDto {
constructor(circle1, circle2, tolerance, positionResult, circleRemainders) {
/**
* tolerance
* @default 1e-7
* @minimum 0
* @maximum Infinity
* @step 0.00001
*/
this.tolerance = 1e-7;
/**
* Filters resulting lines by position relative to circles
* @default all
*/
this.positionResult = positionResultEnum.all;
/**
* 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
*/
this.circleRemainders = twoCircleInclusionEnum.none;
if (circle1 !== undefined) {
this.circle1 = circle1;
}
if (circle2 !== undefined) {
this.circle2 = circle2;
}
if (tolerance !== undefined) {
this.tolerance = tolerance;
}
if (positionResult !== undefined) {
this.positionResult = positionResult;
}
if (circleRemainders !== undefined) {
this.circleRemainders = circleRemainders;
}
}
}
OCCT.ConstraintTanLinesOnTwoCirclesDto = ConstraintTanLinesOnTwoCirclesDto;
class ConstraintTanCirclesOnTwoCirclesDto {
constructor(circle1, circle2, tolerance, radius) {
/**
* tolerance
* @default 1e-7
* @minimum 0
* @maximum Infinity
* @step 0.00001
*/
this.tolerance = 1e-7;
/**
* Radius of the circles being constructed
* @default 0.3
* @minimum 0
* @maximum Infinity
* @step 0.1
*/
this.radius = 0.3;
if (circle1 !== undefined) {
this.circle1 = circle1;
}
if (circle2 !== undefined) {
this.circle2 = circle2;
}
if (tolerance !== undefined) {
this.tolerance = tolerance;
}
if (radius !== undefined) {
this.radius = radius;
}
}
}
OCCT.ConstraintTanCirclesOnTwoCirclesDto = ConstraintTanCirclesOnTwoCirclesDto;
class ConstraintTanCirclesOnCircleAndPntDto {
constructor(circle, point, tolerance, radius) {
/**
* tolerance
* @default 1e-7
* @minimum 0
* @maximum Infinity
* @step 0.00001
*/
this.tolerance = 1e-7;
/**
* Radius of the circles being constructed
* @default 0.3
* @minimum 0
* @maximum Infinity
* @step 0.1
*/
this.radius = 0.3;
if (circle !== undefined) {
this.circle = circle;
}
if (point !== undefined) {
this.point = point;
}
if (tolerance !== undefined) {
this.tolerance = tolerance;
}
if (radius !== undefined) {
this.radius = radius;
}
}
}
OCCT.ConstraintTanCirclesOnCircleAndPntDto = ConstraintTanCirclesOnCircleAndPntDto;
class CurveAndSurfaceDto {
constructor(curve, surface) {
if (curve !== undefined) {
this.curve = curve;
}
if (surface !== undefined) {
this.surface = surface;
}
}
}
OCCT.CurveAndSurfaceDto = CurveAndSurfaceDto;
class FilletTwoEdgesInPlaneDto {
constructor(edge1, edge2, planeOrigin, planeDirection, radius, solution) {
/**
* Plane origin that is also used to find the closest solution if two solutions exist.
* @default [0, 0, 0]
*/
this.planeOrigin = [0, 0, 0];
/**
* Plane direction for fillet
* @default [0, 1, 0]
*/
this.planeDirection = [0, 1, 0];
/**
* Radius of the fillet
* @default 0.3
* @minimum 0
* @maximum Infinity
* @step 0.1
*/
this.radius = 0.3;
/**
* 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
*/
this.solution = -1;
if (edge1 !== undefined) {
this.edge1 = edge1;
}
if (edge2 !== undefined) {
this.edge2 = edge2;
}
if (planeOrigin !== undefined) {
this.planeOrigin = planeOrigin;
}
if (planeDirection !== undefined) {
this.planeDirection = planeDirection;
}
if (radius !== undefined) {
this.radius = radius;
}
if (solution !== undefined) {
this.solution = solution;
}
}
}
OCCT.FilletTwoEdgesInPlaneDto = FilletTwoEdgesInPlaneDto;
class ClosestPointsOnShapeFromPointsDto {
constructor(shape, points) {
if (shape !== undefined) {
this.shape = shape;
}
if (points !== undefined) {
this.points = points;
}
}
}
OCCT.ClosestPointsOnShapeFromPointsDto = ClosestPointsOnShapeFromPointsDto;
class BoundingBoxDto {
constructor(bbox) {
if (bbox !== undefined) {
this.bbox = bbox;
}
}
}
OCCT.BoundingBoxDto = BoundingBoxDto;
class BoundingBoxPropsDto {
constructor(min, max, center, size) {
/**
* Minimum point of the bounding box
* @default [0, 0, 0]
*/
this.min = [0, 0, 0];
/**
* Maximum point of the bounding box
* @default [0, 0, 0]
*/
this.max = [0, 0, 0];
/**
* Center point of the bounding box
* @default [0, 0, 0]
*/
this.center = [0, 0, 0];
/**
* Size of the bounding box
* @default [0, 0, 0]
*/
this.size = [0, 0, 0];
if (min !== undefined) {
this.min = min;
}
if (max !== undefined) {
this.max = max;
}
if (center !== undefined) {
this.center = center;
}
if (size !== undefined) {
this.size = size;
}
}
}
OCCT.BoundingBoxPropsDto = BoundingBoxPropsDto;
class BoundingSpherePropsDto {
constructor(center, radius) {
/**
* Center point of the bounding box
* @default [0, 0, 0]
*/
this.center = [0, 0, 0];
/**
* Radius of the bounding sphere
* @default 0
* @minimum 0
* @maximum Infinity
* @step 0.1
*/
this.radius = 0;
if (center !== undefined) {
this.center = center;
}
if (radius !== undefined) {
this.radius = radius;
}
}
}
OCCT.BoundingSpherePropsDto = BoundingSpherePropsDto;
class SplitWireOnPointsDto {
constructor(shape, points) {
if (shape !== undefined) {
this.shape = shape;
}
if (points !== undefined) {
this.points = points;
}
}
}
OCCT.SplitWireOnPointsDto = SplitWireOnPointsDto;
class ClosestPointsOnShapesFromPointsDto {
constructor(shapes, points) {
if (shapes !== undefined) {
this.shapes = shapes;
}
if (points !== undefined) {
this.points = points;
}
}
}
OCCT.ClosestPointsOnShapesFromPointsDto = ClosestPointsOnShapesFromPointsDto;
class ClosestPointsBetweenTwoShapesDto {
constructor(shape1, shape2) {
if (shape1 !== undefined) {
this.shape1 = shape1;
}
if (shape2 !== undefined) {
this.shape2 = shape2;
}
}
}
OCCT.ClosestPointsBetweenTwoShapesDto = ClosestPointsBetweenTwoShapesDto;
class FaceFromSurfaceAndWireDto {
constructor(surface, wire, inside) {
/**
* Indicates wether face should be created inside or outside the wire
* @default true
*/
this.inside = true;
if (surface !== undefined) {
this.surface = surface;
}
if (wire !== undefined) {
this.wire = wire;
}
if (inside !== undefined) {
this.inside = inside;
}
}
}
OCCT.FaceFromSurfaceAndWireDto = FaceFromSurfaceAndWireDto;
class WireOnFaceDto {
constructor(wire, face) {
if (wire !== undefined) {
this.wire = wire;
}
if (face !== undefined) {
this.face = face;
}
}
}
OCCT.WireOnFaceDto = WireOnFaceDto;
class DrawShapeDto {
/**
* Provide options without default values
*/
constructor(shape, faceOpacity, edgeOpacity, edgeColour, faceMaterial, faceColour, edgeWidth, drawEdges, drawFaces, drawVertices, vertexColour, vertexSize, precision, drawEdgeIndexes, edgeIndexHeight, edgeIndexColour, drawFaceIndexes, faceIndexHeight, faceIndexColour) {
/**
* Face opacity value between 0 and 1
* @default 1
* @minimum 0
* @maximum 1
* @step 0.1
*/
this.faceOpacity = 1;
/**
* Edge opacity value between 0 and 1
* @default 1
* @minimum 0
* @maximum 1
* @step 0.1
*/
this.edgeOpacity = 1;
/**
* Hex colour string for the edges
* @default #ffffff
*/
this.edgeColour = "#ffffff";
/**
* Hex colour string for face colour
* @default #ff0000
*/
this.faceColour = "#ff0000";
/**
* Edge width
* @default 2
* @minimum 0
* @maximum Infinity
* @step 0.1
*/
this.edgeWidth = 2;
/**
* You can turn off drawing of edges via this property
* @default true
*/
this.drawEdges = true;
/**
* You can turn off drawing of faces via this property
* @default true
*/
this.drawFaces = true;
/**
* You can turn off drawing of vertexes via this property
* @default false
*/
this.drawVertices = false;
/**
* Color of the vertices that will be drawn
* @default #ff00ff
*/
this.vertexColour = "#ffaaff";
/**
* The size of a vertices that will be drawn
* @default 0.03
* @minimum 0
* @maximum Infinity
* @step 0.01
*/
this.vertexSize = 0.03;
/**
* 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
*/
this.precision = 0.01;
/**
* Draw index of edges in space
* @default false
*/
this.drawEdgeIndexes = false;
/**
* Indicates the edge index height if they are drawn
* @default 0.06
* @minimum 0
* @maximum Infinity
* @step 0.01
*/
this.edgeIndexHeight = 0.06;
/**
* Edge index colour if the edges are drawn
* @default #ff00ff
*/
this.edgeIndexColour = "#ff00ff";
/**
* Draw indexes of faces in space
* @default false
*/
this.drawFaceIndexes = false;
/**
* Indicates the edge index height if they are drawn
* @default 0.06
* @minimum 0
* @maximum Infinity
* @step 0.01
*/
this.faceIndexHeight = 0.06;
/**
* Edge index colour if the edges are drawn
* @default #0000ff
*/
this.faceIndexColour = "#0000ff";
if (shape !== undefined) {
this.shape = shape;
}
if (faceOpacity !== undefined) {
this.faceOpacity = faceOpacity;
}
if (edgeOpacity !== undefined) {
this.edgeOpacity = edgeOpacity;
}
if (edgeColour !== undefined) {
this.edgeColour = edgeColour;
}
if (faceMaterial !== undefined) {
this.faceMaterial = faceMaterial;
}
if (faceColour !== undefined) {
this.faceColour = faceColour;
}
if (vertexColour !== undefined) {
this.vertexColour = vertexColour;
}
if (vertexSize !== undefined) {
this.vertexSize = vertexSize;
}
if (edgeWidth !== undefined) {
this.edgeWidth = edgeWidth;
}
if (drawEdges !== undefined) {
this.drawEdges = drawEdges;
}
if (drawFaces !== undefined) {
this.drawFaces = drawFaces;
}
if (drawVertices !== undefined) {
this.drawVertices = drawVertices;
}
if (precision !== undefined) {
this.precision = precision;
}
if (drawEdgeIndexes !== undefined) {
this.drawEdgeIndexes = drawEdgeIndexes;
}
if (edgeIndexHeight !== undefined) {
this.edgeIndexHeight = edgeIndexHeight;
}
if (edgeIndexColour !== undefined) {
this.edgeIndexColour = edgeIndexColour;
}
if (drawFaceIndexes !== undefined) {
this.drawFaceIndexes = drawFaceIndexes;
}
if (faceIndexHeight !== undefined) {
this.faceIndexHeight = faceIndexHeight;
}
if (faceIndexColour !== undefined) {
this.faceIndexColour = faceIndexColour;
}
}
}
OCCT.DrawShapeDto = DrawShapeDto;
class DrawShapesDto {
/**
* Provide options without default values
*/
constructor(shapes, faceOpacity, edgeOpacity, edgeColour, faceMaterial, faceColour, edgeWidth, drawEdges, drawFaces, drawVertices, vertexColour, vertexSize, precision, drawEdgeIndexes, edgeIndexHeight, edgeIndexColour, drawFaceIndexes, faceIndexHeight, faceIndexColour) {
/**
* Face opacity value between 0 and 1
* @default 1
* @minimum 0
* @maximum 1
* @step 0.1
*/
this.faceOpacity = 1;
/**
* Edge opacity value between 0 and 1
* @default 1
* @minimum 0
* @maximum 1
* @step 0.1
*/
this.edgeOpacity = 1;
/**
* Hex colour string for the edges
* @default #ffffff
*/
this.edgeColour = "#ffffff";
/**
* Hex colour string for face colour
* @default #ff0000
*/
this.faceColour = "#ff0000";
/**
* Edge width
* @default 2
* @minimum 0
* @maximum Infinity
* @step 0.1
*/
this.edgeWidth = 2;
/**
* You can turn off drawing of edges via this property
* @default true
*/
this.drawEdges = true;
/**
* You can turn off drawing of faces via this property
* @default true
*/
this.drawFaces = true;
/**
* You can turn off drawing of vertexes via this property
* @default false
*/
this.drawVertices = false;
/**
* Color of the vertices that will be drawn
* @default #ff00ff
*/
this.vertexColour = "#ffaaff";
/**
* The size of a vertices that will be drawn
* @default 0.03
* @minimum 0
* @maximum Infinity
* @step 0.01
*/
this.vertexSize = 0.03;
/**
* 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
*/
this.precision = 0.01;
/**
* Draw index of edges in space
* @default false
*/
this.drawEdgeIndexes = false;
/**
* Indicates the edge index height if they are drawn
* @default 0.06
* @minimum 0
* @maximum Infinity
* @step 0.01
*/
this.edgeIndexHeight = 0.06;
/**
* Edge index colour if the edges are drawn
* @default #ff00ff
*/
this.edgeIndexColour = "#ff00ff";
/**
* Draw indexes of faces in space
* @default false
*/
this.drawFaceIndexes = false;
/**
* Indicates the edge index height if they are drawn
* @default 0.06
* @minimum 0
* @maximum Infinity
* @step 0.01
*/
this.faceIndexHeight = 0.06;
/**
* Edge index colour if the edges are drawn
* @default #0000ff
*/
this.faceIndexColour = "#0000ff";
if (shapes !== undefined) {
this.shapes = shapes;
}
if (faceOpacity !== undefined) {
this.faceOpacity = faceOpacity;
}
if (edgeOpacity !== undefined) {
this.edgeOpacity = edgeOpacity;
}
if (edgeColour !== undefined) {
this.edgeColour = edgeColour;
}
if (faceMaterial !== undefined) {
this.faceMaterial = faceMaterial;
}
if (faceColour !== undefined) {
this.faceColour = faceColour;
}
if (vertexColour !== undefined) {
this.vertexColour = vertexColour;
}
if (vertexSize !== undefined) {
this.vertexSize = vertexSize;
}
if (edgeWidth !== undefined) {
this.edgeWidth = edgeWidth;
}
if (drawEdges !== undefined) {
this.drawEdges = drawEdges;
}
if (drawFaces !== undefined) {
this.drawFaces = drawFaces;
}
if (drawVertices !== undefined) {
this.drawVertices = drawVertices;
}
if (precision !== undefined) {
this.precision = precision;
}
if (drawEdgeIndexes !== undefined) {
this.drawEdgeIndexes = drawEdgeIndexes;
}
if (edgeIndexHeight !== undefined) {
this.edgeIndexHeight = edgeIndexHeight;
}
if (edgeIndexColour !== undefined) {
this.edgeIndexColour = edgeIndexColour;
}
if (drawFaceIndexes !== undefined) {
this.drawFaceIndexes = drawFaceIndexes;
}
if (faceIndexHeight !== undefined) {
this.faceIndexHeight = faceIndexHeight;
}
if (faceIndexColour !== undefined) {
this.faceIndexColour = faceIndexColour;
}
}
}
OCCT.DrawShapesDto = DrawShapesDto;
class FaceSubdivisionDto {
/**
* Provide options without default values
*/
constructor(shape, nrDivisionsU, nrDivisionsV, shiftHalfStepU, removeStartEdgeU, removeEndEdgeU, shiftHalfStepV, removeStartEdgeV, removeEndEdgeV) {
/**
* Number of points that will be added on U direction
* @default 10
* @minimum 1
* @maximum Infinity
* @step 1
*/
this.nrDivisionsU = 10;
/**
* Number of points that will be added on V direction
* @default 10
* @minimum 1
* @maximum Infinity
* @step 1
*/
this.nrDivisionsV = 10;
/**
* Sometimes you want to shift your points half way the step distance, especially on periodic surfaces
* @default false
*/
this.shiftHalfStepU = false;
/**
* Removes start edge points on U
* @default false
*/
this.removeStartEdgeU = false;
/**
* Removes end edge points on U
* @default false
*/
this.removeEndEdgeU = false;
/**
* Sometimes you want to shift your points half way the step distance, especially on periodic surfaces
* @default false
*/
this.shiftHalfStepV = false;
/**
* Removes start edge points on V
* @default false
*/
this.removeStartEdgeV = false;
/**
* Removes end edge points on V
* @default false
*/
this.removeEndEdgeV = false;
if (shape !== undefined) {
this.shape = shape;
}
if (nrDivisionsU !== undefined) {
this.nrDivisionsU = nrDivisionsU;
}
if (nrDivisionsV !== undefined) {
this.nrDivisionsV = nrDivisionsV;
}
if (shiftHalfStepU !== undefined) {
this.shiftHalfStepU = shiftHalfStepU;
}
if (removeStartEdgeU !== undefined) {
this.removeStartEdgeU = removeStartEdgeU;
}
if (removeEndEdgeU !== undefined) {
this.removeEndEdgeU = removeEndEdgeU;
}
if (shiftHalfStepV !== undefined) {
this.shiftHalfStepV = shiftHalfStepV;
}
if (removeStartEdgeV !== undefined) {
this.removeStartEdgeV = removeStartEdgeV;
}
if (removeEndEdgeV !== undefined) {
this.removeEndEdgeV = removeEndEdgeV;
}
}
}
OCCT.FaceSubdivisionDto = FaceSubdivisionDto;
class FaceSubdivisionToWiresDto {
/**
* Provide options without default values
*/
constructor(shape, nrDivisions, isU, shiftHalfStep, removeStart, removeEnd) {
/**
* Number of points that will be added on U direction
* @default 10
* @minimum 1
* @maximum Infinity
* @step 1
*/
this.nrDivisions = 10;
/**
* Linear subdivision direction true - U, false - V
* @default true
*/
this.isU = true;
/**
* Sometimes you want to shift your wires half way the step distance, especially on periodic surfaces
* @default false
*/
this.shiftHalfStep = false;
/**
* Removes start wire
* @default false
*/
this.removeStart = false;
/**
* Removes end wire
* @default false
*/
this.removeEnd = false;
if (shape !== undefined) {
this.shape = shape;
}
if (nrDivisions !== undefined) {
this.nrDivisions = nrDivisions;
}
if (isU !== undefined) {
this.isU = isU;
}
if (shiftHalfStep !== undefined) {
this.shiftHalfStep = shiftHalfStep;
}
if (removeStart !== undefined) {
this.removeStart = removeStart;
}
if (removeEnd !== undefined) {
this.removeEnd = removeEnd;
}
}
}
OCCT.FaceSubdivisionToWiresDto = FaceSubdivisionToWiresDto;
class FaceSubdivideToRectangleWiresDto {
/**
* Provide options without default values
*/
constructor(shape, nrRectanglesU, nrRectanglesV, scalePatternU, scalePatternV, filletPattern, inclusionPattern, offsetFromBorderU, offsetFromBorderV) {
/**
* Number of rectangles on U direction
* @default 10
* @minimum 1
* @maximum Infinity
* @step 1
*/
this.nrRectanglesU = 10;
/**
* Number of rectangles on V direction
* @default 10
* @minimum 1
* @maximum Infinity
* @step 1
*/
this.nrRectanglesV = 10;
/**
* 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
*/
this.offsetFromBorderU = 0;
/**
* 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
*/
this.offsetFromBorderV = 0;
if (shape !== undefined) {
this.shape = shape;
}
if (nrRectanglesU !== undefined) {
this.nrRectanglesU = nrRectanglesU;
}
if (nrRectanglesV !== undefined) {
this.nrRectanglesU = nrRectanglesV;
}
if (scalePatternU !== undefined) {
this.scalePatternU = scalePatternU;
}
if (scalePatternV !== undefined) {
this.scalePatternV = scalePatternV;
}
if (filletPattern !== undefined) {
this.filletPattern = filletPattern;
}
if (inclusionPattern !== undefined) {
this.inclusionPattern = inclusionPattern;
}
if (offsetFromBorderU !== undefined) {
this.offsetFromBorderU = offsetFromBorderU;
}
if (offsetFromBorderV !== undefined) {
this.offsetFromBorderV = offsetFromBorderV;
}
}
}
OCCT.FaceSubdivideToRectangleWiresDto = FaceSubdivideToRectangleWiresDto;
class FaceSubdivideToHexagonWiresDto {
/**
* Provide options without default values
*/
constructor(shape, nrHexagonsU, nrHexagonsV, flatU, scalePatternU, scalePatternV, filletPattern, inclusionPattern, offsetFromBorderU, offsetFromBorderV, extendUUp, extendUBottom, extendVUp, extendVBottom) {
/**
* Number of hexagons on U direction
* @default 10
* @minimum 1
* @maximum Infinity
* @step 1
*/
this.nrHexagonsU = 10;
/**
* Number of hexagons on V direction
* @default 10
* @minimum 1
* @maximum Infinity
* @step 1
*/
this.nrHexagonsV = 10;
// /**
// * If true, we will create hexagons with flat tops on U direction
// * @default false
// */
this.flatU = false;
/**
* 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
*/
this.offsetFromBorderU = 0;
/**
* 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
*/
this.offsetFromBorderV = 0;
/**
* If true, we will extend the hexagons beyond the face u up border by their pointy tops
* @default false
*/
this.extendUUp = false;
/**
* If true, we will extend the hexagons beyond the face u bottom border by their pointy tops
* @default false
*/
this.extendUBottom = false;
/**
* If true, we will extend the hexagons beyond the face v upper border by their half width
* @default false
*/
this.extendVUp = false;
/**
* If true, we will extend the hexagons beyond the face v bottom border by their half width
* @default false
*/
this.extendVBottom = false;
if (shape !== undefined) {
this.shape = shape;
}
if (nrHexagonsU !== undefined) {
this.nrHexagonsU = nrHexagonsU;
}
if (nrHexagonsV !== undefined) {
this.nrHexagonsU = nrHexagonsV;
}
if (flatU !== undefined) {
this.flatU = flatU;
}
if (scalePatternU !== undefined) {
this.scalePatternU = scalePatternU;
}
if (scalePatternV !== undefined) {
this.scalePatternV = scalePatternV;
}
if (filletPattern !== undefined) {
this.filletPattern = filletPattern;
}
if (inclusionPattern !== undefined) {
this.inclusionPattern = inclusionPattern;
}
if (offsetFromBorderU !== undefined) {
this.offsetFromBorderU = offsetFromBorderU;
}
if (offsetFromBorderV !== undefined) {
this.offsetFromBorderV = offsetFromBorderV;
}
if (extendUUp !== undefined) {
this.extendUUp = extendUUp;
}
if (extendUBottom !== undefined) {
this.extendUBottom = extendUBottom;
}
if (extendVUp !== undefined) {
this.extendVUp = extendVUp;
}
if (extendVBottom !== undefined) {
this.extendVBottom = extendVBottom;
}
}
}
OCCT.FaceSubdivideToHexagonWiresDto = FaceSubdivideToHexagonWiresDto;
class FaceSubdivideToHexagonHolesDto {
/**
* Provide options without default values
*/
constructor(shape, nrHexagonsU, nrHexagonsV, flatU, holesToFaces, scalePatternU, scalePatternV, filletPattern, inclusionPattern, offsetFromBorderU, offsetFromBorderV) {
/**
* Number of hexagons on U direction
* @default 10
* @minimum 1
* @maximum Infinity
* @step 1
*/
this.nrHexagonsU = 10;
/**
* Number of hexagons on V direction
* @default 10
* @minimum 1
* @maximum Infinity
* @step 1
*/
this.nrHexagonsV = 10;
// /**
// * If true, we will create hexagons with flat tops on U direction
// * @default false
// */
this.flatU = false;
/**
* If true, we will also create holes as faces
* @default false
*/
this.holesToFaces = false;
/**
* 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
*/
this.offsetFromBorderU = 0;
/**
* 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
*/
this.offsetFromBorderV = 0;
if (shape !== undefined) {
this.shape = shape;
}
if (nrHexagonsU !== undefined) {
this.nrHexagonsU = nrHexagonsU;
}
if (nrHexagonsV !== undefined) {
this.nrHexagonsU = nrHexagonsV;
}
if (flatU !== undefined) {
this.flatU = flatU;
}
if (holesToFaces !== undefined) {
this.holesToFaces = holesToFaces;
}
if (scalePatternU !== undefined) {
this.scalePatternU = scalePatternU;
}
if (scalePatternV !== undefined) {
this.scalePatternV = scalePatternV;
}
if (filletPattern !== undefined) {
this.filletPattern = filletPattern;
}
if (inclusionPattern !== undefined) {
this.inclusionPattern = inclusionPattern;
}
if (offsetFromBorderU !== undefined) {
this.offsetFromBorderU = offsetFromBorderU;
}
if (offsetFromBorderV !== undefined) {
this.offsetFromBorderV = offsetFromBorderV;
}
}
}
OCCT.FaceSubdivideToHexagonHolesDto = FaceSubdivideToHexagonHolesDto;
class FaceSubdivideToRectangleHolesDto {
/**
* Provide options without default values
*/
constructor(shape, nrRectanglesU, nrRectanglesV, scalePatternU, scalePatternV, filletPattern, inclusionPattern, holesToFaces, offsetFromBorderU, offsetFromBorderV) {
/**
* Number of rectangles on U direction
* @default 10
* @minimum 1
* @maximum Infinity
* @step 1
*/
this.nrRectanglesU = 10;
/**
* Number of rectangles on V direction
* @default 10
* @minimum 1
* @maximum Infinity
* @step 1
*/
this.nrRectanglesV = 10;
/**
* 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
*/
this.holesToFaces = false;
/**
* 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