-
Notifications
You must be signed in to change notification settings - Fork 35
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
[Question]Export issues #188
Comments
Hi, currently there is no exporting available. You can use the visualisation class and export the triangles and nodes for the surfaces. In the future there will be direct import for various surface formats. |
Hi, Along the same lines, I'm trying to use write_feat_surfs() from exporters.py. I get the warning from here:
Going back a few lines, the error appears to stem from model.bounding_box, which only contains zeros. When bounding_box is initialised in GeologicalModel it looks to go from 0 to the width/height of the model bounds, rather than from the origin to the maximum. I tried setting the bounding_box to go from origin to maximum, but it threw a bunch of other errors - I'm not sure of the intent of bounding_box. It looks like most of the code to export features to file (and to get the vertex/face etc arrays for integration into other code) is already there. BTW, I've just started looking into Loop3D. It looks great - thank you for your work and making it open source. Lots to learn! Regards, |
Hi @rolandhill, The code you are trying to use from the exporter module is not up to date, it was code that was added into LoopStructral to be able to export the loopstructural models/surfaces into other software. It hasn't been in my workflow and there were no tests so it needs some refactoring. In the next release which I am currently working on I have made an abstract type for surfaces, scalar fields and data objects from LoopStructural. The idea is that these types will be able to be exported to various formats e.g. vtk, obj, geoh5, gocad, json etc. I will update this issue when the version is working. Cheers, Lachlan |
Thanks, Lachlan. I'm looking forward to the next release. Will this also include access to the vertex, face, normal etc arrays to pull geometry directly into other applications? Cheers, |
Yes. The current data structure for surfaces is here. There will be a similar structure for points, grids and vector fields. So it should be easy to convert into other applications. |
Hi, @fjphhxx please use the newest version of LoopStructural and export the surfaces using the for s in model[featurename].surfaces([isovalue1,isovalue2]):
s.save('surface.vtk') You can export surfaces in gocad tsurf or you can write your own exporter using the surface datatype using surface.vertices and surface.triangles @rolandhill the Surface, ValuePoints, VectorPoints and StructuredGrid datatypes should also be of interest to you. |
Thanks, Lachlan. |
You should be able to upgrade with pip or conda... pip install -upgrade
LoopStructural
…On Fri, 7 June 2024, 4:42 pm fjphhxx, ***@***.***> wrote:
Thanks, Lachlan.
Awesome, I'm going to try it. But now I have a problem, how do I upgrade
the loop to version 1.6.
—
Reply to this email directly, view it on GitHub
<#188 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABYHZAEK7NKJ5SVZM65JWJTZGFI6RAVCNFSM6AAAAABI5ZVVU2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNJUGE4TGOJVGQ>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Thank you. I've upgraded successfully. But there are some problems when using it, such as AttributeError: 'Loop3DView' object has no attribute 'interactive'. Is the Interactive function no longer available? |
Thanks, Lachlan. I'll give it a try next week probably.
Regards,
Roland
…On Fri, 7 Jun 2024 at 14:29, Lachlan Grose ***@***.***> wrote:
Hi, @fjphhxx <https://github.com/fjphhxx> please use the newest version
of LoopStructural and export the surfaces using the
for s in model[featurename].surfaces([isovalue1,isovalue2]):
s.save('surface.vtk')
You can export surfaces in gocad tsurf .ts, mira's geoscience analyst
.geoh5, json, obj, vtk, or pickle the python object. The save function
will interpret the file type from the extension you choose.
or you can write your own exporter using the surface datatype using
surface.vertices and surface.triangles
@rolandhill <https://github.com/rolandhill> the Surface, ValuePoints,
VectorPoints and StructuredGrid datatypes should also be of interest to you.
—
Reply to this email directly, view it on GitHub
<#188 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAPOEQYQWRGTHJ77PO5JRTTZGEZMBAVCNFSM6AAAAABI5ZVVU2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNJTHEYTQNRYGQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Hi @fjphhxx, Loop3DView is not the same as the lavavu visualisation. The Loop3DView wraps the pyvista Plotter class, so you will need to adjust any visualisation code.
|
Hi,
I would like to ask how to export the model into a file. When I tried to use exporters.py for exporting, various errors occurred. I would appreciate it if you could help me resolve my doubts.
Thank you.
The text was updated successfully, but these errors were encountered: