addam / Export-Paper-Model-from-Blender

Python addon for creating paper models in Blender (development version)
https://blenderartists.org/t/export-paper-model/476597
406 stars 54 forks source link

N-gons with holes #49

Closed nortikin closed 7 years ago

nortikin commented 7 years ago

First of all thank you much for that addon, i have many fun time with it. For now try to solve one issue, using paper model addon impacted with:

i reported to blender org developers, not asking here If i have Ngon with concaved inside vertices, why it not works? try to make that on image - holes to connect mesh with bolts:

bugreport

To unfold mesh use your addon, to make holes use sverchok + my scripted node making circles inside polygon on middle point and rotating automatically. Tried welded and separated vertex, all the same:

Traceback (most recent call last):
  File "/home/olo/.config/blender/2.78/scripts/addons/io_export_paper_model.py", line 1845, in execute
    unfolder.prepare(cage_size, self.do_create_uvmap, mark_seams=True, priority_effect=priority_effect, scale=sce.unit_settings.scale_length/settings.scale)
  File "/home/olo/.config/blender/2.78/scripts/addons/io_export_paper_model.py", line 168, in prepare
    self.mesh.generate_cuts(cage_size / scale if cage_size else None, priority_effect)
  File "/home/olo/.config/blender/2.78/scripts/addons/io_export_paper_model.py", line 300, in generate_cuts
    if island_a.join(island_b, edge, size_limit=page_size):
  File "/home/olo/.config/blender/2.78/scripts/addons/io_export_paper_model.py", line 981, in join
    raise UnfoldError("Export failed. Please report this error, including the model if you can.")
io_export_paper_model.UnfoldError: Export failed. Please report this error, including the model if you can.
nortikin commented 7 years ago

there is 2500+ lines of code you have, i just have no time now to investigate. What part of code is responsible of polygon configuration and why it decided to fail?

addam commented 7 years ago

Most of these < 2500 lines are Blender 2.4 legacy, anyway, errors like this are usually not easy to investigate. Can you send your model, please? Concave faces export flawlessly, in general.

addam commented 7 years ago

Fixed (6c28ce). I downloaded your file from developer.blender.org.

However, nikitron, that model is really weird. Notice that the Knife tool (K or Shift+K) will never produce faces with holes like this. Sverchok should use two faces to create a hole between them.

nortikin commented 7 years ago

ok, i can remake script, thank you for advice!!!!! And for (6c28ce) :1st_place_medal: