Skip to main content

Outer Shape

Validates that the specified mesh is contained within the boundaries of a reference mesh, effectively making the reference mesh an 'outer shape' and attempt to apply corrections if necessary to achieve this fit.

Parameter table

paramunitrequireddescription
meshNamenoThe name of the mesh to be checked. Optional; if not provided, the submission's name is used.
meshKeyNamenoThe key of the name of the mesh to be checked. This will be used if mesName is undefined.
referenceMeshyesThe mesh file that serves as the reference or 'outer shape'.
referenceMeshNameyesThe name of the reference mesh.

Detailed description

This rule checks whether the submitted mesh is fully contained within the reference mesh, ensuring the reference mesh acts as an 'outer shape'. The aim is to verify spatial relationships between two objects, particularly useful in scenarios requiring precise fitting or alignment.

The "Outer Shape" rule not only ensures that a given object fits within the dimensions of a reference mesh but also offers an invaluable check for the object's orientation, particularly its height along the correct axis. For instance, in scenarios where the object's height must be aligned along the Z-axis and not the Y-axis, the "Outer Shape" rule plays a crucial role.

Correction

The correction process involves two main steps:

  1. Rotation: The mesh is rotated 90 degrees around each axis to explore different orientations that may fit within the reference mesh more effectively.
  2. Scaling and Centering: The mesh is scaled down and its center is moved to coincide with the center of the reference mesh. This step continues until the mesh fits inside the reference mesh, making the reference mesh a valid 'outer shape'.

How to setup

To use the 'Outer Shape' rule, specify the meshName, referenceMesh, and referenceMeshName parameters according to your project needs. This rule is instrumental in maintaining the design integrity by ensuring meshes fit within designated spatial boundaries, crucial for performance optimization and aesthetic coherence in scenes.

Creator tips

  • When designing meshes, consider the spatial requirements and how they fit within their intended environments or alongside other objects.
  • Use the provided correction features to automate the fitting process, but always review automated adjustments for potential impacts on your design intentions.
  • Effective use of this rule can ensure that your models adhere to spatial constraints.