How to correctly use the importManager to import an IGES file

How to correctly use the importManager to import an IGES file

Joshua.mursic
Advocate Advocate
575 Views
3 Replies
Message 1 of 4

How to correctly use the importManager to import an IGES file

Joshua.mursic
Advocate
Advocate
    import adsk.core
    app = adsk.core.Application.get()
    product = app.activeProduct
    design = adsk.fusion.Design.cast(product)
    root = design.rootComponent


    for die in dies:
        id = die[0]
        boundary = die[1]
        boundaryName = f'{boundary.split("/")[len(boundary.split("/"))-1].split(".")[0]}:1'
        insertionAngle = die[2]
        iges = app.importManager.createIGESImportOptions(boundary)
        iges.isViewFit = False
        app.importManager.importToTarget(iges, root)
        newBoundary = design.activeComponent.occurrences.itemByName(boundaryName)

 

I am trying to import an IGES file into my design. It is creating a new occurrence, but the occurrence is empty. 

Joshuamursic_0-1679519809403.png

Am I using this function incorrectly? I am not sure what I am doing wrong.

Thanks

0 Likes
Accepted solutions (1)
576 Views
3 Replies
Replies (3)
Message 2 of 4

kandennti
Mentor
Mentor

Hi @Joshua.mursic .

 

I would guess from the name "boundary" that the Iges file contains only curves.
Fusion360 only imports surface data from Iges files.

0 Likes
Message 3 of 4

Joshua.mursic
Advocate
Advocate

yes you are correct, I am trying to import a 3D sketch of curves. Is this possible?

0 Likes
Message 4 of 4

kandennti
Mentor
Mentor
Accepted solution

@Joshua.mursic .

 

I have created and published an add-in to import Iges/Step/Brep curves.

https://github.com/kantoku-code/Fusion360_Curve3D_Doorway 

 

The way it works is that I read the files via software (like a CAD without a screen) published by another Japanese person, extract only the necessary information, and draw the curves one by one on the sketch.

0 Likes