Bitbybit Docs
    Preparing search index...

    Class OCCTSprings

    Springs made from their wire and coils: compression springs with closed and ground ends, at any length from free to solid, so a spring between two moving parts can be rebuilt at the length the parts leave it.

    Index

    Constructors

    springs

    • Makes a compression spring with closed and ground ends: a round wire coiled about the frame's normal, its end coils closed onto the next and ground flat, standing on the frame's origin.

      The active coils share the length the end coils leave, so a shorter length compresses the spring; one shorter than solid, every coil touching, is refused.

      Parameters

      Returns Promise<TopoDSShapePointer>

      A new solid

      const free = await bitbybit.occt.parts.mechanical.springs.compressionSpring({ wireDiameter: 0.2, diameter: 2, activeCoils: 6, length: 4 });
      const pressed = await bitbybit.occt.parts.mechanical.springs.compressionSpring({ wireDiameter: 0.2, diameter: 2, activeCoils: 6, length: 2.5 });
    • Makes a compression spring as compressionSpring does and names the role each face plays.

      The roles bottom and top (the ground ends) and coil list face indexes as shapes.face.getFaces numbers them. The bottom frame is the input frame and the top frame lies length along its normal.

      Parameters

      Returns Promise<ShapeWithRoles<TopoDSShapePointer>>

      The spring, the faces each role names and its two ends

      const { shape, frames } = await bitbybit.occt.parts.mechanical.springs.compressionSpringWithRoles({ length: 3 });
      console.log(frames["top"]);
    • Makes the centre line of a compression spring's wire, coiled about the frame's normal as compressionSpring coils it, to sweep a wire of another section along.

      It runs three quarters of a coil past the frame's origin and past length: cut the swept solid flat at both to grind its ends.

      Parameters

      Returns Promise<TopoDSShapePointer>

      A new wire

      const path = await bitbybit.occt.parts.mechanical.springs.compressionSpringPath({ wireDiameter: 0.2, diameter: 2, activeCoils: 6, length: 4 });