top of page
Search
Writer's pictureCaden Armstrong

Exporting Labeled Geometry with FeatureScript

I've been asked a few times about a variety of challenges that all fall under the same category:

  • Can I export the attributes set with FeatureScript?

  • Can I export face IDs from Onshape?

  • Can I link a model in Onshape and one in another system?


Working with metadata within Onshape isn't too difficult. Associating data to a face is a challenge because the internal ID system of a CAD program isn't shared between systems, nor is it predictable. This challenge comes up when working with CFD, FEA, animatronics, and more.


So how do I associate metadata with a face outside of Onshape? The answer: Colour.


FeatureScript lets you set the appearance of a face on a body, and that colour is included in the exported file. To associate the metadata, all we need to do is create a feature that colours each face a unique colour, and then output a table of data from the featurescript.


For example, here is a model with 3 labeled faces, each with a unique colour. In my external program, I want to know three datums, so the labels are simply A,B,C.




And the output of the FeatureScript reading stored metadata.


In the STEP file, looking through you can find the colour of the face being set:


#128=COLOUR_RGB('',0.1,0.1,0.1);


Looking at our table of data, we know that this face must be Datum A. We can then use this data in our external process.


Does this sound like a solution to a problem you have? SmartBench Software is the leading provider of Onshape Custom Software Solutions, reach out today for a free discovery call.

30 views0 comments

Recent Posts

See All

Commentaires


bottom of page