Geometry

Cube

class Py3DViewer.geometry.Cube.Cube(scale=1)[source]

Bases: object

This class stores information about the geometry and the topology of a cube of given size (default 1). A cube object can be easily turned into a surface or volumetric mesh (see vertices and topology_ properties).

topology_hex

The hexaedron representing the cube mesh

Type:Return
Type:Array(1x8)
topology_quad

The six quads composing the cube mesh

Type:Return
Type:Array(6x4)
topology_tet

The five tetrahedra composing the cube mesh

Type:Return
Type:Array(1x8)
topology_tris

The 12 triangles composing the cube mesh

Type:Return
Type:Array(12x3)
vertices

The 8 vertices of the cube

Type:Return
Type:Array(8x3)

Ray

class Py3DViewer.geometry.Ray.Ray(origin=(0.0, 0.0, 0.0), direction=(1.0, 0, 0))[source]

Bases: object

Segment

class Py3DViewer.geometry.Segment.Segment(a, b)[source]

Bases: object

length
point_on_segment(point)[source]

Sphere

class Py3DViewer.geometry.Sphere.Sphere(tile=(20, 20), origin=(0.0, 0.0, 0.0), radius=0.5)[source]

Bases: object

area
contains_point(point, strict=True)[source]
diameter
line_segment_intersect(segment)[source]
ray_intersect(ray)[source]
topology_quad
topology_tris
vertices
volume