Filter specific elements for visualization.

Hello! In this section we'll talk about the post processing module and the data visualization.
Post Reply
slbibb58
Posts: 4
Joined: Wed Aug 28, 2024 3:53 pm

Filter specific elements for visualization.

Post by slbibb58 » Sat Nov 09, 2024 4:01 pm

Dear STKO team,

Is it possible to filter out specific elements, such as soil elements, during the post-processing stage in STKO with mpco files, if, for instance, we have a finite element model containing soil, water, and a structure?

Thanks.

kesavapraba
Posts: 468
Joined: Sat Mar 28, 2020 2:25 pm

Re: Filter specific elements for visualization.

Post by kesavapraba » Sun Nov 10, 2024 7:18 am

Hi, You can explore the Python API option, particularly writing script using the PyMpc (a library). https://asdeasoft.net/stko-wiki/class_p ... nment.html

I would also like you to try an another option: Try to put the elements of your choice in "Selection set" in the pre-processor itself. The same selection sets can be accessed in the post-processor.
:: With best wishes ::
Prabakaran Kesavan

slbibb58
Posts: 4
Joined: Wed Aug 28, 2024 3:53 pm

Re: Filter specific elements for visualization.

Post by slbibb58 » Sat Nov 16, 2024 6:41 am

Thank you for your response.

For the "Selection set" option, could you please explain how to access my selection sets in the postprocessor.

For the Python API option, could you please provide more details about this option.

Thanks.

STKO Team
Posts: 3066
Joined: Tue Oct 29, 2019 8:45 am

Re: Filter specific elements for visualization.

Post by STKO Team » Mon Nov 18, 2024 10:08 am

Get the database (MpcOdb class).

Code: Select all

db_id = 1
doc = App.postDocument()
db = doc.getDatabase(db_id)
for sset_id, sset in db.selectionSets.items():
	print(sset.name)
	print(sset.nodes)
	print(sset.elements)

Post Reply