-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgeode_model.py
More file actions
37 lines (26 loc) · 946 Bytes
/
geode_model.py
File metadata and controls
37 lines (26 loc) · 946 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# Standard library imports
from __future__ import annotations
from abc import abstractmethod
# Third party imports
import opengeode as og
# Local application imports
from .types import ViewerType, ViewerElementsType
from .geode_object import GeodeObject
ComponentRegistry = dict[og.ComponentType, list[og.uuid]]
class GeodeModel(GeodeObject):
@classmethod
def viewer_type(cls) -> ViewerType:
return "model"
@classmethod
def viewer_elements_type(cls) -> ViewerElementsType:
return "default"
@abstractmethod
def mesh_components(self) -> ComponentRegistry: ...
@abstractmethod
def collection_components(self) -> ComponentRegistry: ...
@abstractmethod
def boundaries(self, id: og.uuid) -> list[og.ComponentID]: ...
@abstractmethod
def internals(self, id: og.uuid) -> list[og.ComponentID]: ...
@abstractmethod
def items(self, id: og.uuid) -> list[og.ComponentID]: ...