Python preprocessor for T3D, a three-dimensional sequential mesh generator
T3D is a powerfull mesh generator capable to discretize complex 3D domains into triangular and tetrahedral meshes of high quality. However, it uses text input files, which might be tedious and difficult to create manually, especially for complex geometries. PyT3D is a Python module to simplify the process:
For better orientation, see T3D documentation first
Bases: object
Base class for all other objects, implementing common interface and attributes
Parameters: |
|
---|
coincide attribute
factor attribute
hidden attribute
id attribute
whether receiver is already written or not
master attribute
nomaster attribute
noslave attribute
output attribute
property attribute
size attribute
size multiplier
slave attribute
Writes receiver to given file / file name
Parameters: |
|
---|
virtual attribute
Bases: pyt3d.T3DObject
Class representing T3D Vertex
Parameters: |
|
---|
Returns Curve connecting receiver and given vertex. Returns None if no such Curve exists
Parameters: | anotherVertex (Vertex) – given vertex |
---|---|
Return type: | Curve |
fixed parameter
Returns list of neighbors (Vectices which are connected with receiver by Curves)
Return type: | [Vertex] |
---|
Checks if receiver and given vertex are neighbors (if they are connected with Curve)
Parameters: | anotherVertex (Vertex) – given Vertex |
---|---|
Return type: | bool |
Write receiver to given file
Parameters: | f (file|str) – opened file for writing or file name |
---|
weight
position
Bases: pyt3d.T3DObject
class representing T3D Curve object connecting two Vertices
Parameters: |
---|
Returns common vectex with given Curve (None if there is no common Vertex)
Parameters: | anotherCurve (Curve) – given Curve |
---|---|
Return type: | Vertex |
Returns secong Vertex of receiver (None if given Vertex does not belong to receiver)
Parameters: | v (Vertex) – given Vertex |
---|---|
Return type: | Vertex |
Returns if receiver and given Curve has common Vertex or not
Parameters: | anotherCurve (Curve) – given Curve |
---|---|
Return type: | bool |
Bases: pyt3d.T3DObject
Base class for 2D objects (Patches and Surfaces)
Parameters: |
---|
Checks if order of curves is correct and reorder them (if reorder=True) accordingly
Parameters: | reorder (bool) – passing this argument as False means not to reorder the curves, only checks if it is possible to connect them and raise error if not |
---|
Returns common Curve with given 2d object (None if there is non such Curve)
Parameters: | e (Entity2d) – given 2d object |
---|---|
Return type: | Curve |
Bases: pyt3d.Entity2d
class representing T3D Patch object
Parameters: |
---|
Checks if order of curves is correct and reorder them (if reorder=True) accordingly
Parameters: | reorder (bool) – passing this argument as False means not to reorder the curves, only checks if it is possible to connect them and raise error if not |
---|
Returns common Curve with given 2d object (None if there is non such Curve)
Parameters: | e (Entity2d) – given 2d object |
---|---|
Return type: | Curve |
Returns list of neighbors (2d objects with common boundary Curves)
Return type: | [Entity2d] |
---|
normal vector
ref parameter
Bases: pyt3d.Entity2d
class representing T3D Surface object
Parameters: |
---|
Checks if order of curves is correct and reorder them (if reorder=True) accordingly
Parameters: | reorder (bool) – passing this argument as False means not to reorder the curves, only checks if it is possible to connect them and raise error if not |
---|
Returns common Curve with given 2d object (None if there is non such Curve)
Parameters: | e (Entity2d) – given 2d object |
---|---|
Return type: | Curve |
Returns list of neighbors (2d objects with common boundary Curves)
Return type: | [Entity2d] |
---|
order in u and v direction
list of Polygons
Bases: pyt3d.T3DObject
Class representing T3D Region
Parameters: |
---|
Checks and reorder receiver’s 2d entities
Parameters: | nSteps (int) – maximum number of tries + number of boundaries |
---|
Checks orientation of two receiver’s bounding Entities2d. Changes sign of b2 or raise error in case of problem. Returns if the second boundary was changed or not
Parameters: | |
---|---|
Return type: | bool |
Returns sign of given bounding Entity2d
Parameters: | b (Entity2d) – given bounding Entity2d |
---|
Reverse receiver (sign of its bounding Entities2d
Write receiver to file (its surfaces, patches and subregions first)
Parameters: | f (file|str) – opened file for writing or file name |
---|
Runs T3D
Parameters: |
|
---|
Construct axis aligned box
Parameters: |
|
---|---|
Return type: | ([Vertex],[Curve],[Surface],Region) |
Returns box
Parameters: | vertices ([Vertex]) – given vertices |
---|---|
Return type: | ([Vertex],[Curve],[Surface],Region) |
Returns sphere
Parameters: |
|
---|---|
Return type: | ([Vertex],[Curve],[Surface],Region) |
Returns polygon
Parameters: |
|
---|---|
Return type: | ([Vertex],[Curve],[Patch],Region)|Region |