Skip to content

Commit 2353c25

Browse files
committed
- Handle explicit attributes re-declared as derived in a subtype
- Update IfcOpenHouse to import correctly in Autodesk Autocad Architecture 2013
1 parent e56281a commit 2353c25

File tree

8 files changed

+84
-34
lines changed

8 files changed

+84
-34
lines changed

src/examples/IfcOpenHouse.cpp

Lines changed: 20 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
#include "../ifcparse/IfcHierarchyHelper.h"
3535
#include "../ifcgeom/IfcGeom.h"
3636

37-
// Some convinience typedefs and definitions.
37+
// Some convenience typedefs and definitions.
3838
typedef std::string S;
3939
typedef IfcWrite::IfcGuidHelper guid;
4040
typedef std::pair<double, double> XY;
@@ -45,8 +45,8 @@ void createGroundShape(TopoDS_Shape& shape);
4545

4646
int main(int argc, char** argv) {
4747

48-
// The IfcHierarchyHelper is a subclass of the regular IfcFile that provides several convience
49-
// functions for working with geometry in IFC files.
48+
// The IfcHierarchyHelper is a subclass of the regular IfcFile that provides several
49+
// convenience functions for working with geometry in IFC files.
5050
IfcHierarchyHelper file;
5151

5252
// Start by adding a wall to the file, initially leaving most attributes blank.
@@ -66,7 +66,7 @@ int main(int argc, char** argv) {
6666
// structure: IfcProject > IfcSite > IfcBuilding > IfcBuildingStorey > IfcWall
6767

6868
// Lateron changing the name of the IfcProject can be done by obtaining a reference to the
69-
// project, which was automatically created. since we know it exists.
69+
// project, which has been created automatically.
7070
file.getSingle<Ifc2x3::IfcProject>()->setName("IfcOpenHouse");
7171

7272
// An IfcOwnerHistory has been initialized as well, which should be assigned to the wall.
@@ -234,7 +234,7 @@ int main(int argc, char** argv) {
234234
// can be a composition of multiple solids. The following door will be composed of four boxes
235235
// which constitute the door and its frame.
236236
Ifc2x3::IfcDoor* door = new Ifc2x3::IfcDoor(guid(), file.getSingle<Ifc2x3::IfcOwnerHistory>(), null, null, null,
237-
file.addLocalPlacement(4800, 1600, 0, 0, 0, 1, 0, 1, 0), 0, null, 2120, 1000);
237+
file.addLocalPlacement(4800, 1600, 0, 0, 0, 1, 0, 1, 0), 0, null, 2200, 1000);
238238
door->setRepresentation(file.addBox(80, 80, 2120, 0, file.addPlacement3d(460, 0, 0)));
239239
Ifc2x3::IfcRepresentation::list door_representations = door->Representation()->Representations();
240240
Ifc2x3::IfcShapeRepresentation* door_body = 0;
@@ -258,6 +258,10 @@ int main(int argc, char** argv) {
258258
// only the plate will have a transparent material assigned.
259259

260260
// The window frame will consists of four seperate beams.
261+
// AutoCAD Architecture will create an internal window type for the IfcWindow created.
262+
// Therefore the OverallWidth and OverallHeight of the window attributes will need to
263+
// match the bounding box of the representation. Furthermore, the window placement needs
264+
// to align with the lowerleft corner of the constituent parts.
261265
Ifc2x3::IfcProductDefinitionShape::list frame_representations (new IfcTemplatedEntityList<Ifc2x3::IfcProductDefinitionShape>());
262266
frame_representations->push(file.addBox(1860, 90, 90));
263267
frame_representations->push(*frame_representations->begin()); // Add a reference to the shape created above
@@ -277,18 +281,18 @@ int main(int argc, char** argv) {
277281
// This window will be placed at five locations within the building. A list of placements is
278282
// created and is iterated over to create all window instances.
279283
Ifc2x3::IfcLocalPlacement::list window_placements (new IfcTemplatedEntityList<Ifc2x3::IfcLocalPlacement>());
280-
window_placements->push(file.addLocalPlacement(2*-1770-430, 0, 400));
281-
window_placements->push(file.addLocalPlacement( -1770-430, 0, 400));
282-
window_placements->push(file.addLocalPlacement( -430, 0, 400));
283-
window_placements->push(file.addLocalPlacement( 3000, 0, 400));
284-
window_placements->push(file.addLocalPlacement( -4855, 885, 400, 0, 0, 1, 0, 1, 0));
284+
window_placements->push(file.addLocalPlacement(2*-1770-430-930, -45, 400));
285+
window_placements->push(file.addLocalPlacement( -1770-430-930, -45, 400));
286+
window_placements->push(file.addLocalPlacement( -430-930, -45, 400));
287+
window_placements->push(file.addLocalPlacement( 3000-930, -45, 400));
288+
window_placements->push(file.addLocalPlacement( -4855+45, 885-930, 400, 0, 0, 1, 0, 1, 0));
285289

286290
for (Ifc2x3::IfcLocalPlacement::it it = window_placements->begin(); it != window_placements->end(); ++it) {
287291

288292
// Create the window at the current location
289293
Ifc2x3::IfcLocalPlacement* place = *it;
290294
Ifc2x3::IfcWindow* window = new Ifc2x3::IfcWindow(guid(), file.getSingle<Ifc2x3::IfcOwnerHistory>(),
291-
null, null, null, place, 0, null, 2000, 1600);
295+
null, null, null, place, 0, null, 1600, 1860);
292296
file.addBuildingProduct(window);
293297

294298
// Initalize a list of parts for the window to be composed of
@@ -297,10 +301,10 @@ int main(int argc, char** argv) {
297301
// The placements for the beams are not shared accross the different windows because every
298302
// beam is placed relative to its parent window entity.
299303
Ifc2x3::IfcLocalPlacement::list frame_placements (new IfcTemplatedEntityList<Ifc2x3::IfcLocalPlacement>());
300-
frame_placements->push(file.addLocalPlacement());
301-
frame_placements->push(file.addLocalPlacement( 0, 0, 1510));
302-
frame_placements->push(file.addLocalPlacement(-885, 0, 90));
303-
frame_placements->push(file.addLocalPlacement( 885, 0, 90));
304+
frame_placements->push(file.addLocalPlacement( 930,45));
305+
frame_placements->push(file.addLocalPlacement( 930, 45, 1510));
306+
frame_placements->push(file.addLocalPlacement(-885+930, 45, 90));
307+
frame_placements->push(file.addLocalPlacement( 885+930, 45, 90));
304308

305309
// Now iterate over the placements and representations of the beam and add them to list of parts
306310
Ifc2x3::IfcLocalPlacement::it frame_placement;
@@ -318,7 +322,7 @@ int main(int argc, char** argv) {
318322

319323
// Add the glass plate to the list of parts
320324
Ifc2x3::IfcPlate* glass_part = new Ifc2x3::IfcPlate(guid(), file.getSingle<Ifc2x3::IfcOwnerHistory>(), null,
321-
null, null, file.addLocalPlacement(0, 0, 90), file.addBox(1680, 10, 1420), null);
325+
null, null, file.addLocalPlacement(930, 45, 90), file.addBox(1680, 10, 1420), null);
322326
file.AddEntity(glass_part);
323327
window_parts->push(glass_part);
324328
file.relatePlacements(window, glass_part);

src/ifcexpressparser/IfcExpressParser.py

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -348,18 +348,22 @@ def __str__(self):
348348
return s
349349
class Classdef:
350350
def __init__(self,l):
351-
self.class_name, self.parent_class, self.arguments, self.inverse = l
351+
self.class_name, self.parent_class, self.arguments, derive, self.inverse = l
352352
self.arguments.class_name = self.class_name
353353
self.arguments.parent_class = self.parent_class
354354
entity_names.add(self.class_name)
355355
parent_relations[self.class_name] = self.parent_class
356356
argument_count[self.class_name] = len(self.arguments)
357357
entity_map[self.class_name] = self
358-
def get_constructor_args(self):
359-
s = entity_map[self.parent_class].get_constructor_args() if self.parent_class else []
358+
# For derived attributes only a reference is kepts to overridden attributes in parent classes
359+
self.derive = [x[0].split('.')[-1] for x in derive[1] if x[0].startswith("SELF\\")] if derive else []
360+
def list_constructor_args(self):
361+
s = entity_map[self.parent_class].list_constructor_args() if self.parent_class else []
360362
i = len(s) + 1
361-
s += ["%s v%d_%s"%(a.type_str(),b+i,a.name) for a,b in zip(self.arguments.l,range(len(self.arguments)))]
363+
s += [(a.type_str(),b+i,a.name) for a,b in zip(self.arguments.l,range(len(self.arguments)))]
362364
return s
365+
def get_constructor_args(self):
366+
return ["%s v%d_%s"%x for x in self.list_constructor_args() if x[2] not in self.get_derived()]
363367
def get_constructor_implementation(self):
364368
s = entity_map[self.parent_class].get_constructor_implementation() if self.parent_class else []
365369
i = len(s) + 1
@@ -378,10 +382,13 @@ def get_constructor_implementation(self):
378382
else:
379383
impl = "e->setArgument(%d,(%sv%d_%s)%s)"%(b+i-1,dereference,b+i,a.name,generalize)
380384
if use_boost_optional:
381-
s.append("if (v%d_%s) { %s; } else { e->setArgument(%d); } "%(b+i,a.name,impl,b+i-1))
382-
else: s.append(impl)
385+
s.append(["if (v%d_%s) { %s; } else { e->setArgument(%d); } "%(b+i,a.name,impl,b+i-1),a.name,i-1])
386+
else: s.append([impl,a.name,i-1])
383387
b += 1
384-
return s#"; ".join(s)
388+
return s
389+
def get_derived(self):
390+
s = entity_map[self.parent_class].get_derived() if self.parent_class else []
391+
return s + self.derive
385392
def __str__(self):
386393
self.constructor_args_list = self.get_constructor_args()
387394
self.constructor_args = ", ".join(self.constructor_args_list)
@@ -403,7 +410,7 @@ def __str__(self):
403410
)
404411
elif generator_mode == 'SOURCE':
405412
self.arguments.argstart = argument_start(self.class_name)
406-
self.constructor_implementation = "; ".join(self.get_constructor_implementation())
413+
self.constructor_implementation = "; ".join([x[0] if x[1] not in self.get_derived() else "e->setArgumentDerived(%d)"%x[2] for x in self.get_constructor_implementation()])
407414
return (("\n// Function implementations for %(class_name)s"+str(self.arguments)+str(self.inverse)+
408415
("\nbool %(class_name)s::is(Type::Enum v) const { return v == Type::%(class_name)s; }" if self.parent_class is None else
409416
"\nbool %(class_name)s::is(Type::Enum v) const { return v == Type::%(class_name)s || %(parent_class)s::is(v); }")+
@@ -462,9 +469,9 @@ def __str__(self):
462469
unique = skip(a('UNIQUE') + many(unique_value))
463470
inverse_def = s + x(':') + (array|single) + x('FOR') + s + x(';') >> inverse_type
464471
inverse = maybe(x('INVERSE') + many( inverse_def )) >> inverse_list
465-
derive = skip(a('DERIVE') + many(clause))
472+
derive = a('DERIVE') + many(clause)
466473

467-
entity = entity_start + arguments + skip(maybe(unique)) + skip(maybe(derive)) + inverse + skip(maybe(where)) + entity_end >> Classdef
474+
entity = entity_start + arguments + skip(maybe(unique)) + maybe(derive) + inverse + skip(maybe(where)) + entity_end >> Classdef
468475

469476
schema = skip(a('SCHEMA')) + s + x(';')
470477

src/ifcparse/Ifc2x3.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7539,7 +7539,7 @@ bool IfcGeometricRepresentationSubContext::is(Type::Enum v) const { return v ==
75397539
Type::Enum IfcGeometricRepresentationSubContext::type() const { return Type::IfcGeometricRepresentationSubContext; }
75407540
Type::Enum IfcGeometricRepresentationSubContext::Class() { return Type::IfcGeometricRepresentationSubContext; }
75417541
IfcGeometricRepresentationSubContext::IfcGeometricRepresentationSubContext(IfcAbstractEntityPtr e) { if (!is(Type::IfcGeometricRepresentationSubContext)) throw IfcException("Unable to find find keyword in schema"); entity = e; }
7542-
IfcGeometricRepresentationSubContext::IfcGeometricRepresentationSubContext(optional< IfcLabel > v1_ContextIdentifier, optional< IfcLabel > v2_ContextType, IfcDimensionCount v3_CoordinateSpaceDimension, optional< double > v4_Precision, IfcAxis2Placement v5_WorldCoordinateSystem, IfcDirection* v6_TrueNorth, IfcGeometricRepresentationContext* v7_ParentContext, optional< IfcPositiveRatioMeasure > v8_TargetScale, IfcGeometricProjectionEnum::IfcGeometricProjectionEnum v9_TargetView, optional< IfcLabel > v10_UserDefinedTargetView) { IfcWritableEntity* e = new IfcWritableEntity(Class()); if (v1_ContextIdentifier) { e->setArgument(0,(*v1_ContextIdentifier)); } else { e->setArgument(0); } ; if (v2_ContextType) { e->setArgument(1,(*v2_ContextType)); } else { e->setArgument(1); } ; e->setArgument(2,(v3_CoordinateSpaceDimension)); if (v4_Precision) { e->setArgument(3,(*v4_Precision)); } else { e->setArgument(3); } ; e->setArgument(4,(v5_WorldCoordinateSystem)); e->setArgument(5,(v6_TrueNorth)); e->setArgument(6,(v7_ParentContext)); if (v8_TargetScale) { e->setArgument(7,(*v8_TargetScale)); } else { e->setArgument(7); } ; e->setArgument(8,v9_TargetView,IfcGeometricProjectionEnum::ToString(v9_TargetView)); if (v10_UserDefinedTargetView) { e->setArgument(9,(*v10_UserDefinedTargetView)); } else { e->setArgument(9); } ; entity = e; EntityBuffer::Add(this); }
7542+
IfcGeometricRepresentationSubContext::IfcGeometricRepresentationSubContext(optional< IfcLabel > v1_ContextIdentifier, optional< IfcLabel > v2_ContextType, IfcGeometricRepresentationContext* v7_ParentContext, optional< IfcPositiveRatioMeasure > v8_TargetScale, IfcGeometricProjectionEnum::IfcGeometricProjectionEnum v9_TargetView, optional< IfcLabel > v10_UserDefinedTargetView) { IfcWritableEntity* e = new IfcWritableEntity(Class()); if (v1_ContextIdentifier) { e->setArgument(0,(*v1_ContextIdentifier)); } else { e->setArgument(0); } ; if (v2_ContextType) { e->setArgument(1,(*v2_ContextType)); } else { e->setArgument(1); } ; e->setArgumentDerived(2); e->setArgumentDerived(2); e->setArgumentDerived(2); e->setArgumentDerived(2); e->setArgument(6,(v7_ParentContext)); if (v8_TargetScale) { e->setArgument(7,(*v8_TargetScale)); } else { e->setArgument(7); } ; e->setArgument(8,v9_TargetView,IfcGeometricProjectionEnum::ToString(v9_TargetView)); if (v10_UserDefinedTargetView) { e->setArgument(9,(*v10_UserDefinedTargetView)); } else { e->setArgument(9); } ; entity = e; EntityBuffer::Add(this); }
75437543
// Function implementations for IfcGeometricSet
75447544
SHARED_PTR< IfcTemplatedEntityList< IfcAbstractSelect > > IfcGeometricSet::Elements() { RETURN_AS_LIST(IfcAbstractSelect,0) }
75457545
void IfcGeometricSet::setElements(SHARED_PTR< IfcTemplatedEntityList< IfcAbstractSelect > > v) { if ( ! entity->isWritable() ) { entity = new IfcWritableEntity(entity); } ((IfcWritableEntity*)entity)->setArgument(0,v->generalize()); }
@@ -8405,7 +8405,7 @@ bool IfcOrientedEdge::is(Type::Enum v) const { return v == Type::IfcOrientedEdge
84058405
Type::Enum IfcOrientedEdge::type() const { return Type::IfcOrientedEdge; }
84068406
Type::Enum IfcOrientedEdge::Class() { return Type::IfcOrientedEdge; }
84078407
IfcOrientedEdge::IfcOrientedEdge(IfcAbstractEntityPtr e) { if (!is(Type::IfcOrientedEdge)) throw IfcException("Unable to find find keyword in schema"); entity = e; }
8408-
IfcOrientedEdge::IfcOrientedEdge(IfcVertex* v1_EdgeStart, IfcVertex* v2_EdgeEnd, IfcEdge* v3_EdgeElement, bool v4_Orientation) { IfcWritableEntity* e = new IfcWritableEntity(Class()); e->setArgument(0,(v1_EdgeStart)); e->setArgument(1,(v2_EdgeEnd)); e->setArgument(2,(v3_EdgeElement)); e->setArgument(3,(v4_Orientation)); entity = e; EntityBuffer::Add(this); }
8408+
IfcOrientedEdge::IfcOrientedEdge(IfcEdge* v3_EdgeElement, bool v4_Orientation) { IfcWritableEntity* e = new IfcWritableEntity(Class()); e->setArgumentDerived(0); e->setArgumentDerived(0); e->setArgument(2,(v3_EdgeElement)); e->setArgument(3,(v4_Orientation)); entity = e; EntityBuffer::Add(this); }
84098409
// Function implementations for IfcOutletType
84108410
IfcOutletTypeEnum::IfcOutletTypeEnum IfcOutletType::PredefinedType() { return IfcOutletTypeEnum::FromString(*entity->getArgument(9)); }
84118411
void IfcOutletType::setPredefinedType(IfcOutletTypeEnum::IfcOutletTypeEnum v) { if ( ! entity->isWritable() ) { entity = new IfcWritableEntity(entity); } ((IfcWritableEntity*)entity)->setArgument(9,v,IfcOutletTypeEnum::ToString(v)); }
@@ -10110,7 +10110,7 @@ bool IfcSIUnit::is(Type::Enum v) const { return v == Type::IfcSIUnit || IfcNamed
1011010110
Type::Enum IfcSIUnit::type() const { return Type::IfcSIUnit; }
1011110111
Type::Enum IfcSIUnit::Class() { return Type::IfcSIUnit; }
1011210112
IfcSIUnit::IfcSIUnit(IfcAbstractEntityPtr e) { if (!is(Type::IfcSIUnit)) throw IfcException("Unable to find find keyword in schema"); entity = e; }
10113-
IfcSIUnit::IfcSIUnit(IfcDimensionalExponents* v1_Dimensions, IfcUnitEnum::IfcUnitEnum v2_UnitType, optional< IfcSIPrefix::IfcSIPrefix > v3_Prefix, IfcSIUnitName::IfcSIUnitName v4_Name) { IfcWritableEntity* e = new IfcWritableEntity(Class()); e->setArgument(0,(v1_Dimensions)); e->setArgument(1,v2_UnitType,IfcUnitEnum::ToString(v2_UnitType)); if (v3_Prefix) { e->setArgument(2,*v3_Prefix,IfcSIPrefix::ToString(*v3_Prefix)); } else { e->setArgument(2); } ; e->setArgument(3,v4_Name,IfcSIUnitName::ToString(v4_Name)); entity = e; EntityBuffer::Add(this); }
10113+
IfcSIUnit::IfcSIUnit(IfcUnitEnum::IfcUnitEnum v2_UnitType, optional< IfcSIPrefix::IfcSIPrefix > v3_Prefix, IfcSIUnitName::IfcSIUnitName v4_Name) { IfcWritableEntity* e = new IfcWritableEntity(Class()); e->setArgumentDerived(0); e->setArgument(1,v2_UnitType,IfcUnitEnum::ToString(v2_UnitType)); if (v3_Prefix) { e->setArgument(2,*v3_Prefix,IfcSIPrefix::ToString(*v3_Prefix)); } else { e->setArgument(2); } ; e->setArgument(3,v4_Name,IfcSIUnitName::ToString(v4_Name)); entity = e; EntityBuffer::Add(this); }
1011410114
// Function implementations for IfcSanitaryTerminalType
1011510115
IfcSanitaryTerminalTypeEnum::IfcSanitaryTerminalTypeEnum IfcSanitaryTerminalType::PredefinedType() { return IfcSanitaryTerminalTypeEnum::FromString(*entity->getArgument(9)); }
1011610116
void IfcSanitaryTerminalType::setPredefinedType(IfcSanitaryTerminalTypeEnum::IfcSanitaryTerminalTypeEnum v) { if ( ! entity->isWritable() ) { entity = new IfcWritableEntity(entity); } ((IfcWritableEntity*)entity)->setArgument(9,v,IfcSanitaryTerminalTypeEnum::ToString(v)); }

src/ifcparse/Ifc2x3.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9733,7 +9733,7 @@ class IfcSIUnit : public IfcNamedUnit {
97339733
Type::Enum type() const;
97349734
static Type::Enum Class();
97359735
IfcSIUnit (IfcAbstractEntityPtr e = IfcAbstractEntityPtr());
9736-
IfcSIUnit (IfcDimensionalExponents* v1_Dimensions, IfcUnitEnum::IfcUnitEnum v2_UnitType, optional< IfcSIPrefix::IfcSIPrefix > v3_Prefix, IfcSIUnitName::IfcSIUnitName v4_Name);
9736+
IfcSIUnit (IfcUnitEnum::IfcUnitEnum v2_UnitType, optional< IfcSIPrefix::IfcSIPrefix > v3_Prefix, IfcSIUnitName::IfcSIUnitName v4_Name);
97379737
typedef IfcSIUnit* ptr;
97389738
typedef SHARED_PTR< IfcTemplatedEntityList< IfcSIUnit > > list;
97399739
typedef IfcTemplatedEntityList< IfcSIUnit >::it it;
@@ -13205,7 +13205,7 @@ class IfcGeometricRepresentationSubContext : public IfcGeometricRepresentationCo
1320513205
Type::Enum type() const;
1320613206
static Type::Enum Class();
1320713207
IfcGeometricRepresentationSubContext (IfcAbstractEntityPtr e = IfcAbstractEntityPtr());
13208-
IfcGeometricRepresentationSubContext (optional< IfcLabel > v1_ContextIdentifier, optional< IfcLabel > v2_ContextType, IfcDimensionCount v3_CoordinateSpaceDimension, optional< double > v4_Precision, IfcAxis2Placement v5_WorldCoordinateSystem, IfcDirection* v6_TrueNorth, IfcGeometricRepresentationContext* v7_ParentContext, optional< IfcPositiveRatioMeasure > v8_TargetScale, IfcGeometricProjectionEnum::IfcGeometricProjectionEnum v9_TargetView, optional< IfcLabel > v10_UserDefinedTargetView);
13208+
IfcGeometricRepresentationSubContext (optional< IfcLabel > v1_ContextIdentifier, optional< IfcLabel > v2_ContextType, IfcGeometricRepresentationContext* v7_ParentContext, optional< IfcPositiveRatioMeasure > v8_TargetScale, IfcGeometricProjectionEnum::IfcGeometricProjectionEnum v9_TargetView, optional< IfcLabel > v10_UserDefinedTargetView);
1320913209
typedef IfcGeometricRepresentationSubContext* ptr;
1321013210
typedef SHARED_PTR< IfcTemplatedEntityList< IfcGeometricRepresentationSubContext > > list;
1321113211
typedef IfcTemplatedEntityList< IfcGeometricRepresentationSubContext >::it it;
@@ -14111,7 +14111,7 @@ class IfcOrientedEdge : public IfcEdge {
1411114111
Type::Enum type() const;
1411214112
static Type::Enum Class();
1411314113
IfcOrientedEdge (IfcAbstractEntityPtr e = IfcAbstractEntityPtr());
14114-
IfcOrientedEdge (IfcVertex* v1_EdgeStart, IfcVertex* v2_EdgeEnd, IfcEdge* v3_EdgeElement, bool v4_Orientation);
14114+
IfcOrientedEdge (IfcEdge* v3_EdgeElement, bool v4_Orientation);
1411514115
typedef IfcOrientedEdge* ptr;
1411614116
typedef SHARED_PTR< IfcTemplatedEntityList< IfcOrientedEdge > > list;
1411714117
typedef IfcTemplatedEntityList< IfcOrientedEdge >::it it;

src/ifcparse/IfcHierarchyHelper.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,9 +98,9 @@ Ifc2x3::IfcProject* IfcHierarchyHelper::addProject(Ifc2x3::IfcOwnerHistory* owne
9898

9999
IfcEntities units (new IfcEntityList());
100100
Ifc2x3::IfcDimensionalExponents* dimexp = new Ifc2x3::IfcDimensionalExponents(0, 0, 0, 0, 0, 0, 0);
101-
Ifc2x3::IfcSIUnit* unit1 = new Ifc2x3::IfcSIUnit(dimexp, Ifc2x3::IfcUnitEnum::IfcUnit_LENGTHUNIT,
101+
Ifc2x3::IfcSIUnit* unit1 = new Ifc2x3::IfcSIUnit(Ifc2x3::IfcUnitEnum::IfcUnit_LENGTHUNIT,
102102
Ifc2x3::IfcSIPrefix::IfcSIPrefix_MILLI, Ifc2x3::IfcSIUnitName::IfcSIUnitName_METRE);
103-
Ifc2x3::IfcSIUnit* unit2a = new Ifc2x3::IfcSIUnit(dimexp, Ifc2x3::IfcUnitEnum::IfcUnit_PLANEANGLEUNIT,
103+
Ifc2x3::IfcSIUnit* unit2a = new Ifc2x3::IfcSIUnit(Ifc2x3::IfcUnitEnum::IfcUnit_PLANEANGLEUNIT,
104104
boost::none, Ifc2x3::IfcSIUnitName::IfcSIUnitName_RADIAN);
105105
Ifc2x3::IfcMeasureWithUnit* unit2b = new Ifc2x3::IfcMeasureWithUnit(
106106
new IfcWrite::IfcSelectHelper(0.017453293, Ifc2x3::Type::IfcPlaneAngleMeasure), unit2a);

0 commit comments

Comments
 (0)