A headed pin features a cylindrical shaft with a head at one end, typically larger in diameter than the shaft, which can be flat, rounded...
Run
harbor run -t gnucleus-ai/freecad-d7e1bdf8be
Download
harbor download gnucleus-ai/freecad-d7e1bdf8be
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 headed pin features a cylindrical shaft with a head at one end, typically larger in diameter than the shaft, which can be flat, rounded, or shaped according to its use.
Key parameters include the pin diameter, pin length, head diameter, head thickness, chamfer length, and chamfer angle. These dimensions define the pinâs overall size and geometry, ensuring a proper fit and secure fastening in its intended application.
Key parameters:
pin_diameter=3mm
pin_length=6.0mm
head_diameter=5mm
head_thickness=1.0mm
chamfer_length=1.0mm
chamfer_angle=30 degree
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.