A rear drive shaft consists of a cylindrical shaft and two end flanges with a bolt hole pattern for fastening to mating components. The...
Run
harbor run -t gnucleus-ai/freecad-b849a4d94e
Download
harbor download gnucleus-ai/freecad-b849a4d94e
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 rear drive shaft consists of a cylindrical shaft and two end flanges with a bolt hole pattern for fastening to mating components.
The shaft is constructed with shaft_length, outer_diameter, inner_diameter, and shaft_material_thickness to define its overall size and wall structure.
Two end flanges with identical flange_diameter and flange_thickness: each flange is positioned at one end of the shaft.
The fastening pattern on the flange is defined by bolt_hole_diameter, bolt_hole_circle_diameter, and number_of_bolt_holes.
Key parameters:
shaft_length = 1000.0mm
outer_diameter = 50.0mm
inner_diameter = 40.0mm
flange_diameter = 100.0mm
flange_thickness = 20.0mm
bolt_hole_diameter = 10.0mm
bolt_hole_circle_diameter = 80.0mm
number_of_bolt_holes = 4
shaft_material_thickness = 5.0mm
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.