VTKExamples | The VTK examples , formerly hosted on media wiki | Privacy library
kandi X-RAY | VTKExamples Summary
kandi X-RAY | VTKExamples Summary
The VTK examples, formerly hosted on media wiki
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of VTKExamples
VTKExamples Key Features
VTKExamples Examples and Code Snippets
Community Discussions
Trending Discussions on VTKExamples
QUESTION
I would like to render a Polygon with a hole in VTK. I found that the vtkDelaunay2D class should do the trick. I followed the tutorial here vtkDelaunay2D Example and it worked perfectly.
Afterwards I tried to create a different polygon with a different hole. And I don't get why it's not working and would like to know what I would have to change.
This is how it should look like. This is how it looks like in reality.
This is the code I used:
...ANSWER
Answered 2021-Jan-25 at 12:35Change
for idd in range(start, start + 4):
into
for idd in reversed(range(start, start + 4)):
QUESTION
I am new to python and VTK so please have patience :)
On short, I have an actor and I would like to rotate it about a line I drew using vtkLineSource(). I chose my start and end points and I drew the line. Now what I thought is (please correct me if I am wrong) that I should make an axis on the line and then apply the vtkTransformWXYZ() to rotate about the axis. It does not work, it gives a weird rotation about the chosen point, but not the one I desire. I also tried defining the axis on the middle of the line I drew and apply the rotation on it, but when I try, it rotates about the global coordinates, and not the local. I also tried to give as input the point or the line, but again, the rotation is very weird.
Is there a way to define the line as an axis and rotate the actor about it? So far I tried like in the following examples: https://lorensen.github.io/VTKExamples/site/Python/PolyData/RotationAroundLine/ and https://lorensen.github.io/VTKExamples/site/Python/Rendering/Rotations/ but my actor always rotates in a weird way.
Could anyone help/point me in the right direction please?
Here is the part of my code where I am trying to rotate the actor…
...ANSWER
Answered 2020-Nov-07 at 13:21You may need to write some function like this:
QUESTION
The Visualisation Toolkit (VTK) release is currently version 9.0.0., see here. VTK website provides this file format description, which is titled "VTK Version 4.2". Paraview also links this github page, which seems to be the same as the Version 4.2 description, and to the 4.2-description.
What is the most recent VTK-File Format description? Or is the linked 4.2-description the one that is used in the most recent release version (currently 9.0.0)?
...ANSWER
Answered 2020-Jul-09 at 15:23This is the most recent version of the format and what is being used in VTK 9.0.0.
This information is not documented anywhere yet.
QUESTION
I am trying to compute the difference between two vtkPolyData by using the vtkBooleanOperationPolyDataFilter class. I read the only example provided in VTK examples website and I tried to use that.
However, my problem is a little bit different because I have .stl files. Therefore, first I have to translate .stl files to vtkPolyData. I am doing this with the function convert_stl_to_polydata()
. Then, I use compute_difference()
to compute the difference and write the output.
ANSWER
Answered 2020-Feb-11 at 02:51- Yes, you're using
vtkBooleanOperationPolyDataFilter
correctly. vtkSTLReader
creates avtkPolyData
, which is the correct input container for the boolean operation filter. Therefore: Yes, it is possible to read STLs and immediately process them withvtkBooleanOperationPolyDataFilter
.
You lose some of the information when converting the output from vtkPolyData
to vtkUnstructuredGrid
. I think the shallow copy only copies the points, but not the cells. Have you checked the following?
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install VTKExamples
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page