A cylindrical clevis pin is oriented along the longitudinal X direction and has a concentric axial through bore. Its overall length is...
harbor run -t gnucleus-ai/freecad-e6ffa6880dharbor download gnucleus-ai/freecad-e6ffa6880dWrite a FreeCAD Python script to /app/answer.py that reproduces the
part described below.
FreeCAD version: 1.1.0.
Part description:
A cylindrical clevis pin is oriented along the longitudinal X direction and has a concentric axial through bore. Its overall length is centered at outer_fork_cutouts_center_x_offset. The middle shank uses tapered_clevis_pin_outer_diameter, reduces linearly over tapered_clevis_pin_taper_length at both ends, and finishes at tapered_clevis_pin_end_diameter. tapered_clevis_pin_inner_diameter controls the bore.
The fork geometry consists of two identical opposed openings through the pin in the Z direction and one central capsule-shaped slot through the pin in the orthogonal Y direction. Each outer opening has two equal circular end arcs of outer_fork_cutouts_radius. Their centers are separated longitudinally by outer_fork_cutouts_width and are symmetric about outer_fork_cutouts_center_x_offset. The two opening centerlines are symmetric about outer_fork_cutouts_center_y_offset, with a clear transverse spacing of outer_fork_cutouts_spacing between the inward arc extrema. Each end arc spans outer_fork_cutouts_arc_angle from its inward transverse direction. An inner straight tangent joins the two arc extrema; an outer straight segment spans the shank taper-transition stations; straight tangent connectors close the profile. The lower opening is the mirror of the upper opening about their shared transverse center. Both openings pass completely from one outer tangent surface of the pin to the opposite surface.
The central slot is a longitudinal capsule centered at central_fork_slot_center_x_offset on the pin axis. Its end-to-end length is central_fork_slot_length and its width is central_fork_slot_width, with semicircular ends joined by straight tangent sides. It passes completely through the pin in the Y direction.
Key parameters:
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.