Message Boards Message Boards

Patch for Honan's GraphicsTools package?

This concerns Terry Honan's add-on packages GraphicsTools and `MechanicsTools:

http://www.blinn.edu/brazos/natscience/phys/thonan/Mathematica/

The do not work properly now because they include definition of a function Annulus that is clashing with the function of the same name that's been built into Mathematica since version 10.2.

For example, the function Pulley in the second of those add-ons calls Annulus and produces an error that the called Annulus expression is not a graphics primitive.

Does anybody have a fix for this?

It's not enough to delete the definition of Annulus in GraphicsTools.m, because various options are set for it in the packages.

POSTED BY: Murray Eisenberg
5 Replies

Version 10.2 introduced the function Annulus. This was a welcome addition and replaced the need for my clunky Annulus function, which only created a polygon; having a primitive is far superior. The new syntax was slightly different than mine but the fix was trivial. I thought I had posted the update but apparently I hadn't. Sorry about that. The updated files (and other package) can be found at the link below. (Note that this may be a different link.)

http://cit.blinn.edu/physics/Mathematica/index.html

These packages, GraphicsTools and MechanicsTools, are simple packages, meaning that they evaluate functions without creating a context. Since these packages contain only stand-alone functions and no internal functions, I see no advantage to creating a package with context. My circuit drawing package, also at that download link, is a proper package with context.

POSTED BY: Terrence Honan

Thanks for the updated files. The two packages work perfectly now.

POSTED BY: Murray Eisenberg

CCing @Terrence Honan here so he will be aware of the issue.

POSTED BY: Sam Carrettie

In a reply that for reasons unknown is not appearing here, David Reiss asking whether renaming Annulus to something else in the package would fix things.

Naturally, that's the first thing I tried, renaming the function GTAnnulus. And indeed an expression such as

 Graphics[GTAnnulus[{1, 1}, 2, 3]]

works just fine. However, when the same, renamed, function GTAnnulus is called by the MechanicsTools function Pulley, I still get the error. (Yes, I did edit and save MechanicsTools.m so as to rename calls there to be to GTAnnulus rather than to the original Annulus)

It may be that there's some deeper bug in the definition of Pulley there.

POSTED BY: Murray Eisenberg

Would renaming Annulus to something else in the package do the trick?

POSTED BY: David Reiss
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract