「Extensions:2.6/Py/Scripts/Add Mesh/Data Surface」の版間の差分
細 (1版 をインポートしました) |
|
(相違点なし)
|
2018年6月29日 (金) 06:09時点における最新版
UI location | Group: AddMesh | ||
---|---|---|---|
Usage | in 3D View: Shift-A > Mesh > Data Surface | ||
Version | 1.1 | Author(s) | Sun Sibai, Pontiac |
Blender | 2.71 or later | License | GPL v2 or later |
Distribution | Extern | ||
Note(s) | Data files contain matrices of x,y,z coordinates of vertices. |
File name | __init__.py & add_mesh_text_data_surface.py |
---|---|
Current version download | https://github.com/niasw/add_mesh_DataSurface/archive/master.zip |
Links | https://github.com/niasw/add_mesh_DataSurface |
---|
目次
Introduction
In engineering and science, numerical data sometimes are more common than analytical expressions. Analytical expressions are accurate and easy to accept, but for numerical algorithms (such as self-adapting optimizing) and real experiments (such as measurements with instruments), numerical data are more suitable and more convenient.
If you want to transfer data from numerical algorithms or real experiments into Blender to visualize them, this addon may be your proper choice. In the example I will show below, I turned text data of x,y and z coordinates into a mesh surface.
If you are seeking for addons for analytical expressions, please go to the addon 3D Function Surface.
Installation
To install this addon, please copy all the scripts and data files to the addon path.
- Download the source file from the download link and extract to a folder add_mesh_DataSurface, or use git clone https://github.com/niasw/add_mesh_DataSurface.
Then copy directory add_mesh_DataSurface to Blender addon path. If you don't know where is the addon path, please open your Blender, and run scripts below in the Python Console:
import addon_utils
print(addon_utils.paths())
To enable this addon, please open your Blender.
- Click Files > User preferences ... > Addons > Add mesh.
Instructions
There are two modules in this addon:
- Text Data Surface can create all mesh surface in 3D space. But it needs 3 matrices data:
x=x(u,v)
y=y(u,v)
z=z(u,v)
where x,y,z are coordinates in space and u,v are column and row indices.
- Z Data Surface can create a subset mesh surface of above. It is convenient for only 1 table data needed:
z=f(x,y)
where x,y data are in form of vector and z data are in form of matrix.
To show how to use this addon, I will give examples.
example for Text Data Surface
- In the 3D View block, press Shift+a > Mesh > Data surface > Text data surface.
Then a twisted ribbon-like mesh shows.
As for the loop and flip checkbox, try them to know what they represent. After clicking loop, you should see the figure closed in each Z slice. Yes, the ribbon becomes a tube. After clicking flip, you should see the light effect changed a little. Yes, the normal direction flipped.
example for Z Data Surface
- In the 3D View block, press Shift+a > Mesh > Data surface > Z(x,y) table surface.
Then a floating ribbon-like mesh shows.
The structure of the table in .csv file is shown below:
The .csv file can be exported from spreadsheet programs such as Excel and LibreOffice Calc.
There are 3 boolean options in Z Data Surface. loop and flip are like those in Text Data Surface.
Here shows their effects.
The tran option is to switch x axis with y axis. It is the same with transposing the whole data table. By combining tran function and loop function, we can close the surface mesh either in x direction or y direction, shown below:
Notes
If you have further requirements, you can fork the source codes and develop your own one. To know how this addon works, please go to page Text Data Surface and Z Data Surface.
Compatibility
This addon has been tested on Ubuntu 12.04, Blender 2.71a, Python 3.2 (bundled), 32-bit.
It may also work with Blender versions < 2.71, but not tested yet.
Troubleshooting
- Add-on does not appear on the list.
Check if you have installed this addon. Make sure the ".py" files are in the addon path properly. Make sure you have enabled this addon in User Preferences.
- Error combining coordinate data: Traceback (most recent call last):
- ...
- FileNotFoundError: [Errno 2] No such file or directory: '.../add_mesh_Surface/Xdata.txt'
or
- Fail to find example data files:
- I have searched in following paths:
- .../add_mesh_DataSurface/Xdata.txt
These messages mean Blender did not find the data files. When you downloaded it as a zip file, did you extract the folder as add_mesh_DataSurface instead of the default 'add_mesh_DataSurface-master'? If not, please rename this folder under addon path as add_mesh_DataSurface.
- Browser Button fails to work ...
Reset it: Delete the current object and re-add it please.
Support
To raise a bug report, you may issue it on here(github-issues), or here(developer.blender.org-task).
To contact with me, please write an email to <niasw(AT)pku.edu.cn>.
Thanks
"makeFaces" method and "create_mesh_and_object" method in add_mesh_text_data_surface.py and add_mesh_z_data_surface.py are from Blender addon add extra objects. Thank Pontiac.
Thank Noel Stoutenburg for suggestions about .csv files and Z Data Surface. Thank @squarednob for issue reporting and testing.
External links
https://github.com/niasw/add_mesh_DataSurface