carputils.mesh.Cable

class carputils.mesh.Cable(x0, x1, dx=0.1)

Generate a one dimensional mesh of line segments.

The generated mesh is aligned along the x axis, with y and z set to 0. The mesh is defined by three parameters, the start and end x coordinate and the node spacing, in mm.

To generate a mesh from x=0 to x=10, with 0.1mm spacing:

>>> geom = Cable(0, 10, 0.1)
>>> geom.generate_carp('mesh/cable')

At present, fibres are always aligned in the positive x direction.

For more information on defining mesh regions etc., please see the mesh_generation section of the documentation.

Args:
x0 : float
The lower x limit of the mesh, in mm
x1 : float
The upper x limit of the mesh, in mm
dx : float, optional
The node spacing of the mesh, in mm, defaults to 0.1