Sat, 04/23/2022 - 19:11
Forums:
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, Eugene.
Sat, 04/23/2022 - 19:13
Original screenshot of situation.
Mon, 04/25/2022 - 09:32
Hello Eugene,
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,
Artem
Sun, 04/24/2022 - 23:10
Both description and snapshot are not understandable. And what relation BRepExtrema_DistShapeShape has to incorrect shapes and there visualization?
Wed, 04/27/2022 - 10:41
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, Eugene.
Fri, 04/29/2022 - 10:31
This file is not a BREP file. How it was written? I cannot open it using OCCT.
Fri, 04/29/2022 - 12:27
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, Eugene.
Fri, 04/29/2022 - 13:10
BinTools_ShapeWriter is internal tool and should not be used to save publicly distributable shapes. Please use BinTools::Write instead.
Mon, 05/02/2022 - 11:10
Hello Mikhail,
I am attaching BREP file generated by BRepTools.
With respects, Eugene.
Mon, 05/02/2022 - 16:59
I confirm that we have a problem with DistShapeShape algorithm. If we remove location of shapes the distance is calculated correctly.
Eugene, could you create a bug in mantis?
Tue, 05/03/2022 - 16:18
Hello Mikhail,
What do you mean by remove location?
Is there any workaround for us for now?
Thank you.
With respects, Eugene.
Tue, 05/03/2022 - 18:42
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.
Wed, 05/04/2022 - 09:44
Thank you, Mikhail, it works.
How could I register bug in mantis ?
Wed, 05/04/2022 - 10:13
https://tracker.dev.opencascade.org/my_view_page.php
Report issue -> select category (Modeling Algorithms) -> describe and attach file.
Wed, 05/04/2022 - 15:55
I have created the issue - https://tracker.dev.opencascade.org/view.php?id=32960
Thank you.
With respects, Eugene.