A trussed wall-hook bracket is a single prismatic side-profile body with a sloping upper web, three side lightening windows, a rounded...
harbor run -t gnucleus-ai/freecad-8a6bbd1314harbor download gnucleus-ai/freecad-8a6bbd1314Write a FreeCAD Python script to /app/answer.py that produces the
edited part described below.
This is a two-step task. First, build the base part from its description
and parameters. Then apply the edit instruction to that base to produce
the target part. Both .FCStd files are graded — the base and the
target — so the script must emit both, and each must be built through
editable PartDesign features (not a baked compound).
The model must be built 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 saved FCStd must contain named document objects whose properties drive the geometry, not a single Part::Feature holding a pre-computed TopoShape.
Save two .FCStd files next to the script:
<script_stem>_base.FCStd — the base part before the edit<script_stem>_edit.FCStd — the target part after the edit is appliedBoth output paths must be derived from __file__ at runtime; do not
hardcode them or rely on the current working directory. Only the two
files written next to the executing script are graded.
FreeCAD version: 1.1.0.
Base part description:
A trussed wall-hook bracket is a constant-depth wedge with a sloping upper web and stepped back wall. Its X-Y side envelope uses body_width and body_height, with the inner wall and lower return joined by body_corner_radius. The vertical surface at right_face_top_y contains three blind rounded triangular openings of side_truss_cut_depth arranged inside a side_truss_profile_width by side_truss_profile_height envelope. Their tangent diagonals and rounds leave a W-shaped load-carrying truss. The base does not yet include the rounded top-shelf window or the three blind bottom mounting holes.
Base part key parameters:
Edit instruction:
Cut a through lightening window in the top shelf. Bound it with four equal rounds of top_shelf_cutout_fillet_radius joined by common tangents. Center the window at X = top_shelf_cutout_center_x with overall top_shelf_cutout_width and top_shelf_cutout_height. Place the two upper round centers at top_shelf_cutout_top_center_y and the lower-left round center at top_shelf_cutout_lower_left_center_y; use top_shelf_cutout_slope_angle for the lower tangent boundary and its remaining round.
From the bottom surface, add three blind mounting holes of mount_hole_diameter and mount_hole_depth. Place the lone hole at mount_hole_left_center_x on the common depthwise centerline mount_hole_center_y. Place the other two at mount_hole_pair_center_x as a symmetric depthwise pair about that centerline, separated center-to-center by mount_hole_pair_spacing. Preserve the wedge envelope, W-shaped side truss, all existing lightening windows, and all retained dimensions.
Target key parameters:
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.