This shaft consists of two main sections: - The first section is an external spline with shaft_number_teeth, shaft_spline_module...
Run
harbor run -t gnucleus-ai/freecad-58a1b82005
Download
harbor download gnucleus-ai/freecad-58a1b82005
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:
This shaft consists of two main sections:
The first section is an external spline with shaft_number_teeth, shaft_spline_module, shaft_spline_pitch_diameter, shaft_pressure_angle, and shaft_spline_height.
The second section is a smooth shaft with shaft_diameter and shaft_length, directly connected coaxially to the external spline section.
Key parameters:
shaft_number_teeth = 15
shaft_spline_module = 2 mm
shaft_spline_pitch_diameter = shaft_number_teeth * shaft_spline_module = 15*2 mm = 30 mm
shaft_pressure_angle = 30°
shaft_spline_height = 10 mm
shaft_diameter = 24 mm
shaft_length = 20 mm
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.