Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
OpenGEODE
Commits
59c39bb2
Commit
59c39bb2
authored
Oct 24, 2014
by
Maxime Perrotin
Browse files
Add option to generate full model everywhere
parent
7112403f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Pr.py
View file @
59c39bb2
...
...
@@ -84,7 +84,7 @@ def parse_scene(scene, full_model=False):
pr_data
.
extend
(
generate
(
each
))
pr_data
.
append
(
'ENDBLOCK;'
)
pr_data
.
append
(
'ENDSYSTEM;'
)
print
'
\n
'
.
join
(
pr_data
)
#
print '\n'.join(pr_data)
else
:
for
each
in
scene
.
processes
:
...
...
opengeode.py
View file @
59c39bb2
...
...
@@ -1383,7 +1383,8 @@ class SDL_View(QtGui.QGraphicsView, object):
each
.
translate_to_origin
()
delta_x
,
delta_y
=
scene
.
translate_to_origin
()
pr_raw
=
Pr
.
parse_scene
(
scene
)
pr_raw
=
Pr
.
parse_scene
(
scene
,
full_model
=
True
if
not
self
.
readonly_pr
else
False
)
# Move items back to original place to avoid scrollbar jumps
for
item
in
scene
.
floating_symb
:
...
...
@@ -1616,12 +1617,13 @@ class SDL_View(QtGui.QGraphicsView, object):
def
generate_ada
(
self
):
''' Generate Ada code '''
# If the current scene is a nested one,
save
the top parent
# If the current scene is a nested one,
move to
the top parent
if
self
.
parent_scene
:
scene
=
self
.
parent_scene
[
0
][
0
]
else
:
scene
=
self
.
scene
()
pr_raw
=
Pr
.
parse_scene
(
scene
)
pr_raw
=
Pr
.
parse_scene
(
scene
,
full_model
=
True
if
not
self
.
readonly_pr
else
False
)
pr_data
=
unicode
(
'
\n
'
.
join
(
pr_raw
))
if
pr_data
:
ast
,
warnings
,
errors
=
ogParser
.
parse_pr
(
files
=
self
.
readonly_pr
,
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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