Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ void moduleAddSparseGridTopology(pybind11::module& m) {

// findCube (pos)
c.def("findCube", [](SparseGridTopology & self, const py::list & l) {
sofa::type::Vector3 pos;
sofa::type::Vec3 pos;
pos[0] = l[0].cast<double>();
pos[1] = l[1].cast<double>();
pos[2] = l[2].cast<double>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ void bindLinearSolvers(py::module &m)
{
using CRS = sofa::linearalgebra::CompressedRowSparseMatrix<TBlock>;
using CRSLinearSolver = sofa::component::linearsolver::MatrixLinearSolver<CRS, sofa::linearalgebra::FullVector<SReal> >;
using Real = typename CRS::Real;

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,15 @@ namespace sofapython3
contactData["numberOfContacts"] = numberOfContacts;

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

std::vector<unsigned int> collisionElementsModel1;
std::vector<unsigned int> collisionElementsModel2;
collisionElementsModel1.reserve(numberOfContacts);
collisionElementsModel2.reserve(numberOfContacts);

std::vector<sofa::type::Vector3> collisionPointsModel1;
std::vector<sofa::type::Vector3> collisionPointsModel2;
std::vector<sofa::type::Vec3> collisionPointsModel1;
std::vector<sofa::type::Vec3> collisionPointsModel2;
collisionPointsModel1.reserve(numberOfContacts);
collisionPointsModel2.reserve(numberOfContacts);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ namespace sofapython3

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@

#include <SofaPython3/PythonFactory.h>
#include <SofaPython3/Sofa/Core/Binding_BaseObject.h>
#include <SofaExporter/STLExporter.h>
#include <sofa/component/io/mesh/STLExporter.h>

using sofa::component::exporter::STLExporter;
using sofa::component::io::mesh::STLExporter;

/// Makes an alias for the pybind11 namespace to increase readability.
namespace py { using namespace pybind11; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@

#include <SofaPython3/PythonFactory.h>
#include <SofaPython3/Sofa/Core/Binding_BaseObject.h>
#include <SofaExporter/VisualModelOBJExporter.h>
#include <sofa/component/io/mesh/VisualModelOBJExporter.h>

using sofa::component::exporter::VisualModelOBJExporter;
using sofa::component::io::mesh::VisualModelOBJExporter;

namespace py { using namespace pybind11; }

Expand Down