Skip to main content
  • Home
  • Development
  • Documentation
  • Donate
  • Operational login
  • Browse the archive

swh logo
SoftwareHeritage
Software
Heritage
Archive
Features
  • Search

  • Downloads

  • Save code now

  • Add forge now

  • Help

Revision 39b13612ebd645a65eda854771b517371f2f858a authored by ennetws on 13 March 2015, 18:17:18 UTC, committed by ennetws on 13 March 2015, 18:17:18 UTC
Create README.md
1 parent c702819
  • Files
  • Changes
  • adfc2e5
  • /
  • nurbs_plugin
  • /
  • BoundaryFitting.h
Raw File Download

To reference or cite the objects present in the Software Heritage archive, permalinks based on SoftWare Hash IDentifiers (SWHIDs) must be used.
Select below a type of object currently browsed in order to display its associated SWHID and permalink.

  • revision
  • directory
  • content
revision badge
swh:1:rev:39b13612ebd645a65eda854771b517371f2f858a
directory badge
swh:1:dir:1527aafa4f478fbed854d026dc9a61c6f21f769d
content badge
swh:1:cnt:e131882b838ba94804d86d4f2271ef051ce073e2

This interface enables to generate software citations, provided that the root directory of browsed objects contains a citation.cff or codemeta.json file.
Select below a type of object currently browsed in order to generate citations for them.

  • revision
  • directory
  • content
(requires biblatex-software package)
Generating citation ...
(requires biblatex-software package)
Generating citation ...
(requires biblatex-software package)
Generating citation ...
BoundaryFitting.h
#pragma once

#include "SurfaceMeshModel.h"
#include "FaceBarycenterHelper.h"

#include "NanoKdTree.h"
#include "../CustomDrawObjects.h"

typedef QPair<Halfedge,double> HalfedgeTime;
typedef QMap<double, HalfedgeTime > DistanceHalfedge;

struct BoundaryFitting{

    BoundaryFitting( SurfaceMeshModel * mesh = NULL, int numSegments = 20, int numSegmentsV = -1);
	void doFit();

	std::vector<SurfaceMesh::Vertex> collectRings( SurfaceMesh::Vertex v, size_t min_nb, bool isBoundary = false );
	
	QVector<SurfaceMesh::Vertex> boundaryVerts();

	void normalize( SurfaceMesh::ScalarVertexProperty & vprop );

	void gradientFaces( ScalarVertexProperty & functionVal, bool isSmooth = true, bool isNormalizeNegateGradient = true );
	QVector<SurfaceMesh::Vertex> neighbours( int start, int range, QVector<SurfaceMesh::Vertex> all );

	SurfaceMesh::Halfedge get_halfedge(SurfaceMesh::Vertex start, SurfaceMesh::Vertex end);
	SurfaceMesh::Halfedge getBestEdge(Vector3d prevPoint, Vector3d direction, Face f, double & bestTime);
	SurfaceMesh::Face getBestFace( Vector3d & point, Vertex guess );

	std::vector<Vector3d> geodesicPath(Vector3d fromPoint, Vector3d toPoint);
	std::vector< std::vector<Vector3d> > geodesicPaths( std::vector<Vector3d> fromPoints, std::vector<Vector3d> toPoints, int segments = -1 );

	std::vector<Vector3d> trianglePoints( Face f );
	std::vector<Vertex> triangleVertices( Face f );

	SurfaceMesh::SurfaceMeshModel * part;
	int segments, segmentsV;

	SurfaceMesh::ScalarVertexProperty vals;
	SurfaceMesh::ScalarVertexProperty boundaryCurv;
	SurfaceMesh::ScalarVertexProperty dists;
	SurfaceMesh::Vector3VertexProperty vgradient;

	SurfaceMesh::Vector3FaceProperty fgradient;
	SurfaceMesh::Vector3VertexProperty vdirection;
	SurfaceMesh::Vector3VertexProperty normals;
	SurfaceMesh::Vector3VertexProperty points;

	NanoKdTree tree;

	// output
	std::vector< std::vector<Vector3d> > lines;

	std::vector<Vector3d> debugPoints, debugPoints2;
	std::vector<Vector3d> corners;
	std::vector< std::vector<Vector3d> > main_edges;
	LineSegments ls;
};
The diff you're trying to view is too large. Only the first 1000 changed files have been loaded.
Showing with 0 additions and 0 deletions (0 / 0 diffs computed)
swh spinner

Computing file changes ...

back to top

Software Heritage — Copyright (C) 2015–2026, The Software Heritage developers. License: GNU AGPLv3+.
The source code of Software Heritage itself is available on our development forge.
The source code files archived by Software Heritage are available under their own copyright and licenses.
Terms of use: Archive access, API— Content policy— Contact— JavaScript license information— Web API