possible adsk.fusion.CombineFeatures.createInput method bug

possible adsk.fusion.CombineFeatures.createInput method bug

dirktheeng
Advocate Advocate
617 Views
2 Replies
Message 1 of 3

possible adsk.fusion.CombineFeatures.createInput method bug

dirktheeng
Advocate
Advocate

Not sure if this is a bug or just somethign that isn't fully supported yet.  I tried to do a combine and when I follow the docs in spyder it tells me to give it a body and a collection, but then errors out and teslls me it needs 4 entries not 3 (one being self).  Not sure if this is really part of the API yet because CombineFeatures is not in the docs online.  Just checking.

21st Century Woodworking

-Blending 21st Century Woodworking with Old World Skill
0 Likes
618 Views
2 Replies
Replies (2)
Message 2 of 3

marshaltu
Autodesk
Autodesk

Hello,

 

I did a quick test in Fusion MAC(1365). It works well. I created two primitives: one box and one cylinder. The two bodies will be combined into one body after running the following scripts.

 

Please share your codes to us. Then we could find what's root cause?

 

Thanks,

Marshal

 

----------------------

import adsk.core, adsk.fusion, traceback

ui = None

app = None

 

 

def main():

global ui, app

try:

app = adsk.core.Application.get()

design = adsk.fusion.Design.cast(app.activeProduct)

comp = design.rootComponent

body1 = comp.bRepBodies.item(0)

body2 = comp.bRepBodies.item(1)

toolBodies = adsk.core.ObjectCollection.create()

toolBodies.add(body2)

input1 = comp.features.combineFeatures.createInput(body1, toolBodies)

comp.features.combineFeatures.add(input1)

 

except:

if ui:

ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))

 

main()



Marshal Tu
Fusion Developer
>
0 Likes
Message 3 of 3

dirktheeng
Advocate
Advocate

let me give this a try and see how it works.  Hopefully I can make it work.

21st Century Woodworking

-Blending 21st Century Woodworking with Old World Skill
0 Likes