16 SolidHole(
const double cx,
const double cy,
const double cz,
const double rup,
17 const double rlow,
const double lx,
const double ly,
21 SolidHole(
const double cx,
const double cy,
const double cz,
const double rup,
22 const double rlow,
const double lx,
const double ly,
23 const double lz,
const double dx,
const double dy,
const double dz);
27 bool IsInside(
const double x,
const double y,
const double z,
28 const bool tesselated)
const override;
30 double& ymax,
double& zmax)
const override;
31 bool IsHole()
const override {
return true; }
74 void Cut(
const double x0,
const double y0,
const double z0,
const double xn,
75 const double yn,
const double zn,
76 std::vector<Panel>& panels)
override;
104 std::array<double, 7>
m_dis{{-1., -1., -1., -1., -1., -1., -1.}};
void SetHalfLengthY(const double ly)
Set the half-length of the box along y.
bool GetBoundingBox(double &xmin, double &ymin, double &zmin, double &xmax, double &ymax, double &zmax) const override
Return the bounding box of the solid.
double m_lZ
Half-length in z.
bool IsHole() const override
Return true if the solid is a hole.
double GetHalfLengthY() const override
Return the half-length along y.
double m_rUp
Upper radius.
double GetDiscretisationLevel(const Panel &panel) override
Retrieve the discretisation level of a panel.
std::array< double, 7 > m_dis
Discretisation levels.
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 m_rLow
Lower radius.
double GetHalfLengthZ() const override
Return the half-length along z.
void SetSectors(const unsigned int n)
When calculating the surface panels, the hole is approximated as a polygon with a finite number of pa...
void SetHalfLengthX(const double lx)
Set the half-length of the box along x.
void SetLowerRadius(const double r)
Set the radius at z = -lz.
double m_lX
Half-length in x.
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.
unsigned int m_n
Number of sectors.
bool SolidPanels(std::vector< Panel > &panels) override
Retrieve the surface panels of the solid.
double m_lY
Half-length in y.
bool GetAverage() const
Return the state of the "average-radius" flag.
void SetHalfLengthZ(const double lz)
Set the half-length of the box along z.
SolidHole(const double cx, const double cy, const double cz, const double rup, const double rlow, const double lx, const double ly, const double lz, const double dx, const double dy, const double dz)
Constructor from centre, upper/lower radii, half-lengths of the box and orientation.
void SetUpperRadius(const double r)
Set the radius at z = +lz.
double GetLowerRadius() const override
Return the lower radius (of a hole).
void SetAverageRadius(const bool average)
By default, the polygon used for approximating the hole when calculating surface panels is inscribed ...
SolidHole(const double cx, const double cy, const double cz, const double rup, const double rlow, const double lx, const double ly, const double lz)
Constructor from centre, upper/lower radii, half-lengths of the box.
double GetUpperRadius() const override
Return the upper radius (of a hole).
double GetHalfLengthX() const override
Return the half-length along x.
void SetDiscretisationLevel(const double dis) override
Set the discretisation level (for all panels).
unsigned int GetSectors() const
Return the order of the approximating polygon.
bool m_average
Average chord over the sectors.
double m_fp
Ratio between the approximating polygon's radius and the hole radius.
double m_fi
Ratio between inradius and exradius of the approximating polygon.
Solid()=delete
Default constructor.