stefankorisnik3 wrote: ↑Tue Aug 02, 2022 2:27 pm
Given two closed wires how to make a triangulation between those two wires?
I have tried some
https://docs.scipy.org/doc/scipy/refere ... aunay.html
but didn't succeed to set the parameters to only triangulate between two curves
To clarify i don't want triangulation between points in the same curve. Just want the triangulation between two curves
Code: Select all
OS: Windows 10 Version 2009
Word size of FreeCAD: 64-bit
Version: 0.20.29177 (Git)
Build type: Release
Branch: releases/FreeCAD-0-20
Python 3.8.10, Qt 5.15.2, Coin 4.0.1, Vtk 8.2.0, OCC 7.6.2
Locale: English/United Kingdom (en_GB)
Installed mods:
* CurvedShapes 1.0.3
* Curves 0.5.2
I think that you have to:
- create a surface between the curves
- triangulate thie surface
But if you are using FreeCAD only to show "external created" triangulations, I think that this could be a problem, as FC internally is not using the same curves as scipy.
As example in FC you could create a surface between two curves as follows (complete code is in the included file):
Code: Select all
el1 = Part.Ellipse(Vector(0,0,0), 100, 50)
el2 = Part.Ellipse(Vector(0,0,50), 50, 25)
# Part.show(el1.toShape(), "el1_Shape")
# Part.show(el2.toShape(), "el2_Shape")
el_edg1 = el1.toShape(0, pi/3)
el_edg2 = el2.toShape(0, pi/3)
rs = Part.makeRuledSurface(el_edg1, el_edg2)
Part.show(rs, "Surface")
DOC.recompute()
or even creating a BSPline curves, it is not so different from the code above.
Hope it helps.
Carlo D.