Closed krober10nd closed 1 year ago
Dear Keith, If the displayed error is "no continuous intersection between the mesh and the line" altough the locate operator is OK, it is strange! I already noticed problem if the line is located exactly along mesh edges, it could trouble the function which determines the intersection points. Could you provide us your files (mesh and line)? Best Regards, Luc
Hey Luc,
Sure in the zip file you'll find an example workflow (testing) with one snap of a 3d SLF result that I'd like to extract a cross section for. The cross_section_6.shp profile instantly force closes the GUI with the following error. If you reduce its lateral extent by a little, then it says the line doesn't intersect with the domain. Thanks for any help you can provide!
Reading the input file: "/Users/keithroberts/Desktop/flume_test/r3d_flume_test_subset_result.slf" of size 25311540 bytes
Traceback (most recent call last):
File "/opt/homebrew/lib/python3.9/site-packages/pyteltools/workflow/mono_gui.py", line 529, in run_all
self.view.scene().run_all()
File "/opt/homebrew/lib/python3.9/site-packages/pyteltools/workflow/mono_gui.py", line 250, in run_all
self.nodes[root].run_downward()
File "/opt/homebrew/lib/python3.9/site-packages/pyteltools/workflow/Node.py", line 514, in run_downward
child.parentItem().run_downward()
File "/opt/homebrew/lib/python3.9/site-packages/pyteltools/workflow/Node.py", line 258, in run_downward
self.run()
File "/opt/homebrew/lib/python3.9/site-packages/pyteltools/workflow/nodes_vis.py", line 1040, in run
if not self._prepare():
File "/opt/homebrew/lib/python3.9/site-packages/pyteltools/workflow/nodes_vis.py", line 1014, in _prepare
mesh.get_line_interpolators(sections)
File "/opt/homebrew/lib/python3.9/site-packages/pyteltools/slf/interpolation.py", line 157, in get_line_interpolators
line_interpolator, distance, line_interpolator_internal, distance_internal = self._get_line_interpolators(line)
File "/opt/homebrew/lib/python3.9/site-packages/pyteltools/slf/interpolation.py", line 77, in _get_line_interpolators
interpolator = Interpolator(t)
File "/opt/homebrew/lib/python3.9/site-packages/pyteltools/slf/interpolation.py", line 23, in __init__
self.inv_norm_z = 1 / norm_z
ZeroDivisionError: float division by zero
Dear Keith,
The crash is probably due to presence of empty mesh elements (or flat triangle), PyTelTools assumes the 2D mesh is OK. Indeed, this could be a problem for a calculation with openTelemac. I extracted the 2D mesh of your 3D file and have a look with BlueKenue and it displays: "Minimum Element Area: 0.000000 m²". You should try to fix your mesh?
Regards, Luc
Thank you Luc, I will fix the mesh and try again.
Did you manage to fix your mesh and use this tool?
Yep it's all good. Thanks!
As an aside, I'm working on writing some code to visualize 3D binary boundary files.
Hi, I have configured the following workflow, the node Vertical Cross Section indicates the line is outside of the mesh but the node Locate Open Lines shows it inside. Any idea what may be incorrect or missing here? Thanks!