// ...
// Выбираем
// Create selection input
Ptr<SelectionCommandInput> selectionInput = inputs->addSelectionInput(commandId + "_selection", "Select", "Basic select command input");
if (!selectionInput)
return;
selectionInput->setSelectionLimits(0);
// ...
// Анализируем
Ptr<SelectionCommandInput> selectionInput = inputs->itemById(commandId + "_selection");
size_t k = 0;
if(selectionInput) k = selectionInput->selectionCount();
for( int ir = 0; ir < k; ir++){
Ptr<Selection> selection = selectionInput->selection(ir);
Ptr<Base> sktchObjct = selection->entity();
std::string str = sktchObjct->objectType();
if(str == "adsk::fusion::SketchPoint"){
ui->messageBox("str == 'adsk::fusion::SketchPoint'");
Ptr<Point2D> pnt2D = sktchObjct->worldGeometry();
}
if(str == "adsk::fusion::BRepVertex"){
ui->messageBox("str == 'adsk::fusion::BRepVertex'");
Ptr<Point3D> pnt3D = sktchObjct->Geometry();
}
}
}