override post_init in subclasses to do computations after the construction, usually based on extra keywords. This avoids the need for every general_optic to override the default constructor. Reimplemented from general_optic. Definition at line 934 of file general_optics.py. 00934 : 00935 base_lens.post_init(self) 00936 #default lens draws as 1" diameter x 5 mm thick 00937 if not hasattr(self,'thickness'): self.thickness=0.005 00938 if not hasattr(self,'width'): self.width=0.0254 00939 if not hasattr(self,'height'): self.height=self.width 00940 def __str__(self):
|