#include <TopExp_Explorer.hxx>
#include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
#include <QStringList>
+#include <QColor>
#include <Geom_BSplineCurve.hxx>
template<class T> void append( std::vector<T>& theList, const std::vector<T>& theList2 )
for( int i=0, n=aCurves.size(); i<n; i++ )
{
std::vector<TopoDS_Shape> aCurvesList;
- Split(aCurves[i], thePoint, theTolerance, aCurvesList);
- bool isLocalOK = CreatePolylines( theDoc, thePolyline->GetName(), aCurvesList, true );
+ Split( aCurves[i], thePoint, theTolerance, aCurvesList );
+ bool isLocalOK = CreatePolylines( theDoc, thePolyline->GetName(),
+ aCurvesList, true, thePolyline->GetWireColor() );
isOK = isOK && isLocalOK;
}
return isOK;
std::vector<TopoDS_Shape> aPolylines(1);
aPolylines[0] = aWireSet;
- CreatePolylines(theDoc, theName, aPolylines, false);
+ QString aName = theName;
+ if( aName.isEmpty() )
+ aName = "merged";
+ CreatePolylines( theDoc, aName, aPolylines, true, QColor() );
return true;
}
}
}
- CreatePolylines(theDoc, thePolyline->GetName(), aResult, true);
+ CreatePolylines( theDoc, thePolyline->GetName(), aResult, true, thePolyline->GetWireColor() );
return true;
}
bool HYDROData_PolylineOperator::CreatePolylines( const Handle( HYDROData_Document )& theDoc,
const QString& theNamePrefix,
const std::vector<TopoDS_Shape>& theShapes,
- bool isUseIndices )
+ bool isUseIndices,
+ const QColor& theColor )
{
if( theDoc.IsNull() )
return false;
{
aPolyline->SetName( theNamePrefix );
}
+
+ if( theColor.isValid() )
+ aPolyline->SetWireColor( theColor );
}
return true;
}