create_reference_axis
Create a reference axis from two plane intersection; use as rotation axis for circular patterns when cylindrical faces are unavailable.
Instructions
Create a reference axis (eje de referencia) at the intersection of two planes — or, where supported, from a single feature reference.
Two ways to call:
Two planes (recommended for v1) — pass both
reference_nameandreference_2as plane names. The axis is created at their intersection. Verified live for default-plane combinations (Alzado + Planta, Alzado + Vista lateral, etc.). The most reliable v1 axis source.Single reference (limited) — pass only
reference_name. Currently works for refplane / refaxis feature names, but face/edge names ("Cara@Pieza1") don't resolve in part-document context in this SolidWorks binding. Until face introspection ships, prefer the two-plane path.
World-axis mapping for the two-plane intersection mode. The intersection of two default planes through the origin lies along one of the world axes — which one depends on the pair you pick:
reference_name | reference_2 | World axis returned |
"front" | "top" | X (left-right) |
"front" | "right" | Y (up-down) |
"top" | "right" | Z (in-out) |
(Spanish UI names map identically: "Alzado"+"Planta" → X, etc.)
For axisymmetric revolves around world X — the standard orientation
that build_stepped_shaft and build_revolved_profile assume — use
("front", "top"). This is the same call build_stepped_shaft
makes internally (see the construction site at build_stepped_shaft
in this file). Picking
("front", "right") instead returns world Y and your revolve will
sweep the wrong way around — surface gets rebuilt.
Args: reference_name: Name of the first entity. For two-plane mode, the first plane: "front"/"top"/"right" (English) or "Alzado"/"Planta"/"Vista lateral" (Spanish UI), or a custom "Plano1" from create_reference_plane. reference_2: Name of the second plane for two-plane intersection mode. Same naming rules as reference_name. Pass None for the single-reference mode.
Returns: {"name": "Eje1", "type": "two_plane_intersection" | "from_one_object"}
Use case: define a rotation axis for circular_pattern when you don't have a cylindrical-face name. The intersection of two perpendicular default planes through the origin is a perfectly good axis for any feature centered there.
Example — axis through the part origin (intersection of Front + Top), then 6-instance circular pattern around it: eje = create_reference_axis("front", reference_2="top") circular_pattern(["Cortar-Extruir1"], eje["name"], count=6)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| reference_2 | No | ||
| reference_name | Yes |