Fixing a subsequent problem if edges are of zero length.

parent 6ad43c16
......@@ -89,7 +89,7 @@ SUResult SUEntitiesToITAMesh( SUEntitiesRef rEntities, CITAMesh* pMesh, bool bEx
CITAMesh::FaceHandle hFace = pMesh->add_face( vhVertices ); // --> OPENMESH
if( pMesh->is_valid_handle( hFace ) == false )
{
//std::cerr << "Found invalid face with " << nNumVertices << " vertices. Skipping." << std::endl;
std::cerr << "Found invalid face with " << nNumVertices << " vertices. Skipping." << std::endl;
continue;
}
......
......@@ -417,6 +417,7 @@ bool CModel::Store( const std::string& sSKPFilePath, bool bOverwite/*=true*/ ) c
SUModelAddMaterials( rModel, 1, &rMaterial );
std::vector< SUEdgeRef > vrEdges( oPath.size() - 1 );
bool bSkip = false;
for( size_t m = 0; m < vrEdges.size(); m++ )
{
auto pSourceAnchor( oPath[ m ] );
......@@ -427,7 +428,8 @@ bool CModel::Store( const std::string& sSKPFilePath, bool bOverwite/*=true*/ ) c
if( pSourceAnchor->v3InteractionPoint == pTargetAnchor->v3InteractionPoint )
{
std::cout << "During SketchUp model export: source and target anchor of propagation path have same interaction point at " << pSourceAnchor->v3InteractionPoint << ", skipping this segment." << std::endl;
continue;
bSkip = true;
break;
}
SUPoint3D v3SUStart = VistaVectorToSUPoint( pSourceAnchor->v3InteractionPoint );
......@@ -439,7 +441,8 @@ bool CModel::Store( const std::string& sSKPFilePath, bool bOverwite/*=true*/ ) c
SU_EXC( SUDrawingElementSetMaterial( rDrawingElement, rMaterial ) );
SU_EXC( SUDrawingElementSetLayer( rDrawingElement, rPropLayer ) );
}
SU_EXC( SUCurveCreateWithEdges( &vrCurves[ n ], &vrEdges[ 0 ], vrEdges.size() ) );
if( !bSkip )
SU_EXC( SUCurveCreateWithEdges( &vrCurves[ n ], &vrEdges[ 0 ], vrEdges.size() ) );
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment