A steering knuckle with an integral bracket arm is a flat, constant-depth component with a central hub ring, an outward arm, a spindle...
harbor run -t gnucleus-ai/freecad-d3e6e6c29fharbor download gnucleus-ai/freecad-d3e6e6c29fWrite a FreeCAD Python script to /app/answer.py that reproduces the
part described below.
FreeCAD version: 1.1.0.
Part description:
A steering knuckle with an integral bracket arm is a flat, constant-depth component with a central hub ring, an outward arm, a spindle boss, and two bracket tabs. Its thickness is body_depth.
The hub ring is centered at the origin and uses hub_outer_arc_radius and hub_inner_diameter. The spindle boss lies at spindle_center_offset_x on the arm axis and contains a through bore of spindle_bore_diameter. The part is mirror-symmetric about the arm axis.
The arm joins the hub and spindle boss with straight flanks and tangent inner and outer blends defined by bracket_arm_outer_width, the listed fillet radii, and their center positions. A centered capsule slot runs through the arm between bracket_arm_slot_left_center_x and bracket_arm_slot_right_center_x.
Two bracket tabs extend from the hub, one on each side of the arm axis, using bracket_tab_width and the listed inner and outer extents. A cross-drilled hole of center_bore_diameter runs along the tab axis through both tabs and the hub ring, centered through the plate thickness.
The outer profile uses the listed hub, arm-blend, and spindle-boss arc limits, measured counter-clockwise from global +X. Adjacent arcs and straight flanks meet tangentially at the +90-degree or -90-degree circle extrema.
Key parameters:
body_depth = 15.0 mm
spindle_bore_diameter = 15.0 mm
spindle_boss_diameter = 24.0 mm
spindle_center_offset_x = -100.0 mm
hub_outer_arc_radius = 26.9 mm
hub_inner_diameter = 41.7 mm
bracket_arm_outer_fillet_radius = 26.9 mm
bracket_arm_inner_fillet_radius = 24.0 mm
bracket_arm_outer_width = 18.0 mm
bracket_arm_slot_end_arc_radius = 5.0 mm
bracket_arm_slot_width = 10.0 mm
bracket_arm_slot_left_center_x = -77.8 mm
bracket_arm_slot_right_center_x = -41.8 mm
bracket_tab_width = 16.0 mm
bracket_tab_outer_extent_y = 47.0 mm
bracket_tab_inner_extent_y = 25.6828737 mm
arm_inner_fillet_center_left_x = -85.6125054 mm
arm_inner_fillet_center_left_y = 33.0 mm
arm_outer_fillet_center_right_x = -40.0703132 mm
arm_outer_fillet_center_right_y = 35.9 mm
center_bore_diameter = 10.0 mm
center_bore_y_offset = 7.5 mm
hub_outer_arc_lower_start_angle = -138.1420401 degrees
hub_outer_arc_lower_end_angle = -107.301374 degrees
hub_outer_arc_upper_start_angle = 107.301374 degrees
hub_outer_arc_upper_end_angle = 138.1420401 degrees
hub_outer_arc_right_start_angle = -72.698626 degrees
hub_outer_arc_right_end_angle = 72.698626 degrees
arm_outer_fillet_lower_start_angle = 41.8579599 degrees
arm_outer_fillet_upper_end_angle = -41.8579599 degrees
arm_inner_fillet_lower_end_angle = 113.5564643 degrees
arm_inner_fillet_upper_start_angle = -113.5564643 degrees
spindle_boss_arc_start_angle = 66.4435357 degrees
spindle_boss_arc_end_angle = -66.4435357 degrees
hub_inner_ring_split_angle_1 = 67.4373731 degrees
hub_inner_ring_split_angle_2 = 112.5626269 degrees
hub_inner_ring_split_angle_3 = 247.4373731 degrees
hub_inner_ring_split_angle_4 = 292.5626269 degrees
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.