Skip to content
New issue

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

chamfer and bevel not accepted on wire extremities #56

Closed
jimy-byerley opened this issue Dec 20, 2022 · 0 comments · Fixed by #62
Closed

chamfer and bevel not accepted on wire extremities #56

jimy-byerley opened this issue Dec 20, 2022 · 0 comments · Fixed by #62
Labels
bug Something isn't working enhancement New feature or request good first issue Good for newcomers

Comments

@jimy-byerley
Copy link
Owner

jimy-byerley commented Dec 20, 2022

Currently, a bevel() works on any double-sided points of a Web and a Wire. However Wire's extremities might be considered double-sided points as well when Wire.closed = True and bevel() currently does not consider that.

from madcad import *

corner = 0   # index 0 in the wire is not accepted, nor -1,  any other place is fine

outline = regon(Axis(O,Z), 1, 5)
bevel(outline, [corner], ('width', 0.3))

show([ outline ])
Traceback (most recent call last):
  File "/tmp/test.py", line 4, in <module>
    bevel(outline, [0], ('width', 0.3))
  File "/usr/lib/python3.8/functools.py", line 875, in wrapper
    return dispatch(args[0].__class__)(*args, **kw)
  File "/home/jimy/.local/lib/python3.8/site-packages/madcad/cut.py", line 939, in wire_bevel
    cuts = set(wire_multicut(wire, points, cutter))
  File "/home/jimy/.local/lib/python3.8/site-packages/madcad/cut.py", line 890, in wire_multicut
    raise MeshError('a chamfer cannot have only one side')
madcad.mesh.container.MeshError: a chamfer cannot have only one side

with corner = 1 we get the expected behavior
image

@jimy-byerley jimy-byerley added bug Something isn't working enhancement New feature or request good first issue Good for newcomers labels Dec 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant