Mesh
- class tissue_forge.models.vertex.solver.Mesh
Contains all
Vertex
,Surface
andBody
instances- property has_quality: bool
Test whether the mesh has automatic quality maintenance
- property quality_working: bool
Test whether mesh quality is currently being improved
- property quality
Quality maintenance
- property num_vertices: int
Number of vertices
- property num_surfaces: int
Number of surfaces
- property num_bodies: int
Number of bodies
- property size_vertices: int
Size of the list of vertices
- property size_surfaces: int
Size of the list of surfaces
- property size_bodies: int
Size of the list of bodies
- property is_3d: bool
Test whether the mesh is 3D. A 3D mesh has at least one body
- toString() std::string
Get a JSON string representation
- ensure_available_vertices(numAlloc: size_t const &) HRESULT
Ensure that there are a given number of allocated vertices
- Parameters:
numAlloc (int) – a given number of allocated vertices
- ensure_available_surfaces(numAlloc: size_t const &) HRESULT
Ensure that there are a given number of allocated surfaces
- Parameters:
numAlloc (int) – a given number of allocated surfaces
- ensure_available_bodies(numAlloc: size_t const &) HRESULT
Ensure that there are a given number of allocated bodies
- Parameters:
numAlloc (int) – a given number of allocated bodies
- create(*args) HRESULT
Overload 1:
Create a vertex
- Parameters:
obj (
Vertex
) – a vertex to populatepid (int) – the id of the underlying particle
Overload 2:
Create a surface
- Parameters:
obj (
Surface
) – a surface to populate
Overload 3:
Create a body
- Parameters:
obj (
Body
) – a body to populate
- static get() TissueForge::models::vertex::Mesh *
Get the mesh
- lock() void
Locks the mesh for thread-safe operations
- unlock() void
Unlocks the mesh for thread-safe operations
- find_vertex(pos: fVector3, tol: FloatP_t const & = 0.0001) TissueForge::models::vertex::Vertex *
Find a vertex in this mesh
- Parameters:
pos (
FVector3
) – position to looktol (float) – distance tolerance
- Return type:
- Returns:
a vertex within the distance tolerance of the position, otherwise NULL
- get_vertex_by_pid(pid: unsigned int const &) TissueForge::models::vertex::Vertex *
Get the vertex for a given particle id
- Parameters:
pid (int) – particle id
- get_vertex(idx: unsigned int const &) TissueForge::models::vertex::Vertex *
Get the vertex at a location in the list of vertices
- Parameters:
idx (int) – location in the list
- get_surface(idx: unsigned int const &) TissueForge::models::vertex::Surface *
Get the surface at a location in the list of surfaces
- Parameters:
idx (int) – location in the list
- get_body(idx: unsigned int const &) TissueForge::models::vertex::Body *
Get the body at a location in the list of bodies
- Parameters:
idx (int) – location in the list
- validate() bool
Validate state of the mesh
- Return type:
boolean
- Returns:
true if in a valid state
- make_dirty() HRESULT
Manually notify that the mesh has been changed
- connected(*args) bool
Overload 1:
Check whether two vertices are connected
- Parameters:
- Return type:
boolean
- Returns:
true if the two vertices are connected
Overload 2:
Check whether two surfaces are connected
- Parameters:
v1 – first surface
v2 – second surface
- Return type:
boolean
- Returns:
true if the two surfaces are connected
Overload 3:
Check whether two bodies are connected
- Parameters:
v1 – first body
v2 – second body
- Return type:
boolean
- Returns:
true if the two bodies are connected
- remove(*args) HRESULT
Overload 1:
Remove a vertex from the mesh; all dependent surfaces and bodies are also removed
- Parameters:
v (
Vertex
) – a vertex
Overload 2:
Remove a surface from the mesh; all dependent bodies are also removed
- Parameters:
s (
Surface
) – a surface
Overload 3:
Remove a body from the mesh
- Parameters:
b (
Body
) – a body
- __str__() str
Return str(self).