Skip to content
GitLab
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 830
    • Issues 830
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 234
    • Merge requests 234
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • VTKVTK
  • VTKVTK
  • Issues
  • #18307
Closed
Open
Issue created Sep 10, 2021 by Ted Giblette@tedngiblette

vtkImplicitPolyDataDistance calculates incorrect sign in some specific cases

In some specific cases, vtkImplicitPolyDataDistance calculates the wrong sign when calling EvaluateFunction. It appears to only occur when the query point sits directly above the edge of a face as shown in the image below.

test_surface_and_point

The code to reproduce this issue is as follows.

const double length = 1.0;
vtkNew<vtkCubeSource> cube;
cube->SetXLength(length);
cube->SetYLength(length);
cube->SetZLength(length);
cube->Update();

vtkNew<vtkImplicitPolyDataDistance> signed_distance;

signed_distance->SetInput(cube->GetOutput());

double test_distance = signed_distance->EvaluateFunction(-0.5, 0.7, 0.);

With this code, the value of test_distance is -0.2 instead of 0.2.

Assignee
Assign to
Time tracking