Get center point coordinates of selected objects

Get center point coordinates of selected objects

haraldXAY5Z
Participant Participant
1,546 Views
4 Replies
Message 1 of 5

Get center point coordinates of selected objects

haraldXAY5Z
Participant
Participant

Hello!

I've designed a LED installation in Fusion 360, and now I'm about to map all the LED pixels in a 2D coordinate space.

My very boring and tedious method at the moment is to click one and one object (representing a pixel) with the measuring tool, and the copying the x and y coordinates to an excel sheet. My installation has more than 400 pixels, so this is quite a ****ty job to.

I'm dreaming of a script or add-in that lets me select all the objects in question, and then exports the center coordinate to a csv-file for me. It would literally save me hours of work.

Is there anyone who can help me out with this?

0 Likes
1,547 Views
4 Replies
Replies (4)
Message 2 of 5

BrianEkins
Mentor
Mentor

It should be a fairly simple program, but it depends on what kind of object you're using to represent a pixel.  Is it a body, a construction point, a component, a sketch point, or maybe even something else?

---------------------------------------------------------------
Brian Ekins
Inventor and Fusion 360 API Expert
Website/Blog: https://EkinsSolutions.com
Message 3 of 5

haraldXAY5Z
Participant
Participant

I'm also imagining it should be fairly simple, but I don't have any experience with making add-ins or scripts for Fusion.

At the moment I'm using cylindrical objects to represent the pixels. Then I open the measure tool and select the top face of the cylindrical object and copy the centre points X, Y, and/or Z coordinate.

The reason I'm using objects is because I can copy objects along a path. I don't know about any method of placing points or sketch shapes along a path.

0 Likes
Message 4 of 5

BrianEkins
Mentor
Mentor

Can you attach a simple example of a design?  A cylinder could be represented by just a body or it could be an occurrence that references a component that contains the body.  Having access to the design would answer the question very easily.

---------------------------------------------------------------
Brian Ekins
Inventor and Fusion 360 API Expert
Website/Blog: https://EkinsSolutions.com
0 Likes
Message 5 of 5

haraldXAY5Z
Participant
Participant

Yes, I can do that 🙂

Heads up: the file is quite a mess!

The bodys representing the pixels are the last ones in the list: body178 to body654. They can be hard to see if you are zoomed out, but they are located around the origin point.

I've uploaded both the design in question, and a screencast where you can see what I do.

 

 

 

0 Likes