RDG-Networks 0.3.11__tar.gz → 0.3.12__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.
Files changed (32) hide show
  1. rdg_networks-0.3.12/PKG-INFO +141 -0
  2. rdg_networks-0.3.12/RDG_Networks.egg-info/PKG-INFO +141 -0
  3. {rdg_networks-0.3.11 → rdg_networks-0.3.12}/RDG_Networks.egg-info/SOURCES.txt +0 -2
  4. rdg_networks-0.3.12/README.md +114 -0
  5. {rdg_networks-0.3.11 → rdg_networks-0.3.12}/setup.py +3 -2
  6. rdg_networks-0.3.11/PKG-INFO +0 -72
  7. rdg_networks-0.3.11/RDG_Networks.egg-info/PKG-INFO +0 -72
  8. rdg_networks-0.3.11/RDG_networks/save_to_json.py +0 -14
  9. rdg_networks-0.3.11/RDG_networks/thickness/generate_line_segments_thickness_correct.py +0 -633
  10. rdg_networks-0.3.11/README.md +0 -47
  11. {rdg_networks-0.3.11 → rdg_networks-0.3.12}/LICENSE.txt +0 -0
  12. {rdg_networks-0.3.11 → rdg_networks-0.3.12}/RDG_Networks.egg-info/dependency_links.txt +0 -0
  13. {rdg_networks-0.3.11 → rdg_networks-0.3.12}/RDG_Networks.egg-info/entry_points.txt +0 -0
  14. {rdg_networks-0.3.11 → rdg_networks-0.3.12}/RDG_Networks.egg-info/requires.txt +0 -0
  15. {rdg_networks-0.3.11 → rdg_networks-0.3.12}/RDG_Networks.egg-info/top_level.txt +0 -0
  16. {rdg_networks-0.3.11 → rdg_networks-0.3.12}/RDG_networks/Classes.py +0 -0
  17. {rdg_networks-0.3.11 → rdg_networks-0.3.12}/RDG_networks/__init__.py +0 -0
  18. {rdg_networks-0.3.11 → rdg_networks-0.3.12}/RDG_networks/draw_segments.py +0 -0
  19. {rdg_networks-0.3.11 → rdg_networks-0.3.12}/RDG_networks/generate_line_network.py +0 -0
  20. {rdg_networks-0.3.11 → rdg_networks-0.3.12}/RDG_networks/generate_line_segments.py +0 -0
  21. {rdg_networks-0.3.11 → rdg_networks-0.3.12}/RDG_networks/generate_line_segments_dynamic.py +0 -0
  22. {rdg_networks-0.3.11 → rdg_networks-0.3.12}/RDG_networks/generate_line_segments_static.py +0 -0
  23. {rdg_networks-0.3.11 → rdg_networks-0.3.12}/RDG_networks/get_intersection_segments.py +0 -0
  24. {rdg_networks-0.3.11 → rdg_networks-0.3.12}/RDG_networks/sample_in_polygon.py +0 -0
  25. {rdg_networks-0.3.11 → rdg_networks-0.3.12}/RDG_networks/save_data.py +0 -0
  26. {rdg_networks-0.3.11 → rdg_networks-0.3.12}/RDG_networks/thickness/Classes.py +0 -0
  27. {rdg_networks-0.3.11 → rdg_networks-0.3.12}/RDG_networks/thickness/__init__.py +0 -0
  28. {rdg_networks-0.3.11 → rdg_networks-0.3.12}/RDG_networks/thickness/generate_line_segments_thickness.py +0 -0
  29. {rdg_networks-0.3.11 → rdg_networks-0.3.12}/RDG_networks/thickness/generate_line_segments_thickness_static.py +0 -0
  30. {rdg_networks-0.3.11 → rdg_networks-0.3.12}/RDG_networks/thickness/orientate_network.py +0 -0
  31. {rdg_networks-0.3.11 → rdg_networks-0.3.12}/RDG_networks/thickness/sample_in_polygon.py +0 -0
  32. {rdg_networks-0.3.11 → rdg_networks-0.3.12}/setup.cfg +0 -0
@@ -0,0 +1,141 @@
1
+ Metadata-Version: 2.2
2
+ Name: RDG-Networks
3
+ Version: 0.3.12
4
+ Summary: RDG Networks project
5
+ Home-page: https://github.com/NiekMooij/RDG_networks
6
+ Author: Niek Mooij
7
+ Author-email: mooij.niek@gmail.com
8
+ License: All Rights Reserved
9
+ Classifier: Programming Language :: Python :: 3
10
+ Classifier: Operating System :: OS Independent
11
+ Description-Content-Type: text/markdown
12
+ License-File: LICENSE.txt
13
+ Requires-Dist: networkx
14
+ Requires-Dist: numpy
15
+ Requires-Dist: scipy
16
+ Requires-Dist: shapely
17
+ Requires-Dist: typing
18
+ Dynamic: author
19
+ Dynamic: author-email
20
+ Dynamic: classifier
21
+ Dynamic: description
22
+ Dynamic: description-content-type
23
+ Dynamic: home-page
24
+ Dynamic: license
25
+ Dynamic: requires-dist
26
+ Dynamic: summary
27
+
28
+ ## Overview
29
+
30
+ This Python package provides code regarding the RDG networks project.
31
+
32
+ [![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://opensource.org/licenses/MIT)
33
+ [![Python Version](https://img.shields.io/badge/python-3.6%2B-blue.svg)](https://www.python.org/downloads/)
34
+
35
+ ## Table of Contents
36
+
37
+ - [Features](#features)
38
+ - [Installation](#installation)
39
+ - [Usage](#usage)
40
+ - [Configuration](#configuration)
41
+ - [License](#license)
42
+ - [Contact](#contact)
43
+
44
+ ## Features
45
+
46
+ ### No thickness
47
+ - **generate_line_segments:** Function that determines the linesegments of a RDG network.
48
+ - **generate_line_network:** Function that makes the underlying network of the linesegments.
49
+ - **get_intersection_segments:** Function that determines the intersection segments of a RDG network.
50
+ - **generate_line_segments_dynamic:** Function that determines the segments of a dynamic RDG network (with increasing linelengths in time).
51
+ - **draw_segments:** Function that draws the segments.
52
+
53
+ ### Thickness
54
+ - **generate_line_segments_thickness:** Generates segment network with thicknesses
55
+ - **orientate_network:** Generates various rotated versions of the initial network.
56
+
57
+ - **save_to_stl:** Saves the network as a stl file.
58
+ - **save_to_json:** Saves data as a json file.
59
+ - **load_from_json:** Loads data as a json file.
60
+
61
+ ## Installation
62
+ You can install the package using pip:
63
+
64
+ ```bash
65
+ pip install RDG-networks
66
+ ```
67
+
68
+ ## Usage
69
+ ### Output
70
+ The main function is called *generate_line_segments_thickness* and outputs the following data:
71
+ ```python
72
+ data_dict = {'segments_dict': segments_dict,
73
+ 'polygon_arr': polygon_arr,
74
+ 'segment_thickness_dict': segment_thickness_dict,
75
+ 'jammed': jammed,
76
+ 'generated_config': generated_config}
77
+ ```
78
+ - *segment_thickness_dict*: contains the generated network, represented by multiple polygons.
79
+ - *segments_dict*: contains auxilliary information of the generated network.
80
+ - *polygon_arr*: contains auxilliary information of the generated network.
81
+ - *jammed*: A boolean indicating if the system is jammed.
82
+ - *generated_config*: An array containing all nucleation points and orientations of the segments.
83
+
84
+ ### Code example
85
+ ```python
86
+ import matplotlib.pyplot as plt
87
+ import numpy as np
88
+ import os
89
+ import sys
90
+ import random
91
+ from RDG_networks.thickness.generate_line_segments_thickness import generate_line_segments_thickness
92
+ from RDG_networks import save_to_stl
93
+ from RDG_networks.save_data import save_to_json, load_from_json
94
+
95
+ size = 15
96
+ lamb0 = 0.2
97
+ alpha = 0.52
98
+ thickness_arr = [lamb0 * t**(-alpha) for t in range(1, size + 1)]
99
+ box_size = 1
100
+ angles = [random.random() * 2 * np.pi for _ in range(size)]
101
+
102
+ # Generate initial structure with specified parameters
103
+ data_dict = generate_line_segments_thickness(size=size, thickness_arr=thickness_arr, angles=angles, box_size=box_size)
104
+
105
+ # Setup plot
106
+ fig, ax1 = plt.subplots(nrows=1, ncols=1, figsize=(5, 5))
107
+
108
+ segment_thickness_dict = data_dict['segment_thickness_dict']
109
+ for key, segment in segment_thickness_dict.items():
110
+ segment.draw(ax1)
111
+ middle_segment = segment.middle_segment
112
+ if middle_segment:
113
+ middle_segment.draw(ax1)
114
+
115
+ # Set plot limits and disable ticks
116
+ ax1.set(xlim=(0, 1), ylim=(0, 1))
117
+ ax1.set_xticks([])
118
+ ax1.set_yticks([])
119
+
120
+ # Save to STL and JSON files
121
+ save_to_stl(segment_thickness_dict, thickness=0.2, name=os.path.join(sys.path[0], 'network.stl'), frame_thickness=0.1)
122
+ file_path = os.path.join(sys.path[0], 'data.json')
123
+ save_to_json(data_dict, file_path)
124
+ data = load_from_json(file_path)
125
+
126
+ # Display the plot
127
+ plt.show()
128
+ ```
129
+
130
+ ## Configuration
131
+ No specific configuration is required.
132
+
133
+ ## License
134
+ All Rights Reserved
135
+
136
+ The following code and its accompanying documentation are the property of Martijn (Niek) Mooij. All rights are reserved. No part of this code may be reproduced, distributed, or transmitted in any form or by any means, including photocopying, recording, or other electronic or mechanical methods, without the prior written permission of the author, except in the case of brief quotations embodied in critical reviews and certain other noncommercial uses permitted by copyright law. For permission requests, write to the author at mooij.niek@gmail.com.
137
+
138
+ Copyright 2024 Niek Mooij
139
+
140
+ ## Contact
141
+ You can contact me at mooij.niek@gmail.com for any questions or suggestions.
@@ -0,0 +1,141 @@
1
+ Metadata-Version: 2.2
2
+ Name: RDG-Networks
3
+ Version: 0.3.12
4
+ Summary: RDG Networks project
5
+ Home-page: https://github.com/NiekMooij/RDG_networks
6
+ Author: Niek Mooij
7
+ Author-email: mooij.niek@gmail.com
8
+ License: All Rights Reserved
9
+ Classifier: Programming Language :: Python :: 3
10
+ Classifier: Operating System :: OS Independent
11
+ Description-Content-Type: text/markdown
12
+ License-File: LICENSE.txt
13
+ Requires-Dist: networkx
14
+ Requires-Dist: numpy
15
+ Requires-Dist: scipy
16
+ Requires-Dist: shapely
17
+ Requires-Dist: typing
18
+ Dynamic: author
19
+ Dynamic: author-email
20
+ Dynamic: classifier
21
+ Dynamic: description
22
+ Dynamic: description-content-type
23
+ Dynamic: home-page
24
+ Dynamic: license
25
+ Dynamic: requires-dist
26
+ Dynamic: summary
27
+
28
+ ## Overview
29
+
30
+ This Python package provides code regarding the RDG networks project.
31
+
32
+ [![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://opensource.org/licenses/MIT)
33
+ [![Python Version](https://img.shields.io/badge/python-3.6%2B-blue.svg)](https://www.python.org/downloads/)
34
+
35
+ ## Table of Contents
36
+
37
+ - [Features](#features)
38
+ - [Installation](#installation)
39
+ - [Usage](#usage)
40
+ - [Configuration](#configuration)
41
+ - [License](#license)
42
+ - [Contact](#contact)
43
+
44
+ ## Features
45
+
46
+ ### No thickness
47
+ - **generate_line_segments:** Function that determines the linesegments of a RDG network.
48
+ - **generate_line_network:** Function that makes the underlying network of the linesegments.
49
+ - **get_intersection_segments:** Function that determines the intersection segments of a RDG network.
50
+ - **generate_line_segments_dynamic:** Function that determines the segments of a dynamic RDG network (with increasing linelengths in time).
51
+ - **draw_segments:** Function that draws the segments.
52
+
53
+ ### Thickness
54
+ - **generate_line_segments_thickness:** Generates segment network with thicknesses
55
+ - **orientate_network:** Generates various rotated versions of the initial network.
56
+
57
+ - **save_to_stl:** Saves the network as a stl file.
58
+ - **save_to_json:** Saves data as a json file.
59
+ - **load_from_json:** Loads data as a json file.
60
+
61
+ ## Installation
62
+ You can install the package using pip:
63
+
64
+ ```bash
65
+ pip install RDG-networks
66
+ ```
67
+
68
+ ## Usage
69
+ ### Output
70
+ The main function is called *generate_line_segments_thickness* and outputs the following data:
71
+ ```python
72
+ data_dict = {'segments_dict': segments_dict,
73
+ 'polygon_arr': polygon_arr,
74
+ 'segment_thickness_dict': segment_thickness_dict,
75
+ 'jammed': jammed,
76
+ 'generated_config': generated_config}
77
+ ```
78
+ - *segment_thickness_dict*: contains the generated network, represented by multiple polygons.
79
+ - *segments_dict*: contains auxilliary information of the generated network.
80
+ - *polygon_arr*: contains auxilliary information of the generated network.
81
+ - *jammed*: A boolean indicating if the system is jammed.
82
+ - *generated_config*: An array containing all nucleation points and orientations of the segments.
83
+
84
+ ### Code example
85
+ ```python
86
+ import matplotlib.pyplot as plt
87
+ import numpy as np
88
+ import os
89
+ import sys
90
+ import random
91
+ from RDG_networks.thickness.generate_line_segments_thickness import generate_line_segments_thickness
92
+ from RDG_networks import save_to_stl
93
+ from RDG_networks.save_data import save_to_json, load_from_json
94
+
95
+ size = 15
96
+ lamb0 = 0.2
97
+ alpha = 0.52
98
+ thickness_arr = [lamb0 * t**(-alpha) for t in range(1, size + 1)]
99
+ box_size = 1
100
+ angles = [random.random() * 2 * np.pi for _ in range(size)]
101
+
102
+ # Generate initial structure with specified parameters
103
+ data_dict = generate_line_segments_thickness(size=size, thickness_arr=thickness_arr, angles=angles, box_size=box_size)
104
+
105
+ # Setup plot
106
+ fig, ax1 = plt.subplots(nrows=1, ncols=1, figsize=(5, 5))
107
+
108
+ segment_thickness_dict = data_dict['segment_thickness_dict']
109
+ for key, segment in segment_thickness_dict.items():
110
+ segment.draw(ax1)
111
+ middle_segment = segment.middle_segment
112
+ if middle_segment:
113
+ middle_segment.draw(ax1)
114
+
115
+ # Set plot limits and disable ticks
116
+ ax1.set(xlim=(0, 1), ylim=(0, 1))
117
+ ax1.set_xticks([])
118
+ ax1.set_yticks([])
119
+
120
+ # Save to STL and JSON files
121
+ save_to_stl(segment_thickness_dict, thickness=0.2, name=os.path.join(sys.path[0], 'network.stl'), frame_thickness=0.1)
122
+ file_path = os.path.join(sys.path[0], 'data.json')
123
+ save_to_json(data_dict, file_path)
124
+ data = load_from_json(file_path)
125
+
126
+ # Display the plot
127
+ plt.show()
128
+ ```
129
+
130
+ ## Configuration
131
+ No specific configuration is required.
132
+
133
+ ## License
134
+ All Rights Reserved
135
+
136
+ The following code and its accompanying documentation are the property of Martijn (Niek) Mooij. All rights are reserved. No part of this code may be reproduced, distributed, or transmitted in any form or by any means, including photocopying, recording, or other electronic or mechanical methods, without the prior written permission of the author, except in the case of brief quotations embodied in critical reviews and certain other noncommercial uses permitted by copyright law. For permission requests, write to the author at mooij.niek@gmail.com.
137
+
138
+ Copyright 2024 Niek Mooij
139
+
140
+ ## Contact
141
+ You can contact me at mooij.niek@gmail.com for any questions or suggestions.
@@ -17,11 +17,9 @@ RDG_networks/generate_line_segments_static.py
17
17
  RDG_networks/get_intersection_segments.py
18
18
  RDG_networks/sample_in_polygon.py
19
19
  RDG_networks/save_data.py
20
- RDG_networks/save_to_json.py
21
20
  RDG_networks/thickness/Classes.py
22
21
  RDG_networks/thickness/__init__.py
23
22
  RDG_networks/thickness/generate_line_segments_thickness.py
24
- RDG_networks/thickness/generate_line_segments_thickness_correct.py
25
23
  RDG_networks/thickness/generate_line_segments_thickness_static.py
26
24
  RDG_networks/thickness/orientate_network.py
27
25
  RDG_networks/thickness/sample_in_polygon.py
@@ -0,0 +1,114 @@
1
+ ## Overview
2
+
3
+ This Python package provides code regarding the RDG networks project.
4
+
5
+ [![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://opensource.org/licenses/MIT)
6
+ [![Python Version](https://img.shields.io/badge/python-3.6%2B-blue.svg)](https://www.python.org/downloads/)
7
+
8
+ ## Table of Contents
9
+
10
+ - [Features](#features)
11
+ - [Installation](#installation)
12
+ - [Usage](#usage)
13
+ - [Configuration](#configuration)
14
+ - [License](#license)
15
+ - [Contact](#contact)
16
+
17
+ ## Features
18
+
19
+ ### No thickness
20
+ - **generate_line_segments:** Function that determines the linesegments of a RDG network.
21
+ - **generate_line_network:** Function that makes the underlying network of the linesegments.
22
+ - **get_intersection_segments:** Function that determines the intersection segments of a RDG network.
23
+ - **generate_line_segments_dynamic:** Function that determines the segments of a dynamic RDG network (with increasing linelengths in time).
24
+ - **draw_segments:** Function that draws the segments.
25
+
26
+ ### Thickness
27
+ - **generate_line_segments_thickness:** Generates segment network with thicknesses
28
+ - **orientate_network:** Generates various rotated versions of the initial network.
29
+
30
+ - **save_to_stl:** Saves the network as a stl file.
31
+ - **save_to_json:** Saves data as a json file.
32
+ - **load_from_json:** Loads data as a json file.
33
+
34
+ ## Installation
35
+ You can install the package using pip:
36
+
37
+ ```bash
38
+ pip install RDG-networks
39
+ ```
40
+
41
+ ## Usage
42
+ ### Output
43
+ The main function is called *generate_line_segments_thickness* and outputs the following data:
44
+ ```python
45
+ data_dict = {'segments_dict': segments_dict,
46
+ 'polygon_arr': polygon_arr,
47
+ 'segment_thickness_dict': segment_thickness_dict,
48
+ 'jammed': jammed,
49
+ 'generated_config': generated_config}
50
+ ```
51
+ - *segment_thickness_dict*: contains the generated network, represented by multiple polygons.
52
+ - *segments_dict*: contains auxilliary information of the generated network.
53
+ - *polygon_arr*: contains auxilliary information of the generated network.
54
+ - *jammed*: A boolean indicating if the system is jammed.
55
+ - *generated_config*: An array containing all nucleation points and orientations of the segments.
56
+
57
+ ### Code example
58
+ ```python
59
+ import matplotlib.pyplot as plt
60
+ import numpy as np
61
+ import os
62
+ import sys
63
+ import random
64
+ from RDG_networks.thickness.generate_line_segments_thickness import generate_line_segments_thickness
65
+ from RDG_networks import save_to_stl
66
+ from RDG_networks.save_data import save_to_json, load_from_json
67
+
68
+ size = 15
69
+ lamb0 = 0.2
70
+ alpha = 0.52
71
+ thickness_arr = [lamb0 * t**(-alpha) for t in range(1, size + 1)]
72
+ box_size = 1
73
+ angles = [random.random() * 2 * np.pi for _ in range(size)]
74
+
75
+ # Generate initial structure with specified parameters
76
+ data_dict = generate_line_segments_thickness(size=size, thickness_arr=thickness_arr, angles=angles, box_size=box_size)
77
+
78
+ # Setup plot
79
+ fig, ax1 = plt.subplots(nrows=1, ncols=1, figsize=(5, 5))
80
+
81
+ segment_thickness_dict = data_dict['segment_thickness_dict']
82
+ for key, segment in segment_thickness_dict.items():
83
+ segment.draw(ax1)
84
+ middle_segment = segment.middle_segment
85
+ if middle_segment:
86
+ middle_segment.draw(ax1)
87
+
88
+ # Set plot limits and disable ticks
89
+ ax1.set(xlim=(0, 1), ylim=(0, 1))
90
+ ax1.set_xticks([])
91
+ ax1.set_yticks([])
92
+
93
+ # Save to STL and JSON files
94
+ save_to_stl(segment_thickness_dict, thickness=0.2, name=os.path.join(sys.path[0], 'network.stl'), frame_thickness=0.1)
95
+ file_path = os.path.join(sys.path[0], 'data.json')
96
+ save_to_json(data_dict, file_path)
97
+ data = load_from_json(file_path)
98
+
99
+ # Display the plot
100
+ plt.show()
101
+ ```
102
+
103
+ ## Configuration
104
+ No specific configuration is required.
105
+
106
+ ## License
107
+ All Rights Reserved
108
+
109
+ The following code and its accompanying documentation are the property of Martijn (Niek) Mooij. All rights are reserved. No part of this code may be reproduced, distributed, or transmitted in any form or by any means, including photocopying, recording, or other electronic or mechanical methods, without the prior written permission of the author, except in the case of brief quotations embodied in critical reviews and certain other noncommercial uses permitted by copyright law. For permission requests, write to the author at mooij.niek@gmail.com.
110
+
111
+ Copyright 2024 Niek Mooij
112
+
113
+ ## Contact
114
+ You can contact me at mooij.niek@gmail.com for any questions or suggestions.
@@ -2,11 +2,12 @@ from setuptools import setup, find_packages
2
2
 
3
3
  setup(
4
4
  name='RDG-Networks',
5
- version='0.3.11',
5
+ version='0.3.12',
6
6
  author='Niek Mooij',
7
7
  author_email='mooij.niek@gmail.com',
8
- description='Most of the code from the RDG Networks project',
8
+ description='RDG Networks project',
9
9
  long_description=open('README.md').read(),
10
+ long_description_content_type='text/markdown',
10
11
  url='https://github.com/NiekMooij/RDG_networks',
11
12
  classifiers=[
12
13
  'Programming Language :: Python :: 3',
@@ -1,72 +0,0 @@
1
- Metadata-Version: 2.2
2
- Name: RDG-Networks
3
- Version: 0.3.11
4
- Summary: Most of the code from the RDG Networks project
5
- Home-page: https://github.com/NiekMooij/RDG_networks
6
- Author: Niek Mooij
7
- Author-email: mooij.niek@gmail.com
8
- License: All Rights Reserved
9
- Classifier: Programming Language :: Python :: 3
10
- Classifier: Operating System :: OS Independent
11
- License-File: LICENSE.txt
12
- Requires-Dist: networkx
13
- Requires-Dist: numpy
14
- Requires-Dist: scipy
15
- Requires-Dist: shapely
16
- Requires-Dist: typing
17
- Dynamic: author
18
- Dynamic: author-email
19
- Dynamic: classifier
20
- Dynamic: description
21
- Dynamic: home-page
22
- Dynamic: license
23
- Dynamic: requires-dist
24
- Dynamic: summary
25
-
26
- ## Overview
27
-
28
- This Python package provides code regarding the RDG networks project.
29
-
30
- [![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://opensource.org/licenses/MIT)
31
- [![Python Version](https://img.shields.io/badge/python-3.6%2B-blue.svg)](https://www.python.org/downloads/)
32
-
33
- ## Table of Contents
34
-
35
- - [Features](#features)
36
- - [Installation](#installation)
37
- - [Usage](#usage)
38
- - [Configuration](#configuration)
39
- - [License](#license)
40
- - [Contact](#contact)
41
-
42
- ## Features
43
-
44
- - **generate_line_segments:** Function that determines the linesegments of a RDG network.
45
- - **generate_line_network:** Function that makes the underlying network of the linesegments.
46
- - **get_intersection_segments:** Function that determines the intersection segments of a RDG network.
47
- - **generate_line_segments_dynamic:** Function that determines the segments of a dynamic RDG network (with increasing linelengths in time).
48
- - **draw_segments:** Function that draws the segments.
49
-
50
-
51
- ## Installation
52
- You can install the package using pip:
53
-
54
- ```bash
55
- pip install RDG-networks
56
- ```
57
-
58
- ## Usage
59
- To use the package, import the relevant script from the functions folder based on the algorithm you'd like to apply.
60
-
61
- ## Configuration
62
- No specific configuration is required.
63
-
64
- ## License
65
- All Rights Reserved
66
-
67
- The following code and its accompanying documentation are the property of Martijn (Niek) Mooij. All rights are reserved. No part of this code may be reproduced, distributed, or transmitted in any form or by any means, including photocopying, recording, or other electronic or mechanical methods, without the prior written permission of the author, except in the case of brief quotations embodied in critical reviews and certain other noncommercial uses permitted by copyright law. For permission requests, write to the author at mooij.niek@gmail.com.
68
-
69
- Copyright 2024 Niek Mooij
70
-
71
- ## Contact
72
- You can contact me at mooij.niek@gmail.com for any questions or suggestions.
@@ -1,72 +0,0 @@
1
- Metadata-Version: 2.2
2
- Name: RDG-Networks
3
- Version: 0.3.11
4
- Summary: Most of the code from the RDG Networks project
5
- Home-page: https://github.com/NiekMooij/RDG_networks
6
- Author: Niek Mooij
7
- Author-email: mooij.niek@gmail.com
8
- License: All Rights Reserved
9
- Classifier: Programming Language :: Python :: 3
10
- Classifier: Operating System :: OS Independent
11
- License-File: LICENSE.txt
12
- Requires-Dist: networkx
13
- Requires-Dist: numpy
14
- Requires-Dist: scipy
15
- Requires-Dist: shapely
16
- Requires-Dist: typing
17
- Dynamic: author
18
- Dynamic: author-email
19
- Dynamic: classifier
20
- Dynamic: description
21
- Dynamic: home-page
22
- Dynamic: license
23
- Dynamic: requires-dist
24
- Dynamic: summary
25
-
26
- ## Overview
27
-
28
- This Python package provides code regarding the RDG networks project.
29
-
30
- [![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://opensource.org/licenses/MIT)
31
- [![Python Version](https://img.shields.io/badge/python-3.6%2B-blue.svg)](https://www.python.org/downloads/)
32
-
33
- ## Table of Contents
34
-
35
- - [Features](#features)
36
- - [Installation](#installation)
37
- - [Usage](#usage)
38
- - [Configuration](#configuration)
39
- - [License](#license)
40
- - [Contact](#contact)
41
-
42
- ## Features
43
-
44
- - **generate_line_segments:** Function that determines the linesegments of a RDG network.
45
- - **generate_line_network:** Function that makes the underlying network of the linesegments.
46
- - **get_intersection_segments:** Function that determines the intersection segments of a RDG network.
47
- - **generate_line_segments_dynamic:** Function that determines the segments of a dynamic RDG network (with increasing linelengths in time).
48
- - **draw_segments:** Function that draws the segments.
49
-
50
-
51
- ## Installation
52
- You can install the package using pip:
53
-
54
- ```bash
55
- pip install RDG-networks
56
- ```
57
-
58
- ## Usage
59
- To use the package, import the relevant script from the functions folder based on the algorithm you'd like to apply.
60
-
61
- ## Configuration
62
- No specific configuration is required.
63
-
64
- ## License
65
- All Rights Reserved
66
-
67
- The following code and its accompanying documentation are the property of Martijn (Niek) Mooij. All rights are reserved. No part of this code may be reproduced, distributed, or transmitted in any form or by any means, including photocopying, recording, or other electronic or mechanical methods, without the prior written permission of the author, except in the case of brief quotations embodied in critical reviews and certain other noncommercial uses permitted by copyright law. For permission requests, write to the author at mooij.niek@gmail.com.
68
-
69
- Copyright 2024 Niek Mooij
70
-
71
- ## Contact
72
- You can contact me at mooij.niek@gmail.com for any questions or suggestions.
@@ -1,14 +0,0 @@
1
- import json
2
- from .Classes import Line, LineSegment, Polygon
3
-
4
- def save_to_json(data_dict, file_path):
5
- data_dict['segments_dict'] = {key: pol.to_dict() for key, pol in data_dict['segments_dict'].items()}
6
- data_dict['segment_thickness_dict'] = {key: pol.to_dict() for key, pol in data_dict['segment_thickness_dict'].items()}
7
-
8
- with open(file_path, 'w') as json_file:
9
- json.dump(data_dict, json_file)
10
-
11
- def load_from_json(file_path):
12
- with open(file_path, 'r') as file:
13
- data = json.load(file)
14
- return data