Volumes

createBox(FirstPoint, SecondPoint)

Box (P,P): Create a box defined by two opposite vertices

Alias: box
Constraints: 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. Points can not match.

  • 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 GeomVolume

createBox(FirstPoint, SecondPoint)

Box (P,P): Create a box defined by two opposite vertices

Alias: box
Constraints: 3 dimensions, Not referenced
Parameters:
  • FirstPoint (Point) – Point1: First corner of the box. Conditions: Points can not match.

  • SecondPoint (Point) – Point2: Second corner of the box .

Return type:

Return a GeomVolume

createBox(GeomName, FirstPoint, SecondPoint)

Box (P,P): Create a box defined by two opposite vertices

Alias: box
Constraints: 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. Points can not match.

  • 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 GeomVolume

createBox(GeomName, FirstPoint, SecondPoint)

Box (P,P): Create a box defined by two opposite vertices

Alias: box
Constraints: 3 dimensions, Not referenced
Parameters:
  • GeomName (str) – Name. Conditions: “” input must be non-empty.

  • FirstPoint (Point) – Point1: First corner of the box. Conditions: Points can not match.

  • SecondPoint (Point) – Point2: Second corner of the box .

Return type:

Return a GeomVolume

createBox(FirstPoint, DX, DY, DZ)

Box (P,Dim): Create a box defined by a vertex and its dimensions

Alias: box
Constraints: 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 GeomVolume

createBox(FirstPoint, DX, DY, DZ)

Box (P,Dim): Create a box defined by a vertex and its dimensions

Alias: box
Constraints: 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 GeomVolume

createBox(GeomName, FirstPoint, DX, DY, DZ)

Box (P,Dim): Create a box defined by a vertex and its dimensions

Alias: box
Constraints: 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 GeomVolume

createBox(GeomName, FirstPoint, DX, DY, DZ)

Box (P,Dim): Create a box defined by a vertex and its dimensions

Alias: box
Constraints: 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 GeomVolume

Example:

# -*- coding: utf-8 -*-
# Example: Creating a box (volume) 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 = createBox(
    "Volume",      # 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 = createBox(
    "Volume (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
)

createCone(Center, Axis, BaseRadius, TopRadius, Height, Angle)

Cone: Create a cone

Alias: cone
Constraints: 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 GeomVolume

createCone(Center, Axis, BaseRadius, TopRadius, Height, Angle)

Cone: Create a cone

Alias: cone
Constraints: 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 GeomVolume

createCone(GeomName, Center, Axis, BaseRadius, TopRadius, Height, Angle)

Cone: Create a cone

Alias: cone
Constraints: 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 GeomVolume

createCone(GeomName, Center, Axis, BaseRadius, TopRadius, Height, Angle)

Cone: Create a cone

Alias: cone
Constraints: 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 GeomVolume

Example:

# -*- coding: utf-8 -*-
# Example: Creating a cone using a Python command

# Geometric parameters of the cone
base_radius = Double(1)   # Base radius of the cone
top_radius = Double(0)    # Top radius (0 means the cone ends in a vertex)
height = Double(1)       # Total height of the cone
angle = Double(360)      # Revolution angle (360° creates a full cone)

# --- Non-referenced mode ---
# In this mode, the cone is defined directly from coordinates and vectors,
# without using any existing geometric entities.

center = Point(0, 0, 0)  # Center of the cone base
axis = Vector(0, 0, 1)   # Axis direction (along the Z axis)

cone_geom_entity = createCone(
    "Not referenced user cone",  # Name of the resulting cone entity
    center,                      # Center point of the base
    axis,                        # Axis direction
    base_radius,                 # Base radius
    top_radius,                  # Top radius
    height,                      # Height
    angle                        # Opening angle
)

# --- Referenced mode ---
# In this mode, the cone is created based on existing geometric entities (points, axes, etc.).
# This approach allows the cone to remain parametrically linked to other elements in the model.

center_geom_entity = createPoint("Point", center)                  # Create a point entity
axis_geom_entity = createAxis("Curve", Point(0, 0, 0), axis)       # Create an axis entity

cone_geom_entity = createCone(
    "Referenced user cone",      # Name of the resulting cone entity
    center_geom_entity,            # Reference to the center point entity
    axis_geom_entity,              # Reference to the axis entity
    base_radius,                  # Base radius
    top_radius,                   # Top radius
    height,                      # Height
    angle                        # Opening angle
)

createCylinder(Pnt1, Pnt2, Pnt3)

Cylinder (C,C,P): Create a hollow cylinder defined by the centers of its bases and a point on its lateral surface

Alias: cylinder
Constraints: 3 dimensions, Referenced
Parameters:
  • Pnt1 (Entity) – Point1: Central point of the lower base. Conditions: “” does not exist in the dropdown list. The input must be non-empty. Points can not match. Points can not be collinear.

  • Pnt2 (Entity) – Point2: Central point of the upper base. Conditions: “” does not exist in the dropdown list. The input must be non-empty. Points can not match.

  • Pnt3 (Entity) – Point3: Point on the surface of the cylinder. Conditions: “” does not exist in the dropdown list. The input must be non-empty. Points can not match.

Return type:

Return a GeomVolume

createCylinder(Pnt1, Pnt2, Pnt3)

Cylinder (C,C,P): Create a hollow cylinder defined by the centers of its bases and a point on its lateral surface

Alias: cylinder
Constraints: 3 dimensions, Not referenced
Parameters:
  • Pnt1 (Point) – Point1: Central point of the lower base. Conditions: Points can not match. Points can not be collinear.

  • Pnt2 (Point) – Point2: Central point of the upper base. Conditions: Points can not match.

  • Pnt3 (Point) – Point3: Point on the surface of the cylinder. Conditions: Points can not match.

Return type:

Return a GeomVolume

createCylinder(GeomName, Pnt1, Pnt2, Pnt3)

Cylinder (C,C,P): Create a hollow cylinder defined by the centers of its bases and a point on its lateral surface

Alias: cylinder
Constraints: 3 dimensions, Referenced
Parameters:
  • GeomName (str) – Name. Conditions: “” input must be non-empty.

  • Pnt1 (Entity) – Point1: Central point of the lower base. Conditions: “” does not exist in the dropdown list. The input must be non-empty. Points can not match. Points can not be collinear.

  • Pnt2 (Entity) – Point2: Central point of the upper base. Conditions: “” does not exist in the dropdown list. The input must be non-empty. Points can not match.

  • Pnt3 (Entity) – Point3: Point on the surface of the cylinder. Conditions: “” does not exist in the dropdown list. The input must be non-empty. Points can not match.

Return type:

Return a GeomVolume

createCylinder(GeomName, Pnt1, Pnt2, Pnt3)

Cylinder (C,C,P): Create a hollow cylinder defined by the centers of its bases and a point on its lateral surface

Alias: cylinder
Constraints: 3 dimensions, Not referenced
Parameters:
  • GeomName (str) – Name. Conditions: “” input must be non-empty.

  • Pnt1 (Point) – Point1: Central point of the lower base. Conditions: Points can not match. Points can not be collinear.

  • Pnt2 (Point) – Point2: Central point of the upper base. Conditions: Points can not match.

  • Pnt3 (Point) – Point3: Point on the surface of the cylinder. Conditions: Points can not match.

Return type:

Return a GeomVolume

createCylinder(Center, Axis, Radius, Height, Angle)

Cylinder: Create a cylinder

Alias: cylinder
Constraints: 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 GeomVolume

createCylinder(Center, Axis, Radius, Height, Angle)

Cylinder: Create a cylinder

Alias: cylinder
Constraints: 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 GeomVolume

createCylinder(GeomName, Center, Axis, Radius, Height, Angle)

Cylinder: Create a cylinder

Alias: cylinder
Constraints: 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 GeomVolume

createCylinder(GeomName, Center, Axis, Radius, Height, Angle)

Cylinder: Create a cylinder

Alias: cylinder
Constraints: 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 GeomVolume

Example:

# -*- coding: utf-8 -*-
# Example: Creating a cylinder using three points

# This command creates a cylindrical surface or volume defined by:
#   - A point at the center of the lower base
#   - A point at the center of the top base
#   - A point located on the cylinder surface (used to determine the radius)
#
# The cylinder is automatically computed so that its axis passes through
# the two base-center points, and its radius is defined by the surface point.

# --- Non-referenced mode ---

center_lower_base = Point(0, 0, 0)          # Center point of the lower base
center_top_base = Point(0, 0, 1)            # Center point of the top base
point_on_surface = Point(0, 1, 0.5)         # Point lying on the cylinder surface

cylinder_geom_entity = createCylinder(
    "Surfaces group",                       # Name of the resulting cylinder entity
    center_lower_base,                      # Base center point
    center_top_base,                        # Top center point
    point_on_surface                        # Point defining the cylinder radius
)

# --- Referenced mode ---

center_lower_base_geom_entity = createPoint("Point", Point(0, 0, 0))           # Referenced lower base center
center_top_base_geom_entity = createPoint("Point (2)", Point(0, 0, 1))         # Referenced top base center
point_on_surface_geom_entity = createPoint("Point (3)", Point(0, 1, 0.5))      # Referenced surface point

cylinder_geom_entity = createCylinder(
    "Surfaces group (2)",                   # Name of the resulting cylinder entity
    center_lower_base_geom_entity,          # Referenced base center
    center_top_base_geom_entity,            # Referenced top center
    point_on_surface_geom_entity            # Referenced surface point
)

createSphere(Center, Radius, Angle, Angle1)

Sphere: Create a sphere

Alias: sphere
Constraints: 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

createSphere(Center, Radius, Angle, Angle1)

Sphere: Create a sphere

Alias: sphere
Constraints: 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

createSphere(GeomName, Center, Radius, Angle, Angle1)

Sphere: Create a sphere

Alias: sphere
Constraints: 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

createSphere(GeomName, Center, Radius, Angle, Angle1)

Sphere: Create a sphere

Alias: sphere
Constraints: 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 sphere with specified center, radius, and angular spans

# This command creates a sphere (or a portion of a sphere) based on a given center,
# radius, and angles along U and V directions. The U and V angles define the
# portion of the sphere to be created. 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 sphere directly from coordinates
sphere_geom_entity = createSphere(
    "Volume",  # Name of the resulting sphere
    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 sphere using a referenced center
sphere_geom_entity = createSphere(
    "Volume (2)",  # Name of the resulting sphere
    center_point_geom_entity,
    radius,
    ang_u_dir,
    ang_v_dir
)

# Result:
#   A sphere or partial sphere is created with the specified center, radius,
#   and angular spans. In referenced mode, the center point is linked to the
#   sphere entity.

createTorus(Center, Axis, MinRadius, MajRadius, Angle)

Torus: Create a torus

Alias: torus
Constraints: 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 GeomVolume

createTorus(Center, Axis, MinRadius, MajRadius, Angle)

Torus: Create a torus

Alias: torus
Constraints: 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 GeomVolume

createTorus(GeomName, Center, Axis, MinRadius, MajRadius, Angle)

Torus: Create a torus

Alias: torus
Constraints: 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 GeomVolume

createTorus(GeomName, Center, Axis, MinRadius, MajRadius, Angle)

Torus: Create a torus

Alias: torus
Constraints: 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 GeomVolume

Example:

# -*- coding: utf-8 -*-
# Example: Creating a torus (donut-shaped volume) with specified center, direction, radii, and angular span

# This command creates a torus, which is a donut-shaped 3D volume.  
# The torus 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 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 directly from coordinates
volume_geom_entity = createTorus(
    "Volume",           # Name of the resulting torus
    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 using referenced entities
volume_geom_entity = createTorus(
    "Volume (2)",            # Name of the resulting torus
    center_point_geom_entity,
    direction_geom_entity,
    minor_radius,
    major_radius,
    angle_of_torus
)

# Result:
#   A torus or a partial torus is created with the specified parameters.  
#   In referenced mode, the center and axis are linked to the torus entity.

geomVolumeFaces(Surfaces)

Fill: Create a volume filling the space between a closed surfaces set

Alias: volumeFaces
Constraints: 3 dimensions
Parameters:

Surfaces (List) – Surfaces: List of surfaces. Conditions: “” does not exist in the dropdown list.

Return type:

Return a GeomVolume

geomVolumeFaces(GeomName, Surfaces)

Fill: Create a volume filling the space between a closed surfaces set

Alias: volumeFaces
Constraints: 3 dimensions
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 GeomVolume

geomVolumePoints(ListPnts)

By points: Create a volume defined by its vertices

Alias: volumePoints
Constraints: 3 dimensions
Parameters:

ListPnts (List) – Points: List of points to create the volume.

Return type:

Return a GeomVolume

geomVolumePoints(GeomName, ListPnts)

By points: Create a volume defined by its vertices

Alias: volumePoints
Constraints: 3 dimensions
Parameters:
  • GeomName (str) – Name. Conditions: “” input must be non-empty.

  • ListPnts (List) – Points: List of points to create the volume.

Return type:

Return a GeomVolume

Example:

# -*- coding: utf-8 -*-
# Example: Creating a volume from a set of points

# Step 1: Create a reference box to extract points from
box_volume = createBox("Volume", Point(0, 0, 0), Double(1), Double(1), Double(1))

# Step 2: Explode the box to get its vertices
geomExplode([box_volume], "VERTEX")

# Step 3: Assign the resulting vertices to variables
geom1 = Geometry("Point")
geom2 = Geometry("Point (7)")
geom3 = Geometry("Point (5)")
geom4 = Geometry("Point (1)")
geom5 = Geometry("Point (2)")
geom6 = Geometry("Point (6)")
geom7 = Geometry("Point (4)")
geom8 = Geometry("Point (3)")

# Step 4: Create a new volume using the list of points
# The points must form a closed shape to define a valid volume
volume_geom_entity = geomVolumePoints(
    "Volume (2)",
    [geom8, geom7, geom6, geom5, geom4, geom3, geom2, geom1]
)

# Result:
#   - A volume is created from the point cloud, replicating the original box shape
#   - The order of points is important to define the volume correctly

multiRotate(Axis, NumTimes, GeomObject)

Rotation: Create a group of volumes rotating an initial volume

Alias: multiRot
Constraints: 3 dimensions
Parameters:
  • Axis (POCCGeomLine) – Axis: Axis of rotation. Conditions: The input must be non-empty. “” does not exist in the dropdown list.

  • NumTimes (int) – Rotations: Number of times that the geometric entity will be rotated.

  • GeomObject (POCCCylinder) – Geometric Entity: Geometric entity to be rotated. Conditions: The input must be non-empty. “” does not exist in the dropdown list.

Return type:

Return a GeomBody

multiRotate(GeomName, Axis, NumTimes, GeomObject)

Rotation: Create a group of volumes rotating an initial volume

Alias: multiRot
Constraints: 3 dimensions
Parameters:
  • GeomName (str) – Name. Conditions: “” input must be non-empty.

  • Axis (POCCGeomLine) – Axis: Axis of rotation. Conditions: The input must be non-empty. “” does not exist in the dropdown list.

  • NumTimes (int) – Rotations: Number of times that the geometric entity will be rotated.

  • GeomObject (POCCCylinder) – Geometric Entity: Geometric entity to be rotated. Conditions: The input must be non-empty. “” does not exist in the dropdown list.

Return type:

Return a GeomBody

Example:

# -*- coding: utf-8 -*-
# Example: Rotating a geometry multiple times around an axis (without specifying an angle)

# This command performs multiple rotations of a given geometry around
# a defined axis. The rotation angle is implicitly determined by the
# number of rotations, distributing them evenly around a full 360° turn.

# Arguments:
#   1. String: Name of the resulting geometric entity or group.
#   2. Axis entity: Axis used as the center for the rotations.
#   3. Integer: Number of rotations to perform (evenly spaced over 360°).
#   4. Geometry entity: The geometry to be rotated.

# Geometry to rotate
box_geom_entity = createBox(
    "Volume",
    Point(0, 0, 0),
    Double(1),
    Double(1),
    Double(1)
)

# Axis of rotation
axis_geom_entity = createAxis("Curve", Point(0, 0, 0), Vector(1, 0, 0))

# Number of rotations to perform
num_rotations = 1

# Execute the multi-rotation
multiRotate(
    "Body",
    axis_geom_entity,
    num_rotations,
    box_geom_entity
)

# Result:
#   A new geometric entity named "Body" is created by rotating the input
#   geometry multiple times around the specified axis. The copies are
#   evenly distributed along the full circular path.

multiRotTrans(Axis, Angle, NumTimes, Step, NumTimesDirV, GeomObject)

Translation & Rotation: Create a group of volumes translating and rotating an initial volume

Alias: multiRT
Constraints: 3 dimensions
Parameters:
  • Axis (POCCGeomLine) – Axis: Axis of rotation. Conditions: The input must be non-empty. “” does not exist in the dropdown list.

  • Angle (Double) – Angle: Angle of rotation.

  • NumTimes (int) – Rotations: Number of times that the geometric entity will be rotated. Conditions: Value must be greater than 0.

  • Step (Double) – Step: Step to multi-translate each rotation result.

  • NumTimesDirV (int) – Translations: Number of times to be translated. Conditions: Value must be greater than 0.

  • GeomObject (POCCCylinder) – Geometric Entity: Geometric entity to be rotated. Conditions: The input must be non-empty. “” does not exist in the dropdown list.

Return type:

Return a GeomBody

multiRotTrans(GeomName, Axis, Angle, NumTimes, Step, NumTimesDirV, GeomObject)

Translation & Rotation: Create a group of volumes translating and rotating an initial volume

Alias: multiRT
Constraints: 3 dimensions
Parameters:
  • GeomName (str) – Name. Conditions: “” input must be non-empty.

  • Axis (POCCGeomLine) – Axis: Axis of rotation. Conditions: The input must be non-empty. “” does not exist in the dropdown list.

  • Angle (Double) – Angle: Angle of rotation.

  • NumTimes (int) – Rotations: Number of times that the geometric entity will be rotated. Conditions: Value must be greater than 0.

  • Step (Double) – Step: Step to multi-translate each rotation result.

  • NumTimesDirV (int) – Translations: Number of times to be translated. Conditions: Value must be greater than 0.

  • GeomObject (POCCCylinder) – Geometric Entity: Geometric entity to be rotated. Conditions: The input must be non-empty. “” does not exist in the dropdown list.

Return type:

Return a GeomBody

Example:

# -*- coding: utf-8 -*-
# Example: Applying multiple rotations and translations to a geometry

# This command combines multiple rotations and translations applied
# sequentially to a given geometry. It can be used to generate
# complex patterns or repeated geometries arranged in both rotational
# and linear sequences.

# Arguments:
#   1. String: Name of the resulting geometric entity or group.
#   2. Axis entity: Axis used as the center for the rotations and reference for translations.
#   3. Double: Rotation angle per step (in degrees).
#   4. Integer: Number of rotations to perform.
#   5. Double: Translation length per step.
#   6. Integer: Number of translations to perform.
#   7. Geometry entity: The geometry to which the transformations are applied.

# Geometry to transform
box_geom_entity = createBox(
    "Volume",
    Point(0, 0, 0),
    Double(1),
    Double(1),
    Double(1)
)

# Axis of rotation and translation
axis_geom_entity = createAxis("Curve", Point(0, 0, 0), Vector(1, 0, 0))

# Transformation parameters
num_rotations = 1
rot_angle = Double(180)          # Rotation angle per step (in degrees)

num_translations = 1
translation_length = Double(1)   # Translation distance per step

# Execute the combined multi-rotation and translation
multiRotTrans(
    "Body",
    axis_geom_entity,
    rot_angle,
    num_rotations,
    translation_length,
    num_translations,
    box_geom_entity
)

# Result:
#   A new geometric entity named "Body" is created by applying the specified
#   number of rotations and translations to the input geometry.
#   The final result is a pattern combining both circular and linear repetitions.

multiTranslation(DirU, StepDirU, NumTimesDirU, DirV, StepDirV, NumTimesDirV, GeomObject)

Translation: Create a group of volumes translating an initial volume

Alias: multiTrans
Constraints: 3 dimensions
Parameters:
  • DirU (Entity) – Vector 1: First vector to define the translation. Conditions: The input must be non-empty. “” does not exist in the dropdown list.

  • StepDirU (Double) – Step 1: Translation step for the first translation vector. Conditions: Value must be greater than 0.

  • NumTimesDirU (int) – Number 1: Number of translations to be done along the first direction. Conditions: Value must be greater than 0.

  • DirV (Entity) – Vector 2: Second vector to define the translation. Conditions: The input must be non-empty. “” does not exist in the dropdown list. Curves can not be coincidents.

  • StepDirV (Double) – Step 2: Translation step for the second translation vector. Conditions: Value must be greater than 0.

  • NumTimesDirV (int) – Number 2: Number of translations to be done along the second direction. Conditions: Value must be greater or equal than 0.

  • GeomObject (POCCCylinder) – Geometric entity: Geometric entity to be translated. Conditions: The input must be non-empty. “” does not exist in the dropdown list.

Return type:

Return a GeomBody

multiTranslation(GeomName, DirU, StepDirU, NumTimesDirU, DirV, StepDirV, NumTimesDirV, GeomObject)

Translation: Create a group of volumes translating an initial volume

Alias: multiTrans
Constraints: 3 dimensions
Parameters:
  • GeomName (str) – Name. Conditions: “” input must be non-empty.

  • DirU (Entity) – Vector 1: First vector to define the translation. Conditions: The input must be non-empty. “” does not exist in the dropdown list.

  • StepDirU (Double) – Step 1: Translation step for the first translation vector. Conditions: Value must be greater than 0.

  • NumTimesDirU (int) – Number 1: Number of translations to be done along the first direction. Conditions: Value must be greater than 0.

  • DirV (Entity) – Vector 2: Second vector to define the translation. Conditions: The input must be non-empty. “” does not exist in the dropdown list. Curves can not be coincidents.

  • StepDirV (Double) – Step 2: Translation step for the second translation vector. Conditions: Value must be greater than 0.

  • NumTimesDirV (int) – Number 2: Number of translations to be done along the second direction. Conditions: Value must be greater or equal than 0.

  • GeomObject (POCCCylinder) – Geometric entity: Geometric entity to be translated. Conditions: The input must be non-empty. “” does not exist in the dropdown list.

Return type:

Return a GeomBody

Example:

# -*- coding: utf-8 -*-
# Example: Creating a 2D grid of translated copies of a geometry

# This command performs multiple translations of a given geometry
# along two independent directions, effectively creating a grid or
# matrix of replicated entities. It is useful for generating arrays
# of repeated elements in both X and Y directions.

# Arguments:
#   1. String: Name of the resulting geometric entity or group.
#   2. Axis entity: First direction axis for translation.
#   3. Double: Translation distance along the first direction.
#   4. Integer: Number of translations along the first direction.
#   5. Axis entity: Second direction axis for translation.
#   6. Double: Translation distance along the second direction.
#   7. Integer: Number of translations along the second direction.
#   8. Geometry entity: The geometry to be translated.

# Geometry to translate
box_geom_entity = createBox(
    "Volume",
    Point(0, 0, 0),
    Double(1),
    Double(1),
    Double(1)
)

# Axes defining the translation directions
axis_dir1_geom_entity = createAxis("Curve", Point(0, 0, 0), Vector(1, 0, 0))   # X-direction
axis_dir2_geom_entity = createAxis("Curve (2)", Point(0, 0, 0), Vector(0, 1, 0)) # Y-direction

# Translation parameters
num_translations_dir1 = 1                     # Number of translations along X
num_translations_dir2 = 1                     # Number of translations along Y

translation_length_dir1 = Double(1)           # Distance between copies in X
translation_length_dir2 = Double(1)           # Distance between copies in Y

# Execute the multiple translations to create a grid of copies
multiTranslation(
    "Body",
    axis_dir1_geom_entity,
    translation_length_dir1,
    num_translations_dir1,
    axis_dir2_geom_entity,
    translation_length_dir2,
    num_translations_dir2,
    box_geom_entity
)

# Result:
#   A new geometric entity named "Body" is created as a 2D grid of the
#   original geometry, replicated along the two specified directions.