Mantis Bugtracker
  

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0006461 [Squeak] Morphic major always 05-03-07 12:29 09-15-08 19:43
Reporter hangal View Status public  
Assigned To
Priority normal Resolution fixed  
Status closed   Product Version 3.9
Summary 0006461: PolygonMorph intersects method does not work
Description I am using Squeak-3.9-final-7067.image on win-xp.

I create a polygon using:
p := PolygonMorph new.
p vertices: {0@0. 0@200. 200@200} color: Color black borderWidth: 2
borderColor: Color green.

However any attempt to use the intersects: aRectangle method in
PolygonMorph, e.g.

r := Rectangle new.
r setOrigin: 150@0 corner: 175@25. /> p intersects: r

returns a message not understood.
because PolygonMorph's intersects calls super intersects,
when no such method exists in any of its superclass.

Additional Information
On the beginners mailing list, Jerome Peace says:

Date: Wed, 2 May 2007 21:48:23 -0700 (PDT)
From: Jerome Peace <peace_the_dreamer@yahoo.com>
Subject: [Newbies] Re: PolygonMorph intersection
To: "beginners@lists.squeakfoundation.org"

...
In building the 3.9 release the release team added
pieces of the the Connectors package.
And while they did as best they could they missed a
piece.

The PolygonMorph>>intersects: methods calls super
intersects: . None of the classes above PolygonMorph
defines the intersects: method. Thus the error
message.
...
Attached Files  UnimplementedCallBugz.st [^] (525 bytes) 05-04-07 04:01
 Morph-intersects.st [^] (299 bytes) 06-25-07 13:02

- Relationships
related to 0006457new  [RFI] Need a utility to check on super unimplemented calls. 

- Notes
(0010647 - 300 - 330 - 330 - 330 - 330 - 330)
nicolas cellier
05-03-07 13:47

Maybe try (bounds intersects: aRectangle) instead of (super intersects: aRectangle).

But then, there is no #intersectsLineFrom:to: implemented.

And aRectangle inside polygon not crossing any polygon line will answer false.
This is more a polylineIntersects: algorithm than a polygonIntersects:
 
(0010650 - 277 - 343 - 343 - 343 - 343 - 343)
wiz
05-03-07 21:43

Hi hangal

Nicely reported.

I found the missing method in a connectors package.

The super class was Morph which simply checks the boundry rectangles for intersection.

The next thing that needs doing is writing the test for this.


Yours in service, --Jerome Peace
 
(0010651 - 518 - 596 - 596 - 596 - 596 - 596)
wiz
05-03-07 21:50
edited on: 05-03-07 21:51

Hi nicolas,

I didn't try to address the intention of the code, since I knew I would find the missing piece if I looked in the right place. I figure in this report to just address the breakage.

In the related report address the lack of a probe to warn when something like this breaks.

And in the beginners list address the problem of getting the intent of the code to work.

Thanks for adding your insight to this and the related report.
That was quick.

Yours in curiosity and service, --Jerome Peace

 
(0010658 - 238 - 304 - 304 - 304 - 304 - 304)
wiz
05-04-07 04:05
edited on: 05-04-07 04:06

 UnimplementedCallBugz.st uploaded

is the very simple test of PolygonMorph>>intersects:

Fails before the fix applied and passes after.

Test just tests if the method can be sent w/o Error.

And that completes the simple fix.

 
(0010683 - 151 - 205 - 205 - 205 - 205 - 205)
wiz
05-08-07 19:39

"fix begin"
Installer mantis bug: nnnn fix: 'Morph-intersects.st'.
"fix test"
Installer mantis bug: nnnn fix: 'UnimplementedCallBugz.st'.
"fix end"
 
(0010831 - 78 - 84 - 84 - 84 - 84 - 84)
edgardec
06-25-07 17:42

This now is 7115Morph-intersects and was in updates for 3.10
Thanks Jerome !
 
(0012660 - 46 - 46 - 46 - 46 - 46 - 46)
KenCausey
09-15-08 19:43

Harvested in update 7104 and released in 3.10.
 

- Issue History
Date Modified Username Field Change
05-03-07 12:29 hangal New Issue
05-03-07 13:47 nicolas cellier Note Added: 0010647
05-03-07 21:30 wiz Relationship added related to 0006457
05-03-07 21:37 wiz File Added: Morph-intersects.st
05-03-07 21:43 wiz Note Added: 0010650
05-03-07 21:50 wiz Note Added: 0010651
05-03-07 21:51 wiz Note Edited: 0010651
05-04-07 04:01 wiz File Added: UnimplementedCallBugz.st
05-04-07 04:05 wiz Note Added: 0010658
05-04-07 04:06 wiz Note Edited: 0010658
05-08-07 19:39 wiz Note Added: 0010683
06-25-07 13:02 edgardec File Deleted: Morph-intersects.st
06-25-07 13:02 edgardec File Added: Morph-intersects.st
06-25-07 17:42 edgardec Note Added: 0010831
06-25-07 18:41 wiz Status new => resolved
06-25-07 18:41 wiz Resolution open => fixed
06-25-07 18:41 wiz Fixed in Version  => 3.10
09-15-08 19:43 KenCausey Status resolved => closed
09-15-08 19:43 KenCausey Note Added: 0012660


Mantis 1.0.8[^]
Copyright © 2000 - 2007 Mantis Group
82 total queries executed.
47 unique queries executed.
Powered by Mantis Bugtracker