mdolab / pygeo

pyGeo provides geometric design variables and constraints suitable for gradient-based optimization.
https://mdolab-pygeo.readthedocs-hosted.com/en/latest/?badge=latest
Apache License 2.0
122 stars 54 forks source link

Issue with determining interior points #211

Closed arnalj closed 1 year ago

arnalj commented 1 year ago

Description

I made a multi-block FFD box that completely encloses a geometry. However, when I add the point set (an .stl file), I get a warning that a number of points are not projected to the tolerance. I believe this warning is given when an FFD box does not fully enclose the geometry. However, that isn't the case here, the FFD box does in fact enclose the geometry.

Any suggestions on a work around would be very appreciated.

I've prepared a minimum working example with a simplified geometry: MWE.zip

Steps to reproduce issue

  1. python MWE.py
  2. Open the paraview file to see the FFD box, initial geometry, and "clipped" geometry

Current behavior

Points in the geometry are clipped even though the geometry is fully enclosed by the FFD box. In the image attached, the blue surface is the original geometry and the white surface is the "clipped" geometry. MWE_picture

Expected behavior

The geometry should not be altered

Code versions

Using the MDO Lab's docker image

arnalj commented 1 year ago

I think the problem has to do with the structure of my FFD box. When I break up the blocks so that each block has 6 faces, the problem goes away. Previously, blocks had 6 or more faces.

Can someone confirm that this is a requirement for FFDs? Is this requirement documented?

Here is the new FFD: MWE_ffd2.xyz.txt

hajdik commented 1 year ago

The problem is likely due to the embedding volume not fully containing the points. For information on the embedding volume and how to visualize it, see the note in these docs.