View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0001143 | FreeCAD | Bug | public | 2013-05-29 09:49 | 2013-06-18 15:12 |
Reporter | wandererfan | Assigned To | |||
Priority | normal | Severity | major | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Product Version | trunk | ||||
Fixed in Version | 0.14 | ||||
Summary | 0001143: Boolean Cut Fails with Extruded Shapestring | ||||
Description | Using an extruded Draft.ShapeString as a cutting tool (mysolid.cut(extrudedSS) will fail with: "Boolean operation failed" (from GUI), or, "<type 'exceptions.Exception'>: BRep_API: command not done" (from script). This only happens for characters with voids ('O' fails, 'I' does not). The "face" (actually a compound) shape generated by ShapeString for characters with voids seems corrupt. Edges are not sorted in nose to tail order, and outer wire Orientation is incorrect. Attached script will generate error. | ||||
Additional Information | OS: Ubuntu 12.04.2 LTS Platform: 64-bit Version: 0.13.2115 (Git) Branch: master Hash: 7b703af113d0190242376ec9c9c365d98c42f057 Python version: 2.7.3 Qt version: 4.8.1 Coin version: 3.1.3 SoQt version: 1.5.0 OCC version: 6.5.1 | ||||
Tags | No tags attached. | ||||
FreeCAD Information | |||||
2013-05-29 09:49
|
|
2013-06-02 10:05
|
|
|
Attached "Draft.patch" file is a hack that seems to work, but it is really slow. It builds a new glyph face from the 'almost correct' glyph face after fixing all the wires. Working on a better algorithm. |
|
FYI this happens with boolean fuse as well. The current workaround I found was to explode the ShapeString object to faces with the Draft Downgrade tool, then extrude the faces. Booleans work then. Of course the resulting faces are non editable. |
|
The problem obviously is that for letters with voids the shape has inverted orientation. That's why it fails with boolean operations because the algorithm fails to detect inner and outer. In the property editor you can see this easily by setting Lighting to "One side". So, the bug must be somewhere in the function Draft.makeGlyph(). FYI: For the sketcher we have a similar algorithm where we get a list of wires. The wire with the biggest bounding box is assumed to build the face while wires inside this wire form holes in the face. Wires outside the wire are additional faces. |
|
i implemented a similar function in OpenSCAD2Dgeom.edgestofaces() |
|
Playing with a few more fonts it's probably not the orientation that makes problems but maybe the use of boolean operations inside makeGlyph(). There is really no need for that because it's very slow and it is supposed to be used with solids only. Using it for faces seems to work but could also be the reason for the malformed wires. |
|
git show 2282b72 replaces makeGlyph() with something similar used for sketches which already fixes many problems. |
|
Should work now. |
Date Modified | Username | Field | Change |
---|---|---|---|
2013-05-29 09:49 | wandererfan | New Issue | |
2013-05-29 09:49 | wandererfan | File Added: testSSBoolean.py | |
2013-06-02 10:05 | wandererfan | File Added: Draft.patch | |
2013-06-02 10:14 | wandererfan | Note Added: 0003188 | |
2013-06-10 02:00 | normandc | Note Added: 0003192 | |
2013-06-11 17:00 | wmayer | Note Added: 0003195 | |
2013-06-11 17:50 | wmayer | Note Edited: 0003195 | |
2013-06-11 17:55 | wmayer | Note Edited: 0003195 | |
2013-06-12 04:19 | shoogen | Note Added: 0003196 | |
2013-06-12 06:14 | wmayer | Note Added: 0003198 | |
2013-06-12 13:05 | wmayer | Note Added: 0003199 | |
2013-06-18 15:12 | wmayer | Note Added: 0003231 | |
2013-06-18 15:12 | wmayer | Status | new => closed |
2013-06-18 15:12 | wmayer | Resolution | open => fixed |
2013-06-18 15:12 | wmayer | Fixed in Version | => 0.14 |