CLIM mail archive
[Prev][Next][Index][Thread]
do geometry operations work?
Date: Thu, 5 Mar 1992 16:08 PST
From: Jonathan Amsterdam <jba@ai.mit.edu>
I'm spanking new (< 48 hrs) to CLIM, so please forgive me if I've missed
some crucial documentation or disclaimer.
I'm using CLIM 1.0 (I think--is the version number in the image somewhere?)
in Lucid on a Sparc.
It seems that various region operations don't work for certain classes,
notably polygons. E.g. if p1 and p2 are overlapping polygons, then
(region-intersection p1 p2) is +nowhere+. Region-difference gives the
message
>>Error: (:REGION1 :REGION2) is not a valid initialization argument list in this call to MAKE-INSTANCE
(METHOD REGION-DIFFERENCE (REGION REGION)):
Required arg 0 (REGION1): #<Standard-Polygon #X16FCE5E>
Required arg 1 (REGION2): #<Standard-Polygon #X17076D6>
So that's question 1.
That is the result of a typo bug in CLIM. Evaluate this (in the
CLIM-UTILS package) as a fix:
(defclass standard-region-difference (region-set area)
((region1 :type region :initarg :region1)
(region2 :type region :initarg :region2)
(regions :type list)))
Question 2 is, when these things do eventually work,
are they just going to create region-sets, or are they going to make some
effort to create a drawable thing? If the intersection of two
polygons is a polygon, I'd like to get my hands on that polygon, not on
some object which says "this is the intersection of two polygons".
Apologies in advance for my naivete--I was hoping to use this piece of CLIM
as the substrate for some genuine 2D geometrical reasoning.
For now the non-rectangle cases are handled by the
REGION-DIFFERENCE object fallback. This is just due to lack of
any resources focused in this area. Apparently not much use is
being made of polygon arithmetic, since the problem report above
is somewhat of a show-stopper.
If someone came up with some good polygon-intersection and
-difference code, I'm sure that the right methods for REGION-XXX
on polygon classes could be added to CLIM. Sorry.
Jonathan Amsterdam
Follow-Ups:
References:
Main Index |
Thread Index