setHighLightColor
时间: 2023-12-10 07:35:27 浏览: 29
很抱歉,根据提供的引用内容,PythonOCC中似乎没有SetHighlightColor函数。但是,您可以使用SetHighlightStyle函数来更改高亮显示样式。同时,您可以使用SetColor函数来修改高亮显示样式的颜色参数。以下是一个示例代码:
```python
from OCC.Display.WebGl.jupyter_renderer import JupyterRenderer
from OCC.Core.BRepPrimAPI import BRepPrimAPI_MakeBox
from OCC.Core.Quantity import Quantity_Color, Quantity_TOC_RGB
from OCC.Core.Graphic3d import Graphic3d_NOM_NEON_GFL, Graphic3d_TOSM_VERTEX_COLOR
my_renderer = JupyterRenderer()
# 创建一个立方体
my_box = BRepPrimAPI_MakeBox(10, 20, 30).Shape()
# 创建一个高亮显示样式
hilight_style = my_renderer.create_highlight_style(Graphic3d_NOM_NEON_GFL, Graphic3d_TOSM_VERTEX_COLOR)
# 将高亮显示样式的颜色参数设置为红色
color = Quantity_Color(1.0, 0.0, 0.0, Quantity_TOC_RGB)
hilight_style.SetColor(color)
# 将立方体添加到渲染器中,并使用高亮显示样式进行高亮显示
my_renderer.DisplayShape(my_box, update=True, highlight=hilight_style)
```