Assembly2CAD demonstrates how to build a Fusion 360 CAD model from the assembly data provided with the Assembly Dataset. The resulting CAD model has a complete assembly tree and fully specified parametric joints.
Assembly2CAD runs in Fusion 360 as a script with the following steps.
- Follow the general instructions here to get setup with Fusion 360.
- Optionally change the
assembly_file
inassembly2cad.py
to point towards anassembly.json
provided with the Assembly Dataset. - Optionally change the
png_file
andf3d_file
inassembly2cad.py
to your preferred name for each file that is exported. - Run the
assembly2cad.py
script from within Fusion 360. When the script has finished running the design will be open in Fusion 360. - Check the contents of
assembly2cad/
directory to find the .f3d that was exported.
If you look into the code you will notice that the hard work is performed by assembly_importer.py
and does the following:
- Opens and reads
assembly.json
. - Gets a list of all .smt files are in the directory where
assembly.json
is located. - Looks into the
root
data ofassembly.json
and creates brep bodies from the smt files at the root level. - Looks into
tree
andoccurrences
data of theassembly.json
and creates components/occurrences by importing the appropriate .smt files. - After the assembly tree is built it creates joints if specified in
assembly.json
.