== EM.Cube's Python Functions for Geometric Object Creation ==
Â
====activate====
Â
SYNTAX: activate({{ArgTypeString}} group_node_label)
Â
EXAMPLE: ''activate("Color_1")''
Â
DESCRIPTION: Activates a color, material or object group in the current active [[EM.Cube]] module.
====array====
DESCRIPTION: Draws a circular curve object in the project workspace under the currently activated material group node, or modifies the circle named 'label' if it already exists. The parameters start_angle and end_angle are in degrees.
Â
====clone====
Â
SYNTAX: clone({{ArgTypeString}} label, {{ArgTypeString}} object, {{ArgTypeReal}} x0, {{ArgTypeReal}} y0, {{ArgTypeReal}} z0)
Â
EXAMPLE: ''clone("NewObj","MyObj",10,10,0)''
Â
DESCRIPTION: Creates a copy of the specified object and repositions it at the given coordinates.
Â
====close_curve====
Â
SYNTAX: close_curve({{ArgTypeString}} label, {{ArgTypeString}} close_state)
Â
EXAMPLE: ''close_curve("Curve_1",1)''
Â
DESCRIPTION: Sets the open/close state of a polyline or NURBS curve. Use 0 for open curve and 1 for close curve.
Â
====color_group====
Â
SYNTAX: color_group({{ArgTypeString}} label)
Â
EXAMPLE: ''color_group("Color_1")''
Â
DESCRIPTION: Creates a color group in CubeCAD module. If the color group 'label' already exists, the group is activated.
====cone====
DESCRIPTION: Draws a cone object in the project workspace under the currently activated material group node, or modifies the cone named 'label' if it already exists. The arguments start_angle and end_angle are in degrees and specify a sweep about the cone's azimuth axis.
Â
====consolidate====
Â
SYNTAX: consolidate({{ArgTypeString}} object)
Â
EXAMPLE: ''consolidate("Poly_1")''
Â
DESCRIPTION: Consolidates a specified object.
====cylinder====
DESCRIPTION: Draws an ellipsoid object in the project workspace under the currently activated material group node, or modifies the ellipsoid named 'label' if it already exists. The arguments start_angle and end_angle are in degrees and specify a sweep about the ellipsoid's azimuth axis.
Â
====explode====
Â
SYNTAX: explode({{ArgTypeString}} object)
Â
EXAMPLE: ''explode("MyArray")''
Â
DESCRIPTION: Explodes an object into its basic primitives.
====export_dxf====
DESCRIPTION: Exports the physical structure of the project workspacean to an STL model file. If the file path is not specified, the current project folder is assumed as the path.
Â
====extrude====
Â
SYNTAX: extrude({{ArgTypeString}} label, {{ArgTypeString}} object, {{ArgTypeAny}} extrude_height, {{ArgTypeAny}} cap_ends)
Â
EXAMPLE: ''extrude("Extrude_1","Rect_Strip1",50)''
Â
DESCRIPTION: Creates or modifies an extrusion object from a specified object by the specified height. If modifying an existing extrusion object, the pre-existing primitive is used. This command can only extrude objects that have a single face and will extrude along the face's normal.
Â
====fill_curve====
Â
SYNTAX: fill_curve({{ArgTypeString}} object)
Â
EXAMPLE: ''fill_curve("Curve_1")''
Â
DESCRIPTION: Fill the interior of the specified closed curve object.
Â
====fillet====
Â
fillet({{ArgTypeString}} object, {{ArgTypeAny}} radius)
Â
EXAMPLE: ''fillet("Rect_1",5)''
Â
DESCRIPTION: Fillets the corners of the specified surface or curve object by the specified radius.
====fractal_tree====
DESCRIPTION: Generates a fractal tree in the project workspace under the currently activated material group node, or modifies the fractal tree named 'label' if it already exists.
Â
====freeze====
Â
SYNTAX: freeze({{ArgTypeString}} object, {{ArgTypeReal}} freeze_state)
Â
EXAMPLE: ''freeze("MyObj",1)''
Â
DESCRIPTION: Sets the freeze state of an object (0/1).
Â
====get_area====
Â
SYNTAX: get_area({{ArgTypeString}} object)
Â
EXAMPLE: ''get_area("ellipse_1")''
Â
DESCRIPTION: Returns the area of a surface object or the total surface area of a solid object.
Â
====get_axis====
Â
SYNTAX: get_axis({{ArgTypeString}} object, {{ArgTypeString}} axis, {{ArgTypeString}} coordinate)
Â
EXAMPLE: ''get_axis("pyramid_1","x","y")''
Â
DESCRIPTION: Returns the specified coordinate of the unit vector along the specified local axis of an object.
Â
====get_extent====
Â
SYNTAX: get_extent({{ArgTypeString}} object, {{ArgTypeString}} coordinate)
Â
EXAMPLE: ''get_extent("pyramid_1","x")''
Â
DESCRIPTION: Returns the size of the bounding box of an object along the specified direction.
Â
====get_lcs====
Â
SYNTAX: get_lcs({{ArgTypeString}} object, {{ArgTypeString}} coordinate)
Â
EXAMPLE: ''get_lcs("pyramid_1","x")''
Â
DESCRIPTION: Returns the specified coordinate of the LCS of an object.
Â
====get_lcs_offset====
Â
SYNTAX: get_lcs_offset({{ArgTypeString}} object, {{ArgTypeAny}} x_off, {{ArgTypeAny}} y_off, {{ArgTypeAny}} z_off, {{ArgTypeString}} coordinate)
Â
EXAMPLE: ''get_lcs_offset("box_1",50,50,0,"x")''
Â
DESCRIPTION: Returns the specified coordinate of the LCS of an object after being translated by the specified offset values along the three principal axes.
Â
====get_length====
Â
SYNTAX: get_length({{ArgTypeString}} object)
Â
EXAMPLE: ''get_length("helix_1")''
Â
DESCRIPTION: Returns the length of a curve object.
Â
====get_rot====
Â
SYNTAX: get_rot({{ArgTypeString}} object, {{ArgTypeString}} coordinate)
Â
EXAMPLE: ''get_rot("pyramid_1","x")''
Â
DESCRIPTION: Returns the specified rotation angle of an object.
Â
====get_vertex====
Â
SYNTAX: get_vertex({{ArgTypeString}} object, {{ArgTypeAny}} node_index, {{ArgTypeString}} coordinate)
Â
EXAMPLE: ''get_vertex("pyramid_1",0,"x")''
Â
DESCRIPTION: Returns the specified coordinate of the specified vertex of the bounding box of an object. The vertices are specified by node indices. The lower front left corner has an index of 0, while the upper back right corner has an index of 7. The indices are numbered counterclockwise, with the bottom face first and top face next.
Â
====get_volume====
Â
SYNTAX: get_volume({{ArgTypeString}} object)
Â
EXAMPLE: ''get_volume("pyramid_1")''
Â
DESCRIPTION: Returns the volume of a solid object.
Â
====group====
Â
SYNTAX: 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.
====helix====
DESCRIPTION: Imports an external STEP model file to the project workspace. If the file path is not specified, the current project folder is assumed as the path.
Â
====intersect====
Â
SYNTAX: 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.
====line====
DESCRIPTION: Draws a Line object in the project workspace under the currently activated material group node, or modifies the line named 'label' if it already exists. Without the argument "dir", a vertical line is drawn by default.
Â
====loft====
Â
SYNTAX: 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 loft objects that have a single face and will loft along the face's normal.
Â
====merge_curve====
Â
SYNTAX: 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.
Â
====mirror====
Â
SYNTAX: 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 a plane defined by the specified point coordinates and specified normal vector components.
Â
====move_to====
Â
SYNTAX: move_to({{ArgTypeString}} object, {{ArgTypeString}} group_node_label[, {{ArgTypeString}} module_name])
Â
EXAMPLE: ''move_to("NewObj","MyObj",10,10,0)''
Â
DESCRIPTION: Transfers an object from its current material/object group node in the navigation tree to another node or optionally to another [[EM.Cube]] module.
====nurbs_curve====
DESCRIPTION: Generates a parametric surface in the project workspace under the currently activated material group node, or modifies the parametric surface named 'label' if it already exists.
Â
====pipe_sweep====
Â
SYNTAX: pipe_sweep({{ArgTypeString}} object, {{ArgTypeAny}} radius)
Â
EXAMPLE: ''pipe_sweep("Curve_1",5)''
Â
DESCRIPTION: Creates a pipe version of a given curve object.
====point====
DESCRIPTION: Draws a regular polygon object in the project workspace under the currently activated material group node, or modifies the regular polygon object named 'label' if it already exists.
Â
====polygonize====
Â
SYNTAX: polygonize({{ArgTypeString}} object, {{ArgTypeAny}} 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.
====polyline====
DESCRIPTION: Creates or modifies a PolyLine object in the project workspace. Each point is represented with a Python tuple type. The poly_line is closed if p0 is specified again as pn, otherwise, it is open.
Â
====polymesh====
Â
SYNTAX: polymesh({{ArgTypeString}} label, {{ArgTypeString}} object, {{ArgTypeAny}} 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.
====polystrip====
DESCRIPTION: Draws a radial strip object in the project workspace under the currently activated material group node, or modifies the radial strip object named 'label' if it already exists.
====rect_striprail_sweep====
SYNTAX: rect_striprail_sweep({{ArgTypeString}} labelrail_object, {{ArgTypeAny}} x0, {{ArgTypeAny}} y0, {{ArgTypeAny}} z0, {{ArgTypeAny}} side_x, {{ArgTypeAnyArgTypeString}} side_ysweep_object)
EXAMPLE: ''rect_striprail_sweep("my_rectangleCurve_1",0,0,0,50,20"Curve_2")''
DESCRIPTION: Draws a rectangle Strip Rail-sweeps the specified sweep object in the project workspace under the currently activated material group node, or modifies along the rectangle strip specified curve object named 'label' if it already exists.
====sphererandom_group====
SYNTAX: sphererandom_group({{ArgTypeString}} label, {{ArgTypeAnyArgTypeString}} x0key_object, {{ArgTypeAny}} y0, {{ArgTypeAny}} z0, {{ArgTypeAny}} radius[, {{ArgTypeAnyArgTypeString}} start_anglecontainer_object, {{ArgTypeAny}} end_angle]element_count)
EXAMPLE: ''sphererandom_group("Sphere_1Rand_1",0"Rect_1",0,0,10,0"Box_1",180100)''
DESCRIPTION: Draws Creates a sphere random group using the specified key object in the project workspace under the currently activated Material Group node, or modifies the sphere named 'label' if it already exists. The arguments start_angle and end_angle are confines them in degrees and specify a sweep about the sphere's azimuth axisspecified container object.
====spiral_curverect_strip====
SYNTAX: spiral_curverect_strip({{ArgTypeString}} label, {{ArgTypeAny}} x0, {{ArgTypeAny}} y0, {{ArgTypeAny}} z0, {{ArgTypeAny}} radius_innerside_x, {{ArgTypeAny}} radius_outer, {{ArgTypeAny}} nturns, {{ArgTypeAny}} spiral_dir, {{ArgTypeAny}} is_dualside_y)
EXAMPLE: ''spiral_curverect_strip("Spiral _1my_rectangle",0,0,0,10,50,5,0,020)''
DESCRIPTION: Draws a spiral curve rectangle Strip object in the project workspace under the currently activated material group node, or modifies the spiral curve rectangle strip object named 'label' if it already exists. If the Boolean parameter "spiral_dir" is 1, the spiral curve will be drawn counter-clockwise. If the Boolean parameter "is_dual" is 1, a dual-arm spiral curve will be drawn.
====spiral_striprevolve====
SYNTAX: spiral_striprevolve({{ArgTypeString}} label, {{ArgTypeAnyArgTypeString}} x0object, {{ArgTypeAny}} y0x0, {{ArgTypeAny}} z0y0, {{ArgTypeAny}} width, {{ArgTypeAny}} radius_innerz0, {{ArgTypeAny}} radius_outeruX, {{ArgTypeAny}} nturnsuY, {{ArgTypeAny}} spiral_diruZ, {{ArgTypeAny}} is_dualrot_angle)
EXAMPLE: ''spiral_striprevolve("Spiral _1Rev1","Line_1",0,0,0,10,50,5,0,0,1,360)''
DESCRIPTION: Draws a spiral strip object in the project workspace under the currently activated material group node, Creates or modifies the spiral strip named 'label' if it already exists. If the Boolean parameter "spiral_dir" is 1, the spiral curve will be drawn counter-clockwise. If the Boolean parameter "is_dual" is 1, a dual-arm spiral curve will be drawn.  ====superquad==== SYNTAX: superquad({{ArgTypeString}} label, {{ArgTypeAny}} x0, {{ArgTypeAny}} y0, {{ArgTypeAny}} z0, {{ArgTypeAny}} diam_x, {{ArgTypeAny}} diam_y, {{ArgTypeAny}} order) EXAMPLE: ''superquad("SuperQuad_1",0,0,0,50,20,4)'' DESCRIPTION: Draws revolution object from a super-quadratic curve specified object in the project workspace under the currently activated material group node, or modifies the super-quadratic curve named 'label' if it already exists. If order = 2, the curve reduces to modifying an ellipse. Higher order makes the round edges sharper. An infinite order reduces the curve to a rectangle.  ====taper_strip==== SYNTAX: taper_strip({{ArgTypeString}} label, {{ArgTypeAny}} x0, {{ArgTypeAny}} y0, {{ArgTypeAny}} z0, {{ArgTypeAny}} base_width, {{ArgTypeAny}} top_width, {{ArgTypeAny}} length, {{ArgTypeAny}} is_expo) EXAMPLE: ''taper_strip("ts_1",0,0,0,50,100,80,1)'' DESCRIPTION: Draws a taper strip existing revolution object in the project workspace under the currently activated material group node, or modifies the taper strip pre-existing primitive object named 'label' if it already exists. If the Boolean parameters "is_expo" is 1, an exponential taper will be drawnused.  ====torus==== SYNTAX: torus({{ArgTypeString}} label, {{ArgTypeAny}} x0, {{ArgTypeAny}} y0, {{ArgTypeAny}} z0, {{ArgTypeAny}} radius_major, {{ArgTypeAny}} radius_minor[, {{ArgTypeAny}} start_angle, {{ArgTypeAny}} end_angle]) EXAMPLE: ''torus("Torus_1",0,0,0,50,20)'' DESCRIPTION: Draws an torus object in specifies the project workspace under the currently activated material group nodecenter of revolution, or modifies the torus named 'label' if it already exists. The arguments start_angle and end_angle are in degrees and specify a sweep about the torus's azimuth axis. ====triangle_strip==== SYNTAX: triangle_strip({{ArgTypeString}} labeluX, {{ArgTypeAny}} x0uY, {{ArgTypeAny}} y0, {{ArgTypeAny}} z0, {{ArgTypeAny}} side1, {{ArgTypeAny}} side2, {{ArgTypeAny}} angleuZ) EXAMPLE: ''triangle_strip("ts_1",0,0,0,50,100,90)'' DESCRIPTION: Draws a triangle strip object in specifies the project workspace under the currently activated material group node, or modifies the triangle strip object named 'label' if it already existsrevolution axis.  == EM.Cube's Python Functions for Geometric Object Transformation == ====freeze==== SYNTAX: freeze({{ArgTypeString}} object, {{ArgTypeReal}} freeze_state) EXAMPLE: ''freeze(The revolution angle "MyObjrot_angle",1)'' DESCRIPTION: Sets the freeze state of an object (0/1).  ====move_to==== SYNTAX: move_to({{ArgTypeString}} object, {{ArgTypeString}} group_node_label[, {{ArgTypeString}} module_name]) EXAMPLE: ''move_to("NewObj","MyObj",10,10,0)'' DESCRIPTION: Transfers an object from its current material/object group node is given in the navigation tree to another node or optionally to another [[EM.Cube]] moduledegrees.
====clonerotate====
SYNTAX: clonerotate({{ArgTypeString}} labelobject, {{ArgTypeStringArgTypeAny}} objectrot_angle_degree, {{ArgTypeRealArgTypeAny}} x0rot_axis_x, {{ArgTypeRealArgTypeAny}} y0rot_axis_y, {{ArgTypeRealArgTypeAny}} z0rot_axis_z)
EXAMPLE: ''clonerotate("NewObjpyramid_1","MyObj"45,101,101,0)''
DESCRIPTION: Creates Rotates an object about a copy of line passing through its LCS center and aligned along the specified object and repositions it at direction vector (rot_axis) by the given coordinatesspecified angle.
====translate_byroughen====
SYNTAX: translate_byroughen({{ArgTypeString}} objectlabel, {{ArgTypeRealArgTypeString}} x_distobject, {{ArgTypeRealArgTypeAny}} y_distrms_height, {{ArgTypeRealArgTypeAny}} z_distcorrel_length)
EXAMPLE: ''translate_byroughen("MyObjRect_1",101,10,x5)''
DESCRIPTION: Translates an object by Roughens the surface of the specified distances in each direction. ====translate_to==== SYNTAX: translate_to({{ArgTypeString}} object, {{ArgTypeReal}} x_dest, {{ArgTypeReal}} y_dest, {{ArgTypeReal}} z_dest) EXAMPLE: ''translate_to("MyObj",20,20,x2)'' DESCRIPTION: Translates an object to based on the specified destination. ====rotate==== SYNTAX: rotate({{ArgTypeString}} object, {{ArgTypeAny}} rot_angle_degree, {{ArgTypeAny}} rot_axis_x, {{ArgTypeAny}} rot_axis_y, {{ArgTypeAny}} rot_axis_z) EXAMPLE: ''rotate("pyramid_1",45,1,1,0)'' DESCRIPTION: Rotates an object about a line passing through its LCS center RMS height and aligned along the specified direction vector (rot_axis) by the specified anglecorrelation length.
====scale====
DESCRIPTION: Scales an object by the specified scale factor.
====get_lengthset_lcs_link====
SYNTAX: get_lengthset_lcs_link({{ArgTypeString}} object, {{ArgTypeString}} lcs_obj, {{ArgTypeAny}} x_off, {{ArgTypeAny}} y_off, {{ArgTypeAny}} z_off)
EXAMPLE: ''get_lengthset_lcs_link("helix_1pyramid_1","box_1",50,50,0)''
DESCRIPTION: Returns Links the length LCS of a curve object. ====get_area==== SYNTAX: get_area({{ArgTypeString}} object) EXAMPLE: ''get_area("ellipse_1")'' DESCRIPTION: Returns the area of a surface first object or the total surface area of a solid object. ====get_volume==== SYNTAX: get_volume({{ArgTypeString}} object) EXAMPLE: ''get_volume("pyramid_1")'' DESCRIPTION: Returns the volume of a solid object. ====get_lcs==== SYNTAX: get_lcs({{ArgTypeString}} object, {{ArgTypeString}} coordinate) EXAMPLE: ''get_lcs("pyramid_1","x")'' DESCRIPTION: Returns the specified coordinate of to the LCS of an object. ====get_rot==== SYNTAX: get_rot({{ArgTypeString}} object, {{ArgTypeString}} coordinate) EXAMPLE: ''get_rot("pyramid_1","x")'' DESCRIPTION: Returns the specified rotation angle of an second object. ====get_axis==== SYNTAX: get_axis({{ArgTypeString}} object, {{ArgTypeString}} axis, {{ArgTypeString}} coordinate) EXAMPLE: ''get_axis("pyramid_1","x","y")'' DESCRIPTION: Returns the specified coordinate of the unit vector along the specified local axis of an object. ====get_lcs_offset==== SYNTAX: get_lcs_offset({{ArgTypeString}} object, {{ArgTypeAny}} x_off, {{ArgTypeAny}} y_off, {{ArgTypeAny}} z_off, {{ArgTypeString}} coordinate) EXAMPLE: ''get_lcs_offset("box_1",50,50,0,"x")'' DESCRIPTION: Returns the specified coordinate of the LCS of an object after being translated by the specified offset values along the three principal axes. ====get_extent==== SYNTAX: get_extent({{ArgTypeString}} object, {{ArgTypeString}} coordinate) EXAMPLE: ''get_extent("pyramid_1","x")'' DESCRIPTION: Returns the size of the bounding box of an object along the specified direction. ====get_vertex==== SYNTAX: get_vertex({{ArgTypeString}} object, {{ArgTypeAny}} node_index, {{ArgTypeString}} coordinate) EXAMPLE: ''get_vertex("pyramid_1",0,"x")'' DESCRIPTION: Returns the specified coordinate of the specified vertex of the bounding box of an object. The vertices are specified by node indices. The lower front left corner has an index of 0, while the upper back right corner has an index of 7. The indices are numbered counterclockwise, with the bottom face first and top face next.
====set_rot====
DESCRIPTION: Sets the three rotation angles of an object.
Â
====set_lcs_link====
Â
SYNTAX: set_lcs_link({{ArgTypeString}} object, {{ArgTypeString}} lcs_obj, {{ArgTypeAny}} x_off, {{ArgTypeAny}} y_off, {{ArgTypeAny}} z_off)
Â
EXAMPLE: ''set_lcs_link("pyramid_1","box_1",50,50,0)''
Â
DESCRIPTION: Links the LCS of the first object to the LCS of the second object by the specified offset values along the three axes.
====set_rot_link====
DESCRIPTION: Links the rotation angles of the LCS of the first object to the rotation angles of the LCS of the second object by the specified angle offset values in degrees along the three axes.
====mirrorslice====
SYNTAX: mirrorslice({{ArgTypeString}} object, {{ArgTypeAny}} x0, {{ArgTypeAny}} y0, {{ArgTypeAny}} z0, {{ArgTypeAny}} uX, {{ArgTypeAny}} uY, {{ArgTypeAny}} uZ)
EXAMPLE: ''mirrorslice("pyramid_1Rect_1",0,0,0,1,0,05)''
DESCRIPTION: Mirrors an Slices the specified object in a into two parts using the specified plane defined given by the specified point coordinates and specified normal vector componentscoordinates.
====groupsphere====
SYNTAX: groupsphere({{ArgTypeString}} label, {{ArgTypeStringArgTypeAny}} object_1x0, {{ArgTypeStringArgTypeAny}} object_2y0, ...{{ArgTypeAny}} z0, {{ArgTypeAny}} radius[, {{ArgTypeAny}} start_angle, {{ArgTypeAny}} end_angle])
EXAMPLE: ''groupsphere("Composite_1Sphere_1","Box_1"0,"Box_2"0,"Box_3"0,10,0,180)''
DESCRIPTION: Groups Draws a number of objects into a composite sphere object with in the given project workspace under the currently activated Material Group node, or modifies the sphere named 'label' if it already exists. The arguments start_angle and end_angle are in degrees and specify a sweep about the sphere's azimuth axis.
====explodespiral_curve====
SYNTAX: explodespiral_curve({{ArgTypeString}} objectlabel, {{ArgTypeAny}} x0, {{ArgTypeAny}} y0, {{ArgTypeAny}} z0, {{ArgTypeAny}} radius_inner, {{ArgTypeAny}} radius_outer, {{ArgTypeAny}} nturns, {{ArgTypeAny}} spiral_dir, {{ArgTypeAny}} is_dual)
EXAMPLE: ''explodespiral_curve("MyArraySpiral _1",0,0,0,10,50,5,0,0)''
DESCRIPTION: Explodes an Draws a spiral curve object into its basic primitivesin the project workspace under the currently activated material group node, or modifies the spiral curve named 'label' if it already exists. If the Boolean parameter "spiral_dir" is 1, the spiral curve will be drawn counter-clockwise. If the Boolean parameter "is_dual" is 1, a dual-arm spiral curve will be drawn.
====subtractspiral_strip====
SYNTAX: subtractspiral_strip({{ArgTypeString}} label, {{ArgTypeStringArgTypeAny}} object_1x0, {{ArgTypeStringArgTypeAny}} y0, {{ArgTypeAny}} z0, {{ArgTypeAny}} width, {{ArgTypeAny}} radius_inner, {{ArgTypeAny}} radius_outer, {{ArgTypeAny}} nturns, {{ArgTypeAny}} spiral_dir, {{ArgTypeAny}} object_2is_dual)
EXAMPLE: ''subtractspiral_strip("Subtract_ObjectSpiral _1","Rect_Strip1"0,"Rect_Strip2"0,0,10,50,5,0,0)''
DESCRIPTION: Creates Draws a Boolean spiral strip object in the project workspace under the currently activated material group node, or modifies the spiral strip named 'label' by subtracting object_2 from object_1. An error will be thrown if a Boolean object named 'label' it already exists. ====union==== SYNTAX: union({{ArgTypeString}} label, {{ArgTypeString}} object_1, {{ArgTypeString}} object_2) EXAMPLE: ''union("Union_Object","Rect_Strip1","Rect_Strip2")'' DESCRIPTION: Creates a If the 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==== SYNTAX: intersect({{ArgTypeString}} label, {{ArgTypeString}} object_1, {{ArgTypeString}} object_2) EXAMPLE: ''intersect(parameter "Intersection_Objectspiral_dir"is 1,"Rect_Strip1","Rect_Strip2")'' DESCRIPTION: Creates a Boolean object named 'label' by intersecting object_1 and object_2. An error the spiral curve will be thrown if a Boolean object named 'label' already exists. ====extrude==== SYNTAX: extrude({{ArgTypeString}} label, {{ArgTypeString}} object, {{ArgTypeAny}} extrude_height, {{ArgTypeAny}} cap_ends) EXAMPLE: ''extrude("Extrude_1","Rect_Strip1",50)'' DESCRIPTION: Creates or modifies an extrusion object from a specified object by the specified heightdrawn counter-clockwise. If modifying an existing extrusion object, the pre-existing primitive is used. This command can only extrude objects that have a single face and will extrude along the face's normal. ====loft==== SYNTAX: loft({{ArgTypeString}} label, {{ArgTypeString}} object, {{ArgTypeAny}} loft_height, {{ArgTypeAny}} cap_base) EXAMPLE: ''loft(Boolean parameter "Loft_1is_dual","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 loft objects that have a single face and will loft along the face's normal. ====revolve==== SYNTAX: 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 predual-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==== SYNTAX: consolidate({{ArgTypeString}} object) EXAMPLE: ''consolidate("Poly_1")'' DESCRIPTION: Consolidates a specified objectarm spiral curve will be drawn.
====spline_fit====
DESCRIPTION: Applies spline fit transformation on a specified polymesh, polyline or polystrip object.
====fill_curvestrip_sweep====
SYNTAX: fill_curvestrip_sweep({{ArgTypeString}} object, {{ArgTypeAny}} width)
EXAMPLE: ''fill_curvestrip_sweep("Curve_1",5)''
DESCRIPTION: Fill the interior Creates a strip version of the specified closed a given curve object.
====merge_curvesubtract====
SYNTAX: merge_curvesubtract({{ArgTypeString}} label, {{ArgTypeString}} object_1, {{ArgTypeString}} object_2)
EXAMPLE: ''merge_curvesubtract("Curve_1Subtract_Object","Curve_2Rect_Strip1","Rect_Strip2")''
DESCRIPTION: Merges two specified curve objects into Creates a single curveBoolean object named 'label' by subtracting object_2 from object_1. An error will be thrown if a Boolean object named 'label' already exists.
====close_curvesuperquad====
SYNTAX: close_curvesuperquad({{ArgTypeString}} label, {{ArgTypeStringArgTypeAny}} x0, {{ArgTypeAny}} y0, {{ArgTypeAny}} z0, {{ArgTypeAny}} diam_x, {{ArgTypeAny}} diam_y, {{ArgTypeAny}} close_stateorder)
EXAMPLE: ''close_curvesuperquad("Curve_1SuperQuad_1",10,0,0,50,20,4)''
DESCRIPTION: Sets the open/close state of Draws a polyline super-quadratic curve object in the project workspace under the currently activated material group node, or NURBS modifies the super-quadratic curvenamed 'label' if it already exists. Use 0 for open If order = 2, the curve and 1 for close reduces to an ellipse. Higher order makes the round edges sharper. An infinite order reduces the curveto a rectangle.
====polygonizetaper_strip====
SYNTAX: polygonizetaper_strip({{ArgTypeString}} objectlabel, {{ArgTypeAny}} side_lengthx0, {{ArgTypeAny}} y0, {{ArgTypeAny}} z0, {{ArgTypeAny}} base_width, {{ArgTypeAny}} top_width, {{ArgTypeAny}} length, {{ArgTypeAny}} is_expo)
EXAMPLE: ''polygonizetaper_strip("Cric_1ts_1",20,0,0,50,100,80,1)''
DESCRIPTION: Polygonizes Draws a taper strip object in the project workspace under the specified surface currently activated material group node, or curve object by modifies the specified side lengthtaper strip object named 'label' if it already exists. The results If the Boolean parameters "is_expo" is a polystrip or a polyline1, an exponential taper will be drawn.
====polymeshtorus====
SYNTAX: polymeshtorus({{ArgTypeString}} label, {{ArgTypeStringArgTypeAny}} x0, {{ArgTypeAny}} y0, {{ArgTypeAny}} z0, {{ArgTypeAny}} radius_major, {{ArgTypeAny}} radius_minor[, {{ArgTypeAny}} objectstart_angle, {{ArgTypeAny}} edge_lengthend_angle])
EXAMPLE: ''polymeshtorus("Poly_1Torus_1","Cric_1"0,0,0,50,220)''
DESCRIPTION: Discretizes Draws an torus object in the specified solid project workspace under the currently activated material group node, or surface object by modifies the specified edge lengthtorus named 'label' if it already exists. The results is arguments start_angle and end_angle are in degrees and specify a polymesh objectsweep about the torus's azimuth axis.
====fillettranslate_by====
filletSYNTAX: translate_by({{ArgTypeString}} object, {{ArgTypeAnyArgTypeReal}} radiusx_dist, {{ArgTypeReal}} y_dist, {{ArgTypeReal}} z_dist)
EXAMPLE: ''fillettranslate_by("Rect_1MyObj",510,10,x)''
DESCRIPTION: Fillets the corners of the specified surface or curve Translates an object by the specified radiusdistances in each direction.
====slicetranslate_to====
SYNTAX: slicetranslate_to({{ArgTypeString}} object, {{ArgTypeAnyArgTypeReal}} x0x_dest, {{ArgTypeAnyArgTypeReal}} y0y_dest, {{ArgTypeAnyArgTypeReal}} z0, {{ArgTypeAny}} uX, {{ArgTypeAny}} uY, {{ArgTypeAny}} uZz_dest)
EXAMPLE: ''slicetranslate_to("Rect_1MyObj",520,20,x2)''
DESCRIPTION: Slices the specified Translates an object into two parts using to the specified plane given by the point coordinates and normal vector coordinatesdestination.
====roughentriangle_strip====
SYNTAX: roughentriangle_strip({{ArgTypeString}} label, {{ArgTypeStringArgTypeAny}} x0, {{ArgTypeAny}} y0, {{ArgTypeAny}} z0, {{ArgTypeAny}} objectside1, {{ArgTypeAny}} rms_heightside2, {{ArgTypeAny}} correl_lengthangle)
EXAMPLE: ''roughentriangle_strip("Rect_1ts_1",10,50,0,50,100,90)''
DESCRIPTION: Roughens Draws a triangle strip object in the surface of project workspace under the specified object based on currently activated material group node, or modifies the specified RMS height and correlation lengthtriangle strip object named 'label' if it already exists.
====random_group==EM.Cube's Python Functions for Geometric Object Transformation ==
SYNTAX: random_group({{ArgTypeString}} label, {{ArgTypeString}} key_object, {{ArgTypeString}} container_object, {{ArgTypeAny}} element_count)====union====
EXAMPLESYNTAX: ''random_groupunion("Rand_1"{{ArgTypeString}} label,"Rect_1"{{ArgTypeString}} object_1,"Box_1",100{{ArgTypeString}} object_2)''
DESCRIPTIONEXAMPLE: Creates a random group using the specified key object and confines them in the specified container object.''union("Union_Object","Rect_Strip1","Rect_Strip2")''
====strip_sweep==== SYNTAX: strip_sweep({{ArgTypeString}} object, {{ArgTypeAny}} width) EXAMPLE: ''strip_sweep("Curve_1",5)'' DESCRIPTION: Creates a strip version of a given curve Boolean object. ====pipe_sweep==== SYNTAX: pipe_sweep({{ArgTypeString}} object, {{ArgTypeAny}} radius) EXAMPLE: named 'label'pipe_sweep("Curve_1",5)'' DESCRIPTION: Creates by unioning object_1 and object_2. An error will be thrown if a pipe version of a given curve Boolean object. ====rail_sweep==== SYNTAX: rail_sweep({{ArgTypeString}} rail_object, {{ArgTypeString}} sweep_object) EXAMPLE: named 'label'rail_sweep("Curve_1","Curve_2")'' DESCRIPTION: Rail-sweeps the specified sweep object along the specified curve objectalready exists.
== EM.Cube's Python Functions for Material or Object Group Creation ==
Â
====activate====
Â
SYNTAX: activate({{ArgTypeString}} group_node_label)
Â
EXAMPLE: ''activate("Color_1")''
Â
DESCRIPTION: Activates a color, material or object group in the current active [[EM.Cube]] module.
Â
====color_group====
Â
SYNTAX: color_group({{ArgTypeString}} label)
Â
EXAMPLE: ''color_group("Color_1")''
Â
DESCRIPTION: Creates a color group in CubeCAD module. If the color group 'label' already exists, the group is activated.
====pec_group====