Move from float to double
This commit is contained in:
@@ -50,7 +50,7 @@ project(PyObject *self, PyObject *args)
|
||||
if (pcObjDir)
|
||||
Vector = *static_cast<Base::VectorPy*>(pcObjDir)->getVectorPtr();
|
||||
|
||||
ProjectionAlgos Alg(pShape->getTopoShapePtr()->_Shape,Base::Vector3f((float)Vector.x,(float)Vector.y,(float)Vector.z));
|
||||
ProjectionAlgos Alg(pShape->getTopoShapePtr()->_Shape,Vector);
|
||||
|
||||
Py::List list;
|
||||
list.append(Py::Object(new TopoShapePy(new TopoShape(Alg.V)) , true));
|
||||
@@ -79,7 +79,7 @@ projectEx(PyObject *self, PyObject *args)
|
||||
if (pcObjDir)
|
||||
Vector = *static_cast<Base::VectorPy*>(pcObjDir)->getVectorPtr();
|
||||
|
||||
ProjectionAlgos Alg(pShape->getTopoShapePtr()->_Shape,Base::Vector3f((float)Vector.x,(float)Vector.y,(float)Vector.z));
|
||||
ProjectionAlgos Alg(pShape->getTopoShapePtr()->_Shape,Vector);
|
||||
|
||||
Py::List list;
|
||||
list.append(Py::Object(new TopoShapePy(new TopoShape(Alg.V)) , true));
|
||||
@@ -116,7 +116,7 @@ projectToSVG(PyObject *self, PyObject *args)
|
||||
Base::Vector3d Vector(0,0,1);
|
||||
if (pcObjDir)
|
||||
Vector = static_cast<Base::VectorPy*>(pcObjDir)->value();
|
||||
ProjectionAlgos Alg(pShape->getTopoShapePtr()->_Shape,Base::Vector3f((float)Vector.x,(float)Vector.y,(float)Vector.z));
|
||||
ProjectionAlgos Alg(pShape->getTopoShapePtr()->_Shape,Vector);
|
||||
|
||||
bool hidden = false;
|
||||
if (type && std::string(type) == "ShowHiddenLines")
|
||||
@@ -146,7 +146,7 @@ projectToDXF(PyObject *self, PyObject *args)
|
||||
Base::Vector3d Vector(0,0,1);
|
||||
if (pcObjDir)
|
||||
Vector = static_cast<Base::VectorPy*>(pcObjDir)->value();
|
||||
ProjectionAlgos Alg(pShape->getTopoShapePtr()->_Shape,Base::Vector3f((float)Vector.x,(float)Vector.y,(float)Vector.z));
|
||||
ProjectionAlgos Alg(pShape->getTopoShapePtr()->_Shape,Vector);
|
||||
|
||||
bool hidden = false;
|
||||
if (type && std::string(type) == "ShowHiddenLines")
|
||||
|
||||
@@ -50,7 +50,7 @@ FeatureProjection::FeatureProjection()
|
||||
{
|
||||
static const char *group = "Projection";
|
||||
ADD_PROPERTY_TYPE(Source ,(0),group,App::Prop_None,"Shape to project");
|
||||
ADD_PROPERTY_TYPE(Direction ,(Base::Vector3f(0,0,1)),group,App::Prop_None,"Projection direction");
|
||||
ADD_PROPERTY_TYPE(Direction ,(Base::Vector3d(0,0,1)),group,App::Prop_None,"Projection direction");
|
||||
ADD_PROPERTY_TYPE(VCompound ,(true),group,App::Prop_None,"Projection parameter");
|
||||
ADD_PROPERTY_TYPE(Rg1LineVCompound ,(true),group,App::Prop_None,"Projection parameter");
|
||||
ADD_PROPERTY_TYPE(RgNLineVCompound ,(true),group,App::Prop_None,"Projection parameter");
|
||||
@@ -79,7 +79,7 @@ App::DocumentObjectExecReturn *FeatureProjection::execute(void)
|
||||
return new App::DocumentObjectExecReturn("Linked shape object is empty");
|
||||
|
||||
try {
|
||||
const Base::Vector3f& dir = Direction.getValue();
|
||||
const Base::Vector3d& dir = Direction.getValue();
|
||||
Drawing::ProjectionAlgos alg(shape, dir);
|
||||
|
||||
TopoDS_Compound comp;
|
||||
|
||||
@@ -188,7 +188,7 @@ App::DocumentObjectExecReturn *FeatureViewPart::execute(void)
|
||||
TopoDS_Shape shape = static_cast<Part::Feature*>(link)->Shape.getShape()._Shape;
|
||||
if (shape.IsNull())
|
||||
return new App::DocumentObjectExecReturn("Linked shape object is empty");
|
||||
Base::Vector3f Dir = Direction.getValue();
|
||||
Base::Vector3d Dir = Direction.getValue();
|
||||
bool hidden = ShowHiddenLines.getValue();
|
||||
bool smooth = ShowSmoothLines.getValue();
|
||||
|
||||
|
||||
@@ -90,7 +90,7 @@ using namespace std;
|
||||
|
||||
|
||||
|
||||
ProjectionAlgos::ProjectionAlgos(const TopoDS_Shape &Input, const Base::Vector3f &Dir)
|
||||
ProjectionAlgos::ProjectionAlgos(const TopoDS_Shape &Input, const Base::Vector3d &Dir)
|
||||
: Input(Input), Direction(Dir)
|
||||
{
|
||||
execute();
|
||||
|
||||
@@ -39,7 +39,7 @@ class DrawingExport ProjectionAlgos
|
||||
{
|
||||
public:
|
||||
/// Constructor
|
||||
ProjectionAlgos(const TopoDS_Shape &Input,const Base::Vector3f &Dir);
|
||||
ProjectionAlgos(const TopoDS_Shape &Input,const Base::Vector3d &Dir);
|
||||
virtual ~ProjectionAlgos();
|
||||
|
||||
void execute(void);
|
||||
@@ -56,7 +56,7 @@ public:
|
||||
|
||||
|
||||
const TopoDS_Shape &Input;
|
||||
const Base::Vector3f &Direction;
|
||||
const Base::Vector3d &Direction;
|
||||
|
||||
TopoDS_Shape V ;// hard edge visibly
|
||||
TopoDS_Shape V1;// Smoth edges visibly
|
||||
|
||||
@@ -159,7 +159,7 @@ exporter(PyObject *self, PyObject *args)
|
||||
}
|
||||
TopoDS_Shape shape = static_cast<Part::Feature*>(link)->Shape.getShape()._Shape;
|
||||
if (!shape.IsNull()) {
|
||||
Base::Vector3f dir = view->Direction.getValue();
|
||||
Base::Vector3d dir = view->Direction.getValue();
|
||||
bool hidden = view->ShowHiddenLines.getValue();
|
||||
bool smooth = view->ShowSmoothLines.getValue();
|
||||
Drawing::ProjectionAlgos::ExtractionType type = Drawing::ProjectionAlgos::Plain;
|
||||
|
||||
Reference in New Issue
Block a user