Eliminate many "doing what you told me to" messages
These messages were perhaps originally intended as a debuggin aid but now add clutter to the output panes. Remaining messges are mostly the result of methods to display attributes of an object (which one could call from the Python console) or actually provide some information which would not be obvious from the circumstances
This commit is contained in:
@@ -31,7 +31,7 @@ import FreeCAD as App
|
||||
import draftutils.utils as utils
|
||||
import draftmake.make_array as make_array
|
||||
|
||||
from draftutils.messages import _msg, _err
|
||||
from draftutils.messages import _err
|
||||
from draftutils.translate import translate
|
||||
|
||||
|
||||
@@ -91,7 +91,6 @@ def make_polar_array(base_object,
|
||||
make_ortho_array, make_circular_array, make_path_array, make_point_array
|
||||
"""
|
||||
_name = "make_polar_array"
|
||||
utils.print_header(_name, translate("draft","Polar array"))
|
||||
|
||||
if isinstance(base_object, str):
|
||||
base_object_str = base_object
|
||||
@@ -99,27 +98,21 @@ def make_polar_array(base_object,
|
||||
found, base_object = utils.find_object(base_object,
|
||||
doc=App.activeDocument())
|
||||
if not found:
|
||||
_msg("base_object: {}".format(base_object_str))
|
||||
_err(translate("draft","Wrong input: object not in document."))
|
||||
_err(translate("draft","Wrong input: base_object {} not in document.").format(base_object_str))
|
||||
return None
|
||||
|
||||
_msg("base_object: {}".format(base_object.Label))
|
||||
|
||||
_msg("number: {}".format(number))
|
||||
try:
|
||||
utils.type_check([(number, int)], name=_name)
|
||||
except TypeError:
|
||||
_err(translate("draft","Wrong input: must be an integer number."))
|
||||
return None
|
||||
|
||||
_msg("angle: {}".format(angle))
|
||||
try:
|
||||
utils.type_check([(angle, (int, float))], name=_name)
|
||||
except TypeError:
|
||||
_err(translate("draft","Wrong input: must be a number."))
|
||||
return None
|
||||
|
||||
_msg("center: {}".format(center))
|
||||
try:
|
||||
utils.type_check([(center, App.Vector)], name=_name)
|
||||
except TypeError:
|
||||
@@ -127,8 +120,6 @@ def make_polar_array(base_object,
|
||||
return None
|
||||
|
||||
use_link = bool(use_link)
|
||||
_msg("use_link: {}".format(use_link))
|
||||
|
||||
new_obj = make_array.make_array(base_object,
|
||||
arg1=center, arg2=angle, arg3=number,
|
||||
use_link=use_link)
|
||||
|
||||
Reference in New Issue
Block a user