Skip to content

[Bug] Exception when exporting certain component shapes to OBJ #2609

@SiboVG

Description

@SiboVG

Describe the bug

When exporting certain components to an OBJ, it throws an exception.

---------- Bug report ----------

Please include a description about what actions you were performing when the exception occurred:
(You can edit text directly in this window)

1.
2.
3.

If possible, please send us the .ork file that caused the bug.

Include your email address (optional; it helps if we can contact you in case we need additional information):




(Do not modify anything below this line.)
---------- Exception stack trace ----------
java.lang.IllegalStateException: Unable to find a convex corner
at org.locationtech.jts.triangulate.polygon.PolygonEarClipper.compute(PolygonEarClipper.java:169)
at org.locationtech.jts.triangulate.polygon.PolygonEarClipper.triangulate(PolygonEarClipper.java:61)
at org.locationtech.jts.triangulate.polygon.ConstrainedDelaunayTriangulator.triangulatePolygon(ConstrainedDelaunayTriangulator.java:107)
at org.locationtech.jts.triangulate.polygon.ConstrainedDelaunayTriangulator.compute(ConstrainedDelaunayTriangulator.java:87)
at org.locationtech.jts.triangulate.polygon.ConstrainedDelaunayTriangulator.getTriangles(ConstrainedDelaunayTriangulator.java:77)
at info.openrocket.core.file.wavefrontobj.TriangulationHelper.generateCDTFaces(TriangulationHelper.java:82)
at info.openrocket.core.file.wavefrontobj.TriangulationHelper.constrainedDelaunayTriangulate(TriangulationHelper.java:48)
at info.openrocket.core.file.wavefrontobj.export.OBJExporterFactory.doExport(OBJExporterFactory.java:180)
at info.openrocket.swing.gui.main.BasicFrame.saveWavefrontOBJFile(BasicFrame.java:1698)
at info.openrocket.swing.gui.main.BasicFrame.saveAsWavefrontOBJ(BasicFrame.java:1685)
at info.openrocket.swing.gui.main.BasicFrame.exportWavefrontOBJAction(BasicFrame.java:1678)
at info.openrocket.swing.gui.main.RocketActions$ExportOBJAction.actionPerformed(RocketActions.java:1274)
at java.desktop/javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1972)
at java.desktop/javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2313)
at java.desktop/javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:405)
at java.desktop/javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:262)
at java.desktop/javax.swing.AbstractButton.doClick(AbstractButton.java:374)
at java.desktop/javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:1028)
at java.desktop/javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:1072)
at java.desktop/java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:297)
at java.desktop/java.awt.Component.processMouseEvent(Component.java:6626)
at java.desktop/javax.swing.JComponent.processMouseEvent(JComponent.java:3389)
at java.desktop/java.awt.Component.processEvent(Component.java:6391)
at java.desktop/java.awt.Container.processEvent(Container.java:2266)
at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:5001)
at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2324)
at java.desktop/java.awt.Component.dispatchEvent(Component.java:4833)
at java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4948)
at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Container.java:4575)
at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Container.java:4516)
at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2310)
at java.desktop/java.awt.Window.dispatchEventImpl(Window.java:2780)
at java.desktop/java.awt.Component.dispatchEvent(Component.java:4833)
at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:773)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:722)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:716)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:97)
at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:746)
at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:744)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:743)
at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)

To Reproduce

  1. Open the attached .ork
  2. Right-click on the nose cone > Export to .obj

Screenshots / .ork file

.ork file:

DOC-20241204-WA0024.ork.zip

OpenRocket version

unstable

What platform are you running on?

macOS

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions