File I/O

tissue_forge.io.fromFile3DF(filePath: std::string const &) TissueForge::io::ThreeDFStructure *

Tissue Forge import/export interface

Load a 3D format file

Parameters:

filePath (string) – path of file

Return type:

ThreeDFStructure

Returns:

ThreeDFStructure* 3D format data container

tissue_forge.io.toFile3DF(format: std::string const &, filePath: std::string const &, pRefinements: unsigned int const & = 0) HRESULT

Export engine state to a 3D format file

Parameters:
  • format (string) – format of file

  • filePath (string) – path of file

  • pRefinements (int) – mesh refinements applied when generating meshes

Return type:

int

Returns:

HRESULT

tissue_forge.io.toFile(saveFilePath: std::string const &) HRESULT

Save a simulation to file

Parameters:

saveFilePath (string) – absolute path to file

Return type:

int

Returns:

HRESULT

tissue_forge.io.toString() std::string

Return a simulation state as a JSON string

Return type:

string

Returns:

std::string

tissue_forge.io.mapImportParticleId(pId: unsigned int const &) int

Get the id of a particle according to import data that corresponds to a particle id of current data.

Only valid between initialization and the first simulation step, after which the import summary data is purged.

Parameters:

pId (int) – id of particle in exported data

Return type:

int

Returns:

int >=0 if particle is found; -1 otherwise

tissue_forge.io.mapImportParticleTypeId(pId: unsigned int const &) int

Get the id of a particle type according to import data that corresponds to a particle type id of current data.

Only valid between initialization and the first simulation step, after which the import summary data is purged.

Parameters:

pId (int) – id of particle type in exported data

Return type:

int

Returns:

int >=0 if particle type is found; -1 otherwise

class tissue_forge.io.ThreeDFRenderData
property color
class tissue_forge.io.ThreeDFStructure
property centroid: fVector3

Centroid of all constituent data

property vertices: vectorThreeDFVertexData_p

Constituent vertices

property edges: vectorThreeDFEdgeData_p

Constituent edges

property faces: vectorThreeDFFaceData_p

Constituent faces

property meshes: vectorThreeDFMeshData_p

Constituent meshes

property num_vertices: int

Number of constituent vertices

property num_edges: int

Number of constituent edges

property num_faces: int

Number of constituent faces

property num_meshes: int

Number of constituent meshes

property vRadiusDef

Default radius applied to vertices when generating meshes from point clouds

fromFile(filePath: std::string const &) HRESULT

Load from file

Parameters:

filePath (string) – file absolute path

Return type:

int

Returns:

HRESULT

toFile(format: std::string const &, filePath: std::string const &) HRESULT

Write to file

Parameters:
  • format (string) – output format of file

  • filePath (string) – file absolute path

Return type:

int

Returns:

HRESULT

flush() HRESULT

Flush stucture. All scheduled processes are executed.

extend(s: _io_ThreeDFStructure) HRESULT

Extend a structure

Parameters:

s (ThreeDFStructure) – stucture to extend with

clear() HRESULT

Clear all data of the structure

Return type:

int

Returns:

HRESULT

has(*args) bool

Overload 1:

Test whether a vertex is a constituent

Parameters:

v (ThreeDFVertexData) – vertex to test

Return type:

boolean

Returns:

true

Return type:

boolean

Returns:

false


Overload 2:

Test whether an edge is a constituent

Parameters:

e (ThreeDFEdgeData) – edge to test

Return type:

boolean

Returns:

true

Return type:

boolean

Returns:

false


Overload 3:

Test whether a face is a constituent

Parameters:

f (ThreeDFFaceData) – face to test

Return type:

boolean

Returns:

true

Return type:

boolean

Returns:

false


Overload 4:

Test whether a mesh is a constituent

Parameters:

m (ThreeDFMeshData) – mesh to test

Return type:

boolean

Returns:

true

Return type:

boolean

Returns:

false

add(*args) void

Overload 1:

Add a vertex

Parameters:

v (ThreeDFVertexData) – vertex to add


Overload 2:

Add an edge and all constituent data

Parameters:

e (ThreeDFEdgeData) – edge to add


Overload 3:

Add a face and all constituent data

Parameters:

f (ThreeDFFaceData) – face to add


Overload 4:

Add a mesh and all constituent data

Parameters:

m (ThreeDFMeshData) – mesh to add

remove(*args) void

Overload 1:

Remove a vertex

Parameters:

v (ThreeDFVertexData) – vertex to remove


Overload 2:

Remove a edge and all constituent data

Parameters:

e (ThreeDFEdgeData) – edge to remove


Overload 3:

Remove a face and all constituent data

Parameters:

f (ThreeDFFaceData) – face to remove


Overload 4:

Remove a mesh and all constituent data

Parameters:

m (ThreeDFMeshData) – mesh to remove

translate(displacement: fVector3) HRESULT

Translate the structure by a displacement

Parameters:

displacement (FVector3) –

Return type:

int

Returns:

HRESULT

translateTo(position: fVector3) HRESULT

Translate the structure to a position

Parameters:

position (FVector3) –

Return type:

int

Returns:

HRESULT

rotateAt(rotMat: fMatrix3, rotPt: fVector3) HRESULT

Rotate the structure about a point

Parameters:
  • rotMat (FMatrix3) –

  • rotPt (FVector3) –

Return type:

int

Returns:

HRESULT

rotate(rotMat: fMatrix3) HRESULT

Rotate the structure about its centroid

Parameters:

rotMat (FMatrix3) –

Return type:

int

Returns:

HRESULT

scaleFrom(*args) HRESULT

Overload 1:

Scale the structure about a point

Parameters:
  • scales (FVector3) –

  • scalePt (FVector3) –

Return type:

int

Returns:

HRESULT


Overload 2:

Scale the structure uniformly about a point

Parameters:
  • scale (float) –

  • scalePt (FVector3) –

Return type:

int

Returns:

HRESULT

scale(*args) HRESULT

Overload 1:

Scale the structure about its centroid

Parameters:

scales (FVector3) –

Return type:

int

Returns:

HRESULT


Overload 2:

Scale the structure uniformly about its centroid

Parameters:

scale (float) –

Return type:

int

Returns:

HRESULT

class tissue_forge.io.ThreeDFMeshData
property structure

Parent structure

property id

ID, if any. Unique to its structure and type

property name

Mesh name

property renderData

Rendering data

property vertices: vectorThreeDFVertexData_p

Constituent vertices

property edges: vectorThreeDFEdgeData_p

Constituent edges

property faces: vectorThreeDFFaceData_p

Constituent faces

property num_vertices: int

Number of constituent vertices

property num_edges: int

Number of constituent edges

property num_faces: int

Number of constituent faces

property centroid: fVector3

Centroid of all constituent data

has(*args) bool

Overload 1:

Test whether a vertex is a constituent

Parameters:

v (ThreeDFVertexData) – vertex to test

Return type:

boolean

Returns:

true

Return type:

boolean

Returns:

false


Overload 2:

Test whether an edge is a constituent

Parameters:

e (ThreeDFEdgeData) – edge to test

Return type:

boolean

Returns:

true

Return type:

boolean

Returns:

false


Overload 3:

Test whether a face is a constituent

Parameters:

f (ThreeDFFaceData) – face to test

Return type:

boolean

Returns:

true

Return type:

boolean

Returns:

false

_in(s: _io_ThreeDFStructure) bool

Test whether in a structure

Parameters:

s (ThreeDFStructure) – structure to test

Return type:

boolean

Returns:

true

Return type:

boolean

Returns:

false

is_in(*args, **kwargs) bool

Alias of :meth:_in

translate(displacement: fVector3) HRESULT

Translate the mesh by a displacement

Parameters:

displacement (FVector3) –

Return type:

int

Returns:

HRESULT

translateTo(position: fVector3) HRESULT

Translate the mesh to a position

Parameters:

position (FVector3) –

Return type:

int

Returns:

HRESULT

rotateAt(rotMat: fMatrix3, rotPt: fVector3) HRESULT

Rotate the mesh about a point

Parameters:
  • rotMat (FMatrix3) –

  • rotPt (FVector3) –

Return type:

int

Returns:

HRESULT

rotate(rotMat: fMatrix3) HRESULT

Rotate the mesh about its centroid

Parameters:

rotMat (FMatrix3) –

Return type:

int

Returns:

HRESULT

scaleFrom(*args) HRESULT

Overload 1:

Scale the mesh about a point

Parameters:
  • scales (FVector3) –

  • scalePt (FVector3) –

Return type:

int

Returns:

HRESULT


Overload 2:

Scale the mesh uniformly about a point

Parameters:
  • scale (float) –

  • scalePt (FVector3) –

Return type:

int

Returns:

HRESULT

scale(*args) HRESULT

Overload 1:

Scale the mesh about its centroid

Parameters:

scales (FVector3) –

Return type:

int

Returns:

HRESULT


Overload 2:

Scale the mesh uniformly about its centroid

Parameters:

scale (float) –

Return type:

int

Returns:

HRESULT

class tissue_forge.io.ThreeDFFaceData
property structure

Parent structure

property normal

Face normal

property id

ID, if any. Unique to its structure and type

property vertices: vectorThreeDFVertexData_p

Constituent vertices

property edges: vectorThreeDFEdgeData_p

Constituent edges

property meshes: vectorThreeDFMeshData_p

Parent meshes

property num_vertices: int

Number of constituent vertices

property num_edges: int

Number of constituent edges

property num_meshes: int

Number of parent meshes

has(*args) bool

Overload 1:

Test whether a vertex is a constituent

Parameters:

v (ThreeDFVertexData) – vertex to test

Return type:

boolean

Returns:

true

Return type:

boolean

Returns:

false


Overload 2:

Test whether an edge is a constituent

Parameters:

e (ThreeDFEdgeData) – edge to test

Return type:

boolean

Returns:

true

Return type:

boolean

Returns:

false

_in(*args) bool

Overload 1:

Test whether in a mesh

Parameters:

m (ThreeDFMeshData) – mesh to test

Return type:

boolean

Returns:

true

Return type:

boolean

Returns:

false


Overload 2:

Test whether in a structure

Parameters:

s (ThreeDFStructure) – structure to test

Return type:

boolean

Returns:

true

Return type:

boolean

Returns:

false

is_in(*args, **kwargs) bool

Alias of :meth:_in

class tissue_forge.io.ThreeDFEdgeData(_va: _io_ThreeDFVertexData, _vb: _io_ThreeDFVertexData)
property structure

Parent structure

property id

ID, if any. Unique to its structure and type

property vertices: vectorThreeDFVertexData_p

Constituent vertices

property faces: vectorThreeDFFaceData_p

Constituent faces

property meshes: vectorThreeDFMeshData_p

Parent meshes

property num_vertices: int

Number of constituent vertices

property num_faces: int

Number of parent faces

property num_meshes: int

Number of parent meshes

has(v: _io_ThreeDFVertexData) bool

Test whether a vertex is a constituent

Parameters:

v (ThreeDFVertexData) – vertex to test

Return type:

boolean

Returns:

true

Return type:

boolean

Returns:

false

_in(*args) bool

Overload 1:

Test whether in a face

Parameters:

f (ThreeDFFaceData) – face to test

Return type:

boolean

Returns:

true

Return type:

boolean

Returns:

false


Overload 2:

Test whether in a mesh

Parameters:

m (ThreeDFMeshData) – mesh to test

Return type:

boolean

Returns:

true

Return type:

boolean

Returns:

false


Overload 3:

Test whether in a structure

Parameters:

s (ThreeDFStructure) – structure to test

Return type:

boolean

Returns:

true

Return type:

boolean

Returns:

false

is_in(*args, **kwargs) bool

Alias of :meth:_in

class tissue_forge.io.ThreeDFVertexData(_position: fVector3, _structure: _io_ThreeDFStructure | None = None)
property structure

Parent structure

property position

Global position

property id

ID, if any. Unique to its structure and type

property edges: vectorThreeDFEdgeData_p

Parent edges

property faces: vectorThreeDFFaceData_p

Parent faces

property meshes: vectorThreeDFMeshData_p

Parent meshes

property num_edges: int

Number of parent edges

property num_faces: int

Number of parent faces

property num_meshes: int

Number of parent meshes

_in(*args) bool

Overload 1:

Test whether in an edge

Parameters:

e (ThreeDFEdgeData) – edge to test

Return type:

boolean

Returns:

true

Return type:

boolean

Returns:

false


Overload 2:

Test whether in a face

Parameters:

f (ThreeDFFaceData) – face to test

Return type:

boolean

Returns:

true

Return type:

boolean

Returns:

false


Overload 3:

Test whether in a mesh

Parameters:

m (ThreeDFMeshData) – mesh to test

Return type:

boolean

Returns:

true

Return type:

boolean

Returns:

false


Overload 4:

Test whether in a structure

Parameters:

s (ThreeDFStructure) – structure to test

Return type:

boolean

Returns:

true

Return type:

boolean

Returns:

false

is_in(*args, **kwargs) bool

Alias of :meth:_in