Author Topic: Problem with ArcTo in Shape Scripts  (Read 8246 times)

Knaldgas

  • EA User
  • **
  • Posts: 36
  • Karma: +1/-0
    • View Profile
Problem with ArcTo in Shape Scripts
« on: December 03, 2015, 08:53:56 pm »
The ArcTo() methods appear to have an issue, see image and shape script below. The left vertical line of the main image is made by the second ArcTo(), and appears to off by one.



Code: [Select]
shape main{
      defSize(60, 100);
      
      // Draw outline and fill interior.
      StartPath();
      moveto(100, 15);
      arcto(0, 0, 100, 30, 100, 15, 0, 15);
      arcto(0, 70, 100, 100, 0, 85, 100, 85);
      lineto(100, 85);
      EndPath();
      FillAndStrokePath();
      arc(0, 0, 100, 30, 0, 15, 100, 15);
      arc(0, 10, 100, 40, 0, 25, 100, 25);
      arc(0, 20, 100, 50, 0, 35, 100, 35);

      // Debug code
      rectangle(0,0,100,3);
      StartPath();
      moveto(0,90);
      lineto(0,93);
      moveto(0,95);
      lineto(100,95);
      moveto(100,99);
      lineto(0,99);
      EndPath();
      StrokePath();
}

Knaldgas

  • EA User
  • **
  • Posts: 36
  • Karma: +1/-0
    • View Profile
Re: Problem with ArcTo in Shape Scripts
« Reply #1 on: December 03, 2015, 08:55:11 pm »
By the way, this has been tested with EA 10 and 12.1

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: Problem with ArcTo in Shape Scripts
« Reply #2 on: December 04, 2015, 02:18:14 am »
This has been buggy ever since. One could say that shape script is not designed for high quality rendering (at least I'd guess that Sparx would argue this way). So you might send a bug. Or try fiddling around to get it fixed somehow.

q.

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +54/-3
    • View Profile
Re: Problem with ArcTo in Shape Scripts
« Reply #3 on: December 04, 2015, 09:12:28 am »
Definitely looks like a rounding error. I'd recommend changing defsize(60,100) to defsize(61,100). And sending in a bug report.
The Sparx Team
[email protected]

AndyJ

  • EA User
  • **
  • Posts: 337
  • Karma: +5/-3
  • It's only a model
    • View Profile
Re: Problem with ArcTo in Shape Scripts
« Reply #4 on: December 04, 2015, 11:19:29 am »
Quote
Definitely looks like a rounding error..."

That was so close to being a pun, my eyes crossed!

 ::)
Sun Tzu: "If you sit by the river long enough, eventually the body of MS Visio floats past."

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: Problem with ArcTo in Shape Scripts
« Reply #5 on: December 04, 2015, 09:31:59 pm »
Good grief. If that were a squaring error  ;D

q.

Knaldgas

  • EA User
  • **
  • Posts: 36
  • Karma: +1/-0
    • View Profile
Re: Problem with ArcTo in Shape Scripts
« Reply #6 on: December 08, 2015, 07:38:33 pm »
Odd, I set notification on replies on this topic (verified), but haven't got any - Another bug I suppose, although not YAEAB to be fair.

I tried defSize(61,100) and AutoSize (Alt-Z), but same issue (EA10).
I'll file a bug report - I hope it will be worth the effort...

Thanks

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13404
  • Karma: +567/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Problem with ArcTo in Shape Scripts
« Reply #7 on: December 08, 2015, 08:38:35 pm »
The notifications have stopped working for me about two or three years ago.
I don't know if the forum doesn't send them anymore, or if they get blocked as spam somewhere.

Anyway, I got used to it now and I don't mind anymore.
(I have to admit that I'm on the forum almost every day, so it's not that hard to follow everything)

Geert

AndyJ

  • EA User
  • **
  • Posts: 337
  • Karma: +5/-3
  • It's only a model
    • View Profile
Re: Problem with ArcTo in Shape Scripts
« Reply #8 on: December 09, 2015, 08:12:49 am »
Quote
The notifications have stopped working for me about two or three years ago.
I don't know if the forum doesn't send them anymore, or if they get blocked as spam somewhere...

G'day Geert,

I suspect that it is the latter.

I received a notification that there were new posts on this topic.

 ::)

Andy.

PS. Could be worth checking/re-entering the email address that you've provided to the forum.
Sun Tzu: "If you sit by the river long enough, eventually the body of MS Visio floats past."

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13404
  • Karma: +567/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Problem with ArcTo in Shape Scripts
« Reply #9 on: December 09, 2015, 03:51:46 pm »
Quote
PS. Could be worth checking/re-entering the email address that you've provided to the forum.

Did all that back then but it didn't help.
But I don't think I would event want the emails back now.

Geert

Glassboy

  • EA Practitioner
  • ***
  • Posts: 1367
  • Karma: +112/-75
    • View Profile
Re: Problem with ArcTo in Shape Scripts
« Reply #10 on: December 10, 2015, 07:11:55 am »
More annoying is that Mark All as Read doesn't work for me, and the read information doesn't stick between sessions consistently.  So I have to remember what thread I've read before.

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: Problem with ArcTo in Shape Scripts
« Reply #11 on: December 10, 2015, 07:32:30 am »
This stopped working more than a year ago. They never made an attempt to fix it, though there were complaints. Since I read (almost) all posts it's not a so big issue. Though I'd like to skip some where I can't contribute.

What you can do: Click Discussion above and mark all as read. That will also mark those you might have interest on and that came in between looking at a board and setting the switch.

q.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13404
  • Karma: +567/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Problem with ArcTo in Shape Scripts
« Reply #12 on: December 10, 2015, 02:49:29 pm »
Quote
More annoying is that Mark All as Read doesn't work for me, and the read information doesn't stick between sessions consistently.  So I have to remember what thread I've read before.
Strangely that is problem I don't seem to have. The forum seems to remember correctly which topic I've read and which not. I never use the Mark All as Read feature however.

Geert

Knaldgas

  • EA User
  • **
  • Posts: 36
  • Karma: +1/-0
    • View Profile
Re: Problem with ArcTo in Shape Scripts
« Reply #13 on: December 10, 2015, 09:44:07 pm »
Have just had a little debug session with help from AndyJ.

It appears that (in my case at least) Sparx forum not even attempts to deliver notification mails on forum replies. Funny enough, I did get a notification on AndyJ's PM reply to me...

I've investigated a bit further, and found that the Sparx mail server has not been set-up correctly in quite a few ways, of which the missing reverse DNS is the worst. Some mail servers are set up to completely ignore sending servers without proper reverse-DNS (PTR).

I did mail Sparx about that 2 years ago, and they replied that they fixed it, although I did not verify it back then, but today it appears to be the same problem.
I've mailed them again today, so we'll just have to see I guess.

I did whitelist their servers IP address back then, so their mails still comes through to me at least.