Move from float to double

This commit is contained in:
wmayer
2013-03-23 15:12:04 +01:00
parent 218f972b05
commit ef890db848
41 changed files with 236 additions and 239 deletions

View File

@@ -55,9 +55,9 @@ PROPERTY_SOURCE(Part::Extrusion, Part::Feature)
Extrusion::Extrusion()
{
ADD_PROPERTY(Base,(0));
ADD_PROPERTY(Dir,(Base::Vector3f(0.0f,0.0f,1.0f)));
ADD_PROPERTY(Dir,(Base::Vector3d(0.0f,0.0f,1.0f)));
ADD_PROPERTY(Solid,(false));
ADD_PROPERTY(TaperAngle,(0.0f));
ADD_PROPERTY(TaperAngle,(0.0));
}
short Extrusion::mustExecute() const
@@ -79,7 +79,7 @@ App::DocumentObjectExecReturn *Extrusion::execute(void)
return new App::DocumentObjectExecReturn("Linked object is not a Part object");
Part::Feature *base = static_cast<Part::Feature*>(Base.getValue());
Base::Vector3f v = Dir.getValue();
Base::Vector3d v = Dir.getValue();
gp_Vec vec(v.x,v.y,v.z);
float taperAngle = TaperAngle.getValue();
bool makeSolid = Solid.getValue();

View File

@@ -42,8 +42,8 @@ PROPERTY_SOURCE(Part::Mirroring, Part::Feature)
Mirroring::Mirroring()
{
ADD_PROPERTY(Source,(0));
ADD_PROPERTY_TYPE(Base,(Base::Vector3f()),"Plane",App::Prop_None,"The base point of the plane");
ADD_PROPERTY_TYPE(Normal,(Base::Vector3f(0,0,1)),"Plane",App::Prop_None,"The normal of the plane");
ADD_PROPERTY_TYPE(Base,(Base::Vector3d()),"Plane",App::Prop_None,"The base point of the plane");
ADD_PROPERTY_TYPE(Normal,(Base::Vector3d(0,0,1)),"Plane",App::Prop_None,"The normal of the plane");
}
short Mirroring::mustExecute() const
@@ -80,8 +80,8 @@ App::DocumentObjectExecReturn *Mirroring::execute(void)
if (!link->getTypeId().isDerivedFrom(Part::Feature::getClassTypeId()))
return new App::DocumentObjectExecReturn("Linked object is not a Part object");
Part::Feature *source = static_cast<Part::Feature*>(link);
Base::Vector3f base = Base.getValue();
Base::Vector3f norm = Normal.getValue();
Base::Vector3d base = Base.getValue();
Base::Vector3d norm = Normal.getValue();
try {
const TopoDS_Shape& shape = source->Shape.getValue();

View File

@@ -182,8 +182,8 @@ void Box::Restore(Base::XMLReader &reader)
}
// for 0.8 releases
else if (location_axis) {
Base::Vector3f d = Axis.getValue();
Base::Vector3f p = Location.getValue();
Base::Vector3d d = Axis.getValue();
Base::Vector3d p = Location.getValue();
Base::Rotation rot(Base::Vector3d(0.0,0.0,1.0),
Base::Vector3d(d.x,d.y,d.z));
plm.setRotation(rot);

View File

@@ -37,7 +37,7 @@ PROPERTY_SOURCE(Part::Polygon, Part::Feature)
Part::Polygon::Polygon()
{
ADD_PROPERTY(Nodes,(Base::Vector3f()));
ADD_PROPERTY(Nodes,(Base::Vector3d()));
ADD_PROPERTY(Close,(false));
}
@@ -55,9 +55,9 @@ short Part::Polygon::mustExecute() const
App::DocumentObjectExecReturn *Part::Polygon::execute(void)
{
BRepBuilderAPI_MakePolygon poly;
const std::vector<Base::Vector3f> nodes = Nodes.getValues();
const std::vector<Base::Vector3d> nodes = Nodes.getValues();
for (std::vector<Base::Vector3f>::const_iterator it = nodes.begin(); it != nodes.end(); ++it) {
for (std::vector<Base::Vector3d>::const_iterator it = nodes.begin(); it != nodes.end(); ++it) {
gp_Pnt pnt(it->x, it->y, it->z);
poly.Add(pnt);
}

View File

@@ -39,9 +39,9 @@ PROPERTY_SOURCE(Part::Revolution, Part::Feature)
Revolution::Revolution()
{
ADD_PROPERTY(Source,(0));
ADD_PROPERTY(Base,(Base::Vector3f(0.0f,0.0f,0.0f)));
ADD_PROPERTY(Axis,(Base::Vector3f(0.0f,0.0f,1.0f)));
ADD_PROPERTY(Angle,(360.0f));
ADD_PROPERTY(Base,(Base::Vector3d(0.0f,0.0f,0.0f)));
ADD_PROPERTY(Axis,(Base::Vector3d(0.0f,0.0f,1.0f)));
ADD_PROPERTY(Angle,(360.0));
Angle.setConstraints(&angleRangeU);
}
@@ -64,8 +64,8 @@ App::DocumentObjectExecReturn *Revolution::execute(void)
return new App::DocumentObjectExecReturn("Linked object is not a Part object");
Part::Feature *base = static_cast<Part::Feature*>(Source.getValue());
Base::Vector3f b = Base.getValue();
Base::Vector3f v = Axis.getValue();
Base::Vector3d b = Base.getValue();
Base::Vector3d v = Axis.getValue();
gp_Pnt pnt(b.x,b.y,b.z);
gp_Dir dir(v.x,v.y,v.z);

View File

@@ -82,11 +82,10 @@ bool ViewProviderMirror::setEdit(int ModNum)
Part::Mirroring* mf = static_cast<Part::Mirroring*>(getObject());
Base::BoundBox3d bbox = mf->Shape.getBoundingBox();
float len = (float)bbox.CalcDiagonalLength();
Base::Vector3f base = mf->Base.getValue();
Base::Vector3f norm = mf->Normal.getValue();
Base::Vector3d base = mf->Base.getValue();
Base::Vector3d norm = mf->Normal.getValue();
Base::Vector3d cent = bbox.CalcCenter();
Base::Vector3f cbox((float)cent.x,(float)cent.y,(float)cent.z);
base = cbox.ProjToPlane(base, norm);
base = cent.ProjToPlane(base, norm);
// setup the graph for editing the mirror plane
SoTransform* trans = new SoTransform;