Draft: add modules of draftfunctions to the proper Doxygen group
This includes `array`, `cut`, `downgrade`, `draftiffy`, `extrude`, `fuse`, `heal`, `join`, `mirror`, `move`, `offset`, `rotate`, `scale`, `split` and `upgrade`. These are added to the `draftfunction` Doxygen group so that the functions contained in each module are listed appropriately in the automatically generated documentation.
This commit is contained in:
@@ -20,21 +20,20 @@
|
||||
# * USA *
|
||||
# * *
|
||||
# ***************************************************************************
|
||||
"""This module provides the code for Draft move function.
|
||||
"""
|
||||
"""Provides functions to move objects from one position to another."""
|
||||
## @package move
|
||||
# \ingroup DRAFT
|
||||
# \brief This module provides the code for Draft move function.
|
||||
# \ingroup draftfuctions
|
||||
# \brief Provides functions to move objects from one position to another.
|
||||
|
||||
## \addtogroup draftfuctions
|
||||
# @{
|
||||
import FreeCAD as App
|
||||
|
||||
import draftutils.utils as utils
|
||||
import draftutils.groups as groups
|
||||
import draftutils.gui_utils as gui_utils
|
||||
|
||||
from draftmake.make_copy import make_copy
|
||||
from draftmake.make_line import make_line
|
||||
from draftfunctions.join import join_wires
|
||||
import draftutils.groups as groups
|
||||
import draftfunctions.join as join
|
||||
import draftmake.make_copy as make_copy
|
||||
import draftmake.make_line as make_line
|
||||
|
||||
|
||||
def move(objectslist, vector, copy=False):
|
||||
@@ -81,7 +80,7 @@ def move(objectslist, vector, copy=False):
|
||||
|
||||
if utils.get_type(obj) == "Point":
|
||||
if copy:
|
||||
newobj = make_copy(obj)
|
||||
newobj = make_copy.make_copy(obj)
|
||||
else:
|
||||
newobj = obj
|
||||
newobj.X = obj.X + real_vector.x
|
||||
@@ -93,7 +92,7 @@ def move(objectslist, vector, copy=False):
|
||||
|
||||
elif hasattr(obj,'Shape'):
|
||||
if copy:
|
||||
newobj = make_copy(obj)
|
||||
newobj = make_copy.make_copy(obj)
|
||||
else:
|
||||
newobj = obj
|
||||
pla = newobj.Placement
|
||||
@@ -101,21 +100,21 @@ def move(objectslist, vector, copy=False):
|
||||
|
||||
elif utils.get_type(obj) == "Annotation":
|
||||
if copy:
|
||||
newobj = make_copy(obj)
|
||||
newobj = make_copy.make_copy(obj)
|
||||
else:
|
||||
newobj = obj
|
||||
newobj.Position = obj.Position.add(real_vector)
|
||||
|
||||
elif utils.get_type(obj) in ("Text", "DraftText"):
|
||||
if copy:
|
||||
newobj = make_copy(obj)
|
||||
newobj = make_copy.make_copy(obj)
|
||||
else:
|
||||
newobj = obj
|
||||
newobj.Placement.Base = obj.Placement.Base.add(real_vector)
|
||||
|
||||
elif utils.get_type(obj) in ["Dimension", "LinearDimension"]:
|
||||
if copy:
|
||||
newobj = make_copy(obj)
|
||||
newobj = make_copy.make_copy(obj)
|
||||
else:
|
||||
newobj = obj
|
||||
newobj.Start = obj.Start.add(real_vector)
|
||||
@@ -124,14 +123,14 @@ def move(objectslist, vector, copy=False):
|
||||
|
||||
elif utils.get_type(obj) in ["AngularDimension"]:
|
||||
if copy:
|
||||
newobj = make_copy(obj)
|
||||
newobj = make_copy.make_copy(obj)
|
||||
else:
|
||||
newobj = obj
|
||||
newobj.Center = obj.Start.add(real_vector)
|
||||
|
||||
elif "Placement" in obj.PropertiesList:
|
||||
if copy:
|
||||
newobj = make_copy(obj)
|
||||
newobj = make_copy.make_copy(obj)
|
||||
else:
|
||||
newobj = obj
|
||||
pla = obj.Placement
|
||||
@@ -198,7 +197,7 @@ def copy_moved_edges(arguments):
|
||||
copied_edges = []
|
||||
for argument in arguments:
|
||||
copied_edges.append(copy_moved_edge(argument[0], argument[1], argument[2]))
|
||||
join_wires(copied_edges)
|
||||
join.join_wires(copied_edges)
|
||||
|
||||
|
||||
copyMovedEdges = copy_moved_edges
|
||||
@@ -214,4 +213,6 @@ def copy_moved_edge(object, edge_index, vector):
|
||||
vertex2 = object.Placement.multVec(object.Points[0]).add(vector)
|
||||
else:
|
||||
vertex2 = object.Placement.multVec(object.Points[edge_index+1]).add(vector)
|
||||
return make_line(vertex1, vertex2)
|
||||
return make_line.make_line(vertex1, vertex2)
|
||||
|
||||
## @}
|
||||
|
||||
Reference in New Issue
Block a user