1#ifndef G_SOLID_EXTRUSION_H
2#define G_SOLID_EXTRUSION_H
14 const std::vector<double>& xp,
const std::vector<double>& yp);
17 const std::vector<double>& xp,
const std::vector<double>& yp,
18 const double cx,
const double cy,
const double cz,
19 const double dx,
const double dy,
const double dz);
23 bool IsInside(
const double x,
const double y,
const double z,
24 const bool tesselated)
const override;
25 bool GetBoundingBox(
double& xmin,
double& ymin,
double& zmin,
double& xmax,
26 double& ymax,
double& zmax)
const override;
31 std::vector<double>& yp)
const override {
40 const std::vector<double>& yp);
42 void SetTopLid(
const bool closed) { m_toplid = closed; }
46 bool SolidPanels(std::vector<Panel>& panels)
override;
52 void Cut(
const double x0,
const double y0,
const double z0,
53 const double xn,
const double yn,
const double zn,
54 std::vector<Panel>& panels)
override;
60 std::vector<double> m_xp;
62 std::vector<double> m_yp;
70 bool m_clockwise =
true;
73 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
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.
bool SolidPanels(std::vector< Panel > &panels) override
Retrieve the surface panels of the solid.
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.
void SetTopLid(const bool closed)
Request the extrusion to be closed with a lid at +z.
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 IsExtrusion() const override
Return true if the solid is an extrusion.
Abstract base class for solids.