Rectangle arround a surface

Hello, some help please. Anybody knows how to make a rectangle to contain a surface, I mean, I have a surface and I want to build a rectangle arround it, hope i can explain.

Use Bounding Box. If the surface is planar, you’ll get a planar rectangular surface. Then use Brep Edges to extract the edges and then Curve Join to join the four edges.

thanks a lot