bugpyFormex - Bugs: bug #36695, Drawing of Arc is broken

 
 

bug #36695: Drawing of Arc is broken

Submitted by:  Benedict Verhegghe <bverheg>
Submitted on:  Wed 20 Jun 2012 02:01:46 PM UTC  
 
Category: RenderingSeverity: 4 - Important
Item Group: Functionality errorStatus: Fixed
Privacy: PublicAssigned to: None
Open/Closed: Closed

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Wed 27 Jun 2012 06:54:13 PM UTC, comment #4:

Fixed in rev 2344

Benedict Verhegghe <bverheg>
Project Administrator
Thu 21 Jun 2012 11:06:20 PM UTC, comment #3:

The Arc was not intended to be 2D, but I needed it for the DXF tools. It would be good to have an implementation that is 3D, but allows many different ways to initialize it. We also should try to make it consistent with the other curve types. Thus the points should probably be stored as

self.coords = [startpoint, center, endpoint]

This is the same like e.g. a BezierSpline(degree=2). The middle point is a control point that defines how the curve looks like.

Thus PolyLine([P0,P1,P2]), BezierSpline([P0,P1,P2]) and Arc([P0,P1,P2]) would all be curves starting in P0 and ending in P2.

But it is more complex than it looks (that's why we now still have a mess with Arc and Arc3).

Problems I see for now:

1. In 3D there is no unique way to define the zero value for angles like there is in the x-y plane (and parallel planes). Thus computing the angle range from the points may be disappointing.
2. As Arc is derived from Geometry, one can transform the curve. The transformed curve should however either remain an Arc (then we have to limit the possible transformations) or return an object of some other class.

So maybe we will have to go for an implementation that looks like this:
[center point, start point, normal vector, opening angle]
or maybe first define an EllipticArc using
[center point, start point, end point, normal vector]
and declaring Arc a specialisation that checks if start and end points are at same distance of center.

Benedict Verhegghe <bverheg>
Project Administrator
Thu 21 Jun 2012 01:53:33 PM UTC, comment #2:

From the documentation, it is not clear that the Arc class is only intended for arcs parallel to the (x,y) plane. The Arc object can also be initialized by 3 points (begin, center, end), not lying in the (x,y) plane and some functions needed to be corrected for this case.

We should think about which parameters can best describe a 3D arc. I would suggest to use the following attributes:
self.center
self.coords (startpoint and endpoint)
as all other parameters (radius, normal, angle range, arclength) can easily be derived.

Sofie Van Cauter <svcauter>
Project Member
Thu 21 Jun 2012 12:44:26 PM UTC, comment #1:

I checked on the use of Arc, and found it only to be used in dxf plugin, where the old implementation (pre-2339) worked well. There it is confined to an arc in the (x,y) plane (or parallel). Other uses that I am not aware of may have other needs. There is also a partial Arc3 implementation. I have not yet checked where it is used. We should sanitize here and by preference create a common Arc class for all purposes. Proposal:

Arc(center=[0.,0.,0.],radius=1.,angles=[0.,360.])
creates an arc in a plane parallel to x,y

Arc(begin,intermediate,end)
creates an arc through 3 points, in any plane.
This is only ambivalent when the three points are colinear, i.e. when creating a full circle. But maybe a full circle can be a separate class, or an extra argument can be added to resolve the case.

Benedict Verhegghe <bverheg>
Project Administrator
Wed 20 Jun 2012 02:01:46 PM UTC, original submission:

The drawing of an Arc seems broken as a result of the changes in the Arc class in revision 2339.

Benedict Verhegghe <bverheg>
Project Administrator

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by svcauter (Posted a comment)
  • -unavailable- added by bverheg (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 27 Jun 2012 06:54:13 PM UTCbverhegStatusNone=>Fixed
      Open/ClosedOpen=>Closed
    Thu 21 Jun 2012 12:44:26 PM UTCbverhegSeverity3 - Normal=>4 - Important

    Back to the top


    Powered by Savane 3.1-cleanup1