16 SolidTube(
const double cx,
const double cy,
const double cz,
const double r,
19 SolidTube(
const double cx,
const double cy,
const double cz,
const double r,
20 const double lz,
const double dx,
const double dy,
const double dz);
22 SolidTube(
const double cx,
const double cy,
const double cz,
const double ri,
23 const double ro,
const double lz);
26 SolidTube(
const double cx,
const double cy,
const double cz,
const double ri,
27 const double ro,
const double lz,
const double dx,
const double dy,
32 bool IsInside(
const double x,
const double y,
const double z,
33 const bool tesselated)
const override;
35 double& ymax,
double& zmax)
const override;
36 bool IsTube()
const override {
return true; }
82 void Cut(
const double x0,
const double y0,
const double z0,
const double xn,
83 const double yn,
const double zn,
84 std::vector<Panel>& panels)
override;
126 std::array<double, 3>
m_dis{{-1., -1., -1.}};
bool SolidPanels(std::vector< Panel > &panels) override
Retrieve the surface panels of the solid.
void SetBottomLid(const bool closed)
Request the cylinder to be closed with a (polygonal) lid at -z.
unsigned int GetSectors() const
Return the number of sectors.
double GetDiscretisationLevel(const Panel &panel) override
Retrieve the discretisation level of a panel.
std::array< double, 3 > m_dis
Discretisation levels.
bool m_toplid
Have a top lid?
std::vector< double > m_xpI
X-coordinates of the inner approximating polygon.
double m_rpO
Radius of the outer approximating polygon.
std::vector< double > m_xpO
X-coordinates of the outer approximating polygon.
bool IsTube() const override
Return true if the solid is a tube.
bool m_botlid
Have a bottom lid?
unsigned int m_n
Number of sectors.
void SetSectors(const unsigned int n)
When calculating the surface panels, the cylinder is approximated as a polygon with a finite number o...
SolidTube(const double cx, const double cy, const double cz, const double r, const double lz)
Constructor from centre, outer radius, and half-length.
std::vector< double > m_ypO
Y-coordinates of the outer approximating polygon.
double m_riI
Inradius of the inner approximating polygon.
double GetHalfLengthZ() const override
Retrieve the half-length of the tube.
void SetHalfLength(const double lz)
Set the half-length of the tube.
void SetAverageRadius(const bool average)
By default, the polygon used for approximating the cylinder when calculating surface panels is inscri...
void SetRadius(const double r)
Set the outer radius.
double GetRotation() const
Return the current rotation angle.
double m_rot
Rotation angle.
double GetOuterRadius() const override
Retrieve the outer radius.
std::vector< double > m_ypI
Y-coordinates of the inner approximating polygon.
bool m_average
Average chord over the sectors.
void Cut(const double x0, const double y0, const double z0, const double xn, const double yn, const double zn, std::vector< Panel > &panels) override
double GetInnerRadius() const override
Retrieve the inner radius.
SolidTube(const double cx, const double cy, const double cz, const double ri, const double ro, const double lz)
Constructor from centre, inner radius, outer radius, and half-length.
void SetRotation(const double angle)
Specify a rotation angle (radian) of the cylinder.
bool GetAverage() const
Return the status of the "average-radius" flag.
bool IsInside(const double x, const double y, const double z, const bool tesselated) const override
Check whether a given point is inside the solid.
void SetTopLid(const bool closed)
Request the cylinder to be closed with a (polygonal) lid at +z.
double GetRadius() const override
Retrieve the outer radius.
SolidTube(const double cx, const double cy, const double cz, const double ri, const double ro, const double lz, const double dx, const double dy, const double dz)
Constructor from centre, inner radius, outer radius, half-length and orientation.
double m_rpI
Radius of the inner approximating polygon.
SolidTube(const double cx, const double cy, const double cz, const double r, const double lz, const double dx, const double dy, const double dz)
Constructor from centre, outer radius, half-length and orientation.
double m_riO
Inradius of the outer approximating polygon.
bool GetBoundingBox(double &xmin, double &ymin, double &zmin, double &xmax, double &ymax, double &zmax) const override
Return the bounding box of the solid.
void SetDiscretisationLevel(const double dis) override
Set the discretisation level (for all panels).
Solid()=delete
Default constructor.