Integrate Werners & Jans double branch
Move from float to double Further suggestions for float -> double move Moved Tools2D from float to double More suggestions for float->double move from Gui subdirectory Changes to FEM constraint visuals for float->double move Suggested changes for float -> double move Suggestions for Part module moving float -> double
This commit is contained in:
@@ -55,8 +55,8 @@
|
||||
# include <TopTools_IndexedMapOfShape.hxx>
|
||||
# include <Poly_PolygonOnTriangulation.hxx>
|
||||
# include <TColStd_Array1OfInteger.hxx>
|
||||
# include <TopTools_ListOfShape.hxx>
|
||||
# include <Inventor/SoPickedPoint.h>
|
||||
# include <TopTools_ListOfShape.hxx>
|
||||
# include <Inventor/SoPickedPoint.h>
|
||||
# include <Inventor/events/SoMouseButtonEvent.h>
|
||||
# include <Inventor/nodes/SoCoordinate3.h>
|
||||
# include <Inventor/nodes/SoDrawStyle.h>
|
||||
@@ -164,8 +164,8 @@ PROPERTY_SOURCE(PartGui::ViewProviderPartBase, Gui::ViewProviderGeometryObject)
|
||||
//**************************************************************************
|
||||
// Construction/Destruction
|
||||
|
||||
App::PropertyFloatConstraint::Constraints ViewProviderPartBase::floatRange = {1.0f,64.0f,1.0f};
|
||||
const char* ViewProviderPartBase::LightingEnums[]= {"One side","Two side",NULL};
|
||||
App::PropertyFloatConstraint::Constraints ViewProviderPartBase::floatRange = {1.0,64.0,1.0};
|
||||
const char* ViewProviderPartBase::LightingEnums[]= {"One side","Two side",NULL};
|
||||
|
||||
ViewProviderPartBase::ViewProviderPartBase() : pcControlPoints(0)
|
||||
{
|
||||
@@ -185,8 +185,8 @@ ViewProviderPartBase::ViewProviderPartBase() : pcControlPoints(0)
|
||||
PointSize.setConstraints(&floatRange);
|
||||
ADD_PROPERTY(PointSize,(2.0f));
|
||||
ADD_PROPERTY(ControlPoints,(false));
|
||||
ADD_PROPERTY(Lighting,(1));
|
||||
Lighting.setEnums(LightingEnums);
|
||||
ADD_PROPERTY(Lighting,(1));
|
||||
Lighting.setEnums(LightingEnums);
|
||||
|
||||
EdgeRoot = new SoSeparator();
|
||||
EdgeRoot->ref();
|
||||
@@ -211,11 +211,11 @@ ViewProviderPartBase::ViewProviderPartBase() : pcControlPoints(0)
|
||||
pcPointStyle->ref();
|
||||
pcPointStyle->style = SoDrawStyle::POINTS;
|
||||
pcPointStyle->pointSize = PointSize.getValue();
|
||||
|
||||
pShapeHints = new SoShapeHints;
|
||||
pShapeHints->shapeType = SoShapeHints::UNKNOWN_SHAPE_TYPE;
|
||||
pShapeHints->ref();
|
||||
Lighting.touch();
|
||||
|
||||
pShapeHints = new SoShapeHints;
|
||||
pShapeHints->shapeType = SoShapeHints::UNKNOWN_SHAPE_TYPE;
|
||||
pShapeHints->ref();
|
||||
Lighting.touch();
|
||||
|
||||
sPixmap = "Tree_Part";
|
||||
loadParameter();
|
||||
@@ -230,7 +230,7 @@ ViewProviderPartBase::~ViewProviderPartBase()
|
||||
pcPointMaterial->unref();
|
||||
pcLineStyle->unref();
|
||||
pcPointStyle->unref();
|
||||
pShapeHints->unref();
|
||||
pShapeHints->unref();
|
||||
}
|
||||
|
||||
void ViewProviderPartBase::onChanged(const App::Property* prop)
|
||||
@@ -280,12 +280,12 @@ void ViewProviderPartBase::onChanged(const App::Property* prop)
|
||||
App::Property* shape = obj->getPropertyByName("Shape");
|
||||
showControlPoints(ControlPoints.getValue(), shape);
|
||||
}
|
||||
else if (prop == &Lighting) {
|
||||
if (Lighting.getValue() == 0)
|
||||
pShapeHints->vertexOrdering = SoShapeHints::UNKNOWN_ORDERING;
|
||||
else
|
||||
pShapeHints->vertexOrdering = SoShapeHints::COUNTERCLOCKWISE;
|
||||
}
|
||||
else if (prop == &Lighting) {
|
||||
if (Lighting.getValue() == 0)
|
||||
pShapeHints->vertexOrdering = SoShapeHints::UNKNOWN_ORDERING;
|
||||
else
|
||||
pShapeHints->vertexOrdering = SoShapeHints::COUNTERCLOCKWISE;
|
||||
}
|
||||
else {
|
||||
ViewProviderGeometryObject::onChanged(prop);
|
||||
}
|
||||
@@ -361,7 +361,7 @@ std::vector<std::string> ViewProviderPartBase::getDisplayModes(void) const
|
||||
|
||||
return StrList;
|
||||
}
|
||||
|
||||
|
||||
void ViewProviderPartBase::shapeInfoCallback(void * ud, SoEventCallback * n)
|
||||
{
|
||||
const SoMouseButtonEvent * mbe = (SoMouseButtonEvent *)n->getEvent();
|
||||
@@ -916,7 +916,7 @@ void ViewProviderPartBase::showControlPoints(bool show, const App::Property* pro
|
||||
{
|
||||
if (!pcControlPoints && show) {
|
||||
pcControlPoints = new SoSwitch();
|
||||
pcRoot->addChild(pcControlPoints);
|
||||
pcRoot->addChild(pcControlPoints);
|
||||
}
|
||||
|
||||
if (pcControlPoints) {
|
||||
@@ -1167,12 +1167,12 @@ void ViewProviderEllipsoid::updateData(const App::Property* prop)
|
||||
return;
|
||||
App::DocumentObject* object = this->getObject();
|
||||
if (object && object->isDerivedFrom(Part::Ellipsoid::getClassTypeId())) {
|
||||
float angle1 = static_cast<Part::Ellipsoid*>(object)->Angle1.getValue();
|
||||
float angle2 = static_cast<Part::Ellipsoid*>(object)->Angle2.getValue();
|
||||
float angle3 = static_cast<Part::Ellipsoid*>(object)->Angle3.getValue();
|
||||
double angle1 = static_cast<Part::Ellipsoid*>(object)->Angle1.getValue();
|
||||
double angle2 = static_cast<Part::Ellipsoid*>(object)->Angle2.getValue();
|
||||
double angle3 = static_cast<Part::Ellipsoid*>(object)->Angle3.getValue();
|
||||
float radius1 = static_cast<Part::Ellipsoid*>(object)->Radius1.getValue();
|
||||
float radius2 = static_cast<Part::Ellipsoid*>(object)->Radius2.getValue();
|
||||
if (angle1 == -90.0f && angle2 == 90.0f && angle3 == 360.0f) {
|
||||
if (angle1 == -90.0 && angle2 == 90.0 && angle3 == 360.0) {
|
||||
float scale = radius1/radius2;
|
||||
pScaling->scaleFactor.setValue(1,1,scale);
|
||||
pSphere->radius.setValue(radius2);
|
||||
|
||||
Reference in New Issue
Block a user