Skip to content

Commit df9958d

Browse files
changed to Qt 5.3, OSG 3.2.1rc3
1 parent eff53bd commit df9958d

18 files changed

+177
-128
lines changed

Carve/Carve.vcxproj

+9-9
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
2+
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
33
<ItemGroup Label="ProjectConfigurations">
44
<ProjectConfiguration Include="Debug|Win32">
55
<Configuration>Debug</Configuration>
@@ -42,54 +42,54 @@
4242
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
4343
<ConfigurationType>StaticLibrary</ConfigurationType>
4444
<UseDebugLibraries>true</UseDebugLibraries>
45-
<PlatformToolset>v110</PlatformToolset>
45+
<PlatformToolset>v120</PlatformToolset>
4646
<CharacterSet>Unicode</CharacterSet>
4747
</PropertyGroup>
4848
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
4949
<ConfigurationType>StaticLibrary</ConfigurationType>
5050
<UseDebugLibraries>true</UseDebugLibraries>
51-
<PlatformToolset>v110</PlatformToolset>
51+
<PlatformToolset>v120</PlatformToolset>
5252
<CharacterSet>MultiByte</CharacterSet>
5353
</PropertyGroup>
5454
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
5555
<ConfigurationType>Application</ConfigurationType>
5656
<UseDebugLibraries>false</UseDebugLibraries>
57-
<PlatformToolset>v110</PlatformToolset>
57+
<PlatformToolset>v120</PlatformToolset>
5858
<WholeProgramOptimization>true</WholeProgramOptimization>
5959
<CharacterSet>MultiByte</CharacterSet>
6060
</PropertyGroup>
6161
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithDebugInfo|Win32'" Label="Configuration">
6262
<ConfigurationType>Application</ConfigurationType>
6363
<UseDebugLibraries>false</UseDebugLibraries>
64-
<PlatformToolset>v110</PlatformToolset>
64+
<PlatformToolset>v120</PlatformToolset>
6565
<WholeProgramOptimization>true</WholeProgramOptimization>
6666
<CharacterSet>MultiByte</CharacterSet>
6767
</PropertyGroup>
6868
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseNoOptimization|Win32'" Label="Configuration">
6969
<ConfigurationType>Application</ConfigurationType>
7070
<UseDebugLibraries>false</UseDebugLibraries>
71-
<PlatformToolset>v110</PlatformToolset>
71+
<PlatformToolset>v120</PlatformToolset>
7272
<WholeProgramOptimization>true</WholeProgramOptimization>
7373
<CharacterSet>MultiByte</CharacterSet>
7474
</PropertyGroup>
7575
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
7676
<ConfigurationType>StaticLibrary</ConfigurationType>
7777
<UseDebugLibraries>false</UseDebugLibraries>
78-
<PlatformToolset>v110</PlatformToolset>
78+
<PlatformToolset>v120</PlatformToolset>
7979
<WholeProgramOptimization>true</WholeProgramOptimization>
8080
<CharacterSet>Unicode</CharacterSet>
8181
</PropertyGroup>
8282
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithDebugInfo|x64'" Label="Configuration">
8383
<ConfigurationType>StaticLibrary</ConfigurationType>
8484
<UseDebugLibraries>false</UseDebugLibraries>
85-
<PlatformToolset>v110</PlatformToolset>
85+
<PlatformToolset>v120</PlatformToolset>
8686
<WholeProgramOptimization>true</WholeProgramOptimization>
8787
<CharacterSet>Unicode</CharacterSet>
8888
</PropertyGroup>
8989
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseNoOptimization|x64'" Label="Configuration">
9090
<ConfigurationType>StaticLibrary</ConfigurationType>
9191
<UseDebugLibraries>false</UseDebugLibraries>
92-
<PlatformToolset>v110</PlatformToolset>
92+
<PlatformToolset>v120</PlatformToolset>
9393
<WholeProgramOptimization>true</WholeProgramOptimization>
9494
<CharacterSet>Unicode</CharacterSet>
9595
</PropertyGroup>

IfcPlusPlus.sln

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
Microsoft Visual Studio Solution File, Format Version 12.00
2-
# Visual Studio 2012
2+
# Visual Studio 2013
3+
VisualStudioVersion = 12.0.30501.0
4+
MinimumVisualStudioVersion = 10.0.40219.1
35
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Carve", "Carve\Carve.vcxproj", "{B3C35BB8-0E24-4F96-8D1C-47F777EF9EA1}"
46
EndProject
57
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "IfcPlusPlus", "IfcPlusPlus\IfcPlusPlus.vcxproj", "{9700AD93-4F6B-484A-BA34-FC4C97E5C645}"
@@ -117,7 +119,7 @@ Global
117119
HideSolutionNode = FALSE
118120
EndGlobalSection
119121
GlobalSection(ExtensibilityGlobals) = postSolution
120-
Qt5Version = 5.2.0
122+
Qt5Version = msvc2012_64_opengl
121123
QtVersion = 4.7.4
122124
EndGlobalSection
123125
EndGlobal

IfcPlusPlus.v11.suo

-36 KB
Binary file not shown.

IfcPlusPlus/IfcPlusPlus.vcxproj

+9-9
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
2+
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
33
<ItemGroup Label="ProjectConfigurations">
44
<ProjectConfiguration Include="Debug|Win32">
55
<Configuration>Debug</Configuration>
@@ -42,54 +42,54 @@
4242
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
4343
<ConfigurationType>StaticLibrary</ConfigurationType>
4444
<UseDebugLibraries>true</UseDebugLibraries>
45-
<PlatformToolset>v110</PlatformToolset>
45+
<PlatformToolset>v120</PlatformToolset>
4646
<CharacterSet>Unicode</CharacterSet>
4747
</PropertyGroup>
4848
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
4949
<ConfigurationType>StaticLibrary</ConfigurationType>
5050
<UseDebugLibraries>true</UseDebugLibraries>
51-
<PlatformToolset>v110</PlatformToolset>
51+
<PlatformToolset>v120</PlatformToolset>
5252
<CharacterSet>MultiByte</CharacterSet>
5353
</PropertyGroup>
5454
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
5555
<ConfigurationType>Application</ConfigurationType>
5656
<UseDebugLibraries>false</UseDebugLibraries>
57-
<PlatformToolset>v110</PlatformToolset>
57+
<PlatformToolset>v120</PlatformToolset>
5858
<WholeProgramOptimization>true</WholeProgramOptimization>
5959
<CharacterSet>MultiByte</CharacterSet>
6060
</PropertyGroup>
6161
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithDebugInfo|Win32'" Label="Configuration">
6262
<ConfigurationType>Application</ConfigurationType>
6363
<UseDebugLibraries>false</UseDebugLibraries>
64-
<PlatformToolset>v110</PlatformToolset>
64+
<PlatformToolset>v120</PlatformToolset>
6565
<WholeProgramOptimization>true</WholeProgramOptimization>
6666
<CharacterSet>MultiByte</CharacterSet>
6767
</PropertyGroup>
6868
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseNoOptimization|Win32'" Label="Configuration">
6969
<ConfigurationType>Application</ConfigurationType>
7070
<UseDebugLibraries>false</UseDebugLibraries>
71-
<PlatformToolset>v110</PlatformToolset>
71+
<PlatformToolset>v120</PlatformToolset>
7272
<WholeProgramOptimization>true</WholeProgramOptimization>
7373
<CharacterSet>MultiByte</CharacterSet>
7474
</PropertyGroup>
7575
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
7676
<ConfigurationType>StaticLibrary</ConfigurationType>
7777
<UseDebugLibraries>false</UseDebugLibraries>
78-
<PlatformToolset>v110</PlatformToolset>
78+
<PlatformToolset>v120</PlatformToolset>
7979
<WholeProgramOptimization>true</WholeProgramOptimization>
8080
<CharacterSet>Unicode</CharacterSet>
8181
</PropertyGroup>
8282
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithDebugInfo|x64'" Label="Configuration">
8383
<ConfigurationType>StaticLibrary</ConfigurationType>
8484
<UseDebugLibraries>false</UseDebugLibraries>
85-
<PlatformToolset>v110</PlatformToolset>
85+
<PlatformToolset>v120</PlatformToolset>
8686
<WholeProgramOptimization>true</WholeProgramOptimization>
8787
<CharacterSet>Unicode</CharacterSet>
8888
</PropertyGroup>
8989
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseNoOptimization|x64'" Label="Configuration">
9090
<ConfigurationType>StaticLibrary</ConfigurationType>
9191
<UseDebugLibraries>false</UseDebugLibraries>
92-
<PlatformToolset>v110</PlatformToolset>
92+
<PlatformToolset>v120</PlatformToolset>
9393
<WholeProgramOptimization>true</WholeProgramOptimization>
9494
<CharacterSet>Unicode</CharacterSet>
9595
</PropertyGroup>

IfcPlusPlus/src/ifcpp/reader/IfcStepReader.cpp

+4
Original file line numberDiff line numberDiff line change
@@ -866,6 +866,10 @@ void applyBackwardCompatibility( shared_ptr<IfcPPModel>& ifc_model, IfcPPEntityE
866866
case IFCPROPERTYSINGLEVALUE:
867867
while( args.size() < 4 ){ args.push_back( "$" ); }
868868
break;
869+
case IFCPROPERTYTABLEVALUE:
870+
while (args.size() < 8){ args.push_back("$"); }
871+
break;
872+
869873

870874
// Q
871875
case IFCQUANTITYAREA:

IfcPlusPlusGeometry/CMakeLists.txt

+10-10
Original file line numberDiff line numberDiff line change
@@ -87,15 +87,15 @@ LINK_DIRECTORIES (${LINK_DIRECTORIES} ${CARVE_BINARY_DIR}/common)
8787

8888
ADD_LIBRARY(IfcPlusPlusGeometry SHARED ${IFCPPGEOMETRY_HEADER_FILES} ${IFCPPGEOMETRY_SOURCE_FILES})
8989

90-
#TARGET_LINK_LIBRARIES( IfcPlusPlusGeometry carve carve_misc)
91-
#TARGET_LINK_LIBRARIES( IfcPlusPlusGeometry IfcPlusPlus)
92-
#TARGET_LINK_LIBRARIES( IfcPlusPlusGeometry ${OPENTHREADS_LIBRARY} )
93-
#TARGET_LINK_LIBRARIES( IfcPlusPlusGeometry ${OSG_LIBRARY} )
94-
#TARGET_LINK_LIBRARIES( IfcPlusPlusGeometry ${OSGDB_LIBRARY} )
95-
#TARGET_LINK_LIBRARIES( IfcPlusPlusGeometry ${OSGUTIL_LIBRARY} )
96-
#TARGET_LINK_LIBRARIES( IfcPlusPlusGeometry ${OSGANIMATION_LIBRARY} )
97-
#TARGET_LINK_LIBRARIES( IfcPlusPlusGeometry ${OSGFX_LIBRARY} )
98-
#TARGET_LINK_LIBRARIES( IfcPlusPlusGeometry ${OSGTEXT_LIBRARY} )
99-
#TARGET_LINK_LIBRARIES( IfcPlusPlusGeometry ${OSGVIEWER_LIBRARY} )
90+
TARGET_LINK_LIBRARIES( IfcPlusPlusGeometry carve carve_misc)
91+
TARGET_LINK_LIBRARIES( IfcPlusPlusGeometry IfcPlusPlus)
92+
TARGET_LINK_LIBRARIES( IfcPlusPlusGeometry ${OPENTHREADS_LIBRARY} )
93+
TARGET_LINK_LIBRARIES( IfcPlusPlusGeometry ${OSG_LIBRARY} )
94+
TARGET_LINK_LIBRARIES( IfcPlusPlusGeometry ${OSGDB_LIBRARY} )
95+
TARGET_LINK_LIBRARIES( IfcPlusPlusGeometry ${OSGUTIL_LIBRARY} )
96+
TARGET_LINK_LIBRARIES( IfcPlusPlusGeometry ${OSGANIMATION_LIBRARY} )
97+
TARGET_LINK_LIBRARIES( IfcPlusPlusGeometry ${OSGFX_LIBRARY} )
98+
TARGET_LINK_LIBRARIES( IfcPlusPlusGeometry ${OSGTEXT_LIBRARY} )
99+
TARGET_LINK_LIBRARIES( IfcPlusPlusGeometry ${OSGVIEWER_LIBRARY} )
100100

101101
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++11")

IfcPlusPlusGeometry/IfcPlusPlusGeometry.vcxproj

+9-9
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
2+
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
33
<ItemGroup Label="ProjectConfigurations">
44
<ProjectConfiguration Include="Debug|Win32">
55
<Configuration>Debug</Configuration>
@@ -42,54 +42,54 @@
4242
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
4343
<ConfigurationType>StaticLibrary</ConfigurationType>
4444
<UseDebugLibraries>true</UseDebugLibraries>
45-
<PlatformToolset>v110</PlatformToolset>
45+
<PlatformToolset>v120</PlatformToolset>
4646
<CharacterSet>MultiByte</CharacterSet>
4747
</PropertyGroup>
4848
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
4949
<ConfigurationType>StaticLibrary</ConfigurationType>
5050
<UseDebugLibraries>true</UseDebugLibraries>
51-
<PlatformToolset>v110</PlatformToolset>
51+
<PlatformToolset>v120</PlatformToolset>
5252
<CharacterSet>Unicode</CharacterSet>
5353
</PropertyGroup>
5454
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
5555
<ConfigurationType>Application</ConfigurationType>
5656
<UseDebugLibraries>false</UseDebugLibraries>
57-
<PlatformToolset>v110</PlatformToolset>
57+
<PlatformToolset>v120</PlatformToolset>
5858
<WholeProgramOptimization>true</WholeProgramOptimization>
5959
<CharacterSet>MultiByte</CharacterSet>
6060
</PropertyGroup>
6161
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithDebugInfo|Win32'" Label="Configuration">
6262
<ConfigurationType>Application</ConfigurationType>
6363
<UseDebugLibraries>false</UseDebugLibraries>
64-
<PlatformToolset>v110</PlatformToolset>
64+
<PlatformToolset>v120</PlatformToolset>
6565
<WholeProgramOptimization>true</WholeProgramOptimization>
6666
<CharacterSet>MultiByte</CharacterSet>
6767
</PropertyGroup>
6868
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseNoOptimization|Win32'" Label="Configuration">
6969
<ConfigurationType>Application</ConfigurationType>
7070
<UseDebugLibraries>false</UseDebugLibraries>
71-
<PlatformToolset>v110</PlatformToolset>
71+
<PlatformToolset>v120</PlatformToolset>
7272
<WholeProgramOptimization>true</WholeProgramOptimization>
7373
<CharacterSet>MultiByte</CharacterSet>
7474
</PropertyGroup>
7575
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
7676
<ConfigurationType>StaticLibrary</ConfigurationType>
7777
<UseDebugLibraries>false</UseDebugLibraries>
78-
<PlatformToolset>v110</PlatformToolset>
78+
<PlatformToolset>v120</PlatformToolset>
7979
<WholeProgramOptimization>true</WholeProgramOptimization>
8080
<CharacterSet>Unicode</CharacterSet>
8181
</PropertyGroup>
8282
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithDebugInfo|x64'" Label="Configuration">
8383
<ConfigurationType>StaticLibrary</ConfigurationType>
8484
<UseDebugLibraries>false</UseDebugLibraries>
85-
<PlatformToolset>v110</PlatformToolset>
85+
<PlatformToolset>v120</PlatformToolset>
8686
<WholeProgramOptimization>true</WholeProgramOptimization>
8787
<CharacterSet>Unicode</CharacterSet>
8888
</PropertyGroup>
8989
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseNoOptimization|x64'" Label="Configuration">
9090
<ConfigurationType>StaticLibrary</ConfigurationType>
9191
<UseDebugLibraries>false</UseDebugLibraries>
92-
<PlatformToolset>v110</PlatformToolset>
92+
<PlatformToolset>v120</PlatformToolset>
9393
<WholeProgramOptimization>true</WholeProgramOptimization>
9494
<CharacterSet>Unicode</CharacterSet>
9595
</PropertyGroup>

IfcPlusPlusGeometry/src/ifcppgeometry/CSG_Adapter.cpp

+7-6
Original file line numberDiff line numberDiff line change
@@ -1024,18 +1024,19 @@ bool CSG_Adapter::computeCSG( shared_ptr<carve::mesh::MeshSet<3> >& op1, shared_
10241024
{
10251025
carve::mesh::MeshSet<3>* result_copy = result->clone();//new carve::mesh::MeshSet<3>();
10261026
MeshOps::applyTranslate( result_copy, carve::geom::VECTOR( 0, y_pos, 0 ) );
1027-
renderMeshsetInDebugViewer( result_copy, osg::Vec4(0.0f, 0.5f, 0.0f, 1.0f), false );
1027+
// renderMeshsetInDebugViewer( result_copy, osg::Vec4(0.0f, 0.5f, 0.0f, 1.0f), false );
10281028
}
10291029

10301030
carve::mesh::MeshSet<3>* op1_copy = op1->clone();
1031-
MeshOps::applyTranslate( op1_copy, carve::geom::VECTOR( 0, y_pos, 0 ) );
1032-
renderMeshsetInDebugViewer( op1_copy, osg::Vec4(0.0f, 0.8f, 0.0f, 1.0f), true );
1031+
MeshOps::applyTranslate( op1_copy, carve::geom::VECTOR( 0, y_pos, -1 ) );
1032+
renderMeshsetInDebugViewer( op1_copy, osg::Vec4(0.0f, 0.8f, 0.0f, 1.0f), false );
10331033

1034+
y_pos += 0.2;
10341035
carve::mesh::MeshSet<3>* op2_copy = op2->clone();
1035-
MeshOps::applyTranslate( op2_copy, carve::geom::VECTOR( 0, y_pos, 0 ) );
1036-
renderMeshsetInDebugViewer( op2_copy, osg::Vec4(0.8f, 0.0f, 0.0f, 1.0f), true );
1036+
MeshOps::applyTranslate(op2_copy, carve::geom::VECTOR(0, y_pos, -1));
1037+
renderMeshsetInDebugViewer(op2_copy, osg::Vec4(0.8f, 0.0f, 0.0f, 1.0f), false);
10371038

1038-
y_pos += 1;
1039+
y_pos += 0.2;
10391040

10401041
dumpMeshsets( op1.get(), op2.get(), result.get(), entity1, entity2 );
10411042
}

IfcPlusPlusGeometry/src/ifcppgeometry/DebugViewerCallback.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@
1515

1616
#ifdef _DEBUG
1717

18-
#define ENABLE_FILE_DUMP
19-
#ifdef ENABLE_FILE_DUMP
18+
//#define ENABLE_FILE_DUMP
19+
//#ifdef ENABLE_FILE_DUMP
2020
#include <fstream>
21-
#endif
21+
//#endif
2222

2323
#include <osgText/Text>
2424
#include <ifcpp/model/UnitConverter.h>

IfcPlusPlusGeometry/src/ifcppgeometry/RepresentationConverter.cpp

+34-18
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ RepresentationConverter::~RepresentationConverter()
105105
{
106106
}
107107

108-
void RepresentationConverter::convertStyledItem( const shared_ptr<IfcRepresentationItem>& representation_item, shared_ptr<ItemData>& item_data )
108+
void RepresentationConverter::convertRepresentationStyle(const shared_ptr<IfcRepresentationItem>& representation_item, std::vector<shared_ptr<AppearanceData> >& vec_appearance_data )
109109
{
110110
std::vector<weak_ptr<IfcStyledItem> >& StyledByItem_inverse_vec = representation_item->m_StyledByItem_inverse;
111111
for( size_t i=0; i<StyledByItem_inverse_vec.size(); ++i )
@@ -116,17 +116,7 @@ void RepresentationConverter::convertStyledItem( const shared_ptr<IfcRepresentat
116116
#ifdef IFCPP_OPENMP
117117
ScopedLock lock(m_writelock_styles_converter);
118118
#endif
119-
std::vector<shared_ptr<AppearanceData> > vec_appearance_data;
120119
m_styles_converter->convertIfcStyledItem( styled_item, vec_appearance_data );
121-
122-
for( size_t jj=0; jj<vec_appearance_data.size(); ++jj )
123-
{
124-
shared_ptr<AppearanceData>& data = vec_appearance_data[jj];
125-
if( data )
126-
{
127-
item_data->vec_item_appearances.push_back( data );
128-
}
129-
}
130120
}
131121
}
132122

@@ -148,7 +138,19 @@ void RepresentationConverter::convertIfcRepresentation( const shared_ptr<IfcRep
148138

149139
if( m_handle_styled_items )
150140
{
151-
convertStyledItem( representation_item, geom_item_data );
141+
std::vector<shared_ptr<AppearanceData> > vec_appearance_data;
142+
convertRepresentationStyle(representation_item, vec_appearance_data);
143+
144+
for (size_t jj = 0; jj<vec_appearance_data.size(); ++jj)
145+
{
146+
shared_ptr<AppearanceData>& data = vec_appearance_data[jj];
147+
if (data)
148+
{
149+
geom_item_data->vec_item_appearances.push_back(data);
150+
}
151+
}
152+
153+
//convertStyledItem( representation_item, geom_item_data );
152154
}
153155
convertIfcGeometricRepresentationItem( geom_item, geom_item_data, strs_err );
154156
continue;
@@ -194,14 +196,28 @@ void RepresentationConverter::convertIfcRepresentation( const shared_ptr<IfcRep
194196
shared_ptr<ShapeInputData> mapped_input_data( new ShapeInputData() );
195197
convertIfcRepresentation( mapped_representation, mapped_input_data, strs_err );
196198

197-
// overwrite item appearances with parent appearance
198-
for( size_t i_mapped_item = 0; i_mapped_item < mapped_input_data->vec_item_data.size(); ++i_mapped_item )
199+
if( m_handle_styled_items )
199200
{
200-
shared_ptr<ItemData>& mapped_item_data = mapped_input_data->vec_item_data[i_mapped_item];
201-
mapped_item_data->vec_item_appearances.clear();
202-
if( m_handle_styled_items )
201+
std::vector<shared_ptr<AppearanceData> > vec_appearance_data;
202+
convertRepresentationStyle(representation_item, vec_appearance_data);
203+
204+
if( vec_appearance_data.size() > 0 )
203205
{
204-
convertStyledItem( representation_item, mapped_item_data );
206+
// overwrite item appearances with parent appearance
207+
for( size_t i_mapped_item = 0; i_mapped_item < mapped_input_data->vec_item_data.size(); ++i_mapped_item )
208+
{
209+
shared_ptr<ItemData>& mapped_item_data = mapped_input_data->vec_item_data[i_mapped_item];
210+
mapped_item_data->vec_item_appearances.clear();
211+
212+
for (size_t jj_appearance = 0; jj_appearance<vec_appearance_data.size(); ++jj_appearance )
213+
{
214+
shared_ptr<AppearanceData>& data = vec_appearance_data[jj_appearance];
215+
if( data )
216+
{
217+
mapped_item_data->vec_item_appearances.push_back(data);
218+
}
219+
}
220+
}
205221
}
206222
}
207223

IfcPlusPlusGeometry/src/ifcppgeometry/RepresentationConverter.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ class RepresentationConverter
4747
void convertIfcGeometricRepresentationItem( const shared_ptr<IfcGeometricRepresentationItem>& item, shared_ptr<ItemData> item_data, std::stringstream& err );
4848
void convertIfcSectionedSpine( const shared_ptr<IfcSectionedSpine>& spine, shared_ptr<ItemData> item_data, std::stringstream& err );
4949
void convertIfcReferencedSectionedSpine( const shared_ptr<IfcReferencedSectionedSpine>& spine, shared_ptr<ItemData> item_data, std::stringstream& err );
50-
void convertStyledItem( const shared_ptr<IfcRepresentationItem>& item, shared_ptr<ItemData>& item_data );
50+
void convertRepresentationStyle( const shared_ptr<IfcRepresentationItem>& representation_item, std::vector<shared_ptr<AppearanceData> >& vec_appearance_data );
5151
void convertIfcPropertySet( const shared_ptr<IfcPropertySet>& property_set, osg::Group* group );
5252
void subtractOpenings( const shared_ptr<IfcElement>& ifc_element, shared_ptr<ShapeInputData>& product_shape, std::stringstream& err );
5353

0 commit comments

Comments
 (0)