Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support to load multiple Manifold Solids #14

Open
hideak opened this issue Oct 19, 2019 · 0 comments
Open

Add support to load multiple Manifold Solids #14

hideak opened this issue Oct 19, 2019 · 0 comments
Assignees

Comments

@hideak
Copy link
Collaborator

hideak commented Oct 19, 2019

The following code was obtained from the Interface.ImportMenu module and is responsible for loading an .IGES file into the application. This part of the code uses a previously created Reader object to call an internal method named TransferList() to obtain all the loaded entities of the model, including all Manifold Solids, Faces, Surfaces, Edges, Vertices and other entities:

# Checking if the file were read successfully and creating a OpenCASCADE shape object:
shape = None
if status == IFSelect_RetDone:
    Reader.TransferList(Reader.GiveList('xst-model-all'))
    for i in range(1, Reader.NbShapes()+1):
        parent.shapeList.append(Reader.Shape(i))
    shape = Reader.Shape(1)

However, the shape variable only stores the first loaded shape: Reader.Shape(1) and thus, the following code:

# Displaying the loaded entity as an OpenCASCADE shape:
parent.canvas._display.DisplayShape(shape, update=True)

Just display the first entity, even if the loaded .IGES file contains multiple Manifold Solids.

The aim of this Issue is to implement a logic to load as many Manifold Solids as needed, so all of them can be used by the discretization methods.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants