ifcplusplus icon indicating copy to clipboard operation
ifcplusplus copied to clipboard

IFCCARTESIANPOINTLIST2D and IFCCARTESIANPOINTLIST3D are not read for IFC file versions less than 4.1 RC3.

Open alas2 opened this issue 5 years ago • 3 comments

`void IfcCartesianPointList2D::readStepArguments( const std::vectorstd::wstring& args, const std::map<int,shared_ptr<BuildingEntity> >& map ) { const size_t num_args = args.size(); if( num_args != 2 ){ std::stringstream err; err << "Wrong parameter count for entity IfcCartesianPointList2D, expecting 2, having " << num_args << ". Entity ID: " << m_entity_id << std::endl; throw BuildingException( err.str().c_str() ); } readTypeOfRealList2D( args[0], m_CoordList ); readTypeOfStringList( args[1], m_TagList ); // This only add at version 4.1 RC3 and onward. For files below this version fail to read }

Probably should be something like this

void IfcCartesianPointList2D::readStepArguments( const std::vectorstd::wstring& args, const std::map<int,shared_ptr<BuildingEntity> >& map ) { const size_t num_args = args.size(); if ( num_args >= 1 ) { readTypeOfRealList2D( args[0], m_CoordList ); }

if ( num_args >= 2 )
{
	readTypeOfStringList( args[1], m_TagList );
}

if( num_args != 1 && num_args != 2 ){ std::stringstream err; err << "Wrong parameter count for entity IfcCartesianPointList2D, expecting 2, having " << num_args << ". Entity ID: " << m_entity_id << std::endl; throw BuildingException( err.str().c_str() ); }

}`

alas2 avatar Nov 30 '20 23:11 alas2

I don't support obtaining lower versions, and I also encounter the same problem on my end

phpix avatar May 25 '23 00:05 phpix

Good suggestion. I will change it in the next update in a week or two.

ifcapps avatar May 26 '23 10:05 ifcapps

这是来自QQ邮箱的假期自动回复邮件。   您好,我最近正在休假中,无法亲自回复您的邮件。我将在假期结束后,尽快给您回复。

phpix avatar May 26 '23 10:05 phpix

This seems to be fixed in version (2.3) IFC4X3

alas2 avatar Apr 30 '24 03:04 alas2

这是来自QQ邮箱的假期自动回复邮件。   您好,我最近正在休假中,无法亲自回复您的邮件。我将在假期结束后,尽快给您回复。

phpix avatar Apr 30 '24 03:04 phpix