planformcreator2 4.0.2__tar.gz → 4.3.0__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 (34) hide show
  1. {planformcreator2-4.0.2 → planformcreator2-4.3.0}/PKG-INFO +17 -18
  2. {planformcreator2-4.0.2 → planformcreator2-4.3.0}/README.md +64 -57
  3. planformcreator2-4.3.0/doc/README_PyPi.md +36 -0
  4. {planformcreator2-4.0.2 → planformcreator2-4.3.0}/planformcreator2/app.py +8 -6
  5. {planformcreator2-4.0.2 → planformcreator2-4.3.0}/planformcreator2/app_modes.py +3 -26
  6. {planformcreator2-4.0.2 → planformcreator2-4.3.0}/planformcreator2/model/VLM.py +1 -1
  7. {planformcreator2-4.0.2 → planformcreator2-4.3.0}/planformcreator2/model/VLM_wing.py +9 -7
  8. {planformcreator2-4.0.2 → planformcreator2-4.3.0}/planformcreator2/model/wing.py +112 -60
  9. {planformcreator2-4.0.2 → planformcreator2-4.3.0}/planformcreator2/model/wing_exports.py +307 -212
  10. {planformcreator2-4.0.2 → planformcreator2-4.3.0}/planformcreator2/resources.py +38 -15
  11. {planformcreator2-4.0.2 → planformcreator2-4.3.0}/planformcreator2/ui/pc2_artists.py +14 -14
  12. {planformcreator2-4.0.2 → planformcreator2-4.3.0}/planformcreator2/ui/pc2_diagrams.py +78 -71
  13. {planformcreator2-4.0.2 → planformcreator2-4.3.0}/planformcreator2/ui/pc2_dialogs.py +199 -172
  14. {planformcreator2-4.0.2 → planformcreator2-4.3.0}/planformcreator2/ui/pc2_panels.py +122 -45
  15. {planformcreator2-4.0.2 → planformcreator2-4.3.0}/pyproject.toml +1 -4
  16. planformcreator2-4.0.2/doc/README_PyPi.md +0 -36
  17. planformcreator2-4.0.2/planformcreator2/PC2_ico.ico +0 -0
  18. {planformcreator2-4.0.2 → planformcreator2-4.3.0}/.gitignore +0 -0
  19. {planformcreator2-4.0.2 → planformcreator2-4.3.0}/LICENSE +0 -0
  20. {planformcreator2-4.0.2 → planformcreator2-4.3.0}/icons/PC2.ico +0 -0
  21. {planformcreator2-4.0.2 → planformcreator2-4.3.0}/icons/PC2_ico.pdn +0 -0
  22. {planformcreator2-4.0.2 → planformcreator2-4.3.0}/planformcreator2/__init__.py +0 -0
  23. {planformcreator2-4.0.2 → planformcreator2-4.3.0}/planformcreator2/__main__.py +0 -0
  24. {planformcreator2-4.0.2 → planformcreator2-4.3.0}/planformcreator2/app_model.py +0 -0
  25. {planformcreator2-4.0.2 → planformcreator2-4.3.0}/planformcreator2/model/__init__.py +0 -0
  26. {planformcreator2-4.0.2 → planformcreator2-4.3.0}/planformcreator2/ui/__init__.py +0 -0
  27. {planformcreator2-4.0.2 → planformcreator2-4.3.0}/templates/ASW_17.png +0 -0
  28. {planformcreator2-4.0.2 → planformcreator2-4.3.0}/templates/Amokka.pc2 +0 -0
  29. {planformcreator2-4.0.2 → planformcreator2-4.3.0}/templates/Bow.pc2 +0 -0
  30. {planformcreator2-4.0.2 → planformcreator2-4.3.0}/templates/Elliptical.pc2 +0 -0
  31. {planformcreator2-4.0.2 → planformcreator2-4.3.0}/templates/F3B_F3F.pc2 +0 -0
  32. {planformcreator2-4.0.2 → planformcreator2-4.3.0}/templates/Scale_Glider.pc2 +0 -0
  33. {planformcreator2-4.0.2 → planformcreator2-4.3.0}/templates/Spitfire.png +0 -0
  34. {planformcreator2-4.0.2 → planformcreator2-4.3.0}/templates/Trapezoid.pc2 +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: planformcreator2
3
- Version: 4.0.2
3
+ Version: 4.3.0
4
4
  Summary: Design a wing planform
5
5
  Project-URL: Homepage, https://github.com/jxjo/PlanformCreator2
6
6
  Project-URL: Issues, https://github.com/jxjo/PlanformCreator2/issues
@@ -12,43 +12,42 @@ Classifier: Operating System :: OS Independent
12
12
  Classifier: Programming Language :: Python :: 3.12
13
13
  Classifier: Programming Language :: Python :: 3.13
14
14
  Requires-Python: >=3.12
15
- Requires-Dist: airfoileditor>=4.2.5
16
- Requires-Dist: ezdxf>=1.4.0
15
+ Requires-Dist: airfoileditor~=4.3.0
17
16
  Description-Content-Type: text/markdown
18
17
 
19
18
  ![PC2](https://github.com/jxjo/PlanformCreator2/blob/main/images/PC2_logo.png?raw=true)
20
19
 
21
- ### Version 4.0.2
20
+ # v4.3.0
22
21
 
23
- ---
22
+ **PlanformCreator2** (PC2) is an app for designing wing planforms, with a focus on model planes.
24
23
 
25
- **PlanformCreator2** - short PC2 - is an app to design the planform of a wing focusing on model sailplanes.
26
-
27
- #### Planform Design
24
+ #### Planform Design
28
25
 
29
26
  * Define a planform based on a chord distribution and a reference line along wing span
30
27
  * Import image of an existing wing as a background image for design
31
28
  * Add wing sections with fixed position or relative chord length
32
- * Define flaps hinge line and flaps
33
- * Export planform as dxf file for use in CAD
29
+ * Define flaps hinge line and flaps
30
+ * Export planform as DXF for use in CAD
34
31
 
35
32
  #### Airfoils and Polars
36
- * Define airfoil at wing sections and edit its properties using the [AirfoilEditor](https://github.com/jxjo/AirfoilEditor)
33
+
34
+ * Assign airfoils to wing sections and edit them using the [AirfoilEditor](https://github.com/jxjo/AirfoilEditor)
37
35
  * Generate blended airfoils for intermediate wing sections ('strak')
38
36
  * View polars of the airfoil based on xfoil polar generation
39
37
 
40
38
  #### Wing Analysis
41
- * Auto paneling of the planform as preparation for aerodynamic calculation
42
- * VLM based lift calculation
39
+
40
+ * Auto paneling of the planform as preparation for aerodynamic calculation
41
+ * VLM based lift calculation
43
42
  * Determine critical sections where cl_max of airfoils will be reached
44
43
  * Export wing definition to Xflr5 and FLZ_vortex for further analysis
45
44
 
45
+ ## Quick Start
46
46
 
47
- The app, developed in Python with the Qt UI framework, runs on Windows, Linux, and MacOS.
48
- Linux and MacOS users are required to compile Worker (polar generation) from the [Xoptfoil2](https://github.com/jxjo/Xoptfoil2) project.
47
+ * Python package: `pip install planformcreator2`, then run `planformcreator2`.
48
+ * Linux/macOS note: for polar generation and full analysis, compile and install `worker` (see [Xoptfoil2 installation](https://github.com/jxjo/Xoptfoil2#Installation)).
49
49
 
50
- Find more info about the **PlanformCreator2** on [Github](https://github.com/jxjo/PlanformCreator2).
51
50
 
52
- ---
51
+ More information is available in the project repository: [PlanformCreator2 on GitHub](https://github.com/jxjo/PlanformCreator2).
53
52
 
54
- Find Release Information in [CHANGELOG](https://github.com/jxjo/PlanformCreator2/blob/main/CHANGELOG.md).
53
+ Release information: [CHANGELOG](https://github.com/jxjo/PlanformCreator2/blob/main/CHANGELOG.md).
@@ -2,9 +2,9 @@
2
2
  ![PC2](images/PC2_logo.png "Logo")
3
3
 
4
4
 
5
- # v4.0.2
5
+ # v4.3.0
6
6
 
7
- **PlanformCreator2** - short PC2 - is an app to design the planform of a wing focusing on model sailplanes.
7
+ **PlanformCreator2** (PC2) is an app for designing wing planforms, with a focus on model planes.
8
8
 
9
9
  #### Planform Design
10
10
 
@@ -12,10 +12,10 @@
12
12
  * Import image of an existing wing as a background image for design
13
13
  * Add wing sections with fixed position or relative chord length
14
14
  * Define flaps hinge line and flaps
15
- * Export planform as dxf file for use in CAD
15
+ * Export planform as DXF for use in CAD
16
16
 
17
17
  #### Airfoils and Polars
18
- * Define airfoil at wing sections and edit its properties using the [Airfoil Editor](https://github.com/jxjo/AirfoilEditor)
18
+ * Assign airfoils to wing sections and edit them using the [AirfoilEditor](https://github.com/jxjo/AirfoilEditor)
19
19
  * Generate blended airfoils for intermediate wing sections ('strak')
20
20
  * View polars of the airfoil based on xfoil polar generation
21
21
 
@@ -25,30 +25,36 @@
25
25
  * Determine critical sections where cl_max of airfoils will be reached
26
26
  * Export wing definition to Xflr5 and FLZ_vortex for further analysis
27
27
 
28
- The project was inspired by the 'Planform Creator' being part of [The Strak Machine](https://github.com/Matthias231/The-Strak-Machine).
28
+ ## Quick Start
29
+
30
+ * Windows (recommended): download and run the latest installer from the [GitHub releases page](https://github.com/jxjo/PlanformCreator2/releases).
31
+ * Python package: `pip install planformcreator2`, then run `planformcreator2`.
32
+ * Linux/macOS note: for polar generation and full analysis, compile and install `worker` (see [Xoptfoil2 installation](https://github.com/jxjo/Xoptfoil2#Installation)).
33
+
34
+ The project was inspired by the "Planform Creator" module of [The Strak Machine](https://github.com/Matthias231/The-Strak-Machine).
29
35
 
30
36
  ## Basic Concepts
31
37
 
32
- The idea behind **PlanformCreator2** is to have a tool to design a new wing with a more graphical, playful approach. It tries to fill the gap between CAD based design and aerodynamic analysis tools like Xflr5.
38
+ The idea behind **PlanformCreator2** is to design wings with a graphical, exploratory workflow. It fills the gap between CAD-based geometry work and aerodynamic analysis tools such as Xflr5.
33
39
 
34
40
  <img src="images/PC2_usage.png" width="800" />
35
41
 
36
- During the early design phase, **PlanformCreator2** serves as the single source of truth for wing geometry. It provides data for aerodynamic analysis and includes built-in lift and stall analysis capabilities.
37
- More detailed performance assessments can be performed using external tools.
42
+ During early design, **PlanformCreator2** serves as the single source of truth for wing geometry. It provides data for aerodynamic analysis and includes built-in lift and stall analysis.
43
+ More detailed performance assessments can be done with external tools.
38
44
 
39
- Once the design is finalized, the planform and airfoils are exported as DXF files to a CAD program for final 3D design work, such as creating molds.
45
+ Once the design is finalized, the planform and airfoils can be exported to CAD for final 3D work, such as mold design.
40
46
 
41
- Unlike a "paint program," the planform is defined parametrically using values such as 'span', 'root depth', and 'sweep angle'. The chord distribution along the span is controlled by mathematical functions with adjustable parameters.
47
+ Unlike a "paint program," the planform is defined parametrically with values such as span, root chord, and sweep angle. The chord distribution along the span is controlled by mathematical functions with adjustable parameters.
42
48
  This parametric approach allows independent parameter adjustments, enabling rapid iteration toward the desired wing planform.
43
49
 
44
50
 
45
51
 
46
52
  ## Designing a Planform
47
53
 
48
- 'Form follows Function' - this is especially true in PC2, where the planform results from a combination of mathematical functions and parameters.
54
+ "Form follows function" is especially true in PC2: the final planform results from a combination of mathematical functions and parameters.
49
55
 
50
56
  ### Chord Distribution and Chord Reference
51
- The most important element, typically defined first, is the chord distribution along the wing span. The geometric chord distribution directly determines the lift distribution, as the local lift coefficient depends on both the effective angle of attack (influenced by wing shape) and the local Reynolds number (which varies proportionally with chord length).
57
+ The most important element, usually defined first, is the chord distribution along the span. It strongly influences lift distribution because local lift depends on effective angle of attack and local Reynolds number (which scales with chord length).
52
58
 
53
59
  Two methods are available for defining the chord distribution:
54
60
  - **Bezier curve**: The curve is defined by dragging control points with the mouse, using a start tangent at the root and an end tangent at the tip.<br>
@@ -56,20 +62,20 @@ Additional Bezier control points can be added to achieve a wide range of chord d
56
62
  A constant chord area can be created by moving the Bezier start point toward the tip.
57
63
  - **Trapezoid**: For single or multiple trapezoid wings, the chord is defined by the chord length at each wing section.
58
64
 
59
- In PC2, the chord distribution is always displayed in normalized form, with both span and chord length ranging from 0 to 1. This enables direct comparison of chord distributions across different wing designs without distortion.
65
+ In PC2, the chord distribution is always shown in normalized form, with both span and chord ranging from 0 to 1. This allows direct comparison across different designs.
60
66
 
61
- The second key element is the 'Chord Reference', which defines how the chord is distributed between the leading and trailing edges along a virtual 'Chord Reference Line'.
67
+ The second key element is the Chord Reference, which defines how chord is distributed between leading and trailing edge along a virtual Chord Reference Line.
62
68
 
63
69
  <img src="images/chord_distribution_reference.png" width="800" />
64
70
 
65
- The final planform is created by combining these two functions, scaling the result to a half-wing span, and optionally applying a 'Sweep Angle' transformation.
71
+ The final planform is created by combining these two functions, scaling the result to half-span, and optionally applying a sweep-angle transformation.
66
72
 
67
73
  <img src="images/planform_by_chord.png" width="800" />
68
74
 
69
75
 
70
76
  #### Variations of the Chord Reference
71
77
 
72
- The Chord Reference concept enables powerful planform variations. Since the chord distribution remains constant, all variations maintain the same wing area and nearly identical aerodynamic properties as a first approximation.
78
+ The Chord Reference enables powerful planform variations. Since chord distribution remains constant, these variants keep the same area and very similar first-order aerodynamic behavior.
73
79
 
74
80
  The following diagram demonstrates how different chord references affect the planform while maintaining a constant chord distribution.
75
81
 
@@ -79,7 +85,7 @@ The following diagram demonstrates how different chord references affect the pla
79
85
 
80
86
  #### The Banana Function
81
87
 
82
- A unique feature is the "banana function," which bends the wing spanwise like a banana without altering the chord distribution or reference. This creates planforms similar to popular 'bow-style' flying wings.
88
+ A unique feature is the "banana function," which bends the wing spanwise without changing chord distribution or chord reference. This creates planforms similar to "bow-style" flying wings.
83
89
 
84
90
  Another application is fine-tuning flap depth along the span. Since the flap hinge line (described below) is straight, bending the planform directly affects flap depth.
85
91
 
@@ -87,9 +93,9 @@ Another application is fine-tuning flap depth along the span. Since the flap hin
87
93
 
88
94
  ### Background Image
89
95
 
90
- To create a wing based on an existing image, you can load it as a background in the app. With a planform contour visible in the background, defining the chord distribution and chord reference for optimal fit is typically straightforward.
96
+ To recreate a wing from an existing drawing or photo, load it as a background image. With the contour visible, fitting chord distribution and chord reference is usually straightforward.
91
97
 
92
- A built-in image editor allows you to scale the image and adjust colors to create a dark mode version best suited for use as a background.
98
+ A built-in image editor lets you scale the image and adjust colors to create a background-friendly dark variant.
93
99
 
94
100
  Image scaling is performed by positioning two scale markers at the leading edge of the root and at the wing tip.
95
101
 
@@ -133,12 +139,13 @@ In some cases, such as when using a curved reference line, kinks in the hinge li
133
139
  ### Export as DXF File
134
140
  Once the wing design is complete, it can be exported to a CAD program as a DXF file. Airfoils can optionally be inserted into the drawing and/or exported separately as .dat files.
135
141
 
136
- A useful feature allows you to define a common trailing edge thickness (trailing edge gap) in millimeters for all airfoils.
142
+ A useful option lets you define a common trailing-edge thickness (TE gap) in millimeters for all airfoils.
137
143
  This eliminates the need for manual post-processing of airfoils in CAD.
138
144
 
139
145
  <img src="images/dxf_view.png" width="800" />
140
146
 
141
- **Note:** The generated planform contour is approximated by many small straight line segments (polyline) and should not be used directly for 3D construction. It is recommended to overlay splines on the leading and trailing edges in your CAD program for smooth surfaces.
147
+ **Note:** If the planform uses a Bezier chord distribution, it is exported to DXF as a uniform B-spline for best shape fidelity.
148
+ Airfoils are exported as B-splines (Bezier-based airfoils) or as cubic splines (`.dat` airfoils).
142
149
 
143
150
  ### Export as CSV File
144
151
 
@@ -162,7 +169,7 @@ Airfoils can be viewed in normalized scale or in their actual scale within the w
162
169
 
163
170
  **PlanformCreator2** includes the [AirfoilEditor](https://github.com/jxjo/AirfoilEditor), which provides common airfoil modification capabilities during wing design.
164
171
 
165
- During the final design stage, all airfoil — including generated 'straked' airfoils — can be exported as .dat files. An optional feature allows setting a uniform trailing edge thickness ('TE gap') in millimeters for all airfoils, eliminating the manual rework typically required in CAD.
172
+ During the final design stage, all airfoils, including generated straked airfoils, can be exported as `.dat` files. An optional feature sets a uniform trailing-edge thickness (TE gap) in millimeters for all airfoils, reducing manual CAD rework.
166
173
 
167
174
 
168
175
  ### Airfoil Polars
@@ -186,7 +193,7 @@ The spanwise polar distribution provides an initial assessment of the airfoil st
186
193
 
187
194
  Aerodynamic analysis of a wing requires discretization into panels. PC2 provides several features to support this paneling process.
188
195
 
189
- The paneled planform can be exported to Xflr5 and FLZ_vortex, or used for the integrated aerodynamic analysis described below.
196
+ The paneled planform can be exported to Xflr5 and FLZ_vortex, or used for integrated aerodynamic analysis.
190
197
 
191
198
  The initial paneling step involves defining the number of x and y-panels for each section. With curved leading or trailing edges, this can produce significant geometric deviations between the original contour and the idealized panels, resulting in substantial inaccuracies in aerodynamic calculations.
192
199
 
@@ -198,9 +205,9 @@ The initial paneling step involves defining the number of x and y-panels for eac
198
205
 
199
206
  Mesh optimization can then be applied using the following parameters:
200
207
 
201
- * Minimum panel width – The number of y-panels per section is adjusted to achieve uniform panel width along the span
202
- * Minimum chord deviation to planform** – Additional wing sections are inserted automatically until the deviation of the section trapezoids from the original planform falls below the defined threshold
203
- * Minimum chord at tip – The tip is trimmed to achieve a Reynolds number that produces meaningful Xfoil results
208
+ * Minimum panel width - The number of y-panels per section is adjusted to achieve uniform panel width along the span
209
+ * Maximum chord deviation to planform - Additional wing sections are inserted automatically until section trapezoid deviation from the original planform falls below the chosen threshold
210
+ * Minimum tip chord - The tip is trimmed to reach a Reynolds number that yields meaningful Xfoil results
204
211
 
205
212
  ![PC2](images/panelling_steps.png "Panelling steps")
206
213
 
@@ -211,15 +218,15 @@ Like airfoil polar generation, panel generation occurs on-demand: a new mesh is
211
218
 
212
219
  #### Export to Xflr5
213
220
 
214
- When using PC2 together with Xflr5 the major facilitation beside the definition of wing segments, is the automatic generation of all intermediate airfoils needed in Xflr5 at all wing sections. No further geometric work has to be done for wing definition and airfoils.
221
+ When using PC2 with Xflr5, one major benefit is automatic generation of all intermediate airfoils needed at wing sections. No further geometry preparation is required for wing definition and airfoils.
215
222
 
216
- Please read [the short description](doc/PC2_export_to_Xflr5.md) of how it works.
223
+ See [the short description](doc/PC2_export_to_Xflr5.md) for details.
217
224
 
218
225
 
219
226
  #### Export to FLZ_vortex
220
227
 
221
228
 
222
- PC2 generates a ready to use FLZ_vortex project file which can be loaded as a new 'flight scene' ('Flugszene') or FLZ_vortex can be launched directly from PC2 having the project file loaded. For direct launch the file extension .flz must be assigned to the app FLZ_vortex.
229
+ PC2 generates a ready-to-use FLZ_vortex project file that can be loaded as a new flight scene ("Flugszene"). FLZ_vortex can also be launched directly from PC2 with the project file loaded. For direct launch, the `.flz` extension must be associated with FLZ_vortex.
223
230
 
224
231
  Do not forget to adjust the plane mass in FLZ before running a calculation.
225
232
 
@@ -227,6 +234,8 @@ Do not forget to adjust the plane mass in FLZ before running a calculation.
227
234
 
228
235
  PC2 includes an integrated VLM (Vortex Lattice Method) module to calculate the lift distribution along the span based on the previously generated paneling.
229
236
 
237
+ For a detailed explanation of the implementation, see [Wing Aerodynamics (PDF)](doc/PC2_wing_aerodynamics.pdf).
238
+
230
239
  <img src="./images/vlm_cp_panel.png" width="800" />
231
240
 
232
241
  The primary objective of aerodynamic analysis in PC2 is to identify wing regions that will stall first when the angle of attack increases. For this assessment, 2D airfoil polar data and 3D lift aerodynamic data are combined in a viscous loop.
@@ -245,7 +254,7 @@ The maximum possible angle of attack (close to stall) is automatically evaluated
245
254
 
246
255
  <sup>Simple wing example showing the critical wing regions where local Cl reaches cl max of the airfoil.</sup>
247
256
 
248
- By activating the chord distribution view, the chord and thus the area in which the wing will stall first can be changed interactively.
257
+ By activating chord distribution view, chord and thus the first-stall area can be adjusted interactively.
249
258
 
250
259
  <img src="images/vlm_cl_max_with_chord.png" width="800" />
251
260
 
@@ -267,19 +276,16 @@ By activating the chord distribution view, the chord and thus the area in which
267
276
  For new users, the 'Welcome' panel provides additional explanations and allows immediate modification of the sample planform. The 'New' function offers predefined templates that serve as good starting points for your project.
268
277
 
269
278
 
270
- ## Software Aspects
271
-
272
- `PlanformCreator2` is developed in [Python](https://www.python.org/) using [PyQt6](https://pypi.org/project/PyQt6/), which wraps and extends the Qt UI framework, and [PyQtGraph](https://www.pyqtgraph.org/), which wraps the Qt Graphics framework.
279
+ ## Architecture Overview
273
280
 
274
- The main building blocks are:
281
+ `PlanformCreator2` is developed in [Python](https://www.python.org/) using [PyQt6](https://pypi.org/project/PyQt6/) and [PyQtGraph](https://www.pyqtgraph.org/).
275
282
 
276
- * Model — Contains all geometry and mathematical helper routines to create and modify wing planforms. The model is independent of the UI.
283
+ Main building blocks:
277
284
 
278
- * VLM — For lift distribution calculations, the Python VLM implementation [Panel Aero](https://github.com/DLR-AE/PanelAero) is used as the core module (thanks to Arne Voß, DLR).
279
-
280
- * UI Framework — Base classes and a framework to ease implementation of forms based on widgets and diagrams. Plots in diagrams are handled by artists, each visualizing specific data aspects of a planform. The base classes are imported from the [Airfoil Editor](https://github.com/jxjo/AirfoilEditor) project as a package.
281
-
282
- * Application — App modes and view panels handle presentation and user interaction.
285
+ * Model - Geometry and math helpers for creating and modifying wing planforms. The model is UI-independent.
286
+ * VLM - Lift-distribution calculations use the Python VLM implementation [Panel Aero](https://github.com/DLR-AE/PanelAero) (thanks to Arne Voß, DLR).
287
+ * UI framework - Base classes simplify widget and diagram forms. Plots are handled by artists, each visualizing specific planform data. Base classes are imported from [AirfoilEditor](https://github.com/jxjo/AirfoilEditor).
288
+ * Application - App modes and view panels handle presentation and user interaction.
283
289
 
284
290
 
285
291
  # Installation
@@ -298,46 +304,47 @@ To install in this case:
298
304
 
299
305
 
300
306
 
301
- ### Windows Setup using Python
307
+ ### Python package setup
302
308
 
303
- If you already have installed Python version >=3.12, it is advantageous to install the PlanformCreator2 as a 'package'.
304
- This will startup the app faster than using the standalone .exe file.
305
- The package already includes Worker and Xoptfoil2.
309
+ If you already have Python >=3.12 installed, you can install PlanformCreator2 as a package.
310
+ Startup is typically faster than with the standalone `.exe`.
311
+ The package includes Worker and Xoptfoil2.
306
312
 
307
313
  Install the app:
308
314
  ```
309
315
  pip install planformcreator2
310
316
  ```
311
317
 
312
- To upgrade to the actual version use `pip install planformcreator2 -U`.
318
+ To upgrade to the latest version, use `pip install planformcreator2 -U`.
313
319
 
314
320
  Run the app by typing `planformcreator2` on the command line.
315
321
 
316
- The command `where planformcreator2.exe` will show, where Python installed the program within your filesystem.
317
- This file path can be used to create a shortcut on your desktop or to assign the file extension '.dat' to the app, allowing to open an airfoil with a double click.
322
+ The command `where planformcreator2.exe` shows where Python installed the program.
323
+ That path can be used to create a desktop shortcut or to assign the `.pc2` file extension.
318
324
 
319
- If you just want to try out the app and want to ensure, that the installation doesn't influence other packages, you may prefer to install the package in an 'virtual environment'. For daily use a 'normal' installation is more convenient.
325
+ If you want to try the app without affecting other packages, use a virtual environment.
326
+ For daily use, a normal installation is usually more convenient.
320
327
 
321
328
 
322
329
 
323
- ### Linux and MacOS
330
+ ### Linux and macOS
324
331
 
325
- The app is installed as a Python 'package'. Please ensure to have a Python version >=3.12.
332
+ Install the app as a Python package. Please ensure Python >=3.12 is installed.
326
333
 
327
334
  `pip3 install planformcreator2`
328
335
 
329
- To upgrade to the actual version use
336
+ To upgrade to the latest version, use
330
337
 
331
338
  `pip3 install planformcreator2 -U`
332
339
 
333
- Run the app by typing `planformcreator2` on the command line.
340
+ Run the app with `planformcreator2`.
334
341
 
335
- The command `which planformcreator2` will show, where Python installed the program within your filesystem.
336
- This file path can be used to create a shortcut on your desktop or to assign the file extension '.dat' to the app, allowing to open an airfoil with a double click.
342
+ The command `which planformcreator2` shows where Python installed the program.
343
+ This path can be used to create a shortcut.
337
344
 
338
345
 
339
346
  #### Preparing Worker
340
- To use polar generation and wing analysis the program `worker` has to be compiled and made available for PlanformCreator2 by copying the program into /usr/local/bin.
347
+ To use polar generation and wing analysis, `worker` must be compiled and made available to PlanformCreator2 (for example in `/usr/local/bin`).
341
348
 
342
349
  Please have a look into [Xoptfoil2 README](https://github.com/jxjo/Xoptfoil2#Installation) for further information.
343
350
 
@@ -349,7 +356,7 @@ If there is warning message like "Failed to create wl_display" when starting the
349
356
 
350
357
  ### Cloning from Github
351
358
 
352
- If you want to clone the PlanformCreator2 repo from GitHub for local development, the following package have to be installed in your (virtual) python environment
359
+ If you clone PlanformCreator2 from GitHub for local development, install the following packages in your (virtual) Python environment:
353
360
 
354
361
  ```
355
362
  pip install airfoileditor
@@ -363,6 +370,6 @@ See [CHANGELOG.md](CHANGELOG.md) for history of changes.
363
370
 
364
371
  # Finally
365
372
 
366
- I hope you enjoy working with the **PlanformCreator2**.
373
+ I hope you enjoy working with **PlanformCreator2**.
367
374
 
368
375
  jochen@jxjo.de
@@ -0,0 +1,36 @@
1
+ ![PC2](https://github.com/jxjo/PlanformCreator2/blob/main/images/PC2_logo.png?raw=true)
2
+
3
+ # v4.3.0
4
+
5
+ **PlanformCreator2** (PC2) is an app for designing wing planforms, with a focus on model planes.
6
+
7
+ #### Planform Design
8
+
9
+ * Define a planform based on a chord distribution and a reference line along wing span
10
+ * Import image of an existing wing as a background image for design
11
+ * Add wing sections with fixed position or relative chord length
12
+ * Define flaps hinge line and flaps
13
+ * Export planform as DXF for use in CAD
14
+
15
+ #### Airfoils and Polars
16
+
17
+ * Assign airfoils to wing sections and edit them using the [AirfoilEditor](https://github.com/jxjo/AirfoilEditor)
18
+ * Generate blended airfoils for intermediate wing sections ('strak')
19
+ * View polars of the airfoil based on xfoil polar generation
20
+
21
+ #### Wing Analysis
22
+
23
+ * Auto paneling of the planform as preparation for aerodynamic calculation
24
+ * VLM based lift calculation
25
+ * Determine critical sections where cl_max of airfoils will be reached
26
+ * Export wing definition to Xflr5 and FLZ_vortex for further analysis
27
+
28
+ ## Quick Start
29
+
30
+ * Python package: `pip install planformcreator2`, then run `planformcreator2`.
31
+ * Linux/macOS note: for polar generation and full analysis, compile and install `worker` (see [Xoptfoil2 installation](https://github.com/jxjo/Xoptfoil2#Installation)).
32
+
33
+
34
+ More information is available in the project repository: [PlanformCreator2 on GitHub](https://github.com/jxjo/PlanformCreator2).
35
+
36
+ Release information: [CHANGELOG](https://github.com/jxjo/PlanformCreator2/blob/main/CHANGELOG.md).
@@ -33,8 +33,8 @@ from PyQt6.QtWidgets import QGridLayout
33
33
  from PyQt6.QtGui import QCloseEvent, QGuiApplication, QIcon
34
34
 
35
35
  # --- AE modules ---------------
36
-
37
- from airfoileditor.resources import get_icons_path as ae_icons_path
36
+
37
+ from airfoileditor.resources import get_resources_root as ae_get_resources_root
38
38
  from airfoileditor.base.common_utils import *
39
39
  from airfoileditor.base.widgets import Icon, Widget
40
40
  from airfoileditor.base.panels import Tab_Panel, Win_Util
@@ -66,7 +66,7 @@ logger = logging.getLogger(__name__)
66
66
  #-------------------------------------------------------------------------------
67
67
 
68
68
  APP_NAME = "PlanformCreator2"
69
- __version__ = "4.0.2" # hatch "version dynamic" reads this version for build
69
+ __version__ = "4.3.0" # hatch "version dynamic" reads this version for build
70
70
 
71
71
 
72
72
  class Main (QMainWindow):
@@ -108,7 +108,8 @@ class Main (QMainWindow):
108
108
 
109
109
  logger.info (f"Initialize UI")
110
110
 
111
- self._set_win_style (ae_icons_path(), 'PC2.ico')
111
+ ae_resources_root = ae_get_resources_root()
112
+ self._set_win_style (str(ae_resources_root) if ae_resources_root else None, 'PC2.ico')
112
113
  self._set_win_title ()
113
114
  self._set_win_geometry ()
114
115
 
@@ -162,13 +163,14 @@ class Main (QMainWindow):
162
163
  self.setWindowTitle (APP_NAME + " v" + str(__version__) + " [" + pc2_file + "]")
163
164
 
164
165
 
165
- def _set_win_style (self, icons_path : Path = None, app_icon_name : str = None):
166
+ def _set_win_style (self, resources_dir : Path | str | None = None, app_icon_name : str = None):
166
167
  """
167
168
  Set window style according to settings
168
169
  """
169
170
 
170
171
  # set resources dir for Icons
171
- Icon.ICONS_PATH = icons_path
172
+ if resources_dir is not None:
173
+ Icon.RESOURCES_DIR = str(resources_dir)
172
174
 
173
175
  # get and set app icon
174
176
  app_icon_path = get_icon_path(app_icon_name)
@@ -374,31 +374,8 @@ class Mode_Modify (Mode_Abstract):
374
374
 
375
375
 
376
376
 
377
- def delete (self):
378
- """ delete current airfoil ..."""
379
-
380
- # airfoil = self.app_model.airfoil
381
-
382
- # if not os.path.isfile (airfoil.pathFileName_abs): return
383
-
384
- # text = f"Airfoil <b>{airfoil.fileName}</b> including temporary files will be deleted."
385
- # button = MessageBox.warning (self.stacked_panel, "Delete airfoil", text)
386
-
387
- # if button == QMessageBox.StandardButton.Ok:
388
-
389
- # self.delete_temp_files (silent=True)
390
- # os.remove (airfoil.pathFileName_abs) # remove airfoil
391
-
392
- # self._toast_message (f"Airfoil {airfoil.fileName} deleted", toast_style=style.GOOD)
393
- # logger.info (f"Airfoil {airfoil.fileName} deleted")
394
-
395
- # next_airfoil = get_next_airfoil_in_dir (airfoil, example_if_none=True)
396
- # self.app_model.set_airfoil (next_airfoil) # try to set on next airfoil
397
-
398
- # if next_airfoil.isExample:
399
- # button = MessageBox.info (self.stacked_panel, "Delete airfoil", "This was the last airfoil in the directory.<br>" + \
400
- # "Showing Example airfoil")
401
-
377
+ def delete (self):
378
+ pass
402
379
 
403
380
  def delete_temp_files (self):
404
381
  """ delete all temp files and directories of current airfoil ..."""
@@ -416,7 +393,7 @@ class Mode_Modify (Mode_Abstract):
416
393
  self.wing.remove_tmp ()
417
394
  self.app_model.load_wing (self.wing.parm_pathFileName_abs) # reload wing for new strak etc.
418
395
 
419
- MessageBox.info (self.stacked_panel, "Delete Temp Files", "Temporary files removed")
396
+ self._toast_message ("Temporary files removed", toast_style=style.GOOD)
420
397
 
421
398
 
422
399
  def exit (self):
@@ -47,7 +47,7 @@ def calc_induced_velocities(aerogrid, Ma):
47
47
 
48
48
  # Step 1
49
49
  r1Xr2_x = r1y * r2z - r1z * r2y
50
- r1Xr2_y = -r1x * r2z + r1z * r2x # Plus-Zeichen Abweichung zu Katz & Plotkin ??
50
+ r1Xr2_y = -r1x * r2z + r1z * r2x # Sign deviation from Katz & Plotkin
51
51
  r1Xr2_z = r1x * r2y - r1y * r2x
52
52
  mod_r1Xr2 = (r1Xr2_x ** 2.0 + r1Xr2_y ** 2.0 + r1Xr2_z ** 2.0) ** 0.5
53
53
  # Step 2
@@ -1052,13 +1052,14 @@ class VLM_OpPoint:
1052
1052
 
1053
1053
  with open(pathFileName, 'w', newline='') as csvfile:
1054
1054
  fieldnames = ['y pos', 'Alpha ind', 'Alpha eff', 'Cl']
1055
+ meta_writer = csv.writer(csvfile, dialect='excel')
1055
1056
  writer = csv.DictWriter(csvfile, fieldnames=fieldnames, dialect='excel')
1056
1057
 
1057
- writer.writer.writerow(["PlanformCreator2"])
1058
- writer.writer.writerow([f"Wing Name :", f"{self.wing._planform_paneled.wing.name}"])
1059
- writer.writer.writerow([f"Speed :", f"{self.polar.vtas:.1f}"])
1060
- writer.writer.writerow([f"Alpha :", f"{self.alpha:.1f}"])
1061
- writer.writer.writerow([ ])
1058
+ meta_writer.writerow(["PlanformCreator2"])
1059
+ meta_writer.writerow([f"Wing Name :", f"{self.wing._planform_paneled.wing.name}"])
1060
+ meta_writer.writerow([f"Speed :", f"{self.polar.vtas:.1f}"])
1061
+ meta_writer.writerow([f"Alpha :", f"{self.alpha:.1f}"])
1062
+ meta_writer.writerow([ ])
1062
1063
 
1063
1064
  writer.writeheader()
1064
1065
 
@@ -1318,8 +1319,9 @@ class VLM_OpPoint:
1318
1319
  # interpolate cl value in airfoil polar base on alpha_eff
1319
1320
  Cl = np.interp(alpha_eff, airfoil_polar.alpha, airfoil_polar.cl) # 'normal' alpha0 of polar'
1320
1321
 
1321
- # calaculate the inviscid equivalence alpha0 based on '2*pi'
1322
- alpha0 = alpha_eff - Cl / 0.1097
1322
+ # calaculate the inviscid equivalence alpha0 based on '2*pi'
1323
+ INVISCID_LIFT_SLOPE = 0.1097 # Cl per degree (2*pi per radian = 0.1097 per degree)
1324
+ alpha0 = alpha_eff - Cl / INVISCID_LIFT_SLOPE
1323
1325
 
1324
1326
  sections_alpha0.append(alpha0)
1325
1327