archipack: improve labels to support i18n, fix regression in boolean, division by 0 error in roof

This commit is contained in:
stephen leger 2017-08-03 15:59:40 +02:00
parent 253a936d60
commit 80914c5592
15 changed files with 574 additions and 579 deletions

View File

@ -30,16 +30,6 @@ from bpy.props import EnumProperty
from mathutils import Vector
"""
from os import path
def debug_using_gl(context, filename):
context.scene.update()
temp_path = "C:\\tmp\\"
context.scene.render.filepath = path.join(temp_path, filename + ".png")
bpy.ops.render.opengl(write_still=True)
"""
class ArchipackBoolManager():
"""
Handle three methods for booleans
@ -95,7 +85,7 @@ class ArchipackBoolManager():
'archipack_robusthole' in wall or
'archipack_handle' in wall)
def datablock(self, o, basis='WALL'):
def datablock(self, o):
"""
get datablock from windows and doors
return
@ -103,15 +93,10 @@ class ArchipackBoolManager():
None when not found
"""
d = None
if o.data:
if basis == 'WALL':
if "archipack_window" in o.data:
d = o.data.archipack_window[0]
elif "archipack_door" in o.data:
d = o.data.archipack_door[0]
elif basis == 'ROOF':
if "archipack_roof" in o.data:
d = o.data.archipack_roof[0]
if "archipack_window" in o.data:
d = o.data.archipack_window[0]
elif "archipack_door" in o.data:
d = o.data.archipack_door[0]
return d
def prepare_hole(self, hole):
@ -135,7 +120,7 @@ class ArchipackBoolManager():
return hole
return None
def _generate_hole(self, context, o, basis='WALL'):
def _generate_hole(self, context, o):
# use existing one
if self.mode != 'ROBUST':
hole = self.get_child_hole(o)
@ -143,7 +128,7 @@ class ArchipackBoolManager():
# print("_generate_hole Use existing hole %s" % (hole.name))
return hole
# generate single hole from archipack primitives
d = self.datablock(o, basis)
d = self.datablock(o)
hole = None
if d is not None:
if (self.itM is not None and (
@ -390,21 +375,21 @@ class ArchipackBoolManager():
elif modif is not None:
wall.modifiers.remove(modif)
def get_basis_type(self, o):
if o.data is not None:
if "archipack_wall2" in o.data:
return 'WALL'
elif "archipack_roof" in o.data:
return 'ROOF'
elif "archipack_wall" in o.data:
return 'WALL'
return 'DEFAULT'
def autoboolean(self, context, wall):
"""
Entry point for multi-boolean operations like
in T panel autoBoolean and RobustBoolean buttons
"""
if wall.data is not None and "archipack_wall2" in wall.data:
# ensure wall modifier is there before any boolean
# to support "revival" of applied modifiers
m = wall.modifiers.get("Wall")
if m is None:
wall.select = True
context.scene.objects.active = wall
wall.data.archipack_wall2[0].update(context)
bpy.ops.object.select_all(action='DESELECT')
context.scene.objects.active = None
childs = []
@ -412,12 +397,9 @@ class ArchipackBoolManager():
# get wall bounds to find what's inside
self._get_bounding_box(wall)
# filter roofs when wall is roof
basis = self.get_basis_type(wall)
# either generate hole or get existing one
for o in context.scene.objects:
h = self._generate_hole(context, o, basis)
h = self._generate_hole(context, o)
if h is not None:
holes.append(h)
childs.append(o)
@ -484,8 +466,7 @@ class ArchipackBoolManager():
# generate holes for crossing window and doors
self.itM = wall.matrix_world.inverted()
basis = self.get_basis_type(wall)
d = self.datablock(o, basis)
d = self.datablock(o)
hole = None
hole_obj = None
@ -680,17 +661,14 @@ class ARCHIPACK_OT_generate_hole(Operator):
manager = ArchipackBoolManager(mode='HYBRID')
o = context.active_object
# filter roofs when o is roof
basis = manager.get_basis_type(o)
d = manager.datablock(o, basis)
d = manager.datablock(o)
if d is None:
self.report({'WARNING'}, "Archipack: active object must be a door, a window or a roof")
return {'CANCELLED'}
bpy.ops.object.select_all(action='DESELECT')
o.select = True
context.scene.objects.active = o
hole = manager._generate_hole(context, o, basis)
hole = manager._generate_hole(context, o)
manager.prepare_hole(hole)
hole.select = False
o.select = True

View File

@ -28,6 +28,7 @@ from mathutils import Vector, Matrix
from mathutils.geometry import interpolate_bezier
from math import cos, sin, pi, atan2
import bmesh
from random import uniform
from bpy.props import (
FloatProperty, IntProperty, BoolProperty,
StringProperty, EnumProperty
@ -213,7 +214,7 @@ class CutAblePolygon():
TODO:
make s1 angle different than all othr segs
"""
s1 = Line(pt, Vector((100 * self.xsize, 0.1)))
s1 = Line(pt, Vector((min(10000, 100 * self.xsize), uniform(-0.5, 0.5))))
counter = 0
if segs is None:
segs = self.segs
@ -236,6 +237,9 @@ class CutAblePolygon():
s0 = self.segs[-1]
for i in range(n_segs):
s1 = self.segs[i]
if "Curved" in type(s1).__name__:
self.convex = False
return
c = s0.v.cross(s1.v)
if i == 0:
sign = (c > 0)
@ -543,14 +547,14 @@ class ArchipackCutterPart():
-type EnumProperty
"""
length = FloatProperty(
name="length",
name="Length",
min=0.01,
max=1000.0,
default=2.0,
update=update_hole
)
a0 = FloatProperty(
name="angle",
name="Angle",
min=-2 * pi,
max=2 * pi,
default=0,
@ -558,7 +562,7 @@ class ArchipackCutterPart():
update=update_hole
)
offset = FloatProperty(
name="offset",
name="Offset",
min=0,
default=0,
update=update_hole
@ -598,7 +602,7 @@ def update_manipulators(self, context):
class ArchipackCutter():
n_parts = IntProperty(
name="parts",
name="Parts",
min=1,
default=1, update=update_manipulators
)
@ -609,11 +613,11 @@ class ArchipackCutter():
options={'SKIP_SAVE'}
)
user_defined_path = StringProperty(
name="user defined",
name="User defined",
update=update_path
)
user_defined_resolution = IntProperty(
name="resolution",
name="Resolution",
min=1,
max=128,
default=12, update=update_path

View File

@ -61,7 +61,7 @@ def update_childs(self, context):
class archipack_door_panel(ArchipackObject, PropertyGroup):
x = FloatProperty(
name='width',
name='Width',
min=0.25,
default=100.0, precision=2,
unit='LENGTH', subtype='DISTANCE',
@ -75,7 +75,7 @@ class archipack_door_panel(ArchipackObject, PropertyGroup):
description='depth'
)
z = FloatProperty(
name='height',
name='Height',
min=0.1,
default=2.0, precision=2,
unit='LENGTH', subtype='DISTANCE',
@ -88,49 +88,49 @@ class archipack_door_panel(ArchipackObject, PropertyGroup):
description="open direction"
)
model = IntProperty(
name="model",
name="Model",
min=0,
max=3,
default=0,
description="Model"
)
chanfer = FloatProperty(
name='chanfer',
name='Bevel',
min=0.001,
default=0.005, precision=3,
unit='LENGTH', subtype='DISTANCE',
description='chanfer'
)
panel_spacing = FloatProperty(
name='spacing',
name='Spacing',
min=0.001,
default=0.1, precision=2,
unit='LENGTH', subtype='DISTANCE',
description='distance between panels'
)
panel_bottom = FloatProperty(
name='bottom',
name='Bottom',
min=0.0,
default=0.0, precision=2,
unit='LENGTH', subtype='DISTANCE',
description='distance from bottom'
)
panel_border = FloatProperty(
name='border',
name='Border',
min=0.001,
default=0.2, precision=2,
unit='LENGTH', subtype='DISTANCE',
description='distance from border'
)
panels_x = IntProperty(
name="panels h",
name="# h",
min=1,
max=50,
default=1,
description="panels h"
)
panels_y = IntProperty(
name="panels v",
name="# v",
min=1,
max=50,
default=1,
@ -607,82 +607,82 @@ class ARCHIPACK_OT_door_panel(Operator):
bl_category = 'Archipack'
bl_options = {'REGISTER', 'UNDO'}
x = FloatProperty(
name='width',
name='Width',
min=0.1,
default=0.80, precision=2,
unit='LENGTH', subtype='DISTANCE',
description='Width'
)
z = FloatProperty(
name='height',
name='Height',
min=0.1,
default=2.0, precision=2,
unit='LENGTH', subtype='DISTANCE',
description='height'
)
y = FloatProperty(
name='depth',
name='Depth',
min=0.001,
default=0.02, precision=2,
unit='LENGTH', subtype='DISTANCE',
description='Depth'
)
direction = IntProperty(
name="direction",
name="Direction",
min=0,
max=1,
description="open direction"
)
model = IntProperty(
name="model",
name="Model",
min=0,
max=3,
description="panel type"
)
chanfer = FloatProperty(
name='chanfer',
name='Bevel',
min=0.001,
default=0.005, precision=3,
unit='LENGTH', subtype='DISTANCE',
description='chanfer'
)
panel_spacing = FloatProperty(
name='spacing',
name='Spacing',
min=0.001,
default=0.1, precision=2,
unit='LENGTH', subtype='DISTANCE',
description='distance between panels'
)
panel_bottom = FloatProperty(
name='bottom',
name='Bottom',
min=0.0,
default=0.0, precision=2,
unit='LENGTH', subtype='DISTANCE',
description='distance from bottom'
)
panel_border = FloatProperty(
name='border',
name='Border',
min=0.001,
default=0.2, precision=2,
unit='LENGTH', subtype='DISTANCE',
description='distance from border'
)
panels_x = IntProperty(
name="panels h",
name="# h",
min=1,
max=50,
default=1,
description="panels h"
)
panels_y = IntProperty(
name="panels v",
name="# v",
min=1,
max=50,
default=1,
description="panels v"
)
panels_distrib = EnumProperty(
name='distribution',
name='Distribution',
items=(
('REGULAR', 'Regular', '', 0),
('ONE_THIRD', '1/3 2/3', '', 1)
@ -790,21 +790,21 @@ class archipack_door(ArchipackObject, Manipulable, PropertyGroup):
create/remove/update her own childs
"""
x = FloatProperty(
name='width',
name='Width',
min=0.25,
default=100.0, precision=2, step=1,
unit='LENGTH', subtype='DISTANCE',
description='Width', update=update,
)
y = FloatProperty(
name='depth',
name='Depth',
min=0.1,
default=0.20, precision=2, step=1,
unit='LENGTH', subtype='DISTANCE',
description='Depth', update=update,
)
z = FloatProperty(
name='height',
name='Height',
min=0.1,
default=2.0, precision=2, step=1,
unit='LENGTH', subtype='DISTANCE',
@ -858,49 +858,49 @@ class archipack_door(ArchipackObject, Manipulable, PropertyGroup):
description="number of panels", update=update
)
chanfer = FloatProperty(
name='chanfer',
name='Bevel',
min=0.001,
default=0.005, precision=3, step=0.01,
unit='LENGTH', subtype='DISTANCE',
description='chanfer', update=update_childs,
)
panel_spacing = FloatProperty(
name='spacing',
name='Spacing',
min=0.001,
default=0.1, precision=2, step=1,
unit='LENGTH', subtype='DISTANCE',
description='distance between panels', update=update_childs,
)
panel_bottom = FloatProperty(
name='bottom',
name='Bottom',
min=0.0,
default=0.0, precision=2, step=1,
unit='LENGTH', subtype='DISTANCE',
description='distance from bottom', update=update_childs,
)
panel_border = FloatProperty(
name='border',
name='Border',
min=0.001,
default=0.2, precision=2, step=1,
unit='LENGTH', subtype='DISTANCE',
description='distance from border', update=update_childs,
)
panels_x = IntProperty(
name="panels h",
name="# h",
min=1,
max=50,
default=1,
description="panels h", update=update_childs,
)
panels_y = IntProperty(
name="panels v",
name="# v",
min=1,
max=50,
default=1,
description="panels v", update=update_childs,
)
panels_distrib = EnumProperty(
name='distribution',
name='Distribution',
items=(
('REGULAR', 'Regular', '', 0),
('ONE_THIRD', '1/3 2/3', '', 1)
@ -916,7 +916,7 @@ class archipack_door(ArchipackObject, Manipulable, PropertyGroup):
default='BOTH', update=update_childs,
)
hole_margin = FloatProperty(
name='hole margin',
name='Hole margin',
min=0.0,
default=0.1, precision=2, step=1,
unit='LENGTH', subtype='DISTANCE',

View File

@ -703,21 +703,21 @@ class archipack_fence_part(PropertyGroup):
update=update_type
)
length = FloatProperty(
name="length",
name="Length",
min=0.01,
default=2.0,
unit='LENGTH', subtype='DISTANCE',
update=update
)
radius = FloatProperty(
name="radius",
name="Radius",
min=0.01,
default=0.7,
unit='LENGTH', subtype='DISTANCE',
update=update
)
da = FloatProperty(
name="total angle",
name="Angle",
min=-pi,
max=pi,
default=pi / 2,
@ -725,7 +725,7 @@ class archipack_fence_part(PropertyGroup):
update=update
)
a0 = FloatProperty(
name="angle",
name="Start angle",
min=-2 * pi,
max=2 * pi,
default=0,
@ -779,7 +779,7 @@ class archipack_fence(ArchipackObject, Manipulable, PropertyGroup):
parts = CollectionProperty(type=archipack_fence_part)
user_defined_path = StringProperty(
name="user defined",
name="User defined",
update=update_path
)
user_defined_spline = IntProperty(
@ -789,32 +789,32 @@ class archipack_fence(ArchipackObject, Manipulable, PropertyGroup):
update=update_path
)
user_defined_resolution = IntProperty(
name="resolution",
name="Resolution",
min=1,
max=128,
default=12, update=update_path
)
n_parts = IntProperty(
name="parts",
name="Parts",
min=1,
default=1, update=update_manipulators
)
x_offset = FloatProperty(
name="x offset",
name="Offset",
default=0.0, precision=2, step=1,
unit='LENGTH', subtype='DISTANCE',
update=update
)
radius = FloatProperty(
name="radius",
name="Radius",
min=0.01,
default=0.7,
unit='LENGTH', subtype='DISTANCE',
update=update
)
da = FloatProperty(
name="angle",
name="Angle",
min=-pi,
max=pi,
default=pi / 2,
@ -822,7 +822,7 @@ class archipack_fence(ArchipackObject, Manipulable, PropertyGroup):
update=update
)
angle_limit = FloatProperty(
name="angle",
name="Angle",
min=0,
max=2 * pi,
default=pi / 8,
@ -838,40 +838,40 @@ class archipack_fence(ArchipackObject, Manipulable, PropertyGroup):
update=update
)
post = BoolProperty(
name='enable',
name='Enable',
default=True,
update=update
)
post_spacing = FloatProperty(
name="spacing",
name="Spacing",
min=0.1,
default=1.0, precision=2, step=1,
unit='LENGTH', subtype='DISTANCE',
update=update
)
post_x = FloatProperty(
name="width",
name="Width",
min=0.001,
default=0.04, precision=2, step=1,
unit='LENGTH', subtype='DISTANCE',
update=update
)
post_y = FloatProperty(
name="length",
name="Length",
min=0.001, max=1000,
default=0.04, precision=2, step=1,
unit='LENGTH', subtype='DISTANCE',
update=update
)
post_z = FloatProperty(
name="height",
name="Height",
min=0.001,
default=1, precision=2, step=1,
unit='LENGTH', subtype='DISTANCE',
update=update
)
post_alt = FloatProperty(
name="altitude",
name="Altitude",
default=0, precision=2, step=1,
unit='LENGTH', subtype='DISTANCE',
update=update
@ -882,7 +882,7 @@ class archipack_fence(ArchipackObject, Manipulable, PropertyGroup):
default=True
)
user_defined_post = StringProperty(
name="user defined",
name="User defined",
update=update
)
idmat_post = EnumProperty(
@ -892,46 +892,46 @@ class archipack_fence(ArchipackObject, Manipulable, PropertyGroup):
update=update
)
subs = BoolProperty(
name='enable',
name='Enable',
default=False,
update=update
)
subs_spacing = FloatProperty(
name="spacing",
name="Spacing",
min=0.05,
default=0.10, precision=2, step=1,
unit='LENGTH', subtype='DISTANCE',
update=update
)
subs_x = FloatProperty(
name="width",
name="Width",
min=0.001,
default=0.02, precision=2, step=1,
unit='LENGTH', subtype='DISTANCE',
update=update
)
subs_y = FloatProperty(
name="length",
name="Length",
min=0.001,
default=0.02, precision=2, step=1,
unit='LENGTH', subtype='DISTANCE',
update=update
)
subs_z = FloatProperty(
name="height",
name="Height",
min=0.001,
default=1, precision=2, step=1,
unit='LENGTH', subtype='DISTANCE',
update=update
)
subs_alt = FloatProperty(
name="altitude",
name="Altitude",
default=0, precision=2, step=1,
unit='LENGTH', subtype='DISTANCE',
update=update
)
subs_offset_x = FloatProperty(
name="offset",
name="Offset",
default=0.0, precision=2, step=1,
unit='LENGTH', subtype='DISTANCE',
update=update
@ -951,7 +951,7 @@ class archipack_fence(ArchipackObject, Manipulable, PropertyGroup):
default=True
)
user_defined_subs = StringProperty(
name="user defined",
name="User defined",
update=update
)
idmat_subs = EnumProperty(
@ -961,39 +961,39 @@ class archipack_fence(ArchipackObject, Manipulable, PropertyGroup):
update=update
)
panel = BoolProperty(
name='enable',
name='Enable',
default=True,
update=update
)
panel_alt = FloatProperty(
name="altitude",
name="Altitude",
default=0.25, precision=2, step=1,
unit='LENGTH', subtype='DISTANCE',
update=update
)
panel_x = FloatProperty(
name="width",
name="Width",
min=0.001,
default=0.01, precision=2, step=1,
unit='LENGTH', subtype='DISTANCE',
update=update
)
panel_z = FloatProperty(
name="height",
name="Height",
min=0.001,
default=0.6, precision=2, step=1,
unit='LENGTH', subtype='DISTANCE',
update=update
)
panel_dist = FloatProperty(
name="space",
name="Spacing",
min=0.001,
default=0.05, precision=2, step=1,
unit='LENGTH', subtype='DISTANCE',
update=update
)
panel_offset_x = FloatProperty(
name="offset",
name="Offset",
default=0.0, precision=2, step=1,
unit='LENGTH', subtype='DISTANCE',
update=update
@ -1005,19 +1005,19 @@ class archipack_fence(ArchipackObject, Manipulable, PropertyGroup):
update=update
)
rail = BoolProperty(
name="enable",
name="Enable",
update=update,
default=False
)
rail_n = IntProperty(
name="number",
name="#",
default=1,
min=0,
max=31,
update=update
)
rail_x = FloatVectorProperty(
name="width",
name="Width",
default=[
0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05,
0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05,
@ -1031,7 +1031,7 @@ class archipack_fence(ArchipackObject, Manipulable, PropertyGroup):
update=update
)
rail_z = FloatVectorProperty(
name="height",
name="Height",
default=[
0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05,
0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05,
@ -1045,7 +1045,7 @@ class archipack_fence(ArchipackObject, Manipulable, PropertyGroup):
update=update
)
rail_offset = FloatVectorProperty(
name="offset",
name="Offset",
default=[
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
@ -1058,7 +1058,7 @@ class archipack_fence(ArchipackObject, Manipulable, PropertyGroup):
update=update
)
rail_alt = FloatVectorProperty(
name="altitude",
name="Altitude",
default=[
1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0,
1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0,
@ -1073,36 +1073,36 @@ class archipack_fence(ArchipackObject, Manipulable, PropertyGroup):
rail_mat = CollectionProperty(type=archipack_fence_material)
handrail = BoolProperty(
name="enable",
name="Enable",
update=update,
default=True
)
handrail_offset = FloatProperty(
name="offset",
name="Offset",
default=0.0, precision=2, step=1,
unit='LENGTH', subtype='DISTANCE',
update=update
)
handrail_alt = FloatProperty(
name="altitude",
name="Altitude",
default=1.0, precision=2, step=1,
unit='LENGTH', subtype='DISTANCE',
update=update
)
handrail_extend = FloatProperty(
name="extend",
name="Extend",
min=0,
default=0.1, precision=2, step=1,
unit='LENGTH', subtype='DISTANCE',
update=update
)
handrail_slice = BoolProperty(
name='slice',
name='Slice',
default=True,
update=update
)
handrail_slice_right = BoolProperty(
name='slice',
name='Slice',
default=True,
update=update
)
@ -1117,21 +1117,21 @@ class archipack_fence(ArchipackObject, Manipulable, PropertyGroup):
update=update
)
handrail_x = FloatProperty(
name="width",
name="Width",
min=0.001,
default=0.04, precision=2, step=1,
unit='LENGTH', subtype='DISTANCE',
update=update
)
handrail_y = FloatProperty(
name="height",
name="Height",
min=0.001,
default=0.04, precision=2, step=1,
unit='LENGTH', subtype='DISTANCE',
update=update
)
handrail_radius = FloatProperty(
name="radius",
name="Radius",
min=0.001,
default=0.02, precision=2, step=1,
unit='LENGTH', subtype='DISTANCE',

View File

@ -301,35 +301,36 @@ class FloorGenerator(CutAblePolygon, CutAbleGenerator):
bm.verts.ensure_lookup_table()
# solidify and floor bottom
geom = bm.faces[:]
verts = bm.verts[:]
edges = bm.edges[:]
bmesh.ops.solidify(bm, geom=geom, thickness=0.0001)
for v in verts:
v.co.z = bottom
# bevel
if d.bevel:
for v in bm.verts:
v.select = True
if d.solidify:
# solidify and floor bottom
geom = bm.faces[:]
verts = bm.verts[:]
edges = bm.edges[:]
bmesh.ops.solidify(bm, geom=geom, thickness=0.0001)
for v in verts:
v.select = False
for v in bm.edges:
v.select = True
for v in edges:
v.select = False
geom = [v for v in bm.verts if v.select]
geom.extend([v for v in bm.edges if v.select])
bmesh.ops.bevel(bm,
geom=geom,
offset=d.bevel_amount,
offset_type=0,
segments=1, # d.bevel_res
profile=0.5,
vertex_only=False,
clamp_overlap=False,
material=-1)
v.co.z = bottom
# bevel
if d.bevel:
for v in bm.verts:
v.select = True
for v in verts:
v.select = False
for v in bm.edges:
v.select = True
for v in edges:
v.select = False
geom = [v for v in bm.verts if v.select]
geom.extend([v for v in bm.edges if v.select])
bmesh.ops.bevel(bm,
geom=geom,
offset=d.bevel_amount,
offset_type=0,
segments=1, # d.bevel_res
profile=0.5,
vertex_only=False,
clamp_overlap=False,
material=-1)
bm.to_mesh(o.data)
bm.free()
@ -916,19 +917,19 @@ class archipack_floor_part(PropertyGroup):
update=update_type
)
length = FloatProperty(
name="length",
name="Length",
min=0.01,
default=2.0,
update=update
)
radius = FloatProperty(
name="radius",
name="Radius",
min=0.5,
default=0.7,
update=update
)
da = FloatProperty(
name="angle",
name="Angle",
min=-pi,
max=pi,
default=pi / 2,
@ -936,7 +937,7 @@ class archipack_floor_part(PropertyGroup):
update=update
)
a0 = FloatProperty(
name="start angle",
name="Start angle",
min=-2 * pi,
max=2 * pi,
default=0,
@ -945,7 +946,7 @@ class archipack_floor_part(PropertyGroup):
)
offset = FloatProperty(
name="Offset",
description="Add to current segment offset",
description="Side offset of segment",
default=0,
unit='LENGTH', subtype='DISTANCE',
update=update
@ -973,8 +974,8 @@ class archipack_floor_part(PropertyGroup):
def draw(self, context, layout, index):
box = layout.box()
box.prop(self, "type", text=str(index + 1))
# box.prop(self, "type", text=str(index + 1))
box.label(text="#" + str(index + 1))
if self.type in ['C_SEG']:
box.prop(self, "radius")
box.prop(self, "da")
@ -985,17 +986,17 @@ class archipack_floor_part(PropertyGroup):
class archipack_floor(ArchipackObject, Manipulable, PropertyGroup):
n_parts = IntProperty(
name="parts",
name="Parts",
min=1,
default=1, update=update_manipulators
)
parts = CollectionProperty(type=archipack_floor_part)
user_defined_path = StringProperty(
name="user defined",
name="User defined",
update=update_path
)
user_defined_resolution = IntProperty(
name="resolution",
name="Resolution",
min=1,
max=128,
default=12, update=update_path
@ -1013,230 +1014,238 @@ class archipack_floor(ArchipackObject, Manipulable, PropertyGroup):
)
pattern = EnumProperty(
name='Floor Pattern', items=(("boards", "Boards", ""), ("square_parquet", "Square Parquet", ""),
("herringbone_parquet", "Herringbone Parquet", ""),
("herringbone", "Herringbone", ""), ("regular_tile", "Regular Tile", ""),
("hopscotch", "Hopscotch", ""), ("stepping_stone", "Stepping Stone", ""),
("hexagon", "Hexagon", ""), ("windmill", "Windmill", "")),
default="boards", update=update
)
name='Floor Pattern',
items=(("boards", "Boards", ""),
("square_parquet", "Square Parquet", ""),
("herringbone_parquet", "Herringbone Parquet", ""),
("herringbone", "Herringbone", ""),
("regular_tile", "Regular Tile", ""),
("hopscotch", "Hopscotch", ""),
("stepping_stone", "Stepping Stone", ""),
("hexagon", "Hexagon", ""),
("windmill", "Windmill", "")),
default="boards",
update=update
)
spacing = FloatProperty(
name='Spacing',
description='The amount of space between boards or tiles in both directions',
unit='LENGTH', subtype='DISTANCE',
min=0,
default=0.005,
precision=2,
update=update
)
name='Spacing',
description='The amount of space between boards or tiles in both directions',
unit='LENGTH', subtype='DISTANCE',
min=0,
default=0.005,
precision=2,
update=update
)
thickness = FloatProperty(
name='Thickness',
description='Thickness',
unit='LENGTH', subtype='DISTANCE',
min=0.0,
default=0.005,
precision=2,
update=update
)
name='Thickness',
description='Thickness',
unit='LENGTH', subtype='DISTANCE',
min=0.0,
default=0.005,
precision=2,
update=update
)
vary_thickness = BoolProperty(
name='Vary Thickness',
description='Vary board thickness?',
default=False,
update=update
)
name='Random Thickness',
description='Vary thickness',
default=False,
update=update
)
thickness_variance = FloatProperty(
name='Thickness Variance',
description='How much board thickness can vary by',
min=0, max=100,
default=25,
precision=2,
subtype='PERCENTAGE',
update=update
)
name='Variance',
description='How much vary by',
min=0, max=100,
default=25,
precision=2,
subtype='PERCENTAGE',
update=update
)
board_width = FloatProperty(
name='Board Width',
description='The width of the boards',
unit='LENGTH', subtype='DISTANCE',
min=0.02,
default=0.2,
precision=2,
update=update
)
name='Width',
description='The width',
unit='LENGTH', subtype='DISTANCE',
min=0.02,
default=0.2,
precision=2,
update=update
)
vary_width = BoolProperty(
name='Vary Width',
description='Vary board width',
default=False,
update=update
)
name='Random Width',
description='Vary width',
default=False,
update=update
)
width_variance = FloatProperty(
name='Width Variance',
description='How much board width can vary by',
subtype='PERCENTAGE',
min=1, max=100, default=50,
precision=2,
update=update
)
name='Variance',
description='How much vary by',
subtype='PERCENTAGE',
min=1, max=100, default=50,
precision=2,
update=update
)
width_spacing = FloatProperty(
name='Width Spacing',
description='The amount of space between boards in the width direction',
unit='LENGTH', subtype='DISTANCE',
min=0,
default=0.002,
precision=2,
update=update
)
name='Width Spacing',
description='The amount of space between boards in the width direction',
unit='LENGTH', subtype='DISTANCE',
min=0,
default=0.002,
precision=2,
update=update
)
board_length = FloatProperty(
name='Board Length',
description='The length of the boards',
unit='LENGTH', subtype='DISTANCE',
precision=2,
min=0.02,
default=2,
update=update
)
name='Length',
description='The length of the boards',
unit='LENGTH', subtype='DISTANCE',
precision=2,
min=0.02,
default=2,
update=update
)
short_board_length = FloatProperty(
name='Board Length',
description='The length of the boards',
unit='LENGTH', subtype='DISTANCE',
precision=2,
min=0.02,
default=2,
update=update
)
name='Length',
description='The length of the boards',
unit='LENGTH', subtype='DISTANCE',
precision=2,
min=0.02,
default=2,
update=update
)
vary_length = BoolProperty(
name='Vary Length',
description='Vary board length',
default=False,
update=update
)
name='Random Length',
description='Vary board length',
default=False,
update=update
)
length_variance = FloatProperty(
name='Length Variance',
description='How much board length can vary by',
subtype='PERCENTAGE',
min=1, max=100, default=50,
precision=2, update=update
)
name='Variance',
description='How much board length can vary by',
subtype='PERCENTAGE',
min=1, max=100, default=50,
precision=2, update=update
)
max_boards = IntProperty(
name='Max Boards',
description='Max number of boards in one row',
min=1,
default=20,
update=update
)
name='Max Boards',
description='Max number of boards in one row',
min=1,
default=20,
update=update
)
length_spacing = FloatProperty(
name='Length Spacing',
description='The amount of space between boards in the length direction',
unit='LENGTH', subtype='DISTANCE',
min=0,
default=0.002,
precision=2,
update=update
)
name='Length Spacing',
description='The amount of space between boards in the length direction',
unit='LENGTH', subtype='DISTANCE',
min=0,
default=0.002,
precision=2,
update=update
)
# parquet specific
boards_in_group = IntProperty(
name='Boards in Group',
description='Number of boards in a group',
min=1, default=4,
update=update
)
name='Boards in Group',
description='Number of boards in a group',
min=1, default=4,
update=update
)
# tile specific
tile_width = FloatProperty(
name='Tile Width',
description='Width of the tiles',
unit='LENGTH', subtype='DISTANCE',
min=0.002,
default=0.2,
precision=2,
update=update
)
name='Width',
description='Width of the tiles',
unit='LENGTH', subtype='DISTANCE',
min=0.002,
default=0.2,
precision=2,
update=update
)
tile_length = FloatProperty(
name='Tile Length',
description='Length of the tiles',
unit='LENGTH', subtype='DISTANCE',
precision=2,
min=0.02,
default=0.3,
update=update
)
name='Length',
description='Length of the tiles',
unit='LENGTH', subtype='DISTANCE',
precision=2,
min=0.02,
default=0.3,
update=update
)
# grout
add_grout = BoolProperty(
name='Add Grout',
description='Add grout',
default=False,
update=update
)
name='Add Grout',
description='Add grout',
default=False,
update=update
)
mortar_depth = FloatProperty(
name='Mortar Depth',
description='The depth of the mortar from the surface of the tile',
unit='LENGTH', subtype='DISTANCE',
precision=2,
step=0.005,
min=0,
default=0.001,
update=update
)
name='Depth',
description='The depth of the mortar from the surface of the tile',
unit='LENGTH', subtype='DISTANCE',
precision=2,
step=0.005,
min=0,
default=0.001,
update=update
)
# regular tile
random_offset = BoolProperty(
name='Random Offset',
description='Random amount of offset for each row of tiles',
update=update, default=False
)
name='Random Offset',
description='Random amount of offset for each row of tiles',
update=update, default=False
)
offset = FloatProperty(
name='Offset',
description='How much to offset each row of tiles',
min=0, max=100, default=0,
precision=2,
update=update
)
name='Offset',
description='How much to offset each row of tiles',
min=0, max=100, default=0,
precision=2,
update=update
)
offset_variance = FloatProperty(
name='Offset Variance',
description='How much to vary the offset each row of tiles',
min=0.001, max=100, default=50,
precision=2,
update=update
)
# UV stuff
random_uvs = BoolProperty(
name='Random UV\'s', update=update, default=True, description='Random UV positions for the faces'
)
name='Variance',
description='How much to vary the offset each row of tiles',
min=0.001, max=100, default=50,
precision=2,
update=update
)
# bevel
bevel = BoolProperty(
name='Bevel', update=update, default=False, description='Bevel upper faces'
)
name='Bevel',
update=update,
default=False,
description='Bevel upper faces'
)
bevel_amount = FloatProperty(
name='Bevel Amount',
description='Bevel amount',
unit='LENGTH', subtype='DISTANCE',
min=0.0001, default=0.001,
precision=2, step=0.05,
update=update
)
name='Bevel',
description='Bevel amount',
unit='LENGTH', subtype='DISTANCE',
min=0.0001, default=0.001,
precision=2, step=0.05,
update=update
)
solidify = BoolProperty(
name="Solidify",
default=True,
update=update
)
vary_materials = BoolProperty(
name="Vary Material?",
default=True,
description="Vary Material indexes",
update=update)
name="Random Material",
default=True,
description="Vary Material indexes",
update=update)
matid = IntProperty(
name="#variations",
min=1,
max=10,
default=7,
description="Material index maxi",
update=update)
name="#variations",
min=1,
max=10,
default=7,
description="Material index maxi",
update=update)
auto_update = BoolProperty(
options={'SKIP_SAVE'},
default=True,
update=update_manipulators
)
options={'SKIP_SAVE'},
default=True,
update=update_manipulators
)
z = FloatProperty(
name="dumb z",
description="Dumb z for manipulator placeholder",
@ -1665,7 +1674,8 @@ class ARCHIPACK_PT_floor(Panel):
box.prop(props, 'vary_thickness', icon='RNDCURVE')
if props.vary_thickness:
box.prop(props, 'thickness_variance')
box.separator()
box.prop(props, 'solidify', icon='MOD_SOLIDIFY')
box.separator()
if props.pattern == 'boards':
box.prop(props, 'board_length')

View File

@ -97,7 +97,7 @@ class ArchipackObject():
return None
active = context.active_object
selected = [o for o in context.selected_objects]
selected = context.selected_objects[:]
for o in selected:
if self.__class__.datablock(o) == self:

View File

@ -282,8 +282,8 @@ class ARCHIPACK_OT_render(Operator):
if "archipack_output" in bpy.data.images:
out_img = bpy.data.images["archipack_output"]
if out_img is not None:
out_img.user_clear()
bpy.data.images.remove(out_img)
# out_img.user_clear()
bpy.data.images.remove(out_img, do_unlink=True)
out = bpy.data.images.new("archipack_output", width, height)
tmp_pixels = [1] * totpixel4
@ -403,8 +403,8 @@ class ARCHIPACK_OT_render(Operator):
img.gl_free() # free opengl image memory
# delete image
img.user_clear()
bpy.data.images.remove(img)
# img.user_clear()
bpy.data.images.remove(img, do_unlink=True)
# remove temp file
remove(outpath)
# reset
@ -461,6 +461,10 @@ class ARCHIPACK_OT_render(Operator):
d = o.data.archipack_stair[0]
elif 'archipack_fence' in o.data:
d = o.data.archipack_fence[0]
elif 'archipack_floor' in o.data:
d = o.data.archipack_floor[0]
elif 'archipack_roof' in o.data:
d = o.data.archipack_roof[0]
if d is not None:
objlist.append((o, d))
return objlist

View File

@ -1333,6 +1333,8 @@ class RoofGenerator(CutAbleGenerator):
# triangular ends
for node in self.nodes:
if node.root is None:
continue
if node.n_horizontal == 1 and node.root.seg.triangular_end:
if node.root.reversed:
# Next side (segment end)
@ -1882,7 +1884,7 @@ class RoofGenerator(CutAbleGenerator):
if d.quick_edit:
context.scene.archipack_progress = -1
def _rake(self, s, i, boundary, pan,
def _bargeboard(self, s, i, boundary, pan,
width, height, altitude, offset, idmat,
verts, faces, edges, matids, uvs):
@ -1992,7 +1994,7 @@ class RoofGenerator(CutAbleGenerator):
[(0, 0), (0, 1), (1, 1), (1, 0)]
])
def rake(self, d, verts, faces, edges, matids, uvs):
def bargeboard(self, d, verts, faces, edges, matids, uvs):
#####################
# Vire-vents
@ -2004,13 +2006,13 @@ class RoofGenerator(CutAbleGenerator):
for hole in pan.holes:
for i, s in enumerate(hole.segs):
if s.type == 'SIDE':
self._rake(s,
self._bargeboard(s,
i,
hole, pan,
d.rake_width,
d.rake_height,
d.rake_altitude,
d.rake_offset,
d.bargeboard_width,
d.bargeboard_height,
d.bargeboard_altitude,
d.bargeboard_offset,
idmat,
verts,
faces,
@ -2020,13 +2022,13 @@ class RoofGenerator(CutAbleGenerator):
for i, s in enumerate(pan.segs):
if s.type == 'SIDE':
self._rake(s,
self._bargeboard(s,
i,
pan, pan,
d.rake_width,
d.rake_height,
d.rake_altitude,
d.rake_offset,
d.bargeboard_width,
d.bargeboard_height,
d.bargeboard_altitude,
d.bargeboard_offset,
idmat,
verts,
faces,
@ -2034,7 +2036,7 @@ class RoofGenerator(CutAbleGenerator):
matids,
uvs)
def _facia(self, s, i, boundary, pan, tri_0, tri_1,
def _fascia(self, s, i, boundary, pan, tri_0, tri_1,
width, height, altitude, offset, idmat,
verts, faces, edges, matids, uvs):
@ -2170,7 +2172,7 @@ class RoofGenerator(CutAbleGenerator):
[(0, 0), (0, 1), (1, 1), (1, 0)]
])
def facia(self, d, verts, faces, edges, matids, uvs):
def fascia(self, d, verts, faces, edges, matids, uvs):
#####################
# Larmiers
@ -2182,14 +2184,14 @@ class RoofGenerator(CutAbleGenerator):
for hole in pan.holes:
for i, s in enumerate(hole.segs):
if s.type == 'BOTTOM':
self._facia(s,
self._fascia(s,
i,
hole, pan,
False, False,
d.facia_width,
d.facia_height,
d.facia_altitude,
d.facia_offset,
d.fascia_width,
d.fascia_height,
d.fascia_altitude,
d.fascia_offset,
idmat,
verts,
faces,
@ -2209,14 +2211,14 @@ class RoofGenerator(CutAbleGenerator):
if pan.side == 'LEFT':
tri_0, tri_1 = tri_1, tri_0
self._facia(s,
self._fascia(s,
i,
pan, pan,
tri_0, tri_1,
d.facia_width,
d.facia_height,
d.facia_altitude,
d.facia_offset,
d.fascia_width,
d.fascia_height,
d.fascia_altitude,
d.fascia_offset,
idmat,
verts,
faces,
@ -2227,7 +2229,7 @@ class RoofGenerator(CutAbleGenerator):
continue
f = len(verts)
s0 = s.offset(d.facia_width)
s0 = s.offset(d.fascia_width)
s1 = pan.last_seg(i)
s2 = pan.next_seg(i)
@ -2262,7 +2264,7 @@ class RoofGenerator(CutAbleGenerator):
s1.type = 'SIDE'
s1.v = s.sized_normal(0, 1).v
else:
s1 = s1.offset(d.facia_width)
s1 = s1.offset(d.fascia_width)
# find next neighboor depending on type
if s2.type == 'AXIS' or 'LINK' in s2.type:
@ -2283,7 +2285,7 @@ class RoofGenerator(CutAbleGenerator):
s2.v = s.sized_normal(0, 1).v
else:
s2 = s2.offset(d.facia_width)
s2 = s2.offset(d.fascia_width)
# units vectors and scale
# is unit normal on sides
@ -2295,16 +2297,16 @@ class RoofGenerator(CutAbleGenerator):
x1, y1 = p0
x2, y2 = p1
x3, y3 = s.p1
z0 = self.z + d.facia_altitude + pan.altitude(s.p0)
z1 = self.z + d.facia_altitude + pan.altitude(s.p1)
z0 = self.z + d.fascia_altitude + pan.altitude(s.p0)
z1 = self.z + d.fascia_altitude + pan.altitude(s.p1)
verts.extend([
(x0, y0, z0),
(x1, y1, z0),
(x2, y2, z1),
(x3, y3, z1),
])
z0 -= d.facia_height
z1 -= d.facia_height
z0 -= d.fascia_height
z1 -= d.fascia_height
verts.extend([
(x0, y0, z0),
(x1, y1, z0),
@ -2446,7 +2448,7 @@ class RoofGenerator(CutAbleGenerator):
s3 = Line(s.p0, v0.normalized())
s4 = Line(s.p1, v1.normalized())
zt = self.z + d.facia_altitude + pan.altitude(s3.p0)
zt = self.z + d.fascia_altitude + pan.altitude(s3.p0)
z0 = self.z + d.gutter_alt + pan.altitude(s3.p0)
z1 = z0 - 0.5 * d.gutter_width
z2 = z1 - 0.5 * d.gutter_width
@ -2454,7 +2456,7 @@ class RoofGenerator(CutAbleGenerator):
dz0 = z2 - z1
dz1 = z3 - z1
tt = scale_0 * d.facia_width
tt = scale_0 * d.fascia_width
t0 = scale_0 * d.gutter_dist
t1 = t0 + scale_0 * (0.5 * d.gutter_width)
t2 = t1 + scale_0 * (0.5 * d.gutter_width)
@ -2493,14 +2495,14 @@ class RoofGenerator(CutAbleGenerator):
ca = cos(i * da)
verts.append((x3 + dx * ca, y3 + dy * ca, z1 + dz1 * sa))
zt = self.z + d.facia_altitude + pan.altitude(s4.p0)
zt = self.z + d.fascia_altitude + pan.altitude(s4.p0)
z0 = self.z + d.gutter_alt + pan.altitude(s4.p0)
z1 = z0 - 0.5 * d.gutter_width
z2 = z1 - 0.5 * d.gutter_width
z3 = z1 - 0.5 * d.gutter_boudin
dz0 = z2 - z1
dz1 = z3 - z1
tt = scale_1 * d.facia_width
tt = scale_1 * d.fascia_width
t0 = scale_1 * d.gutter_dist
t1 = t0 + scale_1 * (0.5 * d.gutter_width)
t2 = t1 + scale_1 * (0.5 * d.gutter_width)
@ -2631,7 +2633,7 @@ class RoofGenerator(CutAbleGenerator):
if pan.side == 'LEFT':
s0_tri, s1_tri = s1_tri, s0_tri
if s0.type == 'SIDE':
if s0.type == 'SIDE' and s.length > 0:
s0 = s0.offset(d.beam_offset)
t0 = -d.beam_offset / s.length
@ -2643,7 +2645,7 @@ class RoofGenerator(CutAbleGenerator):
if not res:
continue
if s1.type == 'SIDE':
if s1.type == 'SIDE' and s.length > 0:
s1 = s1.offset(d.beam_offset)
t1 = 1 + d.beam_offset / s.length
@ -3096,11 +3098,11 @@ class RoofGenerator(CutAbleGenerator):
tmin = 0
tmax = 1
s0 = pan.last_seg(i)
if s0.type == 'SIDE':
if s0.type == 'SIDE' and s.length > 0:
tmin = 0 - d.tile_side / s.length
s1 = pan.next_seg(i)
if s1.type == 'SIDE':
if s1.type == 'SIDE' and s.length > 0:
tmax = 1 + d.tile_side / s.length
# print("tmin:%s tmax:%s" % (tmin, tmax))
@ -3493,14 +3495,14 @@ def update_components(self, context):
class ArchipackSegment():
length = FloatProperty(
name="length",
name="Length",
min=0.01,
max=1000.0,
default=4.0,
update=update
)
a0 = FloatProperty(
name="angle",
name="Angle",
min=-2 * pi,
max=2 * pi,
default=0,
@ -3512,7 +3514,7 @@ class ArchipackSegment():
class ArchipackLines():
n_parts = IntProperty(
name="parts",
name="Parts",
min=1,
default=1, update=update_manipulators
)
@ -3579,6 +3581,7 @@ class ArchipackLines():
class archipack_roof_segment(ArchipackSegment, PropertyGroup):
bound_idx = IntProperty(
name="Link to",
default=0,
min=0,
update=update_manipulators
@ -3632,7 +3635,7 @@ class archipack_roof_segment(ArchipackSegment, PropertyGroup):
update=update_manipulators
)
triangular_end = BoolProperty(
name="Tri end",
name="Triangular end",
default=False,
update=update
)
@ -3719,7 +3722,7 @@ class archipack_roof_segment(ArchipackSegment, PropertyGroup):
class archipack_roof(ArchipackLines, ArchipackObject, Manipulable, PropertyGroup):
parts = CollectionProperty(type=archipack_roof_segment)
z = FloatProperty(
name="z",
name="Altitude",
default=3, precision=2, step=1,
unit='LENGTH', subtype='DISTANCE',
update=update_childs
@ -3727,13 +3730,11 @@ class archipack_roof(ArchipackLines, ArchipackObject, Manipulable, PropertyGroup
slope_left = FloatProperty(
name="L slope",
default=0.5, precision=2, step=1,
# unit='LENGTH', subtype='DISTANCE',
update=update_childs
)
slope_right = FloatProperty(
name="R slope",
default=0.5, precision=2, step=1,
# unit='LENGTH', subtype='DISTANCE',
update=update_childs
)
width_left = FloatProperty(
@ -3824,7 +3825,7 @@ class archipack_roof(ArchipackLines, ArchipackObject, Manipulable, PropertyGroup
update=update_components
)
tile_size_x = FloatProperty(
name="x",
name="Width",
description="Size of tiles on x axis",
min=0.01,
default=0.2,
@ -3832,7 +3833,7 @@ class archipack_roof(ArchipackLines, ArchipackObject, Manipulable, PropertyGroup
update=update_components
)
tile_size_y = FloatProperty(
name="y",
name="Length",
description="Size of tiles on y axis",
min=0.01,
default=0.3,
@ -3840,7 +3841,7 @@ class archipack_roof(ArchipackLines, ArchipackObject, Manipulable, PropertyGroup
update=update_components
)
tile_size_z = FloatProperty(
name="z",
name="Thickness",
description="Size of tiles on z axis",
min=0.0,
default=0.02,
@ -3848,7 +3849,7 @@ class archipack_roof(ArchipackLines, ArchipackObject, Manipulable, PropertyGroup
update=update_components
)
tile_space_x = FloatProperty(
name="x",
name="Width",
description="Space between tiles on x axis",
min=0.01,
default=0.2,
@ -3856,7 +3857,7 @@ class archipack_roof(ArchipackLines, ArchipackObject, Manipulable, PropertyGroup
update=update_components
)
tile_space_y = FloatProperty(
name="y",
name="Length",
description="Space between tiles on y axis",
min=0.01,
default=0.3,
@ -3882,7 +3883,7 @@ class archipack_roof(ArchipackLines, ArchipackObject, Manipulable, PropertyGroup
default=False
)
tile_model = EnumProperty(
name="model",
name="Model",
items=(
('BRAAS1', 'Braas 1', '', 0),
('BRAAS2', 'Braas 2', '', 1),
@ -3977,7 +3978,7 @@ class archipack_roof(ArchipackLines, ArchipackObject, Manipulable, PropertyGroup
default=False
)
beam_enable = BoolProperty(
name="Primary",
name="Ridge pole",
default=True,
update=update_components
)
@ -4112,7 +4113,7 @@ class archipack_roof(ArchipackLines, ArchipackObject, Manipulable, PropertyGroup
update=update_components
)
hip_size_x = FloatProperty(
name="l",
name="Length",
description="Length of hip",
min=0.01,
default=0.4,
@ -4120,7 +4121,7 @@ class archipack_roof(ArchipackLines, ArchipackObject, Manipulable, PropertyGroup
update=update_components
)
hip_size_y = FloatProperty(
name="w",
name="Width",
description="Width of hip",
min=0.01,
default=0.15,
@ -4128,7 +4129,7 @@ class archipack_roof(ArchipackLines, ArchipackObject, Manipulable, PropertyGroup
update=update_components
)
hip_size_z = FloatProperty(
name="h",
name="Height",
description="Height of hip",
min=0.0,
default=0.15,
@ -4136,7 +4137,7 @@ class archipack_roof(ArchipackLines, ArchipackObject, Manipulable, PropertyGroup
update=update_components
)
hip_model = EnumProperty(
name="model",
name="Model",
items=(
('ROUND', 'Round', '', 0),
('ETERNIT', 'Eternit', '', 1),
@ -4158,19 +4159,19 @@ class archipack_roof(ArchipackLines, ArchipackObject, Manipulable, PropertyGroup
update=update_components
)
facia_enable = BoolProperty(
fascia_enable = BoolProperty(
name="Enable",
description="Enable Facia",
description="Enable Fascia",
default=True,
update=update_components
)
facia_expand = BoolProperty(
fascia_expand = BoolProperty(
options={'SKIP_SAVE'},
name="Facia",
description="Expand facia panel",
name="Fascia",
description="Expand fascia panel",
default=False
)
facia_height = FloatProperty(
fascia_height = FloatProperty(
name="Height",
description="Height",
min=0.01,
@ -4178,7 +4179,7 @@ class archipack_roof(ArchipackLines, ArchipackObject, Manipulable, PropertyGroup
unit='LENGTH', subtype='DISTANCE',
update=update_components
)
facia_width = FloatProperty(
fascia_width = FloatProperty(
name="Width",
description="Width",
min=0.01,
@ -4186,34 +4187,34 @@ class archipack_roof(ArchipackLines, ArchipackObject, Manipulable, PropertyGroup
unit='LENGTH', subtype='DISTANCE',
update=update_components
)
facia_offset = FloatProperty(
fascia_offset = FloatProperty(
name="Offset",
description="Offset from roof border",
default=0,
unit='LENGTH', subtype='DISTANCE',
update=update_components
)
facia_altitude = FloatProperty(
fascia_altitude = FloatProperty(
name="Altitude",
description="Facia altitude from roof",
description="Fascia altitude from roof",
default=0.1,
unit='LENGTH', subtype='DISTANCE',
update=update_components
)
rake_enable = BoolProperty(
bargeboard_enable = BoolProperty(
name="Enable",
description="Enable Rake",
description="Enable Bargeboard",
default=True,
update=update_components
)
rake_expand = BoolProperty(
bargeboard_expand = BoolProperty(
options={'SKIP_SAVE'},
name="Rake",
description="Expand rake panel",
name="Bargeboard",
description="Expand Bargeboard panel",
default=False
)
rake_height = FloatProperty(
bargeboard_height = FloatProperty(
name="Height",
description="Height",
min=0.01,
@ -4221,7 +4222,7 @@ class archipack_roof(ArchipackLines, ArchipackObject, Manipulable, PropertyGroup
unit='LENGTH', subtype='DISTANCE',
update=update_components
)
rake_width = FloatProperty(
bargeboard_width = FloatProperty(
name="Width",
description="Width",
min=0.01,
@ -4229,16 +4230,16 @@ class archipack_roof(ArchipackLines, ArchipackObject, Manipulable, PropertyGroup
unit='LENGTH', subtype='DISTANCE',
update=update_components
)
rake_offset = FloatProperty(
bargeboard_offset = FloatProperty(
name="Offset",
description="Offset from roof border",
default=0.001,
unit='LENGTH', subtype='DISTANCE',
update=update_components
)
rake_altitude = FloatProperty(
bargeboard_altitude = FloatProperty(
name="Altitude",
description="Facia altitude from roof",
description="Fascia altitude from roof",
default=0.1,
unit='LENGTH', subtype='DISTANCE',
update=update_components
@ -4606,11 +4607,11 @@ class archipack_roof(ArchipackLines, ArchipackObject, Manipulable, PropertyGroup
else:
if self.rake_enable:
g.rake(self, verts, faces, edges, matids, uvs)
if self.bargeboard_enable:
g.bargeboard(self, verts, faces, edges, matids, uvs)
if self.facia_enable:
g.facia(self, verts, faces, edges, matids, uvs)
if self.fascia_enable:
g.fascia(self, verts, faces, edges, matids, uvs)
if self.beam_enable:
g.beam_primary(self, verts, faces, edges, matids, uvs)
@ -4729,7 +4730,7 @@ class archipack_roof_cutter_segment(ArchipackCutterPart, PropertyGroup):
type = EnumProperty(
name="Type",
items=(
('SIDE', 'Side', 'Side with rake', 0),
('SIDE', 'Side', 'Side with bargeboard', 0),
('BOTTOM', 'Bottom', 'Bottom with gutter', 1),
('LINK', 'Side link', 'Side witout decoration', 2),
('AXIS', 'Top', 'Top part with hip and beam', 3)
@ -4867,9 +4868,9 @@ class ARCHIPACK_PT_roof(Panel):
box = layout.box()
row = box.row(align=True)
if prop.tile_expand:
row.prop(prop, 'tile_expand', icon="TRIA_DOWN", text="Tiles", icon_only=True, emboss=False)
row.prop(prop, 'tile_expand', icon="TRIA_DOWN", text="Covering", icon_only=True, emboss=False)
else:
row.prop(prop, 'tile_expand', icon="TRIA_RIGHT", text="Tiles", icon_only=True, emboss=False)
row.prop(prop, 'tile_expand', icon="TRIA_RIGHT", text="Covering", icon_only=True, emboss=False)
row.prop(prop, 'tile_enable')
if prop.tile_expand:
box.prop(prop, 'tile_model', text="")
@ -4884,10 +4885,9 @@ class ARCHIPACK_PT_roof(Panel):
box.prop(prop, 'tile_bevel_segs')
box.separator()
box.label(text="Tile size")
row = box.row(align=True)
row.prop(prop, 'tile_size_x')
row.prop(prop, 'tile_size_y')
row.prop(prop, 'tile_size_z')
box.prop(prop, 'tile_size_x')
box.prop(prop, 'tile_size_y')
box.prop(prop, 'tile_size_z')
box.prop(prop, 'tile_altitude')
box.separator()
@ -4899,9 +4899,8 @@ class ARCHIPACK_PT_roof(Panel):
box.prop(prop, 'tile_offset')
box.label(text="Spacing")
row = box.row(align=True)
row.prop(prop, 'tile_space_x')
row.prop(prop, 'tile_space_y')
box.prop(prop, 'tile_space_x')
box.prop(prop, 'tile_space_y')
box.separator() # hip
box.label(text="Borders")
@ -4918,12 +4917,9 @@ class ARCHIPACK_PT_roof(Panel):
row.prop(prop, 'hip_enable')
if prop.hip_expand:
box.prop(prop, 'hip_model', text="")
box.label(text="Hip size")
row = box.row(align=True)
row.prop(prop, 'hip_size_x')
row.prop(prop, 'hip_size_y')
row.prop(prop, 'hip_size_z')
box.prop(prop, 'hip_size_x')
box.prop(prop, 'hip_size_y')
box.prop(prop, 'hip_size_z')
box.prop(prop, 'hip_alt')
box.prop(prop, 'hip_space_x')
box.separator()
@ -4975,29 +4971,29 @@ class ARCHIPACK_PT_roof(Panel):
box = layout.box()
row = box.row(align=True)
if prop.facia_expand:
row.prop(prop, 'facia_expand', icon="TRIA_DOWN", text="Facia", icon_only=True, emboss=False)
if prop.fascia_expand:
row.prop(prop, 'fascia_expand', icon="TRIA_DOWN", text="Fascia", icon_only=True, emboss=False)
else:
row.prop(prop, 'facia_expand', icon="TRIA_RIGHT", text="Facia", icon_only=True, emboss=False)
row.prop(prop, 'facia_enable')
if prop.facia_expand:
box.prop(prop, 'facia_altitude')
box.prop(prop, 'facia_width')
box.prop(prop, 'facia_height')
box.prop(prop, 'facia_offset')
row.prop(prop, 'fascia_expand', icon="TRIA_RIGHT", text="Fascia", icon_only=True, emboss=False)
row.prop(prop, 'fascia_enable')
if prop.fascia_expand:
box.prop(prop, 'fascia_altitude')
box.prop(prop, 'fascia_width')
box.prop(prop, 'fascia_height')
box.prop(prop, 'fascia_offset')
box = layout.box()
row = box.row(align=True)
if prop.rake_expand:
row.prop(prop, 'rake_expand', icon="TRIA_DOWN", text="Rake", icon_only=True, emboss=False)
if prop.bargeboard_expand:
row.prop(prop, 'bargeboard_expand', icon="TRIA_DOWN", text="Bargeboard", icon_only=True, emboss=False)
else:
row.prop(prop, 'rake_expand', icon="TRIA_RIGHT", text="Rake", icon_only=True, emboss=False)
row.prop(prop, 'rake_enable')
if prop.rake_expand:
box.prop(prop, 'rake_altitude')
box.prop(prop, 'rake_width')
box.prop(prop, 'rake_height')
box.prop(prop, 'rake_offset')
row.prop(prop, 'bargeboard_expand', icon="TRIA_RIGHT", text="Bargeboard", icon_only=True, emboss=False)
row.prop(prop, 'bargeboard_enable')
if prop.bargeboard_expand:
box.prop(prop, 'bargeboard_altitude')
box.prop(prop, 'bargeboard_width')
box.prop(prop, 'bargeboard_height')
box.prop(prop, 'bargeboard_offset')
"""
box = layout.box()

View File

@ -435,19 +435,19 @@ class ArchipackSegment():
update=update_type
)
length = FloatProperty(
name="length",
name="Length",
min=0.01,
default=2.0,
update=update
)
radius = FloatProperty(
name="radius",
name="Radius",
min=0.5,
default=0.7,
update=update
)
da = FloatProperty(
name="angle",
name="Angle",
min=-pi,
max=pi,
default=pi / 2,
@ -455,7 +455,7 @@ class ArchipackSegment():
update=update
)
a0 = FloatProperty(
name="start angle",
name="Start angle",
min=-2 * pi,
max=2 * pi,
default=0,
@ -538,7 +538,7 @@ class archipack_slab_part(ArchipackSegment, PropertyGroup):
class archipack_slab(ArchipackObject, Manipulable, PropertyGroup):
# boundary
n_parts = IntProperty(
name="parts",
name="Parts",
min=1,
default=1, update=update_manipulators
)
@ -556,20 +556,20 @@ class archipack_slab(ArchipackObject, Manipulable, PropertyGroup):
)
x_offset = FloatProperty(
name="x offset",
name="Offset",
min=-1000, max=1000,
default=0.0, precision=2, step=1,
unit='LENGTH', subtype='DISTANCE',
update=update
)
z = FloatProperty(
name="z",
name="Thickness",
default=0.3, precision=2, step=1,
unit='LENGTH', subtype='DISTANCE',
update=update
)
auto_synch = BoolProperty(
name="AutoSynch",
name="Auto-Synch",
description="Keep wall in synch when editing",
default=True,
update=update_manipulators

View File

@ -1586,21 +1586,21 @@ class archipack_stair_part(PropertyGroup):
update=update_manipulators
)
length = FloatProperty(
name="length",
min=0.5,
name="Length",
min=0.01,
default=2.0,
unit='LENGTH', subtype='DISTANCE',
update=update
)
radius = FloatProperty(
name="radius",
min=0.5,
name="Radius",
min=0.01,
default=0.7,
unit='LENGTH', subtype='DISTANCE',
update=update
)
da = FloatProperty(
name="angle",
name="Angle",
min=-pi,
max=pi,
default=pi / 2,
@ -1672,7 +1672,7 @@ class archipack_stair(ArchipackObject, Manipulable, PropertyGroup):
parts = CollectionProperty(type=archipack_stair_part)
n_parts = IntProperty(
name="parts",
name="Parts",
min=1,
max=32,
default=1, update=update_manipulators
@ -1685,7 +1685,7 @@ class archipack_stair(ArchipackObject, Manipulable, PropertyGroup):
update=update
)
width = FloatProperty(
name="width",
name="Width",
min=0.01,
default=1.2,
unit='LENGTH', subtype='DISTANCE',
@ -1706,7 +1706,7 @@ class archipack_stair(ArchipackObject, Manipulable, PropertyGroup):
update=update
)
x_offset = FloatProperty(
name="x offset",
name="Offset",
default=0.0, precision=2, step=1,
unit='LENGTH', subtype='DISTANCE',
update=update
@ -1719,21 +1719,21 @@ class archipack_stair(ArchipackObject, Manipulable, PropertyGroup):
update=update
)
bottom_z = FloatProperty(
name="Stair bottom",
name="Thickness",
min=0.001,
default=0.03, precision=2, step=1,
unit='LENGTH', subtype='DISTANCE',
update=update
)
radius = FloatProperty(
name="radius",
name="Radius",
min=0.5,
default=0.7,
unit='LENGTH', subtype='DISTANCE',
update=update
)
da = FloatProperty(
name="angle",
name="Angle",
min=-pi,
max=pi,
default=pi / 2,
@ -1741,7 +1741,7 @@ class archipack_stair(ArchipackObject, Manipulable, PropertyGroup):
update=update
)
total_angle = FloatProperty(
name="angle",
name="Angle",
min=-50 * pi,
max=50 * pi,
default=2 * pi,
@ -1814,49 +1814,49 @@ class archipack_stair(ArchipackObject, Manipulable, PropertyGroup):
update=update
)
post_spacing = FloatProperty(
name="spacing",
name="Spacing",
min=0.1,
default=1.0, precision=2, step=1,
unit='LENGTH', subtype='DISTANCE',
update=update
)
post_x = FloatProperty(
name="width",
name="Width",
min=0.001,
default=0.04, precision=2, step=1,
unit='LENGTH', subtype='DISTANCE',
update=update
)
post_y = FloatProperty(
name="length",
name="Length",
min=0.001,
default=0.04, precision=2, step=1,
unit='LENGTH', subtype='DISTANCE',
update=update
)
post_z = FloatProperty(
name="height",
name="Height",
min=0.001,
default=1, precision=2, step=1,
unit='LENGTH', subtype='DISTANCE',
update=update
)
post_alt = FloatProperty(
name="altitude",
name="Altitude",
min=-100,
default=0, precision=2, step=1,
unit='LENGTH', subtype='DISTANCE',
update=update
)
post_offset_x = FloatProperty(
name="offset",
name="Offset",
min=-100.0, max=100,
default=0.02, precision=2, step=1,
unit='LENGTH', subtype='DISTANCE',
update=update
)
post_corners = BoolProperty(
name="only on edges",
name="Only on edges",
update=update,
default=False
)
@ -1866,7 +1866,7 @@ class archipack_stair(ArchipackObject, Manipulable, PropertyGroup):
default=True
)
user_defined_post = StringProperty(
name="user defined",
name="User defined",
update=update
)
idmat_post = EnumProperty(
@ -1886,42 +1886,42 @@ class archipack_stair(ArchipackObject, Manipulable, PropertyGroup):
update=update
)
subs_spacing = FloatProperty(
name="spacing",
name="Spacing",
min=0.05,
default=0.10, precision=2, step=1,
unit='LENGTH', subtype='DISTANCE',
update=update
)
subs_x = FloatProperty(
name="width",
name="Width",
min=0.001,
default=0.02, precision=2, step=1,
unit='LENGTH', subtype='DISTANCE',
update=update
)
subs_y = FloatProperty(
name="length",
name="Length",
min=0.001,
default=0.02, precision=2, step=1,
unit='LENGTH', subtype='DISTANCE',
update=update
)
subs_z = FloatProperty(
name="height",
name="Height",
min=0.001,
default=1, precision=2, step=1,
unit='LENGTH', subtype='DISTANCE',
update=update
)
subs_alt = FloatProperty(
name="altitude",
name="Altitude",
min=-100,
default=0, precision=2, step=1,
unit='LENGTH', subtype='DISTANCE',
update=update
)
subs_offset_x = FloatProperty(
name="offset",
name="Offset",
min=-100.0, max=100,
default=0.0, precision=2, step=1,
unit='LENGTH', subtype='DISTANCE',
@ -1942,7 +1942,7 @@ class archipack_stair(ArchipackObject, Manipulable, PropertyGroup):
default=True
)
user_defined_subs = StringProperty(
name="user defined",
name="User defined",
update=update
)
idmat_subs = EnumProperty(
@ -1962,34 +1962,34 @@ class archipack_stair(ArchipackObject, Manipulable, PropertyGroup):
update=update
)
panel_alt = FloatProperty(
name="altitude",
name="Altitude",
default=0.25, precision=2, step=1,
unit='LENGTH', subtype='DISTANCE',
update=update
)
panel_x = FloatProperty(
name="width",
name="Width",
min=0.001,
default=0.01, precision=2, step=1,
unit='LENGTH', subtype='DISTANCE',
update=update
)
panel_z = FloatProperty(
name="height",
name="Height",
min=0.001,
default=0.6, precision=2, step=1,
unit='LENGTH', subtype='DISTANCE',
update=update
)
panel_dist = FloatProperty(
name="space",
name="Spacing",
min=0.001,
default=0.05, precision=2, step=1,
unit='LENGTH', subtype='DISTANCE',
update=update
)
panel_offset_x = FloatProperty(
name="offset",
name="Offset",
default=0.0, precision=2, step=1,
unit='LENGTH', subtype='DISTANCE',
update=update
@ -2011,14 +2011,14 @@ class archipack_stair(ArchipackObject, Manipulable, PropertyGroup):
default=False
)
rail_n = IntProperty(
name="number",
name="#",
default=1,
min=0,
max=31,
update=update
)
rail_x = FloatVectorProperty(
name="width",
name="Width",
default=[
0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05,
0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05,
@ -2032,7 +2032,7 @@ class archipack_stair(ArchipackObject, Manipulable, PropertyGroup):
update=update
)
rail_z = FloatVectorProperty(
name="height",
name="Height",
default=[
0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05,
0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05,
@ -2046,7 +2046,7 @@ class archipack_stair(ArchipackObject, Manipulable, PropertyGroup):
update=update
)
rail_offset = FloatVectorProperty(
name="offset",
name="Offset",
default=[
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
@ -2059,7 +2059,7 @@ class archipack_stair(ArchipackObject, Manipulable, PropertyGroup):
update=update
)
rail_alt = FloatVectorProperty(
name="altitude",
name="Altitude",
default=[
1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0,
1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0,
@ -2084,30 +2084,30 @@ class archipack_stair(ArchipackObject, Manipulable, PropertyGroup):
default=True
)
handrail_offset = FloatProperty(
name="offset",
name="Offset",
default=0.0, precision=2, step=1,
unit='LENGTH', subtype='DISTANCE',
update=update
)
handrail_alt = FloatProperty(
name="altitude",
name="Altitude",
default=1.0, precision=2, step=1,
unit='LENGTH', subtype='DISTANCE',
update=update
)
handrail_extend = FloatProperty(
name="extend",
name="Extend",
default=0.1, precision=2, step=1,
unit='LENGTH', subtype='DISTANCE',
update=update
)
handrail_slice_left = BoolProperty(
name='slice',
name='Slice',
default=True,
update=update
)
handrail_slice_right = BoolProperty(
name='slice',
name='Slice',
default=True,
update=update
)
@ -2122,21 +2122,21 @@ class archipack_stair(ArchipackObject, Manipulable, PropertyGroup):
update=update
)
handrail_x = FloatProperty(
name="width",
name="Width",
min=0.001,
default=0.04, precision=2, step=1,
unit='LENGTH', subtype='DISTANCE',
update=update
)
handrail_y = FloatProperty(
name="height",
name="Height",
min=0.001,
default=0.04, precision=2, step=1,
unit='LENGTH', subtype='DISTANCE',
update=update
)
handrail_radius = FloatProperty(
name="radius",
name="Radius",
min=0.001,
default=0.02, precision=2, step=1,
unit='LENGTH', subtype='DISTANCE',
@ -2154,26 +2154,26 @@ class archipack_stair(ArchipackObject, Manipulable, PropertyGroup):
default=False
)
string_x = FloatProperty(
name="width",
name="Width",
min=-100.0,
default=0.02, precision=2, step=1,
unit='LENGTH', subtype='DISTANCE',
update=update
)
string_z = FloatProperty(
name="height",
name="Height",
default=0.3, precision=2, step=1,
unit='LENGTH', subtype='DISTANCE',
update=update
)
string_offset = FloatProperty(
name="offset",
name="Offset",
default=0.0, precision=2, step=1,
unit='LENGTH', subtype='DISTANCE',
update=update
)
string_alt = FloatProperty(
name="altitude",
name="Altitude",
default=-0.04, precision=2, step=1,
unit='LENGTH', subtype='DISTANCE',
update=update

View File

@ -623,21 +623,21 @@ class archipack_wall2_part(PropertyGroup):
update=update_type
)
length = FloatProperty(
name="length",
name="Length",
min=0.01,
default=2.0,
unit='LENGTH', subtype='DISTANCE',
update=update
)
radius = FloatProperty(
name="radius",
name="Radius",
min=0.5,
default=0.7,
unit='LENGTH', subtype='DISTANCE',
update=update
)
a0 = FloatProperty(
name="start angle",
name="Start angle",
min=-pi,
max=pi,
default=pi / 2,
@ -645,7 +645,7 @@ class archipack_wall2_part(PropertyGroup):
update=update
)
da = FloatProperty(
name="angle",
name="Angle",
min=-pi,
max=pi,
default=pi / 2,
@ -653,7 +653,7 @@ class archipack_wall2_part(PropertyGroup):
update=update
)
z = FloatVectorProperty(
name="height",
name="Height",
default=[
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
@ -664,7 +664,7 @@ class archipack_wall2_part(PropertyGroup):
update=update
)
t = FloatVectorProperty(
name="position",
name="Position",
min=0,
max=1,
default=[
@ -677,19 +677,19 @@ class archipack_wall2_part(PropertyGroup):
update=update
)
splits = IntProperty(
name="splits",
default=1,
min=1,
max=31,
get=get_splits, set=set_splits
)
name="Splits",
default=1,
min=1,
max=31,
get=get_splits, set=set_splits
)
n_splits = IntProperty(
name="splits",
default=1,
min=1,
max=31,
update=update
)
name="Splits",
default=1,
min=1,
max=31,
update=update
)
auto_update = BoolProperty(default=True)
manipulators = CollectionProperty(type=archipack_manipulator)
# ui related
@ -777,14 +777,14 @@ class archipack_wall2_child(PropertyGroup):
class archipack_wall2(ArchipackObject, Manipulable, PropertyGroup):
parts = CollectionProperty(type=archipack_wall2_part)
n_parts = IntProperty(
name="parts",
name="Parts",
min=1,
max=1024,
default=1, update=update_manipulators
)
step_angle = FloatProperty(
description="Curved parts segmentation",
name="step angle",
name="Step angle",
min=1 / 180 * pi,
max=pi,
default=6 / 180 * pi,
@ -792,41 +792,45 @@ class archipack_wall2(ArchipackObject, Manipulable, PropertyGroup):
update=update
)
width = FloatProperty(
name="width",
name="Width",
min=0.01,
default=0.2,
unit='LENGTH', subtype='DISTANCE',
update=update
)
z = FloatProperty(
name='height',
name='Height',
min=0.1,
default=2.7, precision=2,
unit='LENGTH', subtype='DISTANCE',
description='height', update=update,
)
x_offset = FloatProperty(
name="x offset",
name="Offset",
min=-1, max=1,
default=-1, precision=2, step=1,
update=update
)
radius = FloatProperty(
name="radius",
name="Radius",
min=0.5,
default=0.7,
unit='LENGTH', subtype='DISTANCE',
update=update
)
da = FloatProperty(
name="angle",
name="Angle",
min=-pi,
max=pi,
default=pi / 2,
subtype='ANGLE', unit='ROTATION',
update=update
)
flip = BoolProperty(default=False, update=update_childs)
flip = BoolProperty(
name="Flip",
default=False,
update=update_childs
)
closed = BoolProperty(
default=False,
name="Close",
@ -840,7 +844,7 @@ class archipack_wall2(ArchipackObject, Manipulable, PropertyGroup):
realtime = BoolProperty(
options={'SKIP_SAVE'},
default=True,
name="RealTime",
name="Real Time",
description="Relocate childs in realtime"
)
# dumb manipulators to show sizes between childs

View File

@ -72,7 +72,7 @@ def get_cols(self):
class archipack_window_panelrow(PropertyGroup):
width = FloatVectorProperty(
name="width",
name="Width",
min=0.5,
max=100.0,
default=[
@ -96,7 +96,7 @@ class archipack_window_panelrow(PropertyGroup):
update=update
)
cols = IntProperty(
name="panels",
name="Panels",
description="number of panels getter and setter, to avoid infinite recursion",
min=1,
max=32,
@ -104,7 +104,7 @@ class archipack_window_panelrow(PropertyGroup):
get=get_cols, set=set_cols
)
n_cols = IntProperty(
name="panels",
name="Panels",
description="store number of panels, internal use only to avoid infinite recursion",
min=1,
max=32,
@ -426,28 +426,28 @@ class archipack_window_panel(ArchipackObject, PropertyGroup):
class archipack_window(ArchipackObject, Manipulable, PropertyGroup):
x = FloatProperty(
name='width',
name='Width',
min=0.25,
default=100.0, precision=2, step=1,
unit='LENGTH', subtype='DISTANCE',
description='Width', update=update
)
y = FloatProperty(
name='depth',
name='Depth',
min=0.1,
default=0.20, precision=2, step=1,
unit='LENGTH', subtype='DISTANCE',
description='Depth', update=update,
)
z = FloatProperty(
name='height',
name='Height',
min=0.1,
default=1.2, precision=2, step=1,
unit='LENGTH', subtype='DISTANCE',
description='height', update=update,
)
angle_y = FloatProperty(
name='angle',
name='Angle',
unit='ROTATION',
subtype='ANGLE',
min=-1.5, max=1.5,
@ -455,27 +455,27 @@ class archipack_window(ArchipackObject, Manipulable, PropertyGroup):
description='angle', update=update,
)
radius = FloatProperty(
name='radius',
name='Radius',
min=0.1,
default=2.5, precision=2, step=1,
unit='LENGTH', subtype='DISTANCE',
description='radius', update=update,
)
elipsis_b = FloatProperty(
name='ellipsis',
name='Ellipsis',
min=0.1,
default=0.5, precision=2, step=1,
unit='LENGTH', subtype='DISTANCE',
description='ellipsis vertical size', update=update,
)
altitude = FloatProperty(
name='altitude',
name='Altitude',
default=1.0, precision=2, step=1,
unit='LENGTH', subtype='DISTANCE',
description='altitude', update=update,
)
offset = FloatProperty(
name='offset',
name='Offset',
default=0.1, precision=2, step=1,
unit='LENGTH', subtype='DISTANCE',
description='offset', update=update,
@ -520,7 +520,7 @@ class archipack_window(ArchipackObject, Manipulable, PropertyGroup):
description='frame width set to 0 disable front frame', update=update,
)
out_frame_offset = FloatProperty(
name='offset',
name='Offset',
min=0.0,
default=0.0, precision=3, step=0.1,
unit='LENGTH', subtype='DISTANCE',
@ -603,13 +603,13 @@ class archipack_window(ArchipackObject, Manipulable, PropertyGroup):
)
rows = CollectionProperty(type=archipack_window_panelrow)
n_rows = IntProperty(
name="number of rows",
name="Number of rows",
min=1,
max=32,
default=1, update=update,
)
curve_steps = IntProperty(
name="curve steps",
name="Steps",
min=6,
max=128,
default=16, update=update,
@ -652,22 +652,22 @@ class archipack_window(ArchipackObject, Manipulable, PropertyGroup):
)
warning = BoolProperty(
options={'SKIP_SAVE'},
name="warning",
name="Warning",
default=False
)
handle_enable = BoolProperty(
name='handle',
name='Handle',
default=True, update=update_childs,
)
handle_altitude = FloatProperty(
name="altitude",
name="Altitude",
min=0,
default=1.4, precision=2, step=1,
unit='LENGTH', subtype='DISTANCE',
description='handle altitude', update=update_childs,
)
hole_margin = FloatProperty(
name='hole margin',
name='Hole margin',
min=0.0,
default=0.1, precision=2, step=1,
unit='LENGTH', subtype='DISTANCE',

View File

@ -45,5 +45,4 @@ METAL##|##Roof_metal
METAL##|##Roof_metal2
METAL##|##Roof_metal3
METAL##|##Roof_metal4
METAL##|##Roof_metal5
METAL##|##Roof_metal5

View File

@ -25,7 +25,7 @@ d.out_tablet_x = 0.03999999910593033
d.out_frame = False
d.y = 0.20000000298023224
d.in_tablet_z = 0.029999999329447746
d.handle_altitude = 1.399999976158142
d.handle_altitude = 1.1
d.out_frame_y2 = 0.019999999552965164
d.out_tablet_y = 0.03999999910593033
d.in_tablet_y = 0.03999999910593033

View File

@ -25,7 +25,7 @@ d.out_tablet_x = 0.03999999910593033
d.out_frame = False
d.y = 0.20000000298023224
d.in_tablet_z = 0.029999999329447746
d.handle_altitude = 1.399999976158142
d.handle_altitude = 1.2
d.out_frame_y2 = 0.019999999552965164
d.out_tablet_y = 0.03999999910593033
d.in_tablet_y = 0.03999999910593033