Cylinder
#
A cylinder is a truncated cone whose apex is at infinite distance. So it is the geometry defined by the extrusion of a surface by translation.
To construct a Cylinder
geometry, use parameters _basis
and _direction
. _basis
parameters, as for trunks, take any surface object: Polygon
,
Triangle
, Quadrangle
, Parallelogram
, Rectangle
, SquareGeo
, Ellipse
or
Disk
. _direction
parameter takes a vector of real numbers (Point
or Reals
objects) or a single value (in this case, it is like a direction parallel to x-axis).
As for a trunk, a cylinder with elliptical basis can be defined by another way, using parameters _center1
, _v1
, _v2
and _center2
, taking a point or a single value (in this case, it is like a 1D point). _center1
,
_v1
and _v2
parameters are used as for a Ellipse
or Disk
object (see Ellipse or Disk for details). _center2
parameter is used in this case instead of _direction
parameter,
as it is easier to give the center of the second basis, instead of the direction vector.
_nnodes
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
can take one real value,
an explicit list of \(p\) real values or a Reals
object, where \(p\) is the number of points defining the trunk. If required, give names of main domain and side domains as explained in Geometry definition:
Cylinder c1(_basis=Disk(_center=Point(0.,0.,0.), _v1=Point(2.,0.,0.), _v2=Point(0.,2.,0.)), _direction=Point(0.,2.,1.), _nnodes={10,10,10,10,5,5,5,5,20,20,20,20}, _domain_name="Omg",_side_names={"Gam","Gam","Sig","Sig","Sig","Sig"});
Cylinder c2(_basis=Disk(_center=Point(0.,0.,0.), _v1=Point(2.,0.,0.), _v2=Point(0.,2.,0.)), _direction=Point(0.,2.,1.), _scale=0.5, _nnodes={10,5,20}, _domain_name="Omg",_side_names={"Gam","Gam","Sig","Sig","Sig","Sig"});
Cylinder c3(_center1=Point(0.,0.,0.), _v1=Point(2.,0.,0.), _v2=Point(0.,2.,0.), _center2=Point(0.,2.,1.), _scale=0.5, _nnodes={10, 5, 20}, _domain_name="Omg", _side_names={"Gam","Gam","Sig","Sig","Sig","Sig"});
These are 3 definitions of the same Cylinder
object, explaining the ability to give 3 values for _nnodes
, instead of 12.
Let’s summarize information about geometrical keys on cylinders:
key(s) |
authorized types |
examples |
---|---|---|
|
|
|
|
|
|
|
|