Export 3D model in VRML format error message: exceeds radius


#1

Hi,

I’m trying to export the 3d Model of my pcb in wrml format. Kicad show the following error message: “Export IDF failed: AddArc():width/2 exceeds radius*1.01”

I can’t understand this message. How could I solve it?

Thanks in advance,

Marco


#2

Could you give us your kicad version?


#3

You must have an arc (or circle) with a Width parameter set larger than the Diameter. If you imagine using a paint brush to draw the arc, then the brush stroke will overlap itself. This causes geometry problems if there is no special code to handle this situation. In fact there is a bug in that code - the limit should be Radius * 0.99 rather than 1.01 in order to avoid geometry problems.


#4

My kicad version is: 4.0.5. Are there any problems with my version?

Thanks
Marco


#5

Hi,

thanks for the answer. So how could i solve the problem? kicad doesn’t give me any other informations about this problem. It is very difficult to find out the source of the problem.
Do you have any tips?

Thanks,
Marco


#6

I have just downloade the latest version (4.0.7) and I receive the same message when I try to generate the wrlm file.


#7

The only thing I can think of, if the board is not so complex, is to look at the kicad_pcb file and find the patterns fp_arc and gr_arc. The ‘start’ point is actually the center and the ‘end’ point is the start of the arc, so the distance from start to end is the radius and you can compare that with the ‘width’ parameter. For boards with many arcs the only sensible solution would be to write a small tool which would tell you what lines to find any offending arcs.


#8

Would it be possible to include the offending line in the error message? (Like done with other error messages.)


#9

Does the 3D generation fail at any other point? Can you see the board in the 3D Viewer or export as a step file?


#10

Step export does not exist for the stable version.


#11

We could modify kicad to print the coordinates and other information on the offending arc (but not the line number). However, I don’t believe anyone wants to work on yet another 4.x release so any patch would have to be compiled from source.


#12

The failure in this case is an unfortunate effect of the IDF exporter sharing code with the VRML exporter. The entity causing the problem is probably not even one which will be exported to IDF but it is processed by the shared code. One other option is to simply force the width to a usable value, but there is no mechanism to let the user know that there was a problem and that the rendered board might not be exactly as they wanted.