From 3bff950318068ba85be27da780526fc1032b0708 Mon Sep 17 00:00:00 2001 From: Simon Vidanovic Date: Thu, 13 Jun 2024 15:06:33 -0700 Subject: [PATCH] Init file and wincalcbindins.cpp updated with missing pillars data. --- pywincalc/__init__.py | 6 ++-- setup.cfg | 2 +- src/wincalcbindings.cpp | 65 ++++++++++++++++++++++++++++++++++++----- 3 files changed, 61 insertions(+), 12 deletions(-) diff --git a/pywincalc/__init__.py b/pywincalc/__init__.py index c7fd635..2d13a56 100644 --- a/pywincalc/__init__.py +++ b/pywincalc/__init__.py @@ -30,10 +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, LinearBearingPillar, TruncatedConePillar, Glass, PillarMeasurement, \ - AnnulusCylinderPillar, UniversalSupportPillar, CylindricalPillarLayer, SphericalPillarLayer, RectangularPillarLayer, \ + PillarData, CylindricalPillar, SphericalPillar, RectangularPillar, TriangularPillar, PentagonPillar, HexagonPillar, LinearBearingPillar, TruncatedConePillar, Glass, PillarMeasurement, \ + AnnulusCylinderPillar, CShapedCylinderPillar, UniversalSupportPillar, CylindricalPillarLayer, SphericalPillarLayer, RectangularPillarLayer, \ TriangularPillarLayer, PentagonPillarLayer, HexagonPillarLayer, LinearBearingPillarLayer, TruncatedConePillarLayer, \ - AnnulusCylinderPillarLayer, MeasuredPillarLayer, CoatedSide, \ + AnnulusCylinderPillarLayer, CShapedCylinderPillarLayer, MeasuredPillarLayer, 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/setup.cfg b/setup.cfg index 6b4bca4..9bffcf0 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,6 @@ [metadata] name = pywincalc -version = 3.4.0 +version = 3.5.0 description = A Python library for calculating thermal and optical properties of glazing systems long_description = file: README.md long_description_content_type = text/markdown; charset=UTF-8 diff --git a/src/wincalcbindings.cpp b/src/wincalcbindings.cpp index 35705bf..0c0efba 100644 --- a/src/wincalcbindings.cpp +++ b/src/wincalcbindings.cpp @@ -263,6 +263,20 @@ PYBIND11_MODULE(wincalcbindings, m) { .def(py::init(), py::arg("gap_layer"), py::arg("rectangular_pillar")); + + py::class_>(m, "PolygonalPillar") + .def(py::init(), py::arg("height"), + py::arg("material_conductivity"), py::arg("cell_area"), py::arg("length")) + .def_readwrite("legnth", &Tarcog::ISO15099::PolygonalPillar::length); + + py::class_>(m, "TriangularPillar") + .def(py::init(), py::arg("height"), + py::arg("material_conductivity"), py::arg("cell_area"), py::arg("length")); py::class_(), py::arg("gap_layer"), py::arg("polygon_pillar")); + + py::class_>(m, "PentagonPillar") + .def(py::init(), py::arg("height"), + py::arg("material_conductivity"), py::arg("cell_area"), py::arg("length")); py::class_(), py::arg("gap_layer"), py::arg("polygon_pillar")); + + py::class_>(m, "HexagonPillar") + .def(py::init(), py::arg("height"), + py::arg("material_conductivity"), py::arg("cell_area"), py::arg("length")); py::class_(), py::arg("gap_layer"), py::arg("annulus_cylinder_pillar")); + + py::class_>( + m, "CShapedCylinderPillar") + .def(py::init(), + py::arg("height"), py::arg("material_conductivity"), + py::arg("cell_area"), py::arg("inner_radius"), + py::arg("outer_radius"), py::arg("fraction_covered")) + .def_readwrite("inner_radius", + &Tarcog::ISO15099::CShapedCylinderPillar::innerRadius) + .def_readwrite("outer_radius", + &Tarcog::ISO15099::CShapedCylinderPillar::outerRadius) + .def_readwrite("fraction_covered", + &Tarcog::ISO15099::CShapedCylinderPillar::fractionCovered); + + py::class_>( + m, "CShapedCylinderPillarLayer") + .def(py::init(), + py::arg("gap_layer"), py::arg("cshaped_cylinder_pillar")); py::class_>( m, "Glass") @@ -746,11 +797,11 @@ PYBIND11_MODULE(wincalcbindings, m) { py::class_>( m, "ProductDataThermal") - .def(py::init(), + .def(py::init(), py::arg("conductivity"), py::arg("thickness_meters"), py::arg("flipped") = false, py::arg("opening_top") = 0, py::arg("opening_bottom") = 0, py::arg("opening_left") = 0, - py::arg("opening_right") = 0) + py::arg("opening_right") = 0, py::arg("opening_front") = 0) .def_readwrite("conductivity", &wincalc::Product_Data_Thermal::conductivity) .def_readwrite("opening_top", &wincalc::Product_Data_Thermal::opening_top) @@ -760,10 +811,6 @@ PYBIND11_MODULE(wincalcbindings, m) { &wincalc::Product_Data_Thermal::opening_left) .def_readwrite("opening_right", &wincalc::Product_Data_Thermal::opening_right) - .def_readwrite("effective_openness", - &wincalc::Product_Data_Thermal::effective_openness) - .def_readwrite("effective_thickness", - &wincalc::Product_Data_Thermal::effective_thickness) .def_readwrite("youngs_modulus", &wincalc::Product_Data_Thermal::youngs_modulus) .def_readwrite("density", &wincalc::Product_Data_Thermal::density); @@ -912,7 +959,7 @@ PYBIND11_MODULE(wincalcbindings, m) { SingleLayerOptics::BSDFHemisphere const &, double, std::optional, std::optional, std::optional, std::optional, double, - bool>(), + bool, bool>(), py::arg("solar_transmittance_front"), py::arg("solar_transmittance_back"), py::arg("solar_reflectance_front"), @@ -926,7 +973,7 @@ PYBIND11_MODULE(wincalcbindings, m) { py::arg("ir_transmittance_back") = std::optional(), py::arg("emissivity_front") = std::optional(), py::arg("emissivity_back") = std::optional(), - py::arg("permeability_factor") = 0.0, py::arg("flipped") = false) + py::arg("permeability_factor") = 0.0, py::arg("flipped") = false, py::arg("user_defined_effective_values") = false) .def_readwrite("solar_transmittance_front", &wincalc::Product_Data_Dual_Band_Optical_BSDF::tf_solar) .def_readwrite("solar_transmittance_back", @@ -943,6 +990,8 @@ PYBIND11_MODULE(wincalcbindings, m) { &wincalc::Product_Data_Dual_Band_Optical_BSDF::rf_visible) .def_readwrite("visible_reflectance_back", &wincalc::Product_Data_Dual_Band_Optical_BSDF::rb_visible) + .def_readwrite("user_defined_effective_values", + &wincalc::Product_Data_Dual_Band_Optical_BSDF::user_defined_effective_values) .def("effective_thermal_values", &wincalc::Product_Data_Dual_Band_Optical_BSDF:: effective_thermal_values);