A trussed upper plate consists of a thin, planar outer frame with rounded corners, repeated diagonal truss webs, open cutouts, peripheral...
harbor run -t gnucleus-ai/freecad-2002df3ce7harbor download gnucleus-ai/freecad-2002df3ce7Write a FreeCAD Python script to /app/answer.py that reproduces the
part described below.
FreeCAD version: 1.1.0.
Part description:
A trussed upper plate consists of a thin, planar outer frame with rounded corners, repeated diagonal truss webs, open cutouts, peripheral mounting holes, and a centered end extension.
The outer profile is centered on truss_layout_symmetry_axis_x and is the union of three rectangular sections: large_outer_rectangle, middle_outer_rectangle, and small_outer_rectangle. The large rectangle has two mirrored trapezoidal side recesses on each side, with equal diagonal flanks, and a centered lower flat bounded by symmetric rounded chamfers. The two upper corners of the large rectangle have chamfer setback large_outer_rectangle_upper_corner_chamfer_setback. All rectangular-section corner chamfers use rectangular_section_corner_chamfer_fillet_radius.
The truss layout is centered on truss_layout_symmetry_axis_x. All named layout x and y coordinates use a sketch frame at the global origin. Rotate this frame from the global XY plane by -base_sketch_plane_rotation_angle about global +X, using the right-hand convention. Thus layout +x points along global +X, layout +y points along global -Z, and the plate extends from global Y=0 in the +Y direction by plate_thickness. Its triangular substructures are six large triangles, six medium triangles, two right triangles, one small triangle, and two chamfer-cut right triangles. Each strictly isosceles triangle is defined by its centroid, ideal base length, and base angle; its rounded profile uses truss_cutout_transition_radius. large_triangular_opening_pair_01 through _03 and medium_triangular_opening_pair_01 through _02 each define two mirrored isosceles openings. The first and third large pairs have exterior vertical bases, while the second has interior vertical bases. The first medium pair has lower horizontal bases and the second has upper horizontal bases. medium_triangular_opening_pair_03 has an interior vertical base and two diagonal flanks meeting at a rounded exterior apex. An upper horizontal truncation joins the interior base to the upper flank; all four transitions are rounded with truss_cutout_transition_radius. The two right triangles and the small triangle have lower horizontal bases and upward apices. The chamfer-cut right triangles have upper horizontal bases, exterior vertical legs, and rounded diagonal cut corners.
central_trapezoidal_opening defines the remaining non-triangular internal loop; together with the seventeen triangular openings, it forms eighteen internal loops. It shares truss_layout_symmetry_axis_x with the outer profile and center bore. Its rounded six-sided boundary has an upper horizontal edge, two upper vertical sidewalls, two lower flanks sloping inward toward the bottom, and a lower horizontal edge. The lower flanks are inclined by truss_diagonal_angle_family_3 from the vertical. The finished straight lower edge has central_trapezoidal_opening_lower_flat_width. All six corners are tangent rounds of central_trapezoidal_opening_corner_radius; the named envelope and center locate the complete boundary. The plate body is governed by plate_thickness. The triangular transitions use truss_cutout_transition_radius, while central_trapezoidal_opening uses central_trapezoidal_opening_corner_radius. The mounting holes and center bore are governed by their respective diameters, pair spacings, rows, and axes.
Key parameters:
plate_thickness = 8.00 mm
base_sketch_plane_rotation_angle = 90.0 degrees
large_outer_rectangle_width = 280.00 mm
large_outer_rectangle_height = 447.00 mm
large_outer_rectangle_center_y = -51.00 mm
middle_outer_rectangle_width = 144.00 mm
middle_outer_rectangle_height = 64.00 mm
middle_outer_rectangle_center_y = 204.50 mm
small_outer_rectangle_width = 52.00 mm
small_outer_rectangle_height = 38.00 mm
small_outer_rectangle_center_y = 255.50 mm
rectangular_section_corner_chamfer_fillet_radius = 10.00 mm
large_outer_rectangle_lower_corner_chamfer_flat_width = 200.00 mm
large_outer_rectangle_upper_corner_chamfer_setback = 17.00 mm
large_outer_rectangle_side_trapezoidal_recess_depth = 17.00 mm
large_outer_rectangle_side_trapezoidal_recess_01_center_y = -149.50 mm
large_outer_rectangle_side_trapezoidal_recess_01_outer_height = 98.28 mm
large_outer_rectangle_side_trapezoidal_recess_01_inner_flat_height = 47.72 mm
large_outer_rectangle_side_trapezoidal_recess_02_center_y = 25.50 mm
large_outer_rectangle_side_trapezoidal_recess_02_outer_height = 148.28 mm
large_outer_rectangle_side_trapezoidal_recess_02_inner_flat_height = 97.72 mm
truss_layout_symmetry_axis_x = 0.00 mm
truss_cutout_transition_radius = 3.00 mm
truss_diagonal_angle_family_1 = 27.3777028 degrees
truss_diagonal_angle_family_2 = 63.4349488 degrees
truss_diagonal_angle_family_3 = 28.8386275 degrees
truss_diagonal_angle_family_4 = 46.1233027 degrees
truss_diagonal_angle_family_5 = 165.8183429 degrees
mounting_hole_diameter = 4.30 mm
center_bore_diameter = 7.00 mm
center_bore_axis_y = 264.50 mm
center_mounting_hole_pair_half_spacing = 18.00 mm
upper_inner_mounting_hole_pair_half_spacing = 62.00 mm
lower_inner_mounting_hole_pair_half_spacing = 61.76 mm
upper_inner_mounting_hole_pair_y = 226.50 mm
lower_inner_mounting_hole_pair_y = 165.50 mm
side_mounting_hole_axis_x = 136.00 mm
side_mounting_hole_row_1_y = 137.50 mm
side_mounting_hole_row_2_y = 113.50 mm
side_mounting_hole_row_3_y = -62.50 mm
side_mounting_hole_row_4_y = -86.50 mm
side_mounting_hole_row_5_y = -216.32 mm
side_mounting_hole_row_6_y = -240.32 mm
large_triangular_opening_pair_01_02_base_length = 141.90 mm
large_triangular_opening_pair_01_02_base_angle = 27.3777028 degrees
large_triangular_opening_pair_01_positive_member_centroid_x = 86.75 mm
large_triangular_opening_pair_01_positive_member_centroid_y = -170.50 mm
large_triangular_opening_pair_02_positive_member_centroid_x = 24.25 mm
large_triangular_opening_pair_02_positive_member_centroid_y = -170.50 mm
large_triangular_opening_pair_03_positive_member_centroid_x = 86.78 mm
large_triangular_opening_pair_03_positive_member_centroid_y = 16.50 mm
large_triangular_opening_pair_03_base_length = 133.12 mm
large_triangular_opening_pair_03_base_angle = 28.8386275 degrees
medium_triangular_opening_pair_01_02_base_length = 73.49 mm
medium_triangular_opening_pair_01_02_base_angle = 62.6222972 degrees
medium_triangular_opening_pair_01_positive_member_centroid_x = 55.50 mm
medium_triangular_opening_pair_01_positive_member_centroid_y = -230.85 mm
medium_triangular_opening_pair_02_positive_member_centroid_x = 55.50 mm
medium_triangular_opening_pair_02_positive_member_centroid_y = -110.15 mm
medium_triangular_opening_pair_03_center_x = 30.11 mm
medium_triangular_opening_pair_03_center_y = -7.95 mm
medium_triangular_opening_pair_03_envelope_width = 36.23 mm
medium_triangular_opening_pair_03_envelope_height = 66.89 mm
right_triangular_opening_pair_base_length = 73.30 mm
right_triangular_opening_pair_base_angle = 61.1613725 degrees
right_triangular_opening_01_centroid_x = 55.50 mm
right_triangular_opening_01_centroid_y = -40.31 mm
central_trapezoidal_opening_center_y = 96.50 mm
central_trapezoidal_opening_corner_radius = 10.00 mm
central_trapezoidal_opening_envelope_width = 184.30 mm
central_trapezoidal_opening_envelope_height = 118.00 mm
central_trapezoidal_opening_lower_flat_width = 108.61 mm
small_triangular_opening_centroid_x = 0.00 mm
small_triangular_opening_centroid_y = 186.39 mm
small_triangular_opening_base_length = 86.69 mm
small_triangular_opening_base_angle = 43.8766972 degrees
chamfer_cut_right_triangular_opening_01_center_x = -32.55 mm
chamfer_cut_right_triangular_opening_01_center_y = 203.69 mm
chamfer_cut_right_triangular_opening_01_envelope_width = 38.90 mm
chamfer_cut_right_triangular_opening_01_envelope_height = 37.63 mm
chamfer_cut_right_triangular_opening_02_center_x = 32.55 mm
chamfer_cut_right_triangular_opening_02_center_y = 203.69 mm
chamfer_cut_right_triangular_opening_02_envelope_width = 38.90 mm
chamfer_cut_right_triangular_opening_02_envelope_height = 37.63 mm
right_triangular_opening_02_centroid_x = -55.50 mm
right_triangular_opening_02_centroid_y = -40.31 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.