The rectangular-structured resin with one of its triangular long-period fiber grating surface is designed and printed out by using a high resolution 3D printer, so called long-period fiber grating (LPFG) resin. This LPFG resin is directly pressed on the bare single-mode fiber by a digital force meter to filter out partial band of light inside the fiber. The grating period is expanded by tilting the resin from the initial fiber axis. The optical filter is observed as resonant wavelengths from the broadband wavelength. The results show that the resonant wavelength shift is a linear function of the grating period with the coefficient of determination over 0.99. The proposed scheme has a great potential to be employed as a sensor such as a selective optical filter and a buried intrusion sensor.