MCPcopy Create free account
hub / github.com/Kitware/VTK / IsFaceOnBoundary

Method IsFaceOnBoundary

Testing/GenericBridge/vtkBridgeCell.cxx:645–672  ·  view source on GitHub ↗

For the internals of the tessellation algorithm (the hash table in particular) Is the face `faceId' of the current cell on a exterior boundary of the dataset or not? \pre 3d: GetDimension()==3 ------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

643// \pre 3d: GetDimension()==3
644//------------------------------------------------------------------------------
645int vtkBridgeCell::IsFaceOnBoundary(vtkIdType faceId)
646{
647 assert("pre: 3d" && this->GetDimension() == 3);
648
649 // result=CountNeighbors(boundary(faceId))==0;
650
651 vtkCell* face = this->Cell->GetFace(faceId);
652 vtkIdList* cells = vtkIdList::New(); // expensive
653 this->DataSet->Implementation->GetCellNeighbors(this->Id, face->GetPointIds(), cells);
654
655 int result = cells->GetNumberOfIds() == 0;
656 cells->Delete(); // expensive
657#if 0
658 if(this->GetType()==VTK_QUADRATIC_TETRA)
659 {
660 if(result)
661 {
662 cout<<"************************************************ boundary"<<endl;
663 }
664 else
665 {
666 cout<<"************************************************ NOT boundary"<<endl;
667 }
668// assert(result);
669 }
670#endif
671 return result;
672}
673
674// Is the cell on the exterior boundary of the dataset?
675// \pre 2d: GetDimension()==2

Callers 2

RequestDataMethod · 0.80

Calls 9

GetDimensionMethod · 0.95
GetTypeMethod · 0.95
DeleteMethod · 0.65
assertFunction · 0.50
NewFunction · 0.50
GetFaceMethod · 0.45
GetCellNeighborsMethod · 0.45
GetPointIdsMethod · 0.45
GetNumberOfIdsMethod · 0.45

Tested by

no test coverage detected