+ // Copy shape.
+ GeomAlgoAPI_Copy aCopyAlgo(aShape);
+
+ // Check that algo is done.
+ if(!aCopyAlgo.isDone()) {
+ setError("Error: " + getKind() + " algorithm failed.");
+ return;
+ }
+
+ // Check if shape is not null.
+ if(!aCopyAlgo.shape().get() || aCopyAlgo.shape()->isNull()) {
+ setError("Error: Resulting shape is null.");
+ return;
+ }
+
+ // Check that resulting shape is valid.
+ if(!aCopyAlgo.isValid()) {
+ setError("Error: Resulting shape is not valid.");
+ return;
+ }
+