A circular flange consists of a cylindrical flange body with a plain through bore and a bolt-hole pattern arranged on a bolt circle for...
Run
harbor run -t gnucleus-ai/freecad-2c186f799d
Download
harbor download gnucleus-ai/freecad-2c186f799d
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 circular flange consists of a cylindrical flange body with a plain through bore and a bolt-hole pattern arranged on a bolt circle for fastening.
The flange body is defined by outer_diameter and flange_thickness, with the central through bore defined by bore_diameter.
The bolt-hole pattern is located on bolt_circle_diameter, with individual holes sized by bolt_hole_diameter and the quantity set by number_of_bolt_holes.
Key parameters:
outer_diameter = 125.4125 mm
flange_thickness = 23.01875 mm
bore_diameter = 64.690625 mm
bolt_circle_diameter = 103.1875 mm
bolt_hole_diameter = 13.49375 mm
number_of_bolt_holes = 4
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.