# Surfaces ```{eval-rst} .. py:function:: createBezierSurf(NumPntsU, NumPntsV, ListWeights, ListPnts) :nocontentsentry: Bézier surface: Create a Bézier surface | Alias: bezierSurf | Constraints: 3 dimensions :param int NumPntsU: Num. U: Number of points in U direction . :param int NumPntsV: Num. V: Number of points in V direction . :param List ListWeights: Return a GeomPoint. :param List ListPnts: List: List of points through which the surface passes. :rtype: Return a GeomFace ``` ```{eval-rst} .. py:function:: createBezierSurf(GeomName, NumPntsU, NumPntsV, ListWeights, ListPnts) :nocontentsentry: Bézier surface: Create a Bézier surface | Alias: bezierSurf | Constraints: 3 dimensions :param str GeomName: Name. Conditions: "" input must be non-empty. :param int NumPntsU: Num. U: Number of points in U direction . :param int NumPntsV: Num. V: Number of points in V direction . :param List ListWeights: Return a GeomPoint. :param List ListPnts: List: List of points through which the surface passes. :rtype: Return a GeomFace ``` *Example:* ```{code-block} python # -*- coding: utf-8 -*- # Example: Creating a Bézier surface using control points, weights, and UV parameters # This command creates a Bézier surface defined by a grid of control points # and corresponding weights. The surface is parameterized by two integers (u, v), # representing the number of control points in each direction. # The product (u * v) must match the total number of control points provided. # Each control point must also have an associated weight. # --- Define control points --- point1_geom_entity = createPoint("Point", Point(2, 8, 0)) # First control point point2_geom_entity = createPoint("Point (2)", Point(17, 6, 0)) # Second control point point3_geom_entity = createPoint("Point (3)", Point(16, -4, 0)) # Third control point point4_geom_entity = createPoint("Point (4)", Point(3, -7, 0)) # Fourth control point # --- Define surface parameters --- # The product of num_pnts_u and num_pnts_v must equal the number of control points. num_pnts_u = 2 # Number of control points along the U direction num_pnts_v = 2 # Number of control points along the V direction # --- Define weights --- # Each weight corresponds to a control point. Uniform weights (all 1) # produce a standard Bézier surface. weights = [1, 1, 1, 1] # --- Create the Bézier surface --- bezier_surface_geom_entity = createBezierSurf( "Surface", # Name of the resulting surface entity num_pnts_u, # Number of points along U direction num_pnts_v, # Number of points along V direction 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:: createBoxSurf(FirstPoint, SecondPoint) :nocontentsentry: Box (P,P): Create a hollow box defined by two opposite vertices | Alias: boxSurf | Constraints: 3 dimensions, Referenced :param Entity FirstPoint: Point1: First corner of the box. Conditions: "" does not exist in the dropdown list. The input must be non-empty. :param Entity SecondPoint: Point2: Second corner of the box . Conditions: "" does not exist in the dropdown list. The input must be non-empty. :rtype: Return a GeomShell ``` ```{eval-rst} .. py:function:: createBoxSurf(FirstPoint, SecondPoint) :nocontentsentry: Box (P,P): Create a hollow box defined by two opposite vertices | Alias: boxSurf | Constraints: 3 dimensions, Not referenced :param Point FirstPoint: Point1: First corner of the box. :param Point SecondPoint: Point2: Second corner of the box . :rtype: Return a GeomShell ``` ```{eval-rst} .. py:function:: createBoxSurf(GeomName, FirstPoint, SecondPoint) :nocontentsentry: Box (P,P): Create a hollow box defined by two opposite vertices | Alias: boxSurf | Constraints: 3 dimensions, Referenced :param str GeomName: Name. Conditions: "" input must be non-empty. :param Entity FirstPoint: Point1: First corner of the box. Conditions: "" does not exist in the dropdown list. The input must be non-empty. :param Entity SecondPoint: Point2: Second corner of the box . Conditions: "" does not exist in the dropdown list. The input must be non-empty. :rtype: Return a GeomShell ``` ```{eval-rst} .. py:function:: createBoxSurf(GeomName, FirstPoint, SecondPoint) :nocontentsentry: Box (P,P): Create a hollow box defined by two opposite vertices | Alias: boxSurf | Constraints: 3 dimensions, Not referenced :param str GeomName: Name. Conditions: "" input must be non-empty. :param Point FirstPoint: Point1: First corner of the box. :param Point SecondPoint: Point2: Second corner of the box . :rtype: Return a GeomShell ``` ```{eval-rst} .. py:function:: createBoxSurf(FirstPoint, DX, DY, DZ) :nocontentsentry: Box (P,Dim): Create a hollow box defined by a vertex and its dimensions | Alias: boxSurf | Constraints: 3 dimensions, Referenced :param POCCVertexByCoord FirstPoint: Point1: First corner of the box. Conditions: "" does not exist in the dropdown list. The input must be non-empty. :param Double DX: DX: Box dimension along the X coordinate. Conditions: Value must be greater than 0. :param Double DY: DY: Box dimension along the Y coordinate. Conditions: Value must be greater than 0. :param Double DZ: DZ: Box dimension along the Z coordinate. Conditions: Value must be greater than 0. :rtype: Return a GeomShell ``` ```{eval-rst} .. py:function:: createBoxSurf(FirstPoint, DX, DY, DZ) :nocontentsentry: Box (P,Dim): Create a hollow box defined by a vertex and its dimensions | Alias: boxSurf | Constraints: 3 dimensions, Not referenced :param Point FirstPoint: Point1: First corner of the box. :param Double DX: DX: Box dimension along the X coordinate. Conditions: Value must be greater than 0. :param Double DY: DY: Box dimension along the Y coordinate. Conditions: Value must be greater than 0. :param Double DZ: DZ: Box dimension along the Z coordinate. Conditions: Value must be greater than 0. :rtype: Return a GeomShell ``` ```{eval-rst} .. py:function:: createBoxSurf(GeomName, FirstPoint, DX, DY, DZ) :nocontentsentry: Box (P,Dim): Create a hollow box defined by a vertex and its dimensions | Alias: boxSurf | Constraints: 3 dimensions, Referenced :param str GeomName: Name. Conditions: "" input must be non-empty. :param POCCVertexByCoord FirstPoint: Point1: First corner of the box. Conditions: "" does not exist in the dropdown list. The input must be non-empty. :param Double DX: DX: Box dimension along the X coordinate. Conditions: Value must be greater than 0. :param Double DY: DY: Box dimension along the Y coordinate. Conditions: Value must be greater than 0. :param Double DZ: DZ: Box dimension along the Z coordinate. Conditions: Value must be greater than 0. :rtype: Return a GeomShell ``` ```{eval-rst} .. py:function:: createBoxSurf(GeomName, FirstPoint, DX, DY, DZ) :nocontentsentry: Box (P,Dim): Create a hollow box defined by a vertex and its dimensions | Alias: boxSurf | Constraints: 3 dimensions, Not referenced :param str GeomName: Name. Conditions: "" input must be non-empty. :param Point FirstPoint: Point1: First corner of the box. :param Double DX: DX: Box dimension along the X coordinate. Conditions: Value must be greater than 0. :param Double DY: DY: Box dimension along the Y coordinate. Conditions: Value must be greater than 0. :param Double DZ: DZ: Box dimension along the Z coordinate. Conditions: Value must be greater than 0. :rtype: Return a GeomShell ``` *Example:* ```{code-block} python # -*- coding: utf-8 -*- # Example: Creating a box (surface) using a reference point and dimensions # --- Non-referenced mode --- # In this mode, the box is created directly from coordinate values and dimensions, # without referencing any existing geometric entities. first_point = Point(0, 0, 0) # Corner point of the box (reference point) dx = Double(1) # Box length along the X direction dy = Double(1) # Box width along the Y direction dz = Double(1) # Box height along the Z direction box_geom_entity = createBoxSurf( "Surface", # Name of the resulting box entity first_point, # Reference point for the corner dx, # Dimension along X dy, # Dimension along Y dz # Dimension along Z ) # --- Referenced mode --- # In this mode, the box is created using an existing point entity as reference, # allowing parametric relationships within the model. first_point_geom_entity = createPoint("Point", Point(2, 0, 0)) # Create a point entity for the box corner box_geom_entity = createBoxSurf( "Surface (2)", # Name of the resulting box entity first_point_geom_entity, # Reference to the point entity dx, dy, dz # Box dimensions along X, Y, and Z ) ``` ```{eval-rst} .. py:function:: createBSplineSurf(DegMin, DegMax, NumPntsU, NumPntsV, Cont, ListPnts) :nocontentsentry: BSpline surface: Create a BSpline surface | Alias: bsplineSurf | Constraints: 3 dimensions :param int DegMin: Min. degree: Minimum surface degree. :param int DegMax: Max. degree: Maximum surface degree. :param int NumPntsU: Num. U: Number of points in U direction . :param int NumPntsV: Num. V: Number of points in V direction . :param Enumerate: { C_0, G_1, C_1, G_2, C_2, C_3, C_N } Cont: Continuity: Surface Continuity. :param List ListPnts: List: List of points through which the surface passes. :rtype: Return a GeomFace ``` ```{eval-rst} .. py:function:: createBSplineSurf(GeomName, DegMin, DegMax, NumPntsU, NumPntsV, Cont, ListPnts) :nocontentsentry: BSpline surface: Create a BSpline surface | Alias: bsplineSurf | Constraints: 3 dimensions :param str GeomName: Name. Conditions: "" input must be non-empty. :param int DegMin: Min. degree: Minimum surface degree. :param int DegMax: Max. degree: Maximum surface degree. :param int NumPntsU: Num. U: Number of points in U direction . :param int NumPntsV: Num. V: Number of points in V direction . :param Enumerate: { C_0, G_1, C_1, G_2, C_2, C_3, C_N } Cont: Continuity: Surface Continuity. :param List ListPnts: List: List of points through which the surface passes. :rtype: Return a GeomFace ``` *Example:* ```{code-block} python # -*- coding: utf-8 -*- # Example: Creating a B-spline surface using control points and continuity settings # This command creates a B-spline surface defined by a grid of control points. # The surface degree, continuity, and the number of control points along U and V # directions determine the shape and smoothness of the surface. # # The product (num_pnts_u * num_pnts_v) must match the total number of control points provided. # --- Define control points --- point1_geom_entity = createPoint("Point", Point(3, 6, 0)) # First control point point2_geom_entity = createPoint("Point (2)", Point(9, 3, 0)) # Second control point point3_geom_entity = createPoint("Point (3)", Point(5, -2, 0)) # Third control point point4_geom_entity = createPoint("Point (4)", Point(11, -3, 0)) # Fourth control point # --- Define surface parameters --- min_surface_degree = 3 # Minimum degree of the B-spline surface max_surface_degree = 8 # Maximum degree of the B-spline surface num_pnts_u = 2 # Number of control points along the U direction num_pnts_v = 2 # Number of control points along the V direction # --- Define surface continuity --- # Continuity determines how smoothly adjacent curves or patches connect. # Available 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) surface_continuity = "C_2" # Default continuity option # --- Create the B-spline surface --- surface_geom_entity = createBSplineSurf( "Surface", # Name of the resulting surface entity min_surface_degree, # Minimum degree max_surface_degree, # Maximum degree num_pnts_u, # Number of points along U num_pnts_v, # Number of points along V surface_continuity, # Surface continuity option [point1_geom_entity, point2_geom_entity, point3_geom_entity, point4_geom_entity] # List of control points ) ``` ```{eval-rst} .. py:function:: createCircle(Center, Radius, Angle) :nocontentsentry: Circle (C,R,n): Circle defined by its center, radius and normal vector | Alias: circle | 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. :param Double Angle: Ang: Angle. Conditions: Value must be greater or equal than 0.00 and lower than 6.28. :rtype: Return a GeomFace ``` ```{eval-rst} .. py:function:: createCircle(Center, Radius, Angle) :nocontentsentry: Circle (C,R,n): Circle defined by its center, radius and normal vector | Alias: circle | 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. :param Double Angle: Ang: Angle. Conditions: Value must be greater or equal than 0.00 and lower than 6.28. :rtype: Return a GeomFace ``` ```{eval-rst} .. py:function:: createCircle(GeomName, Center, Radius, Angle) :nocontentsentry: Circle (C,R,n): Circle defined by its center, radius and normal vector | Alias: circle | 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. :param Double Angle: Ang: Angle. Conditions: Value must be greater or equal than 0.00 and lower than 6.28. :rtype: Return a GeomFace ``` ```{eval-rst} .. py:function:: createCircle(Center, Vector, Radius, Angle) :nocontentsentry: Circle (C,R,n): Circle defined by its center, radius and normal vector | Alias: circle | 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. :param Double Angle: Ang: Angle. Conditions: Value must be greater or equal than 0.00 and lower than 6.28. :rtype: Return a GeomFace ``` ```{eval-rst} .. py:function:: createCircle(GeomName, Center, Radius, Angle) :nocontentsentry: Circle (C,R,n): Circle defined by its center, radius and normal vector | Alias: circle | 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. :param Double Angle: Ang: Angle. Conditions: Value must be greater or equal than 0.00 and lower than 6.28. :rtype: Return a GeomFace ``` ```{eval-rst} .. py:function:: createCircle(Center, Vector, Radius, Angle) :nocontentsentry: Circle (C,R,n): Circle defined by its center, radius and normal vector | Alias: circle | 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. :param Double Angle: Ang: Angle. Conditions: Value must be greater or equal than 0.00 and lower than 6.28. :rtype: Return a GeomFace ``` ```{eval-rst} .. py:function:: createCircle(GeomName, Center, Vector, Radius, Angle) :nocontentsentry: Circle (C,R,n): Circle defined by its center, radius and normal vector | Alias: circle | 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. :param Double Angle: Ang: Angle. Conditions: Value must be greater or equal than 0.00 and lower than 6.28. :rtype: Return a GeomFace ``` ```{eval-rst} .. py:function:: createCircle(GeomName, Center, Vector, Radius, Angle) :nocontentsentry: Circle (C,R,n): Circle defined by its center, radius and normal vector | Alias: circle | 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. :param Double Angle: Ang: Angle. Conditions: Value must be greater or equal than 0.00 and lower than 6.28. :rtype: Return a GeomFace ``` *Example:* ```{code-block} python # -*- coding: utf-8 -*- # Example: Creating a circular surface (full or partial circle) # This command creates a circular surface using a center point, a normal axis, and a radius. # The 'angle' parameter defines the portion of the circle to generate: # - 360° creates a full circle # - Any smaller angle creates a circular segment or arc # --- Non-referenced mode --- radius = Double(1) # Radius of the circular surface angle = Double(360) # Angular span in degrees (360 for full circle) center = Point(0, 0, 0) # Center of the circle axis = Vector(1, 0, 0) # Normal direction defining the circle’s plane circle_geom_entity = createCircle( "Surface", # Name of the resulting surface entity center, # Center point axis, # Axis (normal vector) radius, # Radius angle # Arc angle ) # --- 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 circle_geom_entity = createCircle( "Surface (2)", # Name of the resulting surface entity center_point_geom_entity, # Referenced center point normal_geom_entity, # Referenced normal axis radius, # Radius angle # Arc angle ) ``` ```{eval-rst} .. py:function:: createCirclePnts(Center, StartVertex, EndVertex, Angle) :nocontentsentry: Circle (C,P,P): Circle defined by its center and two points | Alias: circlePnts | 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. :param Double Angle: Ang: Angle. Conditions: Value must be greater or equal than 0.00 and lower than 6.28. :rtype: Return a GeomFace ``` ```{eval-rst} .. py:function:: createCirclePnts(Center, StartVertex, EndVertex, Angle) :nocontentsentry: Circle (C,P,P): Circle defined by its center and two points | Alias: circlePnts | 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. :param Double Angle: Ang: Angle. Conditions: Value must be greater or equal than 0.00 and lower than 6.28. :rtype: Return a GeomFace ``` ```{eval-rst} .. py:function:: createCirclePnts(GeomName, Center, StartVertex, EndVertex, Angle) :nocontentsentry: Circle (C,P,P): Circle defined by its center and two points | Alias: circlePnts | 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. :param Double Angle: Ang: Angle. Conditions: Value must be greater or equal than 0.00 and lower than 6.28. :rtype: Return a GeomFace ``` ```{eval-rst} .. py:function:: createCirclePnts(GeomName, Center, StartVertex, EndVertex, Angle) :nocontentsentry: Circle (C,P,P): Circle defined by its center and two points | Alias: circlePnts | 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. :param Double Angle: Ang: Angle. Conditions: Value must be greater or equal than 0.00 and lower than 6.28. :rtype: Return a GeomFace ``` *Example:* ```{code-block} python # -*- coding: utf-8 -*- # Example: Creating a circular surface using three points # This command creates a circular surface 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: # - 360° creates a full circle # - Smaller angles create partial arcs # --- 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 angle = Double(360) # Angular span in degrees (360 for full circle) circle_geom_entity = createCirclePnts( "Surface", # Name of the resulting surface entity center, # Center point point1, # First point on the circle point2, # Second point on the circle angle # Arc angle ) # --- 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 circle_geom_entity = createCirclePnts( "Surface (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 angle # Arc angle ) ``` ```{eval-rst} .. py:function:: createConeSurf(Center, Axis, BaseRadius, TopRadius, Height, Angle) :nocontentsentry: Cone: Create a hollow cone | Alias: coneSurf | Constraints: 3 dimensions, Referenced :param POCCVertexByCoord Center: Center: Central point of the cone base. Conditions: "" does not exist in the dropdown list. The input must be non-empty. :param POCCGeomLine Axis: Axis: Cone axis. Conditions: "" does not exist in the dropdown list. The input must be non-empty. :param Double BaseRadius: Radius: Radius of the lower base. Conditions: Value must be greater than 0. :param Double TopRadius: Upper radius: Radius of the upper base. Conditions: Value must be greater or equal than 0. :param Double Height: Height: Height of the cone. Conditions: Value must be greater than 0. :param Double Angle: Angle: Angle to truncate the cone. Conditions: Value must be greater or equal than 0.00 and lower than 6.28. :rtype: Return a GeomShell ``` ```{eval-rst} .. py:function:: createConeSurf(Center, Axis, BaseRadius, TopRadius, Height, Angle) :nocontentsentry: Cone: Create a hollow cone | Alias: coneSurf | Constraints: 3 dimensions, Not referenced :param Point Center: Center: Central point of the cone base. :param Vector Axis: Axis: Cone axis. Conditions: A vector cannot have zero magnitude. :param Double BaseRadius: Radius: Radius of the lower base. Conditions: Value must be greater than 0. :param Double TopRadius: Upper radius: Radius of the upper base. Conditions: Value must be greater or equal than 0. :param Double Height: Height: Height of the cone. Conditions: Value must be greater than 0. :param Double Angle: Angle: Angle to truncate the cone. Conditions: Value must be greater or equal than 0.00 and lower than 6.28. :rtype: Return a GeomShell ``` ```{eval-rst} .. py:function:: createConeSurf(GeomName, Center, Axis, BaseRadius, TopRadius, Height, Angle) :nocontentsentry: Cone: Create a hollow cone | Alias: coneSurf | Constraints: 3 dimensions, Referenced :param str GeomName: Name. Conditions: "" input must be non-empty. :param POCCVertexByCoord Center: Center: Central point of the cone base. Conditions: "" does not exist in the dropdown list. The input must be non-empty. :param POCCGeomLine Axis: Axis: Cone axis. Conditions: "" does not exist in the dropdown list. The input must be non-empty. :param Double BaseRadius: Radius: Radius of the lower base. Conditions: Value must be greater than 0. :param Double TopRadius: Upper radius: Radius of the upper base. Conditions: Value must be greater or equal than 0. :param Double Height: Height: Height of the cone. Conditions: Value must be greater than 0. :param Double Angle: Angle: Angle to truncate the cone. Conditions: Value must be greater or equal than 0.00 and lower than 6.28. :rtype: Return a GeomShell ``` ```{eval-rst} .. py:function:: createConeSurf(GeomName, Center, Axis, BaseRadius, TopRadius, Height, Angle) :nocontentsentry: Cone: Create a hollow cone | Alias: coneSurf | Constraints: 3 dimensions, Not referenced :param str GeomName: Name. Conditions: "" input must be non-empty. :param Point Center: Center: Central point of the cone base. :param Vector Axis: Axis: Cone axis. Conditions: A vector cannot have zero magnitude. :param Double BaseRadius: Radius: Radius of the lower base. Conditions: Value must be greater than 0. :param Double TopRadius: Upper radius: Radius of the upper base. Conditions: Value must be greater or equal than 0. :param Double Height: Height: Height of the cone. Conditions: Value must be greater than 0. :param Double Angle: Angle: Angle to truncate the cone. Conditions: Value must be greater or equal than 0.00 and lower than 6.28. :rtype: Return a GeomShell ``` *Example:* ```{code-block} python # -*- coding: utf-8 -*- # Example: Creating a cone surface # This command creates a conical surface defined by: # - A center point (base center) # - An axis vector (cone orientation) # - Base and top radii # - Height of the cone # - Angle defining the portion of the cone to generate # # When the top radius is set to 0, the surface becomes a perfect cone. # Reducing the 'angle' value (e.g., 180°) creates a partial conical surface. # --- Non-referenced mode --- center = Point(0, 0, 0) # Center of the cone’s base axis = Vector(0, 0, 1) # Axis direction of the cone baseRadius = Double(1) # Radius of the base topRadius = Double(0) # Radius of the top (0 for pointed cone) height = Double(1) # Height of the cone angle = Double(360) # Angular span in degrees (360 for full cone) cone_surface_geom_entity = createConeSurf( "Surfaces group", # Name of the resulting surface entity center, # Base center point axis, # Axis direction baseRadius, # Base radius topRadius, # Top radius height, # Height angle # Angular span ) # --- Referenced mode --- center_geom_entity = createPoint("Point", Point(0, 0, 0)) # Referenced center point axis_geom_entity = createAxis("Curve", Point(0, 0, 0), Vector(1, 0, 0)) # Referenced axis entity cone_surface_geom_entity = createConeSurf( "Surfaces group (2)", # Name of the resulting surface entity center_geom_entity, # Referenced center point axis_geom_entity, # Referenced axis baseRadius, # Base radius topRadius, # Top radius height, # Height angle # Angular span ) ``` ```{eval-rst} .. py:function:: createCylinderSurf(Center, Axis, Radius, Height, Angle) :nocontentsentry: Cylinder (C,R,H): Create a hollow cylinder defined by the center of its base, its radius and its height | Alias: cylinderSurf | Constraints: 3 dimensions, Referenced :param POCCVertexByCoord Center: Center: Central point of the base. Conditions: "" does not exist in the dropdown list. The input must be non-empty. :param POCCGeomLine Axis: Axis: Axis of the cylinder. Conditions: "" does not exist in the dropdown list. The input must be non-empty. :param Double Radius: Radius: Radius of the cylinder. Conditions: Value must be greater than 0. :param Double Height: Height: Height of the cylinder. Conditions: Value must be greater than 0. :param Double Angle: Angle: Angle to truncate the cylinder. Conditions: Value must be greater or equal than 0.00 and lower than 6.28. :rtype: Return a GeomShell ``` ```{eval-rst} .. py:function:: createCylinderSurf(Center, Axis, Radius, Height, Angle) :nocontentsentry: Cylinder (C,R,H): Create a hollow cylinder defined by the center of its base, its radius and its height | Alias: cylinderSurf | Constraints: 3 dimensions, Not referenced :param Point Center: Center: Central point of the base. :param Vector Axis: Axis: Axis of the cylinder. Conditions: A vector cannot have zero magnitude. :param Double Radius: Radius: Radius of the cylinder. Conditions: Value must be greater than 0. :param Double Height: Height: Height of the cylinder. Conditions: Value must be greater than 0. :param Double Angle: Angle: Angle to truncate the cylinder. Conditions: Value must be greater or equal than 0.00 and lower than 6.28. :rtype: Return a GeomShell ``` ```{eval-rst} .. py:function:: createCylinderSurf(GeomName, Center, Axis, Radius, Height, Angle) :nocontentsentry: Cylinder (C,R,H): Create a hollow cylinder defined by the center of its base, its radius and its height | Alias: cylinderSurf | Constraints: 3 dimensions, Referenced :param str GeomName: Name. Conditions: "" input must be non-empty. :param POCCVertexByCoord Center: Center: Central point of the base. Conditions: "" does not exist in the dropdown list. The input must be non-empty. :param POCCGeomLine Axis: Axis: Axis of the cylinder. Conditions: "" does not exist in the dropdown list. The input must be non-empty. :param Double Radius: Radius: Radius of the cylinder. Conditions: Value must be greater than 0. :param Double Height: Height: Height of the cylinder. Conditions: Value must be greater than 0. :param Double Angle: Angle: Angle to truncate the cylinder. Conditions: Value must be greater or equal than 0.00 and lower than 6.28. :rtype: Return a GeomShell ``` ```{eval-rst} .. py:function:: createCylinderSurf(GeomName, Center, Axis, Radius, Height, Angle) :nocontentsentry: Cylinder (C,R,H): Create a hollow cylinder defined by the center of its base, its radius and its height | Alias: cylinderSurf | Constraints: 3 dimensions, Not referenced :param str GeomName: Name. Conditions: "" input must be non-empty. :param Point Center: Center: Central point of the base. :param Vector Axis: Axis: Axis of the cylinder. Conditions: A vector cannot have zero magnitude. :param Double Radius: Radius: Radius of the cylinder. Conditions: Value must be greater than 0. :param Double Height: Height: Height of the cylinder. Conditions: Value must be greater than 0. :param Double Angle: Angle: Angle to truncate the cylinder. Conditions: Value must be greater or equal than 0.00 and lower than 6.28. :rtype: Return a GeomShell ``` *Example:* ```{code-block} python # -*- coding: utf-8 -*- # Example: Creating a cylindrical surface # This command creates a cylindrical surface defined by: # - A base center point # - An axis vector (orientation of the cylinder) # - A radius and height # - An angle that specifies the portion of the cylinder to generate # # Setting the 'angle' to 360° produces a full cylindrical surface, # while smaller values generate a partial one (an open arc-like surface). # --- Non-referenced mode --- center = Point(0, 0, 0) # Center of the cylinder’s base axis = Vector(0, 0, 1) # Axis direction of the cylinder radius = Double(0.5) # Radius of the cylinder height = Double(1) # Height of the cylinder angle = Double(360) # Angular span in degrees (360 for full cylinder) cylinder_surface_geom_entity = createCylinderSurf( "Surfaces group", # Name of the resulting surface entity center, # Base center point axis, # Axis direction radius, # Radius height, # Height angle # Angular span ) # --- Referenced mode --- center_geom_entity = createPoint("Point", Point(0, 0, 0)) # Referenced center point axis_geom_entity = createAxis("Curve", Point(0, 0, 0), Vector(1, 0, 0)) # Referenced axis entity cylinder_surface_geom_entity = createCylinderSurf( "Surfaces group (2)", # Name of the resulting surface entity center_geom_entity, # Referenced center point axis_geom_entity, # Referenced axis radius, # Radius height, # Height angle # Angular span ) ``` ```{eval-rst} .. py:function:: createEllipseSurf(StartVertex, EndVertex, Center, Angle) :nocontentsentry: Ellipse (C,P,P): Ellipse defined by its center and two points | Alias: ellipseSurf | Constraints: 3 dimensions, 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. :param Double Angle: Ang: Angle. Conditions: Value must be greater or equal than 0.00 and lower than 6.28. :rtype: Return a GeomFace ``` ```{eval-rst} .. py:function:: createEllipseSurf(StartVertex, EndVertex, Center, Angle) :nocontentsentry: Ellipse (C,P,P): Ellipse defined by its center and two points | Alias: ellipseSurf | Constraints: 3 dimensions, 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. :param Double Angle: Ang: Angle. Conditions: Value must be greater or equal than 0.00 and lower than 6.28. :rtype: Return a GeomFace ``` ```{eval-rst} .. py:function:: createEllipseSurf(GeomName, StartVertex, EndVertex, Center, Angle) :nocontentsentry: Ellipse (C,P,P): Ellipse defined by its center and two points | Alias: ellipseSurf | Constraints: 3 dimensions, 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. :param Double Angle: Ang: Angle. Conditions: Value must be greater or equal than 0.00 and lower than 6.28. :rtype: Return a GeomFace ``` ```{eval-rst} .. py:function:: createEllipseSurf(GeomName, StartVertex, EndVertex, Center, Angle) :nocontentsentry: Ellipse (C,P,P): Ellipse defined by its center and two points | Alias: ellipseSurf | Constraints: 3 dimensions, 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. :param Double Angle: Ang: Angle. Conditions: Value must be greater or equal than 0.00 and lower than 6.28. :rtype: Return a GeomFace ``` *Example:* ```{code-block} python # -*- coding: utf-8 -*- # Example: Creating an elliptical surface # This command creates an elliptical surface defined by: # - A point on the major axis (defining its direction and half-length) # - A point on the minor axis (defining its direction and half-length) # - A center point of the ellipse # - An angle that defines the portion of the ellipse to generate # # Setting the 'angle' to 360° creates a full ellipse, # while smaller values produce a partial elliptical surface. # --- Non-referenced mode --- major_axis_location = Point(1, 0, 0) # Point defining the major axis direction and radius minor_axis_location = Point(0, 0.5, 0) # Point defining the minor axis direction and radius center = Point(0, 0, 0) # Center of the ellipse angle = Double(360) # Angular span in degrees (360 for full ellipse) ellipse_surface_geom_entity = createEllipseSurf( "Surface", # Name of the resulting surface entity major_axis_location, # Major axis point minor_axis_location, # Minor axis point center, # Ellipse center angle # Angular span ) # --- Referenced mode --- major_axis_location_geom_entity = createPoint("Point", Point(1, 0, 0)) # Referenced major axis point minor_axis_location_geom_entity = createPoint("Point (2)", Point(0, 0.5, 0)) # Referenced minor axis point center_geom_entity = createPoint("Point (3)", Point(0, 0, 0)) # Referenced ellipse center ellipse_surface_geom_entity = createEllipseSurf( "Surface (2)", # Name of the resulting surface entity major_axis_location_geom_entity, # Referenced major axis point minor_axis_location_geom_entity, # Referenced minor axis point center_geom_entity, # Referenced ellipse center angle # Angular span ) ``` ```{eval-rst} .. py:function:: createPolygonSurf(Center, Radius, NumSides, Circumscribing) :nocontentsentry: Regular polygon: Plane regular polygonal surface | Alias: polygonSurf | 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 GeomFace ``` ```{eval-rst} .. py:function:: createPolygonSurf(Center, Radius, NumSides, Circumscribing) :nocontentsentry: Regular polygon: Plane regular polygonal surface | Alias: polygonSurf | 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 GeomFace ``` ```{eval-rst} .. py:function:: createPolygonSurf(GeomName, Center, Radius, NumSides, Circumscribing) :nocontentsentry: Regular polygon: Plane regular polygonal surface | Alias: polygonSurf | 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 GeomFace ``` ```{eval-rst} .. py:function:: createPolygonSurf(Center, Vector, Radius, NumSides, Circumscribing) :nocontentsentry: Regular polygon: Plane regular polygonal surface | Alias: polygonSurf | 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 GeomFace ``` ```{eval-rst} .. py:function:: createPolygonSurf(GeomName, Center, Radius, NumSides, Circumscribing) :nocontentsentry: Regular polygon: Plane regular polygonal surface | Alias: polygonSurf | 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 GeomFace ``` ```{eval-rst} .. py:function:: createPolygonSurf(Center, Vector, Radius, NumSides, Circumscribing) :nocontentsentry: Regular polygon: Plane regular polygonal surface | Alias: polygonSurf | 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 GeomFace ``` ```{eval-rst} .. py:function:: createPolygonSurf(GeomName, Center, Vector, Radius, NumSides, Circumscribing) :nocontentsentry: Regular polygon: Plane regular polygonal surface | Alias: polygonSurf | 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 GeomFace ``` ```{eval-rst} .. py:function:: createPolygonSurf(GeomName, Center, Vector, Radius, NumSides, Circumscribing) :nocontentsentry: Regular polygon: Plane regular polygonal surface | Alias: polygonSurf | 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 GeomFace ``` *Example:* ```{code-block} python # -*- coding: utf-8 -*- # Example: Creating a polygon surface # This command creates a polygonal surface defined by: # - A center point # - A normal vector (defining the plane orientation) # - A radius size (distance from center to each vertex) # - The number of sides # - A flag indicating whether the polygon should be closed # # 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) # Distance from the center to the vertices num_sides = 5 # Number of sides for the polygon # Create a polygon surface directly from primitive data polygon_geom_entity = createPolygonSurf( "Surface", # Name of the resulting surface entity center, # Center point normal, # Normal vector radius_size, # Polygon radius num_sides, # Number of sides True # Whether the polygon should be closed ) # --- 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 a polygon surface using referenced entities polygon_geom_entity = createPolygonSurf( "Surface (2)", # Name of the resulting surface entity center_geom_entity, # Referenced point entity normal_geom_entity, # Referenced axis entity radius_size, # Polygon radius num_sides, # Number of sides True # Whether the polygon should be closed ) # Result: # A polygonal surface is created either directly from coordinates (non-referenced mode) # or from existing geometric entities (referenced mode). ``` ```{eval-rst} .. py:function:: createQuad(FirstPoint, SecondPoint, ThirdPoint, FourthPoint) :nocontentsentry: Quad (P,P,P,P): Create a quadrilateral defined by its four vertices | Alias: quad | Constraints: Referenced :param Entity FirstPoint: Point1: Point contained in the plane. Conditions: "" does not exist in the dropdown list. The input must be non-empty. Points can not match. Points can not be coplanar. :param Entity SecondPoint: Point2: Second point. Conditions: "" does not exist in the dropdown list. The input must be non-empty. Points can not match. :param Entity ThirdPoint: Point3: Third point. Conditions: "" does not exist in the dropdown list. The input must be non-empty. Points can not match. :param Entity FourthPoint: Point4: Fourth point. Conditions: "" does not exist in the dropdown list. The input must be non-empty. Points can not match. :rtype: Return a GeomFace ``` ```{eval-rst} .. py:function:: createQuad(FirstPoint, SecondPoint, ThirdPoint, FourthPoint) :nocontentsentry: Quad (P,P,P,P): Create a quadrilateral defined by its four vertices | Alias: quad | Constraints: Not referenced :param Point FirstPoint: Point1: Point contained in the plane. Conditions: Points can not match. Points can not be coplanar. :param Point SecondPoint: Point2: Second point. Conditions: Points can not match. :param Point ThirdPoint: Point3: Third point. Conditions: Points can not match. :param Point FourthPoint: Point4: Fourth point. Conditions: Points can not match. :rtype: Return a GeomFace ``` ```{eval-rst} .. py:function:: createQuad(GeomName, FirstPoint, SecondPoint, ThirdPoint, FourthPoint) :nocontentsentry: Quad (P,P,P,P): Create a quadrilateral defined by its four vertices | Alias: quad | Constraints: Referenced :param str GeomName: Name. Conditions: "" input must be non-empty. :param Entity FirstPoint: Point1: Point contained in the plane. Conditions: "" does not exist in the dropdown list. The input must be non-empty. Points can not match. Points can not be coplanar. :param Entity SecondPoint: Point2: Second point. Conditions: "" does not exist in the dropdown list. The input must be non-empty. Points can not match. :param Entity ThirdPoint: Point3: Third point. Conditions: "" does not exist in the dropdown list. The input must be non-empty. Points can not match. :param Entity FourthPoint: Point4: Fourth point. Conditions: "" does not exist in the dropdown list. The input must be non-empty. Points can not match. :rtype: Return a GeomFace ``` ```{eval-rst} .. py:function:: createQuad(GeomName, FirstPoint, SecondPoint, ThirdPoint, FourthPoint) :nocontentsentry: Quad (P,P,P,P): Create a quadrilateral defined by its four vertices | Alias: quad | Constraints: Not referenced :param str GeomName: Name. Conditions: "" input must be non-empty. :param Point FirstPoint: Point1: Point contained in the plane. Conditions: Points can not match. Points can not be coplanar. :param Point SecondPoint: Point2: Second point. Conditions: Points can not match. :param Point ThirdPoint: Point3: Third point. Conditions: Points can not match. :param Point FourthPoint: Point4: Fourth point. Conditions: Points can not match. :rtype: Return a GeomFace ``` *Example:* ```{code-block} python # -*- coding: utf-8 -*- # Example: Creating a quadrilateral (quad) using its four corner points # This command creates a quadrilateral surface (quad) defined explicitly by # four corner points. The order of the points determines the shape and orientation # of the resulting surface. # The command supports both non-referenced and referenced modes. # --- Non-referenced mode --- # Define the corner points point1 = Point(0, 0, 0) # First corner point2 = Point(1, 0, 0) # Second corner point3 = Point(1, 1, 0) # Third corner point4 = Point(0, 1, 0) # Fourth corner # Create the quad directly from coordinates quad_geom_point = createQuad( "Surface", # Name of the resulting quad surface point1, point2, point3, point4 ) # --- Referenced mode --- # Create point entities to use as references point1_geom_entity = createPoint("Point", Point(0, 0, 0)) point2_geom_entity = createPoint("Point (2)", Point(0, 1, 0)) point3_geom_entity = createPoint("Point (3)", Point(1, 1, 0)) point4_geom_entity = createPoint("Point (4)", Point(1, 0, 0)) # Create the quad using referenced point entities quad_geom_point = createQuad( "Surface (2)", # Name of the resulting quad surface point1_geom_entity, point2_geom_entity, point3_geom_entity, point4_geom_entity ) # Result: # A quadrilateral surface is created using the four specified corner points. # The surface orientation is determined by the order of the points provided. ``` ```{eval-rst} .. py:function:: createQuadPn(FirstPoint, Size) :nocontentsentry: Quad (P,n): Create a quadrilateral defined by a point, its normal vector and its size | Alias: quadPn | Constraints: 2 dimensions, Referenced :param POCCVertexByCoord FirstPoint: Point1: Point contained in the plane. Conditions: "" does not exist in the dropdown list. The input must be non-empty. :param Double Size: Size: Size of the plane. Conditions: Value must be greater than 0. :rtype: Return a GeomFace ``` ```{eval-rst} .. py:function:: createQuadPn(FirstPoint, Size) :nocontentsentry: Quad (P,n): Create a quadrilateral defined by a point, its normal vector and its size | Alias: quadPn | Constraints: 2 dimensions, Not referenced :param Point FirstPoint: Point1: Point contained in the plane. :param Double Size: Size: Size of the plane. Conditions: Value must be greater than 0. :rtype: Return a GeomFace ``` ```{eval-rst} .. py:function:: createQuadPn(GeomName, FirstPoint, Size) :nocontentsentry: Quad (P,n): Create a quadrilateral defined by a point, its normal vector and its size | Alias: quadPn | Constraints: 2 dimensions, Referenced :param str GeomName: Name. Conditions: "" input must be non-empty. :param POCCVertexByCoord FirstPoint: Point1: Point contained in the plane. Conditions: "" does not exist in the dropdown list. The input must be non-empty. :param Double Size: Size: Size of the plane. Conditions: Value must be greater than 0. :rtype: Return a GeomFace ``` ```{eval-rst} .. py:function:: createQuadPn(FirstPoint, NormalVect, Size) :nocontentsentry: Quad (P,n): Create a quadrilateral defined by a point, its normal vector and its size | Alias: quadPn | Constraints: 3 dimensions, Referenced :param POCCVertexByCoord FirstPoint: Point1: Point contained in the plane. Conditions: "" does not exist in the dropdown list. The input must be non-empty. :param POCCGeomLine NormalVect: Normal vector: Normal vector plane. Conditions: "" does not exist in the dropdown list. The input must be non-empty. :param Double Size: Size: Size of the plane. Conditions: Value must be greater than 0. :rtype: Return a GeomFace ``` ```{eval-rst} .. py:function:: createQuadPn(GeomName, FirstPoint, Size) :nocontentsentry: Quad (P,n): Create a quadrilateral defined by a point, its normal vector and its size | Alias: quadPn | Constraints: 2 dimensions, Not referenced :param str GeomName: Name. Conditions: "" input must be non-empty. :param Point FirstPoint: Point1: Point contained in the plane. :param Double Size: Size: Size of the plane. Conditions: Value must be greater than 0. :rtype: Return a GeomFace ``` ```{eval-rst} .. py:function:: createQuadPn(FirstPoint, NormalVect, Size) :nocontentsentry: Quad (P,n): Create a quadrilateral defined by a point, its normal vector and its size | Alias: quadPn | Constraints: 3 dimensions, Not referenced :param Point FirstPoint: Point1: Point contained in the plane. :param Vector NormalVect: Normal vector: Normal vector plane. Conditions: A vector cannot have zero magnitude. :param Double Size: Size: Size of the plane. Conditions: Value must be greater than 0. :rtype: Return a GeomFace ``` ```{eval-rst} .. py:function:: createQuadPn(GeomName, FirstPoint, NormalVect, Size) :nocontentsentry: Quad (P,n): Create a quadrilateral defined by a point, its normal vector and its size | Alias: quadPn | Constraints: 3 dimensions, Referenced :param str GeomName: Name. Conditions: "" input must be non-empty. :param POCCVertexByCoord FirstPoint: Point1: Point contained in the plane. Conditions: "" does not exist in the dropdown list. The input must be non-empty. :param POCCGeomLine NormalVect: Normal vector: Normal vector plane. Conditions: "" does not exist in the dropdown list. The input must be non-empty. :param Double Size: Size: Size of the plane. Conditions: Value must be greater than 0. :rtype: Return a GeomFace ``` ```{eval-rst} .. py:function:: createQuadPn(GeomName, FirstPoint, NormalVect, Size) :nocontentsentry: Quad (P,n): Create a quadrilateral defined by a point, its normal vector and its size | Alias: quadPn | Constraints: 3 dimensions, Not referenced :param str GeomName: Name. Conditions: "" input must be non-empty. :param Point FirstPoint: Point1: Point contained in the plane. :param Vector NormalVect: Normal vector: Normal vector plane. Conditions: A vector cannot have zero magnitude. :param Double Size: Size: Size of the plane. Conditions: Value must be greater than 0. :rtype: Return a GeomFace ``` *Example:* ```{code-block} python # -*- coding: utf-8 -*- # Example: Creating a quadrilateral (quad) defined by a center point, normal, and size # This command creates a quadrilateral surface (quad) oriented according to # a specified center and normal. The 'quad_size' parameter controls the length # of the quad edges. # It supports both non-referenced and referenced modes: # - Non-referenced: Directly uses Point and Vector values. # - Referenced: Uses existing geometric entities as references. # --- Non-referenced mode --- quad_size = Double(1) # Length of the quad sides plane_center = Point(0, 0, 0) # Center of the quad plane_normal = Vector(0, 0, 1) # Normal defining quad orientation quad_geom_entity = createQuadPn( "Surface", plane_center, plane_normal, quad_size ) # --- Referenced mode --- plane_center_geom_entity = createPoint("Point", Point(0, 0, 0)) # Referenced center point plane_normal_geom_entity = createAxis("Curve", Point(0, 0, 0), Vector(1, 0, 0)) # Referenced normal axis quad_geom_entity = createQuadPn( "Surface (2)", plane_center_geom_entity, plane_normal_geom_entity, quad_size ) # Result: # A quadrilateral surface oriented along the provided normal vector # and centered at the given point, with the specified size. ``` ```{eval-rst} .. py:function:: createQuadPPP(FirstPoint, SecondPoint, ThirdPoint, Size) :nocontentsentry: Quad (P,P,P): Create a quadrilateral defined by three points and its size | Alias: quadPPP | Constraints: Referenced :param Entity FirstPoint: Point1: Point contained in the plane. Conditions: "" does not exist in the dropdown list. The input must be non-empty. Points can not match. :param Entity SecondPoint: Point2: Second point. Conditions: "" does not exist in the dropdown list. The input must be non-empty. Points can not match. :param Entity ThirdPoint: Point3: Third point. 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 Size: Size: Size of the plane. Conditions: Value must be greater than 0. :rtype: Return a GeomFace ``` ```{eval-rst} .. py:function:: createQuadPPP(FirstPoint, SecondPoint, ThirdPoint, Size) :nocontentsentry: Quad (P,P,P): Create a quadrilateral defined by three points and its size | Alias: quadPPP | Constraints: Not referenced :param Point FirstPoint: Point1: Point contained in the plane. Conditions: Points can not match. :param Point SecondPoint: Point2: Second point. Conditions: Points can not match. :param Point ThirdPoint: Point3: Third point. Conditions: Points can not match. Points can not be collinear. :param Double Size: Size: Size of the plane. Conditions: Value must be greater than 0. :rtype: Return a GeomFace ``` ```{eval-rst} .. py:function:: createQuadPPP(GeomName, FirstPoint, SecondPoint, ThirdPoint, Size) :nocontentsentry: Quad (P,P,P): Create a quadrilateral defined by three points and its size | Alias: quadPPP | Constraints: Referenced :param str GeomName: Name. Conditions: "" input must be non-empty. :param Entity FirstPoint: Point1: Point contained in the plane. Conditions: "" does not exist in the dropdown list. The input must be non-empty. Points can not match. :param Entity SecondPoint: Point2: Second point. Conditions: "" does not exist in the dropdown list. The input must be non-empty. Points can not match. :param Entity ThirdPoint: Point3: Third point. 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 Size: Size: Size of the plane. Conditions: Value must be greater than 0. :rtype: Return a GeomFace ``` ```{eval-rst} .. py:function:: createQuadPPP(GeomName, FirstPoint, SecondPoint, ThirdPoint, Size) :nocontentsentry: Quad (P,P,P): Create a quadrilateral defined by three points and its size | Alias: quadPPP | Constraints: Not referenced :param str GeomName: Name. Conditions: "" input must be non-empty. :param Point FirstPoint: Point1: Point contained in the plane. Conditions: Points can not match. :param Point SecondPoint: Point2: Second point. Conditions: Points can not match. :param Point ThirdPoint: Point3: Third point. Conditions: Points can not match. Points can not be collinear. :param Double Size: Size: Size of the plane. Conditions: Value must be greater than 0. :rtype: Return a GeomFace ``` *Example:* ```{code-block} python # -*- coding: utf-8 -*- # Example: Creating a quadrilateral (quad) defined by three points and a size # This command creates a quadrilateral surface (quad) using three points: # - The first point defines the center of the quad. # - The second point defines a direction along one side of the quad. # - The third point defines a direction along the perpendicular side (not the opposite side). # The 'size' parameter determines the scale of the resulting quad. # It supports both non-referenced and referenced modes: # - Non-referenced: Directly uses Point coordinates. # - Referenced: Uses pre-existing geometric entities as inputs. # --- Non-referenced mode --- size = Double(1) # Overall size of the quad center = Point(0, 0, 0) # Center of the quad one_side = Point(1, 0, 0) # Point defining one direction of the quad other_side = Point(0, 1, 0) # Point defining the perpendicular direction quad_geom_entity = createQuadPPP( "Surface", center, one_side, other_side, size ) # --- Referenced mode --- center_geom_entity = createPoint("Point", Point(0, 0, 0)) # Referenced center point one_side_point_geom_entity = createPoint("Point (2)", Point(1, 0, 0)) # Referenced point along one side other_side_point_geom_entity = createPoint("Point (3)", Point(0, 1, 0))# Referenced point along the other side quad_geom_entity = createQuadPPP( "Surface (2)", center_geom_entity, one_side_point_geom_entity, other_side_point_geom_entity, size ) # Result: # A quadrilateral surface centered at the given point, oriented according # to the two provided side directions, and scaled by the specified size. ``` ```{eval-rst} .. py:function:: createSphereSurf(Center, Radius, Angle, Angle1) :nocontentsentry: Sphere: Create a hollow sphere | Alias: sphereSurf | Constraints: 3 dimensions, Referenced :param POCCVertexByCoord Center: Central point: Central point of the sphere. Conditions: "" does not exist in the dropdown list. The input must be non-empty. :param Double Radius: Radius: Radius of the sphere. Conditions: Value must be greater than 0. :param Double Angle: Ang: Angle in the U parametric direction. Conditions: Value must be greater or equal than 0.00 and lower than 6.28. :param Double Angle1: Ang1: Angle in the V parametric direction. Conditions: Value must be greater or equal than 0.00 and lower than 3.14. :rtype: Return a GeomVolume ``` ```{eval-rst} .. py:function:: createSphereSurf(Center, Radius, Angle, Angle1) :nocontentsentry: Sphere: Create a hollow sphere | Alias: sphereSurf | Constraints: 3 dimensions, Not referenced :param Point Center: Central point: Central point of the sphere. :param Double Radius: Radius: Radius of the sphere. Conditions: Value must be greater than 0. :param Double Angle: Ang: Angle in the U parametric direction. Conditions: Value must be greater or equal than 0.00 and lower than 6.28. :param Double Angle1: Ang1: Angle in the V parametric direction. Conditions: Value must be greater or equal than 0.00 and lower than 3.14. :rtype: Return a GeomVolume ``` ```{eval-rst} .. py:function:: createSphereSurf(GeomName, Center, Radius, Angle, Angle1) :nocontentsentry: Sphere: Create a hollow sphere | Alias: sphereSurf | Constraints: 3 dimensions, Referenced :param str GeomName: Name. Conditions: "" input must be non-empty. :param POCCVertexByCoord Center: Central point: Central point of the sphere. Conditions: "" does not exist in the dropdown list. The input must be non-empty. :param Double Radius: Radius: Radius of the sphere. Conditions: Value must be greater than 0. :param Double Angle: Ang: Angle in the U parametric direction. Conditions: Value must be greater or equal than 0.00 and lower than 6.28. :param Double Angle1: Ang1: Angle in the V parametric direction. Conditions: Value must be greater or equal than 0.00 and lower than 3.14. :rtype: Return a GeomVolume ``` ```{eval-rst} .. py:function:: createSphereSurf(GeomName, Center, Radius, Angle, Angle1) :nocontentsentry: Sphere: Create a hollow sphere | Alias: sphereSurf | Constraints: 3 dimensions, Not referenced :param str GeomName: Name. Conditions: "" input must be non-empty. :param Point Center: Central point: Central point of the sphere. :param Double Radius: Radius: Radius of the sphere. Conditions: Value must be greater than 0. :param Double Angle: Ang: Angle in the U parametric direction. Conditions: Value must be greater or equal than 0.00 and lower than 6.28. :param Double Angle1: Ang1: Angle in the V parametric direction. Conditions: Value must be greater or equal than 0.00 and lower than 3.14. :rtype: Return a GeomVolume ``` *Example:* ```{code-block} python # -*- coding: utf-8 -*- # Example: Creating a spherical surface with specified center, radius, and angular spans # This command creates a spherical surface (or a portion of a sphere surface) based # on a given center, radius, and angles along U and V directions. # The U and V angles define the portion of the sphere surface to create. # The command supports both non-referenced and referenced modes. # --- Non-referenced mode --- # Define the sphere's center center = Point(0, 0, 0) # Define the radius radius = Double(1) # Define angular spans in degrees ang_u_dir = Double(360) # U direction (longitude) ang_v_dir = Double(180) # V direction (latitude) # Create the spherical surface directly from coordinates sphere_surface_geom_entity = createSphereSurf( "Surfaces group", # Name of the resulting surface center, radius, ang_u_dir, ang_v_dir ) # --- Referenced mode --- # Create a point entity to use as the sphere's center center_point_geom_entity = createPoint("Point", Point(0, 0, 0)) # Create the spherical surface using a referenced center sphere_surface_geom_entity = createSphereSurf( "Surfaces group (2)", # Name of the resulting surface center_point_geom_entity, radius, ang_u_dir, ang_v_dir ) # Result: # A spherical surface or partial surface is created with the specified center, radius, # and angular spans. In referenced mode, the center point is linked to the surface entity. ``` ```{eval-rst} .. py:function:: createTorusSurf(Center, Axis, MinRadius, MajRadius, Angle) :nocontentsentry: Torus: Create a hollow torus | Alias: torusSurf | Constraints: 3 dimensions, Referenced :param POCCVertexByCoord Center: Center: Central point of the torus. Conditions: "" does not exist in the dropdown list. The input must be non-empty. :param POCCGeomLine Axis: Axis: Axis of the torus. Conditions: "" does not exist in the dropdown list. The input must be non-empty. :param Double MinRadius: Minor radius: Minor radius of the torus. Conditions: Value must be greater than 0. :param Double MajRadius: Major radius: Major radius of the torus. Conditions: Value must be greater than 0. Major and minor radius can't be inverted. :param Double Angle: Angle: Angle to build a portion of a torus. Conditions: Value must be greater or equal than 0.00 and lower than 6.28. :rtype: Return a GeomFace ``` ```{eval-rst} .. py:function:: createTorusSurf(Center, Axis, MinRadius, MajRadius, Angle) :nocontentsentry: Torus: Create a hollow torus | Alias: torusSurf | Constraints: 3 dimensions, Not referenced :param Point Center: Center: Central point of the torus. :param Vector Axis: Axis: Axis of the torus. Conditions: A vector cannot have zero magnitude. :param Double MinRadius: Minor radius: Minor radius of the torus. Conditions: Value must be greater than 0. :param Double MajRadius: Major radius: Major radius of the torus. Conditions: Value must be greater than 0. Major and minor radius can't be inverted. :param Double Angle: Angle: Angle to build a portion of a torus. Conditions: Value must be greater or equal than 0.00 and lower than 6.28. :rtype: Return a GeomFace ``` ```{eval-rst} .. py:function:: createTorusSurf(GeomName, Center, Axis, MinRadius, MajRadius, Angle) :nocontentsentry: Torus: Create a hollow torus | Alias: torusSurf | Constraints: 3 dimensions, Referenced :param str GeomName: Name. Conditions: "" input must be non-empty. :param POCCVertexByCoord Center: Center: Central point of the torus. Conditions: "" does not exist in the dropdown list. The input must be non-empty. :param POCCGeomLine Axis: Axis: Axis of the torus. Conditions: "" does not exist in the dropdown list. The input must be non-empty. :param Double MinRadius: Minor radius: Minor radius of the torus. Conditions: Value must be greater than 0. :param Double MajRadius: Major radius: Major radius of the torus. Conditions: Value must be greater than 0. Major and minor radius can't be inverted. :param Double Angle: Angle: Angle to build a portion of a torus. Conditions: Value must be greater or equal than 0.00 and lower than 6.28. :rtype: Return a GeomFace ``` ```{eval-rst} .. py:function:: createTorusSurf(GeomName, Center, Axis, MinRadius, MajRadius, Angle) :nocontentsentry: Torus: Create a hollow torus | Alias: torusSurf | Constraints: 3 dimensions, Not referenced :param str GeomName: Name. Conditions: "" input must be non-empty. :param Point Center: Center: Central point of the torus. :param Vector Axis: Axis: Axis of the torus. Conditions: A vector cannot have zero magnitude. :param Double MinRadius: Minor radius: Minor radius of the torus. Conditions: Value must be greater than 0. :param Double MajRadius: Major radius: Major radius of the torus. Conditions: Value must be greater than 0. Major and minor radius can't be inverted. :param Double Angle: Angle: Angle to build a portion of a torus. Conditions: Value must be greater or equal than 0.00 and lower than 6.28. :rtype: Return a GeomFace ``` *Example:* ```{code-block} python # -*- coding: utf-8 -*- # Example: Creating a torus surface (donut-shaped surface) with specified center, direction, radii, and angular span # This command creates a torus as a surface rather than a solid volume. # The torus surface is defined by a center point, a direction vector (axis), a minor radius # (tube radius), a major radius (distance from the center to the tube center), # and an angle to define the portion of the torus surface to create. # The command supports both non-referenced and referenced modes. # --- Non-referenced mode --- # Define the torus center center = Point(0, 0, 0) # Define the torus axis direction direction = Vector(0, 0, 1) # Define the radii minor_radius = Double(0.5) # Radius of the tube major_radius = Double(1) # Radius from center to tube center # Define the angular portion of the torus (360 for a full torus) angle_of_torus = Double(360) # Create the torus surface directly from coordinates torus_surface_geom_entity = createTorusSurf( "Surfaces group", # Name of the resulting torus surface center, direction, minor_radius, major_radius, angle_of_torus ) # --- Referenced mode --- # Create a point entity for the torus center center_point_geom_entity = createPoint("Point", Point(0, 0, 0)) # Create an axis entity for the torus direction direction_geom_entity = createAxis("Curve", Point(0, 0, 0), Vector(1, 0, 0)) # Create the torus surface using referenced entities torus_surface_geom_entity = createTorusSurf( "Surfaces group (2)", # Name of the resulting torus surface center_point_geom_entity, direction_geom_entity, minor_radius, major_radius, angle_of_torus ) # Result: # A torus surface or partial torus surface is created with the specified parameters. # In referenced mode, the center and axis are linked to the torus surface entity. ``` ```{eval-rst} .. py:function:: createTriangle(FirstPoint, SecondPoint, ThirdPoint) :nocontentsentry: Triangle: Create a triangle | Alias: triangle | Constraints: Referenced :param Entity FirstPoint: Point1: Point contained in the plane. 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 SecondPoint: Point2: Second point. Conditions: The input must be non-empty. "" does not exist in the dropdown list. Points can not match. :param Entity ThirdPoint: Point3: Third point. Conditions: The input must be non-empty. "" does not exist in the dropdown list. Points can not match. :rtype: Return a GeomFace ``` ```{eval-rst} .. py:function:: createTriangle(FirstPoint, SecondPoint, ThirdPoint) :nocontentsentry: Triangle: Create a triangle | Alias: triangle | Constraints: Not referenced :param Point FirstPoint: Point1: Point contained in the plane. Conditions: Points can not match. Points can not be collinear. :param Point SecondPoint: Point2: Second point. Conditions: Points can not match. :param Point ThirdPoint: Point3: Third point. Conditions: Points can not match. :rtype: Return a GeomFace ``` ```{eval-rst} .. py:function:: createTriangle(GeomName, FirstPoint, SecondPoint, ThirdPoint) :nocontentsentry: Triangle: Create a triangle | Alias: triangle | Constraints: Referenced :param str GeomName: Name. Conditions: "" input must be non-empty. :param Entity FirstPoint: Point1: Point contained in the plane. 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 SecondPoint: Point2: Second point. Conditions: The input must be non-empty. "" does not exist in the dropdown list. Points can not match. :param Entity ThirdPoint: Point3: Third point. Conditions: The input must be non-empty. "" does not exist in the dropdown list. Points can not match. :rtype: Return a GeomFace ``` ```{eval-rst} .. py:function:: createTriangle(GeomName, FirstPoint, SecondPoint, ThirdPoint) :nocontentsentry: Triangle: Create a triangle | Alias: triangle | Constraints: Not referenced :param str GeomName: Name. Conditions: "" input must be non-empty. :param Point FirstPoint: Point1: Point contained in the plane. Conditions: Points can not match. Points can not be collinear. :param Point SecondPoint: Point2: Second point. Conditions: Points can not match. :param Point ThirdPoint: Point3: Third point. Conditions: Points can not match. :rtype: Return a GeomFace ``` *Example:* ```{code-block} python # -*- coding: utf-8 -*- # Example: Creating a triangular surface using three points # This command creates a triangular surface defined by three points. # It supports both non-referenced and referenced modes: # - In non-referenced mode, coordinates are provided directly. # - In referenced mode, the triangle is built using existing point entities. # --- Non-referenced mode --- # Define the three corner points directly point1 = Point(0, 0, 0) point2 = Point(1, 0, 0) point3 = Point(0, 1, 0) # Create the triangle surface triangle_geom_entity = createTriangle("Surface", point1, point2, point3) # --- Referenced mode --- # Create reference points to be used as the triangle's vertices point1_geom_entity = createPoint("Point", Point(-2, -1, 0)) point2_geom_entity = createPoint("Point (2)", Point(-1, 4, 0)) point3_geom_entity = createPoint("Point (3)", Point(5, -1, 0)) # Create the triangle surface using existing geometric point entities triangle_geom_entity = createTriangle( "Surface (2)", point1_geom_entity, point2_geom_entity, point3_geom_entity ) # Result: # A triangular surface is created either from explicit coordinates # or by referencing pre-existing point entities. ``` ```{eval-rst} .. py:function:: geomFillFace(BOUND) :nocontentsentry: By curves: Plane polygonal surface defined by a closed group of curves | Alias: fillFace :param List BOUND: Boundary: List of geometric entities, boundary of another entity. Conditions: "" does not exist in the dropdown list. :rtype: Return a GeomFace ``` ```{eval-rst} .. py:function:: geomFillFace(GeomName, BOUND) :nocontentsentry: By curves: Plane polygonal surface defined by a closed group of curves | Alias: fillFace :param str GeomName: Name. Conditions: "" input must be non-empty. :param List BOUND: Boundary: List of geometric entities, boundary of another entity. Conditions: "" does not exist in the dropdown list. :rtype: Return a GeomFace ``` *Example:* ```{code-block} python # -*- coding: utf-8 -*- # Example: Create a surface by filling a closed loop of curves # Step 1: Define the boundary curves that form a closed loop line1_geom_entity = createLine("Curve", Point(0, 2, 0), Point(2, 0, 0)) line2_geom_entity = createLine("Curve (2)", Point(0, -2, 0), Point(2, 0, 0)) line3_geom_entity = createLine("Curve (3)", Point(0, -2, 0), Point(-2, 0, 0)) line4_geom_entity = createLine("Curve (4)", Point(-2, 0, 0), Point(0, 2, 0)) # Step 2: Create a surface that fills the closed set of curves surface_geom_entity = geomFillFace( "Surface", [line1_geom_entity, line2_geom_entity, line3_geom_entity, line4_geom_entity] ) # Result: # - A surface is generated by filling the closed boundary defined by the curves. # - Order of curves must follow the loop sequence. ``` ```{eval-rst} .. py:function:: geomFillFaceByWire(BOUND) :nocontentsentry: By closed polyline: Plane polygonal surface defined by a closed polyline | Alias: fillFaceW :param List BOUND: Boundary: List of geometric entities, boundary of another entity. Conditions: "" does not exist in the dropdown list. :rtype: Return a GeomFace ``` ```{eval-rst} .. py:function:: geomFillFaceByWire(GeomName, BOUND) :nocontentsentry: By closed polyline: Plane polygonal surface defined by a closed polyline | Alias: fillFaceW :param str GeomName: Name. Conditions: "" input must be non-empty. :param List BOUND: Boundary: List of geometric entities, boundary of another entity. Conditions: "" does not exist in the dropdown list. :rtype: Return a GeomFace ``` *Example:* ```{code-block} python # -*- coding: utf-8 -*- # Example: Create a surface by filling a closed polyline wire # Step 1: Define the individual curves that will form the polyline line1_geom_entity = createLine("Curve", Point(0, 2, 0), Point(2, 0, 0)) line2_geom_entity = createLine("Curve (2)", Point(0, -2, 0), Point(2, 0, 0)) line3_geom_entity = createLine("Curve (3)", Point(0, -2, 0), Point(-2, 0, 0)) line4_geom_entity = createLine("Curve (4)", Point(-2, 0, 0), Point(0, 2, 0)) # Step 2: Create a polyline from the sequence of curves polyline_geom_entity = polylineByCurves( "Curves group", [line1_geom_entity, line2_geom_entity, line3_geom_entity, line4_geom_entity] ) # Step 3: Fill the closed wire to generate a surface surface_geom_entity = geomFillFaceByWire( "Surface (2)", [polyline_geom_entity] ) # Result: # - A surface is created by filling the closed wire defined by the polyline. # - The input polyline must form a properly closed loop. ``` ```{eval-rst} .. py:function:: glueFaces(Surfaces) :nocontentsentry: Sew surfaces: Create a group of surface using a list of surfaces | Alias: shellByFaces :param List Surfaces: Surfaces: List of surfaces. Conditions: "" does not exist in the dropdown list. :rtype: Return a GeomShell ``` ```{eval-rst} .. py:function:: glueFaces(GeomName, Surfaces) :nocontentsentry: Sew surfaces: Create a group of surface using a list of surfaces | Alias: shellByFaces :param str GeomName: Name. Conditions: "" input must be non-empty. :param List Surfaces: Surfaces: List of surfaces. Conditions: "" does not exist in the dropdown list. :rtype: Return a GeomShell ``` *Example:* ```{code-block} python # -*- coding: utf-8 -*- # Example: Gluing multiple surfaces into a single surface group # Step 1: Create a volume to extract surfaces from box_geom_entity = createBox("Volume", Point(0, 0, 0), Double(1), Double(1), Double(1)) # Step 2: Explode the volume to obtain its individual faces geomExplode([box_geom_entity], "FACE") # Step 3: Collect the resulting surfaces geom1 = Geometry("Surface (3)") geom2 = Geometry("Surface (2)") geom3 = Geometry("Surface") geom4 = Geometry("Surface (1)") geom5 = Geometry("Surface (4)") geom6 = Geometry("Surface (5)") # Step 4: Glue all surfaces together into a single surface group surface_geom_entity = glueFaces( "Surfaces group", [geom6, geom5, geom4, geom3, geom2, geom1] ) # Result: # - A new surface group is created containing all input surfaces. # - This command does not differentiate between referenced and non-referenced modes. ``` ```{eval-rst} .. py:function:: ruledSurface(Curve1, Curve2) :nocontentsentry: Ruled: Ruled surface defined by two curves | Alias: ruledSurf | Constraints: 3 dimensions :param Entity Curve1: Curve 1: Curve 1 to construct ruled surface. Conditions: The input must be non-empty. "" does not exist in the dropdown list. :param Entity Curve2: Curve 2: Curve 2 to construct ruled surface. Conditions: The input must be non-empty. "" does not exist in the dropdown list. :rtype: Return a GeomFace ``` ```{eval-rst} .. py:function:: ruledSurface(GeomName, Curve1, Curve2) :nocontentsentry: Ruled: Ruled surface defined by two curves | Alias: ruledSurf | Constraints: 3 dimensions :param str GeomName: Name. Conditions: "" input must be non-empty. :param Entity Curve1: Curve 1: Curve 1 to construct ruled surface. Conditions: The input must be non-empty. "" does not exist in the dropdown list. :param Entity Curve2: Curve 2: Curve 2 to construct ruled surface. Conditions: The input must be non-empty. "" does not exist in the dropdown list. :rtype: Return a GeomFace ``` *Example:* ```{code-block} python # -*- coding: utf-8 -*- # Example: Creating a ruled surface between two curves # This command generates a ruled surface by connecting two curves (lines in this case). # The resulting surface is created by interpolating straight lines between the corresponding # endpoints of the two input curves. # Create the two line entities line1_geom_entity = createLine( "Curve", Point(-8, -6, 0), Point(-14, 4, 0) ) line2_geom_entity = createLine( "Curve (2)", Point(-1, -3, 0), Point(-7, 7, 0) ) # Create the ruled surface between the two lines surface_geom_entity = ruledSurface( "Surface", # Name of the resulting surface line1_geom_entity, # First curve line2_geom_entity # Second curve ) # Result: # A surface is created that spans between the two curves. # The edges of the surface correspond to the input curves, and # the interior is formed by straight lines connecting the curves' endpoints. ```