Skip to content

Rotate Three Points Keep Name And Structure

KaiUR edited this page Jun 3, 2026 · 7 revisions

Rotate Three Points Keep Name And Structure

File: Part_Document_Scripts/Rotate_Three_Points_Keep_Name_And_Structure.py
Version: 1.3
Document Type: Part (also works with Part inside Product or Process)


Description

Rotates every hybrid shape inside a selected geometric set using a three-point definition (center, start, end), recreating the full geometric set structure in the current in-work object and preserving the original names of all shapes and geometric sets. Recurses through all child geometric sets automatically.


Requirements

Requirement Value
Python >= 3.10
pycatia >= 0.8.3
wxPython Not required
Open document Part, or Part inside Product/Process

Usage

  1. Open a CATPart document containing a geometric set and three points defining the rotation
  2. Run the script
  3. Selection 1: Select the geometric set to rotate
  4. Selection 2: Select the start point (defines the from-direction)
  5. Selection 3: Select the center point (pivot of the rotation)
  6. Selection 4: Select the end point (defines the to-direction)
  7. The rotated structure is created inside the current in-work geometric set

Output

A child geometric set named after the source is created inside the in-work object, containing the full recreated structure with all shapes rotated and converted to datums:

[in-work object]
  └── SourceSetName
        ├── Shape_A
        ├── Shape_B
        └── ChildSetName
              ├── Shape_C
              └── Shape_D

Notes

  • The rotation angle is implicitly defined by the angle between the center→start and center→end vectors
  • All results are datums — no parametric link to source geometry
  • The source geometric set is not modified
  • The selected geometric set must not be the current in-work object — the script will exit with an error if this is the case
  • For rotating individual selected shapes rather than a whole set use Rotate Three Points Keep Name
  • For rotation defined by an explicit angle use Rotate Angle Keep Name And Structure

Home


Getting Started


Contributing


Any Document Scripts


Drawing Document Scripts


Part Document Scripts


Shape Generation Scripts


Process Document Scripts


Product Document Scripts


Utility Scripts


Legal

Clone this wiki locally