An L-triangle bracket plate consists of a constant-depth triangular bracket body, perpendicular vertical and horizontal arms, a bottom...
harbor run -t gnucleus-ai/freecad-4f5de1d9fcharbor download gnucleus-ai/freecad-4f5de1d9fcWrite a FreeCAD Python script to /app/answer.py that reproduces the
part described below.
FreeCAD version: 1.1.0.
Part description:
An L-triangle bracket plate consists of a constant-depth triangular bracket body, perpendicular vertical and horizontal arms, a bottom hollow recess, and one rounded mounting slot through the outer face of each arm.
Use the shared outside corner of the vertical and horizontal arms as the profile datum. In the main side profile, positive horizontal distance runs toward the free end of the horizontal arm, positive vertical distance runs toward the free end of the vertical arm, and depth is normal to this profile. The outer edges reach l_triangle_bracket_plate_length and l_triangle_bracket_plate_height, and the profile remains constant through l_triangle_bracket_plate_depth. Each arm has l_triangle_bracket_plate_flange_thickness. At the vertical-arm free end, the inner boundary is inset by the flange thickness and runs back toward the shared corner for l_triangle_bracket_plate_vertical_inner_straight_length. At the horizontal-arm free end, the inner boundary is inset by the flange thickness and runs back toward the shared corner for l_triangle_bracket_plate_horizontal_inner_straight_length. A single straight diagonal joins the ends of those two inner straight portions.
The bottom hollow recess is a rectangular through opening on the outer face of the horizontal arm. Its face-local origin is the shared outside corner on one broad side of the bracket; local x follows the horizontal arm toward its free end, while negative local y crosses the bracket depth toward the opposite broad side. The rectangle is centered at bottom_hollow_recess_center_x_offset and bottom_hollow_recess_center_y_offset in that frame, has bottom_hollow_recess_length by bottom_hollow_recess_width, and passes completely through the horizontal arm.
The left mounting slot lies on the outer face of the vertical arm. On that face, the local origin is the shared outside corner on one broad side, negative local x crosses the bracket depth, and negative local y runs toward the vertical-arm free end. The capsule is centered at left_mounting_slot_center_x_offset and left_mounting_slot_vertical_offset in that frame, with its long axis parallel to the vertical arm. It has overall length left_mounting_slot_length and two equal semicircular ends of radius left_mounting_slot_arc_radius joined by straight tangent sides. The slot passes completely through the vertical arm.
The top mounting slot lies on the outer face of the horizontal arm. On that face, the local origin is the shared outside corner on one broad side, positive local x follows the horizontal arm toward its free end, and positive local y crosses the bracket depth. The capsule is centered at top_mounting_slot_horizontal_offset and top_mounting_slot_center_y_offset in that frame, with its long axis parallel to the horizontal arm. It has overall length top_mounting_slot_length and two equal semicircular ends of radius top_mounting_slot_arc_radius joined by straight tangent sides. The slot passes completely through the horizontal arm.
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.