I am quite stucked at this problem...the previous code does not work.
The problem is depicted in the figure.
There is a way to merge two curves or polygon and picks the envelope?
Regards
I am quite stucked at this problem...the previous code does not work.
The problem is depicted in the figure.
There is a way to merge two curves or polygon and picks the envelope?
Regards
It's not an easy math problem so I wouldn't expect there to be a ready function for it in Qt.
Actually, the union of polygons works quite well with QPOlygonF::united(), and
I expected that a similar function was available also for polylines.
The problem is that after the union, the points are not ordered in the right way....
It should be enough to have a way to open the polygon, i.e. eliminating the segment which lies on the x axis....![]()
Have you tried using QPainterPath? Maybe you'll have more luck with it.
I have no idea at all how to use it.
If you some suggestion, I will appreciate very much....
G
Add primitives to it. You can also unite it. There is a paragraph in the reference (Composing a QPainterPath) that might be helpful.
I tried, but the problem is always the same.
After the union of paths, the points order is arbitary and for this reason is quite difficult to convert the path to a curve in the 2D-plane.
(For instance, the union of Polygons use the united function of QPainterPath).
G
Bookmarks