Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Arcs change coordinates on loading a previously saved net #15

Closed
dylankiss opened this issue Nov 20, 2013 · 2 comments
Closed

Arcs change coordinates on loading a previously saved net #15

dylankiss opened this issue Nov 20, 2013 · 2 comments
Assignees
Labels

Comments

@dylankiss
Copy link

I create a Petri Net and make arcs perfectly aligned with the grid. I save the file, reopen it and the intermediate points of the arcs have slightly shifted. Every time I save the file again and reopen it, the arcs are shifted more and more. An example is given below:

1st
Original net
2nd
After saving and opening the first time
3rd
After saving and opening the second time
4th
After saving and opening the third time
5th
After saving and opening the fourth time
10th
After saving and opening the nineth time

The problem probably lies in the opening of the net, because when I save the original net, the coordinates in the XML file look fine. When I open it again, the lines seem slightly shifted.

What I also noticed is that in the XML file, the coordinates of arcs are given as integers, while the coordinates of places and transitions are given as floats. Maybe this has something to do with the shifting?

@sarahtattersall
Copy link
Owner

Hi,

Thanks for flagging this as an issue.

On further inspection of the code you might notice that the models (since pipe claims to be mvc) aren't really used and that the entire analysis of petri nets is based on the views. Furthermore in the views there is some bizarre logic dotted around (such as incrementing x and y by 5 in some places) that is likely causing these and a range of other potential bugs.

I'm currently working on a revamp of the underlying system so that it actually uses models under the hood. As you can imagine this is a large feat but I hope to have a realease out for Christmas time that will address this issue amongst several others!

I hope in the mean time that this issue does not trouble you too much.

Sent from Samsung Mobile

-------- Original message --------
From: dylankiss notifications@github.com
Date:
To: sarahtattersall/PIPE PIPE@noreply.github.com
Subject: [PIPE] Arcs change coordinates on loading a previously saved net (#15)

I create a Petri Net and make arcs perfectly aligned with the grid. I save the file, reopen it and the intermediate points of the arcs have slightly shifted. Every time I save the file again and reopen it, the arcs are shifted more and more. An example is given below:

[1st]https://f.cloud.github.com/assets/5985577/1578135/ef6e21b6-5175-11e3-97c8-9645614f0363.PNG
Original net
[2nd]https://f.cloud.github.com/assets/5985577/1578136/f646367c-5175-11e3-9e52-03db6af73c5e.PNG
After saving and opening the first time
[3rd]https://f.cloud.github.com/assets/5985577/1578141/fc18e4c8-5175-11e3-80c9-c031d390d693.PNG
After saving and opening the second time
[4th]https://f.cloud.github.com/assets/5985577/1578142/fe88e1ea-5175-11e3-98c3-6dc19e6d2895.PNG
After saving and opening the third time
[5th]https://f.cloud.github.com/assets/5985577/1578143/011776ba-5176-11e3-8dd9-6088c2581620.PNG
After saving and opening the fourth time
[10th]https://f.cloud.github.com/assets/5985577/1578144/038b0452-5176-11e3-83f7-ff9fe6750a40.PNG
After saving and opening the nineth time

The problem probably lies in the opening of the net, because when I save the original net, the coordinates in the XML file look fine. When I open it again, the lines seem slightly shifted.

What I also noticed is that in the XML file, the coordinates of arcs are given as integers, while the coordinates of places and transitions are given as floats. Maybe this has something to do with the shifting?


Reply to this email directly or view it on GitHubhttps://github.com//issues/15.

@ghost ghost assigned sarahtattersall Nov 21, 2013
@sarahtattersall
Copy link
Owner

This has been fixed in beta release of PIPE 5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants