Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions LoopStructural/interpolators/_geological_interpolator.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,16 +154,22 @@ def set_normal_constraints(self, points: np.ndarray):
----------
points : np.ndarray
array containing the value constraints usually 7-8 columns.
X,Y,Z,nx,ny,nz,weight
X,Y,Z,nx,ny,nz,(weight, default : 1 for each row)

Returns
-------

Notes
-------
If no weights are provided, w = 1 is assigned to each normal constraint.

"""
if points.shape[1] == self.dimensions * 2:
points = np.hstack([points, np.ones((points.shape[0], 1))])
logger.warning(f"No weight provided for normal constraints, all weights are set to 1")
raise Warning
if points.shape[1] < self.dimensions * 2 + 1:
raise ValueError("Nonrmal constraints must at least have X,Y,Z,nx,ny,nz")
raise ValueError("Normal constraints must at least have X,Y,Z,nx,ny,nz")
self.n_n = points.shape[0]
self.data["normal"] = points
self.up_to_date = False
Expand Down