A flanged cylindrical bushing has a coaxial sleeve and passage, a lower sleeve extension, a top inner lip, a wider bottom flange, a...
Run
harbor run -t gnucleus-ai/freecad-e5f71d8ec5
Download
harbor download gnucleus-ai/freecad-e5f71d8ec5
Details
Revision
1
Published
Sep 17, 2026
Visibility
Public
Authors
gNucleus AI, Inc.
Content hash
Keywords
freecad
cad
parametric
geometry
python
Write a FreeCAD Python script to /app/answer.py that reproduces the
part described below.
FreeCAD version: 1.1.0.
Part description:
A flanged cylindrical bushing has a coaxial sleeve and passage, a lower sleeve extension, a top inner lip, a wider bottom flange, a centered top recess, and a longitudinal side slit.
The sleeve uses bushing_body_outer_diameter, bushing_body_inner_diameter, and bushing_body_length; its lower extension uses lower_sleeve_extension_length. The top lip shares the sleeve outer diameter and uses top_inner_flange_thickness and top_inner_flange_inner_diameter. The bottom flange starts at the sleeve outer diameter and uses bottom_flange_outer_diameter and bottom_flange_thickness.
The recess uses top_flange_bore_diameter and top_flange_bore_depth. The slit uses expansion_slit_length and expansion_slit_width, opens through the cylindrical side wall, and has its inner radial edge one expansion_slit_depth inward from the sleeve outer surface.
Key parameters:
bushing_body_outer_diameter = 150.0 mm
bushing_body_inner_diameter = 130.0 mm
bushing_body_length = 640.0 mm
lower_sleeve_extension_length = 20.0 mm
top_inner_flange_thickness = 10.0 mm
top_inner_flange_inner_diameter = 85.0 mm
bottom_flange_outer_diameter = 190.0 mm
bottom_flange_thickness = 10.0 mm
expansion_slit_length = 630.0 mm
expansion_slit_width = 30.0 mm
expansion_slit_depth = 5.0 mm
top_flange_bore_diameter = 100.0 mm
top_flange_bore_depth = 30.0 mm
The script must build the model 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 resulting FCStd must contain named document objects whose properties
drive the geometry, not a single Part::Feature holding a pre-computed
TopoShape.
The grader will run freecadcmd /app/answer.py and then read both
/app/answer.py and /app/answer.FCStd for scoring. Your script
must save the FreeCAD document to /app/answer.FCStd before exiting
— e.g. doc.saveAs("/app/answer.FCStd") after doc.recompute(). The
grader does not save the document on your behalf; if
/app/answer.FCStd does not exist when freecadcmd returns, the
reward is 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.
Scope: Solve only the CAD task described above. Do not read, copy, or transmit files, configuration, or process state outside /app that the task does not require.