2024-07-28 15:21:51 -07:00
from typing import List , Literal , Optional , Union
2023-04-27 13:59:37 -07:00
2024-07-28 15:21:51 -07:00
from pydantic import BaseModel , ConfigDict , Field , RootModel
2023-11-29 10:32:31 -08:00
from typing_extensions import Annotated
2023-04-27 13:59:37 -07:00
2024-04-05 13:12:19 -07:00
from . . models . angle import Angle
2023-08-16 16:31:50 -07:00
from . . models . annotation_options import AnnotationOptions
from . . models . annotation_type import AnnotationType
2023-07-07 18:03:18 -07:00
from . . models . camera_drag_interaction_type import CameraDragInteractionType
2023-08-30 15:59:51 -07:00
from . . models . color import Color
2024-06-05 18:40:25 -07:00
from . . models . cut_type import CutType
2023-12-21 08:14:08 -08:00
from . . models . distance_type import DistanceType
2024-01-06 14:56:45 -08:00
from . . models . entity_type import EntityType
2023-08-30 15:59:51 -07:00
from . . models . image_format import ImageFormat
2023-11-28 23:50:50 -08:00
from . . models . import_file import ImportFile
2023-11-27 16:01:20 -08:00
from . . models . input_format import InputFormat
2024-02-24 17:03:55 -08:00
from . . models . length_unit import LengthUnit
2023-07-07 18:03:18 -07:00
from . . models . modeling_cmd_id import ModelingCmdId
2023-07-31 12:50:30 -07:00
from . . models . output_format import OutputFormat
2023-11-27 16:01:20 -08:00
from . . models . path_component_constraint_bound import PathComponentConstraintBound
from . . models . path_component_constraint_type import PathComponentConstraintType
2023-07-07 18:03:18 -07:00
from . . models . path_segment import PathSegment
2024-01-06 14:56:45 -08:00
from . . models . perspective_camera_parameters import PerspectiveCameraParameters
2023-05-23 14:24:13 -07:00
from . . models . point2d import Point2d
2023-07-07 18:03:18 -07:00
from . . models . point3d import Point3d
2023-08-16 16:31:50 -07:00
from . . models . scene_selection_type import SceneSelectionType
2023-08-30 15:59:51 -07:00
from . . models . scene_tool_type import SceneToolType
2024-09-10 09:17:32 -07:00
from . . models . transform import Transform
2023-09-29 15:51:03 -07:00
from . . models . unit_area import UnitArea
from . . models . unit_density import UnitDensity
from . . models . unit_length import UnitLength
from . . models . unit_mass import UnitMass
from . . models . unit_volume import UnitVolume
2023-04-27 13:59:37 -07:00
2023-11-27 16:01:20 -08:00
2023-11-28 23:50:50 -08:00
class start_path ( BaseModel ) :
2024-02-24 17:03:55 -08:00
""" Start a new path. """
2023-04-27 13:59:37 -07:00
2023-11-29 10:32:31 -08:00
type : Literal [ " start_path " ] = " start_path "
2023-08-30 15:59:51 -07:00
2024-01-06 18:32:21 -08:00
model_config = ConfigDict ( protected_namespaces = ( ) )
2023-08-30 15:59:51 -07:00
2023-11-28 23:50:50 -08:00
class move_path_pen ( BaseModel ) :
2024-09-10 09:17:32 -07:00
""" Move the path ' s \" pen \" . If you ' re in sketch mode, these coordinates are in the local coordinate system, not the world ' s coordinate system. For example, say you ' re sketching on the plane { x: (1,0,0), y: (0,1,0), origin: (0, 0, 50)}. In other words, the plane 50 units above the default XY plane. Then, moving the pen to (1, 1, 0) with this command uses local coordinates. So, it would move the pen to (1, 1, 50) in global coordinates. """
2023-09-29 16:05:40 -07:00
2023-11-28 23:50:50 -08:00
path : ModelingCmdId
2023-08-30 15:59:51 -07:00
2023-11-28 23:50:50 -08:00
to : Point3d
2023-08-30 15:59:51 -07:00
2023-11-29 10:32:31 -08:00
type : Literal [ " move_path_pen " ] = " move_path_pen "
2023-08-30 15:59:51 -07:00
2024-01-06 18:32:21 -08:00
model_config = ConfigDict ( protected_namespaces = ( ) )
2023-08-30 15:59:51 -07:00
2023-11-28 23:50:50 -08:00
class extend_path ( BaseModel ) :
2024-03-04 12:53:31 -08:00
""" Extend a path by adding a new segment which starts at the path ' s \" pen \" . If no \" pen \" location has been set before (via `MovePen`), then the pen is at the origin. """
2023-08-30 15:59:51 -07:00
2023-11-28 23:50:50 -08:00
path : ModelingCmdId
2023-08-30 15:59:51 -07:00
2023-11-28 23:50:50 -08:00
segment : PathSegment
2023-08-30 15:59:51 -07:00
2023-11-29 10:32:31 -08:00
type : Literal [ " extend_path " ] = " extend_path "
2023-08-30 15:59:51 -07:00
2024-01-06 18:32:21 -08:00
model_config = ConfigDict ( protected_namespaces = ( ) )
2023-08-30 15:59:51 -07:00
2023-11-28 23:50:50 -08:00
class extrude ( BaseModel ) :
2024-04-05 13:12:19 -07:00
""" Command for extruding a solid 2d. """
2023-08-30 15:59:51 -07:00
2024-02-24 17:03:55 -08:00
distance : LengthUnit
2023-08-30 15:59:51 -07:00
2023-11-28 23:50:50 -08:00
target : ModelingCmdId
2023-08-30 15:59:51 -07:00
2023-11-29 10:32:31 -08:00
type : Literal [ " extrude " ] = " extrude "
2023-08-30 15:59:51 -07:00
2024-01-06 18:32:21 -08:00
model_config = ConfigDict ( protected_namespaces = ( ) )
2023-08-30 15:59:51 -07:00
2024-04-05 13:12:19 -07:00
class revolve ( BaseModel ) :
""" Command for revolving a solid 2d. """
angle : Angle
axis : Point3d
axis_is_2d : bool
origin : Point3d
target : ModelingCmdId
tolerance : LengthUnit
type : Literal [ " revolve " ] = " revolve "
model_config = ConfigDict ( protected_namespaces = ( ) )
2024-06-04 09:38:51 -07:00
class solid3d_shell_face ( BaseModel ) :
2024-08-26 14:46:20 -07:00
""" Command for shelling a solid3d face """
2024-06-04 09:38:51 -07:00
face_ids : List [ str ]
2024-08-22 11:09:24 -07:00
hollow : bool = False
2024-06-04 09:38:51 -07:00
object_id : str
shell_thickness : LengthUnit
type : Literal [ " solid3d_shell_face " ] = " solid3d_shell_face "
model_config = ConfigDict ( protected_namespaces = ( ) )
2024-04-05 13:12:19 -07:00
class revolve_about_edge ( BaseModel ) :
""" Command for revolving a solid 2d about a brep edge """
angle : Angle
edge_id : str
target : ModelingCmdId
tolerance : LengthUnit
type : Literal [ " revolve_about_edge " ] = " revolve_about_edge "
model_config = ConfigDict ( protected_namespaces = ( ) )
2024-08-26 14:46:20 -07:00
class loft ( BaseModel ) :
""" Command for lofting sections to create a solid """
base_curve_index : Optional [ int ] = None
bez_approximate_rational : bool
section_ids : List [ str ]
tolerance : LengthUnit
type : Literal [ " loft " ] = " loft "
v_degree : int
model_config = ConfigDict ( protected_namespaces = ( ) )
2023-11-28 23:50:50 -08:00
class close_path ( BaseModel ) :
""" Closes a path, converting it to a 2D solid. """
2023-08-30 15:59:51 -07:00
2023-11-29 10:32:31 -08:00
path_id : str
2023-08-30 15:59:51 -07:00
2023-11-29 10:32:31 -08:00
type : Literal [ " close_path " ] = " close_path "
2023-08-30 15:59:51 -07:00
2024-01-06 18:32:21 -08:00
model_config = ConfigDict ( protected_namespaces = ( ) )
2023-08-30 15:59:51 -07:00
2023-11-28 23:50:50 -08:00
class camera_drag_start ( BaseModel ) :
""" Camera drag started. """
2023-08-30 15:59:51 -07:00
2023-11-28 23:50:50 -08:00
interaction : CameraDragInteractionType
2023-08-30 15:59:51 -07:00
2023-11-29 10:32:31 -08:00
type : Literal [ " camera_drag_start " ] = " camera_drag_start "
2023-08-30 18:30:23 -07:00
2023-11-28 23:50:50 -08:00
window : Point2d
2023-08-30 15:59:51 -07:00
2024-01-06 18:32:21 -08:00
model_config = ConfigDict ( protected_namespaces = ( ) )
2023-08-30 15:59:51 -07:00
2023-11-28 23:50:50 -08:00
class camera_drag_move ( BaseModel ) :
""" Camera drag continued. """
2023-08-30 15:59:51 -07:00
2023-11-28 23:50:50 -08:00
interaction : CameraDragInteractionType
2023-08-30 15:59:51 -07:00
2023-11-28 23:50:50 -08:00
sequence : Optional [ int ] = None
2023-09-29 16:05:40 -07:00
2023-11-29 10:32:31 -08:00
type : Literal [ " camera_drag_move " ] = " camera_drag_move "
2023-08-30 15:59:51 -07:00
2023-11-28 23:50:50 -08:00
window : Point2d
2023-08-30 15:59:51 -07:00
2024-01-06 18:32:21 -08:00
model_config = ConfigDict ( protected_namespaces = ( ) )
2023-08-30 15:59:51 -07:00
2023-11-28 23:50:50 -08:00
class camera_drag_end ( BaseModel ) :
2024-02-24 17:03:55 -08:00
""" Camera drag ended """
2023-08-30 15:59:51 -07:00
2023-11-28 23:50:50 -08:00
interaction : CameraDragInteractionType
2023-08-30 15:59:51 -07:00
2023-11-29 10:32:31 -08:00
type : Literal [ " camera_drag_end " ] = " camera_drag_end "
2023-08-30 15:59:51 -07:00
2023-11-28 23:50:50 -08:00
window : Point2d
2023-08-30 15:59:51 -07:00
2024-01-06 18:32:21 -08:00
model_config = ConfigDict ( protected_namespaces = ( ) )
2023-08-30 15:59:51 -07:00
2024-03-04 12:53:31 -08:00
class default_camera_get_settings ( BaseModel ) :
""" Gets the default camera ' s camera settings """
type : Literal [ " default_camera_get_settings " ] = " default_camera_get_settings "
model_config = ConfigDict ( protected_namespaces = ( ) )
2023-11-28 23:50:50 -08:00
class default_camera_look_at ( BaseModel ) :
""" Change what the default camera is looking at. """
2023-08-30 15:59:51 -07:00
2023-11-28 23:50:50 -08:00
center : Point3d
2023-08-30 15:59:51 -07:00
2024-02-24 17:03:55 -08:00
sequence : Optional [ int ] = None
2023-11-29 10:32:31 -08:00
type : Literal [ " default_camera_look_at " ] = " default_camera_look_at "
2023-08-30 15:59:51 -07:00
2023-11-28 23:50:50 -08:00
up : Point3d
2023-08-30 15:59:51 -07:00
2023-11-28 23:50:50 -08:00
vantage : Point3d
2023-08-30 15:59:51 -07:00
2024-01-06 18:32:21 -08:00
model_config = ConfigDict ( protected_namespaces = ( ) )
2023-08-30 15:59:51 -07:00
2024-02-24 17:03:55 -08:00
class default_camera_perspective_settings ( BaseModel ) :
""" Change what the default camera is looking at. """
center : Point3d
2024-06-21 18:46:02 -07:00
fov_y : Optional [ float ] = None
2024-02-24 17:03:55 -08:00
sequence : Optional [ int ] = None
2024-03-04 12:53:31 -08:00
type : Literal [ " default_camera_perspective_settings " ] = (
2024-02-24 17:03:55 -08:00
" default_camera_perspective_settings "
2024-03-04 12:53:31 -08:00
)
2024-02-24 17:03:55 -08:00
up : Point3d
vantage : Point3d
2024-06-21 18:46:02 -07:00
z_far : Optional [ float ] = None
2024-02-24 17:03:55 -08:00
2024-06-21 18:46:02 -07:00
z_near : Optional [ float ] = None
2024-02-24 17:03:55 -08:00
model_config = ConfigDict ( protected_namespaces = ( ) )
2023-11-28 23:50:50 -08:00
class default_camera_zoom ( BaseModel ) :
""" Adjust zoom of the default camera. """
2023-08-30 15:59:51 -07:00
2023-11-28 23:50:50 -08:00
magnitude : float
2023-08-30 15:59:51 -07:00
2023-11-29 10:32:31 -08:00
type : Literal [ " default_camera_zoom " ] = " default_camera_zoom "
2023-08-30 15:59:51 -07:00
2024-01-06 18:32:21 -08:00
model_config = ConfigDict ( protected_namespaces = ( ) )
2023-08-30 15:59:51 -07:00
2023-11-28 23:50:50 -08:00
class export ( BaseModel ) :
""" Export the scene to a file. """
2023-08-30 15:59:51 -07:00
2023-11-29 10:32:31 -08:00
entity_ids : List [ str ]
2023-08-30 15:59:51 -07:00
2023-11-28 23:50:50 -08:00
format : OutputFormat
2023-08-30 15:59:51 -07:00
2023-11-29 10:32:31 -08:00
type : Literal [ " export " ] = " export "
2023-08-30 15:59:51 -07:00
2024-01-06 18:32:21 -08:00
model_config = ConfigDict ( protected_namespaces = ( ) )
2023-08-30 15:59:51 -07:00
2023-11-28 23:50:50 -08:00
class entity_get_parent_id ( BaseModel ) :
""" What is this entity ' s parent? """
2023-08-30 15:59:51 -07:00
2023-11-29 10:32:31 -08:00
entity_id : str
2023-08-30 15:59:51 -07:00
2023-11-29 10:32:31 -08:00
type : Literal [ " entity_get_parent_id " ] = " entity_get_parent_id "
2023-08-30 15:59:51 -07:00
2024-01-06 18:32:21 -08:00
model_config = ConfigDict ( protected_namespaces = ( ) )
2023-08-30 15:59:51 -07:00
2023-11-28 23:50:50 -08:00
class entity_get_num_children ( BaseModel ) :
""" How many children does the entity have? """
2023-08-30 15:59:51 -07:00
2023-11-29 10:32:31 -08:00
entity_id : str
2023-08-30 15:59:51 -07:00
2023-11-29 10:32:31 -08:00
type : Literal [ " entity_get_num_children " ] = " entity_get_num_children "
2023-08-30 15:59:51 -07:00
2024-01-06 18:32:21 -08:00
model_config = ConfigDict ( protected_namespaces = ( ) )
2023-08-30 15:59:51 -07:00
2023-11-28 23:50:50 -08:00
class entity_get_child_uuid ( BaseModel ) :
""" What is the UUID of this entity ' s n-th child? """
2023-08-30 15:59:51 -07:00
2023-11-28 23:50:50 -08:00
child_index : int
2023-08-30 15:59:51 -07:00
2023-11-29 10:32:31 -08:00
entity_id : str
2023-08-30 15:59:51 -07:00
2023-11-29 10:32:31 -08:00
type : Literal [ " entity_get_child_uuid " ] = " entity_get_child_uuid "
2023-09-29 16:05:40 -07:00
2024-01-06 18:32:21 -08:00
model_config = ConfigDict ( protected_namespaces = ( ) )
2023-08-30 15:59:51 -07:00
2023-11-28 23:50:50 -08:00
class entity_get_all_child_uuids ( BaseModel ) :
""" What are all UUIDs of this entity ' s children? """
2023-08-30 15:59:51 -07:00
2023-11-29 10:32:31 -08:00
entity_id : str
2023-08-30 15:59:51 -07:00
2023-11-29 10:32:31 -08:00
type : Literal [ " entity_get_all_child_uuids " ] = " entity_get_all_child_uuids "
2023-08-30 15:59:51 -07:00
2024-01-06 18:32:21 -08:00
model_config = ConfigDict ( protected_namespaces = ( ) )
2023-08-30 15:59:51 -07:00
2024-07-26 18:08:45 -07:00
class entity_get_sketch_paths ( BaseModel ) :
""" What are all UUIDs of all the paths sketched on top of this entity? """
entity_id : str
type : Literal [ " entity_get_sketch_paths " ] = " entity_get_sketch_paths "
model_config = ConfigDict ( protected_namespaces = ( ) )
2024-02-24 17:03:55 -08:00
class entity_get_distance ( BaseModel ) :
""" What is the distance between these two entities? """
2023-08-30 15:59:51 -07:00
2024-02-24 17:03:55 -08:00
distance_type : DistanceType
2023-08-30 15:59:51 -07:00
2024-02-24 17:03:55 -08:00
entity_id1 : str
entity_id2 : str
type : Literal [ " entity_get_distance " ] = " entity_get_distance "
2023-08-30 15:59:51 -07:00
2024-01-06 18:32:21 -08:00
model_config = ConfigDict ( protected_namespaces = ( ) )
2023-08-30 15:59:51 -07:00
2024-06-20 11:10:00 -07:00
class entity_linear_pattern_transform ( BaseModel ) :
2024-09-10 09:17:32 -07:00
""" Create a pattern using this entity by specifying the transform for each desired repetition. Transformations are performed in the following order (first applied to last applied): scale, rotate, translate. """
2024-06-20 11:10:00 -07:00
entity_id : str
2024-09-10 09:17:32 -07:00
transform : List [ Transform ]
2024-06-20 11:10:00 -07:00
type : Literal [ " entity_linear_pattern_transform " ] = " entity_linear_pattern_transform "
model_config = ConfigDict ( protected_namespaces = ( ) )
2024-02-24 17:03:55 -08:00
class entity_linear_pattern ( BaseModel ) :
2024-04-05 13:12:19 -07:00
""" Create a linear pattern using this entity. """
2023-08-30 15:59:51 -07:00
2024-02-24 17:03:55 -08:00
axis : Point3d
entity_id : str
num_repetitions : int
spacing : LengthUnit
type : Literal [ " entity_linear_pattern " ] = " entity_linear_pattern "
2023-08-30 15:59:51 -07:00
2024-01-06 18:32:21 -08:00
model_config = ConfigDict ( protected_namespaces = ( ) )
2023-08-30 15:59:51 -07:00
2024-02-24 17:03:55 -08:00
class entity_circular_pattern ( BaseModel ) :
2024-04-05 13:12:19 -07:00
""" Create a circular pattern using this entity. """
2023-09-29 16:05:40 -07:00
2024-02-24 17:03:55 -08:00
arc_degrees : float
2023-08-30 15:59:51 -07:00
2024-02-24 17:03:55 -08:00
axis : Point3d
2023-08-30 15:59:51 -07:00
2024-02-24 17:03:55 -08:00
center : Point3d
entity_id : str
num_repetitions : int
rotate_duplicates : bool
type : Literal [ " entity_circular_pattern " ] = " entity_circular_pattern "
2023-08-30 15:59:51 -07:00
2024-01-06 18:32:21 -08:00
model_config = ConfigDict ( protected_namespaces = ( ) )
2023-08-30 15:59:51 -07:00
2024-04-05 13:12:19 -07:00
class entity_make_helix ( BaseModel ) :
""" Create a helix using the input cylinder and other specified parameters. """
cylinder_id : str
is_clockwise : bool
length : LengthUnit
revolutions : float
start_angle : Angle
type : Literal [ " entity_make_helix " ] = " entity_make_helix "
model_config = ConfigDict ( protected_namespaces = ( ) )
2024-04-22 13:41:53 -07:00
class entity_mirror ( BaseModel ) :
""" Mirror the input entities over the specified axis. (Currently only supports sketches) """
axis : Point3d
ids : List [ str ]
point : Point3d
type : Literal [ " entity_mirror " ] = " entity_mirror "
model_config = ConfigDict ( protected_namespaces = ( ) )
2024-07-18 12:05:04 -07:00
class entity_mirror_across_edge ( BaseModel ) :
""" Mirror the input entities over the specified edge. (Currently only supports sketches) """
edge_id : str
ids : List [ str ]
type : Literal [ " entity_mirror_across_edge " ] = " entity_mirror_across_edge "
model_config = ConfigDict ( protected_namespaces = ( ) )
2024-02-24 17:03:55 -08:00
class edit_mode_enter ( BaseModel ) :
""" Enter edit mode """
2023-08-30 15:59:51 -07:00
2024-02-24 17:03:55 -08:00
target : str
type : Literal [ " edit_mode_enter " ] = " edit_mode_enter "
model_config = ConfigDict ( protected_namespaces = ( ) )
class select_with_point ( BaseModel ) :
2024-03-04 12:53:31 -08:00
""" Modifies the selection by simulating a \" mouse click \" at the given x,y window coordinate Returns ID of whatever was selected. """
2024-02-24 17:03:55 -08:00
selected_at_window : Point2d
selection_type : SceneSelectionType
type : Literal [ " select_with_point " ] = " select_with_point "
2023-08-30 15:59:51 -07:00
2024-01-06 18:32:21 -08:00
model_config = ConfigDict ( protected_namespaces = ( ) )
2023-08-30 15:59:51 -07:00
2023-11-28 23:50:50 -08:00
class select_add ( BaseModel ) :
""" Adds one or more entities (by UUID) to the selection. """
2023-08-30 15:59:51 -07:00
2023-11-29 10:32:31 -08:00
entities : List [ str ]
2023-08-30 15:59:51 -07:00
2023-11-29 10:32:31 -08:00
type : Literal [ " select_add " ] = " select_add "
2023-08-30 15:59:51 -07:00
2024-01-06 18:32:21 -08:00
model_config = ConfigDict ( protected_namespaces = ( ) )
2023-08-30 15:59:51 -07:00
2023-11-28 23:50:50 -08:00
class select_remove ( BaseModel ) :
""" Removes one or more entities (by UUID) from the selection. """
2023-08-30 15:59:51 -07:00
2023-11-29 10:32:31 -08:00
entities : List [ str ]
2023-08-30 15:59:51 -07:00
2023-11-29 10:32:31 -08:00
type : Literal [ " select_remove " ] = " select_remove "
2023-08-30 15:59:51 -07:00
2024-01-06 18:32:21 -08:00
model_config = ConfigDict ( protected_namespaces = ( ) )
2023-08-30 15:59:51 -07:00
2024-04-05 13:12:19 -07:00
class scene_clear_all ( BaseModel ) :
""" Removes all of the Objects in the scene """
type : Literal [ " scene_clear_all " ] = " scene_clear_all "
model_config = ConfigDict ( protected_namespaces = ( ) )
2023-11-28 23:50:50 -08:00
class select_replace ( BaseModel ) :
2024-02-24 17:03:55 -08:00
""" Replaces current selection with these entities (by UUID). """
2023-08-30 15:59:51 -07:00
2023-11-29 10:32:31 -08:00
entities : List [ str ]
2023-08-30 15:59:51 -07:00
2023-11-29 10:32:31 -08:00
type : Literal [ " select_replace " ] = " select_replace "
2023-08-30 15:59:51 -07:00
2024-01-06 18:32:21 -08:00
model_config = ConfigDict ( protected_namespaces = ( ) )
2023-08-30 15:59:51 -07:00
2023-11-28 23:50:50 -08:00
class highlight_set_entity ( BaseModel ) :
""" Changes the current highlighted entity to whichever one is at the given window coordinate. If there ' s no entity at this location, clears the highlight. """
2023-08-30 15:59:51 -07:00
2023-11-28 23:50:50 -08:00
selected_at_window : Point2d
2023-08-30 15:59:51 -07:00
2023-11-28 23:50:50 -08:00
sequence : Optional [ int ] = None
2023-08-30 15:59:51 -07:00
2023-11-29 10:32:31 -08:00
type : Literal [ " highlight_set_entity " ] = " highlight_set_entity "
2023-08-30 15:59:51 -07:00
2024-01-06 18:32:21 -08:00
model_config = ConfigDict ( protected_namespaces = ( ) )
2023-08-30 15:59:51 -07:00
2023-11-28 23:50:50 -08:00
class highlight_set_entities ( BaseModel ) :
""" Changes the current highlighted entity to these entities. """
2023-08-30 15:59:51 -07:00
2023-11-29 10:32:31 -08:00
entities : List [ str ]
2023-08-30 15:59:51 -07:00
2023-11-29 10:32:31 -08:00
type : Literal [ " highlight_set_entities " ] = " highlight_set_entities "
2023-08-30 15:59:51 -07:00
2024-01-06 18:32:21 -08:00
model_config = ConfigDict ( protected_namespaces = ( ) )
2023-08-30 15:59:51 -07:00
2023-11-28 23:50:50 -08:00
class new_annotation ( BaseModel ) :
""" Create a new annotation """
2023-08-30 15:59:51 -07:00
2023-11-28 23:50:50 -08:00
annotation_type : AnnotationType
2023-08-30 15:59:51 -07:00
2023-11-28 23:50:50 -08:00
clobber : bool
2023-08-30 15:59:51 -07:00
2023-11-28 23:50:50 -08:00
options : AnnotationOptions
2023-08-30 15:59:51 -07:00
2023-11-29 10:32:31 -08:00
type : Literal [ " new_annotation " ] = " new_annotation "
2023-08-30 15:59:51 -07:00
2024-01-06 18:32:21 -08:00
model_config = ConfigDict ( protected_namespaces = ( ) )
2023-08-30 15:59:51 -07:00
2023-11-28 23:50:50 -08:00
class update_annotation ( BaseModel ) :
""" Update an annotation """
2023-08-30 15:59:51 -07:00
2023-11-29 10:32:31 -08:00
annotation_id : str
2023-09-29 16:05:40 -07:00
2023-11-28 23:50:50 -08:00
options : AnnotationOptions
2023-08-30 15:59:51 -07:00
2023-11-29 10:32:31 -08:00
type : Literal [ " update_annotation " ] = " update_annotation "
2023-08-30 15:59:51 -07:00
2024-01-06 18:32:21 -08:00
model_config = ConfigDict ( protected_namespaces = ( ) )
2023-08-30 15:59:51 -07:00
2024-04-17 09:49:04 -07:00
class edge_lines_visible ( BaseModel ) :
""" Changes visibility of scene-wide edge lines on brep solids """
hidden : bool
type : Literal [ " edge_lines_visible " ] = " edge_lines_visible "
model_config = ConfigDict ( protected_namespaces = ( ) )
2023-11-28 23:50:50 -08:00
class object_visible ( BaseModel ) :
""" Hide or show an object """
2023-08-30 15:59:51 -07:00
2023-11-28 23:50:50 -08:00
hidden : bool
2023-08-30 15:59:51 -07:00
2023-11-29 10:32:31 -08:00
object_id : str
2023-08-30 15:59:51 -07:00
2023-11-29 10:32:31 -08:00
type : Literal [ " object_visible " ] = " object_visible "
2023-08-30 15:59:51 -07:00
2024-01-06 18:32:21 -08:00
model_config = ConfigDict ( protected_namespaces = ( ) )
2023-08-30 15:59:51 -07:00
2023-11-28 23:50:50 -08:00
class object_bring_to_front ( BaseModel ) :
""" Bring an object to the front of the scene """
2023-08-30 15:59:51 -07:00
2023-11-29 10:32:31 -08:00
object_id : str
2023-08-30 15:59:51 -07:00
2023-11-29 10:32:31 -08:00
type : Literal [ " object_bring_to_front " ] = " object_bring_to_front "
2023-08-30 15:59:51 -07:00
2024-01-06 18:32:21 -08:00
model_config = ConfigDict ( protected_namespaces = ( ) )
2023-08-30 15:59:51 -07:00
2024-02-24 17:03:55 -08:00
class object_set_material_params_pbr ( BaseModel ) :
""" Set the material properties of an object """
ambient_occlusion : float
color : Color
metalness : float
object_id : str
roughness : float
type : Literal [ " object_set_material_params_pbr " ] = " object_set_material_params_pbr "
model_config = ConfigDict ( protected_namespaces = ( ) )
2023-11-28 23:50:50 -08:00
class get_entity_type ( BaseModel ) :
""" What type of entity is this? """
2023-08-30 15:59:51 -07:00
2023-11-29 10:32:31 -08:00
entity_id : str
2023-08-30 15:59:51 -07:00
2023-11-29 10:32:31 -08:00
type : Literal [ " get_entity_type " ] = " get_entity_type "
2023-09-29 16:05:40 -07:00
2024-01-06 18:32:21 -08:00
model_config = ConfigDict ( protected_namespaces = ( ) )
2023-08-30 15:59:51 -07:00
2024-02-24 17:03:55 -08:00
class solid3d_get_all_edge_faces ( BaseModel ) :
""" Gets all faces which use the given edge. """
2023-08-30 15:59:51 -07:00
2024-02-24 17:03:55 -08:00
edge_id : str
2023-08-30 15:59:51 -07:00
2023-11-29 10:32:31 -08:00
object_id : str
2023-08-30 15:59:51 -07:00
2024-02-24 17:03:55 -08:00
type : Literal [ " solid3d_get_all_edge_faces " ] = " solid3d_get_all_edge_faces "
2023-08-30 15:59:51 -07:00
2024-01-06 18:32:21 -08:00
model_config = ConfigDict ( protected_namespaces = ( ) )
2023-08-30 15:59:51 -07:00
2024-02-24 17:03:55 -08:00
class solid2d_add_hole ( BaseModel ) :
""" Add a hole to a Solid2d object before extruding it. """
2023-08-30 15:59:51 -07:00
2024-02-24 17:03:55 -08:00
hole_id : str
2023-08-30 15:59:51 -07:00
2023-11-29 10:32:31 -08:00
object_id : str
2023-08-30 15:59:51 -07:00
2024-02-24 17:03:55 -08:00
type : Literal [ " solid2d_add_hole " ] = " solid2d_add_hole "
2023-08-30 15:59:51 -07:00
2024-01-06 18:32:21 -08:00
model_config = ConfigDict ( protected_namespaces = ( ) )
2023-08-30 15:59:51 -07:00
2023-11-28 23:50:50 -08:00
class solid3d_get_all_opposite_edges ( BaseModel ) :
""" Gets all edges which are opposite the given edge, across all possible faces. """
2023-08-30 15:59:51 -07:00
2023-11-28 23:50:50 -08:00
along_vector : Optional [ Point3d ] = None
2023-08-30 15:59:51 -07:00
2023-11-29 10:32:31 -08:00
edge_id : str
2023-08-30 15:59:51 -07:00
2023-11-29 10:32:31 -08:00
object_id : str
2023-08-30 15:59:51 -07:00
2023-11-29 10:32:31 -08:00
type : Literal [ " solid3d_get_all_opposite_edges " ] = " solid3d_get_all_opposite_edges "
2023-08-30 15:59:51 -07:00
2024-01-06 18:32:21 -08:00
model_config = ConfigDict ( protected_namespaces = ( ) )
2023-08-30 15:59:51 -07:00
2023-11-28 23:50:50 -08:00
class solid3d_get_opposite_edge ( BaseModel ) :
""" Gets the edge opposite the given edge, along the given face. """
2023-08-30 15:59:51 -07:00
2023-11-29 10:32:31 -08:00
edge_id : str
2023-08-30 15:59:51 -07:00
2023-11-29 10:32:31 -08:00
face_id : str
2023-09-29 15:51:03 -07:00
2023-11-29 10:32:31 -08:00
object_id : str
2023-09-29 15:51:03 -07:00
2023-11-29 10:32:31 -08:00
type : Literal [ " solid3d_get_opposite_edge " ] = " solid3d_get_opposite_edge "
2023-09-29 16:05:40 -07:00
2024-01-06 18:32:21 -08:00
model_config = ConfigDict ( protected_namespaces = ( ) )
2023-09-29 15:51:03 -07:00
2023-11-28 23:50:50 -08:00
class solid3d_get_next_adjacent_edge ( BaseModel ) :
""" Gets the next adjacent edge for the given edge, along the given face. """
2023-09-29 15:51:03 -07:00
2023-11-29 10:32:31 -08:00
edge_id : str
2023-09-29 15:51:03 -07:00
2023-11-29 10:32:31 -08:00
face_id : str
2023-09-29 15:51:03 -07:00
2023-11-29 10:32:31 -08:00
object_id : str
2023-09-29 15:51:03 -07:00
2023-11-29 10:32:31 -08:00
type : Literal [ " solid3d_get_next_adjacent_edge " ] = " solid3d_get_next_adjacent_edge "
2023-09-29 15:51:03 -07:00
2024-01-06 18:32:21 -08:00
model_config = ConfigDict ( protected_namespaces = ( ) )
2023-09-29 15:51:03 -07:00
2023-11-28 23:50:50 -08:00
class solid3d_get_prev_adjacent_edge ( BaseModel ) :
""" Gets the previous adjacent edge for the given edge, along the given face. """
2023-09-29 15:51:03 -07:00
2023-11-29 10:32:31 -08:00
edge_id : str
2023-09-29 15:51:03 -07:00
2023-11-29 10:32:31 -08:00
face_id : str
2023-09-29 15:51:03 -07:00
2023-11-29 10:32:31 -08:00
object_id : str
2023-09-29 15:51:03 -07:00
2023-11-29 10:32:31 -08:00
type : Literal [ " solid3d_get_prev_adjacent_edge " ] = " solid3d_get_prev_adjacent_edge "
2023-09-29 15:51:03 -07:00
2024-01-06 18:32:21 -08:00
model_config = ConfigDict ( protected_namespaces = ( ) )
2023-09-29 15:51:03 -07:00
2024-02-24 17:03:55 -08:00
class solid3d_fillet_edge ( BaseModel ) :
""" Fillets the given edge with the specified radius. """
2024-08-20 13:10:56 -04:00
cut_type : CutType = " fillet "
2024-06-05 18:40:25 -07:00
2024-02-24 17:03:55 -08:00
edge_id : str
2024-09-10 09:17:32 -07:00
face_id : Optional [ str ] = None
2024-02-24 17:03:55 -08:00
object_id : str
radius : LengthUnit
2024-03-04 12:53:31 -08:00
tolerance : LengthUnit
2024-02-24 17:03:55 -08:00
type : Literal [ " solid3d_fillet_edge " ] = " solid3d_fillet_edge "
model_config = ConfigDict ( protected_namespaces = ( ) )
2024-03-04 13:08:49 -08:00
class face_is_planar ( BaseModel ) :
""" Determines whether a brep face is planar and returns its surface-local planar axes if so """
object_id : str
type : Literal [ " face_is_planar " ] = " face_is_planar "
model_config = ConfigDict ( protected_namespaces = ( ) )
class face_get_position ( BaseModel ) :
""" Determines a position on a brep face evaluated by parameters u,v """
object_id : str
type : Literal [ " face_get_position " ] = " face_get_position "
uv : Point2d
model_config = ConfigDict ( protected_namespaces = ( ) )
2024-05-16 12:09:12 -07:00
class face_get_center ( BaseModel ) :
""" Obtains the surface \" center of mass \" """
object_id : str
type : Literal [ " face_get_center " ] = " face_get_center "
model_config = ConfigDict ( protected_namespaces = ( ) )
2024-03-04 13:08:49 -08:00
class face_get_gradient ( BaseModel ) :
""" Determines the gradient (dFdu, dFdv) + normal vector on a brep face evaluated by parameters u,v """
object_id : str
type : Literal [ " face_get_gradient " ] = " face_get_gradient "
uv : Point2d
model_config = ConfigDict ( protected_namespaces = ( ) )
2023-11-28 23:50:50 -08:00
class send_object ( BaseModel ) :
2024-02-24 17:03:55 -08:00
""" Send object to front or back. """
2023-09-29 16:05:40 -07:00
2023-11-28 23:50:50 -08:00
front : bool
2023-09-29 15:51:03 -07:00
2023-11-29 10:32:31 -08:00
object_id : str
2023-09-29 15:51:03 -07:00
2023-11-29 10:32:31 -08:00
type : Literal [ " send_object " ] = " send_object "
2023-09-29 15:51:03 -07:00
2024-01-06 18:32:21 -08:00
model_config = ConfigDict ( protected_namespaces = ( ) )
2023-08-30 15:59:51 -07:00
2023-11-28 23:50:50 -08:00
class entity_set_opacity ( BaseModel ) :
""" Set opacity of the entity. """
2023-10-17 15:35:56 -07:00
2023-11-29 10:32:31 -08:00
entity_id : str
2023-10-17 15:35:56 -07:00
2023-11-28 23:50:50 -08:00
opacity : float
2023-10-17 15:35:56 -07:00
2023-11-29 10:32:31 -08:00
type : Literal [ " entity_set_opacity " ] = " entity_set_opacity "
2023-10-17 15:35:56 -07:00
2024-01-06 18:32:21 -08:00
model_config = ConfigDict ( protected_namespaces = ( ) )
2023-10-17 15:35:56 -07:00
2023-11-28 23:50:50 -08:00
class entity_fade ( BaseModel ) :
2024-02-24 17:03:55 -08:00
""" Fade entity in or out. """
2023-10-17 15:35:56 -07:00
2024-08-20 13:10:56 -04:00
duration_seconds : float = 0.4000000059604645
2023-10-17 15:35:56 -07:00
2023-11-29 10:32:31 -08:00
entity_id : str
2023-10-17 15:35:56 -07:00
2023-11-28 23:50:50 -08:00
fade_in : bool
2023-10-17 15:35:56 -07:00
2023-11-29 10:32:31 -08:00
type : Literal [ " entity_fade " ] = " entity_fade "
2023-10-17 15:35:56 -07:00
2024-01-06 18:32:21 -08:00
model_config = ConfigDict ( protected_namespaces = ( ) )
2023-10-17 15:35:56 -07:00
2023-11-28 23:50:50 -08:00
class make_plane ( BaseModel ) :
2024-02-24 17:03:55 -08:00
""" Make a new plane """
2023-10-17 15:35:56 -07:00
2023-11-28 23:50:50 -08:00
clobber : bool
2023-10-17 15:35:56 -07:00
2023-11-28 23:50:50 -08:00
hide : Optional [ bool ] = None
2023-10-17 15:35:56 -07:00
2023-11-28 23:50:50 -08:00
origin : Point3d
2023-10-17 15:35:56 -07:00
2024-02-24 17:03:55 -08:00
size : LengthUnit
2023-10-17 15:35:56 -07:00
2023-11-29 10:32:31 -08:00
type : Literal [ " make_plane " ] = " make_plane "
2023-10-17 15:35:56 -07:00
2023-11-28 23:50:50 -08:00
x_axis : Point3d
2023-10-17 15:35:56 -07:00
2023-11-28 23:50:50 -08:00
y_axis : Point3d
2023-10-17 15:35:56 -07:00
2024-01-06 18:32:21 -08:00
model_config = ConfigDict ( protected_namespaces = ( ) )
2023-08-30 15:59:51 -07:00
2023-11-28 23:50:50 -08:00
class plane_set_color ( BaseModel ) :
2024-02-24 17:03:55 -08:00
""" Set the color of a plane. """
2023-08-30 15:59:51 -07:00
2023-11-28 23:50:50 -08:00
color : Color
2023-08-30 15:59:51 -07:00
2023-11-29 10:32:31 -08:00
plane_id : str
2023-08-30 15:59:51 -07:00
2023-11-29 10:32:31 -08:00
type : Literal [ " plane_set_color " ] = " plane_set_color "
2023-08-30 15:59:51 -07:00
2024-01-06 18:32:21 -08:00
model_config = ConfigDict ( protected_namespaces = ( ) )
2023-08-30 15:59:51 -07:00
2023-11-28 23:50:50 -08:00
class set_tool ( BaseModel ) :
2024-02-24 17:03:55 -08:00
""" Set the current tool. """
2023-08-30 15:59:51 -07:00
2023-11-28 23:50:50 -08:00
tool : SceneToolType
2023-08-30 15:59:51 -07:00
2023-11-29 10:32:31 -08:00
type : Literal [ " set_tool " ] = " set_tool "
2023-08-30 15:59:51 -07:00
2024-01-06 18:32:21 -08:00
model_config = ConfigDict ( protected_namespaces = ( ) )
2023-08-30 15:59:51 -07:00
2023-11-28 23:50:50 -08:00
class mouse_move ( BaseModel ) :
2024-02-24 17:03:55 -08:00
""" Send a mouse move event """
2023-08-30 15:59:51 -07:00
2023-11-28 23:50:50 -08:00
sequence : Optional [ int ] = None
2023-08-30 15:59:51 -07:00
2023-11-29 10:32:31 -08:00
type : Literal [ " mouse_move " ] = " mouse_move "
2023-08-30 15:59:51 -07:00
2023-11-28 23:50:50 -08:00
window : Point2d
2023-08-30 15:59:51 -07:00
2024-01-06 18:32:21 -08:00
model_config = ConfigDict ( protected_namespaces = ( ) )
2023-08-30 15:59:51 -07:00
2023-11-28 23:50:50 -08:00
class mouse_click ( BaseModel ) :
2024-02-24 17:03:55 -08:00
""" Send a mouse click event Updates modified/selected entities. """
2023-09-29 16:05:40 -07:00
2023-11-29 10:32:31 -08:00
type : Literal [ " mouse_click " ] = " mouse_click "
2023-08-30 15:59:51 -07:00
2023-11-28 23:50:50 -08:00
window : Point2d
2023-08-30 15:59:51 -07:00
2024-01-06 18:32:21 -08:00
model_config = ConfigDict ( protected_namespaces = ( ) )
2023-08-30 15:59:51 -07:00
2023-11-28 23:50:50 -08:00
class sketch_mode_disable ( BaseModel ) :
2024-02-24 17:03:55 -08:00
""" Disable sketch mode. If you are sketching on a face, be sure to not disable sketch mode until you have extruded. Otherwise, your object will not be fused with the face. """
2023-08-30 15:59:51 -07:00
2023-11-29 10:32:31 -08:00
type : Literal [ " sketch_mode_disable " ] = " sketch_mode_disable "
2023-08-30 15:59:51 -07:00
2024-01-06 18:32:21 -08:00
model_config = ConfigDict ( protected_namespaces = ( ) )
2023-08-30 15:59:51 -07:00
2024-02-24 17:03:55 -08:00
class get_sketch_mode_plane ( BaseModel ) :
""" Get the plane for sketch mode. """
type : Literal [ " get_sketch_mode_plane " ] = " get_sketch_mode_plane "
model_config = ConfigDict ( protected_namespaces = ( ) )
class curve_set_constraint ( BaseModel ) :
""" Get the plane for sketch mode. """
constraint_bound : PathComponentConstraintBound
constraint_type : PathComponentConstraintType
object_id : str
type : Literal [ " curve_set_constraint " ] = " curve_set_constraint "
model_config = ConfigDict ( protected_namespaces = ( ) )
class enable_sketch_mode ( BaseModel ) :
""" Sketch on some entity (e.g. a plane, a face). """
adjust_camera : bool
animated : bool
entity_id : str
ortho : bool
2024-05-03 12:11:18 -07:00
planar_normal : Optional [ Point3d ] = None
2024-02-24 17:03:55 -08:00
type : Literal [ " enable_sketch_mode " ] = " enable_sketch_mode "
model_config = ConfigDict ( protected_namespaces = ( ) )
2024-04-05 13:12:19 -07:00
class set_background_color ( BaseModel ) :
""" Set the background color of the scene. """
color : Color
type : Literal [ " set_background_color " ] = " set_background_color "
model_config = ConfigDict ( protected_namespaces = ( ) )
class set_current_tool_properties ( BaseModel ) :
""" Set the properties of the tool lines for the scene. """
color : Optional [ Color ] = None
type : Literal [ " set_current_tool_properties " ] = " set_current_tool_properties "
model_config = ConfigDict ( protected_namespaces = ( ) )
class set_default_system_properties ( BaseModel ) :
""" Set the default system properties used when a specific property isn ' t set. """
color : Optional [ Color ] = None
type : Literal [ " set_default_system_properties " ] = " set_default_system_properties "
model_config = ConfigDict ( protected_namespaces = ( ) )
2023-11-28 23:50:50 -08:00
class curve_get_type ( BaseModel ) :
2024-02-24 17:03:55 -08:00
""" Get type of the given curve. """
2023-08-30 15:59:51 -07:00
2023-11-29 10:32:31 -08:00
curve_id : str
2023-08-30 15:59:51 -07:00
2023-11-29 10:32:31 -08:00
type : Literal [ " curve_get_type " ] = " curve_get_type "
2023-09-29 16:05:40 -07:00
2024-01-06 18:32:21 -08:00
model_config = ConfigDict ( protected_namespaces = ( ) )
2023-08-30 15:59:51 -07:00
2023-11-28 23:50:50 -08:00
class curve_get_control_points ( BaseModel ) :
2024-02-24 17:03:55 -08:00
""" Get control points of the given curve. """
2023-08-30 15:59:51 -07:00
2023-11-29 10:32:31 -08:00
curve_id : str
2023-08-30 15:59:51 -07:00
2023-11-29 10:32:31 -08:00
type : Literal [ " curve_get_control_points " ] = " curve_get_control_points "
2023-08-30 15:59:51 -07:00
2024-01-06 18:32:21 -08:00
model_config = ConfigDict ( protected_namespaces = ( ) )
2023-08-30 15:59:51 -07:00
2023-11-28 23:50:50 -08:00
class take_snapshot ( BaseModel ) :
2024-02-24 17:03:55 -08:00
""" Take a snapshot of the current view. """
2023-08-30 15:59:51 -07:00
2023-11-28 23:50:50 -08:00
format : ImageFormat
2023-08-30 15:59:51 -07:00
2023-11-29 10:32:31 -08:00
type : Literal [ " take_snapshot " ] = " take_snapshot "
2023-08-30 15:59:51 -07:00
2024-01-06 18:32:21 -08:00
model_config = ConfigDict ( protected_namespaces = ( ) )
2023-08-30 15:59:51 -07:00
2023-11-28 23:50:50 -08:00
class make_axes_gizmo ( BaseModel ) :
""" Add a gizmo showing the axes. """
2023-08-30 15:59:51 -07:00
2023-11-28 23:50:50 -08:00
clobber : bool
2023-08-30 15:59:51 -07:00
2023-11-28 23:50:50 -08:00
gizmo_mode : bool
2023-08-30 15:59:51 -07:00
2023-11-29 10:32:31 -08:00
type : Literal [ " make_axes_gizmo " ] = " make_axes_gizmo "
2023-08-30 15:59:51 -07:00
2024-01-06 18:32:21 -08:00
model_config = ConfigDict ( protected_namespaces = ( ) )
2023-08-30 15:59:51 -07:00
2023-11-28 23:50:50 -08:00
class path_get_info ( BaseModel ) :
2024-02-24 17:03:55 -08:00
""" Query the given path. """
2023-09-06 11:27:00 -07:00
2023-11-29 10:32:31 -08:00
path_id : str
2023-09-06 11:27:00 -07:00
2023-11-29 10:32:31 -08:00
type : Literal [ " path_get_info " ] = " path_get_info "
2023-09-06 11:27:00 -07:00
2024-01-06 18:32:21 -08:00
model_config = ConfigDict ( protected_namespaces = ( ) )
2023-09-06 11:27:00 -07:00
2023-11-28 23:50:50 -08:00
class path_get_curve_uuids_for_vertices ( BaseModel ) :
2024-02-24 17:03:55 -08:00
""" Obtain curve ids for vertex ids """
2023-09-06 11:27:00 -07:00
2023-11-29 10:32:31 -08:00
path_id : str
2023-09-06 11:27:00 -07:00
2024-03-04 12:53:31 -08:00
type : Literal [ " path_get_curve_uuids_for_vertices " ] = (
2023-11-29 10:32:31 -08:00
" path_get_curve_uuids_for_vertices "
2024-03-04 12:53:31 -08:00
)
2023-09-06 11:27:00 -07:00
2023-11-29 10:32:31 -08:00
vertex_ids : List [ str ]
2023-09-06 11:27:00 -07:00
2024-01-06 18:32:21 -08:00
model_config = ConfigDict ( protected_namespaces = ( ) )
2023-09-06 11:27:00 -07:00
2024-07-18 12:05:04 -07:00
class path_get_curve_uuid ( BaseModel ) :
""" Obtain curve id by index """
index : int
path_id : str
type : Literal [ " path_get_curve_uuid " ] = " path_get_curve_uuid "
model_config = ConfigDict ( protected_namespaces = ( ) )
2023-11-28 23:50:50 -08:00
class path_get_vertex_uuids ( BaseModel ) :
2024-02-24 17:03:55 -08:00
""" Obtain vertex ids for a path """
2023-09-06 11:27:00 -07:00
2023-11-29 10:32:31 -08:00
path_id : str
2023-09-06 11:27:00 -07:00
2023-11-29 10:32:31 -08:00
type : Literal [ " path_get_vertex_uuids " ] = " path_get_vertex_uuids "
2023-09-06 11:27:00 -07:00
2024-01-06 18:32:21 -08:00
model_config = ConfigDict ( protected_namespaces = ( ) )
2023-09-06 11:27:00 -07:00
2024-07-26 18:08:45 -07:00
class path_get_sketch_target_uuid ( BaseModel ) :
""" Obtain the sketch target id (if the path was drawn in sketchmode) for a path """
path_id : str
type : Literal [ " path_get_sketch_target_uuid " ] = " path_get_sketch_target_uuid "
model_config = ConfigDict ( protected_namespaces = ( ) )
2023-11-28 23:50:50 -08:00
class handle_mouse_drag_start ( BaseModel ) :
2024-02-24 17:03:55 -08:00
""" Start dragging the mouse. """
2023-09-06 11:27:00 -07:00
2023-11-29 10:32:31 -08:00
type : Literal [ " handle_mouse_drag_start " ] = " handle_mouse_drag_start "
2023-09-06 11:27:00 -07:00
2023-11-28 23:50:50 -08:00
window : Point2d
2023-09-06 11:27:00 -07:00
2024-01-06 18:32:21 -08:00
model_config = ConfigDict ( protected_namespaces = ( ) )
2023-09-06 11:27:00 -07:00
2023-11-28 23:50:50 -08:00
class handle_mouse_drag_move ( BaseModel ) :
2024-02-24 17:03:55 -08:00
""" Continue dragging the mouse. """
2023-09-29 15:51:03 -07:00
2023-11-28 23:50:50 -08:00
sequence : Optional [ int ] = None
2023-09-29 15:51:03 -07:00
2023-11-29 10:32:31 -08:00
type : Literal [ " handle_mouse_drag_move " ] = " handle_mouse_drag_move "
2023-09-29 16:05:40 -07:00
2023-11-28 23:50:50 -08:00
window : Point2d
2023-09-29 15:51:03 -07:00
2024-01-06 18:32:21 -08:00
model_config = ConfigDict ( protected_namespaces = ( ) )
2023-09-29 15:51:03 -07:00
2023-11-28 23:50:50 -08:00
class handle_mouse_drag_end ( BaseModel ) :
2024-02-24 17:03:55 -08:00
""" Stop dragging the mouse. """
2023-09-29 15:51:03 -07:00
2023-11-29 10:32:31 -08:00
type : Literal [ " handle_mouse_drag_end " ] = " handle_mouse_drag_end "
2023-09-29 15:51:03 -07:00
2023-11-28 23:50:50 -08:00
window : Point2d
2023-09-29 15:51:03 -07:00
2024-01-06 18:32:21 -08:00
model_config = ConfigDict ( protected_namespaces = ( ) )
2023-09-29 15:51:03 -07:00
2023-11-28 23:50:50 -08:00
class remove_scene_objects ( BaseModel ) :
""" Remove scene objects. """
2023-09-29 15:51:03 -07:00
2023-11-29 10:32:31 -08:00
object_ids : List [ str ]
2023-09-29 15:51:03 -07:00
2023-11-29 10:32:31 -08:00
type : Literal [ " remove_scene_objects " ] = " remove_scene_objects "
2023-09-29 15:51:03 -07:00
2024-01-06 18:32:21 -08:00
model_config = ConfigDict ( protected_namespaces = ( ) )
2023-09-29 15:51:03 -07:00
2023-11-28 23:50:50 -08:00
class plane_intersect_and_project ( BaseModel ) :
""" Utility method. Performs both a ray cast and projection to plane-local coordinates. Returns the plane coordinates for the given window coordinates. """
2023-09-29 16:05:40 -07:00
2023-11-29 10:32:31 -08:00
plane_id : str
2023-09-29 15:51:03 -07:00
2023-11-29 10:32:31 -08:00
type : Literal [ " plane_intersect_and_project " ] = " plane_intersect_and_project "
2023-09-29 15:51:03 -07:00
2023-11-28 23:50:50 -08:00
window : Point2d
2023-09-29 15:51:03 -07:00
2024-01-06 18:32:21 -08:00
model_config = ConfigDict ( protected_namespaces = ( ) )
2023-09-29 15:51:03 -07:00
2023-11-28 23:50:50 -08:00
class curve_get_end_points ( BaseModel ) :
""" Find the start and end of a curve. """
2023-09-29 15:51:03 -07:00
2023-11-29 10:32:31 -08:00
curve_id : str
2023-09-29 15:51:03 -07:00
2023-11-29 10:32:31 -08:00
type : Literal [ " curve_get_end_points " ] = " curve_get_end_points "
2023-09-29 15:51:03 -07:00
2024-01-06 18:32:21 -08:00
model_config = ConfigDict ( protected_namespaces = ( ) )
2023-09-29 15:51:03 -07:00
2023-11-28 23:50:50 -08:00
class reconfigure_stream ( BaseModel ) :
""" Reconfigure the stream. """
2023-09-29 15:51:03 -07:00
2023-11-28 23:50:50 -08:00
fps : int
2023-09-29 15:51:03 -07:00
2023-11-28 23:50:50 -08:00
height : int
2023-09-29 15:51:03 -07:00
2023-11-29 10:32:31 -08:00
type : Literal [ " reconfigure_stream " ] = " reconfigure_stream "
2023-09-29 15:51:03 -07:00
2023-11-28 23:50:50 -08:00
width : int
2023-09-29 15:51:03 -07:00
2024-01-06 18:32:21 -08:00
model_config = ConfigDict ( protected_namespaces = ( ) )
2023-09-29 15:51:03 -07:00
2023-11-28 23:50:50 -08:00
class import_files ( BaseModel ) :
""" Import files to the current model. """
2023-09-29 15:51:03 -07:00
2023-11-28 23:50:50 -08:00
files : List [ ImportFile ]
2023-09-29 15:51:03 -07:00
2023-11-28 23:50:50 -08:00
format : InputFormat
2023-09-29 15:51:03 -07:00
2023-11-29 10:32:31 -08:00
type : Literal [ " import_files " ] = " import_files "
2023-09-29 15:51:03 -07:00
2024-01-06 18:32:21 -08:00
model_config = ConfigDict ( protected_namespaces = ( ) )
2023-09-29 15:51:03 -07:00
2024-02-24 17:03:55 -08:00
class set_scene_units ( BaseModel ) :
""" Set the units of the scene. For all following commands, the units will be interpreted as the given units. """
type : Literal [ " set_scene_units " ] = " set_scene_units "
unit : UnitLength
model_config = ConfigDict ( protected_namespaces = ( ) )
2023-11-28 23:50:50 -08:00
class mass ( BaseModel ) :
""" Get the mass of entities in the scene or the default scene. """
2023-09-29 15:51:03 -07:00
2023-11-29 10:32:31 -08:00
entity_ids : List [ str ]
2023-09-29 15:51:03 -07:00
2023-11-28 23:50:50 -08:00
material_density : float
2023-11-27 16:01:20 -08:00
2023-11-28 23:50:50 -08:00
material_density_unit : UnitDensity
2023-11-27 16:01:20 -08:00
2023-11-28 23:50:50 -08:00
output_unit : UnitMass
2023-09-29 15:51:03 -07:00
2023-11-29 10:32:31 -08:00
type : Literal [ " mass " ] = " mass "
2023-11-27 16:01:20 -08:00
2024-01-06 18:32:21 -08:00
model_config = ConfigDict ( protected_namespaces = ( ) )
2023-11-27 16:01:20 -08:00
2023-11-28 23:50:50 -08:00
class density ( BaseModel ) :
""" Get the density of entities in the scene or the default scene. """
2023-11-27 16:01:20 -08:00
2023-11-29 10:32:31 -08:00
entity_ids : List [ str ]
2023-11-27 16:01:20 -08:00
2023-11-28 23:50:50 -08:00
material_mass : float
2023-11-27 16:01:20 -08:00
2023-11-28 23:50:50 -08:00
material_mass_unit : UnitMass
2023-11-27 16:01:20 -08:00
2023-11-28 23:50:50 -08:00
output_unit : UnitDensity
2023-11-27 16:01:20 -08:00
2023-11-29 10:32:31 -08:00
type : Literal [ " density " ] = " density "
2023-11-27 16:01:20 -08:00
2024-01-06 18:32:21 -08:00
model_config = ConfigDict ( protected_namespaces = ( ) )
2023-11-27 16:01:20 -08:00
2023-11-28 23:50:50 -08:00
class volume ( BaseModel ) :
""" Get the volume of entities in the scene or the default scene. """
2023-11-27 16:01:20 -08:00
2023-11-29 10:32:31 -08:00
entity_ids : List [ str ]
2023-11-27 16:01:20 -08:00
2023-11-28 23:50:50 -08:00
output_unit : UnitVolume
2023-11-27 16:01:20 -08:00
2023-11-29 10:32:31 -08:00
type : Literal [ " volume " ] = " volume "
2023-09-29 16:05:40 -07:00
2024-01-06 18:32:21 -08:00
model_config = ConfigDict ( protected_namespaces = ( ) )
2023-09-29 16:05:40 -07:00
2023-11-28 23:50:50 -08:00
class center_of_mass ( BaseModel ) :
""" Get the center of mass of entities in the scene or the default scene. """
2023-09-29 16:05:40 -07:00
2023-11-29 10:32:31 -08:00
entity_ids : List [ str ]
2023-09-29 16:05:40 -07:00
2023-11-28 23:50:50 -08:00
output_unit : UnitLength
2023-09-29 16:05:40 -07:00
2023-11-29 10:32:31 -08:00
type : Literal [ " center_of_mass " ] = " center_of_mass "
2023-09-29 16:05:40 -07:00
2024-01-06 18:32:21 -08:00
model_config = ConfigDict ( protected_namespaces = ( ) )
2023-09-29 16:05:40 -07:00
2023-11-28 23:50:50 -08:00
class surface_area ( BaseModel ) :
""" Get the surface area of entities in the scene or the default scene. """
2023-09-29 16:05:40 -07:00
2023-11-29 10:32:31 -08:00
entity_ids : List [ str ]
2023-09-29 16:05:40 -07:00
2023-11-28 23:50:50 -08:00
output_unit : UnitArea
2023-09-29 16:05:40 -07:00
2023-11-29 10:32:31 -08:00
type : Literal [ " surface_area " ] = " surface_area "
2023-09-29 16:05:40 -07:00
2024-01-06 18:32:21 -08:00
model_config = ConfigDict ( protected_namespaces = ( ) )
2023-10-12 09:02:59 -07:00
2024-02-24 17:03:55 -08:00
class default_camera_focus_on ( BaseModel ) :
""" Focus the default camera upon an object in the scene. """
2023-11-27 16:01:20 -08:00
2024-02-24 17:03:55 -08:00
type : Literal [ " default_camera_focus_on " ] = " default_camera_focus_on "
2023-11-27 16:01:20 -08:00
2024-02-24 17:03:55 -08:00
uuid : str
2023-11-27 16:01:20 -08:00
2024-01-06 18:32:21 -08:00
model_config = ConfigDict ( protected_namespaces = ( ) )
2023-11-27 16:01:20 -08:00
2024-02-24 17:03:55 -08:00
class set_selection_type ( BaseModel ) :
""" When you select some entity with the current tool, what should happen to the entity? """
2023-12-21 08:14:08 -08:00
2024-02-24 17:03:55 -08:00
selection_type : SceneSelectionType
2023-12-21 08:14:08 -08:00
2024-02-24 17:03:55 -08:00
type : Literal [ " set_selection_type " ] = " set_selection_type "
2023-12-21 08:14:08 -08:00
2024-01-06 18:32:21 -08:00
model_config = ConfigDict ( protected_namespaces = ( ) )
2023-12-21 08:14:08 -08:00
2024-02-24 17:03:55 -08:00
class set_selection_filter ( BaseModel ) :
""" What kind of entities can be selected? """
2023-12-21 08:14:08 -08:00
2024-02-24 17:03:55 -08:00
filter : List [ EntityType ]
2023-12-21 08:14:08 -08:00
2024-02-24 17:03:55 -08:00
type : Literal [ " set_selection_filter " ] = " set_selection_filter "
2023-12-21 08:14:08 -08:00
2024-01-06 18:32:21 -08:00
model_config = ConfigDict ( protected_namespaces = ( ) )
2023-12-21 08:14:08 -08:00
2024-02-24 17:03:55 -08:00
class default_camera_set_orthographic ( BaseModel ) :
""" Use orthographic projection. """
2023-12-21 08:14:08 -08:00
2024-02-24 17:03:55 -08:00
type : Literal [ " default_camera_set_orthographic " ] = " default_camera_set_orthographic "
2023-12-21 08:14:08 -08:00
2024-01-06 18:32:21 -08:00
model_config = ConfigDict ( protected_namespaces = ( ) )
2023-12-21 08:14:08 -08:00
2024-02-24 17:03:55 -08:00
class default_camera_set_perspective ( BaseModel ) :
""" Use perspective projection. """
2023-12-21 08:14:08 -08:00
2024-02-24 17:03:55 -08:00
parameters : Optional [ PerspectiveCameraParameters ] = None
2023-12-21 08:14:08 -08:00
2024-02-24 17:03:55 -08:00
type : Literal [ " default_camera_set_perspective " ] = " default_camera_set_perspective "
2023-12-21 08:14:08 -08:00
2024-01-06 18:32:21 -08:00
model_config = ConfigDict ( protected_namespaces = ( ) )
2023-12-21 08:14:08 -08:00
2024-04-22 11:10:19 -07:00
class zoom_to_fit ( BaseModel ) :
""" Fit the view to the specified object(s). """
2024-08-20 13:10:56 -04:00
object_ids : List [ str ] = [ ]
2024-04-22 11:10:19 -07:00
padding : float
type : Literal [ " zoom_to_fit " ] = " zoom_to_fit "
model_config = ConfigDict ( protected_namespaces = ( ) )
2024-05-16 12:09:12 -07:00
class view_isometric ( BaseModel ) :
""" Fit the view to the scene with an isometric view. """
2024-08-20 13:10:56 -04:00
padding : float = 0.0
2024-05-16 12:09:12 -07:00
type : Literal [ " view_isometric " ] = " view_isometric "
model_config = ConfigDict ( protected_namespaces = ( ) )
2024-02-24 17:03:55 -08:00
class solid3d_get_extrusion_face_info ( BaseModel ) :
""" Get a concise description of all of an extrusion ' s faces. """
2024-01-06 14:56:45 -08:00
2024-02-24 17:03:55 -08:00
edge_id : str
2024-01-06 14:56:45 -08:00
2024-02-24 17:03:55 -08:00
object_id : str
2024-01-06 14:56:45 -08:00
2024-02-24 17:03:55 -08:00
type : Literal [ " solid3d_get_extrusion_face_info " ] = " solid3d_get_extrusion_face_info "
2024-01-06 18:32:21 -08:00
2024-02-24 17:03:55 -08:00
model_config = ConfigDict ( protected_namespaces = ( ) )
2024-01-06 14:56:45 -08:00
2024-02-24 17:03:55 -08:00
class edit_mode_exit ( BaseModel ) :
""" Exit edit mode """
2024-01-06 14:56:45 -08:00
2024-02-24 17:03:55 -08:00
type : Literal [ " edit_mode_exit " ] = " edit_mode_exit "
2024-01-06 14:56:45 -08:00
2024-01-06 18:32:21 -08:00
model_config = ConfigDict ( protected_namespaces = ( ) )
2024-01-06 14:56:45 -08:00
2024-02-24 17:03:55 -08:00
class select_clear ( BaseModel ) :
""" Clear the selection """
2024-01-06 14:56:45 -08:00
2024-02-24 17:03:55 -08:00
type : Literal [ " select_clear " ] = " select_clear "
2024-01-06 14:56:45 -08:00
2024-01-06 18:32:21 -08:00
model_config = ConfigDict ( protected_namespaces = ( ) )
2024-01-06 14:56:45 -08:00
2024-02-24 17:03:55 -08:00
class select_get ( BaseModel ) :
""" Find all IDs of selected entities """
2024-01-06 14:56:45 -08:00
2024-02-24 17:03:55 -08:00
type : Literal [ " select_get " ] = " select_get "
2024-01-06 14:56:45 -08:00
2024-01-06 18:32:21 -08:00
model_config = ConfigDict ( protected_namespaces = ( ) )
2024-01-06 14:56:45 -08:00
2024-04-05 13:12:19 -07:00
class get_num_objects ( BaseModel ) :
""" Get the number of objects in the scene """
type : Literal [ " get_num_objects " ] = " get_num_objects "
model_config = ConfigDict ( protected_namespaces = ( ) )
2023-11-29 00:39:14 -08:00
ModelingCmd = RootModel [
2023-11-29 10:32:31 -08:00
Annotated [
Union [
start_path ,
move_path_pen ,
extend_path ,
extrude ,
2024-04-05 13:12:19 -07:00
revolve ,
2024-06-04 09:38:51 -07:00
solid3d_shell_face ,
2024-04-05 13:12:19 -07:00
revolve_about_edge ,
2024-08-26 14:46:20 -07:00
loft ,
2023-11-29 10:32:31 -08:00
close_path ,
camera_drag_start ,
camera_drag_move ,
camera_drag_end ,
2024-03-04 12:53:31 -08:00
default_camera_get_settings ,
2023-11-29 10:32:31 -08:00
default_camera_look_at ,
2024-02-24 17:03:55 -08:00
default_camera_perspective_settings ,
2023-11-29 10:32:31 -08:00
default_camera_zoom ,
export ,
entity_get_parent_id ,
entity_get_num_children ,
entity_get_child_uuid ,
entity_get_all_child_uuids ,
2024-07-26 18:08:45 -07:00
entity_get_sketch_paths ,
2024-02-24 17:03:55 -08:00
entity_get_distance ,
2024-06-20 11:10:00 -07:00
entity_linear_pattern_transform ,
2024-02-24 17:03:55 -08:00
entity_linear_pattern ,
entity_circular_pattern ,
2024-04-05 13:12:19 -07:00
entity_make_helix ,
2024-04-22 13:41:53 -07:00
entity_mirror ,
2024-07-18 12:05:04 -07:00
entity_mirror_across_edge ,
2023-11-29 10:32:31 -08:00
edit_mode_enter ,
select_with_point ,
select_add ,
select_remove ,
2024-04-05 13:12:19 -07:00
scene_clear_all ,
2023-11-29 10:32:31 -08:00
select_replace ,
highlight_set_entity ,
highlight_set_entities ,
new_annotation ,
update_annotation ,
2024-04-17 09:49:04 -07:00
edge_lines_visible ,
2023-11-29 10:32:31 -08:00
object_visible ,
object_bring_to_front ,
2024-02-24 17:03:55 -08:00
object_set_material_params_pbr ,
2023-11-29 10:32:31 -08:00
get_entity_type ,
solid3d_get_all_edge_faces ,
2024-02-24 17:03:55 -08:00
solid2d_add_hole ,
2023-11-29 10:32:31 -08:00
solid3d_get_all_opposite_edges ,
solid3d_get_opposite_edge ,
solid3d_get_next_adjacent_edge ,
solid3d_get_prev_adjacent_edge ,
2024-02-24 17:03:55 -08:00
solid3d_fillet_edge ,
2024-03-04 13:08:49 -08:00
face_is_planar ,
face_get_position ,
2024-05-16 12:09:12 -07:00
face_get_center ,
2024-03-04 13:08:49 -08:00
face_get_gradient ,
2023-11-29 10:32:31 -08:00
send_object ,
entity_set_opacity ,
entity_fade ,
make_plane ,
plane_set_color ,
set_tool ,
mouse_move ,
mouse_click ,
sketch_mode_disable ,
2024-02-24 17:03:55 -08:00
get_sketch_mode_plane ,
curve_set_constraint ,
enable_sketch_mode ,
2024-04-05 13:12:19 -07:00
set_background_color ,
set_current_tool_properties ,
set_default_system_properties ,
2023-11-29 10:32:31 -08:00
curve_get_type ,
curve_get_control_points ,
take_snapshot ,
make_axes_gizmo ,
path_get_info ,
path_get_curve_uuids_for_vertices ,
2024-07-18 12:05:04 -07:00
path_get_curve_uuid ,
2023-11-29 10:32:31 -08:00
path_get_vertex_uuids ,
2024-07-26 18:08:45 -07:00
path_get_sketch_target_uuid ,
2023-11-29 10:32:31 -08:00
handle_mouse_drag_start ,
handle_mouse_drag_move ,
handle_mouse_drag_end ,
remove_scene_objects ,
plane_intersect_and_project ,
curve_get_end_points ,
reconfigure_stream ,
import_files ,
2024-02-24 17:03:55 -08:00
set_scene_units ,
2023-11-29 10:32:31 -08:00
mass ,
density ,
volume ,
center_of_mass ,
surface_area ,
2024-02-24 17:03:55 -08:00
default_camera_focus_on ,
2024-01-06 14:56:45 -08:00
set_selection_type ,
set_selection_filter ,
default_camera_set_orthographic ,
default_camera_set_perspective ,
2024-04-22 11:10:19 -07:00
zoom_to_fit ,
2024-05-16 12:09:12 -07:00
view_isometric ,
2024-02-24 17:03:55 -08:00
solid3d_get_extrusion_face_info ,
edit_mode_exit ,
select_clear ,
select_get ,
2024-04-05 13:12:19 -07:00
get_num_objects ,
2023-11-29 10:32:31 -08:00
] ,
Field ( discriminator = " type " ) ,
2023-11-28 14:29:16 -08:00
]
2023-11-29 00:39:14 -08:00
]