Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • VTK VTK
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 732
    • Issues 732
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 201
    • Merge requests 201
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Infrastructure Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • VTK
  • VTKVTK
  • Issues
  • #18442

Closed
Open
Created Jan 19, 2022 by Tiffany Chhim@tiffany.chhimDeveloper

vtkExtractCellsByType on unstructured grids with one cell type is missing points

Applying the vtkExtractCellsByType filter on an unstructured grid containing a unique type of cell does not contain points.

Python script to reproduce:

import vtk

# Create unstructured grid with one type of cell
cellSource = vtk.vtkCellTypeSource()
cellSource.SetCellType(vtk.VTK_TETRA)
cellSource.Update()

# Extract tetrahedra
extr = vtk.vtkExtractCellsByType()
extr.SetInputConnection(cellSource.GetOutputPort())
extr.AddCellType(vtk.VTK_TETRA)
extr.Update()

# Points are missing
if extr.GetOutput().GetNumberOfPoints() == 0:
    print("Points are missing.")
Assignee
Assign to
Time tracking