CSG Import

Post here for help on using FreeCAD's graphical user interface (GUI).
Forum rules
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help

Also, be nice to others! Read the FreeCAD code of conduct!
Post Reply
jdabbs003
Posts: 26
Joined: Thu Oct 23, 2014 6:23 pm

CSG Import

Post by jdabbs003 »

Hello,

I have been having reasonable success with CSG import, but seem to hit a wall with more complex parts now:

PCB7001-shieldFinger.csg (imports correctly)
PCB7001-shieldTop.csg (A fatal error occurred when running boolean operation but still imports)
PCB7001-shieldBottom.csg (A fatal error occurred when running boolean operation and does not import)

1.Is there a way to determine which objects and operation cause the exception?

2. What are the reasonable limits for the complexity of CSG parts in FreeCAD?

3. Would more memory and CPU help?


OS: Windows 7
Word size: 64-bit
Version: 0.14.3700 (Git)
Branch: releases/FreeCAD-0-14
Hash: 32f5aae0a64333ec8d5d160dbc46e690510c8fe1
Python version: 2.7.6
Qt version: 4.8.5
Coin version: 4.0.0a
SoQt version: 1.6.0a
OCC version: 6.6.0
Attachments
PCB7001-shield.DXF
DXF import file, used by OpenSCAD to generate CSG files
(105.78 KiB) Downloaded 34 times
PCB7001-shieldBottom.csg
Shield Bottom piece
(3.56 KiB) Downloaded 29 times
pcb7001-shieldTop.csg
Shield Top Piece
(3.86 KiB) Downloaded 23 times
PCB7001-shieldFinger.csg
Shield RFI Finger
(849 Bytes) Downloaded 26 times
User avatar
shoogen
Veteran
Posts: 2823
Joined: Thu Dec 01, 2011 5:24 pm

Re: CSG Import

Post by shoogen »

0. OpenSCAD is very tolerant to coincident or duplicate geometry. A lot of problems from generating faces from edges originates from duplicate lines.
1. If the import finishes but the recompute of the document fails. There should be an exclamation mark in the tree view to indicate, which objected could not be recomputed.
If the The import fails. There should be an error message. For example when importing shieldTop it got the message that the import of "Mechanical27" failed.
2. Joining edges to wires is relatively easy. But sorting out which faces overlap is a tough problem. The current solution is to try every possible combination of two faces. This approach does scale very badly.
Currently every time a layer of a dxf file is used, the whole dxf file gets imported and every geometry is deleted form the document is deleted afterwards. The focus of the csg import was to correctly import geometry.
3. Sometimes patience does help. But more cpu cores won't help. Having more memory is always a good idea.

PCB7001-shieldTop.csg: I can't find a layer Mechanical27 in the dxf file either
PCB7001-shieldBottom.csg: Import finishes, but the geometry is faulty:
Wire1 of Mechanical24 is reported to be self intersecting
Wire1 of Mechanical19 is reported to be not closed.
Post Reply