# Curves ```{eval-rst} .. py:function:: createArc(StartVertex, MidVertex, EndVertex) :nocontentsentry: Arc (P,P,P): Arc defined by three points | Alias: arc | Constraints: Referenced :param Entity StartVertex: Start Vertex: Starting point of the arc . Conditions: The input must be non-empty. "" does not exist in the dropdown list. Points can not match. :param Entity MidVertex: Mid Vertex: Middle point of the arc . Conditions: The input must be non-empty. "" does not exist in the dropdown list. Points can not match. Points can not be collinear. :param Entity EndVertex: End Point: Ending point of the arc. Conditions: The input must be non-empty. "" does not exist in the dropdown list. Points can not match. :rtype: Return a GeomCurve ``` ```{eval-rst} .. py:function:: createArc(StartVertex, MidVertex, EndVertex) :nocontentsentry: Arc (P,P,P): Arc defined by three points | Alias: arc | Constraints: Not referenced :param Point StartVertex: Start Vertex: Starting point of the arc . Conditions: Points can not match. :param Point MidVertex: Mid Vertex: Middle point of the arc . Conditions: Points can not match. Points can not be collinear. :param Point EndVertex: End Point: Ending point of the arc. Conditions: Points can not match. :rtype: Return a GeomCurve ``` ```{eval-rst} .. py:function:: createArc(GeomName, StartVertex, MidVertex, EndVertex) :nocontentsentry: Arc (P,P,P): Arc defined by three points | Alias: arc | Constraints: Referenced :param str GeomName: Name. Conditions: "" input must be non-empty. :param Entity StartVertex: Start Vertex: Starting point of the arc . Conditions: The input must be non-empty. "" does not exist in the dropdown list. Points can not match. :param Entity MidVertex: Mid Vertex: Middle point of the arc . Conditions: The input must be non-empty. "" does not exist in the dropdown list. Points can not match. Points can not be collinear. :param Entity EndVertex: End Point: Ending point of the arc. Conditions: The input must be non-empty. "" does not exist in the dropdown list. Points can not match. :rtype: Return a GeomCurve ``` ```{eval-rst} .. py:function:: createArc(GeomName, StartVertex, MidVertex, EndVertex) :nocontentsentry: Arc (P,P,P): Arc defined by three points | Alias: arc | Constraints: Not referenced :param str GeomName: Name. Conditions: "" input must be non-empty. :param Point StartVertex: Start Vertex: Starting point of the arc . Conditions: Points can not match. :param Point MidVertex: Mid Vertex: Middle point of the arc . Conditions: Points can not match. Points can not be collinear. :param Point EndVertex: End Point: Ending point of the arc. Conditions: Points can not match. :rtype: Return a GeomCurve ``` *Example:* ```{code-block} python # -*- coding: utf-8 -*- # Example: Creating an arc using start, mid, and end points # --- Non-referenced mode --- # In this mode, the arc is created directly from point coordinates, # without referencing any existing geometric entities. point_start = Point(1, 0, 0) # Start point of the arc point_end = Point(0, 1, 0) # End point of the arc point_mid = Point(0, 0, 0) # Intermediate point located along the arc path # This point defines both the curvature and the direction of the arc arc_geom_entity = createArc( "Curve", # Name of the resulting arc entity point_start, # Start point point_mid, # Mid point (defines curvature and direction) point_end # End point ) # --- Referenced mode --- # In this mode, the arc is created using existing geometric entities (points), # allowing it to stay parametrically linked to them. point_start_geom_entity = createPoint("Point", point_start) # Create a point entity for the start point_end_geom_entity = createPoint("Point (2)", point_end) # Create a point entity for the end point_mid_geom_entity = createPoint("Point (3)", point_mid) # Create a point entity for the mid point arc_geom_entity = createArc( "Curve (2)", # Name of the resulting arc entity point_start_geom_entity, # Reference to the start point entity point_mid_geom_entity, # Reference to the mid point entity point_end_geom_entity # Reference to the end point entity ) ``` ```{eval-rst} .. py:function:: createArcPPC(StartVertex, EndVertex, CenterVertex, Sense) :nocontentsentry: Arc (P,P,C): Arc defined by two points and its center | Alias: arcPPC | Constraints: Referenced :param Entity StartVertex: Start Vertex: Starting point of the arc . Conditions: "" does not exist in the dropdown list. The input must be non-empty. Points can not match. :param Entity EndVertex: End Point: Ending point of the arc. Conditions: "" does not exist in the dropdown list. The input must be non-empty. Points can not match. :param Entity CenterVertex: Center: Center point of the arc . Conditions: "" does not exist in the dropdown list. The input must be non-empty. Points can not match. Points must be at the same distance of the center. Points can not be collinear. :param bool Sense: Direction: Reverse the direction of the arc. :rtype: Return a GeomCurve ``` ```{eval-rst} .. py:function:: createArcPPC(StartVertex, EndVertex, CenterVertex, Sense) :nocontentsentry: Arc (P,P,C): Arc defined by two points and its center | Alias: arcPPC | Constraints: Not referenced :param Point StartVertex: Start Vertex: Starting point of the arc . Conditions: Points can not match. :param Point EndVertex: End Point: Ending point of the arc. Conditions: Points can not match. :param Point CenterVertex: Center: Center point of the arc . Conditions: Points can not match. Points must be at the same distance of the center. Points can not be collinear. :param bool Sense: Direction: Reverse the direction of the arc. :rtype: Return a GeomCurve ``` ```{eval-rst} .. py:function:: createArcPPC(GeomName, StartVertex, EndVertex, CenterVertex, Sense) :nocontentsentry: Arc (P,P,C): Arc defined by two points and its center | Alias: arcPPC | Constraints: Referenced :param str GeomName: Name. Conditions: "" input must be non-empty. :param Entity StartVertex: Start Vertex: Starting point of the arc . Conditions: "" does not exist in the dropdown list. The input must be non-empty. Points can not match. :param Entity EndVertex: End Point: Ending point of the arc. Conditions: "" does not exist in the dropdown list. The input must be non-empty. Points can not match. :param Entity CenterVertex: Center: Center point of the arc . Conditions: "" does not exist in the dropdown list. The input must be non-empty. Points can not match. Points must be at the same distance of the center. Points can not be collinear. :param bool Sense: Direction: Reverse the direction of the arc. :rtype: Return a GeomCurve ``` ```{eval-rst} .. py:function:: createArcPPC(GeomName, StartVertex, EndVertex, CenterVertex, Sense) :nocontentsentry: Arc (P,P,C): Arc defined by two points and its center | Alias: arcPPC | Constraints: Not referenced :param str GeomName: Name. Conditions: "" input must be non-empty. :param Point StartVertex: Start Vertex: Starting point of the arc . Conditions: Points can not match. :param Point EndVertex: End Point: Ending point of the arc. Conditions: Points can not match. :param Point CenterVertex: Center: Center point of the arc . Conditions: Points can not match. Points must be at the same distance of the center. Points can not be collinear. :param bool Sense: Direction: Reverse the direction of the arc. :rtype: Return a GeomCurve ``` *Example:* ```{code-block} python # -*- coding: utf-8 -*- # Example: Creating an arc using two points and a center point # --- Non-referenced mode --- # In this mode, the arc is created directly from coordinates without referencing existing entities. direction = False # Defines the arc direction: # False = shortest path between the two points # True = longer arc passing through the opposite side point_start = Point(1, 0, 0) # Start point of the arc point_end = Point(0, 1, 0) # End point of the arc point_center = Point(0, 0, 0) # Center of the circle defining the arc arc_geom_entity = createArcPPC( "Curve", # Name of the resulting arc entity point_start, # Start point point_end, # End point point_center, # Center point direction # Arc direction (short or long path) ) # --- Referenced mode --- # In this mode, the arc is created from existing geometric entities (points), # allowing it to stay parametrically linked to them. direction = True # Create the arc using the longer path between the two points point_start_geom_entity = createPoint("Point", point_start) # Create a point entity for the start point_end_geom_entity = createPoint("Point (2)", point_end) # Create a point entity for the end point_center_geom_entity = createPoint("Point (3)", point_center) # Create a point entity for the center arc_geom_entity = createArcPPC( "Curve (2)", # Name of the resulting arc entity point_start_geom_entity, # Reference to the start point entity point_end_geom_entity, # Reference to the end point entity point_center_geom_entity, # Reference to the center point entity direction # Arc direction (short or long path) ) ``` ```{eval-rst} .. py:function:: createArcPPR(StartVertex, EndVertex, AuxiliarVertex, Radius) :nocontentsentry: Arc (P,P,R): Arc defined by two points and its radius | Alias: arcPPR | Constraints: Referenced :param Entity StartVertex: Start Vertex: Starting point of the arc . Conditions: "" does not exist in the dropdown list. The input must be non-empty. Points can not match. :param Entity EndVertex: End Point: Ending point of the arc. Conditions: "" does not exist in the dropdown list. The input must be non-empty. Points can not match. :param Entity AuxiliarVertex: Auxiliar point: Point to define the plane and the direction of the arc . Conditions: "" does not exist in the dropdown list. The input must be non-empty. Points can not match. Points can not be collinear. :param Double Radius: Radius: Radius of the arc. Conditions: Value must be greater than 0. Points must be at the same distance of the center. :rtype: Return a GeomCurve ``` ```{eval-rst} .. py:function:: createArcPPR(StartVertex, EndVertex, AuxiliarVertex, Radius) :nocontentsentry: Arc (P,P,R): Arc defined by two points and its radius | Alias: arcPPR | Constraints: Not referenced :param Point StartVertex: Start Vertex: Starting point of the arc . Conditions: Points can not match. :param Point EndVertex: End Point: Ending point of the arc. Conditions: Points can not match. :param Point AuxiliarVertex: Auxiliar point: Point to define the plane and the direction of the arc . Conditions: Points can not match. Points can not be collinear. :param Double Radius: Radius: Radius of the arc. Conditions: Value must be greater than 0. Points must be at the same distance of the center. :rtype: Return a GeomCurve ``` ```{eval-rst} .. py:function:: createArcPPR(GeomName, StartVertex, EndVertex, AuxiliarVertex, Radius) :nocontentsentry: Arc (P,P,R): Arc defined by two points and its radius | Alias: arcPPR | Constraints: Referenced :param str GeomName: Name. Conditions: "" input must be non-empty. :param Entity StartVertex: Start Vertex: Starting point of the arc . Conditions: "" does not exist in the dropdown list. The input must be non-empty. Points can not match. :param Entity EndVertex: End Point: Ending point of the arc. Conditions: "" does not exist in the dropdown list. The input must be non-empty. Points can not match. :param Entity AuxiliarVertex: Auxiliar point: Point to define the plane and the direction of the arc . Conditions: "" does not exist in the dropdown list. The input must be non-empty. Points can not match. Points can not be collinear. :param Double Radius: Radius: Radius of the arc. Conditions: Value must be greater than 0. Points must be at the same distance of the center. :rtype: Return a GeomCurve ``` ```{eval-rst} .. py:function:: createArcPPR(GeomName, StartVertex, EndVertex, AuxiliarVertex, Radius) :nocontentsentry: Arc (P,P,R): Arc defined by two points and its radius | Alias: arcPPR | Constraints: Not referenced :param str GeomName: Name. Conditions: "" input must be non-empty. :param Point StartVertex: Start Vertex: Starting point of the arc . Conditions: Points can not match. :param Point EndVertex: End Point: Ending point of the arc. Conditions: Points can not match. :param Point AuxiliarVertex: Auxiliar point: Point to define the plane and the direction of the arc . Conditions: Points can not match. Points can not be collinear. :param Double Radius: Radius: Radius of the arc. Conditions: Value must be greater than 0. Points must be at the same distance of the center. :rtype: Return a GeomCurve ``` *Example:* ```{code-block} python # -*- coding: utf-8 -*- # Example: Creating an arc using two points, an auxiliary point, and a radius # --- Non-referenced mode --- # In this mode, the arc is defined directly by coordinates and parameters, # without referencing any existing geometric entities. point_start = Point(1, 0, 0) # Start point of the arc point_end = Point(0, 1, 0) # End point of the arc point_auxiliar = Point(0, 0, 0) # Auxiliary point used to define the arc's plane and direction radius = Double(1) # Radius of the arc arc_geom_entity = createArcPPR( "Curve", # Name of the resulting arc entity point_start, # Start point point_end, # End point point_auxiliar, # Auxiliary point (defines plane and direction) radius # Arc radius ) # --- Referenced mode --- # In this mode, the arc is created using existing geometric entities (points), # allowing it to maintain parametric relationships with those entities. point_start_geom_entity = createPoint("Point", point_start) # Create a point entity for the start point_end_geom_entity = createPoint("Point (2)", point_end) # Create a point entity for the end point_aux_geom_entity = createPoint("Point (3)", point_auxiliar) # Create a point entity for the auxiliary point arc_geom_entity = createArcPPR( "Curve (2)", # Name of the resulting arc entity point_start_geom_entity, # Reference to the start point entity point_end_geom_entity, # Reference to the end point entity point_aux_geom_entity, # Reference to the auxiliary point entity radius # Arc radius ) ``` ```{eval-rst} .. py:function:: createAxis(Origin, Vector) :nocontentsentry: Axis: Create an axis with a given direction | Alias: axis | Constraints: Referenced :param POCCVertexByCoord Origin: Origin: Axis origin. Conditions: "" does not exist in the dropdown list. The input must be non-empty. :param Vector Vector: Direction: Axis direction . Conditions: A vector cannot have zero magnitude. :rtype: Return a GeomCurve ``` ```{eval-rst} .. py:function:: createAxis(Origin, Vector) :nocontentsentry: Axis: Create an axis with a given direction | Alias: axis | Constraints: Not referenced :param Point Origin: Origin: Axis origin. :param Vector Vector: Direction: Axis direction . Conditions: A vector cannot have zero magnitude. :rtype: Return a GeomCurve ``` ```{eval-rst} .. py:function:: createAxis(GeomName, Origin, Vector) :nocontentsentry: Axis: Create an axis with a given direction | Alias: axis | Constraints: Referenced :param str GeomName: Name. Conditions: "" input must be non-empty. :param POCCVertexByCoord Origin: Origin: Axis origin. Conditions: "" does not exist in the dropdown list. The input must be non-empty. :param Vector Vector: Direction: Axis direction . Conditions: A vector cannot have zero magnitude. :rtype: Return a GeomCurve ``` ```{eval-rst} .. py:function:: createAxis(GeomName, Origin, Vector) :nocontentsentry: Axis: Create an axis with a given direction | Alias: axis | Constraints: Not referenced :param str GeomName: Name. Conditions: "" input must be non-empty. :param Point Origin: Origin: Axis origin. :param Vector Vector: Direction: Axis direction . Conditions: A vector cannot have zero magnitude. :rtype: Return a GeomCurve ``` *Example:* ```{code-block} python # -*- coding: utf-8 -*- # Example: Creating an axis using an origin point and a direction vector # --- Non-referenced mode --- # In this mode, the axis is defined directly from coordinates and a vector, # without referencing any existing geometric entities. origin = Point(0, 0, 0) # Origin point of the axis direction = Vector(1, 0, 0) # Direction vector of the axis axis_geom_entity = createAxis( "Curve", # Name of the resulting axis entity origin, # Origin point direction # Axis direction ) # --- Referenced mode --- # In this mode, the axis is created from existing geometric entities, # allowing it to maintain parametric relationships within the model. origin_geom_entity = createPoint("Point", origin) # Create a point entity for the origin axis_geom_entity = createAxis( "Curve (2)", # Name of the resulting axis entity origin_geom_entity, # Reference to the origin point entity direction # Axis direction ) ``` ```{eval-rst} .. py:function:: createBezierCurve(ListWeights, ListPnts) :nocontentsentry: Bézier curve: Create a Bézier curve | Alias: bezierCurve :param List ListWeights: Return a GeomPoint. :param List ListPnts: Points: List of points to fit the curve. :rtype: Return a GeomCurve ``` ```{eval-rst} .. py:function:: createBezierCurve(GeomName, ListWeights, ListPnts) :nocontentsentry: Bézier curve: Create a Bézier curve | Alias: bezierCurve :param str GeomName: Name. Conditions: "" input must be non-empty. :param List ListWeights: Return a GeomPoint. :param List ListPnts: Points: List of points to fit the curve. :rtype: Return a GeomCurve ``` *Example:* ```{code-block} python # -*- coding: utf-8 -*- # Example: Creating a Bézier curve using control points and weights # This command creates a Bézier curve defined by a list of control points # and corresponding weights. Each control point must have an associated weight. # The number of weights must match the number of control points. # --- Define control points --- point1_geom_entity = createPoint("Point", Point(2, 7, 0)) # First control point point2_geom_entity = createPoint("Point (2)", Point(7, 6, 0)) # Second control point point3_geom_entity = createPoint("Point (3)", Point(7, 3, 0)) # Third control point point4_geom_entity = createPoint("Point (4)", Point(4, -1, 0)) # Fourth control point # --- Define weights --- # Each weight corresponds to one control point. Uniform weights (all equal to 1) # create a standard Bézier curve. Different weights can influence the curvature. weights = [1, 1, 1, 1] # --- Create the Bézier curve --- bezier_curve_geom_entity = createBezierCurve( "Curve", # Name of the resulting Bézier curve entity weights, # List of weights (one per control point) [point1_geom_entity, point2_geom_entity, point3_geom_entity, point4_geom_entity] # List of control points ) ``` ```{eval-rst} .. py:function:: createCircumference(Center, Radius) :nocontentsentry: Circumf. (C,R): Circumference defined by its center and radius | Alias: circumference | Constraints: 2 dimensions, Referenced :param POCCVertexByCoord Center: Center: Center of the circle/circumference. Conditions: "" does not exist in the dropdown list. The input must be non-empty. :param Double Radius: Radius: Radius of the circle/circumference. Conditions: Value must be greater than 0. :rtype: Return a GeomCurve ``` ```{eval-rst} .. py:function:: createCircumference(Center, Radius) :nocontentsentry: Circumf. (C,R): Circumference defined by its center and radius | Alias: circumference | Constraints: 2 dimensions, Not referenced :param Point Center: Center: Center of the circle/circumference. :param Double Radius: Radius: Radius of the circle/circumference. Conditions: Value must be greater than 0. :rtype: Return a GeomCurve ``` ```{eval-rst} .. py:function:: createCircumference(GeomName, Center, Radius) :nocontentsentry: Circumf. (C,R): Circumference defined by its center and radius | Alias: circumference | Constraints: 2 dimensions, Referenced :param str GeomName: Name. Conditions: "" input must be non-empty. :param POCCVertexByCoord Center: Center: Center of the circle/circumference. Conditions: "" does not exist in the dropdown list. The input must be non-empty. :param Double Radius: Radius: Radius of the circle/circumference. Conditions: Value must be greater than 0. :rtype: Return a GeomCurve ``` ```{eval-rst} .. py:function:: createCircumference(Center, Vector, Radius) :nocontentsentry: Circumf. (C,R): Circumference defined by its center and radius | Alias: circumference | Constraints: 3 dimensions, Referenced :param POCCVertexByCoord Center: Center: Center of the circle/circumference. Conditions: "" does not exist in the dropdown list. The input must be non-empty. :param POCCGeomLine Vector: Normal Vector: Normal vector to the plane of the circle/circumference. Conditions: "" does not exist in the dropdown list. The input must be non-empty. :param Double Radius: Radius: Radius of the circle/circumference. Conditions: Value must be greater than 0. :rtype: Return a GeomCurve ``` ```{eval-rst} .. py:function:: createCircumference(GeomName, Center, Radius) :nocontentsentry: Circumf. (C,R): Circumference defined by its center and radius | Alias: circumference | Constraints: 2 dimensions, Not referenced :param str GeomName: Name. Conditions: "" input must be non-empty. :param Point Center: Center: Center of the circle/circumference. :param Double Radius: Radius: Radius of the circle/circumference. Conditions: Value must be greater than 0. :rtype: Return a GeomCurve ``` ```{eval-rst} .. py:function:: createCircumference(Center, Vector, Radius) :nocontentsentry: Circumf. (C,R): Circumference defined by its center and radius | Alias: circumference | Constraints: 3 dimensions, Not referenced :param Point Center: Center: Center of the circle/circumference. :param Vector Vector: Normal Vector: Normal vector to the plane of the circle/circumference. Conditions: A vector cannot have zero magnitude. :param Double Radius: Radius: Radius of the circle/circumference. Conditions: Value must be greater than 0. :rtype: Return a GeomCurve ``` ```{eval-rst} .. py:function:: createCircumference(GeomName, Center, Vector, Radius) :nocontentsentry: Circumf. (C,R): Circumference defined by its center and radius | Alias: circumference | Constraints: 3 dimensions, Referenced :param str GeomName: Name. Conditions: "" input must be non-empty. :param POCCVertexByCoord Center: Center: Center of the circle/circumference. Conditions: "" does not exist in the dropdown list. The input must be non-empty. :param POCCGeomLine Vector: Normal Vector: Normal vector to the plane of the circle/circumference. Conditions: "" does not exist in the dropdown list. The input must be non-empty. :param Double Radius: Radius: Radius of the circle/circumference. Conditions: Value must be greater than 0. :rtype: Return a GeomCurve ``` ```{eval-rst} .. py:function:: createCircumference(GeomName, Center, Vector, Radius) :nocontentsentry: Circumf. (C,R): Circumference defined by its center and radius | Alias: circumference | Constraints: 3 dimensions, Not referenced :param str GeomName: Name. Conditions: "" input must be non-empty. :param Point Center: Center: Center of the circle/circumference. :param Vector Vector: Normal Vector: Normal vector to the plane of the circle/circumference. Conditions: A vector cannot have zero magnitude. :param Double Radius: Radius: Radius of the circle/circumference. Conditions: Value must be greater than 0. :rtype: Return a GeomCurve ``` *Example:* ```{code-block} python # -*- coding: utf-8 -*- # Example: Creating a circumference (curve) (full or partial circumference) # This command creates a circumference using a center point, a normal axis, and a radius. # --- Non-referenced mode --- radius = Double(1) # Radius of the circumference center = Point(0, 0, 0) # Center of the circumference axis = Vector(1, 0, 0) # Normal direction defining the circumference’s plane circumference_geom_entity = createCircumference( "Curve", # Name of the resulting curve entity center, # Center point axis, # Axis (normal vector) radius # Radius ) # --- Referenced mode --- center_point_geom_entity = createPoint("Point", Point(0, 0, 0)) # Referenced center point normal_geom_entity = createAxis("Curve", Point(0, 0, 0), Vector(1, 0, 0)) # Referenced normal axis circumference_geom_entity = createCircumference( "Curve (2)", # Name of the resulting curve entity center_point_geom_entity, # Referenced center point normal_geom_entity, # Referenced normal axis radius # Radius ) ``` ```{eval-rst} .. py:function:: createCircumferenceCenter(Center, StartVertex, EndVertex) :nocontentsentry: Circumf. (C,P,P): Circumference defined by center and two points | Alias: circumferenceC | Constraints: Referenced :param Entity Center: Center: Center of the circle/circumference. Conditions: "" does not exist in the dropdown list. The input must be non-empty. Points can not match. Points can not be collinear. :param Entity StartVertex: Point 1: First point of the circle/circumference . Conditions: "" does not exist in the dropdown list. The input must be non-empty. Points can not match. :param Entity EndVertex: Point 2: Second point to define the plane of the circle/circumference. Conditions: "" does not exist in the dropdown list. The input must be non-empty. Points can not match. :rtype: Return a GeomCurve ``` ```{eval-rst} .. py:function:: createCircumferenceCenter(Center, StartVertex, EndVertex) :nocontentsentry: Circumf. (C,P,P): Circumference defined by center and two points | Alias: circumferenceC | Constraints: Not referenced :param Point Center: Center: Center of the circle/circumference. Conditions: Points can not match. Points can not be collinear. :param Point StartVertex: Point 1: First point of the circle/circumference . Conditions: Points can not match. :param Point EndVertex: Point 2: Second point to define the plane of the circle/circumference. Conditions: Points can not match. :rtype: Return a GeomCurve ``` ```{eval-rst} .. py:function:: createCircumferenceCenter(GeomName, Center, StartVertex, EndVertex) :nocontentsentry: Circumf. (C,P,P): Circumference defined by center and two points | Alias: circumferenceC | Constraints: Referenced :param str GeomName: Name. Conditions: "" input must be non-empty. :param Entity Center: Center: Center of the circle/circumference. Conditions: "" does not exist in the dropdown list. The input must be non-empty. Points can not match. Points can not be collinear. :param Entity StartVertex: Point 1: First point of the circle/circumference . Conditions: "" does not exist in the dropdown list. The input must be non-empty. Points can not match. :param Entity EndVertex: Point 2: Second point to define the plane of the circle/circumference. Conditions: "" does not exist in the dropdown list. The input must be non-empty. Points can not match. :rtype: Return a GeomCurve ``` ```{eval-rst} .. py:function:: createCircumferenceCenter(GeomName, Center, StartVertex, EndVertex) :nocontentsentry: Circumf. (C,P,P): Circumference defined by center and two points | Alias: circumferenceC | Constraints: Not referenced :param str GeomName: Name. Conditions: "" input must be non-empty. :param Point Center: Center: Center of the circle/circumference. Conditions: Points can not match. Points can not be collinear. :param Point StartVertex: Point 1: First point of the circle/circumference . Conditions: Points can not match. :param Point EndVertex: Point 2: Second point to define the plane of the circle/circumference. Conditions: Points can not match. :rtype: Return a GeomCurve ``` *Example:* ```{code-block} python # -*- coding: utf-8 -*- # Example: Creating a circumference (curve) using three points # This command creates a circumference by specifying: # - A center point # - Two points defining the arc (which must be equidistant from the center) # The 'angle' parameter defines the portion of the circle to generate: # --- Non-referenced mode --- center = Point(1, 0, 0) # Center of the circle point1 = Point(0, 1, 0) # First point on the circle’s arc point2 = Point(-1, 0, 0) # Second point on the circle’s arc circumference_geom_entity = createCircumferenceCenter( "Curve", # Name of the resulting curve entity center, # Center point point1, # First point on the circle point2 # Second point on the circle ) # --- Referenced mode --- center_geom_entity = createPoint("Point", Point(-1, 1, 0)) # Referenced center point point1_geom_entity = createPoint("Point (2)", Point(-1, 2, 0)) # Referenced first point point2_geom_entity = createPoint("Point (3)", Point(0, 1, 0)) # Referenced second point circumference_geom_entity = createCircumferenceCenter( "Curve (2)", # Name of the resulting surface entity center_geom_entity, # Referenced center point point1_geom_entity, # Referenced first point point2_geom_entity # Referenced second point ) ``` ```{eval-rst} .. py:function:: createCircumferencePnts(Point1, Point3, Point2) :nocontentsentry: Circumf. (P,P,P): Circumference defined by three points | Alias: circumferencePnts | Constraints: Referenced :param Entity Point1: Point1: First point which lies on the circumference . Conditions: The input must be non-empty. "" does not exist in the dropdown list. Points can not match. :param Entity Point3: Point3: Third point which lies on the circumference. Conditions: The input must be non-empty. "" does not exist in the dropdown list. Points can not match. Points can not be collinear. :param Entity Point2: Point2: Second point which lies on the circumference. Conditions: The input must be non-empty. "" does not exist in the dropdown list. Points can not match. :rtype: Return a GeomCurve ``` ```{eval-rst} .. py:function:: createCircumferencePnts(Point1, Point3, Point2) :nocontentsentry: Circumf. (P,P,P): Circumference defined by three points | Alias: circumferencePnts | Constraints: Not referenced :param Point Point1: Point1: First point which lies on the circumference . Conditions: Points can not match. :param Point Point3: Point3: Third point which lies on the circumference. Conditions: Points can not match. Points can not be collinear. :param Point Point2: Point2: Second point which lies on the circumference. Conditions: Points can not match. :rtype: Return a GeomCurve ``` ```{eval-rst} .. py:function:: createCircumferencePnts(GeomName, Point1, Point3, Point2) :nocontentsentry: Circumf. (P,P,P): Circumference defined by three points | Alias: circumferencePnts | Constraints: Referenced :param str GeomName: Name. Conditions: "" input must be non-empty. :param Entity Point1: Point1: First point which lies on the circumference . Conditions: The input must be non-empty. "" does not exist in the dropdown list. Points can not match. :param Entity Point3: Point3: Third point which lies on the circumference. Conditions: The input must be non-empty. "" does not exist in the dropdown list. Points can not match. Points can not be collinear. :param Entity Point2: Point2: Second point which lies on the circumference. Conditions: The input must be non-empty. "" does not exist in the dropdown list. Points can not match. :rtype: Return a GeomCurve ``` ```{eval-rst} .. py:function:: createCircumferencePnts(GeomName, Point1, Point3, Point2) :nocontentsentry: Circumf. (P,P,P): Circumference defined by three points | Alias: circumferencePnts | Constraints: Not referenced :param str GeomName: Name. Conditions: "" input must be non-empty. :param Point Point1: Point1: First point which lies on the circumference . Conditions: Points can not match. :param Point Point3: Point3: Third point which lies on the circumference. Conditions: Points can not match. Points can not be collinear. :param Point Point2: Point2: Second point which lies on the circumference. Conditions: Points can not match. :rtype: Return a GeomCurve ``` *Example:* ```{code-block} python # -*- coding: utf-8 -*- # Example: Creating a circumference from three points # This command creates a circular curve defined by three distinct points. # The provided points must all lie on the circumference of the same circle. # The circle is automatically computed so that it passes through these three points. # --- Non-referenced mode --- point1 = Point(1, 0, 0) # First point on the circumference point2 = Point(0, 0, 0) # Second point on the circumference point3 = Point(0, 1, 0) # Third point on the circumference circumference_geom_entity = createCircumferencePnts( "Curve", # Name of the resulting curve entity point1, # First defining point point2, # Second defining point point3 # Third defining point ) # --- Referenced mode --- point1_geom_entity = createPoint("Point", Point(-2, 0, 0)) # Referenced first point point2_geom_entity = createPoint("Point (2)", Point(-1, -1, 0)) # Referenced second point point3_geom_entity = createPoint("Point (3)", Point(-1, 1, 0)) # Referenced third point circumference_geom_entity = createCircumferencePnts( "Curve (2)", # Name of the resulting curve entity point1_geom_entity, # Referenced first point point2_geom_entity, # Referenced second point point3_geom_entity # Referenced third point ) ``` ```{eval-rst} .. py:function:: createEllipse(StartVertex, EndVertex, Center) :nocontentsentry: Ellipse (C,P,P): Ellipse defined by its center and two points | Alias: ellipse | Constraints: Referenced :param Entity StartVertex: Point 1: Starting point of the ellipse to define de major axis . Conditions: "" does not exist in the dropdown list. The input must be non-empty. Points can not match. :param Entity EndVertex: Point 2: Point to define the minor axis and the plane of the ellipse . Conditions: "" does not exist in the dropdown list. The input must be non-empty. Points can not match. :param Entity Center: Center: Central point of the ellipse. Conditions: "" does not exist in the dropdown list. The input must be non-empty. Points can not match. Points can not be collinear. :rtype: Return a GeomCurve ``` ```{eval-rst} .. py:function:: createEllipse(StartVertex, EndVertex, Center) :nocontentsentry: Ellipse (C,P,P): Ellipse defined by its center and two points | Alias: ellipse | Constraints: Not referenced :param Point StartVertex: Point 1: Starting point of the ellipse to define de major axis . Conditions: Points can not match. :param Point EndVertex: Point 2: Point to define the minor axis and the plane of the ellipse . Conditions: Points can not match. :param Point Center: Center: Central point of the ellipse. Conditions: Points can not match. Points can not be collinear. :rtype: Return a GeomCurve ``` ```{eval-rst} .. py:function:: createEllipse(Center, DirAxis, MinRadius, MajRadius) :nocontentsentry: Ellipse (C,n,e): Ellipse defined by its center, its normal vector and major axis direction | Alias: ellipse | Constraints: 2 dimensions, Referenced :param Entity Center: Center: Central point of the ellipse. Conditions: "" does not exist in the dropdown list. The input must be non-empty. :param Entity DirAxis: Direction of major axis: Vector specifying the major axis direction. Conditions: "" does not exist in the dropdown list. The input must be non-empty. :param Double MinRadius: Minor radius: Minor radius of the ellipse. Conditions: Value must be greater than 0. :param Double MajRadius: Major radius: Major radius of the ellipse. Conditions: Value must be greater than 0. Major and minor radius can't be inverted. :rtype: Return a GeomCurve ``` ```{eval-rst} .. py:function:: createEllipse(Center, DirAxis, MinRadius, MajRadius) :nocontentsentry: Ellipse (C,n,e): Ellipse defined by its center, its normal vector and major axis direction | Alias: ellipse | Constraints: 2 dimensions, Not referenced :param Point Center: Center: Central point of the ellipse. :param Vector DirAxis: Direction of major axis: Vector specifying the major axis direction. Conditions: A vector cannot have zero magnitude. :param Double MinRadius: Minor radius: Minor radius of the ellipse. Conditions: Value must be greater than 0. :param Double MajRadius: Major radius: Major radius of the ellipse. Conditions: Value must be greater than 0. Major and minor radius can't be inverted. :rtype: Return a GeomCurve ``` ```{eval-rst} .. py:function:: createEllipse(GeomName, StartVertex, EndVertex, Center) :nocontentsentry: Ellipse (C,n,e): Ellipse defined by its center, its normal vector and major axis direction | Alias: ellipse | Constraints: Referenced :param str GeomName: Name. Conditions: "" input must be non-empty. :param Entity StartVertex: Point 1: Starting point of the ellipse to define de major axis . Conditions: "" does not exist in the dropdown list. The input must be non-empty. Points can not match. :param Entity EndVertex: Point 2: Point to define the minor axis and the plane of the ellipse . Conditions: "" does not exist in the dropdown list. The input must be non-empty. Points can not match. :param Entity Center: Center: Central point of the ellipse. Conditions: "" does not exist in the dropdown list. The input must be non-empty. Points can not match. Points can not be collinear. :rtype: Return a GeomCurve ``` ```{eval-rst} .. py:function:: createEllipse(GeomName, StartVertex, EndVertex, Center) :nocontentsentry: Ellipse (C,n,e): Ellipse defined by its center, its normal vector and major axis direction | Alias: ellipse | Constraints: Not referenced :param str GeomName: Name. Conditions: "" input must be non-empty. :param Point StartVertex: Point 1: Starting point of the ellipse to define de major axis . Conditions: Points can not match. :param Point EndVertex: Point 2: Point to define the minor axis and the plane of the ellipse . Conditions: Points can not match. :param Point Center: Center: Central point of the ellipse. Conditions: Points can not match. Points can not be collinear. :rtype: Return a GeomCurve ``` ```{eval-rst} .. py:function:: createEllipse(GeomName, Center, DirAxis, MinRadius, MajRadius) :nocontentsentry: Ellipse (C,n,e): Ellipse defined by its center, its normal vector and major axis direction | Alias: ellipse | Constraints: 2 dimensions, Referenced :param str GeomName: Name. Conditions: "" input must be non-empty. :param Entity Center: Center: Central point of the ellipse. Conditions: "" does not exist in the dropdown list. The input must be non-empty. :param Entity DirAxis: Direction of major axis: Vector specifying the major axis direction. Conditions: "" does not exist in the dropdown list. The input must be non-empty. :param Double MinRadius: Minor radius: Minor radius of the ellipse. Conditions: Value must be greater than 0. :param Double MajRadius: Major radius: Major radius of the ellipse. Conditions: Value must be greater than 0. Major and minor radius can't be inverted. :rtype: Return a GeomCurve ``` ```{eval-rst} .. py:function:: createEllipse(Center, Vector, DirAxis, MinRadius, MajRadius) :nocontentsentry: Ellipse (C,n,e): Ellipse defined by its center, its normal vector and major axis direction | Alias: ellipse | Constraints: 3 dimensions, Referenced :param Entity Center: Center: Central point of the ellipse. Conditions: "" does not exist in the dropdown list. The input must be non-empty. :param Entity Vector: Normal vector: Normal vector to the plane of the ellipse. Conditions: "" does not exist in the dropdown list. The input must be non-empty. :param Entity DirAxis: Direction of major axis: Vector specifying the major axis direction. Conditions: "" does not exist in the dropdown list. The input must be non-empty. :param Double MinRadius: Minor radius: Minor radius of the ellipse. Conditions: Value must be greater than 0. :param Double MajRadius: Major radius: Major radius of the ellipse. Conditions: Value must be greater than 0. Major and minor radius can't be inverted. :rtype: Return a GeomCurve ``` ```{eval-rst} .. py:function:: createEllipse(GeomName, Center, DirAxis, MinRadius, MajRadius) :nocontentsentry: Ellipse (C,n,e): Ellipse defined by its center, its normal vector and major axis direction | Alias: ellipse | Constraints: 2 dimensions, Not referenced :param str GeomName: Name. Conditions: "" input must be non-empty. :param Point Center: Center: Central point of the ellipse. :param Vector DirAxis: Direction of major axis: Vector specifying the major axis direction. Conditions: A vector cannot have zero magnitude. :param Double MinRadius: Minor radius: Minor radius of the ellipse. Conditions: Value must be greater than 0. :param Double MajRadius: Major radius: Major radius of the ellipse. Conditions: Value must be greater than 0. Major and minor radius can't be inverted. :rtype: Return a GeomCurve ``` ```{eval-rst} .. py:function:: createEllipse(Center, Vector, DirAxis, MinRadius, MajRadius) :nocontentsentry: Ellipse (C,n,e): Ellipse defined by its center, its normal vector and major axis direction | Alias: ellipse | Constraints: 3 dimensions, Not referenced :param Point Center: Center: Central point of the ellipse. :param Vector Vector: Normal vector: Normal vector to the plane of the ellipse. Conditions: A vector cannot have zero magnitude. :param Vector DirAxis: Direction of major axis: Vector specifying the major axis direction. Conditions: A vector cannot have zero magnitude. :param Double MinRadius: Minor radius: Minor radius of the ellipse. Conditions: Value must be greater than 0. :param Double MajRadius: Major radius: Major radius of the ellipse. Conditions: Value must be greater than 0. Major and minor radius can't be inverted. :rtype: Return a GeomCurve ``` ```{eval-rst} .. py:function:: createEllipse(GeomName, Center, Vector, DirAxis, MinRadius, MajRadius) :nocontentsentry: Ellipse (C,n,e): Ellipse defined by its center, its normal vector and major axis direction | Alias: ellipse | Constraints: 3 dimensions, Referenced :param str GeomName: Name. Conditions: "" input must be non-empty. :param Entity Center: Center: Central point of the ellipse. Conditions: "" does not exist in the dropdown list. The input must be non-empty. :param Entity Vector: Normal vector: Normal vector to the plane of the ellipse. Conditions: "" does not exist in the dropdown list. The input must be non-empty. :param Entity DirAxis: Direction of major axis: Vector specifying the major axis direction. Conditions: "" does not exist in the dropdown list. The input must be non-empty. :param Double MinRadius: Minor radius: Minor radius of the ellipse. Conditions: Value must be greater than 0. :param Double MajRadius: Major radius: Major radius of the ellipse. Conditions: Value must be greater than 0. Major and minor radius can't be inverted. :rtype: Return a GeomCurve ``` ```{eval-rst} .. py:function:: createEllipse(GeomName, Center, Vector, DirAxis, MinRadius, MajRadius) :nocontentsentry: Ellipse (C,n,e): Ellipse defined by its center, its normal vector and major axis direction | Alias: ellipse | Constraints: 3 dimensions, Not referenced :param str GeomName: Name. Conditions: "" input must be non-empty. :param Point Center: Center: Central point of the ellipse. :param Vector Vector: Normal vector: Normal vector to the plane of the ellipse. Conditions: A vector cannot have zero magnitude. :param Vector DirAxis: Direction of major axis: Vector specifying the major axis direction. Conditions: A vector cannot have zero magnitude. :param Double MinRadius: Minor radius: Minor radius of the ellipse. Conditions: Value must be greater than 0. :param Double MajRadius: Major radius: Major radius of the ellipse. Conditions: Value must be greater than 0. Major and minor radius can't be inverted. :rtype: Return a GeomCurve ``` *Example:* ```{code-block} python # -*- coding: utf-8 -*- # Example: Creating an elliptical curve # This command creates an ellipse defined by: # - An origin point (center of the ellipse) # - A normal vector (perpendicular to the plane of the ellipse) # - A vector defining the direction of the major axis # - The minor and major radius # # The 'normal' determines the plane where the ellipse lies, # and the 'major_axis' defines its orientation within that plane. # --- Non-referenced mode --- origin = Point(0, 0, 0) # Center of the ellipse major_axis = Vector(0, 0, 1) # Direction of the major axis normal = Vector(1, 0, 0) # Normal vector (defines the ellipse plane) min_radius = Double(0.5) # Minor radius maj_radius = Double(1) # Major radius ellipse_geom_entity = createEllipse( "Curve", # Name of the resulting curve entity origin, # Center point normal, # Plane normal major_axis, # Major axis direction min_radius, # Minor radius maj_radius # Major radius ) # --- Referenced mode --- origin_geom_entity = createPoint("Point", Point(0, 0, 0)) # Referenced center point major_axis_dir_geom_entity = createAxis("Curve (2)", Point(0, 0, 0), Vector(1, 0, 0)) # Referenced major axis normal_geom_entity = createAxis("Curve (3)", Point(0, 0, 0), Vector(0, 0, 1)) # Referenced normal axis ellipse_geom_entity = createEllipse( "Curve (4)", # Name of the resulting curve entity origin_geom_entity, # Referenced center point normal_geom_entity, # Referenced normal axis major_axis_dir_geom_entity, # Referenced major axis direction min_radius, # Minor radius maj_radius # Major radius ) ``` ```{eval-rst} .. py:function:: createLine(Origin, EndPoint) :nocontentsentry: Line: Create a line between two points | Alias: line | Constraints: Referenced :param Entity Origin: Point1: Starting point of the line . Conditions: "" does not exist in the dropdown list. The input must be non-empty. Points can not match. :param Entity EndPoint: Point2: Ending point of the line . Conditions: "" does not exist in the dropdown list. The input must be non-empty. Points can not match. :rtype: Return a GeomCurve ``` ```{eval-rst} .. py:function:: createLine(Origin, EndPoint) :nocontentsentry: Line: Create a line between two points | Alias: line | Constraints: Not referenced :param Point Origin: Point1: Starting point of the line . Conditions: Points can not match. :param Point EndPoint: Point2: Ending point of the line . Conditions: Points can not match. :rtype: Return a GeomCurve ``` ```{eval-rst} .. py:function:: createLine(GeomName, Origin, EndPoint) :nocontentsentry: Line: Create a line between two points | Alias: line | Constraints: Referenced :param str GeomName: Name. Conditions: "" input must be non-empty. :param Entity Origin: Point1: Starting point of the line . Conditions: "" does not exist in the dropdown list. The input must be non-empty. Points can not match. :param Entity EndPoint: Point2: Ending point of the line . Conditions: "" does not exist in the dropdown list. The input must be non-empty. Points can not match. :rtype: Return a GeomCurve ``` ```{eval-rst} .. py:function:: createLine(GeomName, Origin, EndPoint) :nocontentsentry: Line: Create a line between two points | Alias: line | Constraints: Not referenced :param str GeomName: Name. Conditions: "" input must be non-empty. :param Point Origin: Point1: Starting point of the line . Conditions: Points can not match. :param Point EndPoint: Point2: Ending point of the line . Conditions: Points can not match. :rtype: Return a GeomCurve ``` *Example:* ```{code-block} python # -*- coding: utf-8 -*- # Example: Creating a line geometric entity # This command creates a straight line entity between two given points. # It can be used in both non-referenced and referenced modes. # Arguments: # 1. String: Name of the resulting line entity. # 2. First point defining the start of the line. # 3. Second point defining the end of the line. # --- Non-referenced mode --- # In this mode, the line is created directly from point coordinates. pnt1 = Point(0, 0, 0) pnt2 = Point(1, 0, 0) line_geom_entity = createLine("Curve", pnt1, pnt2) # --- Referenced mode --- # In this mode, the line is defined from existing point entities. pnt1_geom_entity = createPoint("Point", Point(-1, 0, 0)) pnt2_geom_entity = createPoint("Point (2)", Point(0, 1, 0)) line_geom_entity = createLine("Curve (2)", pnt1_geom_entity, pnt2_geom_entity) # Result: # A line entity named "Curve" (or "Curve (2)" in referenced mode) is created # using the specified start and end points. ``` ```{eval-rst} .. py:function:: createPolygon(Center, Radius, NumSides, Circumscribing) :nocontentsentry: Regular polygon: Create a regular polygon | Alias: polygon | Constraints: 2 dimensions, Referenced :param POCCVertexByCoord Center: Center: Polygon center. Conditions: "" does not exist in the dropdown list. The input must be non-empty. :param Double Radius: Radius: Radius of the circumference. Conditions: Value must be greater than 0. :param int NumSides: Sides: Number of sides of the polygon. Conditions: The number of sides of the polygon must be greater or equal to 3. :param bool Circumscribing: Circumscribed. :rtype: Return a GeomWire ``` ```{eval-rst} .. py:function:: createPolygon(Center, Radius, NumSides, Circumscribing) :nocontentsentry: Regular polygon: Create a regular polygon | Alias: polygon | Constraints: 2 dimensions, Not referenced :param Point Center: Center: Polygon center. :param Double Radius: Radius: Radius of the circumference. Conditions: Value must be greater than 0. :param int NumSides: Sides: Number of sides of the polygon. Conditions: The number of sides of the polygon must be greater or equal to 3. :param bool Circumscribing: Circumscribed. :rtype: Return a GeomWire ``` ```{eval-rst} .. py:function:: createPolygon(GeomName, Center, Radius, NumSides, Circumscribing) :nocontentsentry: Regular polygon: Create a regular polygon | Alias: polygon | Constraints: 2 dimensions, Referenced :param str GeomName: Name. Conditions: "" input must be non-empty. :param POCCVertexByCoord Center: Center: Polygon center. Conditions: "" does not exist in the dropdown list. The input must be non-empty. :param Double Radius: Radius: Radius of the circumference. Conditions: Value must be greater than 0. :param int NumSides: Sides: Number of sides of the polygon. Conditions: The number of sides of the polygon must be greater or equal to 3. :param bool Circumscribing: Circumscribed. :rtype: Return a GeomWire ``` ```{eval-rst} .. py:function:: createPolygon(Center, Vector, Radius, NumSides, Circumscribing) :nocontentsentry: Regular polygon: Create a regular polygon | Alias: polygon | Constraints: 3 dimensions, Referenced :param POCCVertexByCoord Center: Center: Polygon center. Conditions: "" does not exist in the dropdown list. The input must be non-empty. :param POCCGeomLine Vector: Normal vector: Normal vector to the polygonal face. Conditions: "" does not exist in the dropdown list. The input must be non-empty. :param Double Radius: Radius: Radius of the circumference. Conditions: Value must be greater than 0. :param int NumSides: Sides: Number of sides of the polygon. Conditions: The number of sides of the polygon must be greater or equal to 3. :param bool Circumscribing: Circumscribed. :rtype: Return a GeomWire ``` ```{eval-rst} .. py:function:: createPolygon(GeomName, Center, Radius, NumSides, Circumscribing) :nocontentsentry: Regular polygon: Create a regular polygon | Alias: polygon | Constraints: 2 dimensions, Not referenced :param str GeomName: Name. Conditions: "" input must be non-empty. :param Point Center: Center: Polygon center. :param Double Radius: Radius: Radius of the circumference. Conditions: Value must be greater than 0. :param int NumSides: Sides: Number of sides of the polygon. Conditions: The number of sides of the polygon must be greater or equal to 3. :param bool Circumscribing: Circumscribed. :rtype: Return a GeomWire ``` ```{eval-rst} .. py:function:: createPolygon(Center, Vector, Radius, NumSides, Circumscribing) :nocontentsentry: Regular polygon: Create a regular polygon | Alias: polygon | Constraints: 3 dimensions, Not referenced :param Point Center: Center: Polygon center. :param Vector Vector: Normal vector: Normal vector to the polygonal face. Conditions: A vector cannot have zero magnitude. :param Double Radius: Radius: Radius of the circumference. Conditions: Value must be greater than 0. :param int NumSides: Sides: Number of sides of the polygon. Conditions: The number of sides of the polygon must be greater or equal to 3. :param bool Circumscribing: Circumscribed. :rtype: Return a GeomWire ``` ```{eval-rst} .. py:function:: createPolygon(GeomName, Center, Vector, Radius, NumSides, Circumscribing) :nocontentsentry: Regular polygon: Create a regular polygon | Alias: polygon | Constraints: 3 dimensions, Referenced :param str GeomName: Name. Conditions: "" input must be non-empty. :param POCCVertexByCoord Center: Center: Polygon center. Conditions: "" does not exist in the dropdown list. The input must be non-empty. :param POCCGeomLine Vector: Normal vector: Normal vector to the polygonal face. Conditions: "" does not exist in the dropdown list. The input must be non-empty. :param Double Radius: Radius: Radius of the circumference. Conditions: Value must be greater than 0. :param int NumSides: Sides: Number of sides of the polygon. Conditions: The number of sides of the polygon must be greater or equal to 3. :param bool Circumscribing: Circumscribed. :rtype: Return a GeomWire ``` ```{eval-rst} .. py:function:: createPolygon(GeomName, Center, Vector, Radius, NumSides, Circumscribing) :nocontentsentry: Regular polygon: Create a regular polygon | Alias: polygon | Constraints: 3 dimensions, Not referenced :param str GeomName: Name. Conditions: "" input must be non-empty. :param Point Center: Center: Polygon center. :param Vector Vector: Normal vector: Normal vector to the polygonal face. Conditions: A vector cannot have zero magnitude. :param Double Radius: Radius: Radius of the circumference. Conditions: Value must be greater than 0. :param int NumSides: Sides: Number of sides of the polygon. Conditions: The number of sides of the polygon must be greater or equal to 3. :param bool Circumscribing: Circumscribed. :rtype: Return a GeomWire ``` *Example:* ```{code-block} python # -*- coding: utf-8 -*- # Example: Creating a polygon as a group of curves # This command creates only the **edges** (curves) of a polygon, not a filled surface. # The polygon is defined by: # - A center point # - A normal vector (defining the plane orientation) # - A radius size (distance from the center to the vertices) # - The number of sides # - A boolean flag indicating whether the polygon should be circumscribed # # It supports both non-referenced and referenced modes. # --- Non-referenced mode --- center = Point(0, 0, 0) # Center of the polygon normal = Vector(0, 0, 1) # Normal defining the polygon's plane orientation radius_size = Double(1) # Radius (distance from center to vertices) num_sides = 5 # Number of polygon sides circumscribing = True # If True, the polygon will be circumscribed around the given radius # Create the polygon as a group of connected curves (not a surface) polygon_geom_entity = createPolygon( "Curves group", # Name of the resulting curve group entity center, # Center point normal, # Normal vector defining the polygon plane radius_size, # Polygon radius num_sides, # Number of sides circumscribing # Circumscribed flag ) # --- Referenced mode --- center_geom_entity = createPoint("Point", Point(0, 0, 0)) # Referenced point entity for the center normal_geom_entity = createAxis("Curve", Point(0, 0, 0), Vector(1, 0, 0)) # Referenced axis entity for the normal # Create the polygon as a group of curves using referenced entities polygon_geom_entity = createPolygon( "Curves group (2)", # Name of the resulting curve group entity center_geom_entity, # Referenced point entity for the center normal_geom_entity, # Referenced axis entity for the normal radius_size, # Polygon radius num_sides, # Number of sides circumscribing # Circumscribed flag ) # Result: # A polygon is created as a closed loop of curves (not a surface). # The polygon can be circumscribed or inscribed depending on the circumscribing flag. ``` ```{eval-rst} .. py:function:: createPolyline(ListPnts) :nocontentsentry: Polyline by points: Create a polyline using a list of points | Alias: polyline | Constraints: Referenced :param List ListPnts: Points: List of points to fit the curve. Conditions: "" does not exist in the dropdown list. :rtype: Return a GeomWire ``` ```{eval-rst} .. py:function:: createPolyline(ListCoords) :nocontentsentry: Polyline by points: Create a polyline using a list of points | Alias: polyline | Constraints: Not referenced :param List ListCoords: Points: List of coordinates of points to fit the curve. :rtype: Return a GeomWire ``` ```{eval-rst} .. py:function:: createPolyline(GeomName, ListPnts) :nocontentsentry: Polyline by points: Create a polyline using a list of points | Alias: polyline | Constraints: Referenced :param str GeomName: Name. Conditions: "" input must be non-empty. :param List ListPnts: Points: List of points to fit the curve. Conditions: "" does not exist in the dropdown list. :rtype: Return a GeomWire ``` ```{eval-rst} .. py:function:: createPolyline(GeomName, ListCoords) :nocontentsentry: Polyline by points: Create a polyline using a list of points | Alias: polyline | Constraints: Not referenced :param str GeomName: Name. Conditions: "" input must be non-empty. :param List ListCoords: Points: List of coordinates of points to fit the curve. :rtype: Return a GeomWire ``` *Example:* ```{code-block} python # -*- coding: utf-8 -*- # Example: Creating a polyline from a series of points # This command creates a polyline (a connected sequence of line segments) # through a list of points, following the order in which they are provided. # The polyline can be created directly from coordinates (non-referenced mode) # or from existing geometric entities (referenced mode). # --- Non-referenced mode --- # List of points defining the polyline polyline_geom_entity = createPolyline( "Curves group", # Name of the resulting polyline entity [ Point(0, 0, 0), Point(-2, 1, 0), Point(-1, 2, 0), Point(1, 1, 0), Point(1, -2, 0) ] ) # --- Referenced mode --- # Create point entities to be used as references point1_geom_entity = createPoint("Point", Point(-1, -1, 0)) point2_geom_entity = createPoint("Point (2)", Point(-3, 0, 0)) point3_geom_entity = createPoint("Point (3)", Point(-2, 3, 0)) point4_geom_entity = createPoint("Point (4)", Point(2, 1, 0)) point5_geom_entity = createPoint("Point (5)", Point(2, -2, 0)) # Create a polyline using the referenced point entities polyline_geom_entity = createPolyline( "Curves group (2)", # Name of the resulting polyline entity [ point1_geom_entity, point2_geom_entity, point3_geom_entity, point4_geom_entity, point5_geom_entity ] ) # Result: # A polyline is created connecting all the specified points in order. # The result is a single curve entity representing the sequence of line segments. ``` ```{eval-rst} .. py:function:: createSplineCurve(GeomName, DegMin, DegMax, Cont, ListPnts) :nocontentsentry: Spline curve: Create a Spline curve | Alias: splineCurve :param str GeomName: Name. Conditions: "" input must be non-empty. :param int DegMin: Min. degree: Minimum curve degree. Conditions: Value must be greater or equal than 0. :param int DegMax: Max. degree: Maximum curve degree. Conditions: Value must be greater than 0. :param Enumerate: { C_0, G_1, C_1, G_2, C_2, C_3, C_N } Cont: Continuity: Curve continuity. :param List ListPnts: Points: List of points to fit the curve. :rtype: Return a GeomCurve ``` *Example:* ```{code-block} python # -*- coding: utf-8 -*- # Example: Creating a spline curve through a series of points # This command generates a spline curve passing through the given points. # The degree of the spline is defined by min_degree and max_degree. # Continuity determines how smoothly adjacent curves connect. # The command does not have referenced/non-referenced modes. # --- Continuity options --- # "C_0" : Curves are joined (no continuity) # "C_1" : First derivatives are continuous # "C_2" : First and second derivatives are equal (smooth curvature) # "C_3" : Continuity of the third derivative along the curve # "C_N" : Infinite order of continuity # "G_1" : Tangent continuity (curves share a common tangent direction) # "G_2" : Curvature continuity (first and second derivatives are proportional) continuity = "C_2" # Default continuity option min_degree = 3 # Minimum degree of the spline max_degree = 8 # Maximum degree of the spline # Create point entities through which the spline will pass point1_geom_entity = createPoint("Point", Point(-8, 0, 0)) point2_geom_entity = createPoint("Point (2)", Point(-3, 5, 0)) point3_geom_entity = createPoint("Point (3)", Point(-7, 8, 0)) point4_geom_entity = createPoint("Point (4)", Point(2, 11, 0)) point5_geom_entity = createPoint("Point (5)", Point(1, 15, 0)) # Create the spline curve createSplineCurve( "Curve", # Name of the resulting curve min_degree, # Minimum degree of the spline max_degree, # Maximum degree of the spline continuity, # Continuity setting [point1_geom_entity, # List of points the spline passes through point2_geom_entity, point3_geom_entity, point4_geom_entity, point5_geom_entity] ) # Result: # A smooth spline curve is created passing through the specified points. # The curve's degree and smoothness are controlled by the degree range and continuity. ``` ```{eval-rst} .. py:function:: createTrimCurveByCurve(entity, TrimTool) :nocontentsentry: Trim by curve: Trim the curve on the intersection with another curve | Alias: trimCurveByCurve :param [Entity] entity: Entity/Entities to apply the command :param POCCGeomLine TrimTool: Tool: Curve to be used for trimming another curve. Conditions: The input must be non-empty. "" does not exist in the dropdown list. :rtype: Return a GeomWire ``` ```{eval-rst} .. py:function:: createTrimCurveByCurve(entity, GeomName, TrimTool) :nocontentsentry: Trim by curve: Trim the curve on the intersection with another curve | Alias: trimCurveByCurve :param [Entity] entity: Entity/Entities to apply the command :param str GeomName: Name. Conditions: "" input must be non-empty. :param POCCGeomLine TrimTool: Tool: Curve to be used for trimming another curve. Conditions: The input must be non-empty. "" does not exist in the dropdown list. :rtype: Return a GeomWire ``` *Example:* ```{code-block} python # -*- coding: utf-8 -*- # Example: Trimming a curve using another intersecting curve # This command trims an existing curve by using another curve # as the cutting tool. The resulting geometry is the trimmed # segment of the original curve up to the intersection point. # Create the original line to be trimmed line_original_geom_entity = createLine("Curve", Point(-7, -3, 0), Point(-8, 4, 0)) # Create the cutting line that defines the trimming location line_tool_geom_entity = createLine("Curve (2)", Point(-4, 1, 0), Point(-12, -1, 0)) # Perform the trim operation: # - The first argument is a list of curves to trim. # - The second argument is the group name for the resulting curve(s). # - The third argument is the cutting curve entity. createTrimCurveByCurve([line_original_geom_entity], "Curves group (2)", line_tool_geom_entity) # Result: # A new trimmed curve is created in "Curves group (2)", # representing the portion of the original curve up to # its intersection with the cutting line. ``` ```{eval-rst} .. py:function:: polylineByCurves(Edges) :nocontentsentry: Polyline by curves: Create a polyline using a list of curves :param List Edges: Edges: List of edges. Conditions: "" does not exist in the dropdown list. :rtype: Return a GeomWire ``` ```{eval-rst} .. py:function:: polylineByCurves(GeomName, Edges) :nocontentsentry: Polyline by curves: Create a polyline using a list of curves :param str GeomName: Name. Conditions: "" input must be non-empty. :param List Edges: Edges: List of edges. Conditions: "" does not exist in the dropdown list. :rtype: Return a GeomWire ``` *Example:* ```{code-block} python # -*- coding: utf-8 -*- # Example: Creating a polyline from a list of curves # This command generates a polyline by connecting a series of existing curve entities. # The polyline follows the order of the curves provided in the list. # Unlike 'createPolyline', this version does not use points directly; instead, it # uses complete curve entities as building blocks. # # Note: This command does not have a referenced/non-referenced mode, since curves # are already geometric entities. # Define the curves that will form the polyline curve1_geom_entity = createLine("Curve", Point(-1, 0, 0), Point(0, 1, 0)) curve2_geom_entity = createLine("Curve (2)", Point(0, 1, 0), Point(1, 0, 0)) curve3_geom_entity = createLine("Curve (3)", Point(1, 0, 0), Point(2, 1, 0)) # Create a polyline by connecting the curves in order polyline_geom_entity = polylineByCurves( "Curves group", # Name of the resulting polyline entity [curve1_geom_entity, curve2_geom_entity, curve3_geom_entity] ) # Result: # A single polyline entity is created by joining the provided curves sequentially. # The curves must be connected end-to-end for a continuous polyline. ```