File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -246,8 +246,6 @@ def solve_particle_particle_contacts(
246
246
radius = particle_radius [i ]
247
247
w1 = particle_invmass [i ]
248
248
249
- f = wp .vec3 ()
250
-
251
249
# particle contact
252
250
query = wp .hash_grid_query (grid , x , radius + max_radius + k_cohesion )
253
251
index = int (0 )
Original file line number Diff line number Diff line change @@ -810,12 +810,12 @@ def soft_contact_distance(self, value):
810
810
DeprecationWarning ,
811
811
stacklevel = 2 ,
812
812
)
813
-
813
+
814
814
@property
815
815
def particle_radius (self ):
816
816
"""Array of per-particle radii"""
817
817
return self ._particle_radius
818
-
818
+
819
819
@particle_radius .setter
820
820
def particle_radius (self , value ):
821
821
if isinstance (value , float ):
@@ -828,8 +828,13 @@ def particle_radius(self, value):
828
828
stacklevel = 2 ,
829
829
)
830
830
self ._particle_radius .fill_ (value )
831
+ self .particle_max_radius = value
831
832
else :
832
833
self ._particle_radius = value
834
+ # TODO implement max radius update to be compatible with graph capture
835
+ device = wp .get_device (self .device )
836
+ if not device .is_capturing :
837
+ self .particle_max_radius = self ._particle_radius .numpy ().max ()
833
838
834
839
835
840
class ModelBuilder :
You can’t perform that action at this time.
0 commit comments