View Issue Details

IDProjectCategoryView StatusLast Update
0004216CommunityOCCT:Modeling Algorithmspublic2011-12-01 12:19
Reporterbugmaster Assigned Toskv 
PrioritynormalSeveritytrivial 
Status closedResolutionunable to reproduce 
OSAll 
Summary0004216: Problem with TopoDS_Shape.Moved(gp_Trsf trs)
DescriptionBug from Open CASCADE Community

Registered by Lee Sangsu.

http://www.opencascade.org/forumorg/bug.php?bug_id=149

TopoDS_Shape.Moved(gp_Trsf trs) works wrong when the trsf is made from mirror by
vertex or plane.

Try the following which was from the TopologyTransformation MFC Sample.
>>> //TopoDS_Shape S2 = S.Moved(theTransformation); //BUG!!!

when you try the above code, the result will be invalid shape which are shaded
wrong and its volume is negative.
and the BRepBuilderAPI_Transform deals with this case properly. but I think it
should work through TopoDS_Shape::Moved... , for it is more simple and is much
used in many source code now.


void CTopologyTransformationsDoc::OnMirror()
{
AIS_ListOfInteractive aList;
myAISContext->DisplayedObjects(aList);
AIS_ListIteratorOfListOfInteractive aListIterator;
for(aListIterator.Initialize(aList);aListIterator.More();aListIterator.Next()){
myAISContext->Remove(aListIterator.Value());
}
TopoDS_Shape S = BRepPrimAPI_MakeWedge(60.,100.,80.,20.);
Handle(AIS_Shape) ais1 = new AIS_Shape(S);
myAISContext->SetColor(ais1,Quantity_NOC_GREEN,Standard_False);
myAISContext->SetMaterial(ais1,Graphic3d_NOM_PLASTIC,Standard_False);
myAISContext->Display(ais1,Standard_False);
gp_Trsf theTransformation;
gp_Pnt PntCenterOfTheTransformation(110,60,60);
Handle(AIS_Point) aispnt = new AIS_Point(new
Geom_CartesianPoint(PntCenterOfTheTransformation));
myAISContext->Display(aispnt,Standard_False);
theTransformation.SetMirror(PntCenterOfTheTransformation);
BRepBuilderAPI_Transform myBRepTransformation(S,theTransformation);

>>> TopoDS_Shape S2 = myBRepTransformation.Shape();//This works well

>>> //TopoDS_Shape S2 = S.Moved(theTransformation); //BUG!!!

Handle(AIS_Shape) ais2 = new AIS_Shape(S2);
myAISContext->SetColor(ais2,Quantity_NOC_BLUE1,Standard_False);
myAISContext->SetMaterial(ais2,Graphic3d_NOM_PLASTIC,Standard_False);
myAISContext->Display(ais2,Standard_False);
Fit();
}

Remarks : RLN

Though Sangsu Lee is our support client and we are not expected to fix his bugs
for free, this report may reveal some fundamental problem.
So, may I kindly request you to:
- make sure that documentation does/does not describe this limitation
- make sure it is/is not a bug (as I can guess it's not - but rather limitation
- because Moved() must be and is a fast function without any computations)
- if it is a limitation (i.e. Moved() should accept transformations only without
mirroring) then to document this limitation - this will be the official answer
for this bug
- correct the bug in MFC sample (replacing by BRepBuilderAPI_Transform, if
Moved() is not expected to be corrected)
- inform SZV on the status

The priority is low for this task. Preparing 5.1.1 is a top notch today.
TagsNo tags attached.
Test case number

Activities

There are no notes attached to this issue.

Issue History

Date Modified Username Field Change
2003-10-22 10:41 bugmaster Product Version 5.1.1 => dev
2003-10-22 10:43 bugmaster CC => szv, rln
2003-10-22 10:43 bugmaster Assigned To bugmaster => mkk
2003-10-22 10:43 bugmaster Status new => assigned
2003-10-27 10:44 mkk Assigned To mkk => skv
2003-10-28 14:56 skv Status assigned => resolved
2003-12-01 16:54 bugmaster Status resolved => closed
2003-12-01 16:54 bugmaster Fixed in Version => 5.1.1
2003-12-01 16:54 bugmaster Resolution @0@ => unable to reproduce
2004-12-30 11:24 bugmaster Customer =>
2011-08-02 11:31 bugmaster Category OCCT:MOA => OCCT:Modeling Algorithms
2011-12-01 11:40 szy Description Updated
2011-12-01 12:19 szy Description Updated