A high-profile external-hex flange nut consists of a hexagonal nut body with a plain through-hole and an integrated circular flange at one...
Run
harbor run -t gnucleus-ai/freecad-7c8d69d649
Download
harbor download gnucleus-ai/freecad-7c8d69d649
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 high-profile external-hex flange nut consists of a hexagonal nut body with a plain through-hole and an integrated circular flange at one end, forming a tall, robust fastener with an enlarged bearing surface.
The overall nut form and profile are governed by nut_profile and overall_height, while the external driving geometry is defined by drive_style and hub_width.
The plain through-hole passes axially through the nut and is defined by through_hole_diameter.
The integrated flange is defined by flange_diameter and flange_thickness, and is positioned at the base of the nut body to provide increased contact area.
Key parameters:
nut_profile = high
drive_style = external_hex
through_hole_diameter = 20.0 mm
overall_height = 30.0 mm
flange_diameter = 37.0 mm
flange_thickness = 6.0 mm
hub_width = 30.0 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.