View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0001982 | FreeCAD | Bug | public | 2015-02-28 21:37 | 2017-08-22 11:39 |
Reporter | dmit10 | Assigned To | shoogen | ||
Priority | normal | Severity | major | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Platform | Debian GNU/Linux | OS | Debian GNU/Linux | OS Version | 7.0 |
Product Version | 0.14 | ||||
Summary | 0001982: transformGeometry returns invalid shape | ||||
Description | When I use python scripting, sometimes I have problems with making round holes in tubes. My experiments show that the problem happens when I cut a hole from a tube and then try to transform the result using a matrix. I tried to do that with different numbers and for the same numbers I reproducibly have the same effect (see the screenshot), but for different numbers sometimes I have different effect (e.g. tube stops to be hollow or other strange things, see the screenshots). It seems that the problem doesn't depend on certain transformation matrix but rather on a fact of the transformation. It would be nice if you could tell me if the problem is in displaying only (so I could proceed with the bug) or in data. | ||||
Steps To Reproduce | ext = Part.makeCylinder(16.2, 81.8) int = Part.makeCylinder(14.2, 81.8) hole = Part.makeCylinder(3, 16.2*3) hole.rotate(FreeCAD.Vector(0,0,0), FreeCAD.Vector(1,0,0), 90) hole.translate(FreeCAD.Vector(0,0,5.0)) #if I do this, the hole is displayed correctly Part.show(ext.cut(hole).cut(int)) #if I do this, the hole is displayed incorrectly Part.show(ext.cut(hole).cut(int).transformGeometry(FreeCAD.Matrix())) #fuse operation is also strange here Part.show(ext.cut(hole).cut(int).transformGeometry(FreeCAD.Matrix())) | ||||
Tags | OCC 7.0, OCC Bug, upstream | ||||
FreeCAD Information | |||||
|
|
|
0. please don't redefine "int" in your python scripts ;) 1. using transformGeometry, converts the Object from primitive representation to NURBS. You should avoid this at any cost. 2. (Obsolete, since this the problem is reproduceable in DRAWEXE) 3. In my Version of FreeCAD: OS: Debian GNU/Linux 7.8 (wheezy) Word size of OS: 64-bit Word size of FreeCAD: 64-bit Version: 0.15.4625 +342 (Git) Branch: danfalck/path-module,dev-skiprecompute Hash: 5f00c31e8c82f81f350c1ac55db0db6f9e9af297 Python version: 2.7.3 Qt version: 4.8.2 Coin version: 4.0.0a OCC version: 6.8.1.dev I got the following results: >>> s1=ext.cut(hole).cut(int) >>> s2=ext.fuse(hole).cut(int) >>> s1.check() #valid >>> s1.transformGeometry(FreeCAD.Matrix()).check() StandardError: Unorientable shape Unorientable shape No error No error >>> s2.check() #valid >>> s2.transformGeometry(FreeCAD.Matrix()).check() StandardError: Unorientable shape No error No error I'll add this as a further example to http://tracker.dev.opencascade.org/view.php?id=24890 |
|
I don't understand (2), but many thanks for your comment (1)! When I apply a rotation or a translation, the problem doesn't arise, and my transformation is actually rotations + translations, so I can create a work-around that would avoid transformGeometry() calls. |
|
I originally asked you for your detailed FreeCAD version information. But since i realized that this problem affects all versions, i don't need your version information. If you have a free shape you can also you transformShape(). But in general, FreeCAD uses "Placements" to apply rotation and translation to a shape or a feature object in the document. |
|
Reminder sent to: normandc This looks like it has been resolved upstream in OCC7.0 @normandc Would you please weigh in on this ticket ( 0001982 )? Thanks in advance! |
|
@chrisb can you test with OCC 7.1 to see of this issue is resolved? |
|
@sgrogan1 care to test ? |
|
@chrisb do you mind retesting this with OCC 7.1 ? |
|
Error is fixed. Tested ok with the following versions. I cannot see a difference in OP's last two python lines claimed to yield incorrect result. OS: Mac OS X Word size of OS: 64-bit Word size of FreeCAD: 64-bit Version: 0.17.11784 (Git) Build type: Release Branch: (detached from d5b554d) Hash: d5b554d2b6d6e780c9ead67153888f7fe5e140be Python version: 2.7.13 Qt version: 5.6.2 Coin version: 4.0.0a OCC version: 7.1.0 Locale: German/Germany (de_DE) and OS: Ubuntu 14.04.5 LTS Word size of OS: 64-bit Word size of FreeCAD: 64-bit Version: 0.17.11827 (Git) Build type: None Branch: master Hash: ca4488f4387f761df47322038585b23cb5a1bd73 Python version: 2.7.6 Qt version: 4.8.6 Coin version: 4.0.0a OCC version: 7.1.0 Locale: English/UnitedStates (en_US) |
|
Thanks chrisb! Closing. |
Date Modified | Username | Field | Change |
---|---|---|---|
2015-02-28 21:37 | dmit10 | New Issue | |
2015-02-28 21:37 | dmit10 | File Added: bug.png | |
2015-03-01 09:11 | shoogen | Note Added: 0005835 | |
2015-03-01 09:11 | shoogen | Tag Attached: OCC Bug | |
2015-03-01 09:11 | shoogen | Assigned To | => shoogen |
2015-03-01 09:11 | shoogen | Status | new => acknowledged |
2015-03-01 09:13 | shoogen | Summary | Cut of several cylinders is incorrectly displayed => transformGeometry returns invalid shape |
2015-03-01 09:18 | shoogen | Relationship added | parent of 0001931 |
2015-03-01 09:45 | shoogen | Note Edited: 0005835 | |
2015-03-01 11:20 | dmit10 | Note Added: 0005839 | |
2015-03-01 11:41 | shoogen | Note Added: 0005840 | |
2017-02-15 12:17 | Kunda1 | Note Added: 0008307 | |
2017-02-15 12:17 | Kunda1 | Tag Attached: OCC 7.0 | |
2017-02-15 12:17 | Kunda1 | Tag Attached: upstream | |
2017-06-01 19:11 | Kunda1 | Note Added: 0009245 | |
2017-07-08 14:30 | Kunda1 | Note Added: 0009678 | |
2017-07-08 14:31 | Kunda1 | Tag Attached: #pending | |
2017-08-21 20:18 | Kunda1 | Note Added: 0009984 | |
2017-08-22 08:07 | chrisb | Note Added: 0009987 | |
2017-08-22 11:36 | Kunda1 | Tag Detached: #pending | |
2017-08-22 11:39 | Kunda1 | Relationship replaced | child of 0001931 |
2017-08-22 11:39 | Kunda1 | Status | acknowledged => closed |
2017-08-22 11:39 | Kunda1 | Resolution | open => fixed |
2017-08-22 11:39 | Kunda1 | Note Added: 0009988 |