Share

PartOrienter

[Desktop Automation]

This object finds orientation solutions for a given part optimized by minimizing against a set of variables.

Properties

Property Read/write Type Description
cutoff_radian Read/Write Number Sets the angle where the part needs support structures, given in radians
cutoff_degree Write Number Sets the angle where the part needs support structures, given in degrees
deterministicrngenabled Read/Write Boolean Enables a deterministic RNG for the initial positions of the orienter
distance_from_platform Read/Write Number Resulting distance to platform
Rngseed Read/Write Number Seed for the random number generator for the initial positions
rotation_axis Read/Write String Sets freedom of rotations. Valid values are 'arbitrary', 'x', 'y'
smallest_distance_between_minima_degree Write Number Sets the smallest rotation distance between to calculated solutions, given in degrees. The smaller the angle the more solutions are returned.
smallest_distance_between_minima_radian Read/Write Number Sets the smallest rotation distance between to calculated solutions, given in radians. The smaller the angle the more solutions are returned.
solutioncount Read Number Number of calculated solutions
support_bottom_surface Read/Write Boolean Sets whether a solution's lowest surface parallel to the XY plane needs support, too, counting against the support_area and support_volume goals

Back to top

Methods

Name Syntax Description
get_best_solution_for s = orienter:get_best_solution_for(criteria: String); Returns the best orientation for the specified criterion. These criteria are allowed: 'outbox_volume', 'part_height', 'support_area', 'support_volume', and 'center_of_gravity_height'
get_matrix_from_solution matrix = orienter:get_matrix_from_solution( solution:lua_json) Creates a matrix from a solution JSON object. This matrix can be applied to a mesh object, rotating it to the calculated orientation.
get_solution s = orienter:get_solution(Index:Number); Returns the orientation solution for specific index
search_orientation orienter:search_orientation(); Calculates part orientations
search_orientation_with_progress orienter:search_orientation_with_progress (start_progress:Number; end_progress:Number); Calculates part orientations and shows a progress bar. Start and end progress numbers are optional percentage values. This is useful to show the progress bar in a specific range (e.g. 20 % to 40 %) [Desktop Automation]
limitbuildheight orienter:limitbuildheight(height: Number); Limit the maximum build height in millimeters. Set to zero to deactivate build height limitation

Back to top

Orientation solution JSON

An orientation solution is a lua_json object with these attributes:

Attribute Description
outbox_volume Outbox volume of the part
part_height Part height
support_area Support area of the part
support_volume Support volume of the part
center_of_gravity_x Center of gravity x
center_of_gravity_y Center of gravity y
center_of_gravity_z Center of gravity z
rotation_axis_x Rotation axis in x
rotation_axis_y Rotation axis in y
rotation_axis_z Rotation axis in z
rotation_radian Rotation angle in radian
rotation_degree Rotation angle in degree
rotation_matrix Rotation 4×4 matrix as string. The matrix is column-major.

Back to top

Was this information helpful?