dr-geo
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Dr. Geo] [Bug 1798606] Re: DrGCirlceItem>>intersectionWith:flag: needs


From: hilaire
Subject: [Dr. Geo] [Bug 1798606] Re: DrGCirlceItem>>intersectionWith:flag: needs clarification
Date: Tue, 19 Feb 2019 09:27:52 -0000

As far as I can see, the argument aCurveItem belongs to this categories
of items (2 dimensions).

I suggest you add at the beginning of the method:

        Transcript show: aCurveItem ;cr.

Or do you mean something else?

** Changed in: drgeo
       Status: New => Triaged

-- 
You received this bug notification because you are a member of DrGeo
developers, which is subscribed to Dr. Geo II.
Matching subscriptions: Dr. Geo bug report
https://bugs.launchpad.net/bugs/1798606

Title:
  DrGCirlceItem>>intersectionWith:flag: needs clarification

Status in Dr. Geo II:
  Triaged

Bug description:
  The following method implements the distinction of different cases.

  Thus parameter aCurveItem actually may be any item, not only a curveItem.
  The code should show this. In addition the call to this code is protected by

  on: Error do: [nil]

  It was difficult to spot an error here.

  OLD
  ----

  DrGCircleItem>>

  intersectionWith: aCurveItem flag: aFlag
  |aPoint|
        aCurveItem isLineItem 
                ifTrue: [^self intersectionWithDirection: aCurveItem  flag: 
aFlag].
        (aCurveItem isSegmentItem or: [aCurveItem isRayItem])
                ifTrue:
                        [aPoint := self intersectionWithDirection: aCurveItem  
flag: aFlag.
                        aPoint ifNil: [^nil].
                        (aCurveItem contains: aPoint)
                                ifTrue: [^aPoint]
                                ifFalse: [^nil]].
        aCurveItem isCircleItem
                ifTrue: [^self intersectionWithCircle: aCurveItem flag: aFlag].
        aCurveItem isArcItem
                ifTrue: [^aCurveItem intersectionWith: self flag: aFlag]

  
  New
  ---

  intersectionWith: anItem flag: aFlag
  |aPoint|
        anItem isLineItem 
                ifTrue: [^self intersectionWithDirection: anItem  flag: aFlag].
        (anItem isSegmentItem or: [anItem isRayItem])
                ifTrue:
                        [aPoint := self intersectionWithDirection: anItem  
flag: aFlag.
                        aPoint ifNil: [^nil].
                        (anItem contains: aPoint)
                                ifTrue: [^aPoint]
                                ifFalse: [^nil]].
        anItem isCircleItem
                ifTrue: [^self intersectionWithCircle: anItem flag: aFlag].
        anItem isArcItem
                ifTrue: [^anItem intersectionWith: self flag: aFlag]

To manage notifications about this bug go to:
https://bugs.launchpad.net/drgeo/+bug/1798606/+subscriptions



reply via email to

[Prev in Thread] Current Thread [Next in Thread]