HD Mola
 
Loading...
Searching...
No Matches
Static Public Member Functions | List of all members
MeshTools Class Reference

Tools to edit MolaMesh. More...

Static Public Member Functions

static MolaMesh Color (MolaMesh molaMesh, List< float > values)
 Color each face of a MolaMesh with a list of float values.
 
static MolaMesh Color (MolaMesh molaMesh, System.Drawing.Color color)
 Color all faces of a MolaMesh.
 
static bool[] FaceMask (List< float > values, Predicate< float > filter)
 Get a boolean array from a float value list based on the input filter condition.
 
static MolaMesh Merge (List< MolaMesh > molaMeshes)
 Merge a list of MolaMesh into one.
 
static MolaMesh Offset (MolaMesh mesh, float offset, bool closeborders=true, bool constrainZ=false)
 Creates an offset of a mesh.
 
static List< MolaMeshSplit (MolaMesh molaMesh, bool[] mask)
 Divide a MolaMesh into 2 based on the boolean mask.
 
static List< MolaMeshSplit (MolaMesh molaMesh, List< bool > mask)
 Divide a MolaMesh into 2 based on the boolean mask.
 
static MolaMesh UpdateTopology (MolaMesh molaMesh)
 Update the topology of a MolaMesh.
 
static MolaMesh WeldVertices (MolaMesh molaMesh)
 Weld overlapping vertices of a MolaMesh.
 

Detailed Description

Tools to edit MolaMesh.

Member Function Documentation

◆ Color() [1/2]

static MolaMesh Color ( MolaMesh molaMesh,
List< float > values )
inlinestatic

Color each face of a MolaMesh with a list of float values.

The list length must match the face count.

Parameters
molaMeshA MolaMesh
valuesA list of float values
Returns
The result MolaMesh

◆ Color() [2/2]

static MolaMesh Color ( MolaMesh molaMesh,
System::Drawing::Color color )
inlinestatic

Color all faces of a MolaMesh.

Parameters
molaMeshA MolaMesh
colorSystem.Drawing.Color
Returns
The result MolaMesh

◆ FaceMask()

static bool[] FaceMask ( List< float > values,
Predicate< float > filter )
inlinestatic

Get a boolean array from a float value list based on the input filter condition.

Parameters
valuesA float list
filterA Predicate
Returns
A boolean Array

Example

Predicate<float> filter = a => a > 1;
bool[] mask = MeshUtils.FaceMask(faceArea, filter);
A collection of methods to analyze MolaMesh Face.
Definition MeshAnalysis.cs:12
static List< float > FaceArea(MolaMesh molaMesh)
Get the area value of each face of a MolaMesh.
Definition MeshAnalysis.cs:18
A collection of methods to create MolaMEsh Premitives.
Definition MeshFactory.cs:11
static MolaMesh CreateSphere(float radius=1, float cx=0, float cy=0, float cz=0, int u_res=10, int v_res=10, Color? color=null)
Constructs a uv sphere mesh.
Definition MeshFactory.cs:632
A MolaGrid is taking care of getting and setting values and retrieving neighbors in an orthogonal gri...
Definition MolaGrid.cs:12
A mesh describes a 3D surface made of Vertices connected by Faces.
Definition MolaMesh.cs:12

◆ Merge()

static MolaMesh Merge ( List< MolaMesh > molaMeshes)
inlinestatic

Merge a list of MolaMesh into one.

Parameters
molaMeshesA list of MolaMesh
Returns
The result MolaMesh

◆ Offset()

static MolaMesh Offset ( MolaMesh mesh,
float offset,
bool closeborders = true,
bool constrainZ = false )
inlinestatic

Creates an offset of a mesh.

If doclose is true, it will create quad faces along the naked edges of an open input mesh.

Parameters
meshA MolaMesh
offsetOffset distance
closebordersWether to close the borders or not
constrainZ
Returns
The result MolaMesh

◆ Split() [1/2]

static List< MolaMesh > Split ( MolaMesh molaMesh,
bool[] mask )
inlinestatic

Divide a MolaMesh into 2 based on the boolean mask.

Parameters
molaMeshA MolaMesh
maskA boolean array
Returns
A list of two MolaMesh

◆ Split() [2/2]

static List< MolaMesh > Split ( MolaMesh molaMesh,
List< bool > mask )
inlinestatic

Divide a MolaMesh into 2 based on the boolean mask.

Parameters
molaMeshA MolaMesh
maskA boolean array
Returns
A list of two molaMesh

◆ UpdateTopology()

static MolaMesh UpdateTopology ( MolaMesh molaMesh)
inlinestatic

Update the topology of a MolaMesh.

Parameters
molaMeshA MolaMesh
Returns
A boolean Array

◆ WeldVertices()

static MolaMesh WeldVertices ( MolaMesh molaMesh)
inlinestatic

Weld overlapping vertices of a MolaMesh.

Parameters
molaMeshA MolaMesh
Returns
A boolean Array