Geomagic Points Beyond Blog

Points Beyond Blogs

Ping-Fu-exec

Beyond the Box

The news and stories from Geomagic that you don't find anywhere else.

Ping-Fu-exec

Sandham's Flying Circus

The crazy world of customizing Geomagic products

Ping-Fu-exec

The World is 3D

Seeing the world in 3D from Ping Fu

Knowledge Base Nuggets - How can I select models from the active selection of points, polygons, or scans with a script?

Necessity truly is the mother of invention.  Here's an example.  Someone (who will go unamed...OK, me) that does not scan every day, ran into a little problem.  I'm working on a project for another article that involves scanning a disassembled mouse.  I scanned one side, flipped it, and scanned the other without thinking too much about the model formation in Studio....and this is what I saw when I looked at the screen...

 

Knowledge Base Nuggets - How can I find the current User folders using Python?

Have you ever wanted to write a script that saves a file to the current user's desktop?  Do you want to find out how?  Enjoy this week's Knowledge Base Nugget...

Q: How can I find the current User folders using Python?

 

Knowledge Base Nuggets - How can I use Python to project points to a plane?

Lately I've been having to perform a lot of vector math...what fun.  Luckily the GPSE comes preloaded with helper functions and overloaded arithmetic operators.  Here's today's nugget...projecting points to a plane.

Q: How can I use Python to project points to a plane?

Knowledge Base Nuggets - How can I Cut and Paste Feature Properties?

 

System integration is where the "rubber hits the road" when we talk about process computerization and automation in the same sentence.  Computerization alone for tasks such as 3D part inspection or the analysis and preparation of scans for rapid prototyping may not provide an optimal process conversion from manual to digital.

Automation adds a new level of productivity, a new level of speed, and an integral part of it is communicating the resultant data to and from connected sensors and computing systems.  Seamlessly transferring data to and from other formats, other systems, and other applications is crucial.  However, there are times where a simple cut and paste will suffice, and although we are working hard to make this easier and GUI driven, GPSE has an answer...

Q: How can I Cut and Paste Feature Properties?

Knowledge Base Nuggets - How can I interact with Microsoft Excel© with Python?

Let's face it...many of us use Microsoft Excel.  It's easy to learn, intuitive, and a proven technology that can organize, process, and present data.  Even if you haven't authored a Workbook you probably use someone else's spreadsheet and macro's...maybe not even realizing the power at your finger tips. Well my fellow system integrators...tired of CSV?...tired of XML?...get ready and hang on...and let your Geomagic scripts dynamically update your workbooks...

Q: How can I interact with Microsoft Excel© with Python?

Knowledge Base Nuggets - Sharing values between scripts?

When your scripting solutions become more complex...more powerful...you will most likely need to share values between functions and scripts.  You might even need to share information with programs outside of the GPSE.

The Geomagic Python Scripting Environment (GPSE) is just that...an environment...it can be thought of as a door or window to the current session or process of a running Geomagic industrial application...a programming interface to your data and our technology.  Each of our v2012 industrial applications: Geomagic Studio/Wrap/Qualify/Probe v2012 includes this programming interface.

Note: You can now find the GPSE Help through the standard Geomagic Help by pressing the Help Button in your open application, looking up "About Scripting" in the Search Tab, and opening the Scripting Documentation link to the html help system.

So, where am I going with all this...well, I am simply framing the nugget for this week.  The enviroment, the GPSE, is alive as long as the application is running...and it is in this enviroment that you can create and share objects: variables, classes, and functions (models, features, numbers, strings, code, etc.) in and between not only your functions in your script, but also with other scripts and even programs outside of the GPSE.  How do you share data between scripts?  Enjoy this weeks GPSE snack...

Knowledge Base Nuggets - Can I set options with a macro or script?

Setting Options can be a powerful tool when automating complex operations.  From importing your data to inspecting your parts. But if you are running a batch process, how do you change an option mid-stream?  In short...here is the nugget:


 

Q: Can I set options with a macro or script?

Knowledge Base Nuggets - How do I select multiple objects in the Model Manager with Python?

There is nothing like a fresh crispy Knowledge Base Nugget on Monday morning.  Today's is extra crispy.  How do you select multiple objects in the Model Manager with Python? How do you use GPSE API calls and macros together. And...How do you create dynamic Python statements to build and call macros?...all in one Knowledge Base Article?  Sounds like a lot....and before we sink our teeth in...

What's a GPSE API you ask?  GPSE (pronounced "gypsy") is our acronym for the Geomagic Python Scripting Environment, and API is the industry standard acronym for Application Programming Interface....together they mean using Python to drive our technology.

Knowledge Base Nuggets - How do I use Tkinter while running a script inside the application?

The benefit of using a scripting language like Python is that it encapsulates huge amounts of work into convenient Modules, Classes, and Functions.  This is the case with Python's Tcl/Tk/Tkinter modules.

Quickly, as an example, these modules can be used to present your user with a familiar Window's dialog that enables them to browse and select a folder, file, or a list of files with just a few lines of code.  Anyone that has programmed a full blown Window's application can appreciate this...even if you haven't, trust me...asking a user for a file name should not be rocket science.  If you can spare a few bucks...please thank the team at the Python Software Foundation for their years of effort...for US Tax payers and some other countries it is tax deductible...check the site if you are unsure.

This post has two purposes. One, through the KB Article, mention the Tcl/Tk modules, the bugs, and what it takes to get them to work from within our applications, and two, announce the new Folder and File Selection Dialog we are adding to our Geomagic Python Scripting Environment (GPSE - pronounced "gypsy") in the upcoming Service Relase. This enhancement eliminates the known bugs and requires nothing outside of a standard Geomagic Qualify, Studio, Wrap, or Qualify Probe 2012.1 installation.

Stay tuned for the Service Release!

Here's the nugget...

Knowledge Base Nuggets - How can I run a single macro from the command line?

In my attempts to understand the history of macros and scripting here at Geomagic I have spent a great deal of time browsing our Knowledge Base.  The thought occurred to me, usually after finding something useful which honestly occurs quite often, "Hey, I should share this." So starting today I will feature a KB article that I found to be useful, each week, whether it is related to scripting or not...