
Tue, 10/24/2023 - 19:14
Forums:
I have encountered an issue while using Open CASCADE Technology (OCCT) version 7.7.2.
- The function
GeomAPI_PointsToBSpline
creates a curve (curveA
) with parameters (-nan, -nan) without raising any error message. - When an
AIS_Shape
derived fromcurveA
is passed toSelectMgr_SelectionManager.Activate()
, it results in a deadlock. To put it succinctly, invokingDisplayShape(ais_shape)
initiates a deadlock situation.
I've written the code in PythonOCC, but the same error emerges in OCCT 7.7.2:
def test_bezier0():
p1 = gp_Pnt(0, 0, 0)
p2 = gp_Pnt(0, 1, 0)
p3 = gp_Pnt(0, 4, 0)
p = gp_Pnt()
try:
line = points_to_bspline([p1, p2, p3])
except Exception as error:
print(error)
return line
def test_aisp_line():
display, start, *_ = init_display()
line = test_bezier0()
builder = BRepBuilderAPI_MakeEdge(line)
edge = builder.Edge()
ais = AIS_Shape(edge)
ctx:AIS_InteractiveContext = display.Context
ais.ViewAffinity().SetVisible(True)
viewer = ctx.CurrentViewer()
viewer.StructureManager().RegisterObject(ais, ais.ViewAffinity())
prsManager = ctx.MainPrsMgr()
prsManager.Display(ais, ais.DisplayMode())
assert ais.GlobalSelectionMode() == 0
# The error exists here
selector:SelectMgr_SelectionManager = ctx.SelectionManager()
if not selector.Contains(ais):
selector.Load(ais)
# print(line.FirstParameter(), line.LastParameter()) # This line prints a nan nan bound.
print('The next line causes an error')
selector.Activate(ais, ais.GlobalSelectionMode())
Wed, 11/01/2023 - 14:23
Hello,
thanks for your research. We will analyze the problem on C++ side. And will return to you if we are able to reproduce.
If you can share more details, it will be helpful.
Best regards, Dmitrii.