Skip to content

Light OCCTOpenCASCADE Made Simple

Comprehensive wrapper with clean APIs and multi-language bindings

Light OCCT

Quick Example

Experience Light OCCT's clean API across different languages:

cpp
#include <light-occt/LCurve.hxx>
#include <light-occt/LTransform.hxx>

// Create a circle
auto circle = LCurve::CreateCircle(
    Point(0, 0, 0),     // center
    Vector(0, 0, 1),    // normal
    5.0                 // radius
);

// Evaluate point and derivatives
Point point = circle.D0(M_PI/2);
CurveDerivativeData deriv = circle.D1(M_PI/2);

// Get coordinate system data
CircleData data = circle.GetCircleData();
Point center = data.Position.Location;
double radius = data.Radius;
python
import light_occt as occt

# Create a circle
circle = occt.LCurve.CreateCircle(
    occt.Point(0, 0, 0),    # center
    occt.Vector(0, 0, 1),   # normal
    5.0                     # radius
)

# Evaluate point and derivatives
point = circle.D0(3.14159/2)
deriv = circle.D1(3.14159/2)

# Get coordinate system data
data = circle.GetCircleData()
center = data.Position.Location
radius = data.Radius
javascript
import { LCurve, Point, Vector } from 'light-occt-wasm';

// Create a circle
const circle = LCurve.CreateCircle(
    new Point(0, 0, 0),     // center
    new Vector(0, 0, 1),    // normal
    5.0                     // radius
);

// Evaluate point and derivatives
const point = circle.D0(Math.PI/2);
const deriv = circle.D1(Math.PI/2);

// Get coordinate system data
const data = circle.GetCircleData();
const center = data.Position.Location;
const radius = data.Radius;

Architecture Highlights

  • Enum + Handle Pattern: Type-safe OCCT object storage with automatic lifecycle management
  • Coordinate System PODs: Efficient data exchange using Axis1Placement, Axis2Placement, Axis3Placement
  • Modular Design: Optional Exchange and XCAF modules for CAD I/O and assembly management
  • OCCT Geom Wrapper: Complete access to OCCT's geometric methods (D0, D1, D2, D3, DN)
  • SWIG Protected: Clean language bindings without OCCT type exposure

Current Status

110/110 tests passing (100% success rate)
All language bindings operational
Complete geometry, topology, and mesh systems
Assembly hierarchy with XCAF integration
CAD file I/O through Exchange module

Ready for production use with a stable, well-tested API.

Released under the LGPL-2.1 License