mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-18 11:20:21 +00:00
Merge branch 'master' into tridify_ifcgeom_dll
# Conflicts: # cmake/CMakeLists.txt
This commit is contained in:
@@ -73,6 +73,8 @@ IF(PYTHONINTERP_FOUND)
|
||||
"${CMAKE_BINARY_DIR}/ifcwrap/ifcopenshell_wrapper.py"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/../ifcopenshell-python/ifcopenshell/__init__.py"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/../ifcopenshell-python/ifcopenshell/guid.py"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/../ifcopenshell-python/ifcopenshell/file.py"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/../ifcopenshell-python/ifcopenshell/entity_instance.py"
|
||||
DESTINATION "${python_package_dir}/ifcopenshell")
|
||||
INSTALL(FILES
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/../ifcopenshell-python/ifcopenshell/geom/__init__.py"
|
||||
|
||||
@@ -275,6 +275,9 @@ struct ShapeRTTI : public boost::static_visitor<PyObject*>
|
||||
// First, try to find a representation based on the settings
|
||||
for (IfcSchema::IfcRepresentation::list::it it = reps->begin(); it != reps->end(); ++it) {
|
||||
IfcSchema::IfcRepresentation* rep = *it;
|
||||
if (!rep->hasRepresentationIdentifier()) {
|
||||
continue;
|
||||
}
|
||||
if (!settings.get(IfcGeom::IteratorSettings::EXCLUDE_SOLIDS_AND_SURFACES)) {
|
||||
if (rep->RepresentationIdentifier() == "Body") {
|
||||
ifc_representation = rep;
|
||||
@@ -303,6 +306,7 @@ struct ShapeRTTI : public boost::static_visitor<PyObject*>
|
||||
context_types.insert("model");
|
||||
context_types.insert("design");
|
||||
context_types.insert("model view");
|
||||
context_types.insert("detail view");
|
||||
}
|
||||
if (settings.get(IfcGeom::IteratorSettings::INCLUDE_CURVES)) {
|
||||
context_types.insert("plan");
|
||||
|
||||
@@ -82,6 +82,10 @@ namespace IfcUtil {
|
||||
IfcEntityList::ptr traverse(IfcParse::IfcLateBoundEntity* e, int max_level=-1) {
|
||||
return $self->traverse(e, max_level);
|
||||
}
|
||||
IfcEntityList::ptr get_inverse(IfcParse::IfcLateBoundEntity* e) {
|
||||
return $self->getInverse(e->id(), IfcSchema::Type::UNDEFINED, -1);
|
||||
}
|
||||
|
||||
void write(const std::string& fn) {
|
||||
std::ofstream f(fn.c_str());
|
||||
f << (*$self);
|
||||
|
||||
Reference in New Issue
Block a user