Skip to content

Commit df363ec

Browse files
committed
fix deprecation warning
1 parent 6e219ba commit df363ec

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1111

1212
### Changed
1313

14+
* Changed `brepgprop_VolumeProperties` to `brepgprop.VolumeProperties`.
15+
1416
### Removed
1517

1618

src/compas_occ/occ.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from compas.geometry import Point
22
from OCC.Core.BOPAlgo import BOPAlgo_Splitter
3-
from OCC.Core.BRepGProp import brepgprop_VolumeProperties
3+
from OCC.Core.BRepGProp import brepgprop
44
from OCC.Core.GProp import GProp_GProps
55
from OCC.Core.TopoDS import TopoDS_Compound
66
from OCC.Core.TopoDS import TopoDS_Iterator
@@ -72,6 +72,6 @@ def compute_shape_centreofmass(occ_shape: TopoDS_Shape) -> Point:
7272
7373
"""
7474
props = GProp_GProps()
75-
brepgprop_VolumeProperties(occ_shape, props)
75+
brepgprop.VolumeProperties(occ_shape, props)
7676
pnt = props.CentreOfMass()
7777
return point_to_compas(pnt)

0 commit comments

Comments
 (0)