Capabilities related to creating and manipulating 3D shapes.
Part::
implements()
Part::
create_cube(width,
length,
height,
keyword_arguments)
Adds cuboid geometry to a part.
width
Type: string,float,Dimension
length
Type: string,float,Dimension
height
Type: string,float,Dimension
keyword_arguments
Information: key-value pairs to pass onto the native api
Type: object
Required: False
Part::
create_cone(radius,
height,
draft_radius,
keyword_arguments)
Adds cone geometry to a part.
radius
Type: string,float,Dimension
height
Type: string,float,Dimension
draft_radius
Type: string,float,Dimension
Default Value: 0
keyword_arguments
Information: key-value pairs to pass onto the native api
Type: object
Required: False
Part::
create_cylinder(radius,
height,
keyword_arguments)
Adds cylinder geometry to a part.
radius
Type: string,float,Dimension
height
Type: string,float,Dimension
keyword_arguments
Information: key-value pairs to pass onto the native api
Type: object
Required: False
Part::
create_torus(inner_radius,
outer_radius,
keyword_arguments)
Adds torus geometry to a part.
inner_radius
Type: string,float,Dimension
outer_radius
Type: string,float,Dimension
keyword_arguments
Information: key-value pairs to pass onto the native api
Type: object
Required: False
Part::
create_sphere(radius,
keyword_arguments)
Adds sphere geometry to a part.
radius
Type: string,float,Dimension
keyword_arguments
Information: key-value pairs to pass onto the native api
Type: object
Required: False
Part::
create_gear(outer_radius,
addendum,
inner_radius,
dedendum,
height,
pressure_angle,
number_of_teeth,
skew_angle,
conical_angle,
crown_angle,
keyword_arguments)
Adds gear geometry to a part.
outer_radius
Type: string,float,Dimension
addendum
Type: string,float,Dimension
inner_radius
Type: string,float,Dimension
dedendum
Type: string,float,Dimension
height
Type: string,float,Dimension
pressure_angle
Type: string,float,Angle
Default Value: 20d
number_of_teeth
Type: int
Default Value: 12
skew_angle
Type: string,float,Angle
Default Value: 0
conical_angle
Type: string,float,Angle
Default Value: 0
crown_angle
Type: string,float,Angle
Default Value: 0
keyword_arguments
Information: key-value pairs to pass onto the native api
Type: object
Required: False
Part::
clone(new_name,
copy_landmarks)
Clone an existing Part with its geometry and properties. Returns the new Part.
returnType: Part
copy_landmarks
Type: boolean
Default Value: True
Part::
union(with_part,
delete_after_union,
is_transfer_landmarks)
Boolean union
delete_after_union
Type: boolean
Default Value: True
is_transfer_landmarks
Type: boolean
Default Value: False
Part::
subtract(with_part,
delete_after_subtract,
is_transfer_landmarks)
Boolean subtraction
delete_after_subtract
Type: boolean
Default Value: True
is_transfer_landmarks
Type: boolean
Default Value: False
Part::
intersect(with_part,
delete_after_intersect,
is_transfer_landmarks)
Boolean intersection
delete_after_intersect
Type: boolean
Default Value: True
is_transfer_landmarks
Type: boolean
Default Value: False
Part::
hollow(thickness_x,
thickness_y,
thickness_z,
start_axis,
flip_axis)
Remove vertices, if necessary, until the part has a specified wall thickness.
thickness_x
Type: string,float,Dimension
thickness_y
Type: string,float,Dimension
thickness_z
Type: string,float,Dimension
start_axis
Type: string,int,Axis
Default Value: z
flip_axis
Type: boolean
Default Value: False
Part::
thicken(radius)
Uniformly add a wall around a Part.
radius
Type: string,float,Dimension
Part::
hole(hole_landmark,
radius,
depth,
normal_axis,
flip_axis,
initial_rotation_x,
initial_rotation_y,
initial_rotation_z,
mirror_about_entity_or_landmark,
mirror_axis,
mirror,
circular_pattern_instance_count,
circular_pattern_instance_separation,
circular_pattern_instance_axis,
circular_pattern_about_entity_or_landmark,
linear_pattern_instance_count,
linear_pattern_instance_separation,
linear_pattern_instance_axis,
linear_pattern2nd_instance_count,
linear_pattern2nd_instance_separation,
linear_pattern2nd_instance_axis)
Create a hole.
radius
Type: string,float,Dimension
depth
Type: string,float,Dimension
normal_axis
Type: string,int,Axis
Default Value: z
flip_axis
Type: boolean
Default Value: False
initial_rotation_x
Type: string,float,Angle
Default Value: 0.0
initial_rotation_y
Type: string,float,Angle
Default Value: 0.0
initial_rotation_z
Type: string,float,Angle
Default Value: 0.0
mirror_about_entity_or_landmark
Type: string,Entity
Required: False
mirror_axis
Type: string,int,Axis
Default Value: x
mirror
Type: boolean
Default Value: False
circular_pattern_instance_count
Type: int
Default Value: 1
circular_pattern_instance_separation
Type: string,float,Angle
Default Value: 0.0
circular_pattern_instance_axis
Type: string,int,Axis
Default Value: z
circular_pattern_about_entity_or_landmark
Type: string,Entity
Required: False
linear_pattern_instance_count
Type: int
Default Value: 1
linear_pattern_instance_separation
Type: string,float,Dimension
Default Value: 0.0
linear_pattern_instance_axis
Type: string,int,Axis
Default Value: x
linear_pattern2nd_instance_count
Type: int
Default Value: 1
linear_pattern2nd_instance_separation
Type: string,float,Dimension
Default Value: 0.0
linear_pattern2nd_instance_axis
Type: string,int,Axis
Default Value: y
Part::
twist(angle,
screw_pitch,
iterations,
axis)
AKA Helix, Screw. Revolve an entity
screw_pitch
Type: string,float,Dimension
iterations
Type: int
Default Value: 1
axis
Type: string,int,Axis
Default Value: z
Part::
set_material(material_name)
Assign a known material to this part.
Part::
is_colliding_with_part(other_part)
Check if this part is colliding with another.
returnType: boolean
Part::
fillet_all_edges(radius,
use_width)
Fillet all edges.
radius
Type: string,float,Dimension
use_width
Type: boolean
Default Value: False
Part::
fillet_edges(radius,
landmarks_near_edges,
use_width)
Fillet specific edges.
radius
Type: string,float,Dimension
landmarks_near_edges
Type: list[string,Landmark]
use_width
Type: boolean
Default Value: False
Part::
fillet_faces(radius,
landmarks_near_faces,
use_width)
Fillet specific faces.
radius
Type: string,float,Dimension
landmarks_near_faces
Type: list[string,Landmark]
use_width
Type: boolean
Default Value: False
Part::
chamfer_all_edges(radius)
Chamfer all edges.
radius
Type: string,float,Dimension
Part::
chamfer_edges(radius,
landmarks_near_edges)
Chamfer specific edges.
radius
Type: string,float,Dimension
landmarks_near_edges
Type: list[string,Landmark]
Part::
chamfer_faces(radius,
landmarks_near_faces)
Chamfer specific faces.
radius
Type: string,float,Dimension
landmarks_near_faces
Type: list[string,Landmark]
Part::
select_vertex_near_landmark(landmark_name)
Select the vertex closest to a Landmark on the entity (in UI).
landmark_name
Type: string,Landmark
Required: False
Part::
select_edge_near_landmark(landmark_name)
Select an edge closest to a landmark on the entity (in UI).
landmark_name
Type: string,Landmark
Required: False
Part::
select_face_near_landmark(landmark_name)
Select a face closest to a landmark on the entity (in UI).
landmark_name
Type: string,Landmark
Required: False
Part::
constructor(name,
description,
native_instance)
description
Type: string
Required: False
native_instance
Information: A cached instance of the native object. This may become stale.
Type: any
Required: False
Part::
is_exists()
Check if an entity exists
returnType: boolean
Part::
rename(new_name,
renamelinked_entities_and_landmarks)
Rename the entity, with an option to rename linked landmarks and underlying data.
renamelinked_entities_and_landmarks
Type: boolean
Default Value: True
Part::
delete(remove_children)
Delete the entity from the scene. You may need to delete an associated joint or other features.
remove_children
Type: boolean
Default Value: True
Part::
is_visible()
Returns whether the entity is visible in the scene.
returnType: boolean
Part::
set_visible(is_visible)
Toggles visibility of an entity in the scene.
Part::
apply(rotation,
scale,
location,
modifiers)
Apply any modifications. This is application specific, but a general function is that it finalizes any changes made to an entity.
rotation
Type: boolean
Default Value: True
scale
Type: boolean
Default Value: True
location
Type: boolean
Default Value: False
modifiers
Type: boolean
Default Value: True
Part::
get_native_instance()
Get the native API's object instance. For example, in Blender API, this would return a bpy.object instance.
returnType: any
Part::
get_location_world()
Get the entities XYZ location relative to World Space.
returnType: Point
Part::
get_location_local()
Get the entities XYZ location relative to Local Space.
returnType: Point
Part::
select()
Select the entity (in UI).
Part::
translate_xyz(x,
y,
z)
Translate in the XYZ directions. Pass a number, Dimension or Dimension-String (e.g. '2cm') to scale to a specific length.
x
Type: string,float,Dimension
y
Type: string,float,Dimension
z
Type: string,float,Dimension
Part::
translate_x(amount)
Translate in the X direction. Pass a number or Dimension or Dimension-String (e.g. '2cm') to translate to a specific length.
amount
Type: string,float,Dimension
Part::
translate_y(amount)
Translate in the Y direction. Pass a number or Dimension or Dimension-String (e.g. '2cm') to translate to a specific length.
amount
Type: string,float,Dimension
Part::
translate_z(amount)
Translate in the z direction. Pass a number or Dimension or Dimension-String (e.g. '2cm') to translate to a specific length.
amount
Type: string,float,Dimension
Part::
rotate_xyz(x,
y,
z)
Rotate in the XYZ direction. Default units is degrees. Pass in a number, Angle or Angle-String (e.g. 'PI/4radians' or 'PI/4r' or '90d'
Part::
rotate_x(rotation)
Rotate in the X direction. Default units is degrees. Pass in a number, Angle or Angle-String (e.g. 'PI/4radians' or 'PI/4r' or '90d'
Part::
rotate_y(rotation)
Rotate in the Y direction. Default units is degrees. Pass in a number, Angle or Angle-String (e.g. 'PI/4radians' or 'PI/4r' or '90d'
Part::
rotate_z(rotation)
Rotate in the Z direction. Default units is degrees. Pass in a number, Angle or Angle-String (e.g. 'PI/4radians' or 'PI/4r' or '90d'
Part::
get_bounding_box()
Get the Boundary Box around the entity.
returnType: BoundaryBox
Part::
get_dimensions()
Get the length span in each point axis (X,Y,Z).
returnType: Dimensions
Part::
create_landmark(landmark_name,
x,
y,
z)
Shortcut for creating and assigning a landmark to this entity. Returns a Landmark instance.
returnType: Landmark
x
Type: string,float,Dimension
y
Type: string,float,Dimension
z
Type: string,float,Dimension
Part::
get_landmark(landmark_name)
Get the landmark by name
returnType: Landmark
landmark_name
Type: string,PresetLandmark