Avoid merging duplicated points

I am trying to upload a STL file that has plenty of points and most of them are duplicated. I noticed that it takes too long to upload it, but if I try to visualize it in Microsoft 3D Viewer, it takes only a few seconds. Maybe it takes that long because of the merging. Is there a way to upload a STL file without merging the duplicated points?

Thank you

Is setting
to False making a difference?

@sebasgut1 please share your dataset.

STLReader does not have that setting

I was not able to upload through this uploader, so here a link to the stl file

The reader itself has the flag.

You just need an XML plugin to expose it I guess.

Is there a way to do it in pvpython with paraview?
I was trying to do it with STLReader from Paraview, but does not work. With vtkSTLReader works but then the reader cannot be shown in paraview.simple.Show()

Indeed, that is for PLY, Sorry for the confusion.

Yes, create a plugin (1 xml file) like here where you expose that extra property and then load that file as plugin.

1 Like

stlreader.xml (948 Bytes)
Like this?
But is this only for GUI? Because I have a script. Since importing vtk in pvtyhon and using vtkSTLReader.MergingOff() works, is there a way to transform the polydata in way that paraview.simple.Show() understands? Because the other option is to change the whole script that has paraview.simple to vtk, but I prefer not to.

More like

    <ProxyGroup name="sources">
          <BooleanDomain name="bool"/>

         <FileListDomain name="files"/>

          <ReaderFactory extensions="stl" file_description="My stl Files" />

And then do the following in a script

import time
from pathlib import Path
from paraview import simple

t0 = time.time()

plugin_path = str(Path(__file__).with_name("plugin.xml").absolute())
file_path = str(Path(__file__).with_name("heatsink.stl").absolute())

simple.LoadPlugin(plugin_path, ns=globals())

reader = MySTLReader(FileName=file_path)

t1 = time.time()

print(f"Load + render time {t1 - t0}s")
1 Like

It is faster now, thank you!!!

1 Like