Class xlifepp::RevTrunk#
-
class RevTrunk : public xlifepp::Trunk#
-
A object of revolution is defined by its axis (P1,P2) and the radii of two circles obtained by intersection with a plane orthogonal to (P1,P2).
The object is delimited by the two planes, orthogonal to (P1,P2), passing by P1 and P2, and this is the default end shape of the object when it is meshed with volumic elements (gesFlat or equivalently in this case, gesNone). When the elements are surfacic, the default is to leave the ends empty (gesNone).
Moreover, on both ends of this object, one can add part of a cone (gesCone), an ellipsoid (gesEllipsoid) or a sphere (gesSphere), connected to the boundary circle of the object. Let us consider the boundary circle whose center is P1. The apex of the cone or the ellipsoid is assumed to lie on the line (P1,P2) at a given distance distance1_ from P1. This distance is irrelevant in the case of the sphere. The same apply on the other end of the object. When the elements are surfacic, one can additonnaly chose a flat “lid” (gesFlat) ; the distance argument is then also irrelevant in this case.
RevTrunk constructors are based on a key-value system. Here are the available keys:
_center1, _center2: to define centers of bases when they are elliptical
_radius1, _radius2: the radii of the bases
_end1_shape, _end2_shape: the shape of extension parts on both ends of the RevTrunk
_end1_distance, _end2_distance: the lengths of extension parts on both ends of the RevTrunk
_nbsubdomains: the number of slices of the RevTrunk (subdivision mesg generator only)
_type: indicator to fit curved boundaries (default) or not which gives flat (or plane) boundaries
_nnodes: to define the number of nodes on the edges of the RevTrunk
_hsteps: to define the local mesh steps on build points of the RevTrunk
_domain_name: to define the domain name
_side_names/_face_name: to define the side names
_edge_name: to define the side of side names
_vertex_name: to define the side of side of side names
_varnames: to define the variable names for print purpose
Subclassed by xlifepp::RevCone, xlifepp::RevCylinder
Public Functions
-
RevTrunk(real_t scale = 1., bool defineBasisAndP = true)#
-
default constructor
-
virtual string_t asString() const#
-
format as string: “RevTrunk (P1=(.,.,.), P2=(.,.,.), radius=R, end1=., end2=., d1=., d2=.)”
Format RevTrunk as string: “RevTrunk(C1=(.,.,.), C2=(.,.,.), radius1=R1, radius2=R2, end1=., end2=., d1=., d2=.)”.
-
virtual std::vector<std::pair<ShapeType, std::vector<const Point*>>> curves() const#
-
returns list of curves (const)
-
inline real_t distance1() const#
-
returns height of first end
-
inline real_t distance2() const#
-
returns height of second end
-
inline GeometricEndShape endShape1() const#
-
returns shape of first end
-
inline GeometricEndShape endShape2() const#
-
returns shape of second end
-
inline virtual RevTrunk &homothetize(const Parameter &p1, const Parameter &p2)#
-
apply a homothety on a RevTrunk (2 keys)
-
inline virtual RevTrunk &homothetize(const Point &c = Point(0., 0., 0.), real_t factor = 1.)#
-
apply a homothety on a RevTrunk
-
virtual std::vector<number_t> nbElementsForGmshGeneration() const#
-
return number of points/arcs/lines/loops/surfaces/extrudable elementsof a geometry (only for gmsh generation)
-
inline virtual RevTrunk &pointReflect(const Parameter &p1)#
-
apply a point reflection on a RevTrunk (1 key)
-
inline virtual RevTrunk &pointReflect(const Point &c = Point(0., 0., 0.))#
-
apply a point reflection on a RevTrunk
-
inline real_t radius1() const#
-
returns radius of first basis
-
inline real_t radius2() const#
-
returns radius of second basis
-
inline virtual RevTrunk &reflect2d(const Parameter &p1, const Parameter &p2)#
-
apply a reflection2d on a RevTrunk (2 keys)
-
inline virtual RevTrunk &reflect2d(const Point &c, real_t dx, real_t dy = 0.)#
-
apply a reflection2d on a RevTrunk
-
inline virtual RevTrunk &reflect2d(const Point &c = Point(0., 0.), std::vector<real_t> d = std::vector<real_t>(2, 0.))#
-
apply a reflection2d on a RevTrunk
-
inline virtual RevTrunk &reflect3d(const Parameter &p1, const Parameter &p2)#
-
apply a reflection3d on a RevTrunk (2 keys)
-
inline virtual RevTrunk &reflect3d(const Point &c, real_t nx, real_t ny, real_t nz = 0.)#
-
apply a reflection3d on a RevTrunk
-
inline virtual RevTrunk &reflect3d(const Point &c = Point(0., 0., 0.), std::vector<real_t> n = std::vector<real_t>(3, 0.))#
-
apply a reflection3d on a RevTrunk
-
inline virtual RevTrunk &rotate2d(const Parameter &p1, const Parameter &p2)#
-
apply a rotation 2D on a RevTrunk (2 keys)
-
inline virtual RevTrunk &rotate2d(const Point &c, real_t angle = 0.)#
-
apply a rotation 2D on a RevTrunk
-
inline virtual RevTrunk &rotate3d(const Parameter &p1, const Parameter &p2)#
-
apply a rotation 3D on a RevTrunk (2 keys)
-
inline virtual RevTrunk &rotate3d(const Parameter &p1, const Parameter &p2, const Parameter &p3)#
-
apply a rotation 3D on a RevTrunk (3 keys)
-
inline virtual RevTrunk &rotate3d(const Point &c, real_t dx, real_t dy, real_t angle)#
-
apply a rotation on a RevTrunk
-
inline virtual RevTrunk &rotate3d(const Point &c, real_t dx, real_t dy, real_t dz, real_t angle)#
-
apply a rotation on a RevTrunk
-
inline virtual RevTrunk &rotate3d(const Point &c, std::vector<real_t> d = std::vector<real_t>(3, 0.), real_t angle = 0.)#
-
apply a rotation 3D on a RevTrunk
-
inline virtual RevTrunk &rotate3d(real_t dx, real_t dy, real_t angle)#
-
apply a rotation 3D on a RevTrunk
-
inline virtual RevTrunk &rotate3d(real_t dx, real_t dy, real_t dz, real_t angle)#
-
apply a rotation 3D on a RevTrunk
-
virtual std::vector<std::pair<ShapeType, std::vector<const Point*>>> surfs() const#
-
returns list of faces (const) return number of points/arcs/lines/loops/surfaces/extrudable elementsof a geometry (only for gmsh generation)
returns list of faces (const)
-
virtual RevTrunk &transform(const Transformation &t)#
-
apply a geometrical transformation on a RevTrunk
-
inline virtual RevTrunk &translate(real_t ux, real_t uy = 0., real_t uz = 0.)#
-
apply a translation on a RevTrunk (3 reals version)