A pulley wheel with mounting lugs is a single axisymmetric wheel body with a central hub and bore, a stepped web-and-rim shell, and a...
harbor run -t gnucleus-ai/freecad-72ede22ab3harbor download gnucleus-ai/freecad-72ede22ab3Write a FreeCAD Python script to /app/answer.py that reproduces the
part described below.
FreeCAD version: 1.1.0.
Part description:
A pulley wheel with mounting lugs is a single axisymmetric wheel body with a central hub and bore, a stepped web-and-rim shell, and a symmetric two-lug mounting plate.
Use global Y as the wheel axis, with the wheel extending rearward from the front plane in the negative Y direction; global X and Z span the radial plane. The wheel body is complete around the axis. At the front plane, the bore and hub are defined by center_bore_diameter and hub_outer_diameter. The bore wall continues rearward by center_bore_axial_depth, where the section extends outward to inner_web_small_diameter. A straight web transition then reaches rim_inner_small_diameter at the rear plane set by pulley_overall_width.
The outer rim is defined by pulley_outer_diameter and extends forward from the rear plane to its front shoulder. The setback of this shoulder from the front plane equals the radius defined by rim_inner_large_diameter, which also sets the inner rim size at that station. From there, a straight transition reaches inner_web_large_diameter at the station set by hub_axial_width, then returns radially to the hub. This leaves the back of the wheel open around the hub while retaining the stepped rim and web.
The mounting plate occupies the front axial band and extends rearward by pulley_base_plate_thickness; lug_plate_pad_depth describes the same physical extent. In the X-Z plane its outline is symmetric about both centerlines. The central region is defined by central_web_half_length and central_web_outer_half_height. The two lug centers lie on the horizontal centerline, equally offset to opposite sides by mounting_hole_center_half_spacing. Each outer lug end is a semicircle defined by mounting_lug_outer_arc_radius and mounting_lug_outer_arc_central_angle. Four equal tangent transition fillets defined by mounting_lug_fillet_radius and mounting_lug_fillet_central_angle connect the lug ends to the central region, and straight tangent segments complete the symmetric outline.
A through hole of mounting_hole_diameter is concentric with each lug and runs parallel to the wheel axis through the full mounting plate. The plate meets the hub and web at the front, while lug_plate_attachment_y identifies the corresponding rear hub-and-web shelf.
Key parameters:
center_bore_diameter = 25.0 mm
hub_outer_diameter = 40.0 mm
pulley_outer_diameter = 195.0 mm
pulley_overall_width = 95.0 mm
hub_axial_width = 55.0 mm
center_bore_axial_depth = 70.0 mm
inner_web_small_diameter = 131.54 mm
inner_web_large_diameter = 147.54 mm
rim_inner_small_diameter = 144.0 mm
rim_inner_large_diameter = 160.0 mm
pulley_base_plate_thickness = 20.0 mm
number_of_mounting_lugs = 2
number_of_mounting_holes = 2
mounting_hole_diameter = 15.0 mm
mounting_hole_center_half_spacing = 47.5 mm
mounting_lug_outer_arc_radius = 17.0 mm
mounting_lug_outer_arc_central_angle = 180.0 degrees
mounting_lug_fillet_radius = 13.0 mm
mounting_lug_fillet_central_angle = 90.0 degrees
central_web_half_length = 25.0 mm
central_web_outer_half_height = 34.5 mm
lug_plate_attachment_y = -55.0 mm
lug_plate_pad_depth = 20.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.