A customer emailed me this morning to ask whether we had a utility that would translate Gridgen’s Glyph scripts (version 1) to Pointwise’s Glyph scripts (version 2). With the pending release of Pointwise Version 17, such a utility would facilitate the move from Gridgen to Pointwise.
The simple answer is no, there is no Glyph 1 to Glyph 2 translator.
It is a simple answer, but not simply arrived at. I thought some of you might be interested in how we reached that decision.
100% Compatibility is Difficult to Achieve
Our goal with Pointwise was always to have complete compatibility with Gridgen. We’ve been able to achieve that for virtually all cases of moving Gridgen native .gg files from Pointwise to Gridgen and back again. With two codes that are vastly different, however, quirks are bound to arise. For example, we changed how the geometry of connectors is maintained (to have complete consistency with database curves) and this introduced a quirk with circular arcs. But I digress.
As it turns out, that was the easy part. Scripting language compatibility is a whole different ball game. Glyph 1 was added to Gridgen well after the code had matured and as a result it doesn’t cover 100% of the software’s functionality. On the other hand, Glyph 2 was designed into Pointwise from the start and therefore handles everything while also introducing a new object-oriented syntax that more closely mimics what the GUI is doing.
Therefore, Glyph 1 and Glyph 2 are very different languages.
Wrapper or Converter? Choose Your Poison.
The two ideas we came up with for allowing Gridgen’s Glyph 1 scripts to run in Pointwise were a wrapper and a converter.
The wrapper would be a huge Glyph 2 utility script that had calls that mimicked Glyph 1 functions. You’d attach this utility to your script and run it in Pointwise.
The converter would be built into Pointwise. It would parse your Glyph 1 script and export the equivalent Glyph 2 script.
The obvious problem with either approach is Gridgen functions that don’t exist in Pointwise. For example, we didn’t port Ortho TFI or the ability to export structured grids in the old Gridgen style.
There is a less obvious problem with both approaches. Some commands have been implemented so differently in Pointwise that it would be very difficult to map them into Gridgen’s Glyph 1. Two commands that suffer from this problem are solid modeling and grid point distribution on connectors.
The wrapper approach also creates a long-term problem in that it allows people to keep writing Glyph 1 scripts when it would be better for everyone to start using Glyph 2. Worse, it would allow people to write scripts that were a mixed of Glyph 1 and Glyph 2. Shudder.
Finally, writing a converter would require us to write a complete Tcl interpreter (Tcl is the scripting language on which Glyph is based) in order to be able to parse the Glyph 1. I think you’ll agree that writing a scripting language interpreter is a serious undertaking.
Lots of Work, Zero Guarantee of 100% Success
The fact that something requires a lot of effort isn’t a deal killer. After all, we just put a new user interface and workflow on our meshing technology. But the fact that we could not imagine anything other than the most trivial scripts being converted with 100% success was a real turn-off.
I’m an engineer and most of you probably are too. We’re all familiar with compromise, giving up one thing to get something else. We chose to compromise by not spending a lot of time on converters and wrappers that had obvious flaws. Instead, we’ll spend our development effort on other new capabilities for the software. We’ll solve the Glyph 1-2 issue by collaborating with users on script conversion on a case by case basis where we know success can be achieved.
Scripting with Glyph 2
What resources are available to you as you convert Glyph 1 scripts to Glyph 2?
- Our Tech Support Team is always available to assist. Call them at 800-4PT-WISE or email them at email@example.com. Show them your script and talk about a conversion strategy.
- A special Glyph Scripting Course has been scheduled for 20-22 March 2012 here in Fort Worth. This would be a great forum to dedicate several days to face-to-face discussion and learning about Glyph 2.
- We’ve started work on a Glyph Utility Library that consists of version-neutral Glyph calls for common commands that will let you write one script that works in either Gridgen or Pointwise. When complete, this library will be available on our Glyph Script Exchange website.
Blogging About a Non-Feature?
You’re probably used to reading a lot of articles about new features and how they impact your work and the wonderful things you can do with them. On the other hand, I thought you’d like to read about our thought process behind the scenes and why some features don’t make the cut.
I’d love to read your comments on this issue.
And hopefully we’ll see you here in Fort Worth in March for the Glyph training course.