Bitbybit Docs
    Preparing search index...

    Class OCCTVertex

    Vertices in OpenCascade: the kernel's own form of a point, the corner where edges meet. Plain [x, y, z] points are what the rest of the library works with, so the methods here mostly convert between the two: make vertices from points, read points back out of vertices, list the vertices of any shape, and project points onto a shape.

    Index

    Constructors

    from

    • Makes a vertex from x, y and z values.

      Parameters

      • inputs: XYZDto

        The three coordinates

      Returns Promise<TopoDSVertexPointer>

      The vertex

      const vertex = await bitbybit.occt.shapes.vertex.vertexFromXYZ({ x: 1, y: 2, z: 3 });
      
    • Makes one vertex, the kernel's own point, for each plain [x, y, z] point.

      Parameters

      Returns Promise<TopoDSVertexPointer[]>

      One vertex per point, in the same order

      const vertices = await bitbybit.occt.shapes.vertex.verticesFromPoints({ points: [[0, 0, 0], [1, 0, 0]] });
      
    • Makes one vertex per point and bundles them into a single compound, so a whole point cloud can be drawn or transformed as one shape.

      Parameters

      Returns Promise<TopoDSCompoundPointer>

      A compound holding one vertex per point

      const cloud = await bitbybit.occt.shapes.vertex.verticesCompoundFromPoints({ points: [[0, 0, 0], [1, 0, 0], [0, 1, 0]] });
      

    get

    • Lists every vertex of a shape as the kernel walks it.

      A vertex is repeated for every face and edge that use it, so a box lists 48 vertices rather than its 8 corners; use getVerticesAsPoints with point.removeAllDuplicateVectors for unique corners.

      Parameters

      Returns Promise<TopoDSVertexPointer[]>

      The vertices found in the shape

      const corners = await bitbybit.occt.shapes.vertex.getVertices({ shape: box });
      
    • Lists every vertex of a shape as a plain [x, y, z] point, as the kernel walks it.

      A vertex is repeated for every face and edge that use it, so a box lists 48 points rather than its 8 corners; point.removeAllDuplicateVectors reduces them to the unique ones.

      Parameters

      Returns Promise<Point3[]>

      The points of the vertices

      const corners = await bitbybit.occt.shapes.vertex.getVerticesAsPoints({ shape: box });
      

    place

    • Projects points onto a shape along a direction and gives the points where they land.

      Each point travels along direction for exactly that vector's length, so it must be long enough to reach the shape. Where the path crosses the shape more than once, projectionType keeps the closest hit, the furthest, both or all; a path that misses gives nothing.

      Parameters

      Returns Promise<Point3[]>

      The projected points

      const onGround = await bitbybit.occt.shapes.vertex.projectPoints({
      points: [[0, 10, 0], [1, 10, 0]],
      shape: terrain,
      direction: [0, -20, 0],
      projectionType: Bit.Inputs.OCCT.pointProjectionTypeEnum.closest,
      });

    transform

    • Reads the coordinates of each vertex as a plain [x, y, z] point.

      Parameters

      Returns Promise<Point3[]>

      One point per vertex, in the same order

      const points = await bitbybit.occt.shapes.vertex.verticesToPoints({ shapes: vertices });
      
    • Reads the coordinates of a vertex as a plain [x, y, z] point.

      Parameters

      Returns Promise<Point3>

      The point

      const point = await bitbybit.occt.shapes.vertex.vertexToPoint({ shape: vertex });