Comments (1)
I discovered the problem I was having. If I'm understanding the code correctly, load_GDF
assumes that each point is contained on its own line, so each face consists of four lines before moving on to the next face. For example:
X1(1) Y1(1) Z1(1)
X2(1) Y2(1) Z2(1)
X3(1) Y3(1) Z3(1)
X4(1) Y4(1) Z4(1)
X2(1) Y2(1) Z2(1)
X2(2) Y2(2) Z3(2)
...
X4(nf) Y4(nf) Z4(nf)
My GDF file contains all four points of each face on one line:
X1(1) Y1(1) Z1(1) X2(1) Y2(1) Z2(1) X3(1) Y3(1) Z3(1) X4(1) Y4(1) Z4(1)
X1(2) Y1(2) Z1(2) X2(2) Y2(2) Z2(2) X3(2) Y3(2) Z3(2) X4(2) Y4(2) Z4(2)
...
X1(nf) Y1(nf) Z1(nf) X2(nf) Y2(nf) Z2(nf) X3(nf) Y3(nf) Z3(nf) X4(nf) Y4(nf) Z4(nf)
According to the WAMIT documentation, line breaks must exist between faces, but additional line breaks can also be used without effect, so either format above is acceptable. However, load_GDF
starts returning empty arrays once it reaches the end of the file with the second format because it is trying to read four times as many lines as the GDF file contains, resulting in the ValueError
I encountered.
I modified my local version of meshmagick.mmio.load_GDF
to generalize how it reads the points in the file so either format is acceptable (or really any format as long as there is a line break at the end of each face). I will create a pull request with my changes.
from meshmagick.
Related Issues (20)
- mistake in the cog calculation with shell inertia HOT 10
- Test is failling on master branch HOT 2
- NaN normals when writing mesh object to stl file HOT 3
- Converting - extension "dat" not found HOT 2
- Issue writing .DAT file (Diodore). HOT 1
- How to install for Python 3.7? HOT 1
- Python 3 implmentation and documentation HOT 2
- Hydrostatics for fully submerged body. HOT 4
- Getting Python error when calling meshmagick.hydrostatics.Hidrostatics() HOT 2
- Impossible to use CLI HOT 8
- ModuleNotFoundError: No module named 'meshmagick_cli' HOT 11
- conda/pip installation issues HOT 6
- Meshmagick not running with Anaconda HOT 2
- Meshmagick Hydrostatic Issue HOT 2
- Converting a mesh file HOT 7
- ModuleNotFoundError: No module named 'gmshparser' HOT 1
- Hydrostatic computations for submerged body
- Stiffness matrix and translation HOT 4
- gmsh v4 HOT 17
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from meshmagick.