A rectangular spline consists of a series of connected line segments forming a rectangular profile, commonly used in CAD designs to define...
Run
harbor run -t gnucleus-ai/freecad-4ca1b8519a
Download
harbor download gnucleus-ai/freecad-4ca1b8519a
Details
Revision
2
Published
Sep 3, 2026
Visibility
Public
Authors
gNucleus AI, Inc.
Content hash
Keywords
freecad
cad
parametric
geometry
python
Write a FreeCAD Python script to answer.py that reproduces the
part described below.
The model must be built as a parametric feature tree inside a single PartDesign Body,
producing exactly one solid body. Use editable PartDesign features to construct the
model for better parameterization.The saved FCStd must contain named document objects
whose properties drive the geometry, not a single Part::Feature holding
a pre-computed TopoShape.
Save the generated model as an .FCStd file next to the script, using
the script stem as the output basename. The output path must be derived
from __file__ at runtime; do not hardcode the path or rely on the
current working directory. Only the FCStd written next to the executing
script file is graded.
Part description:
A rectangular spline consists of a series of connected line segments forming a rectangular profile, commonly used in CAD designs to define paths, boundaries, or mechanical features such as gear teeth. This type of spline is characterized by its straight edges and precise geometry, making it ideal for applications requiring defined boundaries and controlled motion.
Key parameters include the shaft diameter, root diameter, number of teeth, tooth width, and spline thickness. These parameters establish the spline's shape, size, and structural integrity, ensuring proper fit and function in mechanical assemblies.
Key parameters:
shaft_diameter=14.0mm
root_diameter=11.0mm
number_teeth=6
tooth_width=3.0mm
spline_thickness=1.0mm
FreeCAD version: 1.1.0.
Output location: write your script to /app/answer.py and the generated model to /app/answer.FCStd. The verifier reads from these exact paths; files saved anywhere else are not graded.