10#ifndef GEOM_OPEN_CUBOID_CHANNEL_3D_H
11#define GEOM_OPEN_CUBOID_CHANNEL_3D_H
52 OpenCuboidChannel3D(
double x0,
double y0,
double z0,
double x1,
double y1,
double z1,
double t,
53 int open_face, std::string description =
"");
62 double volume()
const override;
64 std::pair<util::Point, util::Point>
box()
const override;
65 std::pair<util::Point, util::Point>
box(
const double &tol)
const override;
75 bool isInside(
const std::pair<util::Point, util::Point> &bx)
const override;
76 bool isOutside(
const std::pair<util::Point, util::Point> &bx)
const override;
77 bool isNear(
const std::pair<util::Point, util::Point> &bx,
const double &tol)
const override;
78 bool doesIntersect(
const std::pair<util::Point, util::Point> &bx)
const override;
80 std::string
printStr(
int nt = 0,
int lvl = 0)
const override;
81 void print(
int nt = 0,
int lvl = 0)
const override { std::cout <<
printStr(nt, lvl); };
Defines abstract geometrical domain.
Hollow axis-aligned cuboid shell with uniform wall thickness and one outer face open.
int d_openFace
Which outer face is open: 0=+x, 1=−x, 2=+y, 3=−y, 4=+z, 5=−z (world axes after transform).
void print(int nt=0, int lvl=0) const override
Prints the information about the object.
bool inClosedShell(const util::Point &p) const
bool inRemovedFaceSlab(const util::Point &p) const
util::Point d_x
Centroid of the open shell (cached).
double volume() const override
Computes the volume (area in 2d, length in 1d) of object.
void transform(const util::Point &translation, const double &scale, const double &angle, const util::Point &axis, const util::Point *rotationPoint) override
Similarity about pivot (default: old center d_x), then rigid displacement = translation: ....
bool isNear(const util::Point &x, const double &tol) const override
Checks if point is within given distance of this object.
double inscribedRadius() const override
Computes the radius of biggest circle/sphere completely within the object.
bool isInside(const util::Point &x) const override
Checks if point is inside this object.
util::Point d_lo
Outer AABB low corner.
util::Point center() const override
Computes the center of object.
bool isOutside(const util::Point &x) const override
Checks if point is outside of this object.
bool isNearBoundary(const util::Point &x, const double &tol, const bool &within) const override
Checks if point is within given distance of this object.
bool doesIntersect(const util::Point &x) const override
Checks if point lies exactly on the boundary.
util::Point computeCenter() const
OpenCuboidChannel3D & operator=(const OpenCuboidChannel3D &other)
void print() const override
Prints the information about the object.
std::pair< util::Point, util::Point > box() const override
Computes the bounding box of object.
double boundingRadius() const override
Computes the radius of smallest circle/sphere such that object can be fit into it.
double d_t
Wall thickness.
void validateAndRefreshCenter()
std::string printStr(int nt=0, int lvl=0) const override
Returns the string containing printable information about the object.
util::Point d_hi
Outer AABB high corner.
A structure to represent 3d vectors.