Coder Social home page Coder Social logo

mathlab / pygem Goto Github PK

View Code? Open in Web Editor NEW
327.0 25.0 116.0 27.42 MB

Python Geometrical Morphing

Home Page: http://mathlab.github.io/PyGeM/

License: Other

Python 95.67% Shell 0.39% Dockerfile 0.87% TeX 3.07%
iges stl-files vtk free-form-deformation radial-basis-function inverse-distance-weighting unv-files step-files keyword-files elmer

pygem's Introduction

Python Geometrical Morphing

Software License Build Status Coverage Status Codacy Badge Docker Pulls

PyGeM (Python Geometrical Morphing) is a python package that allows you to deform a given geometry or mesh with different deformation techniques such as FFD, RBF and IDW.

Table of contents

Description

PyGeM is a python package using Free Form Deformation, Radial Basis Functions and Inverse Distance Weighting to parametrize and morph complex geometries. It is ideally suited for actual industrial problems, since it allows to handle:

  • Computer Aided Design files (in .iges, .step, and .stl formats)
  • Mesh files (in .unv, Elmer, and OpenFOAM formats)
  • Output files (in .vtk format)
  • LS-Dyna Keyword files (.k format)

By now, it has been used with meshes with up to 14 milions of cells. Try with more and more complicated input files! See the Examples section below and the Tutorials to have an idea of the potential of this package.

Dependencies and installation

PyGeM requires numpy, scipy, matplotlib, sphinx (for the documentation) and pytest (for local test). They can be easily installed via pip. The code has been tested with Python3.7 version, but it should be compatible with a generic Python3.x. The Python2 support is no longer maintained. To enable the CAD submodule, the module pythonocc-core is required to deal with IGES files. This requirement cannot be satisfied through pip, but the precompiled binaries are available on conda using the command:

conda install -c conda-forge pythonocc-core=7.4.0

For additional information about the compilation and installation of pythonocc, we refer the original repository.

The official distribution is on GitHub, and you can clone the repository using

> git clone https://github.com/mathLab/PyGeM

To install the package just type:

> python setup.py install

To uninstall the package you have to rerun the installation and record the installed files in order to remove them:

> pip uninstall pygem

Docker

Alternatively, a way to run the PyGeM library is to use our prebuilt and high-performance Docker images. Docker containers are extremely lightweight, secure, and are based on open standards that run on all major Linux distributions, macOS and Microsoft Windows platforms.

Install Docker for your platform by following these instructions. If using the Docker Toolbox (macOS versions < 10.10 or Windows versions < 10), make sure you run all commands inside the Docker Quickstart Terminal.

Now we will pull the sissamathlab/pygem image from our cloud infrastructure:

>  docker pull sissamathlab/pygem:latest

Docker will pull the latest tag of the image pygemdocker/pygem from docker.io. The download is around 3.246 GB. The image is a great place to start experimenting with PyGeM and includes all dependencies already compiled for you. Once the download is complete you can start PyGeM for the first time. Just run:

>  docker run -ti  sissamathlab/pygem:latest

To facilitate the devoloping, using the text editor,version control and other tools already installed on your computers, it is possible to share files from the host into the container:

>  docker run -ti -v $(pwd):/home/PyGeM/shared  sissamathlab/pygem:latest

To allow the X11 forwarding in the container, on Linux system just run:

>  docker run -ti --rm -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix  -v $(pwd):/home/PyGeM/shared  sissamathlab/pygem:latest

For Windows system, you need to install Cygwin/X version and running the command in Cygwin terminal. While for mac system, you need to install xquartz.

Documentation

PyGeM uses Sphinx for code documentation. You can view the documentation online here. To build the html versions of the docs locally simply:

> cd docs
> make html

The generated html can be found in docs/build/html. Open up the index.html you find there to browse.

Testing

We are using Github Actions for continuous intergration testing. You can check out the current status here.

To run tests locally (the package pytest is required):

> pytest

Examples

You can find useful tutorials on how to use the package in the tutorials folder. Here we show three applications, taken from the naval, nautical and automotive engineering fields. On the other hand, the provided tutorials are related to easier geometries.

DTMB-5415 hull: morphing of the bulbous bow starting from an industrial .iges CAD file.

MCY hull: morphing of the exhaust gasses devices starting from an industrial .stl file.

DrivAer model: morphing of the bumper starting from an OpenFOAM mesh file.

How to cite

If you use this package in your publications please cite the package as follows:

@article{TezzeleDemoMolaRozza2020PyGeM,
author = {Marco Tezzele and Nicola Demo and Andrea Mola and Gianluigi Rozza},
title = {{PyGeM: Python Geometrical Morphing}},
journal = {Software Impacts},
pages = {100047},
year = {2020},
issn = {2665-9638},
doi = {10.1016/j.simpa.2020.100047},
url = {http://www.sciencedirect.com/science/article/pii/S2665963820300385}
}

References

The deformations implemented are taken from the following papers:

  • Sieger, Menzel, Botsch. On Shape Deformation Techniques for Simulation-based Design Optimization. SEMA SIMAI Springer Series, 2015. [DOI], [pdf], [bibitem].

  • Forti, Rozza. Efficient geometrical parametrisation techniques of interfaces for reduced-order modelling: application to fluid–structure interaction coupling problems. International Journal of Computational Fluid Dynamics, 2014. [DOI], [bibitem].

  • Sieger, Menzel, Botsch. RBF Morphing Techniques for Simulation-based Design Optimization. M. Engineering with Computers, 2014. [DOI], [pdf], [bibitem].

  • Lombardi, Parolini, Quarteroni, Rozza. Numerical Simulation of Sailing Boats: Dynamics, FSI, and Shape Optimization. Springer Optimization and Its Applications, 2012. [DOI], [pdf], [bibitem].

Recent works with PyGeM

Here there is a list of the scientific works involving PyGeM you can consult and/or cite. If you want to add one, please open a PR.

  • Jiang, Mayeur, Patrouix, Cirette, Witz, Dumont, Brieu. Patient-Specific Modeling of Pelvic System from MRI for Numerical Simulation: Validation Using a Physical Model. Computational Biomechanics for Medicine. MICCAI 2019. [DOI].

  • Tezzele, Demo, Rozza. Shape optimization through proper orthogonal decomposition with interpolation and dynamic mode decomposition enhanced by active subspaces. In Proceedings of MARINE 2019: VIII International Conference on Computational Methods in Marine Engineering, pages 122-133, 2019. [DOI], [arXiv], [bibitem].

  • Demo, Tezzele, Mola, Rozza. A complete data-driven framework for the efficient solution of parametric shape design and optimisation in naval engineering problems. In Proceedings of MARINE 2019: VIII International Conference on Computational Methods in Marine Engineering, pages 111-121, 2019. [DOI], [arXiv], [bibitem].

  • Tezzele, Demo, Mola, Rozza. An integrated data-driven computational pipeline with model order reduction for industrial and applied mathematics. Submitted, 2018. [arXiv], [bibitem].

  • Tezzele, Salmoiraghi, Mola, Rozza. Dimension reduction in heterogeneous parametric spaces with application to naval engineering shape design problems. Advanced Modeling and Simulation in Engineering Sciences, 2018. [DOI], [arXiv], [bibitem].

  • Tezzele, Ballarin, Rozza. Combined parameter and model reduction of cardiovascular problems by means of active subspaces and POD-Galerkin methods. In Mathematical and Numerical Modeling of the Cardiovascular System and Applications. SEMA SIMAI Springer Series vol. 16, 2018. [DOI], [arXiv], [bibitem].

  • Salmoiraghi, Scardigli, Telib, Rozza. Free-form deformation, mesh morphing and reduced-order methods: enablers for efficient aerodynamic shape optimisation. International Journal of Computational Fluid Dynamics, 2018. [DOI], [arXiv], [bibitem].

  • Demo, Tezzele, Gustin, Lavini, Rozza. Shape optimization by means of proper orthogonal decomposition and dynamic mode decomposition. In Technology and Science for the Ships of the Future: Proceedings of NAV 2018: 19th International Conference on Ship & Maritime Research, 2018. [DOI], [arXiv], [bibitem].

  • Tezzele, Demo, Gadalla, Mola, Rozza. Model Order Reduction by means of Active Subspaces and Dynamic Mode Decomposition for Parametric Hull Shape Design Hydrodynamics. In Technology and Science for the Ships of the Future: Proceedings of NAV 2018: 19th International Conference on Ship & Maritime Research, 2018. [DOI], [arXiv], [bibitem].

  • Demo, Tezzele, Mola, Rozza. An efficient shape parametrisation by free-form deformation enhanced by active subspace for hull hydrodynamic ship design problems in open source environment. The 28th International Ocean and Polar Engineering Conference, 2018. [arXiv], [bibitem].

  • Bergmann, Ferrero, Iollo, Lombardi, Scardigli, Telib. A zonal Galerkin-free POD model for incompressible flows. Journal of Computational Physics, 2018. [DOI], [bibitem].

  • Salmoiraghi, Ballarin, Corsi, Mola, Tezzele, Rozza. Advances in geometrical parametrization and reduced order models and methods for computational fluid dynamics problems in applied sciences and engineering: overview and perspectives. ECCOMAS 2016 proceedings. [DOI], [bibitem].

Authors and contributors

PyGeM is currently developed and mantained at SISSA mathLab by

under the supervision of Prof. Gianluigi Rozza. We thank Filippo Salmoiraghi for the original idea behind this package and the major contributions.

Contact us by email for further information or questions about PyGeM, or suggest pull requests. Contributions improving either the code or the documentation are welcome!

How to contribute

We'd love to accept your patches and contributions to this project. There are just a few small guidelines you need to follow.

Submitting a patch

  1. It's generally best to start by opening a new issue describing the bug or feature you're intending to fix. Even if you think it's relatively minor, it's helpful to know what people are working on. Mention in the initial issue that you are planning to work on that bug or feature so that it can be assigned to you.

  2. Follow the normal process of forking the project, and setup a new branch to work in. It's important that each group of changes be done in separate branches in order to ensure that a pull request only includes the commits related to that bug or feature.

  3. To ensure properly formatted code, please make sure to use 4 spaces to indent the code. The easy way is to run on your bash the provided script: ./code_formatter.sh. You should also run pylint over your code. It's not strictly necessary that your code be completely "lint-free", but this will help you find common style issues.

  4. Any significant changes should almost always be accompanied by tests. The project already has good test coverage, so look at some of the existing tests if you're unsure how to go about it. We're using coveralls that is an invaluable tools for seeing which parts of your code aren't being exercised by your tests.

  5. Do your best to have well-formed commit messages for each change. This provides consistency throughout the project, and ensures that commit messages are able to be formatted properly by various git tools.

  6. Finally, push the commits to your fork and submit a pull request. Please, remember to rebase properly in order to maintain a clean, linear git history.

License

See the LICENSE file for license rights and limitations (MIT).

pygem's People

Contributors

asartori86 avatar davidebaroliunilu avatar e-dub avatar fandreuz avatar fpichi avatar giadadalla avatar guglielmopadula avatar lukefarn1996 avatar maciekgroch avatar mahgadalla avatar matsubaradaisuke avatar mtezzele avatar ndem0 avatar quantifiedcode-bot avatar sc-ita avatar zjiang0529 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pygem's Issues

More advanced examples

It would be nice to have examples/notebooks that morph objects that are more complex than pipes.

More intuitive morphing default case

There could be a more intuitive way (programatically speaking) to morph the shapes that could be used as a default solution:

  • position the morphing vertices based on the bounding box
  • move the vertices

Prescribed deformation

Hi all, and thanks for this very promising tool.

I'm wondering wether PyGeM would be able to deform a 3D mesh, based on the prescribed motion of a body. That would be interesting in loosely coupled FSI problems, where the body is deformed by a structural solver, and this deformed body then needs to be simulated with a fluid domain again.

Similarly for ship study it would enable one to deform a mesh based on the calculated attitude... Many applications !

Thanks for your reply.

Benoit Paillard

Installation..problem with GLIBCXX_3.4.21

Hello,
I try to install PyGem..with following this steps on CentOS7:

  1. install conda
  2. conda create --name gempy36 python=3.6
  3. conda activate gempy36
  4. conda install -c conda-forge -c dlr-sc -c pythonocc -c oce pythonocc-core==0.17 python=3.6
  5. python -m pip install alla packages ( numpy, scipy, matplotlib, vtk, numpy-stl, sphinx and nose)
  6. python test.py

!! Error..with :

ImportError: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by /home/gghe/.conda/envs/gempy36/lib/python3.6/site-packages/OCC/_BRep.so)

======================================================================
ERROR: Failure: ModuleNotFoundError (No module named '_BRep')

Traceback (most recent call last):
File "/home/gghe/.conda/envs/gempy36/lib/python3.6/site-packages/OCC/BRep.py", line 18, in swig_import_helper
return importlib.import_module(mname)
File "/home/gghe/.conda/envs/gempy36/lib/python3.6/importlib/init.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 994, in _gcd_import
File "", line 971, in _find_and_load
File "", line 955, in _find_and_load_unlocked
File "", line 658, in _load_unlocked
File "", line 571, in module_from_spec
File "", line 922, in create_module
File "", line 219, in _call_with_frames_removed
ImportError: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by /home/gghe/.conda/envs/gempy36/lib/python3.6/site-packages/OCC/_BRep.so)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/gghe/.conda/envs/gempy36/lib/python3.6/site-packages/nose/failure.py", line 39, in runTest
raise self.exc_val.with_traceback(self.tb)
File "/home/gghe/.conda/envs/gempy36/lib/python3.6/site-packages/nose/loader.py", line 418, in loadTestsFromName
addr.filename, addr.module)
File "/home/gghe/.conda/envs/gempy36/lib/python3.6/site-packages/nose/importer.py", line 47, in importFromPath
return self.importFromDir(dir_path, fqname)
File "/home/gghe/.conda/envs/gempy36/lib/python3.6/site-packages/nose/importer.py", line 94, in importFromDir
mod = load_module(part_fqname, fh, filename, desc)
File "/home/gghe/.conda/envs/gempy36/lib/python3.6/imp.py", line 235, in load_module
return load_source(name, filename, file)
File "/home/gghe/.conda/envs/gempy36/lib/python3.6/imp.py", line 172, in load_source
module = _load(spec)
File "", line 684, in _load
File "", line 665, in _load_unlocked
File "", line 678, in exec_module
File "", line 219, in _call_with_frames_removed
File "/home/gghe/Py/PyGeM/tests/test_stlhandler.py", line 3, in
import pygem.stlhandler as sh
File "/home/gghe/Py/PyGeM/pygem/init.py", line 19, in
from .nurbshandler import NurbsHandler
File "/home/gghe/Py/PyGeM/pygem/nurbshandler.py", line 9, in
from OCC.BRep import BRep_Tool, BRep_Builder, BRep_Tool_Curve
File "/home/gghe/.conda/envs/gempy36/lib/python3.6/site-packages/OCC/BRep.py", line 21, in
_BRep = swig_import_helper()
File "/home/gghe/.conda/envs/gempy36/lib/python3.6/site-packages/OCC/BRep.py", line 20, in swig_import_helper
return importlib.import_module('_BRep')
File "/home/gghe/.conda/envs/gempy36/lib/python3.6/importlib/init.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
ModuleNotFoundError: No module named '_BRep'

======================================================================
ERROR: Failure: ModuleNotFoundError (No module named '_BRep')

Traceback (most recent call last):
File "/home/gghe/.conda/envs/gempy36/lib/python3.6/site-packages/OCC/BRep.py", line 18, in swig_import_helper
return importlib.import_module(mname)
File "/home/gghe/.conda/envs/gempy36/lib/python3.6/importlib/init.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 994, in _gcd_import
File "", line 971, in _find_and_load
File "", line 955, in _find_and_load_unlocked
File "", line 658, in _load_unlocked
File "", line 571, in module_from_spec
File "", line 922, in create_module
File "", line 219, in _call_with_frames_removed
ImportError: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by /home/gghe/.conda/envs/gempy36/lib/python3.6/site-packages/OCC/_BRep.so)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/gghe/.conda/envs/gempy36/lib/python3.6/site-packages/nose/failure.py", line 39, in runTest
raise self.exc_val.with_traceback(self.tb)
File "/home/gghe/.conda/envs/gempy36/lib/python3.6/site-packages/nose/loader.py", line 418, in loadTestsFromName
addr.filename, addr.module)
File "/home/gghe/.conda/envs/gempy36/lib/python3.6/site-packages/nose/importer.py", line 47, in importFromPath
return self.importFromDir(dir_path, fqname)
File "/home/gghe/.conda/envs/gempy36/lib/python3.6/site-packages/nose/importer.py", line 94, in importFromDir
mod = load_module(part_fqname, fh, filename, desc)
File "/home/gghe/.conda/envs/gempy36/lib/python3.6/imp.py", line 235, in load_module
return load_source(name, filename, file)
File "/home/gghe/.conda/envs/gempy36/lib/python3.6/imp.py", line 172, in load_source
module = _load(spec)
File "", line 684, in _load
File "", line 665, in _load_unlocked
File "", line 678, in exec_module
File "", line 219, in _call_with_frames_removed
File "/home/gghe/Py/PyGeM/tests/test_unvhandler.py", line 3, in
import pygem.unvhandler as uh
File "/home/gghe/Py/PyGeM/pygem/init.py", line 19, in
from .nurbshandler import NurbsHandler
File "/home/gghe/Py/PyGeM/pygem/nurbshandler.py", line 9, in
from OCC.BRep import BRep_Tool, BRep_Builder, BRep_Tool_Curve
File "/home/gghe/.conda/envs/gempy36/lib/python3.6/site-packages/OCC/BRep.py", line 21, in
_BRep = swig_import_helper()
File "/home/gghe/.conda/envs/gempy36/lib/python3.6/site-packages/OCC/BRep.py", line 20, in swig_import_helper
return importlib.import_module('_BRep')
File "/home/gghe/.conda/envs/gempy36/lib/python3.6/importlib/init.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
ModuleNotFoundError: No module named '_BRep'

======================================================================
ERROR: Failure: ModuleNotFoundError (No module named '_BRep')

Traceback (most recent call last):
File "/home/gghe/.conda/envs/gempy36/lib/python3.6/site-packages/OCC/BRep.py", line 18, in swig_import_helper
return importlib.import_module(mname)
File "/home/gghe/.conda/envs/gempy36/lib/python3.6/importlib/init.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 994, in _gcd_import
File "", line 971, in _find_and_load
File "", line 955, in _find_and_load_unlocked
File "", line 658, in _load_unlocked
File "", line 571, in module_from_spec
File "", line 922, in create_module
File "", line 219, in _call_with_frames_removed
ImportError: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by /home/gghe/.conda/envs/gempy36/lib/python3.6/site-packages/OCC/_BRep.so)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/gghe/.conda/envs/gempy36/lib/python3.6/site-packages/nose/failure.py", line 39, in runTest
raise self.exc_val.with_traceback(self.tb)
File "/home/gghe/.conda/envs/gempy36/lib/python3.6/site-packages/nose/loader.py", line 418, in loadTestsFromName
addr.filename, addr.module)
File "/home/gghe/.conda/envs/gempy36/lib/python3.6/site-packages/nose/importer.py", line 47, in importFromPath
return self.importFromDir(dir_path, fqname)
File "/home/gghe/.conda/envs/gempy36/lib/python3.6/site-packages/nose/importer.py", line 94, in importFromDir
mod = load_module(part_fqname, fh, filename, desc)
File "/home/gghe/.conda/envs/gempy36/lib/python3.6/imp.py", line 235, in load_module
return load_source(name, filename, file)
File "/home/gghe/.conda/envs/gempy36/lib/python3.6/imp.py", line 172, in load_source
module = _load(spec)
File "", line 684, in _load
File "", line 665, in _load_unlocked
File "", line 678, in exec_module
File "", line 219, in _call_with_frames_removed
File "/home/gghe/Py/PyGeM/tests/test_vtkhandler.py", line 3, in
import pygem.vtkhandler as vh
File "/home/gghe/Py/PyGeM/pygem/init.py", line 19, in
from .nurbshandler import NurbsHandler
File "/home/gghe/Py/PyGeM/pygem/nurbshandler.py", line 9, in
from OCC.BRep import BRep_Tool, BRep_Builder, BRep_Tool_Curve
File "/home/gghe/.conda/envs/gempy36/lib/python3.6/site-packages/OCC/BRep.py", line 21, in
_BRep = swig_import_helper()
File "/home/gghe/.conda/envs/gempy36/lib/python3.6/site-packages/OCC/BRep.py", line 20, in swig_import_helper
return importlib.import_module('_BRep')
File "/home/gghe/.conda/envs/gempy36/lib/python3.6/importlib/init.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
ModuleNotFoundError: No module named '_BRep'


Ran 28 tests in 0.099s

FAILED (errors=28)

any suggestions..please?

Cheers,
David

Issue to run PyGeM test

Hello,
For an internship I have to use PyGeM library. I downloaded it an go through the installation file without any problems (installed Anaconda3, all packages needed). But when I wanted to run the 'test.py' file, I had the error 'ModuleNotFoundError (No module named 'OCC.Core')'
I used the command line to install packages :
conda install -c conda-forge -c dlr-sc -c pythonocc -c oce pythonocc-core==0.17 python=3.6
I followed the instructions on the 'Read me' file to be sure to get it working well.
It has been 2 days I searched online how to fixed it but I'm kinda lost and that's why I'm requesting your help.
I precise I'm not familiar with programming or coding.
Thank you in advance

Thomas B

Installation problem with Dockerfile

Hi I'm matsubara

I Tried to build PyGeM with Dockerfile(Docker-compose)

But I failed the last Stage

RUN cd $HOME  && \
    cd build && \
    git clone https://github.com/mathLab/PyGeM.git   && \
    cd PyGeM && \
    python setup.py install

The error message is below

Running Pygments-2.6.1/setup.py -q bdist_egg --dist-dir /tmp/easy_install-ng2UJ4/Pygments-2.6.1/egg-dist-tmp-QnN2Vh
  File "build/bdist.linux-x86_64/egg/pygments/lexer.py", line 49
    class Lexer(metaclass=LexerMeta):
                         ^
SyntaxError: invalid syntax

  File "build/bdist.linux-x86_64/egg/pygments/formatters/html.py", line 554
    file=sys.stderr)
        ^
SyntaxError: invalid syntax

  File "build/bdist.linux-x86_64/egg/pygments/style.py", line 171
    class Style(metaclass=StyleMeta):
                         ^
SyntaxError: invalid syntax

  File "build/bdist.linux-x86_64/egg/pygments/cmdline.py", line 161
    print("%s not found!" % what, file=sys.stderr)
                                      ^
SyntaxError: invalid syntax

creating /usr/local/miniconda/lib/python2.7/site-packages/Pygments-2.6.1-py2.7.egg
Extracting Pygments-2.6.1-py2.7.egg to /usr/local/miniconda/lib/python2.7/site-packages
  File "/usr/local/miniconda/lib/python2.7/site-packages/Pygments-2.6.1-py2.7.egg/pygments/cmdline.py", line 161
    print("%s not found!" % what, file=sys.stderr)
                                      ^
SyntaxError: invalid syntax

  File "/usr/local/miniconda/lib/python2.7/site-packages/Pygments-2.6.1-py2.7.egg/pygments/lexer.py", line 49
    class Lexer(metaclass=LexerMeta):
                         ^
SyntaxError: invalid syntax

  File "/usr/local/miniconda/lib/python2.7/site-packages/Pygments-2.6.1-py2.7.egg/pygments/style.py", line 171
    class Style(metaclass=StyleMeta):
                         ^
SyntaxError: invalid syntax

  File "/usr/local/miniconda/lib/python2.7/site-packages/Pygments-2.6.1-py2.7.egg/pygments/formatters/html.py", line 554
    file=sys.stderr)
        ^
SyntaxError: invalid syntax

******

Traceback (most recent call last):
  File "setup.py", line 37, in <module>
    zip_safe=False)
  File "/usr/local/miniconda/lib/python2.7/site-packages/setuptools/__init__.py", line 145, in setup
    return distutils.core.setup(**attrs)
  File "/usr/local/miniconda/lib/python2.7/distutils/core.py", line 151, in setup
    dist.run_commands()
  File "/usr/local/miniconda/lib/python2.7/distutils/dist.py", line 953, in run_commands
    self.run_command(cmd)
  File "/usr/local/miniconda/lib/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
  File "/usr/local/miniconda/lib/python2.7/site-packages/setuptools/command/install.py", line 67, in run
    self.do_egg_install()
  File "/usr/local/miniconda/lib/python2.7/site-packages/setuptools/command/install.py", line 117, in do_egg_install
    cmd.run(show_deprecation=False)
  File "/usr/local/miniconda/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 424, in run
    self.easy_install(spec, not self.no_deps)
  File "/usr/local/miniconda/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 666, in easy_install
    return self.install_item(None, spec, tmpdir, deps, True)
  File "/usr/local/miniconda/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 713, in install_item
    self.process_distribution(spec, dist, deps)
  File "/usr/local/miniconda/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 758, in process_distribution
    [requirement], self.local_index, self.easy_install
  File "/usr/local/miniconda/lib/python2.7/site-packages/pkg_resources/__init__.py", line 782, in resolve
    replace_conflicting=replace_conflicting
  File "/usr/local/miniconda/lib/python2.7/site-packages/pkg_resources/__init__.py", line 1065, in best_match
    return self.obtain(req, installer)
  File "/usr/local/miniconda/lib/python2.7/site-packages/pkg_resources/__init__.py", line 1077, in obtain
    return installer(requirement)
  File "/usr/local/miniconda/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 685, in easy_install
    return self.install_item(spec, dist.location, tmpdir, deps)
  File "/usr/local/miniconda/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 711, in install_item
    dists = self.install_eggs(spec, download, tmpdir)
  File "/usr/local/miniconda/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 896, in install_eggs
    return self.build_and_install(setup_script, setup_base)
  File "/usr/local/miniconda/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 1164, in build_and_install
    self.run_setup(setup_script, setup_base, args)
  File "/usr/local/miniconda/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 1150, in run_setup
    run_setup(setup_script, args)
  File "/usr/local/miniconda/lib/python2.7/site-packages/setuptools/sandbox.py", line 253, in run_setup
    raise
  File "/usr/local/miniconda/lib/python2.7/contextlib.py", line 35, in __exit__
    self.gen.throw(type, value, traceback)
  File "/usr/local/miniconda/lib/python2.7/site-packages/setuptools/sandbox.py", line 195, in setup_context
    yield
  File "/usr/local/miniconda/lib/python2.7/contextlib.py", line 35, in __exit__
    self.gen.throw(type, value, traceback)
  File "/usr/local/miniconda/lib/python2.7/site-packages/setuptools/sandbox.py", line 166, in save_modules
    saved_exc.resume()
  File "/usr/local/miniconda/lib/python2.7/site-packages/setuptools/sandbox.py", line 141, in resume
    six.reraise(type, exc, self._tb)
  File "/usr/local/miniconda/lib/python2.7/site-packages/setuptools/sandbox.py", line 154, in save_modules
    yield saved
  File "/usr/local/miniconda/lib/python2.7/site-packages/setuptools/sandbox.py", line 195, in setup_context
    yield
  File "/usr/local/miniconda/lib/python2.7/site-packages/setuptools/sandbox.py", line 250, in run_setup
    _execfile(setup_script, ns)
  File "/usr/local/miniconda/lib/python2.7/site-packages/setuptools/sandbox.py", line 45, in _execfile
    exec(code, globals, locals)
  File "/tmp/easy_install-2ZicmT/Jinja2-3.0.0a1/setup.py", line 6, in <module>
    This function just return the content of README.md
  File "/usr/local/miniconda/lib/python2.7/site-packages/setuptools/sandbox.py", line 419, in _open
    return _open(path, mode, *args, **kw)
TypeError: 'encoding' is an invalid keyword argument for this function

Please check the Dockerfile
Thank you.

FFD of STEP file error

Applying PyGem FFD to a STEP file results in an error. Please, see example code at guillaume-florent@983c1e8

The modified STEP file does not seem to be a valid STEP file and crashes CAD softs like FreeCAD and Salome (no geometrical data in the imported file).

No module named sphinx_rtd_theme

Building sphinx documentation on Windows/py27:

>cd docs
>make html
Running Sphinx v1.4.6

Exception occurred:
  File "conf.py", line 20, in <module>
ImportError: No module named sphinx_rtd_theme

FFD parameter files not found

I am trying to get my tutorials running again for LS-DYNA and Kratos (mdpa). I am having some problems with the new syntax.

I am following the documentation here:
https://mathlab.github.io/PyGeM/ffd.html

The following code is not working

ffd.read_parameters('../tests/test_datasets/parameters_test_ffd_pipe_unv_C0.prm')

which is not recognizing the file and then trying to write a new file, see ffd.py line 249 and then giving the following error:

AttributeError: 'str' object has no attribute 'write_parameters'

Even if I comment this section, further errors occur below.

Any tips or help here?

Add meta.py file

Move the package variable from __init__.py to meta.py as other mathLab packages

Error on CAD file comparison

======================================================================

FAIL: test_ffd_iges_pipe_mod_through_files (test_ffdcad.TestFFDCAD)

----------------------------------------------------------------------

Traceback (most recent call last):

  File "/home/travis/build/mathLab/PyGeM/tests/test_ffdcad.py", line 24, in test_ffd_iges_pipe_mod_through_files

    self.assertMultiLineEqual(ref[i], cre[i])

AssertionError: '9.29[16 chars]810629323,1.290550492E+03,9.343553199E+03,   0000005P0000794\n' != '9.29[16 chars]810629324,1.290550492E+03,9.343553199E+03,   0000005P0000794\n'

- 9.299036204E+03,606.810629323,1.290550492E+03,9.343553199E+03,   0000005P0000794

?                             ^

+ 9.299036204E+03,606.810629324,1.290550492E+03,9.343553199E+03,   0000005P0000794

?                             ^

======================================================================

FAIL: test_ffd_iges_pipe_mod_through_topods_shape (test_ffdcad.TestFFDCAD)

----------------------------------------------------------------------

Traceback (most recent call last):

  File "/home/travis/build/mathLab/PyGeM/tests/test_ffdcad.py", line 41, in test_ffd_iges_pipe_mod_through_topods_shape

    self.assertMultiLineEqual(ref[i], cre[i])

AssertionError: '-134.222119722,1.118290358E+03,8.227867561E+03,-247.97[24 chars]35\n' != '-134.222119721,1.118290358E+03,8.227867561E+03,-247.97[24 chars]35\n'

- -134.222119722,1.118290358E+03,8.227867561E+03,-247.970135629,   0000005P0000735

?              ^

+ -134.222119721,1.118290358E+03,8.227867561E+03,-247.970135629,   0000005P0000735

?              ^

----------------------------------------------------------------------

Ran 2 tests in 0.303s

Nose is required for testing

The nose testing framework is a required dependency for testing, but it's not documented:

>Miniconda2\python test.py
Traceback (most recent call last):
  File "test.py", line 3, in <module>
    import nose
ImportError: No module named nose

TestFFDCAD.test_ffd_step_pipe_mod_through_files

Describe the bug
The test_ffd_step_pipe_mod_through_files fails because extra information depending on the running machine are stored in the test file, making extremely difficult to use these kind of test in CI.

To Reproduce
python -m pytest tests/test_ffdcad.py

Output

___________________ TestFFDCAD.test_ffd_step_pipe_mod_through_files ___________________

self = <tests.test_ffdcad.TestFFDCAD testMethod=test_ffd_step_pipe_mod_through_files>

    def test_ffd_step_pipe_mod_through_files(self):
        ffd = FFD(None,30,30,30,1e-4)
        ffd.read_parameters(
            filename='tests/test_datasets/parameters_test_ffd_iges.prm')
        ffd('tests/test_datasets/test_pipe.step', 'test_pipe_result.step')
        with open('test_pipe_result.step', "r") as created, \
             open('tests/test_datasets/test_pipe_out_true.step', "r") as reference:
             ref = reference.readlines()[92:]
             cre = created.readlines()[92:]
>            self.assertEqual(len(ref),len(cre))
E            AssertionError: 12215 != 12216

tests/test_ffdcad.py:61: AssertionError

Additional context
Here the diff between test and tested files:

#49 = PERSON('IP147.122.112,ndemo','286','Nicola',('Demo,A-70 | #49 = PERSON('IP127.0.1,amola','Mola,,,','Andrea',$,$,$);
    '3787'),$,$);                                             | #50 = ORGANIZATION('IP127.0.1','Unspecified','');
#50 = ORGANIZATION('IP147.122.112','Unspecified','');         <
#51 = PERSON_AND_ORGANIZATION_ROLE('creator');                  #51 = PERSON_AND_ORGANIZATION_ROLE('creator');

khandler not working

#187 makes changes to original khandler resulting inablility to read in file. Revert to old code previous to this commit?

See tutorial-6-k.py to reproduce the following error:

  File ~/opt/PyGeM/tutorials/tutorial-6-k.py", line 14, in <module>
    new_mesh_points = ffd(mesh_points)

  File "/usr/local/lib/python3.8/dist-packages/pygem-2.0.0-py3.8.egg/pygem/ffd.py", line 560, in __call__
    src_reference_frame_pts = self.psi(src_pts - self.box_origin)

ValueError: operands could not be broadcast together with shapes (0,) (3,) 

Problem in reading stl from exemple 5

Hello, i am currently interesting in using stl files, i tryed exemple 5 but when i run it i got an error with
stl_content = io.STLHandler.read(stl_filename)

telling that :
File "/home/lcalmett/Documents/untitled0.py", line 67, in
stl_content = io.STLHandler.read(stl_filename)

File "/home/lcalmett/anaconda3/envs/py37/lib/python3.7/site-packages/smithers-0.0.1-py3.7.egg/smithers/io/stlhandler.py", line 32, in read
result['points'] = cls.vtk_to_numpy(data.GetPoints().GetData())

AttributeError: 'NoneType' object has no attribute 'GetData'

the exemple 5 work perfetly for VTP files but not STL,
Do you have an idea to solve this issue?
Best regards,
Lucie

Conda package

Could you provide a conda package? That would make the installation very easy.

RuntimeError: Shapes not loaded.

The objective
I am trying to import .step file and do the deformation

Already tried tests
from pygem.cad import CADDeformation as CAD
CAD.read_shape('PEARLmesh_sharmi v1v5.step')

Error - RBF Deformation of UNV

In the latest version there seems to be an issue with RBF deformation of unv files. Loaded a case which was working 2 months ago, but doesn't in the latest update.

The error comes up, while reading the rbf parameter file, telling me that the number of control points is unequal to deformed points. In fact: number is the same. If I comment the typeerror in the params/rbf.py the error doesn't show up, but the geometry isn't deformed either.

What's wrong with latest rbf optimization?

Test issue

Followed the following instructions for installation :
The official distribution is on GitHub, and you can clone the repository using

git clone https://github.com/mathLab/PyGeM

To install the package just type:

python setup.py install

For testing the installation, used

python test.py

But got the following error,

`======================================================================
ERROR: Failure: ImportError (No module named OCC.BRep)

Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/nose/loader.py", line 418, in loadTestsFromName
addr.filename, addr.module)
File "/usr/lib/python2.7/dist-packages/nose/importer.py", line 47, in importFromPath
return self.importFromDir(dir_path, fqname)
File "/usr/lib/python2.7/dist-packages/nose/importer.py", line 94, in importFromDir
mod = load_module(part_fqname, fh, filename, desc)
File "/home/pomegranate/Documents/PyGeM/pygem/init.py", line 19, in
from .nurbshandler import NurbsHandler
File "/home/pomegranate/Documents/PyGeM/pygem/nurbshandler.py", line 9, in
from OCC.BRep import BRep_Tool, BRep_Builder, BRep_Tool_Curve
ImportError: No module named OCC.BRep

======================================================================
ERROR: Failure: ImportError (No module named OCC.BRep)

Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/nose/loader.py", line 418, in loadTestsFromName
addr.filename, addr.module)
File "/usr/lib/python2.7/dist-packages/nose/importer.py", line 47, in importFromPath
return self.importFromDir(dir_path, fqname)
File "/usr/lib/python2.7/dist-packages/nose/importer.py", line 94, in importFromDir
mod = load_module(part_fqname, fh, filename, desc)
File "/home/pomegranate/Documents/PyGeM/tests/test_affine.py", line 3, in
import pygem.affine as at
File "/home/pomegranate/Documents/PyGeM/pygem/init.py", line 19, in
from .nurbshandler import NurbsHandler
File "/home/pomegranate/Documents/PyGeM/pygem/nurbshandler.py", line 9, in
from OCC.BRep import BRep_Tool, BRep_Builder, BRep_Tool_Curve
ImportError: No module named OCC.BRep

======================================================================
ERROR: Failure: ImportError (No module named OCC.BRepAlgoAPI)

Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/nose/loader.py", line 418, in loadTestsFromName
addr.filename, addr.module)
File "/usr/lib/python2.7/dist-packages/nose/importer.py", line 47, in importFromPath
return self.importFromDir(dir_path, fqname)
File "/usr/lib/python2.7/dist-packages/nose/importer.py", line 94, in importFromDir
mod = load_module(part_fqname, fh, filename, desc)
File "/home/pomegranate/Documents/PyGeM/tests/test_ffdparams.py", line 6, in
from OCC.BRepAlgoAPI import BRepAlgoAPI_Cut
ImportError: No module named OCC.BRepAlgoAPI

======================================================================
ERROR: Failure: ImportError (No module named OCC.BRep)

Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/nose/loader.py", line 418, in loadTestsFromName
addr.filename, addr.module)
File "/usr/lib/python2.7/dist-packages/nose/importer.py", line 47, in importFromPath
return self.importFromDir(dir_path, fqname)
File "/usr/lib/python2.7/dist-packages/nose/importer.py", line 94, in importFromDir
mod = load_module(part_fqname, fh, filename, desc)
File "/home/pomegranate/Documents/PyGeM/tests/test_filehandler.py", line 5, in
import pygem.filehandler as fh
File "/home/pomegranate/Documents/PyGeM/pygem/init.py", line 19, in
from .nurbshandler import NurbsHandler
File "/home/pomegranate/Documents/PyGeM/pygem/nurbshandler.py", line 9, in
from OCC.BRep import BRep_Tool, BRep_Builder, BRep_Tool_Curve
ImportError: No module named OCC.BRep

======================================================================
ERROR: Failure: ImportError (No module named OCC.BRep)

Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/nose/loader.py", line 418, in loadTestsFromName
addr.filename, addr.module)
File "/usr/lib/python2.7/dist-packages/nose/importer.py", line 47, in importFromPath
return self.importFromDir(dir_path, fqname)
File "/usr/lib/python2.7/dist-packages/nose/importer.py", line 94, in importFromDir
mod = load_module(part_fqname, fh, filename, desc)
File "/home/pomegranate/Documents/PyGeM/tests/test_freeform.py", line 3, in
import pygem.freeform as ffd
File "/home/pomegranate/Documents/PyGeM/pygem/init.py", line 19, in
from .nurbshandler import NurbsHandler
File "/home/pomegranate/Documents/PyGeM/pygem/nurbshandler.py", line 9, in
from OCC.BRep import BRep_Tool, BRep_Builder, BRep_Tool_Curve
ImportError: No module named OCC.BRep

======================================================================
ERROR: Failure: ImportError (No module named OCC.BRep)

Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/nose/loader.py", line 418, in loadTestsFromName
addr.filename, addr.module)
File "/usr/lib/python2.7/dist-packages/nose/importer.py", line 47, in importFromPath
return self.importFromDir(dir_path, fqname)
File "/usr/lib/python2.7/dist-packages/nose/importer.py", line 94, in importFromDir
mod = load_module(part_fqname, fh, filename, desc)
File "/home/pomegranate/Documents/PyGeM/tests/test_idw.py", line 3, in
from pygem import IDW
File "/home/pomegranate/Documents/PyGeM/pygem/init.py", line 19, in
from .nurbshandler import NurbsHandler
File "/home/pomegranate/Documents/PyGeM/pygem/nurbshandler.py", line 9, in
from OCC.BRep import BRep_Tool, BRep_Builder, BRep_Tool_Curve
ImportError: No module named OCC.BRep

======================================================================
ERROR: Failure: ImportError (No module named OCC.BRep)

Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/nose/loader.py", line 418, in loadTestsFromName
addr.filename, addr.module)
File "/usr/lib/python2.7/dist-packages/nose/importer.py", line 47, in importFromPath
return self.importFromDir(dir_path, fqname)
File "/usr/lib/python2.7/dist-packages/nose/importer.py", line 94, in importFromDir
mod = load_module(part_fqname, fh, filename, desc)
File "/home/pomegranate/Documents/PyGeM/tests/test_idwparams.py", line 3, in
from pygem import IDWParameters
File "/home/pomegranate/Documents/PyGeM/pygem/init.py", line 19, in
from .nurbshandler import NurbsHandler
File "/home/pomegranate/Documents/PyGeM/pygem/nurbshandler.py", line 9, in
from OCC.BRep import BRep_Tool, BRep_Builder, BRep_Tool_Curve
ImportError: No module named OCC.BRep

======================================================================
ERROR: Failure: ImportError (No module named OCC.TopoDS)

Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/nose/loader.py", line 418, in loadTestsFromName
addr.filename, addr.module)
File "/usr/lib/python2.7/dist-packages/nose/importer.py", line 47, in importFromPath
return self.importFromDir(dir_path, fqname)
File "/usr/lib/python2.7/dist-packages/nose/importer.py", line 94, in importFromDir
mod = load_module(part_fqname, fh, filename, desc)
File "/home/pomegranate/Documents/PyGeM/tests/test_igeshandler.py", line 5, in
from OCC.TopoDS import TopoDS_Shape
ImportError: No module named OCC.TopoDS

======================================================================
ERROR: Failure: ImportError (No module named OCC.BRep)

Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/nose/loader.py", line 418, in loadTestsFromName
addr.filename, addr.module)
File "/usr/lib/python2.7/dist-packages/nose/importer.py", line 47, in importFromPath
return self.importFromDir(dir_path, fqname)
File "/usr/lib/python2.7/dist-packages/nose/importer.py", line 94, in importFromDir
mod = load_module(part_fqname, fh, filename, desc)
File "/home/pomegranate/Documents/PyGeM/tests/test_khandler.py", line 2, in
import pygem.khandler as uh
File "/home/pomegranate/Documents/PyGeM/pygem/init.py", line 19, in
from .nurbshandler import NurbsHandler
File "/home/pomegranate/Documents/PyGeM/pygem/nurbshandler.py", line 9, in
from OCC.BRep import BRep_Tool, BRep_Builder, BRep_Tool_Curve
ImportError: No module named OCC.BRep

======================================================================
ERROR: Failure: ImportError (No module named OCC.BRep)

Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/nose/loader.py", line 418, in loadTestsFromName
addr.filename, addr.module)
File "/usr/lib/python2.7/dist-packages/nose/importer.py", line 47, in importFromPath
return self.importFromDir(dir_path, fqname)
File "/usr/lib/python2.7/dist-packages/nose/importer.py", line 94, in importFromDir
mod = load_module(part_fqname, fh, filename, desc)
File "/home/pomegranate/Documents/PyGeM/tests/test_nurbshandler.py", line 3, in
from pygem.nurbshandler import NurbsHandler
File "/home/pomegranate/Documents/PyGeM/pygem/init.py", line 19, in
from .nurbshandler import NurbsHandler
File "/home/pomegranate/Documents/PyGeM/pygem/nurbshandler.py", line 9, in
from OCC.BRep import BRep_Tool, BRep_Builder, BRep_Tool_Curve
ImportError: No module named OCC.BRep

======================================================================
ERROR: Failure: ImportError (No module named OCC.BRep)

Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/nose/loader.py", line 418, in loadTestsFromName
addr.filename, addr.module)
File "/usr/lib/python2.7/dist-packages/nose/importer.py", line 47, in importFromPath
return self.importFromDir(dir_path, fqname)
File "/usr/lib/python2.7/dist-packages/nose/importer.py", line 94, in importFromDir
mod = load_module(part_fqname, fh, filename, desc)
File "/home/pomegranate/Documents/PyGeM/tests/test_openfhandler.py", line 3, in
import pygem.openfhandler as ofh
File "/home/pomegranate/Documents/PyGeM/pygem/init.py", line 19, in
from .nurbshandler import NurbsHandler
File "/home/pomegranate/Documents/PyGeM/pygem/nurbshandler.py", line 9, in
from OCC.BRep import BRep_Tool, BRep_Builder, BRep_Tool_Curve
ImportError: No module named OCC.BRep

======================================================================
ERROR: test_import_pg_1 (test_package.TestPackage)

Traceback (most recent call last):
File "/home/pomegranate/Documents/PyGeM/tests/test_package.py", line 10, in test_import_pg_1
import pygem as pg
File "/home/pomegranate/Documents/PyGeM/pygem/init.py", line 19, in
from .nurbshandler import NurbsHandler
File "/home/pomegranate/Documents/PyGeM/pygem/nurbshandler.py", line 9, in
from OCC.BRep import BRep_Tool, BRep_Builder, BRep_Tool_Curve
ImportError: No module named OCC.BRep

======================================================================
ERROR: test_import_pg_10 (test_package.TestPackage)

Traceback (most recent call last):
File "/home/pomegranate/Documents/PyGeM/tests/test_package.py", line 42, in test_import_pg_10
import pygem as pg
File "/home/pomegranate/Documents/PyGeM/pygem/init.py", line 19, in
from .nurbshandler import NurbsHandler
File "/home/pomegranate/Documents/PyGeM/pygem/nurbshandler.py", line 9, in
from OCC.BRep import BRep_Tool, BRep_Builder, BRep_Tool_Curve
ImportError: No module named OCC.BRep

======================================================================
ERROR: test_import_pg_11 (test_package.TestPackage)

Traceback (most recent call last):
File "/home/pomegranate/Documents/PyGeM/tests/test_package.py", line 46, in test_import_pg_11
import pygem as pg
File "/home/pomegranate/Documents/PyGeM/pygem/init.py", line 19, in
from .nurbshandler import NurbsHandler
File "/home/pomegranate/Documents/PyGeM/pygem/nurbshandler.py", line 9, in
from OCC.BRep import BRep_Tool, BRep_Builder, BRep_Tool_Curve
ImportError: No module named OCC.BRep

======================================================================
ERROR: test_import_pg_2 (test_package.TestPackage)

Traceback (most recent call last):
File "/home/pomegranate/Documents/PyGeM/tests/test_package.py", line 14, in test_import_pg_2
import pygem as pg
File "/home/pomegranate/Documents/PyGeM/pygem/init.py", line 19, in
from .nurbshandler import NurbsHandler
File "/home/pomegranate/Documents/PyGeM/pygem/nurbshandler.py", line 9, in
from OCC.BRep import BRep_Tool, BRep_Builder, BRep_Tool_Curve
ImportError: No module named OCC.BRep

======================================================================
ERROR: test_import_pg_3 (test_package.TestPackage)

Traceback (most recent call last):
File "/home/pomegranate/Documents/PyGeM/tests/test_package.py", line 18, in test_import_pg_3
import pygem as pg
File "/home/pomegranate/Documents/PyGeM/pygem/init.py", line 19, in
from .nurbshandler import NurbsHandler
File "/home/pomegranate/Documents/PyGeM/pygem/nurbshandler.py", line 9, in
from OCC.BRep import BRep_Tool, BRep_Builder, BRep_Tool_Curve
ImportError: No module named OCC.BRep

======================================================================
ERROR: test_import_pg_4 (test_package.TestPackage)

Traceback (most recent call last):
File "/home/pomegranate/Documents/PyGeM/tests/test_package.py", line 22, in test_import_pg_4
import pygem as pg
File "/home/pomegranate/Documents/PyGeM/pygem/init.py", line 19, in
from .nurbshandler import NurbsHandler
File "/home/pomegranate/Documents/PyGeM/pygem/nurbshandler.py", line 9, in
from OCC.BRep import BRep_Tool, BRep_Builder, BRep_Tool_Curve
ImportError: No module named OCC.BRep

======================================================================
ERROR: test_import_pg_5 (test_package.TestPackage)

Traceback (most recent call last):
File "/home/pomegranate/Documents/PyGeM/tests/test_package.py", line 26, in test_import_pg_5
import pygem as pg
File "/home/pomegranate/Documents/PyGeM/pygem/init.py", line 19, in
from .nurbshandler import NurbsHandler
File "/home/pomegranate/Documents/PyGeM/pygem/nurbshandler.py", line 9, in
from OCC.BRep import BRep_Tool, BRep_Builder, BRep_Tool_Curve
ImportError: No module named OCC.BRep

======================================================================
ERROR: test_import_pg_6 (test_package.TestPackage)

Traceback (most recent call last):
File "/home/pomegranate/Documents/PyGeM/tests/test_package.py", line 30, in test_import_pg_6
import pygem as pg
File "/home/pomegranate/Documents/PyGeM/pygem/init.py", line 19, in
from .nurbshandler import NurbsHandler
File "/home/pomegranate/Documents/PyGeM/pygem/nurbshandler.py", line 9, in
from OCC.BRep import BRep_Tool, BRep_Builder, BRep_Tool_Curve
ImportError: No module named OCC.BRep

======================================================================
ERROR: test_import_pg_7 (test_package.TestPackage)

Traceback (most recent call last):
File "/home/pomegranate/Documents/PyGeM/tests/test_package.py", line 34, in test_import_pg_7
import pygem as pg
File "/home/pomegranate/Documents/PyGeM/pygem/init.py", line 19, in
from .nurbshandler import NurbsHandler
File "/home/pomegranate/Documents/PyGeM/pygem/nurbshandler.py", line 9, in
from OCC.BRep import BRep_Tool, BRep_Builder, BRep_Tool_Curve
ImportError: No module named OCC.BRep

======================================================================
ERROR: test_import_pg_8 (test_package.TestPackage)

Traceback (most recent call last):
File "/home/pomegranate/Documents/PyGeM/tests/test_package.py", line 38, in test_import_pg_8
import pygem as pg
File "/home/pomegranate/Documents/PyGeM/pygem/init.py", line 19, in
from .nurbshandler import NurbsHandler
File "/home/pomegranate/Documents/PyGeM/pygem/nurbshandler.py", line 9, in
from OCC.BRep import BRep_Tool, BRep_Builder, BRep_Tool_Curve
ImportError: No module named OCC.BRep

======================================================================
ERROR: Failure: ImportError (No module named OCC.BRep)

Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/nose/loader.py", line 418, in loadTestsFromName
addr.filename, addr.module)
File "/usr/lib/python2.7/dist-packages/nose/importer.py", line 47, in importFromPath
return self.importFromDir(dir_path, fqname)
File "/usr/lib/python2.7/dist-packages/nose/importer.py", line 94, in importFromDir
mod = load_module(part_fqname, fh, filename, desc)
File "/home/pomegranate/Documents/PyGeM/tests/test_radial.py", line 3, in
import pygem.radial as rad
File "/home/pomegranate/Documents/PyGeM/pygem/init.py", line 19, in
from .nurbshandler import NurbsHandler
File "/home/pomegranate/Documents/PyGeM/pygem/nurbshandler.py", line 9, in
from OCC.BRep import BRep_Tool, BRep_Builder, BRep_Tool_Curve
ImportError: No module named OCC.BRep

======================================================================
ERROR: Failure: ImportError (No module named OCC.BRep)

Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/nose/loader.py", line 418, in loadTestsFromName
addr.filename, addr.module)
File "/usr/lib/python2.7/dist-packages/nose/importer.py", line 47, in importFromPath
return self.importFromDir(dir_path, fqname)
File "/usr/lib/python2.7/dist-packages/nose/importer.py", line 94, in importFromDir
mod = load_module(part_fqname, fh, filename, desc)
File "/home/pomegranate/Documents/PyGeM/tests/test_rbfparams.py", line 7, in
from pygem import RBFParameters
File "/home/pomegranate/Documents/PyGeM/pygem/init.py", line 19, in
from .nurbshandler import NurbsHandler
File "/home/pomegranate/Documents/PyGeM/pygem/nurbshandler.py", line 9, in
from OCC.BRep import BRep_Tool, BRep_Builder, BRep_Tool_Curve
ImportError: No module named OCC.BRep

======================================================================
ERROR: Failure: ImportError (No module named OCC.TopoDS)

Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/nose/loader.py", line 418, in loadTestsFromName
addr.filename, addr.module)
File "/usr/lib/python2.7/dist-packages/nose/importer.py", line 47, in importFromPath
return self.importFromDir(dir_path, fqname)
File "/usr/lib/python2.7/dist-packages/nose/importer.py", line 94, in importFromDir
mod = load_module(part_fqname, fh, filename, desc)
File "/home/pomegranate/Documents/PyGeM/tests/test_stephandler.py", line 5, in
from OCC.TopoDS import TopoDS_Shape
ImportError: No module named OCC.TopoDS

======================================================================
ERROR: Failure: ImportError (No module named OCC.BRep)

Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/nose/loader.py", line 418, in loadTestsFromName
addr.filename, addr.module)
File "/usr/lib/python2.7/dist-packages/nose/importer.py", line 47, in importFromPath
return self.importFromDir(dir_path, fqname)
File "/usr/lib/python2.7/dist-packages/nose/importer.py", line 94, in importFromDir
mod = load_module(part_fqname, fh, filename, desc)
File "/home/pomegranate/Documents/PyGeM/tests/test_stlhandler.py", line 3, in
import pygem.stlhandler as sh
File "/home/pomegranate/Documents/PyGeM/pygem/init.py", line 19, in
from .nurbshandler import NurbsHandler
File "/home/pomegranate/Documents/PyGeM/pygem/nurbshandler.py", line 9, in
from OCC.BRep import BRep_Tool, BRep_Builder, BRep_Tool_Curve
ImportError: No module named OCC.BRep

======================================================================
ERROR: Failure: ImportError (No module named OCC.BRep)

Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/nose/loader.py", line 418, in loadTestsFromName
addr.filename, addr.module)
File "/usr/lib/python2.7/dist-packages/nose/importer.py", line 47, in importFromPath
return self.importFromDir(dir_path, fqname)
File "/usr/lib/python2.7/dist-packages/nose/importer.py", line 94, in importFromDir
mod = load_module(part_fqname, fh, filename, desc)
File "/home/pomegranate/Documents/PyGeM/tests/test_unvhandler.py", line 3, in
import pygem.unvhandler as uh
File "/home/pomegranate/Documents/PyGeM/pygem/init.py", line 19, in
from .nurbshandler import NurbsHandler
File "/home/pomegranate/Documents/PyGeM/pygem/nurbshandler.py", line 9, in
from OCC.BRep import BRep_Tool, BRep_Builder, BRep_Tool_Curve
ImportError: No module named OCC.BRep

======================================================================
ERROR: Failure: ImportError (No module named OCC.BRep)

Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/nose/loader.py", line 418, in loadTestsFromName
addr.filename, addr.module)
File "/usr/lib/python2.7/dist-packages/nose/importer.py", line 47, in importFromPath
return self.importFromDir(dir_path, fqname)
File "/usr/lib/python2.7/dist-packages/nose/importer.py", line 94, in importFromDir
mod = load_module(part_fqname, fh, filename, desc)
File "/home/pomegranate/Documents/PyGeM/tests/test_vtkhandler.py", line 3, in
import pygem.vtkhandler as vh
File "/home/pomegranate/Documents/PyGeM/pygem/init.py", line 19, in
from .nurbshandler import NurbsHandler
File "/home/pomegranate/Documents/PyGeM/pygem/nurbshandler.py", line 9, in
from OCC.BRep import BRep_Tool, BRep_Builder, BRep_Tool_Curve
ImportError: No module named OCC.BRep


Ran 27 tests in 0.064s

FAILED (errors=27)
`

tl;dr installation

I would like to add a conda .yml environment file for easy hassle-free installation of the dependencies and tl;dr installation procedure in the documentation for beginners who just want to use PyGeM instantly.

fails to run testsuite with V2.0 on Debian/Testing

Hi,
I'm experiencing some troubles while running test for V2.0 release.
It seems that the cad python files are not installed and it leads to a lot of errors...

Is this behaviour normal? (or shall the files be installed?)
If this is normal why not removing tests involving importing modules from cad?
Moreover, it seems to me that files in cad do not reflect names of modules (except on system which are case insensitive)...

RBF applied to Cube with a hole

I try to use PyGeM with this demo:

demoRBF1.txt

The result shows that both the cube and hole are deformed, but the control points are only on the surface of the hole. So the cube should not change his shape. Are there some modifications to add in the src part?

Problems with complex geometric models (multiple faces and shells)

Hello Mr. Salmoiraghi and Mr. Tezzele,

We would like to thank you for providing this useful tool PyGeM.
In the context of our application, we intend to use several PyGeM functionalities for the geometric modelling of organs. However, we have encountered some problems because the processing involves complex geometries imported from CAD files (iges or step), which contain, for example, shells composed of multiple faces. These problems include:

  • importing multiple geometric entities (shells, faces etc.)
  • linking multiple geometric entities (linking edges into a single wire, trimming the surface with the wire, linking multiple surfaces to a single shell etc.)
  • surface repairing before exporting to a CAD file (iges or step)

Based on the source code implemented in PyGeM, we have applied some modification to fix these issues. Hence, we would like to propose and work on improvements on such features, which will enable the package to process more complex geometries. The following classes and functions will be concerned by the improvement of input/output functionalities:

  • In class Nurbshandler: parse() and write()
  • In class Igeshandler: load_shape_from_file()
  • In class Stephandler: load_shape_from_file()

Sincerely,
Zhifan JIANG

Symmetry enforcement

Making the deformation automatically symmetrical could make the deformation of inherently symmetrical objects (hulls, fuselages ...) easier and more robust.

Can't managed to modify mesh from k file

Hi everyone,
I have some issues to modify the mesh of my .k file.
I succeed into modifying the tuto one and changing parameters, but when using my file, nothing happens.
I tried to change every parameters with different values but nothing happens with the mesh.
I might going wrong with the definition of my parameters but hard to know.
I run a 2D axysym mesh.

Thanks in advanced
Stay safe at home !

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.