A flanged wheel hub motor is a single rotationally symmetric body with a centered axial shaft, a cylindrical housing, two peripheral...
harbor run -t gnucleus-ai/freecad-03561c2ec4harbor download gnucleus-ai/freecad-03561c2ec4Write a FreeCAD Python script to /app/answer.py that reproduces the
part described below.
FreeCAD version: 1.1.0.
Part description:
A flanged wheel hub motor is a single rotationally symmetric body with a centered axial shaft, a cylindrical housing, two peripheral mounting flanges, and unequal stepped end structures. Its governing half cross-section lies in a plane through the shaft axis. Axial stations are measured from the hub-axis datum, radial dimensions are measured outward from that axis, and the axis closes the profile between left_axial_tip and right_axial_tip. This cross-section completes one full 360-degree revolution about the shaft axis.
The central housing has radius housing_outer_radius between housing_left_axial_station and housing_right_axial_station. The left and right flanges start at that same radial station and extend to flange_outer_radius; their named inner and outer face stations define their thicknesses. The named rim, shoulder, and neck transition stations fix the asymmetric rounded transitions between those cylindrical surfaces.
On the left, the shaft reaches left_shaft_shoulder_axial_station before a stepped bearing collar. The collar rises from left_collar_base_radius through its named lip and outer stations, then joins a 45-degree tapered web between left_taper_start and left_taper_end. The web joins the left housing neck, then the left flange. On the right, the housing neck reduces through the named right taper to the radial land and bearing shoulder before stepping down to the shaft. Every named straight, tapered, and cylindrical segment is joined tangentially by the applicable transition radius and orientation. A rounded transition is either a 90-degree quadrant from a radial to an axial tangent, a 180-degree semicircle between opposed tangencies, or the corresponding -90-degree clockwise quadrant; the named transition orientation selects the applicable case.
The mounting holes are uniformly spaced on a bolt circle centered on the shaft axis. Their axes are parallel to the shaft and pass completely through both flanges. Each axial end face also has a symmetric pair of recessed rectangular cutouts. On the shared transverse diameter, cutout_pair_negative_edge_offset locates the negative-side outer edge; mirror symmetry fixes the corresponding positive-side cutout. The rectangles' long directions are perpendicular to that diameter. One mounting-hole center lies on this same transverse diameter. The right pair uses right_cutout dimensions and the left pair uses left_cutout dimensions.
Key parameters:
left_axial_tip = -11.75 mm
right_axial_tip = 188.25 mm
shaft_radius = 6.00 mm
shaft_shoulder_radius = 10.00 mm
left_shaft_shoulder_axial_station = 28.25 mm
left_collar_inner_axial_station = 30.75 mm
left_collar_base_radius = 26.58 mm
left_collar_lip_radius = 27.08 mm
left_collar_lip_end_axial_station = 34.25 mm
left_collar_outer_axial_station = 35.25 mm
left_collar_outer_radius = 36.15 mm
left_taper_start_axial_station = 35.40 mm
left_taper_start_radius = 36.50 mm
left_taper_end_axial_station = 46.75 mm
left_taper_end_radius = 47.85 mm
left_housing_neck_radius = 57.00 mm
left_flange_outer_face_axial_station = 54.75 mm
left_flange_inner_face_axial_station = 59.75 mm
housing_left_axial_station = 60.75 mm
housing_right_axial_station = 101.75 mm
right_flange_inner_face_axial_station = 102.75 mm
right_flange_outer_face_axial_station = 107.75 mm
housing_outer_radius = 60.00 mm
flange_outer_radius = 69.50 mm
housing_end_transition_fillet_radius = 3.00 mm
flange_shoulder_fillet_radius = 1.00 mm
flange_outer_corner_fillet_radius = 2.00 mm
flange_inner_corner_fillet_radius = 0.50 mm
right_housing_neck_axial_station = 115.75 mm
right_housing_neck_inner_radius = 22.00 mm
right_housing_neck_outer_radius = 57.00 mm
right_taper_end_axial_station = 117.27 mm
right_taper_end_radius = 20.00 mm
right_land_start_axial_station = 118.75 mm
right_bearing_shoulder_axial_station = 127.75 mm
right_bearing_shoulder_radius = 17.00 mm
right_shaft_shoulder_axial_station = 155.75 mm
number_of_mounting_holes = 18
mounting_hole_diameter = 2.60 mm
mounting_bolt_circle_radius = 63.25 mm
rectangular_cutout_count = 2
right_cutout_width = 2.00 mm
right_cutout_height = 10.28 mm
right_cutout_lower_transverse_coordinate = -5.14 mm
right_cutout_depth = 32.50 mm
left_cutout_width = 2.00 mm
left_cutout_height = 20.00 mm
left_cutout_depth = 40.00 mm
left_flange_outer_rim_axial_station = 56.75 mm
flange_outer_rim_radial_station = 67.50 mm
left_flange_inner_rim_axial_station = 59.25 mm
flange_inner_rim_radial_station = 69.00 mm
flange_rim_transition_entry_angle = 0.0 degrees
flange_shoulder_transition_radial_station = 61.00 mm
flange_shoulder_transition_exit_angle = 270.0 degrees
left_housing_neck_transition_axial_station = 49.75 mm
left_flange_shoulder_transition_axial_station = 53.75 mm
right_flange_inner_rim_axial_station = 103.25 mm
right_flange_outer_rim_axial_station = 105.75 mm
right_flange_shoulder_transition_axial_station = 108.75 mm
right_housing_neck_transition_axial_station = 112.75 mm
left_collar_lip_transition_radial_station = 28.08 mm
left_collar_outer_transition_axial_station = 35.75 mm
left_collar_outer_transition_angle = 135.0 degrees
left_collar_base_transition_axial_station = 31.25 mm
mounting_pattern_axis_offset = 0.00 mm
cutout_pair_negative_edge_offset = -7.00 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.