Skip to content
brep-conformancegithub

normal

Queries · api.md § normal · all operations

normal(s: Solid, points: list<Point3>) -> list<Vector3 or null>

Gives the outward unit normal at each point of the solid's boundary. Where faces meet smoothly, as a fillet meets the faces it rounds, the boundary still has a tangent plane, and the normal there is the normal of both faces. At a crease, where faces meet at an angle, the boundary has no tangent plane, and the answer is null. The answer is also null for a point that is off the boundary by more than 10·ε.

Example. Solid 1 is a 10 × 20 × 30 mm box with one corner at the origin. The second point lies on an edge, a crease.

> {"cmd": "normal", "s": 1, "points": [[5, 10, 30], [0, 0, 15]]}
< {"ok": [[0.0, 0.0, 1.0], null]}
FunctionFieldsReturns
volumesVolume
areasArea
classifys, pointslist<"in" or "on" or "out">
closests, pointslist<Point3>
normals, pointslist<Vector3 or null>
curvatures, pointslist<Number[2] or null>
checkslist<string>
centroidsPoint3 or null
inertiasNumber[3][3]
distancea, bLength
interferencea, b{volume: Volume, gap: Length}
bettisCount[3]
section_areas, origin, normalArea
sections, origin, normal, tolerancelist<list<Point3>>
projects, direction, tolerance{visible: list<list<Point2>>, hidden: list<list<Point2>>}
bounding_boxsPoint3[2]
splits, origin, normalSolid[2]
meshs, tolerance{positions: list<Point3>, triangles: list<Index[3]>}
displays, tolerance{faces: list<Face>, edges: list<list<Point3>>}
raycasts, origin, direction; or s, rayslist<Length>; or list<list<Length>>