CreatePatch and ClosestPoint

I discovered that the Brep created by Brep.CreatePatch and the Brep extracted from the BrepObject of the other Brep added to the document can be quite different. As shown below, one of the differences worth noting is in the results of Brep.ClosestPoint, where all closest points should be near pt_Test. The final value is from a workaround, calling ClosestPoint on a Brep created from the underlying Surface.

This occurs in V5, V6, and the WIP.

pt_Test: 5,0,0
pt_onPatchBrep: 4.68504544451056,2.11559526830229E-05,0
pt_onDocBrep: 5,-8.01442245901285E-16,0
pt_onPatchSrfBrep: 5,-8.01442245901285E-16,0

Brep_CreatePatch_ClosestPoint.py (1018 Bytes)

Considering the precision of floats only the pt_onPatchBrep is deviating quite a bit. The numbers that have the E- prefix in all point to really, really small values. Small enough to be similar to 0, easily within document tolerance.

There is indeed something unexpected happening:
image

These 2 points (pt_onPatchBrep, pt_onDocBrep) are expected to be equal. I think @dale could best answer what might be going on here.

-Willem

Hi @spb - Iā€™m looking at this.

ā€“ Dale

Hi @spb,

A fix is in the works - https://mcneel.myjetbrains.com/youtrack/issue/RH-55152

ā€“ Dale

1 Like