RELEASE NOTES 0.15.5: Enhanced Circle, Arc, and Vertex Functionality

This release, version 0.15.5, introduces a significant number of new features designed to make working with circles, arcs, and OCCT vertex shapes easier and more powerful. All algorithms included in this update are open-sourced under the MIT license and are available in our NPM packages.
Circular Edges
While creating circular geometry has always been possible in Bitbybit.dev, this release adds many new methods to enhance how you work with circular edges and arcs:
bitbybit.occt.shape.edge.arcThroughTwoPointsAndTangent: Creates an arc edge between two points, given the tangent direction for the first point.bitbybit.occt.shape.edge.arcFromCircleAndTwoPoints: Creates an arc edge between two points that lie on a given circle. Users need to provide the circle and the two points.bitbybit.occt.shape.edge.arcFromCircleAndTwoAngles: Creates an arc edge on a given circle between two specified alpha angles (in radians or degrees, depending on API).bitbybit.occt.shape.edge.arcFromCirclePointAndAngle: Creates an arc edge on a given circle between a specified point and an alpha angle.bitbybit.occt.shape.edge.getCircularEdgesAlongWire: Retrieves all circular edges that form part of a given wire.bitbybit.occt.shape.edge.getLinearEdgesAlongWire: Retrieves all linear (straight) edges that form part of a given wire.bitbybit.occt.shape.edge.getCircularEdgeCenterPoint: Gets the center point of a circular edge (which can also be an arc).bitbybit.occt.shape.edge.getCircularEdgeRadius: Gets the radius of a circular edge (which can also be an arc).bitbybit.occt.shape.edge.getCircularEdgePlaneDirection: Gets the normal direction of the plane in which a circular edge (or arc) lies.
Edges From Constraints
Constructing geometry often benefits from constraint-based methods. This release introduces new ways to create tangential edges based on geometric constraints:
bitbybit.occt.shape.edge.constraintTanLinesFromTwoPtsToCircle: Creates lines tangential to a given circle that pass through two specified points. Options allow for selecting inner or outer tangent solutions.bitbybit.occt.shape.edge.constraintTanLinesFromPtToCircle: Creates lines tangential to a given circle that pass through a single specified point. Options allow for selecting different tangent solutions.bitbybit.occt.shape.edge.constraintTanLinesOnTwoCircles: Creates lines that are tangential to two given circles. Options allow for selecting inner or outer tangent lines.
Vertex Shape Type
The Vertex is a native shape type in OpenCascade Technology (OCCT), representing a single point in 3D space. Until now, it wasn't directly exposed as a distinct shape type in Bitbybit.dev. This release introduces the bitbybit.occt.shapes.vertex category.
While a vertex is essentially a point, treating it as an OCCT shape allows it to be part of compound shapes, undergo transformations, and participate in other OCCT operations.
bitbybit.occt.shapes.vertex.vertexFromPoint: Creates an OCCT Vertex shape from a standard Bitbybit.dev point (typically an array of 3 numbers[x, y, z]).bitbybit.occt.shapes.vertex.verticesFromPoints: Creates multiple OCCT Vertex shapes from an array of Bitbybit.dev points.bitbybit.occt.shapes.vertex.getVerticesAsPoints(Note: Path might be slightly different, e.g., underedgeor a generalshapeutility if it extracts from any shape type): Extracts the vertices from any OCCT shape that is composed of edges (like wires, faces, solids) and returns them as an array of Bitbybit.dev points.bitbybit.occt.shapes.vertex.verticesToPoints: Converts an array of OCCT Vertex shapes into an array of Bitbybit.dev points.bitbybit.occt.shapes.vertex.vertexToPoint: Converts a single OCCT Vertex shape into a Bitbybit.dev point.bitbybit.occt.shapes.vertex.getVertices(Note: Path might be slightly different): Extracts vertices from any OCCT shape and returns them as OCCT Vertex shapes.bitbybit.occt.shapes.vertex.verticesCompoundFromPoints: Creates a single OCCT Compound shape consisting of multiple OCCT Vertex shapes created from an array of Bitbybit.dev points.
Wire Enhancements
A fun new method for wire creation has been implemented:
bitbybit.occt.shapes.wire.createZigZagBetweenTwoWires: Creates a zig-zag polyline wire between two input wires. Each edge on the input wires is divided into a specified number of segments, and these division points are then connected sequentially to form the zig-zag pattern.
Shape to Mesh and Drawing Updates
With the direct exposure of the OCCT Vertex shape type, it became necessary to update how shapes are converted to meshes for rendering and how drawing functions handle these new entities:
bitbybit.occt.shapeToMesh: This core function for converting OCCT shapes to renderable meshes has been extended to also return vertex points. This is useful for visualization purposes, allowing vertices themselves to be drawn.bitbybit.babylon.material.pbrMetallicRoughness.create: The emissive color property has been exposed for PBR (Physically Based Rendering) materials, allowing surfaces to emit light.bitbybit.draw.drawAnyAsync: This versatile drawing function has been extended to support the direct drawing of OCCT Vertex shapes. Users can now specify vertex color and size when drawing shapes, and can also choose to enable or disable the rendering of vertices on any OCCT shape.
These updates provide more control and flexibility in both creating and visualizing complex geometries within the Bitbybit.dev ecosystem.
