Trying to create an icon or illustration that has some portions of an item in front of an object with some portions in back of an object can be really tricky. This set of links is a very cool ingenious way to create that link-look to an icon or illustration or chain links.
Create a rectangle. 30pt stroke, no fill
Select the corner widgets and pull them in towards the the center to their maximum amount.
Duplicate the shape and double the stroke weight on the duplicate copy.
With the Direct Selection tool, select and delete half of the duplicate shape.
Select both shapes and outline the stroke. Object > Path > Outline Stroke.
Move the heavier shape on top of the lighter shape.
Select both shapes. Duplicate them and flip them. Overlap them as shown.
I made the heavier shapes red to make the next steps easier to understand.
Select the black shape on top, the red shape on the bottom. Use the Minus Front command in the Pathfinder panel to remove the heavier shape.
This is the result of the Minus Front command.
Select the other heavier shape. Bring it to the front. Object > Arrange >Bring to Front. Select the top heavier shape and the bottom shape. Repeat the Minus Front command in the Pathfinder panel.
This is the result of the Minus Front command performed the second time. Duplicate these as they will become the end links.
Copy one of the links. Use Edit> Paste in Front to create a copy of the link on itself. Set the reference point on the Transform panel to be in the center, then click on the flip vertical and horizontal buttons.
This is the copy that is flipped on itself.
Select both shapes and use the Intersect mode in the Pathfinder panel.
This is the result of the Intersect mode.
Duplicate the link to create a chain.
Add the end links to the ends of the chain.
To create a dimensional chain, open the Gradient panel. Select the chain and select the fill, create a circular gradient that start with yellow, transitions to orange and then to yellow.
Apply this gradient to the chain links.
To make it look like a solid chain with no gaps, select the chain, copy it, then choose Edit>Paste in Back. With the copy pasted in back, flip the gradient fill to be a gradient stroke.
Increase the stroke weight on the copy pasted in back until the gaps between the links are no longer visible. This makes it look like a solid chain that has no gaps and all linked together.