2309 lines
68 KiB
Python
2309 lines
68 KiB
Python
from typing import Any, Dict, List, Type, TypeVar, Union
|
|
|
|
import attr
|
|
from typing_extensions import Self
|
|
|
|
from ..models.center_of_mass import CenterOfMass
|
|
from ..models.curve_get_control_points import CurveGetControlPoints
|
|
from ..models.curve_get_end_points import CurveGetEndPoints
|
|
from ..models.curve_get_type import CurveGetType
|
|
from ..models.density import Density
|
|
from ..models.entity_get_all_child_uuids import EntityGetAllChildUuids
|
|
from ..models.entity_get_child_uuid import EntityGetChildUuid
|
|
from ..models.entity_get_num_children import EntityGetNumChildren
|
|
from ..models.entity_get_parent_id import EntityGetParentId
|
|
from ..models.export import Export
|
|
from ..models.get_entity_type import GetEntityType
|
|
from ..models.get_sketch_mode_plane import GetSketchModePlane
|
|
from ..models.highlight_set_entity import HighlightSetEntity
|
|
from ..models.import_files import ImportFiles
|
|
from ..models.mass import Mass
|
|
from ..models.mouse_click import MouseClick
|
|
from ..models.path_get_curve_uuids_for_vertices import PathGetCurveUuidsForVertices
|
|
from ..models.path_get_info import PathGetInfo
|
|
from ..models.path_get_vertex_uuids import PathGetVertexUuids
|
|
from ..models.plane_intersect_and_project import PlaneIntersectAndProject
|
|
from ..models.select_get import SelectGet
|
|
from ..models.select_with_point import SelectWithPoint
|
|
from ..models.solid3d_get_all_edge_faces import Solid3dGetAllEdgeFaces
|
|
from ..models.solid3d_get_all_opposite_edges import Solid3dGetAllOppositeEdges
|
|
from ..models.solid3d_get_next_adjacent_edge import Solid3dGetNextAdjacentEdge
|
|
from ..models.solid3d_get_opposite_edge import Solid3dGetOppositeEdge
|
|
from ..models.solid3d_get_prev_adjacent_edge import Solid3dGetPrevAdjacentEdge
|
|
from ..models.surface_area import SurfaceArea
|
|
from ..models.take_snapshot import TakeSnapshot
|
|
from ..models.volume import Volume
|
|
from ..types import UNSET, Unset
|
|
|
|
YK = TypeVar("YK", bound="empty")
|
|
|
|
|
|
@attr.s(auto_attribs=True)
|
|
class empty:
|
|
"""An empty response, used for any command that does not explicitly have a response defined here.""" # noqa: E501
|
|
|
|
type: str = "empty"
|
|
|
|
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
|
|
|
def to_dict(self) -> Dict[str, Any]:
|
|
type = self.type
|
|
|
|
field_dict: Dict[str, Any] = {}
|
|
field_dict.update(self.additional_properties)
|
|
field_dict.update({})
|
|
field_dict["type"] = type
|
|
|
|
return field_dict
|
|
|
|
@classmethod
|
|
def from_dict(cls: Type[YK], src_dict: Dict[str, Any]) -> YK:
|
|
d = src_dict.copy()
|
|
type = d.pop("type", UNSET)
|
|
|
|
empty = cls(
|
|
type=type,
|
|
)
|
|
|
|
empty.additional_properties = d
|
|
return empty
|
|
|
|
@property
|
|
def additional_keys(self) -> List[str]:
|
|
return list(self.additional_properties.keys())
|
|
|
|
def __getitem__(self, key: str) -> Any:
|
|
return self.additional_properties[key]
|
|
|
|
def __setitem__(self, key: str, value: Any) -> None:
|
|
self.additional_properties[key] = value
|
|
|
|
def __delitem__(self, key: str) -> None:
|
|
del self.additional_properties[key]
|
|
|
|
def __contains__(self, key: str) -> bool:
|
|
return key in self.additional_properties
|
|
|
|
|
|
WS = TypeVar("WS", bound="export")
|
|
|
|
|
|
@attr.s(auto_attribs=True)
|
|
class export:
|
|
"""The response from the `Export` command. When this is being performed over a websocket, this is sent as binary not JSON. The binary data can be deserialized as `bincode` into a `Vec<ExportFile>`.""" # noqa: E501
|
|
|
|
data: Union[Unset, Export] = UNSET
|
|
type: str = "export"
|
|
|
|
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
|
|
|
def to_dict(self) -> Dict[str, Any]:
|
|
if not isinstance(self.data, Unset):
|
|
data = self.data
|
|
type = self.type
|
|
|
|
field_dict: Dict[str, Any] = {}
|
|
field_dict.update(self.additional_properties)
|
|
field_dict.update({})
|
|
if data is not UNSET:
|
|
field_dict["data"] = data.to_dict()
|
|
field_dict["type"] = type
|
|
|
|
return field_dict
|
|
|
|
@classmethod
|
|
def from_dict(cls: Type[WS], src_dict: Dict[str, Any]) -> WS:
|
|
d = src_dict.copy()
|
|
_data = d.pop("data", UNSET)
|
|
data: Union[Unset, Export]
|
|
if isinstance(_data, Unset):
|
|
data = UNSET
|
|
else:
|
|
data = _data # type: ignore[arg-type]
|
|
|
|
type = d.pop("type", UNSET)
|
|
|
|
export = cls(
|
|
data=data,
|
|
type=type,
|
|
)
|
|
|
|
export.additional_properties = d
|
|
return export
|
|
|
|
@property
|
|
def additional_keys(self) -> List[str]:
|
|
return list(self.additional_properties.keys())
|
|
|
|
def __getitem__(self, key: str) -> Any:
|
|
return self.additional_properties[key]
|
|
|
|
def __setitem__(self, key: str, value: Any) -> None:
|
|
self.additional_properties[key] = value
|
|
|
|
def __delitem__(self, key: str) -> None:
|
|
del self.additional_properties[key]
|
|
|
|
def __contains__(self, key: str) -> bool:
|
|
return key in self.additional_properties
|
|
|
|
|
|
SL = TypeVar("SL", bound="select_with_point")
|
|
|
|
|
|
@attr.s(auto_attribs=True)
|
|
class select_with_point:
|
|
"""The response from the `SelectWithPoint` command.""" # noqa: E501
|
|
|
|
data: Union[Unset, SelectWithPoint] = UNSET
|
|
type: str = "select_with_point"
|
|
|
|
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
|
|
|
def to_dict(self) -> Dict[str, Any]:
|
|
if not isinstance(self.data, Unset):
|
|
data = self.data
|
|
type = self.type
|
|
|
|
field_dict: Dict[str, Any] = {}
|
|
field_dict.update(self.additional_properties)
|
|
field_dict.update({})
|
|
if data is not UNSET:
|
|
field_dict["data"] = data.to_dict()
|
|
field_dict["type"] = type
|
|
|
|
return field_dict
|
|
|
|
@classmethod
|
|
def from_dict(cls: Type[SL], src_dict: Dict[str, Any]) -> SL:
|
|
d = src_dict.copy()
|
|
_data = d.pop("data", UNSET)
|
|
data: Union[Unset, SelectWithPoint]
|
|
if isinstance(_data, Unset):
|
|
data = UNSET
|
|
else:
|
|
data = _data # type: ignore[arg-type]
|
|
|
|
type = d.pop("type", UNSET)
|
|
|
|
select_with_point = cls(
|
|
data=data,
|
|
type=type,
|
|
)
|
|
|
|
select_with_point.additional_properties = d
|
|
return select_with_point
|
|
|
|
@property
|
|
def additional_keys(self) -> List[str]:
|
|
return list(self.additional_properties.keys())
|
|
|
|
def __getitem__(self, key: str) -> Any:
|
|
return self.additional_properties[key]
|
|
|
|
def __setitem__(self, key: str, value: Any) -> None:
|
|
self.additional_properties[key] = value
|
|
|
|
def __delitem__(self, key: str) -> None:
|
|
del self.additional_properties[key]
|
|
|
|
def __contains__(self, key: str) -> bool:
|
|
return key in self.additional_properties
|
|
|
|
|
|
MK = TypeVar("MK", bound="highlight_set_entity")
|
|
|
|
|
|
@attr.s(auto_attribs=True)
|
|
class highlight_set_entity:
|
|
"""The response from the `HighlightSetEntity` command.""" # noqa: E501
|
|
|
|
data: Union[Unset, HighlightSetEntity] = UNSET
|
|
type: str = "highlight_set_entity"
|
|
|
|
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
|
|
|
def to_dict(self) -> Dict[str, Any]:
|
|
if not isinstance(self.data, Unset):
|
|
data = self.data
|
|
type = self.type
|
|
|
|
field_dict: Dict[str, Any] = {}
|
|
field_dict.update(self.additional_properties)
|
|
field_dict.update({})
|
|
if data is not UNSET:
|
|
field_dict["data"] = data.to_dict()
|
|
field_dict["type"] = type
|
|
|
|
return field_dict
|
|
|
|
@classmethod
|
|
def from_dict(cls: Type[MK], src_dict: Dict[str, Any]) -> MK:
|
|
d = src_dict.copy()
|
|
_data = d.pop("data", UNSET)
|
|
data: Union[Unset, HighlightSetEntity]
|
|
if isinstance(_data, Unset):
|
|
data = UNSET
|
|
else:
|
|
data = _data # type: ignore[arg-type]
|
|
|
|
type = d.pop("type", UNSET)
|
|
|
|
highlight_set_entity = cls(
|
|
data=data,
|
|
type=type,
|
|
)
|
|
|
|
highlight_set_entity.additional_properties = d
|
|
return highlight_set_entity
|
|
|
|
@property
|
|
def additional_keys(self) -> List[str]:
|
|
return list(self.additional_properties.keys())
|
|
|
|
def __getitem__(self, key: str) -> Any:
|
|
return self.additional_properties[key]
|
|
|
|
def __setitem__(self, key: str, value: Any) -> None:
|
|
self.additional_properties[key] = value
|
|
|
|
def __delitem__(self, key: str) -> None:
|
|
del self.additional_properties[key]
|
|
|
|
def __contains__(self, key: str) -> bool:
|
|
return key in self.additional_properties
|
|
|
|
|
|
TU = TypeVar("TU", bound="entity_get_child_uuid")
|
|
|
|
|
|
@attr.s(auto_attribs=True)
|
|
class entity_get_child_uuid:
|
|
"""The response from the `EntityGetChildUuid` command.""" # noqa: E501
|
|
|
|
data: Union[Unset, EntityGetChildUuid] = UNSET
|
|
type: str = "entity_get_child_uuid"
|
|
|
|
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
|
|
|
def to_dict(self) -> Dict[str, Any]:
|
|
if not isinstance(self.data, Unset):
|
|
data = self.data
|
|
type = self.type
|
|
|
|
field_dict: Dict[str, Any] = {}
|
|
field_dict.update(self.additional_properties)
|
|
field_dict.update({})
|
|
if data is not UNSET:
|
|
field_dict["data"] = data.to_dict()
|
|
field_dict["type"] = type
|
|
|
|
return field_dict
|
|
|
|
@classmethod
|
|
def from_dict(cls: Type[TU], src_dict: Dict[str, Any]) -> TU:
|
|
d = src_dict.copy()
|
|
_data = d.pop("data", UNSET)
|
|
data: Union[Unset, EntityGetChildUuid]
|
|
if isinstance(_data, Unset):
|
|
data = UNSET
|
|
else:
|
|
data = _data # type: ignore[arg-type]
|
|
|
|
type = d.pop("type", UNSET)
|
|
|
|
entity_get_child_uuid = cls(
|
|
data=data,
|
|
type=type,
|
|
)
|
|
|
|
entity_get_child_uuid.additional_properties = d
|
|
return entity_get_child_uuid
|
|
|
|
@property
|
|
def additional_keys(self) -> List[str]:
|
|
return list(self.additional_properties.keys())
|
|
|
|
def __getitem__(self, key: str) -> Any:
|
|
return self.additional_properties[key]
|
|
|
|
def __setitem__(self, key: str, value: Any) -> None:
|
|
self.additional_properties[key] = value
|
|
|
|
def __delitem__(self, key: str) -> None:
|
|
del self.additional_properties[key]
|
|
|
|
def __contains__(self, key: str) -> bool:
|
|
return key in self.additional_properties
|
|
|
|
|
|
FY = TypeVar("FY", bound="entity_get_num_children")
|
|
|
|
|
|
@attr.s(auto_attribs=True)
|
|
class entity_get_num_children:
|
|
"""The response from the `EntityGetNumChildren` command.""" # noqa: E501
|
|
|
|
data: Union[Unset, EntityGetNumChildren] = UNSET
|
|
type: str = "entity_get_num_children"
|
|
|
|
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
|
|
|
def to_dict(self) -> Dict[str, Any]:
|
|
if not isinstance(self.data, Unset):
|
|
data = self.data
|
|
type = self.type
|
|
|
|
field_dict: Dict[str, Any] = {}
|
|
field_dict.update(self.additional_properties)
|
|
field_dict.update({})
|
|
if data is not UNSET:
|
|
field_dict["data"] = data.to_dict()
|
|
field_dict["type"] = type
|
|
|
|
return field_dict
|
|
|
|
@classmethod
|
|
def from_dict(cls: Type[FY], src_dict: Dict[str, Any]) -> FY:
|
|
d = src_dict.copy()
|
|
_data = d.pop("data", UNSET)
|
|
data: Union[Unset, EntityGetNumChildren]
|
|
if isinstance(_data, Unset):
|
|
data = UNSET
|
|
else:
|
|
data = _data # type: ignore[arg-type]
|
|
|
|
type = d.pop("type", UNSET)
|
|
|
|
entity_get_num_children = cls(
|
|
data=data,
|
|
type=type,
|
|
)
|
|
|
|
entity_get_num_children.additional_properties = d
|
|
return entity_get_num_children
|
|
|
|
@property
|
|
def additional_keys(self) -> List[str]:
|
|
return list(self.additional_properties.keys())
|
|
|
|
def __getitem__(self, key: str) -> Any:
|
|
return self.additional_properties[key]
|
|
|
|
def __setitem__(self, key: str, value: Any) -> None:
|
|
self.additional_properties[key] = value
|
|
|
|
def __delitem__(self, key: str) -> None:
|
|
del self.additional_properties[key]
|
|
|
|
def __contains__(self, key: str) -> bool:
|
|
return key in self.additional_properties
|
|
|
|
|
|
FD = TypeVar("FD", bound="entity_get_parent_id")
|
|
|
|
|
|
@attr.s(auto_attribs=True)
|
|
class entity_get_parent_id:
|
|
"""The response from the `EntityGetParentId` command.""" # noqa: E501
|
|
|
|
data: Union[Unset, EntityGetParentId] = UNSET
|
|
type: str = "entity_get_parent_id"
|
|
|
|
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
|
|
|
def to_dict(self) -> Dict[str, Any]:
|
|
if not isinstance(self.data, Unset):
|
|
data = self.data
|
|
type = self.type
|
|
|
|
field_dict: Dict[str, Any] = {}
|
|
field_dict.update(self.additional_properties)
|
|
field_dict.update({})
|
|
if data is not UNSET:
|
|
field_dict["data"] = data.to_dict()
|
|
field_dict["type"] = type
|
|
|
|
return field_dict
|
|
|
|
@classmethod
|
|
def from_dict(cls: Type[FD], src_dict: Dict[str, Any]) -> FD:
|
|
d = src_dict.copy()
|
|
_data = d.pop("data", UNSET)
|
|
data: Union[Unset, EntityGetParentId]
|
|
if isinstance(_data, Unset):
|
|
data = UNSET
|
|
else:
|
|
data = _data # type: ignore[arg-type]
|
|
|
|
type = d.pop("type", UNSET)
|
|
|
|
entity_get_parent_id = cls(
|
|
data=data,
|
|
type=type,
|
|
)
|
|
|
|
entity_get_parent_id.additional_properties = d
|
|
return entity_get_parent_id
|
|
|
|
@property
|
|
def additional_keys(self) -> List[str]:
|
|
return list(self.additional_properties.keys())
|
|
|
|
def __getitem__(self, key: str) -> Any:
|
|
return self.additional_properties[key]
|
|
|
|
def __setitem__(self, key: str, value: Any) -> None:
|
|
self.additional_properties[key] = value
|
|
|
|
def __delitem__(self, key: str) -> None:
|
|
del self.additional_properties[key]
|
|
|
|
def __contains__(self, key: str) -> bool:
|
|
return key in self.additional_properties
|
|
|
|
|
|
TZ = TypeVar("TZ", bound="entity_get_all_child_uuids")
|
|
|
|
|
|
@attr.s(auto_attribs=True)
|
|
class entity_get_all_child_uuids:
|
|
"""The response from the `EntityGetAllChildUuids` command.""" # noqa: E501
|
|
|
|
data: Union[Unset, EntityGetAllChildUuids] = UNSET
|
|
type: str = "entity_get_all_child_uuids"
|
|
|
|
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
|
|
|
def to_dict(self) -> Dict[str, Any]:
|
|
if not isinstance(self.data, Unset):
|
|
data = self.data
|
|
type = self.type
|
|
|
|
field_dict: Dict[str, Any] = {}
|
|
field_dict.update(self.additional_properties)
|
|
field_dict.update({})
|
|
if data is not UNSET:
|
|
field_dict["data"] = data.to_dict()
|
|
field_dict["type"] = type
|
|
|
|
return field_dict
|
|
|
|
@classmethod
|
|
def from_dict(cls: Type[TZ], src_dict: Dict[str, Any]) -> TZ:
|
|
d = src_dict.copy()
|
|
_data = d.pop("data", UNSET)
|
|
data: Union[Unset, EntityGetAllChildUuids]
|
|
if isinstance(_data, Unset):
|
|
data = UNSET
|
|
else:
|
|
data = _data # type: ignore[arg-type]
|
|
|
|
type = d.pop("type", UNSET)
|
|
|
|
entity_get_all_child_uuids = cls(
|
|
data=data,
|
|
type=type,
|
|
)
|
|
|
|
entity_get_all_child_uuids.additional_properties = d
|
|
return entity_get_all_child_uuids
|
|
|
|
@property
|
|
def additional_keys(self) -> List[str]:
|
|
return list(self.additional_properties.keys())
|
|
|
|
def __getitem__(self, key: str) -> Any:
|
|
return self.additional_properties[key]
|
|
|
|
def __setitem__(self, key: str, value: Any) -> None:
|
|
self.additional_properties[key] = value
|
|
|
|
def __delitem__(self, key: str) -> None:
|
|
del self.additional_properties[key]
|
|
|
|
def __contains__(self, key: str) -> bool:
|
|
return key in self.additional_properties
|
|
|
|
|
|
AX = TypeVar("AX", bound="select_get")
|
|
|
|
|
|
@attr.s(auto_attribs=True)
|
|
class select_get:
|
|
"""The response from the `SelectGet` command.""" # noqa: E501
|
|
|
|
data: Union[Unset, SelectGet] = UNSET
|
|
type: str = "select_get"
|
|
|
|
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
|
|
|
def to_dict(self) -> Dict[str, Any]:
|
|
if not isinstance(self.data, Unset):
|
|
data = self.data
|
|
type = self.type
|
|
|
|
field_dict: Dict[str, Any] = {}
|
|
field_dict.update(self.additional_properties)
|
|
field_dict.update({})
|
|
if data is not UNSET:
|
|
field_dict["data"] = data.to_dict()
|
|
field_dict["type"] = type
|
|
|
|
return field_dict
|
|
|
|
@classmethod
|
|
def from_dict(cls: Type[AX], src_dict: Dict[str, Any]) -> AX:
|
|
d = src_dict.copy()
|
|
_data = d.pop("data", UNSET)
|
|
data: Union[Unset, SelectGet]
|
|
if isinstance(_data, Unset):
|
|
data = UNSET
|
|
else:
|
|
data = _data # type: ignore[arg-type]
|
|
|
|
type = d.pop("type", UNSET)
|
|
|
|
select_get = cls(
|
|
data=data,
|
|
type=type,
|
|
)
|
|
|
|
select_get.additional_properties = d
|
|
return select_get
|
|
|
|
@property
|
|
def additional_keys(self) -> List[str]:
|
|
return list(self.additional_properties.keys())
|
|
|
|
def __getitem__(self, key: str) -> Any:
|
|
return self.additional_properties[key]
|
|
|
|
def __setitem__(self, key: str, value: Any) -> None:
|
|
self.additional_properties[key] = value
|
|
|
|
def __delitem__(self, key: str) -> None:
|
|
del self.additional_properties[key]
|
|
|
|
def __contains__(self, key: str) -> bool:
|
|
return key in self.additional_properties
|
|
|
|
|
|
RQ = TypeVar("RQ", bound="get_entity_type")
|
|
|
|
|
|
@attr.s(auto_attribs=True)
|
|
class get_entity_type:
|
|
"""The response from the `GetEntityType` command.""" # noqa: E501
|
|
|
|
data: Union[Unset, GetEntityType] = UNSET
|
|
type: str = "get_entity_type"
|
|
|
|
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
|
|
|
def to_dict(self) -> Dict[str, Any]:
|
|
if not isinstance(self.data, Unset):
|
|
data = self.data
|
|
type = self.type
|
|
|
|
field_dict: Dict[str, Any] = {}
|
|
field_dict.update(self.additional_properties)
|
|
field_dict.update({})
|
|
if data is not UNSET:
|
|
field_dict["data"] = data.to_dict()
|
|
field_dict["type"] = type
|
|
|
|
return field_dict
|
|
|
|
@classmethod
|
|
def from_dict(cls: Type[RQ], src_dict: Dict[str, Any]) -> RQ:
|
|
d = src_dict.copy()
|
|
_data = d.pop("data", UNSET)
|
|
data: Union[Unset, GetEntityType]
|
|
if isinstance(_data, Unset):
|
|
data = UNSET
|
|
else:
|
|
data = _data # type: ignore[arg-type]
|
|
|
|
type = d.pop("type", UNSET)
|
|
|
|
get_entity_type = cls(
|
|
data=data,
|
|
type=type,
|
|
)
|
|
|
|
get_entity_type.additional_properties = d
|
|
return get_entity_type
|
|
|
|
@property
|
|
def additional_keys(self) -> List[str]:
|
|
return list(self.additional_properties.keys())
|
|
|
|
def __getitem__(self, key: str) -> Any:
|
|
return self.additional_properties[key]
|
|
|
|
def __setitem__(self, key: str, value: Any) -> None:
|
|
self.additional_properties[key] = value
|
|
|
|
def __delitem__(self, key: str) -> None:
|
|
del self.additional_properties[key]
|
|
|
|
def __contains__(self, key: str) -> bool:
|
|
return key in self.additional_properties
|
|
|
|
|
|
ZL = TypeVar("ZL", bound="solid3d_get_all_edge_faces")
|
|
|
|
|
|
@attr.s(auto_attribs=True)
|
|
class solid3d_get_all_edge_faces:
|
|
"""The response from the `Solid3dGetAllEdgeFaces` command.""" # noqa: E501
|
|
|
|
data: Union[Unset, Solid3dGetAllEdgeFaces] = UNSET
|
|
type: str = "solid3d_get_all_edge_faces"
|
|
|
|
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
|
|
|
def to_dict(self) -> Dict[str, Any]:
|
|
if not isinstance(self.data, Unset):
|
|
data = self.data
|
|
type = self.type
|
|
|
|
field_dict: Dict[str, Any] = {}
|
|
field_dict.update(self.additional_properties)
|
|
field_dict.update({})
|
|
if data is not UNSET:
|
|
field_dict["data"] = data.to_dict()
|
|
field_dict["type"] = type
|
|
|
|
return field_dict
|
|
|
|
@classmethod
|
|
def from_dict(cls: Type[ZL], src_dict: Dict[str, Any]) -> ZL:
|
|
d = src_dict.copy()
|
|
_data = d.pop("data", UNSET)
|
|
data: Union[Unset, Solid3dGetAllEdgeFaces]
|
|
if isinstance(_data, Unset):
|
|
data = UNSET
|
|
else:
|
|
data = _data # type: ignore[arg-type]
|
|
|
|
type = d.pop("type", UNSET)
|
|
|
|
solid3d_get_all_edge_faces = cls(
|
|
data=data,
|
|
type=type,
|
|
)
|
|
|
|
solid3d_get_all_edge_faces.additional_properties = d
|
|
return solid3d_get_all_edge_faces
|
|
|
|
@property
|
|
def additional_keys(self) -> List[str]:
|
|
return list(self.additional_properties.keys())
|
|
|
|
def __getitem__(self, key: str) -> Any:
|
|
return self.additional_properties[key]
|
|
|
|
def __setitem__(self, key: str, value: Any) -> None:
|
|
self.additional_properties[key] = value
|
|
|
|
def __delitem__(self, key: str) -> None:
|
|
del self.additional_properties[key]
|
|
|
|
def __contains__(self, key: str) -> bool:
|
|
return key in self.additional_properties
|
|
|
|
|
|
CM = TypeVar("CM", bound="solid3d_get_all_opposite_edges")
|
|
|
|
|
|
@attr.s(auto_attribs=True)
|
|
class solid3d_get_all_opposite_edges:
|
|
"""The response from the `Solid3dGetAllOppositeEdges` command.""" # noqa: E501
|
|
|
|
data: Union[Unset, Solid3dGetAllOppositeEdges] = UNSET
|
|
type: str = "solid3d_get_all_opposite_edges"
|
|
|
|
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
|
|
|
def to_dict(self) -> Dict[str, Any]:
|
|
if not isinstance(self.data, Unset):
|
|
data = self.data
|
|
type = self.type
|
|
|
|
field_dict: Dict[str, Any] = {}
|
|
field_dict.update(self.additional_properties)
|
|
field_dict.update({})
|
|
if data is not UNSET:
|
|
field_dict["data"] = data.to_dict()
|
|
field_dict["type"] = type
|
|
|
|
return field_dict
|
|
|
|
@classmethod
|
|
def from_dict(cls: Type[CM], src_dict: Dict[str, Any]) -> CM:
|
|
d = src_dict.copy()
|
|
_data = d.pop("data", UNSET)
|
|
data: Union[Unset, Solid3dGetAllOppositeEdges]
|
|
if isinstance(_data, Unset):
|
|
data = UNSET
|
|
else:
|
|
data = _data # type: ignore[arg-type]
|
|
|
|
type = d.pop("type", UNSET)
|
|
|
|
solid3d_get_all_opposite_edges = cls(
|
|
data=data,
|
|
type=type,
|
|
)
|
|
|
|
solid3d_get_all_opposite_edges.additional_properties = d
|
|
return solid3d_get_all_opposite_edges
|
|
|
|
@property
|
|
def additional_keys(self) -> List[str]:
|
|
return list(self.additional_properties.keys())
|
|
|
|
def __getitem__(self, key: str) -> Any:
|
|
return self.additional_properties[key]
|
|
|
|
def __setitem__(self, key: str, value: Any) -> None:
|
|
self.additional_properties[key] = value
|
|
|
|
def __delitem__(self, key: str) -> None:
|
|
del self.additional_properties[key]
|
|
|
|
def __contains__(self, key: str) -> bool:
|
|
return key in self.additional_properties
|
|
|
|
|
|
OS = TypeVar("OS", bound="solid3d_get_opposite_edge")
|
|
|
|
|
|
@attr.s(auto_attribs=True)
|
|
class solid3d_get_opposite_edge:
|
|
"""The response from the `Solid3dGetOppositeEdge` command.""" # noqa: E501
|
|
|
|
data: Union[Unset, Solid3dGetOppositeEdge] = UNSET
|
|
type: str = "solid3d_get_opposite_edge"
|
|
|
|
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
|
|
|
def to_dict(self) -> Dict[str, Any]:
|
|
if not isinstance(self.data, Unset):
|
|
data = self.data
|
|
type = self.type
|
|
|
|
field_dict: Dict[str, Any] = {}
|
|
field_dict.update(self.additional_properties)
|
|
field_dict.update({})
|
|
if data is not UNSET:
|
|
field_dict["data"] = data.to_dict()
|
|
field_dict["type"] = type
|
|
|
|
return field_dict
|
|
|
|
@classmethod
|
|
def from_dict(cls: Type[OS], src_dict: Dict[str, Any]) -> OS:
|
|
d = src_dict.copy()
|
|
_data = d.pop("data", UNSET)
|
|
data: Union[Unset, Solid3dGetOppositeEdge]
|
|
if isinstance(_data, Unset):
|
|
data = UNSET
|
|
else:
|
|
data = _data # type: ignore[arg-type]
|
|
|
|
type = d.pop("type", UNSET)
|
|
|
|
solid3d_get_opposite_edge = cls(
|
|
data=data,
|
|
type=type,
|
|
)
|
|
|
|
solid3d_get_opposite_edge.additional_properties = d
|
|
return solid3d_get_opposite_edge
|
|
|
|
@property
|
|
def additional_keys(self) -> List[str]:
|
|
return list(self.additional_properties.keys())
|
|
|
|
def __getitem__(self, key: str) -> Any:
|
|
return self.additional_properties[key]
|
|
|
|
def __setitem__(self, key: str, value: Any) -> None:
|
|
self.additional_properties[key] = value
|
|
|
|
def __delitem__(self, key: str) -> None:
|
|
del self.additional_properties[key]
|
|
|
|
def __contains__(self, key: str) -> bool:
|
|
return key in self.additional_properties
|
|
|
|
|
|
WP = TypeVar("WP", bound="solid3d_get_prev_adjacent_edge")
|
|
|
|
|
|
@attr.s(auto_attribs=True)
|
|
class solid3d_get_prev_adjacent_edge:
|
|
"""The response from the `Solid3dGetPrevAdjacentEdge` command.""" # noqa: E501
|
|
|
|
data: Union[Unset, Solid3dGetPrevAdjacentEdge] = UNSET
|
|
type: str = "solid3d_get_prev_adjacent_edge"
|
|
|
|
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
|
|
|
def to_dict(self) -> Dict[str, Any]:
|
|
if not isinstance(self.data, Unset):
|
|
data = self.data
|
|
type = self.type
|
|
|
|
field_dict: Dict[str, Any] = {}
|
|
field_dict.update(self.additional_properties)
|
|
field_dict.update({})
|
|
if data is not UNSET:
|
|
field_dict["data"] = data.to_dict()
|
|
field_dict["type"] = type
|
|
|
|
return field_dict
|
|
|
|
@classmethod
|
|
def from_dict(cls: Type[WP], src_dict: Dict[str, Any]) -> WP:
|
|
d = src_dict.copy()
|
|
_data = d.pop("data", UNSET)
|
|
data: Union[Unset, Solid3dGetPrevAdjacentEdge]
|
|
if isinstance(_data, Unset):
|
|
data = UNSET
|
|
else:
|
|
data = _data # type: ignore[arg-type]
|
|
|
|
type = d.pop("type", UNSET)
|
|
|
|
solid3d_get_prev_adjacent_edge = cls(
|
|
data=data,
|
|
type=type,
|
|
)
|
|
|
|
solid3d_get_prev_adjacent_edge.additional_properties = d
|
|
return solid3d_get_prev_adjacent_edge
|
|
|
|
@property
|
|
def additional_keys(self) -> List[str]:
|
|
return list(self.additional_properties.keys())
|
|
|
|
def __getitem__(self, key: str) -> Any:
|
|
return self.additional_properties[key]
|
|
|
|
def __setitem__(self, key: str, value: Any) -> None:
|
|
self.additional_properties[key] = value
|
|
|
|
def __delitem__(self, key: str) -> None:
|
|
del self.additional_properties[key]
|
|
|
|
def __contains__(self, key: str) -> bool:
|
|
return key in self.additional_properties
|
|
|
|
|
|
XO = TypeVar("XO", bound="solid3d_get_next_adjacent_edge")
|
|
|
|
|
|
@attr.s(auto_attribs=True)
|
|
class solid3d_get_next_adjacent_edge:
|
|
"""The response from the `Solid3dGetNextAdjacentEdge` command.""" # noqa: E501
|
|
|
|
data: Union[Unset, Solid3dGetNextAdjacentEdge] = UNSET
|
|
type: str = "solid3d_get_next_adjacent_edge"
|
|
|
|
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
|
|
|
def to_dict(self) -> Dict[str, Any]:
|
|
if not isinstance(self.data, Unset):
|
|
data = self.data
|
|
type = self.type
|
|
|
|
field_dict: Dict[str, Any] = {}
|
|
field_dict.update(self.additional_properties)
|
|
field_dict.update({})
|
|
if data is not UNSET:
|
|
field_dict["data"] = data.to_dict()
|
|
field_dict["type"] = type
|
|
|
|
return field_dict
|
|
|
|
@classmethod
|
|
def from_dict(cls: Type[XO], src_dict: Dict[str, Any]) -> XO:
|
|
d = src_dict.copy()
|
|
_data = d.pop("data", UNSET)
|
|
data: Union[Unset, Solid3dGetNextAdjacentEdge]
|
|
if isinstance(_data, Unset):
|
|
data = UNSET
|
|
else:
|
|
data = _data # type: ignore[arg-type]
|
|
|
|
type = d.pop("type", UNSET)
|
|
|
|
solid3d_get_next_adjacent_edge = cls(
|
|
data=data,
|
|
type=type,
|
|
)
|
|
|
|
solid3d_get_next_adjacent_edge.additional_properties = d
|
|
return solid3d_get_next_adjacent_edge
|
|
|
|
@property
|
|
def additional_keys(self) -> List[str]:
|
|
return list(self.additional_properties.keys())
|
|
|
|
def __getitem__(self, key: str) -> Any:
|
|
return self.additional_properties[key]
|
|
|
|
def __setitem__(self, key: str, value: Any) -> None:
|
|
self.additional_properties[key] = value
|
|
|
|
def __delitem__(self, key: str) -> None:
|
|
del self.additional_properties[key]
|
|
|
|
def __contains__(self, key: str) -> bool:
|
|
return key in self.additional_properties
|
|
|
|
|
|
LN = TypeVar("LN", bound="mouse_click")
|
|
|
|
|
|
@attr.s(auto_attribs=True)
|
|
class mouse_click:
|
|
"""The response from the `MouseClick` command.""" # noqa: E501
|
|
|
|
data: Union[Unset, MouseClick] = UNSET
|
|
type: str = "mouse_click"
|
|
|
|
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
|
|
|
def to_dict(self) -> Dict[str, Any]:
|
|
if not isinstance(self.data, Unset):
|
|
data = self.data
|
|
type = self.type
|
|
|
|
field_dict: Dict[str, Any] = {}
|
|
field_dict.update(self.additional_properties)
|
|
field_dict.update({})
|
|
if data is not UNSET:
|
|
field_dict["data"] = data.to_dict()
|
|
field_dict["type"] = type
|
|
|
|
return field_dict
|
|
|
|
@classmethod
|
|
def from_dict(cls: Type[LN], src_dict: Dict[str, Any]) -> LN:
|
|
d = src_dict.copy()
|
|
_data = d.pop("data", UNSET)
|
|
data: Union[Unset, MouseClick]
|
|
if isinstance(_data, Unset):
|
|
data = UNSET
|
|
else:
|
|
data = _data # type: ignore[arg-type]
|
|
|
|
type = d.pop("type", UNSET)
|
|
|
|
mouse_click = cls(
|
|
data=data,
|
|
type=type,
|
|
)
|
|
|
|
mouse_click.additional_properties = d
|
|
return mouse_click
|
|
|
|
@property
|
|
def additional_keys(self) -> List[str]:
|
|
return list(self.additional_properties.keys())
|
|
|
|
def __getitem__(self, key: str) -> Any:
|
|
return self.additional_properties[key]
|
|
|
|
def __setitem__(self, key: str, value: Any) -> None:
|
|
self.additional_properties[key] = value
|
|
|
|
def __delitem__(self, key: str) -> None:
|
|
del self.additional_properties[key]
|
|
|
|
def __contains__(self, key: str) -> bool:
|
|
return key in self.additional_properties
|
|
|
|
|
|
KR = TypeVar("KR", bound="curve_get_type")
|
|
|
|
|
|
@attr.s(auto_attribs=True)
|
|
class curve_get_type:
|
|
"""The response from the `CurveGetType` command.""" # noqa: E501
|
|
|
|
data: Union[Unset, CurveGetType] = UNSET
|
|
type: str = "curve_get_type"
|
|
|
|
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
|
|
|
def to_dict(self) -> Dict[str, Any]:
|
|
if not isinstance(self.data, Unset):
|
|
data = self.data
|
|
type = self.type
|
|
|
|
field_dict: Dict[str, Any] = {}
|
|
field_dict.update(self.additional_properties)
|
|
field_dict.update({})
|
|
if data is not UNSET:
|
|
field_dict["data"] = data.to_dict()
|
|
field_dict["type"] = type
|
|
|
|
return field_dict
|
|
|
|
@classmethod
|
|
def from_dict(cls: Type[KR], src_dict: Dict[str, Any]) -> KR:
|
|
d = src_dict.copy()
|
|
_data = d.pop("data", UNSET)
|
|
data: Union[Unset, CurveGetType]
|
|
if isinstance(_data, Unset):
|
|
data = UNSET
|
|
else:
|
|
data = _data # type: ignore[arg-type]
|
|
|
|
type = d.pop("type", UNSET)
|
|
|
|
curve_get_type = cls(
|
|
data=data,
|
|
type=type,
|
|
)
|
|
|
|
curve_get_type.additional_properties = d
|
|
return curve_get_type
|
|
|
|
@property
|
|
def additional_keys(self) -> List[str]:
|
|
return list(self.additional_properties.keys())
|
|
|
|
def __getitem__(self, key: str) -> Any:
|
|
return self.additional_properties[key]
|
|
|
|
def __setitem__(self, key: str, value: Any) -> None:
|
|
self.additional_properties[key] = value
|
|
|
|
def __delitem__(self, key: str) -> None:
|
|
del self.additional_properties[key]
|
|
|
|
def __contains__(self, key: str) -> bool:
|
|
return key in self.additional_properties
|
|
|
|
|
|
MG = TypeVar("MG", bound="curve_get_control_points")
|
|
|
|
|
|
@attr.s(auto_attribs=True)
|
|
class curve_get_control_points:
|
|
"""The response from the `CurveGetControlPoints` command.""" # noqa: E501
|
|
|
|
data: Union[Unset, CurveGetControlPoints] = UNSET
|
|
type: str = "curve_get_control_points"
|
|
|
|
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
|
|
|
def to_dict(self) -> Dict[str, Any]:
|
|
if not isinstance(self.data, Unset):
|
|
data = self.data
|
|
type = self.type
|
|
|
|
field_dict: Dict[str, Any] = {}
|
|
field_dict.update(self.additional_properties)
|
|
field_dict.update({})
|
|
if data is not UNSET:
|
|
field_dict["data"] = data.to_dict()
|
|
field_dict["type"] = type
|
|
|
|
return field_dict
|
|
|
|
@classmethod
|
|
def from_dict(cls: Type[MG], src_dict: Dict[str, Any]) -> MG:
|
|
d = src_dict.copy()
|
|
_data = d.pop("data", UNSET)
|
|
data: Union[Unset, CurveGetControlPoints]
|
|
if isinstance(_data, Unset):
|
|
data = UNSET
|
|
else:
|
|
data = _data # type: ignore[arg-type]
|
|
|
|
type = d.pop("type", UNSET)
|
|
|
|
curve_get_control_points = cls(
|
|
data=data,
|
|
type=type,
|
|
)
|
|
|
|
curve_get_control_points.additional_properties = d
|
|
return curve_get_control_points
|
|
|
|
@property
|
|
def additional_keys(self) -> List[str]:
|
|
return list(self.additional_properties.keys())
|
|
|
|
def __getitem__(self, key: str) -> Any:
|
|
return self.additional_properties[key]
|
|
|
|
def __setitem__(self, key: str, value: Any) -> None:
|
|
self.additional_properties[key] = value
|
|
|
|
def __delitem__(self, key: str) -> None:
|
|
del self.additional_properties[key]
|
|
|
|
def __contains__(self, key: str) -> bool:
|
|
return key in self.additional_properties
|
|
|
|
|
|
UE = TypeVar("UE", bound="take_snapshot")
|
|
|
|
|
|
@attr.s(auto_attribs=True)
|
|
class take_snapshot:
|
|
"""The response from the `Take Snapshot` command.""" # noqa: E501
|
|
|
|
data: Union[Unset, TakeSnapshot] = UNSET
|
|
type: str = "take_snapshot"
|
|
|
|
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
|
|
|
def to_dict(self) -> Dict[str, Any]:
|
|
if not isinstance(self.data, Unset):
|
|
data = self.data
|
|
type = self.type
|
|
|
|
field_dict: Dict[str, Any] = {}
|
|
field_dict.update(self.additional_properties)
|
|
field_dict.update({})
|
|
if data is not UNSET:
|
|
field_dict["data"] = data.to_dict()
|
|
field_dict["type"] = type
|
|
|
|
return field_dict
|
|
|
|
@classmethod
|
|
def from_dict(cls: Type[UE], src_dict: Dict[str, Any]) -> UE:
|
|
d = src_dict.copy()
|
|
_data = d.pop("data", UNSET)
|
|
data: Union[Unset, TakeSnapshot]
|
|
if isinstance(_data, Unset):
|
|
data = UNSET
|
|
else:
|
|
data = _data # type: ignore[arg-type]
|
|
|
|
type = d.pop("type", UNSET)
|
|
|
|
take_snapshot = cls(
|
|
data=data,
|
|
type=type,
|
|
)
|
|
|
|
take_snapshot.additional_properties = d
|
|
return take_snapshot
|
|
|
|
@property
|
|
def additional_keys(self) -> List[str]:
|
|
return list(self.additional_properties.keys())
|
|
|
|
def __getitem__(self, key: str) -> Any:
|
|
return self.additional_properties[key]
|
|
|
|
def __setitem__(self, key: str, value: Any) -> None:
|
|
self.additional_properties[key] = value
|
|
|
|
def __delitem__(self, key: str) -> None:
|
|
del self.additional_properties[key]
|
|
|
|
def __contains__(self, key: str) -> bool:
|
|
return key in self.additional_properties
|
|
|
|
|
|
BF = TypeVar("BF", bound="path_get_info")
|
|
|
|
|
|
@attr.s(auto_attribs=True)
|
|
class path_get_info:
|
|
"""The response from the `Path Get Info` command.""" # noqa: E501
|
|
|
|
data: Union[Unset, PathGetInfo] = UNSET
|
|
type: str = "path_get_info"
|
|
|
|
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
|
|
|
def to_dict(self) -> Dict[str, Any]:
|
|
if not isinstance(self.data, Unset):
|
|
data = self.data
|
|
type = self.type
|
|
|
|
field_dict: Dict[str, Any] = {}
|
|
field_dict.update(self.additional_properties)
|
|
field_dict.update({})
|
|
if data is not UNSET:
|
|
field_dict["data"] = data.to_dict()
|
|
field_dict["type"] = type
|
|
|
|
return field_dict
|
|
|
|
@classmethod
|
|
def from_dict(cls: Type[BF], src_dict: Dict[str, Any]) -> BF:
|
|
d = src_dict.copy()
|
|
_data = d.pop("data", UNSET)
|
|
data: Union[Unset, PathGetInfo]
|
|
if isinstance(_data, Unset):
|
|
data = UNSET
|
|
else:
|
|
data = _data # type: ignore[arg-type]
|
|
|
|
type = d.pop("type", UNSET)
|
|
|
|
path_get_info = cls(
|
|
data=data,
|
|
type=type,
|
|
)
|
|
|
|
path_get_info.additional_properties = d
|
|
return path_get_info
|
|
|
|
@property
|
|
def additional_keys(self) -> List[str]:
|
|
return list(self.additional_properties.keys())
|
|
|
|
def __getitem__(self, key: str) -> Any:
|
|
return self.additional_properties[key]
|
|
|
|
def __setitem__(self, key: str, value: Any) -> None:
|
|
self.additional_properties[key] = value
|
|
|
|
def __delitem__(self, key: str) -> None:
|
|
del self.additional_properties[key]
|
|
|
|
def __contains__(self, key: str) -> bool:
|
|
return key in self.additional_properties
|
|
|
|
|
|
UU = TypeVar("UU", bound="path_get_curve_uuids_for_vertices")
|
|
|
|
|
|
@attr.s(auto_attribs=True)
|
|
class path_get_curve_uuids_for_vertices:
|
|
"""The response from the `Path Get Curve UUIDs for Vertices` command.""" # noqa: E501
|
|
|
|
data: Union[Unset, PathGetCurveUuidsForVertices] = UNSET
|
|
type: str = "path_get_curve_uuids_for_vertices"
|
|
|
|
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
|
|
|
def to_dict(self) -> Dict[str, Any]:
|
|
if not isinstance(self.data, Unset):
|
|
data = self.data
|
|
type = self.type
|
|
|
|
field_dict: Dict[str, Any] = {}
|
|
field_dict.update(self.additional_properties)
|
|
field_dict.update({})
|
|
if data is not UNSET:
|
|
field_dict["data"] = data.to_dict()
|
|
field_dict["type"] = type
|
|
|
|
return field_dict
|
|
|
|
@classmethod
|
|
def from_dict(cls: Type[UU], src_dict: Dict[str, Any]) -> UU:
|
|
d = src_dict.copy()
|
|
_data = d.pop("data", UNSET)
|
|
data: Union[Unset, PathGetCurveUuidsForVertices]
|
|
if isinstance(_data, Unset):
|
|
data = UNSET
|
|
else:
|
|
data = _data # type: ignore[arg-type]
|
|
|
|
type = d.pop("type", UNSET)
|
|
|
|
path_get_curve_uuids_for_vertices = cls(
|
|
data=data,
|
|
type=type,
|
|
)
|
|
|
|
path_get_curve_uuids_for_vertices.additional_properties = d
|
|
return path_get_curve_uuids_for_vertices
|
|
|
|
@property
|
|
def additional_keys(self) -> List[str]:
|
|
return list(self.additional_properties.keys())
|
|
|
|
def __getitem__(self, key: str) -> Any:
|
|
return self.additional_properties[key]
|
|
|
|
def __setitem__(self, key: str, value: Any) -> None:
|
|
self.additional_properties[key] = value
|
|
|
|
def __delitem__(self, key: str) -> None:
|
|
del self.additional_properties[key]
|
|
|
|
def __contains__(self, key: str) -> bool:
|
|
return key in self.additional_properties
|
|
|
|
|
|
MB = TypeVar("MB", bound="path_get_vertex_uuids")
|
|
|
|
|
|
@attr.s(auto_attribs=True)
|
|
class path_get_vertex_uuids:
|
|
"""The response from the `Path Get Vertex UUIDs` command.""" # noqa: E501
|
|
|
|
data: Union[Unset, PathGetVertexUuids] = UNSET
|
|
type: str = "path_get_vertex_uuids"
|
|
|
|
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
|
|
|
def to_dict(self) -> Dict[str, Any]:
|
|
if not isinstance(self.data, Unset):
|
|
data = self.data
|
|
type = self.type
|
|
|
|
field_dict: Dict[str, Any] = {}
|
|
field_dict.update(self.additional_properties)
|
|
field_dict.update({})
|
|
if data is not UNSET:
|
|
field_dict["data"] = data.to_dict()
|
|
field_dict["type"] = type
|
|
|
|
return field_dict
|
|
|
|
@classmethod
|
|
def from_dict(cls: Type[MB], src_dict: Dict[str, Any]) -> MB:
|
|
d = src_dict.copy()
|
|
_data = d.pop("data", UNSET)
|
|
data: Union[Unset, PathGetVertexUuids]
|
|
if isinstance(_data, Unset):
|
|
data = UNSET
|
|
else:
|
|
data = _data # type: ignore[arg-type]
|
|
|
|
type = d.pop("type", UNSET)
|
|
|
|
path_get_vertex_uuids = cls(
|
|
data=data,
|
|
type=type,
|
|
)
|
|
|
|
path_get_vertex_uuids.additional_properties = d
|
|
return path_get_vertex_uuids
|
|
|
|
@property
|
|
def additional_keys(self) -> List[str]:
|
|
return list(self.additional_properties.keys())
|
|
|
|
def __getitem__(self, key: str) -> Any:
|
|
return self.additional_properties[key]
|
|
|
|
def __setitem__(self, key: str, value: Any) -> None:
|
|
self.additional_properties[key] = value
|
|
|
|
def __delitem__(self, key: str) -> None:
|
|
del self.additional_properties[key]
|
|
|
|
def __contains__(self, key: str) -> bool:
|
|
return key in self.additional_properties
|
|
|
|
|
|
TB = TypeVar("TB", bound="plane_intersect_and_project")
|
|
|
|
|
|
@attr.s(auto_attribs=True)
|
|
class plane_intersect_and_project:
|
|
"""The response from the `PlaneIntersectAndProject` command.""" # noqa: E501
|
|
|
|
data: Union[Unset, PlaneIntersectAndProject] = UNSET
|
|
type: str = "plane_intersect_and_project"
|
|
|
|
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
|
|
|
def to_dict(self) -> Dict[str, Any]:
|
|
if not isinstance(self.data, Unset):
|
|
data = self.data
|
|
type = self.type
|
|
|
|
field_dict: Dict[str, Any] = {}
|
|
field_dict.update(self.additional_properties)
|
|
field_dict.update({})
|
|
if data is not UNSET:
|
|
field_dict["data"] = data.to_dict()
|
|
field_dict["type"] = type
|
|
|
|
return field_dict
|
|
|
|
@classmethod
|
|
def from_dict(cls: Type[TB], src_dict: Dict[str, Any]) -> TB:
|
|
d = src_dict.copy()
|
|
_data = d.pop("data", UNSET)
|
|
data: Union[Unset, PlaneIntersectAndProject]
|
|
if isinstance(_data, Unset):
|
|
data = UNSET
|
|
else:
|
|
data = _data # type: ignore[arg-type]
|
|
|
|
type = d.pop("type", UNSET)
|
|
|
|
plane_intersect_and_project = cls(
|
|
data=data,
|
|
type=type,
|
|
)
|
|
|
|
plane_intersect_and_project.additional_properties = d
|
|
return plane_intersect_and_project
|
|
|
|
@property
|
|
def additional_keys(self) -> List[str]:
|
|
return list(self.additional_properties.keys())
|
|
|
|
def __getitem__(self, key: str) -> Any:
|
|
return self.additional_properties[key]
|
|
|
|
def __setitem__(self, key: str, value: Any) -> None:
|
|
self.additional_properties[key] = value
|
|
|
|
def __delitem__(self, key: str) -> None:
|
|
del self.additional_properties[key]
|
|
|
|
def __contains__(self, key: str) -> bool:
|
|
return key in self.additional_properties
|
|
|
|
|
|
FJ = TypeVar("FJ", bound="curve_get_end_points")
|
|
|
|
|
|
@attr.s(auto_attribs=True)
|
|
class curve_get_end_points:
|
|
"""The response from the `CurveGetEndPoints` command.""" # noqa: E501
|
|
|
|
data: Union[Unset, CurveGetEndPoints] = UNSET
|
|
type: str = "curve_get_end_points"
|
|
|
|
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
|
|
|
def to_dict(self) -> Dict[str, Any]:
|
|
if not isinstance(self.data, Unset):
|
|
data = self.data
|
|
type = self.type
|
|
|
|
field_dict: Dict[str, Any] = {}
|
|
field_dict.update(self.additional_properties)
|
|
field_dict.update({})
|
|
if data is not UNSET:
|
|
field_dict["data"] = data.to_dict()
|
|
field_dict["type"] = type
|
|
|
|
return field_dict
|
|
|
|
@classmethod
|
|
def from_dict(cls: Type[FJ], src_dict: Dict[str, Any]) -> FJ:
|
|
d = src_dict.copy()
|
|
_data = d.pop("data", UNSET)
|
|
data: Union[Unset, CurveGetEndPoints]
|
|
if isinstance(_data, Unset):
|
|
data = UNSET
|
|
else:
|
|
data = _data # type: ignore[arg-type]
|
|
|
|
type = d.pop("type", UNSET)
|
|
|
|
curve_get_end_points = cls(
|
|
data=data,
|
|
type=type,
|
|
)
|
|
|
|
curve_get_end_points.additional_properties = d
|
|
return curve_get_end_points
|
|
|
|
@property
|
|
def additional_keys(self) -> List[str]:
|
|
return list(self.additional_properties.keys())
|
|
|
|
def __getitem__(self, key: str) -> Any:
|
|
return self.additional_properties[key]
|
|
|
|
def __setitem__(self, key: str, value: Any) -> None:
|
|
self.additional_properties[key] = value
|
|
|
|
def __delitem__(self, key: str) -> None:
|
|
del self.additional_properties[key]
|
|
|
|
def __contains__(self, key: str) -> bool:
|
|
return key in self.additional_properties
|
|
|
|
|
|
HB = TypeVar("HB", bound="import_files")
|
|
|
|
|
|
@attr.s(auto_attribs=True)
|
|
class import_files:
|
|
"""The response from the `ImportFiles` command.""" # noqa: E501
|
|
|
|
data: Union[Unset, ImportFiles] = UNSET
|
|
type: str = "import_files"
|
|
|
|
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
|
|
|
def to_dict(self) -> Dict[str, Any]:
|
|
if not isinstance(self.data, Unset):
|
|
data = self.data
|
|
type = self.type
|
|
|
|
field_dict: Dict[str, Any] = {}
|
|
field_dict.update(self.additional_properties)
|
|
field_dict.update({})
|
|
if data is not UNSET:
|
|
field_dict["data"] = data.to_dict()
|
|
field_dict["type"] = type
|
|
|
|
return field_dict
|
|
|
|
@classmethod
|
|
def from_dict(cls: Type[HB], src_dict: Dict[str, Any]) -> HB:
|
|
d = src_dict.copy()
|
|
_data = d.pop("data", UNSET)
|
|
data: Union[Unset, ImportFiles]
|
|
if isinstance(_data, Unset):
|
|
data = UNSET
|
|
else:
|
|
data = _data # type: ignore[arg-type]
|
|
|
|
type = d.pop("type", UNSET)
|
|
|
|
import_files = cls(
|
|
data=data,
|
|
type=type,
|
|
)
|
|
|
|
import_files.additional_properties = d
|
|
return import_files
|
|
|
|
@property
|
|
def additional_keys(self) -> List[str]:
|
|
return list(self.additional_properties.keys())
|
|
|
|
def __getitem__(self, key: str) -> Any:
|
|
return self.additional_properties[key]
|
|
|
|
def __setitem__(self, key: str, value: Any) -> None:
|
|
self.additional_properties[key] = value
|
|
|
|
def __delitem__(self, key: str) -> None:
|
|
del self.additional_properties[key]
|
|
|
|
def __contains__(self, key: str) -> bool:
|
|
return key in self.additional_properties
|
|
|
|
|
|
SF = TypeVar("SF", bound="mass")
|
|
|
|
|
|
@attr.s(auto_attribs=True)
|
|
class mass:
|
|
"""The response from the `Mass` command.""" # noqa: E501
|
|
|
|
data: Union[Unset, Mass] = UNSET
|
|
type: str = "mass"
|
|
|
|
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
|
|
|
def to_dict(self) -> Dict[str, Any]:
|
|
if not isinstance(self.data, Unset):
|
|
data = self.data
|
|
type = self.type
|
|
|
|
field_dict: Dict[str, Any] = {}
|
|
field_dict.update(self.additional_properties)
|
|
field_dict.update({})
|
|
if data is not UNSET:
|
|
field_dict["data"] = data.to_dict()
|
|
field_dict["type"] = type
|
|
|
|
return field_dict
|
|
|
|
@classmethod
|
|
def from_dict(cls: Type[SF], src_dict: Dict[str, Any]) -> SF:
|
|
d = src_dict.copy()
|
|
_data = d.pop("data", UNSET)
|
|
data: Union[Unset, Mass]
|
|
if isinstance(_data, Unset):
|
|
data = UNSET
|
|
else:
|
|
data = _data # type: ignore[arg-type]
|
|
|
|
type = d.pop("type", UNSET)
|
|
|
|
mass = cls(
|
|
data=data,
|
|
type=type,
|
|
)
|
|
|
|
mass.additional_properties = d
|
|
return mass
|
|
|
|
@property
|
|
def additional_keys(self) -> List[str]:
|
|
return list(self.additional_properties.keys())
|
|
|
|
def __getitem__(self, key: str) -> Any:
|
|
return self.additional_properties[key]
|
|
|
|
def __setitem__(self, key: str, value: Any) -> None:
|
|
self.additional_properties[key] = value
|
|
|
|
def __delitem__(self, key: str) -> None:
|
|
del self.additional_properties[key]
|
|
|
|
def __contains__(self, key: str) -> bool:
|
|
return key in self.additional_properties
|
|
|
|
|
|
DU = TypeVar("DU", bound="volume")
|
|
|
|
|
|
@attr.s(auto_attribs=True)
|
|
class volume:
|
|
"""The response from the `Volume` command.""" # noqa: E501
|
|
|
|
data: Union[Unset, Volume] = UNSET
|
|
type: str = "volume"
|
|
|
|
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
|
|
|
def to_dict(self) -> Dict[str, Any]:
|
|
if not isinstance(self.data, Unset):
|
|
data = self.data
|
|
type = self.type
|
|
|
|
field_dict: Dict[str, Any] = {}
|
|
field_dict.update(self.additional_properties)
|
|
field_dict.update({})
|
|
if data is not UNSET:
|
|
field_dict["data"] = data.to_dict()
|
|
field_dict["type"] = type
|
|
|
|
return field_dict
|
|
|
|
@classmethod
|
|
def from_dict(cls: Type[DU], src_dict: Dict[str, Any]) -> DU:
|
|
d = src_dict.copy()
|
|
_data = d.pop("data", UNSET)
|
|
data: Union[Unset, Volume]
|
|
if isinstance(_data, Unset):
|
|
data = UNSET
|
|
else:
|
|
data = _data # type: ignore[arg-type]
|
|
|
|
type = d.pop("type", UNSET)
|
|
|
|
volume = cls(
|
|
data=data,
|
|
type=type,
|
|
)
|
|
|
|
volume.additional_properties = d
|
|
return volume
|
|
|
|
@property
|
|
def additional_keys(self) -> List[str]:
|
|
return list(self.additional_properties.keys())
|
|
|
|
def __getitem__(self, key: str) -> Any:
|
|
return self.additional_properties[key]
|
|
|
|
def __setitem__(self, key: str, value: Any) -> None:
|
|
self.additional_properties[key] = value
|
|
|
|
def __delitem__(self, key: str) -> None:
|
|
del self.additional_properties[key]
|
|
|
|
def __contains__(self, key: str) -> bool:
|
|
return key in self.additional_properties
|
|
|
|
|
|
BM = TypeVar("BM", bound="density")
|
|
|
|
|
|
@attr.s(auto_attribs=True)
|
|
class density:
|
|
"""The response from the `Density` command.""" # noqa: E501
|
|
|
|
data: Union[Unset, Density] = UNSET
|
|
type: str = "density"
|
|
|
|
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
|
|
|
def to_dict(self) -> Dict[str, Any]:
|
|
if not isinstance(self.data, Unset):
|
|
data = self.data
|
|
type = self.type
|
|
|
|
field_dict: Dict[str, Any] = {}
|
|
field_dict.update(self.additional_properties)
|
|
field_dict.update({})
|
|
if data is not UNSET:
|
|
field_dict["data"] = data.to_dict()
|
|
field_dict["type"] = type
|
|
|
|
return field_dict
|
|
|
|
@classmethod
|
|
def from_dict(cls: Type[BM], src_dict: Dict[str, Any]) -> BM:
|
|
d = src_dict.copy()
|
|
_data = d.pop("data", UNSET)
|
|
data: Union[Unset, Density]
|
|
if isinstance(_data, Unset):
|
|
data = UNSET
|
|
else:
|
|
data = _data # type: ignore[arg-type]
|
|
|
|
type = d.pop("type", UNSET)
|
|
|
|
density = cls(
|
|
data=data,
|
|
type=type,
|
|
)
|
|
|
|
density.additional_properties = d
|
|
return density
|
|
|
|
@property
|
|
def additional_keys(self) -> List[str]:
|
|
return list(self.additional_properties.keys())
|
|
|
|
def __getitem__(self, key: str) -> Any:
|
|
return self.additional_properties[key]
|
|
|
|
def __setitem__(self, key: str, value: Any) -> None:
|
|
self.additional_properties[key] = value
|
|
|
|
def __delitem__(self, key: str) -> None:
|
|
del self.additional_properties[key]
|
|
|
|
def __contains__(self, key: str) -> bool:
|
|
return key in self.additional_properties
|
|
|
|
|
|
TY = TypeVar("TY", bound="surface_area")
|
|
|
|
|
|
@attr.s(auto_attribs=True)
|
|
class surface_area:
|
|
"""The response from the `SurfaceArea` command.""" # noqa: E501
|
|
|
|
data: Union[Unset, SurfaceArea] = UNSET
|
|
type: str = "surface_area"
|
|
|
|
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
|
|
|
def to_dict(self) -> Dict[str, Any]:
|
|
if not isinstance(self.data, Unset):
|
|
data = self.data
|
|
type = self.type
|
|
|
|
field_dict: Dict[str, Any] = {}
|
|
field_dict.update(self.additional_properties)
|
|
field_dict.update({})
|
|
if data is not UNSET:
|
|
field_dict["data"] = data.to_dict()
|
|
field_dict["type"] = type
|
|
|
|
return field_dict
|
|
|
|
@classmethod
|
|
def from_dict(cls: Type[TY], src_dict: Dict[str, Any]) -> TY:
|
|
d = src_dict.copy()
|
|
_data = d.pop("data", UNSET)
|
|
data: Union[Unset, SurfaceArea]
|
|
if isinstance(_data, Unset):
|
|
data = UNSET
|
|
else:
|
|
data = _data # type: ignore[arg-type]
|
|
|
|
type = d.pop("type", UNSET)
|
|
|
|
surface_area = cls(
|
|
data=data,
|
|
type=type,
|
|
)
|
|
|
|
surface_area.additional_properties = d
|
|
return surface_area
|
|
|
|
@property
|
|
def additional_keys(self) -> List[str]:
|
|
return list(self.additional_properties.keys())
|
|
|
|
def __getitem__(self, key: str) -> Any:
|
|
return self.additional_properties[key]
|
|
|
|
def __setitem__(self, key: str, value: Any) -> None:
|
|
self.additional_properties[key] = value
|
|
|
|
def __delitem__(self, key: str) -> None:
|
|
del self.additional_properties[key]
|
|
|
|
def __contains__(self, key: str) -> bool:
|
|
return key in self.additional_properties
|
|
|
|
|
|
NC = TypeVar("NC", bound="center_of_mass")
|
|
|
|
|
|
@attr.s(auto_attribs=True)
|
|
class center_of_mass:
|
|
"""The response from the `CenterOfMass` command.""" # noqa: E501
|
|
|
|
data: Union[Unset, CenterOfMass] = UNSET
|
|
type: str = "center_of_mass"
|
|
|
|
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
|
|
|
def to_dict(self) -> Dict[str, Any]:
|
|
if not isinstance(self.data, Unset):
|
|
data = self.data
|
|
type = self.type
|
|
|
|
field_dict: Dict[str, Any] = {}
|
|
field_dict.update(self.additional_properties)
|
|
field_dict.update({})
|
|
if data is not UNSET:
|
|
field_dict["data"] = data.to_dict()
|
|
field_dict["type"] = type
|
|
|
|
return field_dict
|
|
|
|
@classmethod
|
|
def from_dict(cls: Type[NC], src_dict: Dict[str, Any]) -> NC:
|
|
d = src_dict.copy()
|
|
_data = d.pop("data", UNSET)
|
|
data: Union[Unset, CenterOfMass]
|
|
if isinstance(_data, Unset):
|
|
data = UNSET
|
|
else:
|
|
data = _data # type: ignore[arg-type]
|
|
|
|
type = d.pop("type", UNSET)
|
|
|
|
center_of_mass = cls(
|
|
data=data,
|
|
type=type,
|
|
)
|
|
|
|
center_of_mass.additional_properties = d
|
|
return center_of_mass
|
|
|
|
@property
|
|
def additional_keys(self) -> List[str]:
|
|
return list(self.additional_properties.keys())
|
|
|
|
def __getitem__(self, key: str) -> Any:
|
|
return self.additional_properties[key]
|
|
|
|
def __setitem__(self, key: str, value: Any) -> None:
|
|
self.additional_properties[key] = value
|
|
|
|
def __delitem__(self, key: str) -> None:
|
|
del self.additional_properties[key]
|
|
|
|
def __contains__(self, key: str) -> bool:
|
|
return key in self.additional_properties
|
|
|
|
|
|
GP = TypeVar("GP", bound="get_sketch_mode_plane")
|
|
|
|
|
|
@attr.s(auto_attribs=True)
|
|
class get_sketch_mode_plane:
|
|
"""The response from the `GetSketchModePlane` command.""" # noqa: E501
|
|
|
|
data: Union[Unset, GetSketchModePlane] = UNSET
|
|
type: str = "get_sketch_mode_plane"
|
|
|
|
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
|
|
|
def to_dict(self) -> Dict[str, Any]:
|
|
if not isinstance(self.data, Unset):
|
|
data = self.data
|
|
type = self.type
|
|
|
|
field_dict: Dict[str, Any] = {}
|
|
field_dict.update(self.additional_properties)
|
|
field_dict.update({})
|
|
if data is not UNSET:
|
|
field_dict["data"] = data.to_dict()
|
|
field_dict["type"] = type
|
|
|
|
return field_dict
|
|
|
|
@classmethod
|
|
def from_dict(cls: Type[GP], src_dict: Dict[str, Any]) -> GP:
|
|
d = src_dict.copy()
|
|
_data = d.pop("data", UNSET)
|
|
data: Union[Unset, GetSketchModePlane]
|
|
if isinstance(_data, Unset):
|
|
data = UNSET
|
|
else:
|
|
data = _data # type: ignore[arg-type]
|
|
|
|
type = d.pop("type", UNSET)
|
|
|
|
get_sketch_mode_plane = cls(
|
|
data=data,
|
|
type=type,
|
|
)
|
|
|
|
get_sketch_mode_plane.additional_properties = d
|
|
return get_sketch_mode_plane
|
|
|
|
@property
|
|
def additional_keys(self) -> List[str]:
|
|
return list(self.additional_properties.keys())
|
|
|
|
def __getitem__(self, key: str) -> Any:
|
|
return self.additional_properties[key]
|
|
|
|
def __setitem__(self, key: str, value: Any) -> None:
|
|
self.additional_properties[key] = value
|
|
|
|
def __delitem__(self, key: str) -> None:
|
|
del self.additional_properties[key]
|
|
|
|
def __contains__(self, key: str) -> bool:
|
|
return key in self.additional_properties
|
|
|
|
|
|
class OkModelingCmdResponse:
|
|
|
|
"""A successful response from a modeling command. This can be one of several types of responses, depending on the command."""
|
|
|
|
type: Union[
|
|
empty,
|
|
export,
|
|
select_with_point,
|
|
highlight_set_entity,
|
|
entity_get_child_uuid,
|
|
entity_get_num_children,
|
|
entity_get_parent_id,
|
|
entity_get_all_child_uuids,
|
|
select_get,
|
|
get_entity_type,
|
|
solid3d_get_all_edge_faces,
|
|
solid3d_get_all_opposite_edges,
|
|
solid3d_get_opposite_edge,
|
|
solid3d_get_prev_adjacent_edge,
|
|
solid3d_get_next_adjacent_edge,
|
|
mouse_click,
|
|
curve_get_type,
|
|
curve_get_control_points,
|
|
take_snapshot,
|
|
path_get_info,
|
|
path_get_curve_uuids_for_vertices,
|
|
path_get_vertex_uuids,
|
|
plane_intersect_and_project,
|
|
curve_get_end_points,
|
|
import_files,
|
|
mass,
|
|
volume,
|
|
density,
|
|
surface_area,
|
|
center_of_mass,
|
|
get_sketch_mode_plane,
|
|
] = None
|
|
|
|
def __init__(
|
|
self,
|
|
type: Union[
|
|
type(empty),
|
|
type(export),
|
|
type(select_with_point),
|
|
type(highlight_set_entity),
|
|
type(entity_get_child_uuid),
|
|
type(entity_get_num_children),
|
|
type(entity_get_parent_id),
|
|
type(entity_get_all_child_uuids),
|
|
type(select_get),
|
|
type(get_entity_type),
|
|
type(solid3d_get_all_edge_faces),
|
|
type(solid3d_get_all_opposite_edges),
|
|
type(solid3d_get_opposite_edge),
|
|
type(solid3d_get_prev_adjacent_edge),
|
|
type(solid3d_get_next_adjacent_edge),
|
|
type(mouse_click),
|
|
type(curve_get_type),
|
|
type(curve_get_control_points),
|
|
type(take_snapshot),
|
|
type(path_get_info),
|
|
type(path_get_curve_uuids_for_vertices),
|
|
type(path_get_vertex_uuids),
|
|
type(plane_intersect_and_project),
|
|
type(curve_get_end_points),
|
|
type(import_files),
|
|
type(mass),
|
|
type(volume),
|
|
type(density),
|
|
type(surface_area),
|
|
type(center_of_mass),
|
|
type(get_sketch_mode_plane),
|
|
],
|
|
):
|
|
self.type = type
|
|
|
|
def to_dict(self) -> Dict[str, Any]:
|
|
if isinstance(self.type, empty):
|
|
n: empty = self.type
|
|
return n.to_dict()
|
|
elif isinstance(self.type, export):
|
|
n: export = self.type
|
|
return n.to_dict()
|
|
elif isinstance(self.type, select_with_point):
|
|
n: select_with_point = self.type
|
|
return n.to_dict()
|
|
elif isinstance(self.type, highlight_set_entity):
|
|
n: highlight_set_entity = self.type
|
|
return n.to_dict()
|
|
elif isinstance(self.type, entity_get_child_uuid):
|
|
n: entity_get_child_uuid = self.type
|
|
return n.to_dict()
|
|
elif isinstance(self.type, entity_get_num_children):
|
|
n: entity_get_num_children = self.type
|
|
return n.to_dict()
|
|
elif isinstance(self.type, entity_get_parent_id):
|
|
n: entity_get_parent_id = self.type
|
|
return n.to_dict()
|
|
elif isinstance(self.type, entity_get_all_child_uuids):
|
|
n: entity_get_all_child_uuids = self.type
|
|
return n.to_dict()
|
|
elif isinstance(self.type, select_get):
|
|
n: select_get = self.type
|
|
return n.to_dict()
|
|
elif isinstance(self.type, get_entity_type):
|
|
n: get_entity_type = self.type
|
|
return n.to_dict()
|
|
elif isinstance(self.type, solid3d_get_all_edge_faces):
|
|
n: solid3d_get_all_edge_faces = self.type
|
|
return n.to_dict()
|
|
elif isinstance(self.type, solid3d_get_all_opposite_edges):
|
|
n: solid3d_get_all_opposite_edges = self.type
|
|
return n.to_dict()
|
|
elif isinstance(self.type, solid3d_get_opposite_edge):
|
|
n: solid3d_get_opposite_edge = self.type
|
|
return n.to_dict()
|
|
elif isinstance(self.type, solid3d_get_prev_adjacent_edge):
|
|
n: solid3d_get_prev_adjacent_edge = self.type
|
|
return n.to_dict()
|
|
elif isinstance(self.type, solid3d_get_next_adjacent_edge):
|
|
n: solid3d_get_next_adjacent_edge = self.type
|
|
return n.to_dict()
|
|
elif isinstance(self.type, mouse_click):
|
|
n: mouse_click = self.type
|
|
return n.to_dict()
|
|
elif isinstance(self.type, curve_get_type):
|
|
n: curve_get_type = self.type
|
|
return n.to_dict()
|
|
elif isinstance(self.type, curve_get_control_points):
|
|
n: curve_get_control_points = self.type
|
|
return n.to_dict()
|
|
elif isinstance(self.type, take_snapshot):
|
|
n: take_snapshot = self.type
|
|
return n.to_dict()
|
|
elif isinstance(self.type, path_get_info):
|
|
n: path_get_info = self.type
|
|
return n.to_dict()
|
|
elif isinstance(self.type, path_get_curve_uuids_for_vertices):
|
|
n: path_get_curve_uuids_for_vertices = self.type
|
|
return n.to_dict()
|
|
elif isinstance(self.type, path_get_vertex_uuids):
|
|
n: path_get_vertex_uuids = self.type
|
|
return n.to_dict()
|
|
elif isinstance(self.type, plane_intersect_and_project):
|
|
n: plane_intersect_and_project = self.type
|
|
return n.to_dict()
|
|
elif isinstance(self.type, curve_get_end_points):
|
|
n: curve_get_end_points = self.type
|
|
return n.to_dict()
|
|
elif isinstance(self.type, import_files):
|
|
n: import_files = self.type
|
|
return n.to_dict()
|
|
elif isinstance(self.type, mass):
|
|
n: mass = self.type
|
|
return n.to_dict()
|
|
elif isinstance(self.type, volume):
|
|
n: volume = self.type
|
|
return n.to_dict()
|
|
elif isinstance(self.type, density):
|
|
n: density = self.type
|
|
return n.to_dict()
|
|
elif isinstance(self.type, surface_area):
|
|
n: surface_area = self.type
|
|
return n.to_dict()
|
|
elif isinstance(self.type, center_of_mass):
|
|
n: center_of_mass = self.type
|
|
return n.to_dict()
|
|
elif isinstance(self.type, get_sketch_mode_plane):
|
|
n: get_sketch_mode_plane = self.type
|
|
return n.to_dict()
|
|
|
|
raise Exception("Unknown type")
|
|
|
|
def from_dict(self, d) -> Self:
|
|
if d.get("type") == "empty":
|
|
n: empty = empty()
|
|
n.from_dict(d)
|
|
self.type = n
|
|
return Self
|
|
elif d.get("type") == "export":
|
|
n: export = export()
|
|
n.from_dict(d)
|
|
self.type = n
|
|
return self
|
|
elif d.get("type") == "select_with_point":
|
|
n: select_with_point = select_with_point()
|
|
n.from_dict(d)
|
|
self.type = n
|
|
return self
|
|
elif d.get("type") == "highlight_set_entity":
|
|
n: highlight_set_entity = highlight_set_entity()
|
|
n.from_dict(d)
|
|
self.type = n
|
|
return self
|
|
elif d.get("type") == "entity_get_child_uuid":
|
|
n: entity_get_child_uuid = entity_get_child_uuid()
|
|
n.from_dict(d)
|
|
self.type = n
|
|
return self
|
|
elif d.get("type") == "entity_get_num_children":
|
|
n: entity_get_num_children = entity_get_num_children()
|
|
n.from_dict(d)
|
|
self.type = n
|
|
return self
|
|
elif d.get("type") == "entity_get_parent_id":
|
|
n: entity_get_parent_id = entity_get_parent_id()
|
|
n.from_dict(d)
|
|
self.type = n
|
|
return self
|
|
elif d.get("type") == "entity_get_all_child_uuids":
|
|
n: entity_get_all_child_uuids = entity_get_all_child_uuids()
|
|
n.from_dict(d)
|
|
self.type = n
|
|
return self
|
|
elif d.get("type") == "select_get":
|
|
n: select_get = select_get()
|
|
n.from_dict(d)
|
|
self.type = n
|
|
return self
|
|
elif d.get("type") == "get_entity_type":
|
|
n: get_entity_type = get_entity_type()
|
|
n.from_dict(d)
|
|
self.type = n
|
|
return self
|
|
elif d.get("type") == "solid3d_get_all_edge_faces":
|
|
n: solid3d_get_all_edge_faces = solid3d_get_all_edge_faces()
|
|
n.from_dict(d)
|
|
self.type = n
|
|
return self
|
|
elif d.get("type") == "solid3d_get_all_opposite_edges":
|
|
n: solid3d_get_all_opposite_edges = solid3d_get_all_opposite_edges()
|
|
n.from_dict(d)
|
|
self.type = n
|
|
return self
|
|
elif d.get("type") == "solid3d_get_opposite_edge":
|
|
n: solid3d_get_opposite_edge = solid3d_get_opposite_edge()
|
|
n.from_dict(d)
|
|
self.type = n
|
|
return self
|
|
elif d.get("type") == "solid3d_get_prev_adjacent_edge":
|
|
n: solid3d_get_prev_adjacent_edge = solid3d_get_prev_adjacent_edge()
|
|
n.from_dict(d)
|
|
self.type = n
|
|
return self
|
|
elif d.get("type") == "solid3d_get_next_adjacent_edge":
|
|
n: solid3d_get_next_adjacent_edge = solid3d_get_next_adjacent_edge()
|
|
n.from_dict(d)
|
|
self.type = n
|
|
return self
|
|
elif d.get("type") == "mouse_click":
|
|
n: mouse_click = mouse_click()
|
|
n.from_dict(d)
|
|
self.type = n
|
|
return self
|
|
elif d.get("type") == "curve_get_type":
|
|
n: curve_get_type = curve_get_type()
|
|
n.from_dict(d)
|
|
self.type = n
|
|
return self
|
|
elif d.get("type") == "curve_get_control_points":
|
|
n: curve_get_control_points = curve_get_control_points()
|
|
n.from_dict(d)
|
|
self.type = n
|
|
return self
|
|
elif d.get("type") == "take_snapshot":
|
|
n: take_snapshot = take_snapshot()
|
|
n.from_dict(d)
|
|
self.type = n
|
|
return self
|
|
elif d.get("type") == "path_get_info":
|
|
n: path_get_info = path_get_info()
|
|
n.from_dict(d)
|
|
self.type = n
|
|
return self
|
|
elif d.get("type") == "path_get_curve_uuids_for_vertices":
|
|
n: path_get_curve_uuids_for_vertices = path_get_curve_uuids_for_vertices()
|
|
n.from_dict(d)
|
|
self.type = n
|
|
return self
|
|
elif d.get("type") == "path_get_vertex_uuids":
|
|
n: path_get_vertex_uuids = path_get_vertex_uuids()
|
|
n.from_dict(d)
|
|
self.type = n
|
|
return self
|
|
elif d.get("type") == "plane_intersect_and_project":
|
|
n: plane_intersect_and_project = plane_intersect_and_project()
|
|
n.from_dict(d)
|
|
self.type = n
|
|
return self
|
|
elif d.get("type") == "curve_get_end_points":
|
|
n: curve_get_end_points = curve_get_end_points()
|
|
n.from_dict(d)
|
|
self.type = n
|
|
return self
|
|
elif d.get("type") == "import_files":
|
|
n: import_files = import_files()
|
|
n.from_dict(d)
|
|
self.type = n
|
|
return self
|
|
elif d.get("type") == "mass":
|
|
n: mass = mass()
|
|
n.from_dict(d)
|
|
self.type = n
|
|
return self
|
|
elif d.get("type") == "volume":
|
|
n: volume = volume()
|
|
n.from_dict(d)
|
|
self.type = n
|
|
return self
|
|
elif d.get("type") == "density":
|
|
n: density = density()
|
|
n.from_dict(d)
|
|
self.type = n
|
|
return self
|
|
elif d.get("type") == "surface_area":
|
|
n: surface_area = surface_area()
|
|
n.from_dict(d)
|
|
self.type = n
|
|
return self
|
|
elif d.get("type") == "center_of_mass":
|
|
n: center_of_mass = center_of_mass()
|
|
n.from_dict(d)
|
|
self.type = n
|
|
return self
|
|
elif d.get("type") == "get_sketch_mode_plane":
|
|
n: get_sketch_mode_plane = get_sketch_mode_plane()
|
|
n.from_dict(d)
|
|
self.type = n
|
|
return self
|
|
|
|
raise Exception("Unknown type")
|