Пример #1
0
    def __init(self):
        """ start COVISE ReadCAD Module """
        if self.__readCad == None:
            self.__readCad = ReadCAD()
            theNet().add(self.__readCad)
            self.__readCadPolyOut = ConnectionPoint(self.__readCad, 'mesh')
            self.__readCadNormalsOut = ConnectionPoint(self.__readCad,
                                                       'Normals')
            self.__readCadColorsOut = ConnectionPoint(self.__readCad,
                                                      'colorOut')
            self.__readCad.set_catia_server('obie')
            self.__readCad.set_catia_server_port('7000')
            self.__readCad.set_partIndex(self.__index)
            self.__readCad.set_file_path(self.__filename)

            self.__collect = Collect()
            theNet().add(self.__collect)
            connect(self.__readCadPolyOut,
                    ConnectionPoint(self.__collect, 'GridIn0'))
            connect(self.__readCadNormalsOut,
                    ConnectionPoint(self.__collect, 'DataIn1'))
            connect(self.__readCadColorsOut,
                    ConnectionPoint(self.__collect, 'DataIn0'))
            self.__connectGeoOut = ConnectionPoint(self.__collect,
                                                   'GeometryOut0')
Пример #2
0
 def initPartTree(self, negMsgHandler):
     readCAD = ReadCAD()
     theNet().add(readCAD)
     negMsgHandler.registerParamsNotfier(readCAD, self.key, ['SelectPart'])
     readCAD.set_catia_server('obie')
     readCAD.set_catia_server_port('7000')
     readCAD.set_file_path(self.params.filename)
     self.neg = negMsgHandler