Skip to content
Permalink
Browse files

Add spell check variants for tessellate

  • Loading branch information
nyalldawson committed Nov 26, 2017
1 parent 006da6e commit 41089f28fa42be6c6f3917a3b65d42409f634c25
@@ -6880,6 +6880,12 @@ terriory:territory
territorist:terrorist
territoy:territory
terroist:terrorist
tesellate:tessellate
tesselate:tessellate
tesellation:tessellation
tesselation:tessellation
tesellator:tessellator
tesselator:tessellator
testiclular:testicular
testomony:testimony
texual:textual
@@ -20,7 +20,7 @@ SET(QGIS_3D_SRCS
chunks/qgschunkqueuejob_p.cpp

processing/qgs3dalgorithms.cpp
processing/qgsalgorithmtesselate.cpp
processing/qgsalgorithmtessellate.cpp

symbols/qgsabstract3dsymbol.cpp
symbols/qgsline3dsymbol.cpp
@@ -16,7 +16,7 @@
***************************************************************************/

#include "qgs3dalgorithms.h"
#include "qgsalgorithmtesselate.h"
#include "qgsalgorithmtessellate.h"
#include "qgsapplication.h"

///@cond PRIVATE
@@ -52,7 +52,7 @@ bool Qgs3DAlgorithms::supportsNonFileBasedOutput() const

void Qgs3DAlgorithms::loadAlgorithms()
{
addAlgorithm( new QgsTesselateAlgorithm() );
addAlgorithm( new QgsTessellateAlgorithm() );
}


@@ -1,5 +1,5 @@
/***************************************************************************
qgsalgorithmtesselate.cpp
qgsalgorithmtessellate.cpp
---------------------
begin : November 2017
copyright : (C) 2017 by Nyall Dawson
@@ -15,66 +15,66 @@
* *
***************************************************************************/

#include "qgsalgorithmtesselate.h"
#include "qgsalgorithmtessellate.h"
#include "qgstessellator.h"
#include "qgsmultipolygon.h"
#include "qgstriangle.h"
///@cond PRIVATE

QString QgsTesselateAlgorithm::name() const
QString QgsTessellateAlgorithm::name() const
{
return QStringLiteral( "tesselate" );
return QStringLiteral( "tessellate" );
}

QString QgsTesselateAlgorithm::displayName() const
QString QgsTessellateAlgorithm::displayName() const
{
return QObject::tr( "Tesselate geometry" );
return QObject::tr( "Tessellate geometry" );
}

QStringList QgsTesselateAlgorithm::tags() const
QStringList QgsTessellateAlgorithm::tags() const
{
return QObject::tr( "3d,triangle" ).split( ',' );
}

QString QgsTesselateAlgorithm::group() const
QString QgsTessellateAlgorithm::group() const
{
return QObject::tr( "Vector geometry" );
}

QString QgsTesselateAlgorithm::outputName() const
QString QgsTessellateAlgorithm::outputName() const
{
return QObject::tr( "Tesselated" );
return QObject::tr( "Tessellated" );
}

QgsProcessing::SourceType QgsTesselateAlgorithm::outputLayerType() const
QgsProcessing::SourceType QgsTessellateAlgorithm::outputLayerType() const
{
return QgsProcessing::TypeVectorPolygon;
}

QgsWkbTypes::Type QgsTesselateAlgorithm::outputWkbType( QgsWkbTypes::Type inputWkbType ) const
QgsWkbTypes::Type QgsTessellateAlgorithm::outputWkbType( QgsWkbTypes::Type inputWkbType ) const
{
Q_UNUSED( inputWkbType );
return QgsWkbTypes::MultiPolygonZ;
}

QString QgsTesselateAlgorithm::shortHelpString() const
QString QgsTessellateAlgorithm::shortHelpString() const
{
return QObject::tr( "This algorithm tesselates a polygon geometry layer, dividing the geometries into triangular components." )
return QObject::tr( "This algorithm tessellates a polygon geometry layer, dividing the geometries into triangular components." )
+ QStringLiteral( "\n\n" )
+ QObject::tr( "The output layer consists of multipolygon geometries for each input feature, with each multipolygon consisting of multiple triangle component polygons." );
}

QList<int> QgsTesselateAlgorithm::inputLayerTypes() const
QList<int> QgsTessellateAlgorithm::inputLayerTypes() const
{
return QList<int>() << QgsProcessing::TypeVectorPolygon;
}

QgsTesselateAlgorithm *QgsTesselateAlgorithm::createInstance() const
QgsTessellateAlgorithm *QgsTessellateAlgorithm::createInstance() const
{
return new QgsTesselateAlgorithm();
return new QgsTessellateAlgorithm();
}

QgsFeature QgsTesselateAlgorithm::processFeature( const QgsFeature &feature, QgsProcessingFeedback * )
QgsFeature QgsTessellateAlgorithm::processFeature( const QgsFeature &feature, QgsProcessingFeedback * )
{
QgsFeature f = feature;
if ( f.hasGeometry() )
@@ -1,5 +1,5 @@
/***************************************************************************
qgsalgorithmtesselate.h
qgsalgorithmtessellate.h
---------------------
begin : November 2017
copyright : (C) 2017 by Nyall Dawson
@@ -15,8 +15,8 @@
* *
***************************************************************************/

#ifndef QGSALGORITHMTESSELATE_H
#define QGSALGORITHMTESSELATE_H
#ifndef QGSALGORITHMTESSELLATE_H
#define QGSALGORITHMTESSELLATE_H

#define SIP_NO_FILE

@@ -26,21 +26,21 @@
///@cond PRIVATE

/**
* Native tesselate algorithm.
* Native tessellate algorithm.
*/
class QgsTesselateAlgorithm : public QgsProcessingFeatureBasedAlgorithm
class QgsTessellateAlgorithm : public QgsProcessingFeatureBasedAlgorithm
{

public:

QgsTesselateAlgorithm() = default;
QgsTessellateAlgorithm() = default;
QString name() const override;
QString displayName() const override;
virtual QStringList tags() const override;
QString group() const override;
QString shortHelpString() const override;
QList<int> inputLayerTypes() const override;
QgsTesselateAlgorithm *createInstance() const override SIP_FACTORY;
QgsTessellateAlgorithm *createInstance() const override SIP_FACTORY;

protected:
QString outputName() const override;
@@ -54,6 +54,6 @@ class QgsTesselateAlgorithm : public QgsProcessingFeatureBasedAlgorithm

///@endcond PRIVATE

#endif // QGSALGORITHMTESSELATE_H
#endif // QGSALGORITHMTESSELLATE_H


@@ -66,16 +66,16 @@ void QgsTessellatedPolygonGeometry::setPolygons( const QList<QgsPolygon *> &poly
qDeleteAll( mPolygons );
mPolygons = polygons;

QgsTessellator tesselator( origin.x(), origin.y(), mWithNormals );
QgsTessellator tessellator( origin.x(), origin.y(), mWithNormals );
for ( int i = 0; i < polygons.count(); ++i )
{
QgsPolygon *polygon = polygons.at( i );
float extr = extrusionHeightPerPolygon.isEmpty() ? extrusionHeight : extrusionHeightPerPolygon.at( i );
tesselator.addPolygon( *polygon, extr );
tessellator.addPolygon( *polygon, extr );
}

QByteArray data( ( const char * )tesselator.data().constData(), tesselator.data().count() * sizeof( float ) );
int nVerts = data.count() / tesselator.stride();
QByteArray data( ( const char * )tessellator.data().constData(), tessellator.data().count() * sizeof( float ) );
int nVerts = data.count() / tessellator.stride();

mVertexBuffer->setData( data );
mPositionAttribute->setCount( nVerts );
@@ -402,7 +402,7 @@ void QgsTessellator::addPolygon( const QgsPolygon &polygon, float extrusionHeigh

QgsPoint getPointFromData( QVector< float >::const_iterator &it )
{
// tesselator geometry is x, z, -y
// tessellator geometry is x, z, -y
double x = *it;
++it;
double z = *it;
@@ -38,7 +38,7 @@ QString QgsSubdivideAlgorithm::displayName() const

QStringList QgsSubdivideAlgorithm::tags() const
{
return QObject::tr( "subdivide,segmentize,split,tesselate" ).split( ',' );
return QObject::tr( "subdivide,segmentize,split,tessellate" ).split( ',' );
}

QString QgsSubdivideAlgorithm::group() const

0 comments on commit 41089f2

Please sign in to comment.
You can’t perform that action at this time.