small fixes after merge from master
This commit is contained in:
parent
273e0f0b71
commit
9d196708b1
|
@ -103,7 +103,7 @@ void ViewProviderDatum::attach(App::DocumentObject *obj)
|
|||
SoNormalBinding* normb = new SoNormalBinding();
|
||||
normb->value = SoNormalBinding::PER_VERTEX_INDEXED;
|
||||
SoBaseColor* color = new SoBaseColor();
|
||||
color->rgb.setValue(0.9, 0.9, 0.3);
|
||||
color->rgb.setValue(0.9f, 0.9f, 0.3f);
|
||||
SoSeparator* sep = new SoSeparator();
|
||||
SoPickStyle* ps = new SoPickStyle();
|
||||
ps->style = SoPickStyle::SHAPE;
|
||||
|
|
|
@ -56,8 +56,8 @@ PROPERTY_SOURCE(PartDesignGui::ViewProviderDatumLine,PartDesignGui::ViewProvider
|
|||
ViewProviderDatumLine::ViewProviderDatumLine()
|
||||
{
|
||||
SoMaterial* material = new SoMaterial();
|
||||
material->diffuseColor.setValue(0.9f, 0.9f, 0.13);
|
||||
material->transparency.setValue(0.2);
|
||||
material->diffuseColor.setValue(0.9f, 0.9f, 0.13f);
|
||||
material->transparency.setValue(0.2f);
|
||||
pShapeSep->addChild(material);
|
||||
}
|
||||
|
||||
|
|
|
@ -57,8 +57,8 @@ PROPERTY_SOURCE(PartDesignGui::ViewProviderDatumPlane,PartDesignGui::ViewProvide
|
|||
ViewProviderDatumPlane::ViewProviderDatumPlane()
|
||||
{
|
||||
SoMaterial* material = new SoMaterial();
|
||||
material->diffuseColor.setValue(0.9f, 0.9f, 0.13);
|
||||
material->transparency.setValue(0.2);
|
||||
material->diffuseColor.setValue(0.9f, 0.9f, 0.13f);
|
||||
material->transparency.setValue(0.2f);
|
||||
pShapeSep->addChild(material);
|
||||
}
|
||||
|
||||
|
@ -153,7 +153,7 @@ void ViewProviderDatumPlane::updateData(const App::Property* prop)
|
|||
|
||||
// Sort by angles
|
||||
std::vector<double> a(points.size());
|
||||
for (int i = 0; i < points.size() - 1; i++) {
|
||||
for (unsigned int i = 0; i < points.size() - 1; i++) {
|
||||
if (longest == 0)
|
||||
a[i] = atan2(points[i].z - m.z, points[i].y - m.y);
|
||||
else if (longest == 1)
|
||||
|
@ -161,7 +161,7 @@ void ViewProviderDatumPlane::updateData(const App::Property* prop)
|
|||
else
|
||||
a[i] = atan2(points[i].y - m.y, points[i].x - m.x);
|
||||
|
||||
for (int k = i+1; k < points.size(); k++) {
|
||||
for (unsigned int k = i+1; k < points.size(); k++) {
|
||||
if (longest == 0)
|
||||
a[k] = atan2(points[k].z - m.z, points[k].y - m.y);
|
||||
else if (longest == 1)
|
||||
|
@ -192,7 +192,7 @@ void ViewProviderDatumPlane::updateData(const App::Property* prop)
|
|||
return;
|
||||
coord = new SoCoordinate3();
|
||||
coord->point.setNum(points.size());
|
||||
for (int p = 0; p < points.size(); p++)
|
||||
for (unsigned int p = 0; p < points.size(); p++)
|
||||
coord->point.set1Value(p, points[p].x, points[p].y, points[p].z);
|
||||
pShapeSep->addChild(coord);
|
||||
|
||||
|
@ -206,7 +206,7 @@ void ViewProviderDatumPlane::updateData(const App::Property* prop)
|
|||
faceSet->coordIndex.set1Value(2, 2);
|
||||
faceSet->coordIndex.set1Value(3, SO_END_FACE_INDEX);
|
||||
// One more triangle for every extra polygon point
|
||||
for (int p = 3; p < points.size(); p++) {
|
||||
for (unsigned int p = 3; p < points.size(); p++) {
|
||||
faceSet->coordIndex.set1Value(4 + 4*(p-3), 0);
|
||||
faceSet->coordIndex.set1Value(4 + 4*(p-3) + 1, p-1);
|
||||
faceSet->coordIndex.set1Value(4 + 4*(p-3) + 2, p);
|
||||
|
@ -216,7 +216,7 @@ void ViewProviderDatumPlane::updateData(const App::Property* prop)
|
|||
|
||||
lineSet = new SoIndexedLineSet();
|
||||
lineSet->coordIndex.setNum(points.size()+2);
|
||||
for (int p = 0; p < points.size(); p++)
|
||||
for (unsigned int p = 0; p < points.size(); p++)
|
||||
lineSet->coordIndex.set1Value(p, p);
|
||||
lineSet->coordIndex.set1Value(points.size(), 0);
|
||||
lineSet->coordIndex.set1Value(points.size()+1, SO_END_LINE_INDEX);
|
||||
|
@ -224,7 +224,7 @@ void ViewProviderDatumPlane::updateData(const App::Property* prop)
|
|||
} else {
|
||||
coord = static_cast<SoCoordinate3*>(pShapeSep->getChild(1));
|
||||
coord->point.setNum(points.size());
|
||||
for (int p = 0; p < points.size(); p++)
|
||||
for (unsigned int p = 0; p < points.size(); p++)
|
||||
coord->point.set1Value(p, points[p].x, points[p].y, points[p].z);
|
||||
faceSet = static_cast<PartGui::SoBrepFaceSet*>(pShapeSep->getChild(2));
|
||||
faceSet->partIndex.setNum(1); // One face
|
||||
|
@ -236,7 +236,7 @@ void ViewProviderDatumPlane::updateData(const App::Property* prop)
|
|||
faceSet->coordIndex.set1Value(2, 2);
|
||||
faceSet->coordIndex.set1Value(3, SO_END_FACE_INDEX);
|
||||
// One more triangle for every extra polygon point
|
||||
for (int p = 3; p < points.size(); p++) {
|
||||
for (unsigned int p = 3; p < points.size(); p++) {
|
||||
faceSet->coordIndex.set1Value(4 + 4*(p-3), 0);
|
||||
faceSet->coordIndex.set1Value(4 + 4*(p-3) + 1, p-1);
|
||||
faceSet->coordIndex.set1Value(4 + 4*(p-3) + 2, p);
|
||||
|
@ -244,7 +244,7 @@ void ViewProviderDatumPlane::updateData(const App::Property* prop)
|
|||
}
|
||||
lineSet = static_cast<SoIndexedLineSet*>(pShapeSep->getChild(3));
|
||||
lineSet->coordIndex.setNum(points.size()+2);
|
||||
for (int p = 0; p < points.size(); p++)
|
||||
for (unsigned int p = 0; p < points.size(); p++)
|
||||
lineSet->coordIndex.set1Value(p, p);
|
||||
lineSet->coordIndex.set1Value(points.size(), 0);
|
||||
lineSet->coordIndex.set1Value(points.size()+1, SO_END_LINE_INDEX);
|
||||
|
|
|
@ -111,7 +111,7 @@ void ViewProviderDressUp::highlightReferences(const bool on)
|
|||
for (std::vector<std::string>::const_iterator f = SubVals.begin(); f != SubVals.end(); f++) {
|
||||
int idx = atoi(f->substr(4).c_str()) - 1;
|
||||
// TODO: Find a better colour
|
||||
colors[idx] = App::Color(0.2,1,0.2);
|
||||
colors[idx] = App::Color(0.2f,1.0f,0.2f);
|
||||
}
|
||||
vp->DiffuseColor.setValues(colors);
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue
Block a user