Merge pull request #704 from CadQuery/assy-selectors-fix
Use expression grammar for assy selectors
This commit is contained in:
@ -14,7 +14,7 @@ from .occ_impl.solver import (
|
|||||||
)
|
)
|
||||||
from .occ_impl.exporters.assembly import exportAssembly, exportCAF
|
from .occ_impl.exporters.assembly import exportAssembly, exportCAF
|
||||||
|
|
||||||
from .selectors import _grammar as _selector_grammar
|
from .selectors import _expression_grammar as _selector_grammar
|
||||||
|
|
||||||
# type definitions
|
# type definitions
|
||||||
AssemblyObjects = Union[Shape, Workplane, None]
|
AssemblyObjects = Union[Shape, Workplane, None]
|
||||||
|
|||||||
@ -218,3 +218,10 @@ def test_empty_solve(nested_assy):
|
|||||||
|
|
||||||
with pytest.raises(ValueError):
|
with pytest.raises(ValueError):
|
||||||
nested_assy.solve()
|
nested_assy.solve()
|
||||||
|
|
||||||
|
|
||||||
|
def test_expression_grammar(nested_assy):
|
||||||
|
|
||||||
|
nested_assy.constrain(
|
||||||
|
"TOP@faces@>Z", "SECOND/BOTTOM@vertices@>X and >Y and >Z", "Point"
|
||||||
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user