diff --git a/btools/building/floor/floor_types.py b/btools/building/floor/floor_types.py index b072b58..0dae09b 100644 --- a/btools/building/floor/floor_types.py +++ b/btools/building/floor/floor_types.py @@ -142,6 +142,7 @@ def create_columns(bm, face, prop): center = calc_verts_median(face.verts) ref_vectors = [] + #loop for each corner for v in face.verts: extrud_vectors=[] dir_vector = v.co - center @@ -159,7 +160,7 @@ def create_columns(bm, face, prop): if len(ref_vectors) == 0: ref_vectors=[extrud_vectors[0],extrud_vectors[1]] - + #loop for each floor for i in range(prop.floor_count): if not prop.add_decoration: cube = create_cube_without_faces( @@ -183,17 +184,19 @@ def create_columns(bm, face, prop): first_face = bmesh.ops.contextual_create(bm, geom=first_plane.get("verts"))["faces"][0] next_face = get_top_faces([first_face]) - # determine which king of corner + # determine orientation (left or right) of corner corner_type=0 if is_parallel(extrud_vectors[0]+extrud_vectors[1],ref_vectors[0]+ref_vectors[1]) : corner_type = 1 + #loop for decoration step for ii in range(decoration_nb): sup_face, sides = extrude_face_region(bm,next_face,decoration_h,normal) for _f in sides : res.extend(_f.verts) + # extrude decorations for f_side in sides: if vec_equal(f_side.normal,extrud_vectors[0]) or vec_equal(f_side.normal,extrud_vectors[1]): @@ -204,17 +207,32 @@ def create_columns(bm, face, prop): if not prop.alternate_decoration : parity_index = 1 - #print(f'{ii}:{corner_type}:{parity_index}->{-prop.slab_outset*(1+prop.decoration_ratio*parity_index)}') - debug, debug2 = extrude_face_region(bm,[f_side],-prop.slab_outset*(1+prop.decoration_ratio*parity_index),f_side.normal) + extern_side, other_sides = extrude_face_region(bm,[f_side],-prop.slab_outset*(1+prop.decoration_ratio*parity_index),f_side.normal) + + if (ii