Bitbybit Docs
    Preparing search index...

    Class OCCTSurfaces

    Construction surfaces of OpenCascade: the infinite mathematical surfaces that faces are cut from. cylindricalSurface builds one and surfaceFromFace reads the surface a face lies on; both feed shapes.face.faceFromSurface, shapes.face.faceFromSurfaceAndWire and shapes.edge.makeEdgeFromGeom2dCurveAndSurface. A surface has no boundary and cannot be drawn by itself.

    Index

    Constructors

    surfaces

    • Creates an infinite cylindrical surface of the given radius around an axis through center along direction.

      It has no ends and cannot be drawn; cut a face from it with shapes.face.faceFromSurfaceAndWire or place wires on it with shapes.wire.placeWireOnFace after making a face.

      Parameters

      Returns Promise<GeomSurfacePointer>

      The cylindrical surface

      const cylinder = await bitbybit.occt.geom.surfaces.cylindricalSurface({ radius: 5, center: [0, 0, 0], direction: [0, 1, 0] });
      
    • Reads the underlying surface a face lies on, without its boundary.

      A face is a bounded piece of such a surface; the surface itself extends beyond the face, which is what lets a new wire be placed on it and cut into a different face.

      Parameters

      Returns Promise<GeomSurfacePointer>

      The surface the face lies on

      const surface = await bitbybit.occt.geom.surfaces.surfaceFromFace({ shape: face });