booya-at / openglider Goto Github PK
View Code? Open in Web Editor NEWpython library to build paragliders
License: GNU General Public License v3.0
python library to build paragliders
License: GNU General Public License v3.0
For 2d repr of lines we maybe want to mirror some line layers. To apply changes to one attachment point also to others we can use a linked att-point.
Ich fuchs mich mal in deinen Code rein... würde gerne mithelfen! Momentan funzts bei mir unter Ubuntu noch nicht, vtk gibt mir einen Symbol Error:
ImportError: Failed to import test module: visual_test_glider
Traceback (most recent call last):
File "/usr/lib/python2.7/unittest/loader.py", line 252, in _find_tests
module = self._get_module_from_name(name)
File "/usr/lib/python2.7/unittest/loader.py", line 230, in _get_module_from_name
import(name)
File "/home/lc1bseba/DEVELOP/OpenGlider/tests/visual_test_glider.py", line 30, in
import openglider.Graphics
File "/home/lc1bseba/DEVELOP/OpenGlider/openglider/Graphics/init.py", line 22, in
from openglider.Graphics.Functions import Graphics2D, Graphics3D, Graphics, Line, Point, Polygon, listlineplot, Axes, draw_glider
File "/home/lc1bseba/DEVELOP/OpenGlider/openglider/Graphics/Functions.py", line 22, in
import vtk
File "/usr/lib/pymodules/python2.7/vtk/init.py", line 43, in
from vtkIOPython import *
ImportError: /usr/lib/libvtkIOPythonD.so.5.8: undefined symbol: _ZN21vtkPostgreSQLDatabase3NewEv
Hi,
once I open the polars feature to create plots for aerodynamic calculations, the "create plots" button does not seem to have an effect. How can I check if there are plots created somewhere?
I am using conda 4.10.3 with Python 3.8.12 on macOS Catalina.
("Non-ASCII character '\xc3' in file /home/max/OpenGlider/freecad/freecad_glider/tools/init.py on line 54, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details", ('/home/max/OpenGlider/freecad/freecad_glider/tools/init.py', 54, 0, None))
Traceback (most recent call last):
File "/home/max/OpenGlider/freecad/freecad_glider/init_gui.py", line 101, in Initialize
from . import tools
I was wondering how was running the install process since you integrated freecad-glider with OpenGlider.
Everything ran smooth without warning, the workbench icon appears in Freecad, but when trying to launch it:
('invalid syntax', ('/home/max/OpenGlider/openglider/mesh/poly_tri.py', 401, 22, ' return [[*edge] for edge in zip(_tri[:-1], _tri[1:])]\n')) Traceback (most recent call last): File "/home/max/OpenGlider/freecad/freecad_glider/init_gui.py", line 101, in Initialize from . import tools File "/home/max/OpenGlider/freecad/freecad_glider/tools/__init__.py", line 15, in <module> from . import _glider as glider File "/home/max/OpenGlider/freecad/freecad_glider/tools/_glider.py", line 8, in <module> from openglider import mesh File "/home/max/OpenGlider/openglider/mesh/__init__.py", line 1, in <module> from openglider.mesh.mesh import Mesh, Vertex, Polygon File "/home/max/OpenGlider/openglider/mesh/mesh.py", line 12, in <module> from .poly_tri import PolyTri
Hello,
For kite design, that would be convenient to be able to put the pilot point further down than 10m.
Is there a technical reason for limiting this distance to 10m? If not, removing the limit would be a plus.
Mx
Do this!
Not sure if this issue is due to freecad_glider or openglider, but as most of the error are about Openglider I post it here:
with the last commits for both freecad_glider and openglider, the unwrap glider glider fails with this error:
Running the Python command 'PatternCommand' failed: Traceback (most recent call last): File "/usr/lib/freecad-daily/Mod/freecad/freecad_glider/tools/__init__.py", line 179, in Activated pat.unwrap(file_name, obj.Proxy.getGliderInstance()) File "/home/max/OpenGlider/openglider/plots/__init__.py", line 73, in unwrap plots.unwrap() File "/home/max/OpenGlider/openglider/plots/glider/__init__.py", line 169, in unwrap self.get_dribs() File "/home/max/OpenGlider/openglider/plots/glider/__init__.py", line 104, in get_dribs dribs = self._get_cellplotmaker(cell).get_dribs() File "/home/max/OpenGlider/openglider/plots/glider/cell.py", line 551, in get_dribs dribs.append(drib_plot.flatten(self.attachment_points)) File "/home/max/OpenGlider/openglider/plots/glider/cell.py", line 432, in flatten return self._flatten(attachment_points, self.config.drib_num_folds) File "/home/max/OpenGlider/openglider/plots/glider/cell.py", line 471, in _flatten self._insert_attachment_points(plotpart, attachment_points) File "/home/max/OpenGlider/openglider/plots/glider/cell.py", line 407, in _insert_attachment_points p1, p2 = self.get_left(attachment_point.rib_pos) File "/home/max/OpenGlider/openglider/plots/glider/cell.py", line 334, in get_left return self.get_p1_p2(x, side=0) File "/home/max/OpenGlider/openglider/plots/glider/cell.py", line 381, in get_p1_p2 assert front[0] <= x <= back[0]
We need this to make it possible to:
Let's get rid of all those print statements and use logging where needed....
Do this with cython and gain 100x speed!!!
Da hat sich was verändert... Sollts nicht die erste rippe gespiegelt zurückgeben?
def get_rib_point(self, rib_num, x):
ribs = list(self.ribs)
+ if self.has_centere_cell:
+ ribs = ribs[0] * np.array([-1,1]) + ribs
rib = ribs[rib_no]
return numpy.array([rib[0][0], rib[0][1] + x * (rib[1][1] - rib[0][1])])
Hello! it looks like glider might be causing issues in the freecad weekly bundle?
If i can help in any way lmk!
nothing is really working yet, fatal bug!
mirroring rib after adding the elements should prevent the jumping of rib elements.
I was installing using pip install -e .
and then manually installing the dependencies, and this was the library it needed to run the testall.py.
I was trying to avoid the conda install route, because I can't tell where it will load the project from and where it would put it, or how out of date that version would be. Nevertheless I had to do this as there were no instructions for how to get this code to show up as a FreeCAD workbench.
It would be very useful to see ribs lengths and nose position real-time in a shape tool.
The same way as in the AOA tool or in the SpanMappingTool.
Trying to realize how to add this feature.
a glider can't fly without lines! there is missing a graphical line input tool!!!
Hello,
Hello, I have a weird issue, not sure it related to OpenGlider... but I ask anyway:
The workbench seems to work ok, but on any tool that needs to work with the mouse (shape, lines, design, etc...) I can't select any item.
When I click on a point, the cursor change from an arrow to the hand, but the point isn't catched, and I can't move anything...
Last commit working on Freecad-daily
Hay,
könntet ihr eine etwas detailliertere Beschreibung des grundlegenden Konzepts - z.B. ins Readme - schreiben?
Folgende Fragen sollten beantwortet werden:
Wie stellt ihr euch den Designprozess in Einzelschritten vor?
Wie funktioniert dabei die Klassen-/Objektstruktur, wie unterstützt sie den Designer (Vielleicht in einem Diagramm darstellen...)?
Welche automatisierten Funktionen gibt es / sind geplant? (z.B. Ballooning mit FEM/CFD Kopplung ausrechnen, Modul für Export/Meshing/Sim in XFoil/OpenFOAM, Abwicklung der gekrümmten Flächen auf ebene Schnittmuster, Nahtzugabe...)
Wichtig wäre dabei nicht nur der jetzige Stand sonder auch eure Vision im Detail. So können potenzielle Mit-Programmierer besser an einem gemeinsamen Ziel arbeiten :-)
Da das Projekt ja im Endeffekt ziemlich umfangreich ist, wäre vielleicht auch ein Wiki nicht schlecht, in das alle Entwickler eine detailliertere Beschreibung ihrer Module/Klassen reinschreiben könnten.
Hello,
The scale glider function seems to make a perfect full homothetic. Including the width of the attachment points. (harness chest belt length for paraglider). But this specific lenght isn't homothetic (as well as the risers length).
It would be great if when scaling, we could at least keep it fixed, or better, parametrize this one (second parameter for the two main points in the create/modify line function)
The current Instructions on installing and using the package are very incomplete. Please add instructions on using the packages after installation.
It would be more versatile if the cut pattern were converted into FreeCAD Sketcher instead of being dumped into a several DXF file that can only be seen using another system, like LibreCAD. Then it would be available for further processing.
I was able to load it back into FC using my DXF_to_Sketch_layers macro. The relevant function to use is here.
If the cut pattern were in FreeCAD I'll will have more reasons to finish porting across features from my javascript-web-based laserplacer into the Path workbench so that it can output the output codes used by the laser cutter.
The Laserplacer is actually used by @trilbytim to place and cut sails at Avian Hang Gliders from DXF designs in LibreCAD, but it should be part of FreeCAD instead of being a stand-alone unfinished program that will eventually be too out of date to use. The laser cutter he uses has a 15m long bed, draws pen lines as well as cuts, and is the same one as seen on videos of paraglider manufacturing.
It was actually able to load an OpenGlider output file, but the layers and colours are not in the form expected, so I couldn't test whether the algorithms could group the cuts and pen-markings into their proper closed contour pieces.
Last time I worked on this I met some significant challenges with FreeCAD development (eg not being able to pip install ezdxf). Maybe someone here could advise me about work-arounds and outline how best to approach the steps I need to solve in order to produce something that can be used more generally for any laser cutting layout. I would prefer to spend my time working on the contour grouping algorithms instead of trying to beat the FreeCAD system in ways it cannot be beat!
I just had the exact same error as #68,
At the end, it throws Cannot normalize a vector of length 0.0
... but I found that it happens under a specific process: ...->unwrap->modify->unwrap
On Ubuntu 21.10, FreeCAD FreeCAD_0.19.3-Linux-Conda_glibc2.12-x86_64.AppImage
To be clear:
I add the default glider, unwrap it, it works.
Then I modify it and try to unwrap, it fails.
From there, if I create a new document and add a new glider and unwrap, it fails.
If I quit and relaunch FreeCAD, add default glider, MODIFY it and unwrap it works.
If I modify it again and unwrap it fails.
If I now save the (failing) glider, quit and relaunch FreeCAD, open the saved glider and unwrap it works ...
So unwrap might write something somewhere at first unwrap that is read at second unwrap, if you modify something in between unwraps, it fails.
Only saving, quitting FreeCAD and reopening to unwrap again works (it basically can't read the previous unwrap var somewhere).
But you know you can't unwrap anymore after this one, you'd better be sure you want to unwrap it :)
make a simple unwrap gui-command to show the unwraped glider in freecad.
for your reference:
http://xkcd.com/1296/
Fix This!
Hi,
thank you for providing this very nice toolbox :)
By the way, I am also a paragliding pilot located in Tyrol.
I installed OpenGliger via conda
as explained in the Readme. However I couldn't get freecad
running as it returned
dyld: Library not loaded: @rpath/libcurl.4.dylib
Reason: Incompatible library version: libxerces-c-3.2.dylib requires version 12.0.0 or later, but libcurl.4.dylib provides version 11.0.0
Abort trap: 6
This issue could be resolved by running
conda update curl
This might be fixed by requesting the newst version of curl
as a dependency?
I am using conda 4.10.3 with Python 3.8.12 on macOS Catalina.
Unwrapping was working so far, but since the 2 last updates:
float() argument must be a string or a number, not 'NoneType'Running the Python command 'PatternCommand' failed:
Traceback (most recent call last):
File "/miniconda3/envs/freecad/lib/python3.9/site-packages/freecad/freecad_glider/tools/init.py", line 167, in Activated
pat.unwrap(file_name, obj.Proxy.getGliderInstance())
File "/miniconda3/envs/freecad/lib/python3.9/site-packages/openglider/plots/patterns.py", line 157, in unwrap
super().unwrap(outdir)
File "/miniconda3/envs/freecad/lib/python3.9/site-packages/openglider/plots/patterns.py", line 112, in unwrap
all_patterns = self._get_plotfile()
File "/miniconda3/envs/freecad/lib/python3.9/site-packages/openglider/plots/patterns.py", line 89, in _get_plotfile
plots.unwrap()
File "/miniconda3/envs/freecad/lib/python3.9/site-packages/openglider/plots/glider/init.py", line 164, in unwrap
self.get_ribs()
File "/miniconda3/envs/freecad/lib/python3.9/site-packages/openglider/plots/glider/init.py", line 84, in get_ribs
rib_plot.flatten(self.glider_3d)
File "/miniconda3/envs/freecad/lib/python3.9/site-packages/openglider/plots/glider/ribs.py", line 228, in flatten
return super(SingleSkinRibPlot, self).flatten(glider)
File "/miniconda3/envs/freecad/lib/python3.9/site-packages/openglider/plots/glider/ribs.py", line 83, in flatten
self.draw_rib(glider)
File "/miniconda3/envs/freecad/lib/python3.9/site-packages/openglider/plots/glider/ribs.py", line 250, in draw_rib
single_skin_cut = self.rib.profile_2d(singleskin_cut_left)
File "/miniconda3/envs/freecad/lib/python3.9/site-packages/openglider/airfoil/profile_2d.py", line 49, in call
xval = float(xval)
float() argument must be a string or a number, not 'NoneType'
Not sure if this is the right place, but I was surprised to see this very cool but very specific workbench in the default and active workbenches of my Freecad 0.19dev appimage install.
It doesn't appear in the addons manager, and can't be deactivated.
Please close this if I'm the only one or if you can't do anything about it, and keep up the good work!
Not sure if this is a correct result. Any ideas? @hiaselhans
11:51:44 Running the Python command 'CreateGlider' failed:
Traceback (most recent call last):
File "/home/gerrie/.local/lib/python3.8/site-packages/freecad/freecad_glider/tools/init.py", line 142, in Activated
CreateGlider.create_glider()
File "/home/gerrie/.local/lib/python3.8/site-packages/freecad/freecad_glider/tools/init.py", line 132, in create_glider
vp.updateData()
File "/home/gerrie/.local/lib/python3.8/site-packages/freecad/freecad_glider/tools/glider.py", line 415, in updateData
self._updateData(self.view_obj, prop)
File "/home/gerrie/.local/lib/python3.8/site-packages/freecad/freecad_glider/tools/glider.py", line 456, in _updateData
self.update_glider(midribs=fp.num_ribs,
File "/home/gerrie/.local/lib/python3.8/site-packages/freecad/freecad_glider/tools/glider.py", line 474, in update_glider
draw_glider(self.glider, vis_glider=self.vis_glider, midribs=midribs,
File "/home/gerrie/.local/lib/python3.8/site-packages/freecad/freecad_glider/tools/glider.py", line 588, in draw_glider
msh += diagonal.get_mesh(cell, insert_points=4)
File "/home/gerrie/.local/lib/python3.8/site-packages/openglider/glider/cell/elements.py", line 155, in get_mesh
line_points.append(left[x_pos * (num_left - 1)] * (1. - y_pos) +
'openglider_cpp.euklid.PolyLine3D' object is not subscriptable
configuration is
OS: Ubuntu 20.04.3 LTS (ubuntu:GNOME/ubuntu)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.
Build type: Release
Branch: unknown
Hash: 0d9536ed3e8c7f40197b5606e1b7873625e1d6fe
Python version: 3.8.10
Qt version: 5.12.8
Coin version: 4.0.0
OCC version: 7.5.2
Locale: English/United Kingdom (en_GB)
Having an issue on my Ubuntu and OSX installation of openglider when trying to import or export via Freecad Gui.
I get the following error...
"
23:30:28 Running the Python command G12dExport' failed: Traceback (most recent call last): I
File "/home/james/miniconda3/envs/openglider/lib/python3.10/site-packages/
freecad/freecad glider/tools/ init py", line 118, in Activated tools.export glider (glider 2d, glider_3d) File "/home/james/miniconda3/envs/openglider/lib/python3.10/site-packages/ freecad/freecad glider/tools/tools.py", line 123, in export glider filename = QtGui.QFileDialog.getSaveFileName(
PySide2 Qtwidgets.QFileDialog.getSaveFileName(): unsupported keyword 'directory App::FeaturePython object>
"
Suspect it is probably an issue with my installation and dependencies?
Any help appreciated
Hi,
I am struggling exporting a paraglider mesh. I've tried dae, obj, dxf, stl but everytime it looks like some lib required by MeshPart is missing. This is the error I'm getting:
File "", line 3, in
File "C:\Users\Acacia\miniconda3\envs\openglider\Library\Mod\Arch\importOBJ.py", line 22, in
import FreeCAD, DraftGeomUtils, Part, Draft, Arch, Mesh, MeshPart, os, sys
<class 'ImportError'>: DLL load failed while importing MeshPart: La procédure spécifiée est introuvable.
Setup is FreeCAD 0.19.2 on Windows 10 using miniconda3 with python 3.7.
I installed openglider using miniconda by following the instructions described here: https://booya-at.github.io/openglider-tutorial/00_installation.html
Also, I read that at some point there were FreeCAD bundles with the glider-workbench preinstalled, however I can't find any working download link for any of those and the few versions I've tried don't include the workbench. Could you provide a download link for one of those ? I would like to try if this fixes the issue.
Thanks, your work is amazing !
Running the Python command 'PatternCommand' failed:
Traceback (most recent call last):
File "/home/lo/projects/openglider/OpenGlider/freecad/freecad_glider/tools/__init__.py", line 167, in Activated
pat.unwrap(file_name, obj.Proxy.getGliderInstance())
File "/home/lo/projects/openglider/OpenGlider/openglider/plots/patterns.py", line 153, in unwrap
super().unwrap(outdir)
File "/home/lo/projects/openglider/OpenGlider/openglider/plots/patterns.py", line 108, in unwrap
all_patterns = self._get_plotfile()
File "/home/lo/projects/openglider/OpenGlider/openglider/plots/patterns.py", line 89, in _get_plotfile
plots.unwrap()
File "/home/lo/projects/openglider/OpenGlider/openglider/plots/glider/__init__.py", line 164, in unwrap
self.get_ribs()
File "/home/lo/projects/openglider/OpenGlider/openglider/plots/glider/__init__.py", line 83, in get_ribs
rib_plot.flatten(self.glider_3d)
File "/home/lo/projects/openglider/OpenGlider/openglider/plots/glider/ribs.py", line 43, in flatten
self.outer = self.inner.copy().add_stuff(self.config.allowance_general)
File "/home/lo/projects/openglider/OpenGlider/openglider/vector/polyline.py", line 355, in add_stuff
newlist.append(second + self.normvectors[i] * amount / cosphi)
File "/home/lo/projects/openglider/OpenGlider/openglider/utils/cache.py", line 60, in __get__
res = self.function(parentclass)
File "/home/lo/projects/openglider/OpenGlider/openglider/vector/polyline.py", line 283, in normvectors
rotate(self.data[j + 1] - self.data[j - 1]))
File "/home/lo/projects/openglider/OpenGlider/openglider/vector/polyline.py", line 278, in <lambda>
rotate = lambda x: normalize(x).dot([[0, -1], [1, 0]])
File "/home/lo/projects/openglider/OpenGlider/openglider/vector/functions.py", line 26, in normalize
raise ValueError("Cannot normalize a vector of length Zero")
I'm having trouble installing it on Windows 10 because I follow the steps but the paraglider icon doesn't appear in Freecad
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.