mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-26 10:11:46 +00:00
BlenderBIM: typo fixes
This commit is contained in:
@@ -475,14 +475,14 @@ endif
|
|||||||
cp -r dist/working/IFC2JSON_python-master/file_converters/ifcjson dist/blenderbim/libs/site/packages/
|
cp -r dist/working/IFC2JSON_python-master/file_converters/ifcjson dist/blenderbim/libs/site/packages/
|
||||||
rm -rf dist/working
|
rm -rf dist/working
|
||||||
|
|
||||||
# Provides OpenLCA fucntionality
|
# Provides OpenLCA functionality
|
||||||
mkdir dist/working
|
mkdir dist/working
|
||||||
cd dist/working && wget https://files.pythonhosted.org/packages/85/33/f91b96e9e8608ff65a003b692e8a9cdd60f2178f60617e5b1d21334c009c/olca-ipc-0.0.10.tar.gz
|
cd dist/working && wget https://files.pythonhosted.org/packages/85/33/f91b96e9e8608ff65a003b692e8a9cdd60f2178f60617e5b1d21334c009c/olca-ipc-0.0.10.tar.gz
|
||||||
cd dist/working && tar -xzvf olca-ipc*
|
cd dist/working && tar -xzvf olca-ipc*
|
||||||
cd dist/working/olca-ipc-0.0.10/ && cp -r olca ../../blenderbim/libs/site/packages/
|
cd dist/working/olca-ipc-0.0.10/ && cp -r olca ../../blenderbim/libs/site/packages/
|
||||||
rm -rf dist/working
|
rm -rf dist/working
|
||||||
|
|
||||||
# Provides Brickschema fucntionality
|
# Provides Brickschema functionality
|
||||||
mkdir dist/working
|
mkdir dist/working
|
||||||
cd dist/working && wget https://files.pythonhosted.org/packages/ca/37/8309da9a72407d2f5eb5489c197ac3cfe96ee3ccba1902d2a0ecc7843f92/brickschema-0.5.1.tar.gz
|
cd dist/working && wget https://files.pythonhosted.org/packages/ca/37/8309da9a72407d2f5eb5489c197ac3cfe96ee3ccba1902d2a0ecc7843f92/brickschema-0.5.1.tar.gz
|
||||||
cd dist/working && tar -xzvf brickschema*
|
cd dist/working && tar -xzvf brickschema*
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ class Loader:
|
|||||||
if not boundary.ConnectionGeometry:
|
if not boundary.ConnectionGeometry:
|
||||||
return None
|
return None
|
||||||
surface = boundary.ConnectionGeometry.SurfaceOnRelatingElement
|
surface = boundary.ConnectionGeometry.SurfaceOnRelatingElement
|
||||||
# workaround for unvalid geometry provided by Revit. See https://github.com/IfcOpenShell/IfcOpenShell/issues/635#issuecomment-770366838
|
# workaround for invalid geometry provided by Revit. See https://github.com/IfcOpenShell/IfcOpenShell/issues/635#issuecomment-770366838
|
||||||
if surface.is_a("IfcCurveBoundedPlane") and not getattr(surface, "InnerBoundaries", None):
|
if surface.is_a("IfcCurveBoundedPlane") and not getattr(surface, "InnerBoundaries", None):
|
||||||
surface.InnerBoundaries = ()
|
surface.InnerBoundaries = ()
|
||||||
shape = ifcopenshell.geom.create_shape(self.settings, surface)
|
shape = ifcopenshell.geom.create_shape(self.settings, surface)
|
||||||
|
|||||||
@@ -317,7 +317,7 @@ class OffsetHandle:
|
|||||||
base = Vector((0, 0, 0))
|
base = Vector((0, 0, 0))
|
||||||
axis = Vector((0, 0, 1))
|
axis = Vector((0, 0, 1))
|
||||||
|
|
||||||
# projecttion of the arrow to a plane, perpendicular to view ray
|
# projection of the arrow to a plane, perpendicular to view ray
|
||||||
axis_proj = axis - ray_norm * axis.dot(ray_norm)
|
axis_proj = axis - ray_norm * axis.dot(ray_norm)
|
||||||
|
|
||||||
# intersection of the axis with the plane through view origin perpendicular to the arrow projection
|
# intersection of the axis with the plane through view origin perpendicular to the arrow projection
|
||||||
|
|||||||
@@ -88,17 +88,17 @@ class BoundingBox:
|
|||||||
def intersect(self, bb):
|
def intersect(self, bb):
|
||||||
retVal = False
|
retVal = False
|
||||||
if self.vertex != None and bb.vertex != None:
|
if self.vertex != None and bb.vertex != None:
|
||||||
# check all the faces of this object for a seperation axis
|
# check all the faces of this object for a separation axis
|
||||||
for i, f in enumerate(self.face):
|
for i, f in enumerate(self.face):
|
||||||
d = f.normal
|
d = f.normal
|
||||||
if self.whichSide(bb.vertex, d, f.vertex[0]) > 0:
|
if self.whichSide(bb.vertex, d, f.vertex[0]) > 0:
|
||||||
return False # all the vertexes are on the +ve side of the face
|
return False # all the vertices are on the +ve side of the face
|
||||||
|
|
||||||
# now do it again for the other objects faces
|
# now do it again for the other objects faces
|
||||||
for i, f in enumerate(bb.face):
|
for i, f in enumerate(bb.face):
|
||||||
d = f.normal
|
d = f.normal
|
||||||
if self.whichSide(self.vertex, d, f.vertex[0]) > 0:
|
if self.whichSide(self.vertex, d, f.vertex[0]) > 0:
|
||||||
return False # all the vertexes are on the +ve side of the face
|
return False # all the vertices are on the +ve side of the face
|
||||||
|
|
||||||
# do edge checks
|
# do edge checks
|
||||||
for e1 in self.edge:
|
for e1 in self.edge:
|
||||||
@@ -139,7 +139,7 @@ def format_distance(value, isArea=False, hide_units=True):
|
|||||||
|
|
||||||
value *= scaleFactor
|
value *= scaleFactor
|
||||||
|
|
||||||
# Imperial Formating
|
# Imperial Formatting
|
||||||
if unit_system == "IMPERIAL":
|
if unit_system == "IMPERIAL":
|
||||||
precision = bpy.context.scene.BIMProperties.imperial_precision
|
precision = bpy.context.scene.BIMProperties.imperial_precision
|
||||||
if precision == "NONE":
|
if precision == "NONE":
|
||||||
@@ -152,7 +152,7 @@ def format_distance(value, isArea=False, hide_units=True):
|
|||||||
base = int(precision)
|
base = int(precision)
|
||||||
decInches = value * toInches
|
decInches = value * toInches
|
||||||
|
|
||||||
# Seperate ft and inches
|
# Separate ft and inches
|
||||||
# Unless Inches are the specified Length Unit
|
# Unless Inches are the specified Length Unit
|
||||||
if unit_length != "INCHES":
|
if unit_length != "INCHES":
|
||||||
feet = math.floor(decInches / inPerFoot)
|
feet = math.floor(decInches / inPerFoot)
|
||||||
@@ -160,7 +160,7 @@ def format_distance(value, isArea=False, hide_units=True):
|
|||||||
else:
|
else:
|
||||||
feet = 0
|
feet = 0
|
||||||
|
|
||||||
# Seperate Fractional Inches
|
# Separate Fractional Inches
|
||||||
inches = math.floor(decInches)
|
inches = math.floor(decInches)
|
||||||
if inches != 0:
|
if inches != 0:
|
||||||
frac = round(base * (decInches - inches))
|
frac = round(base * (decInches - inches))
|
||||||
@@ -202,7 +202,7 @@ def format_distance(value, isArea=False, hide_units=True):
|
|||||||
else:
|
else:
|
||||||
tx_dist = str("%1.3f" % (value * toInches / inPerFoot)) + " sq. ft."
|
tx_dist = str("%1.3f" % (value * toInches / inPerFoot)) + " sq. ft."
|
||||||
|
|
||||||
# METRIC FORMATING
|
# METRIC FORMATTING
|
||||||
elif unit_system == "METRIC":
|
elif unit_system == "METRIC":
|
||||||
precision = bpy.context.scene.BIMProperties.metric_precision
|
precision = bpy.context.scene.BIMProperties.metric_precision
|
||||||
if precision != 0:
|
if precision != 0:
|
||||||
|
|||||||
@@ -1195,7 +1195,7 @@ class AddSectionsAnnotations(bpy.types.Operator):
|
|||||||
]
|
]
|
||||||
|
|
||||||
def sideview(cam):
|
def sideview(cam):
|
||||||
# leftmost and righmost points of camera view area, local coords
|
# leftmost and rightmost points of camera view area, local coords
|
||||||
xmin, xmax, _, _, _, _ = helper.ortho_view_frame(cam.data, margin=0)
|
xmin, xmax, _, _, _, _ = helper.ortho_view_frame(cam.data, margin=0)
|
||||||
proj = camera.matrix_world.inverted() @ cam.matrix_world
|
proj = camera.matrix_world.inverted() @ cam.matrix_world
|
||||||
p_l = proj @ Vector((xmin, 0, 0))
|
p_l = proj @ Vector((xmin, 0, 0))
|
||||||
|
|||||||
@@ -451,7 +451,7 @@ class EditHeader(bpy.types.Operator):
|
|||||||
bl_idname = "bim.edit_header"
|
bl_idname = "bim.edit_header"
|
||||||
bl_label = "Edit Header"
|
bl_label = "Edit Header"
|
||||||
bl_options = {"REGISTER", "UNDO"}
|
bl_options = {"REGISTER", "UNDO"}
|
||||||
bl_description = "Save header informations"
|
bl_description = "Save header information"
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def poll(cls, context):
|
def poll(cls, context):
|
||||||
@@ -507,7 +507,7 @@ class DisableEditingHeader(bpy.types.Operator):
|
|||||||
bl_idname = "bim.disable_editing_header"
|
bl_idname = "bim.disable_editing_header"
|
||||||
bl_label = "Disable Editing Header"
|
bl_label = "Disable Editing Header"
|
||||||
bl_options = {"REGISTER", "UNDO"}
|
bl_options = {"REGISTER", "UNDO"}
|
||||||
bl_description = "Cancel unsaved header informations"
|
bl_description = "Cancel unsaved header information"
|
||||||
|
|
||||||
def execute(self, context):
|
def execute(self, context):
|
||||||
context.scene.BIMProjectProperties.is_editing = False
|
context.scene.BIMProjectProperties.is_editing = False
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ class AddOpening(bpy.types.Operator):
|
|||||||
return {"FINISHED"}
|
return {"FINISHED"}
|
||||||
bpy.ops.bim.assign_class(obj=opening.name, ifc_class="IfcOpeningElement", context_id=body_context.id())
|
bpy.ops.bim.assign_class(obj=opening.name, ifc_class="IfcOpeningElement", context_id=body_context.id())
|
||||||
|
|
||||||
# If the IfcOpeningElement aleady voids another object, remove the boolean modifier
|
# If the IfcOpeningElement already voids another object, remove the boolean modifier
|
||||||
opening_element = self.file.by_id(opening.BIMObjectProperties.ifc_definition_id)
|
opening_element = self.file.by_id(opening.BIMObjectProperties.ifc_definition_id)
|
||||||
if opening_element.VoidsElements:
|
if opening_element.VoidsElements:
|
||||||
other_obj = IfcStore.get_element(opening_element.VoidsElements[0].RelatingBuildingElement.id())
|
other_obj = IfcStore.get_element(opening_element.VoidsElements[0].RelatingBuildingElement.id())
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ import inspect
|
|||||||
# fmt: off
|
# fmt: off
|
||||||
# pylint: skip-file
|
# pylint: skip-file
|
||||||
|
|
||||||
# This interface class and decorator is magic syntatic sugar to allow concise interface definitions
|
# This interface class and decorator is magic syntactic sugar to allow concise interface definitions
|
||||||
# If we didn't do this, Python is unnecessarily verbose, which I find distracting. Don't black this file :)
|
# If we didn't do this, Python is unnecessarily verbose, which I find distracting. Don't black this file :)
|
||||||
class Interface(abc.ABC): pass
|
class Interface(abc.ABC): pass
|
||||||
def interface(cls):
|
def interface(cls):
|
||||||
|
|||||||
@@ -7,8 +7,8 @@ The BlenderBIM Add-on has three layers of tests for each of its three technology
|
|||||||
layers:
|
layers:
|
||||||
|
|
||||||
1. **Core tests**: abstract domain logic unit tests agnostic of Blender
|
1. **Core tests**: abstract domain logic unit tests agnostic of Blender
|
||||||
2. **Tool tests**: low-level concrete unit tests dependant on Blender
|
2. **Tool tests**: low-level concrete unit tests dependent on Blender
|
||||||
3. **BIM tests**: high-level integration UI and smoke tests dependant on Blender
|
3. **BIM tests**: high-level integration UI and smoke tests dependent on Blender
|
||||||
|
|
||||||
These tests use ``pytest`` as the test framework and runner, so install it:
|
These tests use ``pytest`` as the test framework and runner, so install it:
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ Undo system
|
|||||||
===========
|
===========
|
||||||
|
|
||||||
Supporting undo and redo is quite a complex problem because the Blender undo
|
Supporting undo and redo is quite a complex problem because the Blender undo
|
||||||
system only keeps track of changes occuring in the Blender system. However,
|
system only keeps track of changes occurring in the Blender system. However,
|
||||||
changes actually occur in two other locations that Blender doesn't know about:
|
changes actually occur in two other locations that Blender doesn't know about:
|
||||||
the IFC dataset, and the BlenderBIM Add-on system that synchronises Blender and
|
the IFC dataset, and the BlenderBIM Add-on system that synchronises Blender and
|
||||||
the IFC dataset.
|
the IFC dataset.
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ BIM will by definition contain a (big) number of submodules or subschemas. Grant
|
|||||||
|
|
||||||
- Tools to create, modify or delete items are in the dedicated Toolbar (The left one) in the 3D viewport
|
- Tools to create, modify or delete items are in the dedicated Toolbar (The left one) in the 3D viewport
|
||||||
|
|
||||||
- Some Misc tools and informations are displayed in the N panel of the 3D viewport . They're shortcuts to things that are already present elsewhere in the UI, but are handy to have when modifying objects or geometry in the Viewport.
|
- Some Misc tools and information are displayed in the N panel of the 3D viewport . They're shortcuts to things that are already present elsewhere in the UI, but are handy to have when modifying objects or geometry in the Viewport.
|
||||||
|
|
||||||
- Adding specific Import / Export IFC operators (arguably a bit misleading since BlenderBim does more than import / export in these operations)
|
- Adding specific Import / Export IFC operators (arguably a bit misleading since BlenderBim does more than import / export in these operations)
|
||||||
|
|
||||||
@@ -87,7 +87,7 @@ Icons
|
|||||||
|
|
||||||
**Use** : To disable the edition state of a particular item.
|
**Use** : To disable the edition state of a particular item.
|
||||||
|
|
||||||
**Expected result** : A part of the interface showing the item attributes is either shrinked down or hidden. The button is usually replaced by a button to delete this item.
|
**Expected result** : A part of the interface showing the item attributes is either shrunk down or hidden. The button is usually replaced by a button to delete this item.
|
||||||
|
|
||||||
* .. image:: https://user-images.githubusercontent.com/25156105/137271575-dcae9e56-3c64-4d8b-89b0-6cf103b999f2.png
|
* .. image:: https://user-images.githubusercontent.com/25156105/137271575-dcae9e56-3c64-4d8b-89b0-6cf103b999f2.png
|
||||||
|
|
||||||
@@ -139,7 +139,7 @@ Icons
|
|||||||
|
|
||||||
**Use** : to import a particular file from the user's computer's directory to the current context
|
**Use** : to import a particular file from the user's computer's directory to the current context
|
||||||
|
|
||||||
**Expected result** : A new file browser window should open, with sufficient information provided to the user to know which file type should be loaded in (eg adding a file extension, adding information in the filebrowser UI). When the file is loaded, the interface should expand to show the attributes or informations or new context-sensitive operations provided by the imported file.
|
**Expected result** : A new file browser window should open, with sufficient information provided to the user to know which file type should be loaded in (eg adding a file extension, adding information in the filebrowser UI). When the file is loaded, the interface should expand to show the attributes or information or new context-sensitive operations provided by the imported file.
|
||||||
|
|
||||||
**Proposal** : Currently there are some instances where I don't know if the elements are supposed to require an external file, eg
|
**Proposal** : Currently there are some instances where I don't know if the elements are supposed to require an external file, eg
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ Writing docs
|
|||||||
============
|
============
|
||||||
|
|
||||||
The following colours and annotation styles should be used for annotating
|
The following colours and annotation styles should be used for annotating
|
||||||
images. All stroke widths are 3px with a corner radius of 3px. Horizonal
|
images. All stroke widths are 3px with a corner radius of 3px. Horizontal
|
||||||
underlines are 5px with a corner radius of 2px. The dark green is **39b54a** and
|
underlines are 5px with a corner radius of 2px. The dark green is **39b54a** and
|
||||||
the light green is **d9e021**.
|
the light green is **d9e021**.
|
||||||
|
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ Northings, and Orthogonal Height in the **IFC Georeferencing** panel.
|
|||||||
|
|
||||||
When **Local engineering coordinates** are used, typically the architect will
|
When **Local engineering coordinates** are used, typically the architect will
|
||||||
nominate a local origin and model geometry will be drawn orthogonally (i.e.
|
nominate a local origin and model geometry will be drawn orthogonally (i.e.
|
||||||
along the X and Y axis). This local origin often correlates with a site bounary,
|
along the X and Y axis). This local origin often correlates with a site boundary,
|
||||||
surveyed point, or grid intersection. This means that the model's coordinates
|
surveyed point, or grid intersection. This means that the model's coordinates
|
||||||
are typically smaller numbers and correlate to surface distance measurements,
|
are typically smaller numbers and correlate to surface distance measurements,
|
||||||
not Eastings and Northings, and the model's +Y axis will point to **Project
|
not Eastings and Northings, and the model's +Y axis will point to **Project
|
||||||
@@ -205,7 +205,7 @@ True north
|
|||||||
|
|
||||||
When **Local engineering coordinates** are used, the model's +Y axis points to
|
When **Local engineering coordinates** are used, the model's +Y axis points to
|
||||||
**Project North** for the convenience of drafting. When **Map Coordinates** are
|
**Project North** for the convenience of drafting. When **Map Coordinates** are
|
||||||
used, the model's +Y axis points to **Grid North** for the neccessity of
|
used, the model's +Y axis points to **Grid North** for the necessity of
|
||||||
surveying.
|
surveying.
|
||||||
|
|
||||||
**Project North** and **Grid North** is different to **True North**. The angle
|
**Project North** and **Grid North** is different to **True North**. The angle
|
||||||
|
|||||||
@@ -156,7 +156,7 @@ class GbxmlExporter:
|
|||||||
def create_opening(self, object, polygon, parent):
|
def create_opening(self, object, polygon, parent):
|
||||||
opening = self.gbxml.add_element(parent, "Opening")
|
opening = self.gbxml.add_element(parent, "Opening")
|
||||||
opening.set("id", "opening-{}-{}".format(object.name, polygon.index))
|
opening.set("id", "opening-{}-{}".format(object.name, polygon.index))
|
||||||
opening.set("windowTypeIdRef", "STD_EX11") # harcoded
|
opening.set("windowTypeIdRef", "STD_EX11") # hardcoded
|
||||||
opening.set("openingType", "FixedWindow") # hardcoded
|
opening.set("openingType", "FixedWindow") # hardcoded
|
||||||
planar_geometry = self.gbxml.add_element(opening, "PlanarGeometry")
|
planar_geometry = self.gbxml.add_element(opening, "PlanarGeometry")
|
||||||
self.create_poly_loop(object, polygon, planar_geometry)
|
self.create_poly_loop(object, polygon, planar_geometry)
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ with open(filepath) as fp:
|
|||||||
entity_to_type_map.setdefault(entity, []).append(type_class)
|
entity_to_type_map.setdefault(entity, []).append(type_class)
|
||||||
line = fp.readline()
|
line = fp.readline()
|
||||||
|
|
||||||
# This type of hacky express parsing doesn't accomodate subtypes, so...
|
# This type of hacky express parsing doesn't accommodate subtypes, so...
|
||||||
|
|
||||||
|
|
||||||
def get_inherited_map(declaration):
|
def get_inherited_map(declaration):
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
#| Given an empty IFC project
|
#| Given an empty IFC project
|
||||||
#| When I press "bim.demonstrate_hello_world"
|
#| When I press "bim.demonstrate_hello_world"
|
||||||
#| # Blender doesn't have a way of testing that things are visible in the
|
#| # Blender doesn't have a way of testing that things are visible in the
|
||||||
#| # interface and layout. We can check properties, and whats in the 3D
|
#| # interface and layout. We can check properties, and what's in the 3D
|
||||||
#| # scenegraph, but not layout. There is no "DOM" like in web applications.
|
#| # scenegraph, but not layout. There is no "DOM" like in web applications.
|
||||||
#| # Too bad, we can't check the results, but we still write the test, that way
|
#| # Too bad, we can't check the results, but we still write the test, that way
|
||||||
#| # we can still check for errors like crashes or Python errors, like a "smoke
|
#| # we can still check for errors like crashes or Python errors, like a "smoke
|
||||||
|
|||||||
Reference in New Issue
Block a user