Mesh
- class tissue_forge.models.vertex.solver.Mesh
Contains all
Vertex,SurfaceandBodyinstances- 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()
Get a JSON string representation
- ensure_available_vertices(numAlloc)
Ensure that there are a given number of allocated vertices
- Parameters:
numAlloc (int) – a given number of allocated vertices
- ensure_available_surfaces(numAlloc)
Ensure that there are a given number of allocated surfaces
- Parameters:
numAlloc (int) – a given number of allocated surfaces
- ensure_available_bodies(numAlloc)
Ensure that there are a given number of allocated bodies
- Parameters:
numAlloc (int) – a given number of allocated bodies
- create(*args)
Overload 1:
Create a vertex
- Parameters:
obj (
Vertex) – a vertex to populatepid (int) – the id of the underlying particle
Overload 2:
Create vertices
- Parameters:
objs (
Vertex) – vertices to populatepids (std::vector< unsigned int,std::allocator< unsigned int > >) – the ids of the underlying particles
Overload 3:
Create a surface
- Parameters:
obj (
Surface) – a surface to populate
Overload 4:
Create surfaces
- Parameters:
objs (
Surface) – surfaces to populatenumObjs (int) – number of surfaces
Overload 5:
Create a body
- Parameters:
obj (
Body) – a body to populate
Overload 6:
Create bodies
- Parameters:
objs (
Body) – bodies to populatenumObjs (int) – number of bodies
- static get()
Get the mesh
- lock()
Locks the mesh for thread-safe operations
- unlock()
Unlocks the mesh for thread-safe operations
- find_vertex(pos, tol=0.0001)
Find a vertex in this mesh
- Parameters:
pos (
FVector3) – position to looktol (float, optional) – distance tolerance
- Return type:
- Returns:
a vertex within the distance tolerance of the position, otherwise NULL
- get_vertex_by_pid(pid)
Get the vertex for a given particle id
- Parameters:
pid (int) – particle id
- get_vertex(idx)
Get the vertex at a location in the list of vertices
- Parameters:
idx (int) – location in the list
- get_surface(idx)
Get the surface at a location in the list of surfaces
- Parameters:
idx (int) – location in the list
- get_body(idx)
Get the body at a location in the list of bodies
- Parameters:
idx (int) – location in the list
- validate()
Validate state of the mesh
- Return type:
boolean
- Returns:
true if in a valid state
- make_dirty()
Manually notify that the mesh has been changed
- connected(*args)
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)
Overload 1:
Remove a vertex from the mesh; all dependent surfaces and bodies are also removed
- Parameters:
v (
Vertex) – a vertex
Overload 2:
Remove vertices from the mesh; all dependent surfaces and bodies are also removed
- Parameters:
v (
Vertex) – verticesnumObjs (int) – number of vertices
Overload 3:
Remove a surface from the mesh; all dependent bodies are also removed
- Parameters:
s (
Surface) – a surface
Overload 4:
Remove surfaces from the mesh; all dependent bodies are also removed
- Parameters:
s (
Surface) – surfacesnumObjs (int) – number of surfaces
Overload 5:
Remove a body from the mesh
- Parameters:
b (
Body) – a body
Overload 6:
Remove bodies from the mesh
- Parameters:
b (
Body) – bodiesnumObjs (int) – number of bodies
- __str__() str
Return str(self).