Skip to content
ForCADDocumentation
Browse guide contents ↓

Bundled examples

Studio projects

Choose a screenshot under Home → Samples to open an editable project. The files are in example/studio/. To select a chess piece and inspect its parameter space, follow Explore a project in Studio.

Examples What to explore
Chess, Head Multipatch volumes and freeform surfaces
Plate, Airfoil Structured quadrilateral meshes on surfaces
Bracket, Gear, Nozzle Structured hexahedral meshes in solids and passages
Pipe Free-form deformation with an editable control lattice
Joint, Frame Rolled steel connections and braced framing

Fortran examples

The Fortran programs are in example/core/, and the benchmark is in example/benchmark/. From the checkout root, open a compiler shell and run a target by name. Examples write exports under example/output/, grouped by format (vtk/, iges/, and ppm/). Choose a target below to read the program and see its output filenames.

fpm run --example example_plate_hole_4_3d --profile release
Example target Topic
demo_curve Create and sample a NURBS curve
demo_surface Refine a surface and export its parameter lines
demo_volume Create and export a volume patch
shape_circle Construct an exact rational circle. Try shape_ring_2d or shape_ring_3d for a surface or solid.
example_helix_pipe Construct a helical pipe
example_plate_hole_4_3d Construct a plate volume with an elliptical cutout
put_to_nurbs Map the supplied 23,200 nodes and 20,577 hex cells into a volume. Try it with two cells first.
nearest_point_2d Query a surface for the position nearest a physical point. Compare sampled and continuous queries.
lsq_fit_bspline_3d Fit a spline volume to sampled data
lsq_fit_nurbs_2d Fit a rational surface to torus samples and report relative errors by coordinate. Try lsq_fit_nurbs_1d or lsq_fit_nurbs_3d for other patch ranks.
poisson_iga_solver_2d Run the unit-square Poisson problem and inspect its field
poisson_iga_solver_3d Inspect the field inside the unit cube and verify its error
forcad_benchmark Benchmark geometry, meshing and analysis workflows

To time a single workflow, run the benchmark with a case name. Each run also checks its numerical result. --help lists the available cases and groups.

fpm run --example forcad_benchmark --profile release -- --case mesh-volume --size small --repeat 3