Draft: Updates related to the PlaneGui class (step 3)

Related issue:
#5603.
This commit is contained in:
Roy-043
2023-10-27 11:55:24 +02:00
parent c6c3b90b0d
commit ec50beebf4
3 changed files with 9 additions and 12 deletions

View File

@@ -106,8 +106,9 @@ from PySide.QtCore import QT_TRANSLATE_NOOP
import FreeCAD as App
import DraftVecUtils
import DraftGeomUtils
import draftutils.utils as utils
import WorkingPlane
from draftutils import utils
from draftutils.messages import _wrn
from draftutils.translate import translate
@@ -648,10 +649,10 @@ def measure_two_obj_angles(link_sub_1, link_sub_2):
start = obj1.Shape.Edges[n1].Curve.Direction
end = obj2.Shape.Edges[n2].Curve.Direction
# We get the angle from the direction of the line to the U axis
# of the working plane; we should be able to also use the V axis
start_r = DraftVecUtils.angle(start, App.DraftWorkingPlane.u)
end_r = DraftVecUtils.angle(end, App.DraftWorkingPlane.u)
# We get the angle from the U axis of the working plane
wp = WorkingPlane.get_working_plane(update=False)
start_r = DraftVecUtils.angle(start, wp.u)
end_r = DraftVecUtils.angle(end, wp.u)
start = math.degrees(start_r)
end = math.degrees(end_r)

View File

@@ -392,10 +392,8 @@ class TaskPanelCircularArray:
point: Base::Vector3
is a vector that arrives by the callback.
plane: WorkingPlane
is a `WorkingPlane` instance, for example,
`App.DraftWorkingPlane`. It is not used at the moment,
but could be used to set up the grid.
plane: WorkingPlane.PlaneGui
is a working plane instance. Not used at the moment.
mask: str
is a string that specifies which coordinate is being
edited. It is used to restrict edition of a single coordinate.

View File

@@ -346,9 +346,7 @@ class TaskPanelPolarArray:
point :
is a vector that arrives by the callback.
plane :
is a `WorkingPlane` instance, for example,
`App.DraftWorkingPlane`. It is not used at the moment,
but could be used to set up the grid.
is a `WorkingPlane.PlaneGui` instance. Not used at the moment.
mask :
is a string that specifies which coordinate is being
edited. It is used to restrict edition of a single coordinate.