Table of Contents

Class TopoStl3HfrSmoothDisplayee

Namespace
Hi.Geom.Topo
Assembly
HiDisp.dll

Smooth-shaded displayee for TopoStl3Hfr. Renders smooth faces (per-vertex averaged normals) and sharp edges only. All rendering-related cached data (adjacent cos², smooth normals) is stored in this class via dictionaries, keeping the source TopoStl3Hfr clean. Corresponds to C++ topo_stl3::_smoothDraw + _edgeDraw.

public class TopoStl3HfrSmoothDisplayee : IDisplayee, IExpandToBox3d, IDisposable
Inheritance
TopoStl3HfrSmoothDisplayee
Implements
Inherited Members
Extension Methods

Constructors

TopoStl3HfrSmoothDisplayee(TopoStl3Hfr, double)

Initializes a new smooth displayee wrapping the given TopoStl3Hfr.

public TopoStl3HfrSmoothDisplayee(TopoStl3Hfr source, double roundCos = 0.8)

Parameters

source TopoStl3Hfr

The source topological STL.

roundCos double

Round cosine threshold (default 0.8).

Fields

DefaultRoundCos

Default round cosine threshold for smooth/sharp edge classification.

public const double DefaultRoundCos = 0.8

Field Value

double

DefaultRoundCosSquare

Default round cosine squared threshold.

public const double DefaultRoundCosSquare = 0.6400000000000001

Field Value

double

Properties

RoundCos

Gets or sets the round cosine threshold for smooth/sharp edge classification. Edges where the cos² of adjacent triangle normals exceeds this² are considered “round” (smooth). Setting this value invalidates the cached drawings. Corresponds to C++ _round_cos.

public double RoundCos { get; set; }

Property Value

double

Source

The source topological STL.

public TopoStl3Hfr Source { get; }

Property Value

TopoStl3Hfr

Methods

ClearCache()

Invalidates all cached data (dictionaries and drawings). Call this after modifying the source topology or changing RoundCos.

public void ClearCache()

Display(Bind)

Displays the smooth-shaded topological STL: sharp edges in black + smooth-shaded faces. Corresponds to C++ topo_stl3::Render.

public void Display(Bind bind)

Parameters

bind Bind

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

public void Dispose()

Dispose(bool)

protected virtual void Dispose(bool disposing)

Parameters

disposing bool

ExpandToBox3d(ref box3d_t)

Expands the destination box. This function is usually used to compute the bounding box of elements. box3d_t is a value type, so the destination is passed by reference (the C++ expand_to_box3d(box3&) shape); an implementation writes dst = dst.Expanded(...) or forwards ref dst to its parts.

public void ExpandToBox3d(ref box3d_t dst)

Parameters

dst box3d_t

Destination box, expanded in place