AutodeskAILab / Fusion360GalleryDataset

Data, tools, and documentation of the Fusion 360 Gallery Dataset
Other
421 stars 51 forks source link

Parts of the Assembly Dataset in JSON graph format #92

Closed leopoldmaillard closed 1 year ago

leopoldmaillard commented 2 years ago

Hello @karldd ! Hope you and your team had a great CVPR 🎷

Unlike the Assembly - Joint subset, parts in the complete Assembly dataset aren't available in the NetworkX Graph JSON format. This format is super useful to parse geometrical features that are not necessarily encoded in the part's STEP or SMT files.

I was wondering if you planned to release a version of the dataset that includes the parts in this format.

Thank you as always for your great work and kind help 😄

karldd commented 2 years ago

Thank you. Yes CVPR was great!

Unfortunately, we don't have plans to release the NetworkX Graph JSON data for the assembly subset. However, you can check out this code here from UV-Net that takes STEP files and makes them into DGL graphs. https://github.com/AutodeskAILab/UV-Net/blob/main/process/solid_to_graph.py With some minor edits this could output to other graph formats like the NetworkX JSON.

If you need to maintain the references to the faces and edges in the original data, then I also have a script for creating the NetworkX Graph JSON using Fusion 360. I can post that if it is helpful, but it can be challenging to process large numbers of files this way.

leopoldmaillard commented 2 years ago

Hello and thank you for your answer !

The JSON format was indeed super convenient to maintain the references to the part topological entities as well as to have ready-to-use input features to feed to a neural net. However, I will try out your alternative using OCC !

I don't think I'll be able to use F360 myself, but the script might deserve a place in this repository 😉

I might have some questions concerning the Assembly Dataset if you don't mind. I was wondering if some common parts (screws, nuts, etc.) were used in multiple assemblies, and if so, they had the same name along the different assemblies, so we can identify them.

I also noticed that the part names in the Assembly Dataset and the Joint Subset were not the same, and I was wondering if I missed a way to map the parts between the 2 sets (other than comparing the obj/step/smt files which would be pretty intense on the whole dataset).

Thank you as always and have a nice day ! 😄

karldd commented 2 years ago

I was wondering if some common parts (screws, nuts, etc.) were used in multiple assemblies, and if so, they had the same name along the different assemblies, so we can identify them.

I imagine the answer to this is "Yes" as designers will use the same standard components e.g. screws. However there is no information in the dataset about this.

I also noticed that the part names in the Assembly Dataset and the Joint Subset were not the same

So the files from the Joint data and the folder from the Assembly data will have a common root name e.g. 132380_f370230e which indicates if they came from the same Fusion 360 file. Beyond that we don't keep the individual part names in a way that allows mapping between the two.

other than comparing the obj/step/smt files which would be pretty intense on the whole dataset

Actually this isn't too bad. We do this to detect and remove duplicate designs. The general approach is to make a hash from each B-Rep, for example using the number of faces, face type, or vertex locations. Then you can check if multiple files return the same hash.