A complete, axisymmetric spoked flywheel consists of a central hub, evenly distributed radial spokes, a broad outer rim, and concentric...
harbor run -t gnucleus-ai/freecad-86bef26ecbharbor download gnucleus-ai/freecad-86bef26ecbWrite a FreeCAD Python script to /app/answer.py that reproduces the
part described below.
FreeCAD version: 1.1.0.
Part description:
A complete, axisymmetric spoked flywheel consists of a central hub, evenly distributed radial spokes, a broad outer rim, and concentric annular rim grooves, all aligned about a common rotational axis. Each rounded inter-spoke opening passes entirely from the outward-facing positive axial end face to the opposite negative axial end face.
The complete circular body is defined by a radial-axial section symmetric about the central axial plane. From the outer rim toward the hub, the positive-side rim contour has the named stations (rim_outer_radius, rim_outer_face_half_width), (rim_outer_chamfer_inner_radius, rim_land_half_width), (rim_land_inner_radius, rim_land_half_width), (rim_groove_1_outer_radius, rim_groove_1_half_width), (rim_groove_1_inner_radius, rim_groove_1_half_width), (rim_groove_2_outer_radius, rim_groove_2_outer_half_width), (rim_groove_2_outer_radius, rim_groove_2_inner_half_width), (rim_hub_land_radius, rim_groove_2_inner_half_width), and (rim_hub_land_radius, rim_land_half_width); the negative-side contour is its mirror. The rounded hub ends are quarter arcs of hub_end_profile_arc_radius, centered at equal positive and negative hub_arc_center_axial_offset, tangent to the axial closure and hub-side land.
One inter-spoke opening is defined on the positive axial end face in a plane whose origin is the common axis, with a radial datum through the seed and a perpendicular tangential direction. Its closed boundary, in order, is the origin-centered inner clearance arc, the inner-lower fillet, the inclined closing edge, the outer-lower fillet, the origin-centered outer clearance arc, the outer-upper fillet, the straight closing edge, and the inner-upper fillet. The inner-lower fillet is tangent to the inner clearance arc and inclined closing edge; the outer-lower fillet is tangent to that inclined edge and the outer clearance arc; the outer-upper fillet is tangent to the outer clearance arc and straight closing edge; and the inner-upper fillet is tangent to the straight closing edge and inner clearance arc. The four spoke_cutout_corner_radius fillets are located by their named independent center offsets and the stated tangency relations.
The complete opening seed is repeated spoke_count times at equal angular intervals about the common axis, leaving evenly distributed radial spokes.
Key parameters:
hub_end_profile_arc_radius = 11.00 mm
hub_arc_center_axial_offset = 9.00 mm
hub_end_profile_arc_central_angle = 90.0 degrees
wheel_circular_angle = 360.0 degrees
rim_outer_radius = 100.00 mm
rim_outer_face_half_width = 11.89 mm
rim_outer_chamfer_inner_radius = 95.00 mm
rim_land_inner_radius = 85.00 mm
rim_land_half_width = 9.00 mm
rim_groove_1_outer_radius = 80.00 mm
rim_groove_1_inner_radius = 75.00 mm
rim_groove_1_half_width = 6.11 mm
rim_groove_2_outer_radius = 60.00 mm
rim_groove_2_outer_half_width = 2.09 mm
rim_groove_2_inner_half_width = 6.00 mm
rim_hub_land_radius = 50.00 mm
hub_clearance_arc_radius = 16.00 mm
rim_clearance_arc_radius = 45.00 mm
spoke_cutout_corner_radius = 5.00 mm
cutout_inner_upper_fillet_center_x = 5.00 mm
cutout_inner_lower_fillet_center_x = 9.28 mm
cutout_inner_lower_fillet_center_y = 18.84 mm
cutout_outer_lower_fillet_center_x = 21.68 mm
cutout_outer_lower_fillet_center_y = 33.62 mm
cutout_outer_upper_fillet_center_x = 5.00 mm
cutout_inclined_edge_inner_x = 13.11 mm
cutout_inclined_edge_inner_y = 15.62 mm
cutout_inclined_edge_outer_x = 25.51 mm
cutout_inclined_edge_outer_y = 30.40 mm
spoke_count = 7
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.