Skip to content

Object Oriented Design

Mark Moissette edited this page Mar 31, 2013 · 1 revision

#ForeWord CoffeeSCad was developped to make use of object oriented design

You have access to all of Coffeescripts tooling for OO Classes Inheritance

#The "Part" class

To have your objects "registered" into the part lists (amongst other things), the need to "extend" the base Part class like so:

class APart extends Part constructor:(options)-> super options

It is essential to pass the options hash to the parent class (Part), as coffeeSCad scans the parameters you pass to your objects for future use (see BOM section for more details)

Clone this wiki locally