How to split single stl file into two based on threshold in vertices?

Dear All,

I have a watertight stl mesh which is created using pointclouds from Open3D python library. This stl file is a single file. I want this stl file to be splitted into two based on the criteria say z-coordinated is <0.5. And second mesh will be the other one. I think once it is splitted, it will retain the water tightness.

I need to split since I need to continue the simulation in OpenFoam with proper boundaries. I tired working with numpy-stl and found it complicated to rearrange the stl mesh according to the needs.

I checked in one blog which says:

Depends on how you want to split it. If you want to split it into grouped surfaces, use vtkPolyDataNormals with SplittingOn, and use SetFeatureAngle to decide what angle to split at. Then, you can use vtkPolyDataConnectivityFilter to get each split piece in a loop.

I loaded stl_reader in vtk, but unable to use the above method. Any guidance/leads will be appreciated.

I have attached the stl file (ascii) link for reference.


Sunag R A.