Extract poligons from stl files

Hi all,
I have an stl file and i would like do automatically the following passages:
→ extract all points which belongs to Zmin < points < Zmax
→ find polygons obtained

for example i have a stl of a cube and a cone.
If i cut the geometry I obtain a square and a circle. Can I find automatically that poligons from points connecting them.

this is for a cnc project which I’d like to write

many thanks in advance
best regards

Do you have an STL parsing library already? If not, maybe one of these
can help: Search results · PyPI

Then you may be able to examine the structures presented after you load
your STL file.

Disclaimer: I’ve not used STL myself.

Cameron Simpson cs@cskk.id.au