mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-24 23:29:59 +00:00
1) Implement a breadth-first traversal of forward references 2) implement entity instance deletion from a file 3) recursively copy entity instances to another file
This commit is contained in:
@@ -100,8 +100,8 @@
|
||||
#include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
|
||||
#include <TopTools_ListIteratorOfListOfShape.hxx>
|
||||
|
||||
#include "../ifcparse/IfcSIPrefix.h"
|
||||
#include "../ifcgeom/IfcGeom.h"
|
||||
#include "../ifcgeom/IfcGeomUtils.h"
|
||||
|
||||
bool IfcGeom::Kernel::create_solid_from_compound(const TopoDS_Shape& compound, TopoDS_Shape& shape) {
|
||||
BRepOffsetAPI_Sewing builder;
|
||||
@@ -1015,7 +1015,7 @@ std::pair<std::string, double> IfcGeom::Kernel::initializeUnits(IfcSchema::IfcUn
|
||||
}
|
||||
if ( unit ) {
|
||||
if ( unit->hasPrefix() ) {
|
||||
value *= IfcGeom::Utils::UnitPrefixToValue(unit->Prefix());
|
||||
value *= IfcParse::IfcSIPrefixToValue(unit->Prefix());
|
||||
}
|
||||
IfcSchema::IfcUnitEnum::IfcUnitEnum type = unit->UnitType();
|
||||
if ( type == IfcSchema::IfcUnitEnum::IfcUnit_LENGTHUNIT ) {
|
||||
|
||||
@@ -1,42 +0,0 @@
|
||||
/********************************************************************************
|
||||
* *
|
||||
* This file is part of IfcOpenShell. *
|
||||
* *
|
||||
* IfcOpenShell is free software: you can redistribute it and/or modify *
|
||||
* it under the terms of the Lesser GNU General Public License as published by *
|
||||
* the Free Software Foundation, either version 3.0 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
* IfcOpenShell is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* Lesser GNU General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the Lesser GNU General Public License *
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
|
||||
* *
|
||||
********************************************************************************/
|
||||
|
||||
#include "../ifcparse/IfcParse.h"
|
||||
|
||||
#include "IfcGeomUtils.h"
|
||||
|
||||
double IfcGeom::Utils::UnitPrefixToValue( IfcSchema::IfcSIPrefix::IfcSIPrefix v ) {
|
||||
if ( v == IfcSchema::IfcSIPrefix::IfcSIPrefix_EXA ) return 1.e18;
|
||||
else if ( v == IfcSchema::IfcSIPrefix::IfcSIPrefix_PETA ) return 1.e15;
|
||||
else if ( v == IfcSchema::IfcSIPrefix::IfcSIPrefix_TERA ) return 1.e12;
|
||||
else if ( v == IfcSchema::IfcSIPrefix::IfcSIPrefix_GIGA ) return 1.e9;
|
||||
else if ( v == IfcSchema::IfcSIPrefix::IfcSIPrefix_MEGA ) return 1.e6;
|
||||
else if ( v == IfcSchema::IfcSIPrefix::IfcSIPrefix_KILO ) return 1.e3;
|
||||
else if ( v == IfcSchema::IfcSIPrefix::IfcSIPrefix_HECTO ) return 1.e2;
|
||||
else if ( v == IfcSchema::IfcSIPrefix::IfcSIPrefix_DECA ) return 1.;
|
||||
else if ( v == IfcSchema::IfcSIPrefix::IfcSIPrefix_DECI ) return 1.e-1;
|
||||
else if ( v == IfcSchema::IfcSIPrefix::IfcSIPrefix_CENTI ) return 1.e-2;
|
||||
else if ( v == IfcSchema::IfcSIPrefix::IfcSIPrefix_MILLI ) return 1.e-3;
|
||||
else if ( v == IfcSchema::IfcSIPrefix::IfcSIPrefix_MICRO ) return 1.e-6;
|
||||
else if ( v == IfcSchema::IfcSIPrefix::IfcSIPrefix_NANO ) return 1.e-9;
|
||||
else if ( v == IfcSchema::IfcSIPrefix::IfcSIPrefix_PICO ) return 1.e-12;
|
||||
else if ( v == IfcSchema::IfcSIPrefix::IfcSIPrefix_FEMTO ) return 1.e-15;
|
||||
else if ( v == IfcSchema::IfcSIPrefix::IfcSIPrefix_ATTO ) return 1.e-18;
|
||||
else return 1.f;
|
||||
}
|
||||
@@ -1,30 +0,0 @@
|
||||
/********************************************************************************
|
||||
* *
|
||||
* This file is part of IfcOpenShell. *
|
||||
* *
|
||||
* IfcOpenShell is free software: you can redistribute it and/or modify *
|
||||
* it under the terms of the Lesser GNU General Public License as published by *
|
||||
* the Free Software Foundation, either version 3.0 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
* IfcOpenShell is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* Lesser GNU General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the Lesser GNU General Public License *
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
|
||||
* *
|
||||
********************************************************************************/
|
||||
|
||||
#ifndef IFCGEOMUTILS_H
|
||||
#define IFCGEOMUTILS_H
|
||||
|
||||
namespace IfcGeom {
|
||||
|
||||
namespace Utils {
|
||||
double UnitPrefixToValue(IfcSchema::IfcSIPrefix::IfcSIPrefix v);
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user