CAD

Posts containing CAD

I’ve written my last two blogs about different pitfalls and insight needed in order to properly translate CAD data. I’ve discussed how “sharing” of geometry inside the data structure is a hidden but much used form of design intent and discussed how geometry forms are inherently linked to high-level algorithms inside the modeler itself. But I haven’t discussed the healing operations that the Spatial translators perform in order to properly translate the different CAD formats. If you use our translators you know they exist, and people commonly ask about their purpose and efficacy. 

To understand InterOp healing we have to start by borrowing a concept from any undergraduate Data Structure and Algorithms class. Generally, one views a software system as two distinct but highly inter-related concepts: a data structure and an acting set of algorithms or operators. In our case the data structure is a classic Boundary Representation structure (B-rep) which geometrically and topologically models wire, sheet and solid data. An operator is an action on that data, for example, an algorithm to determine if a point is inside the solid or not.  But the system’s operators are more than just a set of actions. Implicitly, the operators define a set of rules that the structure must obey. Not all the rules are enforced in the structure itself; actually, many can’t be. But they exist and it’s healing in InterOp that properly conditions the B-rep data to adhere to these rules upon translation.

As always a couple of examples best describe the point. I picked three ACIS rules that are, hopefully, easily understandable.

All 3d edge geometry must be projectable to the surface. Anybody can define a spline based EDGE curve and a surface and write it to SAT. Basically, jot down a bunch of control points, knot vectors, what have you, and put it in a file that obeys SAT format. But in order for it to work properly, geometric rules for edge geometries exist. Specifically, the edge geometry must be projectable to the surface. In short, you can’t have this:

Edge Curve

 

There are many reasons in ACIS for this, but primarily if it’s not projectable then point-perp operations are not well-behaved. If they’re not well behaved finding the correct tolerance (distance between the curve and the surface) is problematic. If one cannot define correct tolerances then water-tightness is not achieved and simple operators, like querying if a point is inside the body, fail. 

 

 

 

Edge and Face geometry cannot be self-intersecting. A great deal of solid modeling algorithms work by firing rays and analyzing intersections with different edge and face geometries.  In order for any conclusion to be drawn, the results of the intersection must be quantifiable. The problem with self intersecting geometries is just that; how to you quantify the results in Figure 3? The key observation here; imagine you are walking along the curve in Figure 3, starting from the left side. At the start, the material is on the right side, but after the self intersection the material changes to the left side. You cross the self intersection again and the material switches to the right again. This causes endless grief in understanding the results of an intersection.

 

Tolerances of Vertices cannot entirely consume neighboring edges. For a B-rep model to be considered water-tight, tolerances of faces and edges must be understood. Today many kernels have global tolerances plus optional tolerances applied to edge curves and vertices. These tolerances vary depending on neighboring conditions, usually obeying some upper bound. You can think of these tolerances as the “caulking” that keeps the model water-tight. Depending on the quality of the geometry or the tolerances of the originating modeling system you might need more “caulking” or less; respectively, larger tolerances on edges or vertices, or smaller tolerances.  However in order to realize a robust Boolean engine, again, rules apply. Consider this:

 

 

 

 

 

 

 

 

 

 

Above we have Edge Curve 2 encapsulated completely inside the gray tolerant vertex. Again, I can easily write this configuration to SAT format, however Booleans cannot process it. It yields horrific ambiguity when building the intersection graphs in the internal stages of Booleans. 

So this is a list of just three rules, it’s far from being comprehensive. But the main point: we know that not everything that ends up in an IGES file comes from a mathematically rigorous surfacing or solid modeling engine. Perhaps people are translating their home-grown data into a system like ACIS so they can perform operations that they could not in their originating system.  But in order to perform these operations, the data must conform to the rules of the system. To simply marshal the data and obey a file format, but disregard the rules, is doing just half the job. 

That’s why healing matters.  

 

 

Today, I’m going to discuss how we’ve been using Application Driven Development (AppDD) principles in our work on CGM.

point cloudsYou might have noticed this really cool picture in Stefanie's last post. It’s really cool because it was the result of our work on the CGM componentization team over the past couple of months – putting dimensional metrology support into our demo application C3D Toolkit.  And the other cool part is that we used AppDD to drive the project.

First, some background.  A few years back we started getting requests for the ability to work with large sets of points (point clouds) from our dimensional metrology customers.  So for the past few years we have been incrementally expanding our support for point clouds in our product line.

A primary workflow in dimensional metrology is to measure a cloud of points on the surface of a manufactured part and compare those measurements to a CAD model representing the desired geometry. 

To do this, the following high-level operations are required:

Operation #1

Operation #2

 

 

 

Operation #3

 

 

 

Over the course of several projects, we had incorporated API functions into ACIS to provide these services.  During these projects we worked closely with target customers who were incorporating these functions into their applications, so we were intentionally very focused on the individual functions.  The last project of this sequence was to port this point cloud functionality into CGM – I’ll call this version “Phase 1”.

The opportunity to do AppDD came up a couple of months ago when Ray, our PM, told us that he needed a C3D Toolkit demonstration script for the CONTROL show.  The idea was to show how CGM’s point cloud functionality could support dimensional metrology workflows. 

C3D Toolkit is our recently-introduced JavaScript-based demo application that we’re using to showcase CGM.  I’ll talk more about C3D Toolkit in another post; the important thing to know is that the one of its goals is to give us a platform to perform AppDD.  The extensions that we write in C3D Toolkit are very high-level; the intent is that the functionality that might appear behind a GUI button in a customer application should correspond to a single C3D Toolkit extension.

laser scannerOur first step in the AppDD process was to get a 'storyboard' from Ray of the entire workflow(s) that he wanted to show.  This turned out to be a 1 page e-mail describing the steps of the demo.

Our next step was to generate proposed demo scripts.  One of our team went off and wrote a straw man of what he thought the actual javascript code for the demo should be.  Then, in the spirit of teamwork, we all gathered around a pairing station and criticized his straw man :)  In particular, we had to decide exactly what the return value was for each call to a JS extension, and what the screen would be showing at each stage.  And this is where we saw the true value of AppDD take hold – when we started thinking about highlighting a set of garbage points that we’d selected for removal. 

When we originally estimated the project, we thought it would probably take a single two-week iteration, because the hard algorithmic work had already been done in Phase 1.  What we hadn’t realized is that we would need a new “part management” layer in the application to manage e.g. the bookkeeping associated with assigning different colors to different parts of the cloud in a point cloud document.  Our focus on storyboarding the entire demo first caused us to notice this mistake up front, while we had time to adjust our estimates.  It also allowed us to rough out the design up front, rather than generating a lot of code and architecture churn as we incrementally discovered unanticipated workflow requirements.

Only after we understood the demo scripts (which also functioned as acceptance tests) did we actually start coding the functionality behind them.  A week before our deadline we were able to demo the bulk of the scripts to Ray, who gave us some course corrections that we incorporated.  In the mean time, Ray had also been busy.  Since we were trying to mimic a real customer process as closely as possible, we wanted to work with real scan data of a real part manufactured from a real CAD model.  So Ray decided on a CAD model to use in the demo, and sent it out (after introducing a distortion for us to detect) to a service provider who manufactured it with a 3D printer and then scanned the resulting part.  Stef’s really cool picture is the result of running our demo on this data, with color coding based on whether the measured points are within tolerance of the model.

We’re told that the demo went off very well at the show; people especially liked the ability to hold the actual part in their hands and compare it to the scan results on the screen.  An important take away from the project is that the core functionality that we had already written (registration and point-body distance) worked “out of the box” – it was the support infrastructure for managing point clouds in an application document that we spent most of our time on.  This validated for us the idea that AppDD helps to ensure a complete interface for customers.  Now that we’ve identified (and have working code for) a new layer of functionality that many of our customers will need, we have an opportunity to move it into our point cloud product.

C3D Toolkit

The full demo on this part can be seen in Gregg’s webinar on C3D Toolkit and CGM – it starts at the 30 minute mark and runs about 10 minutes (but you should feel free to watch the whole thing :).  One thing to look for: the scan of our part actually did have some garbage points that he removes as a first step.  If we hadn’t already thought of the cleanup requirement when designing the demo, we would have discovered it here because we used a real scan (rather than manufacturing test data).

From: MARKSON Howie
To: KENNY Stefanie; OETTING Gregg; ALPINE John; SLOAN John; TATTERSON Kevin
Subject: RE: Let's Start a Blog

Seems like we all have enough ideas to write an interesting blog. I have a great idea what our first post should be. Let's get started! 


From: ALPINE John
A great idea, we have no shortage of opinions and RSD’s (Really Smart Developers).  One of the more unique things about our business is that our end users are also developers.  So I would imagine we have something to talk about here. 

As we just announced CGM, why not have Gregg start out and talk about what’s different in CGM than ACIS from a technical standpoint? 


From: SLOAN John
Um - guys?  I thought I was the one who got the Really Opinionated Developer title.  Especially about Object Oriented Design and Architecture issues.  And about Typing Titles With Lots of Caps and How German Classes Ruined My Capitalization Ability. Is John A in? 


From: TATTERSON Kevin
Turns out we’ve all got opinions ;)

I’m sure I could come up with stuff.  I don’t know much about blogging, but from what I can tell, a blog entry doesn’t necessarily have to bring closure – it just has to put an opinion on a subject to get people thinking.  And it can’t take more than a couple minutes to read – the best ones are relatively short.

I’d put something crazy out there like “people or process – which matters most?”  Stir the conventional wisdom pot a bit. What does John think? 


From: OETTING Gregg
I’m doing the first one!? How about whoever is that last person to reply does the first blog. That’s the way I manage; by fear. Kind of like the kid’s story about the ducks getting back on some boat and the last one gets a whack on his butt. Actually, I spend a lot of time thinking about motivating developers; ownership, recognition, connecting them with customers, innovation and good old fashion fear. But I’m not sure that would make a good blog topic, especially with how this all interconnected during our integration with AGILE and Scrum.

I’ll bet Kevin has an opinion on this Blog. He has an opinion on everything. 


From: KENNY Stefanie
I don’t know about your addressing me as an RSD, but I’ll offer my opinion anyway.  Perhaps I should be a called a Really Opinionated Developer instead. 

Anyway, I like this idea.  From me personally, I’d like to discuss Interoperability and some of the difficulties surrounding it.  I’d also like to draw on my QA background to talk about testing and how modern ideas on testing from other domains, like web application development, can be applied to CAD and 3D.  We could even go further with this idea and discuss a range of software practices and tools and how they apply to the engineering software domain, for instance, what have been some of our successes (and failures) in applying Agile processes.

What are you thinking for the first entry?  I think it should be quite profound… set the tone for the rest of the blog, hint at topics to come and perhaps discuss one particular topic of utmost importance, including some ground-breaking insights.  You know… show how Really Smart we are.

Hmm, I’m coming up a little short on ground-breaking insights today, so I think Gregg should do the first one. 


From: MARKSON Howie
Hey Really Smart Developers,

It seems like we should start a really cool blog.  Everyone else is doing it and we certainly are at least as interesting as everyone else.  Maybe more so, if you consider we live in Colorado.  Plus we know a lot about developing engineering software and we talk with other developers, our customers, everyday.  So what do you think?  Anybody have any suggestions on what we could talk about in our blog?

Twitter Facebook LinkedIn YouTube RSS