1#ifndef G_SOLID_EXTRUSION_H
2#define G_SOLID_EXTRUSION_H
16 const std::vector<double>& yp);
19 const std::vector<double>& yp,
const double cx,
20 const double cy,
const double cz,
const double dx,
21 const double dy,
const double dz);
25 bool IsInside(
const double x,
const double y,
const double z,
26 const bool tesselated)
const override;
28 double& ymax,
double& zmax)
const override;
33 std::vector<double>& yp)
const override {
41 void SetProfile(
const std::vector<double>& xp,
const std::vector<double>& yp);
51 void Cut(
const double x0,
const double y0,
const double z0,
const double xn,
52 const double yn,
const double zn,
53 std::vector<Panel>& panels)
override;
72 std::array<double, 3>
m_dis{{-1, -1, -1}};
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.
bool GetBoundingBox(double &xmin, double &ymin, double &zmin, double &xmax, double &ymax, double &zmax) const override
Return the bounding box of the solid.
~SolidExtrusion()
Destructor.
bool GetProfile(std::vector< double > &xp, std::vector< double > &yp) const override
Get the vertices defining an extrusion.
double GetDiscretisationLevel(const Panel &panel) override
Retrieve the discretisation level of a panel.
std::array< double, 3 > m_dis
Discretisation levels.
bool SolidPanels(std::vector< Panel > &panels) override
Retrieve the surface panels of the solid.
bool m_toplid
Have a top lid?
void SetBottomLid(const bool closed)
Request the extrusion to be closed with a lid at -z.
void SetHalfLengthZ(const double lz)
Set the half-length of the extrusion.
SolidExtrusion(const double lz, const std::vector< double > &xp, const std::vector< double > &yp, const double cx, const double cy, const double cz, const double dx, const double dy, const double dz)
Constructor from half-length, profile, offset and orientation.
void SetTopLid(const bool closed)
Request the extrusion to be closed with a lid at +z.
bool m_clockwise
Orientation of the polygon.
double GetHalfLengthZ() const override
Return the half-length along z.
void SetProfile(const std::vector< double > &xp, const std::vector< double > &yp)
Set the coordinates of the extrusion profile.
void SetDiscretisationLevel(const double dis) override
Set the discretisation level (for all panels).
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
bool m_botlid
Have a bottom lid?
SolidExtrusion(const double lz, const std::vector< double > &xp, const std::vector< double > &yp)
Constructor from half-length and profile.
bool IsExtrusion() const override
Return true if the solid is an extrusion.
std::vector< double > m_yp
Y coordinates of the profile.
std::vector< double > m_xp
X coordinates of the profile.
Solid()=delete
Default constructor.