-
Notifications
You must be signed in to change notification settings - Fork 302
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
Mirror about the workplane of a face. #521
Comments
You could modify cadquery/cadquery/occ_impl/shapes.py Line 467 in b22436c
|
Thanks for the help. I've implemented the feature as two new functions and left the original mirror alone while i was debugging and testing. I could make a pull request for the new functionality. Should I leave them as separate functions, or integrate them into the existing mirror function?
|
I think mirrorAboutPlane and mirror could be merged because they have the same type of arguments Also, I think the mirrorAboutFace(union =True) makes sense as a default because the mirrored object is likely to be in contact with the original, but the generic mirrorAboutPlane(union=False) makes more sense as a default because the mirrored object is likely to be in in free space not contacting the original. |
I'd prefer to put everything in @overload
def mirror(self,
mirrorPlane: Face,
) -> Workplane:
...
@overload
def mirror(self,
mirrorPlane:union[Literal["XY",...], VectorLike, Face]="XY"
basePointVector: VectorLike=(0, 0, 0)) -> Workplane:
... This way if someone wants to extend this, they won't need to create more |
Fixed by #527 |
I am making a function that mirrors about a face. From looking at the code this is not possible, as it only supports string arguments for the basic XY XZ etc workplanes.
cadquery/cadquery/cq.py
Line 1024 in b22436c
my attempt:
Even if its not possible to mirror about an arbitrary workplane, is it possible to extract the string "XY" parameter from a face object?
Thanks
The text was updated successfully, but these errors were encountered: