Thanks - I guess I'd like to be able to write the derived class in Python, i.e. instead of
P = Polyhedron_3()
modifier=Polyhedron_3_Modifier_1()
P.delegate(modifier.get_modifier())
print P.size_of_vertices()
I just want to write a Python function to model the Modifier.operator(), e.g.:
def modifier(B):
B.begin_surface( 3, 1, 6)
B.add_vertex( Point_3( 0, 0, 0))
B.add_vertex( Point_3( 1, 0, 0))
B.add_vertex( Point_3( 0, 1, 0))
B.begin_facet()
B.add_vertex_to_facet( 0)
B.add_vertex_to_facet( 1)
B.add_vertex_to_facet( 2)
B.end_facet()
B.end_surface()
and then do something like:
P = Polyhedron_3()
P.delegate(Polyhedron_3_Modifier(modifier))
print P.size_of_vertices()
or even more Pythonically perhaps
def modifier(B):
B.begin_surface( 3, 1, 6)
B.add_vertices( [ Point_3( 0, 0, 0), Point_3( 1, 0, 0), Point_3( 0, 1, 0) ] )
B.add_facet( [0, 1, 2 ] )
B.end_surface()
P = Polyhedron_3()
P.modify(modifier)
print P.size_of_vertices()
but all that requires you to be able to pass a Python function or a Python class derived from a C++ back in to C++ - not sure if that is possible? Maybe it needs to be modeled some other way.