Havn
PlatformLoreDocs Sign in
KernelBosonHintLore
  • Start here 2
  • Verbs and diagnostics 2
  • Foundations 78
  • Meshes 27
    • mesh.fromFaces
    • mesh.fromArrays
    • mesh.box
    • mesh.cylinder
    • mesh.face
    • mesh.point
    • mesh.boundingBox
    • mesh.faceNormal
    • mesh.faceArea
    • mesh.area
    • mesh.volume
    • mesh.validate
    • mesh.transformed
    • mesh.raycast
    • mesh.closestPoint
    • mesh.booleanUnion
    • mesh.booleanDifference
    • mesh.booleanIntersection
    • mesh.subdivide
    • mesh.extrudeFaces
    • mesh.insetFaces
    • mesh.toGeometry
    • mesh.toJSON
    • geometryKernel.loadGeometryKernel
    • geometryKernel.registerGeometryKernel
    • containment.containsPoints
    • geometryKernel.geometryKernelReady
  • 2D polygons and regions 39
  • NURBS curves and surfaces 28
  • Selectors and queries 3
  • Surface samples 6
  • Roles and lineage 5
  • Form facts and relations 2
  • Sources 4
  • Transforms and merge 4
  • Mesh edits 13

Nothing in Kernel matches.

Docs/ Kernel/ Meshes

mesh.faceNormal

Unit normal of one face, outward for a counter-clockwise face.

GeometricSince 0.3.0

Usage

TypeScript
mesh.faceNormal(f: number): Vector3 | null

Parameters

  • fnumber

    Face index.

    Required

Returns

The unit normal; null when f is not a face or the face has no area.

Guarantees

  • the result has length 1 (Vector3.length)
  • The same result on every machine.

Example

TypeScript
Mesh.box().value.faceNormal(1) // → { x: 0, y: 0, z: 1 }

See also

  • mesh.faceArea
Previousmesh.boundingBox Nextmesh.faceArea

On this page

  1. Usage
  2. Parameters
  3. Returns
  4. Guarantees
  5. Example
  6. See also
  1. Usage
  2. Parameters
  3. Returns
  4. Guarantees
  5. Example
  6. See also
Havn Platform Lore Docs