A wooden ladder consists of two parallel side rails and a set of equally spaced rungs connecting the rails. Each side rail is a rectangular...
Run
harbor run -t gnucleus-ai/freecad-db4e2a4bcf
Download
harbor download gnucleus-ai/freecad-db4e2a4bcf
Details
Revision
2
Published
Sep 3, 2026
Visibility
Public
Authors
gNucleus AI, Inc.
Content hash
Keywords
freecad
cad
parametric
geometry
python
Write a FreeCAD Python script to answer.py that reproduces the
part described below.
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 the generated model as an .FCStd file next to the script, using
the script stem as the output basename. The output path must be derived
from __file__ at runtime; do not hardcode the path or rely on the
current working directory. Only the FCStd written next to the executing
script file is graded.
Part description:
A wooden ladder consists of two parallel side rails and a set of equally spaced rungs connecting the rails. Each side rail is a rectangular prism defined by ladder_side_rails_length, ladder_side_rail_width (in-plane), and ladder_side_rail_thickness (out-of-plane). Each rung is a rectangular prism defined by ladder_rung_length (clear span between the inner faces of the two side rails), ladder_rung_width (vertical/in-plane), and ladder_rung_thickness (out-of-plane). Rungs are patterned along the ladder length with ladder_number_of_rungs instances at ladder_rung_spacing pitch, aligned perpendicular to the side rails and centered between them.
Key parameters:
Side rails (2x)
ladder_side_rails_length = 2400 mm
ladder_side_rail_width = 40 mm
ladder_side_rail_thickness = 90 mm
side_rail_outer_to_outer_width = ladder_rung_length + 2 * ladder_side_rail_width = 400 mm + 2 * 40 mm = 480 mm
Rungs (patterned)
ladder_number_of_rungs = 7
ladder_rung_length = 400 mm
ladder_rung_width = 40 mm
ladder_rung_thickness = 40 mm
ladder_rung_spacing = 300 mm
rungs_total_span_along_length = (ladder_number_of_rungs - 1) * ladder_rung_spacing = (7 - 1) * 300 mm = 1800 mm
FreeCAD version: 1.1.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.