If one makes a thing from materials belonging to another, the latter may claim the thing on reimbursing the value of the workmanship unless the value of the workmanship exceeds the value of the materials, in which case the thing belongs to the maker, on reimbursing the value of the materials.
47-08-06. Willful uniting material without consent - Nonconsenting owner entitled to product - Limitation. The foregoing sections of this chapter are not applicable to cases in which one willfully uses the materials of another without the other's consent. In such cases the product belongs to the owner of the materials if their identity can be traced.