RevTrunk#

A revolution trunk is a right trunk with circular basis. revTrunk class inherits from Trunk class.

Figure made with TikZ

Figure made with TikZ

So, to define a revolution trunk, give centers and radiuses of bases, using dedicated parameters _center1, _center2, taking a point or a single value (in this case, it is a 1D point), and _radius1 and _radius2 parameters, taking one single positive value.

RevTrunk offers you more geometry abilities. It is possible to add extensions at ends of the revolution trunk. Extensions can be : none, flat, ellipsoid, or cone. To define an extension, its shape (type GeometricEndShape, values : gesNone, gesFlat, gesEllipsoid or gesCone) and its height (the distance of the apex/apogee from the corresponding basis of the trunk). Default values are flat with no height. Please also note that any extension means 4 additional edges and 4 additional side domains.

Figure made with TikZ

Figure made with TikZ

To construct such geometry, use parameters _end1_shape and _end2_shape, taking a GeometricEndShape, and _end1_distance and _end2_distance, taking one single positive value.

_nnodes parameter can take one single value, an explicit list of 3 or \(n\) values or a Numbers object, where \(n\) is 3 times the number of edges of the basis. _hsteps parameter can take one real value, an explicit list of \(p\) real values or Reals object, where \(p\) is the number of points defining the trunk.

There is an additional parameter: _nbsubdomains, enabling to slice the main trunk (without its extensions) in many domains. If required, give names of main domain and side domains as explained in Geometry definition.

Let’s summarize information about geometrical keys on revolution trunks:

key(s)

authorized types

examples

_center1, _center2

Point

_center2=Point(0.,0.,0.)

_radius1, _radius2

single unsigned integer or real positive value

_radius1=1, _radius2=2.5

_end1_shape, _end2_shape

GeometricEndShape

_end1_shape= gesNone, _end2_shape= gesFlat, _end2_shape= gesCone, _end1_shape= gesEllipsoid, _end2_shape= gesSphere

_end1_distance, _end2_distance

single unsigned integer or real positive value

_end1_distance=1, _end2_distance=2.5

_nbsubdomains

single unsigned integer value

_nbsubdomains=2