Example #1
0
 def newLayer(self):
     layer = canvaslayers.ComboCanvasLayer()
     canvas = self.gfxwindow.oofcanvas
     # The names of the layers here must correspond to the
     # targetnames used in meshinfo.py.  "Face" and "Segment"
     # aren't use there currently (4/2012) but may be added later,
     # so they're included here (but not tested!).
     layer.addSublayer(
         "Element",
         canvaslayers.SimpleWireframeCellLayer(canvas, True,
                                               "ElementMeshInfo"))
     # layer.addSublayer(
     #     "Face",
     #     canvaslayers.SimpleWireframeCellLayer(canvas, True,
     #                                           "FaceMeshInfo"))
     # layer.addSublayer(
     #     "Segment",
     #     canvaslayers.SimpleWireframeCellLayer(canvas, False,
     #                                           "SegmentMeshInfo"))
     layer.addSublayer(
         "Node", canvaslayers.SimplePointCellLayer(canvas, "NodeMeshInfo"))
     self.tbcallbacks = [
         switchboard.requestCallbackMain((self.gfxwindow, "query Mesh"),
                                         self.queryCB),
         switchboard.requestCallbackMain((self.gfxwindow, "peek Mesh"),
                                         self.peekCB),
         switchboard.requestCallbackMain("mesh data changed",
                                         self.meshDataChangedCB)
     ]
     return layer
Example #2
0
 def newLayer(self):
     layer = canvaslayers.ComboCanvasLayer()
     canvas = self.gfxwindow.oofcanvas
     # The names of the layers here must correspond to the
     # targetnames used in skeletoninfo.py.
     layer.addSublayer(
         "Element",
         canvaslayers.SimpleWireframeCellLayer(canvas, True,
                                               "ElementSkelInfo"))
     if config.dimension() == 3:
         layer.addSublayer(
             "Face",
             canvaslayers.SimpleWireframeCellLayer(canvas, True,
                                                   "FaceSkelInfo"))
     layer.addSublayer(
         "Segment",
         canvaslayers.SimpleWireframeCellLayer(canvas, False,
                                               "SegmentSkelInfo"))
     layer.addSublayer(
         "Node", canvaslayers.SimplePointCellLayer(canvas, "NodeSkelInfo"))
     assert not self.tbcallbacks
     self.tbcallbacks = [
         switchboard.requestCallbackMain((self.gfxwindow, "query Skeleton"),
                                         self.queryCB),
         switchboard.requestCallbackMain((self.gfxwindow, "peek Skeleton"),
                                         self.peekCB)
     ]
     return layer
Example #3
0
 def _newLayer(self, name):
     # The names given to the sublayers here must be the same as
     # the names returned by the SkelContextBoundary boundaryType()
     # methods.
     layer = canvaslayers.ComboCanvasLayer()
     canvas = self.gfxwindow.oofcanvas
     layer.addSublayer("face",
                       canvaslayers.FaceGlyphLayer(canvas, name+"-Face"))
     layer.addSublayer("edge",
                       canvaslayers.EdgeGlyphLayer(canvas, name+"-Edge"))
     layer.addSublayer("node",
                       canvaslayers.PointGlyphLayer(canvas, name+"-Point"))
     return layer