Refactoring #1766

Replace all form factors in sample creation by shapes

Added by herck over 3 years ago. Updated 13 days ago.

Status:SprintStart date:16 Feb 2017
Priority:NormalDue date:
Assignee:wuttke% Done:


Target version:-


A simple particle would then contain a shape and a material. Internally, the correct form factors, which still exist, would be generated during a computation.
This would accomplish:
  • Clearer separation between particles' description and the underlying computations (as is mostly the case for all other objects)
  • No need for onChange(), since the shapes would be purely defined by their constructor arguments
  • The shape classes could be shared inside the GUI, allowing an unified generation of vertices for 3D view and some calculations
  • This shared description would then also allow easier implementation of support for 3D files describing a certain shape
  • Custom form factors can then also indicate their real space sizes to determine if they cross layer interfaces

For custom form factors in Python, a specific shape could be used that accepts a (overriden) form factor. This would also be the approach in case of shapes defined by some 3D file format.

Related to #1567.

Related issues

Related to BornAgain - Refactoring #2457: Facilitate sample model API changes Sprint 18 May 2020
Related to BornAgain - Refactoring #2466: Use full paths in #include directives Resolved 23 Jun 2020


#1 Updated by herck over 3 years ago

  • Description updated (diff)

#2 Updated by herck over 3 years ago

  • Description updated (diff)

#3 Updated by wuttke 17 days ago

#4 Updated by wuttke 17 days ago

#5 Updated by wuttke 13 days ago

  • Status changed from Backlog to Sprint
  • Assignee set to wuttke

Whether we call the form factors or shapes, is of secondary importance. The key point is to avoid duplication of classes. So I will merge classes FormFactorX and X for all X.

Also available in: Atom PDF