Factory measurement specialist and Motley Fool Hidden Gems recommendation FARO Technologies (NASDAQ:FARO) sells products that increase productivity and profitability. Too bad its products couldn't be focused on its own bottom line.

FARO and its international subsidiaries design, develop, and market software and portable, computerized measurement devices. Its products allow three-dimensional measurement of parts and assemblies on the factory floor, which helps manufacturers eliminate errors and increase overall productivity.

Last night the company reported strong second-quarter results, provided you look at sales and orders only. Revenue increased 28.2% and new-order bookings jumped 57.5%, when compared to the same period last year. The order backlog more than doubled to $6.1 million (roughly 20% of this quarter's sales). Sounds good, doesn't it?

Not so fast, Fool. Ruining those double-digit gains was a 53.7% decrease in net income.

The outlook was sunny when first-quarter results were announced in May, but the company's mid-July preannouncement of expected earnings trouble this quarter had already sent the stock down from about $28 a share to $23 a share. The latest news clipped another 9.6% off the stock at this morning's trading low, approximately 6.5%, currently.

Gross margins fell 3.7% to a still-strong 59.5%, largely because of price discounting and a recent acquisition.

Hammering operating margins was a 54.8% increase in selling, general, and administrative expenses. One significant component of that increase was a 35% rise in sales-force headcount (and associated office costs) since the end of 2004. The company cited as contributing factors the increased cost of training and getting new employees up to speed as revenue producers.

The second half of the year is seasonally the strongest, and FARO is sticking by its $125 million to $132 million revenue forecast for the year. Instead of lowering earnings guidance, the company simply said that earnings would fall at the lower end of the previous forecast of $1.15 to $1.45 per share.

Court costs have also drained the company's coffers ($336,000 this quarter), as it defended itself against claims that it had infringed on another company's patents. After losing the latest round in July, the company announced a design-around that will not place any practical limitations on its products. I personally wonder why this avenue wasn't taken before -- but legal costs should start to decline as a result. It should also help margins.

FARO is up almost 100% (even after today's fall) since it was recommended by Motley Fool Hidden Gems. The company is expected to grow earnings 20% a year for the next five years. Investors would be wise to look at the current stock price weakness -- it's trading at 15.4 times 2006 earnings -- and determine whether this represents a buying opportunity for a company with a strong and growing franchise.

Tom Gardner is offering a free 30-day trial to Hidden Gems, the Fool's small-cap stock newsletter. Since its inception, Hidden Gems recommendations are up more than 30% on average, vs. 10.42% for the S&P 500.Click here to learn more.

Fool contributor W.D. Crotty does not own shares in FARO. Click here to see the Fool's disclosure policy.