[cad-linux-dev] Re: thing'd-foo

  • From: "Lee Harding" <lee.harding@xxxxxxxxxxxx>
  • To: <cad-linux-dev@xxxxxxxxxxxxx>
  • Date: Sat, 21 May 2005 10:28:19 -0700

In each of these cases (partial circle/ellipses and polylines with rounded 
corners) I tend to think of the relationships as "Has A" rather than "Is A".  
An arc isn't a cricle, but it traces a circle over a specific range of angles.  
Ditto for the the ellipse.  It can be useful to have several arcs share the 
same circle (e.g. think about an explicitly "dashed" circle) -- you don't need 
to change the center of each arc to move them, for example, just the circle.  
So, yes they seem like separate entities to me as well.
 
Polylines with bumps are still polylines to me; they just have different data.  
Really, polylines should have just been a container for other segment 
primitives of all kinds.  The fact that they include only lines and arcs is 
more a reflection of the limits of 80's PC technology than anything else.

        -----Original Message----- 
        From: cad-linux-dev-bounce@xxxxxxxxxxxxx on behalf of Eric Wilhelm 
        Sent: Sat 5/21/2005 12:01 AM 
        To: cad-linux-dev@xxxxxxxxxxxxx 
        Cc: 
        Subject: [cad-linux-dev] thing'd-foo
        
        

        Working on the definition of an ellipse in the rhizopod format, and=20
        since the dxf also has an elliptical arc, I'll be creating something=20
        for those too.
        
        The question is:  should an elliptical arc be its own type?  After 
all,=20
        arcs are not called circles.
        
        If so, should the bumped polyline (a polyline with rounded corners) 
also=20
        be its own type?
        
        =46rom a programming standpoint, you're basically talking about=20
        bumped-polyline ISA polyline, (I suppose most toolkits say arc  ISA=20
        circle?)
        
        I'm also looking at the 3dpoly/face/polyfacemesh thing in the near=20
        future, and I know I'm not going to have a vertex entity ala dxf.
        
        =46rom the power-user/scripting standpoint, I could see where it would 
be=20
        useful to know that polyline entities never have arcs but if you have 
a=20
        command that works for bumped polylines too, you could just check 
that=20
        $type =3D~ m/.*polyline$/ (as long as  I make sure to name 
3dpolylines=20
        differently (and maybe arcs should have been "partial-circle" :-))
        
        The thing that makes me pause is remembering where Paul Graham said 
you=20
        should always take the harder road.  After wrestling with the useless=20
        (unless you want to draw one on the screen) "parameter" that the dxf=20
        floormat stores for the elliptical arc, I realized that using the 
angle=20
        in rhizopod is oh-so-much-more-useful-to-humans because it puts the=20
        hard work in the program instead of in front of you.  Since rhizopod 
is=20
        essentially an API, that leads me to believe that the connectors 
should=20
        do the hard work.  A lot of the discussion here in the past has 
leaned=20
        toward eliminating special types, but I'm thinking that "smart data=20
        makes for dumb programs" means that we should have more types rather=20
        than have keys that are not always present, etc.  A look at how the 
dxf=20
        kludges 20 types onto the polyline/vertex set implies that more types=20
        is a good thing.
        
        Caveat:  I'm not saying that should we have red-circle and 
blue-circle=20
        types.  The line gets drawn when it becomes a matter of whether or 
not=20
        the type has more properties than the base type (the ISA is a good=20
        stick.)
        
        Also, since this is a textual API, what do you think of the=20
        'thing'd-foo' ISA indicator?  ('thing'd-' indicates that it ISA foo=20
        which has been thing'd.)
        
        Any thoughts?
        
        Thanks,
        Eric
        =2D-=20
        "...the bourgeoisie were hated from both ends: by the proles, because=20
        they had all the money, and by the intelligentsia, because of their=20
        tendency to spend it on lawn ornaments."=20
                                                  -- Neal Stephenson
        =2D--------------------------------------------
            http://scratchcomputing.com
        =2D--------------------------------------------
        
        



Other related posts: