MCPcopy Create free account
hub / github.com/IfcOpenShell/IfcOpenShell / model_geometry

Class model_geometry

src/exterior-shell-extractor/main.py:59–98  ·  view source on GitHub ↗

Stores the extracted geometric detail for a certain set of elements, including the arbitrarily precise plain equations and their correspondence to polyhedral facets.

Source from the content-addressed store, hash-verified

57
58@dataclass
59class model_geometry:
60 """
61 Stores the extracted geometric detail for a certain set of elements, including the arbitrarily precise plain equations and their correspondence to polyhedral facets.
62 """
63 # list[list[int]]
64 # ~^ non_convex_halfspace_facets_equations[...]~
65 # ^ non_convex_halfspace_facets_equations[n][...]
66 #
67 # used to map after finding clusters on plane equations
68 # float_facet_normals[i] -> non_convex_halfspace_facets_equations[i][j]
69 epeck_equation_idxs: list = field(default_factory=list)
70
71 # list[pair[str, tuple[halfspacetree]]]
72 # used to apply mapping to
73 convex_halfspace_trees: list = field(default_factory=list)
74
75 # halfspaces > facets > plane_equation
76 # list[list[plane]]
77 non_convex_halfspace_facets_equations: list = field(default_factory=list)
78 # normalized list[ndarray[N, 3]]
79 float_facet_normals: list = field(default_factory=list)
80 # list[ndarray[N, 3]]
81 float_facet_centroids: list = field(default_factory=list)
82
83 def __add__(self, other):
84 """Concatenate two model_geometry objects
85
86 Args:
87 other (model_geometry): Other set of interpreted geometries
88
89 Returns:
90 _type_: model_geometry
91 """
92 return model_geometry(
93 self.epeck_equation_idxs + other.epeck_equation_idxs,
94 self.convex_halfspace_trees + other.convex_halfspace_trees,
95 self.non_convex_halfspace_facets_equations + other.non_convex_halfspace_facets_equations,
96 self.float_facet_normals + other.float_facet_normals,
97 self.float_facet_centroids + other.float_facet_centroids,
98 )
99
100class context:
101

Callers 3

__add__Method · 0.85
extract_geometryMethod · 0.85
remove_narrowMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected