fairyfly-core 0.2.5__tar.gz → 0.2.7__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {fairyfly_core-0.2.5 → fairyfly_core-0.2.7}/PKG-INFO +2 -2
- {fairyfly_core-0.2.5 → fairyfly_core-0.2.7}/fairyfly/model.py +49 -1
- {fairyfly_core-0.2.5 → fairyfly_core-0.2.7}/fairyfly_core.egg-info/PKG-INFO +2 -2
- fairyfly_core-0.2.7/fairyfly_core.egg-info/requires.txt +1 -0
- fairyfly_core-0.2.7/requirements.txt +1 -0
- fairyfly_core-0.2.5/fairyfly_core.egg-info/requires.txt +0 -1
- fairyfly_core-0.2.5/requirements.txt +0 -1
- {fairyfly_core-0.2.5 → fairyfly_core-0.2.7}/CODE_OF_CONDUCT.md +0 -0
- {fairyfly_core-0.2.5 → fairyfly_core-0.2.7}/CONTRIBUTING.md +0 -0
- {fairyfly_core-0.2.5 → fairyfly_core-0.2.7}/LICENSE +0 -0
- {fairyfly_core-0.2.5 → fairyfly_core-0.2.7}/MANIFEST.in +0 -0
- {fairyfly_core-0.2.5 → fairyfly_core-0.2.7}/README.md +0 -0
- {fairyfly_core-0.2.5 → fairyfly_core-0.2.7}/dev-requirements.txt +0 -0
- {fairyfly_core-0.2.5 → fairyfly_core-0.2.7}/fairyfly/__init__.py +0 -0
- {fairyfly_core-0.2.5 → fairyfly_core-0.2.7}/fairyfly/__main__.py +0 -0
- {fairyfly_core-0.2.5 → fairyfly_core-0.2.7}/fairyfly/_base.py +0 -0
- {fairyfly_core-0.2.5 → fairyfly_core-0.2.7}/fairyfly/_lockable.py +0 -0
- {fairyfly_core-0.2.5 → fairyfly_core-0.2.7}/fairyfly/boundary.py +0 -0
- {fairyfly_core-0.2.5 → fairyfly_core-0.2.7}/fairyfly/checkdup.py +0 -0
- {fairyfly_core-0.2.5 → fairyfly_core-0.2.7}/fairyfly/cli/__init__.py +0 -0
- {fairyfly_core-0.2.5 → fairyfly_core-0.2.7}/fairyfly/cli/setconfig.py +0 -0
- {fairyfly_core-0.2.5 → fairyfly_core-0.2.7}/fairyfly/colorobj.py +0 -0
- {fairyfly_core-0.2.5 → fairyfly_core-0.2.7}/fairyfly/config.json +0 -0
- {fairyfly_core-0.2.5 → fairyfly_core-0.2.7}/fairyfly/config.py +0 -0
- {fairyfly_core-0.2.5 → fairyfly_core-0.2.7}/fairyfly/dictutil.py +0 -0
- {fairyfly_core-0.2.5 → fairyfly_core-0.2.7}/fairyfly/extensionutil.py +0 -0
- {fairyfly_core-0.2.5 → fairyfly_core-0.2.7}/fairyfly/logutil.py +0 -0
- {fairyfly_core-0.2.5 → fairyfly_core-0.2.7}/fairyfly/properties.py +0 -0
- {fairyfly_core-0.2.5 → fairyfly_core-0.2.7}/fairyfly/search.py +0 -0
- {fairyfly_core-0.2.5 → fairyfly_core-0.2.7}/fairyfly/shape.py +0 -0
- {fairyfly_core-0.2.5 → fairyfly_core-0.2.7}/fairyfly/typing.py +0 -0
- {fairyfly_core-0.2.5 → fairyfly_core-0.2.7}/fairyfly/units.py +0 -0
- {fairyfly_core-0.2.5 → fairyfly_core-0.2.7}/fairyfly/writer/__init__.py +0 -0
- {fairyfly_core-0.2.5 → fairyfly_core-0.2.7}/fairyfly/writer/boundary.py +0 -0
- {fairyfly_core-0.2.5 → fairyfly_core-0.2.7}/fairyfly/writer/model.py +0 -0
- {fairyfly_core-0.2.5 → fairyfly_core-0.2.7}/fairyfly/writer/shape.py +0 -0
- {fairyfly_core-0.2.5 → fairyfly_core-0.2.7}/fairyfly_core.egg-info/SOURCES.txt +0 -0
- {fairyfly_core-0.2.5 → fairyfly_core-0.2.7}/fairyfly_core.egg-info/dependency_links.txt +0 -0
- {fairyfly_core-0.2.5 → fairyfly_core-0.2.7}/fairyfly_core.egg-info/entry_points.txt +0 -0
- {fairyfly_core-0.2.5 → fairyfly_core-0.2.7}/fairyfly_core.egg-info/top_level.txt +0 -0
- {fairyfly_core-0.2.5 → fairyfly_core-0.2.7}/setup.cfg +0 -0
- {fairyfly_core-0.2.5 → fairyfly_core-0.2.7}/setup.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: fairyfly-core
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.7
|
|
4
4
|
Summary: A library to represent construction detail geometry for environmental simulation.
|
|
5
5
|
Home-page: https://github.com/ladybug-tools/fairyfly-core
|
|
6
6
|
Author: Ladybug Tools
|
|
@@ -18,7 +18,7 @@ Classifier: Programming Language :: Python :: Implementation :: IronPython
|
|
|
18
18
|
Classifier: Operating System :: OS Independent
|
|
19
19
|
Description-Content-Type: text/markdown
|
|
20
20
|
License-File: LICENSE
|
|
21
|
-
Requires-Dist: ladybug-core==0.44.
|
|
21
|
+
Requires-Dist: ladybug-core==0.44.30
|
|
22
22
|
Dynamic: author
|
|
23
23
|
Dynamic: author-email
|
|
24
24
|
Dynamic: classifier
|
|
@@ -4,6 +4,7 @@ from __future__ import division
|
|
|
4
4
|
import os
|
|
5
5
|
import io
|
|
6
6
|
import json
|
|
7
|
+
import math
|
|
7
8
|
try: # check if we are in IronPython
|
|
8
9
|
import cPickle as pickle
|
|
9
10
|
except ImportError: # wea are in cPython
|
|
@@ -12,7 +13,8 @@ except ImportError: # wea are in cPython
|
|
|
12
13
|
from ladybug_geometry.geometry3d import Vector3D, Point3D, LineSegment3D, Plane, Face3D
|
|
13
14
|
|
|
14
15
|
from ._base import _Base
|
|
15
|
-
from .units import conversion_factor_to_meters,
|
|
16
|
+
from .units import conversion_factor_to_meters, parse_distance_string, \
|
|
17
|
+
UNITS, UNITS_TOLERANCES
|
|
16
18
|
from .checkdup import check_duplicate_identifiers, check_duplicate_identifiers_parent
|
|
17
19
|
from .properties import ModelProperties
|
|
18
20
|
from .shape import Shape
|
|
@@ -899,6 +901,52 @@ class Model(_Base):
|
|
|
899
901
|
pickle.dump(hb_dict, fp)
|
|
900
902
|
return hb_file
|
|
901
903
|
|
|
904
|
+
@staticmethod
|
|
905
|
+
def check_reasonable_tolerance(units, tolerance):
|
|
906
|
+
"""Get a message with a recommended tolerance if it is not reasonable.
|
|
907
|
+
|
|
908
|
+
This method is particularly useful to ensure that users have set a
|
|
909
|
+
tolerance that works for representing construction details and it is
|
|
910
|
+
not only for full-building simulation.
|
|
911
|
+
|
|
912
|
+
When the input tolerance and units are reasonable, the output of this
|
|
913
|
+
method will simply be None:
|
|
914
|
+
|
|
915
|
+
Args:
|
|
916
|
+
units: Text for the units system in which the model geometry
|
|
917
|
+
exists. Choose from the following:
|
|
918
|
+
|
|
919
|
+
* Millimeters
|
|
920
|
+
* Inches
|
|
921
|
+
* Centimeters
|
|
922
|
+
* Meters
|
|
923
|
+
* Feet
|
|
924
|
+
|
|
925
|
+
tolerance: The maximum difference between x, y, and z values at which
|
|
926
|
+
vertices are considered equivalent.
|
|
927
|
+
"""
|
|
928
|
+
max_tol = parse_distance_string('1mm', units)
|
|
929
|
+
if tolerance > max_tol:
|
|
930
|
+
return 'The model tolerance is currently set to {} {}.\n' \
|
|
931
|
+
'This is too coarse to correctly represent construction details.\n' \
|
|
932
|
+
'It is recommended that the tolerance be dropped to below {} {}\n' \
|
|
933
|
+
'for an accurate representation of the geometry.'.format(
|
|
934
|
+
tolerance, units, Model._round_to_sig_figs(max_tol, 1), units
|
|
935
|
+
)
|
|
936
|
+
|
|
937
|
+
@staticmethod
|
|
938
|
+
def _round_to_sig_figs(x, sigfigs):
|
|
939
|
+
"""Round a number to a specified number of significant figures."""
|
|
940
|
+
if x == 0:
|
|
941
|
+
return 0.0 # Handle zero as a special case
|
|
942
|
+
# calculate the number of decimal places needed
|
|
943
|
+
# by finding the magnitude and adjusting for the desired significant figures
|
|
944
|
+
digits = sigfigs - int(math.floor(math.log10(abs(x)))) - 1
|
|
945
|
+
if digits == 0:
|
|
946
|
+
return math.floor(x)
|
|
947
|
+
multiplier = 10**digits
|
|
948
|
+
return math.floor(x * multiplier) / multiplier
|
|
949
|
+
|
|
902
950
|
@staticmethod
|
|
903
951
|
def validate(model, check_function='check_all', check_args=None, json_output=False):
|
|
904
952
|
"""Get a string of a validation report given a specific check_function.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: fairyfly-core
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.7
|
|
4
4
|
Summary: A library to represent construction detail geometry for environmental simulation.
|
|
5
5
|
Home-page: https://github.com/ladybug-tools/fairyfly-core
|
|
6
6
|
Author: Ladybug Tools
|
|
@@ -18,7 +18,7 @@ Classifier: Programming Language :: Python :: Implementation :: IronPython
|
|
|
18
18
|
Classifier: Operating System :: OS Independent
|
|
19
19
|
Description-Content-Type: text/markdown
|
|
20
20
|
License-File: LICENSE
|
|
21
|
-
Requires-Dist: ladybug-core==0.44.
|
|
21
|
+
Requires-Dist: ladybug-core==0.44.30
|
|
22
22
|
Dynamic: author
|
|
23
23
|
Dynamic: author-email
|
|
24
24
|
Dynamic: classifier
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
ladybug-core==0.44.30
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
ladybug-core==0.44.30
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
ladybug-core==0.44.28
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
ladybug-core==0.44.28
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|