Closed simjeh closed 2 years ago
but is it actually the same file? then it would also be the same mesh right? Otherwise what is the expected result (or why wouldn't it work?)
Problem 1: Duplicate link name. In Fusion, there is an additional number for the component. But we only put the component name for the link name so urdf has two links with the same name. And it doesn't work. Component number or something else should be put as a suffix at link name and mesh name. Problem 2: we save mesh in global coordinates. so we cannot use same mesh files for the other link. (If we load entire meshes then meshes are at desired position. mesh has coordinate info also so we cannot use the same mesh) It could be solved by saving the mesh files with the additional suffix
for i in range(0, occurrences.count): occ = occurrences.item(i) occurrences index(i) could be a suffix.
What is displayed in Fusion 360 is "Instance number". But I cannot find how to find the instance number.
Okay I think I understand. Will try to fix today
can you post a screenshot of the names in the hierarchy that cause this problem.
we are saving the components name already, with the instance like: 'UL_Shoulder_1 v3:1'
so I don't see where to fix the thing you are saying
https://github.com/cadop/fusion360descriptor/blob/052d1ffe7965ef67ffebce8c7b545beec91fa387/Descriptor/core/parts.py#L163 https://github.com/cadop/fusion360descriptor/blob/052d1ffe7965ef67ffebce8c7b545beec91fa387/Descriptor/core/parts.py#L64-L68
i think we should change the link-name with this way self.name=self.name.split(':')[0]+'_'+self.name.split(':')[1]
it also should be changed tofile_name = os.path.join(save_dir, oc.name.split(':')[0]+'_'+oc.name.split(':')[1])
Because filesystem doesn't allow the ":" at the name, I put'_'.
okay I see the problem thanks. even though we saved oc.component.name
fusion was removing the version number after :
. Ill push a fix today
pushed a fix. please check and reopen issue if still is broken
yeah. it is working properly
When I use the same file for the same robot as a link, stl meshes are just overwritten. so in this case we need to warn about it or make some additional file name.