The following uses the same model and assumptions described in “Local Control Using Mesh Constraints”, but instead of manually creating a region as that example demonstrates, relies on overlapping solids and the built-in rules for overlap handling to control meshing locally. This works because when overlaps occur (on volumes, surfaces, or edges) the smaller element size wins.
To use this approach you need to create a second solid that represents the sub-volume, that does not extend outside the gun. To do this:
Create the sub-volume of the gun, as in “Local Control Using Mesh Constraints”.
Make a copy of the gun solid and place it some distance from the original along one of the coordinate axes.
Translate the sub-volume into the copy of the gun.
On the Structure ribbon in the Entity Modification group, click the Boolean button and select Intersect. Press the Ctrl key and pick the copy of the gun and the subvolume. Press Enter or click Done to complete the intersection.
Translate the resulting solid back into the original gun.
Set an element size on the resulting solid, using either solid parameters or a mesh constraint.
With this method there is no need to worry about attribute assignments because the topology of the original solid is not impacted. However, additional faces and edges are added to the model, which can complicate picking and overall topology. Complications can arise if you want to control meshing in additional sub-volumes. Mesh Control solid can extend outside your model - such volume is thrown away by the mesher.