92 def textual_representation(self): |
92 def textual_representation(self): |
93 return '4 ' + self.base_textual_representation() |
93 return '4 ' + self.base_textual_representation() |
94 def typename(self): |
94 def typename(self): |
95 return 'quadrilateral' |
95 return 'quadrilateral' |
96 |
96 |
97 class Contour(LineSegment): |
97 class ConditionalLine(LineSegment): |
98 def __init__(self, *, colour, geometry, control_points): |
98 def __init__(self, *, colour, geometry, control_points): |
99 super().__init__(colour = colour, geometry = geometry) |
99 super().__init__(colour = colour, geometry = geometry) |
100 self.control_points = control_points |
100 self.control_points = control_points |
101 assert(len(self.control_points) == 2) |
101 assert(len(self.control_points) == 2) |
102 def __repr__(self): |
102 def __repr__(self): |
103 return str.format('linetypes.Contour(' \ |
103 return str.format('linetypes.ConditionalLine(' \ |
104 'colour = {colour!r}, ' \ |
104 'colour = {colour!r}, ' \ |
105 'geometry = {geometry!r}, ' \ |
105 'geometry = {geometry!r}, ' \ |
106 'control_points = {control_points!r})', **self.__dict__) |
106 'control_points = {control_points!r})', **self.__dict__) |
107 def textual_representation(self): |
107 def textual_representation(self): |
108 result = '5 ' + self.base_textual_representation() |
108 result = '5 ' + self.base_textual_representation() |