mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-03-25 13:27:55 +05:00
24 lines
597 B
Python
24 lines
597 B
Python
![]() |
# -*- coding: utf-8 -*-
|
||
|
|
||
|
import logging
|
||
|
from geomsmesh import geompy
|
||
|
|
||
|
# -----------------------------------------------------------------------------
|
||
|
# --- substract a list of subShapes from another
|
||
|
|
||
|
def substractSubShapes(obj, subs, toRemove):
|
||
|
"""
|
||
|
liste de subshapes par difference
|
||
|
"""
|
||
|
logging.info("start")
|
||
|
idToremove = {}
|
||
|
subList = []
|
||
|
for s in toRemove:
|
||
|
idToremove[geompy.GetSubShapeID(obj, s)] = s
|
||
|
for s in subs:
|
||
|
idsub = geompy.GetSubShapeID(obj, s)
|
||
|
if idsub not in idToremove.keys():
|
||
|
subList.append(s)
|
||
|
logging.debug("subList=%s", subList)
|
||
|
return subList
|