Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Jonathan Wiedemann
MOOC-Workbench
Commits
098467fb
Commit
098467fb
authored
Jul 07, 2019
by
Jonathan Wiedemann
Browse files
cosmetic fix in moocchecker
parent
b55f3671
Changes
1
Hide whitespace changes
Inline
Side-by-side
MoocChecker.py
View file @
098467fb
...
...
@@ -57,7 +57,6 @@ def make_result(r):
if
DEBUG
:
print
(
u
'End check'
)
return
result
def
get_document
(
doc
):
'''get document from name or active doc if None'''
if
type
(
doc
)
==
'str'
:
...
...
@@ -72,7 +71,6 @@ def get_sketch(sketch):
if
DEBUG
:
print
(
"TODO: method to get sketch"
)
pass
def
document_presence
(
name
=
None
,
label
=
None
):
'''check if there is a specific doc or an active one'''
r
=
[]
...
...
@@ -103,14 +101,12 @@ def document_presence(name=None, label=None):
return
make_result
(
r
)
def
get_object_by_typeId
(
doc
=
None
,
typeId
=
None
):
for
obj
in
doc
.
Objects
:
if
obj
.
TypeId
==
typeId
:
return
obj
break
def
document_save
(
name
=
None
):
'''check if a doc is saved'''
r
=
[]
...
...
@@ -127,7 +123,6 @@ def document_save(name=None):
r
.
append
(
1
)
return
make_result
(
r
)
def
active_workbench
(
wb
):
'''Check if the active workbench is the good one
PartDesignWorkbench", "PartWorkbench", "DraftWorkbench", "SketcherWorkbench"
...
...
@@ -139,7 +134,6 @@ def active_workbench(wb):
r
.
append
(
1
)
return
make_result
(
r
)
def
label_object
(
doc
=
None
,
obj
=
None
,
label_required
=
None
):
'''check if there is an object with the specific label'''
r
=
[]
...
...
@@ -155,8 +149,6 @@ def label_object(doc=None, obj=None, label_required=None):
r
.
append
(
0
)
return
make_result
(
r
)
def
body_presence
(
doc
=
None
):
'''Check if there is a body in the document'''
r
=
[]
...
...
@@ -182,7 +174,6 @@ def body_features(body):
if
DEBUG
:
print
(
body
.
OutList
)
pass
def
primitive_presence
(
doc
=
None
,
label
=
None
,
typeId
=
None
,
dimensions
=
None
,
support
=
None
,
offset
=
None
):
'''check the presence of datum plane'''
'''type : 'PartDesign::SubstractiveCylinder'
...
...
@@ -252,7 +243,6 @@ def primitive_presence(doc=None, label=None, typeId=None, dimensions=None, suppo
r
.
append
(
0
)
return
make_result
(
r
)
def
fillet_presence
(
doc
=
None
,
label
=
None
,
radius
=
None
):
'''check fillet presence'''
r
=
[]
...
...
@@ -275,7 +265,6 @@ def fillet_presence(doc=None, label=None, radius=None):
r
.
append
(
0
)
return
make_result
(
r
)
def
datum_plane_presence
(
doc
=
None
,
label
=
None
,
support
=
None
,
offset
=
None
):
'''check the presence of datum plane'''
r
=
[]
...
...
@@ -405,7 +394,6 @@ def geometry_presence(doc=None, sketch_label=None, count=None, isclosed=None):
r
.
append
(
0
)
return
make_result
(
r
)
def
external_geometry_presence
(
doc
=
None
,
sketch_label
=
None
,
count
=
None
):
'''Check if the skecth contain the count of geometrie and if the wire is closed'''
r
=
[]
...
...
@@ -773,8 +761,6 @@ def volume(doc=None, name=None, typeId=None, target=None):
r
.
append
(
0
)
return
make_result
(
r
)
def
navigation_style
(
style
):
'''Check navigation style'''
param
=
app
.
ParamGet
(
"User parameter:BaseApp/Preferences/View"
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment