﻿<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ja">
	<id>https://wiki.blender.jp/index.php?action=history&amp;feed=atom&amp;title=Extensions%3A2.6%2FPy%2FScripts%2FAdd_Mesh%2FData_Surface%2FZ_Data_Surface</id>
	<title>Extensions:2.6/Py/Scripts/Add Mesh/Data Surface/Z Data Surface - 版の履歴</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.blender.jp/index.php?action=history&amp;feed=atom&amp;title=Extensions%3A2.6%2FPy%2FScripts%2FAdd_Mesh%2FData_Surface%2FZ_Data_Surface"/>
	<link rel="alternate" type="text/html" href="https://wiki.blender.jp/index.php?title=Extensions:2.6/Py/Scripts/Add_Mesh/Data_Surface/Z_Data_Surface&amp;action=history"/>
	<updated>2026-09-08T13:31:49Z</updated>
	<subtitle>このウィキのこのページに関する変更履歴</subtitle>
	<generator>MediaWiki 1.31.0</generator>
	<entry>
		<id>https://wiki.blender.jp/index.php?title=Extensions:2.6/Py/Scripts/Add_Mesh/Data_Surface/Z_Data_Surface&amp;diff=147999&amp;oldid=prev</id>
		<title>Yamyam: 1版 をインポートしました</title>
		<link rel="alternate" type="text/html" href="https://wiki.blender.jp/index.php?title=Extensions:2.6/Py/Scripts/Add_Mesh/Data_Surface/Z_Data_Surface&amp;diff=147999&amp;oldid=prev"/>
		<updated>2018-06-28T21:09:57Z</updated>

		<summary type="html">&lt;p&gt;1版 をインポートしました&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;ja&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← 古い版&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;2018年6月28日 (木) 21:09時点における版&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;ja&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(相違点なし)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Yamyam</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.blender.jp/index.php?title=Extensions:2.6/Py/Scripts/Add_Mesh/Data_Surface/Z_Data_Surface&amp;diff=147998&amp;oldid=prev</id>
		<title>wiki&gt;Niasw: Created page with &quot;=== Script Detail ===  This page is to explain how Z Data Surface addon works.  The key file is the python scripts: &lt;b&gt;add_mesh_z_data_surface.py&lt;/b&gt;. This page only points out t...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.blender.jp/index.php?title=Extensions:2.6/Py/Scripts/Add_Mesh/Data_Surface/Z_Data_Surface&amp;diff=147998&amp;oldid=prev"/>
		<updated>2014-08-17T08:24:59Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;=== Script Detail ===  This page is to explain how Z Data Surface addon works.  The key file is the python scripts: &amp;lt;b&amp;gt;add_mesh_z_data_surface.py&amp;lt;/b&amp;gt;. This page only points out t...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;新規ページ&lt;/b&gt;&lt;/p&gt;&lt;div&gt;=== Script Detail ===&lt;br /&gt;
&lt;br /&gt;
This page is to explain how Z Data Surface addon works.&lt;br /&gt;
&lt;br /&gt;
The key file is the python scripts: &amp;lt;b&amp;gt;add_mesh_z_data_surface.py&amp;lt;/b&amp;gt;.&lt;br /&gt;
This page only points out the unique informations, others are similar with [http://wiki.blender.org/index.php/Extensions:2.6/Py/Scripts/Add_Mesh/Data_Surface/Text_Data_Surface Text Data Surface].&lt;br /&gt;
&lt;br /&gt;
=== add_mesh_z_data_surface.py ===&lt;br /&gt;
&lt;br /&gt;
The input parameters are different from Text Data Surface.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
class AddZDataSurface(bpy.types.Operator):&lt;br /&gt;
    ...&lt;br /&gt;
&lt;br /&gt;
    zFile = StringProperty(name=&amp;quot;Data File of Z(X,Y)&amp;quot;,&lt;br /&gt;
        description=&amp;quot;Z=z(X,Y). (Table Text)&amp;quot;,&lt;br /&gt;
        default=addon_utils.paths()[0]+&amp;quot;/add_mesh_DataSurface/csvdata.csv&amp;quot;, subtype=&amp;quot;FILE_PATH&amp;quot;)&lt;br /&gt;
    loop = BoolProperty(name=&amp;quot;Loop in X Direction&amp;quot;,&lt;br /&gt;
        description=&amp;quot;Loop in X direction or not?&amp;quot;,&lt;br /&gt;
        default=False)&lt;br /&gt;
    flip = BoolProperty(name=&amp;quot;Flip Normal Vector&amp;quot;,&lt;br /&gt;
        description=&amp;quot;Flip the normal vector of surfaces or not?&amp;quot;,&lt;br /&gt;
        default=False)&lt;br /&gt;
    tran = BoolProperty(name=&amp;quot;Switch X &amp;lt;-&amp;gt; Y vec&amp;quot;,&lt;br /&gt;
        description=&amp;quot;Switch x &amp;lt;-&amp;gt; y, same with transposing matrix&amp;quot;,&lt;br /&gt;
        default=False)&lt;br /&gt;
&lt;br /&gt;
    ...&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
There is only table data in one file. This gives convenience to one have data in a table form.&lt;br /&gt;
&lt;br /&gt;
Since table forms are different from common matrices, the parsing method should be modified.&lt;br /&gt;
&lt;br /&gt;
In &amp;lt;b&amp;gt;execute()&amp;lt;/b&amp;gt;, I use&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
    uNum, vNum, zValue, xValue, yValue = loadZData(zFile)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
to acquire all coordinate information needed to create mesh.&lt;br /&gt;
&lt;br /&gt;
In &amp;lt;b&amp;gt;loadZData()&amp;lt;/b&amp;gt;, try to read the 1st line as x vector&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
    textLine = fileHandler.readline()&lt;br /&gt;
    textDataLine = re.split('[^(0-9|e|E|\+|\-|\.)]+', textLine) # use regular expression to split data&lt;br /&gt;
    try:&lt;br /&gt;
      while True:&lt;br /&gt;
        textDataLine.remove('')&lt;br /&gt;
    except:&lt;br /&gt;
      pass&lt;br /&gt;
    if textDataLine:&lt;br /&gt;
      uNum = len(textDataLine)&lt;br /&gt;
      xList=[float(it) for it in textDataLine]&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Then loop reading the rest lines as (y element + z element vector). Due to y elements in the beginning of these lines, the length of data list is one more than the 1st line.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
    textLine = fileHandler.readline()&lt;br /&gt;
    while textLine:&lt;br /&gt;
      textDataLine = re.split('[^(0-9|e|E|\+|\-|\.)]+', textLine) # use regular expression to split data&lt;br /&gt;
      try:&lt;br /&gt;
        while True:&lt;br /&gt;
          textDataLine.remove('')&lt;br /&gt;
      except:&lt;br /&gt;
        pass&lt;br /&gt;
      if textDataLine:&lt;br /&gt;
        if (uNum!=0):&lt;br /&gt;
          vNum = vNum + 1&lt;br /&gt;
          if (uNum!=len(textDataLine) - 1):&lt;br /&gt;
            raise Exception(&amp;quot;Error: Raw data matrix!&amp;quot;,&lt;br /&gt;
                            &amp;quot;Hint: Horizontal length of each line should be the same. (&amp;quot;&lt;br /&gt;
                            +str(uNum)+&amp;quot;!=&amp;quot;+str(len(textDataLine)-1)+&amp;quot;)&amp;quot;)&lt;br /&gt;
          yList.append(float(textDataLine.pop(0)))&lt;br /&gt;
          dataList.append([float(it) for it in textDataLine])&lt;br /&gt;
        else:&lt;br /&gt;
          uNum = len(textDataLine)&lt;br /&gt;
          xList=[float(it) for it in textDataLine]&lt;br /&gt;
      textLine = fileHandler.readline()&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
The &amp;lt;b&amp;gt;if (uNum!=0)&amp;lt;/b&amp;gt; condition ensures that empty lines or text comments will not influence data reading process.&lt;br /&gt;
&lt;br /&gt;
These are how it is different from Text Data Surface module.&lt;br /&gt;
&lt;br /&gt;
=== Thanks ===&lt;br /&gt;
&lt;br /&gt;
Same with Text Data Surface, &amp;quot;makeFaces&amp;quot; method and &amp;quot;create_mesh_and_object&amp;quot; method are from Blender addon [http://wiki.blender.org/index.php/Extensions:2.6/Py/Scripts/Add_Mesh/Add_Extra add extra objects]. Thank Pontiac.&lt;br /&gt;
&lt;br /&gt;
If you are still not satisfied, please go to the source scripts.&lt;br /&gt;
&lt;br /&gt;
------&lt;br /&gt;
* back to [http://wiki.blender.org/index.php/Extensions:2.6/Py/Scripts/Add_Mesh/Data_Surface Data Surface]&lt;/div&gt;</summary>
		<author><name>wiki&gt;Niasw</name></author>
		
	</entry>
</feed>