Inheritence diagram for xlifepp::Trunk:
digraph {
graph [bgcolor="#00000000"]
node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2]
edge [color="#1414CE"]
"4" [label="xlifepp::Cone" tooltip="xlifepp::Cone"]
"6" [label="xlifepp::Cylinder" tooltip="xlifepp::Cylinder"]
"3" [label="xlifepp::Geometry" tooltip="xlifepp::Geometry"]
"7" [label="xlifepp::Prism" tooltip="xlifepp::Prism"]
"5" [label="xlifepp::Pyramid" tooltip="xlifepp::Pyramid"]
"9" [label="xlifepp::RevCone" tooltip="xlifepp::RevCone"]
"10" [label="xlifepp::RevCylinder" tooltip="xlifepp::RevCylinder"]
"8" [label="xlifepp::RevTrunk" tooltip="xlifepp::RevTrunk"]
"1" [label="xlifepp::Trunk" tooltip="xlifepp::Trunk" fillcolor="#BFBFBF"]
"2" [label="xlifepp::Volume" tooltip="xlifepp::Volume"]
"4" -> "1" [dir=forward tooltip="public-inheritance"]
"6" -> "1" [dir=forward tooltip="public-inheritance"]
"7" -> "6" [dir=forward tooltip="public-inheritance"]
"5" -> "4" [dir=forward tooltip="public-inheritance"]
"9" -> "8" [dir=forward tooltip="public-inheritance"]
"10" -> "8" [dir=forward tooltip="public-inheritance"]
"8" -> "1" [dir=forward tooltip="public-inheritance"]
"1" -> "2" [dir=forward tooltip="public-inheritance"]
"2" -> "3" [dir=forward tooltip="public-inheritance"]
}
Collaboration diagram for xlifepp::Trunk:
digraph {
graph [bgcolor="#00000000"]
node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2]
edge [color="#1414CE"]
"22" [label="xlifepp::Collection< string_t >" tooltip="xlifepp::Collection< string_t >"]
"15" [label="xlifepp::Matrix< real_t >" tooltip="xlifepp::Matrix< real_t >"]
"19" [label="xlifepp::Vector< real_t >" tooltip="xlifepp::Vector< real_t >"]
"30" [label="xlifepp::Vector< xlifepp::Vector< real_t > >" tooltip="xlifepp::Vector< xlifepp::Vector< real_t > >"]
"39" [label="std::list< std::pair< number_t, real_t > >" tooltip="std::list< std::pair< number_t, real_t > >"]
"11" [label="std::map< number_t, std::vector< number_t > >" tooltip="std::map< number_t, std::vector< number_t > >"]
"9" [label="std::map< number_t, xlifepp::Geometry * >" tooltip="std::map< number_t, xlifepp::Geometry * >"]
"38" [label="std::map< string_t, number_t >" tooltip="std::map< string_t, number_t >"]
"40" [label="std::list< T >" tooltip="std::list< T >"]
"10" [label="std::map< K, T >" tooltip="std::map< K, T >"]
"6" [label="std::vector< T >" tooltip="std::vector< T >"]
"25" [label="std::vector< T >" tooltip="std::vector< T >"]
"18" [label="std::vector< K >" tooltip="std::vector< K >"]
"5" [label="std::vector< RealPair >" tooltip="std::vector< RealPair >"]
"21" [label="std::vector< const xlifepp::Transformation * >" tooltip="std::vector< const xlifepp::Transformation * >"]
"26" [label="std::vector< number_t >" tooltip="std::vector< number_t >"]
"16" [label="std::vector< real_t >" tooltip="std::vector< real_t >"]
"35" [label="std::vector< std::vector< GeoNumPair > >" tooltip="std::vector< std::vector< GeoNumPair > >"]
"12" [label="std::vector< std::vector< int_t > >" tooltip="std::vector< std::vector< int_t > >"]
"23" [label="std::vector< string_t >" tooltip="std::vector< string_t >"]
"34" [label="std::vector< xlifepp::GeomDomain * >" tooltip="std::vector< xlifepp::GeomDomain * >"]
"33" [label="std::vector< xlifepp::GeomElement * >" tooltip="std::vector< xlifepp::GeomElement * >"]
"37" [label="std::vector< xlifepp::Parameter * >" tooltip="std::vector< xlifepp::Parameter * >"]
"8" [label="std::vector< xlifepp::Point >" tooltip="std::vector< xlifepp::Point >"]
"27" [label="std::vector< xlifepp::Transformation * >" tooltip="std::vector< xlifepp::Transformation * >"]
"31" [label="std::vector< xlifepp::Vector< real_t > >" tooltip="std::vector< xlifepp::Vector< real_t > >"]
"4" [label="xlifepp::BoundingBox" tooltip="xlifepp::BoundingBox"]
"24" [label="xlifepp::Collection< T >" tooltip="xlifepp::Collection< T >"]
"13" [label="xlifepp::ExtrusionData" tooltip="xlifepp::ExtrusionData"]
"41" [label="xlifepp::GeoNode" tooltip="xlifepp::GeoNode"]
"3" [label="xlifepp::Geometry" tooltip="xlifepp::Geometry"]
"17" [label="xlifepp::Matrix< K >" tooltip="xlifepp::Matrix< K >"]
"32" [label="xlifepp::Mesh" tooltip="xlifepp::Mesh"]
"7" [label="xlifepp::MinimalBox" tooltip="xlifepp::MinimalBox"]
"36" [label="xlifepp::Parameters" tooltip="xlifepp::Parameters"]
"29" [label="xlifepp::Parametrization" tooltip="xlifepp::Parametrization"]
"28" [label="xlifepp::Point" tooltip="xlifepp::Point"]
"42" [label="xlifepp::Surface" tooltip="xlifepp::Surface"]
"14" [label="xlifepp::Transformation" tooltip="xlifepp::Transformation"]
"1" [label="xlifepp::Trunk" tooltip="xlifepp::Trunk" fillcolor="#BFBFBF"]
"20" [label="xlifepp::Vector< K >" tooltip="xlifepp::Vector< K >"]
"2" [label="xlifepp::Volume" tooltip="xlifepp::Volume"]
"22" -> "23" [dir=forward tooltip="public-inheritance"]
"22" -> "24" [dir=forward tooltip="template-instance"]
"15" -> "16" [dir=forward tooltip="public-inheritance"]
"15" -> "17" [dir=forward tooltip="template-instance"]
"19" -> "16" [dir=forward tooltip="public-inheritance"]
"19" -> "20" [dir=forward tooltip="template-instance"]
"30" -> "31" [dir=forward tooltip="public-inheritance"]
"30" -> "20" [dir=forward tooltip="template-instance"]
"39" -> "40" [dir=forward tooltip="template-instance"]
"11" -> "10" [dir=forward tooltip="template-instance"]
"9" -> "10" [dir=forward tooltip="template-instance"]
"38" -> "10" [dir=forward tooltip="template-instance"]
"18" -> "6" [dir=forward tooltip="template-instance"]
"5" -> "6" [dir=forward tooltip="template-instance"]
"21" -> "6" [dir=forward tooltip="template-instance"]
"26" -> "6" [dir=forward tooltip="template-instance"]
"16" -> "6" [dir=forward tooltip="template-instance"]
"35" -> "6" [dir=forward tooltip="template-instance"]
"12" -> "6" [dir=forward tooltip="template-instance"]
"23" -> "6" [dir=forward tooltip="template-instance"]
"34" -> "6" [dir=forward tooltip="template-instance"]
"33" -> "6" [dir=forward tooltip="template-instance"]
"37" -> "6" [dir=forward tooltip="template-instance"]
"8" -> "6" [dir=forward tooltip="template-instance"]
"27" -> "6" [dir=forward tooltip="template-instance"]
"31" -> "6" [dir=forward tooltip="template-instance"]
"4" -> "5" [dir=forward tooltip="usage"]
"24" -> "25" [dir=forward tooltip="public-inheritance"]
"13" -> "14" [dir=forward tooltip="usage"]
"13" -> "22" [dir=forward tooltip="usage"]
"13" -> "26" [dir=forward tooltip="usage"]
"13" -> "16" [dir=forward tooltip="usage"]
"13" -> "19" [dir=forward tooltip="usage"]
"13" -> "27" [dir=forward tooltip="usage"]
"13" -> "28" [dir=forward tooltip="usage"]
"41" -> "41" [dir=forward tooltip="usage"]
"41" -> "3" [dir=forward tooltip="usage"]
"3" -> "4" [dir=forward tooltip="usage"]
"3" -> "7" [dir=forward tooltip="usage"]
"3" -> "9" [dir=forward tooltip="usage"]
"3" -> "11" [dir=forward tooltip="usage"]
"3" -> "12" [dir=forward tooltip="usage"]
"3" -> "13" [dir=forward tooltip="usage"]
"3" -> "29" [dir=forward tooltip="usage"]
"3" -> "3" [dir=forward tooltip="usage"]
"3" -> "41" [dir=forward tooltip="usage"]
"17" -> "18" [dir=forward tooltip="public-inheritance"]
"32" -> "3" [dir=forward tooltip="usage"]
"32" -> "8" [dir=forward tooltip="usage"]
"32" -> "33" [dir=forward tooltip="usage"]
"32" -> "34" [dir=forward tooltip="usage"]
"32" -> "26" [dir=forward tooltip="usage"]
"32" -> "35" [dir=forward tooltip="usage"]
"32" -> "32" [dir=forward tooltip="usage"]
"7" -> "8" [dir=forward tooltip="usage"]
"36" -> "37" [dir=forward tooltip="usage"]
"36" -> "38" [dir=forward tooltip="usage"]
"29" -> "3" [dir=forward tooltip="usage"]
"29" -> "19" [dir=forward tooltip="usage"]
"29" -> "30" [dir=forward tooltip="usage"]
"29" -> "32" [dir=forward tooltip="usage"]
"29" -> "36" [dir=forward tooltip="usage"]
"29" -> "39" [dir=forward tooltip="usage"]
"28" -> "16" [dir=forward tooltip="public-inheritance"]
"42" -> "3" [dir=forward tooltip="public-inheritance"]
"42" -> "8" [dir=forward tooltip="usage"]
"42" -> "16" [dir=forward tooltip="usage"]
"42" -> "26" [dir=forward tooltip="usage"]
"14" -> "15" [dir=forward tooltip="usage"]
"14" -> "19" [dir=forward tooltip="usage"]
"14" -> "21" [dir=forward tooltip="usage"]
"1" -> "2" [dir=forward tooltip="public-inheritance"]
"1" -> "42" [dir=forward tooltip="usage"]
"1" -> "28" [dir=forward tooltip="usage"]
"20" -> "18" [dir=forward tooltip="public-inheritance"]
"2" -> "3" [dir=forward tooltip="public-inheritance"]
"2" -> "8" [dir=forward tooltip="usage"]
"2" -> "26" [dir=forward tooltip="usage"]
"2" -> "16" [dir=forward tooltip="usage"]
}
A Trunk is a volume defined by a cylinder or a trunk of cone.
A cylinder is a trunk of a cylinder !!! To define it, we need a basis, a translation and a homothety to build the other basis. To make it more simple, we will need a basis, the first point of the other basis (determining the translation and the center of the homothety), and a scale factor. This “first point” of a basis is defined as basis.p(1) : it is the first vertex for a polygon, but the center for an ellipse or a disk
Trunk constructors are based on a key-value system. Here are the available keys:
_basis: to define the geometrical basis of a Trunk (a child object of Surface )
_origin: the origin point of the second basis (the first vertex of a Polygon , but the center of an Ellipse or a Disk )
_scale: the scale factor to define the second basis
_center1, _center2: to define centers of bases when they are elliptical
_v1, _v2: to define apogees of the basis when it is elliptical
_nnodes: to define the number of nodes on the edges of the Trunk
_hsteps: to define the local mesh steps on build points of the Trunk
_domain_name: to define the domain name
_side_names: to define the side names
_varnames: to define the variable names for print purpose
Subclassed by xlifepp::Cone , xlifepp::Cylinder , xlifepp::RevTrunk
Public Functions
Trunk ( const Trunk & t )
copy constructor
Trunk ( Parameter p1 , Parameter p2 , Parameter p3 )
constructor with 3 Parameter
Trunk ( Parameter p1 , Parameter p2 , Parameter p3 , Parameter p4 )
constructor with 4 Parameter
Trunk ( Parameter p1 , Parameter p2 , Parameter p3 , Parameter p4 , Parameter p5 )
constructor with 5 Parameter
Trunk ( Parameter p1 , Parameter p2 , Parameter p3 , Parameter p4 , Parameter p5 , Parameter p6 )
constructor with 6 Parameter
Trunk ( Parameter p1 , Parameter p2 , Parameter p3 , Parameter p4 , Parameter p5 , Parameter p6 , Parameter p7 )
constructor with 7 Parameter
Trunk ( Parameter p1 , Parameter p2 , Parameter p3 , Parameter p4 , Parameter p5 , Parameter p6 , Parameter p7 , Parameter p8 )
constructor with 8 Parameter
Trunk ( real_t scale = 1 , bool defineBasisAndP = true )
default constructor
inline virtual ~Trunk ( )
destructor
virtual string_t asString ( ) const
format as string
inline Surface * basis ( ) const
accessor to basis of trunk
virtual std :: vector < const Point * > boundNodes ( ) const
returns list of points on boundary (const)
virtual Geometry & buildBoundary ( ) const
create boundary Geometry
create boundary geometry of trunk as a composite (union of faces)
void buildTop ( ) const
create top geometry
create top geometry (top_ is mutable)
inline const Point & center1 ( ) const
accessor to origin_ of trunk
inline const Point & center2 ( ) const
accessor to origin_ of trunk
inline virtual Geometry * clone ( ) const
virtual copy constructor
inline virtual void computeMB ( )
compute the minimal box for a composite/loop geometry
compute the minimal box
virtual std :: vector < std :: pair < ShapeType , std :: vector < const Point * > > > curves ( ) const
returns list of curves (const)
inline virtual Trunk & homothetize ( const Parameter & p1 )
apply a homothety on a Trunk (1 key)
inline virtual Trunk & homothetize ( const Parameter & p1 , const Parameter & p2 )
apply a homothety on a Trunk (2 keys)
inline virtual Trunk & homothetize ( const Point & c = Point ( 0. , 0. , 0. ) , real_t factor = 1. )
apply a homothety on a Trunk
inline virtual Trunk & homothetize ( real_t factor )
apply a homothety on a Trunk
virtual real_t measure ( ) const
return the length/area/volume of the geometry
inline virtual number_t nbSides ( ) const
returns the number of sides
virtual std :: vector < Point * > nodes ( )
return list of every point (non const)
virtual std :: vector < const Point * > nodes ( ) const
returns list of every point (const)
inline const Point & origin ( ) const
accessor to origin_ of trunk
inline const Point & p1 ( ) const
accessor to origin_ of trunk
inline const Point & p2 ( ) const
accessor to origin_ of trunk
inline virtual Trunk & pointReflect ( const Parameter & p1 )
apply a point reflection on a Trunk (1 key)
inline virtual Trunk & pointReflect ( const Point & c = Point ( 0. , 0. , 0. ) )
apply a point reflection on a Trunk
inline virtual Trunk & reflect2d ( const Parameter & p1 )
apply a reflection2d on a Trunk (1 key)
inline virtual Trunk & reflect2d ( const Parameter & p1 , const Parameter & p2 )
apply a reflection2d on a Trunk (2 keys)
inline virtual Trunk & reflect2d ( const Point & c , real_t dx , real_t dy = 0. )
apply a reflection2d on a Trunk
inline virtual Trunk & reflect2d ( const Point & c = Point ( 0. , 0. ) , std :: vector < real_t > d = std :: vector < real_t > ( 2 , 0. ) )
apply a reflection2d on a Trunk
inline virtual Trunk & reflect3d ( const Parameter & p1 )
apply a reflection3d on a Trunk (1 key)
inline virtual Trunk & reflect3d ( const Parameter & p1 , const Parameter & p2 )
apply a reflection3d on a Trunk (2 keys)
inline virtual Trunk & reflect3d ( const Point & c , real_t nx , real_t ny , real_t nz = 0. )
apply a reflection3d on a Trunk
inline virtual Trunk & reflect3d ( const Point & c = Point ( 0. , 0. , 0. ) , std :: vector < real_t > n = std :: vector < real_t > ( 3 , 0. ) )
apply a reflection3d on a Trunk
inline virtual Trunk & rotate2d ( const Parameter & p1 )
apply a rotation 2D on a Trunk (1 key)
inline virtual Trunk & rotate2d ( const Parameter & p1 , const Parameter & p2 )
apply a rotation 2D on a Trunk (2 keys)
inline virtual Trunk & rotate2d ( const Point & c , real_t angle = 0. )
apply a rotation 2D on a Trunk
inline virtual Trunk & rotate3d ( const Parameter & p1 )
apply a rotation 3D on a Trunk (1 key)
inline virtual Trunk & rotate3d ( const Parameter & p1 , const Parameter & p2 )
apply a rotation 3D on a Trunk (2 keys)
inline virtual Trunk & rotate3d ( const Parameter & p1 , const Parameter & p2 , const Parameter & p3 )
apply a rotation 3D on a Trunk (3 keys)
inline virtual Trunk & rotate3d ( const Point & c , real_t dx , real_t dy , real_t angle )
apply a rotation on a Trunk
inline virtual Trunk & rotate3d ( const Point & c , real_t dx , real_t dy , real_t dz , real_t angle )
apply a rotation on a Trunk
inline virtual Trunk & 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 Trunk
inline virtual Trunk & rotate3d ( real_t dx , real_t dy , real_t angle )
apply a rotation 3D on a Trunk
inline virtual Trunk & rotate3d ( real_t dx , real_t dy , real_t dz , real_t angle )
apply a rotation 3D on a Trunk
inline real_t scale ( ) const
accessor to scale factor of trunk
virtual std :: vector < std :: pair < ShapeType , std :: vector < const Point * > > > surfs ( ) const
returns list of faces (const)
Surface * top ( ) const
access to top geometry, created if not exist
virtual Trunk & transform ( const Transformation & t )
apply a geometrical transformation on a Trunk
inline virtual Trunk & translate ( const Parameter & p1 )
apply a translation on a Trunk (1 key)
inline virtual Trunk & translate ( real_t ux , real_t uy = 0. , real_t uz = 0. )
apply a translation on a Trunk (3 reals version)
inline virtual Trunk & translate ( std :: vector < real_t > u )
apply a translation on a Trunk (vector version)
inline virtual Trunk * trunk ( )
access to child Trunk object
inline virtual const Trunk * trunk ( ) const
access to child Trunk object (const)
inline virtual bool withNnodes ( ) const
check if Trunk is defined only with _nnodes or with _hsteps option