Releases: bitbybit-dev/bitbybit
0.16.0
- arc rotate inputs expanded
- new fetch methods
- mesh can be enabled to react to pointer move events and detect hits
- list methods expanded with remove all, add item and prepend item
- removed ignore attributes for pick and ray categories of babylonjs
- exposed screenshot methods from babylojs tools
0.15.13
- bitbybit.occt.shapes.wire.createBezierWeights - creates a bezier wire from points and their associated weights. This allows users to control curvature of a bezier in a more refined way.
- babylonjs update to 7.13.0
0.15.12
- Greased lines are now used to render edges of occt shapes and everything that creates polylines
0.15.10
bitbybit.babylon.gaussianSplatting.create - loads gaussian splat from any url and returns a babylon mesh
bitbybit.occt.shapes.wire.createZigZagBetweenTwoWires - wires can now be subdivided along all the edges by a given number. It can also use divide by equal distance approach instead of using curve parameters.
bitbybit.occt.shapeToMesh - normalized to accept inputs
0.15.8
- bitbybit.occt.operations.offset - The inputs now take optional face for guidance. Sometimes it is necessary to provide a face to guide the offset as various kinds of geometrical situations can prove hard for algorithm to guess the right solution.
- bitbybit.occt.operations.offsetAdv - This algorithm now also takes optional face for guidance. It is an alternative method that have more customizations exposed through it's inputs.
Unit Tests And Refactoring
We have been working on improving the quality of our core codebase by adding new unit tests and restructuring the code in the @bitbybit-dev/occt layer. Check out this blog post to learn more about that:
0.15.7
- Removed optionality from shape properties in the input DTO classes.
- bitbybit.occt.shapes.edge.constraintTanCirclesOnTwoCircles - Finds all of the circles that are tangential to two circles. Solution can contain one or more edges.
- bitbybit.occt.shapes.edge.constraintTanCirclesOnCircleAndPnt - Finds all of the circles that are tangential to a circle and a single point. Solution can contain one or more edges.
- bitbybit.occt.transforms.rotate - implementation changed to use better OCCT transformation approach. Previous rotation method had strange side effects for UV coordinates of faces. That caused problems in rendering.
0.15.6
Constructing faces in between two or more circles is a common task in mechanical design. This release brings just that.
- bitbybit.occt.shape.face.createFaceFromMultipleCircleTanWires - Creates a face from multiple circle wires. You can choose how circles will be connected. There three strategies 'allWithAll' will connect all circles with all circles, 'inOrder' will connect circles in order they are provided to the algorithm, 'inOrderClosed' will connect circles in order they are given and last circle with the first one.
- bitbybit.occt.shape.face.createFaceFromMultipleCircleTanWireCollections - This is a powerful technique, which can express many difficult designs automatically. You can provide 2D array of circles and then choose how to connect them. There are three strategies 'allWithAll' will connect all circles with all circles within provided collections, 'inOrder' will connect circles in order they are provided to the algorithm in each of the nested array, 'inOrderClosed' will connect circles in order they are given in both directions to form a closed grid kind of connection. Last two strategies require lists to contain the same number of circles.
To make it easier to construct wires from circles, we have introduced new method to create a wire from two circles.
- bitbybit.occt.shape.wire.createWireFromTwoCirclesTan - It constructs the wire from two circles. Default configuration outputs the wire that includes the outer tangential lines and outer arcs. Users can also choose to include the inner tangential lines and arcs, but such wires may contain self intersections.
0.15.5
bitbybit core layer
- bitbybit.babylon.material.pbrMetallicRoughness.create - exposed emissive color property
- bitbybit.draw.drawAnyAsync - extended to support drawing vertices. Users can choose vertex colour and size. It is also possible to enable or disable the drawing of vertices on the shape.
There are many methods for creating and interacting with circular edges
- bitbybit.occt.shape.edge.arcThroughTwoPointsAndTangent - creates an arc edge between two points given the tangent direction for first point.
- bitbybit.occt.shape.edge.arcFromCircleAndTwoPoints - creates an arc edge between two points that are on the circle. Users need to provide the circle and two points.
- bitbybit.occt.shape.edge.arcFromCircleAndTwoAngles - creates an arc edge between two alpha angles on the circle. Users need to provide a circle and two alpha angles.
- bitbybit.occt.shape.edge.arcFromCirclePointAndAngle - creates an arc edge between the point and alpha angles on the circle. Users need to provide a circle, alpha angle and a point.
- bitbybit.occt.shape.edge.getCircularEdgesAlongWire - gets all circular edges along the wire.
- bitbybit.occt.shape.edge.getLinearEdgesAlongWire - gets all linear edges along the wire.
- bitbybit.occt.shape.edge.getCircularEdgeCenterPoint - gets the center point on the circular edge, which can also be an arc.
- bitbybit.occt.shape.edge.getCircularEdgeRadius - gets the radius of the circular edge, which can also be an arc.
- bitbybit.occt.shape.edge.getCircularEdgePlaneDirection - gets the direction of the circular edge, which can also be an arc.
Creating edges from various constraints was not really a thing in bitbybit, but with these few methods it becomes possible to achieve some cool circular geometries
- bitbybit.occt.shape.edge.constraintTanLinesFromTwoPtsToCircle - Creates tangential lines towards the circle from two given points. You can optimize the solutions to include the inner and outer parts of the circle.
- bitbybit.occt.shape.edge.constraintTanLinesFromPtToCircle - Creates tangential lines towards the circle from one given point. You can optimize the solutions to include the inner and outer parts of the circle.
- bitbybit.occt.shape.edge.constraintTanLinesOnTwoCircles - Creates tangential lines between the two circles You can optimize the solutions to include the inner and outer parts of the circle and keep the inner or outer solution lines.
Vertex is a native shape type in OCCT, which was not exposed in bitbybit till now. bitbybit.occt.shapes.vertex - new category for vertex type shapes of occt. Vertex is basically a point, but it does work as a shape of opencascade, it means you can combine it to composed shapes, apply transformations and do other cool things with it.
- bitbybit.occt.shapes.vertex.vertexFromPoint - creates vertex shape from the regular bitbybit point represented by 3 numbers in the array.
-
- bitbybit.occt.shapes.vertex.verticesFromPoints - creates vertex shapes from the regular bitbybit points array.
- bitbybit.occt.shapes.vertex.getVerticesAsPoints - gets the vertices from any kind of shape as points. Shapes that are made out of edges have vertices.
- bitbybit.occt.shapes.vertex.verticesToPoints - transforms vertices to regular bitbybit points represented by 3 numbers in the array
- bitbybit.occt.shapes.vertex.vertexToPoint - transforms single vertex shape to bitbybit point represented by 3 numbers in the array
- bitbybit.occt.shapes.vertex.getVertices - gets the vertices from any kind of shape as OCCT Vertex shapes.
- bitbybit.occt.shapes.vertex.verticesCompoundFromPoints - creates single compound shape consisting of multiple vertices.
Higher level methods on wires will be useful in the future.
- bitbybit.occt.shapes.wire.createZigZagBetweenTwoWires - creates a zig zag polyline wire between two wires. Each edge on the wires gets divided into given number of segments and those points are joined together into a polyline.
Due to exposed vertex type we now need to be able to get vertices of shapes when transforming shapes to meshes in order to render geometry correctly.
- bitbybit.occt.shapeToMesh - improved to return vertices as points for visualization purposes
0.15.4
- new method to reverse wire by reversing all its edges and their order.
- fixed a bug to reverse edge
- static ortho camera setup
0.15.3
- bitbybit.occt.operations.distancesToShapeFromPoints - method to retrieve the distances from points to the shape. This method first checks the closest point on the shape and then measures the distance.
- bitbybit.logic.randomBooleans - creates a random boolean list of predefined length. Threshold is provided to regulate the probability of creating true/false values.
- bitbybit.logic.not - operation inverts boolean value
- bitbybit.logic.notList - operation inverts boolean values in the list
- bitbybit.logic.twoThresholdRandomGradient - 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.
- bitbybit.logic.thresholdBooleanList - creates a boolean list by checking if number is larger or smaller than the threshold
- bitbybit.logic.thresholdGapsBooleanList - creates a boolean list based on a list of numbers and a gap thresholds. Gap thresholds are pairs of min and max values that mark gap boundaries. If the given number falls into this gap, it will be considered true, if it does not fall in any of the gaps, it will be considered false.
- bitbybit.point.distancesToPoints - finds the distances between the start point and multiple end points
- bitbybit.occt.shapes.face.subdivideToNormals - is now fixed for reversed face situations. When trying to retrieve the normal of the face, we now check if the face is reversed from its original surface and if it is, we need to reverse the normal, otherwise it points to the direction of original surface and not the face.