Subject | Hash | Author | Date (UTC) |
---|---|---|---|
convex_hull.BrickHull: add get_hyperplane_distances() method a use it as fallback for the Qhull | 48d35c953a5cbbf739e5e838709bc00fe2f047d4 | I am | 2022-12-05 03:30:12 |
convex_hull.Qhull: add get_hyperplane_distances() method, add auto_update parameter | 28aada4b79b52f58c4ad43d270be997ec6359166 | I am | 2022-12-04 22:49:41 |
move diceboxes to the dedicated drawer | 31c7d30ed43f04b9469df843f909814c062adf5e | I am | 2022-12-04 21:27:37 |
reader: finally, add new Store class for the estimations | 673b7daa8213807d0217089b3317674595156f6d | I am | 2022-12-03 17:46:22 |
f_models.SNorm: hotfix | 5f364d1770e18d18fb810760b6207c905b551762 | I am | 2022-12-02 21:33:48 |
f_models: rewrite SNorm in lazy way. Old SNorm class renamed to SNormClassic | 3b6805b2a1d0bce88960bc016bbe74bb5274810b | I am | 2022-12-02 21:11:37 |
simplex: implement CircumCenter class | 0a1a67122854cfb331f696163f22cfc67331f3e8 | I am | 2022-12-01 01:40:38 |
voronoi.ContactVoronoi: add explore_couple() method | 72f4dffa5e8e7ee3165df4648f6a35d75d6678a3 | I am | 2022-11-29 11:59:07 |
voronoi: almost finished | 00b697466c226212aeb1ea76a717cf3db48c3187 | I am | 2022-11-28 16:28:48 |
voronoi: WIP | 29c59822f96df4efd6d1c6555a6fa083a869a2c8 | I am | 2022-11-28 11:14:50 |
voronoi: WIP, clean up | 8e776235f7603a9bc7f3d8254976224a81bb153e | I am | 2022-11-27 19:56:34 |
voronoi: WIP | 41e506eacb502853a1cf70023e7b276539579af7 | I am | 2022-11-27 13:03:08 |
convex_hull: optimize orth basis generation | 4ebfde2955aa792fb31075bf9ac8af718ae07b29 | I am | 2022-11-26 15:35:21 |
voronoi: WIP | 8f7f3bca7c4333ab579e057438c8c64208d1f60e | I am | 2022-11-26 11:22:55 |
voronoi: remove the code already moved to wireframe module | fe57b4b699e8689d35afb510f704019152566f09 | I am | 2022-11-25 09:25:55 |
qt_gui.qt_pairwise.ContactWidget: show Qhull request at most once. | db6af332a70786759692175384f4b7e779b4caca | I am | 2022-11-16 13:26:04 |
wireframe.LinearSolver: polytope handle hotfix | bc48de3193ce9be482cc4dd068a26f48ea1e0203 | I am | 2022-11-16 13:24:41 |
qt_gui.qt_pairwise.ContactWidget: add LP methods | 8dbd480ca80aabe1c7e0e689780767b78c86c1d1 | I am | 2022-11-16 11:33:32 |
wireframe: implement two LP solvers | 8aecd55104ce85ccccf872ebef0052a5937415b5 | I am | 2022-11-16 11:32:31 |
qt_gui.qt_pairwise.ContactWidget: add Gabriel adjacency | 86eaf302b176612fad072a2248e2c724d32be755 | I am | 2022-11-16 06:17:53 |
File | Lines added | Lines deleted |
---|---|---|
wellmet/convex_hull.py | 21 | 10 |
File wellmet/convex_hull.py changed (mode: 100644) (index b6847e9..2c1bbfe) | |||
... | ... | class BrickHull: #č nebo BoundingBrick | |
400 | 400 | def is_outside(hull, nodes): | def is_outside(hull, nodes): |
401 | 401 | return ~hull.is_inside(nodes) | return ~hull.is_inside(nodes) |
402 | 402 | ||
403 | def get_hyperplane_distances(hull, nodes): | ||
404 | hull._update() | ||
405 | x = getattr(nodes, hull.space) | ||
406 | maxs = np.nanmax(x - hull.maxs, axis=1) | ||
407 | mins = np.nanmax(hull.mins - x, axis=1) | ||
408 | |||
409 | return np.max((maxs, mins), axis=0) #np.all(np.array((more, less)), axis=0) | ||
410 | |||
403 | 411 | def get_design_points(hull): | def get_design_points(hull): |
404 | 412 | hull._update() | hull._update() |
405 | 413 | #sample_model = -hull.A * hull.b.reshape(-1,1) | #sample_model = -hull.A * hull.b.reshape(-1,1) |
... | ... | class QHull: | |
833 | 841 | ||
834 | 842 | ||
835 | 843 | def get_hyperplane_distances(self, nodes): | def get_hyperplane_distances(self, nodes): |
836 | self._update() | ||
837 | x = getattr(nodes, self.space) | ||
838 | |||
839 | #E [normal, offset] forming the hyperplane equation of the facet (see Qhull documentation for more) | ||
840 | A = self.convex_hull.equations[:,:-1] | ||
841 | b = self.convex_hull.equations[:,-1] | ||
842 | |||
843 | # N=ns, E - number of hyperplane equations | ||
844 | ExN = A @ x.T + np.atleast_2d(b).T | ||
845 | return np.nanmax(ExN, axis=0) | ||
844 | if self.enough_points: | ||
845 | self._update() | ||
846 | x = getattr(nodes, self.space) | ||
847 | |||
848 | #E [normal, offset] forming the hyperplane equation of the facet (see Qhull documentation for more) | ||
849 | A = self.convex_hull.equations[:,:-1] | ||
850 | b = self.convex_hull.equations[:,-1] | ||
851 | |||
852 | # N=ns, E - number of hyperplane equations | ||
853 | ExN = A @ x.T + np.atleast_2d(b).T | ||
854 | return np.nanmax(ExN, axis=0) | ||
855 | else: | ||
856 | return BrickHull(self.sample, self.space).get_hyperplane_distances(nodes) | ||
846 | 857 | ||
847 | 858 | ||
848 | 859 | def is_inside(self, nodes): | def is_inside(self, nodes): |