From 2d3988465d27a71f74b30813298d970900a381cf Mon Sep 17 00:00:00 2001 From: Simon Vidanovic Date: Thu, 7 Dec 2023 15:55:02 -0800 Subject: [PATCH] All mathematical pillars added. --- pywincalc/__init__.py | 5 ++- src/wincalcbindings.cpp | 71 ++++++++++++++++++++++++++++++++++++++++- 2 files changed, 74 insertions(+), 2 deletions(-) diff --git a/pywincalc/__init__.py b/pywincalc/__init__.py index 4ac266d..2e5a749 100644 --- a/pywincalc/__init__.py +++ b/pywincalc/__init__.py @@ -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, \ diff --git a/src/wincalcbindings.cpp b/src/wincalcbindings.cpp index b1c7ad5..a1a90f5 100644 --- a/src/wincalcbindings.cpp +++ b/src/wincalcbindings.cpp @@ -292,6 +292,57 @@ PYBIND11_MODULE(wincalcbindings, m) { Tarcog::ISO15099::PolygonalPillar const &>(), py::arg("gap_layer"), py::arg("polygon_pillar")); + py::class_>( + m, "LinearBearingPillar") + .def(py::init(), + 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_>( + m, "LinearBearingPillarLayer") + .def(py::init(), + py::arg("gap_layer"), py::arg("linear_bearing_pillar")); + + py::class_>( + m, "TruncatedConePillar") + .def(py::init(), + 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_>( + m, "TruncatedConePillarLayer") + .def(py::init(), + py::arg("gap_layer"), py::arg("truncated_cone_pillar")); + + py::class_>( + m, "AnnulusCylinderPillar") + .def(py::init(), + 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_>( + m, "AnnulusCylinderPillarLayer") + .def(py::init(), + py::arg("gap_layer"), py::arg("annulus_cylinder_pillar")); + // py::class_>( @@ -1706,6 +1757,24 @@ PYBIND11_MODULE(wincalcbindings, m) { "create_pillar", py::overload_cast(&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::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::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::Layers::createPillar), + "Static function to add a annulus cylinder pillar to a Tarcog gap", py::arg("pillar"), py::arg("pressure")); }