linear_pattern
Repeat base features along a sketch axis in FreeCAD to create a linear pattern, specifying total length and number of copies.
Instructions
Repeat features along a sketch axis (PartDesign::LinearPattern).
axis_sketch/axis MUST name the sketch that owns the H_Axis/V_Axis/N_Axis
datum you want to pattern along — never a feature's Profile link. Passing
a feature reference there resolves to a nested link FreeCAD rejects, or
silently patterns nothing.
`originals` MUST be base features (a Pad or Pocket), never another
pattern. PartDesign cannot pattern a pattern: given one it produces a
perfectly valid solid that changed nothing, which this tool now reports
as a failure rather than a success.
So to build a GRID of holes, do NOT pattern a row along the
perpendicular axis. Put the whole row in ONE sketch (several add_circle
calls), pocket it once so the row is a single base feature, then pattern
that once. Verified: a 2-circle sketch pocketed and patterned gives
exactly 4 holes, while patterning a row feature gives 2 and silently
claims success.
Args:
doc_name: The name of the document.
body_name: The name of the PartDesign::Body.
name: The name to give the new LinearPattern feature.
originals: Names of the feature(s) to repeat.
axis_sketch: Name of the sketch owning the axis datum to pattern along.
axis: Which datum on axis_sketch: "H_Axis", "V_Axis", or "N_Axis".
length: Total span of the pattern in mm.
occurrences: Total number of copies, including the original (>= 2).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| axis | No | H_Axis | |
| name | Yes | ||
| length | No | ||
| doc_name | Yes | ||
| body_name | Yes | ||
| originals | Yes | ||
| axis_sketch | Yes | ||
| occurrences | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |