phg-vis 1.1.4__tar.gz → 1.1.7__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: phg_vis
3
- Version: 1.1.4
3
+ Version: 1.1.7
4
4
  Summary: A package for the PHG modeling language and 3D visualization tool.
5
5
  Home-page: https://github.com/panguojun/Coordinate-System
6
6
  Author: romeosoft
@@ -0,0 +1,4 @@
1
+ # phg/__init__.py
2
+ from .visphg import vis, image
3
+
4
+ __all__ = ['vis', 'image']
Binary file
Binary file
@@ -1,4 +1,4 @@
1
- CAMERA=0.000,10.000,18.000;0.000,0.000,0.000;0.000,1.000,0.000;0.724;1.610
1
+ CAMERA=0.000,10.000,18.000;0.000,0.000,0.000;0.000,1.000,0.000;0.724;1.610;0;10.000;0.000,0.000,0.000
2
2
  CONSOLE=true
3
3
  ENABLE_DUAL_SCREEN=false
4
4
  HOSTIP=127.0.0.1
@@ -32,4 +32,21 @@ def HTTPPOST(ip, phg):
32
32
  def vis(phg):
33
33
  if not is_vis_running(): # Check if the process is running
34
34
  subprocess.Popen(vis_exe_path) # Start the process
35
- return HTTPPOST('127.0.0.1', phg.encode())
35
+ return HTTPPOST('127.0.0.1', phg.encode())
36
+
37
+ # Send network message
38
+ def HTTPPOST_IMG(ip, phg):
39
+ headers = {
40
+ "Connection": "keep-alive",
41
+ "Content-Type": "text/plain"
42
+ }
43
+ conn = http.client.HTTPConnection(f"{ip}:5088")
44
+ conn.request('POST', '/phg_img', phg, headers)
45
+ res = conn.getresponse()
46
+ conn.close()
47
+
48
+ # Call HTTPPOST function to send network message
49
+ def image(phg):
50
+ if not is_vis_running(): # Check if the process is running
51
+ subprocess.Popen(vis_exe_path) # Start the process
52
+ return HTTPPOST_IMG('127.0.0.1', phg.encode())
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: phg_vis
3
- Version: 1.1.4
3
+ Version: 1.1.7
4
4
  Summary: A package for the PHG modeling language and 3D visualization tool.
5
5
  Home-page: https://github.com/panguojun/Coordinate-System
6
6
  Author: romeosoft
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
2
2
 
3
3
  setup(
4
4
  name='phg_vis',
5
- version='1.1.4',
5
+ version='1.1.7',
6
6
  packages=find_packages(),
7
7
  include_package_data=True,
8
8
  description='A package for the PHG modeling language and 3D visualization tool.',
@@ -1,4 +0,0 @@
1
- # phg/__init__.py
2
- from .visphg import vis
3
-
4
- __all__ = ['vis']
Binary file
Binary file
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes