Skip to content

Commit

Permalink
geometry.py -> add Plane.isometric
Browse files Browse the repository at this point in the history
  • Loading branch information
jdegenstein authored Jun 24, 2024
1 parent 2cd6365 commit 33b6859
Showing 1 changed file with 23 additions and 16 deletions.
39 changes: 23 additions & 16 deletions src/build123d/geometry.py
Original file line number Diff line number Diff line change
Expand Up @@ -1895,6 +1895,12 @@ def bottom(cls) -> Plane:
"""Bottom Plane"""
return Plane((0, 0, 0), (1, 0, 0), (0, 0, -1))

@property
def isometric(cls) -> Plane:
"""Isometric Plane"""
return Plane(
(0, 0, 0), (1 / 2**0.5, 1 / 2**0.5, 0), (1 / 3**0.5, -1 / 3**0.5, 1 / 3**0.5)
)

class Plane(metaclass=PlaneMeta):
"""Plane
Expand All @@ -1909,22 +1915,23 @@ class Plane(metaclass=PlaneMeta):
Planes can be created from faces as workplanes for feature creation on objects.
======= ====== ====== ======
Name x_dir y_dir z_dir
======= ====== ====== ======
XY +x +y +z
YZ +y +z +x
ZX +z +x +y
XZ +x +z -y
YX +y +x -z
ZY +z +y -x
front +x +z -y
back -x +z +y
left -y +z -x
right +y +z +x
top +x +y +z
bottom +x -y -z
======= ====== ====== ======
======= ====== ====== ======
Name x_dir y_dir z_dir
======= ====== ====== ======
XY +x +y +z
YZ +y +z +x
ZX +z +x +y
XZ +x +z -y
YX +y +x -z
ZY +z +y -x
front +x +z -y
back -x +z +y
left -y +z -x
right +y +z +x
top +x +y +z
bottom +x -y -z
isometric +x+y -x+y+z +x+y-z
======= ====== ====== ======
Args:
gp_pln (gp_Pln): an OCCT plane object
Expand Down

0 comments on commit 33b6859

Please sign in to comment.