OCCT 8.0.1
OCCT documentation

Search guides and API reference

Enter at least two characters.

    Open CASCADE Technology Reference Manual 8.0.1
    gp_Ax22d Class Reference

    Describes a coordinate system in a plane (2D space). A coordinate system is defined by: More...

    #include <gp_Ax22d.hxx>

    Public Member Functions

    constexpr gp_Ax22d () noexcept
     Creates an object representing the reference coordinate system (OXY).
    constexpr gp_Ax22d (const gp_Pnt2d &theP, const gp_Dir2d &theVx, const gp_Dir2d &theVy)
     Creates a coordinate system with origin theP and where:
    constexpr gp_Ax22d (const gp_Pnt2d &theP, const gp_Dir2d &theV, const bool theIsSense=true)
     Creates a coordinate system with origin theP and "X Direction" theV, which is:
    constexpr gp_Ax22d (const gp_Ax2d &theA, const bool theIsSense=true)
     Creates a coordinate system where its origin is the origin of theA and its "X Direction" is the unit vector of theA, which is:
    constexpr void SetAxis (const gp_Ax22d &theA1) noexcept
     Assigns the origin and the two unit vectors of the coordinate system theA1 to this coordinate system.
    constexpr void SetXAxis (const gp_Ax2d &theA1)
     Changes the XAxis and YAxis ("Location" point and "Direction") of <me>. The "YDirection" is recomputed in the same sense as before.
    constexpr void SetYAxis (const gp_Ax2d &theA1)
     Changes the XAxis and YAxis ("Location" point and "Direction") of <me>. The "XDirection" is recomputed in the same sense as before.
    constexpr void SetLocation (const gp_Pnt2d &theP) noexcept
     Changes the "Location" point (origin) of <me>.
    constexpr void SetXDirection (const gp_Dir2d &theVx)
     Assigns theVx to the "X Direction" of this coordinate system. The other unit vector of this coordinate system is recomputed, normal to theVx , without modifying the orientation (right-handed or left-handed) of this coordinate system.
    constexpr void SetYDirection (const gp_Dir2d &theVy)
     Assigns theVy to the "Y Direction" of this coordinate system. The other unit vector of this coordinate system is recomputed, normal to theVy, without modifying the orientation (right-handed or left-handed) of this coordinate system.
    gp_Ax2d XAxis () const
     Returns an axis, for which.
    gp_Ax2d YAxis () const
     Returns an axis, for which.
    constexpr const gp_Pnt2d & Location () const noexcept
     Returns the "Location" point (origin) of <me>.
    constexpr const gp_Dir2d & XDirection () const noexcept
     Returns the "XDirection" of <me>.
    constexpr const gp_Dir2d & YDirection () const noexcept
     Returns the "YDirection" of <me>.
    void Mirror (const gp_Pnt2d &theP) noexcept
    gp_Ax22d Mirrored (const gp_Pnt2d &theP) const noexcept
     Performs the symmetrical transformation of an axis placement with respect to the point theP which is the center of the symmetry. Warnings : The main direction of the axis placement is not changed. The "XDirection" and the "YDirection" are reversed. So the axis placement stay right handed.
    void Mirror (const gp_Ax2d &theA) noexcept
    gp_Ax22d Mirrored (const gp_Ax2d &theA) const noexcept
     Performs the symmetrical transformation of an axis placement with respect to an axis placement which is the axis of the symmetry. The transformation is performed on the "Location" point, on the "XDirection" and "YDirection". The resulting main "Direction" is the cross product between the "XDirection" and the "YDirection" after transformation.
    void Rotate (const gp_Pnt2d &theP, const double theAng)
    gp_Ax22d Rotated (const gp_Pnt2d &theP, const double theAng) const
     Rotates an axis placement. <theA1> is the axis of the rotation. theAng is the angular value of the rotation in radians.
    void Scale (const gp_Pnt2d &theP, const double theS)
    gp_Ax22d Scaled (const gp_Pnt2d &theP, const double theS) const
     Applies a scaling transformation on the axis placement. The "Location" point of the axisplacement is modified. Warnings: If the scale <theS> is negative: . the main direction of the axis placement is not changed. . The "XDirection" and the "YDirection" are reversed. So the axis placement stay right handed.
    void Transform (const gp_Trsf2d &theT) noexcept
    gp_Ax22d Transformed (const gp_Trsf2d &theT) const
     Transforms an axis placement with a Trsf. The "Location" point, the "XDirection" and the "YDirection" are transformed with theT. The resulting main "Direction" of <me> is the cross product between the "XDirection" and the "YDirection" after transformation.
    constexpr void Translate (const gp_Vec2d &theV) noexcept
    constexpr gp_Ax22d Translated (const gp_Vec2d &theV) const noexcept
     Translates an axis plaxement in the direction of the vector <theV>. The magnitude of the translation is the vector's magnitude.
    constexpr void Translate (const gp_Pnt2d &theP1, const gp_Pnt2d &theP2) noexcept
    constexpr gp_Ax22d Translated (const gp_Pnt2d &theP1, const gp_Pnt2d &theP2) const noexcept
     Translates an axis placement from the point <theP1> to the point <theP2>.
    void DumpJson (Standard_OStream &theOStream, int theDepth=-1) const
     Dumps the content of me into the stream.

    Detailed Description

    Describes a coordinate system in a plane (2D space). A coordinate system is defined by:

    • its origin (also referred to as its "Location point"), and
    • two orthogonal unit vectors, respectively, called the "X Direction" and the "Y Direction". A gp_Ax22d may be right-handed ("direct sense") or left-handed ("inverse" or "indirect sense"). You use a gp_Ax22d to:
    • describe 2D geometric entities, in particular to position them. The local coordinate system of a geometric entity serves for the same purpose as the STEP function "axis placement two axes", or
    • define geometric transformations. Note: we refer to the "X Axis" and "Y Axis" as the axes having:
    • the origin of the coordinate system as their origin, and
    • the unit vectors "X Direction" and "Y Direction", respectively, as their unit vectors.

    Constructor & Destructor Documentation

    ◆ gp_Ax22d() [1/4]

    gp_Ax22d::gp_Ax22d ( )
    inlineconstexprnoexcept

    Creates an object representing the reference coordinate system (OXY).

    ◆ gp_Ax22d() [2/4]

    gp_Ax22d::gp_Ax22d ( const gp_Pnt2d & theP,
    const gp_Dir2d & theVx,
    const gp_Dir2d & theVy )
    inlineconstexpr

    Creates a coordinate system with origin theP and where:

    • theVx is the "X Direction", and
    • the "Y Direction" is orthogonal to theVx and oriented so that the cross products theVx^"Y Direction" and theVx^theVy have the same sign. Raises ConstructionError if theVx and theVy are parallel (same or opposite orientation).

    ◆ gp_Ax22d() [3/4]

    gp_Ax22d::gp_Ax22d ( const gp_Pnt2d & theP,
    const gp_Dir2d & theV,
    const bool theIsSense = true )
    inlineconstexpr

    Creates a coordinate system with origin theP and "X Direction" theV, which is:

    • right-handed if theIsSense is true (default value), or
    • left-handed if theIsSense is false

    ◆ gp_Ax22d() [4/4]

    gp_Ax22d::gp_Ax22d ( const gp_Ax2d & theA,
    const bool theIsSense = true )
    inlineconstexpr

    Creates a coordinate system where its origin is the origin of theA and its "X Direction" is the unit vector of theA, which is:

    • right-handed if theIsSense is true (default value), or
    • left-handed if theIsSense is false.

    Member Function Documentation

    ◆ DumpJson()

    void gp_Ax22d::DumpJson ( Standard_OStream & theOStream,
    int theDepth = -1 ) const

    Dumps the content of me into the stream.

    ◆ Location()

    const gp_Pnt2d & gp_Ax22d::Location ( ) const
    inlineconstexprnoexcept

    Returns the "Location" point (origin) of <me>.

    ◆ Mirror() [1/2]

    void gp_Ax22d::Mirror ( const gp_Ax2d & theA)
    noexcept

    ◆ Mirror() [2/2]

    void gp_Ax22d::Mirror ( const gp_Pnt2d & theP)
    noexcept

    ◆ Mirrored() [1/2]

    gp_Ax22d gp_Ax22d::Mirrored ( const gp_Ax2d & theA) const
    nodiscardnoexcept

    Performs the symmetrical transformation of an axis placement with respect to an axis placement which is the axis of the symmetry. The transformation is performed on the "Location" point, on the "XDirection" and "YDirection". The resulting main "Direction" is the cross product between the "XDirection" and the "YDirection" after transformation.

    ◆ Mirrored() [2/2]

    gp_Ax22d gp_Ax22d::Mirrored ( const gp_Pnt2d & theP) const
    nodiscardnoexcept

    Performs the symmetrical transformation of an axis placement with respect to the point theP which is the center of the symmetry. Warnings : The main direction of the axis placement is not changed. The "XDirection" and the "YDirection" are reversed. So the axis placement stay right handed.

    ◆ Rotate()

    void gp_Ax22d::Rotate ( const gp_Pnt2d & theP,
    const double theAng )
    inline

    ◆ Rotated()

    gp_Ax22d gp_Ax22d::Rotated ( const gp_Pnt2d & theP,
    const double theAng ) const
    inlinenodiscard

    Rotates an axis placement. <theA1> is the axis of the rotation. theAng is the angular value of the rotation in radians.

    ◆ Scale()

    void gp_Ax22d::Scale ( const gp_Pnt2d & theP,
    const double theS )
    inline

    ◆ Scaled()

    gp_Ax22d gp_Ax22d::Scaled ( const gp_Pnt2d & theP,
    const double theS ) const
    inlinenodiscard

    Applies a scaling transformation on the axis placement. The "Location" point of the axisplacement is modified. Warnings: If the scale <theS> is negative: . the main direction of the axis placement is not changed. . The "XDirection" and the "YDirection" are reversed. So the axis placement stay right handed.

    ◆ SetAxis()

    void gp_Ax22d::SetAxis ( const gp_Ax22d & theA1)
    inlineconstexprnoexcept

    Assigns the origin and the two unit vectors of the coordinate system theA1 to this coordinate system.

    ◆ SetLocation()

    void gp_Ax22d::SetLocation ( const gp_Pnt2d & theP)
    inlineconstexprnoexcept

    Changes the "Location" point (origin) of <me>.

    ◆ SetXAxis()

    void gp_Ax22d::SetXAxis ( const gp_Ax2d & theA1)
    inlineconstexpr

    Changes the XAxis and YAxis ("Location" point and "Direction") of <me>. The "YDirection" is recomputed in the same sense as before.

    ◆ SetXDirection()

    void gp_Ax22d::SetXDirection ( const gp_Dir2d & theVx)
    inlineconstexpr

    Assigns theVx to the "X Direction" of this coordinate system. The other unit vector of this coordinate system is recomputed, normal to theVx , without modifying the orientation (right-handed or left-handed) of this coordinate system.

    ◆ SetYAxis()

    void gp_Ax22d::SetYAxis ( const gp_Ax2d & theA1)
    inlineconstexpr

    Changes the XAxis and YAxis ("Location" point and "Direction") of <me>. The "XDirection" is recomputed in the same sense as before.

    ◆ SetYDirection()

    void gp_Ax22d::SetYDirection ( const gp_Dir2d & theVy)
    inlineconstexpr

    Assigns theVy to the "Y Direction" of this coordinate system. The other unit vector of this coordinate system is recomputed, normal to theVy, without modifying the orientation (right-handed or left-handed) of this coordinate system.

    ◆ Transform()

    void gp_Ax22d::Transform ( const gp_Trsf2d & theT)
    inlinenoexcept

    ◆ Transformed()

    gp_Ax22d gp_Ax22d::Transformed ( const gp_Trsf2d & theT) const
    inlinenodiscard

    Transforms an axis placement with a Trsf. The "Location" point, the "XDirection" and the "YDirection" are transformed with theT. The resulting main "Direction" of <me> is the cross product between the "XDirection" and the "YDirection" after transformation.

    ◆ Translate() [1/2]

    void gp_Ax22d::Translate ( const gp_Pnt2d & theP1,
    const gp_Pnt2d & theP2 )
    inlineconstexprnoexcept

    ◆ Translate() [2/2]

    void gp_Ax22d::Translate ( const gp_Vec2d & theV)
    inlineconstexprnoexcept

    ◆ Translated() [1/2]

    gp_Ax22d gp_Ax22d::Translated ( const gp_Pnt2d & theP1,
    const gp_Pnt2d & theP2 ) const
    inlinenodiscardconstexprnoexcept

    Translates an axis placement from the point <theP1> to the point <theP2>.

    ◆ Translated() [2/2]

    gp_Ax22d gp_Ax22d::Translated ( const gp_Vec2d & theV) const
    inlinenodiscardconstexprnoexcept

    Translates an axis plaxement in the direction of the vector <theV>. The magnitude of the translation is the vector's magnitude.

    ◆ XAxis()

    gp_Ax2d gp_Ax22d::XAxis ( ) const
    inline

    Returns an axis, for which.

    • the origin is that of this coordinate system, and
    • the unit vector is either the "X Direction" of this coordinate system. Note: the result is the "X Axis" of this coordinate system.

    ◆ XDirection()

    const gp_Dir2d & gp_Ax22d::XDirection ( ) const
    inlineconstexprnoexcept

    Returns the "XDirection" of <me>.

    ◆ YAxis()

    gp_Ax2d gp_Ax22d::YAxis ( ) const
    inline

    Returns an axis, for which.

    • the origin is that of this coordinate system, and
    • the unit vector is either the "Y Direction" of this coordinate system. Note: the result is the "Y Axis" of this coordinate system.

    ◆ YDirection()

    const gp_Dir2d & gp_Ax22d::YDirection ( ) const
    inlineconstexprnoexcept

    Returns the "YDirection" of <me>.


    The documentation for this class was generated from the following file: