Skip to content

Commit 118088e

Browse files
Remove deprecated sofa::type::Vector3 in bindings. (#324)
* Remove deprecated sofa::type::Vector3 in bindings. * Remove un-used alias
1 parent 8b32b72 commit 118088e

6 files changed

Lines changed: 9 additions & 10 deletions

File tree

bindings/Modules/src/SofaPython3/SofaBaseTopology/Binding_SparseGridTopology.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ void moduleAddSparseGridTopology(pybind11::module& m) {
4646

4747
// findCube (pos)
4848
c.def("findCube", [](SparseGridTopology & self, const py::list & l) {
49-
sofa::type::Vector3 pos;
49+
sofa::type::Vec3 pos;
5050
pos[0] = l[0].cast<double>();
5151
pos[1] = l[1].cast<double>();
5252
pos[2] = l[2].cast<double>();

bindings/Modules/src/SofaPython3/SofaLinearSolver/Binding_LinearSolver.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@ void bindLinearSolvers(py::module &m)
5858
{
5959
using CRS = sofa::linearalgebra::CompressedRowSparseMatrix<TBlock>;
6060
using CRSLinearSolver = sofa::component::linearsolver::MatrixLinearSolver<CRS, sofa::linearalgebra::FullVector<SReal> >;
61-
using Real = typename CRS::Real;
6261

6362
const std::string typeName = CRSLinearSolver::GetClass()->className + CRSLinearSolver::GetCustomTemplateName();
6463

bindings/Sofa/src/SofaPython3/Sofa/Core/Binding_ContactListener.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,15 +45,15 @@ namespace sofapython3
4545
contactData["numberOfContacts"] = numberOfContacts;
4646

4747
const std::vector<std::tuple<unsigned int, unsigned int, unsigned int, unsigned int>> contactElements = listener.getContactElements();
48-
const std::vector<std::tuple<unsigned int, sofa::type::Vector3, unsigned int, sofa::type::Vector3>> contactPoints = listener.getContactPoints();
48+
const std::vector<std::tuple<unsigned int, sofa::type::Vec3, unsigned int, sofa::type::Vec3>> contactPoints = listener.getContactPoints();
4949

5050
std::vector<unsigned int> collisionElementsModel1;
5151
std::vector<unsigned int> collisionElementsModel2;
5252
collisionElementsModel1.reserve(numberOfContacts);
5353
collisionElementsModel2.reserve(numberOfContacts);
5454

55-
std::vector<sofa::type::Vector3> collisionPointsModel1;
56-
std::vector<sofa::type::Vector3> collisionPointsModel2;
55+
std::vector<sofa::type::Vec3> collisionPointsModel1;
56+
std::vector<sofa::type::Vec3> collisionPointsModel2;
5757
collisionPointsModel1.reserve(numberOfContacts);
5858
collisionPointsModel2.reserve(numberOfContacts);
5959

bindings/Sofa/src/SofaPython3/Sofa/Core/Binding_ForceField.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ namespace sofapython3
141141

142142
size_t offset = mref.offset;
143143
// nNodes is the number of nodes (positions) of the object whose K matrix we're computing
144-
int nNodes = int(mparams->readX(mstate)->getValue().size());
144+
int nNodes = int(mparams->readX(mstate.get())->getValue().size());
145145
// nDofs is the number of degrees of freedom per-element of the object whose K matrix we're computing
146146
int nDofs = Coord::total_size;
147147

bindings/SofaExporter/src/SofaExporter/Binding_STLExporter.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@
2424

2525
#include <SofaPython3/PythonFactory.h>
2626
#include <SofaPython3/Sofa/Core/Binding_BaseObject.h>
27-
#include <SofaExporter/STLExporter.h>
27+
#include <sofa/component/io/mesh/STLExporter.h>
2828

29-
using sofa::component::exporter::STLExporter;
29+
using sofa::component::io::mesh::STLExporter;
3030

3131
/// Makes an alias for the pybind11 namespace to increase readability.
3232
namespace py { using namespace pybind11; }

bindings/SofaExporter/src/SofaExporter/Binding_VisualModelOBJExporter.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@
2424

2525
#include <SofaPython3/PythonFactory.h>
2626
#include <SofaPython3/Sofa/Core/Binding_BaseObject.h>
27-
#include <SofaExporter/VisualModelOBJExporter.h>
27+
#include <sofa/component/io/mesh/VisualModelOBJExporter.h>
2828

29-
using sofa::component::exporter::VisualModelOBJExporter;
29+
using sofa::component::io::mesh::VisualModelOBJExporter;
3030

3131
namespace py { using namespace pybind11; }
3232

0 commit comments

Comments
 (0)