mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-13 02:47:48 +00:00
Merge branch 'v0.7.0' into v0.8.0
This commit is contained in:
@@ -16,11 +16,16 @@
|
||||
# You should have received a copy of the GNU Lesser General Public License
|
||||
# along with IfcOpenShell. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
"""Geometry processing and analysis"""
|
||||
"""Geometry processing and analysis
|
||||
|
||||
from __future__ import absolute_import
|
||||
from __future__ import division
|
||||
from __future__ import print_function
|
||||
IFC may define geometry explicitly (such as meshes) or implicitly (such as
|
||||
parametric extrusions). This module provides methods to extract geometric
|
||||
definitions in IFC into explicitly tessellated triangles or OpenCASCADE Breps
|
||||
for further processing.
|
||||
|
||||
This is typically needed when writing software to visualise or analyse
|
||||
geometry. See also :mod:`ifcopenshell.util.shape` for deriving quantities.
|
||||
"""
|
||||
|
||||
|
||||
def _has_occ():
|
||||
|
||||
@@ -16,10 +16,6 @@
|
||||
# You should have received a copy of the GNU Lesser General Public License
|
||||
# along with IfcOpenShell. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
from __future__ import absolute_import
|
||||
from __future__ import division
|
||||
from __future__ import print_function
|
||||
|
||||
import os
|
||||
import sys
|
||||
import time
|
||||
@@ -126,7 +122,7 @@ class geometry_creation_thread(QtCore.QThread):
|
||||
self.signals.completed.emit((it, self.f, list(_())))
|
||||
|
||||
|
||||
class configuration(object):
|
||||
class configuration:
|
||||
def __init__(self):
|
||||
try:
|
||||
import ConfigParser
|
||||
|
||||
@@ -16,10 +16,6 @@
|
||||
# You should have received a copy of the GNU Lesser General Public License
|
||||
# along with IfcOpenShell. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
from __future__ import absolute_import
|
||||
from __future__ import division
|
||||
from __future__ import print_function
|
||||
|
||||
import os
|
||||
import sys
|
||||
import logging
|
||||
@@ -49,7 +45,7 @@ except BaseException:
|
||||
CodeEdit = QtWidgets.QPlainTextEdit
|
||||
|
||||
|
||||
class StdoutRedirector(object):
|
||||
class StdoutRedirector:
|
||||
"""A class for redirecting stdout to this Text widget."""
|
||||
|
||||
def __init__(self, widget):
|
||||
|
||||
@@ -17,11 +17,6 @@
|
||||
# along with IfcOpenShell. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
from __future__ import absolute_import
|
||||
from __future__ import division
|
||||
from __future__ import print_function
|
||||
from __future__ import annotations
|
||||
|
||||
import os
|
||||
import sys
|
||||
import operator
|
||||
@@ -32,9 +27,13 @@ from ..entity_instance import entity_instance
|
||||
|
||||
from . import has_occ
|
||||
|
||||
from typing import TypeVar, Union, Optional
|
||||
from typing import TypeVar, Union, Optional, Generator
|
||||
|
||||
T = TypeVar("T")
|
||||
ShapeElementType = Union[
|
||||
ifcopenshell_wrapper.BRepElement, ifcopenshell_wrapper.TriangulationElement, ifcopenshell_wrapper.SerializedElement
|
||||
]
|
||||
ShapeType = Union[ifcopenshell_wrapper.BRep, ifcopenshell_wrapper.Triangulation, ifcopenshell_wrapper.Serialization]
|
||||
|
||||
|
||||
def wrap_shape_creation(settings, shape):
|
||||
@@ -165,7 +164,7 @@ class iterator(ifcopenshell_wrapper.Iterator):
|
||||
def get(self):
|
||||
return wrap_shape_creation(self.settings, ifcopenshell_wrapper.Iterator.get(self))
|
||||
|
||||
def __iter__(self):
|
||||
def __iter__(self) -> Generator[ShapeElementType, None, None]:
|
||||
if self.initialize():
|
||||
while True:
|
||||
yield self.get()
|
||||
@@ -191,7 +190,7 @@ class tree(ifcopenshell_wrapper.tree):
|
||||
def select(
|
||||
self,
|
||||
value: Union[
|
||||
entity_instance, ifcopenshell_wrapper.BRepElement, tuple[float, float, float], TopoDS.TopoDS_Shape
|
||||
entity_instance, ifcopenshell_wrapper.BRepElement, tuple[float, float, float], "TopoDS.TopoDS_Shape"
|
||||
],
|
||||
**kwargs,
|
||||
) -> list[entity_instance]:
|
||||
|
||||
@@ -17,20 +17,12 @@
|
||||
# along with IfcOpenShell. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
from __future__ import absolute_import
|
||||
from __future__ import division
|
||||
from __future__ import print_function
|
||||
|
||||
import random
|
||||
import operator
|
||||
import warnings
|
||||
|
||||
from collections import namedtuple
|
||||
|
||||
try: # python 3.3+
|
||||
from collections.abc import Iterable
|
||||
except ImportError: # python 2
|
||||
from collections import Iterable
|
||||
from collections.abc import Iterable
|
||||
|
||||
import OCC
|
||||
|
||||
|
||||
Reference in New Issue
Block a user