Model.systemorthobound#
- Model.systemorthobound(child_system_entity, parent_system_entity, xmin, xmax, ymin, ymax, zmin, zmax)#
Makes sure that a child system lies within the specified euler angle bounds with respect to the parent child system. If it does not, it moves the child system in the most direct path so that it does.
- Parameters:
child_system_entity (Entity) – The object describing the child system entity that will be moved if it is not within the bounds of the parent.
parent_system_entity (Entity) – The object describing the parent system entity.
xmin (double) – The minimum x euler angle.
xmax (double) – The maximum x euler angle.
ymin (double) – The minimum y euler angle.
ymax (double) – The maximum y euler angle.
zmin (double) – The minimum z euler angle.
zmax (double) – The maximum z euler angle.
Examples#
The two systems, with IDs 1 and 2, are slightly misaligned and need to be reset. You want the system with ID 2 to be aligned exactly with the system the ID 1#import hm import hm.entities as ent model = hm.Model() model.systemorthobound( child_system_entity=ent.System(model, 2), parent_system_entity=ent.System(model, 1), xmin=0.0, xmax=0.0, ymin=0.0, ymax=0.0, zmin=0.0, zmax=0.0, )
In case system with ID 2 should be no more than +/-10 euler degrees on the x axis from system with ID 1. If it is, it should be aligned to fall within those bounds#import hm import hm.entities as ent model = hm.Model() model.systemorthobound( child_system_entity=ent.System(model, 2), parent_system_entity=ent.System(model, 1), xmin=-10.0, xmax=10.0, ymin=0.0, ymax=0.0, zmin=0.0, zmax=0.0, )
In case that the child system (system with ID 2) does not lie within the bounds of the parent system (system with ID 1), the three euler angles are first independently set so that they lie within the min and max parameters. The child system is then reset and rotated to its new position#import hm import hm.entities as ent model = hm.Model() model.systemorthobound( child_system_entity=ent.System(model, 2), parent_system_entity=ent.System(model, 1), xmin=-10.0, xmax=10.0, ymin=-10.0, ymax=10.0, zmin=-10.0, zmax=10.0, )
Note
Because there are many euler angles for different system positions, unpredictable results may occur if the systems are not already closely aligned and when there is a great difference between the min and max parameters.