Changes

Glossary of EM.Cube's Python Functions

6,957 bytes added, 23:06, 4 September 2016
/* EM.Cube's Python Functions for Geometric Object Creation */
== EM.Cube's Python Functions for Geometric Object Creation ==
====box({{ArgTypeString}} label, {{ArgTypeAny}} x0, {{ArgTypeAny}} y0, {{ArgTypeAny}} z0, {{ArgTypeAny}} lengthbase_x, {{ArgTypeAny}} widthbase_y, {{ArgTypeAny}} height[, {{ArgTypeAny}} cap_top, {{ArgTypeAny}} cap_bottom])====
''Example:box("Box_1",0,0,0,"x"50,y50,100)''
Description: Draws a box object in the scene project workspace under the currently activated material group node, or modifies the box named 'label' if it already exists.
====cylinder({{ArgTypeString}} label, {{ArgTypeAny}} x0, {{ArgTypeAny}} y0, {{ArgTypeAny}} z0, {{ArgTypeAny}} radius, {{ArgTypeAny}} height[, {{ArgTypeAny}} start_angle, {{ArgTypeAny}} end_angle, {{ArgTypeAny}} cap_top, {{ArgTypeAny}} cap_bottom])====
''Example:cylinder("Cylinder_1",0,0,0,10,100)''
Description: Draws a cylinder object in the scene project workspace under the currently activated material group node, or modifies the cylinder named 'label' if it already exists. The arguments start_angle and end_angle are in degrees and specify a sweep about the cylinder's azimuth axis.
====cone({{ArgTypeString}} label, {{ArgTypeAny}} x0, {{ArgTypeAny}} y0, {{ArgTypeAny}} z0, {{ArgTypeAny}} base_radius, {{ArgTypeAny}} height[, {{ArgTypeAny}} top_radius, {{ArgTypeAny}} start_angle, {{ArgTypeAny}} end_angle, {{ArgTypeAny}} cap_top, {{ArgTypeAny}} cap_bottom])====
''Example:cone("Cone_1",0,0,0,30,40,20,0,180)''
Description: Draws a cone object in the scene 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.
====pyramid({{ArgTypeString}} label, {{ArgTypeAny}} x0, {{ArgTypeAny}} y0, {{ArgTypeAny}} z0, {{ArgTypeAny}} base_x, {{ArgTypeAny}} base_y, {{ArgTypeAny}} height)====
''Example:pyramid("Pyramid_1",0,0,0,10,10,100)''
Description: Draws a pyramid object in the scene project workspace under the currently activated material group node, or modifies the pyramid named 'label' if it already exists.
====sphere({{ArgTypeString}} label, {{ArgTypeAny}} x0, {{ArgTypeAny}} y0, {{ArgTypeAny}} z0, {{ArgTypeAny}} radius[, {{ArgTypeAny}} start_angle, {{ArgTypeAny}} end_angle])====
''Example:sphere("Sphere_1",0,0,0,10,0,180)''
Description: Draws a sphere object in the scene 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.
====ellipsoid({{ArgTypeString}} label, {{ArgTypeAny}} x0, {{ArgTypeAny}} y0, {{ArgTypeAny}} z0, {{ArgTypeAny}} radius_x, {{ArgTypeAny}} radius_y, {{ArgTypeAny}} radius_z[, {{ArgTypeAny}} start_angle, {{ArgTypeAny}} end_angle])====
''Example:ellipsoid("Ellipsoid_1",0,0,0,100,100,50,0,360)''
Description: Draws an ellipsoid object in the scene 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.
====torus({{ArgTypeString}} label, {{ArgTypeAny}} x0, {{ArgTypeAny}} y0, {{ArgTypeAny}} z0, {{ArgTypeAny}} radius_major, {{ArgTypeAny}} radius_minor[, {{ArgTypeAny}} start_angle, {{ArgTypeAny}} end_angle])====
''Example:torus("Ellipsoid_1Torus_1",0,0,0,100,100,50,0,36020)''
Description: Draws an torus object in the scene project workspace under the currently activated material group node, 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.
====rect_strip({{ArgTypeString}} label, {{ArgTypeAny}} x0, {{ArgTypeAny}} y0, {{ArgTypeAny}} z0, {{ArgTypeAny}} lengthside_x, {{ArgTypeAny}} widthside_y)====
''Example:rect_strip("my_rectangle",0,0,0,"x"50,y20)''
Description: Draws a Rect rectangle Strip object in the scene project workspace under the currently activated Material Group material group node, or modifies a Rect Strip if Rect Strip the rectangle strip object named 'label' if it already exists.
====circ_strip({{ArgTypeString}} label, {{ArgTypeAny}} x0, {{ArgTypeAny}} y0, {{ArgTypeAny}} z0, {{ArgTypeAny}} inner_radius, {{ArgTypeAny}} outer_radius[, {{ArgTypeAny}} start_angle, {{ArgTypeAny}} end_angle])====
''Example:circ_strip("cs_1",0,0,0,050,1000)''
Description: Draws a Circular Strip circle strip object in the scene project workspace under the currently activated Material Group material group node, or modifies a Circular Strip if Circular Strip the circle strip object named 'label' if it already exists. The arguments start_angle and end_angle are in degrees and specify a sweep about the circle strip's azimuth axis.
====poly_stripradial_strip({{ArgTypeString}} label, {{ArgType| 3x1 Python tupleArgTypeAny}} p0x0, {{ArgType| 3x1 Python tupleArgTypeAny}} p1y0, ... {{ArgType| 3x1 Python tupleArgTypeAny}} pnz0, {{ArgTypeAny}} radius, {{ArgTypeAny}} base_length, {{ArgTypeAny}} angle)====
''Example:poly_stripradial_strip("ps_1Radial_1",(0,0,0),(150,0,0),(1,0,0)90)''
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.  ====ellipse_strip({{ArgTypeString}} label, {{ArgTypeAny}} x0, {{ArgTypeAny}} y0, {{ArgTypeAny}} z0, {{ArgTypeAny}} radius_x, {{ArgTypeAny}} radius_y[, {{ArgTypeAny}} start_angle, {{ArgTypeAny}} end_angle])==== ''Example:ellipse_strip("es_1",0,0,0,50,0)'' Description: Draws a ellipse strip object in the project workspace under the currently activated material group node, or modifies the ellipse strip object named 'label' if it already exists. The arguments start_angle and end_angle are in degrees and specify a sweep about the ellipse strip's azimuth axis. ====triangle_strip({{ArgTypeString}} label, {{ArgTypeAny}} x0, {{ArgTypeAny}} y0, {{ArgTypeAny}} z0, {{ArgTypeAny}} side1, {{ArgTypeAny}} side2, {{ArgTypeAny}} angle)==== ''Example:triangle_strip("ts_1",0,0,0,50,100,90)'' Description: Draws a triangle strip object in the project workspace under the currently activated material group node, or modifies the triangle strip object named 'label' if it already exists.  ====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 object in the project workspace under the currently activated material group node, or modifies the taper strip object named 'label' if it already exists. If the Boolean parameters "is_expo" is 1, an exponential taper will be drawn.  ====polygon_reg({{ArgTypeString}} label, {{ArgTypeAny}} x0, {{ArgTypeAny}} y0, {{ArgTypeAny}} z0, {{ArgTypeAny}} radius, {{ArgTypeAny}} n_sides)==== ''Example:polygon_reg("ts_1",0,0,0,50,100,80,1)'' 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.  ====spiral_strip({{ArgTypeString}} label, {{ArgTypeAny}} x0, {{ArgTypeAny}} y0, {{ArgTypeAny}} z0, {{ArgTypeAny}} width, {{ArgTypeAny}} radius_inner, {{ArgTypeAny}} radius_outer, {{ArgTypeAny}} nturns, {{ArgTypeAny}} spiral_dir, {{ArgTypeAny}} is_dual)==== ''Example:spiral_strip("Spiral _1",0,0,0,10,50,5,0,0)'' Description: Draws a spiral strip object in the project workspace under the currently activated material group node, 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.  ====polystrip({{ArgTypeString}} label, {{ArgType| 3x1 Python tuple}} p0, {{ArgType| 3x1 Python tuple}} p1, ... {{ArgType| 3x1 Python tuple}} pn)==== ''Example:polystrip("ps_1",(0,0,0),(1,0,0),(1,0,0))'' Description: Creates or modifies a PolyStrip Polystrip object in the sceneproject workspace. Each point is represented with a Python tuple type. The poly_strip function is 'self-closing' -- there is no need to supply the first point again at the end of the point list.
====nurbs_strip({{ArgTypeString}} label, {{ArgType| 3x1 Python tuple}} p0, {{ArgType| 3x1 Python tuple}} p1, ... {{ArgType| 3x1 Python tuple}} pn)====
''Example:nurbs_strip("ns_1",(0,0,0),(1,0,0),(1,0,0))''
Description: Creates or modifies a NURBS Strip object in the sceneproject workspace. Each point is represented with a Python tuple type. The nurbs_strip function is 'self-closing' -- there is no need to supply the first point again at the end of the point list.
====line({{ArgTypeString}} label, {{ArgTypeAny}} x0, {{ArgTypeAny}} y0, {{ArgTypeAny}} z0, {{ArgTypeAny}} length[, {{ArgTypeAny}} dir])====
''Example:line("my_line",0,0,0,100,"x")''
Description: Draws a Line object in the scene project workspace under the currently activated Material Group material group node, or modifies a Line if Line the line named 'label' if it already exists. Without the argument "dir", a vertical line is drawn by default.
====circle({{ArgTypeString}} label, {{ArgTypeAny}} x0, {{ArgTypeAny}} y0, {{ArgTypeAny}} z0, {{ArgTypeAny}} radius, {{ArgTypeAny}} start_angle, {{ArgTypeAny}} end_angle)====
''Example:circle("pyramid_1",0,0,0,10,10,100)''
Description: Draws a circular curve object in the scene project workspace under the currently activated Material Group material group node, or modifies a Circle object if Circle the circle named 'label' if it already exists. The parameters start_angle and end_angle are in degrees.
====helixsuperquad({{ArgTypeString}} label, {{ArgTypeAny}} x0, {{ArgTypeAny}} y0, {{ArgTypeAny}} z0, {{ArgTypeAny}} nturnsdiam_x, {{ArgTypeAny}} radius_innerdiam_y, {{ArgTypeAny}} radius_outerorder)====
''Example:helixsuperquad("Helix_1SuperQuad_1",0,0,0,550,1520,504)''
Description: Draws a helical super-quadratic curve object in the scene project workspace under the currently activated Material Group material group node, or modifies a Helix if Helix the super-quadratic curve named 'label' if it already exists. radius_inner specifies the helix's radius at the beginning of the helixIf order = 2, and radius_outer specifies the radius at curve reduces to an ellipse. Higher order make the end of round edges sharper. An infinite order reduces the helixcurve to a rectangle.
====poly_lineparabola({{ArgTypeString}} label, {{ArgTypeAny}} x0, {{ArgTypeAny}} y0, {{ArgTypeAny}} z0, {{ArgTypeAny}} focal_length, {{ArgTypeAny}} axial_length, {{ArgTypeAny}} half_only)==== ''Example:parabola("Parabola _1",0,0,0,50,20,0)'' Description: Draws a parabola object in the project workspace under the currently activated material group node, or modifies the parabola named 'label' if it already exists. If the Boolean parameter "half_only" is 1, only half of the parabola will be drawn.  ====hyperbola({{ArgTypeString}} label, {{ArgTypeAny}} x0, {{ArgTypeAny}} y0, {{ArgTypeAny}} z0, {{ArgTypeAny}} diam_x, {{ArgTypeAny}} diam_y, {{ArgTypeAny}} axial_length, {{ArgTypeAny}} half_only)==== ''Example:hyperbola("Hyperbola _1",0,0,0,50,40,20,0)'' Description: Draws a hyperbola object in the project workspace under the currently activated material group node, or modifies the hyperbola named 'label' if it already exists. If the Boolean parameter "half_only" is 1, only half of the hyperbola will be drawn.  ====spiral_curve({{ArgTypeString}} label, {{ArgTypeAny}} x0, {{ArgTypeAny}} y0, {{ArgTypeAny}} z0, {{ArgTypeAny}} radius_inner, {{ArgTypeAny}} radius_outer, {{ArgTypeAny}} nturns, {{ArgTypeAny}} spiral_dir, {{ArgTypeAny}} is_dual)==== ''Example:spiral_curve("Spiral _1",0,0,0,10,50,5,0,0)'' Description: Draws a spiral curve object in 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.  ====helix({{ArgTypeString}} label, {{ArgTypeAny}} x0, {{ArgTypeAny}} y0, {{ArgTypeAny}} z0, {{ArgTypeAny}} radius_inner, {{ArgTypeAny}} radius_outer, {{ArgTypeAny}} nturns, {{ArgTypeAny}} helix_dir)==== ''Example:helix("Helix_1",0,0,0,15,15,10,0)'' Description: Draws a helical curve in the project workspace under the currently activated material group node, or modifies the helix named 'label' if it already exists. The parameter "radius_inner" specifies the helix's radius at the beginning of the helix, and radius_outer specifies the radius at the end of the helix. If the Boolean parameter "helixl_dir" is 1, the helical curve will be drawn counter-clockwise.  ====polyline({{ArgTypeString}} label, {{ArgType| 3x1 Python tuple}} p0, {{ArgType| 3x1 Python tuple}} p1, ... {{ArgType| 3x1 Python tuple}} pn)====
''Example:poly_line("pl_1",(0,0,0),(1,0,0),(1,0,0))''
Description: Creates or modifies a PolyLine object in the sceneproject 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.
====nurbs_curve({{ArgTypeString}} label, {{ArgType| 3x1 Python tuple}} p0, {{ArgType| 3x1 Python tuple}} p1, ... {{ArgType| 3x1 Python tuple}} pn)====
''Example:nurbs_curve("nc_1",(0,0,0),(1,0,0),(1,0,0))''
Description: Creates or modifies a NURBS Curve object in the sceneproject workspace. Each point is represented with a Python tuple type. The curve is closed if p0 is specified again as pn, otherwise, it is open. ====point({{ArgTypeString}} label, {{ArgTypeAny}} x0, {{ArgTypeAny}} y0, {{ArgTypeAny}} z0)==== ''Example:point("Point_1",0,0,10)'' Description: Draws a point in the project workspace under the currently activated material group node, or modifies the point named 'label' if it already exists.    {"param_curve", emag_curv_gen, METH_VARARGS, "param_curve(label,x0,y0,z0,model,orientation,start,stop,step,function[,y(t),z(t)]) -- Draw a spiral strip in the project workspace."},  {"polystrip",emag_polystrip,METH_VARARGS,"polystrip(label,(x0,y0,z0),(x1,y1,z1) ... ) -- Draw a polystrip in the project workspace."}, {"nurbs_strip",emag_nurbs_strip,METH_VARARGS,"nurbs_strip(label,(x0,y0,z0),(x1,y1,z1) ... ) -- Draw a NURBS strip in the project workspace."}, {"close_curve",emag_close_curve,METH_VARARGS,"close_curve(label,close_state) -- Draw a polystrip in the project workspace."}, {"param_surface", emag_surf_gen, METH_VARARGS, "param_surface(label,x0,y0,z0,orientation,start_1,stop_1,step_1,start_2,stop_2,step_2,function) -- Draw a spiral strip in the project workspace."},
== EM.Cube's Python Functions for Geometric Object Transformation ==
28,333
edits