sectionplanes.py — Section Planes Module
Wraps SpinFire.Scripting.API.Utilities.SectionPlaneUtilities. Controls section (cross-section / clipping) planes.
Enums
Enum |
Values |
|---|---|
|
|
|
|
Functions
Function |
Parameters |
Returns |
Description |
|---|---|---|---|
|
none |
|
Toggles the single section plane, which is the YZ plane. |
|
none |
|
Toggles two section planes. |
|
none |
|
Toggles three section planes. |
|
|
Error message if any, else empty |
Moves the currently selected section plane. |
|
|
Error message if any, else empty |
Moves a specific section plane. |
|
|
Error message if any, else empty |
Rotates a section plane about an axis. |
|
|
Error message if any, else empty |
Resets transformation for one section plane. |
|
none |
Error message if any, else empty |
Resets transformations for all section planes. |
|
none |
|
Gets the section cut edges. Each edge prints as a list of points in model units. |
|
|
Result message |
Exports section cut profiles. |
|
|
|
Gets the section cut projection area. |
Behaviour Notes
Confirmed by running the Probe — Return Values script. See Classes for the full list of observed return types.
ToggleSinglePlaneturns on YZ. With only the single plane on, every cut point had X = 0, and the XY plane stayed off. To sweep that plane, move it along X withMoveSectionPlane(sfs.Plane.YZ, dx, 0, 0).Toggles flip the current state. Calling a toggle when its planes are already on switches them off. Start scripts with section planes off.
Errors come back as messages, not exceptions. Asking about a plane that is switched off returns a message such as The section plane with the provided index is toggled off. Toggle it on to use. For
GetProjectionArea, it is in the result’sMessage.Still unconfirmed: which two planes
ToggleTwoPlanesturns on.
Usage
1import spinfirescript as sfs
2
3sfs.ToggleTwoPlanes()
4print(sfs.MoveSectionPlane(sfs.Plane.YZ, 10, 10, 10))
5print(sfs.RotateSectionPlane(sfs.Plane.XZ, sfs.PlaneAxis.Y, 20))
6print(sfs.ResetSectionPlaneTransformation(sfs.Plane.XZ))
7sfs.GetProjectionArea(sfs.Plane.YZ)