== EM.Cube's Python Functions for Geometric Object Transformation ==
====translate_byclone({{ArgTypeString}} label, {{ArgTypeString}} object, {{ArgTypeReal}} x_distx0, {{ArgTypeReal}} y_disty0, {{ArgTypeReal}} z_distz0)====
''Example:translate_byclone("NewObj","MyObj",10,10,x0)''
Description: Translates an object by Created a copy of the specified distances in each directionobject and repositions it at the given coordinates.
====translate_totranslate_by({{ArgTypeString}} labelobject, {{ArgTypeReal}} x_destx_dist, {{ArgTypeReal}} y_desty_dist, {{ArgTypeReal}} z_destz_dist)====
''Example:translate_totranslate_by("MyObj",2010,2010,x2x)''
Description: Translates an object to by the specified destinationdistances in each direction.
====rotatetranslate_to({{ArgTypeString}} labelobject, {{ArgTypeAnyArgTypeReal}} x0x_dest, {{ArgTypeAnyArgTypeReal}} y0y_dest, {{ArgTypeAnyArgTypeReal}} z0, {{ArgTypeAny}} radius, {{ArgTypeAny}} start_angle, {{ArgTypeAny}} end_anglez_dest)====
''Example:rotatetranslate_to("pyramid_1MyObj",020,020,0,10,10,100x2)''
Description: Draws a circular curve Translates an object in to the scene under the currently activated Material Group nodespecified destination. ====rotate({{ArgTypeString}} object, or modifies {{ArgTypeAny}} rot_angle_degree, {{ArgTypeAny}} rot_axis_x, {{ArgTypeAny}} rot_axis_y, {{ArgTypeAny}} rot_axis_z)==== ''Example: rotate("Pyramid_1",45,50,50,0)'' Description: Rotates an object about the Z-axis at a Circle given point. ====scale({{ArgTypeString}} object if Circle , {{ArgTypeAny}} scale_factor)==== 'label' already existsExample: scale("pyramid_1",2)'' Description: Scales an object by the specified scale factor. The parameters start_angle and end_angle are  ====mirror({{ArgTypeString}} object, {{ArgTypeAny}} x0, {{ArgTypeAny}} y0, {{ArgTypeAny}} z0, {{ArgTypeAny}} uX, {{ArgTypeAny}} uY, {{ArgTypeAny}} uZ)==== ''Example: mirror("pyramid_1",0,0,0,1,0,0)'' Description: Mirrors an object in degreesa plane defined by the specified point coordinates and specified normal vector components. ====group({{ArgTypeString}} label, {{ArgTypeString}} object_1, {{ArgTypeString}} object_2, ...)==== ''Example: group("Composite_1","Box_1","Box_2","Box_3")'' Description: Groups a number of objects into a composite object with the given label.
====array({{ArgTypeString}} label, {{ArgTypeString}} object, {{ArgTypeAny}} x_count, {{ArgTypeAny}} y_count, {{ArgTypeAny}} z_count, {{ArgTypeAny}} x_spacing, {{ArgTypeAny}} y_spacing, {{ArgTypeAny}} z_spacing)====
''Example:array("Array_1","Rect_Strip_1",4,4,1,"spacing"50,"spacing"50,0)''
Description: Create Creates or modify modifies an Array array object. ====array_custom({{ArgTypeString}} label, {{ArgTypeString}} object, {{ArgTypeAny}} x_count, {{ArgTypeAny}} y_count, {{ArgTypeAny}} z_count, {{ArgTypeAny}} x_spacing, {{ArgTypeAny}} y_spacing, {{ArgTypeAny}} z_spacing, {{ArgTypeAny}} x0, {{ArgTypeAny}} y0, {{ArgTypeAny}} z0, {{ArgTypeAny}} rot_x, {{ArgTypeAny}} rot_y, {{ArgTypeAny}} rot_z)==== ''Example: array_custom("Array_1","Rect_Strip_1",4,4,1,50,50,0,100,100,20,0,0,45)'' Description: Creates or modifies an array object and sets its local coordinate system and rotation angles.
====explode({{ArgTypeString}} object)====
''Example:explode("MyArray")''
Description: Performs Explodes an explode operation on a CAD object named 'object'into its basic primitives.
====subtract({{ArgTypeString}} label, {{ArgTypeString}} object_1, {{ArgTypeString}} object_2)====
''Example:subtract("Subtract_Object","Rect_Strip1","Rect_Strip2")''
Description: Creates a Boolean object named 'label' by subtracting object_2 from object_1. An error will be thrown if a Boolean object named 'label' already exists.
====union({{ArgTypeString}} label, {{ArgTypeString}} object_1, {{ArgTypeString}} object_2)====
''Example:union("Union_Object","Rect_Strip1","Rect_Strip2")''
Description: Creates a Boolean object named 'label' by unioning object_1 and object_2. An error will be thrown if a Boolean object named 'label' already exists.
====intersect({{ArgTypeString}} label, {{ArgTypeString}} object_1, {{ArgTypeString}} object_2)====
''Example:intersect("Intersection_Object","Rect_Strip1","Rect_Strip2")''
Description: Creates a Boolean object named 'label' by intersecting object_1 and object_2. An error will be thrown if a Boolean object named 'label' already exists.
====extrude({{ArgTypeString}} label, {{ArgTypeString}} object, {{ArgTypeAny}} heightextrude_height, {{ArgTypeAny}} cap_ends)====
''Example:extrude("Extrude_ObjectExtrude_1","Rect_Strip1",50)''
Description: Creates or modifies an Extrusion extrusion object from CAD a specified object 'object'by the specified height. If modifying an existing extrusion, 'object' is ignored, and the pre-existing primitive is used. This command can only extrudeobjects that have a single face and will extrude along the face's normal. ====loft({{ArgTypeString}} label, {{ArgTypeString}} object, {{ArgTypeAny}} loft_height, {{ArgTypeAny}} cap_base)==== ''Example: loft("Loft_1","Rect_Strip1",50)'' Description: Creates or modifies a loft object from a specified object by the specified height.If modifying an existing loft object, the pre-existing primitive is used..) This command can only extrude loft objects that have a single face, and will extrude in the direction of loft along the face's normal.
====revolve({{ArgTypeString}} label, {{ArgTypeString}} object, {{ArgTypeAny}} x0, {{ArgTypeAny}} y0, {{ArgTypeAny}} z0, {{ArgTypeAny}} uX, {{ArgTypeAny}} uY, {{ArgTypeAny}} uZ, {{ArgTypeAny}} rot_angle)====
''Example:revolve("Rev1","Line_1",0,0,0,0,0,1,360)'' Description: Creates or modifies a revolution object from a specified object. If modifying an existing revolution object, the pre-existing primitive object is used. (x0,y0,z0) specifies the center of revolution, and (uX,uY,uZ) specifies the revolution axis. The revolution angle "rot_angle" is given in degrees. ====consolidate({{ArgTypeString}} object)==== ''Example: consolidate("Poly_1")'' Description: Consolidates a specified object. ====spline_fit({{ArgTypeString}} object)==== ''Example: spline_fit("Poly_1")'' Description: Applies spline fit transformation on a specified polymesh, polyline or polystrip object. ====fill_curve({{ArgTypeString}} object)==== ''Example: fill_curve("Curve_1")'' Description: Fill the interior of the specified closed curve object. ====merge_curve({{ArgTypeString}} object_1, {{ArgTypeString}} object_2)==== ''Example: merge_curve("Curve_1","Curve_2")'' Description: Merges two specified curve objects into a single curve. ====polygonize({{ArgTypeString}} object, {{ArgTypeString}} side_length)==== ''Example: polygonize("Cric_1",2)'' Description: Polygonizes the specified surface or curve object by the specified side length. The results is a polystrip or a polyline. ====polymesh({{ArgTypeString}} label, {{ArgTypeString}} object, {{ArgTypeString}} edge_length)==== ''Example: polymesh("Poly_1","Cric_1",2)'' Description: Discretizes the specified solid or surface object by the specified edge length. The results is a polymesh object. ====fillet({{ArgTypeString}} object, {{ArgTypeString}} radius)==== ''Example: fillet("Rect_1",5)'' Description: Fillets the corners of the specified surface or curve object by the specified radius. ====slice({{ArgTypeString}} object, {{ArgTypeAny}} x0, {{ArgTypeAny}} y0, {{ArgTypeAny}} z0, {{ArgTypeAny}} uX, {{ArgTypeAny}} uY, {{ArgTypeAny}} uZ)==== ''Example: fillet("Rect_1",5)'' Description: Slices the specified object into two parts using the specified plane given by the point coordinates and normal vector coordinates. ====roughen({{ArgTypeString}} label, {{ArgTypeString}} object, {{ArgTypeAny}} rms_height, {{ArgTypeAny}} correl_length)==== ''Example: roughen("Rect_1",1,5)'' Description: Roughens the surface of the specified object based on the specified RMS height and correlation length. ====random_group({{ArgTypeString}} label, {{ArgTypeString}} key_object, {{ArgTypeAny}} container_object, {{ArgTypeAny}} element_count)==== ''Example: random_group("Rand_1","Rect_1","Box_1",100)'' Description: Creates a random group using the specified key object and confines them in the specified container object. ====strip_sweep({{ArgTypeString}} object, {{ArgTypeAny}} width)==== ''Example: strip_sweep("Curve_1",5)'' Description: Creates a strip version of a given curve object. ====pipe_sweep({{ArgTypeString}} object, {{ArgTypeAny}} radius)==== ''Example: pipe_sweep("Curve_1",5)'' Description: Creates a pipe version of a given curve object. ====rail_sweep({{ArgTypeString}} rail_object, {{ArgTypeAny}} sweep_object)==== ''Example: rail_sweep("Curve_1","Curve_2")''
Description: Creates or modifies a Revolution Rail-sweeps the specified sweep object called 'label', with a primitive object named 'object'. If modifying an existing Revolution object, 'object' is ignored, and along the pre-existing primitive specified curve object is used. (x0,y0,z0) specifies the center of revolution, and (uX,uY,uZ) specifies the revolution axis. rot_angle is in degrees.
== EM.Cube's Python Functions for Material or Object Group Creation ==