Closed smoothumut closed 4 months ago
The recent updates to the vedo/assembly.py
file enhance error handling within the __iadd__
method. By introducing a try-except
block around the addition process, the method can now attempt to add a.actor
if adding a
fails. This improvement increases the robustness of the assembly feature, ensuring graceful management of various input types and minimizing potential interruptions in functionality.
Files | Change Summary |
---|---|
vedo/assembly.py | Enhanced error handling in __iadd__ by adding a try-except block to manage part addition failures. |
sequenceDiagram
participant User
participant Assembly
participant Part
User->>Assembly: __iadd__(a)
activate Assembly
Assembly->>Assembly: try to AddPart(a)
alt Success
Assembly-->>User: Part added successfully
else Failure
Assembly->>Assembly: try to AddPart(a.actor)
alt Success
Assembly-->>User: Actor part added successfully
else Failure
Assembly-->>User: Failed to add part
end
end
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Thanks Umut!
when a mesh is added , then it crashes. it needs vtkOpenGLActor instead of vedo.mesh. so a.actor solves the problem