We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The operation XOR between to circles does not give the correct result:
from compmec.shape import Primitive circle_left = Primitive.circle(radius = 50, center = (-15, 0)) circle_right = Primitive.circle(radius = 50, center = (15, 0)) circle_xor = circle_left ^ circle_right
Although using this operation we get the correct shape
circle_or = circle_left | circle_right circle_and = circle_left & circle_right circle_xor = circle_or - circle_and
The current implementation of __xor__ is theorically correct:
__xor__
def __xor__(self, other): return (self - other) | (other - self)
The text was updated successfully, but these errors were encountered:
Using regular_polygon gives the correct result:
regular_polygon
from compmec.shape import Primitive circle_left = Primitive.regular_polygon(35, radius = 50, center = (-15, 0)) circle_right = Primitive.regular_polygon(35, radius = 50, center = (15, 0)) circle_xor = circle_left ^ circle_right
Probably it's a problem from the intersection between two bezier curves of degree 2.
Sorry, something went wrong.
No branches or pull requests
The operation XOR between to circles does not give the correct result:
Although using this operation we get the correct shape
The current implementation of
__xor__
is theorically correct:The text was updated successfully, but these errors were encountered: