cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Need help navigating or using the PTC Community? Contact the community team. X

Export Assembly to STL with JLink

nborrerojr.
12-Amethyst

Export Assembly to STL with JLink

Hello,

 

I am using jlink to export individual parts of an assembly to separate STL files. Right now, when it does the exports, it exports them as if the part was opened individually which results in the part basically being centered around point (0, 0, 0). What I want it to do is maintain its 3D position relative to the assembly.

 

I think I can get it's position within the assembly using

ComponentFeat.GetPosition().GetOrigin();

This opens up the possibility of storing that data and post-processing the parts but I really don't want to have to do that.

 

When I create the export instructions, I do not specify a coordinate system since the individual parts don't have the coordinate system that the assembly has.

pfcModel.STLBinaryExportInstructions_Create(null);

I was hoping that maybe there was a way to copy the coordinate system into the individual part just prior to export so that it will maintain its position relative to the assembly. Is there a way to do this?

 

Thanks in advance.

ACCEPTED SOLUTION

Accepted Solutions

The only solution I was able to come up with was to store the position and rotation in an XML file during export and then set those values once the STL was in the other application using code.

View solution in original post

1 REPLY 1

The only solution I was able to come up with was to store the position and rotation in an XML file during export and then set those values once the STL was in the other application using code.

Announcements
NEW Creo+ Topics: Real-time Collaboration


Top Tags