paramak
paramak copied to clipboard
Workplane is not subscriptable error when rotation cadquery.Plane
It is possible to set the workplane to a string such as 'XY' or 'ZY'
It is also possible to set the workplane to an arbitrary plane using a cadquery.Plane
import cadquery as cq
workplane = cq.Plane(origin=(0, 0, 0), xDir=(-1, 1, 0), normal= (1, 1, 1))
However the Paramak code will break if the a workplane is set to a cq.Plane
and a rotation is used.
This is due to the get_rotation_axis
assuming that all workplanes are strings on this line
https://github.com/fusion-energy/paramak/blob/2530d7e1f0ae47df87b9a0205716cf617c81779b/paramak/shape.py#L755
This can be avoided if the rotation_axis is specified, so perhaps the solution is return an error requesting that the user sets the rotation axis