OpenCascade.js
API ReferenceFoundationClassesTKMath

TopLoc

OCCT package TopLoc: TopLoc_Datum3D, TopLoc_ItemLocation, TopLoc_Location, TopLoc_SListNodeOfItemLocation, and 1 more bound classes.

TopLoc_Datum3D

Describes a coordinate transformation, i.e. a change to an elementary 3D coordinate system, or position in 3D space. A Datum3D is always described relative to the default datum. The default datum is described relative to itself: its origin is (0,0,0), and its axes are (1,0,0) (0,1,0) (0,0,1).

Constructors(2)

Static methods(2)

Instance methods(4)

TopLoc_ItemLocation

An ItemLocation is an elementary coordinate system in a Location.
The ItemLocation contains:

  • The elementary Datum.
  • The exponent of the elementary Datum.
  • The transformation associated to the composition.

Constructors(1)

TopLoc_Location

A Location is a composite transition. It comprises a series of elementary reference coordinates, i.e. objects of type TopLoc_Datum3D, and the powers to which these objects are raised.

Constructors(4)

Static methods(1)

Instance methods(15)

  • IsIdentity(): boolean

    Returns true if this location is equal to the Identity transformation.

  • Identity(): void

    Resets this location to the Identity transformation.

  • Returns the first elementary datum of the Location. Use the NextLocation function recursively to access the other data comprising this location. Exceptions Standard_NoSuchObject if this location is empty.

  • FirstPower(): number

    Returns the power elevation of the first elementary datum. Exceptions Standard_NoSuchObject if this location is empty.

  • Returns a Location representing <me> without the first datum. We have the relation:
    <me> = NextLocation() * FirstDatum() ^ FirstPower() Exceptions Standard_NoSuchObject if this location is empty.

  • Returns the transformation associated to the coordinate system.

  • Returns the inverse of <me>.
    <me> * Inverted() is an Identity.

  • Returns <me> * <Other>, the elementary datums are concatenated.

    Parameters (1)
    • Other
  • Returns <me> / <Other>.

    Parameters (1)
    • Other
  • Returns <Other>.Inverted() * <me>.

    Parameters (1)
    • Other
  • Powered(pwr: number): TopLoc_Location

    Returns me at the power <pwr>. If <pwr> is zero returns Identity. <pwr> can be lower than zero (usual meaning for powers).

    Parameters (1)
    • pwr
  • HashCode(): number

    Returns a hashed value for this local coordinate system. This value is used, with map tables, to store and retrieve the object easily.

    Returns

    a computed hash code

  • IsEqual(theOther: TopLoc_Location): boolean

    Returns true if this location and the location Other have the same elementary data, i.e. contain the same series of TopLoc_Datum3D and respective powers. This method is an alias for operator ==.

    Parameters (1)
    • theOther
  • IsDifferent(theOther: TopLoc_Location): boolean

    Returns true if this location and the location Other do not have the same elementary data, i.e. do not contain the same series of TopLoc_Datum3D and respective powers. This method is an alias for operator !=.

    Parameters (1)
    • theOther
  • Clear(): void

    Clear myItems.

TopLoc_SListOfItemLocation

An SListOfItemLocation is a LISP like list of Items. An SListOfItemLocation is: . Empty. . Or it has a Value and a Tail which is an other SListOfItemLocation.
The Tail of an empty list is an empty list. SListOfItemLocation are shared. It means that they can be modified through other lists. SListOfItemLocation may be used as Iterators. They have Next, More, and value methods. To iterate on the content of the list S just do.
SListOfItemLocation Iterator; for (Iterator = S; Iterator.More(); Iterator.Next()) X = Iterator.Value();

Constructors(3)

Instance methods(9)

  • Sets a list from an other one. The lists are shared. The list itself is returned.

    Parameters (1)
    • Other
  • IsEmpty(): boolean

    Return true if this list is empty.

  • Clear(): void

    Sets the list to be empty.

  • Returns the current value of the list. An error is raised if the list is empty.

  • Returns the current tail of the list. On an empty list the tail is the list itself.

  • Replaces the list by a list with <anItem> as Value and the list <me> as tail.

    Parameters (1)
    • anItem
  • ToTail(): void

    Replaces the list <me> by its tail.

  • More(): boolean

    Returns True if the iterator has a current value. This is !IsEmpty().

  • Next(): void

    Moves the iterator to the next object in the list. If the iterator is empty it will stay empty. This is ToTail().