cadquery icon indicating copy to clipboard operation
cadquery copied to clipboard

Keeping objects after workplane creation

Open Jojain opened this issue 3 years ago • 4 comments

Keep selected objects after workplane creation, it breaks quite a lof of tests, we need to investigate if the failing test can be rewritten or if it's really a breaking change Aims to solve #149

Jojain avatar Jan 26 '22 21:01 Jojain

Thanks, it might be trickier in terms of backward-compatibility than I expected.

adam-urbanczyk avatar Jan 26 '22 21:01 adam-urbanczyk

I think it'd be better to add a kwarg to work plane (say reset:bool = False) to not mess with breaking changes.

adam-urbanczyk avatar Jan 31 '22 20:01 adam-urbanczyk

Yeah that's probably easier to deal with. Do we want to reset the selection totally calling findSolid or we just put the last selection state on the stack?

Jojain avatar Feb 01 '22 20:02 Jojain

Yeah that's probably easier to deal with. Do we want to reset the selection totally calling findSolid or we just put the last selection state on the stack?

Why not something like this:

if not reset:
    s.objects = self.objects[:]

adam-urbanczyk avatar Feb 15 '22 16:02 adam-urbanczyk