Main page Technology Meryl Streep, engineering data longevity and legacy CAD conversion

Meryl Streep, engineering data longevity and legacy CAD conversion

In a classic 1992 black comedy movie, two ladies drank a magic potion, which made them immortal, although prone to various health issues, including at some point being technically dead. Maintaining their structural integrity and public appearance was becoming increasingly problematic.

Meryl Streep, engineering data longevity and legacy CAD conversion

40 years earlier, the B-52 strategic bomber was commissioned into the US military arsenal, joining a multitude of surface ships, nuclear submarines and other weapon systems – all of them designed and drafted by hand. It is 2021, and B-52’s are still flying and are expected to do so for a few more decades. While a lot of people marvel at the size, raw power and longevity of that plane, very few appreciate the enormous effort associated with keeping them alive and well, including managing their design data. By all means, it is indeed a pure magic.

Meryl Streep, engineering data longevity and legacy CAD conversion

For hundreds of years, creating paper drawings on a drafting board was the universal method to create engineering designs. The advent of CAD/CAM in the 1980’s brought immense benefits to engineering and manufacturing while also committing an original sin by introducing non-human manipulation into engineering design data. When a CAD/CAM user sees a computer screen, values and images there are brought by software, which may be subject to its own design considerations and bugs. A small change in a decimal point treatment will not be noticed by end-user, but it will affect things like tolerances – and potentially hurt in the real world.

Basic 2D CAD made way to 3D modeling still paired with 2D drawings, then to full 3D MBD, and these days we are speaking about MBSEdigital twins and beyond. CAD vendors are continuously pumping out newer and more advanced versions, while older design methodologies face their inevitable death on the horizon.

For 3D models, STEP (and its PDES predecessor) was created to “improve interoperability between manufacturing companies, and thereby improve productivity” . Further on, LOTAR facilitated long-term data interoperability in the aerospace and defense community – only partly successful, considering slight cheating by vendors who understandably hated losing their precious proprietary locks.

However, there are several cases not covered by STEP at all. These include relative youngsters – legacy designs generated by products of CATIA V4 generation, which I am going to address below; and the elderlies from the B-52 era – paper and microfiche drawings, which I am going to cover another time.

In 2019 (that golden age before COVID, right?) we were contracted by a well-known aerospace and defense company to build a convertor from HPGL files generated by a number of legacy tools like CATIA V4, CADAM/CCD and LCable into the industry standard PDF format.

Created back in the 90s, CATIA V4 was a 3D CAD design tool working on AIX. As a part of our client’s release process, the design data (2D by definition) was exported to HPGL format and sent to large industrial plotters. Such an archaic process is rather expensive to maintain in today’s world and extremely difficult to integrate into a modern PLM environment. The client needed a magic elixir that could transform these old designs into a format compatible with modern processes and procedures, while at the same time validating that design data has not been changed through that process. I cannot overemphasize the importance of “validation” – those working with FAA or any other engineering compliance understand it well.

An HPGL file consists of plotter commands, mostly vectors: draw the line from (X1, Y1) to (X2, Y2), set the line thickness, fill in the predefined shape, etc. While PDF uses vectors too, there are a lot of differences in the way it deals with geometry, for example describing line joints/corners.

Meryl Streep, engineering data longevity and legacy CAD conversion

Looking back, this project was one of the most exciting endeavors we had over the last several years. But at the time, it felt more like a tsunami of challenges with our collective heads almost exploding from too much information.

We quickly realized that creating our own solution from scratch was unfeasible and instead concentrated on finding an existing product to serve as a foundation for whatever challenges lay ahead. A winner: hp2xx – an open-source HPGL to PDF tool created at the end of 1990s and supported until around 2012 by a couple of enthusiasts – to whom we owe our unwavering gratitude. There were quite a lot of bugs and scenarios the original authors never thought of which we had to address: sizing, scaling and especially fillings. Still, 90% of our core requirements were covered by hp2xx, including full control of the code. Thanks to this tool’s open-source nature, we were able to trace every data manipulation (and its mother) to support validation efforts and to handle those aforementioned new and/or special situations that popped up on a regular basis.

From the infrastructure perspective, hp2xx-based algorithmic C++ core was encapsulated into a NodeJS service worker; communication with that service implemented using regular REST API; everything on top of Docker. Later, more specialized workers were added to the system, covering other legacy data formats’ transformation to PDF. All in all, it was a simple, elegant, flexible and highly scalable setup.

As a part of our sacred validation process, each new PDF file had to be a 2D Drawing full scale print equivalent to the old methodology. We spared no effort making sure no data was lost and no new data was created. We logged everything with obsession, and extensively used another HPGL to PDF convertor called ABViewer, which yielded consistent high quality results. Unfortunately, the ABViewer team could not convince us they were covering all HPGL commands, and their logging capabilities were lacking. It did not pass our bar for being a primary tool, but it worked like a charm as a quick BS detector.

In the end, hundreds of thousands of legacy drawings were converted with 100.00% success ratio. The client’s process of working with the respective designs was finally brought into the 21st century.

One of the added benefits of having to deal with PDFs instead of paper drawings was the ability to integrate with the client’s enterprise search system and PLM by sending these PDFs through a regular OCR, easily extracting Part Numbers and other valuable information. For the first time in decades all of this data was at the client’s and its end users’ fingertips.

Now our client finally remembers where they parked the car. And if you, dear reader, are suddenly worried about your own version of the legacy CAD data limbo, your solution might be just a phone call away.