sofa icon indicating copy to clipboard operation
sofa copied to clipboard

Bug in CubeTopology?

Open ScheiklP opened this issue 3 years ago • 0 comments

Problem

I played around with a pythonized version of the BeamFEMForceField Example.

node.addObject(
"CubeTopology",
  nx=num_points,
  ny=2,
  nz=2,
  min=[0, -0.1, -0.1],
  max=[length, 0.1, 0.1],
)
node.addObject("MechanicalObject")
node.addObject("TriangleCollisionModel")
node.addObject("BeamLinearMapping", isMechanical=True)

And I observed, that the x-coordinates in the MechanicalObject are limited in x, to the absolute value of nx. So for

num_points = 100
length = 20

the topology is created correctly (at least the points in the instance look valid), but the MechanicalObject's points in x are in [0, 20], even though the number of points is correct.

The same is true for the reverse case

num_points = 20
length = 100

-> MechanicalObject's points in x are in [0, 100]


Environment

Context

  • System: Ubuntu 20.04
  • Version of SOFA: 22.06
  • State: Install directory

ScheiklP avatar Jun 15 '22 17:06 ScheiklP