diff --git a/src/examples/IfcOpenHouse.cpp b/src/examples/IfcOpenHouse.cpp index e3d3138ccd..e94042e9da 100644 --- a/src/examples/IfcOpenHouse.cpp +++ b/src/examples/IfcOpenHouse.cpp @@ -245,7 +245,7 @@ int main() { file.addBuildingProduct(west_wall); // The west wall is assigned an opening element we created for the south wall, opening elements are - // not shared accross building elements, even if they share the same representation. Hence, the east + // not shared across building elements, even if they share the same representation. Hence, the east // wall will not feature this opening. // NB: an Opening Element can only be used to create a single void within a single Element, as per: // http://www.buildingsmart-tech.org/ifc/IFC2x3/TC1/html/ifcproductextension/lexical/ifcfeatureelementsubtraction.htm @@ -419,7 +419,7 @@ int main() { // Therefore we will construct the window as a decomposition of beams and a plate, in which // only the plate will have a transparent material assigned. - // The window frame will consists of four seperate beams. + // The window frame will consists of four separate beams. // AutoCAD Architecture will create an internal window type for the IfcWindow created. // Therefore the OverallWidth and OverallHeight of the window attributes will need to // match the bounding box of the representation. Furthermore, the window placement needs @@ -470,10 +470,10 @@ int main() { ); file.addBuildingProduct(window); - // Initalize a list of parts for the window to be composed of + // Initialize a list of parts for the window to be composed of IfcSchema::IfcObjectDefinition::list::ptr window_parts(new IfcTemplatedEntityList()); - // The placements for the beams are not shared accross the different windows because every + // The placements for the beams are not shared across the different windows because every // beam is placed relative to its parent window entity. IfcSchema::IfcLocalPlacement::list::ptr frame_placements (new IfcTemplatedEntityList()); frame_placements->push(file.addLocalPlacement(storey_placement, 930,45)); diff --git a/src/ifcconvert/IfcConvert.cpp b/src/ifcconvert/IfcConvert.cpp index 200c760a8a..0bf0978bcb 100644 --- a/src/ifcconvert/IfcConvert.cpp +++ b/src/ifcconvert/IfcConvert.cpp @@ -246,7 +246,7 @@ int main(int argc, char** argv) "of the filtered entity. See --include+ for more details.") ("filter-file", po::value(&filter_filename), "Specifies a filter file that describes the used filtering criteria. Supported formats " - "are '--include=arg GlobalId ...' and 'include arg GlobalId ...'. Spaces and tabs can be used as delimeters." + "are '--include=arg GlobalId ...' and 'include arg GlobalId ...'. Spaces and tabs can be used as delimiters." "Multiple filters of same type with different values can be inserted on their own lines. " "See --include, --include+, --exclude, and --exclude+ for more details.") ("no-normals", diff --git a/src/ifcgeom/IfcGeomFunctions.cpp b/src/ifcgeom/IfcGeomFunctions.cpp index aa113ae5f6..4287554ba2 100644 --- a/src/ifcgeom/IfcGeomFunctions.cpp +++ b/src/ifcgeom/IfcGeomFunctions.cpp @@ -736,10 +736,10 @@ bool IfcGeom::Kernel::convert_curve_to_wire(const Handle(Geom_Curve)& curve, Top if (e.GetMessageString() && strlen(e.GetMessageString())) { Logger::Error(e.GetMessageString()); } else { - Logger::Error("Unknown error convering curve to wire"); + Logger::Error("Unknown error converting curve to wire"); } } catch (...) { - Logger::Error("Unknown error convering curve to wire"); + Logger::Error("Unknown error converting curve to wire"); } return false; } @@ -1563,6 +1563,8 @@ std::pair IfcGeom::Kernel::initializeUnits(IfcSchema::IfcUn std::string unit_name = "METER"; double unit_magnitude = 1.; + bool length_unit_encountered = false, angle_unit_encountered = false; + try { IfcEntityList::ptr units = unit_assignment->Units(); if (!units || !units->size()) { @@ -1592,8 +1594,10 @@ std::pair IfcGeom::Kernel::initializeUnits(IfcSchema::IfcUn unit_name = current_unit_name; unit_magnitude = current_unit_magnitude; setValue(IfcGeom::Kernel::GV_LENGTH_UNIT, current_unit_magnitude); + length_unit_encountered = true; } else { setValue(IfcGeom::Kernel::GV_PLANEANGLE_UNIT, current_unit_magnitude); + angle_unit_encountered = true; } } } @@ -1606,6 +1610,14 @@ std::pair IfcGeom::Kernel::initializeUnits(IfcSchema::IfcUn Logger::Message(Logger::LOG_ERROR, ss.str()); } + if (!length_unit_encountered) { + Logger::Error("No length unit encountered"); + } + + if (!angle_unit_encountered) { + Logger::Error("No plane angle unit encountered"); + } + return std::pair(unit_name, unit_magnitude); } @@ -2513,7 +2525,7 @@ bool IfcGeom::Kernel::project(const Handle_Geom_Surface& srf, const TopoDS_Shape return false; } - // Add a little bit of resulution so that the median is shifted towards the mass + // Add a little bit of resolution so that the median is shifted towards the mass // of the curve. This helps to find the parameter ordering for conic surfaces. for (TopExp_Explorer exp(shp, TopAbs_EDGE); exp.More(); exp.Next(), ++vertex_count) { const TopoDS_Edge& e = TopoDS::Edge(exp.Current()); diff --git a/src/ifcgeom/IfcGeomIteratorImplementation.h b/src/ifcgeom/IfcGeomIteratorImplementation.h index 9a05d5d5e5..1dc85b122e 100644 --- a/src/ifcgeom/IfcGeomIteratorImplementation.h +++ b/src/ifcgeom/IfcGeomIteratorImplementation.h @@ -148,6 +148,8 @@ namespace IfcGeom { std::pair length_unit = kernel.initializeUnits(project->UnitsInContext()); unit_name = length_unit.first; unit_magnitude = length_unit.second; + } else { + Logger::Error("A single IfcProject is expected (encountered " + boost::lexical_cast(projects->size()) + "); unable to read unit information."); } } @@ -346,7 +348,7 @@ namespace IfcGeom { // Move to the next IfcRepresentation void _nextShape() { // In order to conserve memory and reduce cache insertion times, the cache is - // cleared after an arbitary number of processed representations. This has been + // cleared after an arbitrary number of processed representations. This has been // benchmarked extensively: https://github.com/IfcOpenShell/IfcOpenShell/pull/47 static const int clear_interval = 64; if (done % clear_interval == clear_interval - 1) { @@ -434,7 +436,7 @@ namespace IfcGeom { IfcSchema::IfcRepresentation* representation_mapped_to = kernel.representation_mapped_to(representation); if (representation_mapped_to) { - // Check if this represenation has (or will be) processed as part its mapped representation + // Check if this representation has (or will be) processed as part its mapped representation representation_processed_as_mapped_item = ok_mapped_representations->contains(representation_mapped_to) || reuse_ok_(kernel.products_represented_by(representation_mapped_to)); } diff --git a/src/ifcgeom/IfcGeomWires.cpp b/src/ifcgeom/IfcGeomWires.cpp index 35b0a51d2b..ddb2976f95 100644 --- a/src/ifcgeom/IfcGeomWires.cpp +++ b/src/ifcgeom/IfcGeomWires.cpp @@ -306,7 +306,7 @@ bool IfcGeom::Kernel::convert(const IfcSchema::IfcCompositeCurve* l, TopoDS_Wire use_radians = true; } else { // No heuristic left to prefer the one over the other, - // apparently both variants are equally succesful. + // apparently both variants are equally successful. // The curve might be composed of only straight segments. // Let's go with the wire created using radians as that // at least is a SI unit. diff --git a/src/ifcgeom_schema_agnostic/Kernel.h b/src/ifcgeom_schema_agnostic/Kernel.h index a305aa898e..01ef45cb06 100644 --- a/src/ifcgeom_schema_agnostic/Kernel.h +++ b/src/ifcgeom_schema_agnostic/Kernel.h @@ -38,12 +38,12 @@ namespace IfcGeom { // Default: 0.001m / 1mm GV_DEFLECTION_TOLERANCE, // Specifies the tolerance of the wire builder, most notably for trimmed curves - // Defailt: 0.0001m / 0.1mm + // Default: 0.0001m / 0.1mm GV_WIRE_CREATION_TOLERANCE, // Specifies the minimal area of a face to be included in an IfcConnectedFaceset // Read-only GV_MINIMAL_FACE_AREA, - // Specifies the treshold distance under which cartesian points are deemed equal + // Specifies the threshold distance under which cartesian points are deemed equal // Default: 0.00001m / 0.01mm GV_POINT_EQUALITY_TOLERANCE, // Specifies maximum number of faces for a shell to be sewed. Sewing shells diff --git a/src/ifcmax/IfcMax.cpp b/src/ifcmax/IfcMax.cpp index 28ab422882..64017f5501 100644 --- a/src/ifcmax/IfcMax.cpp +++ b/src/ifcmax/IfcMax.cpp @@ -294,7 +294,7 @@ int IFCImp::DoImport(const TCHAR *name, ImpInterface *impitfc, Interface *itfc, tri->mesh.buildNormals(); // Either use this or undefine the FACESETS_AS_COMPOUND option in IfcGeom.h to have // properly oriented normals. Using only the line below will result in a consistent - // orientation of normals accross shells, but not always oriented towards the + // orientation of normals across shells, but not always oriented towards the // outside. // tri->mesh.UnifyNormals(false); tri->mesh.BuildStripsAndEdges(); diff --git a/src/ifcopenshell-python/ifcopenshell/entity_instance.py b/src/ifcopenshell-python/ifcopenshell/entity_instance.py index bb636fcd74..3586bfa793 100644 --- a/src/ifcopenshell-python/ifcopenshell/entity_instance.py +++ b/src/ifcopenshell-python/ifcopenshell/entity_instance.py @@ -196,7 +196,7 @@ class entity_instance(object): attr_value = entity_instance.walk(is_instance, get_info_, attr_value) yield self.attribute_name(i), attr_value except BaseException: - logging.exception("unhandled exception occured setting attribute name for {}".format(self)) + logging.exception("unhandled exception occurred setting attribute name for {}".format(self)) return return_type(_()) diff --git a/src/ifcparse/IfcWrite.h b/src/ifcparse/IfcWrite.h index 5c5bc8f775..c0a8c2598e 100644 --- a/src/ifcparse/IfcWrite.h +++ b/src/ifcparse/IfcWrite.h @@ -80,7 +80,7 @@ namespace IfcWrite { boost::dynamic_bitset<>, // An enumeration argument, e.g. .USERDEFINED. // To initialize the argument a string representation - // has to be explicitely passed of the enumeration value + // has to be explicitly passed of the enumeration value // which is stored internally as an integer. The argument // itself does not keep track of what schema enumeration // type is represented. diff --git a/src/serializers/schema_dependent/XmlSerializer.cpp b/src/serializers/schema_dependent/XmlSerializer.cpp index 7b11ca888c..bc0fa96b64 100644 --- a/src/serializers/schema_dependent/XmlSerializer.cpp +++ b/src/serializers/schema_dependent/XmlSerializer.cpp @@ -485,7 +485,7 @@ void MAKE_TYPE_NAME(XmlSerializer)::finalize() { // Layer assignments. IfcPresentationLayerAssignments don't have GUIDs (only optional Identifier) // so use names as the IDs and only insert those with unique names. In case of possible duplicate names/IDs - // the first IfcPresentationLayerAssignment occurence takes precedence. + // the first IfcPresentationLayerAssignment occurrence takes precedence. std::set layer_names; IfcSchema::IfcPresentationLayerAssignment::list::ptr layer_assignments = file->instances_by_type(); for (IfcSchema::IfcPresentationLayerAssignment::list::it it = layer_assignments->begin(); it != layer_assignments->end(); ++it) { diff --git a/win/build-deps.cmd b/win/build-deps.cmd index 43e59b4174..dbfbaeafb9 100644 --- a/win/build-deps.cmd +++ b/win/build-deps.cmd @@ -145,7 +145,7 @@ echo. cd "%DEPS_DIR%" -:: Note all of the depedencies have approriate label so that user can easily skip something if wanted +:: Note all of the dependencies have appropriate label so that user can easily skip something if wanted :: by modifying this file and using goto. :Boost :: NOTE Boost < 1.64 doesn't work without tricks if the user has only VS 2017 installed and no earlier versions. diff --git a/win/readme.md b/win/readme.md index 70c7b93e14..e8e4c5107a 100644 --- a/win/readme.md +++ b/win/readme.md @@ -15,7 +15,7 @@ Usage Instructions Building using MSYS is very similar to using the MSVC batch files, but instead the shell scripts are used. Note that the MSYS support is currently a bit experimental. It is advised to check out the contents of the shell scripts before using them. Note that contrary to MSVC, with MSYS all of the dependencies are not -built or used as static libaries. Currently Release build is used for all libraries. +built or used as static libraries. Currently Release build is used for all libraries. ### MSVC Execute `build-deps.cmd` to fetch, build and install the dependencies. The batch file will print the requirements for @@ -28,7 +28,7 @@ deduced from the MSVC environment variables. User-friendly VS generator shorthan `vs2013-x86` or `vs2015-x64`, and these are converted to the appropriate CMake ones by the scripts. A build type (`Build`, `Rebuild`, or `Clean`, defaults to `Build`) can be provided as `%3`. See `vs-cfg.cmd` if you wish to change the defaults. The batch file will create `deps\` and `deps-vs--installed\` directories to the -project root. Debug and release builds of the depedencies can co-exist by simply running +project root. Debug and release builds of the dependencies can co-exist by simply running ``` > build-deps.cmd Debug > build-deps.cmd