Hi @joao.araujoDNTFK .
As I think I mentioned before, I don't think the API provides mesh functionality.
Therefore, there seems to be no other way than to use text commands.
I have created a sample.
# Fusion360API Python script
import traceback
import adsk.core as core
import adsk.fusion as fusion
def run(context):
ui = core.UserInterface.cast(None)
try:
app: core.Application = core.Application.get()
ui = app.userInterface
des: fusion.Design = app.activeProduct
root: fusion.Component = des.rootComponent
exec_mesh_combine(
'Join',
root.meshBodies[0],
root.meshBodies[1],
)
except:
if ui:
ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))
def exec_mesh_combine(
combineType: str,
targetBody: fusion.MeshBody,
toolBody: fusion.MeshBody,
) -> None:
'''
combineType: 'Join','Intersect','Cut','Merge'
'''
combineTypeDict = {
'Join': 'infoTypeUnify',
'Intersect': 'infoTypeIntersect',
'Cut': 'infoTypeSubstract',
'Merge': 'infoTypeMerge',
}
if not combineType in combineTypeDict.keys():
return
app: core.Application = core.Application.get()
sels: core.Selections = app.userInterface.activeSelections
sels.clear()
sels.add(targetBody)
sels.add(toolBody)
app.executeTextCommand(u'Commands.Start ParaMeshCombineCommand')
app.executeTextCommand(u'Commands.SetString infoType {}'.format(combineTypeDict[combineType]))
app.executeTextCommand(u'NuCommands.CommitCmd')
Have you tried the previous repair? This sample is almost the same as the repair.
https://forums.autodesk.com/t5/fusion-360-api-and-scripts/how-to-use-the-mesh-repair-comand-in-the-a...