Original screenshot of situation.
Archived discussion
Wrong result of BRepExtrema_DistShapeShape after translation
Hello Guys,
I have strange result for a couple of shapes. Both of them were translated on some vector before BRepExtrema_DistShapeShape.
Please look at screenshot. First solid is white, the second solid is front "wall". Yellow vertices are result of algorithm. There are 8 vertices. And looks like there is phantom of white solid, shifted on some vector.
What could be the reason of so strange behavour?
Thanks.
With respects, Author.
Discussion
14 archived replies
Posts are displayed in their archived order.
Hello Author,
Could you attach original shapes? Or a simple reproducer script? There may be a problem in the input data as well as an error in BRepExtrema_DistShapeShape.
Regards,
Commenter-1
Both description and snapshot are not understandable. And what relation BRepExtrema_DistShapeShape has to incorrect shapes and there visualization?
Hello Guys,
First of all thank you an answers.
I am attaching BREP file with 2 solids. Actually, before translation of both solids on some same vector, the distance between these solids was calculated as 1mm. After translation algorithm calculates near 0.0 (1.20943e-14). And if we get points dist.PointOnShape1(i) and dist.PointOnShape2(i) it will provide completely wrong positions.
Thanks.
With respects, Author.
This file is not a BREP file. How it was written? I cannot open it using OCCT.
It is written in binary format by BinTools_ShapeWriter. Will you be able to read it by BinTools_ShapeReader or I should provide file in ascii mode ?
With respects, Author.
BinTools_ShapeWriter is internal tool and should not be used to save publicly distributable shapes. Please use BinTools::Write instead.
Hello Mikhail,
I am attaching BREP file generated by BRepTools.
With respects, Author.
I confirm that we have a problem with DistShapeShape algorithm. If we remove location of shapes the distance is calculated correctly.
Author, could you create a bug in mantis?
Hello Mikhail,
What do you mean by remove location?
Is there any workaround for us for now?
Thank you.
With respects, Author.
If you just apply location to a shape it is written at the shape. Geometry remains untouched.
You can use the class BRepBuilderAPI_Transform to apply a transformation to the geometry of the shape.
There is the draw command removeloc, which gets rid of locations applying them to geometry.
Thank you, Mikhail, it works.
How could I register bug in mantis ?
https://tracker.dev.opencascade.org/my_view_page.php
Report issue -> select category (Modeling Algorithms) -> describe and attach file.
I have created the issue - https://tracker.dev.opencascade.org/view.php?id=32960
Thank you.
With respects, Author.