diff --git a/src/Mod/PartDesign/App/FeatureChamfer.cpp b/src/Mod/PartDesign/App/FeatureChamfer.cpp index 42d82b923..cd16bd306 100644 --- a/src/Mod/PartDesign/App/FeatureChamfer.cpp +++ b/src/Mod/PartDesign/App/FeatureChamfer.cpp @@ -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 diff --git a/src/Mod/PartDesign/App/FeatureDraft.cpp b/src/Mod/PartDesign/App/FeatureDraft.cpp index b2684efd3..b614afccc 100644 --- a/src/Mod/PartDesign/App/FeatureDraft.cpp +++ b/src/Mod/PartDesign/App/FeatureDraft.cpp @@ -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.9,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; diff --git a/src/Mod/PartDesign/App/FeatureFillet.cpp b/src/Mod/PartDesign/App/FeatureFillet.cpp index 8f9d8d3e8..7d6c1f2bb 100644 --- a/src/Mod/PartDesign/App/FeatureFillet.cpp +++ b/src/Mod/PartDesign/App/FeatureFillet.cpp @@ -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); diff --git a/src/Mod/PartDesign/App/FeatureLinearPattern.cpp b/src/Mod/PartDesign/App/FeatureLinearPattern.cpp index bcb8173f4..9841c4ccc 100644 --- a/src/Mod/PartDesign/App/FeatureLinearPattern.cpp +++ b/src/Mod/PartDesign/App/FeatureLinearPattern.cpp @@ -66,7 +66,7 @@ short LinearPattern::mustExecute() const const std::list LinearPattern::getTransformations(const std::vector) { - float distance = Length.getValue(); + double distance = Length.getValue(); if (distance < Precision::Confusion()) throw Base::Exception("Pattern length too small"); int occurrences = Occurrences.getValue(); diff --git a/src/Mod/PartDesign/App/FeaturePolarPattern.cpp b/src/Mod/PartDesign/App/FeaturePolarPattern.cpp index d9d49a046..e0906a29b 100644 --- a/src/Mod/PartDesign/App/FeaturePolarPattern.cpp +++ b/src/Mod/PartDesign/App/FeaturePolarPattern.cpp @@ -65,7 +65,7 @@ short PolarPattern::mustExecute() const const std::list PolarPattern::getTransformations(const std::vector) { - 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 PolarPattern::getTransformations(const std::vectorgetAxis(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(refObject); diff --git a/src/Mod/PartDesign/App/FeatureRevolution.cpp b/src/Mod/PartDesign/App/FeatureRevolution.cpp index 72bbfa8e3..c0b180cc7 100644 --- a/src/Mod/PartDesign/App/FeatureRevolution.cpp +++ b/src/Mod/PartDesign/App/FeatureRevolution.cpp @@ -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"); } @@ -171,7 +171,7 @@ App::DocumentObjectExecReturn *Revolution::execute(void) return new App::DocumentObjectExecReturn(e.what()); } } - + bool Revolution::suggestReversed(void) { try { diff --git a/src/Mod/PartDesign/Gui/TaskChamferParameters.cpp b/src/Mod/PartDesign/Gui/TaskChamferParameters.cpp index b081e5c09..24904730d 100644 --- a/src/Mod/PartDesign/Gui/TaskChamferParameters.cpp +++ b/src/Mod/PartDesign/Gui/TaskChamferParameters.cpp @@ -73,7 +73,7 @@ TaskChamferParameters::TaskChamferParameters(ViewProviderChamfer *ChamferView,QW void TaskChamferParameters::onLengthChanged(double len) { PartDesign::Chamfer* pcChamfer = static_cast(ChamferView->getObject()); - pcChamfer->Size.setValue((float)len); + pcChamfer->Size.setValue(len); pcChamfer->getDocument()->recomputeFeature(pcChamfer); } diff --git a/src/Mod/PartDesign/Gui/TaskDraftParameters.cpp b/src/Mod/PartDesign/Gui/TaskDraftParameters.cpp index 9b97971ea..20efc7e9e 100644 --- a/src/Mod/PartDesign/Gui/TaskDraftParameters.cpp +++ b/src/Mod/PartDesign/Gui/TaskDraftParameters.cpp @@ -287,7 +287,7 @@ void TaskDraftParameters::showObject() void TaskDraftParameters::onAngleChanged(double angle) { PartDesign::Draft* pcDraft = static_cast(DraftView->getObject()); - pcDraft->Angle.setValue((float)angle); + pcDraft->Angle.setValue(angle); pcDraft->getDocument()->recomputeFeature(pcDraft); } diff --git a/src/Mod/PartDesign/Gui/TaskFilletParameters.cpp b/src/Mod/PartDesign/Gui/TaskFilletParameters.cpp index 8050d8953..227e62d57 100644 --- a/src/Mod/PartDesign/Gui/TaskFilletParameters.cpp +++ b/src/Mod/PartDesign/Gui/TaskFilletParameters.cpp @@ -73,7 +73,7 @@ TaskFilletParameters::TaskFilletParameters(ViewProviderFillet *FilletView,QWidge void TaskFilletParameters::onLengthChanged(double len) { PartDesign::Fillet* pcFillet = static_cast(FilletView->getObject()); - pcFillet->Radius.setValue((float)len); + pcFillet->Radius.setValue(len); pcFillet->getDocument()->recomputeFeature(pcFillet); } diff --git a/src/Mod/PartDesign/Gui/TaskGrooveParameters.cpp b/src/Mod/PartDesign/Gui/TaskGrooveParameters.cpp index 8e3c1add2..07095d01c 100644 --- a/src/Mod/PartDesign/Gui/TaskGrooveParameters.cpp +++ b/src/Mod/PartDesign/Gui/TaskGrooveParameters.cpp @@ -124,7 +124,7 @@ TaskGrooveParameters::TaskGrooveParameters(ViewProviderGroove *GrooveView,QWidge void TaskGrooveParameters::onAngleChanged(double len) { PartDesign::Groove* pcGroove = static_cast(GrooveView->getObject()); - pcGroove->Angle.setValue((float)len); + pcGroove->Angle.setValue(len); if (updateView()) pcGroove->getDocument()->recomputeFeature(pcGroove); } @@ -187,7 +187,7 @@ void TaskGrooveParameters::onUpdateView(bool on) { if (on) { PartDesign::Groove* pcGroove = static_cast(GrooveView->getObject()); - pcGroove->getDocument()->recomputeFeature(pcGroove); + pcGroove->getDocument()->recomputeFeature(pcGroove); } } diff --git a/src/Mod/PartDesign/Gui/TaskPadParameters.cpp b/src/Mod/PartDesign/Gui/TaskPadParameters.cpp index e47ae2d78..f3c213a29 100644 --- a/src/Mod/PartDesign/Gui/TaskPadParameters.cpp +++ b/src/Mod/PartDesign/Gui/TaskPadParameters.cpp @@ -235,7 +235,7 @@ void TaskPadParameters::onSelectionChanged(const Gui::SelectionChanges& msg) void TaskPadParameters::onLengthChanged(double len) { PartDesign::Pad* pcPad = static_cast(PadView->getObject()); - pcPad->Length.setValue((float)len); + pcPad->Length.setValue(len); if (updateView()) pcPad->getDocument()->recomputeFeature(pcPad); } @@ -260,7 +260,7 @@ void TaskPadParameters::onReversed(bool on) void TaskPadParameters::onLength2Changed(double len) { PartDesign::Pad* pcPad = static_cast(PadView->getObject()); - pcPad->Length2.setValue((float)len); + pcPad->Length2.setValue(len); if (updateView()) pcPad->getDocument()->recomputeFeature(pcPad); } @@ -412,15 +412,15 @@ void TaskPadParameters::changeEvent(QEvent *e) ui->changeMode->addItem(tr("Up to face")); ui->changeMode->addItem(tr("Two dimensions")); ui->changeMode->setCurrentIndex(index); - - QByteArray upToFace = this->getFaceName(); + + QByteArray upToFace = this->getFaceName(); int faceId = -1; bool ok = false; if (upToFace.indexOf("Face") == 0) { faceId = upToFace.remove(0,4).toInt(&ok); } - ui->lineFaceName->setText(ok ? - tr("Face") + QString::number(faceId) : + ui->lineFaceName->setText(ok ? + tr("Face") + QString::number(faceId) : tr("No face selected")); ui->doubleSpinBox->blockSignals(false); ui->doubleSpinBox2->blockSignals(false); diff --git a/src/Mod/PartDesign/Gui/TaskPocketParameters.cpp b/src/Mod/PartDesign/Gui/TaskPocketParameters.cpp index 152943a5a..ceb913666 100644 --- a/src/Mod/PartDesign/Gui/TaskPocketParameters.cpp +++ b/src/Mod/PartDesign/Gui/TaskPocketParameters.cpp @@ -215,7 +215,7 @@ void TaskPocketParameters::onSelectionChanged(const Gui::SelectionChanges& msg) void TaskPocketParameters::onLengthChanged(double len) { PartDesign::Pocket* pcPocket = static_cast(PocketView->getObject()); - pcPocket->Length.setValue((float)len); + pcPocket->Length.setValue(len); if (updateView()) pcPocket->getDocument()->recomputeFeature(pcPocket); } @@ -374,15 +374,15 @@ void TaskPocketParameters::changeEvent(QEvent *e) ui->changeMode->addItem(tr("To first")); ui->changeMode->addItem(tr("Up to face")); ui->changeMode->setCurrentIndex(index); - - QByteArray upToFace = this->getFaceName(); + + QByteArray upToFace = this->getFaceName(); int faceId = -1; bool ok = false; if (upToFace.indexOf("Face") == 0) { faceId = upToFace.remove(0,4).toInt(&ok); } - ui->lineFaceName->setText(ok ? - tr("Face") + QString::number(faceId) : + ui->lineFaceName->setText(ok ? + tr("Face") + QString::number(faceId) : tr("No face selected")); ui->doubleSpinBox->blockSignals(false); ui->lineFaceName->blockSignals(false); diff --git a/src/Mod/PartDesign/Gui/TaskRevolutionParameters.cpp b/src/Mod/PartDesign/Gui/TaskRevolutionParameters.cpp index abbf000c4..a666fcee0 100644 --- a/src/Mod/PartDesign/Gui/TaskRevolutionParameters.cpp +++ b/src/Mod/PartDesign/Gui/TaskRevolutionParameters.cpp @@ -124,7 +124,7 @@ TaskRevolutionParameters::TaskRevolutionParameters(ViewProviderRevolution *Revol void TaskRevolutionParameters::onAngleChanged(double len) { PartDesign::Revolution* pcRevolution = static_cast(RevolutionView->getObject()); - pcRevolution->Angle.setValue((float)len); + pcRevolution->Angle.setValue(len); if (updateView()) pcRevolution->getDocument()->recomputeFeature(pcRevolution); } @@ -187,7 +187,7 @@ void TaskRevolutionParameters::onUpdateView(bool on) { if (on) { PartDesign::Revolution* pcRevolution = static_cast(RevolutionView->getObject()); - pcRevolution->getDocument()->recomputeFeature(pcRevolution); + pcRevolution->getDocument()->recomputeFeature(pcRevolution); } }