Copyright © 2021 by K4.org
  (v.0.48.124)

FaceDoctor is a utility Design for inspection and detection of face mesh problems.

Index

Rules

enableFaceNormals

enableFaceNormals: Boolean

If true, face normal tics are drawn from the center of all faces.

Flags : Cached, Parameter (Note this is uncached)

Expression : false

enableShrink

enableShrink: Boolean

If true, the shrinkFactor is applied to the faces.

Flags : Cached, Parameter (Note this is uncached)

Expression : false

enableVertexNormals

enableVertexNormals: Boolean

If true, vertex normal tics are drawing from each face-vertex. Note that these will start at the true vertices, not the shrunken vertices.

Flags : Cached, Parameter (Note this is uncached)

Expression : false

faceNormalTics

faceNormalTics: Child

The tics for face normals

Design: LineSegments

faceSets

faceSets: Array

The new faces produced by shrinking

Flags : Cached (Note this is uncached)

Expression : this.enableShrink ? this.shrunkData.faces : this.target.meshData.faces.map(f => [f.a, f.b, f.c])

faceVertexUvs

faceVertexUvs: Array

Just an echo of the target originals.

Flags : Cached (Note this is uncached)

Expression : []//this.target.faceVertexUvs

renderNode

renderNode: Boolean

Override because this has children.

Flags : Cached (Note this is uncached)

Expression : true

shrinkFactor

shrinkFactor: Number

The shrink factor used for the shrink analysis. This shrinks each face toward its center.

Flags : Cached, Parameter (Note this is uncached)

Expression : 0.95

shrunkData

shrunkData: Any

The shrunken faces and vertices.

Flags : Cached (Note this is uncached)

Expression : const sf = this.shrinkFactor; const m = this.target.meshData; const newVs = []; let i=0; const verts = m.vertices; const newFs = m.faces.map(f => { const va = verts[f.a], vb = verts[f.b], vc = verts[f.c]; const midab = va.clone().lerp(vb, 0.5); const cen = midab.clone().lerp(vc, 1/3); const ap = cen.clone().lerp(va, sf); const bp = cen.clone().lerp(vb, sf); const cp = cen.clone().lerp(vc, sf); newVs.push(ap); newVs.push(bp); newVs.push(cp); const newFace = [i, i+1, i+2]; i += 3; return newFace; }); return {vertices: newVs, faces: newFs};

target

target: Model

Model that supports meshData protocol.

Flags : Cached, Required, Parameter (Note this is uncached)

Expression : ``

ticSize

ticSize: Number

The length of each tic in world units.

Flags : Cached, Parameter (Note this is uncached)

Expression : 1

vertexNormalTics

vertexNormalTics: Child

The tics for vertex normals

Design: LineSegments

vertices3

vertices3: Array

The new vertices produced by shrinking.

Flags : Cached (Note this is uncached)

Expression : this.enableShrink ? this.shrunkData.vertices : this.target.meshData.vertices