A thick-wall ninety-degree pipe elbow fitting has two perpendicular cylindrical legs, a rounded spherical outside corner, and a continuous...
harbor run -t gnucleus-ai/freecad-dfda590405harbor download gnucleus-ai/freecad-dfda590405Write 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 solid ninety-degree elbow billet consists of two perpendicular cylindrical legs joined by a rounded spherical outside corner. Each leg extends the same distance from the elbow corner and has the same full outside diameter. The outer transition is generated by a semicircular meridian whose radius equals the leg's outer radial extent.
Base part key parameters:
Edit instruction:
Turn the solid elbow billet into a continuous thick-wall pipe fitting by adding the internal passage. At each open leg end, begin with bore_diameter_at_elbow_face, taper inward to bore_step_height at bore_step_offset_from_axis measured from the elbow corner, then step down to pipe_inner_diameter and continue at that diameter to the corner. Use second_face_bore_diameter for the corner-side portion of the perpendicular leg. Join the two passages with a hemispherical concave internal corner whose diameter is pipe_inner_diameter and whose meridional span is second_face_bore_arc_central_angle. Keep both outer cylindrical legs and the spherical outside corner unchanged.
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.