{"action":"created","issue":{"url":"https://api.github.com/repos/dcowden/cadquery/issues/100","labels_url":"https://api.github.com/repos/dcowden/cadquery/issues/100/labels{/name}","comments_url":"https://api.github.com/repos/dcowden/cadquery/issues/100/comments","events_url":"https://api.github.com/repos/dcowden/cadquery/issues/100/events","html_url":"https://github.com/dcowden/cadquery/issues/100","id":95436054,"number":100,"title":"fillet fails with combined shape","user":{"login":"hyOzd","id":1479166,"avatar_url":"https://avatars.githubusercontent.com/u/1479166?v=3","gravatar_id":"","url":"https://api.github.com/users/hyOzd","html_url":"https://github.com/hyOzd","followers_url":"https://api.github.com/users/hyOzd/followers","following_url":"https://api.github.com/users/hyOzd/following{/other_user}","gists_url":"https://api.github.com/users/hyOzd/gists{/gist_id}","starred_url":"https://api.github.com/users/hyOzd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hyOzd/subscriptions","organizations_url":"https://api.github.com/users/hyOzd/orgs","repos_url":"https://api.github.com/users/hyOzd/repos","events_url":"https://api.github.com/users/hyOzd/events{/privacy}","received_events_url":"https://api.github.com/users/hyOzd/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":40,"created_at":"2015-07-16T13:43:26Z","updated_at":"2015-08-06T09:39:00Z","closed_at":null,"body":"Sample code to reproduce:\r\n\r\n```python\r\nimport cadquery as cq\r\nfrom Helpers import show\r\n\r\nb = cq.Workplane(\"XY\").box(10,10,2,centered=(False,False,False)).\\\r\n    union(cq.Workplane(\"YZ\").box(2,10,10,centered=(False,False,False)))\r\n    \r\nBS = cq.selectors.BoxSelector\r\nb = b.edges(BS((-10, -1, -1),(10,1,1))).fillet(3)\r\n\r\nshow(b)\r\n```\r\n\r\nError:\r\n```\r\nRunning the Python command 'CadQueryExecuteScript' failed:\r\nTraceback (most recent call last):\r\n  File \"/home/heyyo/.FreeCAD/Mod/CadQuery/Gui/Command.py\", line 178, in Activated\r\n    imp.load_source('temp.module', tempFile.name)\r\n  File \"/tmp/tmpKBl3gr\", line 13, in <module>\r\n    b = b.edges(BS((-10, -1, -1),(10,1,1))).fillet(3)\r\n  File \"/home/heyyo/.FreeCAD/Mod/CadQuery/Libs/cadquery/CQ.py\", line 794, in fillet\r\n    s = solid.fillet(radius, edgeList)\r\n  File \"/home/heyyo/.FreeCAD/Mod/CadQuery/Libs/cadquery/freecad_impl/shapes.py\", line 813, in fillet\r\n    return Shape.cast(self.wrapped.makeFillet(radius, nativeEdges))\r\n\r\nBRep_API: command not done\r\n```\r\n\r\nIf I set the fillet radius below `2.0` (thickness of the shape) it works. But it fails when `r>=2.0`. Why this happens? I believe it's these lines. Below screenshot is before fillet.\r\n\r\n![cadquery_refine_bug](https://cloud.githubusercontent.com/assets/1479166/8723674/166f34d8-2bd8-11e5-8c9f-18d146066efa.png)\r\n\r\nResult of the union operation is not clean. It contains edges from both shapes that shouldn't exist anymore. This is a limitation of FreeCAD. In a similar situation fillet tool will fail. But FreeCAD has a menu item \"Refine Shape\", that removes these kind of edges and generally cleans up the shape. It is in the menu of \"Part\" workbench. Actually if you have these options (see below) enabled; it will automatically refine the shape after each operation.\r\n\r\n![preferences_006](https://cloud.githubusercontent.com/assets/1479166/8724822/58533c04-2bd9-11e5-8097-dc89de4fa3fa.png)\r\n\r\nI would expect cadquery to have a similar option, maybe have this behavior enabled by default.\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/dcowden/cadquery/issues/comments/128309541","html_url":"https://github.com/dcowden/cadquery/issues/100#issuecomment-128309541","issue_url":"https://api.github.com/repos/dcowden/cadquery/issues/100","id":128309541,"user":{"login":"jmwright","id":1015439,"avatar_url":"https://avatars.githubusercontent.com/u/1015439?v=3","gravatar_id":"","url":"https://api.github.com/users/jmwright","html_url":"https://github.com/jmwright","followers_url":"https://api.github.com/users/jmwright/followers","following_url":"https://api.github.com/users/jmwright/following{/other_user}","gists_url":"https://api.github.com/users/jmwright/gists{/gist_id}","starred_url":"https://api.github.com/users/jmwright/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmwright/subscriptions","organizations_url":"https://api.github.com/users/jmwright/orgs","repos_url":"https://api.github.com/users/jmwright/repos","events_url":"https://api.github.com/users/jmwright/events{/privacy}","received_events_url":"https://api.github.com/users/jmwright/received_events","type":"User","site_admin":false},"created_at":"2015-08-06T09:39:00Z","updated_at":"2015-08-06T09:39:00Z","body":"I could be looking at it wrong, but I was thinking that since Part.Solid is a TopoShape, you could just do something like `obj.cast_to_shape(Part.Solid)`. I haven't been able to try it yet though, so I could be totally off. Part is imported as FreeCADPart in the shapes.py file too I think, just a heads-up. That line would actually be `obj.cast_to_shape(FreeCADPart.Solid)`."}}