Difference between revisions of "Python Integration"

From Emagtech Wiki
Jump to: navigation, search
(CAD Functions)
(Solid Objects)
Line 34: Line 34:
 
===Solid Objects===
 
===Solid Objects===
  
====rect_strip({{ArgTypeString}} label, {{ArgTypeAny}} x0, {{ArgTypeAny}} y0, {{ArgTypeAny}} z0, {{ArgTypeAny}} length, {{ArgTypeAny}} width)====
+
====box({{ArgTypeString}} label, {{ArgTypeAny}} x0, {{ArgTypeAny}} y0, {{ArgTypeAny}} z0, {{ArgTypeAny}} length, {{ArgTypeAny}} width, {{ArgTypeAny}} height)====
  
''Example:rect_strip("my_rectangle",0,0,0,"x",y)''
+
''Example:box("my_box",0,0,0,"x",y,100)''
  
Description:  Draws a Rect Strip object in the scene under the currently activated Material Group node, or modifies a Rect Strip if Rect Strip 'label' already exists.
+
Description:  Draws a Box object in the scene under the currently activated Material Group node, or modifies a Box if Box 'label' already exists.
  
====circ_strip({{ArgTypeString}} label, {{ArgTypeAny}} x0, {{ArgTypeAny}} y0, {{ArgTypeAny}} z0, {{ArgTypeAny}} inner_radius, {{ArgTypeAny}} outer_radius)====
+
====cylinder({{ArgTypeString}} label, {{ArgTypeAny}} x0, {{ArgTypeAny}} y0, {{ArgTypeAny}} z0, {{ArgTypeAny}} radius, {{ArgTypeAny}} height)====
  
''Example:circ_strip("cs_1",0,0,0,0,100)''
+
''Example:cylinder("cylinder_1",0,0,0,10,100)''
  
Description:  Draws a Circular Strip object in the scene under the currently activated Material Group node, or modifies a Circular Strip if Circular Strip 'label' already exists.
+
Description:  Draws a Cylinder object in the scene under the currently activated Material Group node, or modifies a Cylinder if Cylinder 'label' already exists.
  
====poly_strip({{ArgTypeString}} label, {{ArgType| 3x1 Python tuple}} p0, {{ArgType| 3x1 Python tuple}} p1, ... {{ArgType| 3x1 Python tuple}} pn)====
+
====pyramid({{ArgTypeString}} label, {{ArgTypeAny}} x0, {{ArgTypeAny}} y0, {{ArgTypeAny}} z0, {{ArgTypeAny}} base_x, {{ArgTypeAny}} base_y, {{ArgTypeAny}} height)====
  
''Example:poly_strip("ps_1",(0,0,0),(1,0,0),(1,0,0))''
+
''Example:pyramid("pyramid_1",0,0,0,10,10,100)''
  
Description:  Creates or modifies a PolyStrip object in the scene. 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.
+
Description:  Draws a Pyramid object in the scene under the currently activated Material Group node, or modifies a Pyramid if Pyramid 'label' already exists.
  
====nurbs_strip({{ArgTypeString}} label, {{ArgType| 3x1 Python tuple}} p0, {{ArgType| 3x1 Python tuple}} p1, ... {{ArgType| 3x1 Python tuple}} pn)====
+
====sphere({{ArgTypeString}} label, {{ArgTypeAny}} x0, {{ArgTypeAny}} y0, {{ArgTypeAny}} z0, {{ArgTypeAny}} radius, {{ArgTypeAny}} start_angle, {{ArgTypeAny}} end_angle)====
  
''Example:nurbs_strip("ns_1",(0,0,0),(1,0,0),(1,0,0))''
+
''Example:pyramid("pyramid_1",0,0,0,10,10,100)''
 
+
Description:  Creates or modifies a NURBS Strip object in the scene. 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.
+
  
 +
Description:  Draws a Pyramid object in the scene under the currently activated Material Group node, or modifies a Pyramid if Pyramid 'label' already exists.
  
 
===Line Objects===
 
===Line Objects===

Revision as of 16:59, 2 December 2015

CAD Functions

Surface Objects

rect_strip(string label, any x0, any y0, any z0, any length, any width)

Example:rect_strip("my_rectangle",0,0,0,"x",y)

Description: Draws a Rect Strip object in the scene under the currently activated Material Group node, or modifies a Rect Strip if Rect Strip 'label' already exists.

circ_strip(string label, any x0, any y0, any z0, any inner_radius, any outer_radius)

Example:circ_strip("cs_1",0,0,0,0,100)

Description: Draws a Circular Strip object in the scene under the currently activated Material Group node, or modifies a Circular Strip if Circular Strip 'label' already exists.

poly_strip(string label, 3x1 Python tuple p0, 3x1 Python tuple p1, ... 3x1 Python tuple pn)

Example:poly_strip("ps_1",(0,0,0),(1,0,0),(1,0,0))

Description: Creates or modifies a PolyStrip object in the scene. 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(string label, 3x1 Python tuple p0, 3x1 Python tuple p1, ... 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 scene. 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.


Solid Objects

box(string label, any x0, any y0, any z0, any length, any width, any height)

Example:box("my_box",0,0,0,"x",y,100)

Description: Draws a Box object in the scene under the currently activated Material Group node, or modifies a Box if Box 'label' already exists.

cylinder(string label, any x0, any y0, any z0, any radius, any height)

Example:cylinder("cylinder_1",0,0,0,10,100)

Description: Draws a Cylinder object in the scene under the currently activated Material Group node, or modifies a Cylinder if Cylinder 'label' already exists.

pyramid(string label, any x0, any y0, any z0, any base_x, any base_y, any height)

Example:pyramid("pyramid_1",0,0,0,10,10,100)

Description: Draws a Pyramid object in the scene under the currently activated Material Group node, or modifies a Pyramid if Pyramid 'label' already exists.

sphere(string label, any x0, any y0, any z0, any radius, any start_angle, any end_angle)

Example:pyramid("pyramid_1",0,0,0,10,10,100)

Description: Draws a Pyramid object in the scene under the currently activated Material Group node, or modifies a Pyramid if Pyramid 'label' already exists.

Line Objects

Transform Functions

Source Functions

Result Functions

Simulation Setup and Meshing Functions