mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-17 14:02:27 +00:00
black .
This commit is contained in:
@@ -749,9 +749,11 @@ class PolylinePoint(PropertyGroup):
|
|||||||
angle: bpy.props.StringProperty(name="Angle")
|
angle: bpy.props.StringProperty(name="Angle")
|
||||||
position: bpy.props.FloatVectorProperty(name="Decorator Position", size=3)
|
position: bpy.props.FloatVectorProperty(name="Decorator Position", size=3)
|
||||||
|
|
||||||
|
|
||||||
class MeasurePolyline(PropertyGroup):
|
class MeasurePolyline(PropertyGroup):
|
||||||
polyline_point: bpy.props.CollectionProperty(type=PolylinePoint)
|
polyline_point: bpy.props.CollectionProperty(type=PolylinePoint)
|
||||||
|
|
||||||
|
|
||||||
class BIMPolylineProperties(PropertyGroup):
|
class BIMPolylineProperties(PropertyGroup):
|
||||||
snap_mouse_point: bpy.props.CollectionProperty(type=SnapMousePoint)
|
snap_mouse_point: bpy.props.CollectionProperty(type=SnapMousePoint)
|
||||||
snap_mouse_ref: bpy.props.CollectionProperty(type=SnapMousePoint)
|
snap_mouse_ref: bpy.props.CollectionProperty(type=SnapMousePoint)
|
||||||
|
|||||||
@@ -230,8 +230,8 @@ class Raycast(bonsai.core.tool.Raycast):
|
|||||||
bm.verts.index_update()
|
bm.verts.index_update()
|
||||||
bm.edges.index_update()
|
bm.edges.index_update()
|
||||||
|
|
||||||
indices = list(range(len(points)-1))
|
indices = list(range(len(points) - 1))
|
||||||
edges = [(i, i+1) for i in range(len(points)-1)]
|
edges = [(i, i + 1) for i in range(len(points) - 1)]
|
||||||
new_verts = [bm.verts.new(Vector((point.x, point.y, point.z))) for point in points]
|
new_verts = [bm.verts.new(Vector((point.x, point.y, point.z))) for point in points]
|
||||||
new_edges = [bm.edges.new((new_verts[e[0]], new_verts[e[1]])) for e in edges]
|
new_edges = [bm.edges.new((new_verts[e[0]], new_verts[e[1]])) for e in edges]
|
||||||
bm.verts.index_update()
|
bm.verts.index_update()
|
||||||
@@ -241,7 +241,6 @@ class Raycast(bonsai.core.tool.Raycast):
|
|||||||
bm.free()
|
bm.free()
|
||||||
return snapping_points
|
return snapping_points
|
||||||
|
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def ray_cast_to_plane(cls, context, event, plane_origin, plane_normal):
|
def ray_cast_to_plane(cls, context, event, plane_origin, plane_normal):
|
||||||
region = context.region
|
region = context.region
|
||||||
|
|||||||
@@ -396,12 +396,11 @@ class Snap(bonsai.core.tool.Snap):
|
|||||||
measure_data = context.scene.BIMPolylineProperties.measure_polyline
|
measure_data = context.scene.BIMPolylineProperties.measure_polyline
|
||||||
for measure in measure_data:
|
for measure in measure_data:
|
||||||
measure_points = measure.polyline_point
|
measure_points = measure.polyline_point
|
||||||
print('points', measure_points)
|
print("points", measure_points)
|
||||||
snap_points = tool.Raycast.ray_cast_to_measure(context, event, measure_points)
|
snap_points = tool.Raycast.ray_cast_to_measure(context, event, measure_points)
|
||||||
if snap_points:
|
if snap_points:
|
||||||
detected_snaps.append({"Polyline": snap_points})
|
detected_snaps.append({"Polyline": snap_points})
|
||||||
|
|
||||||
|
|
||||||
# Axis and Plane
|
# Axis and Plane
|
||||||
elevation = tool.Ifc.get_object(tool.Root.get_default_container()).location.z
|
elevation = tool.Ifc.get_object(tool.Root.get_default_container()).location.z
|
||||||
|
|
||||||
|
|||||||
@@ -573,7 +573,8 @@ class serializers:
|
|||||||
|
|
||||||
# ttl is always available since it doesn't depend on any C++ libraries,
|
# ttl is always available since it doesn't depend on any C++ libraries,
|
||||||
# just people might be using an outdated binary
|
# just people might be using an outdated binary
|
||||||
if hasattr(ifcopenshell_wrapper, 'TtlWktSerializer'):
|
if hasattr(ifcopenshell_wrapper, "TtlWktSerializer"):
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def ttl(
|
def ttl(
|
||||||
out_filename: Union[str, serializers.buffer], geometry_settings: settings, settings: serializer_settings
|
out_filename: Union[str, serializers.buffer], geometry_settings: settings, settings: serializer_settings
|
||||||
|
|||||||
Reference in New Issue
Block a user