Paraview从CSV创建带有“宽度"的线段,数据 [英] Paraview create line segments from CSV with "width" data

查看:43
本文介绍了Paraview从CSV创建带有“宽度"的线段,数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在Paraview中创建线段.我每个线段的输入数据格式为:x0,y0,z0,x1,y1,z1,宽度我曾尝试使用线"像这样的命令:

I want to create line segments in Paraview. The format of my input data for each line segment is as: x0,y0,z0,x1,y1,z1,width I have tried using "Line" command like:

    for i in range(600):
      l = Line(Point1=(uniform(0,100),uniform(0,100),0),Point2=(uniform(0,100),uniform(0,100),0))

但是,我找不到一种方法来指定每个线段的宽度.您的帮助将不胜感激.此致,哈米德·拉贾比(Hamid Rajabi).

But, I can't find a way to specify the width to each line segment. Your help will be much appreciated. Best Regards, Hamid Rajabi.

推荐答案

Line对象不知道 width .它只是连接点的列表. width 是表示形式的参数.您可以尝试这样的事情:

The Line object does not know about the width. It is only a list of connected points. The width is a parameter of the representation. You can try something like that:

# get active view
renderView1 = GetActiveViewOrCreate('RenderView')

for i in range(600):
  l = Line(Point1=(uniform(0,100),uniform(0,100),0),Point2=(uniform(0,100),uniform(0,100),0))
  # get display properties
  line1Display = GetDisplayProperties(l, view=renderView1)

  # Properties modified on line1Display
  line1Display.LineWidth = 4.0

这篇关于Paraview从CSV创建带有“宽度"的线段,数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆