Compare commits
8 Commits
main
...
trainee_an
Author | SHA1 | Date |
---|---|---|
|
7eeb638ce4 | |
|
4a69680369 | |
|
11bbdac99a | |
|
7904c3ba62 | |
|
3473a005e2 | |
|
5532f6c307 | |
|
864af4e1b4 | |
|
310ecb6fda |
|
@ -0,0 +1,2 @@
|
||||||
|
Запуск: python app.py
|
||||||
|
Сборка .exe: pyinstaller --onefile --windowed app.py
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
266
app.py
266
app.py
|
@ -2,60 +2,260 @@ from kivy.app import App
|
||||||
from kivy.uix.button import Button
|
from kivy.uix.button import Button
|
||||||
from kivy.uix.label import Label
|
from kivy.uix.label import Label
|
||||||
from kivy.uix.boxlayout import BoxLayout
|
from kivy.uix.boxlayout import BoxLayout
|
||||||
from kivy.uix.gridlayout import GridLayout
|
|
||||||
from kivy.uix.scrollview import ScrollView
|
from kivy.uix.scrollview import ScrollView
|
||||||
from kivy.core.window import Window
|
from kivy.core.window import Window
|
||||||
|
from kivy.clock import Clock
|
||||||
|
from kivy.metrics import dp
|
||||||
|
from kivy.properties import StringProperty, ListProperty, BooleanProperty
|
||||||
|
from kivy.animation import Animation
|
||||||
|
from kivy.uix.behaviors import ButtonBehavior
|
||||||
|
from export_opened_to_raster import export_opened_to_raster
|
||||||
|
from save_to_iges import save_opened_to_iges
|
||||||
|
from get_all_sheets import get_all_sheets
|
||||||
|
from project_support import project_support
|
||||||
|
from get_opened_files import get_opened_files
|
||||||
|
|
||||||
class MyApp(App):
|
|
||||||
|
class HoverBehavior(ButtonBehavior):
|
||||||
|
"""Поведение для обработки наведения курсора"""
|
||||||
|
hovered = BooleanProperty(False)
|
||||||
|
border_point = ListProperty((0, 0))
|
||||||
|
|
||||||
|
def __init__(self, **kwargs):
|
||||||
|
super().__init__(**kwargs)
|
||||||
|
self.register_event_type('on_enter')
|
||||||
|
self.register_event_type('on_leave')
|
||||||
|
Window.bind(mouse_pos=self.on_mouse_pos)
|
||||||
|
|
||||||
|
def on_mouse_pos(self, *args):
|
||||||
|
if not self.get_root_window():
|
||||||
|
return
|
||||||
|
pos = args[1]
|
||||||
|
inside = self.collide_point(*self.to_widget(*pos))
|
||||||
|
if self.hovered == inside:
|
||||||
|
return
|
||||||
|
self.border_point = pos
|
||||||
|
self.hovered = inside
|
||||||
|
if inside:
|
||||||
|
self.dispatch('on_enter')
|
||||||
|
else:
|
||||||
|
self.dispatch('on_leave')
|
||||||
|
|
||||||
|
def on_enter(self):
|
||||||
|
pass
|
||||||
|
|
||||||
|
def on_leave(self):
|
||||||
|
pass
|
||||||
|
|
||||||
|
class AnimatedButton(Button):
|
||||||
|
# Цвета для разных состояний
|
||||||
|
original_color = ListProperty([0.392, 0.416, 0.431, 1]) # Основной цвет (синий)
|
||||||
|
hover_color = ListProperty([0.165, 0.592, 1, 1]) # При наведении
|
||||||
|
press_color = ListProperty([0, 0.51, 1, 1]) # При нажатии
|
||||||
|
|
||||||
|
# Параметры анимации
|
||||||
|
hover_scale = 1.05
|
||||||
|
press_scale = 0.98
|
||||||
|
|
||||||
|
def __init__(self, **kwargs):
|
||||||
|
super().__init__(**kwargs)
|
||||||
|
self.background_normal = ''
|
||||||
|
self.background_color = self.original_color
|
||||||
|
self.original_size = self.size.copy()
|
||||||
|
self.is_hovered = False
|
||||||
|
|
||||||
|
# Настройка отслеживания мыши
|
||||||
|
Window.bind(mouse_pos=self.on_mouse_pos)
|
||||||
|
|
||||||
|
def on_mouse_pos(self, window, pos):
|
||||||
|
# Преобразуем координаты мыши в координаты кнопки
|
||||||
|
if not self.get_root_window():
|
||||||
|
return
|
||||||
|
pos = self.to_widget(*pos)
|
||||||
|
is_inside = self.collide_point(*pos)
|
||||||
|
|
||||||
|
# Обрабатываем вход/выход курсора
|
||||||
|
if is_inside and not self.is_hovered:
|
||||||
|
self.is_hovered = True
|
||||||
|
self.on_enter()
|
||||||
|
elif not is_inside and self.is_hovered:
|
||||||
|
self.is_hovered = False
|
||||||
|
self.on_leave()
|
||||||
|
|
||||||
|
def on_enter(self):
|
||||||
|
Animation.cancel_all(self)
|
||||||
|
Animation(
|
||||||
|
background_color=self.hover_color,
|
||||||
|
size=(self.original_size[0] * self.hover_scale,
|
||||||
|
self.original_size[1] * self.hover_scale),
|
||||||
|
duration=0.15,
|
||||||
|
t='out_quad'
|
||||||
|
).start(self)
|
||||||
|
|
||||||
|
def on_leave(self):
|
||||||
|
Animation.cancel_all(self)
|
||||||
|
Animation(
|
||||||
|
background_color=self.original_color,
|
||||||
|
size=self.original_size,
|
||||||
|
duration=0.2,
|
||||||
|
t='out_quad'
|
||||||
|
).start(self)
|
||||||
|
|
||||||
|
def on_touch_down(self, touch):
|
||||||
|
if self.collide_point(*touch.pos):
|
||||||
|
Animation.cancel_all(self)
|
||||||
|
Animation(
|
||||||
|
background_color=self.press_color,
|
||||||
|
size=(self.original_size[0] * self.press_scale,
|
||||||
|
self.original_size[1] * self.press_scale),
|
||||||
|
duration=0.1,
|
||||||
|
t='in_out_quad'
|
||||||
|
).start(self)
|
||||||
|
return super().on_touch_down(touch)
|
||||||
|
|
||||||
|
def on_touch_up(self, touch):
|
||||||
|
if self.collide_point(*touch.pos):
|
||||||
|
Animation.cancel_all(self)
|
||||||
|
Animation(
|
||||||
|
background_color=self.hover_color if self.is_hovered else self.original_color,
|
||||||
|
size=(self.original_size[0] * (self.hover_scale if self.is_hovered else 1),
|
||||||
|
self.original_size[1] * (self.hover_scale if self.is_hovered else 1)),
|
||||||
|
duration=0.1,
|
||||||
|
t='out_quad'
|
||||||
|
).start(self)
|
||||||
|
return super().on_touch_up(touch)
|
||||||
|
|
||||||
|
class ScrollableLabel(ScrollView):
|
||||||
|
text = StringProperty('')
|
||||||
|
|
||||||
|
def __init__(self, **kwargs):
|
||||||
|
super().__init__(**kwargs)
|
||||||
|
|
||||||
|
self.label = Label(
|
||||||
|
size_hint_y=None,
|
||||||
|
font_size=dp(18),
|
||||||
|
halign='left',
|
||||||
|
valign='top',
|
||||||
|
padding=(dp(15), dp(15)),
|
||||||
|
markup=True
|
||||||
|
)
|
||||||
|
self.label.bind(
|
||||||
|
texture_size=self._update_label_size,
|
||||||
|
width=lambda *x: setattr(self.label, 'text_size', (self.width, None)))
|
||||||
|
self.bind(
|
||||||
|
width=lambda *x: setattr(self.label, 'text_size', (self.width, None)))
|
||||||
|
self.add_widget(self.label)
|
||||||
|
|
||||||
|
def _update_label_size(self, instance, size):
|
||||||
|
instance.size = (self.width, size[1])
|
||||||
|
|
||||||
|
def on_text(self, instance, value):
|
||||||
|
self.label.text = value
|
||||||
|
|
||||||
|
class KompasApp(App):
|
||||||
|
def __init__(self, **kwargs):
|
||||||
|
super().__init__(**kwargs)
|
||||||
|
self.title = "Kompas Saver"
|
||||||
|
|
||||||
def build(self):
|
def build(self):
|
||||||
# Устанавливаем размер окна (подходит для ПК)
|
|
||||||
Window.size = (800, 600)
|
Window.size = (800, 600)
|
||||||
|
|
||||||
# Главный контейнер (горизонтальный)
|
|
||||||
main_layout = BoxLayout(orientation='horizontal', spacing=10, padding=10)
|
main_layout = BoxLayout(orientation='horizontal', spacing=10, padding=10)
|
||||||
|
|
||||||
|
|
||||||
# Левая панель (на одну треть экрана)
|
# Левая панель (кнопки)
|
||||||
left_panel = BoxLayout(orientation='vertical', size_hint=(0.3, 1), spacing=10)
|
left_panel = BoxLayout(orientation='vertical', size_hint=(0.3, 1), spacing=10)
|
||||||
|
header = Label(text="Kompas Saver", size_hint=(1, 0.1), font_size=24, bold=True)
|
||||||
# Заголовок
|
|
||||||
header = Label(text="Моё приложение", size_hint=(1, 0.1), font_size=24, bold=True)
|
# Стиль для кнопок
|
||||||
|
button_style = {
|
||||||
# Кнопки слева
|
'size_hint': (1, 1), #лучше не менять, т.к. кнопки будут плыть при переключении между оконным и полноэкранным режимом
|
||||||
button1 = Button(text="Кнопка 1", on_press=self.show_content)
|
'height': 150,
|
||||||
button2 = Button(text="Кнопка 2", on_press=self.show_content)
|
'halign': 'center',
|
||||||
button3 = Button(text="Кнопка 3", on_press=self.show_content)
|
'valign': 'middle',
|
||||||
|
'text_size': (None, None),
|
||||||
# Добавляем заголовок и кнопки в левую панель
|
'padding': (10, 10)
|
||||||
|
}
|
||||||
|
|
||||||
|
# Создаем анимированные кнопки
|
||||||
|
button1 = AnimatedButton(text="Создать PDF", on_press=self.process_kompas, **button_style)
|
||||||
|
button2 = AnimatedButton(text="Сохранить в IGES", on_press=self.save_to_iges, **button_style)
|
||||||
|
button3 = AnimatedButton(text="Получить информацию \nо чертеже", on_press=self.get_all_sheets, **button_style)
|
||||||
|
button4 = AnimatedButton(text="Projects Support", on_press=self.project_support, **button_style)
|
||||||
|
button5 = AnimatedButton(text="Открытые файлы", on_press=self.get_opened_files, **button_style)
|
||||||
|
|
||||||
left_panel.add_widget(header)
|
left_panel.add_widget(header)
|
||||||
left_panel.add_widget(button1)
|
left_panel.add_widget(button1)
|
||||||
left_panel.add_widget(button2)
|
left_panel.add_widget(button2)
|
||||||
left_panel.add_widget(button3)
|
left_panel.add_widget(button3)
|
||||||
|
left_panel.add_widget(button4)
|
||||||
|
left_panel.add_widget(button5)
|
||||||
|
|
||||||
# Правая панель (пространство для контента)
|
# Правая панель (прокручиваемый текст)
|
||||||
self.right_panel = BoxLayout(orientation='vertical', size_hint=(0.7, 1))
|
self.right_panel = BoxLayout(orientation='vertical', size_hint=(0.7, 1))
|
||||||
self.right_panel.add_widget(Label(text="Выберите действие", font_size=18))
|
self.scroll_label = ScrollableLabel()
|
||||||
|
self.right_panel.add_widget(self.scroll_label)
|
||||||
|
|
||||||
# Добавляем левую и правую панели в главный контейнер
|
|
||||||
main_layout.add_widget(left_panel)
|
main_layout.add_widget(left_panel)
|
||||||
main_layout.add_widget(self.right_panel)
|
main_layout.add_widget(self.right_panel)
|
||||||
|
|
||||||
return main_layout
|
return main_layout
|
||||||
|
|
||||||
def show_content(self, instance):
|
def update_output(self, text):
|
||||||
# Очищаем правую панель
|
self.scroll_label.text = text
|
||||||
self.right_panel.clear_widgets()
|
|
||||||
|
def process_kompas(self, instance):
|
||||||
|
self.update_output("Конвертация в PDF...\n")
|
||||||
|
Clock.schedule_once(lambda dt: self._run_export(), 0.2)
|
||||||
|
|
||||||
|
def _run_export(self):
|
||||||
|
try:
|
||||||
|
result = export_opened_to_raster()
|
||||||
|
self.update_output(result)
|
||||||
|
except Exception as e:
|
||||||
|
self.update_output(f"[color=ff3333]Ошибка: {str(e)}[/color]")
|
||||||
|
|
||||||
# Добавляем контент в зависимости от нажатой кнопки
|
def save_to_iges(self, instance):
|
||||||
if instance.text == "Кнопка 1":
|
self.update_output("Экспорт в IGES...")
|
||||||
content = Label(text="Контент для Кнопки 1", font_size=18)
|
Clock.schedule_once(lambda dt: self._run_save_iges(), 0.2)
|
||||||
elif instance.text == "Кнопка 2":
|
|
||||||
content = Label(text="Контент для Кнопки 2", font_size=18)
|
def _run_save_iges(self):
|
||||||
elif instance.text == "Кнопка 3":
|
try:
|
||||||
content = Label(text="Контент для Кнопки 3", font_size=18)
|
result = save_opened_to_iges()
|
||||||
|
self.update_output(result)
|
||||||
|
except Exception as e:
|
||||||
|
self.update_output(f"[color=ff3333]Ошибка: {str(e)}[/color]")
|
||||||
|
|
||||||
|
def get_all_sheets(self, instance):
|
||||||
|
self.update_output("Получение списка листов...")
|
||||||
|
Clock.schedule_once(lambda dt: self._run_get_sheets(), 0.2)
|
||||||
|
|
||||||
|
def _run_get_sheets(self):
|
||||||
|
try:
|
||||||
|
result = get_all_sheets()
|
||||||
|
self.update_output(result)
|
||||||
|
except Exception as e:
|
||||||
|
self.update_output(f"[color=ff3333]Ошибка: {str(e)}[/color]")
|
||||||
|
|
||||||
self.right_panel.add_widget(content)
|
def project_support(self, instance):
|
||||||
|
self.update_output("Project Support...")
|
||||||
|
Clock.schedule_once(lambda dt: self._run_project_support(), 0.2)
|
||||||
|
|
||||||
|
def _run_project_support(self):
|
||||||
|
try:
|
||||||
|
result = project_support()
|
||||||
|
self.update_output(result)
|
||||||
|
except Exception as e:
|
||||||
|
self.update_output(f"[color=ff3333]Ошибка: {str(e)}[/color]")
|
||||||
|
|
||||||
|
def get_opened_files(self, instance):
|
||||||
|
self.update_output("Получение списка открытых файлов...")
|
||||||
|
Clock.schedule_once(lambda dt: self._run_get_opened_files(), 0.2)
|
||||||
|
|
||||||
|
def _run_get_opened_files(self):
|
||||||
|
try:
|
||||||
|
result = get_opened_files()
|
||||||
|
self.update_output(result)
|
||||||
|
except Exception as e:
|
||||||
|
self.update_output(f"[color=ff3333]Ошибка: {str(e)}[/color]")
|
||||||
|
|
||||||
# Запуск приложения
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
MyApp().run()
|
KompasApp().run()
|
File diff suppressed because it is too large
Load Diff
1131
build/app/EXE-00.toc
1131
build/app/EXE-00.toc
File diff suppressed because it is too large
Load Diff
1125
build/app/PKG-00.toc
1125
build/app/PKG-00.toc
File diff suppressed because it is too large
Load Diff
Binary file not shown.
2619
build/app/PYZ-00.toc
2619
build/app/PYZ-00.toc
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large
Load Diff
|
@ -14,75 +14,275 @@ Types if import:
|
||||||
IMPORTANT: Do NOT post this list to the issue-tracker. Use it as a basis for
|
IMPORTANT: Do NOT post this list to the issue-tracker. Use it as a basis for
|
||||||
tracking down the missing module yourself. Thanks!
|
tracking down the missing module yourself. Thanks!
|
||||||
|
|
||||||
missing module named pyimod02_importers - imported by C:\Users\Андрей\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\PyInstaller\hooks\rthooks\pyi_rth_pkgutil.py (delayed)
|
missing module named pyimod02_importers - imported by C:\projects\3knopki\.venv\Lib\site-packages\PyInstaller\hooks\rthooks\pyi_rth_pkgutil.py (delayed), C:\projects\3knopki\.venv\Lib\site-packages\PyInstaller\hooks\rthooks\pyi_rth_pkgres.py (delayed)
|
||||||
missing module named 'org.python' - imported by copy (optional), xml.sax (delayed, conditional)
|
|
||||||
missing module named org - imported by pickle (optional)
|
|
||||||
missing module named pwd - imported by posixpath (delayed, conditional, optional), shutil (delayed, optional), tarfile (optional), pathlib (delayed, optional), subprocess (delayed, conditional, optional), http.server (delayed, optional), webbrowser (delayed), netrc (delayed, conditional), getpass (delayed)
|
missing module named pwd - imported by posixpath (delayed, conditional, optional), shutil (delayed, optional), tarfile (optional), pathlib (delayed, optional), subprocess (delayed, conditional, optional), http.server (delayed, optional), webbrowser (delayed), netrc (delayed, conditional), getpass (delayed)
|
||||||
missing module named grp - imported by shutil (delayed, optional), tarfile (optional), pathlib (delayed, optional), subprocess (delayed, conditional, optional)
|
missing module named grp - imported by shutil (delayed, optional), tarfile (optional), pathlib (delayed, optional), subprocess (delayed, conditional, optional)
|
||||||
missing module named posix - imported by posixpath (optional), shutil (conditional), importlib._bootstrap_external (conditional), os (conditional, optional)
|
|
||||||
missing module named resource - imported by posix (top-level)
|
|
||||||
missing module named urllib.pathname2url - imported by urllib (conditional), kivy.core.audio.audio_gstplayer (conditional), kivy.core.video.video_gstplayer (conditional)
|
|
||||||
excluded module named _frozen_importlib - imported by importlib (optional), importlib.abc (optional), zipimport (top-level)
|
|
||||||
missing module named _frozen_importlib_external - imported by importlib._bootstrap (delayed), importlib (optional), importlib.abc (optional), zipimport (top-level)
|
|
||||||
missing module named _posixsubprocess - imported by subprocess (conditional), multiprocessing.util (delayed)
|
missing module named _posixsubprocess - imported by subprocess (conditional), multiprocessing.util (delayed)
|
||||||
missing module named fcntl - imported by subprocess (optional), kivy.input.providers.hidinput (conditional), kivy.input.providers.linuxwacom (conditional)
|
missing module named fcntl - imported by subprocess (optional), xmlrpc.server (optional), kivy.input.providers.hidinput (conditional), kivy.input.providers.linuxwacom (conditional)
|
||||||
missing module named _posixshmem - imported by multiprocessing.resource_tracker (conditional), multiprocessing.shared_memory (conditional)
|
missing module named 'org.python' - imported by copy (optional), xml.sax (delayed, conditional)
|
||||||
missing module named _scproxy - imported by urllib.request (conditional)
|
missing module named org - imported by pickle (optional)
|
||||||
|
missing module named urllib.pathname2url - imported by urllib (conditional), kivy.core.video.video_gstplayer (conditional), kivy.core.audio.audio_gstplayer (conditional)
|
||||||
|
missing module named posix - imported by os (conditional, optional), posixpath (optional), shutil (conditional), importlib._bootstrap_external (conditional)
|
||||||
|
missing module named resource - imported by posix (top-level)
|
||||||
|
missing module named _manylinux - imported by pkg_resources._vendor.packaging._manylinux (delayed, optional), packaging._manylinux (delayed, optional)
|
||||||
|
missing module named jinja2 - imported by pyparsing.diagram (top-level), pkg_resources._vendor.pyparsing.diagram (top-level)
|
||||||
|
missing module named pyparsing.Word - imported by pyparsing (delayed), pyparsing.unicode (delayed)
|
||||||
|
missing module named railroad - imported by pkg_resources._vendor.pyparsing.diagram (top-level), pyparsing.diagram (top-level)
|
||||||
missing module named termios - imported by tty (top-level), getpass (optional)
|
missing module named termios - imported by tty (top-level), getpass (optional)
|
||||||
|
missing module named _frozen_importlib_external - imported by importlib._bootstrap (delayed), importlib (optional), importlib.abc (optional), zipimport (top-level)
|
||||||
|
excluded module named _frozen_importlib - imported by importlib (optional), importlib.abc (optional), zipimport (top-level)
|
||||||
|
missing module named readline - imported by site (delayed, optional), rlcompleter (optional), cmd (delayed, conditional, optional), code (delayed, conditional, optional), pdb (delayed, optional)
|
||||||
|
missing module named 'pkg_resources.extern.pyparsing' - imported by pkg_resources._vendor.packaging.markers (top-level), pkg_resources._vendor.packaging.requirements (top-level)
|
||||||
|
missing module named 'pkg_resources.extern.importlib_resources' - imported by pkg_resources._vendor.jaraco.text (optional)
|
||||||
|
missing module named 'pkg_resources.extern.more_itertools' - imported by pkg_resources._vendor.jaraco.functools (top-level)
|
||||||
|
missing module named 'com.sun' - imported by pkg_resources._vendor.appdirs (delayed, conditional, optional)
|
||||||
|
missing module named com - imported by pkg_resources._vendor.appdirs (delayed)
|
||||||
|
missing module named 'win32com.gen_py' - imported by win32com (conditional, optional)
|
||||||
|
missing module named _winreg - imported by platform (delayed, optional), pkg_resources._vendor.appdirs (delayed, conditional), pygments.formatters.img (optional)
|
||||||
|
missing module named pkg_resources.extern.packaging - imported by pkg_resources.extern (top-level), pkg_resources (top-level)
|
||||||
|
missing module named pkg_resources.extern.appdirs - imported by pkg_resources.extern (top-level), pkg_resources (top-level)
|
||||||
|
missing module named 'pkg_resources.extern.jaraco' - imported by pkg_resources (top-level), pkg_resources._vendor.jaraco.text (top-level)
|
||||||
|
missing module named _scproxy - imported by urllib.request (conditional)
|
||||||
missing module named 'java.lang' - imported by platform (delayed, optional), xml.sax._exceptions (conditional)
|
missing module named 'java.lang' - imported by platform (delayed, optional), xml.sax._exceptions (conditional)
|
||||||
|
missing module named vms_lib - imported by platform (delayed, optional)
|
||||||
|
missing module named java - imported by platform (delayed)
|
||||||
|
missing module named _posixshmem - imported by multiprocessing.resource_tracker (conditional), multiprocessing.shared_memory (conditional)
|
||||||
missing module named multiprocessing.BufferTooShort - imported by multiprocessing (top-level), multiprocessing.connection (top-level)
|
missing module named multiprocessing.BufferTooShort - imported by multiprocessing (top-level), multiprocessing.connection (top-level)
|
||||||
missing module named multiprocessing.AuthenticationError - imported by multiprocessing (top-level), multiprocessing.connection (top-level)
|
missing module named multiprocessing.AuthenticationError - imported by multiprocessing (top-level), multiprocessing.connection (top-level)
|
||||||
missing module named multiprocessing.get_context - imported by multiprocessing (top-level), multiprocessing.pool (top-level), multiprocessing.managers (top-level), multiprocessing.sharedctypes (top-level)
|
missing module named multiprocessing.get_context - imported by multiprocessing (top-level), multiprocessing.pool (top-level), multiprocessing.managers (top-level), multiprocessing.sharedctypes (top-level)
|
||||||
missing module named multiprocessing.TimeoutError - imported by multiprocessing (top-level), multiprocessing.pool (top-level)
|
missing module named multiprocessing.TimeoutError - imported by multiprocessing (top-level), multiprocessing.pool (top-level)
|
||||||
missing module named multiprocessing.set_start_method - imported by multiprocessing (top-level), multiprocessing.spawn (top-level)
|
missing module named multiprocessing.set_start_method - imported by multiprocessing (top-level), multiprocessing.spawn (top-level)
|
||||||
missing module named multiprocessing.get_start_method - imported by multiprocessing (top-level), multiprocessing.spawn (top-level)
|
missing module named multiprocessing.get_start_method - imported by multiprocessing (top-level), multiprocessing.spawn (top-level)
|
||||||
missing module named Queue - imported by kivy.compat (optional)
|
missing module named dxf2pdf - imported by export_opened_to_raster (delayed)
|
||||||
missing module named PIL - imported by kivy.atlas (delayed, optional), kivy.core.text.text_pil (top-level), kivy.core.image.img_pil (optional), pygments.formatters.img (optional)
|
missing module named olefile - imported by PIL.FpxImagePlugin (top-level), PIL.MicImagePlugin (top-level)
|
||||||
missing module named Leap - imported by kivy.input.providers.leapfinger (delayed)
|
missing module named _dummy_thread - imported by numpy._core.arrayprint (optional)
|
||||||
missing module named pygame - imported by kivy.input.providers.androidjoystick (conditional), kivy.app (delayed, conditional), kivy.core.audio.audio_pygame (conditional, optional), kivy.core.window.window_pygame (top-level), kivy.support (delayed), kivy.core.clipboard.clipboard_pygame (optional), kivy.core.image.img_pygame (optional), kivy.core.text.text_pygame (optional)
|
missing module named 'numpy_distutils.cpuinfo' - imported by numpy.f2py.diagnose (delayed, conditional, optional)
|
||||||
missing module named oscpy - imported by kivy.input.providers.tuio (delayed, optional)
|
missing module named 'numpy_distutils.fcompiler' - imported by numpy.f2py.diagnose (delayed, conditional, optional)
|
||||||
|
missing module named 'numpy_distutils.command' - imported by numpy.f2py.diagnose (delayed, conditional, optional)
|
||||||
|
missing module named numpy_distutils - imported by numpy.f2py.diagnose (delayed, optional)
|
||||||
|
missing module named psutil - imported by numpy.testing._private.utils (delayed, optional)
|
||||||
missing module named asyncio.DefaultEventLoopPolicy - imported by asyncio (delayed, conditional), asyncio.events (delayed, conditional)
|
missing module named asyncio.DefaultEventLoopPolicy - imported by asyncio (delayed, conditional), asyncio.events (delayed, conditional)
|
||||||
missing module named Image - imported by kivy.core.image.img_pil (optional), docutils.parsers.rst.directives.images (optional)
|
missing module named threadpoolctl - imported by numpy.lib._utils_impl (delayed, optional)
|
||||||
missing module named 'PIL.Image' - imported by docutils.parsers.rst.directives.images (optional)
|
missing module named numpy._core.zeros - imported by numpy._core (top-level), numpy.linalg._linalg (top-level), numpy (conditional)
|
||||||
|
missing module named numpy._core.vstack - imported by numpy._core (top-level), numpy.lib._shape_base_impl (top-level), numpy (conditional)
|
||||||
|
missing module named numpy._core.void - imported by numpy._core (conditional), numpy (conditional)
|
||||||
|
missing module named numpy._core.vecmat - imported by numpy._core (conditional), numpy (conditional)
|
||||||
|
missing module named numpy._core.vecdot - imported by numpy._core (top-level), numpy.linalg._linalg (top-level), numpy (conditional)
|
||||||
|
missing module named numpy._core.ushort - imported by numpy._core (conditional), numpy (conditional)
|
||||||
|
missing module named numpy._core.unsignedinteger - imported by numpy._core (conditional), numpy (conditional)
|
||||||
|
missing module named numpy._core.ulonglong - imported by numpy._core (conditional), numpy (conditional)
|
||||||
|
missing module named numpy._core.ulong - imported by numpy._core (conditional), numpy (conditional)
|
||||||
|
missing module named numpy._core.uintp - imported by numpy._core (conditional), numpy (conditional)
|
||||||
|
missing module named numpy._core.uintc - imported by numpy._core (conditional), numpy (conditional)
|
||||||
|
missing module named numpy._core.uint64 - imported by numpy._core (conditional), numpy (conditional), numpy._array_api_info (top-level)
|
||||||
|
missing module named numpy._core.uint32 - imported by numpy._core (conditional), numpy (conditional), numpy._array_api_info (top-level)
|
||||||
|
missing module named numpy._core.uint16 - imported by numpy._core (conditional), numpy (conditional), numpy._array_api_info (top-level)
|
||||||
|
missing module named numpy._core.uint - imported by numpy._core (conditional), numpy (conditional)
|
||||||
|
missing module named numpy._core.ubyte - imported by numpy._core (conditional), numpy (conditional)
|
||||||
|
missing module named numpy._core.trunc - imported by numpy._core (conditional), numpy (conditional)
|
||||||
|
missing module named numpy._core.true_divide - imported by numpy._core (conditional), numpy (conditional)
|
||||||
|
missing module named numpy._core.transpose - imported by numpy._core (top-level), numpy.lib._function_base_impl (top-level), numpy.linalg._linalg (top-level), numpy (conditional)
|
||||||
|
missing module named numpy._core.trace - imported by numpy._core (top-level), numpy.linalg._linalg (top-level), numpy (conditional)
|
||||||
|
missing module named numpy._core.timedelta64 - imported by numpy._core (conditional), numpy (conditional)
|
||||||
|
missing module named numpy._core.tensordot - imported by numpy._core (top-level), numpy.linalg._linalg (top-level), numpy (conditional)
|
||||||
|
missing module named numpy._core.tanh - imported by numpy._core (conditional), numpy (conditional)
|
||||||
|
missing module named numpy._core.tan - imported by numpy._core (conditional), numpy (conditional)
|
||||||
|
missing module named numpy._core.swapaxes - imported by numpy._core (top-level), numpy.linalg._linalg (top-level), numpy (conditional)
|
||||||
|
missing module named numpy._core.sum - imported by numpy._core (top-level), numpy.linalg._linalg (top-level), numpy (conditional)
|
||||||
|
missing module named numpy._core.subtract - imported by numpy._core (conditional), numpy (conditional)
|
||||||
|
missing module named numpy._core.str_ - imported by numpy._core (conditional), numpy (conditional)
|
||||||
|
missing module named numpy._core.square - imported by numpy._core (conditional), numpy (conditional)
|
||||||
|
missing module named numpy._core.sqrt - imported by numpy._core (top-level), numpy.linalg._linalg (top-level), numpy (conditional), numpy.fft._pocketfft (top-level)
|
||||||
|
missing module named numpy._core.spacing - imported by numpy._core (conditional), numpy (conditional)
|
||||||
|
missing module named numpy._core.sort - imported by numpy._core (top-level), numpy.linalg._linalg (top-level), numpy (conditional)
|
||||||
|
missing module named numpy._core.sinh - imported by numpy._core (conditional), numpy (conditional)
|
||||||
|
missing module named numpy._core.single - imported by numpy._core (top-level), numpy.linalg._linalg (top-level), numpy (conditional)
|
||||||
|
missing module named numpy._core.signedinteger - imported by numpy._core (conditional), numpy (conditional)
|
||||||
|
missing module named numpy._core.signbit - imported by numpy._core (delayed), numpy.testing._private.utils (delayed), numpy (conditional)
|
||||||
|
missing module named numpy._core.sign - imported by numpy._core (top-level), numpy.linalg._linalg (top-level), numpy (conditional)
|
||||||
|
missing module named numpy._core.short - imported by numpy._core (conditional), numpy (conditional)
|
||||||
|
missing module named numpy._core.rint - imported by numpy._core (conditional), numpy (conditional)
|
||||||
|
missing module named numpy._core.right_shift - imported by numpy._core (conditional), numpy (conditional)
|
||||||
|
missing module named numpy._core.result_type - imported by numpy._core (delayed), numpy.testing._private.utils (delayed), numpy (conditional), numpy.fft._pocketfft (top-level)
|
||||||
|
missing module named numpy._core.remainder - imported by numpy._core (conditional), numpy (conditional)
|
||||||
|
missing module named numpy._core.reciprocal - imported by numpy._core (top-level), numpy.linalg._linalg (top-level), numpy (conditional), numpy.fft._pocketfft (top-level)
|
||||||
|
missing module named numpy._core.radians - imported by numpy._core (conditional), numpy (conditional)
|
||||||
|
missing module named numpy._core.rad2deg - imported by numpy._core (conditional), numpy (conditional)
|
||||||
|
missing module named numpy._core.prod - imported by numpy._core (top-level), numpy.linalg._linalg (top-level), numpy (conditional)
|
||||||
|
missing module named numpy._core.power - imported by numpy._core (conditional), numpy (conditional)
|
||||||
|
missing module named numpy._core.positive - imported by numpy._core (conditional), numpy (conditional)
|
||||||
|
missing module named numpy._core.pi - imported by numpy._core (conditional), numpy (conditional)
|
||||||
|
missing module named numpy._core.outer - imported by numpy._core (top-level), numpy.linalg._linalg (top-level), numpy (conditional)
|
||||||
|
missing module named numpy._core.ones - imported by numpy._core (top-level), numpy.lib._polynomial_impl (top-level), numpy (conditional)
|
||||||
|
missing module named numpy._core.object_ - imported by numpy._core (top-level), numpy.linalg._linalg (top-level), numpy.testing._private.utils (delayed), numpy (conditional)
|
||||||
|
missing module named numpy._core.number - imported by numpy._core (delayed), numpy.testing._private.utils (delayed), numpy (conditional)
|
||||||
|
missing module named numpy._core.not_equal - imported by numpy._core (conditional), numpy (conditional)
|
||||||
|
missing module named numpy._core.newaxis - imported by numpy._core (top-level), numpy.linalg._linalg (top-level), numpy (conditional)
|
||||||
|
missing module named numpy._core.negative - imported by numpy._core (conditional), numpy (conditional)
|
||||||
|
missing module named numpy._core.ndarray - imported by numpy._core (top-level), numpy.lib._utils_impl (top-level), numpy.testing._private.utils (top-level), numpy (conditional)
|
||||||
|
missing module named numpy._core.multiply - imported by numpy._core (top-level), numpy.linalg._linalg (top-level), numpy (conditional)
|
||||||
|
missing module named numpy._core.moveaxis - imported by numpy._core (top-level), numpy.linalg._linalg (top-level), numpy (conditional)
|
||||||
|
missing module named numpy._core.modf - imported by numpy._core (conditional), numpy (conditional)
|
||||||
|
missing module named numpy._core.mod - imported by numpy._core (conditional), numpy (conditional)
|
||||||
|
missing module named numpy._core.minimum - imported by numpy._core (conditional), numpy (conditional)
|
||||||
|
missing module named numpy._core.maximum - imported by numpy._core (conditional), numpy (conditional)
|
||||||
|
missing module named numpy._core.max - imported by numpy._core (delayed), numpy.testing._private.utils (delayed), numpy (conditional)
|
||||||
|
missing module named numpy._core.matrix_transpose - imported by numpy._core (top-level), numpy.linalg._linalg (top-level), numpy (conditional)
|
||||||
|
missing module named numpy._core.matvec - imported by numpy._core (conditional), numpy (conditional)
|
||||||
|
missing module named numpy._core.matmul - imported by numpy._core (top-level), numpy.linalg._linalg (top-level), numpy (conditional)
|
||||||
|
missing module named numpy._core.longdouble - imported by numpy._core (conditional), numpy (conditional)
|
||||||
|
missing module named numpy._core.long - imported by numpy._core (conditional), numpy (conditional)
|
||||||
|
missing module named numpy._core.logical_xor - imported by numpy._core (conditional), numpy (conditional)
|
||||||
|
missing module named numpy._core.logical_or - imported by numpy._core (conditional), numpy (conditional)
|
||||||
|
missing module named numpy._core.logical_not - imported by numpy._core (conditional), numpy (conditional)
|
||||||
|
missing module named numpy._core.logical_and - imported by numpy._core (conditional), numpy (conditional)
|
||||||
|
missing module named numpy._core.logaddexp2 - imported by numpy._core (conditional), numpy (conditional)
|
||||||
|
missing module named numpy._core.logaddexp - imported by numpy._core (conditional), numpy (conditional)
|
||||||
|
missing module named numpy._core.log2 - imported by numpy._core (conditional), numpy (conditional)
|
||||||
|
missing module named numpy._core.log1p - imported by numpy._core (conditional), numpy (conditional)
|
||||||
|
missing module named numpy._core.log - imported by numpy._core (conditional), numpy (conditional)
|
||||||
|
missing module named numpy._core.linspace - imported by numpy._core (top-level), numpy.lib._index_tricks_impl (top-level), numpy (conditional)
|
||||||
|
missing module named numpy._core.less_equal - imported by numpy._core (conditional), numpy (conditional)
|
||||||
|
missing module named numpy._core.less - imported by numpy._core (conditional), numpy (conditional)
|
||||||
|
missing module named numpy._core.left_shift - imported by numpy._core (conditional), numpy (conditional)
|
||||||
|
missing module named numpy._core.ldexp - imported by numpy._core (conditional), numpy (conditional)
|
||||||
|
missing module named numpy._core.lcm - imported by numpy._core (conditional), numpy (conditional)
|
||||||
|
missing module named numpy._core.isscalar - imported by numpy._core (delayed), numpy.testing._private.utils (delayed), numpy.lib._polynomial_impl (top-level), numpy (conditional)
|
||||||
|
missing module named numpy._core.isnat - imported by numpy._core (top-level), numpy.testing._private.utils (top-level), numpy (conditional)
|
||||||
|
missing module named numpy._core.isnan - imported by numpy._core (top-level), numpy.linalg._linalg (top-level), numpy.testing._private.utils (delayed), numpy (conditional)
|
||||||
|
missing module named numpy._core.isfinite - imported by numpy._core (top-level), numpy.linalg._linalg (top-level), numpy (conditional)
|
||||||
|
missing module named numpy._core.intp - imported by numpy._core (top-level), numpy.linalg._linalg (top-level), numpy.testing._private.utils (top-level), numpy (conditional), numpy._array_api_info (top-level)
|
||||||
|
missing module named numpy._core.integer - imported by numpy._core (conditional), numpy (conditional), numpy.fft._helper (top-level)
|
||||||
|
missing module named numpy._core.intc - imported by numpy._core (top-level), numpy.linalg._linalg (top-level), numpy (conditional)
|
||||||
|
missing module named numpy._core.int8 - imported by numpy._core (conditional), numpy (conditional), numpy._array_api_info (top-level)
|
||||||
|
missing module named numpy._core.int64 - imported by numpy._core (conditional), numpy (conditional), numpy._array_api_info (top-level)
|
||||||
|
missing module named numpy._core.int32 - imported by numpy._core (conditional), numpy (conditional), numpy._array_api_info (top-level)
|
||||||
|
missing module named numpy._core.int16 - imported by numpy._core (conditional), numpy (conditional), numpy._array_api_info (top-level)
|
||||||
|
missing module named numpy._core.inf - imported by numpy._core (top-level), numpy.linalg._linalg (top-level), numpy.testing._private.utils (delayed), numpy (conditional)
|
||||||
|
missing module named numpy._core.inexact - imported by numpy._core (top-level), numpy.linalg._linalg (top-level), numpy (conditional)
|
||||||
|
missing module named numpy._core.iinfo - imported by numpy._core (top-level), numpy.lib._twodim_base_impl (top-level), numpy (conditional)
|
||||||
|
missing module named numpy._core.hypot - imported by numpy._core (conditional), numpy (conditional)
|
||||||
|
missing module named numpy._core.hstack - imported by numpy._core (top-level), numpy.lib._polynomial_impl (top-level), numpy (conditional)
|
||||||
|
missing module named numpy._core.heaviside - imported by numpy._core (conditional), numpy (conditional)
|
||||||
|
missing module named numpy._core.half - imported by numpy._core (conditional), numpy (conditional)
|
||||||
|
missing module named numpy._core.greater_equal - imported by numpy._core (conditional), numpy (conditional)
|
||||||
|
missing module named numpy._core.greater - imported by numpy._core (conditional), numpy (conditional)
|
||||||
|
missing module named numpy._core.gcd - imported by numpy._core (conditional), numpy (conditional)
|
||||||
|
missing module named numpy._core.frompyfunc - imported by numpy._core (conditional), numpy (conditional)
|
||||||
|
missing module named numpy._core.frexp - imported by numpy._core (conditional), numpy (conditional)
|
||||||
|
missing module named numpy._core.fmod - imported by numpy._core (conditional), numpy (conditional)
|
||||||
|
missing module named numpy._core.fmin - imported by numpy._core (conditional), numpy (conditional)
|
||||||
|
missing module named numpy._core.fmax - imported by numpy._core (conditional), numpy (conditional)
|
||||||
|
missing module named numpy._core.floor_divide - imported by numpy._core (conditional), numpy (conditional)
|
||||||
|
missing module named numpy._core.floor - imported by numpy._core (conditional), numpy (conditional)
|
||||||
|
missing module named numpy._core.floating - imported by numpy._core (conditional), numpy (conditional)
|
||||||
|
missing module named numpy._core.float_power - imported by numpy._core (conditional), numpy (conditional)
|
||||||
|
missing module named numpy._core.float32 - imported by numpy._core (top-level), numpy.testing._private.utils (top-level), numpy (conditional), numpy._array_api_info (top-level)
|
||||||
|
missing module named numpy._core.float16 - imported by numpy._core (conditional), numpy (conditional)
|
||||||
|
missing module named numpy._core.finfo - imported by numpy._core (top-level), numpy.linalg._linalg (top-level), numpy.lib._polynomial_impl (top-level), numpy (conditional)
|
||||||
|
missing module named numpy._core.fabs - imported by numpy._core (conditional), numpy (conditional)
|
||||||
|
missing module named numpy._core.expm1 - imported by numpy._core (conditional), numpy (conditional)
|
||||||
|
missing module named numpy._core.exp - imported by numpy._core (conditional), numpy (conditional)
|
||||||
|
missing module named numpy._core.euler_gamma - imported by numpy._core (conditional), numpy (conditional)
|
||||||
|
missing module named numpy._core.errstate - imported by numpy._core (top-level), numpy.linalg._linalg (top-level), numpy.testing._private.utils (delayed), numpy (conditional)
|
||||||
|
missing module named numpy._core.equal - imported by numpy._core (conditional), numpy (conditional)
|
||||||
|
missing module named numpy._core.empty_like - imported by numpy._core (top-level), numpy.linalg._linalg (top-level), numpy (conditional), numpy.fft._pocketfft (top-level)
|
||||||
|
missing module named numpy._core.empty - imported by numpy._core (top-level), numpy.linalg._linalg (top-level), numpy.testing._private.utils (top-level), numpy (conditional), numpy.fft._helper (top-level)
|
||||||
|
missing module named numpy._core.e - imported by numpy._core (conditional), numpy (conditional)
|
||||||
|
missing module named numpy._core.double - imported by numpy._core (top-level), numpy.linalg._linalg (top-level), numpy (conditional)
|
||||||
|
missing module named numpy._core.dot - imported by numpy._core (top-level), numpy.linalg._linalg (top-level), numpy.lib._polynomial_impl (top-level), numpy (conditional)
|
||||||
|
missing module named numpy._core.divmod - imported by numpy._core (conditional), numpy (conditional)
|
||||||
|
missing module named numpy._core.divide - imported by numpy._core (top-level), numpy.linalg._linalg (top-level), numpy (conditional)
|
||||||
|
missing module named numpy._core.diagonal - imported by numpy._core (top-level), numpy.linalg._linalg (top-level), numpy (conditional)
|
||||||
|
missing module named numpy._core.degrees - imported by numpy._core (conditional), numpy (conditional)
|
||||||
|
missing module named numpy._core.deg2rad - imported by numpy._core (conditional), numpy (conditional)
|
||||||
|
missing module named numpy._core.datetime64 - imported by numpy._core (conditional), numpy (conditional)
|
||||||
|
missing module named numpy._core.csingle - imported by numpy._core (top-level), numpy.linalg._linalg (top-level), numpy (conditional)
|
||||||
|
missing module named numpy._core.cross - imported by numpy._core (top-level), numpy.linalg._linalg (top-level), numpy (conditional)
|
||||||
|
missing module named numpy._core.count_nonzero - imported by numpy._core (top-level), numpy.linalg._linalg (top-level), numpy (conditional)
|
||||||
|
missing module named numpy._core.cosh - imported by numpy._core (conditional), numpy (conditional)
|
||||||
|
missing module named numpy._core.cos - imported by numpy._core (conditional), numpy (conditional)
|
||||||
|
missing module named numpy._core.copysign - imported by numpy._core (conditional), numpy (conditional)
|
||||||
|
missing module named numpy._core.conjugate - imported by numpy._core (conditional), numpy (conditional), numpy.fft._pocketfft (top-level)
|
||||||
|
missing module named numpy._core.conj - imported by numpy._core (conditional), numpy (conditional)
|
||||||
|
missing module named numpy._core.complexfloating - imported by numpy._core (top-level), numpy.linalg._linalg (top-level), numpy (conditional)
|
||||||
|
missing module named numpy._core.complex64 - imported by numpy._core (conditional), numpy (conditional), numpy._array_api_info (top-level)
|
||||||
|
missing module named numpy._core.clongdouble - imported by numpy._core (conditional), numpy (conditional)
|
||||||
|
missing module named numpy._core.character - imported by numpy._core (conditional), numpy (conditional)
|
||||||
|
missing module named numpy._core.ceil - imported by numpy._core (conditional), numpy (conditional)
|
||||||
|
missing module named numpy._core.cdouble - imported by numpy._core (top-level), numpy.linalg._linalg (top-level), numpy (conditional)
|
||||||
|
missing module named numpy._core.cbrt - imported by numpy._core (conditional), numpy (conditional)
|
||||||
|
missing module named numpy._core.bytes_ - imported by numpy._core (conditional), numpy (conditional)
|
||||||
|
missing module named numpy._core.byte - imported by numpy._core (conditional), numpy (conditional)
|
||||||
|
missing module named numpy._core.bool_ - imported by numpy._core (conditional), numpy (conditional)
|
||||||
|
missing module named numpy._core.bitwise_xor - imported by numpy._core (conditional), numpy (conditional)
|
||||||
|
missing module named numpy._core.bitwise_or - imported by numpy._core (conditional), numpy (conditional)
|
||||||
|
missing module named numpy._core.bitwise_count - imported by numpy._core (conditional), numpy (conditional)
|
||||||
|
missing module named numpy._core.bitwise_and - imported by numpy._core (conditional), numpy (conditional)
|
||||||
|
missing module named numpy._core.atleast_3d - imported by numpy._core (top-level), numpy.lib._shape_base_impl (top-level), numpy (conditional)
|
||||||
|
missing module named numpy._core.atleast_2d - imported by numpy._core (top-level), numpy.linalg._linalg (top-level), numpy (conditional)
|
||||||
|
missing module named numpy._core.atleast_1d - imported by numpy._core (top-level), numpy.lib._polynomial_impl (top-level), numpy (conditional)
|
||||||
|
missing module named numpy._core.asarray - imported by numpy._core (top-level), numpy.lib._array_utils_impl (top-level), numpy.linalg._linalg (top-level), numpy (conditional), numpy.fft._pocketfft (top-level), numpy.fft._helper (top-level)
|
||||||
|
missing module named numpy._core.asanyarray - imported by numpy._core (top-level), numpy.linalg._linalg (top-level), numpy (conditional)
|
||||||
|
missing module named numpy._core.array_repr - imported by numpy._core (top-level), numpy.testing._private.utils (top-level), numpy (conditional)
|
||||||
|
missing module named numpy._core.array2string - imported by numpy._core (delayed), numpy.testing._private.utils (delayed), numpy (conditional)
|
||||||
|
missing module named numpy._core.array - imported by numpy._core (top-level), numpy.linalg._linalg (top-level), numpy.testing._private.utils (top-level), numpy.lib._polynomial_impl (top-level), numpy (conditional)
|
||||||
|
missing module named numpy._core.argsort - imported by numpy._core (top-level), numpy.linalg._linalg (top-level), numpy (conditional)
|
||||||
|
missing module named numpy._core.arctanh - imported by numpy._core (conditional), numpy (conditional)
|
||||||
|
missing module named numpy._core.arctan2 - imported by numpy._core (conditional), numpy (conditional)
|
||||||
|
missing module named numpy._core.arctan - imported by numpy._core (conditional), numpy (conditional)
|
||||||
|
missing module named numpy._core.arcsinh - imported by numpy._core (conditional), numpy (conditional)
|
||||||
|
missing module named numpy._core.arcsin - imported by numpy._core (conditional), numpy (conditional)
|
||||||
|
missing module named numpy._core.arccosh - imported by numpy._core (conditional), numpy (conditional)
|
||||||
|
missing module named numpy._core.arccos - imported by numpy._core (conditional), numpy (conditional)
|
||||||
|
missing module named numpy._core.arange - imported by numpy._core (top-level), numpy.testing._private.utils (top-level), numpy (conditional), numpy.fft._helper (top-level)
|
||||||
|
missing module named numpy._core.amin - imported by numpy._core (top-level), numpy.linalg._linalg (top-level), numpy (conditional)
|
||||||
|
missing module named numpy._core.amax - imported by numpy._core (top-level), numpy.linalg._linalg (top-level), numpy (conditional)
|
||||||
|
missing module named numpy._core.all - imported by numpy._core (top-level), numpy.linalg._linalg (top-level), numpy.testing._private.utils (delayed), numpy (conditional)
|
||||||
|
missing module named numpy._core.add - imported by numpy._core (top-level), numpy.linalg._linalg (top-level), numpy (conditional)
|
||||||
|
missing module named yaml - imported by numpy.__config__ (delayed)
|
||||||
|
missing module named numpy._distributor_init_local - imported by numpy (optional), numpy._distributor_init (optional)
|
||||||
|
missing module named xmlrpclib - imported by defusedxml.xmlrpc (conditional)
|
||||||
|
missing module named 'Crypto.Util' - imported by PyPDF2._encryption (optional)
|
||||||
|
missing module named Crypto - imported by PyPDF2._encryption (optional)
|
||||||
missing module named pygments.formatters.BBCodeFormatter - imported by pygments.formatters (top-level), kivy.uix.codeinput (top-level)
|
missing module named pygments.formatters.BBCodeFormatter - imported by pygments.formatters (top-level), kivy.uix.codeinput (top-level)
|
||||||
missing module named ctags - imported by pygments.formatters.html (optional)
|
|
||||||
missing module named pygments.lexers.PrologLexer - imported by pygments.lexers (top-level), pygments.lexers.cplint (top-level)
|
missing module named pygments.lexers.PrologLexer - imported by pygments.lexers (top-level), pygments.lexers.cplint (top-level)
|
||||||
missing module named _winreg - imported by platform (delayed, optional), pygments.formatters.img (optional)
|
missing module named ctags - imported by pygments.formatters.html (optional)
|
||||||
missing module named chardet - imported by pygments.lexer (delayed, conditional, optional)
|
|
||||||
missing module named roman - imported by docutils.writers.latex2e (optional), docutils.writers.manpage (optional)
|
|
||||||
missing module named gobject - imported by kivy.support (delayed, optional)
|
|
||||||
missing module named gi - imported by kivy.support (delayed, optional), kivy.core.clipboard.clipboard_gtk3 (top-level)
|
|
||||||
missing module named 'gi.repository' - imported by kivy.core.clipboard.clipboard_gtk3 (top-level), kivy.core.camera.camera_gi (top-level)
|
|
||||||
missing module named AppKit - imported by kivy.core.spelling.spelling_osxappkit (top-level)
|
|
||||||
missing module named ffmpeg - imported by kivy.core.video.video_ffmpeg (optional)
|
|
||||||
missing module named 'ffpyplayer.tools' - imported by kivy.core.audio.audio_ffpyplayer (optional), kivy.core.image.img_ffpyplayer (top-level), kivy.core.video.video_ffpyplayer (optional)
|
|
||||||
missing module named 'ffpyplayer.player' - imported by kivy.core.audio.audio_ffpyplayer (optional), kivy.core.video.video_ffpyplayer (optional)
|
|
||||||
missing module named ffpyplayer - imported by kivy.core.audio.audio_ffpyplayer (optional), kivy.core.image.img_ffpyplayer (top-level), kivy.core.video.video_ffpyplayer (optional)
|
|
||||||
missing module named numpy - imported by kivy.core.camera.camera_android (delayed), kivy.core.camera.camera_picamera (top-level)
|
|
||||||
missing module named picamera - imported by kivy.core.camera.camera_picamera (top-level)
|
missing module named picamera - imported by kivy.core.camera.camera_picamera (top-level)
|
||||||
missing module named smb - imported by kivy.loader (delayed, conditional, optional)
|
|
||||||
missing module named 'pyobjus.dylib_manager' - imported by kivy.core.audio.audio_avplayer (top-level), kivy.core.clipboard.clipboard_nspaste (optional)
|
|
||||||
missing module named pyobjus - imported by kivy.core.audio.audio_avplayer (top-level), kivy.core.clipboard.clipboard_nspaste (optional)
|
|
||||||
missing module named 'kivy.core.text._text_pango' - imported by kivy.core.text.text_pango (top-level)
|
missing module named 'kivy.core.text._text_pango' - imported by kivy.core.text.text_pango (top-level)
|
||||||
missing module named jnius - imported by kivy.metrics (delayed, conditional), kivy.app (delayed, conditional), kivy.core.clipboard.clipboard_android (top-level), kivy.core.camera.camera_android (top-level), kivy.core.audio.audio_android (top-level)
|
|
||||||
missing module named cv2 - imported by kivy.core.camera.camera_opencv (optional), kivy.core.camera.camera_android (delayed)
|
|
||||||
missing module named enchant - imported by kivy.core.spelling.spelling_enchant (top-level)
|
|
||||||
missing module named 'pygame.scrap' - imported by kivy.core.clipboard.clipboard_pygame (optional)
|
|
||||||
missing module named kivy.lib.vidcore_lite.egl - imported by kivy.lib.vidcore_lite (top-level), kivy.core.window.window_egl_rpi (top-level)
|
missing module named kivy.lib.vidcore_lite.egl - imported by kivy.lib.vidcore_lite (top-level), kivy.core.window.window_egl_rpi (top-level)
|
||||||
missing module named kivy.lib.vidcore_lite.bcm - imported by kivy.lib.vidcore_lite (top-level), kivy.core.window.window_egl_rpi (top-level)
|
missing module named kivy.lib.vidcore_lite.bcm - imported by kivy.lib.vidcore_lite (top-level), kivy.core.window.window_egl_rpi (top-level)
|
||||||
missing module named 'android.runnable' - imported by kivy.core.clipboard.clipboard_android (top-level)
|
missing module named cv2 - imported by kivy.core.camera.camera_opencv (optional), kivy.core.camera.camera_android (delayed)
|
||||||
|
missing module named jnius - imported by kivy.metrics (delayed, conditional), kivy.app (delayed, conditional), kivy.core.clipboard.clipboard_android (top-level), kivy.core.audio.audio_android (top-level), kivy.core.camera.camera_android (top-level)
|
||||||
|
missing module named 'pygame.scrap' - imported by kivy.core.clipboard.clipboard_pygame (optional)
|
||||||
|
missing module named pygame - imported by kivy.input.providers.androidjoystick (conditional), kivy.app (delayed, conditional), kivy.support (delayed), kivy.core.text.text_pygame (optional), kivy.core.audio.audio_pygame (conditional, optional), kivy.core.image.img_pygame (optional), kivy.core.window.window_pygame (top-level), kivy.core.clipboard.clipboard_pygame (optional)
|
||||||
|
missing module named Leap - imported by kivy.input.providers.leapfinger (delayed)
|
||||||
|
missing module named android - imported by kivy.metrics (delayed, conditional), kivy.core.window (delayed, conditional), kivy.base (delayed, optional), kivy.input.providers.androidjoystick (optional), kivy.app (delayed, conditional), kivy.support (delayed, optional), kivy.core.clipboard.clipboard_android (top-level), kivy.core.window.window_sdl2 (delayed, conditional), kivy.core.audio.audio_android (top-level), kivy.core.window.window_pygame (conditional, optional)
|
||||||
|
missing module named oscpy - imported by kivy.input.providers.tuio (delayed, optional)
|
||||||
|
missing module named ffmpeg - imported by kivy.core.video.video_ffmpeg (optional)
|
||||||
|
missing module named AppKit - imported by kivy.core.spelling.spelling_osxappkit (top-level)
|
||||||
|
missing module named gobject - imported by kivy.support (delayed, optional)
|
||||||
|
missing module named 'gi.repository' - imported by kivy.support (delayed, optional), kivy.core.clipboard.clipboard_gtk3 (top-level)
|
||||||
|
missing module named 'ffpyplayer.tools' - imported by kivy.core.video.video_ffpyplayer (optional), kivy.core.image.img_ffpyplayer (top-level), kivy.core.audio.audio_ffpyplayer (optional)
|
||||||
|
missing module named 'ffpyplayer.player' - imported by kivy.core.video.video_ffpyplayer (optional), kivy.core.audio.audio_ffpyplayer (optional)
|
||||||
|
missing module named ffpyplayer - imported by kivy.core.video.video_ffpyplayer (optional), kivy.core.image.img_ffpyplayer (top-level), kivy.core.audio.audio_ffpyplayer (optional)
|
||||||
|
missing module named 'pyobjus.dylib_manager' - imported by kivy.core.clipboard.clipboard_nspaste (optional), kivy.core.audio.audio_avplayer (top-level)
|
||||||
|
missing module named pyobjus - imported by kivy.core.clipboard.clipboard_nspaste (optional), kivy.core.audio.audio_avplayer (top-level)
|
||||||
|
missing module named 'ffpyplayer.pic' - imported by kivy.core.image.img_ffpyplayer (top-level)
|
||||||
|
missing module named smb - imported by kivy.loader (delayed, conditional, optional)
|
||||||
|
missing module named enchant - imported by kivy.core.spelling.spelling_enchant (top-level)
|
||||||
|
missing module named Image - imported by kivy.core.image.img_pil (optional), docutils.parsers.rst.directives.images (optional)
|
||||||
missing module named dbus - imported by kivy.core.clipboard.clipboard_dbusklipper (optional)
|
missing module named dbus - imported by kivy.core.clipboard.clipboard_dbusklipper (optional)
|
||||||
missing module named 'opencv.highgui' - imported by kivy.core.camera.camera_opencv (optional)
|
missing module named 'opencv.highgui' - imported by kivy.core.camera.camera_opencv (optional)
|
||||||
missing module named opencv - imported by kivy.core.camera.camera_opencv (optional)
|
missing module named opencv - imported by kivy.core.camera.camera_opencv (optional)
|
||||||
missing module named 'ffpyplayer.pic' - imported by kivy.core.image.img_ffpyplayer (top-level)
|
|
||||||
missing module named android_mixer - imported by kivy.core.audio.audio_pygame (conditional, optional)
|
missing module named android_mixer - imported by kivy.core.audio.audio_pygame (conditional, optional)
|
||||||
missing module named 'android.mixer' - imported by kivy.core.audio.audio_pygame (conditional, optional)
|
missing module named 'android.mixer' - imported by kivy.core.audio.audio_pygame (conditional, optional)
|
||||||
|
missing module named 'android.runnable' - imported by kivy.core.clipboard.clipboard_android (top-level)
|
||||||
|
missing module named roman - imported by docutils.writers.latex2e (optional), docutils.writers.manpage (optional)
|
||||||
|
missing module named gi - imported by kivy.core.camera.camera_gi (top-level), kivy.core.clipboard.clipboard_gtk3 (top-level)
|
||||||
|
missing module named ConfigParser - imported by kivy.config (optional)
|
||||||
missing module named usercustomize - imported by site (delayed, optional)
|
missing module named usercustomize - imported by site (delayed, optional)
|
||||||
missing module named sitecustomize - imported by site (delayed, optional)
|
missing module named sitecustomize - imported by site (delayed, optional)
|
||||||
missing module named readline - imported by site (delayed, optional), rlcompleter (optional)
|
missing module named Queue - imported by kivy.compat (optional)
|
||||||
missing module named vms_lib - imported by platform (delayed, optional)
|
|
||||||
missing module named java - imported by platform (delayed)
|
|
||||||
missing module named android - imported by kivy.metrics (delayed, conditional), kivy.core.window (delayed, conditional), kivy.base (delayed, optional), kivy.input.providers.androidjoystick (optional), kivy.app (delayed, conditional), kivy.core.clipboard.clipboard_android (top-level), kivy.core.window.window_pygame (conditional, optional), kivy.support (delayed, optional), kivy.core.audio.audio_android (top-level), kivy.core.window.window_sdl2 (delayed, conditional)
|
|
||||||
missing module named ios - imported by kivy.metrics (delayed, conditional), kivy.core.window (delayed)
|
missing module named ios - imported by kivy.metrics (delayed, conditional), kivy.core.window (delayed)
|
||||||
missing module named ConfigParser - imported by kivy.config (optional)
|
|
||||||
missing module named trio - imported by kivy.clock (delayed, conditional)
|
missing module named trio - imported by kivy.clock (delayed, conditional)
|
||||||
|
|
17608
build/app/xref-app.html
17608
build/app/xref-app.html
File diff suppressed because it is too large
Load Diff
Binary file not shown.
|
@ -0,0 +1,201 @@
|
||||||
|
import pythoncom
|
||||||
|
from win32com.client import Dispatch, gencache
|
||||||
|
import os
|
||||||
|
from collections import defaultdict
|
||||||
|
|
||||||
|
def export_opened_to_raster():
|
||||||
|
"""
|
||||||
|
Функция для экспорта открытых документов КОМПАС в DXF и PDF
|
||||||
|
Возвращает строку с подробной статистикой выполнения
|
||||||
|
"""
|
||||||
|
result = []
|
||||||
|
stats = {
|
||||||
|
'total_docs': 0,
|
||||||
|
'processed_docs': 0,
|
||||||
|
'dxf_created': 0,
|
||||||
|
'errors': 0,
|
||||||
|
'created_files': defaultdict(list),
|
||||||
|
'pdf_created': False,
|
||||||
|
'pdf_path': None
|
||||||
|
}
|
||||||
|
|
||||||
|
try:
|
||||||
|
# Инициализация API КОМПАС
|
||||||
|
api5_module = gencache.EnsureModule("{0422828C-F174-495E-AC5D-D31014DBBE87}", 0, 1, 0)
|
||||||
|
api5_api = api5_module.KompasObject(
|
||||||
|
Dispatch("Kompas.Application.5")._oleobj_.QueryInterface(
|
||||||
|
api5_module.KompasObject.CLSID, pythoncom.IID_IDispatch
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
module = gencache.EnsureModule("{69AC2981-37C0-4379-84FD-5DD2F3C0A520}", 0, 1, 0)
|
||||||
|
api = module.IKompasAPIObject(
|
||||||
|
Dispatch("Kompas.Application.7")._oleobj_.QueryInterface(
|
||||||
|
module.IKompasAPIObject.CLSID, pythoncom.IID_IDispatch
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
k_constants = gencache.EnsureModule(
|
||||||
|
"{75C9F5D0-B5B8-4526-8681-9903C567D2ED}", 0, 1, 0
|
||||||
|
).constants
|
||||||
|
|
||||||
|
application = module.IApplication(api)
|
||||||
|
application.Visible = True
|
||||||
|
|
||||||
|
first_doc_name = None
|
||||||
|
stats['total_docs'] = application.Documents.Count
|
||||||
|
if stats['total_docs'] == 0:
|
||||||
|
return "[ОШИБКА] В КОМПАС не открыто ни одного документа."
|
||||||
|
|
||||||
|
result.append(f"Найдено документов: {stats['total_docs']}")
|
||||||
|
result.append("Начинаем обработку...\n")
|
||||||
|
|
||||||
|
# Сбор информации о документах
|
||||||
|
docs_info = []
|
||||||
|
for i in range(application.Documents.Count):
|
||||||
|
try:
|
||||||
|
doc = application.Documents.Open(i)
|
||||||
|
doc_type = doc.DocumentType
|
||||||
|
|
||||||
|
if doc_type in [
|
||||||
|
k_constants.ksDocumentDrawing,
|
||||||
|
k_constants.ksDocumentFragment,
|
||||||
|
k_constants.ksDocumentSpecification,
|
||||||
|
]:
|
||||||
|
doc.Active = True # Активируем документ
|
||||||
|
doc_path = doc.Path
|
||||||
|
doc_name = "-".join(doc.Name.split(".")[:-1])
|
||||||
|
stats['processed_docs'] += 1
|
||||||
|
|
||||||
|
doc_api5 = api5_api.ActiveDocument2D()
|
||||||
|
doc_api7 = module.IKompasDocument(doc)
|
||||||
|
|
||||||
|
if not docs_info:
|
||||||
|
try:
|
||||||
|
first_doc_name = (
|
||||||
|
doc_api7.LayoutSheets.ItemByNumber(1).Stamp.Text(2).Str
|
||||||
|
)
|
||||||
|
except:
|
||||||
|
first_doc_name = "combined_documents"
|
||||||
|
|
||||||
|
docs_info.append({
|
||||||
|
'doc_api5': doc_api5,
|
||||||
|
'doc_api7': doc_api7,
|
||||||
|
'doc_path': doc_path,
|
||||||
|
'doc_name': doc_name,
|
||||||
|
'doc_type': doc_type
|
||||||
|
})
|
||||||
|
|
||||||
|
result.append(f"Документ #{stats['processed_docs']}: {doc_name}")
|
||||||
|
|
||||||
|
except Exception as e:
|
||||||
|
stats['errors'] += 1
|
||||||
|
result.append(f"[ОШИБКА] Документ #{i+1}: {str(e)}")
|
||||||
|
|
||||||
|
# Экспорт в DXF
|
||||||
|
for doc_info in docs_info:
|
||||||
|
try:
|
||||||
|
dxf_dir = os.path.join(doc_info['doc_path'], "dxf")
|
||||||
|
if not os.path.exists(dxf_dir):
|
||||||
|
os.makedirs(dxf_dir)
|
||||||
|
stats['created_files']['dxf_dirs'].append(dxf_dir)
|
||||||
|
|
||||||
|
dxf_path = os.path.join(dxf_dir, f"{doc_info['doc_name']}.dxf")
|
||||||
|
doc_info['doc_api5'].ksSaveToDXF(dxf_path)
|
||||||
|
stats['dxf_created'] += 1
|
||||||
|
stats['created_files']['dxf_files'].append(dxf_path)
|
||||||
|
result.append(f"Создан DXF: {dxf_path}")
|
||||||
|
|
||||||
|
except Exception as e:
|
||||||
|
stats['errors'] += 1
|
||||||
|
result.append(f"[ОШИБКА] При сохранении DXF {doc_info['doc_name']}: {str(e)}")
|
||||||
|
|
||||||
|
# Создание PDF
|
||||||
|
if docs_info and first_doc_name:
|
||||||
|
try:
|
||||||
|
pdf_dir = os.path.join(docs_info[0]['doc_path'], "pdf")
|
||||||
|
if not os.path.exists(pdf_dir):
|
||||||
|
os.makedirs(pdf_dir)
|
||||||
|
stats['created_files']['pdf_dirs'].append(pdf_dir)
|
||||||
|
|
||||||
|
pdf_filename = f"{first_doc_name}_vector.pdf"
|
||||||
|
pdf_output_path = os.path.join(pdf_dir, pdf_filename)
|
||||||
|
|
||||||
|
# Сохраняем каждый документ в PDF
|
||||||
|
temp_pdfs = []
|
||||||
|
for doc_info in docs_info:
|
||||||
|
doc_pdf_path = os.path.join(pdf_dir, f"{doc_info['doc_name']}_temp.pdf")
|
||||||
|
|
||||||
|
try:
|
||||||
|
# Активируем документ перед сохранением
|
||||||
|
doc_info['doc_api7'].Active = True
|
||||||
|
|
||||||
|
# Попытка сохранить документ в PDF через SaveAs
|
||||||
|
doc_info['doc_api7'].SaveAs(doc_pdf_path)
|
||||||
|
temp_pdfs.append(doc_pdf_path)
|
||||||
|
# Убираем сообщение о создании PDF
|
||||||
|
# result.append(f"Создан PDF: {doc_pdf_path}")
|
||||||
|
except Exception as e:
|
||||||
|
# Если SaveAs не поддерживает PDF, используем альтернативный метод
|
||||||
|
dxf_path = os.path.join(doc_info['doc_path'], "dxf", f"{doc_info['doc_name']}.dxf")
|
||||||
|
convert_dxf_to_pdf(dxf_path, doc_pdf_path)
|
||||||
|
temp_pdfs.append(doc_pdf_path)
|
||||||
|
# Убираем сообщение о преобразовании DXF в PDF
|
||||||
|
# result.append(f"Преобразован DXF в PDF: {doc_pdf_path}")
|
||||||
|
|
||||||
|
# Объединяем все PDF в один файл
|
||||||
|
merge_pdfs(temp_pdfs, pdf_output_path)
|
||||||
|
|
||||||
|
# Удаляем временные PDF
|
||||||
|
for temp_pdf in temp_pdfs:
|
||||||
|
os.remove(temp_pdf)
|
||||||
|
# Убираем сообщение об удалении временного PDF
|
||||||
|
# result.append(f"Удален временный PDF: {temp_pdf}")
|
||||||
|
|
||||||
|
stats['pdf_created'] = True
|
||||||
|
stats['pdf_path'] = pdf_output_path
|
||||||
|
stats['created_files']['pdf_files'].append(pdf_output_path)
|
||||||
|
result.append(f"Создан векторный PDF: {pdf_output_path}")
|
||||||
|
|
||||||
|
except Exception as e:
|
||||||
|
stats['errors'] += 1
|
||||||
|
result.append(f"[ОШИБКА] При создании PDF: {str(e)}")
|
||||||
|
|
||||||
|
# Формируем итоговый отчёт
|
||||||
|
result.append("\n=== РЕЗУЛЬТАТЫ ===")
|
||||||
|
result.append(f"Обработано документов: {stats['processed_docs']}/{stats['total_docs']}")
|
||||||
|
result.append(f"Создано DXF-файлов: {stats['dxf_created']}")
|
||||||
|
result.append(f"PDF создан: {'Да' if stats['pdf_created'] else 'Нет'}")
|
||||||
|
result.append(f"Ошибок: {stats['errors']}\n")
|
||||||
|
|
||||||
|
# if stats['pdf_created']:
|
||||||
|
# result.append(f"PDF сохранён: {stats['pdf_path']}\n")
|
||||||
|
|
||||||
|
# Выводим список созданных файлов
|
||||||
|
# result.append("Созданные файлы и папки:")
|
||||||
|
# for file_type, files in stats['created_files'].items():
|
||||||
|
# if files:
|
||||||
|
# result.append(f"\n{file_type.replace('_', ' ').title()}:")
|
||||||
|
# for f in files:
|
||||||
|
# result.append(f" • {f}")
|
||||||
|
|
||||||
|
except Exception as e:
|
||||||
|
result.append(f"\n[КРИТИЧЕСКАЯ ОШИБКА] {str(e)}")
|
||||||
|
|
||||||
|
return "\n".join(result)
|
||||||
|
|
||||||
|
|
||||||
|
def merge_pdfs(paths, output_path):
|
||||||
|
"""Объединяет несколько PDF в один."""
|
||||||
|
from PyPDF2 import PdfMerger
|
||||||
|
merger = PdfMerger()
|
||||||
|
for path in paths:
|
||||||
|
merger.append(path)
|
||||||
|
merger.write(output_path)
|
||||||
|
merger.close()
|
||||||
|
|
||||||
|
|
||||||
|
def convert_dxf_to_pdf(dxf_path, pdf_path):
|
||||||
|
"""Преобразует DXF в PDF."""
|
||||||
|
from dxf2pdf import convert
|
||||||
|
convert(dxf_path, pdf_path)
|
|
@ -0,0 +1,153 @@
|
||||||
|
# pip install pywin32
|
||||||
|
import pythoncom
|
||||||
|
from win32com.client import Dispatch, gencache
|
||||||
|
import os
|
||||||
|
|
||||||
|
def get_all_sheets():
|
||||||
|
try:
|
||||||
|
# Получаем API интерфейсов версии 5
|
||||||
|
api5_module = gencache.EnsureModule("{0422828C-F174-495E-AC5D-D31014DBBE87}", 0, 1, 0)
|
||||||
|
api5_api = api5_module.KompasObject(
|
||||||
|
Dispatch("Kompas.Application.5")._oleobj_.QueryInterface(api5_module.KompasObject.CLSID, pythoncom.IID_IDispatch)
|
||||||
|
)
|
||||||
|
|
||||||
|
module = gencache.EnsureModule("{69AC2981-37C0-4379-84FD-5DD2F3C0A520}", 0, 1, 0)
|
||||||
|
api = module.IKompasAPIObject(
|
||||||
|
Dispatch("Kompas.Application.7")._oleobj_.QueryInterface(module.IKompasAPIObject.CLSID, pythoncom.IID_IDispatch)
|
||||||
|
)
|
||||||
|
|
||||||
|
application = module.IApplication(api)
|
||||||
|
|
||||||
|
application.Visible = True
|
||||||
|
result = []
|
||||||
|
|
||||||
|
for i in range(application.Documents.Count):
|
||||||
|
try:
|
||||||
|
doc = application.Documents.Open(i)
|
||||||
|
doc_type = doc.DocumentType
|
||||||
|
if doc_type not in [4, 5]: # 4 — чертеж, 5 — сборка
|
||||||
|
continue
|
||||||
|
|
||||||
|
doc.Active = True
|
||||||
|
doc_path = doc.Path
|
||||||
|
doc_name = '-'.join(doc.Name.split('.')[:-1])
|
||||||
|
|
||||||
|
# Добавляем заголовок документа
|
||||||
|
result.append(f"{'=' * 80}")
|
||||||
|
result.append(f"Анализ документа: {doc_name}")
|
||||||
|
result.append(f"Тип: {'Чертеж' if doc_type == 4 else 'Сборка'}")
|
||||||
|
result.append(f"Путь: {doc_path}")
|
||||||
|
result.append(f"{'=' * 80}")
|
||||||
|
|
||||||
|
doc_3d = module.IKompasDocument3D(doc)
|
||||||
|
top_part = doc_3d.TopPart
|
||||||
|
elements = []
|
||||||
|
bends = []
|
||||||
|
welding = []
|
||||||
|
|
||||||
|
def look_features(element):
|
||||||
|
feature = module.IFeature7(element)
|
||||||
|
sub_features = feature.SubFeatures(1, True, False) or []
|
||||||
|
for item in sub_features:
|
||||||
|
if type(item) in (module.ISheetMetalBend, module.ISheetMetalLineBend, module.ISheetMetalBody):
|
||||||
|
sub_sheets = item.Owner.SubFeatures(1, True, False)
|
||||||
|
if sub_sheets:
|
||||||
|
for b in sub_sheets:
|
||||||
|
bend = module.ISheetMetalBend(b)
|
||||||
|
bends.append(bend)
|
||||||
|
|
||||||
|
def look_drawing(part):
|
||||||
|
drawing_context = module.IDrawingContainer(part)
|
||||||
|
macro = module.IMacroObject3D(drawing_context)
|
||||||
|
sub_features = macro.Owner.SubFeatures(1, True, False) or []
|
||||||
|
for item in sub_features:
|
||||||
|
if type(item) in (module.IUserDesignationCompObj,):
|
||||||
|
welding.append(item)
|
||||||
|
|
||||||
|
def find_elements(part):
|
||||||
|
try:
|
||||||
|
drawing_context = module.IDrawingContainer(part)
|
||||||
|
macro = module.IMacroObject3D(drawing_context)
|
||||||
|
sub_features = macro.Owner.SubFeatures(1, True, False) or []
|
||||||
|
for item in sub_features:
|
||||||
|
if type(item) in (module.IUserDesignationCompObj,):
|
||||||
|
welding.append(item)
|
||||||
|
except Exception as e:
|
||||||
|
result.append("Ошибка в DrawingContext")
|
||||||
|
|
||||||
|
try:
|
||||||
|
doc_parts = module.IParts7(part.Parts)
|
||||||
|
for i in range(doc_parts.Count):
|
||||||
|
element = doc_parts.Part(i)
|
||||||
|
if element.Parts.Count == 0:
|
||||||
|
elements.append(element)
|
||||||
|
look_features(element)
|
||||||
|
find_elements(element)
|
||||||
|
except Exception as e:
|
||||||
|
result.append("Ошибка в Parts")
|
||||||
|
|
||||||
|
if doc_type == 5:
|
||||||
|
find_elements(top_part)
|
||||||
|
else:
|
||||||
|
elements.append(top_part)
|
||||||
|
look_drawing(top_part)
|
||||||
|
look_features(top_part)
|
||||||
|
|
||||||
|
result.append(f"\nНайдено:\n Элементов: {len(elements)}\n Гибов: {len(bends)}\n")
|
||||||
|
|
||||||
|
sorted_data = {
|
||||||
|
"Элементы": {},
|
||||||
|
"Материалы": {},
|
||||||
|
"Площади": {},
|
||||||
|
"Сварные соединения": {}
|
||||||
|
}
|
||||||
|
|
||||||
|
for e in elements:
|
||||||
|
# Элементы
|
||||||
|
name = f"{getattr(e, 'Name', 'Неизвестное имя')}, масса {round(getattr(e, 'Mass', 0), 3)} кг"
|
||||||
|
sorted_data["Элементы"][name] = sorted_data["Элементы"].get(name, 0) + 1
|
||||||
|
|
||||||
|
# Материалы
|
||||||
|
material = getattr(e, 'Material', "Неизвестный материал")
|
||||||
|
sorted_data["Материалы"][material] = sorted_data["Материалы"].get(material, 0) + 1
|
||||||
|
|
||||||
|
# Площади
|
||||||
|
try:
|
||||||
|
mass_inertial_params = module.IMassInertiaParam7(e)
|
||||||
|
area = round(mass_inertial_params.Area * 0.0001, 6) # Перевод в м²
|
||||||
|
area_key = f"площадь {material}, м²:"
|
||||||
|
sorted_data["Площади"][area_key] = sorted_data["Площади"].get(area_key, 0) + area
|
||||||
|
except Exception as e:
|
||||||
|
result.append(f"Ошибка при вычислении площади: {e}")
|
||||||
|
|
||||||
|
sorted_data["Площади"]["Общая площадь"] = sum(sorted_data["Площади"].values())
|
||||||
|
|
||||||
|
# Сварные соединения
|
||||||
|
if welding:
|
||||||
|
for w in welding:
|
||||||
|
w_name = w.Name
|
||||||
|
w_len = w_name.split("-")[-1].split("@")[0]
|
||||||
|
sorted_data["Сварные соединения"][w_name] = w_len
|
||||||
|
|
||||||
|
total_welding = sum(float(w_len) for w_len in sorted_data["Сварные соединения"].values() if isinstance(w_len, str) and w_len.isdigit())
|
||||||
|
sorted_data["Сварные соединения"]["Общая длина"] = round(total_welding, 2)
|
||||||
|
else:
|
||||||
|
sorted_data.pop("Сварные соединения", None) # Удаляем раздел, если данных нет
|
||||||
|
|
||||||
|
# Вывод результатов
|
||||||
|
for section, data in sorted_data.items():
|
||||||
|
if not data: # Пропускаем пустые разделы
|
||||||
|
continue
|
||||||
|
|
||||||
|
result.append(f"\n{section}:")
|
||||||
|
for key, value in data.items():
|
||||||
|
result.append(f" {key}: {value}")
|
||||||
|
result.append("") # Пустая строка для разделения
|
||||||
|
|
||||||
|
except Exception as e:
|
||||||
|
result.append(f"Ошибка при обработке документа {i}: {e}")
|
||||||
|
|
||||||
|
return "\n".join(result)
|
||||||
|
|
||||||
|
except Exception as e:
|
||||||
|
return f"Произошла ошибка: {e}"
|
|
@ -0,0 +1,51 @@
|
||||||
|
import pythoncom
|
||||||
|
from win32com.client import Dispatch, gencache
|
||||||
|
|
||||||
|
def get_opened_files():
|
||||||
|
"""
|
||||||
|
Функция для получения списка открытых файлов в КОМПАС-3D
|
||||||
|
Возвращает форматированную строку с информацией о файлах
|
||||||
|
"""
|
||||||
|
try:
|
||||||
|
pythoncom.CoInitialize()
|
||||||
|
|
||||||
|
# Подключаемся к API КОМПАС
|
||||||
|
kompas_module = gencache.EnsureModule("{69AC2981-37C0-4379-84FD-5DD2F3C0A520}", 0, 1, 0)
|
||||||
|
kompas_api = kompas_module.IKompasAPIObject(
|
||||||
|
Dispatch("Kompas.Application.7")._oleobj_.QueryInterface(
|
||||||
|
kompas_module.IKompasAPIObject.CLSID, pythoncom.IID_IDispatch
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
application = kompas_module.IApplication(kompas_api)
|
||||||
|
k_constants = gencache.EnsureModule(
|
||||||
|
"{75C9F5D0-B5B8-4526-8681-9903C567D2ED}", 0, 1, 0
|
||||||
|
).constants
|
||||||
|
|
||||||
|
result = []
|
||||||
|
result.append("[b]Открытые файлы в КОМПАС:[/b]\n")
|
||||||
|
|
||||||
|
for i in range(application.Documents.Count):
|
||||||
|
doc = application.Documents.Open(i)
|
||||||
|
doc_type = "Неизвестный тип"
|
||||||
|
|
||||||
|
if doc.DocumentType == k_constants.ksDocumentDrawing:
|
||||||
|
doc_type = "Чертеж"
|
||||||
|
elif doc.DocumentType == k_constants.ksDocumentPart:
|
||||||
|
doc_type = "Деталь"
|
||||||
|
elif doc.DocumentType == k_constants.ksDocumentAssembly:
|
||||||
|
doc_type = "Сборка"
|
||||||
|
elif doc.DocumentType == k_constants.ksDocumentFragment:
|
||||||
|
doc_type = "Фрагмент"
|
||||||
|
elif doc.DocumentType == k_constants.ksDocumentSpecification:
|
||||||
|
doc_type = "Спецификация"
|
||||||
|
|
||||||
|
result.append(f"{i+1}. [b]{doc.Name}[/b] ({doc_type})")
|
||||||
|
result.append(f" Путь: {doc.Path}\n")
|
||||||
|
|
||||||
|
return "\n".join(result)
|
||||||
|
|
||||||
|
except Exception as e:
|
||||||
|
return f"[color=ff3333]Ошибка при получении списка файлов: {str(e)}[/color]"
|
||||||
|
finally:
|
||||||
|
pythoncom.CoUninitialize()
|
|
@ -0,0 +1,167 @@
|
||||||
|
import pythoncom
|
||||||
|
from win32com.client import Dispatch, gencache
|
||||||
|
import os
|
||||||
|
|
||||||
|
def project_support():
|
||||||
|
"""
|
||||||
|
Функция для поддержки проектов: создание чертежей и спецификаций.
|
||||||
|
Возвращает строку с краткой информацией о выполнении.
|
||||||
|
"""
|
||||||
|
result = []
|
||||||
|
stats = {
|
||||||
|
'total_docs': 0,
|
||||||
|
'processed_docs': 0,
|
||||||
|
'drawings_created': 0,
|
||||||
|
'specs_created': 0,
|
||||||
|
'errors': 0,
|
||||||
|
'created_files': []
|
||||||
|
}
|
||||||
|
|
||||||
|
try:
|
||||||
|
# Получаем API интерфейсов версии 5
|
||||||
|
api5_module = gencache.EnsureModule("{0422828C-F174-495E-AC5D-D31014DBBE87}", 0, 1, 0)
|
||||||
|
api5_api = api5_module.KompasObject(
|
||||||
|
Dispatch("Kompas.Application.5")._oleobj_.QueryInterface(
|
||||||
|
api5_module.KompasObject.CLSID, pythoncom.IID_IDispatch
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
module = gencache.EnsureModule("{69AC2981-37C0-4379-84FD-5DD2F3C0A520}", 0, 1, 0)
|
||||||
|
api = module.IKompasAPIObject(
|
||||||
|
Dispatch("Kompas.Application.7")._oleobj_.QueryInterface(
|
||||||
|
module.IKompasAPIObject.CLSID, pythoncom.IID_IDispatch
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
k_constants = gencache.EnsureModule(
|
||||||
|
"{75C9F5D0-B5B8-4526-8681-9903C567D2ED}", 0, 1, 0
|
||||||
|
).constants
|
||||||
|
|
||||||
|
application = module.IApplication(api)
|
||||||
|
saving_path = '../cdw/'
|
||||||
|
application.Visible = True
|
||||||
|
|
||||||
|
stats['total_docs'] = application.Documents.Count
|
||||||
|
result.append(f"Найдено документов: {stats['total_docs']}")
|
||||||
|
|
||||||
|
for i in range(application.Documents.Count):
|
||||||
|
try:
|
||||||
|
doc = application.Documents.Item(i) # Получаем документ по индексу
|
||||||
|
doc_type = doc.DocumentType
|
||||||
|
|
||||||
|
# Активируем документ через application.ActiveDocument
|
||||||
|
application.ActiveDocument = doc
|
||||||
|
doc_path = doc.Path
|
||||||
|
doc_name = '-'.join(doc.Name.split('.')[:-1])
|
||||||
|
stats['processed_docs'] += 1
|
||||||
|
|
||||||
|
# Логируем тип документа
|
||||||
|
result.append(f"Обработка документа #{i + 1}: {doc_name}")
|
||||||
|
if doc_type == k_constants.ksDocumentAssembly:
|
||||||
|
result.append(f"Документ является сборкой: {doc_name}")
|
||||||
|
elif doc_type == k_constants.ksDocumentPart:
|
||||||
|
result.append(f"Документ является деталью: {doc_name}")
|
||||||
|
else:
|
||||||
|
result.append(f"[ПРЕДУПРЕЖДЕНИЕ] Неизвестный тип документа: {doc_type}")
|
||||||
|
continue
|
||||||
|
|
||||||
|
# Получаем 3D-документ
|
||||||
|
doc_3d = module.IKompasDocument3D(doc)
|
||||||
|
doc_components = []
|
||||||
|
|
||||||
|
def extract_parts(part):
|
||||||
|
"""Рекурсивно извлекает все детали из сборки."""
|
||||||
|
parts = module.IParts7(part.Parts)
|
||||||
|
for j in range(parts.Count):
|
||||||
|
element = parts.Part(j)
|
||||||
|
if element.Parts.Count == 0 and not element.Standard:
|
||||||
|
if not any(el.Name == element.Name for el in doc_components):
|
||||||
|
doc_components.append(element)
|
||||||
|
else:
|
||||||
|
extract_parts(element)
|
||||||
|
|
||||||
|
if doc_type == k_constants.ksDocumentAssembly:
|
||||||
|
extract_parts(doc_3d.TopPart)
|
||||||
|
elif doc_type == k_constants.ksDocumentPart:
|
||||||
|
doc_components.append(doc_3d.TopPart)
|
||||||
|
|
||||||
|
# Обработка каждой детали
|
||||||
|
for component in doc_components:
|
||||||
|
component_ipart = module.IPart7(component)
|
||||||
|
if component_ipart.Standard:
|
||||||
|
continue
|
||||||
|
|
||||||
|
c_doc = application.Documents.Add(k_constants.ksDocumentDrawing)
|
||||||
|
c_layout = c_doc.LayoutSheets
|
||||||
|
c_sheet = c_layout.Item(0)
|
||||||
|
c_sheet.Format.Format = k_constants.ksFormatA3
|
||||||
|
c_sheet.Format.VerticalOrientation = False
|
||||||
|
c_sheet.Update()
|
||||||
|
|
||||||
|
c_size = [1, 1, 1]
|
||||||
|
if hasattr(component_ipart.Owner, 'ResultBodies') and component_ipart.Owner.ResultBodies is not None:
|
||||||
|
gabarit = [0, 0, 0, 0, 0, 0]
|
||||||
|
gabarit = component_ipart.Owner.ResultBodies.GetGabarit(*gabarit)
|
||||||
|
g1 = gabarit[1:4]
|
||||||
|
g2 = gabarit[4:]
|
||||||
|
c_size = [abs(g1[i] - g2[i]) for i in range(len(g1))]
|
||||||
|
|
||||||
|
c_filename = component_ipart.FileName
|
||||||
|
c_name = component_ipart.Name
|
||||||
|
c_doc_2d = module.IKompasDocument2D(c_doc)
|
||||||
|
c_views = c_doc_2d.ViewsAndLayersManager.Views
|
||||||
|
c_scale = c_sheet.Format.FormatHeight / sum(c_size)
|
||||||
|
|
||||||
|
try:
|
||||||
|
c_views.AddStandartViews(
|
||||||
|
c_filename,
|
||||||
|
c_name,
|
||||||
|
[1, 3, 5, 7],
|
||||||
|
float(c_size[1] * c_scale),
|
||||||
|
float(c_sheet.Format.FormatHeight - 25),
|
||||||
|
float(c_scale),
|
||||||
|
20, 20
|
||||||
|
)
|
||||||
|
except Exception as e:
|
||||||
|
stats['errors'] += 1
|
||||||
|
result.append(f"[ОШИБКА] Не удалось добавить виды для компонента {component.Name}: {str(e)}")
|
||||||
|
continue
|
||||||
|
|
||||||
|
if not os.path.exists(f"{doc_path}{saving_path}"):
|
||||||
|
os.makedirs(f"{doc_path}{saving_path}")
|
||||||
|
filename = '_'.join(filter(None, [component_ipart.Marking, c_name[:20]])).replace(' ', '-')
|
||||||
|
save_path = f"{doc_path}{saving_path}{filename}_{i}.cdw"
|
||||||
|
c_doc.SaveAs(save_path)
|
||||||
|
stats['drawings_created'] += 1
|
||||||
|
stats['created_files'].append(save_path)
|
||||||
|
|
||||||
|
if doc_type == k_constants.ksDocumentAssembly:
|
||||||
|
spec = application.Documents.Add(k_constants.ksDocumentSpecification)
|
||||||
|
spec_doc = module.ISpecificationDocument(spec)
|
||||||
|
spec_doc.AttachedDocuments.Add(doc.PathName, True)
|
||||||
|
spec_filename = f"Список_деталей_{i}"
|
||||||
|
spec_save_path = f"{doc_path}{saving_path}{spec_filename}.spw"
|
||||||
|
spec.SaveAs(spec_save_path)
|
||||||
|
stats['specs_created'] += 1
|
||||||
|
stats['created_files'].append(spec_save_path)
|
||||||
|
|
||||||
|
except Exception as e:
|
||||||
|
stats['errors'] += 1
|
||||||
|
result.append(f"[ОШИБКА] Документ #{i + 1}: {str(e)}")
|
||||||
|
|
||||||
|
# Формируем итоговый отчёт
|
||||||
|
result.append("\n=== РЕЗУЛЬТАТЫ ===")
|
||||||
|
result.append(f"Обработано документов: {stats['processed_docs']}/{stats['total_docs']}")
|
||||||
|
result.append(f"Создано чертежей: {stats['drawings_created']}")
|
||||||
|
result.append(f"Создано спецификаций: {stats['specs_created']}")
|
||||||
|
result.append(f"Ошибок: {stats['errors']}")
|
||||||
|
|
||||||
|
if stats['created_files']:
|
||||||
|
result.append("\nСозданные файлы:")
|
||||||
|
for file in stats['created_files']:
|
||||||
|
result.append(f" • {file}")
|
||||||
|
|
||||||
|
except Exception as e:
|
||||||
|
result.append(f"\n[КРИТИЧЕСКАЯ ОШИБКА]: {str(e)}")
|
||||||
|
|
||||||
|
return "\n".join(result)
|
|
@ -0,0 +1,86 @@
|
||||||
|
# pip install pywin32
|
||||||
|
import pythoncom
|
||||||
|
from win32com.client import Dispatch, gencache
|
||||||
|
import os
|
||||||
|
import sys
|
||||||
|
|
||||||
|
def save_opened_to_iges():
|
||||||
|
try:
|
||||||
|
# Инициализация COM системы
|
||||||
|
pythoncom.CoInitialize()
|
||||||
|
|
||||||
|
# Получаем API интерфейсы
|
||||||
|
api5_module = gencache.EnsureModule("{0422828C-F174-495E-AC5D-D31014DBBE87}", 0, 1, 0)
|
||||||
|
if api5_module is None:
|
||||||
|
raise Exception("Не удалось загрузить API Kompas 5")
|
||||||
|
|
||||||
|
api5_api = api5_module.KompasObject(
|
||||||
|
Dispatch("Kompas.Application.5")._oleobj_.QueryInterface(
|
||||||
|
api5_module.KompasObject.CLSID, pythoncom.IID_IDispatch
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
module = gencache.EnsureModule("{69AC2981-37C0-4379-84FD-5DD2F3C0A520}", 0, 1, 0)
|
||||||
|
if module is None:
|
||||||
|
raise Exception("Не удалось загрузить API Kompas 7")
|
||||||
|
|
||||||
|
api = module.IKompasAPIObject(
|
||||||
|
Dispatch("Kompas.Application.7")._oleobj_.QueryInterface(
|
||||||
|
module.IKompasAPIObject.CLSID, pythoncom.IID_IDispatch
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
k_constants = gencache.EnsureModule(
|
||||||
|
"{75C9F5D0-B5B8-4526-8681-9903C567D2ED}", 0, 1, 0
|
||||||
|
).constants
|
||||||
|
|
||||||
|
application = module.IApplication(api)
|
||||||
|
application.Visible = True
|
||||||
|
|
||||||
|
result = []
|
||||||
|
ext = "igs"
|
||||||
|
saved_files = 0
|
||||||
|
|
||||||
|
for i in range(application.Documents.Count):
|
||||||
|
try:
|
||||||
|
doc = application.Documents.Open(i)
|
||||||
|
doc_type = doc.DocumentType
|
||||||
|
if doc_type in [k_constants.ksDocumentPart, k_constants.ksDocumentAssembly]:
|
||||||
|
doc.Active = True
|
||||||
|
doc_path = doc.Path
|
||||||
|
doc_name = os.path.splitext(doc.Name)[0]
|
||||||
|
|
||||||
|
save_path = os.path.join(doc_path, ext)
|
||||||
|
os.makedirs(save_path, exist_ok=True)
|
||||||
|
|
||||||
|
filename = f"{doc_name}.{ext}"
|
||||||
|
full_path = os.path.normpath(os.path.join(save_path, filename))
|
||||||
|
|
||||||
|
doc_3d = module.IKompasDocument3D(doc)
|
||||||
|
doc_api5 = api5_api.ActiveDocument3D()
|
||||||
|
|
||||||
|
save_params = doc_api5.AdditionFormatParam()
|
||||||
|
save_params.Init()
|
||||||
|
save_params.format = k_constants.ksConverterToIGES
|
||||||
|
|
||||||
|
doc_api5.SaveAsToAdditionFormat(full_path, save_params)
|
||||||
|
saved_files += 1
|
||||||
|
result.append(f"Путь: {full_path}")
|
||||||
|
|
||||||
|
except Exception as e:
|
||||||
|
result.append(f"Ошибка при обработке документа {i} ({doc.Name}): {str(e)}")
|
||||||
|
|
||||||
|
if saved_files > 0:
|
||||||
|
result.insert(0, f"Успешно сохранено файлов: {saved_files}")
|
||||||
|
else:
|
||||||
|
result.append("Не найдено подходящих документов для сохранения")
|
||||||
|
|
||||||
|
return "\n".join(result)
|
||||||
|
|
||||||
|
except Exception as e:
|
||||||
|
return f"Критическая ошибка: {str(e)}"
|
||||||
|
finally:
|
||||||
|
pythoncom.CoUninitialize()
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
print(save_opened_to_iges())
|
Loading…
Reference in New Issue