- ResultConstructionPtr aConstr = document()->createConstruction(data());
- aConstr->setInfinite(true);
- aConstr->setShape(aShape);
- setResult(aConstr);
+ int anIndex = 0;
+ for (auto aShapeIter = aShapes.begin(); aShapeIter != aShapes.end(); ++aShapeIter, ++anIndex)
+ {
+ if (!aShapeIter->get())
+ {
+ setError("Error: Could not create a plane.");
+ continue;
+ }
+ ResultConstructionPtr aConstr = document()->createConstruction(data(), anIndex);
+ aConstr->setInfinite(true);
+ aConstr->setShape(*aShapeIter);
+ setResult(aConstr, anIndex);
+ }
+ removeResults(anIndex);