Skip to main content

128 docs tagged with "OCCT"

OpenCASCADE geometry kernel for precise CAD operations like booleans, fillets, and STEP export.

View all tags

Angular Dimension

Learn how to create and display angular dimensions for measuring angles in your 3D models with clear, professional annotations.

Asking a Shape About Itself

What every OCCT shape can tell you and have done to it - its type and orientation, whether it is closed or empty, whether two handles are the same shape, merging the seams a boolean leaves with unifySameDomain and removing the edges a split leaves inside a face - with an example in Rete, Blockly and TypeScript and a table of every function.

Blockly Editor

What the Blockly editor on bitbybit.dev is and what you can build with it - interlocking blocks that turn into a program - with a detailed drone built step by step, the showcase scripts and where to start.

Blockly Showcases

Larger Blockly scripts - a detailed drone, a hexagon hive, an advanced loft and a twisted polygon ornament - with what each one shows, the script file to download and open, and the page that explains it in every editor.

Build a drone: a module that repeats

The second chapter of the Rete drone - a module named Around that repeats one shape evenly around the drone, built from list components, a code component that works out the angles, and rotate shapes; its first uses cut the leg openings and place the standoffs with their bolts.

Build a drone: arms around the frame

The fourth chapter of the Blockly drone - the arm's parts repeated around the frame by calls of around, an async function that alternates the propellers' spin, and another that sorts the lights into green and red by the side they are on.

Build a drone: arms around the frame

The fourth chapter of the Rete drone - one Arm instance and Around instances repeat the arms, motors, stators, propellers, bolts and lights, a code component alternates the propellers' spin, two more sort the lights into green and red, and draw components colour each material.

Build a drone: arms around the frame

The fourth chapter of the TypeScript drone - the arm's parts repeated around the frame by the around function, propellers that alternate their spin, and lights sorted by the side they are on into green and red.

Build a drone: around, bolts and standoffs

The second chapter of the Blockly drone - a function with a count loop that repeats one shape evenly around the drone, its first use cutting the leg openings, an M3 bolt revolved from a profile with a hexagon socket, and the standoffs with their bolts between the arms.

Build a drone: around, bolts and standoffs

The second chapter of the TypeScript drone - a function that repeats one shape evenly around the drone, its first use cutting the leg openings, an M3 bolt revolved from a profile with a hexagon socket, and the standoffs with their bolts between the arms.

Build a drone: canopy and electronics

The fifth chapter of the Blockly drone - a canopy lofted through rounded rectangles, an async function that traces a honeycomb of hexagon wires on its sides, a hatch with the bitbybit logo read from a STEP file cut into it, and the GPS mast and antennas.

Build a drone: canopy and electronics

The fifth chapter of the Rete drone - a canopy lofted through rounded rectangles, a honeycomb of hexagon wires traced on its sides by a code component, a hatch on its crown with the bitbybit logo read from a STEP file cut into it, and the GPS mast and antennas.

Build a drone: canopy and electronics

The fifth chapter of the TypeScript drone - a canopy lofted through rounded rectangles, a honeycomb of hexagon wires traced on its sides, a hatch on its crown with the bitbybit logo read from a STEP file cut into it, and the GPS mast and antennas.

Build a drone: landing gear

The sixth chapter of the Blockly drone - a landing leg swept along a bent path, a revolved damper with a helical spring, a lofted rubber foot and the leg's bolts, each a function whose result around repeats for every leg.

Build a drone: landing gear

The sixth chapter of the Rete drone - a landing leg swept along a bent path, a revolved damper with a helical spring, a lofted rubber foot and the leg's bolts, each made once and repeated four times by Around.

Build a drone: landing gear

The sixth chapter of the TypeScript drone - a landing leg swept along a bent path, a revolved damper with a helical spring, a lofted rubber foot and the leg's bolts, each made once and repeated for every leg.

Build a drone: one arm

The third chapter of the Blockly drone - functions for the arm with a pad for the motor and hexagonal cut-outs made in a loop, a motor revolved from a profile with cooling slots and its stator, a lofted two-blade propeller from a list of stations, and the bolts and the light, drawn one arm at a time.

Build a drone: one arm

The third chapter of the TypeScript drone - a folder for the arm with its body with a pad for the motor and hexagonal cut-outs, a motor revolved from a profile with cooling slots and its stator, a lofted two-blade propeller, and the bolts and the light, each a function in a file of its own, drawn one arm at a time.

Build a drone: payload and sizes

The last chapter of the Blockly drone - the camera on its gimbal, its lens and the strapped battery, then one number changed to rebuild the drone with six arms and a propeller that shrinks to fit.

Build a drone: payload and sizes

The last chapter of the TypeScript drone - the camera on its gimbal, its lens and the strapped battery, then one number changed to rebuild the drone with six arms and a propeller that shrinks to fit.

Build a drone: payload and sliders

The last chapter of the Rete drone - the camera on its gimbal, its lens and the strapped battery, then the arms slider rebuilding the drone with six arms and a propeller that shrinks to fit.

Build a drone: sizes, stage and the frame

The first chapter of the Blockly drone - variables for the drone's sizes, a function that keeps the propeller in bounds, a lit stage and a function that makes each material's drawing options, then the carbon frame plate from a function with hexagon vents cut through it, and a second plate above it.

Build a drone: sizes, stage and the frame

The first chapter of the TypeScript drone - the drone's sizes in a file of their own with a function that keeps the propeller in bounds, a lit stage and the materials, then the carbon frame plate from a rounded rectangle, a face and an extrusion with hexagon vents cut through it, and a second plate above it.

Build a drone: sliders and the frame

The first chapter of the Rete drone - number sliders for the drone's sizes, a code component that keeps the propeller in bounds and a lit stage, then the carbon frame plate from a rounded rectangle, a face and an extrusion, with hexagon vents cut through it and a second plate above it, each part in a group with a comment.

Build a drone: the arm module

The third chapter of the Rete drone - a module named Arm that makes one arm with hexagonal cut-outs, a motor with cooling slots and its stator, a lofted two-blade propeller, its bolts and an LED, sized by its length and propeller inputs, with one output per material.

Build and Export Assemblies

Create structured CAD assemblies with parts, instances, and hierarchies. Export STEP files compatible with FreeCAD, Fusion 360, and SolidWorks.

Checking a Shape

Why an operation can return a shape that is not what you meant without failing, and how to check a result - its volume, its validity, its size - and repair what came from a file.

Choosing a Kernel

When to model with OpenCascade, when with Manifold and when with JSCAD, what each is good and bad at, how a shape moves from one kernel to another, and which way each one builds up.

Christmas Tree

Create a 3D printable Christmas tree ornament using wire offset and extrusion - perfect for festive decorations.

Code in Bitbybit - the API at a Glance

How the Bitbybit API is organised and how one function reads in Rete, Blockly and TypeScript, the concepts every script stands on, and a map of every namespace with what it is for, how many functions it has and where it is explained.

Compound Shapes

Learn how to create compound shapes for better performance and grouped transformations in OCCT

Compounded Drawing

Learn how to use compounds for efficient rendering of complex geometric patterns and assemblies

Conventions

The handful of conventions that hold everywhere in Bitbybit - colour ranges, which way is up, and the defaults that surprise people.

Convert STEP to GLTF

Convert STEP files to web-optimized GLTF/GLB format directly in the browser with privacy-preserving local processing.

Creating a Parametric Cube with Blockly

Size an OCCT cube with a variable in Blockly, step by step with a picture of the editor after every step - make the variable, set it, draw the cube and read the variable into its size.

Creating a Parametric Cube with Rete

Wire a number slider into an OCCT cube in Rete, step by step with a picture of the editor after every step, and drag the slider to resize the solid live.

Creating a Parametric Cube with TypeScript

Size an OCCT cube from one constant in TypeScript, step by step with a picture of the editor after every step, then change the number and run again to watch the solid follow.

Creating Advanded Loft

Learn how to create a surface by lofting between several wire shapes and use various advanced options that help you make more intricate shapes.

Design documents: parametric models as JSON

How to write a Bitbybit design document - parameters, sketches, features, references that survive edits, parts and assemblies - and the validate, build and fix loop an agent should follow.

DXF

DXF file format is very popular in 2D CAD applications. Learn how to work with DXF files using OCCT.

Edge Primitives

Master the fundamentals of edge creation in OCCT - from simple lines and circles to complex arcs and ellipses. Learn multiple methods to create precise geometric boundaries for your 3D models.

Export Shapes with Color

Export OCCT shapes to STEP files with preserved colors using the assembly document structure for CAD software compatibility.

Face From Points

Create an OCCT face from an ordered list of points, and see how point order, planarity and closure decide whether you get a valid face or a failed operation.

Face From Wire

Create an OCCT face from a single closed wire, the most common way to turn an outline into a surface you can extrude, offset or boolean against.

Face Hexagons Grid

Create hexagonal face patterns in OCCT that react to a control point, growing hexagons near it and shrinking distant ones for organic wave-like surface effects.

Features: Holes, Bosses, Pockets and More

The OCCT features that change a solid where you point - plain, counterbored and countersunk holes on frames, bosses and pockets from a profile, ribs and grooves, push-pull and removing faces - plus drafts and single corners, with an example in Rete, Blockly and TypeScript.

Frost Flower

Create a 3D printable frost flower ornament using interpolated curves and 12-fold rotational symmetry.

Frozen Snowflake

Create a complex frozen snowflake ornament using zigzag patterns, advanced lofting, and selective face extrusion.

Gem Star

Create a simple 3D printable gem star decoration using polygon wire loft.

Geometry with the CAD kernels: writing parts with an agent

How an agent writes 3D geometry with Bitbybit's kernels - OpenCascade for exact parts, Manifold for fast meshes, JSCAD for quick solids - in the browser, in the editors or in Node, how it chooses edges, checks a shape and exports it, and the mistakes to avoid.

Getting a Model Out

How to take what a script makes out of Bitbybit - the editors' Export model menu for GLB, STL and pictures, and from code STEP and IGES for CAD programs, STL and OBJ for printing, GLB for the web, BREP, SVG and DXF drawings.

Getting Started Overview

What bitbybit.dev offers and where to begin - projects and scripts, the Rete, Blockly and TypeScript coding editors, the Designer, the free npm packages, CAD Cloud, 3D Bits for Shopify and the model configurators.

Hexagon Hive

Create intricate three-dimensional honeycomb structures by generating individual hexagon cells with controlled random heights, perfect for biomimetic architecture, structural optimization, and artistic installations.

Hexagon Hive Flat

Create flat honeycomb panels by sewing hexagonal faces together into unified structures, ideal for architectural panels, laser cutting templates, and manufacturing-optimized designs.

Hexagon Holes On Face

Create stunning honeycomb patterns and hexagonal perforations using BitByBit's subdivideToHexagonHoles function for architectural panels, biomimetic designs, and structural applications.

Hexagons Grid

Generate a grid of hexagonal OCCT wires from rows, columns and radius, the starting point for panelling, perforation patterns and honeycomb structures.

How Bitbybit Works

The ideas under every Bitbybit product - CAD kernels in web workers, shapes as handles, geometry versus drawing, the three renderers, where each product runs your code, and what is open source.

Inside a Shape - Its Graph and Its Geometry

Looking inside an OpenCascade shape - the graph of solids, shells, faces, edges and vertices and how they connect, read with occt.brepGraph, and the curves and surfaces beneath them, built and read with occt.geom - with a table of every function.

Introduction to Assemblies

Understand what OCCT assemblies are, why STEP files matter for CAD workflows, and preview your first assembly model in the browser.

Introduction to OCCT Fillets

Learn about OCCT fillets, which create roundings on the edges of shapes (solids, shells, or wires) to produce smooth transitions, with examples in Bitbybit.

Linear Dimension

Learn how to create and display linear dimensions for measuring distances in your 3D models with clear, professional annotations.

Measuring and Analysing Shapes

The OCCT analysis functions answer questions about shapes with numbers and points - bounding boxes, distances and angles, clashes between parts, the kind and curvature of curves and surfaces - with an example in Rete, Blockly and TypeScript.

Moving, Turning and Placing Shapes

The OCCT transforms - moving, rotating, scaling and mirroring shapes, aligning one frame onto another, and placing many copies on frames that share one shape's geometry - with an example in Rete, Blockly and TypeScript.

Multiple Wire Offsets

Learn how to create multiple parallel offsets from a single open wire using OCCT operations for various design and manufacturing applications.

OCCT Fillets: Applying to 2D Wires

Learn how to apply fillets to the corners of 2D wires in OCCT to create rounded transitions between connected edges, using Bitbybit's Rete, Blockly, and TypeScript editors.

OCCT Fillets: Applying to 3D Wires

Learn how to apply fillets to the corners of 3D wires (non-planar) in OCCT, including variable radii on specific corners, using Bitbybit's Rete, Blockly, and TypeScript editors.

OCCT Vertices

Vertices, OCCT's own points - making them from plain points, reading them back, bundling a point cloud into one shape to draw, and casting points onto a shape to find where they land - with an example in Rete, Blockly and TypeScript and a table of every function.

Offset Operations

Learn how to create offset shapes using various offset operations in OCCT - from simple wire and face offsets to advanced thick solids.

Our NPM Packages

Discover the free NPM packages that power Bitbybit, allowing you to integrate our 3D CAD algorithms into your own applications.

Parse Assembly Structure

Extract and navigate assembly hierarchy from STEP files - find part labels, retrieve shapes, and apply custom styling to individual components.

Pen Sketcher

Draw exact 2D outlines in OCCT with a pen - lines, tangent arcs, sagitta and bulge arcs, Bezier curves, rounded and beveled corners - on any plane, then extrude them into solids.

Picking Faces and Edges

Three ways to tell a function which faces or edges of a shape to work on - by index, by a rule about where they lie and what they are, and by history - and why a rule survives changes an index does not.

Pin with Label

Learn how to create annotated pins with labels for marking important points and displaying information in your 3D models.

Pipes and Sweeps

Sweeping a profile along a path with OCCT - round tubes and polygon bars along any wire, your own profiles with pipe, profiles that grow or shrink on the way, and mouldings that follow a flat outline - with an example in Rete, Blockly and TypeScript.

Quick Start with BabylonJS

Learn how to set up and use the @bitbybit-dev/babylonjs package with Vite to create 3D CAD applications, and control which geometry kernels (OCCT, JSCAD, Manifold) are initialized.

Quick Start with PlayCanvas

Learn how to set up and use the @bitbybit-dev/playcanvas package with Vite to create 3D CAD applications, and control which geometry kernels (OCCT, JSCAD, Manifold) are initialized.

Quick Start with ThreeJS

Learn how to set up and use the @bitbybit-dev/threejs package with Vite to create 3D CAD applications, and control which geometry kernels (OCCT, JSCAD, Manifold) are initialized.

Rectangle Holes On Face

Bitbybit has many helper functions that could streamline some of the modeling tasks, such as subdividing given rectangle faces into multiple holes or wires.

Rete Editor

What the Rete node editor on bitbybit.dev is and what you can build with it - components wired into a graph that runs as you change it - with a detailed drone built step by step, the showcase scripts and where to start.

Rete Showcases

Larger Rete scripts - a detailed drone, a hexagon hive, an advanced loft and a twisted polygon ornament - with what each one shows, the script file to download and open, and the page that explains it.

Rotated Extrude

Learn how to create 3D spiral or helical shapes by extruding a 2D wire profile along an axis while rotating it.

Sections, Slices and Drawings

Cutting OCCT shapes for drawings and fabrication - slicing a solid into layers, cutting it with planes or frames, splitting it with other shapes, the outline where two shapes meet, and hidden-line views for technical drawings - with an example in Rete, Blockly and TypeScript.

Selecting Faces and Edges by Rule

The OCCT select functions choose faces and edges by what they are and where they lie - facing a direction, along an axis, on a plane, by radius or size, in a box, around chosen faces - and return the indexes fillets, chamfers and features take, with an example in Rete, Blockly and TypeScript.

Shapes Live in a Worker

Why every kernel call is asynchronous, why a shape in a script is a small handle, why operations never change their inputs, and how the worker's memory of shapes is kept and freed.

Shells

Shells are the connected sets of faces that sit between a face and a solid in OCCT. Learn how to build them, when a shell needs to be closed, and how they feed solid construction.

Simple Flower

Build a parametric flower from OCCT wires and faces, driving petal count, radius and curvature from a handful of numbers so the whole shape rebuilds as you change them.

Simple Holes

Learn how to use outer and inner wire to create a face that has a hole.

Simple Hollow Grids

Learn how to create parametric hollow grids with multiple holes arranged in regular patterns for applications like ventilation panels, perforated sheets, and decorative screens.

Solids

Solids are closed, watertight volumes in OCCT and the shape kind most downstream operations expect. Learn how to create them from primitives and from shells, and how to check one is valid.

Solids

Learn how to get volume and surface area of a solid

Star Ornament

Create a simple 3D printable star ornament using polygon wire extrusion - perfect for tree toppers and holiday decorations.

STEP & IGES Import

Read STEP and IGES files into OCCT shapes - the compressed variants, passing file data from a browser, and how a file that cannot be read reports itself.

SVG Import

Import SVG drawings into OCCT geometry - which elements are supported, how faces and holes are worked out, and what to do about text and reused symbols.

Tangent Lines and Circles

Build OCCT edges that touch other curves - lines tangent to two circles or to a circle and a point, circles of a given radius tangent to two shapes, circles tangent to three, and lines tangent at an angle - in the plane of a frame, with an example in Rete, Blockly and TypeScript.

Technical Drawings from a Model

Turning an OCCT model into a technical drawing - a hidden-line view from any direction, drawn in the scene, saved as SVG with the hidden edges dashed, or written to DXF with the visible and hidden edges on their own layers - with an example in Rete, Blockly and TypeScript.

Text in 3D Compared

The ways to write text in Bitbybit side by side - OCCT stroke wires, plain stroke points, JSCAD stroke solids and real fonts with the Pro text3d - what each gives you, where it lands, which font it uses and how fonts load - with an example in Rete, Blockly and TypeScript.

Thick Solids from Complex Faces

Learn how to create thick solids from complex lofted surfaces using OCCT operations - from curved wire interpolation to volumetric solid creation.

Tree Decoration

Model a 3D-printable Christmas tree decoration in OCCT: build the outline from wires, give it thickness, and export a watertight solid ready for a slicer.

Twisted Polygon Ornament

Learn how to create an elegant twisted polygon ornament by transforming and lofting hexagonal wires - perfect for 3D printing decorative pieces.

TypeScript Editor

What the TypeScript editor on bitbybit.dev is and what you can build with it - the whole Bitbybit API in code, with IntelliSense, several files and imports - with a detailed drone written step by step, the showcase scripts and where to start.

TypeScript Showcases

Larger TypeScript scripts - a detailed drone of many files, a hexagon hive, an advanced loft and a twisted polygon ornament - with what each one shows, the script file to download and open, and the page that explains it in every editor.

Understanding OCCT Boolean Operations

Learn about the fundamental OCCT boolean operations (Union, Difference, Intersection) for combining and modifying 3D shapes in Bitbybit, with examples in Rete, Blockly, and TypeScript.

Understanding OCCT Chamfers

Learn about OCCT chamfers, which create straight, beveled cuts on the edges of solids or shells, and see examples of applying chamfers in Bitbybit's Rete, Blockly, and TypeScript editors.

Units, Tolerance and Precision

What unit a Bitbybit number is in, why a kernel's tolerance and a drawing's precision are different things, and how precision makes a curve smooth or faceted on screen without changing the shape.

Wire Bezier Weights

Create Bezier wires in OCCT with per-control-point weights, so you can pull the curve towards individual points without moving them and model conic sections exactly.

Wire Helix Spirals

Create helix and spiral wires in OCCT from radius, pitch and turn count - the base curve for threads, springs, twisted columns and swept tubes.

Wire Via Points

Learn how to create various wires passing via or being controlled by collections of points

Working with Edges in OCCT

Learn about OCCT edges, how to create linear and curved edges, analyze their properties, use them to construct wires, and deconstruct other shapes into edges in Bitbybit.

Working with Faces in OCCT

Learn about OCCT faces, how to create them from wires, their role in constructing solids, and how faces can have multiple wires (e.g., for holes).

Working with Wires in OCCT

Learn about OCCT wires, how to create them from edges or points (polylines, splines, Bezier curves), their role in constructing faces, and how faces can have multiple wires (e.g., for holes).

Your First 3D "Hello World" with Blockly

Build a first Blockly script step by step - a grid and 3D text stacked under it, values changed and plugged in - with a picture of the editor after every step and the finished script to run on the page.

Your First 3D "Hello World" with Rete

Build a first Rete script step by step - a grid, 3D text and a vector wired into it - with a picture of the editor after every step and the finished script to run on the page.

Your First 3D "Hello World" with TypeScript

Write a first TypeScript script step by step - a grid and 3D text made with the bitbybit API and drawn - with a picture of the editor after every step and the finished script to run on the page.