diff --git a/amworkflow/src/geometries/composite_geometry.py b/amworkflow/src/geometries/composite_geometry.py index f806c86..cf03c8c 100644 --- a/amworkflow/src/geometries/composite_geometry.py +++ b/amworkflow/src/geometries/composite_geometry.py @@ -583,7 +583,7 @@ def Shape(self): def create_sides(self): if self.R is not None: self.pts = polygon_interpolater(self.pts, self.interpolate) - bender(self.pts, self.R) + self.pts = bender(self.pts, self.R) self.pts = [i for i in self.pts] self.th *= 0.5 for i,p in enumerate(self.pts): diff --git a/amworkflow/src/geometries/operator.py b/amworkflow/src/geometries/operator.py index 45dd4d9..0306ea2 100644 --- a/amworkflow/src/geometries/operator.py +++ b/amworkflow/src/geometries/operator.py @@ -264,6 +264,7 @@ def bender(point_cordinates, radius: float = None, mx_pt: np.ndarray = None, mn_ thetp = lp / (Rp) pt[0] = Rp * np.sin(thetp) pt[1] = o_y - Rp*np.cos(thetp) + return point_cordinates def array_project(array: np.ndarray, direct: np.ndarray) -> np.ndarray: ''' diff --git a/examples/pwall/pwall.py b/examples/pwall/pwall.py index f030489..47533dc 100644 --- a/examples/pwall/pwall.py +++ b/examples/pwall/pwall.py @@ -19,11 +19,11 @@ def geometry_spawn(pm): put1 = g.p_translate(pu, [3 * l, 0, 0]) # Translate the unit _/-\_/-\ end_p = np.copy(put1[-1]) end_p[0] += l * 0.5 # Add one point to make half of the infill _/-\_/-\_ - pm = pu + put1 # integrate the points together - pm.append(end_p) # add the point + p_up = pu + put1 # integrate the points together + p_up.append(end_p) # add the point # pm_cnt = g.p_center_of_mass(pm) # pm_cnt[0] -=hth - pmr = g.p_rotate(pm, angle_z=np.pi) # Rotate the half infill to make it upside down + pmr = g.p_rotate(p_up, angle_z=np.pi) # Rotate the half infill to make it upside down # pmr = g.p_translate(pmr, np.array([-th,0,0])) cnt2 = g.p_center_of_mass(pmr) #Get the center of mass of all points t_len = cnt2[1] * 2 #2 times the y coord would be the length for translation