31 #include <gp_Trsf.hxx> 38 const std::array<double, 2> &deltaGrid,
39 const std::array<double, 3> ¢er)
45 std::size_t y)
const {
50 std::size_t patternKey) {
55 const auto maxY =
static_cast<int>(this->
dims_[1] - 1);
56 std::array<int, 2> coord{-
static_cast<int>(this->
dims_[0] - 1), -maxY};
61 gp_Trsf transformation{};
62 transformation.SetTranslation(
63 gp_Vec{center[0] + coord[0] * this->
delta_[0] / 2.,
64 center[1] + coord[1] * this->
delta_[1] / 2., center[2]});
68 if (coord[1] > maxY) {
NEM::GEO::GeoManager createGeo() const override
Construct a NEM::GEO::GeoManager.
Class to manage TopoDS_Shapes along with metadata.
std::array< double, 2 > delta_
RectangularArray(const std::array< std::size_t, 2 > &gridDims, const std::array< double, 2 > &deltaGrid, const std::array< double, 3 > ¢er={0, 0, 0})
const std::array< double, 3 > & getCenter() const
NEM::GEO::GeoManager createGeoImpl(Modifier &&modifier) const
const std::size_t & getPattern(std::size_t x, std::size_t y) const
std::array< std::size_t, 2 > dims_
static NEM::GEO::GeoManager basicTransformation(const gp_Trsf &transformation, NEM::GEO::GeoManager &&geoMetadata)
void setPattern(std::size_t x, std::size_t y, std::size_t patternKey)
The shape at [x, y] will be translated by [(x - (getGridDims()[0] - 1) / 2) * getGridDistance()[0]...
Abstract base class representing a set of other ShapeBase objects, with a transformation applied to e...
void setPattern(std::size_t idx, std::size_t patternKey)
const std::size_t & getPattern(std::size_t idx) const