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
ShapeList.filter_by
Question that came up in the Discord server was how to filter faces by being parallel to a given axis, as there is no built-in filter for it:
part.faces().filter_by(lambda f: abs(f.normal_at(None).dot(axis)) < 1e-6)
Jern noted that there are no examples showing this feature (lambda as filter), so we should probably add one / a few.
The text was updated successfully, but these errors were encountered:
Thank you! Would be good to add this to page https://build123d.readthedocs.io/en/latest/key_concepts.html#custom-sorting-and-filtering
Sorry, something went wrong.
predicates.py
shape = Box(1, 1, 1) f_parallel = shape.faces().filter_by(lambda f: abs(f.normal_at().dot(Axis.X.direction)) < 1e-6) f_perpendicular = shape.faces().filter_by(Axis.X)
Might want to clarify that the dot method expects a Vector and not an Axis.
dot
No branches or pull requests
Question that came up in the Discord server was how to filter faces by being parallel to a given axis, as there is no built-in filter for it:
Jern noted that there are no examples showing this feature (lambda as filter), so we should probably add one / a few.
The text was updated successfully, but these errors were encountered: