Skip to content

Commit

Permalink
fix deprecation warning
Browse files Browse the repository at this point in the history
  • Loading branch information
tomvanmele committed Jul 9, 2024
1 parent 6e219ba commit df363ec
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Changed

* Changed `brepgprop_VolumeProperties` to `brepgprop.VolumeProperties`.

### Removed


Expand Down
4 changes: 2 additions & 2 deletions src/compas_occ/occ.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from compas.geometry import Point
from OCC.Core.BOPAlgo import BOPAlgo_Splitter
from OCC.Core.BRepGProp import brepgprop_VolumeProperties
from OCC.Core.BRepGProp import brepgprop
from OCC.Core.GProp import GProp_GProps
from OCC.Core.TopoDS import TopoDS_Compound
from OCC.Core.TopoDS import TopoDS_Iterator
Expand Down Expand Up @@ -72,6 +72,6 @@ def compute_shape_centreofmass(occ_shape: TopoDS_Shape) -> Point:
"""
props = GProp_GProps()
brepgprop_VolumeProperties(occ_shape, props)
brepgprop.VolumeProperties(occ_shape, props)
pnt = props.CentreOfMass()
return point_to_compas(pnt)

0 comments on commit df363ec

Please sign in to comment.