{ /* Manfred Steinbach 03-oct-2018 Problem with property ->referencedEntity() of - works fine when projections were done with edge-entities - problem when projection were done with faces => "InternalValidationError : res" example-files (*f3d) - "example referencedEntity problem-projection of edges-ok" - "example referencedEntity problem-projection of faces-problem" => to test please select sketch: "Sketch with projections" in component: "plate" */ app = Application::get(); if (!app) return false; ui = app->userInterface(); if (!ui) return false; // select sketch by user Ptr uiSelSketch = ui->selectEntity("select sketch", "Sketches"); if (!uiSelSketch) return false; Ptr sketch = uiSelSketch->entity(); // selected sketch if (!sketch) return false; // analyze sketch-curves (necessary for further operations) Ptr skCurves = sketch->sketchCurves(); for (int i = 0; i < skCurves->count(); ++i) { // traverse sketch-curves Ptr skCurve = skCurves->item(i); if (skCurve->isReference()) { // is sketch-curve a reference (projected geometry)? Ptr base = skCurve->referencedEntity(); // referenced geometry (source) if (!base) { std::string errorMessage; int errorCode = app->getLastError(&errorMessage); if (GenericErrors::Ok != errorCode) ui->messageBox(errorMessage); return false; } } } ui->messageBox("done, no problems"); return true; }