ClosedPath AssertionError

I get the problem when trying to create interior of the ClosedPath.

z1 = 0 + 0im; z2 = 3 + 1im; z3 = 2 + 2im; z4 = 1 + 3im;
p = ClosedPath([Segment(z1, z2), Segment(z2, z3), Segment(z3, z4), Segment(z4, z1)])
interior(p)

I get the following error:
ERROR: AssertionError: Curve endpoints do not match for pieces 1 and 2

Why? How to solve the problem?

You should indicate the package you are using. If it is ComplexRegions, then there could be a bug related to numerical checks around point z1 = 0 + 0 im.

Changing z1 to a small number seems to fix the problem, for ex: z1 = 1e-3 + 0im. Perhaps you could open an issue in github.

Yes, z1 = 1e-3+ 0im is the solution!!!

I am so thankfull, thanks, thanks, thanks!!!:heartbeat::heartbeat::heartbeat::heartbeat:

Regards from Fadil Galjic