Hello all,
I want to add some 3d text in the polydata. What I do is to check the intersecting points of the 3d text (polydata extruded) into the polydata where I want to add the text. So what I want is to get the intersecting points and do some extrussion according to the oriented bounding box and to append it to the polydata.
The problem that the text hasn´t points in the extrusion only at the beginning and the end to make the shape. Do you know if it is possible to generate points in the polydata to be able to get the intersecting points and generate the extrusion to obtain the 3d text.
Thanks
vtkNew<vtkPolyData> clipped_text_engraved;
//Contains all the conected components separated by the
//splint
vtkNew<vtkPolyData> polydata_groups;
vtkNew<vtkPoints> points_groups;
for (unsigned int i = 0; i < text_engraved->GetNumberOfPoints(); i++)
{
if (!selectEnclosedPoints->IsInside(i)) {
std::cout << "Point " << i << ": " << selectEnclosedPoints->IsInside(i) << std::endl;
ids->InsertNextValue(i);
}
}//en for text engraved
vtkSmartPointer<vtkSelectionNode> selectionNode =
vtkSmartPointer<vtkSelectionNode>::New();
selectionNode->SetFieldType(vtkSelectionNode::POINT);
selectionNode->SetContentType(vtkSelectionNode::INDICES);
selectionNode->SetSelectionList(ids);
selectionNode->GetProperties()->Set(vtkSelectionNode::CONTAINING_CELLS(), 1);
vtkSmartPointer<vtkSelection> selection =
vtkSmartPointer<vtkSelection>::New();
selection->AddNode(selectionNode);
vtkSmartPointer<vtkExtractSelection> extractSelection =
vtkSmartPointer<vtkExtractSelection>::New();
extractSelection->SetInputData(0, text_engraved);
extractSelection->SetInputData(1, selection);
extractSelection->Update();