An external-hex coupling nut consists of a prismatic hexagonal body with a coaxial plain through hole running the full length. The overall...
Run
harbor run -t gnucleus-ai/freecad-641cfcd541
Download
harbor download gnucleus-ai/freecad-641cfcd541
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:
An external-hex coupling nut consists of a prismatic hexagonal body with a coaxial plain through hole running the full length.
The overall nut body is defined by overall_length and hex_width_across_flats, which set the axial length and the size of the hex profile.
The internal bore is a straight through hole defined by through_hole_diameter, centered on the nut axis and extending through the entire overall_length.
Key parameters:
overall_length = 9.525 mm
hex_width_across_flats = 6.35 mm
through_hole_diameter = 2.8448 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.