Surfaces
- createBezierSurf(NumPntsU, NumPntsV, ListWeights, ListPnts)
Bézier surface: Create a Bézier surface
Alias: bezierSurfConstraints: 3 dimensions- Parameters:
NumPntsU (int) – Num. U: Number of points in U direction .
NumPntsV (int) – Num. V: Number of points in V direction .
ListWeights (List) – Return a GeomPoint.
ListPnts (List) – List: List of points through which the surface passes.
- Return type:
Return a GeomFace
- createBezierSurf(GeomName, NumPntsU, NumPntsV, ListWeights, ListPnts)
Bézier surface: Create a Bézier surface
Alias: bezierSurfConstraints: 3 dimensions- Parameters:
GeomName (str) – Name. Conditions: “” input must be non-empty.
NumPntsU (int) – Num. U: Number of points in U direction .
NumPntsV (int) – Num. V: Number of points in V direction .
ListWeights (List) – Return a GeomPoint.
ListPnts (List) – List: List of points through which the surface passes.
- Return type:
Return a GeomFace
Example:
# -*- 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
)
- createBoxSurf(FirstPoint, SecondPoint)
Box (P,P): Create a hollow box defined by two opposite vertices
Alias: boxSurfConstraints: 3 dimensions, Referenced- Parameters:
FirstPoint (Entity) – Point1: First corner of the box. Conditions: “” does not exist in the dropdown list. The input must be non-empty.
SecondPoint (Entity) – Point2: Second corner of the box . Conditions: “” does not exist in the dropdown list. The input must be non-empty.
- Return type:
Return a GeomShell
- createBoxSurf(FirstPoint, SecondPoint)
Box (P,P): Create a hollow box defined by two opposite vertices
Alias: boxSurfConstraints: 3 dimensions, Not referenced- Parameters:
FirstPoint (Point) – Point1: First corner of the box.
SecondPoint (Point) – Point2: Second corner of the box .
- Return type:
Return a GeomShell
- createBoxSurf(GeomName, FirstPoint, SecondPoint)
Box (P,P): Create a hollow box defined by two opposite vertices
Alias: boxSurfConstraints: 3 dimensions, Referenced- Parameters:
GeomName (str) – Name. Conditions: “” input must be non-empty.
FirstPoint (Entity) – Point1: First corner of the box. Conditions: “” does not exist in the dropdown list. The input must be non-empty.
SecondPoint (Entity) – Point2: Second corner of the box . Conditions: “” does not exist in the dropdown list. The input must be non-empty.
- Return type:
Return a GeomShell
- createBoxSurf(GeomName, FirstPoint, SecondPoint)
Box (P,P): Create a hollow box defined by two opposite vertices
Alias: boxSurfConstraints: 3 dimensions, Not referenced- Parameters:
GeomName (str) – Name. Conditions: “” input must be non-empty.
FirstPoint (Point) – Point1: First corner of the box.
SecondPoint (Point) – Point2: Second corner of the box .
- Return type:
Return a GeomShell
- createBoxSurf(FirstPoint, DX, DY, DZ)
Box (P,Dim): Create a hollow box defined by a vertex and its dimensions
Alias: boxSurfConstraints: 3 dimensions, Referenced- Parameters:
FirstPoint (POCCVertexByCoord) – Point1: First corner of the box. Conditions: “” does not exist in the dropdown list. The input must be non-empty.
DX (Double) – DX: Box dimension along the X coordinate. Conditions: Value must be greater than 0.
DY (Double) – DY: Box dimension along the Y coordinate. Conditions: Value must be greater than 0.
DZ (Double) – DZ: Box dimension along the Z coordinate. Conditions: Value must be greater than 0.
- Return type:
Return a GeomShell
- createBoxSurf(FirstPoint, DX, DY, DZ)
Box (P,Dim): Create a hollow box defined by a vertex and its dimensions
Alias: boxSurfConstraints: 3 dimensions, Not referenced- Parameters:
FirstPoint (Point) – Point1: First corner of the box.
DX (Double) – DX: Box dimension along the X coordinate. Conditions: Value must be greater than 0.
DY (Double) – DY: Box dimension along the Y coordinate. Conditions: Value must be greater than 0.
DZ (Double) – DZ: Box dimension along the Z coordinate. Conditions: Value must be greater than 0.
- Return type:
Return a GeomShell
- createBoxSurf(GeomName, FirstPoint, DX, DY, DZ)
Box (P,Dim): Create a hollow box defined by a vertex and its dimensions
Alias: boxSurfConstraints: 3 dimensions, Referenced- Parameters:
GeomName (str) – Name. Conditions: “” input must be non-empty.
FirstPoint (POCCVertexByCoord) – Point1: First corner of the box. Conditions: “” does not exist in the dropdown list. The input must be non-empty.
DX (Double) – DX: Box dimension along the X coordinate. Conditions: Value must be greater than 0.
DY (Double) – DY: Box dimension along the Y coordinate. Conditions: Value must be greater than 0.
DZ (Double) – DZ: Box dimension along the Z coordinate. Conditions: Value must be greater than 0.
- Return type:
Return a GeomShell
- createBoxSurf(GeomName, FirstPoint, DX, DY, DZ)
Box (P,Dim): Create a hollow box defined by a vertex and its dimensions
Alias: boxSurfConstraints: 3 dimensions, Not referenced- Parameters:
GeomName (str) – Name. Conditions: “” input must be non-empty.
FirstPoint (Point) – Point1: First corner of the box.
DX (Double) – DX: Box dimension along the X coordinate. Conditions: Value must be greater than 0.
DY (Double) – DY: Box dimension along the Y coordinate. Conditions: Value must be greater than 0.
DZ (Double) – DZ: Box dimension along the Z coordinate. Conditions: Value must be greater than 0.
- Return type:
Return a GeomShell
Example:
# -*- 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
)
- createBSplineSurf(DegMin, DegMax, NumPntsU, NumPntsV, Cont, ListPnts)
BSpline surface: Create a BSpline surface
Alias: bsplineSurfConstraints: 3 dimensions- Parameters:
DegMin (int) – Min. degree: Minimum surface degree.
DegMax (int) – Max. degree: Maximum surface degree.
NumPntsU (int) – Num. U: Number of points in U direction .
NumPntsV (int) – Num. V: Number of points in V direction .
Enumerate – { C_0, G_1, C_1, G_2, C_2, C_3, C_N } Cont: Continuity: Surface Continuity.
ListPnts (List) – List: List of points through which the surface passes.
- Return type:
Return a GeomFace
- createBSplineSurf(GeomName, DegMin, DegMax, NumPntsU, NumPntsV, Cont, ListPnts)
BSpline surface: Create a BSpline surface
Alias: bsplineSurfConstraints: 3 dimensions- Parameters:
GeomName (str) – Name. Conditions: “” input must be non-empty.
DegMin (int) – Min. degree: Minimum surface degree.
DegMax (int) – Max. degree: Maximum surface degree.
NumPntsU (int) – Num. U: Number of points in U direction .
NumPntsV (int) – Num. V: Number of points in V direction .
Enumerate – { C_0, G_1, C_1, G_2, C_2, C_3, C_N } Cont: Continuity: Surface Continuity.
ListPnts (List) – List: List of points through which the surface passes.
- Return type:
Return a GeomFace
Example:
# -*- 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
)
- createCircle(Center, Radius, Angle)
Circle (C,R,n): Circle defined by its center, radius and normal vector
Alias: circleConstraints: 2 dimensions, Referenced- Parameters:
Center (POCCVertexByCoord) – Center: Center of the circle/circumference. Conditions: “” does not exist in the dropdown list. The input must be non-empty.
Radius (Double) – Radius: Radius of the circle/circumference. Conditions: Value must be greater than 0.
Angle (Double) – Ang: Angle. Conditions: Value must be greater or equal than 0.00 and lower than 6.28.
- Return type:
Return a GeomFace
- createCircle(Center, Radius, Angle)
Circle (C,R,n): Circle defined by its center, radius and normal vector
Alias: circleConstraints: 2 dimensions, Not referenced- Parameters:
Center (Point) – Center: Center of the circle/circumference.
Radius (Double) – Radius: Radius of the circle/circumference. Conditions: Value must be greater than 0.
Angle (Double) – Ang: Angle. Conditions: Value must be greater or equal than 0.00 and lower than 6.28.
- Return type:
Return a GeomFace
- createCircle(GeomName, Center, Radius, Angle)
Circle (C,R,n): Circle defined by its center, radius and normal vector
Alias: circleConstraints: 2 dimensions, Referenced- Parameters:
GeomName (str) – Name. Conditions: “” input must be non-empty.
Center (POCCVertexByCoord) – Center: Center of the circle/circumference. Conditions: “” does not exist in the dropdown list. The input must be non-empty.
Radius (Double) – Radius: Radius of the circle/circumference. Conditions: Value must be greater than 0.
Angle (Double) – Ang: Angle. Conditions: Value must be greater or equal than 0.00 and lower than 6.28.
- Return type:
Return a GeomFace
- createCircle(Center, Vector, Radius, Angle)
Circle (C,R,n): Circle defined by its center, radius and normal vector
Alias: circleConstraints: 3 dimensions, Referenced- Parameters:
Center (POCCVertexByCoord) – Center: Center of the circle/circumference. Conditions: “” does not exist in the dropdown list. The input must be non-empty.
Vector (POCCGeomLine) – 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.
Radius (Double) – Radius: Radius of the circle/circumference. Conditions: Value must be greater than 0.
Angle (Double) – Ang: Angle. Conditions: Value must be greater or equal than 0.00 and lower than 6.28.
- Return type:
Return a GeomFace
- createCircle(GeomName, Center, Radius, Angle)
Circle (C,R,n): Circle defined by its center, radius and normal vector
Alias: circleConstraints: 2 dimensions, Not referenced- Parameters:
GeomName (str) – Name. Conditions: “” input must be non-empty.
Center (Point) – Center: Center of the circle/circumference.
Radius (Double) – Radius: Radius of the circle/circumference. Conditions: Value must be greater than 0.
Angle (Double) – Ang: Angle. Conditions: Value must be greater or equal than 0.00 and lower than 6.28.
- Return type:
Return a GeomFace
- createCircle(Center, Vector, Radius, Angle)
Circle (C,R,n): Circle defined by its center, radius and normal vector
Alias: circleConstraints: 3 dimensions, Not referenced- Parameters:
Center (Point) – Center: Center of the circle/circumference.
Vector (Vector) – Normal Vector: Normal vector to the plane of the circle/circumference. Conditions: A vector cannot have zero magnitude.
Radius (Double) – Radius: Radius of the circle/circumference. Conditions: Value must be greater than 0.
Angle (Double) – Ang: Angle. Conditions: Value must be greater or equal than 0.00 and lower than 6.28.
- Return type:
Return a GeomFace
- createCircle(GeomName, Center, Vector, Radius, Angle)
Circle (C,R,n): Circle defined by its center, radius and normal vector
Alias: circleConstraints: 3 dimensions, Referenced- Parameters:
GeomName (str) – Name. Conditions: “” input must be non-empty.
Center (POCCVertexByCoord) – Center: Center of the circle/circumference. Conditions: “” does not exist in the dropdown list. The input must be non-empty.
Vector (POCCGeomLine) – 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.
Radius (Double) – Radius: Radius of the circle/circumference. Conditions: Value must be greater than 0.
Angle (Double) – Ang: Angle. Conditions: Value must be greater or equal than 0.00 and lower than 6.28.
- Return type:
Return a GeomFace
- createCircle(GeomName, Center, Vector, Radius, Angle)
Circle (C,R,n): Circle defined by its center, radius and normal vector
Alias: circleConstraints: 3 dimensions, Not referenced- Parameters:
GeomName (str) – Name. Conditions: “” input must be non-empty.
Center (Point) – Center: Center of the circle/circumference.
Vector (Vector) – Normal Vector: Normal vector to the plane of the circle/circumference. Conditions: A vector cannot have zero magnitude.
Radius (Double) – Radius: Radius of the circle/circumference. Conditions: Value must be greater than 0.
Angle (Double) – Ang: Angle. Conditions: Value must be greater or equal than 0.00 and lower than 6.28.
- Return type:
Return a GeomFace
Example:
# -*- 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
)
- createCirclePnts(Center, StartVertex, EndVertex, Angle)
Circle (C,P,P): Circle defined by its center and two points
Alias: circlePntsConstraints: Referenced- Parameters:
Center (Entity) – 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.
StartVertex (Entity) – 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.
EndVertex (Entity) – 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.
Angle (Double) – Ang: Angle. Conditions: Value must be greater or equal than 0.00 and lower than 6.28.
- Return type:
Return a GeomFace
- createCirclePnts(Center, StartVertex, EndVertex, Angle)
Circle (C,P,P): Circle defined by its center and two points
Alias: circlePntsConstraints: Not referenced- Parameters:
Center (Point) – Center: Center of the circle/circumference. Conditions: Points can not match. Points can not be collinear.
StartVertex (Point) – Point 1: First point of the circle/circumference . Conditions: Points can not match.
EndVertex (Point) – Point 2: Second point to define the plane of the circle/circumference. Conditions: Points can not match.
Angle (Double) – Ang: Angle. Conditions: Value must be greater or equal than 0.00 and lower than 6.28.
- Return type:
Return a GeomFace
- createCirclePnts(GeomName, Center, StartVertex, EndVertex, Angle)
Circle (C,P,P): Circle defined by its center and two points
Alias: circlePntsConstraints: Referenced- Parameters:
GeomName (str) – Name. Conditions: “” input must be non-empty.
Center (Entity) – 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.
StartVertex (Entity) – 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.
EndVertex (Entity) – 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.
Angle (Double) – Ang: Angle. Conditions: Value must be greater or equal than 0.00 and lower than 6.28.
- Return type:
Return a GeomFace
- createCirclePnts(GeomName, Center, StartVertex, EndVertex, Angle)
Circle (C,P,P): Circle defined by its center and two points
Alias: circlePntsConstraints: Not referenced- Parameters:
GeomName (str) – Name. Conditions: “” input must be non-empty.
Center (Point) – Center: Center of the circle/circumference. Conditions: Points can not match. Points can not be collinear.
StartVertex (Point) – Point 1: First point of the circle/circumference . Conditions: Points can not match.
EndVertex (Point) – Point 2: Second point to define the plane of the circle/circumference. Conditions: Points can not match.
Angle (Double) – Ang: Angle. Conditions: Value must be greater or equal than 0.00 and lower than 6.28.
- Return type:
Return a GeomFace
Example:
# -*- 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
)
- createConeSurf(Center, Axis, BaseRadius, TopRadius, Height, Angle)
Cone: Create a hollow cone
Alias: coneSurfConstraints: 3 dimensions, Referenced- Parameters:
Center (POCCVertexByCoord) – Center: Central point of the cone base. Conditions: “” does not exist in the dropdown list. The input must be non-empty.
Axis (POCCGeomLine) – Axis: Cone axis. Conditions: “” does not exist in the dropdown list. The input must be non-empty.
BaseRadius (Double) – Radius: Radius of the lower base. Conditions: Value must be greater than 0.
TopRadius (Double) – Upper radius: Radius of the upper base. Conditions: Value must be greater or equal than 0.
Height (Double) – Height: Height of the cone. Conditions: Value must be greater than 0.
Angle (Double) – Angle: Angle to truncate the cone. Conditions: Value must be greater or equal than 0.00 and lower than 6.28.
- Return type:
Return a GeomShell
- createConeSurf(Center, Axis, BaseRadius, TopRadius, Height, Angle)
Cone: Create a hollow cone
Alias: coneSurfConstraints: 3 dimensions, Not referenced- Parameters:
Center (Point) – Center: Central point of the cone base.
Axis (Vector) – Axis: Cone axis. Conditions: A vector cannot have zero magnitude.
BaseRadius (Double) – Radius: Radius of the lower base. Conditions: Value must be greater than 0.
TopRadius (Double) – Upper radius: Radius of the upper base. Conditions: Value must be greater or equal than 0.
Height (Double) – Height: Height of the cone. Conditions: Value must be greater than 0.
Angle (Double) – Angle: Angle to truncate the cone. Conditions: Value must be greater or equal than 0.00 and lower than 6.28.
- Return type:
Return a GeomShell
- createConeSurf(GeomName, Center, Axis, BaseRadius, TopRadius, Height, Angle)
Cone: Create a hollow cone
Alias: coneSurfConstraints: 3 dimensions, Referenced- Parameters:
GeomName (str) – Name. Conditions: “” input must be non-empty.
Center (POCCVertexByCoord) – Center: Central point of the cone base. Conditions: “” does not exist in the dropdown list. The input must be non-empty.
Axis (POCCGeomLine) – Axis: Cone axis. Conditions: “” does not exist in the dropdown list. The input must be non-empty.
BaseRadius (Double) – Radius: Radius of the lower base. Conditions: Value must be greater than 0.
TopRadius (Double) – Upper radius: Radius of the upper base. Conditions: Value must be greater or equal than 0.
Height (Double) – Height: Height of the cone. Conditions: Value must be greater than 0.
Angle (Double) – Angle: Angle to truncate the cone. Conditions: Value must be greater or equal than 0.00 and lower than 6.28.
- Return type:
Return a GeomShell
- createConeSurf(GeomName, Center, Axis, BaseRadius, TopRadius, Height, Angle)
Cone: Create a hollow cone
Alias: coneSurfConstraints: 3 dimensions, Not referenced- Parameters:
GeomName (str) – Name. Conditions: “” input must be non-empty.
Center (Point) – Center: Central point of the cone base.
Axis (Vector) – Axis: Cone axis. Conditions: A vector cannot have zero magnitude.
BaseRadius (Double) – Radius: Radius of the lower base. Conditions: Value must be greater than 0.
TopRadius (Double) – Upper radius: Radius of the upper base. Conditions: Value must be greater or equal than 0.
Height (Double) – Height: Height of the cone. Conditions: Value must be greater than 0.
Angle (Double) – Angle: Angle to truncate the cone. Conditions: Value must be greater or equal than 0.00 and lower than 6.28.
- Return type:
Return a GeomShell
Example:
# -*- 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
)
- createCylinderSurf(Center, Axis, Radius, Height, Angle)
Cylinder (C,R,H): Create a hollow cylinder defined by the center of its base, its radius and its height
Alias: cylinderSurfConstraints: 3 dimensions, Referenced- Parameters:
Center (POCCVertexByCoord) – Center: Central point of the base. Conditions: “” does not exist in the dropdown list. The input must be non-empty.
Axis (POCCGeomLine) – Axis: Axis of the cylinder. Conditions: “” does not exist in the dropdown list. The input must be non-empty.
Radius (Double) – Radius: Radius of the cylinder. Conditions: Value must be greater than 0.
Height (Double) – Height: Height of the cylinder. Conditions: Value must be greater than 0.
Angle (Double) – Angle: Angle to truncate the cylinder. Conditions: Value must be greater or equal than 0.00 and lower than 6.28.
- Return type:
Return a GeomShell
- createCylinderSurf(Center, Axis, Radius, Height, Angle)
Cylinder (C,R,H): Create a hollow cylinder defined by the center of its base, its radius and its height
Alias: cylinderSurfConstraints: 3 dimensions, Not referenced- Parameters:
Center (Point) – Center: Central point of the base.
Axis (Vector) – Axis: Axis of the cylinder. Conditions: A vector cannot have zero magnitude.
Radius (Double) – Radius: Radius of the cylinder. Conditions: Value must be greater than 0.
Height (Double) – Height: Height of the cylinder. Conditions: Value must be greater than 0.
Angle (Double) – Angle: Angle to truncate the cylinder. Conditions: Value must be greater or equal than 0.00 and lower than 6.28.
- Return type:
Return a GeomShell
- createCylinderSurf(GeomName, Center, Axis, Radius, Height, Angle)
Cylinder (C,R,H): Create a hollow cylinder defined by the center of its base, its radius and its height
Alias: cylinderSurfConstraints: 3 dimensions, Referenced- Parameters:
GeomName (str) – Name. Conditions: “” input must be non-empty.
Center (POCCVertexByCoord) – Center: Central point of the base. Conditions: “” does not exist in the dropdown list. The input must be non-empty.
Axis (POCCGeomLine) – Axis: Axis of the cylinder. Conditions: “” does not exist in the dropdown list. The input must be non-empty.
Radius (Double) – Radius: Radius of the cylinder. Conditions: Value must be greater than 0.
Height (Double) – Height: Height of the cylinder. Conditions: Value must be greater than 0.
Angle (Double) – Angle: Angle to truncate the cylinder. Conditions: Value must be greater or equal than 0.00 and lower than 6.28.
- Return type:
Return a GeomShell
- createCylinderSurf(GeomName, Center, Axis, Radius, Height, Angle)
Cylinder (C,R,H): Create a hollow cylinder defined by the center of its base, its radius and its height
Alias: cylinderSurfConstraints: 3 dimensions, Not referenced- Parameters:
GeomName (str) – Name. Conditions: “” input must be non-empty.
Center (Point) – Center: Central point of the base.
Axis (Vector) – Axis: Axis of the cylinder. Conditions: A vector cannot have zero magnitude.
Radius (Double) – Radius: Radius of the cylinder. Conditions: Value must be greater than 0.
Height (Double) – Height: Height of the cylinder. Conditions: Value must be greater than 0.
Angle (Double) – Angle: Angle to truncate the cylinder. Conditions: Value must be greater or equal than 0.00 and lower than 6.28.
- Return type:
Return a GeomShell
Example:
# -*- 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
)
- createEllipseSurf(StartVertex, EndVertex, Center, Angle)
Ellipse (C,P,P): Ellipse defined by its center and two points
Alias: ellipseSurfConstraints: 3 dimensions, Referenced- Parameters:
StartVertex (Entity) – 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.
EndVertex (Entity) – 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.
Center (Entity) – 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.
Angle (Double) – Ang: Angle. Conditions: Value must be greater or equal than 0.00 and lower than 6.28.
- Return type:
Return a GeomFace
- createEllipseSurf(StartVertex, EndVertex, Center, Angle)
Ellipse (C,P,P): Ellipse defined by its center and two points
Alias: ellipseSurfConstraints: 3 dimensions, Not referenced- Parameters:
StartVertex (Point) – Point 1: Starting point of the ellipse to define de major axis . Conditions: Points can not match.
EndVertex (Point) – Point 2: Point to define the minor axis and the plane of the ellipse . Conditions: Points can not match.
Center (Point) – Center: Central point of the ellipse. Conditions: Points can not match. Points can not be collinear.
Angle (Double) – Ang: Angle. Conditions: Value must be greater or equal than 0.00 and lower than 6.28.
- Return type:
Return a GeomFace
- createEllipseSurf(GeomName, StartVertex, EndVertex, Center, Angle)
Ellipse (C,P,P): Ellipse defined by its center and two points
Alias: ellipseSurfConstraints: 3 dimensions, Referenced- Parameters:
GeomName (str) – Name. Conditions: “” input must be non-empty.
StartVertex (Entity) – 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.
EndVertex (Entity) – 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.
Center (Entity) – 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.
Angle (Double) – Ang: Angle. Conditions: Value must be greater or equal than 0.00 and lower than 6.28.
- Return type:
Return a GeomFace
- createEllipseSurf(GeomName, StartVertex, EndVertex, Center, Angle)
Ellipse (C,P,P): Ellipse defined by its center and two points
Alias: ellipseSurfConstraints: 3 dimensions, Not referenced- Parameters:
GeomName (str) – Name. Conditions: “” input must be non-empty.
StartVertex (Point) – Point 1: Starting point of the ellipse to define de major axis . Conditions: Points can not match.
EndVertex (Point) – Point 2: Point to define the minor axis and the plane of the ellipse . Conditions: Points can not match.
Center (Point) – Center: Central point of the ellipse. Conditions: Points can not match. Points can not be collinear.
Angle (Double) – Ang: Angle. Conditions: Value must be greater or equal than 0.00 and lower than 6.28.
- Return type:
Return a GeomFace
Example:
# -*- 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
)
- createPolygonSurf(Center, Radius, NumSides, Circumscribing)
Regular polygon: Plane regular polygonal surface
Alias: polygonSurfConstraints: 2 dimensions, Referenced- Parameters:
Center (POCCVertexByCoord) – Center: Polygon center. Conditions: “” does not exist in the dropdown list. The input must be non-empty.
Radius (Double) – Radius: Radius of the circumference. Conditions: Value must be greater than 0.
NumSides (int) – Sides: Number of sides of the polygon. Conditions: The number of sides of the polygon must be greater or equal to 3.
Circumscribing (bool) – Circumscribed.
- Return type:
Return a GeomFace
- createPolygonSurf(Center, Radius, NumSides, Circumscribing)
Regular polygon: Plane regular polygonal surface
Alias: polygonSurfConstraints: 2 dimensions, Not referenced- Parameters:
Center (Point) – Center: Polygon center.
Radius (Double) – Radius: Radius of the circumference. Conditions: Value must be greater than 0.
NumSides (int) – Sides: Number of sides of the polygon. Conditions: The number of sides of the polygon must be greater or equal to 3.
Circumscribing (bool) – Circumscribed.
- Return type:
Return a GeomFace
- createPolygonSurf(GeomName, Center, Radius, NumSides, Circumscribing)
Regular polygon: Plane regular polygonal surface
Alias: polygonSurfConstraints: 2 dimensions, Referenced- Parameters:
GeomName (str) – Name. Conditions: “” input must be non-empty.
Center (POCCVertexByCoord) – Center: Polygon center. Conditions: “” does not exist in the dropdown list. The input must be non-empty.
Radius (Double) – Radius: Radius of the circumference. Conditions: Value must be greater than 0.
NumSides (int) – Sides: Number of sides of the polygon. Conditions: The number of sides of the polygon must be greater or equal to 3.
Circumscribing (bool) – Circumscribed.
- Return type:
Return a GeomFace
- createPolygonSurf(Center, Vector, Radius, NumSides, Circumscribing)
Regular polygon: Plane regular polygonal surface
Alias: polygonSurfConstraints: 3 dimensions, Referenced- Parameters:
Center (POCCVertexByCoord) – Center: Polygon center. Conditions: “” does not exist in the dropdown list. The input must be non-empty.
Vector (POCCGeomLine) – Normal vector: Normal vector to the polygonal face. Conditions: “” does not exist in the dropdown list. The input must be non-empty.
Radius (Double) – Radius: Radius of the circumference. Conditions: Value must be greater than 0.
NumSides (int) – Sides: Number of sides of the polygon. Conditions: The number of sides of the polygon must be greater or equal to 3.
Circumscribing (bool) – Circumscribed.
- Return type:
Return a GeomFace
- createPolygonSurf(GeomName, Center, Radius, NumSides, Circumscribing)
Regular polygon: Plane regular polygonal surface
Alias: polygonSurfConstraints: 2 dimensions, Not referenced- Parameters:
GeomName (str) – Name. Conditions: “” input must be non-empty.
Center (Point) – Center: Polygon center.
Radius (Double) – Radius: Radius of the circumference. Conditions: Value must be greater than 0.
NumSides (int) – Sides: Number of sides of the polygon. Conditions: The number of sides of the polygon must be greater or equal to 3.
Circumscribing (bool) – Circumscribed.
- Return type:
Return a GeomFace
- createPolygonSurf(Center, Vector, Radius, NumSides, Circumscribing)
Regular polygon: Plane regular polygonal surface
Alias: polygonSurfConstraints: 3 dimensions, Not referenced- Parameters:
Center (Point) – Center: Polygon center.
Vector (Vector) – Normal vector: Normal vector to the polygonal face. Conditions: A vector cannot have zero magnitude.
Radius (Double) – Radius: Radius of the circumference. Conditions: Value must be greater than 0.
NumSides (int) – Sides: Number of sides of the polygon. Conditions: The number of sides of the polygon must be greater or equal to 3.
Circumscribing (bool) – Circumscribed.
- Return type:
Return a GeomFace
- createPolygonSurf(GeomName, Center, Vector, Radius, NumSides, Circumscribing)
Regular polygon: Plane regular polygonal surface
Alias: polygonSurfConstraints: 3 dimensions, Referenced- Parameters:
GeomName (str) – Name. Conditions: “” input must be non-empty.
Center (POCCVertexByCoord) – Center: Polygon center. Conditions: “” does not exist in the dropdown list. The input must be non-empty.
Vector (POCCGeomLine) – Normal vector: Normal vector to the polygonal face. Conditions: “” does not exist in the dropdown list. The input must be non-empty.
Radius (Double) – Radius: Radius of the circumference. Conditions: Value must be greater than 0.
NumSides (int) – Sides: Number of sides of the polygon. Conditions: The number of sides of the polygon must be greater or equal to 3.
Circumscribing (bool) – Circumscribed.
- Return type:
Return a GeomFace
- createPolygonSurf(GeomName, Center, Vector, Radius, NumSides, Circumscribing)
Regular polygon: Plane regular polygonal surface
Alias: polygonSurfConstraints: 3 dimensions, Not referenced- Parameters:
GeomName (str) – Name. Conditions: “” input must be non-empty.
Center (Point) – Center: Polygon center.
Vector (Vector) – Normal vector: Normal vector to the polygonal face. Conditions: A vector cannot have zero magnitude.
Radius (Double) – Radius: Radius of the circumference. Conditions: Value must be greater than 0.
NumSides (int) – Sides: Number of sides of the polygon. Conditions: The number of sides of the polygon must be greater or equal to 3.
Circumscribing (bool) – Circumscribed.
- Return type:
Return a GeomFace
Example:
# -*- 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).
- createQuad(FirstPoint, SecondPoint, ThirdPoint, FourthPoint)
Quad (P,P,P,P): Create a quadrilateral defined by its four vertices
Alias: quadConstraints: Referenced- Parameters:
FirstPoint (Entity) – 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.
SecondPoint (Entity) – Point2: Second point. Conditions: “” does not exist in the dropdown list. The input must be non-empty. Points can not match.
ThirdPoint (Entity) – Point3: Third point. Conditions: “” does not exist in the dropdown list. The input must be non-empty. Points can not match.
FourthPoint (Entity) – Point4: Fourth point. Conditions: “” does not exist in the dropdown list. The input must be non-empty. Points can not match.
- Return type:
Return a GeomFace
- createQuad(FirstPoint, SecondPoint, ThirdPoint, FourthPoint)
Quad (P,P,P,P): Create a quadrilateral defined by its four vertices
Alias: quadConstraints: Not referenced- Parameters:
FirstPoint (Point) – Point1: Point contained in the plane. Conditions: Points can not match. Points can not be coplanar.
SecondPoint (Point) – Point2: Second point. Conditions: Points can not match.
ThirdPoint (Point) – Point3: Third point. Conditions: Points can not match.
FourthPoint (Point) – Point4: Fourth point. Conditions: Points can not match.
- Return type:
Return a GeomFace
- createQuad(GeomName, FirstPoint, SecondPoint, ThirdPoint, FourthPoint)
Quad (P,P,P,P): Create a quadrilateral defined by its four vertices
Alias: quadConstraints: Referenced- Parameters:
GeomName (str) – Name. Conditions: “” input must be non-empty.
FirstPoint (Entity) – 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.
SecondPoint (Entity) – Point2: Second point. Conditions: “” does not exist in the dropdown list. The input must be non-empty. Points can not match.
ThirdPoint (Entity) – Point3: Third point. Conditions: “” does not exist in the dropdown list. The input must be non-empty. Points can not match.
FourthPoint (Entity) – Point4: Fourth point. Conditions: “” does not exist in the dropdown list. The input must be non-empty. Points can not match.
- Return type:
Return a GeomFace
- createQuad(GeomName, FirstPoint, SecondPoint, ThirdPoint, FourthPoint)
Quad (P,P,P,P): Create a quadrilateral defined by its four vertices
Alias: quadConstraints: Not referenced- Parameters:
GeomName (str) – Name. Conditions: “” input must be non-empty.
FirstPoint (Point) – Point1: Point contained in the plane. Conditions: Points can not match. Points can not be coplanar.
SecondPoint (Point) – Point2: Second point. Conditions: Points can not match.
ThirdPoint (Point) – Point3: Third point. Conditions: Points can not match.
FourthPoint (Point) – Point4: Fourth point. Conditions: Points can not match.
- Return type:
Return a GeomFace
Example:
# -*- 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.
- createQuadPn(FirstPoint, Size)
Quad (P,n): Create a quadrilateral defined by a point, its normal vector and its size
Alias: quadPnConstraints: 2 dimensions, Referenced- Parameters:
FirstPoint (POCCVertexByCoord) – Point1: Point contained in the plane. Conditions: “” does not exist in the dropdown list. The input must be non-empty.
Size (Double) – Size: Size of the plane. Conditions: Value must be greater than 0.
- Return type:
Return a GeomFace
- createQuadPn(FirstPoint, Size)
Quad (P,n): Create a quadrilateral defined by a point, its normal vector and its size
Alias: quadPnConstraints: 2 dimensions, Not referenced- Parameters:
FirstPoint (Point) – Point1: Point contained in the plane.
Size (Double) – Size: Size of the plane. Conditions: Value must be greater than 0.
- Return type:
Return a GeomFace
- createQuadPn(GeomName, FirstPoint, Size)
Quad (P,n): Create a quadrilateral defined by a point, its normal vector and its size
Alias: quadPnConstraints: 2 dimensions, Referenced- Parameters:
GeomName (str) – Name. Conditions: “” input must be non-empty.
FirstPoint (POCCVertexByCoord) – Point1: Point contained in the plane. Conditions: “” does not exist in the dropdown list. The input must be non-empty.
Size (Double) – Size: Size of the plane. Conditions: Value must be greater than 0.
- Return type:
Return a GeomFace
- createQuadPn(FirstPoint, NormalVect, Size)
Quad (P,n): Create a quadrilateral defined by a point, its normal vector and its size
Alias: quadPnConstraints: 3 dimensions, Referenced- Parameters:
FirstPoint (POCCVertexByCoord) – Point1: Point contained in the plane. Conditions: “” does not exist in the dropdown list. The input must be non-empty.
NormalVect (POCCGeomLine) – Normal vector: Normal vector plane. Conditions: “” does not exist in the dropdown list. The input must be non-empty.
Size (Double) – Size: Size of the plane. Conditions: Value must be greater than 0.
- Return type:
Return a GeomFace
- createQuadPn(GeomName, FirstPoint, Size)
Quad (P,n): Create a quadrilateral defined by a point, its normal vector and its size
Alias: quadPnConstraints: 2 dimensions, Not referenced- Parameters:
GeomName (str) – Name. Conditions: “” input must be non-empty.
FirstPoint (Point) – Point1: Point contained in the plane.
Size (Double) – Size: Size of the plane. Conditions: Value must be greater than 0.
- Return type:
Return a GeomFace
- createQuadPn(FirstPoint, NormalVect, Size)
Quad (P,n): Create a quadrilateral defined by a point, its normal vector and its size
Alias: quadPnConstraints: 3 dimensions, Not referenced- Parameters:
FirstPoint (Point) – Point1: Point contained in the plane.
NormalVect (Vector) – Normal vector: Normal vector plane. Conditions: A vector cannot have zero magnitude.
Size (Double) – Size: Size of the plane. Conditions: Value must be greater than 0.
- Return type:
Return a GeomFace
- createQuadPn(GeomName, FirstPoint, NormalVect, Size)
Quad (P,n): Create a quadrilateral defined by a point, its normal vector and its size
Alias: quadPnConstraints: 3 dimensions, Referenced- Parameters:
GeomName (str) – Name. Conditions: “” input must be non-empty.
FirstPoint (POCCVertexByCoord) – Point1: Point contained in the plane. Conditions: “” does not exist in the dropdown list. The input must be non-empty.
NormalVect (POCCGeomLine) – Normal vector: Normal vector plane. Conditions: “” does not exist in the dropdown list. The input must be non-empty.
Size (Double) – Size: Size of the plane. Conditions: Value must be greater than 0.
- Return type:
Return a GeomFace
- createQuadPn(GeomName, FirstPoint, NormalVect, Size)
Quad (P,n): Create a quadrilateral defined by a point, its normal vector and its size
Alias: quadPnConstraints: 3 dimensions, Not referenced- Parameters:
GeomName (str) – Name. Conditions: “” input must be non-empty.
FirstPoint (Point) – Point1: Point contained in the plane.
NormalVect (Vector) – Normal vector: Normal vector plane. Conditions: A vector cannot have zero magnitude.
Size (Double) – Size: Size of the plane. Conditions: Value must be greater than 0.
- Return type:
Return a GeomFace
Example:
# -*- 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.
- createQuadPPP(FirstPoint, SecondPoint, ThirdPoint, Size)
Quad (P,P,P): Create a quadrilateral defined by three points and its size
Alias: quadPPPConstraints: Referenced- Parameters:
FirstPoint (Entity) – Point1: Point contained in the plane. Conditions: “” does not exist in the dropdown list. The input must be non-empty. Points can not match.
SecondPoint (Entity) – Point2: Second point. Conditions: “” does not exist in the dropdown list. The input must be non-empty. Points can not match.
ThirdPoint (Entity) – 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.
Size (Double) – Size: Size of the plane. Conditions: Value must be greater than 0.
- Return type:
Return a GeomFace
- createQuadPPP(FirstPoint, SecondPoint, ThirdPoint, Size)
Quad (P,P,P): Create a quadrilateral defined by three points and its size
Alias: quadPPPConstraints: Not referenced- Parameters:
FirstPoint (Point) – Point1: Point contained in the plane. Conditions: Points can not match.
SecondPoint (Point) – Point2: Second point. Conditions: Points can not match.
ThirdPoint (Point) – Point3: Third point. Conditions: Points can not match. Points can not be collinear.
Size (Double) – Size: Size of the plane. Conditions: Value must be greater than 0.
- Return type:
Return a GeomFace
- createQuadPPP(GeomName, FirstPoint, SecondPoint, ThirdPoint, Size)
Quad (P,P,P): Create a quadrilateral defined by three points and its size
Alias: quadPPPConstraints: Referenced- Parameters:
GeomName (str) – Name. Conditions: “” input must be non-empty.
FirstPoint (Entity) – Point1: Point contained in the plane. Conditions: “” does not exist in the dropdown list. The input must be non-empty. Points can not match.
SecondPoint (Entity) – Point2: Second point. Conditions: “” does not exist in the dropdown list. The input must be non-empty. Points can not match.
ThirdPoint (Entity) – 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.
Size (Double) – Size: Size of the plane. Conditions: Value must be greater than 0.
- Return type:
Return a GeomFace
- createQuadPPP(GeomName, FirstPoint, SecondPoint, ThirdPoint, Size)
Quad (P,P,P): Create a quadrilateral defined by three points and its size
Alias: quadPPPConstraints: Not referenced- Parameters:
GeomName (str) – Name. Conditions: “” input must be non-empty.
FirstPoint (Point) – Point1: Point contained in the plane. Conditions: Points can not match.
SecondPoint (Point) – Point2: Second point. Conditions: Points can not match.
ThirdPoint (Point) – Point3: Third point. Conditions: Points can not match. Points can not be collinear.
Size (Double) – Size: Size of the plane. Conditions: Value must be greater than 0.
- Return type:
Return a GeomFace
Example:
# -*- 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.
- createSphereSurf(Center, Radius, Angle, Angle1)
Sphere: Create a hollow sphere
Alias: sphereSurfConstraints: 3 dimensions, Referenced- Parameters:
Center (POCCVertexByCoord) – Central point: Central point of the sphere. Conditions: “” does not exist in the dropdown list. The input must be non-empty.
Radius (Double) – Radius: Radius of the sphere. Conditions: Value must be greater than 0.
Angle (Double) – Ang: Angle in the U parametric direction. Conditions: Value must be greater or equal than 0.00 and lower than 6.28.
Angle1 (Double) – Ang1: Angle in the V parametric direction. Conditions: Value must be greater or equal than 0.00 and lower than 3.14.
- Return type:
Return a GeomVolume
- createSphereSurf(Center, Radius, Angle, Angle1)
Sphere: Create a hollow sphere
Alias: sphereSurfConstraints: 3 dimensions, Not referenced- Parameters:
Center (Point) – Central point: Central point of the sphere.
Radius (Double) – Radius: Radius of the sphere. Conditions: Value must be greater than 0.
Angle (Double) – Ang: Angle in the U parametric direction. Conditions: Value must be greater or equal than 0.00 and lower than 6.28.
Angle1 (Double) – Ang1: Angle in the V parametric direction. Conditions: Value must be greater or equal than 0.00 and lower than 3.14.
- Return type:
Return a GeomVolume
- createSphereSurf(GeomName, Center, Radius, Angle, Angle1)
Sphere: Create a hollow sphere
Alias: sphereSurfConstraints: 3 dimensions, Referenced- Parameters:
GeomName (str) – Name. Conditions: “” input must be non-empty.
Center (POCCVertexByCoord) – Central point: Central point of the sphere. Conditions: “” does not exist in the dropdown list. The input must be non-empty.
Radius (Double) – Radius: Radius of the sphere. Conditions: Value must be greater than 0.
Angle (Double) – Ang: Angle in the U parametric direction. Conditions: Value must be greater or equal than 0.00 and lower than 6.28.
Angle1 (Double) – Ang1: Angle in the V parametric direction. Conditions: Value must be greater or equal than 0.00 and lower than 3.14.
- Return type:
Return a GeomVolume
- createSphereSurf(GeomName, Center, Radius, Angle, Angle1)
Sphere: Create a hollow sphere
Alias: sphereSurfConstraints: 3 dimensions, Not referenced- Parameters:
GeomName (str) – Name. Conditions: “” input must be non-empty.
Center (Point) – Central point: Central point of the sphere.
Radius (Double) – Radius: Radius of the sphere. Conditions: Value must be greater than 0.
Angle (Double) – Ang: Angle in the U parametric direction. Conditions: Value must be greater or equal than 0.00 and lower than 6.28.
Angle1 (Double) – Ang1: Angle in the V parametric direction. Conditions: Value must be greater or equal than 0.00 and lower than 3.14.
- Return type:
Return a GeomVolume
Example:
# -*- 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.
- createTorusSurf(Center, Axis, MinRadius, MajRadius, Angle)
Torus: Create a hollow torus
Alias: torusSurfConstraints: 3 dimensions, Referenced- Parameters:
Center (POCCVertexByCoord) – Center: Central point of the torus. Conditions: “” does not exist in the dropdown list. The input must be non-empty.
Axis (POCCGeomLine) – Axis: Axis of the torus. Conditions: “” does not exist in the dropdown list. The input must be non-empty.
MinRadius (Double) – Minor radius: Minor radius of the torus. Conditions: Value must be greater than 0.
MajRadius (Double) – Major radius: Major radius of the torus. Conditions: Value must be greater than 0. Major and minor radius can’t be inverted.
Angle (Double) – Angle: Angle to build a portion of a torus. Conditions: Value must be greater or equal than 0.00 and lower than 6.28.
- Return type:
Return a GeomFace
- createTorusSurf(Center, Axis, MinRadius, MajRadius, Angle)
Torus: Create a hollow torus
Alias: torusSurfConstraints: 3 dimensions, Not referenced- Parameters:
Center (Point) – Center: Central point of the torus.
Axis (Vector) – Axis: Axis of the torus. Conditions: A vector cannot have zero magnitude.
MinRadius (Double) – Minor radius: Minor radius of the torus. Conditions: Value must be greater than 0.
MajRadius (Double) – Major radius: Major radius of the torus. Conditions: Value must be greater than 0. Major and minor radius can’t be inverted.
Angle (Double) – Angle: Angle to build a portion of a torus. Conditions: Value must be greater or equal than 0.00 and lower than 6.28.
- Return type:
Return a GeomFace
- createTorusSurf(GeomName, Center, Axis, MinRadius, MajRadius, Angle)
Torus: Create a hollow torus
Alias: torusSurfConstraints: 3 dimensions, Referenced- Parameters:
GeomName (str) – Name. Conditions: “” input must be non-empty.
Center (POCCVertexByCoord) – Center: Central point of the torus. Conditions: “” does not exist in the dropdown list. The input must be non-empty.
Axis (POCCGeomLine) – Axis: Axis of the torus. Conditions: “” does not exist in the dropdown list. The input must be non-empty.
MinRadius (Double) – Minor radius: Minor radius of the torus. Conditions: Value must be greater than 0.
MajRadius (Double) – Major radius: Major radius of the torus. Conditions: Value must be greater than 0. Major and minor radius can’t be inverted.
Angle (Double) – Angle: Angle to build a portion of a torus. Conditions: Value must be greater or equal than 0.00 and lower than 6.28.
- Return type:
Return a GeomFace
- createTorusSurf(GeomName, Center, Axis, MinRadius, MajRadius, Angle)
Torus: Create a hollow torus
Alias: torusSurfConstraints: 3 dimensions, Not referenced- Parameters:
GeomName (str) – Name. Conditions: “” input must be non-empty.
Center (Point) – Center: Central point of the torus.
Axis (Vector) – Axis: Axis of the torus. Conditions: A vector cannot have zero magnitude.
MinRadius (Double) – Minor radius: Minor radius of the torus. Conditions: Value must be greater than 0.
MajRadius (Double) – Major radius: Major radius of the torus. Conditions: Value must be greater than 0. Major and minor radius can’t be inverted.
Angle (Double) – Angle: Angle to build a portion of a torus. Conditions: Value must be greater or equal than 0.00 and lower than 6.28.
- Return type:
Return a GeomFace
Example:
# -*- 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.
- createTriangle(FirstPoint, SecondPoint, ThirdPoint)
Triangle: Create a triangle
Alias: triangleConstraints: Referenced- Parameters:
FirstPoint (Entity) – 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.
SecondPoint (Entity) – Point2: Second point. Conditions: The input must be non-empty. “” does not exist in the dropdown list. Points can not match.
ThirdPoint (Entity) – Point3: Third point. Conditions: The input must be non-empty. “” does not exist in the dropdown list. Points can not match.
- Return type:
Return a GeomFace
- createTriangle(FirstPoint, SecondPoint, ThirdPoint)
Triangle: Create a triangle
Alias: triangleConstraints: Not referenced- Parameters:
FirstPoint (Point) – Point1: Point contained in the plane. Conditions: Points can not match. Points can not be collinear.
SecondPoint (Point) – Point2: Second point. Conditions: Points can not match.
ThirdPoint (Point) – Point3: Third point. Conditions: Points can not match.
- Return type:
Return a GeomFace
- createTriangle(GeomName, FirstPoint, SecondPoint, ThirdPoint)
Triangle: Create a triangle
Alias: triangleConstraints: Referenced- Parameters:
GeomName (str) – Name. Conditions: “” input must be non-empty.
FirstPoint (Entity) – 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.
SecondPoint (Entity) – Point2: Second point. Conditions: The input must be non-empty. “” does not exist in the dropdown list. Points can not match.
ThirdPoint (Entity) – Point3: Third point. Conditions: The input must be non-empty. “” does not exist in the dropdown list. Points can not match.
- Return type:
Return a GeomFace
- createTriangle(GeomName, FirstPoint, SecondPoint, ThirdPoint)
Triangle: Create a triangle
Alias: triangleConstraints: Not referenced- Parameters:
GeomName (str) – Name. Conditions: “” input must be non-empty.
FirstPoint (Point) – Point1: Point contained in the plane. Conditions: Points can not match. Points can not be collinear.
SecondPoint (Point) – Point2: Second point. Conditions: Points can not match.
ThirdPoint (Point) – Point3: Third point. Conditions: Points can not match.
- Return type:
Return a GeomFace
Example:
# -*- 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.
- geomFillFace(BOUND)
By curves: Plane polygonal surface defined by a closed group of curves
Alias: fillFace- Parameters:
BOUND (List) – Boundary: List of geometric entities, boundary of another entity. Conditions: “” does not exist in the dropdown list.
- Return type:
Return a GeomFace
- geomFillFace(GeomName, BOUND)
By curves: Plane polygonal surface defined by a closed group of curves
Alias: fillFace- Parameters:
GeomName (str) – Name. Conditions: “” input must be non-empty.
BOUND (List) – Boundary: List of geometric entities, boundary of another entity. Conditions: “” does not exist in the dropdown list.
- Return type:
Return a GeomFace
Example:
# -*- 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.
- geomFillFaceByWire(BOUND)
By closed polyline: Plane polygonal surface defined by a closed polyline
Alias: fillFaceW- Parameters:
BOUND (List) – Boundary: List of geometric entities, boundary of another entity. Conditions: “” does not exist in the dropdown list.
- Return type:
Return a GeomFace
- geomFillFaceByWire(GeomName, BOUND)
By closed polyline: Plane polygonal surface defined by a closed polyline
Alias: fillFaceW- Parameters:
GeomName (str) – Name. Conditions: “” input must be non-empty.
BOUND (List) – Boundary: List of geometric entities, boundary of another entity. Conditions: “” does not exist in the dropdown list.
- Return type:
Return a GeomFace
Example:
# -*- 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.
- glueFaces(Surfaces)
Sew surfaces: Create a group of surface using a list of surfaces
Alias: shellByFaces- Parameters:
Surfaces (List) – Surfaces: List of surfaces. Conditions: “” does not exist in the dropdown list.
- Return type:
Return a GeomShell
- glueFaces(GeomName, Surfaces)
Sew surfaces: Create a group of surface using a list of surfaces
Alias: shellByFaces- Parameters:
GeomName (str) – Name. Conditions: “” input must be non-empty.
Surfaces (List) – Surfaces: List of surfaces. Conditions: “” does not exist in the dropdown list.
- Return type:
Return a GeomShell
Example:
# -*- 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.
- ruledSurface(Curve1, Curve2)
Ruled: Ruled surface defined by two curves
Alias: ruledSurfConstraints: 3 dimensions- Parameters:
Curve1 (Entity) – Curve 1: Curve 1 to construct ruled surface. Conditions: The input must be non-empty. “” does not exist in the dropdown list.
Curve2 (Entity) – Curve 2: Curve 2 to construct ruled surface. Conditions: The input must be non-empty. “” does not exist in the dropdown list.
- Return type:
Return a GeomFace
- ruledSurface(GeomName, Curve1, Curve2)
Ruled: Ruled surface defined by two curves
Alias: ruledSurfConstraints: 3 dimensions- Parameters:
GeomName (str) – Name. Conditions: “” input must be non-empty.
Curve1 (Entity) – Curve 1: Curve 1 to construct ruled surface. Conditions: The input must be non-empty. “” does not exist in the dropdown list.
Curve2 (Entity) – Curve 2: Curve 2 to construct ruled surface. Conditions: The input must be non-empty. “” does not exist in the dropdown list.
- Return type:
Return a GeomFace
Example:
# -*- 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.