topologicpy 0.7.39__py3-none-any.whl → 0.7.41__py3-none-any.whl
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.
- topologicpy/Graph.py +0 -2
- topologicpy/Topology.py +23 -14
- topologicpy/version.py +1 -1
- {topologicpy-0.7.39.dist-info → topologicpy-0.7.41.dist-info}/METADATA +1 -1
- {topologicpy-0.7.39.dist-info → topologicpy-0.7.41.dist-info}/RECORD +8 -8
- {topologicpy-0.7.39.dist-info → topologicpy-0.7.41.dist-info}/LICENSE +0 -0
- {topologicpy-0.7.39.dist-info → topologicpy-0.7.41.dist-info}/WHEEL +0 -0
- {topologicpy-0.7.39.dist-info → topologicpy-0.7.41.dist-info}/top_level.txt +0 -0
topologicpy/Graph.py
CHANGED
@@ -2120,8 +2120,6 @@ class Graph:
|
|
2120
2120
|
|
2121
2121
|
def vertexByIFCObject(ifc_object, object_types, restrict=False):
|
2122
2122
|
settings = ifcopenshell.geom.settings()
|
2123
|
-
settings.set(settings.USE_BREP_DATA,False)
|
2124
|
-
settings.set(settings.SEW_SHELLS,True)
|
2125
2123
|
settings.set(settings.USE_WORLD_COORDS,True)
|
2126
2124
|
try:
|
2127
2125
|
shape = ifcopenshell.geom.create_shape(settings, ifc_object)
|
topologicpy/Topology.py
CHANGED
@@ -2138,7 +2138,7 @@ class Topology():
|
|
2138
2138
|
return Topology.ByDXFFile(file, sides=sides)
|
2139
2139
|
|
2140
2140
|
@staticmethod
|
2141
|
-
def ByIFCFile(file,
|
2141
|
+
def ByIFCFile(file, includeTypes=[], excludeTypes=[], transferDictionaries=False, removeCoplanarFaces=False):
|
2142
2142
|
"""
|
2143
2143
|
Create a topology by importing it from an IFC file.
|
2144
2144
|
|
@@ -2146,13 +2146,14 @@ class Topology():
|
|
2146
2146
|
----------
|
2147
2147
|
file : file object
|
2148
2148
|
The input IFC file.
|
2149
|
-
transferDictionaries : bool , optional
|
2150
|
-
If set to True, the dictionaries from the IFC file will be transferred to the topology. Otherwise, they won't. The default is False.
|
2151
2149
|
includeTypes : list , optional
|
2152
2150
|
The list of IFC object types to include. It is case insensitive. If set to an empty list, all types are included. The default is [].
|
2153
2151
|
excludeTypes : list , optional
|
2154
2152
|
The list of IFC object types to exclude. It is case insensitive. If set to an empty list, no types are excluded. The default is [].
|
2155
|
-
|
2153
|
+
transferDictionaries : bool , optional
|
2154
|
+
If set to True, the dictionaries from the IFC file will be transferred to the topology. Otherwise, they won't. The default is False.
|
2155
|
+
removeCoplanarFaces : bool , optional
|
2156
|
+
If set to True, coplanar faces are removed. Otherwise they are not. The default is False.
|
2156
2157
|
Returns
|
2157
2158
|
-------
|
2158
2159
|
list
|
@@ -2187,19 +2188,25 @@ class Topology():
|
|
2187
2188
|
excludeTypes = [s.lower() for s in excludeTypes]
|
2188
2189
|
topologies = []
|
2189
2190
|
settings = ifcopenshell.geom.settings()
|
2190
|
-
settings.set(
|
2191
|
-
settings.set(settings.USE_BREP_DATA, True)
|
2191
|
+
settings.set("dimensionality", ifcopenshell.ifcopenshell_wrapper.CURVES_SURFACES_AND_SOLIDS)
|
2192
2192
|
settings.set(settings.USE_WORLD_COORDS, True)
|
2193
|
-
settings.set(settings.SEW_SHELLS, True)
|
2194
2193
|
iterator = ifcopenshell.geom.iterator(settings, file, multiprocessing.cpu_count())
|
2195
2194
|
if iterator.initialize():
|
2196
2195
|
while True:
|
2197
2196
|
shape = iterator.get()
|
2198
2197
|
is_a = shape.type.lower()
|
2199
|
-
if (is_a in includeTypes or len(includeTypes) == 0) and (not is_a in excludeTypes):
|
2198
|
+
if (is_a in includeTypes or len(includeTypes) == 0) and (not is_a in excludeTypes):
|
2200
2199
|
try:
|
2201
|
-
|
2202
|
-
|
2200
|
+
verts = shape.geometry.verts
|
2201
|
+
edges = shape.geometry.edges
|
2202
|
+
faces = shape.geometry.faces
|
2203
|
+
grouped_verts = [ [verts[i], verts[i + 1], verts[i + 2]] for i in range(0, len(verts), 3)]
|
2204
|
+
grouped_edges = [[edges[i], edges[i + 1]] for i in range(0, len(edges), 2)]
|
2205
|
+
grouped_faces = [ [faces[i], faces[i + 1], faces[i + 2]] for i in range(0, len(faces), 3)]
|
2206
|
+
topology = Topology.ByGeometry(grouped_verts, grouped_edges, grouped_faces)
|
2207
|
+
if removeCoplanarFaces:
|
2208
|
+
topology = Topology.RemoveCoplanarFaces(topology)
|
2209
|
+
topologies.append(topology)
|
2203
2210
|
if transferDictionaries:
|
2204
2211
|
keys = []
|
2205
2212
|
values = []
|
@@ -2231,7 +2238,7 @@ class Topology():
|
|
2231
2238
|
return topologies
|
2232
2239
|
|
2233
2240
|
@staticmethod
|
2234
|
-
def ByIFCPath(path,
|
2241
|
+
def ByIFCPath(path, includeTypes=[], excludeTypes=[], transferDictionaries=False, removeCoplanarFaces=False):
|
2235
2242
|
"""
|
2236
2243
|
Create a topology by importing it from an IFC file path.
|
2237
2244
|
|
@@ -2239,12 +2246,14 @@ class Topology():
|
|
2239
2246
|
----------
|
2240
2247
|
path : str
|
2241
2248
|
The path to the IFC file.
|
2242
|
-
transferDictionaries : bool , optional
|
2243
|
-
If set to True, the dictionaries from the IFC file will be transferred to the topology. Otherwise, they won't. The default is False.
|
2244
2249
|
includeTypes : list , optional
|
2245
2250
|
The list of IFC object types to include. It is case insensitive. If set to an empty list, all types are included. The default is [].
|
2246
2251
|
excludeTypes : list , optional
|
2247
2252
|
The list of IFC object types to exclude. It is case insensitive. If set to an empty list, no types are excluded. The default is [].
|
2253
|
+
transferDictionaries : bool , optional
|
2254
|
+
If set to True, the dictionaries from the IFC file will be transferred to the topology. Otherwise, they won't. The default is False.
|
2255
|
+
removeCoplanarFaces : bool , optional
|
2256
|
+
If set to True, coplanar faces are removed. Otherwise they are not. The default is False.
|
2248
2257
|
|
2249
2258
|
Returns
|
2250
2259
|
-------
|
@@ -2264,7 +2273,7 @@ class Topology():
|
|
2264
2273
|
if not file:
|
2265
2274
|
print("Topology.ByIFCPath - Error: the input file parameter is not a valid file. Returning None.")
|
2266
2275
|
return None
|
2267
|
-
return Topology.ByIFCFile(file,
|
2276
|
+
return Topology.ByIFCFile(file, includeTypes=includeTypes, excludeTypes=excludeTypes, transferDictionaries=transferDictionaries, removeCoplanarFaces=removeCoplanarFaces)
|
2268
2277
|
|
2269
2278
|
'''
|
2270
2279
|
@staticmethod
|
topologicpy/version.py
CHANGED
@@ -1 +1 @@
|
|
1
|
-
__version__ = '0.7.
|
1
|
+
__version__ = '0.7.41'
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: topologicpy
|
3
|
-
Version: 0.7.
|
3
|
+
Version: 0.7.41
|
4
4
|
Summary: An Advanced Spatial Modelling and Analysis Software Library for Architecture, Engineering, and Construction.
|
5
5
|
Author-email: Wassim Jabi <wassim.jabi@gmail.com>
|
6
6
|
License: MIT License
|
@@ -10,7 +10,7 @@ topologicpy/Dictionary.py,sha256=KqJ29YyE23Y3Xc6XmKLSCZXRfBvm-OEOxlMZ4dt-rfM,270
|
|
10
10
|
topologicpy/Edge.py,sha256=vhYHkobSLGSWV-oe2oJFFDobqFToDyb7s71yQ840AAA,65166
|
11
11
|
topologicpy/EnergyModel.py,sha256=ni0H1JgvLl1-q90yK9Sm1qj5P1fTuidlimEIcwuj6qE,53287
|
12
12
|
topologicpy/Face.py,sha256=tY7H4OJDJeW1Lz2xk8-Jb67IUunPN7M0Y70-2DEOKFc,115278
|
13
|
-
topologicpy/Graph.py,sha256=
|
13
|
+
topologicpy/Graph.py,sha256=p3VoVH6yygNV2wwzpsi4tm6yOfwRbtmsbnsAu2opLjQ,393517
|
14
14
|
topologicpy/Grid.py,sha256=3-sn7CHWGcXk18XCnHjsUttNJTWwmN63g_Insj__p04,18218
|
15
15
|
topologicpy/Helper.py,sha256=i-AfI29NMsZXBaymjilfvxQbuS3wpYbpPw4RWu1YCHs,16358
|
16
16
|
topologicpy/Honeybee.py,sha256=vcBECJlgWVjNNdD9ZmjNik_pA1Y_ZNoOorsQb2CiyGA,21965
|
@@ -22,14 +22,14 @@ topologicpy/PyG.py,sha256=mDEYYGKv-q1B7GI_J7b3pAbJhF0hqMnITZNMzhHycg4,96097
|
|
22
22
|
topologicpy/Shell.py,sha256=etLWt2VsKOYE-2N0InKdQxLDHEZWsp59DeToSggrjF0,79914
|
23
23
|
topologicpy/Speckle.py,sha256=rUS6PCaxIjEF5_fUruxvMH47FMKg-ohcoU0qAUb-yNM,14267
|
24
24
|
topologicpy/Sun.py,sha256=InnKtX8eKwtAgcScuABH6yp0ljmWh5m_fDR4-n3jJMY,36869
|
25
|
-
topologicpy/Topology.py,sha256=
|
25
|
+
topologicpy/Topology.py,sha256=5KGQ8jSiURMk9syoMLc3mrIONCfj_pfvCfHTKgPcLOM,366047
|
26
26
|
topologicpy/Vector.py,sha256=WQQUbwrg7VKImtxuBUi2i-FRiPT77WlrzLP05gdXKM8,33079
|
27
27
|
topologicpy/Vertex.py,sha256=EQdVYHmW85_pZdHZB3N8pEi0GiadCCkF3z_oqohA7B0,71161
|
28
28
|
topologicpy/Wire.py,sha256=bYH4BhGkJMqqTokkNO_cbywHZXWU01002Yc_fp_VUD4,153524
|
29
29
|
topologicpy/__init__.py,sha256=D7ky87CAQMiS2KE6YLvcTLkTgA2PY7rASe6Z23pjp9k,872
|
30
|
-
topologicpy/version.py,sha256=
|
31
|
-
topologicpy-0.7.
|
32
|
-
topologicpy-0.7.
|
33
|
-
topologicpy-0.7.
|
34
|
-
topologicpy-0.7.
|
35
|
-
topologicpy-0.7.
|
30
|
+
topologicpy/version.py,sha256=ygrcc8w24c49knlspwtI_1ELIHC0l7ij_wIZUGy5LXw,23
|
31
|
+
topologicpy-0.7.41.dist-info/LICENSE,sha256=BRNw73R2WdDBICtwhI3wm3cxsaVqLTAGuRwrTltcfxs,1068
|
32
|
+
topologicpy-0.7.41.dist-info/METADATA,sha256=ZRuIMU4ybRK_pMakX_BblCSAU_i8Xy6vSOZTLQIkp4s,10916
|
33
|
+
topologicpy-0.7.41.dist-info/WHEEL,sha256=R0nc6qTxuoLk7ShA2_Y-UWkN8ZdfDBG2B6Eqpz2WXbs,91
|
34
|
+
topologicpy-0.7.41.dist-info/top_level.txt,sha256=J30bDzW92Ob7hw3zA8V34Jlp-vvsfIkGzkr8sqvb4Uw,12
|
35
|
+
topologicpy-0.7.41.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|