View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0000531 | FreeCAD | Bug | public | 2011-12-10 12:33 | 2011-12-13 17:02 |
Reporter | sparr0 | Assigned To | |||
Priority | normal | Severity | major | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Product Version | 0.11 | ||||
Fixed in Version | 0.13 | ||||
Summary | 0000531: Python API: Mirroring rotated parts produces undesired results | ||||
Description | After a part has been .rotate()'d if you attempt to .mirror() it then the result will not be as expected. Instead of mirroring the rotated part, it will find the target location for mirroring the unrotated part around the stated mirror plane, then apply the rotation to the target location, then put the still-unrotated part at that location. | ||||
Additional Information | http://i.imgur.com/l0cqZ.png How to reproduce: from FreeCAD import Base box = Part.makeBox(10,20,1) Part.show(box) box2 = box.mirror(Base.Vector(0,0,10),Base.Vector(0,0,-1)) Part.show(box2) box.rotate(Base.Vector(0,0,0),Base.Vector(1,0,0),30) Part.show(box) box2 = box.mirror(Base.Vector(0,0,10),Base.Vector(0,0,-1)) Part.show(box2) | ||||
Tags | No tags attached. | ||||
FreeCAD Information | |||||
2011-12-10 12:33
|
|
|
I think this is relevant to the inconsistencies with the placement property that I am working on now, so I assign it to myself. |
|
The problem might be in TopoShape::mirror(). I guess instead of mat = placement * mat; it should be mat = mat * placement; This looks better but still not correct. This however can also be a bug in OCC. for more details: http://www.opencascade.org/org/forum/thread_20781/ |
|
Obviously there is also a bug in gp_Trsf::SetMirror() because the determinant of the matrix is +1 but it should be -1. |
|
No, gp_Trsf::SetMirror() is OK because the sign of the determinant is handled by another attribute. So, the solution is remove this line completely: mat = placement * mat; |
|
Fixed in rev 5296 |
Date Modified | Username | Field | Change |
---|---|---|---|
2011-12-10 12:33 | sparr0 | New Issue | |
2011-12-10 12:33 | sparr0 | File Added: bug.png | |
2011-12-10 13:42 | logari81 | Note Added: 0001445 | |
2011-12-10 13:43 | logari81 | Assigned To | => logari81 |
2011-12-10 13:43 | logari81 | Status | new => confirmed |
2011-12-10 14:38 | wmayer | Note Added: 0001449 | |
2011-12-13 13:54 | logari81 | Assigned To | logari81 => |
2011-12-13 14:56 | wmayer | Note Added: 0001477 | |
2011-12-13 17:00 | wmayer | Note Added: 0001478 | |
2011-12-13 17:02 | wmayer | Note Added: 0001479 | |
2011-12-13 17:02 | wmayer | Status | confirmed => closed |
2011-12-13 17:02 | wmayer | Resolution | open => fixed |
2011-12-13 17:02 | wmayer | Fixed in Version | => 0.13 |