| Equity (Tables)
 | 6 Months Ended | 
| Jun. 30, 2017 | 
|---|
| Equity [Abstract] |  | 
| Schedule of Share-based Compensation Expense | Stock-based compensation
expenses for equity-classified stock options and RSUs were allocated as
follows: 
  
    |  |  | Three Months Ended |  | Six Months Ended |  
    |  |  | June
30, |  | June
  30, |  
    |  |  | 2017 |  | 2016 |  | 2017 |  | 2016 |  
    |  |  | U.S $ in thousands |  
    | Cost
      of sales |  | $ | 799 |  | $ | 729 |  | $ | 1,442 |  | $ | 1,451 |  
    | Research and development, net |  |  | 1,089 |  |  | 1,357 |  |  | 1,938 |  |  | 2,716 |  
    | Selling, general and administrative |  |  | 3,443 |  |  | 3,393 |  |  | 5,855 |  |  | 6,935 |  
    | Total stock-based compensation expenses |  | $ | 5,331 |  | $ | 5,479 |  | $ | 9,235 |  | $ | 11,102 |  | 
| Summary of Stock Options Activity | A summary of the Companys
stock option activity for the six months ended June 30, 2017 is as follows:
 
  
    |  |  |  |  |  | Weighted Average |  
    |  |  | Number of
      Options |  | Exercise
      Price |  
    | Options outstanding as of January 1, 2017 |  | 2,615,461 |  |  | $ | 37.21 |  
    | Granted |  | 1,608,885 |  |  |  | 20.51 |  
    | Exercised |  | (140,476 | ) |  |  | 15.77 |  
    | Forfeited |  | (464,266 | ) |  |  | 40.97 |  
    | Options outstanding as of June 30, 2017 |  | 3,619,604 |  |  | $ | 30.14 |  
    | Options exercisable as of June 30, 2017 |  | 1,477,347 |  |  | $ | 38.88 |  | 
| Summary of RSUs activity | A summary of the Companys
RSUs activity for the six months ended June 30, 2017 is as follows: 
  
    |  |  |  |  |  | Weighted Average |  
    |  |  | Number of
      RSUs |  | Grant Date Fair
      Value |  
    | Unvested RSUs outstanding as of January 1,
      2017 |  | 267,756 |  |  | $ | 81.35 |  
    | Granted |  | 253,858 |  |  |  | 19.97 |  
    | Forfeited |  | (73,638 | ) |  |  | 82.50 |  
    | Vested |  | (67,980 | ) |  |  | 57.69 |  
    | Unvested RSUs outstanding as of June 30,
      2017 |  | 379,996 |  |  | $ | 44.36 |  | 
| Schedule of Accumulated other comprehensive income (loss) | The following table
presents the changes in the components of accumulated other comprehensive income
(loss), net of taxes, for the six months ended June 30, 2017 and 2016:
 
  
    |  |  | Six months ended June
      30, 2017 |  
    |  |  | Net unrealized gain |  | Foreign currency |  |  |  |  |  
    |  |  | (loss) on cash flow |  | translation |  |  |  |  |  
    |  |  | hedges |  | adjustments |  | Total |  
    |  |  | U.S. $ in thousands |  
    | Balance as of January 1, 2017 |  | $ | (24 | ) |  | $ | (13,455 | ) |  | $ | (13,479 | ) |  
    | Other comprehensive income before
      reclassifications |  |  | 1,069 |  |  |  | 3,150 |  |  |  | 4,219 |  |  
    | Amounts reclassified from accumulated other
      comprehensive loss |  |  | (883 | ) |  |  | - |  |  |  | (883 | ) |  
    | Other comprehensive income |  |  | 186 |  |  |  | 3,150 |  |  |  | 3,336 |  |  
    | Balance as of June 30, 2017 |  | $ | 162 |  |  | $ | (10,305 | ) |  | $ | (10,143 | ) |  
 
  
    |  |  | Six months ended June
      30, 2016 |  
    |  |  | Net unrealized gain |  | Foreign currency |  |  |  |  |  
    |  |  | (loss) on cash flow |  | translation |  |  |  |  |  
    |  |  | Hedges |  | adjustments |  | Total |  
    |  |  | U.S. $ in thousands |  
    | Balance as of January 1, 2016 |  | $ | (107 | ) |  | $ | (10,667 | ) |  | $ | (10,774 | ) |  
    | Other comprehensive loss before
      reclassifications |  |  | 542 |  |  |  | 380 |  |  |  | 922 |  |  
    | Amounts reclassified from accumulated other
      comprehensive income |  |  | (151 | ) |  |  | - |  |  |  | (151) |  |  
    | Other comprehensive income |  |  | 391 |  |  |  | 380 |  |  |  | 771 |  |  
    | Balance as of June 30, 2016 |  | $ | 284 |  |  | $ | (10,287 | ) |  | $ | (10,003 | ) |  |