A slotted spring pin is a cylindrical fastener with a longitudinal slot along its length, allowing it to compress and expand to provide a...
Run
harbor run -t gnucleus-ai/freecad-740b422c57
Download
harbor download gnucleus-ai/freecad-740b422c57
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 slotted spring pin is a cylindrical fastener with a longitudinal slot along its length, allowing it to compress and expand to provide a spring-like effect when inserted into a hole. This design ensures secure retention and alignment in mechanical assemblies, absorbing shocks and vibrations.
Key parameters include the outer diameter, inner diameter, pin length, and chamfer length. These dimensions define the pinâs size, fit, and flexibility, ensuring it provides the necessary spring force and stability in its intended application.
Key parameters:
outer_diameter=1.3mm
inner_diameter=0.8mm
pin_length=4.0mm
chamfer_length=0.35mm
slot_angle=15deg
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.