@@ -70,31 +70,27 @@ def generated_elements(self):
7070
7171 @property
7272 def elements (self ):
73- return self .beams + [ self .generated_elements ]
73+ return list ( self .beams ) + self .generated_elements
7474
7575 @property
7676 def interactions (self ):
7777 for beam in self .beams :
7878 yield (beam , self .fastener )
7979
8080 @classmethod
81- def create (cls , model , * elements , ** kwargs ):
82- """Creates an instance of the BallNodeJoint and creates the new connection in `model` .
81+ def from_element_list (cls , elements , ** kwargs ):
82+ """Creates an instance of the BallNodeJoint.
8383
8484 This differs fom the generic `Joint.create()` method in that it passes the `beams` to
8585 the constructor of the BallNodeJoint as a list instead of as separate arguments.
8686
87- `beams` are expected to have been added to `model` before calling this method.
88-
8987 This code does not verify that the given beams are adjacent and/or lie in a topology which allows connecting
9088 them. This is the responsibility of the calling code.
9189
9290 A `ValueError` is raised if `beams` contains less than two `Beam` objects.
9391
9492 Parameters
9593 ----------
96- model : :class:`~compas_timber.model.TimberModel`
97- The model to which the beams and this joing belong.
9894 beams : list(:class:`~compas_timber.parts.Beam`)
9995 A list containing beams that whould be joined together
10096
@@ -104,10 +100,8 @@ def create(cls, model, *elements, **kwargs):
104100 The instance of the created joint.
105101
106102 """
107- elements = list (elements )
108- joint = cls (elements , ** kwargs )
109- model .add_joint (joint )
110- return joint
103+ return cls (elements , ** kwargs )
104+
111105
112106 @property
113107 def node_point (self ):
0 commit comments