A method is demonstrated for constructing models on which we show that carbon nanotubes with optional type and diameter can be connected to different three-dimensional surfaces. Basic examples (zigzag and armchairtype junctions and holes) are studied.