Skip to content

Quickstart

This page gets you from a CAD file to structured data in a few lines. It assumes you have installed the toolkit.

cadling ships a command-line entry point:

Terminal window
# Convert a CAD file to JSON or Markdown
cadling convert model.step --format json -o model.json
# Chunk a CAD file for RAG
cadling chunk model.step --max-tokens 512 --overlap 50 -o chunks.jsonl
# Show file information
cadling info model.step
from cadling import DocumentConverter, ConversionStatus
converter = DocumentConverter()
result = converter.convert("model.step")
if result.status == ConversionStatus.SUCCESS:
doc = result.document
print(f"Parsed {len(doc.items)} items")
json_data = doc.export_to_json()
markdown = doc.export_to_markdown()
from geotoken import GeoTokenizer
tokenizer = GeoTokenizer()
tokens = tokenizer.tokenize(vertices, faces)
import torch
from stepnet import STEPEncoder, STEPTokenizer, STEPFeatureExtractor, STEPTopologyBuilder
tokenizer, extractor, builder, encoder = (
STEPTokenizer(), STEPFeatureExtractor(), STEPTopologyBuilder(), STEPEncoder()
)
token_ids = torch.tensor([tokenizer.encode(step_text)])
topology = builder.build_complete_topology(
extractor.extract_features_from_chunk(step_text)
)
embedding = encoder(token_ids, topology_data=topology) # [1, 1024]

Train / run natively on Apple Silicon (MLX)

Section titled “Train / run natively on Apple Silicon (MLX)”

Each neural package has an mlx/ trainer that runs on Apple Silicon. The ones with existing PyTorch checkpoints convert the real weights and prove parity:

Terminal window
python ll_stepnet/mlx/train_classification_mlx.py --mode parity # acc 0.976, argmax 1.0 vs PyTorch
python ll_brepnet/mlx/train_brepnet_mlx.py --mode parity # mIoU parity vs PyTorch
python ll_gen/mlx/ar_generator_mlx.py --mode train # valid CAD generation 0.914
python ll_gen/mlx/latent_diffusion_mlx.py --mode train # latent-diffusion generation 0.934
python ll_ocadr/mlx/train_ocadr_mlx.py --mode train # geometry-grounded multimodal
  • cadling — full CAD parsing, chunking, and SDG.
  • geotoken — adaptive geometric tokenization.
  • ll_stepnet — neural STEP/B-Rep models.
  • ll_ocadr — geometry-aware LLM input.
  • ll_gen — generative CAD orchestration.
  • ll_clouds — point-cloud processing.