@@ -58,9 +58,9 @@ class BeamElement(Element):
5858 @property
5959 def __data__ (self ) -> dict :
6060 return {
61- "width" : self .box .xsize ,
62- "depth" : self .box .ysize ,
63- "length" : self .box .zsize ,
61+ "width" : self ._box .xsize ,
62+ "depth" : self ._box .ysize ,
63+ "length" : self ._box .zsize ,
6464 "transformation" : self .transformation ,
6565 "features" : self ._features ,
6666 "name" : self .name ,
@@ -76,37 +76,37 @@ def __init__(
7676 name : Optional [str ] = None ,
7777 ) -> "BeamElement" :
7878 super ().__init__ (transformation = transformation , features = features , name = name )
79- self .box = Box .from_width_height_depth (width , length , depth )
80- self .box .frame = Frame (point = [0 , 0 , self .box .zsize / 2 ], xaxis = [1 , 0 , 0 ], yaxis = [0 , 1 , 0 ])
79+ self ._box = Box .from_width_height_depth (width , length , depth )
80+ self ._box .frame = Frame (point = [0 , 0 , self ._box .zsize / 2 ], xaxis = [1 , 0 , 0 ], yaxis = [0 , 1 , 0 ])
8181
8282 @property
8383 def width (self ) -> float :
84- return self .box .xsize
84+ return self ._box .xsize
8585
8686 @width .setter
8787 def width (self , width : float ):
88- self .box .xsize = width
88+ self ._box .xsize = width
8989
9090 @property
9191 def depth (self ) -> float :
92- return self .box .ysize
92+ return self ._box .ysize
9393
9494 @depth .setter
9595 def depth (self , depth : float ):
96- self .box .ysize = depth
96+ self ._box .ysize = depth
9797
9898 @property
9999 def length (self ) -> float :
100- return self .box .zsize
100+ return self ._box .zsize
101101
102102 @length .setter
103103 def length (self , length : float ):
104- self .box .zsize = length
105- self .box .frame = Frame (point = [0 , 0 , self .box .zsize / 2 ], xaxis = [1 , 0 , 0 ], yaxis = [0 , 1 , 0 ])
104+ self ._box .zsize = length
105+ self ._box .frame = Frame (point = [0 , 0 , self ._box .zsize / 2 ], xaxis = [1 , 0 , 0 ], yaxis = [0 , 1 , 0 ])
106106
107107 @property
108108 def center_line (self ) -> Line :
109- return Line ([0 , 0 , 0 ], [0 , 0 , self .box .height ])
109+ return Line ([0 , 0 , 0 ], [0 , 0 , self ._box .height ])
110110
111111 def compute_elementgeometry (self ) -> Mesh :
112112 """Compute the mesh shape from a box.
@@ -115,7 +115,7 @@ def compute_elementgeometry(self) -> Mesh:
115115 -------
116116 :class:`compas.datastructures.Mesh`
117117 """
118- return self .box .to_mesh ()
118+ return self ._box .to_mesh ()
119119
120120 def extend (self , distance : float ) -> None :
121121 """Extend the beam.
@@ -126,8 +126,8 @@ def extend(self, distance: float) -> None:
126126 The distance to extend the beam.
127127 """
128128
129- self .box .zsize = self .length + distance * 2
130- self .box .frame = Frame (point = [0 , 0 , self .box .zsize / 2 - distance ], xaxis = [1 , 0 , 0 ], yaxis = [0 , 1 , 0 ])
129+ self ._box .zsize = self .length + distance * 2
130+ self ._box .frame = Frame (point = [0 , 0 , self ._box .zsize / 2 - distance ], xaxis = [1 , 0 , 0 ], yaxis = [0 , 1 , 0 ])
131131
132132 def compute_aabb (self , inflate : float = 0.0 ) -> Box :
133133 """Compute the axis-aligned bounding box of the element.
@@ -143,7 +143,7 @@ def compute_aabb(self, inflate: float = 0.0) -> Box:
143143 The axis-aligned bounding box.
144144 """
145145
146- box = self .box .transformed (self .modeltransformation )
146+ box = self ._box .transformed (self .modeltransformation )
147147 box = Box .from_bounding_box (box .points )
148148 if self .inflate_aabb and self .inflate_aabb != 1.0 :
149149 box .xsize += self .inflate_aabb
@@ -165,7 +165,7 @@ def compute_obb(self, inflate: float = 0.0) -> Box:
165165 :class:`compas.geometry.Box`
166166 The oriented bounding box.
167167 """
168- box = self .box .transformed (self .modeltransformation )
168+ box = self ._box .transformed (self .modeltransformation )
169169 if self .inflate_aabb and self .inflate_aabb != 1.0 :
170170 box .xsize += self .inflate_obb
171171 box .ysize += self .inflate_obb
0 commit comments