Changes

Python Integration

11,375 bytes added, 16:29, 4 December 2015
/* impenetrable_group({{ArgTypeString}} label, {{ArgStringAny}} eps, {{ArgTypeAny}} sigma) */
 ==CAD Functions==   ===Surface Objects=== ====rect_strip({{ArgTypeString}} label, {{ArgTypeAny}} x0, {{ArgTypeAny}} y0, {{ArgTypeAny}} z0, {{ArgTypeAny}} length, {{ArgTypeAny}} 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({{ArgTypeString}} label, {{ArgTypeAny}} x0, {{ArgTypeAny}} y0, {{ArgTypeAny}} z0, {{ArgTypeAny}} inner_radius, {{ArgTypeAny}} 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({{ArgTypeString}} label, {{ArgType| 3x1 Python tuple}} p0, {{ArgType| 3x1 Python tuple}} p1, ... {{ArgType| 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({{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 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({{ArgTypeString}} label, {{ArgTypeAny}} x0, {{ArgTypeAny}} y0, {{ArgTypeAny}} z0, {{ArgTypeAny}} length, {{ArgTypeAny}} width, {{ArgTypeAny}} 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({{ArgTypeString}} label, {{ArgTypeAny}} x0, {{ArgTypeAny}} y0, {{ArgTypeAny}} z0, {{ArgTypeAny}} radius, {{ArgTypeAny}} 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({{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 under the currently activated Material Group node, or modifies a Pyramid if Pyramid 'label' already exists. ====sphere({{ArgTypeString}} label, {{ArgTypeAny}} x0, {{ArgTypeAny}} y0, {{ArgTypeAny}} z0, {{ArgTypeAny}} radius, {{ArgTypeAny}} start_angle, {{ArgTypeAny}} end_angle)==== ''Example:sphere("sphere",0,0,0,10,0,180)'' Description: Draws a Sphere object in the scene under the currently activated Material Group node, or modifies a Sphere if Sphere 'label' already exists. The arguments start_angle and end_angle are in degrees and specify a sweep about the sphere's theta axis.   ===Line Objects=== ====line({{ArgTypeString}} label, {{ArgTypeAny}} x0, {{ArgTypeAny}} y0, {{ArgTypeAny}} z0, {{ArgTypeAny}} length)==== ''Example:line("my_line",0,0,0,100)'' Description: Draws a Line object in the scene under the currently activated Material Group node, or modifies a Line if Line 'label' already exists. ====line_rotated({{ArgTypeString}} label, {{ArgTypeAny}} x0, {{ArgTypeAny}} y0, {{ArgTypeAny}} z0, {{ArgTypeAny}} rot_x, {{ArgTypeAny}} rot_y, {{ArgTypeAny}} rot_z, {{ArgTypeAny}} length)==== ''Example:line_rotated("line_1",0,0,0,0,90,0,100)'' Description: Draws a rotated Line object in the scene under the currently activated Material Group node. Unlike most other CAD functions, if Line 'label' already exists in the scene,an error will be thrown. ====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 under the currently activated Material Group node, or modifies a Circle object if Circle 'label' already exists. The parameters start_angle and end_angle are in degrees. ====helix({{ArgTypeString}} label, {{ArgTypeAny}} x0, {{ArgTypeAny}} y0, {{ArgTypeAny}} z0, {{ArgTypeAny}} nturns, {{ArgTypeAny}} radius_inner, {{ArgTypeAny}} radius_outer)==== ''Example:helix("Helix_1",0,0,0,5,15,50)'' Description: Draws a helical curve in the scene under the currently activated Material Group node, or modifies a Helix if Helix 'label' already exists. 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. ====poly_line({{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 scene. 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 scene. Each point is represented with a Python tuple type. The curve is closed if p0 is specified again as pn, otherwise, it is open. ===Transform Functions=== ====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. ====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","spacing",0)'' Description: Create or modify an Array object. ====translate_by({{ArgTypeString}} label, {{ArgTypeReal}} x_dist, {{ArgTypeReal}} y_dist, {{ArgTypeReal}} z_dist)==== ''Example:translate_by("MyObj",10,10,x)'' Description: Translates an object by the specified distances in each direction. ====translate_to({{ArgTypeString}} label, {{ArgTypeReal}} x_dest, {{ArgTypeReal}} y_dest, {{ArgTypeReal}} z_dest)==== ''Example:translate_to("MyObj",20,20,x2)'' Description: Translates an object to the specified destination. ====rotate({{ArgTypeString}} label, {{ArgTypeAny}} x0, {{ArgTypeAny}} y0, {{ArgTypeAny}} z0, {{ArgTypeAny}} radius, {{ArgTypeAny}} start_angle, {{ArgTypeAny}} end_angle)==== ''Example:rotate("pyramid_1",0,0,0,10,10,100)'' Description: Draws a circular curve object in the scene under the currently activated Material Group node, or modifies a Circle object if Circle 'label' already exists. The parameters start_angle and end_angle are in degrees. ====extrude({{ArgTypeString}} label, {{ArgTypeString}} object, {{ArgTypeAny}} height)==== ''Example:extrude("Extrude_Object","Rect_Strip1",50)'' Description: Creates or modifies an Extrusion object from CAD object 'object'. If modifying an existing extrusion, 'object' is ignored, and the pre-existing primitive is used. extrude(...) can only extrude objects that have a single face, and will extrude in the direction of the face's normal. ====explode({{ArgTypeString}} object)==== ''Example:explode("MyArray")'' Description: Performs an explode operation on a CAD object named 'object'. ====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)'' Description: Creates or modifies a Revolution object called 'label', with a primitive object named 'object'. If modifying an existing Revolution object, 'object' is ignored, and the pre-existing primitive object is used. (x0,y0,z0) specifies the center of revolution, and (uX,uY,uZ) specifies the revolution axis. rot_angle is in degrees. ==Source Functions==  ==Result Functions==  ==Material Group Functions== ====pec_group({{ArgTypeString}} label)==== ''Example:pec_group("PEC_1")'' Description: Creates a PEC material group in the current module. If a PEC group 'label' already exists, the group is activated. ====pmc_group({{ArgTypeString}} label)==== ''Example:pmc_group("PMC_1")'' Description: Creates a PMC material group in the current module. If a PMC group 'label' already exists, the group is activated. ====dielectric_group({{ArgTypeString}} label, {{ArgTypeAny}} eps, {{ArgTypeAny}} sigma, {{ArgTypeAny}} mu, {{ArgTypeAny}} rho)==== ''Example:dielectric_group("Dielectric_1","my_eps",0,1,0)'' Description: Creates a Dielectric material group in the current module with the specified material properties. If a Dielectric group 'label' already exists, the group is activated. ====thinwire_group({{ArgTypeString}} label, {{ArgTypeAny}} radius)==== ''Example:thinwire_group("Thinwire_1",4)'' Description: Creates a Thinwire material group in the current module. If a Thinwire group 'label' already exists, the group is activated. ====base_point_group({{ArgTypeString}} label)==== ''Example:base_point_set("BP_Set_1")'' Description: Creates a Base Point Set in [[EM.Terrano]]. If a Base Point Set group 'label' already exists, the group is activated. ====color_group({{ArgTypeString}} label)==== ''Example:color_group("Color_1")'' Description: Creates a Color group in [[CubeCAD]] module. If a Color group 'label' already exists, the group is activated. ====penetrable_group({{ArgTypeString}} label, {{ArgTypeAny}} eps, {{ArgTypeAny}} sigma, {{ArgTypeAny}} thickness)==== ''Example:penetrable_group("Impenet_1",2.2,.0001, 1)'' Description: Creates a Penetrable material group in [[EM.Terrano]]. If a Penetrable group 'label' already exists, the group is activated. ====impenetrable_group({{ArgTypeString}} label, {{ArgTypeAny}} eps, {{ArgTypeAny}} sigma)==== ''Example:impenetrable_group("Impenet_1",2.2,.0001)'' Description: Creates a Impenetrable material group in [[EM.Terrano]]. If an Impenetrable group 'label' already exists, the group is activated. ==Simulation Setup and Meshing Functions==
831
edits