Public Member Functions | |
def | __init__ |
def | __repr__ |
def | alignToCurve |
def | alignToFace |
def | alignToPointAndAxis |
def | alignToSelection |
def | getClosestAxis |
def | getGlobalCoords |
def | getLocalCoords |
def | getPlacement |
def | getRotation |
def | offsetToPoint |
def | projectPoint |
def | reset |
def | restore |
def | save |
def | setup |
Public Attributes | |
axis | |
doc | |
position | |
stored | |
u | |
v | |
weak |
A WorkPlane object
Definition at line 38 of file WorkingPlane.py.
def WorkingPlane::plane::__init__ | ( | self | ) |
Definition at line 41 of file WorkingPlane.py.
def WorkingPlane::plane::__repr__ | ( | self | ) |
Definition at line 54 of file WorkingPlane.py.
def WorkingPlane::plane::alignToCurve | ( | self, | ||
shape, | ||||
offset | ||||
) |
Definition at line 120 of file WorkingPlane.py.
def WorkingPlane::plane::alignToFace | ( | self, | ||
shape, | ||||
offset = 0 | ||||
) |
Definition at line 130 of file WorkingPlane.py.
def WorkingPlane::plane::alignToPointAndAxis | ( | self, | ||
point, | ||||
axis, | ||||
offset, | ||||
upvec = None | ||||
) |
Definition at line 96 of file WorkingPlane.py.
def WorkingPlane::plane::alignToSelection | ( | self, | ||
offset | ||||
) |
If selection uniquely defines a plane, align working plane to it. Return success (bool)
Definition at line 139 of file WorkingPlane.py.
def WorkingPlane::plane::getClosestAxis | ( | self, | ||
point | ||||
) |
Definition at line 215 of file WorkingPlane.py.
def WorkingPlane::plane::getGlobalCoords | ( | self, | ||
point | ||||
) |
Definition at line 208 of file WorkingPlane.py.
def WorkingPlane::plane::getLocalCoords | ( | self, | ||
point | ||||
) |
Definition at line 192 of file WorkingPlane.py.
def WorkingPlane::plane::getPlacement | ( | self | ) |
Definition at line 169 of file WorkingPlane.py.
def WorkingPlane::plane::getRotation | ( | self | ) |
Definition at line 164 of file WorkingPlane.py.
def WorkingPlane::plane::offsetToPoint | ( | self, | ||
p, | ||||
direction = None | ||||
) |
Return the signed distance from p to the plane, such that p + offsetToPoint(p)*direction lies on the plane. direction defaults to -plane.axis
A picture will help explain the computation: p //| / / | / / | / / | / / | -------------------- plane -----c-----x-----a-------- Here p is the specified point, c is a point (in this case plane.position) on the plane x is the intercept on the plane from p in the specified direction, and a is the perpendicular intercept on the plane (i.e. along plane.axis) Using vertival bars to denote the length operator, |ap| = |cp| * cos(apc) = |xp| * cos(apx) so |xp| = |cp| * cos(apc) / cos(apx) = (cp . axis) / (direction . axis)
Definition at line 57 of file WorkingPlane.py.
def WorkingPlane::plane::projectPoint | ( | self, | ||
p, | ||||
direction = None | ||||
) |
project point onto plane, default direction is orthogonal
Definition at line 89 of file WorkingPlane.py.
def WorkingPlane::plane::reset | ( | self | ) |
Definition at line 160 of file WorkingPlane.py.
def WorkingPlane::plane::restore | ( | self | ) |
Definition at line 182 of file WorkingPlane.py.
def WorkingPlane::plane::save | ( | self | ) |
Definition at line 178 of file WorkingPlane.py.
def WorkingPlane::plane::setup | ( | self, | ||
direction, | ||||
point, | ||||
upvec = None | ||||
) |
If working plane is undefined, define it!
Definition at line 154 of file WorkingPlane.py.
Definition at line 49 of file WorkingPlane.py.
Definition at line 43 of file WorkingPlane.py.
Definition at line 50 of file WorkingPlane.py.
Definition at line 52 of file WorkingPlane.py.
Definition at line 47 of file WorkingPlane.py.
Definition at line 48 of file WorkingPlane.py.
Definition at line 45 of file WorkingPlane.py.