[CLOSED] Union of curves

Post your bug reports here. Include information that helps us to understand and reproduce the bug.
Post Reply
PJMiller
Top Typographer
Top Typographer
Posts: 977
Joined: Tue Jun 16, 2015 8:12 pm
Location: Sheffield, South Yorkshire
Contact:

[CLOSED] Union of curves

Post by PJMiller »

Sometimes when trying to merge contours I get an error message.

Image
Attachments
Illegal_Mid.jpg
Illegal_Mid.jpg (20.84 KiB) Viewed 4524 times
Bhikkhu Pesala
Top Typographer
Top Typographer
Posts: 9873
Joined: Tue Oct 29, 2002 5:28 am
Location: Seven Kings, London UK
Contact:

Re: Union of curves

Post by Bhikkhu Pesala »

I haven't seen that one before, but the solution is to move a node or two by a few pixels and try again.
My FontsReviews: MainTypeFont CreatorHelpFC15 + MT12.0 @ Win 10 64-bit build 19045.2486
Erwin Denissen
Moderator
Moderator
Posts: 11108
Joined: Fri Oct 04, 2002 12:41 am
Location: Bilthoven, The Netherlands
Contact:

Re: Union of curves

Post by Erwin Denissen »

Do send us the font project, as that is the only way we can reproduce the issue and see if we can fix it.
Erwin Denissen
High-Logic
Proven Font Technology
PJMiller
Top Typographer
Top Typographer
Posts: 977
Joined: Tue Jun 16, 2015 8:12 pm
Location: Sheffield, South Yorkshire
Contact:

Re: Union of curves

Post by PJMiller »

I have attached the font file but I don't know how useful it will be to you. It has been modified and saved many times since that error occurred.

The error seems to happen infrequently and randomly. Sometimes it is the illegal midpoint call, sometimes the program just says this is too complex and doesn't do the union but there is another error message which happens extremely infrequently and I will take a note of it the next time it happens, but don't hold your breath.

This error happened when I was sticking a tail on a copy of 'O' to make it into a 'Q', it was what I thought was a simple union with two points of intersection and a small crescent of overlap so I thought there wouldn't be any problem. The tail had a straight path within the 'O' and the 'O' had a curved path within the tail, there were only two crossover points. Both contours were simple contours not composites.

As Bhikkhu Pesala said these problems can often be solved by moving one or other of the contours or by reversing their direction (and then reversing them back once the union is done). But this one didn't respond to either of those solutions so I moved the tail down by 20 steps so there was no intersection and placed an overlapping rectangle between them. Once the union was done I moved the tail up by 20 steps and cleaned up the resultant mess of interior points.

The union function seems to have most problems when two contours follow the same curved path. If the coincident path is along a straight line then union usually has no problems. If two shapes overlap but the paths cross only at two points then there is usually no problem, which is why this error was a surprise.

If you need any more information just ask.
Last edited by PJMiller on Thu Feb 25, 2021 1:12 pm, edited 1 time in total.
Erwin Denissen
Moderator
Moderator
Posts: 11108
Joined: Fri Oct 04, 2002 12:41 am
Location: Bilthoven, The Netherlands
Contact:

Re: Union of curves

Post by Erwin Denissen »

Thank you for the project, but we need a clear reproducible example. So let us know if it happens again.
Erwin Denissen
High-Logic
Proven Font Technology
PJMiller
Top Typographer
Top Typographer
Posts: 977
Joined: Tue Jun 16, 2015 8:12 pm
Location: Sheffield, South Yorkshire
Contact:

Re: Union of curves

Post by PJMiller »

Sorry I wasn't much help.

It may seem like a lot of work but you could get the program to log errors like this either in the project file or in a separate log file stored somewhere. Then when the program generates an error message it would log the error along with any diagnostic information you think appropriate and you could ask the user to upload the error log or the project file (depending on where you store it).

I'm sure you have already thought of this.

It might be an idea for the beta test versions at least.
Post Reply