Datasets:
image
imagewidth (px) 428
1.92k
|
|---|
π§© FreeCAD Sketch Python Dataset
This dataset contains approximately 1,000 Python files and their corresponding images defining parametric FreeCAD sketches. Each python file represents a geometric sketch scripted using the FreeCAD Python API.
The dataset is intended for training and fine-tuning large language models (LLMs) and vision large language models (vLLMs) and other AI systems to understand and generate CAD-based parametric geometry code, particularly for text-to-CAD and text-to-3D applications.
π Dataset Overview
- Number of files: ~2,000 (1,000 python scripts & 1,000 images)
- Format: Python (
.py) & Portable Network Graphics (.png) - Image Size 1920 x 1080 pixels
- Language: English (
en) - License: CC BY 4.0
- Domain: CAD, Parametric Geometry, FreeCAD
- Primary Use: AI / ML training and research
π§± Naming Scheme
Each file follows a consistent naming pattern:
PartName_SketchName.py
PartName_SketchName.png
This structure helps learning-based models associate:
- Part-level semantics
- Sketch identities
- Parametric geometric definitions
βοΈ Source Information
Part files sourced from:
FreeCAD Library - It is a large collection of CAD geometries freely available in FreeCAD Addons.Sketch parsing and conversion handled by:
freecad_sketch_parser - A github project by me to convert the CAD geometries into python scripts and images. This parser converts FreeCAD.FCStdpart files into corresponding Python code that defines their sketches using the FreeCAD API.
π§ Intended Use
This dataset is designed for:
- Training or fine-tuning code generation models on CAD scripting tasks
- Research on LLM-assisted CAD design
- Developing text-to-sketch and text-to-3D pipelines
- Learning parametric geometry constraints and sketch construction patterns
β οΈ Limitations
- The dataset focuses on sketch-level geometry, not full solid modeling pipelines unfortunately.
- Generated scripts assume a valid FreeCAD runtime environment.
π§Ύ Example
Below is a simplified example of a sketch definition from the dataset:
import FreeCAD, Part, Sketcher
doc = FreeCAD.newDocument()
sketch = doc.addObject('Sketcher::SketchObject', 'BaseSketch')
sketch.addGeometry(
Part.LineSegment(
FreeCAD.Vector(0, 0, 0),
FreeCAD.Vector(10, 0, 0)
)
)
sketch.addConstraint(
Sketcher.Constraint('Coincident', 0, 1, -1, 1)
)
doc.recompute()
π Citation
If you use this dataset in academic research, publications, or derivative works, please cite it as follows:
@misc{syed_mohammed_yasin_2026,
author = { Syed Mohammed Yasin },
title = { FreeCAD_Sketches_Pics (Revision eba3b98) },
year = 2026,
url = { https://huggingface.co/datasets/Yas1n/FreeCAD_Sketches_Pics },
doi = { 10.57967/hf/7441 },
publisher = { Hugging Face }
}
π Explore Further
π Sketch-Only Dataset: https://huggingface.co/datasets/Yas1n/FreeCAD_Sketches: Contains a dataset of 3000+ python scripts of sketches
π CADomatic https://github.com/yas1nsyed/CADomatic: AI powered parametric CAD design generator for FreeCAD
- Downloads last month
- 1,809