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

Community Tip - Did you get an answer that solved your problem? Please mark it as an Accepted Solution so others with the same problem can find the answer easily. X

Export point data

CAD_User_De
1-Newbie

Export point data

Hi all together

 

I have the following problem and could not found something about:

I have an STL-File (with facets) and need the position data of each point at each intersection.

Ideally in the form of a text table.
I do need that to compare the CAD values with the final values after the production.

 

I made a section, than right click to get a curve of the cross-section. Now I have the curve but does that help me?


I have no more ideas and hope someone of you can help me?!

 

Best regards
Patrick

5 REPLIES 5

If you output an ASCII .stl file, rather than the default BINARY format, you get a text file that contains a series of facets. Many many facets. Each facet is a simple triangle, defined by a facet normal vector and the vertex points, like this:

  facet normal 6.947650e-01 1.861641e-01 -6.947262e-01
    outer loop
      vertex 9.843750e-01 4.725000e-02 -8.183940e-02
      vertex 1.000000e+00 3.942609e-02 -6.831009e-02
      vertex 1.000000e+00 -4.829701e-18 -7.887500e-02
    endloop
  endfacet

If it were me looking for all the points on the exterior of the object, I'd use a good text editor (Emacs for me) to edit that file and reduce it to just a list of points. A keyboard macro would work perfectly, given the repetitive format of the file.

The next "problem" you'll have to address is eliminating all the duplicate points. If the solid is manifold (fully encloses a volume), multiple facet triangles will share the same vertex, at least three times, maybe more. That particular task might mean using Excel, or maybe there's a better tool someone can recommend.

Pettersson
13-Aquamarine
(To:KenFarley)

If the data looks like that, I think you could do it all in Excel with a Power Query table. Filter any row not starting with "vertex", then divide into columns by space or tab or whatever, then remove any duplicates and output into an Excel table. That's nice since you can keep the Excel file and just switch the source to get a new file.

#BoomGoesTheDynamite!   Awesome Answer!

Hi there

Thanks for your answers.
For me it is important to get the point data for one section. That section can cause new points because not all lines of the facets ends at that section.
I have attached a screenshot.
It shows the curve (blue), the point of origin and one other point for example (set by hand).

At first, I made a section to get the curve and then I have set the points by hand...


Is it may be possible to export that curve in some way to get the point data of it?
Alternatively, set points automatically and export a list of their coordinates?

 

Many thanks.

Patrick

Ok, I have one idea, but it's not fully automated. Maybe it can get you part way. You can use the measure tool and click on each of the points (hold down ctrl). Then click the + sign in the measure: Summary window, and + again to get the results. You can select all the results and copy them, or click the "i" icon and then save them as a text file.

 

Unfortunately, this still requires you to manually select all the points. If you manage to get a datum point at each intersection point, you can collect them all into the measure tool by searching, but trying it out myself didn't let me search for the intersection points directly, and I don't know of a way to automate generating these points. You could probably do it with WebLink or JLink: Search for each line in the curve, then select each end point of that curve. Perhaps CreoSon can do it, too?

Top Tags