Geometry
- class figura.geometry.Axis1(pt, direction)
Describes an axis in 3D space. An axis is defined by:
its origin (also referred to as its “Location point”), and
its unit vector (referred to as its “Direction” or “main Direction”).
An axis is used:
to describe 3D geometric entities (for example, the axis of a revolution entity). It serves the same purpose as the STEP function “axis placement one axis”, or
to define geometric transformations (axis of symmetry, axis of rotation, and so on). For example, this entity can be used to locate a geometric entity or to define a symmetry axis.
- ax1()
Get the underlying OpenCascade object
- Returns:
The underlying OpenCascade object
- class figura.geometry.Axis2(pt, direction)
Describes a right-handed coordinate system in 3D space. A coordinate system is defined by:
its origin (also referred to as its “Location point”), and
three orthogonal unit vectors, termed respectively the “X Direction”, the “Y Direction” and the “Direction” (also referred to as the “main Direction”). The “Direction” of the coordinate system is called its “main Direction” because whenever this unit vector is modified, the “X Direction” and the “Y Direction” are recomputed. However, when we modify either the “X Direction” or the “Y Direction”, “Direction” is not modified. The “main Direction” is also the “Z Direction”. Since an Ax2 coordinate system is right-handed, its “main Direction” is always equal to the cross product of its “X Direction” and “Y Direction”. To define a left-handed coordinate system, use Axis3.
A coordinate system is used:
to describe geometric entities, in particular to position them. The local coordinate system of a geometric entity serves the same purpose as the STEP function “axis placement two axes”, or
to define geometric transformations.
Note: we refer to the “X Axis”, “Y Axis” and “Z Axis”, respectively, as to axes having:
the origin of the coordinate system as their origin, and
the unit vectors “X Direction”, “Y Direction” and “main Direction”, respectively, as their unit vectors. The “Z Axis” is also the “main Axis”.
- ax2()
Get the underlying OpenCascade object
- Returns:
The underlying OpenCascade object
- class figura.geometry.Direction(x, y, z)
Creates a direction with its 3 cartesian coordinates.
- Parameters:
x – x-coordinate
y – y-coordinate
z – z-coordinate
- dir()
Get the underlying OpenCascade object
- Returns:
The underlying OpenCascade object
- classmethod from_dir(dir)
Construct
figura
object from an OpenCascadegp_Dir
object- Parameters:
dir – OpenCascade
gp_Dir
object- Returns:
Direction
object
- property x
X-coordinate of this unit vector
- property y
Y-coordinate of this unit vector
- property z
Z-coordinate of this unit vector
- class figura.geometry.Geometry
- static DX()
- static DY()
- static DZ()
- static OX()
- static OY()
- static OZ()
- class figura.geometry.Plane(pt, normal)
Construct a plane with location pt and normal direction normal
- classmethod from_pln(pln)
Construct
figura
object from an OpenCascadegp_Pln
object- Parameters:
pln – OpenCascade
gp_Pln
object- Returns:
Plane
object
- property location
Location of this plane
- pln()
Get the underlying OpenCascade object
- Returns:
The underlying OpenCascade object
- class figura.geometry.Vector(x, y, z)
Creates a point with its three cartesian coordinates.
- Parameters:
x – x-coordinate
y – y-coordinate
z – z-coordinate
- classmethod from_vec(vec)
Construct
figura
object from an OpenCascadegp_Vec
object- Parameters:
vec – OpenCascade
gp_Vec
object- Returns:
Vector
object
- vec()
Get the underlying OpenCascade object
- Returns:
The underlying OpenCascade object
- property x
X-coordinate of this vector
- property y
Y-coordinate of this vector
- property z
Z-coordinate of this vector