Stores the extracted geometric detail for a certain set of elements, including the arbitrarily precise plain equations and their correspondence to polyhedral facets.
| 57 | |
| 58 | @dataclass |
| 59 | class 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 | |
| 100 | class context: |
| 101 |
no outgoing calls
no test coverage detected