Merge branch 'refs/heads/double-precision-werner'

Conflicts:
	src/App/Document.cpp
	src/App/PropertyGeo.cpp
	src/App/PropertyStandard.cpp
	src/Base/Reader.cpp
	src/Base/Reader.h
	src/Gui/propertyeditor/PropertyItem.cpp
	src/Mod/Fem/Gui/ViewProviderFemMesh.cpp
	src/Mod/Inspection/Gui/ViewProviderInspection.cpp
	src/Mod/Mesh/App/MeshProperties.cpp
	src/Mod/Part/App/TopoShapeFacePyImp.cpp
	src/Mod/PartDesign/App/FeatureRevolution.cpp
This commit is contained in:
jriegel
2013-09-26 00:05:05 +02:00
69 changed files with 1116 additions and 415 deletions

View File

@@ -41,12 +41,12 @@ using namespace PartDesign;
PROPERTY_SOURCE(PartDesign::Chamfer, PartDesign::DressUp)
const App::PropertyFloatConstraint::Constraints floatSize = {0.0f,FLT_MAX,0.1f};
const App::PropertyFloatConstraint::Constraints floatSize = {0.0,FLT_MAX,0.1};
Chamfer::Chamfer()
{
ADD_PROPERTY(Size,(1.0f));
ADD_PROPERTY(Size,(1.0));
Size.setConstraints(&floatSize);
}
@@ -73,7 +73,7 @@ App::DocumentObjectExecReturn *Chamfer::execute(void)
if (SubVals.size() == 0)
return new App::DocumentObjectExecReturn("No edges specified");
float size = Size.getValue();
double size = Size.getValue();
this->positionByBase();
// create an untransformed copy of the base shape

View File

@@ -61,11 +61,11 @@ using namespace PartDesign;
PROPERTY_SOURCE(PartDesign::Draft, PartDesign::DressUp)
const App::PropertyFloatConstraint::Constraints floatAngle = {0.0f,89.99f,0.1f};
const App::PropertyFloatConstraint::Constraints floatAngle = {0.0,89.99,0.1};
Draft::Draft()
{
ADD_PROPERTY(Angle,(1.5f));
ADD_PROPERTY(Angle,(1.5));
Angle.setConstraints(&floatAngle);
ADD_PROPERTY_TYPE(NeutralPlane,(0),"Draft",(App::PropertyType)(App::Prop_None),"NeutralPlane");
ADD_PROPERTY_TYPE(PullDirection,(0),"Draft",(App::PropertyType)(App::Prop_None),"PullDirection");
@@ -104,7 +104,7 @@ App::DocumentObjectExecReturn *Draft::execute(void)
return new App::DocumentObjectExecReturn("No faces specified");
// Draft angle
float angle = Angle.getValue() / 180.0 * M_PI;
double angle = Angle.getValue() / 180.0 * M_PI;
// Pull direction
gp_Dir pullDirection;

View File

@@ -39,11 +39,11 @@ using namespace PartDesign;
PROPERTY_SOURCE(PartDesign::Fillet, PartDesign::DressUp)
const App::PropertyFloatConstraint::Constraints floatRadius = {0.0f,FLT_MAX,0.1f};
const App::PropertyFloatConstraint::Constraints floatRadius = {0.0,FLT_MAX,0.1};
Fillet::Fillet()
{
ADD_PROPERTY(Radius,(1.0f));
ADD_PROPERTY(Radius,(1.0));
Radius.setConstraints(&floatRadius);
}
@@ -70,8 +70,8 @@ App::DocumentObjectExecReturn *Fillet::execute(void)
if (SubVals.size() == 0)
return new App::DocumentObjectExecReturn("No edges specified");
float radius = Radius.getValue();
double radius = Radius.getValue();
this->positionByBase();
// create an untransformed copy of the base shape
Part::TopoShape baseShape(TopShape);

View File

@@ -66,7 +66,7 @@ short LinearPattern::mustExecute() const
const std::list<gp_Trsf> LinearPattern::getTransformations(const std::vector<App::DocumentObject*>)
{
float distance = Length.getValue();
double distance = Length.getValue();
if (distance < Precision::Confusion())
throw Base::Exception("Pattern length too small");
int occurrences = Occurrences.getValue();

View File

@@ -65,7 +65,7 @@ short PolarPattern::mustExecute() const
const std::list<gp_Trsf> PolarPattern::getTransformations(const std::vector<App::DocumentObject*>)
{
float angle = Angle.getValue();
double angle = Angle.getValue();
if (angle < Precision::Confusion())
throw Base::Exception("Pattern angle too small");
int occurrences = Occurrences.getValue();
@@ -105,7 +105,7 @@ const std::list<gp_Trsf> PolarPattern::getTransformations(const std::vector<App:
axis = refSketch->getAxis(AxId);
}
axis *= refSketch->Placement.getValue();
axbase = gp_Pnt(axis.getBase().x, axis.getBase().y, axis.getBase().z);
axbase = gp_Pnt(axis.getBase().x, axis.getBase().y, axis.getBase().z);
axdir = gp_Dir(axis.getDirection().x, axis.getDirection().y, axis.getDirection().z);
} else {
Part::Feature* refFeature = static_cast<Part::Feature*>(refObject);

View File

@@ -55,8 +55,8 @@ PROPERTY_SOURCE(PartDesign::Revolution, PartDesign::Additive)
Revolution::Revolution()
{
ADD_PROPERTY_TYPE(Base,(Base::Vector3d(0.0f,0.0f,0.0f)),"Revolution", App::Prop_ReadOnly, "Base");
ADD_PROPERTY_TYPE(Axis,(Base::Vector3d(0.0f,1.0f,0.0f)),"Revolution", App::Prop_ReadOnly, "Axis");
ADD_PROPERTY_TYPE(Base,(Base::Vector3d(0.0,0.0,0.0)),"Revolution", App::Prop_ReadOnly, "Base");
ADD_PROPERTY_TYPE(Axis,(Base::Vector3d(0.0,1.0,0.0)),"Revolution", App::Prop_ReadOnly, "Axis");
ADD_PROPERTY_TYPE(Angle,(360.0),"Revolution", App::Prop_None, "Angle");
ADD_PROPERTY_TYPE(ReferenceAxis,(0),"Revolution",(App::Prop_None),"Reference axis of revolution");
}
@@ -173,7 +173,7 @@ App::DocumentObjectExecReturn *Revolution::execute(void)
return new App::DocumentObjectExecReturn(e.what());
}
}
bool Revolution::suggestReversed(void)
{
try {