committed by
Kacper Donat
parent
bee89d0447
commit
75b2ef67fc
@@ -21,7 +21,7 @@
|
||||
"""
|
||||
Provides the TechDraw PositionSectionView GuiCommand.
|
||||
00.01 2021/03/17 C++ Basic version
|
||||
00.02 2023/12/21 Option to select an edge and it's corresponding vertex
|
||||
00.02 2023/12/21 Option to select an edge and its corresponding vertex
|
||||
"""
|
||||
|
||||
__title__ = "TechDrawTools.CommandPositionSectionView"
|
||||
@@ -50,11 +50,7 @@ class CommandPositionSectionView:
|
||||
'Accel': "",
|
||||
'MenuText': QT_TRANSLATE_NOOP("TechDraw_PositionSectionView", "Position Section View"),
|
||||
'ToolTip': QT_TRANSLATE_NOOP("TechDraw_PositionSectionView",
|
||||
"Orthogonally align a section view with its source view:<br>\
|
||||
- Select a single section view<br>\
|
||||
- Click this tool<br>\
|
||||
- optional: select one edge in the section view and it's corresponding vertex in the base view<br>\
|
||||
Click this tool")}
|
||||
"Aligns the selected section view with its source view orthogonally or the selected edge in the section view to the selected vertex in the base view")}
|
||||
|
||||
def Activated(self):
|
||||
"""Run the following code when the command is activated (button pressed)."""
|
||||
@@ -113,8 +109,14 @@ class CommandPositionSectionView:
|
||||
|
||||
def getTrianglePoint(self,p1,dir,p2):
|
||||
'''
|
||||
Get third point of a perpendicular triangle
|
||||
p1, p2 ...vertexes of hypothenusis, dir ...direction of one kathete, p3 ...3rd vertex
|
||||
Calculate the third vertex of a right triangle.
|
||||
|
||||
Parameters:
|
||||
p1, p2 : vertices of the hypotenuse
|
||||
dir : direction vector of one leg (kathete)
|
||||
|
||||
Returns:
|
||||
p3 : the third vertex completing the right triangle
|
||||
'''
|
||||
a = -dir.y
|
||||
b = dir.x
|
||||
|
||||
Reference in New Issue
Block a user