madgui.survey.shapes module

Functions

cylinder(l, r, n1[, n0])

Return (vertices, normals, indices, mode) of a cylinder with radius r around the Z axis, starting at Z=0, ending at Z=l.

disc(r, n1[, dir])

Return (vertices, normals, indices, mode) of a disc in the X-Y plane with center at Z=X=Y=0.

torus_arc(r0, r1, n0, n1[, ang0, ang1])

Return (vertices, normals, draw indices, mode) of rounded pipe a.k.a.

madgui.survey.shapes.cylinder(l, r, n1, n0=2)[source]

Return (vertices, normals, indices, mode) of a cylinder with radius r around the Z axis, starting at Z=0, ending at Z=l.

madgui.survey.shapes.disc(r, n1, dir=1)[source]

Return (vertices, normals, indices, mode) of a disc in the X-Y plane with center at Z=X=Y=0.

madgui.survey.shapes.torus_arc(r0, r1, n0, n1, ang0=6.283185307179586, ang1=6.283185307179586)[source]

Return (vertices, normals, draw indices, mode) of rounded pipe a.k.a. torus with x-y plane symmetry centered at (0, 0, 0).

The returned vertices are generated by revolving a circular segment C1 about the coplanar z axis, with C1’s center coordinates being described by the circular segment C0. Both circular segments are desribed by triples:

(r, n, ang) = (radius, num_points, angle).