iam-git / WellMet (public) (License: MIT) (since 2021-08-31) (hash sha1)
WellMet is pure Python framework for spatial structural reliability analysis. Or, more specifically, for "failure probability estimation and detection of failure surfaces by adaptive sequential decomposition of the design domain".
List of commits:
Subject Hash Author Date (UTC)
qt_gui.qt_pairwise: prepare more mouse event signals c60e613508480c68483b3d0d6ad6c876b27f539c I am 2022-11-08 01:55:14
qt_gui: introduce reworked matrix view window e28b95c5f418a7a3cea0cb84ca82b40275a71061 I am 2022-11-07 02:20:45
introduce wireframe module for the contacts finding functionality b6068dd92663699859ea7cbf3aac00178d120e0f I am 2022-10-25 14:24:37
voronoi.TwoPoints: atleast_2d() one line fix 9f8bd9e5370ccf30887b6218331ee664788a3b91 I am 2022-10-25 07:09:57
voronoi: implement faster TwoPoints class. c0af78f64bc78a6b8cf06e3ea244339549318b66 I am 2022-10-24 13:03:26
voronoi: implement TwoHorses class. Třída je, bohužel, bezcenná :( 4f6fe186f3f344fa7ee9e518798499099615b466 I am 2022-10-23 10:00:43
voronoi: WIP 23c63ede5bc2ec51d25aed850dc59299db438e34 I am 2022-10-21 12:27:01
IS_stat.sample_alike: use any possible fallback options to sample 80fb6d086e9f17350a1725a319e40bf29591869e I am 2022-10-20 08:56:42
voronoi: WIP ba912d406de12142f2e15a73090118184a0166a4 I am 2022-10-20 02:43:12
IS_stat: add sample_alike() function 2e5394d264b7aaaf5f2486c736ed8cc37afbd030 I am 2022-10-19 13:00:17
voronoi: WIP c3bfa60b6db2042df11528fe95a51d7cc88d3c6b I am 2022-10-19 11:18:13
voronoi: WIP baff3c5ccaf857f60194917fe5d6e33c40b01265 I am 2022-10-19 09:28:33
voronoi.ConvexSpline: little fix of np.sign() for better sleep 968f649e54d97abd596cd60749872fa3ef788c06 I am 2022-10-19 06:28:46
implement even more optimized Convex.. now ConvexSpline class c08511aecb32b880e73c9f10d07feff4dc588e8b I am 2022-10-19 04:11:13
voronoi: WIP cbb61d4544367a67c9a5c3fe6d64a9dc284eb364 I am 2022-10-18 05:05:44
voronoi: WIP e9c247fef30cfb678bad9b955d6f6a94a0ff61e7 I am 2022-10-18 01:02:30
candynodex: hotfix to support numpy masking indexing f359123b72a3d998d5eed4b9e611a5e402a18c8d I am 2022-10-17 09:02:33
add new lightweight candynodes module to replace old heavy ugly candybox ca97509f47c100df90e1e06d82ed7c759627bfd0 I am 2022-10-17 06:31:33
qt_gui: move CandyBox creating to the individual DiceBox widgets 29253625129219b5e550f82cae3da0e53ef5bd47 I am 2022-10-16 03:17:55
voronoi: WIP 4855190869e06df740cc05c64e8b27b2c3c5a88d I am 2022-10-15 22:46:51
Commit c60e613508480c68483b3d0d6ad6c876b27f539c - qt_gui.qt_pairwise: prepare more mouse event signals
Author: I am
Author date (UTC): 2022-11-08 01:55
Committer name: I am
Committer date (UTC): 2022-11-08 01:55
Parent(s): e28b95c5f418a7a3cea0cb84ca82b40275a71061
Signer:
Signing key:
Signing status: N
Tree: ff577375ab27cd5129020b18fe4cb8abbb4b7c4b
File Lines added Lines deleted
wellmet/qt_gui/qt_pairwise.py 56 7
File wellmet/qt_gui/qt_pairwise.py changed (mode: 100644) (index 40e542c..3678c21)
... ... class MatrixWindow(QtWidgets.QMainWindow):
401 401
402 402
403 403
404 # piece of code from pyqtgraph examples
405 class CustomViewBox(pg.ViewBox):
406 ## reimplement mouseDragEvent to disable continuous axis zoom
407 def mouseDragEvent(self, ev, axis=None):
408 if ev.button() == QtCore.Qt.MouseButton.RightButton:
409 ev.ignore()
410 else:
411 pg.ViewBox.mouseDragEvent(self, ev, axis=axis)
412
413
414
404 415
405 416
406 417 class MView(pg.ImageView): class MView(pg.ImageView):
407 418 mouse_moved = QtCore.pyqtSignal(int, int) mouse_moved = QtCore.pyqtSignal(int, int)
419 mouse_clicked = QtCore.pyqtSignal(int, int)
420 mouse_double_clicked = QtCore.pyqtSignal(int, int)
421 mouse_right_dragged = QtCore.pyqtSignal(int, int)
422
423 right_button = QtCore.Qt.MouseButton.RightButton
424 left_button = QtCore.Qt.MouseButton.LeftButton
408 425
409 426 def __init__(self, w, *args, **kwargs): def __init__(self, w, *args, **kwargs):
410 self.pi = pg.PlotItem()
427 self.vb = CustomViewBox()
428 self.pi = pg.PlotItem(viewBox=self.vb)
411 429 super().__init__(*args, view=self.pi, **kwargs) #axisOrder='row-major', super().__init__(*args, view=self.pi, **kwargs) #axisOrder='row-major',
412 430
413 431 w.slice_changed.connect(self.on_slice_changed) w.slice_changed.connect(self.on_slice_changed)
432 self.app = w.app
414 433
415 434 self.nsim = nsim = w.slider.value() self.nsim = nsim = w.slider.value()
416 435
 
... ... class MView(pg.ImageView):
422 441 #self.setBackground('w') #self.setBackground('w')
423 442
424 443
425 self.proxy = pg.SignalProxy(self.pi.scene().sigMouseMoved,
426 rateLimit=60, slot=self._mouse_moved)
427
444 self.proxy = pg.SignalProxy(self.pi.scene().sigMouseMoved,
445 rateLimit=60, slot=self.on_mouse_moved)
446 self.x = -1
447 self.y = -1
448
449 self.pi.scene().sigMouseClicked.connect(self.on_click)
450
428 451
429 452 def __setattr__(self, attr, value): def __setattr__(self, attr, value):
430 453 if attr == 'red': if attr == 'red':
 
... ... class MView(pg.ImageView):
461 484 def update(self): def update(self):
462 485 self.setImage(self.data.T, levelMode='rgba') self.setImage(self.data.T, levelMode='rgba')
463 486
464 def _mouse_moved(self, evt):
487 def on_mouse_moved(self, evt):
465 488 pos = evt[0] ## using signal proxy turns original arguments into a tuple pos = evt[0] ## using signal proxy turns original arguments into a tuple
466 489 if self.pi.sceneBoundingRect().contains(pos): if self.pi.sceneBoundingRect().contains(pos):
467 490 mousePoint = self.pi.vb.mapSceneToView(pos) mousePoint = self.pi.vb.mapSceneToView(pos)
468 491 x = int(mousePoint.x()) x = int(mousePoint.x())
469 492 y = int(mousePoint.y()) y = int(mousePoint.y())
470 493 if (x >= 0) and (x < self.nsim) and (y >= 0) and (y < self.nsim): if (x >= 0) and (x < self.nsim) and (y >= 0) and (y < self.nsim):
471 self.mouse_moved.emit(x, y)
472
494 self._mouse_moved(x, y)
495 else:
496 self._mouse_moved(-1, -1)
497 else:
498 self._mouse_moved(-1, -1)
499
500 def _mouse_moved(self, x, y):
501 if (x != self.x) or (y != self.y):
502 self.x = x
503 self.y = y
504 self.mouse_moved.emit(x, y)
505 if self.app.mouseButtons() == self.right_button:
506 self.mouse_right_dragged.emit(x, y)
507
508
509
510 def on_click(self, evt):
511 if self.x == -1:
512 return None
513 if evt.double():
514 self.mouse_double_clicked.emit(self.x, self.y)
515 elif evt.button() == self.left_button:
516 self.mouse_clicked.emit(self.x, self.y)
517
473 518
474 519
475 520
 
... ... class DistanceMatrix:
517 562
518 563
519 564 def on_mouse_moved(self, x, y): def on_mouse_moved(self, x, y):
565 if x == -1:
566 self.w.statusBar.showMessage("")
567 return None
568
520 569 if x != y: if x != y:
521 570 m = self.nsim m = self.nsim
522 571 i, j = min(x, y), max(x, y) i, j = min(x, y), max(x, y)
Hints:
Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"

Clone this repository using HTTP(S):
git clone https://rocketgit.com/user/iam-git/WellMet

Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@ssh.rocketgit.com/user/iam-git/WellMet

Clone this repository using git:
git clone git://git.rocketgit.com/user/iam-git/WellMet

You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a merge request:
... clone the repository ...
... make some changes and some commits ...
git push origin main