CoolFace
Datasetpublic

Yas1n/FreeCAD_Sketches

🧩 FreeCAD Sketch Python Dataset This dataset contains 3,000 Python files that define parametric FreeCAD sketches. Each file represents a geometric sketch scripted in Python and is ideal for training large language models (LLMs) or fine-tuning code models to understand and generate CAD-based geometric design code. πŸ“ Dataset Overview Number of files: ~3,000 Format: Python (.py) Language: English (en) License: Apache 2.0 Purpose: Training LLMs for… See the full description on the dataset page: https://huggingface.co/datasets/Yas1n/FreeCAD_Sketches.

sourceHugging Facecc-by-4.0updated 9mo agoView on Hugging Face
5likes352downloads
Dataset Card

🧩 FreeCAD Sketch Python Dataset

This dataset contains 3,000 Python files that define parametric FreeCAD sketches. Each file represents a geometric sketch scripted in Python and is ideal for training large language models (LLMs) or fine-tuning code models to understand and generate CAD-based geometric design code.


πŸ“ Dataset Overview

  • β€”Number of files: ~3,000
  • β€”Format: Python (.py)
  • β€”Language: English (en)
  • β€”License: Apache 2.0
  • β€”Purpose: Training LLMs for text-to-CAD and text-to-3D applications.

🧱 Naming Scheme

Each file follows the pattern: PartName_SketchName.py

This consistent structure helps models learn associations between part names, sketch features, and parametric geometry definitions.


βš™οΈ Source Information

This parser converts FreeCAD .FCStd part 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 and parametric geometry generation.
  • β€”Developing text-to-3D and text-to-sketch models.

🧾 Example

Below is an example snippet of a sketch definition:

python
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:

bibtex
@misc{syed_mohammed_yasin_2026,
	author       = { Syed Mohammed Yasin },
	title        = { FreeCAD_Sketches (Revision 36b0471) },
	year         = 2026,
	url          = { https://huggingface.co/datasets/Yas1n/FreeCAD_Sketches },
	doi          = { 10.57967/hf/7442 },
	publisher    = { Hugging Face }
}

πŸ”— Explore Further

πŸ‘‰ Sketch with photos Dataset: https://huggingface.co/datasets/Yas1n/FreeCAD_Sketches: Contains a dataset of 1000+ python scripts of sketches and their corresponding pictures in FreeCAD.

πŸ‘‰ CADomatic https://github.com/yas1nsyed/CADomatic: AI powered parametric CAD design generator for FreeCAD