# Operations ```{eval-rst} .. py:function:: boolOpCommon(From, Tools) :nocontentsentry: Intersection: Intersection between two objects | Alias: common :param Entity From: Geometric entity: Geometric entity on which the boolean operation is applied. Conditions: The input must be non-empty. "" does not exist in the dropdown list. :param List Tools: Tools: Geometric tools to make the boolean operation. Conditions: "" does not exist in the dropdown list. :rtype: Return a GeomBody ``` ```{eval-rst} .. py:function:: boolOpCommon(From, Tool) :nocontentsentry: Intersection: Intersection between two objects | Alias: common :param Entity From: Geometric entity: Geometric entity on which the boolean operation is applied. Conditions: The input must be non-empty. "" does not exist in the dropdown list. :param POCCQuad Tool: Tool: Geometric tool to make the boolean operation. Conditions: "" does not exist in the dropdown list. :rtype: Return a GeomBody ``` ```{eval-rst} .. py:function:: boolOpCommon(GeomName, From, Tools) :nocontentsentry: Intersection: Intersection between two objects | Alias: common :param str GeomName: Name. Conditions: "" input must be non-empty. :param Entity From: Geometric entity: Geometric entity on which the boolean operation is applied. Conditions: The input must be non-empty. "" does not exist in the dropdown list. :param List Tools: Tools: Geometric tools to make the boolean operation. Conditions: "" does not exist in the dropdown list. :rtype: Return a GeomBody ``` ```{eval-rst} .. py:function:: boolOpCommon(GeomName, From, Tool) :nocontentsentry: Intersection: Intersection between two objects | Alias: common :param str GeomName: Name. Conditions: "" input must be non-empty. :param Entity From: Geometric entity: Geometric entity on which the boolean operation is applied. Conditions: The input must be non-empty. "" does not exist in the dropdown list. :param POCCQuad Tool: Tool: Geometric tool to make the boolean operation. Conditions: "" does not exist in the dropdown list. :rtype: Return a GeomBody ``` *Example:* ```{code-block} python # -*- coding: utf-8 -*- # Example: Performing a Boolean operation between geometric entities # This command performs a Boolean operation between a main entity and one or more # tool entities. The operation modifies or combines geometries depending on # the Boolean type (e.g., common, union, subtraction). # Arguments: # 1. String: Name of the resulting geometry. # 2. Geometry: Tool geometry (or list of geometries) that applies the operation. # 3. List: Main geometry (or geometries) to which the operation is applied. # Main geometry to apply the Boolean operation to main_quad_geom_entity1 = createQuad( "Surface", Point(-1, -1, 0), Point(-1, 1, 0), Point( 1, 1, 0), Point( 1, -1, 0) ) # Tool geometry used to perform the Boolean operation tool_quad_geom_entity2 = createQuad( "Surface (2)", Point(0, 0, 0), Point(0, 2, 0), Point(2, 2, 0), Point(2, 0, 0) ) # Perform a Boolean "common" operation between both geometries boolOpCommon( "Bool operation", tool_quad_geom_entity2, [main_quad_geom_entity1] ) # Result: # A new geometry representing the intersection (common volume or area) # between the main entity and the tool entity. ``` ```{eval-rst} .. py:function:: boolOpCut(From, Tools) :nocontentsentry: Subtraction: Subtract one object from another, removing the common part | Alias: cut :param Entity From: Geometric entity: Geometric entity on which the boolean operation is applied. Conditions: The input must be non-empty. Geometric operation cannot be done with the same geometry. "" does not exist in the dropdown list. :param List Tools: Tools: Geometric tools to make the boolean operation. Conditions: "" does not exist in the dropdown list. :rtype: Return a GeomBody ``` ```{eval-rst} .. py:function:: boolOpCut(From, Tool) :nocontentsentry: Subtraction: Subtract one object from another, removing the common part | Alias: cut :param Entity From: Geometric entity: Geometric entity on which the boolean operation is applied. Conditions: The input must be non-empty. Geometric operation cannot be done with the same geometry. "" does not exist in the dropdown list. :param POCCQuad Tool: Tool: Geometric tool to make the boolean operation. Conditions: "" does not exist in the dropdown list. :rtype: Return a GeomBody ``` ```{eval-rst} .. py:function:: boolOpCut(GeomName, From, Tools) :nocontentsentry: Subtraction: Subtract one object from another, removing the common part | Alias: cut :param str GeomName: Name. Conditions: "" input must be non-empty. :param Entity From: Geometric entity: Geometric entity on which the boolean operation is applied. Conditions: The input must be non-empty. Geometric operation cannot be done with the same geometry. "" does not exist in the dropdown list. :param List Tools: Tools: Geometric tools to make the boolean operation. Conditions: "" does not exist in the dropdown list. :rtype: Return a GeomBody ``` ```{eval-rst} .. py:function:: boolOpCut(GeomName, From, Tool) :nocontentsentry: Subtraction: Subtract one object from another, removing the common part | Alias: cut :param str GeomName: Name. Conditions: "" input must be non-empty. :param Entity From: Geometric entity: Geometric entity on which the boolean operation is applied. Conditions: The input must be non-empty. Geometric operation cannot be done with the same geometry. "" does not exist in the dropdown list. :param POCCQuad Tool: Tool: Geometric tool to make the boolean operation. Conditions: "" does not exist in the dropdown list. :rtype: Return a GeomBody ``` *Example:* ```{code-block} python # -*- coding: utf-8 -*- # Example: Performing a Boolean "cut" operation between geometric entities # This command performs a Boolean "cut" operation, subtracting the tool # geometry (or geometries) from the main one. The result is the portion # of the main geometry that remains after removing the intersecting part. # Arguments: # 1. String: Name of the resulting geometry. # 2. Geometry: Tool geometry (or list of geometries) that performs the cut. # 3. List: Main geometry (or geometries) to which the cut is applied. # Main geometry to be cut main_quad_geom_entity1 = createQuad( "Surface", Point(-1, -1, 0), Point(-1, 1, 0), Point( 1, 1, 0), Point( 1, -1, 0) ) # Tool geometry used to perform the cut tool_quad_geom_entity2 = createQuad( "Surface (2)", Point(0, 0, 0), Point(0, 2, 0), Point(2, 2, 0), Point(2, 0, 0) ) # Perform a Boolean "cut" operation (main - tool) boolOpCut( "Bool operation", tool_quad_geom_entity2, [main_quad_geom_entity1] ) # Result: # A new geometry representing the main entity with the overlapping region # of the tool entity removed. ``` ```{eval-rst} .. py:function:: boolOpFuse(From, Tools) :nocontentsentry: Union: Join two objects to create a single one | Alias: fuse :param Entity From: Geometric entity: Geometric entity on which the boolean operation is applied. Conditions: The input must be non-empty. Geometric operation cannot be done with the same geometry. "" does not exist in the dropdown list. :param List Tools: Tools: Geometric tools to make the boolean operation. Conditions: "" does not exist in the dropdown list. ``` ```{eval-rst} .. py:function:: boolOpFuse(From, Tool) :nocontentsentry: Union: Join two objects to create a single one | Alias: fuse :param Entity From: Geometric entity: Geometric entity on which the boolean operation is applied. Conditions: The input must be non-empty. Geometric operation cannot be done with the same geometry. "" does not exist in the dropdown list. :param POCCQuad Tool: Tool: Geometric tool to make the boolean operation. Conditions: "" does not exist in the dropdown list. ``` ```{eval-rst} .. py:function:: boolOpFuse(GeomName, From, Tools) :nocontentsentry: Union: Join two objects to create a single one | Alias: fuse :param str GeomName: Name. Conditions: "" input must be non-empty. :param Entity From: Geometric entity: Geometric entity on which the boolean operation is applied. Conditions: The input must be non-empty. Geometric operation cannot be done with the same geometry. "" does not exist in the dropdown list. :param List Tools: Tools: Geometric tools to make the boolean operation. Conditions: "" does not exist in the dropdown list. ``` ```{eval-rst} .. py:function:: boolOpFuse(GeomName, From, Tool) :nocontentsentry: Union: Join two objects to create a single one | Alias: fuse :param str GeomName: Name. Conditions: "" input must be non-empty. :param Entity From: Geometric entity: Geometric entity on which the boolean operation is applied. Conditions: The input must be non-empty. Geometric operation cannot be done with the same geometry. "" does not exist in the dropdown list. :param POCCQuad Tool: Tool: Geometric tool to make the boolean operation. Conditions: "" does not exist in the dropdown list. ``` *Example:* ```{code-block} python # -*- coding: utf-8 -*- # Example: Performing a Boolean "fuse" (union) operation between geometric entities # This command performs a Boolean "fuse" operation, merging the tool geometry # (or geometries) with the main one. The result is a single geometry that # encompasses the combined volume or surface of all inputs. # Arguments: # 1. String: Name of the resulting geometry. # 2. Geometry: Tool geometry (or list of geometries) to be merged. # 3. List: Main geometry (or geometries) to which the merge is applied. # Main geometry to be merged main_quad_geom_entity1 = createQuad( "Surface", Point(-1, -1, 0), Point(-1, 1, 0), Point( 1, 1, 0), Point( 1, -1, 0) ) # Tool geometry used for the merge tool_quad_geom_entity2 = createQuad( "Surface (2)", Point(0, 0, 0), Point(0, 2, 0), Point(2, 2, 0), Point(2, 0, 0) ) # Perform a Boolean "fuse" (union) operation boolOpFuse( "Bool operation", tool_quad_geom_entity2, [main_quad_geom_entity1] ) # Result: # A new geometry representing the union of the main and tool entities, # forming a single continuous object. ``` ```{eval-rst} .. py:function:: boolOpSection(From, Tools) :nocontentsentry: Section: Intersection by section between two objects :param Entity From: Geometric entity: Geometric entity on which the boolean operation is applied. Conditions: The input must be non-empty. "" does not exist in the dropdown list. :param List Tools: Tools: Geometric tools to make the boolean operation. Conditions: "" does not exist in the dropdown list. :rtype: Return a GeomBody ``` ```{eval-rst} .. py:function:: boolOpSection(GeomName, From, Tools) :nocontentsentry: Section: Intersection by section between two objects :param str GeomName: Name. Conditions: "" input must be non-empty. :param Entity From: Geometric entity: Geometric entity on which the boolean operation is applied. Conditions: The input must be non-empty. "" does not exist in the dropdown list. :param List Tools: Tools: Geometric tools to make the boolean operation. Conditions: "" does not exist in the dropdown list. :rtype: Return a GeomBody ``` *Example:* ```{code-block} python # -*- coding: utf-8 -*- # Example: Performing a Boolean "section" operation between geometric entities # This command performs a Boolean "section" operation, generating the intersection # curves between the main geometry and the tool geometry. Unlike other Boolean # operations (such as fuse, cut, or split), this one does not keep volumetric # or surface regions, only the resulting intersection curves. # Arguments: # 1. String: Name of the resulting geometry (section operation). # 2. Geometry: Tool geometry used to create the intersection. # 3. List: Main geometry (or geometries) to be intersected. # Main geometry to apply the section operation main_quad_geom_entity1 = createQuad( "Surface", Point(-1, -1, 0), Point(-1, 1, 0), Point( 1, 1, 0), Point( 1, -1, 0) ) # Tool geometry used to generate the intersection tool_quad_geom_entity2 = createQuad( "Surface (2)", Point(0, 0, 0), Point(0, 2, 0), Point(2, 2, 0), Point(2, 0, 0) ) # Perform a Boolean "section" operation boolOpSection( "Bool operation", tool_quad_geom_entity2, [main_quad_geom_entity1] ) # Result: # A new geometry containing the *intersection curves* between # the main and tool geometries. ``` ```{eval-rst} .. py:function:: boolOpSplitLeft(From, Tools) :nocontentsentry: Split left: Intersection by split of an object keeping the upper part :param Entity From: Geometric entity: Geometric entity on which the boolean operation is applied. Conditions: The input must be non-empty. "" does not exist in the dropdown list. :param List Tools: Tools: Geometric tools to make the boolean operation. Conditions: "" does not exist in the dropdown list. :rtype: Return a GeomBody ``` ```{eval-rst} .. py:function:: boolOpSplitLeft(From, Tool) :nocontentsentry: Split left: Intersection by split of an object keeping the upper part :param Entity From: Geometric entity: Geometric entity on which the boolean operation is applied. Conditions: The input must be non-empty. "" does not exist in the dropdown list. :param POCCQuad Tool: Tool: Geometric tool to make the boolean operation. Conditions: "" does not exist in the dropdown list. :rtype: Return a GeomBody ``` ```{eval-rst} .. py:function:: boolOpSplitLeft(GeomName, From, Tools) :nocontentsentry: Split left: Intersection by split of an object keeping the upper part :param str GeomName: Name. Conditions: "" input must be non-empty. :param Entity From: Geometric entity: Geometric entity on which the boolean operation is applied. Conditions: The input must be non-empty. "" does not exist in the dropdown list. :param List Tools: Tools: Geometric tools to make the boolean operation. Conditions: "" does not exist in the dropdown list. :rtype: Return a GeomBody ``` ```{eval-rst} .. py:function:: boolOpSplitLeft(GeomName, From, Tool) :nocontentsentry: Split left: Intersection by split of an object keeping the upper part :param str GeomName: Name. Conditions: "" input must be non-empty. :param Entity From: Geometric entity: Geometric entity on which the boolean operation is applied. Conditions: The input must be non-empty. "" does not exist in the dropdown list. :param POCCQuad Tool: Tool: Geometric tool to make the boolean operation. Conditions: "" does not exist in the dropdown list. :rtype: Return a GeomBody ``` *Example:* ```{code-block} python # -*- coding: utf-8 -*- # Example: Performing a Boolean "split left" operation between geometric entities # This command performs a Boolean "split" operation, dividing the main geometry # using the tool geometry as a cutting surface or volume. The result retains # only the *left* portion of the main geometry relative to the splitting tool. # Arguments: # 1. String: Name of the resulting geometry. # 2. Geometry: Tool geometry used for splitting. # 3. List: Main geometry (or geometries) to be split. # Main geometry to apply the split main_quad_geom_entity1 = createQuad( "Surface", Point(-1, -1, 0), Point(-1, 1, 0), Point( 1, 1, 0), Point( 1, -1, 0) ) # Tool geometry used to perform the split tool_quad_geom_entity2 = createQuad( "Surface (2)", Point(0, 0, 0), Point(0, 2, 0), Point(2, 2, 0), Point(2, 0, 0) ) # Perform a Boolean "split left" operation boolOpSplitLeft( "Bool operation", tool_quad_geom_entity2, [main_quad_geom_entity1] ) # Result: # A new geometry containing only the *left side* of the main geometry, # relative to the tool geometry used for splitting. ``` ```{eval-rst} .. py:function:: boolOpSplitRight(From, Tools) :nocontentsentry: Split right: Intersection by split of an object keeping the lower part :param Entity From: Geometric entity: Geometric entity on which the boolean operation is applied. Conditions: The input must be non-empty. "" does not exist in the dropdown list. :param List Tools: Tools: Geometric tools to make the boolean operation. Conditions: "" does not exist in the dropdown list. :rtype: Return a GeomBody ``` ```{eval-rst} .. py:function:: boolOpSplitRight(From, Tool) :nocontentsentry: Split right: Intersection by split of an object keeping the lower part :param Entity From: Geometric entity: Geometric entity on which the boolean operation is applied. Conditions: The input must be non-empty. "" does not exist in the dropdown list. :param POCCQuad Tool: Tool: Geometric tool to make the boolean operation. Conditions: "" does not exist in the dropdown list. :rtype: Return a GeomBody ``` ```{eval-rst} .. py:function:: boolOpSplitRight(GeomName, From, Tools) :nocontentsentry: Split right: Intersection by split of an object keeping the lower part :param str GeomName: Name. Conditions: "" input must be non-empty. :param Entity From: Geometric entity: Geometric entity on which the boolean operation is applied. Conditions: The input must be non-empty. "" does not exist in the dropdown list. :param List Tools: Tools: Geometric tools to make the boolean operation. Conditions: "" does not exist in the dropdown list. :rtype: Return a GeomBody ``` ```{eval-rst} .. py:function:: boolOpSplitRight(GeomName, From, Tool) :nocontentsentry: Split right: Intersection by split of an object keeping the lower part :param str GeomName: Name. Conditions: "" input must be non-empty. :param Entity From: Geometric entity: Geometric entity on which the boolean operation is applied. Conditions: The input must be non-empty. "" does not exist in the dropdown list. :param POCCQuad Tool: Tool: Geometric tool to make the boolean operation. Conditions: "" does not exist in the dropdown list. :rtype: Return a GeomBody ``` *Example:* ```{code-block} python # -*- coding: utf-8 -*- # Example: Performing a Boolean "split right" operation between geometric entities # This command performs a Boolean "split" operation, dividing the main geometry # using the tool geometry as a cutting surface or volume. The result retains # only the *right* portion of the main geometry relative to the splitting tool. # Arguments: # 1. String: Name of the resulting geometry. # 2. Geometry: Tool geometry used for splitting. # 3. List: Main geometry (or geometries) to be split. # Main geometry to apply the split main_quad_geom_entity1 = createQuad( "Surface", Point(-1, -1, 0), Point(-1, 1, 0), Point( 1, 1, 0), Point( 1, -1, 0) ) # Tool geometry used to perform the split tool_quad_geom_entity2 = createQuad( "Surface (2)", Point(0, 0, 0), Point(0, 2, 0), Point(2, 2, 0), Point(2, 0, 0) ) # Perform a Boolean "split right" operation boolOpSplitRight( "Bool operation", tool_quad_geom_entity2, [main_quad_geom_entity1] ) # Result: # A new geometry containing only the *right side* of the main geometry, # relative to the tool geometry used for splitting. ``` ```{eval-rst} .. py:function:: createTrimCurve(entity, Param) :nocontentsentry: Trim: Trim the curve | Alias: trimCurve :param [Entity] entity: Entity/Entities to apply the command :param Double Param: ParamU: Parameter on the curve. Conditions: Value must be greater than 0.00 and lower than 1.00. :rtype: Return a GeomWire ``` ```{eval-rst} .. py:function:: createTrimCurve(entity, GeomName, Param) :nocontentsentry: Trim: Trim the curve | Alias: trimCurve :param [Entity] entity: Entity/Entities to apply the command :param str GeomName: Name. Conditions: "" input must be non-empty. :param Double Param: ParamU: Parameter on the curve. Conditions: Value must be greater than 0.00 and lower than 1.00. :rtype: Return a GeomWire ``` *Example:* ```{code-block} python # -*- coding: utf-8 -*- # Example: Trimming a line to create a new curve # This command trims an existing curve (typically a line) # to produce a new, shorter curve segment. # The trimming is controlled by a parametric value between 0 and 1, # where: # 0 = start of the curve # 1 = end of the curve # Create the original line line_geom_entity = createLine("Curve", Point(-7, -3, 0), Point(-8, 4, 0)) # Trim the line at the parametric position 0.5 (midpoint) # and create a new curve entity within the specified group createTrimCurve([line_geom_entity], "Curves group", 0.5) # Result: # A new curve segment (half of the original line) is created # and stored in the "Curves group" container. ``` ```{eval-rst} .. py:function:: extrude(GeomObjectList, Path) :nocontentsentry: Path: Extrude geometries through a path :param List GeomObjectList: Geometric entities: Geometric entities basis of the extrusion. Conditions: "" does not exist in the dropdown list. :param Entity Path: Axis: Direction for the extrusion. Conditions: The input must be non-empty. "" does not exist in the dropdown list. :rtype: Return a GeomBody ``` ```{eval-rst} .. py:function:: extrude(GeomObject, Path) :nocontentsentry: Path: Extrude geometries through a path :param POCCGeomLine GeomObject: Geometric entity: Geometric entity basis of the extrusion. Conditions: "" does not exist in the dropdown list. :param Entity Path: Axis: Direction for the extrusion. Conditions: The input must be non-empty. "" does not exist in the dropdown list. :rtype: Return a GeomBody ``` ```{eval-rst} .. py:function:: extrude(GeomName, GeomObjectList, Path) :nocontentsentry: Path: Extrude geometries through a path :param str GeomName: Name. Conditions: "" input must be non-empty. :param List GeomObjectList: Geometric entities: Geometric entities basis of the extrusion. Conditions: "" does not exist in the dropdown list. :param Entity Path: Axis: Direction for the extrusion. Conditions: The input must be non-empty. "" does not exist in the dropdown list. :rtype: Return a GeomBody ``` ```{eval-rst} .. py:function:: extrude(GeomName, GeomObject, Path) :nocontentsentry: Path: Extrude geometries through a path :param str GeomName: Name. Conditions: "" input must be non-empty. :param POCCGeomLine GeomObject: Geometric entity: Geometric entity basis of the extrusion. Conditions: "" does not exist in the dropdown list. :param Entity Path: Axis: Direction for the extrusion. Conditions: The input must be non-empty. "" does not exist in the dropdown list. :rtype: Return a GeomBody ``` *Example:* ```{code-block} python # -*- coding: utf-8 -*- # Example: Extruding a geometry along a polyline path # This command extrudes a given geometric entity along a defined curve or polyline path. # It is typically used to generate a 3D shape that follows a custom trajectory. # Arguments: # 1. String: Name of the resulting extrusion entity. # 2. List: Entities to be extruded (e.g., surfaces, curves). # 3. Curve or path: The geometric entity defining the extrusion trajectory. # Geometry to extrude object_geom_entity = createQuad( "Surface", Point(0, 0, 0), Point(1, 0, 0), Point(1, 1, 0), Point(0, 1, 0) ) # Path or curve used for the extrusion polyline_geom_entity = createPolyline( "Curves group", [Point(0, 0, 0), Point(1, 0, 1), Point(2, 0, 2)] ) # Perform the extrusion along the defined curve extrude( "Extrusion", [object_geom_entity], polyline_geom_entity ) # Result: # A new geometric entity named "Extrusion" is created by extruding # the given surface along the specified polyline path. ``` ```{eval-rst} .. py:function:: extrudeLength(GeomObjectList, Path, Dimension) :nocontentsentry: Partial length: Extrude geometries through a straigth curve, with a defined length :param List GeomObjectList: Geometric entities: Geometric entities basis of the extrusion. Conditions: "" does not exist in the dropdown list. :param Entity Path: Axis: Direction for the extrusion. Conditions: The input must be non-empty. "" does not exist in the dropdown list. :param Double Dimension: Height: Height of extrusion. Conditions: Value must be greater than 0. :rtype: Return a GeomBody ``` ```{eval-rst} .. py:function:: extrudeLength(GeomObject, Path, Dimension) :nocontentsentry: Partial length: Extrude geometries through a straigth curve, with a defined length :param POCCGeomLine GeomObject: Geometric entity: Geometric entity basis of the extrusion. Conditions: "" does not exist in the dropdown list. :param Entity Path: Axis: Direction for the extrusion. Conditions: The input must be non-empty. "" does not exist in the dropdown list. :param Double Dimension: Height: Height of extrusion. Conditions: Value must be greater than 0. :rtype: Return a GeomBody ``` ```{eval-rst} .. py:function:: extrudeLength(GeomName, GeomObjectList, Path, Dimension) :nocontentsentry: Partial length: Extrude geometries through a straigth curve, with a defined length :param str GeomName: Name. Conditions: "" input must be non-empty. :param List GeomObjectList: Geometric entities: Geometric entities basis of the extrusion. Conditions: "" does not exist in the dropdown list. :param Entity Path: Axis: Direction for the extrusion. Conditions: The input must be non-empty. "" does not exist in the dropdown list. :param Double Dimension: Height: Height of extrusion. Conditions: Value must be greater than 0. :rtype: Return a GeomBody ``` ```{eval-rst} .. py:function:: extrudeLength(GeomName, GeomObject, Path, Dimension) :nocontentsentry: Partial length: Extrude geometries through a straigth curve, with a defined length :param str GeomName: Name. Conditions: "" input must be non-empty. :param POCCGeomLine GeomObject: Geometric entity: Geometric entity basis of the extrusion. Conditions: "" does not exist in the dropdown list. :param Entity Path: Axis: Direction for the extrusion. Conditions: The input must be non-empty. "" does not exist in the dropdown list. :param Double Dimension: Height: Height of extrusion. Conditions: Value must be greater than 0. :rtype: Return a GeomBody ``` *Example:* ```{code-block} python # -*- coding: utf-8 -*- # Example: Extruding a geometry along a path # This command performs an extrusion of a given geometric entity # along a specified path or axis, creating a 3D volume or surface. # Arguments: # 1. String: Name of the resulting extrusion entity. # 2. List: Entities to be extruded (e.g., surfaces, curves). # 3. Path or axis along which the extrusion will be performed. # 4. Double: Extrusion length. # Geometry to extrude object_geom_entity = createQuad( "Surface", Point(0, 0, 0), Point(1, 0, 0), Point(1, 1, 0), Point(0, 1, 0) ) # Path or axis used for the extrusion path_geom_entity = createAxis( "Curve", Point(0, 0, 0), Vector(0, 0, 1) ) # Length of the extrusion extrude_path_length = Double(1) # Perform the extrusion operation geom_entity = extrudeLength( "Extrusion", [object_geom_entity], path_geom_entity, extrude_path_length ) # Result: # A new geometric entity named "Extrusion" is created by extruding # the given surface along the specified path for the defined length. ``` ```{eval-rst} .. py:function:: getCurves(Geom) :nocontentsentry: Get curves :param POCCVertexByCoord Geom: Geometry. Conditions: "" does not exist in the dropdown list. ``` ```{eval-rst} .. py:function:: getSurfaces(Geom) :nocontentsentry: Get faces :param POCCVertexByCoord Geom: Geometry. Conditions: "" does not exist in the dropdown list. ``` ```{eval-rst} .. py:function:: revolve(GeomObjectList, Center, Angle) :nocontentsentry: Revolve: Revolve an entity around an axis | Constraints: 2 dimensions :param List GeomObjectList: Geometric entities: Geometric entity basis of the revolution. Conditions: "" does not exist in the dropdown list. :param Point Center: Center: Center for the revolution. :param Double Angle: Angle: Angle. Conditions: Value must be greater or equal than 0.00 and lower than 6.28. :rtype: Return a GeomBody ``` ```{eval-rst} .. py:function:: revolve(GeomObject, Center, Angle) :nocontentsentry: Revolve: Revolve an entity around an axis | Constraints: 2 dimensions :param POCCVertexByCoord GeomObject: Geometric entity: Geometric entity basis of the revolution. Conditions: "" does not exist in the dropdown list. :param Point Center: Center: Center for the revolution. :param Double Angle: Angle: Angle. Conditions: Value must be greater or equal than 0.00 and lower than 6.28. :rtype: Return a GeomBody ``` ```{eval-rst} .. py:function:: revolve(GeomObjectList, Axis, Angle) :nocontentsentry: Revolve: Revolve an entity around an axis | Constraints: 3 dimensions :param List GeomObjectList: Geometric entities: Geometric entity basis of the revolution. Conditions: "" does not exist in the dropdown list. :param Entity Axis: Axis: Direction vector for the revolution. Conditions: The input must be non-empty. "" does not exist in the dropdown list. :param Double Angle: Angle: Angle. Conditions: Value must be greater or equal than 0.00 and lower than 6.28. :rtype: Return a GeomBody ``` ```{eval-rst} .. py:function:: revolve(GeomObject, Axis, Angle) :nocontentsentry: Revolve: Revolve an entity around an axis | Constraints: 3 dimensions :param POCCVertexByCoord GeomObject: Geometric entity: Geometric entity basis of the revolution. Conditions: "" does not exist in the dropdown list. :param Entity Axis: Axis: Direction vector for the revolution. Conditions: The input must be non-empty. "" does not exist in the dropdown list. :param Double Angle: Angle: Angle. Conditions: Value must be greater or equal than 0.00 and lower than 6.28. :rtype: Return a GeomBody ``` ```{eval-rst} .. py:function:: revolve(GeomName, GeomObjectList, Center, Angle) :nocontentsentry: Revolve: Revolve an entity around an axis | Constraints: 2 dimensions :param str GeomName: Name. Conditions: "" input must be non-empty. :param List GeomObjectList: Geometric entities: Geometric entity basis of the revolution. Conditions: "" does not exist in the dropdown list. :param Point Center: Center: Center for the revolution. :param Double Angle: Angle: Angle. Conditions: Value must be greater or equal than 0.00 and lower than 6.28. :rtype: Return a GeomBody ``` ```{eval-rst} .. py:function:: revolve(GeomName, GeomObject, Center, Angle) :nocontentsentry: Revolve: Revolve an entity around an axis | Constraints: 2 dimensions :param str GeomName: Name. Conditions: "" input must be non-empty. :param POCCVertexByCoord GeomObject: Geometric entity: Geometric entity basis of the revolution. Conditions: "" does not exist in the dropdown list. :param Point Center: Center: Center for the revolution. :param Double Angle: Angle: Angle. Conditions: Value must be greater or equal than 0.00 and lower than 6.28. :rtype: Return a GeomBody ``` ```{eval-rst} .. py:function:: revolve(GeomName, GeomObjectList, Axis, Angle) :nocontentsentry: Revolve: Revolve an entity around an axis | Constraints: 3 dimensions :param str GeomName: Name. Conditions: "" input must be non-empty. :param List GeomObjectList: Geometric entities: Geometric entity basis of the revolution. Conditions: "" does not exist in the dropdown list. :param Entity Axis: Axis: Direction vector for the revolution. Conditions: The input must be non-empty. "" does not exist in the dropdown list. :param Double Angle: Angle: Angle. Conditions: Value must be greater or equal than 0.00 and lower than 6.28. :rtype: Return a GeomBody ``` ```{eval-rst} .. py:function:: revolve(GeomName, GeomObject, Axis, Angle) :nocontentsentry: Revolve: Revolve an entity around an axis | Constraints: 3 dimensions :param str GeomName: Name. Conditions: "" input must be non-empty. :param POCCVertexByCoord GeomObject: Geometric entity: Geometric entity basis of the revolution. Conditions: "" does not exist in the dropdown list. :param Entity Axis: Axis: Direction vector for the revolution. Conditions: The input must be non-empty. "" does not exist in the dropdown list. :param Double Angle: Angle: Angle. Conditions: Value must be greater or equal than 0.00 and lower than 6.28. :rtype: Return a GeomBody ``` *Example:* ```{code-block} python # -*- coding: utf-8 -*- # Example: Creating a solid or surface by revolving a geometry around an axis # This command revolves one or more geometric entities around a specified axis. # The revolution is defined by an angle (in degrees). # The result can be a solid or surface depending on the input geometry. # This command does not have referenced/non-referenced modes; the entities are provided directly. # Define the revolution angle revolve_angle = Double(360) # Angle of revolution in degrees # Define the axis around which the geometry will be revolved axis_geom_entity = createAxis( "Curve", Point(0, 0, 0), # Axis origin Vector(1, 0, 0) # Axis direction ) # Create the geometry to revolve (example: a quad) quad_base_to_revolve_geom_entity = createQuad( "Surface", Point(0, 0, 0), Point(1, 0, 0), Point(1, 1, 0), Point(0, 1, 0) ) # Perform the revolution geom_volume_entity = revolve( "Revolution", # Name of the resulting entity [quad_base_to_revolve_geom_entity], # List of geometries to revolve axis_geom_entity, # Axis entity for the revolution revolve_angle # Angle of revolution in degrees ) # Result: # A solid or surface entity is created by revolving the given geometry # around the specified axis by the defined angle. ```