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

  • From: Eric Wilhelm <ewilhelm@xxxxxxxxxxxxx>
  • To: cad-linux-dev@xxxxxxxxxxxxx
  • Date: Sat, 21 May 2005 00:01:24 -0700

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: