{
// append the color attribute. It is empty, the attribute will be filled by a request
DataPtr aData = data();
- aData->addAttribute(COLOR_ID(), ModelAPI_AttributeIntArray::type());
+ aData->addAttribute(COLOR_ID(), ModelAPI_AttributeIntArray::typeId());
}
void Model_ResultConstruction::colorConfigInfo(std::string& theSection, std::string& theName,
void Model_ResultConstruction::setShape(std::shared_ptr<GeomAPI_Shape> theShape)
{
- if (myShape != theShape) {
+ if (myShape != theShape && (!theShape.get() || !theShape->isEqual(myShape))) {
myShape = theShape;
- if (theShape.get() && (!myShape.get() || !theShape->isEqual(myShape))) {
+ if (theShape.get()) {
myFacesUpToDate = false;
myFaces.clear();
}
std::dynamic_pointer_cast<GeomAPI_PlanarEdges>(myShape);
std::list<std::shared_ptr<GeomAPI_Shape> > aFaces;
GeomAlgoAPI_SketchBuilder::createFaces(aWirePtr->origin(), aWirePtr->dirX(),
- aWirePtr->dirY(), aWirePtr->norm(), aWirePtr, aFaces);
+ aWirePtr->norm(), aWirePtr, aFaces);
std::list<std::shared_ptr<GeomAPI_Shape> >::iterator aFIter = aFaces.begin();
for(; aFIter != aFaces.end(); aFIter++) {
std::shared_ptr<GeomAPI_Face> aFace(new GeomAPI_Face(*aFIter));