Most efficient way to model 1000s of objects?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I need to efficiently create a lattice composed of cylinders with a sphere at each intersection. I have the code for creating the positions of each beam in the lattice working efficiently but actually creating the bodies is crushingly slow (hours).
At the end of the process the lattice will be continuous (ie could be combined into a single body) but currently the input is just a list of pairs of points so i'm just creating the beams in the order that they presented in the list. The current process is:
for each pair of points: create a sketch at first point on the plane normal to the line add a circle to the sketch sweep circle along the line delete the sketch
for each unique point:
create a sketch at the point
sketch a circle
revolve circle to create sphere
delete the sketch
combine all beams and spheres into a single body
I feel like Fusion might be the wrong tool for a modelling job like this but I thought i'd ask the community if there's a more efficient way. Is it better to incrementally add to a single lattice body? I imagine fusion is struggling to manage the thousands of individual bodies that are generated before combining.