OpenCascade.js
API ReferenceModelingDataTKBRep

TopoDS

OCCT package TopoDS: TopoDS_AlertAttribute, TopoDS_AlertWithShape, TopoDS_Builder, TopoDS_Compound, and 22 more bound classes.

TopoDS_AlertWithShape

Alert object storing TopoDS shape in its field.

Constructors(1)

Static methods(2)

Instance methods(5)

TopoDS_Builder

A Builder is used to create Topological Data Structures. It is the root of the Builder class hierarchy.
There are three groups of methods in the Builder:
The Make methods create Shapes.
The Add method includes a Shape in another Shape.
The Remove method removes a Shape from an other Shape.
The methods in Builder are not static. They can be redefined in inherited builders.
This Builder does not provide methods to Make Vertices, Edges, Faces, Shells or Solids. These methods are provided in the inherited Builders as they must provide the geometry.
The Add method check for the following rules:

  • Any SHAPE can be added in a COMPOUND.
  • Only SOLID can be added in a COMPSOLID.
  • Only SHELL, EDGE and VERTEX can be added in a SOLID. EDGE and VERTEX as to be INTERNAL or EXTERNAL.
  • Only FACE can be added in a SHELL.
  • Only WIRE and VERTEX can be added in a FACE. VERTEX as to be INTERNAL or EXTERNAL.
  • Only EDGE can be added in a WIRE.
  • Only VERTEX can be added in an EDGE.
  • Nothing can be added in a VERTEX.

Constructors(1)

Instance methods(7)

  • Make an empty Wire.

    Parameters (1)
    • W
      Mutated in place; read the updated value from this argument after the call.
  • Make an empty Shell.

    Parameters (1)
    • S
      Mutated in place; read the updated value from this argument after the call.
  • Make a Solid covering the whole 3D space.

    Parameters (1)
    • S
      Mutated in place; read the updated value from this argument after the call.
  • Make an empty Composite Solid.

    Parameters (1)
    • C
      Mutated in place; read the updated value from this argument after the call.
  • Make an empty Compound.

    Parameters (1)
    • C
      Mutated in place; read the updated value from this argument after the call.
  • Add the Shape C in the Shape S. Exceptions.

    • TopoDS_FrozenShape if S is not free and cannot be modified.
    • TopoDS__UnCompatibleShapes if S and C are not compatible.
    Parameters (2)
    • S
      Mutated in place; read the updated value from this argument after the call.
    • C
  • Remove the Shape C from the Shape S. Exceptions TopoDS_FrozenShape if S is frozen and cannot be modified.

    Parameters (2)
    • S
      Mutated in place; read the updated value from this argument after the call.
    • C

TopoDS_Compound

Describes a compound which.

  • references an underlying compound with the potential to be given a location and an orientation
  • has a location for the underlying compound, giving its placement in the local coordinate system
  • has an orientation for the underlying compound, in terms of its geometry (as opposed to orientation in relation to other shapes). Casts shape S to the more specialized return type, Compound.

Constructors(1)

TopoDS_CompSolid

Describes a composite solid which.

  • references an underlying composite solid with the potential to be given a location and an orientation
  • has a location for the underlying composite solid, giving its placement in the local coordinate system
  • has an orientation for the underlying composite solid, in terms of its geometry (as opposed to orientation in relation to other shapes). Casts shape S to the more specialized return type, CompSolid.

Constructors(1)

TopoDS_Edge

Describes an edge which.

  • references an underlying edge with the potential to be given a location and an orientation
  • has a location for the underlying edge, giving its placement in the local coordinate system
  • has an orientation for the underlying edge, in terms of its geometry (as opposed to orientation in relation to other shapes).

Constructors(1)

TopoDS_Face

Describes a face which.

  • references an underlying face with the potential to be given a location and an orientation
  • has a location for the underlying face, giving its placement in the local coordinate system
  • has an orientation for the underlying face, in terms of its geometry (as opposed to orientation in relation to other shapes).

Constructors(1)

TopoDS_HShape

Class to manipulate a Shape with handle.

Constructors(2)

Static methods(2)

Instance methods(4)

TopoDS_Iterator

Iterates on the underlying shape underlying a given TopoDS_Shape object, providing access to its component sub-shapes. Each component shape is returned as a TopoDS_Shape with an orientation, and a compound of the original values and the relative values.

Constructors(2)

  • Creates an empty Iterator.

  • constructor(S: TopoDS_Shape, cumOri?: boolean, cumLoc?: boolean): TopoDS_Iterator

    Creates an Iterator on sub-shapes. Note:

    • If cumOri is true, the function composes all sub-shapes with the orientation of S.
    • If cumLoc is true, the function multiplies all sub-shapes by the location of S, i.e. it applies to each sub-shape the transformation that is associated with S.
    Parameters (3)
    • S
    • cumOri
    • cumLoc

Instance methods(5)

  • Initialize(S: TopoDS_Shape, cumOri?: boolean, cumLoc?: boolean): void

    Initializes this iterator with shape S. Note:

    • If cumOri is true, the function composes all sub-shapes with the orientation of S.
    • If cumLoc is true, the function multiplies all sub-shapes by the location of S, i.e. it applies to each sub-shape the transformation that is associated with S.
    Parameters (3)
    • S
    • cumOri
    • cumLoc
  • More(): boolean

    Returns true if there is another sub-shape in the shape which this iterator is scanning.

  • Next(): void

    Moves on to the next sub-shape in the shape which this iterator is scanning. Exceptions Standard_NoMoreObject if there are no more sub-shapes in the shape.

  • Returns the current sub-shape in the shape which this iterator is scanning. Exceptions Standard_NoSuchObject if there is no current sub-shape.

  • Returns a sentinel marking the end of iteration.

TopoDS_Shape

Describes a shape which.

  • references an underlying shape with the potential to be given a location and an orientation
  • has a location for the underlying shape, giving its placement in the local coordinate system
  • has an orientation for the underlying shape, in terms of its geometry (as opposed to orientation in relation to other shapes). Note: A Shape is empty if it references an underlying shape which has an empty list of shapes.

Constructors(1)

Instance methods(42)

  • IsNull(): boolean

    Returns true if this shape is null. In other words, it references no underlying shape with the potential to be given a location and an orientation.

  • Nullify(): void

    Destroys the reference to the underlying shape stored in this shape. As a result, this shape becomes null.

  • Returns the shape local coordinate system.

  • Location(theLoc: TopLoc_Location, theRaiseExc: boolean): void

    Sets the shape local coordinate system.

    Parameters (2)
    • theLoc
      the new local coordinate system.
    • theRaiseExc
      flag to raise exception in case of transformation with scale or negative.
  • Located(theLoc: TopLoc_Location, theRaiseExc?: boolean): TopoDS_Shape

    Returns a shape similar to <me> with the local coordinate system set to <Loc>.

    Parameters (2)
    • theLoc
      the new local coordinate system.
    • theRaiseExc
      flag to raise exception in case of transformation with scale or negative.
    Returns

    the located shape.

  • Returns the shape orientation.

  • Sets the shape orientation.

    Parameters (1)
    • theOrient
  • Returns a shape similar to <me> with the orientation set to <Or>.

    Parameters (1)
    • theOrient
  • Returns a handle to the actual shape implementation.

  • TShape(theTShape: TopoDS_TShape): void
    Parameters (1)
    • theTShape
  • Returns the value of the TopAbs_ShapeEnum enumeration that corresponds to this shape, for example VERTEX, EDGE, and so on. Exceptions Standard_NullObject if this shape is null.

  • Free(): boolean

    Returns the free flag.

  • Free(theIsFree: boolean): void

    Sets the free flag.

    Parameters (1)
    • theIsFree
  • Locked(): boolean

    Returns the locked flag.

  • Locked(theIsLocked: boolean): void

    Sets the locked flag.

    Parameters (1)
    • theIsLocked
  • Modified(): boolean

    Returns the modification flag.

  • Modified(theIsModified: boolean): void

    Sets the modification flag.

    Parameters (1)
    • theIsModified
  • Checked(): boolean

    Returns the checked flag.

  • Checked(theIsChecked: boolean): void

    Sets the checked flag.

    Parameters (1)
    • theIsChecked
  • Orientable(): boolean

    Returns the orientability flag.

  • Orientable(theIsOrientable: boolean): void

    Sets the orientability flag.

    Parameters (1)
    • theIsOrientable
  • Closed(): boolean

    Returns the closedness flag.

  • Closed(theIsClosed: boolean): void

    Sets the closedness flag.

    Parameters (1)
    • theIsClosed
  • Infinite(): boolean

    Returns the infinity flag.

  • Infinite(theIsInfinite: boolean): void

    Sets the infinity flag.

    Parameters (1)
    • theIsInfinite
  • Convex(): boolean

    Returns the convexness flag.

  • Convex(theIsConvex: boolean): void

    Sets the convexness flag.

    Parameters (1)
    • theIsConvex
  • Move(thePosition: TopLoc_Location, theRaiseExc?: boolean): void

    Multiplies the Shape location by thePosition.

    Parameters (2)
    • thePosition
      the transformation to apply.
    • theRaiseExc
      flag to raise exception in case of transformation with scale or negative.
  • Moved(thePosition: TopLoc_Location, theRaiseExc?: boolean): TopoDS_Shape

    Returns a shape similar to <me> with a location multiplied by thePosition.

    Parameters (2)
    • thePosition
      the transformation to apply.
    • theRaiseExc
      flag to raise exception in case of transformation with scale or negative.
    Returns

    the moved shape.

  • Reverse(): void

    Reverses the orientation, using the Reverse method from the TopAbs package.

  • Returns a shape similar to <me> with the orientation reversed, using the Reverse method from the TopAbs package.

  • Complement(): void

    Complements the orientation, using the Complement method from the TopAbs package.

  • Returns a shape similar to <me> with the orientation complemented, using the Complement method from the TopAbs package.

  • Compose(theOrient: TopAbs_Orientation): void

    Updates the Shape Orientation by composition with theOrient, using the Compose method from the TopAbs package.

    Parameters (1)
    • theOrient
  • Returns a shape similar to <me> with the orientation composed with theOrient, using the Compose method from the TopAbs package.

    Parameters (1)
    • theOrient
  • NbChildren(): number

    Returns the number of direct sub-shapes (children).

  • IsPartner(theOther: TopoDS_Shape): boolean

    Returns True if two shapes are partners, i.e. if they share the same TShape. Locations and Orientations may differ.

    Parameters (1)
    • theOther
  • IsSame(theOther: TopoDS_Shape): boolean

    Returns True if two shapes are same, i.e. if they share the same TShape with the same Locations. Orientations may differ.

    Parameters (1)
    • theOther
  • IsEqual(theOther: TopoDS_Shape): boolean

    Returns True if two shapes are equal, i.e. if they share the same TShape with the same Locations and Orientations.

    Parameters (1)
    • theOther
  • IsNotEqual(theOther: TopoDS_Shape): boolean

    Negation of the IsEqual method.

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

    Replace <me> by a new Shape with the same Orientation and Location and a new TShape with the same geometry and no sub-shapes.

  • Returns a new Shape with the same Orientation and Location and a new TShape with the same geometry and no sub-shapes.

TopoDS_Shell

Describes a shell which.

  • references an underlying shell with the potential to be given a location and an orientation
  • has a location for the underlying shell, giving its placement in the local coordinate system
  • has an orientation for the underlying shell, in terms of its geometry (as opposed to orientation in relation to other shapes).

Constructors(1)

TopoDS_Solid

Describes a solid shape which.

  • references an underlying solid shape with the potential to be given a location and an orientation
  • has a location for the underlying shape, giving its placement in the local coordinate system
  • has an orientation for the underlying shape, in terms of its geometry (as opposed to orientation in relation to other shapes).

Constructors(1)

TopoDS_TShape

A TShape is a topological structure describing a set of points in a 2D or 3D space.
A topological shape is a structure made from other shapes. This is a deferred class used to support topological objects.
TShapes are defined by their optional domain (geometry) and their components (other TShapes with Locations and Orientations). The components are stored in a list in the base class.
A TShape contains the following boolean flags:

  • Free : Free or Frozen.
  • Modified : Has been modified.
  • Checked : Has been checked.
  • Orientable : Can be oriented.
  • Closed : Is closed (note that only Wires and Shells may be closed).
  • Infinite : Is infinite.
  • Convex : Is convex.
  • Locked : Is locked against modifications.
    Users have no direct access to the classes derived from TShape. They handle them with the classes derived from Shape.

Static methods(2)

Instance methods(20)

  • Free(): boolean

    Returns the free flag.

  • Free(theIsFree: boolean): void

    Sets the free flag.

    Parameters (1)
    • theIsFree
  • Locked(): boolean

    Returns the locked flag.

  • Locked(theIsLocked: boolean): void

    Sets the locked flag.

    Parameters (1)
    • theIsLocked
  • Modified(): boolean

    Returns the modification flag.

  • Modified(theIsModified: boolean): void

    Sets the modification flag.

    Parameters (1)
    • theIsModified
  • Checked(): boolean

    Returns the checked flag.

  • Checked(theIsChecked: boolean): void

    Sets the checked flag.

    Parameters (1)
    • theIsChecked
  • Orientable(): boolean

    Returns the orientability flag.

  • Orientable(theIsOrientable: boolean): void

    Sets the orientability flag.

    Parameters (1)
    • theIsOrientable
  • Closed(): boolean

    Returns the closedness flag.

  • Closed(theIsClosed: boolean): void

    Sets the closedness flag.

    Parameters (1)
    • theIsClosed
  • Infinite(): boolean

    Returns the infinity flag.

  • Infinite(theIsInfinite: boolean): void

    Sets the infinity flag.

    Parameters (1)
    • theIsInfinite
  • Convex(): boolean

    Returns the convexness flag.

  • Convex(theIsConvex: boolean): void

    Sets the convexness flag.

    Parameters (1)
    • theIsConvex
  • Returns the type as a term of the ShapeEnum enum: VERTEX, EDGE, WIRE, FACE, SHELL, SOLID, COMPSOLID, COMPOUND. The type is embedded in the lower 4 bits of the state.

  • Returns a copy of the TShape with no sub-shapes.

  • NbChildren(): number

    Returns the number of direct sub-shapes (children).

TopoDS_Vertex

Describes a vertex which.

  • references an underlying vertex with the potential to be given a location and an orientation
  • has a location for the underlying vertex, giving its placement in the local coordinate system
  • has an orientation for the underlying vertex, in terms of its geometry (as opposed to orientation in relation to other shapes).

Constructors(1)

TopoDS_Wire

Describes a wire which.

  • references an underlying wire with the potential to be given a location and an orientation
  • has a location for the underlying wire, giving its placement in the local coordinate system
  • has an orientation for the underlying wire, in terms of its geometry (as opposed to orientation in relation to other shapes).

Constructors(1)