Bitbybit Docs
    Preparing search index...

    Class OCCTShape

    Questions and repairs that apply to any OpenCascade shape whatever its kind: what type it is, which way it is oriented, whether it is closed, valid or the same object as another, and unifySameDomain, which merges faces and edges that lie on one surface after a boolean. For work specific to one kind, use the vertex, edge, wire, face, shell, solid and compound classes beside this one.

    Index

    Constructors

    analysis

    • Tells whether the kernel has the shape flagged as closed, such as a wire that loops back to its start or a shell with no gaps.

      Parameters

      Returns Promise<boolean>

      True when the shape is flagged closed

      const wireIsClosed = await bitbybit.occt.shapes.shape.isClosed({ shape: wire });
      
    • Tells whether the kernel has the shape flagged as convex.

      Parameters

      Returns Promise<boolean>

      True when the shape is flagged convex

    • Tells whether the kernel has already run its validity check on the shape.

      Parameters

      Returns Promise<boolean>

      True when the shape carries the checked flag

    • Tells whether the kernel has the shape flagged as free, that is, not held inside another shape.

      Parameters

      Returns Promise<boolean>

      True when the shape carries the free flag

    • Tells whether the kernel has the shape flagged as infinite, such as an unbounded plane or line.

      Parameters

      Returns Promise<boolean>

      True when the shape carries the infinite flag

    • Tells whether the kernel has the shape flagged as modified since it was last checked.

      Parameters

      Returns Promise<boolean>

      True when the shape carries the modified flag

    • Tells whether the kernel has the shape flagged as locked against changes.

      Parameters

      Returns Promise<boolean>

      True when the shape carries the locked flag

    • Tells whether the shape is empty: a handle that holds no geometry, which an operation that failed can return.

      Parameters

      Returns Promise<boolean>

      True when the shape holds nothing

      const empty = await bitbybit.occt.shapes.shape.isNull({ shape: result });
      
    • Tells whether two handles point at the same geometry with the same placement and orientation.

      Parameters

      Returns Promise<boolean>

      True when they are equal

      const equal = await bitbybit.occt.shapes.shape.isEqual({ shape: a, otherShape: b });
      
    • Reads which way the shape is oriented: forward, reversed, internal or external, which for a face decides which side its normal points to.

      Parameters

      Returns Promise<topAbsOrientationEnum>

      The orientation

      const orientation = await bitbybit.occt.shapes.shape.getOrientation({ shape: face });
      
    • Reads what kind of shape this is: vertex, edge, wire, face, shell, solid, compound or another kernel type.

      Parameters

      Returns Promise<shapeTypeEnum>

      The shape type

      const type = await bitbybit.occt.shapes.shape.getShapeType({ shape: unknownShape });
      

    edit

    • Merges faces that lie on the same surface and edges that lie on the same curve into single faces and edges, which cleans up the seams a boolean or a fuse leaves behind.

      unifyEdges and unifyFaces choose what to merge, and concatBSplines joins runs of B-spline edges into one curve.

      Parameters

      Returns Promise<TopoDSShapePointer>

      The simplified shape

      const clean = await bitbybit.occt.shapes.shape.unifySameDomain({ shape: fused, unifyEdges: true, unifyFaces: true, concatBSplines: true });