Bitbybit Docs
    Preparing search index...

    Class OCCTRecipesBeta

    Building recipes exactly: solids described as data - polygons, circles, extrusions, turns, lofts, cuts by solids and planes, openings, unions, intersections, transforms and triangle meshes - by a package that does not build geometry itself, such as one that reads building models. Every step becomes an OpenCascade shape, so circles stay circles and the results measure, cut and export to STEP like any other shape. A whole recipe is built in one kernel call, its steps in parallel on the multithreaded kernel.

    Experimental: the recipe format may still change before it is declared stable.

    Index

    Constructors

    build

    Constructors

    build

    • Beta

      Builds each root of a recipe as a shape placed by its matrix, in root order.

      Shared steps are built once. A mesh keeps its triangles unless facetedMeshes is set or a boolean needs it. A root that failed, or whose opening failed, throws naming the step; with emptyWhenFailed it comes back empty, or cut by the openings built.

      Parameters

      • inputs: Bit.Inputs.OCCT.BuildRecipeDto

        The recipe, whether Z turns into Y, whether failed roots come back empty, and the largest mesh built

      Returns Promise<TopoDSShapePointer[]>

      One shape per root, in root order

      const recipe = await bitbybit.ifc.geometry.recipe({ model });
      const shapes = await bitbybit.occt.recipes.build({ recipe, adjustZtoY: true, emptyWhenFailed: true });
    • Beta

      Builds the roots of a recipe into an assembly document, ready to export to STEP.

      Roots sharing the groupBy tag form one product named by its name tag, with its tags as properties and its parts coloured by rgba. A step only moved and turned is one part placed by each root. Failures are handled as in build.

      Parameters

      • inputs: BuildRecipeDocumentDto

        The recipe, the top assembly's name, the grouping tag, whether failed roots are left out, and the largest mesh built

      Returns Promise<TDocStdDocumentPointer>

      The document handle

      const recipe = await bitbybit.ifc.geometry.recipe({ model });
      const document = await bitbybit.occt.recipes.buildDocument({ recipe, name: "House" });
      const step = await bitbybit.occt.assembly.manager.exportDocumentToStep({ document, fileName: "house.step", tryDownload: false });