-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Unexpected error encountered when supplying a non-zero origin argument to an assembly class (i.e. subclass of CreatedComponentAssembly), which makes use of a component class (i.e. SimpleComponent subclass) whose make_geometry method returns a CubitInstance object representing a multi-volume body.
Expected behaviour: the whole assembly should be translated to the co-ordinates provided, including any multi-volume components.
Actual behaviour: a error is raised by cubit as below. (These volumes are not translated but others in the assembly are moved as expected. An error is not raised by blobmaker, though check_for_overlaps will raise an error in the case that not moving the volumes in question leads to overlaps.)
ERROR: Volume 5 is part of a multi-volume body.
Cannot move Volume 5 by itself
ERROR: Volume 6 is part of a multi-volume body.
Cannot move Volume 6 by itselfThe error is likely triggered by the move function, which attempts to move one of the volumes by itself rather than the whole body. We may wish to modify this function to detect when it is dealing with a multi-volume body and move it accordingly.
In the case where I encountered this bug, upon discussing the problem, it made more sense to bypass the issue by removing the union operation which created the multi-volume body and instead return both volumes separately in a list i.e. return [volume_1, volume_2].
If we wish to keep the existing functionality where multi-volume bodies are not supported, we should add something to the documentation to guide users towards returning volumes separately for component subclasses containing more than one volume.