13#include "gtest/gtest.h"
71 std::unordered_map<std::string, AttributeVariant>
getAttributes()
const override;
109 std::unique_ptr<CSGSurface>
clone()
const override
131#ifdef MOOSE_UNIT_TEST
CSGNPolygonUnit is a CSGSurfaceEngUnit that represents a regular N-sided polygon (prismatic region) w...
int getNumSides()
Get the number of sides for the polygon.
std::vector< const CSGSurface * > _planes
Pointers to the expanded plane surfaces, populated during expandUnit()
std::unique_ptr< CSGSurface > clone() const override
Return a deep copy of this unit.
Real getApothem()
Get the polygon apothem (center-to-flat distance)
Real evaluateSurfaceEquationAtPoint(const Point &p) const override
Evaluate the polygon's surface equation at the given point.
std::unordered_map< std::string, AttributeVariant > getAttributes() const override
Return the polygon attributes for this object.
FRIEND_TEST(CSGEngUnitTest, testPolygonUnitExpansion)
const int _n_sides
Number of sides of the regular polygon.
Real getRadius()
Get the the circumradius for the polygon (center-to-vertex distance)
Real getSideLength()
Get the polygon side length.
void expandUnit() override
Create N CSGPlane surfaces in _internal_base, one per polygon side.
const Real _apothem
Distance from the polygon center to the midpoint of each side.
FRIEND_TEST(CSGEngUnitTest, testPolygonUnitClone)
CSGSurfaceEngUnit is an abstract base class for "engineering units" that can be used as surfaces in c...
std::string _name
Name of surface.