Skip to content

Commit

Permalink
All mathematical pillars added.
Browse files Browse the repository at this point in the history
  • Loading branch information
vidanovic committed Dec 7, 2023
1 parent 2a70d32 commit 2d39884
Show file tree
Hide file tree
Showing 2 changed files with 74 additions and 2 deletions.
5 changes: 4 additions & 1 deletion pywincalc/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,10 @@
from wincalcbindings import AirHorizontalDirection, BSDF, BSDFBasisType, BSDFDirection, BSDFDirections, BSDFHemisphere, \
BSDFIntegrator, BoundaryConditionsCoefficientModelType, CMABestWorstUFactors, CMAResult, CMAWindow, \
CMAWindowDualVisionHorizontal, CMAWindowDualVisionVertical, CMAWindowSingleVision, CellSpacingType, PolygonType, pillar_cell_area, \
PillarData, CylindricalPillar, SphericalPillar, RectangularPillar, PolygonalPillar, UniversalSupportPillar, CylindricalPillarLayer, SphericalPillarLayer, RectangularPillarLayer, TriangularPillarLayer, PentagonPillarLayer, HexagonPillarLayer, CoatedSide, \
PillarData, CylindricalPillar, SphericalPillar, RectangularPillar, PolygonalPillar, LinearBearingPillar, TruncatedConePillar, \
AnnulusCylinderPillar, UniversalSupportPillar, CylindricalPillarLayer, SphericalPillarLayer, RectangularPillarLayer, \
TriangularPillarLayer, PentagonPillarLayer, HexagonPillarLayer, LinearBearingPillarLayer, TruncatedConePillarLayer, \
AnnulusCylinderPillarLayer, CoatedSide, \
ColorResult, DeflectionResults, DistributionMethodType, DualBandBSDF, EffectiveOpenness, Environment, Environments, \
FlippableSolidLayer, Gas, GasCoefficients, GasData, GlazingSystem as _GlazingSystem, GlazingSystemDimensions, \
IGUGapLayer, IntegrationRule, IntegrationRuleType, Lab, Layers, MaterialType, \
Expand Down
71 changes: 70 additions & 1 deletion src/wincalcbindings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,57 @@ PYBIND11_MODULE(wincalcbindings, m) {
Tarcog::ISO15099::PolygonalPillar const &>(),
py::arg("gap_layer"), py::arg("polygon_pillar"));

py::class_<Tarcog::ISO15099::LinearBearingPillar, Tarcog::ISO15099::PillarData,
std::shared_ptr<Tarcog::ISO15099::LinearBearingPillar>>(
m, "LinearBearingPillar")
.def(py::init<double, double, double, double, double>(),
py::arg("height"), py::arg("material_conductivity"), py::arg("cell_area"), py::arg("length"),
py::arg("width"))
.def_readwrite("length", &Tarcog::ISO15099::LinearBearingPillar::length)
.def_readwrite("width", &Tarcog::ISO15099::LinearBearingPillar::width);

py::class_<Tarcog::ISO15099::LinearBearingPillarLayer,
Tarcog::ISO15099::UniversalSupportPillar,
std::shared_ptr<Tarcog::ISO15099::LinearBearingPillarLayer>>(
m, "LinearBearingPillarLayer")
.def(py::init<Tarcog::ISO15099::CIGUGapLayer const &,
Tarcog::ISO15099::LinearBearingPillar const &>(),
py::arg("gap_layer"), py::arg("linear_bearing_pillar"));

py::class_<Tarcog::ISO15099::TruncatedConePillar, Tarcog::ISO15099::PillarData,
std::shared_ptr<Tarcog::ISO15099::TruncatedConePillar>>(
m, "TruncatedConePillar")
.def(py::init<double, double, double, double, double>(),
py::arg("height"), py::arg("material_conductivity"), py::arg("cell_area"), py::arg("radius_1"),
py::arg("radius_2"))
.def_readwrite("radius_1", &Tarcog::ISO15099::TruncatedConePillar::radius1)
.def_readwrite("radius_2", &Tarcog::ISO15099::TruncatedConePillar::radius2);

py::class_<Tarcog::ISO15099::TruncatedConePillarLayer,
Tarcog::ISO15099::UniversalSupportPillar,
std::shared_ptr<Tarcog::ISO15099::TruncatedConePillarLayer>>(
m, "TruncatedConePillarLayer")
.def(py::init<Tarcog::ISO15099::CIGUGapLayer const &,
Tarcog::ISO15099::TruncatedConePillar const &>(),
py::arg("gap_layer"), py::arg("truncated_cone_pillar"));

py::class_<Tarcog::ISO15099::AnnulusCylinderPillar, Tarcog::ISO15099::PillarData,
std::shared_ptr<Tarcog::ISO15099::AnnulusCylinderPillar>>(
m, "AnnulusCylinderPillar")
.def(py::init<double, double, double, double, double>(),
py::arg("height"), py::arg("material_conductivity"), py::arg("cell_area"), py::arg("inner_radius"),
py::arg("outer_radius"))
.def_readwrite("inner_radius", &Tarcog::ISO15099::AnnulusCylinderPillar::innerRadius)
.def_readwrite("outer_radius", &Tarcog::ISO15099::AnnulusCylinderPillar::outerRadius);

py::class_<Tarcog::ISO15099::AnnulusCylinderPillarLayer,
Tarcog::ISO15099::UniversalSupportPillar,
std::shared_ptr<Tarcog::ISO15099::AnnulusCylinderPillarLayer>>(
m, "AnnulusCylinderPillarLayer")
.def(py::init<Tarcog::ISO15099::CIGUGapLayer const &,
Tarcog::ISO15099::AnnulusCylinderPillar const &>(),
py::arg("gap_layer"), py::arg("annulus_cylinder_pillar"));

// py::class_<Tarcog::ISO15099::CCircularPillar,
// Tarcog::ISO15099::CSupportPillar,
// std::shared_ptr<Tarcog::ISO15099::CCircularPillar>>(
Expand Down Expand Up @@ -1706,6 +1757,24 @@ PYBIND11_MODULE(wincalcbindings, m) {
"create_pillar",
py::overload_cast<Tarcog::ISO15099::PolygonalPillar const &,
double>(&Tarcog::ISO15099::Layers::createPillar),
"Static function to add a rectangular pillar to a Tarcog gap",
"Static function to add a polygonal pillar to a Tarcog gap",
py::arg("pillar"), py::arg("pressure"))
.def_static(
"create_pillar",
py::overload_cast<Tarcog::ISO15099::LinearBearingPillar const &,
double>(&Tarcog::ISO15099::Layers::createPillar),
"Static function to add a linear bearing pillar to a Tarcog gap",
py::arg("pillar"), py::arg("pressure"))
.def_static(
"create_pillar",
py::overload_cast<Tarcog::ISO15099::TruncatedConePillar const &,
double>(&Tarcog::ISO15099::Layers::createPillar),
"Static function to add a truncated cone pillar to a Tarcog gap",
py::arg("pillar"), py::arg("pressure"))
.def_static(
"create_pillar",
py::overload_cast<Tarcog::ISO15099::AnnulusCylinderPillar const &,
double>(&Tarcog::ISO15099::Layers::createPillar),
"Static function to add a annulus cylinder pillar to a Tarcog gap",
py::arg("pillar"), py::arg("pressure"));
}

0 comments on commit 2d39884

Please sign in to comment.