Repository navigation
AstoCAD Forms
AstoCAD is a soft fork of FreeCAD led by Pierre-Louis Boyer, who also contributes much of FreeCAD's recent UI work. It tracks the latest FreeCAD build, so FreeCAD's modelling features (and Python add-ons such as ImportExport_3DM) carry over, while it reworks the user interface and adds features of its own. AstoCAD is funded through paid memberships, but its source remains open and its features are intended to reach FreeCAD itself a few months after they appear in AstoCAD.
For add-on developers it behaves like FreeCAD with its own application name:
user add-ons live in AstoCAD's own folder
(~/Library/Application Support/AstoCAD/v1-1/Mod on macOS, separate from
FreeCAD's), and the bundled Python is 3.11, the same as FreeCAD 1.1.
AstoCAD build 2026.09.01 introduced Forms: subdivision-surface ("SubD") modelling, similar in spirit to Rhino's SubD or Fusion's Form environment. A Form is shaped by an editable control cage — a polygon net of control points and faces, with optional crease sharpness on edges and vertices — and AstoCAD turns the smooth Catmull-Clark limit surface of that cage into a real B-spline B-rep solid that the rest of FreeCAD can use.
Forms can be created as primitives (box, cylinder, sphere, quadball, torus,
tube, face, pipe), edited directly by pulling cage points, creasing,
subdividing, mirroring with symmetry and thickening, and used inside a
PartDesign Body as additive, subtractive or surface features. Under the hood
a Form is a PartDesign::FeaturePython object whose cage is stored in
properties (ControlPoints, ControlFaces, EdgeSharpness,
VertexSharpness), and the workbench has a public Python API (import Forms)
that ImportExport_3DM uses.
Rhino also models with SubD, so .3dm files are a natural way to move
subdivision models between Rhino and AstoCAD. ImportExport_3DM supports Forms
in both directions:
-
Import — new
importForms3DM.py(prototype). Brings each Rhino SubD in as a native, editable Form: the SubD's control net becomes the Form's control cage, creases included, so the model can be reshaped with the Forms tools after import. -
Export —
export3DM(existing). A Form is an ordinary shape-bearing feature, so it exports like any other solid; a set of Forms test cases checks the round trip (see below).
Status: prototype, AstoCAD only.
importForms3DMis not yet registered as a File → Import type, and neither it nor the Forms test cases are in a release yet.
- AstoCAD 2026.09.01 or later (provides the
FormsPython module).importForms3DMchecks this once per session: it confirmsFormsis present and that a Form still has every property it uses, so plain FreeCAD, an older AstoCAD, or a future AstoCAD with a changed Forms API gets a clear message instead of a failed import (importForms3DM.available()/check_forms_api()). - ImportExport_3DM installed in AstoCAD's user
Mod/folder (~/Library/Application Support/AstoCAD/v1-1/Modon macOS). -
rhino3dm≥ 8.32 (AstoCAD's bundled Python can import it). - Optional: a
trim3dmbuild for trimmed-Brep export — see Trimmed Surfaces. AstoCAD's Python ships no headers, so build with a matching Python 3.11 (e.g. a conda env) as described there; the resulting.soloads into AstoCAD unchanged.
freecad/importExport3DM/importForms3DM.py is a new, separate importer
alongside import3DM. The two treat a Rhino SubD differently:
import3DM (FreeCAD or AstoCAD) |
importForms3DM (AstoCAD only) |
|
|---|---|---|
| SubD becomes | its smooth limit surface as a fixed Part shape (plus a display cage) | a native Form with the SubD control net as its editable cage |
| Creases | baked into the surface | kept as EdgeSharpness / VertexSharpness
|
| Editable afterwards | no — it is a B-rep like any import | yes — pull, crease, subdivide, symmetry, thicken … |
| Other geometry (curves, Breps, meshes…) | imported | skipped and reported — use import3DM
|
It is a separate module because it depends on AstoCAD's Forms module, which
plain FreeCAD does not have; import3DM keeps working everywhere.
from freecad.importExport3DM import importForms3DM
created, skipped = importForms3DM.import_file("/path/model.3dm")open(filename) / insert(filename, docname) are also provided in FreeCAD
import-hook form.
| Rhino SubD (rhino3dm) | Forms::Form |
|---|---|
SubDVertex.ControlNetPoint |
ControlPoints (scaled to mm) |
SubDFace vertex loop (quads and n-gons) |
ControlFaces |
SubDEdge.IsHardCrease |
EdgeSharpness 10 (infinitely sharp) |
SubDEdge.EndSharpness (semi-sharp) |
EdgeSharpness s
|
vertex tag Corner
|
VertexSharpness 10 |
SubDVertex.VertexSharpness |
VertexSharpness |
| cage symmetric about the origin |
Symmetric / SymmetryPlane
|
Rhino SubD and Forms are both Catmull-Clark with OpenSubdiv-style creases, so the imported Form reproduces the Rhino surface. Each Form records:
-
ImportDeviation— max distance from Rhino's own limit points (SubDVertex.SurfacePoint) to the Form's B-rep; -
SourceFile,SourceObject(Rhino object id) andSourceLayer.
Forms converts the limit surface by patch sampling. Dense or irregular cages can
exceed its 250 000-face sampling limit; the importer then retries with a lower
MaxRefinement (3 → 2 → 1). Non-SubD objects are skipped and reported — use
import3DM for those.
v6_rhino_subd_logo.3dm (openNURBS V6 samples) holds six SubD objects. All six
import as valid, editable Form solids (AstoCAD 2026.09.01, 138 s in total); the
file's six Mesh objects are skipped.
![]() import3DM — limit surface (Part) |
![]() importForms3DM — editable Forms |
![]() Forms, front view |
![]() Forms with control cages shown |
| SubD | Cage vertices / faces | Creases | Conversion | Deviation from Rhino limit |
|---|---|---|---|---|
| 1 | 292 / 292 (with n-gons) | 0 | retried at MaxRefinement 2 |
1.0e-3 (6e-5 of size) |
| 2 | 224 / 231 (with n-gons) | 11 |
MaxRefinement 3 |
7.4e-3 (3e-4 of size) |
| 3 | 40 / 40 | 40 | symmetric detected | exact (1e-15) |
| 4 | 40 / 40 | 40 | exact (1e-15) | |
| 5 | 20 / 18 | 20 | symmetric detected | exact (9e-16) |
| 6 | 158 / 174 (with n-gons) | 16 | 8.8e-4 (3e-5 of size) |
All-quad creased cages reproduce the Rhino surface exactly. Cages with triangles or pentagons agree to within Forms' own sampling tolerance, but convert more slowly (up to about two minutes for SubD 2).
The logo has no semi-sharp edges, corner vertices or open boundaries, so those mappings are implemented but untested — sample SubD files exercising them are welcome (see the Discussions post).
Coordinates are scaled from the file's unit system to millimetres under the
same ImportScaleToMillimetres preference as import3DM (see Home). Keep
it on for Forms: the conversion tolerance (BRepTolerance) is in mm, so an
unscaled inch or metre file would be converted at the wrong tolerance — the
importer warns if that happens.
testCases/Forms/ holds 21 models built with the Forms scripting API, each as
an editable source and exported twice:
testCases/Forms/<case>.FCStd source model (re-editable in AstoCAD)
testCases/Forms/untrimmed/<case>.3dm ExportTrimmedBreps = False
testCases/Forms/trimmed/<case>.3dm ExportTrimmedBreps = True (needs trim3dm)
testCases/Forms/manifest.json source, export and re-import stats
testCases/Forms/make_forms_testcases.py regenerates all or some cases
| Group | Cases |
|---|---|
| Parametric primitives | box_default, box_segments_4, cylinder, sphere, quadball, torus, tube, face_open |
| Cage edits | box_edited_pull, box_symmetric_edit, box_open_top (open shell), box_subdivided_face (T-mesh) |
| Creases | box_crease_sharp (10), box_crease_semi (3) |
| Operations | face_thickened, face_from_profile (trimmed planar), pipe (along a 3D B-spline) |
| PartDesign | body_form_surface, body_additive_quadball, body_subtractive_sphere |
| Multi-object | multi_placed (box, rotated torus, rotated quadball) |
Regenerate inside AstoCAD:
import runpy, os
ns = runpy.run_path(os.path.join(App.getUserAppDataDir(),
"Mod/ImportExport_3DM/testCases/Forms/make_forms_testcases.py"), run_name="forms")
ns["generate"]() # all cases, both sets
ns["generate"](["torus"], modes=("trimmed",))The generator restores the user's ExportTrimmedBreps preference afterwards and
refuses to build the trimmed set if trim3dm is not importable, so the two sets
cannot silently end up identical.
All 42 exports (21 cases × untrimmed and trimmed) re-import with the source's exact face count, every face valid, and total area within 7e-6 (export3DM 0.3.1, import3DM 0.6.0). The first run of these test cases found three faults, all now fixed:
- import3DM, trim3dm path: untrimmed single-surface Breps were imported twice — once by trim3dm and again by the native pass for the file's other objects (7 trimmed cases had extra faces; see Trimmed Surfaces).
- import3DM, untrimmed files: a surface whose boundary curves are simply its own edges was still re-trimmed, which occasionally produced a sliver or an overhang (sphere, pipe, box_segments_4). Such surfaces are now used as they are.
- export3DM, untrimmed mode: an edge using only part of a B-spline curve — e.g. the interior edges between patches of one Forms surface — was exported as the whole curve (body_form_surface, box_subdivided_face). The curve is now cut to the edge's own range. Untrimmed files written by older versions carry these over-long boundary curves in Rhino too.
Both sets write one surface or Brep per face, not a joined polysurface, so a closed Form opens in Rhino as separate pieces rather than one closed solid.



