diff --git a/.gitignore b/.gitignore index b60de5b5f2c97e8a268bda5e8e959e6475beb8f9..c02185b9afe50b33f8fea327c838389b8dc6fc64 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,17 @@ **/target + +# From directories, ignore... + +### Idea: +.idea/ +.idea_modules/ +/out/ + +### Maven template +target/ + +### Eclipse template +bin/ +tmp/ +.settings/ + diff --git a/Comparison/pom.xml b/Comparison/pom.xml new file mode 100644 index 0000000000000000000000000000000000000000..60d41a8f0e4066ef57cdf60b7f549cf2028f231c --- /dev/null +++ b/Comparison/pom.xml @@ -0,0 +1,84 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + <parent> + <groupId>cz.findetis</groupId> + <artifactId>FIDENTIS-Analyst-parent</artifactId> + <version>2.0</version> + </parent> + <artifactId>Comparison</artifactId> + <packaging>nbm</packaging> + <build> + <plugins> + <plugin> + <groupId>org.codehaus.mojo</groupId> + <artifactId>nbm-maven-plugin</artifactId> + <extensions>true</extensions> + <configuration> + <useOSGiDependencies>true</useOSGiDependencies> + <publicPackages> <!-- expose API/packages to other modules --> + <publicPackage>cz.fidentis.analyst.symmetry.*</publicPackage> + </publicPackages> + </configuration> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-jar-plugin</artifactId> + <configuration> + <useDefaultManifestFile>true</useDefaultManifestFile> + </configuration> + </plugin> + <!-- Check code style --> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-checkstyle-plugin</artifactId> + <version>${version.maven.plugin.checkstyle}</version> + <executions> + <execution> + <id>validate</id> + <phase>validate</phase> + <configuration> + <configLocation>codestyle.xml</configLocation> + <encoding>UTF-8</encoding> + <consoleOutput>true</consoleOutput> + <failOnViolation>${checkstyle.fail}</failOnViolation> + <violationSeverity>${checkstyle.severity}</violationSeverity> + <includeTestSourceDirectory>false</includeTestSourceDirectory> + </configuration> + <goals> + <goal>check</goal> + </goals> + </execution> + </executions> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-compiler-plugin</artifactId> + <configuration> + <source>8</source> + <target>8</target> + </configuration> + </plugin> + </plugins> + </build> + <dependencies> + <dependency> + <groupId>org.netbeans.api</groupId> + <artifactId>org-netbeans-api-annotations-common</artifactId> + <version>${netbeans.version}</version> + </dependency> + <dependency> + <groupId>${project.groupId}</groupId> + <artifactId>MeshModel</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>javax.vecmath</groupId> + <artifactId>vecmath</artifactId> + <version>${version.javax.vecmath}</version> + </dependency> + </dependencies> + <properties> + <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> + </properties> +</project> \ No newline at end of file diff --git a/Comparison/src/main/java/cz/fidentis/analyst/symmetry/AproxSymmetryPlane.java b/Comparison/src/main/java/cz/fidentis/analyst/symmetry/AproxSymmetryPlane.java new file mode 100644 index 0000000000000000000000000000000000000000..6ddae7b0d4dcbd1e3e1bdfefb2495105dc732ed2 --- /dev/null +++ b/Comparison/src/main/java/cz/fidentis/analyst/symmetry/AproxSymmetryPlane.java @@ -0,0 +1,42 @@ +package cz.fidentis.analyst.symmetry; + +/** + * + * @author Natália Bebjaková + * + * Respresents plane with added atribute - votes, that play role + * in decision about symmetry estimate of the 3D model + */ +public class AproxSymmetryPlane extends Plane implements Comparable<AproxSymmetryPlane> { + public Integer votes; + + /** + * returns number of votes that were given to plane while computing the symmetry + * + * @return Number of votes + */ + public Integer getVotes() { + return votes; + } + + /** + * + * @param plane Original plane without votes + * @param votes number of votes given to the plane + */ + public AproxSymmetryPlane(Plane plane, int votes) { + super(plane.a, plane.b, plane.c, plane.d); + this.votes = votes; + } + + /** + * Enables to compare two approximate planes due to number of votes + * + * @param other plane to be compared + * @return number that decides which plane has more votes + */ + @Override + public int compareTo(AproxSymmetryPlane other) { + return this.votes.compareTo(other.votes); + } +} diff --git a/Comparison/src/main/java/cz/fidentis/analyst/symmetry/BoundingBox.java b/Comparison/src/main/java/cz/fidentis/analyst/symmetry/BoundingBox.java new file mode 100644 index 0000000000000000000000000000000000000000..dabb5a6fd0d54bd642f2119de2d54d9a71c604a1 --- /dev/null +++ b/Comparison/src/main/java/cz/fidentis/analyst/symmetry/BoundingBox.java @@ -0,0 +1,148 @@ +package cz.fidentis.analyst.symmetry; + +import cz.fidentis.analyst.mesh.core.MeshPoint; +import java.util.List; +import javax.vecmath.Vector3d; + +/** + * @author Natália Bebjaková + * + * Represent min-max box. + * It is automatically maintained by given point array of the model. + * + */ + +public class BoundingBox { + private boolean isMinMaxValid; + private MeshPoint maxPoint; + private MeshPoint minPoint; + private MeshPoint midPoint; + private double maxDiag; + private final List<MeshPoint> points; + + /** + * + * @return max point of the bounding box + */ + public MeshPoint getMaxPoint() { + return maxPoint; + } + + /** + * + * @param point new max point of the bounding box + */ + public void setMaxPoint(MeshPoint point) { + this.maxPoint = point; + } + + /** + * + * @return middle point of the bounding box + */ + public MeshPoint getMidPoint() { + return midPoint; + } + + /** + * + * @param point new middle point of the bounding box + */ + public void setMidPoint(MeshPoint point) { + this.midPoint = point; + } + + /** + * + * @return min point of the bounding box + */ + public MeshPoint getMinPoint() { + return minPoint; + } + + /** + * + * @param point new min point of the bounding box + */ + public void setMinPoint(MeshPoint point) { + this.minPoint = point; + } + + /** + * Creates bounding box that is automatically maintained with respect to given array. + * @param points array of points + */ + public BoundingBox(List<MeshPoint> points) { + this.points = points; + this.validateMinMax(); + this.validateMidDiag(); + } + + /** + * @return point array that is managed by curent bounding box. + */ + public List<MeshPoint> getPoints() { + return points; + } + + /** + * Recomputes the BoundingBox from all points + */ + private void validateMinMax() { + minPoint = new MeshPoint(new Vector3d(Double.MAX_VALUE,Double.MAX_VALUE,Double.MAX_VALUE), null, null); + maxPoint = new MeshPoint(new Vector3d(-100000.0,-100000.0,-100000.0), null, null); + + for (int i = 0; i < points.size(); i++) { + MeshPoint point = points.get(i); + + minPoint.getPosition().x = Math.min(minPoint.getPosition().x, point.getPosition().x); + minPoint.getPosition().y = Math.min(minPoint.getPosition().y, point.getPosition().y); + minPoint.getPosition().z = Math.min(minPoint.getPosition().z, point.getPosition().z); + + maxPoint.getPosition().x = Math.max(maxPoint.getPosition().x, point.getPosition().x); + maxPoint.getPosition().y = Math.max(maxPoint.getPosition().y, point.getPosition().y); + maxPoint.getPosition().z = Math.max(maxPoint.getPosition().z, point.getPosition().z); + } + isMinMaxValid = true; + this.validateMidDiag(); + } + + /** + * Recompute mid-point and max diagonal length. + */ + private void validateMidDiag() { + midPoint = (minPoint.addPosition(maxPoint)).multiplyPosition(0.5); + MeshPoint diag = maxPoint.subtractPosition(minPoint); + this.maxDiag = diag.abs(); + } + + /** + * Return volume diagonal of the bounding box. + * @return maximal diagonal of bounding box + */ + public double getMaxDiag() { + if (!isMinMaxValid) { + this.validateMinMax(); + } + return maxDiag; + } + + /** + * Returns description of BoundignBox. + * + * @return String representation of the bounding box + */ + @Override + public String toString() { + String str = "BoundingBox: "; + if (this.minPoint == null || this.maxPoint == null || this.midPoint == null) { + return str += "undefined (there are no points)"; + } + str += "\n"; + str += "\t" + "- min point : " + this.minPoint + "\n"; + str += "\t" + "- max point : " + this.maxPoint + "\n"; + str += "\t" + "- mid point : " + this.midPoint + "\n"; + str += "\t" + "- max diag : " + this.maxDiag + "\n"; + return str; + } +} \ No newline at end of file diff --git a/Comparison/src/main/java/cz/fidentis/analyst/symmetry/Config.java b/Comparison/src/main/java/cz/fidentis/analyst/symmetry/Config.java new file mode 100644 index 0000000000000000000000000000000000000000..ed08d5aa943f9ce117d84e3bb8863f27c900bcc2 --- /dev/null +++ b/Comparison/src/main/java/cz/fidentis/analyst/symmetry/Config.java @@ -0,0 +1,173 @@ +package cz.fidentis.analyst.symmetry; + +/** + * + * @author Natália Bebjaková + * + * Representation of configuration for symmetry estimate. + * Default numbers are given due to the best results on tested data. + * On many different 3D models, it exists other values of config that will have + * better impact on results in estimate of symmetry. + */ +public class Config { + private static final double DEFAULT_MIN_CURV_RATIO = 0.5; + private static final double DEFAULT_MIN_ANGLE_COS = 0.985; + private static final double DEFAULT_MIN_NORM_ANGLE_COS = 0.985; + private static final double DEFAULT_MAX_REL_DISTANCE = 1.0 / 100.0; + private static final int DEFAULT_SIGNIFICANT_POINT_COUNT = 200; + private static final boolean DEFAULT_AVERAGING = true; + + private double minCurvRatio; + private double minAngleCos; + private double minNormAngleCos; + private double maxRelDistance; + private int significantPointCount; + private boolean averaging; + + /** + * Parameter which denotes how similar the Gaussian curvatures in the two vertices + * must be for this criteria to be satisfied. + * The higher the value is the more similar they must be. + * + * @return minimal similarity of curvatures to satisfy the criteria + */ + public double getMinCurvRatio() { + return minCurvRatio; + } + + /** + * + * @param minCurvRatio new minimal similarity of curvatures to satisfy the criteria + */ + public void setMinCurvRatio(double minCurvRatio) { + this.minCurvRatio = minCurvRatio; + } + + /** + * MinAngleCos â (0,1) + * It is the angle between the vector (xk â’ xl) and the normal vector nij of the plane Ďij + * (which is the vector (xi â’xj)) + * Returns parameter which denotes how large the angle αij can be for this criteria to be satisfied. + * + * @return minimal angle satisfy criteria + */ + public double getMinAngleCos() { + return minAngleCos; + } + + /** + * + * @param minAngleCos new minimal angle to satisfy the criteria + */ + public void setMinAngleCos(double minAngleCos) { + this.minAngleCos = minAngleCos; + } + + /** + * MinNormAngleCos â (0,1) + * It is angle between vectors (xi â’ xj) and (ni â’ nj), where xi, xj are vertices and ni, nj its normals + * Returns parameter which denotes how large the angle αij can be for this criteria to be satisfied. + * + * @return minimal angle to satisfy criteria + */ + public double getMinNormAngleCos() { + return minNormAngleCos; + } + + /** + * + * @param minNormAngleCos new minimal angle to satisfy the criteria + */ + public void setMinNormAngleCos(double minNormAngleCos) { + this.minNormAngleCos = minNormAngleCos; + } + + /** + * Parameter which denotes how far (relatively to the length of the bounding box diagonal) + * the middle point of the two vertices can be from the plane in order to satisfy this criteria. + * + * @return relative distance + */ + public double getMaxRelDistance() { + return maxRelDistance; + } + + /** + * + * @param maxRelDistance new relative distance + */ + public void setMaxRelDistance(double maxRelDistance) { + this.maxRelDistance = maxRelDistance; + } + + /** + * Returns number of vertices with the highest Gaussian curvature. + * + * @return number of significant points for computing the symmetry + */ + public int getSignificantPointCount() { + return significantPointCount; + } + + /** + * + * @param significantPointCount new number of significant points for computing the symmetry + */ + public void setSignificantPointCount(int significantPointCount) { + this.significantPointCount = significantPointCount; + } + + /** + * If there are more planes with the same highest number of votes while computing symmetry, + * we can average them all together. + * Returns parameter that decides whether to average them or not. + * + * @return true if planes will be averaged + */ + public boolean isAveraging() { + return averaging; + } + + /** + * + * @param averaging new averaging flag + */ + public void setAveraging(boolean averaging) { + this.averaging = averaging; + } + + /** + * Creates new configuration with default values + * + * @return configuration with default values + */ + public static Config getDefault() { + Config conf = new Config(); + + conf.minCurvRatio = DEFAULT_MIN_CURV_RATIO; + conf.minAngleCos = DEFAULT_MIN_ANGLE_COS; + conf.minNormAngleCos = DEFAULT_MIN_NORM_ANGLE_COS; + conf.maxRelDistance = DEFAULT_MAX_REL_DISTANCE; + conf.significantPointCount = DEFAULT_SIGNIFICANT_POINT_COUNT; + conf.averaging = DEFAULT_AVERAGING; + + return conf; + } + + /** + * + * @return String representation of configuration + */ + @Override + public String toString() { + String str = "PARAMETERS: "; + str += "\n"; + str += "Min curvature ratio: " + minCurvRatio + "\n"; + str += "Min angle cosine: " + minAngleCos + "\n"; + str += "Min norm angle cosine: " + minNormAngleCos + "\n"; + str += "Max relative distance: " + maxRelDistance + "\n"; + str += "Significant points: " + significantPointCount + "\n"; + str += "Averaging: " + averaging + "\n"; + return str; + } +} \ No newline at end of file diff --git a/Comparison/src/main/java/cz/fidentis/analyst/symmetry/Plane.java b/Comparison/src/main/java/cz/fidentis/analyst/symmetry/Plane.java new file mode 100644 index 0000000000000000000000000000000000000000..c68e0f4e051c56fc1225b3efa130d435cb1a23b1 --- /dev/null +++ b/Comparison/src/main/java/cz/fidentis/analyst/symmetry/Plane.java @@ -0,0 +1,97 @@ +package cz.fidentis.analyst.symmetry; + +import cz.fidentis.analyst.mesh.core.MeshFacet; +import cz.fidentis.analyst.mesh.core.MeshPoint; + +/** + * + * @author Natália Bebjaková + * + * Representation of the plane + */ +public class Plane { + public double a; + public double b; + public double c; + public double d; + private static MeshFacet facet; + + /** + * Creates new plane + * + * @param a a coordinate + * @param b b coordinate + * @param c c coordinate + * @param d d coordinate + */ + public Plane(double a, double b, double c, double d) { + this.a = a; + this.b = b; + this.c = c; + this.d = d; + } + + /** + * Normalize the plane + */ + public void normalize() { + double normalLength = Math.sqrt(a * a + b * b + c * c); + + a /= normalLength; + b /= normalLength; + c /= normalLength; + d /= normalLength; + } + + /** + * Returns plane that is represented by mesh which can be merged with model + * + * @param centroid middle point of the plane + * @param a a coordinate + * @param b b coordinate + * @param scale distance of points given by bounding box + * @return plane represented as mesh + */ + public static SymmetryEstimator createPlaneMesh(MeshPoint centroid, MeshPoint a, MeshPoint b, double scale) { + facet = new MeshFacet(); + SymmetryEstimator planeMesh = new SymmetryEstimator(facet, Config.getDefault()); + + MeshPoint[] points = new MeshPoint[4]; + + points[0] = centroid.subtractPosition(a.multiplyPosition(scale)).subtractPosition(b.multiplyPosition(scale)); + points[1] = centroid.subtractPosition(a.multiplyPosition(scale)).addPosition(b.multiplyPosition(scale)); + points[2] = centroid.addPosition(a.multiplyPosition(scale)).addPosition(b.multiplyPosition(scale)); + points[3] = centroid.addPosition(a.multiplyPosition(scale)).subtractPosition(b.multiplyPosition(scale)); + + for (MeshPoint point : points) { + facet.addVertex(point); + } + + Triangle[] triangles = new Triangle[4]; + + triangles[0] = new Triangle(0, 1, 2); + triangles[1] = new Triangle(0, 2, 3); + triangles[2] = new Triangle(0, 2, 1); + triangles[3] = new Triangle(0, 3, 2); + planeMesh.setTriangles(triangles); + + MeshPoint[] normals = planeMesh.calculateNormals(); + + facet.getVertices().clear(); + + for (int i = 0; i < points.length; i++) { + facet.addVertex(new MeshPoint(points[i].getPosition(),normals[i].getPosition(),null)); + } + return planeMesh; + } + + /** + * Returns string description of the plane + * + * @return description of the plane + */ + @Override + public String toString(){ + return "APPROXIMATE PLANE:\n" + a + "\n" + b + "\n" + c + "\n" + d + "\n"; + } +} diff --git a/Comparison/src/main/java/cz/fidentis/analyst/symmetry/SymmetryEstimator.java b/Comparison/src/main/java/cz/fidentis/analyst/symmetry/SymmetryEstimator.java new file mode 100644 index 0000000000000000000000000000000000000000..e42754f6b17476f8e63a68baead6b8d8464de4f5 --- /dev/null +++ b/Comparison/src/main/java/cz/fidentis/analyst/symmetry/SymmetryEstimator.java @@ -0,0 +1,770 @@ +package cz.fidentis.analyst.symmetry; + +import cz.fidentis.analyst.mesh.core.CornerTableRow; +import cz.fidentis.analyst.mesh.core.MeshFacet; +import cz.fidentis.analyst.mesh.core.MeshPoint; +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; +import javax.swing.ImageIcon; +import javax.swing.JOptionPane; +import javax.swing.JPanel; +import javax.swing.ProgressMonitor; +import javax.swing.UIManager; +import javax.vecmath.Vector3d; + +/** + * + * @author Natália Bebjaková + * + * Main class for computing approximate plane of symmetry of the 3D model. + * For computing the symmetry, for every + * Default values of the configuration are given due to the best results on tested objects. + * On many different 3D models, it exists other values of config that will have better impact on result. + * + */ +public class SymmetryEstimator { + /** + * Facet of the model on which symmetry is computed + */ + private final MeshFacet facet; + /** + * Representation for areas of Voronoi region of triangles + */ + private TriangleVertexAreas[] areas; + /** + * Represent min-max box. It is automatically maintained by given point array. + */ + private BoundingBox boundingBox; + /** + * Helping array of triangles computed from corner table + */ + protected Triangle[] triangles; + /** + * panel for configuration of symmetry counting + */ + private JPanel panel; + + private final Config config; + + /** + * + * @return configuration of optional parameters of the algorithm + */ + public Config getConfig() { + return config; + } + + /** + * + * @return panel for configuration of symmetry counting + */ + public JPanel getPanel() { + return panel; + } + + /** + * + * @param panel new panel for configuration of symmetry counting + */ + public void setPanel(JPanel panel) { + this.panel = panel; + } + + + /** + * + * @return Facet of the model on which symmetry is computed + */ + public MeshFacet getFacet() { + return facet; + } + + /** + * Creates new class for computing symmetry + * + * @param f facet on which symmetry will be computed + * @param config configuration of optional parameters of the algorithm + */ + public SymmetryEstimator(MeshFacet f, Config config) { + this.facet = f; + this.config = config; + + initTriangles(); + initArrayOfTriangleVertexAreas(); + + boundingBox = new BoundingBox(facet.getVertices()); + } + + /** + * If bounding box is not created yet, it creates new one. + * + * @return Represent min-max box of the boundries of the model. + */ + public BoundingBox getBoundingBox() { + if (boundingBox == null) { + boundingBox = new BoundingBox(facet.getVertices()); + } + return boundingBox; + } + + /** + * + * @param boundingBox new min-max box of the boundries of the model. + */ + public void setBoundingBox(BoundingBox boundingBox) { + this.boundingBox = boundingBox; + } + + /** + * + * @return array of triangles + */ + public Triangle[] getTriangles() { + return triangles; + } + + /** + * + * @param triangles new array of triangles + */ + public void setTriangles(Triangle[] triangles) { + this.triangles = triangles; + } + + /** + * Representation of areas of Voronoi region of triangles + * used for computing Gaussian curvature + * + * @author Natália Bebjaková + */ + private class TriangleVertexAreas { + public double v1Area; + public double v2Area; + public double v3Area; + } + + /** + * Computes triangles of facet from corner table + */ + public void initTriangles() { + triangles = new Triangle[facet.getCornerTable().getSize() / 3]; + for (int i = 0; i < facet.getCornerTable().getSize(); i += 3) { + Triangle t = new Triangle(facet.getCornerTable().getRow(i).getVertexIndex(), + facet.getCornerTable().getRow(i + 1).getVertexIndex(), + facet.getCornerTable().getRow(i + 2).getVertexIndex()); + triangles[(i / 3)] = t; + } + } + + /** + * Calculates new normals of the points for models that do not have normals + * + * @return new normals represented as mesh points so that math operations can be done + */ + public MeshPoint[] calculateNormals() { + MeshPoint[] newNormals = new MeshPoint[facet.getNumberOfVertices()]; + for (int i = 0; i < facet.getNumberOfVertices(); i++) { + newNormals[i] = new MeshPoint(new Vector3d(0, 0, 0), null, null); + } + for (Triangle t : triangles) { + MeshPoint triangleNormal = (facet.getVertices().get(t.vertex3).subtractPosition + (facet.getVertices().get(t.vertex1))).crossProduct(facet.getVertices().get(t.vertex2).subtractPosition(facet.getVertices().get(t.vertex1))); + newNormals[t.vertex1] = newNormals[t.vertex1].addPosition(new MeshPoint(triangleNormal.getPosition(), null, null)); + newNormals[t.vertex2] = newNormals[t.vertex2].addPosition(new MeshPoint(triangleNormal.getPosition(), null, null)); + newNormals[t.vertex3] = newNormals[t.vertex3].addPosition(new MeshPoint(triangleNormal.getPosition(), null, null)); + } + for (int i = 0; i < newNormals.length; i++){ + if (newNormals[i].getPosition().x != 0 && newNormals[i].getPosition().y != 0 && newNormals[i].getPosition().z != 0) { + newNormals[i] = newNormals[i].dividePosition(newNormals[i].abs()); + } + } + return newNormals; + } + + /** + * + * @param pointIndex index of point for which we are searching traingles in its neighborhood + * @return triangle neighbours of given index of vertex + */ + public List<Integer> getNeighbours(int pointIndex) { + List<Integer> neighbours = facet.getCornerTable().getTriangleIndexesByVertexIndex(pointIndex); + return neighbours; + } + + /** + * Return area of Voronoi region of triangle + * + * @param t triangle of which area is computed + * @return area of Voronoi region + */ + private TriangleVertexAreas computeTriangleVertexAreas(Triangle t) { + MeshPoint circumcenter; + + MeshPoint tVertex1 = facet.getVertices().get(t.vertex1); + MeshPoint tVertex2 = facet.getVertices().get(t.vertex2); + MeshPoint tVertex3 = facet.getVertices().get(t.vertex3); + + double a = (tVertex2.subtractPosition(tVertex3)).abs(); + double b = (tVertex3.subtractPosition(tVertex1)).abs(); + double c = (tVertex2.subtractPosition(tVertex1)).abs(); + + double d1 = a * a * (b * b + c * c - a * a); + double d2 = b * b * (c * c + a * a - b * b); + double d3 = c * c * (a * a + b * b - c * c); + double dSum = d1 + d2 + d3; + + d1 /= dSum; + d2 /= dSum; + d3 /= dSum; + + MeshPoint v1Half = (tVertex2.addPosition(tVertex3)).dividePosition(2); + MeshPoint v2Half = (tVertex1.addPosition(tVertex3)).dividePosition(2); + MeshPoint v3Half = (tVertex2.addPosition(tVertex1)).dividePosition(2); + + + TriangleVertexAreas area = new TriangleVertexAreas(); + + if (d1 < 0) { + area.v3Area = ((v2Half.subtractPosition(tVertex3)).crossProduct(v1Half.subtractPosition(tVertex3))).abs() / 2; + area.v2Area = ((v3Half.subtractPosition(tVertex2)).crossProduct(v1Half.subtractPosition(tVertex2))).abs() / 2; + area.v1Area = (((v1Half.subtractPosition(tVertex1)).crossProduct(v3Half.subtractPosition(tVertex1))).abs() / 2) + + (((v1Half.subtractPosition(tVertex1)).crossProduct(v2Half.subtractPosition(tVertex1))).abs() / 2); + return area; + } + if (d2 < 0) { + area.v1Area = ((v3Half.subtractPosition(tVertex1)).crossProduct(v2Half.subtractPosition(tVertex1))).abs() / 2; + area.v3Area = ((v1Half.subtractPosition(tVertex3)).crossProduct(v2Half.subtractPosition(tVertex3))).abs() / 2; + area.v2Area = (((v2Half.subtractPosition(tVertex2)).crossProduct(v1Half.subtractPosition(tVertex2))).abs() / 2) + + (((v2Half.subtractPosition(tVertex2)).crossProduct(v3Half.subtractPosition(tVertex2))).abs() / 2); + return area; + } + if (d3 < 0) { + area.v2Area = ((v1Half.subtractPosition(tVertex2)).crossProduct(v3Half.subtractPosition(tVertex2))).abs() / 2; + area.v1Area = ((v2Half.subtractPosition(tVertex1)).crossProduct(v3Half.subtractPosition(tVertex1))).abs() / 2; + area.v3Area = (((v3Half.subtractPosition(tVertex3)).crossProduct(v2Half.subtractPosition(tVertex3))).abs() / 2) + + (((v3Half.subtractPosition(tVertex3)).crossProduct(v1Half.subtractPosition(tVertex3))).abs() / 2); + return area; + } + + circumcenter = tVertex1.multiplyPosition(d1).addPosition(tVertex2.multiplyPosition(d2).addPosition(tVertex3.multiplyPosition(d3))); + + area.v1Area = (((v2Half.subtractPosition(tVertex1)).crossProduct(circumcenter.subtractPosition(tVertex1))).abs() / 2) + + (((v3Half.subtractPosition(tVertex1)).crossProduct(circumcenter.subtractPosition(tVertex1))).abs() / 2); + + area.v2Area = (((v3Half.subtractPosition(tVertex2)).crossProduct(circumcenter.subtractPosition(tVertex2))).abs() / 2) + + (((v1Half.subtractPosition(tVertex2)).crossProduct(circumcenter.subtractPosition(tVertex2))).abs() / 2); + + area.v3Area = (((v1Half.subtractPosition(tVertex3)).crossProduct(circumcenter.subtractPosition(tVertex3))).abs() / 2) + + (((v2Half.subtractPosition(tVertex3)).crossProduct(circumcenter.subtractPosition(tVertex3))).abs() / 2); + return area; + } + + /** + * Computes area of Voronoi region for all triangles + */ + private void initArrayOfTriangleVertexAreas() { + areas = new TriangleVertexAreas[triangles.length]; + for (int i = 0; i < areas.length; i++) { + areas[i] = computeTriangleVertexAreas(triangles[i]); + } + } + + /** + * Calculates angle of the triangle according to centerIndex + * + * @param centerIndex centerIndex + * @param t triangle + * @return angle + */ + private double calculateTriangleAlfa(int centerIndex, Triangle t) { + MeshPoint tVertex1 = facet.getVertices().get(t.vertex1); + MeshPoint tVertex2 = facet.getVertices().get(t.vertex2); + MeshPoint tVertex3 = facet.getVertices().get(t.vertex3); + + double alfaCos = 0; + + if (t.vertex1 == centerIndex) { + MeshPoint e1 = tVertex1.subtractPosition(tVertex3); + e1 = e1.dividePosition(e1.abs()); + + MeshPoint e2 = tVertex2.subtractPosition(tVertex3); + e2 = e2.dividePosition(e2.abs()); + + alfaCos = e1.dotProduct(e2); + } else if (t.vertex2 == centerIndex) { + + MeshPoint e1 = tVertex2.subtractPosition(tVertex1); + e1 = e1.dividePosition(e1.abs()); + + MeshPoint e2 = tVertex3.subtractPosition(tVertex1); + e2 = e2.dividePosition(e2.abs()); + + alfaCos = e1.dotProduct(e2); + } else if (t.vertex3 == centerIndex){ + MeshPoint e1 = tVertex3.subtractPosition(tVertex2); + e1 = e1.dividePosition(e1.abs()); + + MeshPoint e2 = tVertex1.subtractPosition(tVertex2); + e2 = e2.dividePosition(e2.abs()); + + alfaCos = e1.dotProduct(e2); + } + double alfa = Math.acos(alfaCos); + return 1 / Math.tan(alfa); + } + + /** + * Calculates angle of the triangle according to centerIndex + * + * @param centerIndex centerIndex + * @param t triangle + * @return angle + */ + private double calculateTriangleBeta(int centerIndex, Triangle t) { + MeshPoint tVertex1 = facet.getVertices().get(t.vertex1); + MeshPoint tVertex2 = facet.getVertices().get(t.vertex2); + MeshPoint tVertex3 = facet.getVertices().get(t.vertex3); + + double betaCos = 0; + + if (t.vertex1 == centerIndex) { + MeshPoint e1 = tVertex1.subtractPosition(tVertex2); + e1 = e1.dividePosition(e1.abs()); + + MeshPoint e2 = tVertex3.subtractPosition(tVertex2); + e2 = e2.dividePosition(e2.abs()); + + betaCos = e1.dotProduct(e2); + } else if (t.vertex2 == centerIndex) { + + MeshPoint e1 = tVertex2.subtractPosition(tVertex3); + e1 = e1.dividePosition(e1.abs()); + + MeshPoint e2 = tVertex1.subtractPosition(tVertex3); + e2 = e2.dividePosition(e2.abs()); + + betaCos = e1.dotProduct(e2); + } else if (t.vertex3 == centerIndex){ + MeshPoint e1 = tVertex3.subtractPosition(tVertex1); + e1 = e1.dividePosition(e1.abs()); + + MeshPoint e2 = tVertex2.subtractPosition(tVertex1); + e2 = e2.dividePosition(e2.abs()); + + betaCos = e1.dotProduct(e2); + } + double beta = Math.acos(betaCos); + return 1 / Math.tan(beta); + } + + /** + * Calculates Laplacian + * + * @param centerIndex centerIndex + * @return laplacian + */ + private MeshPoint calculateLaplacian(int centerIndex) { + List<Integer> trianglesNeighbours = getNeighbours(centerIndex); + + if (trianglesNeighbours.isEmpty()) { + return new MeshPoint(new Vector3d(), new Vector3d(), new Vector3d()); + } + double areaSum = 0; + MeshPoint pointSum = new MeshPoint(new Vector3d(), new Vector3d(), new Vector3d()); + for (int i = 0; i < trianglesNeighbours.size(); i++) { + Triangle t = triangles[trianglesNeighbours.get(i)]; + Triangle tNext = triangles[trianglesNeighbours.get((i + 1) % trianglesNeighbours.size())]; + double area = 0; + + MeshPoint tVertex1 = facet.getVertices().get(t.vertex1); + MeshPoint tVertex2 = facet.getVertices().get(t.vertex2); + MeshPoint tVertex3 = facet.getVertices().get(t.vertex3); + MeshPoint centerPoint = facet.getVertices().get(centerIndex); + + if (t.vertex1 == centerIndex) { + area = areas[trianglesNeighbours.get(i)].v1Area; + pointSum = pointSum.addPosition((tVertex2.subtractPosition(centerPoint)).multiplyPosition((calculateTriangleAlfa(centerIndex, t) + + calculateTriangleBeta(centerIndex, tNext)) / 2)); + + } else if (t.vertex2 == centerIndex) { + area = areas[trianglesNeighbours.get(i)].v2Area; + pointSum = pointSum.addPosition((tVertex3.subtractPosition(centerPoint)).multiplyPosition((calculateTriangleAlfa(centerIndex, t) + + calculateTriangleBeta(centerIndex, tNext)) / 2)); + } else if (t.vertex3 == centerIndex) { + area = areas[trianglesNeighbours.get(i)].v3Area; + pointSum = pointSum.addPosition((tVertex1.subtractPosition(centerPoint)).multiplyPosition((calculateTriangleAlfa(centerIndex, t) + + calculateTriangleBeta(centerIndex, tNext)) / 2)); + } + areaSum += area; + } + return pointSum.multiplyPosition(1 / areaSum); + } + + /** + * Gaussian curvature in a vertex of a triangle mesh. + * It can only be estimated because triangle mesh is not a continuous + * but discrete representation of surface. + * + * @param centerIndex index of vertex in which gaussian curvature is computed + * @return Gaussian curvature in given vertex + */ + private double getGaussianCurvature(int centerIndex) { + + List<Integer> triangleNeighbours = this.getNeighbours(centerIndex); + + if (triangleNeighbours.isEmpty()) { + return Double.NaN; + } + double sum = 2 * Math.PI; + double areaSum = 0; + + for (int i = 0; i < triangleNeighbours.size(); i++) { + MeshPoint v1 = new MeshPoint(new Vector3d(), new Vector3d(), new Vector3d()); + MeshPoint v2 = new MeshPoint(new Vector3d(), new Vector3d(), new Vector3d()); + Triangle t = triangles[triangleNeighbours.get(i)]; + + MeshPoint tVertex1 = facet.getVertices().get(t.vertex1); + MeshPoint tVertex2 = facet.getVertices().get(t.vertex2); + MeshPoint tVertex3 = facet.getVertices().get(t.vertex3); + + double area = 0; + if (t.vertex1 == centerIndex) { + v1 = tVertex2.subtractPosition(tVertex1); + v2 = tVertex3.subtractPosition(tVertex1); + + area = areas[triangleNeighbours.get(i)].v1Area; + } else if (t.vertex2 == centerIndex) { + v1 = tVertex1.subtractPosition(tVertex2); + v2 = tVertex3.subtractPosition(tVertex2); + + area = areas[triangleNeighbours.get(i)].v2Area; + } else if (t.vertex3 == centerIndex) { + v1 = tVertex2.subtractPosition(tVertex3); + v2 = tVertex1.subtractPosition(tVertex3); + + area = areas[triangleNeighbours.get(i)].v3Area; + } + + areaSum += area; + v1 = v1.dividePosition(v1.abs()); + v2 = v2.dividePosition(v2.abs()); + + sum -= Math.acos(v1.dotProduct(v2)); + } + double value = sum * (1.0 / areaSum); + return value; + } + + /** + * + * @param centerIndex center index + * @return mean curvature + */ + private double getMeanCurvature(int centerIndex) { + return calculateLaplacian(centerIndex).abs(); + } + + /** + * + * @param centerIndex center index + * @return max curvature + */ + private double getMaxCurvature(int centerIndex) { + double gaussianCurvature = getGaussianCurvature(centerIndex); + if (Double.isNaN(gaussianCurvature)) { + return Double.NaN; + } + double meanCurvature = getMeanCurvature(centerIndex); + double meanCurvatureSqr = meanCurvature * meanCurvature; + if (meanCurvatureSqr <= gaussianCurvature) { + return meanCurvature; + } + return meanCurvature + Math.sqrt(meanCurvatureSqr - gaussianCurvature); + } + + /** + * Computes votes for given plane + * + * @param plane Plane for which votes are computed + * @param curvatures significant curvatures chosen for computing + * @param points significant points chosen for computing + * @param minCurvRatio optional parameter from configuration + * @param minAngleCos optional parameter from configuration + * @param minNormAngleCos optional parameter from configuration + * @param maxDist optional parameter from configuration + * @return total votes given to plane while computing the symmetry + */ + private int getVotes(Plane plane, + ArrayList<Double> curvatures, + ArrayList<Integer> points, + double minCurvRatio, + double minAngleCos, + double minNormAngleCos, + double maxDist) { + + plane.normalize(); + + MeshPoint normal = new MeshPoint((new Vector3d(plane.a, plane.b, plane.c)),new Vector3d(), new Vector3d()); + double d = plane.d; + double maxCurvRatio = 1.0 / minCurvRatio; + int votes = 0; + MeshPoint[] normals = calculateNormals(); + + for (int i = 0; i < curvatures.size(); i++) { + for (int j = 0; j < curvatures.size(); j++) { + if (i != j && (curvatures.get(i) / curvatures.get(j) >= minCurvRatio + && curvatures.get(i) / curvatures.get(j) <= maxCurvRatio)) { + + MeshPoint vec = facet.getVertices().get(points.get(i)).subtractPosition(facet.getVertices().get(points.get(j))); + vec = vec.dividePosition(vec.abs()); + double cos = vec.dotProduct(normal); + + MeshPoint ni; + + ni = new MeshPoint (new Vector3d(normals[points.get(i)].getPosition().x,normals[points.get(i)].getPosition().y, + normals[points.get(i)].getPosition().z), new Vector3d(), new Vector3d()); + + ni = ni.dividePosition(ni.abs()); + + MeshPoint nj; + nj = new MeshPoint (new Vector3d(normals[points.get(j)].getPosition().x,normals[points.get(j)].getPosition().y, + normals[points.get(j)].getPosition().z), new Vector3d(), new Vector3d()); + nj = nj.dividePosition(nj.abs()); + + MeshPoint normVec = ni.subtractPosition(nj); + normVec = normVec.dividePosition(normVec.abs()); + double normCos = normVec.dotProduct(normal); + + if (Math.abs(cos) >= minAngleCos && Math.abs(normCos) >= minNormAngleCos) { + MeshPoint avrg = (facet.getVertices().get(points.get(i)).addPosition(facet.getVertices().get(points.get(j)))).dividePosition(2.0); + + double dist = normal.getPosition().x * avrg.getPosition().x + + normal.getPosition().y * avrg.getPosition().y + normal.getPosition().z * avrg.getPosition().z + d; + + dist = Math.abs(dist); + + if (dist <= maxDist) { + votes++; + } + } + } + } + } + return votes; + } + + /** + * + * + * @return approximate plane of symmtetry + */ + public Plane getAproxSymmetryPlane() { + + UIManager.put("ProgressMonitor.progressText", "Counting symmetry..."); + + ArrayList<AproxSymmetryPlane> planes = new ArrayList<>(); + MeshPoint[] normals = calculateNormals(); + double[] curvatures = new double[facet.getNumberOfVertices()]; + for (int i = 0; i < facet.getNumberOfVertices(); i++) { + if (facet.getNumberOfVertices() == 2500) { + curvatures[i] = this.getMaxCurvature(i); + } else { + curvatures[i] = this.getGaussianCurvature(i); + } + if (Double.isNaN(curvatures[i])){ + curvatures[i] = Double.MIN_VALUE; + } + } + ArrayList<Double> sortedCurvatures = new ArrayList<>(); + for (int i = 0; i < curvatures.length; i++) { + sortedCurvatures.add(curvatures[i]); + } + Collections.sort(sortedCurvatures); + + if(config.getSignificantPointCount() > facet.getNumberOfVertices()) { + config.setSignificantPointCount((facet.getNumberOfVertices()) - 1); + } + double bottomCurvature = sortedCurvatures.get(sortedCurvatures.size() - 1 - config.getSignificantPointCount()); + + ArrayList<Integer> significantPoints = new ArrayList<>(); + ArrayList<Double> significantCurvatures = new ArrayList<>(); + + for (int i = 0; i < facet.getNumberOfVertices(); i++) { + if (curvatures[i] >= bottomCurvature) { + significantCurvatures.add(curvatures[i]); + significantPoints.add(i); + } + } + + Plane plane = new Plane(0, 0, 0, 0); + int lastVotes = 0; + + ProgressMonitor progressMonitor; + progressMonitor = new ProgressMonitor(panel, "Cunting...", + "Steps", 0, significantPoints.size()); + + double onePercent = significantCurvatures.size() / 100.0; + double percentsPerStep = 1 / onePercent; + for (int i = 0; i < significantPoints.size(); i++) { + for (int j = 0; j < significantPoints.size(); j++) { + if (i != j) { + double minRatio = config.getMinCurvRatio(); + double maxRatio = 1.0 / minRatio; + if (significantCurvatures.get(i) / significantCurvatures.get(j) >= minRatio && significantCurvatures.get(i) / + significantCurvatures.get(j) <= maxRatio) { + + MeshPoint p1 = facet.getVertex(significantPoints.get(i)); + MeshPoint p2 = facet.getVertex(significantPoints.get(j)); + MeshPoint avrg = (p1.addPosition(p2)).dividePosition(2.0); + MeshPoint normal = (p1.subtractPosition(p2)); + + normal = normal.dividePosition(normal.abs()); + double d = -(normal.getPosition().x * avrg.getPosition().x) - + (normal.getPosition().y * avrg.getPosition().y) - (normal.getPosition().z * avrg.getPosition().z); + + MeshPoint ni; + ni = new MeshPoint (new Vector3d(normals[significantPoints.get(i)].getPosition().x, + normals[significantPoints.get(i)].getPosition().y, + normals[significantPoints.get(i)].getPosition().z), + new Vector3d(), new Vector3d()); + + ni = ni.dividePosition(ni.abs()); + + MeshPoint nj; + nj = new MeshPoint (new Vector3d(normals[significantPoints.get(j)].getPosition().x, + normals[significantPoints.get(j)].getPosition().y, + normals[significantPoints.get(j)].getPosition().z), + new Vector3d(), new Vector3d()); + + nj = nj.dividePosition(nj.abs()); + + MeshPoint normVec = ni.subtractPosition(nj); + normVec = normVec.dividePosition(normVec.abs()); + double normCos = normVec.dotProduct(normal); + + if (Math.abs(normCos) >= config.getMinNormAngleCos()) { + + Plane newPlane = new Plane(normal.getPosition().x, normal.getPosition().y, normal.getPosition().z, d); + int currentVotes = getVotes(newPlane, + significantCurvatures, + significantPoints, + config.getMinCurvRatio(), + config.getMinAngleCos(), + config.getMinNormAngleCos(), + boundingBox.getMaxDiag() * config.getMaxRelDistance()); + + + planes.add(new AproxSymmetryPlane(newPlane, currentVotes)); + + if (currentVotes > lastVotes) { + lastVotes = currentVotes; + plane = newPlane; + } + } + + } + } + } + progressMonitor.setNote("Task step: " + (int) ((i + 1) * percentsPerStep)); + progressMonitor.setProgress(i); + } + + Collections.sort(planes); + ArrayList<AproxSymmetryPlane> finalPlanes = new ArrayList<>(); + for (int i = 0; i < planes.size(); i++) { + if (planes.get(i).votes == lastVotes){ + finalPlanes.add(planes.get(i)); + } + } + Plane finalPlane = new Plane(0, 0, 0, 0); + MeshPoint refDir = new MeshPoint(new Vector3d(finalPlanes.get(0).a, finalPlanes.get(0).b, finalPlanes.get(0).c), new Vector3d(), new Vector3d()); + for (int i = 0; i < finalPlanes.size(); i++) { + MeshPoint normDir = new MeshPoint(new Vector3d(finalPlanes.get(i).a, finalPlanes.get(i).b, finalPlanes.get(i).c), new Vector3d(), new Vector3d()); + if (normDir.dotProduct(refDir) < 0) { + finalPlane.a -= finalPlanes.get(i).a; + finalPlane.b -= finalPlanes.get(i).b; + finalPlane.c -= finalPlanes.get(i).c; + finalPlane.d -= finalPlanes.get(i).d; + } else { + finalPlane.a += finalPlanes.get(i).a; + finalPlane.b += finalPlanes.get(i).b; + finalPlane.c += finalPlanes.get(i).c; + finalPlane.d += finalPlanes.get(i).d; + } + } + finalPlane.normalize(); + if (config.isAveraging()){ + plane = finalPlane; + } + JOptionPane.showMessageDialog(panel, "Symmetry estimate done.", "Done", 0, + new ImageIcon(getClass().getResource("/cz/fidentis/analyst/gui/resources/exportedModel.png"))); + + progressMonitor.close(); + return plane; + } + + /** + * + * @param plane Plane computed as symmetry plane + * @return mesh that represents facet with computed plane of approximate symmetry + */ + public SymmetryEstimator mergeWithPlane(Plane plane) { + MeshPoint normal = new MeshPoint(new Vector3d(plane.a, plane.b, plane.c), new Vector3d(), new Vector3d()); + MeshPoint midPoint = boundingBox.getMidPoint(); + + double alpha = -((plane.a * midPoint.getPosition().x) + + (plane.b * midPoint.getPosition().y) + (plane.c * midPoint.getPosition().z) + + plane.d) / (normal.dotProduct(normal)); + + MeshPoint midPointOnPlane = midPoint.addPosition(normal.multiplyPosition(alpha)); + + double val = plane.a * midPointOnPlane.getPosition().x + plane.b * + midPointOnPlane.getPosition().y + plane.c * + midPointOnPlane.getPosition().z + plane.d; + + MeshPoint a; + if (Math.abs(normal.dotProduct(new MeshPoint(new Vector3d(0.0, 1.0, 0.0), new Vector3d(), new Vector3d()))) + > Math.abs(normal.dotProduct(new MeshPoint(new Vector3d (1.0, 0.0, 0.0), new Vector3d(), new Vector3d())))) { + a = normal.crossProduct(new MeshPoint(new Vector3d(1.0, 0.0, 0.0), new Vector3d(), new Vector3d())); + } else { + a = normal.crossProduct(new MeshPoint(new Vector3d(0.0, 1.0, 0.0), new Vector3d(), new Vector3d())); + } + a = a.dividePosition(a.abs()); + + MeshPoint b = normal.crossProduct(a); + b = b.dividePosition(b.abs()); + + + SymmetryEstimator planeMesh = Plane.createPlaneMesh(midPointOnPlane, a, b, + (boundingBox.getMaxPoint().subtractPosition(boundingBox.getMinPoint())).getPosition().x); + + return mergeMeshWith(planeMesh); + } + + /** + * + * @param s mesh that will be merged + * @return mesh with merged vertices from both meshes + */ + public SymmetryEstimator mergeMeshWith(SymmetryEstimator s) { + CornerTableRow row1 = new CornerTableRow(facet.getNumberOfVertices(), -1); + CornerTableRow row2 = new CornerTableRow(facet.getNumberOfVertices() + 1, facet.getNumberOfVertices() + 3); + CornerTableRow row3 = new CornerTableRow(facet.getNumberOfVertices() + 2, -1); + CornerTableRow row4 = new CornerTableRow(facet.getNumberOfVertices() + 2, -1); + CornerTableRow row5 = new CornerTableRow(facet.getNumberOfVertices() + 3, facet.getNumberOfVertices() + 1); + CornerTableRow row6 = new CornerTableRow(facet.getNumberOfVertices(), -1); + + facet.getCornerTable().addRow(row1); + facet.getCornerTable().addRow(row2); + facet.getCornerTable().addRow(row3); + facet.getCornerTable().addRow(row4); + facet.getCornerTable().addRow(row5); + facet.getCornerTable().addRow(row6); + + for(int n = 0; n < 4; n++) { + facet.addVertex(s.getFacet().getVertices().get(n)); + } + return this; + } +} diff --git a/Comparison/src/main/java/cz/fidentis/analyst/symmetry/Triangle.java b/Comparison/src/main/java/cz/fidentis/analyst/symmetry/Triangle.java new file mode 100644 index 0000000000000000000000000000000000000000..23d919447263b794a86bec721e16724bc4fc48fe --- /dev/null +++ b/Comparison/src/main/java/cz/fidentis/analyst/symmetry/Triangle.java @@ -0,0 +1,102 @@ +package cz.fidentis.analyst.symmetry; + +/** + * + * @author Natália Bebjaková + * + * Helping representation of triangle in symmetry estimate + */ + +public class Triangle { + protected int vertex1; + protected int vertex2; + protected int vertex3; + + /** + * Creates new triangle + * + * @param v1 first vertex + * @param v2 second vertex + * @param v3 third vertex + */ + public Triangle(int v1, int v2, int v3) { + this.vertex1 = v1; + this.vertex2 = v2; + this.vertex3 = v3; + } + /** + * + * @return first vertex of triangle + */ + public int getVertex1() { + return vertex1; + } + + /** + * + * @param vertex1 new vertex + */ + public void setVertex1(int vertex1) { + this.vertex1 = vertex1; + } + + /** + * + * @return second vertex of triangle + */ + public int getVertex2() { + return vertex2; + } + + /** + * + * @param vertex2 new vertex + */ + public void setVertex2(int vertex2) { + this.vertex2 = vertex2; + } + + /** + * + * @return third vertex of triangle + */ + public int getVertex3() { + return vertex3; + } + + /** + * + * @param vertex3 new vertex + */ + public void setVertex3(int vertex3) { + this.vertex3 = vertex3; + } + + /** + * Triangles are same if they have same vertices + * + * @param obj other triangle + * @return true if two triangles are same + */ + @Override + public boolean equals(Object obj) { + if (obj instanceof Triangle) { + Triangle t = (Triangle)obj; + if (((this.vertex1 == t.vertex1) || (this.vertex1 == t.vertex2) || (this.vertex1 == t.vertex3)) && + ((this.vertex2 == t.vertex1) || (this.vertex2 == t.vertex2) || (this.vertex2 == t.vertex3)) && + ((this.vertex3 == t.vertex1) || (this.vertex3 == t.vertex2) || (this.vertex3 == t.vertex3))) { + return (true); + } + } + return (false); + } + + /** + * + * @return hascode of the triangle + */ + @Override + public int hashCode() { + return (this.vertex1 * 100 ^ this.vertex2 * 100 ^ this.vertex3); + } +} diff --git a/Comparison/src/main/nbm/manifest.mf b/Comparison/src/main/nbm/manifest.mf new file mode 100644 index 0000000000000000000000000000000000000000..316179fa5311954f0e7119ce00ba9d8c6457ee4e --- /dev/null +++ b/Comparison/src/main/nbm/manifest.mf @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +OpenIDE-Module-Localizing-Bundle: cz/findetis/comparison/Bundle.properties + diff --git a/Comparison/src/main/resources/cz/findetis/comparison/Bundle.properties b/Comparison/src/main/resources/cz/findetis/comparison/Bundle.properties new file mode 100644 index 0000000000000000000000000000000000000000..200d019b247e9dca057c1542d71e2cb59b3d2ff5 --- /dev/null +++ b/Comparison/src/main/resources/cz/findetis/comparison/Bundle.properties @@ -0,0 +1,6 @@ +#Localized module labels. Defaults taken from POM (<name>, <description>, <groupId>) if unset. +#OpenIDE-Module-Name= +#OpenIDE-Module-Short-Description= +#OpenIDE-Module-Long-Description= +#OpenIDE-Module-Display-Category= +#Mon May 11 15:08:59 CEST 2020 diff --git a/FIDENTIS-Analyst-parent.iml b/FIDENTIS-Analyst-parent.iml new file mode 100644 index 0000000000000000000000000000000000000000..4fd5057cb905c9883efd97f2b04542e4458d711b --- /dev/null +++ b/FIDENTIS-Analyst-parent.iml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="UTF-8"?> +<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4"> + <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_5"> + <output url="file://$MODULE_DIR$/target/classes" /> + <output-test url="file://$MODULE_DIR$/target/test-classes" /> + <content url="file://$MODULE_DIR$"> + <excludeFolder url="file://$MODULE_DIR$/target" /> + </content> + <orderEntry type="inheritedJdk" /> + <orderEntry type="sourceFolder" forTests="false" /> + </component> +</module> \ No newline at end of file diff --git a/GUI/GUI.iml b/GUI/GUI.iml index 0d65c1a1d59c3a0442954dbca08b2beecdca97ab..c8d17b0fcc3fd5901b27b5ab278bf6834713b660 100644 --- a/GUI/GUI.iml +++ b/GUI/GUI.iml @@ -1,23 +1,23 @@ -<?xml version="1.0" encoding="UTF-8"?> -<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4"> - <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_7"> - <output url="file://$MODULE_DIR$/target/classes" /> - <output-test url="file://$MODULE_DIR$/target/test-classes" /> - <content url="file://$MODULE_DIR$"> - <sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" /> - <sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" /> - <excludeFolder url="file://$MODULE_DIR$/target" /> - </content> - <orderEntry type="inheritedJdk" /> - <orderEntry type="sourceFolder" forTests="false" /> - <orderEntry type="library" name="Maven: org.netbeans.api:org-netbeans-api-annotations-common:RELEASE82" level="project" /> - <orderEntry type="module" module-name="MeshModel" /> - <orderEntry type="library" name="Maven: java3d:j3d-core-utils:1.3.1" level="project" /> - <orderEntry type="library" name="Maven: java3d:vecmath:1.3.1" level="project" /> - <orderEntry type="library" name="Maven: java3d:j3d-core:1.3.1" level="project" /> - <orderEntry type="library" name="Maven: com.github.mokiat:java-data-front:v2.0.0" level="project" /> - <orderEntry type="library" name="Maven: javax.vecmath:vecmath:1.5.2" level="project" /> - <orderEntry type="library" name="Maven: org.jogamp.jogl:jogl-all-mobile:2.0.2-rc12" level="project" /> - <orderEntry type="library" name="Maven: org.jogamp.jogl:jogl-all:2.0-rc11" level="project" /> - </component> -</module> \ No newline at end of file +<?xml version="1.0" encoding="UTF-8"?> +<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4"> + <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_7"> + <output url="file://$MODULE_DIR$/target/classes" /> + <output-test url="file://$MODULE_DIR$/target/test-classes" /> + <content url="file://$MODULE_DIR$"> + <sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" /> + <sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" /> + <sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" /> + <excludeFolder url="file://$MODULE_DIR$/target" /> + </content> + <orderEntry type="inheritedJdk" /> + <orderEntry type="sourceFolder" forTests="false" /> + <orderEntry type="library" name="Maven: org.netbeans.api:org-netbeans-api-annotations-common:RELEASE82" level="project" /> + <orderEntry type="library" name="Maven: org.jogamp.jogl:jogl-all:2.0-rc11" level="project" /> + <orderEntry type="module" module-name="MeshModel" /> + <orderEntry type="library" name="Maven: java3d:j3d-core-utils:1.3.1" level="project" /> + <orderEntry type="library" name="Maven: java3d:vecmath:1.3.1" level="project" /> + <orderEntry type="library" name="Maven: java3d:j3d-core:1.3.1" level="project" /> + <orderEntry type="library" name="Maven: com.github.mokiat:java-data-front:v2.0.0" level="project" /> + <orderEntry type="library" name="Maven: javax.vecmath:vecmath:1.5.2" level="project" /> + </component> +</module> diff --git a/GUI/pom.xml b/GUI/pom.xml index 704b5e6fe0e711659ed6335215307ed72571e82b..efeda357b58b45c71271abf8d544a2b32baae2fb 100644 --- a/GUI/pom.xml +++ b/GUI/pom.xml @@ -56,6 +56,47 @@ <artifactId>org-netbeans-api-annotations-common</artifactId> <version>${netbeans.version}</version> </dependency> + <dependency> + <groupId>org.netbeans.api</groupId> + <artifactId>org-openide-util</artifactId> + <version>${netbeans.version}</version> + </dependency> + <dependency> + <groupId>org.netbeans.api</groupId> + <artifactId>org-openide-awt</artifactId> + <version>${netbeans.version}</version> + </dependency> + <dependency> + <groupId>org.netbeans.api</groupId> + <artifactId>org-openide-dialogs</artifactId> + <version>${netbeans.version}</version> + </dependency> + <dependency> + <groupId>org.jogamp.jogl</groupId> + <artifactId>jogl-all</artifactId> + <version>2.3.2</version> + <type>jar</type> + </dependency> + <dependency> + <groupId>org.jogamp.gluegen</groupId> + <artifactId>gluegen-rt-main</artifactId> + <version>2.3.2</version> + </dependency> + <dependency> + <groupId>${project.groupId}</groupId> + <artifactId>MeshModel</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>${project.groupId}</groupId> + <artifactId>Comparison</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>javax.vecmath</groupId> + <artifactId>vecmath</artifactId> + <version>${version.javax.vecmath}</version> + </dependency> </dependencies> <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> diff --git a/GUI/src/main/java/cz/fidentis/analyst/gui/Canvas.form b/GUI/src/main/java/cz/fidentis/analyst/gui/Canvas.form new file mode 100644 index 0000000000000000000000000000000000000000..45e7ae464fa91504631c23830fee4e4b73dfcefd --- /dev/null +++ b/GUI/src/main/java/cz/fidentis/analyst/gui/Canvas.form @@ -0,0 +1,308 @@ +<?xml version="1.0" encoding="UTF-8" ?> + +<Form version="1.9" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JPanelFormInfo"> + <Properties> + <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="0" green="0" red="0" type="rgb"/> + </Property> + </Properties> + <AuxValues> + <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/> + <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/> + <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/> + <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/> + <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/> + <AuxValue name="designerSize" type="java.awt.Dimension" value="-84,-19,0,5,115,114,0,18,106,97,118,97,46,97,119,116,46,68,105,109,101,110,115,105,111,110,65,-114,-39,-41,-84,95,68,20,2,0,2,73,0,6,104,101,105,103,104,116,73,0,5,119,105,100,116,104,120,112,0,0,1,93,0,0,1,-79"/> + </AuxValues> + + <Layout class="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout"/> + <SubComponents> + <Container class="javax.swing.JLayeredPane" name="jLayeredPane1"> + <Properties> + <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="28" green="28" red="28" type="rgb"/> + </Property> + <Property name="toolTipText" type="java.lang.String" value=""/> + <Property name="opaque" type="boolean" value="true"/> + </Properties> + <Events> + <EventHandler event="componentResized" listener="java.awt.event.ComponentListener" parameters="java.awt.event.ComponentEvent" handler="jLayeredPane1ComponentResized"/> + <EventHandler event="componentShown" listener="java.awt.event.ComponentListener" parameters="java.awt.event.ComponentEvent" handler="jLayeredPane1ComponentShown"/> + </Events> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout" value="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout$BorderConstraintsDescription"> + <BorderConstraints direction="Center"/> + </Constraint> + </Constraints> + + <Layout class="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout"> + <Property name="useNullLayout" type="boolean" value="true"/> + </Layout> + <SubComponents> + <Component class="javax.swing.JLabel" name="resetButton"> + <Properties> + <Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor"> + <Image iconType="3" name="/cz/fidentis/analyst/gui/resources/resetButton.png"/> + </Property> + <Property name="toolTipText" type="java.lang.String" value="Reset position of model"/> + <Property name="cursor" type="java.awt.Cursor" editor="org.netbeans.modules.form.editors2.CursorEditor"> + <Color id="Hand Cursor"/> + </Property> + </Properties> + <Events> + <EventHandler event="mouseMoved" listener="java.awt.event.MouseMotionListener" parameters="java.awt.event.MouseEvent" handler="resetButtonMouseMoved"/> + <EventHandler event="mouseClicked" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="resetButtonMouseClicked"/> + <EventHandler event="mouseExited" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="resetButtonMouseExited"/> + </Events> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="60" y="40" width="30" height="30"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JButton" name="upNavigationButton"> + <Properties> + <Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor"> + <Image iconType="3" name="/cz/fidentis/analyst/gui/resources/upButton.png"/> + </Property> + <Property name="toolTipText" type="java.lang.String" value="Rotate up"/> + <Property name="borderPainted" type="boolean" value="false"/> + <Property name="contentAreaFilled" type="boolean" value="false"/> + <Property name="cursor" type="java.awt.Cursor" editor="org.netbeans.modules.form.editors2.CursorEditor"> + <Color id="Hand Cursor"/> + </Property> + </Properties> + <Events> + <EventHandler event="mousePressed" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="upNavigationButtonMousePressed"/> + <EventHandler event="mouseReleased" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="upNavigationButtonMouseReleased"/> + </Events> + <AuxValues> + <AuxValue name="JLayeredPane.layer" type="java.lang.Integer" value="200"/> + </AuxValues> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="60" y="10" width="30" height="30"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JButton" name="leftNavigationButton"> + <Properties> + <Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor"> + <Image iconType="3" name="/cz/fidentis/analyst/gui/resources/leftButton.png"/> + </Property> + <Property name="toolTipText" type="java.lang.String" value="Rotate left"/> + <Property name="borderPainted" type="boolean" value="false"/> + <Property name="contentAreaFilled" type="boolean" value="false"/> + <Property name="cursor" type="java.awt.Cursor" editor="org.netbeans.modules.form.editors2.CursorEditor"> + <Color id="Hand Cursor"/> + </Property> + </Properties> + <Events> + <EventHandler event="mousePressed" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="leftNavigationButtonMousePressed"/> + <EventHandler event="mouseReleased" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="leftNavigationButtonMouseReleased"/> + </Events> + <AuxValues> + <AuxValue name="JLayeredPane.layer" type="java.lang.Integer" value="200"/> + </AuxValues> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="30" y="40" width="30" height="30"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JButton" name="minusNavigationButton"> + <Properties> + <Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor"> + <Image iconType="3" name="/cz/fidentis/analyst/gui/resources/minus.png"/> + </Property> + <Property name="toolTipText" type="java.lang.String" value="Zoom out"/> + <Property name="borderPainted" type="boolean" value="false"/> + <Property name="contentAreaFilled" type="boolean" value="false"/> + <Property name="cursor" type="java.awt.Cursor" editor="org.netbeans.modules.form.editors2.CursorEditor"> + <Color id="Hand Cursor"/> + </Property> + </Properties> + <Events> + <EventHandler event="mousePressed" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="minusNavigationButtonMousePressed"/> + <EventHandler event="mouseReleased" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="minusNavigationButtonMouseReleased"/> + </Events> + <AuxValues> + <AuxValue name="JLayeredPane.layer" type="java.lang.Integer" value="200"/> + </AuxValues> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="90" y="90" width="30" height="30"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JButton" name="downNavigationButton"> + <Properties> + <Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor"> + <Image iconType="3" name="/cz/fidentis/analyst/gui/resources/downButton.png"/> + </Property> + <Property name="toolTipText" type="java.lang.String" value="Rotate down"/> + <Property name="borderPainted" type="boolean" value="false"/> + <Property name="contentAreaFilled" type="boolean" value="false"/> + <Property name="cursor" type="java.awt.Cursor" editor="org.netbeans.modules.form.editors2.CursorEditor"> + <Color id="Hand Cursor"/> + </Property> + </Properties> + <Events> + <EventHandler event="mousePressed" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="downNavigationButtonMousePressed"/> + <EventHandler event="mouseReleased" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="downNavigationButtonMouseReleased"/> + </Events> + <AuxValues> + <AuxValue name="JLayeredPane.layer" type="java.lang.Integer" value="200"/> + </AuxValues> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="60" y="70" width="30" height="30"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JButton" name="plusNavigationButton"> + <Properties> + <Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor"> + <Image iconType="3" name="/cz/fidentis/analyst/gui/resources/plus.png"/> + </Property> + <Property name="toolTipText" type="java.lang.String" value="Zoom in"/> + <Property name="borderPainted" type="boolean" value="false"/> + <Property name="contentAreaFilled" type="boolean" value="false"/> + <Property name="cursor" type="java.awt.Cursor" editor="org.netbeans.modules.form.editors2.CursorEditor"> + <Color id="Hand Cursor"/> + </Property> + </Properties> + <Events> + <EventHandler event="mousePressed" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="plusNavigationButtonMousePressed"/> + <EventHandler event="mouseReleased" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="plusNavigationButtonMouseReleased"/> + </Events> + <AuxValues> + <AuxValue name="JLayeredPane.layer" type="java.lang.Integer" value="200"/> + </AuxValues> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="30" y="90" width="30" height="30"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JLabel" name="jLabel1"> + <Properties> + <Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor"> + <Image iconType="3" name="/cz/fidentis/analyst/gui/resources/navigBackground.png"/> + </Property> + </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="30" y="10" width="90" height="90"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JLabel" name="loadModelButton"> + <Properties> + <Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor"> + <Image iconType="3" name="/cz/fidentis/analyst/gui/resources/loadCanva.png"/> + </Property> + <Property name="toolTipText" type="java.lang.String" value=""/> + <Property name="cursor" type="java.awt.Cursor" editor="org.netbeans.modules.form.editors2.CursorEditor"> + <Color id="Hand Cursor"/> + </Property> + </Properties> + <Events> + <EventHandler event="mouseMoved" listener="java.awt.event.MouseMotionListener" parameters="java.awt.event.MouseEvent" handler="loadModelButtonMouseMoved"/> + <EventHandler event="mouseClicked" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="loadModelButtonMouseClicked"/> + <EventHandler event="mouseExited" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="loadModelButtonMouseExited"/> + </Events> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="200" y="100" width="210" height="220"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JButton" name="rightNavigationButton1"> + <Properties> + <Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor"> + <Image iconType="3" name="/cz/fidentis/analyst/gui/resources/rightButton.png"/> + </Property> + <Property name="toolTipText" type="java.lang.String" value="Rotate right"/> + <Property name="borderPainted" type="boolean" value="false"/> + <Property name="contentAreaFilled" type="boolean" value="false"/> + <Property name="cursor" type="java.awt.Cursor" editor="org.netbeans.modules.form.editors2.CursorEditor"> + <Color id="Hand Cursor"/> + </Property> + </Properties> + <Events> + <EventHandler event="mousePressed" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="rightNavigationButton1MousePressed"/> + <EventHandler event="mouseReleased" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="rightNavigationButton1MouseReleased"/> + </Events> + <AuxValues> + <AuxValue name="JLayeredPane.layer" type="java.lang.Integer" value="200"/> + </AuxValues> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="90" y="40" width="30" height="30"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JLabel" name="whiteBackroundButton"> + <Properties> + <Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor"> + <Image iconType="3" name="/cz/fidentis/analyst/gui/resources/whiteBackroundCanvas.png"/> + </Property> + <Property name="toolTipText" type="java.lang.String" value="White backround"/> + <Property name="cursor" type="java.awt.Cursor" editor="org.netbeans.modules.form.editors2.CursorEditor"> + <Color id="Hand Cursor"/> + </Property> + </Properties> + <Events> + <EventHandler event="mouseClicked" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="whiteBackroundButtonMouseClicked"/> + </Events> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="50" y="130" width="-1" height="-1"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JLabel" name="blackBackroundButton"> + <Properties> + <Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor"> + <Image iconType="3" name="/cz/fidentis/analyst/gui/resources/blackBackroundCanvas.png"/> + </Property> + <Property name="toolTipText" type="java.lang.String" value="Dark background"/> + <Property name="cursor" type="java.awt.Cursor" editor="org.netbeans.modules.form.editors2.CursorEditor"> + <Color id="Hand Cursor"/> + </Property> + </Properties> + <Events> + <EventHandler event="mouseClicked" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="blackBackroundButtonMouseClicked"/> + </Events> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="50" y="190" width="-1" height="-1"/> + </Constraint> + </Constraints> + </Component> + <Container class="javax.swing.JPanel" name="jPanel1"> + <Properties> + <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="0" green="0" red="0" type="rgb"/> + </Property> + </Properties> + <Events> + <EventHandler event="mouseWheelMoved" listener="java.awt.event.MouseWheelListener" parameters="java.awt.event.MouseWheelEvent" handler="jPanel1MouseWheelMoved"/> + </Events> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="0" y="0" width="-1" height="-1"/> + </Constraint> + </Constraints> + + <Layout class="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout"/> + </Container> + </SubComponents> + </Container> + </SubComponents> +</Form> diff --git a/GUI/src/main/java/cz/fidentis/analyst/gui/HelloWorldActionListener.java b/GUI/src/main/java/cz/fidentis/analyst/gui/HelloWorldActionListener.java new file mode 100644 index 0000000000000000000000000000000000000000..aeb1477b6cf15d9bf97d7a2bc5c6253cfdcc8643 --- /dev/null +++ b/GUI/src/main/java/cz/fidentis/analyst/gui/HelloWorldActionListener.java @@ -0,0 +1,34 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package cz.fidentis.analyst.gui; + +/** + * Demo listener for testing. + * + * @author oslejsek + */ +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import org.openide.DialogDisplayer; +import org.openide.NotifyDescriptor; +import org.openide.awt.ActionID; +import org.openide.awt.ActionReference; +import org.openide.awt.ActionRegistration; +import org.openide.util.NbBundle.Messages; + +@ActionID(category = "Window", +id = "com.mycompany.mavenproject2.HelloWorldActionListener") +@ActionRegistration(displayName = "#CTL_HelloWorldActionListener") +@ActionReference(path = "Menu/Window", position = 0) +@Messages("CTL_HelloWorldActionListener=Hello World") +public final class HelloWorldActionListener implements ActionListener { + + public void actionPerformed(ActionEvent e) { + NotifyDescriptor d = new NotifyDescriptor.Message("hello..."); + DialogDisplayer.getDefault().notify(d); + } + +} \ No newline at end of file diff --git a/GUI/src/main/java/cz/fidentis/analyst/gui/SymmetryPanel.form b/GUI/src/main/java/cz/fidentis/analyst/gui/SymmetryPanel.form new file mode 100644 index 0000000000000000000000000000000000000000..65d045392839a2d7c63dd98b9731e7518c2821a6 --- /dev/null +++ b/GUI/src/main/java/cz/fidentis/analyst/gui/SymmetryPanel.form @@ -0,0 +1,505 @@ +<?xml version="1.0" encoding="UTF-8" ?> + +<Form version="1.3" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JPanelFormInfo"> + <AuxValues> + <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/> + <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/> + <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/> + <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/> + <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/> + </AuxValues> + + <Layout> + <DimensionLayout dim="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="symetrySpecificationPanel" alignment="0" max="32767" attributes="0"/> + </Group> + </DimensionLayout> + <DimensionLayout dim="1"> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="symetrySpecificationPanel" alignment="0" max="32767" attributes="0"/> + </Group> + </DimensionLayout> + </Layout> + <SubComponents> + <Container class="javax.swing.JPanel" name="symetrySpecificationPanel"> + <Properties> + <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="e2" green="e6" red="b0" type="rgb"/> + </Property> + </Properties> + + <Layout> + <DimensionLayout dim="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" attributes="0"> + <Group type="103" groupAlignment="1" attributes="0"> + <Group type="102" attributes="0"> + <EmptySpace min="0" pref="0" max="32767" attributes="0"/> + <Component id="defaultValues" min="-2" max="-2" attributes="0"/> + </Group> + <Group type="102" attributes="0"> + <EmptySpace min="-2" pref="17" max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" attributes="0"> + <EmptySpace min="-2" pref="154" max="-2" attributes="0"/> + <Component id="jLabel1" min="-2" max="-2" attributes="0"/> + </Group> + <Group type="102" attributes="0"> + <Component id="showPlaneLabel" min="-2" pref="147" max="-2" attributes="0"/> + <EmptySpace max="32767" attributes="0"/> + <Component id="originalModelButton" min="-2" pref="181" max="-2" attributes="0"/> + </Group> + </Group> + </Group> + <Group type="102" attributes="0"> + <EmptySpace max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" attributes="0"> + <EmptySpace min="-2" pref="10" max="-2" attributes="0"/> + <Component id="minCurvatio8" min="-2" max="-2" attributes="0"/> + <EmptySpace type="unrelated" max="-2" attributes="0"/> + <Component id="averagingCheckBox" min="-2" max="-2" attributes="0"/> + <EmptySpace max="32767" attributes="0"/> + <Component id="symetryButton" min="-2" max="-2" attributes="0"/> + </Group> + <Group type="102" attributes="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="infoMinAngleCos" min="-2" max="-2" attributes="0"/> + <Component id="infoRelDist" alignment="0" min="-2" max="-2" attributes="0"/> + <Component id="infoNormalAngle" alignment="0" min="-2" max="-2" attributes="0"/> + <Component id="infoPoints" alignment="0" min="-2" max="-2" attributes="0"/> + <Component id="infoMinCurv" alignment="0" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="minCurvatio4" pref="157" max="32767" attributes="0"/> + <Group type="102" alignment="0" attributes="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="minCurvatio" min="-2" max="-2" attributes="0"/> + <Component id="minCurvatio3" min="-2" max="-2" attributes="0"/> + <Component id="minCurvatio2" alignment="0" min="-2" max="-2" attributes="0"/> + <Component id="significantPointLabel" alignment="0" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace min="0" pref="0" max="32767" attributes="0"/> + </Group> + </Group> + <EmptySpace max="-2" attributes="0"/> + <Group type="103" groupAlignment="1" attributes="0"> + <Group type="103" groupAlignment="0" max="-2" attributes="0"> + <Component id="curavatureSlider" alignment="1" pref="0" max="32767" attributes="0"/> + <Component id="relativeDistanceSlider" alignment="1" pref="0" max="32767" attributes="0"/> + <Component id="significantPointSlider" alignment="1" min="-2" pref="164" max="-2" attributes="0"/> + <Component id="angleCosineSlider" alignment="1" min="-2" pref="164" max="-2" attributes="0"/> + </Group> + <Component id="normalAngleSlider" min="-2" pref="164" max="-2" attributes="0"/> + </Group> + <EmptySpace type="separate" max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" max="-2" attributes="0"> + <Component id="distanceTextField" max="32767" attributes="0"/> + <Component id="normalTextField" alignment="0" max="32767" attributes="0"/> + <Component id="significantTextField" min="-2" pref="46" max="-2" attributes="0"/> + <Component id="textFieldCurvature" min="-2" pref="46" max="-2" attributes="0"/> + <Component id="textFieldMinCos" min="-2" pref="46" max="-2" attributes="0"/> + </Group> + </Group> + </Group> + </Group> + </Group> + <EmptySpace max="32767" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + <DimensionLayout dim="1"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" attributes="0"> + <EmptySpace max="32767" attributes="0"/> + <Group type="103" groupAlignment="1" attributes="0"> + <Group type="103" alignment="1" groupAlignment="0" attributes="0"> + <Component id="infoPoints" min="-2" max="-2" attributes="0"/> + <Component id="significantPointLabel" min="-2" pref="27" max="-2" attributes="0"/> + </Group> + <Group type="103" alignment="1" groupAlignment="0" attributes="0"> + <Component id="significantTextField" min="-2" max="-2" attributes="0"/> + <Component id="significantPointSlider" min="-2" pref="28" max="-2" attributes="0"/> + </Group> + </Group> + <EmptySpace type="unrelated" max="-2" attributes="0"/> + <Group type="103" groupAlignment="1" attributes="0"> + <Component id="minCurvatio" min="-2" pref="26" max="-2" attributes="0"/> + <Group type="102" alignment="1" attributes="0"> + <Component id="textFieldCurvature" min="-2" max="-2" attributes="0"/> + <EmptySpace min="-2" pref="4" max="-2" attributes="0"/> + </Group> + <Component id="infoMinCurv" min="-2" max="-2" attributes="0"/> + <Component id="curavatureSlider" min="-2" pref="26" max="-2" attributes="0"/> + </Group> + <EmptySpace type="unrelated" max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="infoMinAngleCos" alignment="1" min="-2" max="-2" attributes="0"/> + <Component id="minCurvatio2" alignment="1" min="-2" pref="26" max="-2" attributes="0"/> + <Component id="textFieldMinCos" alignment="0" min="-2" max="-2" attributes="0"/> + <Component id="angleCosineSlider" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace type="unrelated" max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <Group type="103" groupAlignment="0" max="-2" attributes="0"> + <Component id="normalAngleSlider" max="32767" attributes="0"/> + <Component id="normalTextField" max="32767" attributes="0"/> + </Group> + <EmptySpace type="unrelated" min="-2" max="-2" attributes="0"/> + <Component id="distanceTextField" min="-2" max="-2" attributes="0"/> + </Group> + <Group type="102" alignment="0" attributes="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="minCurvatio4" min="-2" pref="27" max="-2" attributes="0"/> + <Component id="infoNormalAngle" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace max="32767" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="infoRelDist" alignment="1" min="-2" max="-2" attributes="0"/> + <Group type="103" alignment="1" groupAlignment="0" attributes="0"> + <Component id="relativeDistanceSlider" min="-2" pref="22" max="-2" attributes="0"/> + <Component id="minCurvatio3" min="-2" pref="26" max="-2" attributes="0"/> + </Group> + </Group> + <EmptySpace min="-2" pref="13" max="-2" attributes="0"/> + </Group> + </Group> + <Component id="defaultValues" min="-2" max="-2" attributes="0"/> + <EmptySpace min="-2" pref="17" max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" attributes="0"> + <Component id="symetryButton" min="-2" pref="75" max="-2" attributes="0"/> + <EmptySpace max="32767" attributes="0"/> + <Component id="originalModelButton" min="-2" max="-2" attributes="0"/> + <EmptySpace max="32767" attributes="0"/> + </Group> + <Group type="102" alignment="0" attributes="0"> + <Group type="103" groupAlignment="1" attributes="0"> + <Component id="averagingCheckBox" min="-2" max="-2" attributes="0"/> + <Component id="minCurvatio8" min="-2" pref="28" max="-2" attributes="0"/> + </Group> + <EmptySpace pref="53" max="32767" attributes="0"/> + <Component id="jLabel1" min="-2" max="-2" attributes="0"/> + <EmptySpace min="-2" pref="45" max="-2" attributes="0"/> + <Component id="showPlaneLabel" min="-2" max="-2" attributes="0"/> + <EmptySpace pref="27" max="32767" attributes="0"/> + </Group> + </Group> + </Group> + </Group> + </DimensionLayout> + </Layout> + <SubComponents> + <Component class="javax.swing.JSlider" name="curavatureSlider"> + <Properties> + <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="fa" green="fa" red="fa" type="rgb"/> + </Property> + <Property name="majorTickSpacing" type="int" value="1"/> + <Property name="minimum" type="int" value="50"/> + <Property name="snapToTicks" type="boolean" value="true"/> + <Property name="cursor" type="java.awt.Cursor" editor="org.netbeans.modules.form.editors2.CursorEditor"> + <Color id="Hand Cursor"/> + </Property> + <Property name="opaque" type="boolean" value="false"/> + </Properties> + </Component> + <Component class="javax.swing.JSlider" name="angleCosineSlider"> + <Properties> + <Property name="minimum" type="int" value="80"/> + <Property name="snapToTicks" type="boolean" value="true"/> + <Property name="cursor" type="java.awt.Cursor" editor="org.netbeans.modules.form.editors2.CursorEditor"> + <Color id="Hand Cursor"/> + </Property> + <Property name="opaque" type="boolean" value="false"/> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="minCurvatio"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Arial" size="14" style="1"/> + </Property> + <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="69" green="72" red="14" type="rgb"/> + </Property> + <Property name="text" type="java.lang.String" value="Min. Curvature Ratio"/> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="minCurvatio2"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Arial" size="14" style="1"/> + </Property> + <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="69" green="72" red="14" type="rgb"/> + </Property> + <Property name="text" type="java.lang.String" value="Min. Angle Cosine"/> + </Properties> + </Component> + <Component class="javax.swing.JSlider" name="normalAngleSlider"> + <Properties> + <Property name="minimum" type="int" value="80"/> + <Property name="snapToTicks" type="boolean" value="true"/> + <Property name="cursor" type="java.awt.Cursor" editor="org.netbeans.modules.form.editors2.CursorEditor"> + <Color id="Hand Cursor"/> + </Property> + <Property name="opaque" type="boolean" value="false"/> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="minCurvatio3"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Arial" size="14" style="1"/> + </Property> + <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="69" green="72" red="14" type="rgb"/> + </Property> + <Property name="text" type="java.lang.String" value="Relative Distance"/> + </Properties> + </Component> + <Component class="javax.swing.JSlider" name="significantPointSlider"> + <Properties> + <Property name="majorTickSpacing" type="int" value="100"/> + <Property name="maximum" type="int" value="300"/> + <Property name="snapToTicks" type="boolean" value="true"/> + <Property name="cursor" type="java.awt.Cursor" editor="org.netbeans.modules.form.editors2.CursorEditor"> + <Color id="Hand Cursor"/> + </Property> + <Property name="opaque" type="boolean" value="false"/> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="minCurvatio4"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Arial" size="14" style="1"/> + </Property> + <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="69" green="72" red="14" type="rgb"/> + </Property> + <Property name="text" type="java.lang.String" value="Normal Angle Cosine"/> + </Properties> + </Component> + <Component class="javax.swing.JSlider" name="relativeDistanceSlider"> + <Properties> + <Property name="maximum" type="int" value="5"/> + <Property name="snapToTicks" type="boolean" value="true"/> + <Property name="cursor" type="java.awt.Cursor" editor="org.netbeans.modules.form.editors2.CursorEditor"> + <Color id="Hand Cursor"/> + </Property> + <Property name="opaque" type="boolean" value="false"/> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="significantPointLabel"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Arial" size="14" style="1"/> + </Property> + <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="69" green="72" red="14" type="rgb"/> + </Property> + <Property name="text" type="java.lang.String" value="Significant Points"/> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="symetryButton"> + <Properties> + <Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor"> + <Image iconType="3" name="/cz/fidentis/analyst/gui/resources/symetryCount.png"/> + </Property> + <Property name="cursor" type="java.awt.Cursor" editor="org.netbeans.modules.form.editors2.CursorEditor"> + <Color id="Hand Cursor"/> + </Property> + </Properties> + <Events> + <EventHandler event="mouseMoved" listener="java.awt.event.MouseMotionListener" parameters="java.awt.event.MouseEvent" handler="symetryButtonMouseMoved"/> + <EventHandler event="mouseClicked" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="symetryButtonMouseClicked"/> + <EventHandler event="mouseExited" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="symetryButtonMouseExited"/> + </Events> + </Component> + <Component class="javax.swing.JCheckBox" name="averagingCheckBox"> + <Properties> + <Property name="selected" type="boolean" value="true"/> + <Property name="opaque" type="boolean" value="false"/> + </Properties> + <Events> + <EventHandler event="mouseClicked" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="averagingCheckBoxMouseClicked"/> + </Events> + </Component> + <Component class="javax.swing.JTextField" name="textFieldCurvature"> + <Properties> + <Property name="text" type="java.lang.String" value="0.5"/> + <Property name="toolTipText" type="java.lang.String" value=""/> + </Properties> + </Component> + <Component class="javax.swing.JTextField" name="textFieldMinCos"> + <Properties> + <Property name="text" type="java.lang.String" value="0.985"/> + <Property name="toolTipText" type="java.lang.String" value=""/> + </Properties> + </Component> + <Component class="javax.swing.JTextField" name="normalTextField"> + <Properties> + <Property name="text" type="java.lang.String" value="0.985"/> + <Property name="toolTipText" type="java.lang.String" value=""/> + </Properties> + </Component> + <Component class="javax.swing.JTextField" name="distanceTextField"> + <Properties> + <Property name="text" type="java.lang.String" value="0.01"/> + <Property name="toolTipText" type="java.lang.String" value=""/> + </Properties> + </Component> + <Component class="javax.swing.JTextField" name="significantTextField"> + <Properties> + <Property name="text" type="java.lang.String" value="200"/> + <Property name="toolTipText" type="java.lang.String" value=""/> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="minCurvatio8"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Arial" size="14" style="1"/> + </Property> + <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="69" green="72" red="14" type="rgb"/> + </Property> + <Property name="text" type="java.lang.String" value="Averaging"/> + <Property name="toolTipText" type="java.lang.String" value="Average planes with highest number of votes"/> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="jLabel1"> + </Component> + <Component class="javax.swing.JLabel" name="originalModelButton"> + <Properties> + <Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor"> + <Image iconType="3" name="/cz/fidentis/analyst/gui/resources/originalModel.png"/> + </Property> + <Property name="cursor" type="java.awt.Cursor" editor="org.netbeans.modules.form.editors2.CursorEditor"> + <Color id="Hand Cursor"/> + </Property> + </Properties> + <Events> + <EventHandler event="mouseMoved" listener="java.awt.event.MouseMotionListener" parameters="java.awt.event.MouseEvent" handler="originalModelButtonMouseMoved"/> + <EventHandler event="mouseClicked" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="originalModelButtonMouseClicked"/> + <EventHandler event="mouseExited" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="originalModelButtonMouseExited"/> + </Events> + </Component> + <Component class="javax.swing.JLabel" name="showPlaneLabel"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Arial" size="16" style="1"/> + </Property> + <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="69" green="72" red="14" type="rgb"/> + </Property> + <Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor"> + <Image iconType="3" name="/cz/fidentis/analyst/gui/resources/show2.png"/> + </Property> + <Property name="text" type="java.lang.String" value="Show plane"/> + <Property name="toolTipText" type="java.lang.String" value="Show approximate plane of symmetry"/> + <Property name="cursor" type="java.awt.Cursor" editor="org.netbeans.modules.form.editors2.CursorEditor"> + <Color id="Hand Cursor"/> + </Property> + <Property name="doubleBuffered" type="boolean" value="true"/> + </Properties> + <Events> + <EventHandler event="mouseClicked" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="showPlaneLabelMouseClicked"/> + </Events> + </Component> + <Component class="javax.swing.JLabel" name="defaultValues"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Arial" size="14" style="0"/> + </Property> + <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="69" green="72" red="14" type="rgb"/> + </Property> + <Property name="text" type="java.lang.String" value="Default values"/> + <Property name="cursor" type="java.awt.Cursor" editor="org.netbeans.modules.form.editors2.CursorEditor"> + <Color id="Hand Cursor"/> + </Property> + </Properties> + <Events> + <EventHandler event="mouseClicked" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="defaultValuesMouseClicked"/> + </Events> + </Component> + <Component class="javax.swing.JLabel" name="infoPoints"> + <Properties> + <Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor"> + <Image iconType="3" name="/cz/fidentis/analyst/gui/resources/info.png"/> + </Property> + <Property name="toolTipText" type="java.lang.String" value="Info "/> + <Property name="cursor" type="java.awt.Cursor" editor="org.netbeans.modules.form.editors2.CursorEditor"> + <Color id="Hand Cursor"/> + </Property> + </Properties> + <Events> + <EventHandler event="mouseClicked" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="infoPointsMouseClicked"/> + </Events> + </Component> + <Component class="javax.swing.JLabel" name="infoMinAngleCos"> + <Properties> + <Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor"> + <Image iconType="3" name="/cz/fidentis/analyst/gui/resources/info.png"/> + </Property> + <Property name="toolTipText" type="java.lang.String" value="Info "/> + <Property name="cursor" type="java.awt.Cursor" editor="org.netbeans.modules.form.editors2.CursorEditor"> + <Color id="Hand Cursor"/> + </Property> + </Properties> + <Events> + <EventHandler event="mouseClicked" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="infoMinAngleCosMouseClicked"/> + </Events> + </Component> + <Component class="javax.swing.JLabel" name="infoRelDist"> + <Properties> + <Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor"> + <Image iconType="3" name="/cz/fidentis/analyst/gui/resources/info.png"/> + </Property> + <Property name="toolTipText" type="java.lang.String" value="Info "/> + <Property name="cursor" type="java.awt.Cursor" editor="org.netbeans.modules.form.editors2.CursorEditor"> + <Color id="Hand Cursor"/> + </Property> + </Properties> + <Events> + <EventHandler event="mouseClicked" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="infoRelDistMouseClicked"/> + </Events> + </Component> + <Component class="javax.swing.JLabel" name="infoNormalAngle"> + <Properties> + <Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor"> + <Image iconType="3" name="/cz/fidentis/analyst/gui/resources/info.png"/> + </Property> + <Property name="toolTipText" type="java.lang.String" value="Info "/> + <Property name="cursor" type="java.awt.Cursor" editor="org.netbeans.modules.form.editors2.CursorEditor"> + <Color id="Hand Cursor"/> + </Property> + </Properties> + <Events> + <EventHandler event="mouseClicked" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="infoNormalAngleMouseClicked"/> + </Events> + </Component> + <Component class="javax.swing.JLabel" name="infoMinCurv"> + <Properties> + <Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor"> + <Image iconType="3" name="/cz/fidentis/analyst/gui/resources/info.png"/> + </Property> + <Property name="toolTipText" type="java.lang.String" value="Info "/> + <Property name="cursor" type="java.awt.Cursor" editor="org.netbeans.modules.form.editors2.CursorEditor"> + <Color id="Hand Cursor"/> + </Property> + </Properties> + <Events> + <EventHandler event="mouseClicked" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="infoMinCurvMouseClicked"/> + </Events> + </Component> + </SubComponents> + </Container> + </SubComponents> +</Form> diff --git a/GUI/src/main/java/cz/fidentis/analyst/gui/SymmetryPanel.java b/GUI/src/main/java/cz/fidentis/analyst/gui/SymmetryPanel.java new file mode 100644 index 0000000000000000000000000000000000000000..2a9889fe2734364490585a4744783e2dcece20bf --- /dev/null +++ b/GUI/src/main/java/cz/fidentis/analyst/gui/SymmetryPanel.java @@ -0,0 +1,726 @@ +package cz.fidentis.analyst.gui; + +import static cz.fidentis.analyst.gui.UserInterface.frameMain; +import cz.fidentis.analyst.mesh.core.MeshModel; +import cz.fidentis.analyst.symmetry.Config; +import cz.fidentis.analyst.symmetry.Plane; +import cz.fidentis.analyst.symmetry.SymmetryEstimator; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.swing.ImageIcon; +import javax.swing.JOptionPane; +import javax.swing.JSlider; +import javax.swing.JTextField; +import javax.swing.event.ChangeEvent; + +/** + * + * @author Natália Bebjaková + * + * Panel for estimating approximate symmetry of the model + */ +public final class SymmetryPanel extends javax.swing.JPanel { + /** + * Configuration with optional parameters of the algorithm + */ + private Config config; + /** + * GL Canvas on which model is displayed + */ + private Canvas canvas; + /** + * Class that is responsible for computing the symmetry + */ + private SymmetryEstimator symCounter; + /** + * Computed approximate plane of the symmetry + */ + private Plane finalPlane; + + /** + * + * @return GL canvas for displaying the model + */ + public Canvas getCanvas() { + return canvas; + } + + /** + * Sets canvas for displaying the model + * + * @param canvas GL Canvas + */ + public void setCanvas(Canvas canvas) { + this.canvas = canvas; + } + + /** + * + * @return Configuration for computing symmetry + */ + public Config getConfig() { + return config; + } + + /** + * + * @param config Configuration for computing symmetry + */ + public void setConfig(Config config) { + this.config = config; + } + + + /** + * Sets configuration values according to text fields on panel + * User can change this text fields + */ + public void setConfigParams() { + config.setMaxRelDistance(Double.parseDouble(distanceTextField.getText())); + config.setMinAngleCos(Double.parseDouble(textFieldMinCos.getText())); + config.setMinCurvRatio(Double.parseDouble(textFieldCurvature.getText())); + config.setMinNormAngleCos(Double.parseDouble(normalTextField.getText())); + config.setSignificantPointCount(Integer.parseInt(significantTextField.getText())); + } + + /** + * Sets values in text field according to configuration + */ + public void setTextFieldsDueToConfig() { + distanceTextField.setText(Double.toString(config.getMaxRelDistance())); + textFieldMinCos.setText(Double.toString(config.getMinAngleCos())); + textFieldCurvature.setText(Double.toString(config.getMinCurvRatio())); + normalTextField.setText(Double.toString(config.getMinNormAngleCos())); + significantTextField.setText(Integer.toString(config.getSignificantPointCount())); + } + + /** + * + * @param slider Slider + * @param field text field which belongs to slider + */ + public void setSlider(JSlider slider, JTextField field) { + slider.setValue((int) (Double.parseDouble(field.getText()) * 100)); + + slider.addChangeListener((ChangeEvent ce) -> { + field.setText(""+slider.getValue()/100.0); + defaultValues.setVisible(true); + }); + + } + + /** + * Sets values of the sliders according to textFields + */ + public void setSliders() { + setSlider(relativeDistanceSlider, distanceTextField); + setSlider(curavatureSlider, textFieldCurvature); + setSlider(angleCosineSlider, textFieldMinCos); + setSlider(normalAngleSlider, normalTextField); + + significantPointSlider.setValue((int) (Double.parseDouble(significantTextField.getText()))); + significantPointSlider.addChangeListener((ChangeEvent ce) -> { + significantTextField.setText("" + significantPointSlider.getValue()); + }); + } + + /** + * If plane of symmtery is computed, three new buttons are shown on panel + * + * @param isComputed true if plane is computed and shown on model otherwise false + */ + public void showPlaneButtonsOnPanel(boolean isComputed) { + originalModelButton.setVisible(isComputed); + showPlaneLabel.setVisible(isComputed); + } + + /** + * Creates new form symmetryPanel + */ + public SymmetryPanel() { + initComponents(); + config = Config.getDefault(); + setSliders(); + + showPlaneButtonsOnPanel(false); + } + + /** + * Calculate approxy symmetry of the model + * Accuracy of the symmetry plane is influenced by configuration represented by config + * + * @throws InterruptedException exception can be thrown beacause of progress monitor + */ + private void countSymmetry() throws InterruptedException { + MeshModel model = new MeshModel(); + canvas.changeModel(canvas.getLoadedModel()); + symCounter = new SymmetryEstimator(canvas.getModel().getFacets().get(0), config); + symCounter.setPanel(this); + finalPlane = symCounter.getAproxSymmetryPlane(); + SymmetryEstimator counted = symCounter.mergeWithPlane(finalPlane); + model.addFacet(counted.getFacet()); + + this.canvas.changeModel(model); + } + + + /** + * This method is called from within the constructor to initialize the form. + * WARNING: Do NOT modify this code. The content of this method is always + * regenerated by the Form Editor. + * + * Code generated by NetBeans + */ + @SuppressWarnings("unchecked") + // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents + private void initComponents() { + + symetrySpecificationPanel = new javax.swing.JPanel(); + curavatureSlider = new javax.swing.JSlider(); + angleCosineSlider = new javax.swing.JSlider(); + minCurvatio = new javax.swing.JLabel(); + minCurvatio2 = new javax.swing.JLabel(); + normalAngleSlider = new javax.swing.JSlider(); + minCurvatio3 = new javax.swing.JLabel(); + significantPointSlider = new javax.swing.JSlider(); + minCurvatio4 = new javax.swing.JLabel(); + relativeDistanceSlider = new javax.swing.JSlider(); + significantPointLabel = new javax.swing.JLabel(); + symetryButton = new javax.swing.JLabel(); + averagingCheckBox = new javax.swing.JCheckBox(); + textFieldCurvature = new javax.swing.JTextField(); + textFieldMinCos = new javax.swing.JTextField(); + normalTextField = new javax.swing.JTextField(); + distanceTextField = new javax.swing.JTextField(); + significantTextField = new javax.swing.JTextField(); + minCurvatio8 = new javax.swing.JLabel(); + jLabel1 = new javax.swing.JLabel(); + originalModelButton = new javax.swing.JLabel(); + showPlaneLabel = new javax.swing.JLabel(); + defaultValues = new javax.swing.JLabel(); + infoPoints = new javax.swing.JLabel(); + infoMinAngleCos = new javax.swing.JLabel(); + infoRelDist = new javax.swing.JLabel(); + infoNormalAngle = new javax.swing.JLabel(); + infoMinCurv = new javax.swing.JLabel(); + + symetrySpecificationPanel.setBackground(new java.awt.Color(176, 230, 226)); + + curavatureSlider.setBackground(new java.awt.Color(250, 250, 250)); + curavatureSlider.setMajorTickSpacing(1); + curavatureSlider.setMinimum(50); + curavatureSlider.setSnapToTicks(true); + curavatureSlider.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); + curavatureSlider.setOpaque(false); + + angleCosineSlider.setMinimum(80); + angleCosineSlider.setSnapToTicks(true); + angleCosineSlider.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); + angleCosineSlider.setOpaque(false); + + minCurvatio.setFont(new java.awt.Font("Arial", 1, 14)); // NOI18N + minCurvatio.setForeground(new java.awt.Color(20, 114, 105)); + minCurvatio.setText("Min. Curvature Ratio"); + + minCurvatio2.setFont(new java.awt.Font("Arial", 1, 14)); // NOI18N + minCurvatio2.setForeground(new java.awt.Color(20, 114, 105)); + minCurvatio2.setText("Min. Angle Cosine"); + + normalAngleSlider.setMinimum(80); + normalAngleSlider.setSnapToTicks(true); + normalAngleSlider.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); + normalAngleSlider.setOpaque(false); + + minCurvatio3.setFont(new java.awt.Font("Arial", 1, 14)); // NOI18N + minCurvatio3.setForeground(new java.awt.Color(20, 114, 105)); + minCurvatio3.setText("Relative Distance"); + + significantPointSlider.setMajorTickSpacing(100); + significantPointSlider.setMaximum(300); + significantPointSlider.setSnapToTicks(true); + significantPointSlider.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); + significantPointSlider.setOpaque(false); + + minCurvatio4.setFont(new java.awt.Font("Arial", 1, 14)); // NOI18N + minCurvatio4.setForeground(new java.awt.Color(20, 114, 105)); + minCurvatio4.setText("Normal Angle Cosine"); + + relativeDistanceSlider.setMaximum(5); + relativeDistanceSlider.setSnapToTicks(true); + relativeDistanceSlider.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); + relativeDistanceSlider.setOpaque(false); + + significantPointLabel.setFont(new java.awt.Font("Arial", 1, 14)); // NOI18N + significantPointLabel.setForeground(new java.awt.Color(20, 114, 105)); + significantPointLabel.setText("Significant Points"); + + symetryButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/cz/fidentis/analyst/gui/resources/symetryCount.png"))); // NOI18N + symetryButton.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); + symetryButton.addMouseMotionListener(new java.awt.event.MouseMotionAdapter() { + public void mouseMoved(java.awt.event.MouseEvent evt) { + symetryButtonMouseMoved(evt); + } + }); + symetryButton.addMouseListener(new java.awt.event.MouseAdapter() { + public void mouseClicked(java.awt.event.MouseEvent evt) { + symetryButtonMouseClicked(evt); + } + public void mouseExited(java.awt.event.MouseEvent evt) { + symetryButtonMouseExited(evt); + } + }); + + averagingCheckBox.setSelected(true); + averagingCheckBox.setOpaque(false); + averagingCheckBox.addMouseListener(new java.awt.event.MouseAdapter() { + public void mouseClicked(java.awt.event.MouseEvent evt) { + averagingCheckBoxMouseClicked(evt); + } + }); + + textFieldCurvature.setText("0.5"); + textFieldCurvature.setToolTipText(""); + + textFieldMinCos.setText("0.985"); + textFieldMinCos.setToolTipText(""); + + normalTextField.setText("0.985"); + normalTextField.setToolTipText(""); + + distanceTextField.setText("0.01"); + distanceTextField.setToolTipText(""); + + significantTextField.setText("200"); + significantTextField.setToolTipText(""); + + minCurvatio8.setFont(new java.awt.Font("Arial", 1, 14)); // NOI18N + minCurvatio8.setForeground(new java.awt.Color(20, 114, 105)); + minCurvatio8.setText("Averaging"); + minCurvatio8.setToolTipText("Average planes with highest number of votes"); + + originalModelButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/cz/fidentis/analyst/gui/resources/originalModel.png"))); // NOI18N + originalModelButton.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); + originalModelButton.addMouseMotionListener(new java.awt.event.MouseMotionAdapter() { + public void mouseMoved(java.awt.event.MouseEvent evt) { + originalModelButtonMouseMoved(evt); + } + }); + originalModelButton.addMouseListener(new java.awt.event.MouseAdapter() { + public void mouseClicked(java.awt.event.MouseEvent evt) { + originalModelButtonMouseClicked(evt); + } + public void mouseExited(java.awt.event.MouseEvent evt) { + originalModelButtonMouseExited(evt); + } + }); + + showPlaneLabel.setFont(new java.awt.Font("Arial", 1, 16)); // NOI18N + showPlaneLabel.setForeground(new java.awt.Color(20, 114, 105)); + showPlaneLabel.setIcon(new javax.swing.ImageIcon(getClass().getResource("/cz/fidentis/analyst/gui/resources/show2.png"))); // NOI18N + showPlaneLabel.setText("Show plane"); + showPlaneLabel.setToolTipText("Show approximate plane of symmetry"); + showPlaneLabel.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); + showPlaneLabel.setDoubleBuffered(true); + showPlaneLabel.addMouseListener(new java.awt.event.MouseAdapter() { + public void mouseClicked(java.awt.event.MouseEvent evt) { + showPlaneLabelMouseClicked(evt); + } + }); + + defaultValues.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N + defaultValues.setForeground(new java.awt.Color(20, 114, 105)); + defaultValues.setText("Default values"); + defaultValues.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); + defaultValues.addMouseListener(new java.awt.event.MouseAdapter() { + public void mouseClicked(java.awt.event.MouseEvent evt) { + defaultValuesMouseClicked(evt); + } + }); + + infoPoints.setIcon(new javax.swing.ImageIcon(getClass().getResource("/cz/fidentis/analyst/gui/resources/info.png"))); // NOI18N + infoPoints.setToolTipText("Info "); + infoPoints.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); + infoPoints.addMouseListener(new java.awt.event.MouseAdapter() { + public void mouseClicked(java.awt.event.MouseEvent evt) { + infoPointsMouseClicked(evt); + } + }); + + infoMinAngleCos.setIcon(new javax.swing.ImageIcon(getClass().getResource("/cz/fidentis/analyst/gui/resources/info.png"))); // NOI18N + infoMinAngleCos.setToolTipText("Info "); + infoMinAngleCos.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); + infoMinAngleCos.addMouseListener(new java.awt.event.MouseAdapter() { + public void mouseClicked(java.awt.event.MouseEvent evt) { + infoMinAngleCosMouseClicked(evt); + } + }); + + infoRelDist.setIcon(new javax.swing.ImageIcon(getClass().getResource("/cz/fidentis/analyst/gui/resources/info.png"))); // NOI18N + infoRelDist.setToolTipText("Info "); + infoRelDist.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); + infoRelDist.addMouseListener(new java.awt.event.MouseAdapter() { + public void mouseClicked(java.awt.event.MouseEvent evt) { + infoRelDistMouseClicked(evt); + } + }); + + infoNormalAngle.setIcon(new javax.swing.ImageIcon(getClass().getResource("/cz/fidentis/analyst/gui/resources/info.png"))); // NOI18N + infoNormalAngle.setToolTipText("Info "); + infoNormalAngle.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); + infoNormalAngle.addMouseListener(new java.awt.event.MouseAdapter() { + public void mouseClicked(java.awt.event.MouseEvent evt) { + infoNormalAngleMouseClicked(evt); + } + }); + + infoMinCurv.setIcon(new javax.swing.ImageIcon(getClass().getResource("/cz/fidentis/analyst/gui/resources/info.png"))); // NOI18N + infoMinCurv.setToolTipText("Info "); + infoMinCurv.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); + infoMinCurv.addMouseListener(new java.awt.event.MouseAdapter() { + public void mouseClicked(java.awt.event.MouseEvent evt) { + infoMinCurvMouseClicked(evt); + } + }); + + javax.swing.GroupLayout symetrySpecificationPanelLayout = new javax.swing.GroupLayout(symetrySpecificationPanel); + symetrySpecificationPanel.setLayout(symetrySpecificationPanelLayout); + symetrySpecificationPanelLayout.setHorizontalGroup( + symetrySpecificationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(symetrySpecificationPanelLayout.createSequentialGroup() + .addGroup(symetrySpecificationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) + .addGroup(symetrySpecificationPanelLayout.createSequentialGroup() + .addGap(0, 0, Short.MAX_VALUE) + .addComponent(defaultValues)) + .addGroup(symetrySpecificationPanelLayout.createSequentialGroup() + .addGap(17, 17, 17) + .addGroup(symetrySpecificationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(symetrySpecificationPanelLayout.createSequentialGroup() + .addGap(154, 154, 154) + .addComponent(jLabel1)) + .addGroup(symetrySpecificationPanelLayout.createSequentialGroup() + .addComponent(showPlaneLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 147, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(originalModelButton, javax.swing.GroupLayout.PREFERRED_SIZE, 181, javax.swing.GroupLayout.PREFERRED_SIZE)))) + .addGroup(symetrySpecificationPanelLayout.createSequentialGroup() + .addContainerGap() + .addGroup(symetrySpecificationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(symetrySpecificationPanelLayout.createSequentialGroup() + .addGap(10, 10, 10) + .addComponent(minCurvatio8) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) + .addComponent(averagingCheckBox) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(symetryButton)) + .addGroup(symetrySpecificationPanelLayout.createSequentialGroup() + .addGroup(symetrySpecificationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(infoMinAngleCos) + .addComponent(infoRelDist) + .addComponent(infoNormalAngle) + .addComponent(infoPoints) + .addComponent(infoMinCurv)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addGroup(symetrySpecificationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(minCurvatio4, javax.swing.GroupLayout.DEFAULT_SIZE, 157, Short.MAX_VALUE) + .addGroup(symetrySpecificationPanelLayout.createSequentialGroup() + .addGroup(symetrySpecificationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(minCurvatio) + .addComponent(minCurvatio3) + .addComponent(minCurvatio2) + .addComponent(significantPointLabel)) + .addGap(0, 0, Short.MAX_VALUE))) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addGroup(symetrySpecificationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) + .addGroup(symetrySpecificationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) + .addComponent(curavatureSlider, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE) + .addComponent(relativeDistanceSlider, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE) + .addComponent(significantPointSlider, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 164, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(angleCosineSlider, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 164, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addComponent(normalAngleSlider, javax.swing.GroupLayout.PREFERRED_SIZE, 164, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGap(18, 18, 18) + .addGroup(symetrySpecificationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) + .addComponent(distanceTextField) + .addComponent(normalTextField) + .addComponent(significantTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 46, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(textFieldCurvature, javax.swing.GroupLayout.PREFERRED_SIZE, 46, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(textFieldMinCos, javax.swing.GroupLayout.PREFERRED_SIZE, 46, javax.swing.GroupLayout.PREFERRED_SIZE)))))) + .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + ); + symetrySpecificationPanelLayout.setVerticalGroup( + symetrySpecificationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(symetrySpecificationPanelLayout.createSequentialGroup() + .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addGroup(symetrySpecificationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) + .addGroup(symetrySpecificationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(infoPoints) + .addComponent(significantPointLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 27, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGroup(symetrySpecificationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(significantTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(significantPointSlider, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE))) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) + .addGroup(symetrySpecificationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) + .addComponent(minCurvatio, javax.swing.GroupLayout.PREFERRED_SIZE, 26, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGroup(symetrySpecificationPanelLayout.createSequentialGroup() + .addComponent(textFieldCurvature, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(4, 4, 4)) + .addComponent(infoMinCurv) + .addComponent(curavatureSlider, javax.swing.GroupLayout.PREFERRED_SIZE, 26, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) + .addGroup(symetrySpecificationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(infoMinAngleCos, javax.swing.GroupLayout.Alignment.TRAILING) + .addComponent(minCurvatio2, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 26, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(textFieldMinCos, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(angleCosineSlider, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) + .addGroup(symetrySpecificationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(symetrySpecificationPanelLayout.createSequentialGroup() + .addGroup(symetrySpecificationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) + .addComponent(normalAngleSlider, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(normalTextField)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) + .addComponent(distanceTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGroup(symetrySpecificationPanelLayout.createSequentialGroup() + .addGroup(symetrySpecificationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(minCurvatio4, javax.swing.GroupLayout.PREFERRED_SIZE, 27, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(infoNormalAngle)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addGroup(symetrySpecificationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(infoRelDist, javax.swing.GroupLayout.Alignment.TRAILING) + .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, symetrySpecificationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(relativeDistanceSlider, javax.swing.GroupLayout.PREFERRED_SIZE, 22, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(minCurvatio3, javax.swing.GroupLayout.PREFERRED_SIZE, 26, javax.swing.GroupLayout.PREFERRED_SIZE))) + .addGap(13, 13, 13))) + .addComponent(defaultValues) + .addGap(17, 17, 17) + .addGroup(symetrySpecificationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(symetrySpecificationPanelLayout.createSequentialGroup() + .addComponent(symetryButton, javax.swing.GroupLayout.PREFERRED_SIZE, 75, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(originalModelButton) + .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + .addGroup(symetrySpecificationPanelLayout.createSequentialGroup() + .addGroup(symetrySpecificationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) + .addComponent(averagingCheckBox) + .addComponent(minCurvatio8, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 53, Short.MAX_VALUE) + .addComponent(jLabel1) + .addGap(45, 45, 45) + .addComponent(showPlaneLabel) + .addContainerGap(27, Short.MAX_VALUE)))) + ); + + javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this); + this.setLayout(layout); + layout.setHorizontalGroup( + layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(symetrySpecificationPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + ); + layout.setVerticalGroup( + layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(symetrySpecificationPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + ); + }// </editor-fold>//GEN-END:initComponents + + /** + * + * @param evt Final computed plane is shown to user + */ + private void showPlaneLabelMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_showPlaneLabelMouseClicked + JOptionPane.showMessageDialog(frameMain, "Approximate plane of symmetry: \n" + finalPlane.a + "\n" + finalPlane.b + "\n" + finalPlane.c + "\n" + + finalPlane.d + "\n", "Final plane.", 0, new ImageIcon(getClass().getResource("/cz/fidentis/analyst/gui/resources/showPlanePane.png"))); + }//GEN-LAST:event_showPlaneLabelMouseClicked + + /** + * + * @param evt Changes button + */ + private void originalModelButtonMouseExited(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_originalModelButtonMouseExited + originalModelButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/cz/fidentis/analyst/gui/resources/originalModel.png"))); + }//GEN-LAST:event_originalModelButtonMouseExited + + /** + * + * @param evt Original model (without plane) is displayed + */ + private void originalModelButtonMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_originalModelButtonMouseClicked + canvas.changeModel(canvas.getLoadedModel()); + showPlaneButtonsOnPanel(false); + }//GEN-LAST:event_originalModelButtonMouseClicked + + /** + * + * @param evt Changes button + */ + private void originalModelButtonMouseMoved(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_originalModelButtonMouseMoved + originalModelButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/cz/fidentis/analyst/gui/resources/originalModelPressed.png"))); + }//GEN-LAST:event_originalModelButtonMouseMoved + + /** + * + * @param evt Decides if averaging is ON or OFF + */ + private void averagingCheckBoxMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_averagingCheckBoxMouseClicked + if(config.isAveraging()) { + config.setAveraging(false); + } else { + config.setAveraging(true); + } + }//GEN-LAST:event_averagingCheckBoxMouseClicked + + /** + * + * @param evt Changes button + */ + private void symetryButtonMouseExited(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_symetryButtonMouseExited + symetryButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/cz/fidentis/analyst/gui/resources/symetryCount.png"))); + }//GEN-LAST:event_symetryButtonMouseExited + + /** + * + * @param evt Symmetry is estimated. If model is not loaded, user is warned + */ + private void symetryButtonMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_symetryButtonMouseClicked + setConfigParams(); + if (canvas.getModel().getFacets().isEmpty()){ + JOptionPane.showMessageDialog(frameMain, "You have to load the model.", "Model not loaded", + 0, new ImageIcon(getClass().getResource("/cz/fidentis/analyst/gui/resources/notLoadedModel.png"))); + } else { + try { + countSymmetry(); + } catch (InterruptedException ex) { + Logger.getLogger(SymmetryPanel.class.getName()).log(Level.SEVERE, null, ex); + } + showPlaneButtonsOnPanel(true); + } + }//GEN-LAST:event_symetryButtonMouseClicked + + /** + * + * @param evt Changes button + */ + private void symetryButtonMouseMoved(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_symetryButtonMouseMoved + symetryButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/cz/fidentis/analyst/gui/resources/symetryCountClicked.png"))); + }//GEN-LAST:event_symetryButtonMouseMoved + + /** + * + * @param evt configuration is set to deafult values + */ + private void defaultValuesMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_defaultValuesMouseClicked + config = Config.getDefault(); + setTextFieldsDueToConfig(); + setSliders(); + }//GEN-LAST:event_defaultValuesMouseClicked + + /** + * Shows details about minimum curv ratio parameter + * + * @param evt + */ + private void infoMinCurvMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_infoMinCurvMouseClicked + JOptionPane.showMessageDialog(frameMain, + "Entered number represents how similar the curvature in two vertices must be\n" + + "to take into account these vertices while counting the plane of approximate symmetry.\n" + + "The higher the number is the more similar they must be.\n\n" + + + "Higher number → fewer pairs of vertices satisfy the criterion → shorter calculation, possibly less accurate result.\n" + + "Lower number → more pairs of vertices satisfy the criterion → longer calculation, possibly more accurate result.", + "Minimum curvature ratio", + 0, new ImageIcon(getClass().getResource("/cz/fidentis/analyst/gui/resources/curvature.png"))); + }//GEN-LAST:event_infoMinCurvMouseClicked + + /** + * Shows details about maximum relative distance parameter + * + * @param evt + */ + private void infoRelDistMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_infoRelDistMouseClicked + JOptionPane.showMessageDialog(frameMain, + "Entered number represents how far middle point of two vertices can be from candidate plane of symmetry\n" + + "to give this plane vote. Plane with highest number of votes is plane of approximate symmetry.\n\n" + + + "Higher number → more pairs of vertices satisfy the criterion → longer calculation, possibly more accurate result.\n" + + "Lower number → fewer pairs of vertices satisfy the criterion → shorter calculation, possibly less accurate result.", + "Maximum relative distance from plane", + 0, new ImageIcon(getClass().getResource("/cz/fidentis/analyst/gui/resources/distance.png"))); + }//GEN-LAST:event_infoRelDistMouseClicked + + /** + * Shows details about significant points parameter + * + * @param evt + */ + private void infoPointsMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_infoPointsMouseClicked + JOptionPane.showMessageDialog(frameMain, + "Entered number represents amount of points of the mesh that are taken into account\n" + + "while counting the plane of approximate symmetry.\n\n" + + + "Higher number → longer calculation, possibly more accurate result.\n" + + "Lower number → shorter calculation, possibly less accurate result.", + "Significant points", + 0, new ImageIcon(getClass().getResource("/cz/fidentis/analyst/gui/resources/points.png"))); + }//GEN-LAST:event_infoPointsMouseClicked + + /** + * Shows details about minimum angle cosine parameter + * + * @param evt + */ + private void infoMinAngleCosMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_infoMinAngleCosMouseClicked + JOptionPane.showMessageDialog(frameMain, + "Entered number represents how large the angle between normal vector of candidate plane and the vector\n" + + "of two vertices can be to take into account these vertices while counting the approximate symmetry.\n\n" + + + "Higher number → fewer pairs of vertices satisfy the criterion → shorter calculation, possibly less accurate result.\n" + + "Lower number → more pairs of vertices satisfy the criterion → longer calculation, possibly more accurate result.", + "Minimum angle", + 0, new ImageIcon(getClass().getResource("/cz/fidentis/analyst/gui/resources/angle.png"))); + }//GEN-LAST:event_infoMinAngleCosMouseClicked + + /** + * Shows details about minimum normal angle cosine parameter + * + * @param evt + */ + private void infoNormalAngleMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_infoNormalAngleMouseClicked + JOptionPane.showMessageDialog(frameMain, + "Entered number represents how large the angle between normal vector of candidate plane and vector\n" + + "from subtraction of normal vectors of two vertices can be to take into account these vertices while counting the approximate symmetry.\n\n" + + + "Higher number → fewer pairs of vertices satisfy the criterion → shorter calculation, possibly less accurate result.\n" + + "Lower number → more pairs of vertices satisfy the criterion → longer calculation, possibly more accurate result.", + "Minimum normal angle", + 0, new ImageIcon(getClass().getResource("/cz/fidentis/analyst/gui/resources/angle.png"))); + }//GEN-LAST:event_infoNormalAngleMouseClicked + + + // Variables declaration - do not modify//GEN-BEGIN:variables + private javax.swing.JSlider angleCosineSlider; + private javax.swing.JCheckBox averagingCheckBox; + private javax.swing.JSlider curavatureSlider; + private javax.swing.JLabel defaultValues; + private javax.swing.JTextField distanceTextField; + private javax.swing.JLabel infoMinAngleCos; + private javax.swing.JLabel infoMinCurv; + private javax.swing.JLabel infoNormalAngle; + private javax.swing.JLabel infoPoints; + private javax.swing.JLabel infoRelDist; + private javax.swing.JLabel jLabel1; + private javax.swing.JLabel minCurvatio; + private javax.swing.JLabel minCurvatio2; + private javax.swing.JLabel minCurvatio3; + private javax.swing.JLabel minCurvatio4; + private javax.swing.JLabel minCurvatio8; + private javax.swing.JSlider normalAngleSlider; + private javax.swing.JTextField normalTextField; + private javax.swing.JLabel originalModelButton; + private javax.swing.JSlider relativeDistanceSlider; + private javax.swing.JLabel showPlaneLabel; + private javax.swing.JLabel significantPointLabel; + private javax.swing.JSlider significantPointSlider; + private javax.swing.JTextField significantTextField; + private javax.swing.JLabel symetryButton; + private javax.swing.JPanel symetrySpecificationPanel; + private javax.swing.JTextField textFieldCurvature; + private javax.swing.JTextField textFieldMinCos; + // End of variables declaration//GEN-END:variables +} \ No newline at end of file diff --git a/GUI/src/main/java/cz/fidentis/analyst/gui/UserInterface.form b/GUI/src/main/java/cz/fidentis/analyst/gui/UserInterface.form new file mode 100644 index 0000000000000000000000000000000000000000..7961bb6d2967cbb73214d51876ff43d3c4dae96b --- /dev/null +++ b/GUI/src/main/java/cz/fidentis/analyst/gui/UserInterface.form @@ -0,0 +1,956 @@ +<?xml version="1.0" encoding="UTF-8" ?> + +<Form version="1.3" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JFrameFormInfo"> + <Properties> + <Property name="defaultCloseOperation" type="int" value="3"/> + <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="a3" green="ae" red="0" type="rgb"/> + </Property> + <Property name="cursor" type="java.awt.Cursor" editor="org.netbeans.modules.form.editors2.CursorEditor"> + <Color id="Default Cursor"/> + </Property> + <Property name="locationByPlatform" type="boolean" value="true"/> + </Properties> + <SyntheticProperties> + <SyntheticProperty name="formSizePolicy" type="int" value="1"/> + <SyntheticProperty name="generateCenter" type="boolean" value="true"/> + </SyntheticProperties> + <AuxValues> + <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/> + <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/> + <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/> + <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/> + <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/> + </AuxValues> + + <Layout> + <DimensionLayout dim="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="topPanel" max="32767" attributes="0"/> + <Component id="jPanel1" alignment="1" max="32767" attributes="0"/> + <Group type="103" rootIndex="1" groupAlignment="0" attributes="0"> + <Component id="jPanel2" alignment="0" max="32767" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + <DimensionLayout dim="1"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <Component id="jPanel1" min="-2" pref="52" max="-2" attributes="0"/> + <EmptySpace type="unrelated" max="-2" attributes="0"/> + <Component id="topPanel" min="-2" pref="239" max="-2" attributes="0"/> + <EmptySpace min="0" pref="565" max="32767" attributes="0"/> + </Group> + <Group type="103" rootIndex="1" groupAlignment="0" attributes="0"> + <Component id="jPanel2" alignment="1" max="32767" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + </Layout> + <SubComponents> + <Container class="javax.swing.JPanel" name="jPanel1"> + <Properties> + <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="69" green="72" red="14" type="rgb"/> + </Property> + <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[1200, 77]"/> + </Property> + </Properties> + <Events> + <EventHandler event="mouseDragged" listener="java.awt.event.MouseMotionListener" parameters="java.awt.event.MouseEvent" handler="jPanel1MouseDragged"/> + <EventHandler event="mousePressed" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="jPanel1MousePressed"/> + </Events> + + <Layout> + <DimensionLayout dim="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace max="-2" attributes="0"/> + <Component id="homeButton" min="-2" max="-2" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> + <Component id="newProject" min="-2" pref="149" max="-2" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> + <Component id="wiredModelButton" min="-2" pref="134" max="-2" attributes="0"/> + <EmptySpace max="32767" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + <DimensionLayout dim="1"> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="wiredModelButton" alignment="0" max="32767" attributes="0"/> + <Component id="newProject" max="32767" attributes="0"/> + <Component id="homeButton" alignment="0" pref="52" max="32767" attributes="0"/> + </Group> + </DimensionLayout> + </Layout> + <SubComponents> + <Component class="javax.swing.JLabel" name="newProject"> + <Properties> + <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="69" green="72" red="14" type="rgb"/> + </Property> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Neue Haas Unica Pro" size="18" style="0"/> + </Property> + <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="ff" green="ff" red="ff" type="rgb"/> + </Property> + <Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor"> + <Image iconType="3" name="/cz/fidentis/analyst/gui/resources/newP.png"/> + </Property> + <Property name="cursor" type="java.awt.Cursor" editor="org.netbeans.modules.form.editors2.CursorEditor"> + <Color id="Hand Cursor"/> + </Property> + <Property name="opaque" type="boolean" value="true"/> + </Properties> + <Events> + <EventHandler event="mouseMoved" listener="java.awt.event.MouseMotionListener" parameters="java.awt.event.MouseEvent" handler="newProjectMouseMoved"/> + <EventHandler event="mouseExited" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="newProjectMouseExited"/> + <EventHandler event="mousePressed" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="newProjectMousePressed"/> + </Events> + </Component> + <Component class="javax.swing.JLabel" name="wiredModelButton"> + <Properties> + <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="69" green="72" red="14" type="rgb"/> + </Property> + <Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor"> + <Image iconType="3" name="/cz/fidentis/analyst/gui/resources/wireframe2.png"/> + </Property> + <Property name="cursor" type="java.awt.Cursor" editor="org.netbeans.modules.form.editors2.CursorEditor"> + <Color id="Hand Cursor"/> + </Property> + <Property name="opaque" type="boolean" value="true"/> + </Properties> + <Events> + <EventHandler event="mouseClicked" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="wiredModelButtonMouseClicked"/> + </Events> + </Component> + <Component class="javax.swing.JLabel" name="homeButton"> + <Properties> + <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="69" green="72" red="14" type="rgb"/> + </Property> + <Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor"> + <Image iconType="3" name="/cz/fidentis/analyst/gui/resources/home.png"/> + </Property> + <Property name="toolTipText" type="java.lang.String" value="Home"/> + <Property name="cursor" type="java.awt.Cursor" editor="org.netbeans.modules.form.editors2.CursorEditor"> + <Color id="Hand Cursor"/> + </Property> + <Property name="opaque" type="boolean" value="true"/> + </Properties> + <Events> + <EventHandler event="mouseMoved" listener="java.awt.event.MouseMotionListener" parameters="java.awt.event.MouseEvent" handler="homeButtonMouseMoved"/> + <EventHandler event="mouseClicked" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="homeButtonMouseClicked"/> + <EventHandler event="mouseExited" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="homeButtonMouseExited"/> + </Events> + </Component> + </SubComponents> + </Container> + <Container class="javax.swing.JPanel" name="topPanel"> + <Properties> + <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="69" green="72" red="14" type="rgb"/> + </Property> + <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[1200, 266]"/> + </Property> + </Properties> + <AccessibilityProperties> + <Property name="AccessibleContext.accessibleName" type="java.lang.String" value=""/> + </AccessibilityProperties> + + <Layout> + <DimensionLayout dim="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace pref="99" max="32767" attributes="0"/> + <Component id="compareTwo" min="-2" max="-2" attributes="0"/> + <EmptySpace min="-2" pref="105" max="-2" attributes="0"/> + <Component id="compareDB" min="-2" max="-2" attributes="0"/> + <EmptySpace min="-2" pref="94" max="-2" attributes="0"/> + <Component id="batchProcessing" min="-2" max="-2" attributes="0"/> + <EmptySpace min="-2" pref="94" max="-2" attributes="0"/> + <Component id="symetryEstimator" min="-2" max="-2" attributes="0"/> + <EmptySpace pref="98" max="32767" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + <DimensionLayout dim="1"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" attributes="0"> + <EmptySpace min="-2" pref="52" max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="symetryEstimator" alignment="1" max="32767" attributes="0"/> + <Component id="compareDB" alignment="1" max="32767" attributes="0"/> + <Group type="102" alignment="1" attributes="0"> + <EmptySpace min="0" pref="0" max="32767" attributes="0"/> + <Component id="compareTwo" min="-2" max="-2" attributes="0"/> + </Group> + <Component id="batchProcessing" alignment="1" max="32767" attributes="0"/> + </Group> + </Group> + </Group> + </DimensionLayout> + </Layout> + <SubComponents> + <Container class="javax.swing.JPanel" name="compareTwo"> + <Properties> + <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="69" green="72" red="14" type="rgb"/> + </Property> + <Property name="cursor" type="java.awt.Cursor" editor="org.netbeans.modules.form.editors2.CursorEditor"> + <Color id="Hand Cursor"/> + </Property> + </Properties> + + <Layout> + <DimensionLayout dim="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace max="-2" attributes="0"/> + <Component id="jLabel1" max="32767" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + <DimensionLayout dim="1"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" attributes="0"> + <EmptySpace min="-2" pref="30" max="-2" attributes="0"/> + <Component id="jLabel1" max="32767" attributes="0"/> + <EmptySpace min="-2" pref="28" max="-2" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + </Layout> + <SubComponents> + <Component class="javax.swing.JLabel" name="jLabel1"> + <Properties> + <Property name="horizontalAlignment" type="int" value="0"/> + <Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor"> + <Image iconType="3" name="/cz/fidentis/analyst/gui/resources/compareTwoStart.png"/> + </Property> + <Property name="cursor" type="java.awt.Cursor" editor="org.netbeans.modules.form.editors2.CursorEditor"> + <Color id="Default Cursor"/> + </Property> + </Properties> + </Component> + </SubComponents> + </Container> + <Container class="javax.swing.JPanel" name="compareDB"> + <Properties> + <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="69" green="72" red="14" type="rgb"/> + </Property> + <Property name="cursor" type="java.awt.Cursor" editor="org.netbeans.modules.form.editors2.CursorEditor"> + <Color id="Hand Cursor"/> + </Property> + </Properties> + + <Layout> + <DimensionLayout dim="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="jLabel3" alignment="1" max="32767" attributes="0"/> + </Group> + </DimensionLayout> + <DimensionLayout dim="1"> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="jLabel3" alignment="1" max="32767" attributes="0"/> + </Group> + </DimensionLayout> + </Layout> + <SubComponents> + <Component class="javax.swing.JLabel" name="jLabel3"> + <Properties> + <Property name="horizontalAlignment" type="int" value="0"/> + <Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor"> + <Image iconType="3" name="/cz/fidentis/analyst/gui/resources/batchProcessingStart.png"/> + </Property> + <Property name="cursor" type="java.awt.Cursor" editor="org.netbeans.modules.form.editors2.CursorEditor"> + <Color id="Default Cursor"/> + </Property> + </Properties> + </Component> + </SubComponents> + </Container> + <Container class="javax.swing.JPanel" name="batchProcessing"> + <Properties> + <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="69" green="72" red="14" type="rgb"/> + </Property> + <Property name="cursor" type="java.awt.Cursor" editor="org.netbeans.modules.form.editors2.CursorEditor"> + <Color id="Hand Cursor"/> + </Property> + </Properties> + + <Layout> + <DimensionLayout dim="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" attributes="0"> + <EmptySpace min="-2" pref="26" max="-2" attributes="0"/> + <Component id="jLabel2" max="32767" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + <DimensionLayout dim="1"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="1" attributes="0"> + <EmptySpace max="-2" attributes="0"/> + <Component id="jLabel2" max="32767" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + </Layout> + <SubComponents> + <Component class="javax.swing.JLabel" name="jLabel2"> + <Properties> + <Property name="horizontalAlignment" type="int" value="0"/> + <Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor"> + <Image iconType="3" name="/cz/fidentis/analyst/gui/resources/copareWithDatabaseStart.png"/> + </Property> + <Property name="cursor" type="java.awt.Cursor" editor="org.netbeans.modules.form.editors2.CursorEditor"> + <Color id="Default Cursor"/> + </Property> + </Properties> + </Component> + </SubComponents> + </Container> + <Container class="javax.swing.JPanel" name="symetryEstimator"> + <Properties> + <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="69" green="72" red="14" type="rgb"/> + </Property> + <Property name="cursor" type="java.awt.Cursor" editor="org.netbeans.modules.form.editors2.CursorEditor"> + <Color id="Hand Cursor"/> + </Property> + </Properties> + <Events> + <EventHandler event="mouseClicked" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="symetryEstimatorMouseClicked"/> + </Events> + + <Layout> + <DimensionLayout dim="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="1" attributes="0"> + <EmptySpace max="-2" attributes="0"/> + <Component id="jLabel4" max="32767" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + <DimensionLayout dim="1"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="1" attributes="0"> + <EmptySpace max="32767" attributes="0"/> + <Component id="jLabel4" min="-2" pref="137" max="-2" attributes="0"/> + <EmptySpace min="-2" pref="36" max="-2" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + </Layout> + <SubComponents> + <Component class="javax.swing.JLabel" name="jLabel4"> + <Properties> + <Property name="horizontalAlignment" type="int" value="0"/> + <Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor"> + <Image iconType="3" name="/cz/fidentis/analyst/gui/resources/symetryStartP.png"/> + </Property> + <Property name="cursor" type="java.awt.Cursor" editor="org.netbeans.modules.form.editors2.CursorEditor"> + <Color id="Hand Cursor"/> + </Property> + </Properties> + <Events> + <EventHandler event="mouseMoved" listener="java.awt.event.MouseMotionListener" parameters="java.awt.event.MouseEvent" handler="jLabel4MouseMoved1"/> + <EventHandler event="mouseClicked" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="jLabel4MouseClicked"/> + <EventHandler event="mouseExited" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="jLabel4MouseExited"/> + </Events> + </Component> + </SubComponents> + </Container> + </SubComponents> + </Container> + <Container class="javax.swing.JPanel" name="jPanel2"> + <Properties> + <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="a3" green="ae" red="0" type="rgb"/> + </Property> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Arial" size="13" style="1"/> + </Property> + <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.modules.form.RADConnectionPropertyEditor"> + <Connection component="Form" name="preferredSize" type="property"/> + </Property> + </Properties> + + <Layout class="org.netbeans.modules.form.compat2.layouts.DesignCardLayout"/> + <SubComponents> + <Container class="javax.swing.JPanel" name="startingPanel"> + <Properties> + <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="a3" green="ae" red="0" type="rgb"/> + </Property> + <Property name="toolTipText" type="java.lang.String" value=""/> + <Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[0, 0]"/> + </Property> + <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[1200, 800]"/> + </Property> + <Property name="requestFocusEnabled" type="boolean" value="false"/> + </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignCardLayout" value="org.netbeans.modules.form.compat2.layouts.DesignCardLayout$CardConstraintsDescription"> + <CardConstraints cardName="card3"/> + </Constraint> + </Constraints> + + <Layout> + <DimensionLayout dim="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" attributes="0"> + <EmptySpace pref="81" max="32767" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="jPanel3" min="-2" max="-2" attributes="0"/> + <Group type="102" alignment="1" attributes="0"> + <Component id="logo" min="-2" pref="218" max="-2" attributes="0"/> + <EmptySpace min="-2" pref="400" max="-2" attributes="0"/> + </Group> + </Group> + <EmptySpace pref="81" max="32767" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + <DimensionLayout dim="1"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" attributes="0"> + <EmptySpace pref="133" max="32767" attributes="0"/> + <Component id="logo" min="-2" pref="124" max="-2" attributes="0"/> + <EmptySpace type="unrelated" max="-2" attributes="0"/> + <Component id="jPanel3" min="-2" max="-2" attributes="0"/> + <EmptySpace pref="136" max="32767" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + </Layout> + <SubComponents> + <Component class="javax.swing.JLabel" name="logo"> + <Properties> + <Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor"> + <Image iconType="3" name="/cz/fidentis/analyst/gui/resources/logo3.png"/> + </Property> + </Properties> + <AuxValues> + <AuxValue name="JavaCodeGenerator_VariableLocal" type="java.lang.Boolean" value="true"/> + <AuxValue name="JavaCodeGenerator_VariableModifier" type="java.lang.Integer" value="0"/> + </AuxValues> + </Component> + <Container class="javax.swing.JPanel" name="jPanel3"> + <Properties> + <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="a3" green="ae" red="0" type="rgb"/> + </Property> + <Property name="toolTipText" type="java.lang.String" value=""/> + </Properties> + + <Layout> + <DimensionLayout dim="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace pref="17" max="32767" attributes="0"/> + <Component id="viewerButton" min="-2" pref="323" max="-2" attributes="0"/> + <EmptySpace type="separate" max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="compareTwoMain" alignment="1" min="-2" max="-2" attributes="0"/> + <Component id="compareTwoMain1" alignment="1" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace min="-2" max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" attributes="0"> + <Component id="JLabel8" max="32767" attributes="0"/> + <EmptySpace min="-2" pref="62" max="-2" attributes="0"/> + </Group> + <Group type="102" attributes="0"> + <Component id="JLabel9" min="-2" pref="196" max="-2" attributes="0"/> + <EmptySpace max="32767" attributes="0"/> + </Group> + </Group> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="batchMain" min="-2" max="-2" attributes="0"/> + <Group type="102" attributes="0"> + <EmptySpace min="12" pref="12" max="-2" attributes="0"/> + <Component id="symetryMain" min="-2" max="-2" attributes="0"/> + </Group> + </Group> + <EmptySpace pref="42" max="32767" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + <DimensionLayout dim="1"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" attributes="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="1" attributes="0"> + <EmptySpace max="-2" attributes="0"/> + <Group type="103" groupAlignment="1" attributes="0"> + <Group type="103" alignment="1" groupAlignment="0" attributes="0"> + <Component id="JLabel8" min="-2" pref="142" max="-2" attributes="0"/> + <Component id="compareTwoMain" min="-2" max="-2" attributes="0"/> + </Group> + <Group type="102" alignment="1" attributes="0"> + <Component id="batchMain" min="-2" pref="173" max="-2" attributes="0"/> + <EmptySpace min="-2" pref="28" max="-2" attributes="0"/> + </Group> + </Group> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="compareTwoMain1" alignment="1" min="-2" max="-2" attributes="0"/> + <Component id="symetryMain" alignment="1" min="-2" max="-2" attributes="0"/> + </Group> + </Group> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace min="-2" pref="296" max="-2" attributes="0"/> + <Component id="JLabel9" max="32767" attributes="0"/> + <EmptySpace min="-2" pref="8" max="-2" attributes="0"/> + </Group> + </Group> + <EmptySpace max="-2" attributes="0"/> + </Group> + <Group type="102" alignment="1" attributes="0"> + <EmptySpace min="0" pref="0" max="32767" attributes="0"/> + <Component id="viewerButton" min="-2" max="-2" attributes="0"/> + <EmptySpace min="-2" pref="41" max="-2" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + </Layout> + <SubComponents> + <Container class="javax.swing.JPanel" name="compareTwoMain"> + <Properties> + <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="a3" green="ae" red="0" type="rgb"/> + </Property> + </Properties> + + <Layout> + <DimensionLayout dim="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <EmptySpace min="0" pref="177" max="32767" attributes="0"/> + </Group> + </DimensionLayout> + <DimensionLayout dim="1"> + <Group type="103" groupAlignment="0" attributes="0"> + <EmptySpace min="0" pref="170" max="32767" attributes="0"/> + </Group> + </DimensionLayout> + </Layout> + </Container> + <Container class="javax.swing.JPanel" name="compareTwoMain1"> + <Properties> + <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="a3" green="ae" red="0" type="rgb"/> + </Property> + </Properties> + + <Layout> + <DimensionLayout dim="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <EmptySpace min="0" pref="220" max="32767" attributes="0"/> + </Group> + </DimensionLayout> + <DimensionLayout dim="1"> + <Group type="103" groupAlignment="0" attributes="0"> + <EmptySpace min="0" pref="169" max="32767" attributes="0"/> + </Group> + </DimensionLayout> + </Layout> + </Container> + <Container class="javax.swing.JPanel" name="batchMain"> + <Properties> + <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="a3" green="ae" red="0" type="rgb"/> + </Property> + </Properties> + + <Layout> + <DimensionLayout dim="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace max="-2" attributes="0"/> + <Component id="JLabel10" min="-2" max="-2" attributes="0"/> + <EmptySpace max="32767" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + <DimensionLayout dim="1"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace min="-2" pref="25" max="-2" attributes="0"/> + <Component id="JLabel10" min="-2" max="-2" attributes="0"/> + <EmptySpace max="32767" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + </Layout> + <SubComponents> + <Component class="javax.swing.JLabel" name="JLabel10"> + <Properties> + <Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor"> + <Image iconType="3" name="/cz/fidentis/analyst/gui/resources/batchProcessingStart.png"/> + </Property> + </Properties> + </Component> + </SubComponents> + </Container> + <Container class="javax.swing.JPanel" name="symetryMain"> + <Properties> + <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="a3" green="ae" red="0" type="rgb"/> + </Property> + </Properties> + + <Layout> + <DimensionLayout dim="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="JLabel11" alignment="1" pref="189" max="32767" attributes="0"/> + </Group> + </DimensionLayout> + <DimensionLayout dim="1"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="1" attributes="0"> + <EmptySpace min="-2" max="-2" attributes="0"/> + <Component id="JLabel11" pref="167" max="32767" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + </Layout> + <SubComponents> + <Component class="javax.swing.JLabel" name="JLabel11"> + <Properties> + <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="a3" green="ae" red="0" type="rgb"/> + </Property> + <Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor"> + <Image iconType="3" name="/cz/fidentis/analyst/gui/resources/symetryStart.png"/> + </Property> + <Property name="cursor" type="java.awt.Cursor" editor="org.netbeans.modules.form.editors2.CursorEditor"> + <Color id="Hand Cursor"/> + </Property> + </Properties> + <Events> + <EventHandler event="mouseMoved" listener="java.awt.event.MouseMotionListener" parameters="java.awt.event.MouseEvent" handler="JLabel11MouseMoved"/> + <EventHandler event="mouseClicked" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="JLabel11MouseClicked"/> + <EventHandler event="mouseExited" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="JLabel11MouseExited"/> + </Events> + </Component> + </SubComponents> + </Container> + <Component class="javax.swing.JLabel" name="viewerButton"> + <Properties> + <Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor"> + <Image iconType="3" name="/cz/fidentis/analyst/gui/resources/modelView.png"/> + </Property> + <Property name="cursor" type="java.awt.Cursor" editor="org.netbeans.modules.form.editors2.CursorEditor"> + <Color id="Hand Cursor"/> + </Property> + </Properties> + <Events> + <EventHandler event="mouseMoved" listener="java.awt.event.MouseMotionListener" parameters="java.awt.event.MouseEvent" handler="viewerButtonMouseMoved"/> + <EventHandler event="mouseClicked" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="viewerButtonMouseClicked"/> + <EventHandler event="mouseExited" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="viewerButtonMouseExited"/> + </Events> + </Component> + <Component class="javax.swing.JLabel" name="JLabel8"> + <Properties> + <Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor"> + <Image iconType="3" name="/cz/fidentis/analyst/gui/resources/compareTwoStart.png"/> + </Property> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="JLabel9"> + <Properties> + <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="a3" green="ae" red="0" type="rgb"/> + </Property> + <Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor"> + <Image iconType="3" name="/cz/fidentis/analyst/gui/resources/copareWithDatabaseStart.png"/> + </Property> + </Properties> + </Component> + </SubComponents> + </Container> + </SubComponents> + </Container> + <Container class="javax.swing.JPanel" name="symetryPanel"> + <Properties> + <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="a3" green="ae" red="0" type="rgb"/> + </Property> + <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[1200, 800]"/> + </Property> + </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignCardLayout" value="org.netbeans.modules.form.compat2.layouts.DesignCardLayout$CardConstraintsDescription"> + <CardConstraints cardName="card3"/> + </Constraint> + </Constraints> + + <Layout> + <DimensionLayout dim="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace pref="78" max="32767" attributes="0"/> + <Component id="viewerPanel" min="-2" max="-2" attributes="0"/> + <EmptySpace min="-2" pref="72" max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="exportModelButton" alignment="0" min="-2" max="-2" attributes="0"/> + <Component id="reloadModelButton" min="-2" max="-2" attributes="0"/> + <Component id="symmetryPanel1" alignment="0" min="-2" pref="461" max="-2" attributes="0"/> + </Group> + <EmptySpace max="32767" attributes="0"/> + </Group> + <Component id="filler1" alignment="1" max="32767" attributes="0"/> + <Component id="filler2" alignment="0" max="32767" attributes="0"/> + </Group> + </DimensionLayout> + <DimensionLayout dim="1"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <Component id="filler2" min="-2" pref="58" max="-2" attributes="0"/> + <EmptySpace pref="46" max="32767" attributes="0"/> + <Group type="103" groupAlignment="0" max="-2" attributes="0"> + <Group type="102" attributes="0"> + <Component id="symmetryPanel1" min="-2" max="-2" attributes="0"/> + <EmptySpace max="32767" attributes="0"/> + <Component id="exportModelButton" min="-2" max="-2" attributes="0"/> + <EmptySpace type="separate" max="-2" attributes="0"/> + <Component id="reloadModelButton" min="-2" max="-2" attributes="0"/> + </Group> + <Component id="viewerPanel" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace max="-2" attributes="0"/> + <Component id="filler1" min="-2" pref="51" max="-2" attributes="0"/> + <EmptySpace min="-2" pref="93" max="-2" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + </Layout> + <SubComponents> + <Container class="javax.swing.JPanel" name="viewerPanel"> + + <Layout> + <DimensionLayout dim="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace max="-2" attributes="0"/> + <Component id="canvasSymmetryPanel" pref="553" max="32767" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + <DimensionLayout dim="1"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace max="-2" attributes="0"/> + <Component id="canvasSymmetryPanel" pref="588" max="32767" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + </Layout> + <SubComponents> + <Component class="cz.fidentis.analyst.gui.Canvas" name="canvasSymmetryPanel"> + </Component> + </SubComponents> + </Container> + <Component class="javax.swing.JLabel" name="reloadModelButton"> + <Properties> + <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="a3" green="ae" red="0" type="rgb"/> + </Property> + <Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor"> + <Image iconType="3" name="/cz/fidentis/analyst/gui/resources/loadModel.png"/> + </Property> + <Property name="cursor" type="java.awt.Cursor" editor="org.netbeans.modules.form.editors2.CursorEditor"> + <Color id="Hand Cursor"/> + </Property> + <Property name="opaque" type="boolean" value="true"/> + </Properties> + <Events> + <EventHandler event="mouseMoved" listener="java.awt.event.MouseMotionListener" parameters="java.awt.event.MouseEvent" handler="reloadModelButtonMouseMoved"/> + <EventHandler event="mouseClicked" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="reloadModelButtonMouseClicked"/> + <EventHandler event="mouseExited" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="reloadModelButtonMouseExited"/> + </Events> + </Component> + <Component class="javax.swing.JLabel" name="exportModelButton"> + <Properties> + <Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor"> + <Image iconType="3" name="/cz/fidentis/analyst/gui/resources/exportModel.png"/> + </Property> + <Property name="cursor" type="java.awt.Cursor" editor="org.netbeans.modules.form.editors2.CursorEditor"> + <Color id="Hand Cursor"/> + </Property> + </Properties> + <Events> + <EventHandler event="mouseMoved" listener="java.awt.event.MouseMotionListener" parameters="java.awt.event.MouseEvent" handler="exportModelButtonMouseMoved"/> + <EventHandler event="mouseClicked" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="exportModelButtonMouseClicked"/> + <EventHandler event="mouseExited" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="exportModelButtonMouseExited"/> + </Events> + </Component> + <Component class="cz.fidentis.analyst.gui.SymmetryPanel" name="symmetryPanel1"> + <Properties> + <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="e2" green="e6" red="b0" type="rgb"/> + </Property> + </Properties> + </Component> + <Component class="javax.swing.Box$Filler" name="filler1"> + <Properties> + <Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[0, 32767]"/> + </Property> + </Properties> + <AuxValues> + <AuxValue name="classDetails" type="java.lang.String" value="Box.Filler.VerticalGlue"/> + </AuxValues> + </Component> + <Component class="javax.swing.Box$Filler" name="filler2"> + <Properties> + <Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[0, 32767]"/> + </Property> + </Properties> + <AuxValues> + <AuxValue name="classDetails" type="java.lang.String" value="Box.Filler.VerticalGlue"/> + </AuxValues> + </Component> + </SubComponents> + </Container> + <Container class="javax.swing.JPanel" name="modelViewPanel"> + <Properties> + <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="a3" green="ae" red="0" type="rgb"/> + </Property> + <Property name="toolTipText" type="java.lang.String" value=""/> + <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[1200, 800]"/> + </Property> + </Properties> + <AccessibilityProperties> + <Property name="AccessibleContext.accessibleName" type="java.lang.String" value=""/> + </AccessibilityProperties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignCardLayout" value="org.netbeans.modules.form.compat2.layouts.DesignCardLayout$CardConstraintsDescription"> + <CardConstraints cardName="card4"/> + </Constraint> + </Constraints> + + <Layout> + <DimensionLayout dim="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="filler3" alignment="1" max="32767" attributes="0"/> + <Group type="102" alignment="1" attributes="0"> + <EmptySpace pref="87" max="32767" attributes="0"/> + <Component id="jPanel4" min="-2" max="-2" attributes="0"/> + <EmptySpace type="separate" max="-2" attributes="0"/> + <Component id="reloadModelButton1" min="-2" max="-2" attributes="0"/> + <EmptySpace pref="95" max="32767" attributes="0"/> + </Group> + <Component id="filler4" alignment="0" max="32767" attributes="0"/> + </Group> + </DimensionLayout> + <DimensionLayout dim="1"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" attributes="0"> + <Component id="filler3" min="-2" pref="73" max="-2" attributes="0"/> + <EmptySpace pref="87" max="32767" attributes="0"/> + <Group type="103" groupAlignment="1" attributes="0"> + <Component id="jPanel4" min="-2" pref="579" max="-2" attributes="0"/> + <Component id="reloadModelButton1" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace max="-2" attributes="0"/> + <Component id="filler4" min="-2" pref="31" max="-2" attributes="0"/> + <EmptySpace pref="92" max="32767" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + </Layout> + <SubComponents> + <Component class="javax.swing.JLabel" name="reloadModelButton1"> + <Properties> + <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="a3" green="ae" red="0" type="rgb"/> + </Property> + <Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor"> + <Image iconType="3" name="/cz/fidentis/analyst/gui/resources/loadModel.png"/> + </Property> + <Property name="cursor" type="java.awt.Cursor" editor="org.netbeans.modules.form.editors2.CursorEditor"> + <Color id="Hand Cursor"/> + </Property> + <Property name="opaque" type="boolean" value="true"/> + </Properties> + <Events> + <EventHandler event="mouseMoved" listener="java.awt.event.MouseMotionListener" parameters="java.awt.event.MouseEvent" handler="reloadModelButton1MouseMoved"/> + <EventHandler event="mouseClicked" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="reloadModelButton1MouseClicked"/> + <EventHandler event="mouseExited" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="reloadModelButton1MouseExited"/> + </Events> + </Component> + <Container class="javax.swing.JPanel" name="jPanel4"> + + <Layout> + <DimensionLayout dim="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace max="-2" attributes="0"/> + <Component id="canvasModelView" min="-2" pref="795" max="-2" attributes="0"/> + <EmptySpace max="32767" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + <DimensionLayout dim="1"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="1" attributes="0"> + <EmptySpace max="32767" attributes="0"/> + <Component id="canvasModelView" min="-2" pref="553" max="-2" attributes="0"/> + <EmptySpace min="-2" pref="98" max="-2" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + </Layout> + <SubComponents> + <Component class="cz.fidentis.analyst.gui.Canvas" name="canvasModelView"> + </Component> + </SubComponents> + </Container> + <Component class="javax.swing.Box$Filler" name="filler3"> + <Properties> + <Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[0, 32767]"/> + </Property> + </Properties> + <AuxValues> + <AuxValue name="classDetails" type="java.lang.String" value="Box.Filler.VerticalGlue"/> + </AuxValues> + </Component> + <Component class="javax.swing.Box$Filler" name="filler4"> + <Properties> + <Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[0, 32767]"/> + </Property> + </Properties> + <AuxValues> + <AuxValue name="classDetails" type="java.lang.String" value="Box.Filler.VerticalGlue"/> + </AuxValues> + </Component> + </SubComponents> + </Container> + </SubComponents> + </Container> + </SubComponents> +</Form> diff --git a/GUI/src/main/java/cz/fidentis/analyst/gui/UserInterface.java b/GUI/src/main/java/cz/fidentis/analyst/gui/UserInterface.java new file mode 100644 index 0000000000000000000000000000000000000000..b28c86ae0994dd28027c21b429c776e4270cb906 --- /dev/null +++ b/GUI/src/main/java/cz/fidentis/analyst/gui/UserInterface.java @@ -0,0 +1,1107 @@ +package cz.fidentis.analyst.gui; + +import cz.fidentis.analyst.mesh.io.MeshObjExporter; +import java.awt.Color; +import java.io.IOException; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.swing.ImageIcon; +import javax.swing.JFileChooser; +import javax.swing.JFrame; +import javax.swing.JLabel; +import javax.swing.JOptionPane; +import javax.swing.JPanel; +import javax.swing.UIManager; +import javax.swing.UnsupportedLookAndFeelException; + +/** + * + * @author Natália Bebjaková + * + * Main window of the applicaion + */ + +public class UserInterface extends javax.swing.JFrame { + /** + * Flag for backround color of the new project button + */ + boolean pressedNewProject = false; + /** + * Flag for whether model should be displayed as wire-frame + */ + boolean wiredModelClicked = false; + /** + * Panel that is actualy displayed on the window + */ + private JPanel actualPanel; + /** + * Main frame of the application + */ + public static JFrame frameMain; + /** + * x coordinate of the mouse + */ + int xMouse; + /** + * y coordinate of the mouse + */ + int yMouse; + + /** + * Creates new form Interface + */ + public UserInterface() { + initComponents(); + topPanel.setVisible(false); + actualPanel = startingPanel; + symmetryPanel1.setCanvas(canvasSymmetryPanel); + this.setExtendedState(JFrame.MAXIMIZED_BOTH); + } + + /** + * + * @return JPanel for estimating symmetry of the model + */ + public SymmetryPanel getSymmetryPanel1() { + return symmetryPanel1; + } + + /** + * Enables to switch between panels + * @param panel New panel that will be visible + */ + private void switchPanelOnMainPanel(JPanel panel) { + actualPanel = panel; + jPanel2.removeAll(); + jPanel2.repaint(); + jPanel2.revalidate(); + jPanel2.add(panel); + jPanel2.repaint(); + jPanel2.revalidate(); + panel.add(jPanel1); + jPanel1.setVisible(true); + } + + /** + * Changes backround of labels to darker green color + * @param jl label of which backround changes + */ + public void setLabelBackround(JLabel jl) { + jl.setBackground(new Color(11,56,49)); + } + + /** + * Changes backround of the label back to original + * @param jl label of which backround is return to original + */ + public void resetLabelBackround(JLabel jl) { + jl.setBackground(new Color(20,114,105)); + } + + /** + * This method is called from within the constructor to initialize the form. + * WARNING: Do NOT modify this code. The content of this method is always + * regenerated by the Form Editor. + * + * Code generated by NetBeans + */ + @SuppressWarnings("unchecked") + // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents + private void initComponents() { + + jPanel1 = new javax.swing.JPanel(); + newProject = new javax.swing.JLabel(); + wiredModelButton = new javax.swing.JLabel(); + homeButton = new javax.swing.JLabel(); + topPanel = new javax.swing.JPanel(); + compareTwo = new javax.swing.JPanel(); + jLabel1 = new javax.swing.JLabel(); + compareDB = new javax.swing.JPanel(); + jLabel3 = new javax.swing.JLabel(); + batchProcessing = new javax.swing.JPanel(); + jLabel2 = new javax.swing.JLabel(); + symetryEstimator = new javax.swing.JPanel(); + jLabel4 = new javax.swing.JLabel(); + jPanel2 = new javax.swing.JPanel(); + startingPanel = new javax.swing.JPanel(); + javax.swing.JLabel logo = new javax.swing.JLabel(); + jPanel3 = new javax.swing.JPanel(); + compareTwoMain = new javax.swing.JPanel(); + compareTwoMain1 = new javax.swing.JPanel(); + batchMain = new javax.swing.JPanel(); + JLabel10 = new javax.swing.JLabel(); + symetryMain = new javax.swing.JPanel(); + JLabel11 = new javax.swing.JLabel(); + viewerButton = new javax.swing.JLabel(); + JLabel8 = new javax.swing.JLabel(); + JLabel9 = new javax.swing.JLabel(); + symetryPanel = new javax.swing.JPanel(); + viewerPanel = new javax.swing.JPanel(); + canvasSymmetryPanel = new cz.fidentis.analyst.gui.Canvas(); + reloadModelButton = new javax.swing.JLabel(); + exportModelButton = new javax.swing.JLabel(); + symmetryPanel1 = new cz.fidentis.analyst.gui.SymmetryPanel(); + filler1 = new javax.swing.Box.Filler(new java.awt.Dimension(0, 0), new java.awt.Dimension(0, 0), new java.awt.Dimension(0, 32767)); + filler2 = new javax.swing.Box.Filler(new java.awt.Dimension(0, 0), new java.awt.Dimension(0, 0), new java.awt.Dimension(0, 32767)); + modelViewPanel = new javax.swing.JPanel(); + reloadModelButton1 = new javax.swing.JLabel(); + jPanel4 = new javax.swing.JPanel(); + canvasModelView = new cz.fidentis.analyst.gui.Canvas(); + filler3 = new javax.swing.Box.Filler(new java.awt.Dimension(0, 0), new java.awt.Dimension(0, 0), new java.awt.Dimension(0, 32767)); + filler4 = new javax.swing.Box.Filler(new java.awt.Dimension(0, 0), new java.awt.Dimension(0, 0), new java.awt.Dimension(0, 32767)); + + setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); + setBackground(new java.awt.Color(0, 174, 163)); + setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR)); + setLocationByPlatform(true); + + jPanel1.setBackground(new java.awt.Color(20, 114, 105)); + jPanel1.setPreferredSize(new java.awt.Dimension(1200, 77)); + jPanel1.addMouseMotionListener(new java.awt.event.MouseMotionAdapter() { + public void mouseDragged(java.awt.event.MouseEvent evt) { + jPanel1MouseDragged(evt); + } + }); + jPanel1.addMouseListener(new java.awt.event.MouseAdapter() { + public void mousePressed(java.awt.event.MouseEvent evt) { + jPanel1MousePressed(evt); + } + }); + + newProject.setBackground(new java.awt.Color(20, 114, 105)); + newProject.setFont(new java.awt.Font("Neue Haas Unica Pro", 0, 18)); // NOI18N + newProject.setForeground(new java.awt.Color(255, 255, 255)); + newProject.setIcon(new javax.swing.ImageIcon(getClass().getResource("/cz/fidentis/analyst/gui/resources/newP.png"))); // NOI18N + newProject.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); + newProject.setOpaque(true); + newProject.addMouseMotionListener(new java.awt.event.MouseMotionAdapter() { + public void mouseMoved(java.awt.event.MouseEvent evt) { + newProjectMouseMoved(evt); + } + }); + newProject.addMouseListener(new java.awt.event.MouseAdapter() { + public void mouseExited(java.awt.event.MouseEvent evt) { + newProjectMouseExited(evt); + } + public void mousePressed(java.awt.event.MouseEvent evt) { + newProjectMousePressed(evt); + } + }); + + wiredModelButton.setBackground(new java.awt.Color(20, 114, 105)); + wiredModelButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/cz/fidentis/analyst/gui/resources/wireframe2.png"))); // NOI18N + wiredModelButton.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); + wiredModelButton.setOpaque(true); + wiredModelButton.addMouseListener(new java.awt.event.MouseAdapter() { + public void mouseClicked(java.awt.event.MouseEvent evt) { + wiredModelButtonMouseClicked(evt); + } + }); + + homeButton.setBackground(new java.awt.Color(20, 114, 105)); + homeButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/cz/fidentis/analyst/gui/resources/home.png"))); // NOI18N + homeButton.setToolTipText("Home"); + homeButton.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); + homeButton.setOpaque(true); + homeButton.addMouseMotionListener(new java.awt.event.MouseMotionAdapter() { + public void mouseMoved(java.awt.event.MouseEvent evt) { + homeButtonMouseMoved(evt); + } + }); + homeButton.addMouseListener(new java.awt.event.MouseAdapter() { + public void mouseClicked(java.awt.event.MouseEvent evt) { + homeButtonMouseClicked(evt); + } + public void mouseExited(java.awt.event.MouseEvent evt) { + homeButtonMouseExited(evt); + } + }); + + javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); + jPanel1.setLayout(jPanel1Layout); + jPanel1Layout.setHorizontalGroup( + jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel1Layout.createSequentialGroup() + .addContainerGap() + .addComponent(homeButton) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(newProject, javax.swing.GroupLayout.PREFERRED_SIZE, 149, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(wiredModelButton, javax.swing.GroupLayout.PREFERRED_SIZE, 134, javax.swing.GroupLayout.PREFERRED_SIZE) + .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + ); + jPanel1Layout.setVerticalGroup( + jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(wiredModelButton, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(newProject, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(homeButton, javax.swing.GroupLayout.DEFAULT_SIZE, 52, Short.MAX_VALUE) + ); + + topPanel.setBackground(new java.awt.Color(20, 114, 105)); + topPanel.setPreferredSize(new java.awt.Dimension(1200, 266)); + + compareTwo.setBackground(new java.awt.Color(20, 114, 105)); + compareTwo.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); + + jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); + jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/cz/fidentis/analyst/gui/resources/compareTwoStart.png"))); // NOI18N + jLabel1.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR)); + + javax.swing.GroupLayout compareTwoLayout = new javax.swing.GroupLayout(compareTwo); + compareTwo.setLayout(compareTwoLayout); + compareTwoLayout.setHorizontalGroup( + compareTwoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(compareTwoLayout.createSequentialGroup() + .addContainerGap() + .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addContainerGap()) + ); + compareTwoLayout.setVerticalGroup( + compareTwoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(compareTwoLayout.createSequentialGroup() + .addGap(30, 30, 30) + .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addGap(28, 28, 28)) + ); + + compareDB.setBackground(new java.awt.Color(20, 114, 105)); + compareDB.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); + + jLabel3.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); + jLabel3.setIcon(new javax.swing.ImageIcon(getClass().getResource("/cz/fidentis/analyst/gui/resources/batchProcessingStart.png"))); // NOI18N + jLabel3.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR)); + + javax.swing.GroupLayout compareDBLayout = new javax.swing.GroupLayout(compareDB); + compareDB.setLayout(compareDBLayout); + compareDBLayout.setHorizontalGroup( + compareDBLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jLabel3, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + ); + compareDBLayout.setVerticalGroup( + compareDBLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jLabel3, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + ); + + batchProcessing.setBackground(new java.awt.Color(20, 114, 105)); + batchProcessing.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); + + jLabel2.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); + jLabel2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/cz/fidentis/analyst/gui/resources/copareWithDatabaseStart.png"))); // NOI18N + jLabel2.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR)); + + javax.swing.GroupLayout batchProcessingLayout = new javax.swing.GroupLayout(batchProcessing); + batchProcessing.setLayout(batchProcessingLayout); + batchProcessingLayout.setHorizontalGroup( + batchProcessingLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(batchProcessingLayout.createSequentialGroup() + .addGap(26, 26, 26) + .addComponent(jLabel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + ); + batchProcessingLayout.setVerticalGroup( + batchProcessingLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, batchProcessingLayout.createSequentialGroup() + .addContainerGap() + .addComponent(jLabel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + ); + + symetryEstimator.setBackground(new java.awt.Color(20, 114, 105)); + symetryEstimator.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); + symetryEstimator.addMouseListener(new java.awt.event.MouseAdapter() { + public void mouseClicked(java.awt.event.MouseEvent evt) { + symetryEstimatorMouseClicked(evt); + } + }); + + jLabel4.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); + jLabel4.setIcon(new javax.swing.ImageIcon(getClass().getResource("/cz/fidentis/analyst/gui/resources/symetryStartP.png"))); // NOI18N + jLabel4.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); + jLabel4.addMouseMotionListener(new java.awt.event.MouseMotionAdapter() { + public void mouseMoved(java.awt.event.MouseEvent evt) { + jLabel4MouseMoved1(evt); + } + }); + jLabel4.addMouseListener(new java.awt.event.MouseAdapter() { + public void mouseClicked(java.awt.event.MouseEvent evt) { + jLabel4MouseClicked(evt); + } + public void mouseExited(java.awt.event.MouseEvent evt) { + jLabel4MouseExited(evt); + } + }); + + javax.swing.GroupLayout symetryEstimatorLayout = new javax.swing.GroupLayout(symetryEstimator); + symetryEstimator.setLayout(symetryEstimatorLayout); + symetryEstimatorLayout.setHorizontalGroup( + symetryEstimatorLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, symetryEstimatorLayout.createSequentialGroup() + .addContainerGap() + .addComponent(jLabel4, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addContainerGap()) + ); + symetryEstimatorLayout.setVerticalGroup( + symetryEstimatorLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, symetryEstimatorLayout.createSequentialGroup() + .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 137, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(36, 36, 36)) + ); + + javax.swing.GroupLayout topPanelLayout = new javax.swing.GroupLayout(topPanel); + topPanel.setLayout(topPanelLayout); + topPanelLayout.setHorizontalGroup( + topPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(topPanelLayout.createSequentialGroup() + .addContainerGap(99, Short.MAX_VALUE) + .addComponent(compareTwo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(105, 105, 105) + .addComponent(compareDB, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(94, 94, 94) + .addComponent(batchProcessing, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(94, 94, 94) + .addComponent(symetryEstimator, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addContainerGap(98, Short.MAX_VALUE)) + ); + topPanelLayout.setVerticalGroup( + topPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(topPanelLayout.createSequentialGroup() + .addGap(52, 52, 52) + .addGroup(topPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(symetryEstimator, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(compareDB, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, topPanelLayout.createSequentialGroup() + .addGap(0, 0, Short.MAX_VALUE) + .addComponent(compareTwo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addComponent(batchProcessing, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))) + ); + + jPanel2.setBackground(new java.awt.Color(0, 174, 163)); + jPanel2.setFont(new java.awt.Font("Arial", 1, 13)); // NOI18N + jPanel2.setPreferredSize(getPreferredSize()); + jPanel2.setLayout(new java.awt.CardLayout()); + + startingPanel.setBackground(new java.awt.Color(0, 174, 163)); + startingPanel.setToolTipText(""); + startingPanel.setMaximumSize(new java.awt.Dimension(0, 0)); + startingPanel.setPreferredSize(new java.awt.Dimension(1200, 800)); + startingPanel.setRequestFocusEnabled(false); + + logo.setIcon(new javax.swing.ImageIcon(getClass().getResource("/cz/fidentis/analyst/gui/resources/logo3.png"))); // NOI18N + + jPanel3.setBackground(new java.awt.Color(0, 174, 163)); + jPanel3.setToolTipText(""); + + compareTwoMain.setBackground(new java.awt.Color(0, 174, 163)); + + javax.swing.GroupLayout compareTwoMainLayout = new javax.swing.GroupLayout(compareTwoMain); + compareTwoMain.setLayout(compareTwoMainLayout); + compareTwoMainLayout.setHorizontalGroup( + compareTwoMainLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGap(0, 177, Short.MAX_VALUE) + ); + compareTwoMainLayout.setVerticalGroup( + compareTwoMainLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGap(0, 170, Short.MAX_VALUE) + ); + + compareTwoMain1.setBackground(new java.awt.Color(0, 174, 163)); + + javax.swing.GroupLayout compareTwoMain1Layout = new javax.swing.GroupLayout(compareTwoMain1); + compareTwoMain1.setLayout(compareTwoMain1Layout); + compareTwoMain1Layout.setHorizontalGroup( + compareTwoMain1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGap(0, 220, Short.MAX_VALUE) + ); + compareTwoMain1Layout.setVerticalGroup( + compareTwoMain1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGap(0, 169, Short.MAX_VALUE) + ); + + batchMain.setBackground(new java.awt.Color(0, 174, 163)); + + JLabel10.setIcon(new javax.swing.ImageIcon(getClass().getResource("/cz/fidentis/analyst/gui/resources/batchProcessingStart.png"))); // NOI18N + + javax.swing.GroupLayout batchMainLayout = new javax.swing.GroupLayout(batchMain); + batchMain.setLayout(batchMainLayout); + batchMainLayout.setHorizontalGroup( + batchMainLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(batchMainLayout.createSequentialGroup() + .addContainerGap() + .addComponent(JLabel10) + .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + ); + batchMainLayout.setVerticalGroup( + batchMainLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(batchMainLayout.createSequentialGroup() + .addGap(25, 25, 25) + .addComponent(JLabel10) + .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + ); + + symetryMain.setBackground(new java.awt.Color(0, 174, 163)); + + JLabel11.setBackground(new java.awt.Color(0, 174, 163)); + JLabel11.setIcon(new javax.swing.ImageIcon(getClass().getResource("/cz/fidentis/analyst/gui/resources/symetryStart.png"))); // NOI18N + JLabel11.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); + JLabel11.addMouseMotionListener(new java.awt.event.MouseMotionAdapter() { + public void mouseMoved(java.awt.event.MouseEvent evt) { + JLabel11MouseMoved(evt); + } + }); + JLabel11.addMouseListener(new java.awt.event.MouseAdapter() { + public void mouseClicked(java.awt.event.MouseEvent evt) { + JLabel11MouseClicked(evt); + } + public void mouseExited(java.awt.event.MouseEvent evt) { + JLabel11MouseExited(evt); + } + }); + + javax.swing.GroupLayout symetryMainLayout = new javax.swing.GroupLayout(symetryMain); + symetryMain.setLayout(symetryMainLayout); + symetryMainLayout.setHorizontalGroup( + symetryMainLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(JLabel11, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 189, Short.MAX_VALUE) + ); + symetryMainLayout.setVerticalGroup( + symetryMainLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, symetryMainLayout.createSequentialGroup() + .addContainerGap() + .addComponent(JLabel11, javax.swing.GroupLayout.DEFAULT_SIZE, 167, Short.MAX_VALUE)) + ); + + viewerButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/cz/fidentis/analyst/gui/resources/modelView.png"))); // NOI18N + viewerButton.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); + viewerButton.addMouseMotionListener(new java.awt.event.MouseMotionAdapter() { + public void mouseMoved(java.awt.event.MouseEvent evt) { + viewerButtonMouseMoved(evt); + } + }); + viewerButton.addMouseListener(new java.awt.event.MouseAdapter() { + public void mouseClicked(java.awt.event.MouseEvent evt) { + viewerButtonMouseClicked(evt); + } + public void mouseExited(java.awt.event.MouseEvent evt) { + viewerButtonMouseExited(evt); + } + }); + + JLabel8.setIcon(new javax.swing.ImageIcon(getClass().getResource("/cz/fidentis/analyst/gui/resources/compareTwoStart.png"))); // NOI18N + + JLabel9.setBackground(new java.awt.Color(0, 174, 163)); + JLabel9.setIcon(new javax.swing.ImageIcon(getClass().getResource("/cz/fidentis/analyst/gui/resources/copareWithDatabaseStart.png"))); // NOI18N + + javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3); + jPanel3.setLayout(jPanel3Layout); + jPanel3Layout.setHorizontalGroup( + jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel3Layout.createSequentialGroup() + .addContainerGap(17, Short.MAX_VALUE) + .addComponent(viewerButton, javax.swing.GroupLayout.PREFERRED_SIZE, 323, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(18, 18, 18) + .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(compareTwoMain, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(compareTwoMain1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel3Layout.createSequentialGroup() + .addComponent(JLabel8, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addGap(62, 62, 62)) + .addGroup(jPanel3Layout.createSequentialGroup() + .addComponent(JLabel9, javax.swing.GroupLayout.PREFERRED_SIZE, 196, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))) + .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(batchMain, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGroup(jPanel3Layout.createSequentialGroup() + .addGap(12, 12, 12) + .addComponent(symetryMain, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))) + .addContainerGap(42, Short.MAX_VALUE)) + ); + jPanel3Layout.setVerticalGroup( + jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel3Layout.createSequentialGroup() + .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel3Layout.createSequentialGroup() + .addContainerGap() + .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) + .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(JLabel8, javax.swing.GroupLayout.PREFERRED_SIZE, 142, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(compareTwoMain, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGroup(jPanel3Layout.createSequentialGroup() + .addComponent(batchMain, javax.swing.GroupLayout.PREFERRED_SIZE, 173, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(28, 28, 28))) + .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(compareTwoMain1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(symetryMain, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))) + .addGroup(jPanel3Layout.createSequentialGroup() + .addGap(296, 296, 296) + .addComponent(JLabel9, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addGap(8, 8, 8))) + .addContainerGap()) + .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel3Layout.createSequentialGroup() + .addGap(0, 0, Short.MAX_VALUE) + .addComponent(viewerButton) + .addGap(41, 41, 41)) + ); + + javax.swing.GroupLayout startingPanelLayout = new javax.swing.GroupLayout(startingPanel); + startingPanel.setLayout(startingPanelLayout); + startingPanelLayout.setHorizontalGroup( + startingPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(startingPanelLayout.createSequentialGroup() + .addContainerGap(81, Short.MAX_VALUE) + .addGroup(startingPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, startingPanelLayout.createSequentialGroup() + .addComponent(logo, javax.swing.GroupLayout.PREFERRED_SIZE, 218, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(400, 400, 400))) + .addContainerGap(81, Short.MAX_VALUE)) + ); + startingPanelLayout.setVerticalGroup( + startingPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(startingPanelLayout.createSequentialGroup() + .addContainerGap(133, Short.MAX_VALUE) + .addComponent(logo, javax.swing.GroupLayout.PREFERRED_SIZE, 124, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) + .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addContainerGap(136, Short.MAX_VALUE)) + ); + + jPanel2.add(startingPanel, "card3"); + + symetryPanel.setBackground(new java.awt.Color(0, 174, 163)); + symetryPanel.setPreferredSize(new java.awt.Dimension(1200, 800)); + + javax.swing.GroupLayout viewerPanelLayout = new javax.swing.GroupLayout(viewerPanel); + viewerPanel.setLayout(viewerPanelLayout); + viewerPanelLayout.setHorizontalGroup( + viewerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(viewerPanelLayout.createSequentialGroup() + .addContainerGap() + .addComponent(canvasSymmetryPanel, javax.swing.GroupLayout.DEFAULT_SIZE, 553, Short.MAX_VALUE) + .addContainerGap()) + ); + viewerPanelLayout.setVerticalGroup( + viewerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(viewerPanelLayout.createSequentialGroup() + .addContainerGap() + .addComponent(canvasSymmetryPanel, javax.swing.GroupLayout.DEFAULT_SIZE, 588, Short.MAX_VALUE) + .addContainerGap()) + ); + + reloadModelButton.setBackground(new java.awt.Color(0, 174, 163)); + reloadModelButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/cz/fidentis/analyst/gui/resources/loadModel.png"))); // NOI18N + reloadModelButton.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); + reloadModelButton.setOpaque(true); + reloadModelButton.addMouseMotionListener(new java.awt.event.MouseMotionAdapter() { + public void mouseMoved(java.awt.event.MouseEvent evt) { + reloadModelButtonMouseMoved(evt); + } + }); + reloadModelButton.addMouseListener(new java.awt.event.MouseAdapter() { + public void mouseClicked(java.awt.event.MouseEvent evt) { + reloadModelButtonMouseClicked(evt); + } + public void mouseExited(java.awt.event.MouseEvent evt) { + reloadModelButtonMouseExited(evt); + } + }); + + exportModelButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/cz/fidentis/analyst/gui/resources/exportModel.png"))); // NOI18N + exportModelButton.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); + exportModelButton.addMouseMotionListener(new java.awt.event.MouseMotionAdapter() { + public void mouseMoved(java.awt.event.MouseEvent evt) { + exportModelButtonMouseMoved(evt); + } + }); + exportModelButton.addMouseListener(new java.awt.event.MouseAdapter() { + public void mouseClicked(java.awt.event.MouseEvent evt) { + exportModelButtonMouseClicked(evt); + } + public void mouseExited(java.awt.event.MouseEvent evt) { + exportModelButtonMouseExited(evt); + } + }); + + symmetryPanel1.setBackground(new java.awt.Color(176, 230, 226)); + + javax.swing.GroupLayout symetryPanelLayout = new javax.swing.GroupLayout(symetryPanel); + symetryPanel.setLayout(symetryPanelLayout); + symetryPanelLayout.setHorizontalGroup( + symetryPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(symetryPanelLayout.createSequentialGroup() + .addContainerGap(78, Short.MAX_VALUE) + .addComponent(viewerPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(72, 72, 72) + .addGroup(symetryPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(exportModelButton) + .addComponent(reloadModelButton) + .addComponent(symmetryPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, 461, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + .addComponent(filler1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(filler2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + ); + symetryPanelLayout.setVerticalGroup( + symetryPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(symetryPanelLayout.createSequentialGroup() + .addComponent(filler2, javax.swing.GroupLayout.PREFERRED_SIZE, 58, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 46, Short.MAX_VALUE) + .addGroup(symetryPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) + .addGroup(symetryPanelLayout.createSequentialGroup() + .addComponent(symmetryPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(exportModelButton) + .addGap(18, 18, 18) + .addComponent(reloadModelButton)) + .addComponent(viewerPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(filler1, javax.swing.GroupLayout.PREFERRED_SIZE, 51, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(93, 93, 93)) + ); + + jPanel2.add(symetryPanel, "card3"); + + modelViewPanel.setBackground(new java.awt.Color(0, 174, 163)); + modelViewPanel.setToolTipText(""); + modelViewPanel.setPreferredSize(new java.awt.Dimension(1200, 800)); + + reloadModelButton1.setBackground(new java.awt.Color(0, 174, 163)); + reloadModelButton1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/cz/fidentis/analyst/gui/resources/loadModel.png"))); // NOI18N + reloadModelButton1.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); + reloadModelButton1.setOpaque(true); + reloadModelButton1.addMouseMotionListener(new java.awt.event.MouseMotionAdapter() { + public void mouseMoved(java.awt.event.MouseEvent evt) { + reloadModelButton1MouseMoved(evt); + } + }); + reloadModelButton1.addMouseListener(new java.awt.event.MouseAdapter() { + public void mouseClicked(java.awt.event.MouseEvent evt) { + reloadModelButton1MouseClicked(evt); + } + public void mouseExited(java.awt.event.MouseEvent evt) { + reloadModelButton1MouseExited(evt); + } + }); + + javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4); + jPanel4.setLayout(jPanel4Layout); + jPanel4Layout.setHorizontalGroup( + jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel4Layout.createSequentialGroup() + .addContainerGap() + .addComponent(canvasModelView, javax.swing.GroupLayout.PREFERRED_SIZE, 795, javax.swing.GroupLayout.PREFERRED_SIZE) + .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + ); + jPanel4Layout.setVerticalGroup( + jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel4Layout.createSequentialGroup() + .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(canvasModelView, javax.swing.GroupLayout.PREFERRED_SIZE, 553, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(98, 98, 98)) + ); + + javax.swing.GroupLayout modelViewPanelLayout = new javax.swing.GroupLayout(modelViewPanel); + modelViewPanel.setLayout(modelViewPanelLayout); + modelViewPanelLayout.setHorizontalGroup( + modelViewPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(filler3, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, modelViewPanelLayout.createSequentialGroup() + .addContainerGap(87, Short.MAX_VALUE) + .addComponent(jPanel4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(18, 18, 18) + .addComponent(reloadModelButton1) + .addContainerGap(95, Short.MAX_VALUE)) + .addComponent(filler4, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + ); + modelViewPanelLayout.setVerticalGroup( + modelViewPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(modelViewPanelLayout.createSequentialGroup() + .addComponent(filler3, javax.swing.GroupLayout.PREFERRED_SIZE, 73, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 87, Short.MAX_VALUE) + .addGroup(modelViewPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) + .addComponent(jPanel4, javax.swing.GroupLayout.PREFERRED_SIZE, 579, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(reloadModelButton1)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(filler4, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE) + .addContainerGap(92, Short.MAX_VALUE)) + ); + + jPanel2.add(modelViewPanel, "card4"); + modelViewPanel.getAccessibleContext().setAccessibleName(""); + + javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); + getContentPane().setLayout(layout); + layout.setHorizontalGroup( + layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(topPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(jPanel1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + ); + layout.setVerticalGroup( + layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(layout.createSequentialGroup() + .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, 52, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) + .addComponent(topPanel, javax.swing.GroupLayout.PREFERRED_SIZE, 239, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(0, 565, Short.MAX_VALUE)) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jPanel2, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + ); + + topPanel.getAccessibleContext().setAccessibleName(""); + + pack(); + setLocationRelativeTo(null); + }// </editor-fold>//GEN-END:initComponents + + /** + * + * @param evt Changes the backround of the new project button + */ + private void newProjectMouseMoved(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_newProjectMouseMoved + setLabelBackround(newProject); + }//GEN-LAST:event_newProjectMouseMoved + + /** + * + * @param evt Changes back the backround of the new project button + */ + private void newProjectMouseExited(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_newProjectMouseExited + if (!pressedNewProject) { + resetLabelBackround(newProject); + } + }//GEN-LAST:event_newProjectMouseExited + + /** + * + * @param evt While moved with mouse, symmetry label changes + */ + private void jLabel4MouseMoved1(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jLabel4MouseMoved1 + jLabel4.setIcon(new javax.swing.ImageIcon(getClass().getResource("/cz/fidentis/analyst/gui/resources/symetryStartPanel.png"))); + }//GEN-LAST:event_jLabel4MouseMoved1 + + /** + * + * @param evt Shows menu with icons for programs of the app + */ + private void newProjectMousePressed(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_newProjectMousePressed + if(pressedNewProject) { + topPanel.setVisible(false); + pressedNewProject = false; + switchPanelOnMainPanel(actualPanel); + newProject.setIcon(new javax.swing.ImageIcon(getClass().getResource("/cz/fidentis/analyst/gui/resources/newP.png"))); + }else{ + topPanel.setVisible(true); + topPanel.add(jPanel1); + pressedNewProject = true; + newProject.setIcon(new javax.swing.ImageIcon(getClass().getResource("/cz/fidentis/analyst/gui/resources/new_project_opened.png"))); + } + }//GEN-LAST:event_newProjectMousePressed + + + /** + * + * @param evt Switch to symmetry panel + */ + private void JLabel11MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_JLabel11MouseClicked + switchPanelOnMainPanel(symetryPanel); + }//GEN-LAST:event_JLabel11MouseClicked + + /** + * + * @param evt Switch to symmetry panel + */ + private void symetryEstimatorMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_symetryEstimatorMouseClicked + switchPanelOnMainPanel(symetryPanel); + topPanel.setVisible(false); + ImageIcon icon = new ImageIcon(getClass().getResource("/cz/fidentis/analyst/gui/resources/newP.png")); + + newProject.setIcon(icon); + resetLabelBackround(newProject); + }//GEN-LAST:event_symetryEstimatorMouseClicked + + /** + * + * @param evt Enables to move with the window of the app + */ + private void jPanel1MouseDragged(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jPanel1MouseDragged + int x = evt.getXOnScreen(); + int y = evt.getYOnScreen(); + frameMain.setLocation(x - xMouse, y - yMouse); + }//GEN-LAST:event_jPanel1MouseDragged + + /** + * + * @param evt Enables to move with the window of the app + */ + private void jPanel1MousePressed(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jPanel1MousePressed + xMouse = evt.getX(); + yMouse = evt.getY(); + }//GEN-LAST:event_jPanel1MousePressed + + /** + * + * @param evt Changes the backround of the reload button + */ + private void reloadModelButtonMouseMoved(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_reloadModelButtonMouseMoved + reloadModelButton.setBackground(new Color(176,230,226)); + }//GEN-LAST:event_reloadModelButtonMouseMoved + + /** + * + * @param evt Changes the backround of the reload button + */ + private void reloadModelButtonMouseExited(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_reloadModelButtonMouseExited + reloadModelButton.setBackground(new Color(0,174,163)); + }//GEN-LAST:event_reloadModelButtonMouseExited + + /** + * + * @param evt Loads the model that will be displayed + */ + private void reloadModelButtonMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_reloadModelButtonMouseClicked + canvasSymmetryPanel.loadModel(); + if (canvasSymmetryPanel.isLoaded()) { + symmetryPanel1.showPlaneButtonsOnPanel(false); + } + }//GEN-LAST:event_reloadModelButtonMouseClicked + + /** + * letting know GLCanva if model will be displayed as wire-frame + */ + private void wiredModelButtonMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_wiredModelButtonMouseClicked + if (wiredModelClicked) { + resetLabelBackround(wiredModelButton); + wiredModelClicked = false; + canvasSymmetryPanel.setDrawWired(wiredModelClicked); + canvasModelView.setDrawWired(wiredModelClicked); + } else { + setLabelBackround(wiredModelButton); + wiredModelClicked = true; + canvasSymmetryPanel.setDrawWired(wiredModelClicked); + canvasModelView.setDrawWired(wiredModelClicked); + } + }//GEN-LAST:event_wiredModelButtonMouseClicked + + /** + * + * @param evt Changes the backround of the home button + */ + private void homeButtonMouseMoved(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_homeButtonMouseMoved + setLabelBackround(homeButton); + }//GEN-LAST:event_homeButtonMouseMoved + + /** + * + * @param evt Changes the backround of the home button + */ + private void homeButtonMouseExited(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_homeButtonMouseExited + resetLabelBackround(homeButton); + }//GEN-LAST:event_homeButtonMouseExited + + /** + * + * @param evt Returns to home panel of the app + */ + private void homeButtonMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_homeButtonMouseClicked + switchPanelOnMainPanel(startingPanel); + }//GEN-LAST:event_homeButtonMouseClicked + + /** + * + * @param evt Changes the backround of the reload button + */ + private void reloadModelButton1MouseMoved(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_reloadModelButton1MouseMoved + reloadModelButton1.setBackground(new Color(176,230,226)); + }//GEN-LAST:event_reloadModelButton1MouseMoved + + /** + * + * @param evt Loads the model that will be displayed + */ + private void reloadModelButton1MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_reloadModelButton1MouseClicked + canvasModelView.loadModel(); + }//GEN-LAST:event_reloadModelButton1MouseClicked + + /** + * + * @param evt Changes the backround of the reload button + */ + private void reloadModelButton1MouseExited(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_reloadModelButton1MouseExited + reloadModelButton1.setBackground(new Color(0,174,163)); + }//GEN-LAST:event_reloadModelButton1MouseExited + + /** + * + * @param evt Switch to panel for viewing the model + */ + private void viewerButtonMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_viewerButtonMouseClicked + switchPanelOnMainPanel(modelViewPanel); + }//GEN-LAST:event_viewerButtonMouseClicked + + /** + * + * @param evt Changes the backround of the symmetry button + */ + private void JLabel11MouseMoved(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_JLabel11MouseMoved + JLabel11.setIcon(new javax.swing.ImageIcon(getClass().getResource("/cz/fidentis/analyst/gui/resources/symetryStartMoved.png"))); + }//GEN-LAST:event_JLabel11MouseMoved + + /** + * + * @param evt Changes the backround of the viewer panel button + */ + private void viewerButtonMouseMoved(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_viewerButtonMouseMoved + viewerButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/cz/fidentis/analyst/gui/resources/modelViewMoved.png"))); + }//GEN-LAST:event_viewerButtonMouseMoved + + /** + * + * @param evt Changes the backround of the viewer panel button + */ + private void viewerButtonMouseExited(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_viewerButtonMouseExited + viewerButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/cz/fidentis/analyst/gui/resources/modelView.png"))); + }//GEN-LAST:event_viewerButtonMouseExited + + /** + * + * @param evt Changes the backround of the symmetry button + */ + private void JLabel11MouseExited(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_JLabel11MouseExited + JLabel11.setIcon(new javax.swing.ImageIcon(getClass().getResource("/cz/fidentis/analyst/gui/resources/symetryStart.png"))); + }//GEN-LAST:event_JLabel11MouseExited + + /** + * + * @param evt Switch to panel for symmetry + */ + private void jLabel4MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jLabel4MouseClicked + switchPanelOnMainPanel(symetryPanel); + topPanel.setVisible(false); + newProject.setIcon(new javax.swing.ImageIcon(getClass().getResource("/cz/fidentis/analyst/gui/resources/newP.png"))); + resetLabelBackround(newProject); + }//GEN-LAST:event_jLabel4MouseClicked + + /** + * + * @param evt Changes the backround of the export button + */ + private void exportModelButtonMouseMoved(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_exportModelButtonMouseMoved + exportModelButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/cz/fidentis/analyst/gui/resources/exportModelPressed.png"))); + }//GEN-LAST:event_exportModelButtonMouseMoved + + /** + * + * @param evt Changes the backround of the export button + */ + private void exportModelButtonMouseExited(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_exportModelButtonMouseExited + exportModelButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/cz/fidentis/analyst/gui/resources/exportModel.png"))); + }//GEN-LAST:event_exportModelButtonMouseExited + + /** + * When export button pressed, new directory is created and model is exported to it + * If there is not loaded model, user is warned + */ + private void exportModelButtonMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_exportModelButtonMouseClicked + if (canvasSymmetryPanel.getModel().getFacets().isEmpty()){ + JOptionPane.showMessageDialog(frameMain, "You have to load the model.", "Model not loaded", + 0, new ImageIcon(getClass().getResource("/cz/fidentis/analyst/gui/resources/notLoadedModel.png"))); + } else { + JFileChooser chooser = new JFileChooser(); + chooser.showSaveDialog(symetryPanel); + + MeshObjExporter exporter = new MeshObjExporter(canvasSymmetryPanel.getModel()); + try { + if (chooser.getSelectedFile() != null) { + exporter.exportModelToObj(chooser.getSelectedFile()); + JOptionPane.showMessageDialog(frameMain, "Model exported into: " + + chooser.getCurrentDirectory().toString() + "\\" + chooser.getSelectedFile().getName(), "Model exported", + 0, new ImageIcon(getClass().getResource("/cz/fidentis/analyst/gui/resources/exportedModel.png"))); + } + } catch (IOException ex) { + Logger.getLogger(UserInterface.class.getName()).log(Level.SEVERE, null, ex); + } + } + }//GEN-LAST:event_exportModelButtonMouseClicked + + /** + * + * @param evt Changes the backround of the symmetry button + */ + private void jLabel4MouseExited(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jLabel4MouseExited + jLabel4.setIcon(new javax.swing.ImageIcon(getClass().getResource("/cz/fidentis/analyst/gui/resources/symetryStartP.png"))); + }//GEN-LAST:event_jLabel4MouseExited + + + /** + * @param args the command line arguments + */ + public static void main(String args[]) { + try { + for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) { + if ("Nimbus".equals(info.getName())) { + javax.swing.UIManager.setLookAndFeel(info.getClassName()); + break; + } + } + } catch (ClassNotFoundException | InstantiationException | IllegalAccessException | javax.swing.UnsupportedLookAndFeelException ex) { + java.util.logging.Logger.getLogger(UserInterface.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } + java.awt.EventQueue.invokeLater(() -> { + frameMain = new UserInterface(); + frameMain.setBackground(new Color(49,165,154)); + frameMain.pack(); + frameMain.setVisible(true); + //enables to use design of operating system + try { + UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); + }catch(ClassNotFoundException | IllegalAccessException | InstantiationException | UnsupportedLookAndFeelException ex) { + } + }); + } + + + + + // Variables declaration - do not modify//GEN-BEGIN:variables + private javax.swing.JLabel JLabel10; + private javax.swing.JLabel JLabel11; + private javax.swing.JLabel JLabel8; + private javax.swing.JLabel JLabel9; + private javax.swing.JPanel batchMain; + private javax.swing.JPanel batchProcessing; + private cz.fidentis.analyst.gui.Canvas canvasModelView; + private cz.fidentis.analyst.gui.Canvas canvasSymmetryPanel; + private javax.swing.JPanel compareDB; + private javax.swing.JPanel compareTwo; + private javax.swing.JPanel compareTwoMain; + private javax.swing.JPanel compareTwoMain1; + private javax.swing.JLabel exportModelButton; + private javax.swing.Box.Filler filler1; + private javax.swing.Box.Filler filler2; + private javax.swing.Box.Filler filler3; + private javax.swing.Box.Filler filler4; + private javax.swing.JLabel homeButton; + private javax.swing.JLabel jLabel1; + private javax.swing.JLabel jLabel2; + private javax.swing.JLabel jLabel3; + private javax.swing.JLabel jLabel4; + private javax.swing.JPanel jPanel1; + private javax.swing.JPanel jPanel2; + private javax.swing.JPanel jPanel3; + private javax.swing.JPanel jPanel4; + private javax.swing.JPanel modelViewPanel; + private javax.swing.JLabel newProject; + private javax.swing.JLabel reloadModelButton; + private javax.swing.JLabel reloadModelButton1; + private javax.swing.JPanel startingPanel; + private javax.swing.JPanel symetryEstimator; + private javax.swing.JPanel symetryMain; + private javax.swing.JPanel symetryPanel; + private cz.fidentis.analyst.gui.SymmetryPanel symmetryPanel1; + private javax.swing.JPanel topPanel; + private javax.swing.JLabel viewerButton; + private javax.swing.JPanel viewerPanel; + private javax.swing.JLabel wiredModelButton; + // End of variables declaration//GEN-END:variables +} diff --git a/GUI/src/main/java/cz/fidentis/analyst/gui/resources/angle.png b/GUI/src/main/java/cz/fidentis/analyst/gui/resources/angle.png new file mode 100644 index 0000000000000000000000000000000000000000..a71d54c818db463afe8bd6eb558dff5c60de4629 Binary files /dev/null and b/GUI/src/main/java/cz/fidentis/analyst/gui/resources/angle.png differ diff --git a/GUI/src/main/java/cz/fidentis/analyst/gui/resources/backround.jpg b/GUI/src/main/java/cz/fidentis/analyst/gui/resources/backround.jpg new file mode 100644 index 0000000000000000000000000000000000000000..05b8c3e4bf85f5c984c54054db05e6f6dc2e73a1 Binary files /dev/null and b/GUI/src/main/java/cz/fidentis/analyst/gui/resources/backround.jpg differ diff --git a/GUI/src/main/java/cz/fidentis/analyst/gui/resources/batchProcessing.png b/GUI/src/main/java/cz/fidentis/analyst/gui/resources/batchProcessing.png new file mode 100644 index 0000000000000000000000000000000000000000..2971c594fb3dbbb057e3352c99bba465e6eea945 Binary files /dev/null and b/GUI/src/main/java/cz/fidentis/analyst/gui/resources/batchProcessing.png differ diff --git a/GUI/src/main/java/cz/fidentis/analyst/gui/resources/batchProcessingGreen.png b/GUI/src/main/java/cz/fidentis/analyst/gui/resources/batchProcessingGreen.png new file mode 100644 index 0000000000000000000000000000000000000000..9ad6faf4e7ccb7d70bbc35d3229a198e5aa114e7 Binary files /dev/null and b/GUI/src/main/java/cz/fidentis/analyst/gui/resources/batchProcessingGreen.png differ diff --git a/GUI/src/main/java/cz/fidentis/analyst/gui/resources/batchProcessingStart.png b/GUI/src/main/java/cz/fidentis/analyst/gui/resources/batchProcessingStart.png new file mode 100644 index 0000000000000000000000000000000000000000..9c2512d3525259ce784a8ff845ceb5c25d746b1b Binary files /dev/null and b/GUI/src/main/java/cz/fidentis/analyst/gui/resources/batchProcessingStart.png differ diff --git a/GUI/src/main/java/cz/fidentis/analyst/gui/resources/blackBackroundCanvas.png b/GUI/src/main/java/cz/fidentis/analyst/gui/resources/blackBackroundCanvas.png new file mode 100644 index 0000000000000000000000000000000000000000..1ecd6e228c45a7335b0ce7115cbb31316c29ba7c Binary files /dev/null and b/GUI/src/main/java/cz/fidentis/analyst/gui/resources/blackBackroundCanvas.png differ diff --git a/GUI/src/main/java/cz/fidentis/analyst/gui/resources/blackBackroundCanvasPressed.png b/GUI/src/main/java/cz/fidentis/analyst/gui/resources/blackBackroundCanvasPressed.png new file mode 100644 index 0000000000000000000000000000000000000000..79e8e34a2815e9bc38a1dc591033a55435b61671 Binary files /dev/null and b/GUI/src/main/java/cz/fidentis/analyst/gui/resources/blackBackroundCanvasPressed.png differ diff --git a/GUI/src/main/java/cz/fidentis/analyst/gui/resources/bottom.png b/GUI/src/main/java/cz/fidentis/analyst/gui/resources/bottom.png new file mode 100644 index 0000000000000000000000000000000000000000..16e4137bab172b811419816559b5bf91e98b0517 Binary files /dev/null and b/GUI/src/main/java/cz/fidentis/analyst/gui/resources/bottom.png differ diff --git a/GUI/src/main/java/cz/fidentis/analyst/gui/resources/close.png b/GUI/src/main/java/cz/fidentis/analyst/gui/resources/close.png new file mode 100644 index 0000000000000000000000000000000000000000..bece4b869e31b64d58c4bcaf62ee749dc7fed49e Binary files /dev/null and b/GUI/src/main/java/cz/fidentis/analyst/gui/resources/close.png differ diff --git a/GUI/src/main/java/cz/fidentis/analyst/gui/resources/compareTwo.png b/GUI/src/main/java/cz/fidentis/analyst/gui/resources/compareTwo.png new file mode 100644 index 0000000000000000000000000000000000000000..e1ea0bfebe47a95e62fc34db243e94dac80d3836 Binary files /dev/null and b/GUI/src/main/java/cz/fidentis/analyst/gui/resources/compareTwo.png differ diff --git a/GUI/src/main/java/cz/fidentis/analyst/gui/resources/compareTwoFaces.svg b/GUI/src/main/java/cz/fidentis/analyst/gui/resources/compareTwoFaces.svg new file mode 100644 index 0000000000000000000000000000000000000000..358839af9d92ee564b9e1c0e98cfa5e825630740 --- /dev/null +++ b/GUI/src/main/java/cz/fidentis/analyst/gui/resources/compareTwoFaces.svg @@ -0,0 +1,85 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Generator: Adobe Illustrator 21.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) --> +<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" + viewBox="0 0 141.7 141.7" style="enable-background:new 0 0 141.7 141.7;" xml:space="preserve"> +<style type="text/css"> + .st0{fill:#147269;} + .st1{enable-background:new ;} + .st2{fill:#FFFFFF;} + .st3{clip-path:url(#SVGID_2_);fill:#FFFFFF;} + .st4{clip-path:url(#SVGID_4_);fill:#FFFFFF;} + .st5{fill:none;} +</style> +<g> + <rect x="5.4" y="5.4" class="st0" width="131" height="131"/> + <g class="st1"> + <path class="st2" d="M35.7,111.7h-0.9c-0.1-0.9-0.7-1.5-1.7-1.5c-1.2,0-1.9,1-1.9,2.6s0.7,2.6,1.9,2.6c1,0,1.6-0.6,1.7-1.6h0.9 + c-0.1,1.4-1.1,2.3-2.6,2.3c-1.7,0-2.8-1.3-2.8-3.3c0-2.1,1.1-3.3,2.8-3.3C34.7,109.4,35.6,110.4,35.7,111.7z"/> + <path class="st2" d="M42.4,112.8c0,2-1.1,3.3-2.9,3.3s-2.9-1.3-2.9-3.3s1.1-3.3,2.9-3.3S42.4,110.7,42.4,112.8z M37.4,112.8 + c0,1.6,0.8,2.6,2,2.6c1.3,0,2-1,2-2.6s-0.8-2.6-2-2.6C38.2,110.2,37.4,111.2,37.4,112.8z"/> + <path class="st2" d="M49.5,116v-3.3c0-0.8,0-1.6,0-2.4h0c-0.3,0.8-0.6,1.6-0.9,2.4l-1.2,3.3h-1l-1.2-3.3c-0.3-0.8-0.6-1.6-0.9-2.4 + h0c0,0.8,0,1.6,0,2.4v3.3h-0.8v-6.4H45l1.2,3.2c0.3,0.8,0.6,1.6,0.8,2.5h0c0.3-0.8,0.6-1.6,0.8-2.5l1.2-3.2h1.3v6.4H49.5z"/> + <path class="st2" d="M54.2,109.6c1.5,0,2.2,0.8,2.2,1.9c0,1.2-0.8,1.9-2.2,1.9h-1.4v2.5H52v-6.4H54.2z M52.9,112.7h1.3 + c1,0,1.4-0.5,1.4-1.2c0-0.8-0.5-1.2-1.4-1.2h-1.3V112.7z"/> + <path class="st2" d="M57.8,114.1l-0.7,1.9h-0.9l2.4-6.4h1.1l2.4,6.4h-0.9l-0.7-1.9H57.8z M60.1,112.8c-0.3-0.9-0.6-1.7-0.9-2.6h0 + c-0.3,0.9-0.6,1.7-0.9,2.6l-0.2,0.6h2.3L60.1,112.8z"/> + <path class="st2" d="M64.9,109.6c1.5,0,2.3,0.6,2.3,1.7c0,0.8-0.5,1.4-1.2,1.6v0c0.5,0.1,0.7,0.4,1,1.2l0.7,1.8h-0.9l-0.6-1.7 + c-0.3-0.8-0.6-1-1.2-1h-1.1v2.7h-0.8v-6.4H64.9z M63.7,112.6h1.2c1,0,1.4-0.5,1.4-1.2c0-0.7-0.5-1.1-1.5-1.1h-1.1V112.6z"/> + <path class="st2" d="M69.5,110.3v2h3.1v0.7h-3.1v2.2h3.4v0.7h-4.2v-6.4h4.1v0.7H69.5z"/> + <path class="st2" d="M79.9,111.5c0,1.1-0.7,1.6-1.7,2.1c-1.2,0.7-1.5,1.1-1.5,1.7H80v0.7h-4.2c0-0.1,0-0.1,0-0.2 + c0-1.2,0.3-1.8,1.8-2.7c0.9-0.5,1.4-0.9,1.4-1.6c0-0.6-0.4-1-1.1-1c-0.8,0-1.1,0.4-1.2,1.2h-0.8c0-1.2,0.8-1.9,2-1.9 + C79.1,109.8,79.9,110.5,79.9,111.5z"/> + <path class="st2" d="M84.2,110.3v2.2h3v0.7h-3v2.7h-0.8v-6.4h4v0.7H84.2z"/> + <path class="st2" d="M88.8,114.1l-0.7,1.9h-0.9l2.4-6.4h1.1l2.4,6.4h-0.9l-0.7-1.9H88.8z M91.1,112.8c-0.3-0.9-0.6-1.7-0.9-2.6h0 + c-0.3,0.9-0.6,1.7-0.9,2.6l-0.2,0.6h2.3L91.1,112.8z"/> + <path class="st2" d="M98.8,111.7h-0.9c-0.1-0.9-0.7-1.5-1.7-1.5c-1.2,0-1.9,1-1.9,2.6s0.7,2.6,1.9,2.6c1,0,1.6-0.6,1.7-1.6h0.9 + c-0.1,1.4-1.1,2.3-2.6,2.3c-1.7,0-2.8-1.3-2.8-3.3c0-2.1,1.1-3.3,2.8-3.3C97.8,109.4,98.7,110.4,98.8,111.7z"/> + <path class="st2" d="M100.9,110.3v2h3.1v0.7h-3.1v2.2h3.4v0.7h-4.2v-6.4h4.1v0.7H100.9z"/> + <path class="st2" d="M109.6,111.5h-0.8c0-0.9-0.5-1.4-1.5-1.4c-0.8,0-1.3,0.4-1.3,1c0,0.7,0.5,0.9,1.5,1.1 + c1.2,0.3,2.2,0.6,2.2,1.9c0,1.2-0.9,1.9-2.3,1.9c-1.5,0-2.4-0.8-2.4-2.3h0.9c0,1.1,0.6,1.5,1.5,1.5c0.9,0,1.4-0.4,1.4-1.1 + c0-0.7-0.5-0.9-1.6-1.2c-1.2-0.3-2.2-0.6-2.2-1.9c0-1,0.8-1.8,2.1-1.8C108.8,109.4,109.6,110.2,109.6,111.5z"/> + </g> + <g> + <g> + <g> + <defs> + <ellipse id="SVGID_1_" cx="49.1" cy="62.4" rx="23.8" ry="29.7"/> + </defs> + <clipPath id="SVGID_2_"> + <use xlink:href="#SVGID_1_" style="overflow:visible;"/> + </clipPath> + <path class="st3" d="M65.4,68.5c-0.2,0.5-0.5,0.9-0.8,1.3s-0.7,0.6-1.2,0.6c-0.5-0.1-0.9,0.2-1,0.7c-0.1,0.3-0.1,0.7-0.2,1.1 + c-0.2,3.4-1.4,6.4-3.9,8.8c-0.3,0.3-0.5,0.6-0.5,1.1c0.1,1.9,0,3.8,0.1,5.8c0.1,1.9,0.7,3.5,1.8,4.6c-0.6,0.5-1.3,1-2.1,1.4 + c-0.2,0.1-0.3,0.1-0.5,0.2c-0.9,0.2-1.8,0.4-2.6,0.5c-1.9,0.1-3.8,0.1-5.7,0c-1.1,0-2.3-0.1-3.4-0.1c-0.7-0.1-1.3-0.1-2-0.3 + c-1.7-0.3-3.4-0.9-4.8-1.9c0.5-0.6,0.9-1.2,1.2-2s0.4-1.7,0.4-2.6c0.1-1.9,0.1-3.8,0.2-5.8c0-0.2-0.1-0.5-0.3-0.6 + c-1.6-1.7-2.9-3.6-3.5-5.8c-0.3-1-0.4-2.1-0.6-3.1c-0.1-0.4-0.1-0.8-0.2-1.2c-0.1-0.5-0.5-0.8-1-0.7c-0.7,0.1-1.2-0.3-1.5-0.8 + c-0.5-0.8-0.9-1.7-1.2-2.5c-0.5-1.4-0.6-2.9-0.5-4.4c0.1-0.8,0.4-1.1,1.2-1.1c0.2,0,0.5-0.1,0.7-0.1c0.9-0.3,0.9-0.5,0.8-1.3 + c-0.2-2.3-0.5-4.6-0.6-6.9c-0.3-5.4,2.2-9.4,6.7-12.2c6.8-4.3,16.1-2.7,21,3.5c2,2.5,2.9,5.3,2.7,8.5c-0.1,2.3-0.4,4.6-0.6,6.9 + c-0.1,1.1,0.2,1.4,1.3,1.6c1.2,0.1,1.4,0.4,1.5,1.5C66.5,64.9,66.2,66.7,65.4,68.5z M49.2,50.4c-5.7,0-10.3,6.3-10.3,14.1 + s4.6,14.1,10.3,14.1s10.3-6.3,10.3-14.1S54.9,50.4,49.2,50.4z"/> + </g> + </g> + <g> + <g> + <defs> + <ellipse id="SVGID_3_" cx="92.8" cy="62.4" rx="23.8" ry="29.7"/> + </defs> + <clipPath id="SVGID_4_"> + <use xlink:href="#SVGID_3_" style="overflow:visible;"/> + </clipPath> + <path class="st4" d="M109.1,68.5c-0.2,0.5-0.5,0.9-0.8,1.3s-0.7,0.6-1.2,0.6c-0.5-0.1-0.9,0.2-1,0.7c-0.1,0.3-0.1,0.7-0.2,1.1 + c-0.2,3.4-1.4,6.4-3.9,8.8c-0.3,0.3-0.5,0.6-0.5,1.1c0.1,1.9,0,3.8,0.1,5.8c0.1,1.9,0.7,3.5,1.8,4.6c-0.6,0.5-1.3,1-2.1,1.4 + c-0.2,0.1-0.3,0.1-0.5,0.2c-0.9,0.2-1.8,0.4-2.6,0.5c-1.9,0.1-3.8,0.1-5.7,0c-1.1,0-2.3-0.1-3.4-0.1c-0.7-0.1-1.3-0.1-2-0.3 + c-1.7-0.3-3.4-0.9-4.8-1.9c0.5-0.6,0.9-1.2,1.2-2c0.3-0.8,0.4-1.7,0.4-2.6c0.1-1.9,0.1-3.8,0.2-5.8c0-0.2-0.1-0.5-0.3-0.6 + c-1.6-1.7-2.9-3.6-3.5-5.8c-0.3-1-0.4-2.1-0.6-3.1c-0.1-0.4-0.1-0.8-0.2-1.2c-0.1-0.5-0.5-0.8-1-0.7c-0.7,0.1-1.2-0.3-1.5-0.8 + c-0.5-0.8-0.9-1.7-1.2-2.5c-0.5-1.4-0.6-2.9-0.5-4.4c0.1-0.8,0.4-1.1,1.2-1.1c0.2,0,0.5-0.1,0.7-0.1c0.9-0.3,0.9-0.5,0.8-1.3 + c-0.2-2.3-0.5-4.6-0.6-6.9c-0.3-5.4,2.2-9.4,6.7-12.2c6.8-4.3,16.1-2.7,21,3.5c2,2.5,2.9,5.3,2.7,8.5c-0.1,2.3-0.4,4.6-0.6,6.9 + c-0.1,1.1,0.2,1.4,1.3,1.6c1.2,0.1,1.4,0.4,1.5,1.5C110.2,64.9,109.9,66.8,109.1,68.5z M92.9,50.4c-5.7,0-10.3,6.3-10.3,14.1 + s4.6,14.1,10.3,14.1s10.3-6.3,10.3-14.1S98.6,50.4,92.9,50.4z"/> + </g> + </g> + <path class="st5" d="M38.4,60.9h72.2H38.4z"/> + <rect x="38.4" y="63.7" class="st2" width="68.7" height="3.3"/> + </g> +</g> +</svg> diff --git a/GUI/src/main/java/cz/fidentis/analyst/gui/resources/compareTwoGreen.png b/GUI/src/main/java/cz/fidentis/analyst/gui/resources/compareTwoGreen.png new file mode 100644 index 0000000000000000000000000000000000000000..54815487f8ddc9fa9a90a6c0f269aae084aa1e27 Binary files /dev/null and b/GUI/src/main/java/cz/fidentis/analyst/gui/resources/compareTwoGreen.png differ diff --git a/GUI/src/main/java/cz/fidentis/analyst/gui/resources/compareTwoStart.png b/GUI/src/main/java/cz/fidentis/analyst/gui/resources/compareTwoStart.png new file mode 100644 index 0000000000000000000000000000000000000000..2b7641dc84f2e5f877cef99e298e26dd4da31599 Binary files /dev/null and b/GUI/src/main/java/cz/fidentis/analyst/gui/resources/compareTwoStart.png differ diff --git a/GUI/src/main/java/cz/fidentis/analyst/gui/resources/copareWithDatabase.png b/GUI/src/main/java/cz/fidentis/analyst/gui/resources/copareWithDatabase.png new file mode 100644 index 0000000000000000000000000000000000000000..f0d913ae58a5f70c3d12be6d32ef2b8d8f259054 Binary files /dev/null and b/GUI/src/main/java/cz/fidentis/analyst/gui/resources/copareWithDatabase.png differ diff --git a/GUI/src/main/java/cz/fidentis/analyst/gui/resources/copareWithDatabaseGreen.png b/GUI/src/main/java/cz/fidentis/analyst/gui/resources/copareWithDatabaseGreen.png new file mode 100644 index 0000000000000000000000000000000000000000..adc6ed64c563a92e2ba4427091f2bb4ea2f46708 Binary files /dev/null and b/GUI/src/main/java/cz/fidentis/analyst/gui/resources/copareWithDatabaseGreen.png differ diff --git a/GUI/src/main/java/cz/fidentis/analyst/gui/resources/copareWithDatabaseStart.png b/GUI/src/main/java/cz/fidentis/analyst/gui/resources/copareWithDatabaseStart.png new file mode 100644 index 0000000000000000000000000000000000000000..9a287fd89a0de0f45d2f749a487571b0509f0e63 Binary files /dev/null and b/GUI/src/main/java/cz/fidentis/analyst/gui/resources/copareWithDatabaseStart.png differ diff --git a/GUI/src/main/java/cz/fidentis/analyst/gui/resources/curvature.png b/GUI/src/main/java/cz/fidentis/analyst/gui/resources/curvature.png new file mode 100644 index 0000000000000000000000000000000000000000..c19d8f2dfe9ddd708ee75b102dd3f913c1d3bada Binary files /dev/null and b/GUI/src/main/java/cz/fidentis/analyst/gui/resources/curvature.png differ diff --git a/GUI/src/main/java/cz/fidentis/analyst/gui/resources/distance.png b/GUI/src/main/java/cz/fidentis/analyst/gui/resources/distance.png new file mode 100644 index 0000000000000000000000000000000000000000..6c31475bd90db4bc0c4deeeef48eaf05256314d4 Binary files /dev/null and b/GUI/src/main/java/cz/fidentis/analyst/gui/resources/distance.png differ diff --git a/GUI/src/main/java/cz/fidentis/analyst/gui/resources/divide.png b/GUI/src/main/java/cz/fidentis/analyst/gui/resources/divide.png new file mode 100644 index 0000000000000000000000000000000000000000..5fab565670b529a75edbf308d1261005b57ee2a7 Binary files /dev/null and b/GUI/src/main/java/cz/fidentis/analyst/gui/resources/divide.png differ diff --git a/GUI/src/main/java/cz/fidentis/analyst/gui/resources/downButton.png b/GUI/src/main/java/cz/fidentis/analyst/gui/resources/downButton.png new file mode 100644 index 0000000000000000000000000000000000000000..8eb47099a722558e89ff3da803d806939e676b0a Binary files /dev/null and b/GUI/src/main/java/cz/fidentis/analyst/gui/resources/downButton.png differ diff --git a/GUI/src/main/java/cz/fidentis/analyst/gui/resources/downButtonPressed.png b/GUI/src/main/java/cz/fidentis/analyst/gui/resources/downButtonPressed.png new file mode 100644 index 0000000000000000000000000000000000000000..05aa27c9c2a51e99264758046f9e091a4cff37a6 Binary files /dev/null and b/GUI/src/main/java/cz/fidentis/analyst/gui/resources/downButtonPressed.png differ diff --git a/GUI/src/main/java/cz/fidentis/analyst/gui/resources/exportModel.png b/GUI/src/main/java/cz/fidentis/analyst/gui/resources/exportModel.png new file mode 100644 index 0000000000000000000000000000000000000000..95accab2bb096b0b8c8c6bb4ee5af73ff1914a47 Binary files /dev/null and b/GUI/src/main/java/cz/fidentis/analyst/gui/resources/exportModel.png differ diff --git a/GUI/src/main/java/cz/fidentis/analyst/gui/resources/exportModelPressed.png b/GUI/src/main/java/cz/fidentis/analyst/gui/resources/exportModelPressed.png new file mode 100644 index 0000000000000000000000000000000000000000..0c950519a3d831d0ab53260146dbce2143ae7e20 Binary files /dev/null and b/GUI/src/main/java/cz/fidentis/analyst/gui/resources/exportModelPressed.png differ diff --git a/GUI/src/main/java/cz/fidentis/analyst/gui/resources/exportedModel.png b/GUI/src/main/java/cz/fidentis/analyst/gui/resources/exportedModel.png new file mode 100644 index 0000000000000000000000000000000000000000..205cc3f16bac17d7dd719768f0585c2ab03a77ae Binary files /dev/null and b/GUI/src/main/java/cz/fidentis/analyst/gui/resources/exportedModel.png differ diff --git a/GUI/src/main/java/cz/fidentis/analyst/gui/resources/home.png b/GUI/src/main/java/cz/fidentis/analyst/gui/resources/home.png new file mode 100644 index 0000000000000000000000000000000000000000..59c019144b4eaf2f737b4234052143586c77d27f Binary files /dev/null and b/GUI/src/main/java/cz/fidentis/analyst/gui/resources/home.png differ diff --git a/GUI/src/main/java/cz/fidentis/analyst/gui/resources/info.png b/GUI/src/main/java/cz/fidentis/analyst/gui/resources/info.png new file mode 100644 index 0000000000000000000000000000000000000000..0a1bd5107153871284fb876b4bda54f1bafc0f8a Binary files /dev/null and b/GUI/src/main/java/cz/fidentis/analyst/gui/resources/info.png differ diff --git a/GUI/src/main/java/cz/fidentis/analyst/gui/resources/info2.png b/GUI/src/main/java/cz/fidentis/analyst/gui/resources/info2.png new file mode 100644 index 0000000000000000000000000000000000000000..d7f22dbeb4eb56fb7b9b7b9fd9650f094c21e421 Binary files /dev/null and b/GUI/src/main/java/cz/fidentis/analyst/gui/resources/info2.png differ diff --git a/GUI/src/main/java/cz/fidentis/analyst/gui/resources/leftButton.png b/GUI/src/main/java/cz/fidentis/analyst/gui/resources/leftButton.png new file mode 100644 index 0000000000000000000000000000000000000000..f587bdb98b6b3b5c63797b50ea5130c213488580 Binary files /dev/null and b/GUI/src/main/java/cz/fidentis/analyst/gui/resources/leftButton.png differ diff --git a/GUI/src/main/java/cz/fidentis/analyst/gui/resources/leftButtonPressed.png b/GUI/src/main/java/cz/fidentis/analyst/gui/resources/leftButtonPressed.png new file mode 100644 index 0000000000000000000000000000000000000000..01c35e36f24aa5e41c5ff9ccbada0c5baf37aaac Binary files /dev/null and b/GUI/src/main/java/cz/fidentis/analyst/gui/resources/leftButtonPressed.png differ diff --git a/GUI/src/main/java/cz/fidentis/analyst/gui/resources/loadCanva.png b/GUI/src/main/java/cz/fidentis/analyst/gui/resources/loadCanva.png new file mode 100644 index 0000000000000000000000000000000000000000..d360ac7701f606fc431474c05b541e6b69c9bbd0 Binary files /dev/null and b/GUI/src/main/java/cz/fidentis/analyst/gui/resources/loadCanva.png differ diff --git a/GUI/src/main/java/cz/fidentis/analyst/gui/resources/loadCanvaClicked.png b/GUI/src/main/java/cz/fidentis/analyst/gui/resources/loadCanvaClicked.png new file mode 100644 index 0000000000000000000000000000000000000000..aa11ab847494e7d262017e620c817beec68adb05 Binary files /dev/null and b/GUI/src/main/java/cz/fidentis/analyst/gui/resources/loadCanvaClicked.png differ diff --git a/GUI/src/main/java/cz/fidentis/analyst/gui/resources/loadModel.png b/GUI/src/main/java/cz/fidentis/analyst/gui/resources/loadModel.png new file mode 100644 index 0000000000000000000000000000000000000000..1addcde3aefcf68f39a421c712e600566701577c Binary files /dev/null and b/GUI/src/main/java/cz/fidentis/analyst/gui/resources/loadModel.png differ diff --git a/GUI/src/main/java/cz/fidentis/analyst/gui/resources/loadModelPressed.png b/GUI/src/main/java/cz/fidentis/analyst/gui/resources/loadModelPressed.png new file mode 100644 index 0000000000000000000000000000000000000000..fee6376e20ed3e23b62da7822fb499253891df80 Binary files /dev/null and b/GUI/src/main/java/cz/fidentis/analyst/gui/resources/loadModelPressed.png differ diff --git a/GUI/src/main/java/cz/fidentis/analyst/gui/resources/logo.png b/GUI/src/main/java/cz/fidentis/analyst/gui/resources/logo.png new file mode 100644 index 0000000000000000000000000000000000000000..6ad0c43fe09b8b676ae6aa7f5c17995367d8988d Binary files /dev/null and b/GUI/src/main/java/cz/fidentis/analyst/gui/resources/logo.png differ diff --git a/GUI/src/main/java/cz/fidentis/analyst/gui/resources/logo2.png b/GUI/src/main/java/cz/fidentis/analyst/gui/resources/logo2.png new file mode 100644 index 0000000000000000000000000000000000000000..9189251257b8893f260401af214865b53a67ccaa Binary files /dev/null and b/GUI/src/main/java/cz/fidentis/analyst/gui/resources/logo2.png differ diff --git a/GUI/src/main/java/cz/fidentis/analyst/gui/resources/logo3.png b/GUI/src/main/java/cz/fidentis/analyst/gui/resources/logo3.png new file mode 100644 index 0000000000000000000000000000000000000000..425eabc747aa8259a75b92519e1205ce04a9958b Binary files /dev/null and b/GUI/src/main/java/cz/fidentis/analyst/gui/resources/logo3.png differ diff --git a/GUI/src/main/java/cz/fidentis/analyst/gui/resources/maximize.png b/GUI/src/main/java/cz/fidentis/analyst/gui/resources/maximize.png new file mode 100644 index 0000000000000000000000000000000000000000..90b7b9c45053cc610bd7d7fddb6511cafc57999e Binary files /dev/null and b/GUI/src/main/java/cz/fidentis/analyst/gui/resources/maximize.png differ diff --git a/GUI/src/main/java/cz/fidentis/analyst/gui/resources/minimize.png b/GUI/src/main/java/cz/fidentis/analyst/gui/resources/minimize.png new file mode 100644 index 0000000000000000000000000000000000000000..f755ee7b36e01865fd48853e9de991ad6ef1ab2b Binary files /dev/null and b/GUI/src/main/java/cz/fidentis/analyst/gui/resources/minimize.png differ diff --git a/GUI/src/main/java/cz/fidentis/analyst/gui/resources/minimize2.png b/GUI/src/main/java/cz/fidentis/analyst/gui/resources/minimize2.png new file mode 100644 index 0000000000000000000000000000000000000000..22d4076e421401ca5da769a129b79c0afb850a5c Binary files /dev/null and b/GUI/src/main/java/cz/fidentis/analyst/gui/resources/minimize2.png differ diff --git a/GUI/src/main/java/cz/fidentis/analyst/gui/resources/minus.png b/GUI/src/main/java/cz/fidentis/analyst/gui/resources/minus.png new file mode 100644 index 0000000000000000000000000000000000000000..7fb0767bcd876777b4b7a7fdf759c7995001c403 Binary files /dev/null and b/GUI/src/main/java/cz/fidentis/analyst/gui/resources/minus.png differ diff --git a/GUI/src/main/java/cz/fidentis/analyst/gui/resources/minusPressed.png b/GUI/src/main/java/cz/fidentis/analyst/gui/resources/minusPressed.png new file mode 100644 index 0000000000000000000000000000000000000000..37f170fdc13dfc393f125f495c1a45a3bac2a2af Binary files /dev/null and b/GUI/src/main/java/cz/fidentis/analyst/gui/resources/minusPressed.png differ diff --git a/GUI/src/main/java/cz/fidentis/analyst/gui/resources/modelView.png b/GUI/src/main/java/cz/fidentis/analyst/gui/resources/modelView.png new file mode 100644 index 0000000000000000000000000000000000000000..1b86c272720c301cfc948a613429c1895150a211 Binary files /dev/null and b/GUI/src/main/java/cz/fidentis/analyst/gui/resources/modelView.png differ diff --git a/GUI/src/main/java/cz/fidentis/analyst/gui/resources/modelViewMoved.png b/GUI/src/main/java/cz/fidentis/analyst/gui/resources/modelViewMoved.png new file mode 100644 index 0000000000000000000000000000000000000000..778ecff09f0e3310bb2389126bff3fd3af804d1b Binary files /dev/null and b/GUI/src/main/java/cz/fidentis/analyst/gui/resources/modelViewMoved.png differ diff --git a/GUI/src/main/java/cz/fidentis/analyst/gui/resources/n.png b/GUI/src/main/java/cz/fidentis/analyst/gui/resources/n.png new file mode 100644 index 0000000000000000000000000000000000000000..d8344e399084cba38d533b2296d6eb7096418e1b Binary files /dev/null and b/GUI/src/main/java/cz/fidentis/analyst/gui/resources/n.png differ diff --git a/GUI/src/main/java/cz/fidentis/analyst/gui/resources/navigBackground.png b/GUI/src/main/java/cz/fidentis/analyst/gui/resources/navigBackground.png new file mode 100644 index 0000000000000000000000000000000000000000..211771f89a12205cfaadf9ee2278dbcd0d9ba89c Binary files /dev/null and b/GUI/src/main/java/cz/fidentis/analyst/gui/resources/navigBackground.png differ diff --git a/GUI/src/main/java/cz/fidentis/analyst/gui/resources/navigationBackground.png b/GUI/src/main/java/cz/fidentis/analyst/gui/resources/navigationBackground.png new file mode 100644 index 0000000000000000000000000000000000000000..5c432124583a2fd332c0b3e59a65860362dd830e Binary files /dev/null and b/GUI/src/main/java/cz/fidentis/analyst/gui/resources/navigationBackground.png differ diff --git a/GUI/src/main/java/cz/fidentis/analyst/gui/resources/newP.png b/GUI/src/main/java/cz/fidentis/analyst/gui/resources/newP.png new file mode 100644 index 0000000000000000000000000000000000000000..611e3282a43bb46c6b4583c9689f086f7427dcc9 Binary files /dev/null and b/GUI/src/main/java/cz/fidentis/analyst/gui/resources/newP.png differ diff --git a/GUI/src/main/java/cz/fidentis/analyst/gui/resources/new_project.jpg b/GUI/src/main/java/cz/fidentis/analyst/gui/resources/new_project.jpg new file mode 100644 index 0000000000000000000000000000000000000000..620273dfd806c319076851ac9014c2852669e53a Binary files /dev/null and b/GUI/src/main/java/cz/fidentis/analyst/gui/resources/new_project.jpg differ diff --git a/GUI/src/main/java/cz/fidentis/analyst/gui/resources/new_project.png b/GUI/src/main/java/cz/fidentis/analyst/gui/resources/new_project.png new file mode 100644 index 0000000000000000000000000000000000000000..a46c103102dabb9e2d467ce8275633acf38f3d90 Binary files /dev/null and b/GUI/src/main/java/cz/fidentis/analyst/gui/resources/new_project.png differ diff --git a/GUI/src/main/java/cz/fidentis/analyst/gui/resources/new_project_opened.png b/GUI/src/main/java/cz/fidentis/analyst/gui/resources/new_project_opened.png new file mode 100644 index 0000000000000000000000000000000000000000..654a545fe4d667f11afd19971b83935d211ed8dc Binary files /dev/null and b/GUI/src/main/java/cz/fidentis/analyst/gui/resources/new_project_opened.png differ diff --git a/GUI/src/main/java/cz/fidentis/analyst/gui/resources/notLoadedModel.png b/GUI/src/main/java/cz/fidentis/analyst/gui/resources/notLoadedModel.png new file mode 100644 index 0000000000000000000000000000000000000000..ea10626859ce6772f5a5b5ec82c702662586701a Binary files /dev/null and b/GUI/src/main/java/cz/fidentis/analyst/gui/resources/notLoadedModel.png differ diff --git a/GUI/src/main/java/cz/fidentis/analyst/gui/resources/originalModel.png b/GUI/src/main/java/cz/fidentis/analyst/gui/resources/originalModel.png new file mode 100644 index 0000000000000000000000000000000000000000..125fd6fea4dafa1ccf428eec9f45a57e38ba0460 Binary files /dev/null and b/GUI/src/main/java/cz/fidentis/analyst/gui/resources/originalModel.png differ diff --git a/GUI/src/main/java/cz/fidentis/analyst/gui/resources/originalModelPressed.png b/GUI/src/main/java/cz/fidentis/analyst/gui/resources/originalModelPressed.png new file mode 100644 index 0000000000000000000000000000000000000000..b9e7ca9a2c00e9ecb776df2d99948284923052b3 Binary files /dev/null and b/GUI/src/main/java/cz/fidentis/analyst/gui/resources/originalModelPressed.png differ diff --git a/GUI/src/main/java/cz/fidentis/analyst/gui/resources/plus.png b/GUI/src/main/java/cz/fidentis/analyst/gui/resources/plus.png new file mode 100644 index 0000000000000000000000000000000000000000..686de0c85e21a98f5f66509100b0567edf8583f5 Binary files /dev/null and b/GUI/src/main/java/cz/fidentis/analyst/gui/resources/plus.png differ diff --git a/GUI/src/main/java/cz/fidentis/analyst/gui/resources/plusPressed.png b/GUI/src/main/java/cz/fidentis/analyst/gui/resources/plusPressed.png new file mode 100644 index 0000000000000000000000000000000000000000..11d4eb18e213d7387af016f7096ec2faeee6060c Binary files /dev/null and b/GUI/src/main/java/cz/fidentis/analyst/gui/resources/plusPressed.png differ diff --git a/GUI/src/main/java/cz/fidentis/analyst/gui/resources/points.png b/GUI/src/main/java/cz/fidentis/analyst/gui/resources/points.png new file mode 100644 index 0000000000000000000000000000000000000000..ae2d15472049301b20749ba8085bec7babcacbda Binary files /dev/null and b/GUI/src/main/java/cz/fidentis/analyst/gui/resources/points.png differ diff --git a/GUI/src/main/java/cz/fidentis/analyst/gui/resources/resetButton.png b/GUI/src/main/java/cz/fidentis/analyst/gui/resources/resetButton.png new file mode 100644 index 0000000000000000000000000000000000000000..bd18d0f9ff27883262aa4700a281afa4a317a0e3 Binary files /dev/null and b/GUI/src/main/java/cz/fidentis/analyst/gui/resources/resetButton.png differ diff --git a/GUI/src/main/java/cz/fidentis/analyst/gui/resources/resetButtonPressed.png b/GUI/src/main/java/cz/fidentis/analyst/gui/resources/resetButtonPressed.png new file mode 100644 index 0000000000000000000000000000000000000000..4eafd61db3d0834b8cd8cc1e22eac1d27998d1c9 Binary files /dev/null and b/GUI/src/main/java/cz/fidentis/analyst/gui/resources/resetButtonPressed.png differ diff --git a/GUI/src/main/java/cz/fidentis/analyst/gui/resources/rightBottom.png b/GUI/src/main/java/cz/fidentis/analyst/gui/resources/rightBottom.png new file mode 100644 index 0000000000000000000000000000000000000000..f346f088a2799690cfc6f07d812e9b6ffae00f7d Binary files /dev/null and b/GUI/src/main/java/cz/fidentis/analyst/gui/resources/rightBottom.png differ diff --git a/GUI/src/main/java/cz/fidentis/analyst/gui/resources/rightButton.png b/GUI/src/main/java/cz/fidentis/analyst/gui/resources/rightButton.png new file mode 100644 index 0000000000000000000000000000000000000000..3058aaed5b61a74854e40f72816b176906d02514 Binary files /dev/null and b/GUI/src/main/java/cz/fidentis/analyst/gui/resources/rightButton.png differ diff --git a/GUI/src/main/java/cz/fidentis/analyst/gui/resources/rightButtonPressed.png b/GUI/src/main/java/cz/fidentis/analyst/gui/resources/rightButtonPressed.png new file mode 100644 index 0000000000000000000000000000000000000000..57dd28c46cd49afed37cd9f17d51588a4d753ddd Binary files /dev/null and b/GUI/src/main/java/cz/fidentis/analyst/gui/resources/rightButtonPressed.png differ diff --git a/GUI/src/main/java/cz/fidentis/analyst/gui/resources/save.png b/GUI/src/main/java/cz/fidentis/analyst/gui/resources/save.png new file mode 100644 index 0000000000000000000000000000000000000000..5b48efd200d2a740f65066ba59af377f83c2f930 Binary files /dev/null and b/GUI/src/main/java/cz/fidentis/analyst/gui/resources/save.png differ diff --git a/GUI/src/main/java/cz/fidentis/analyst/gui/resources/selectPoints.png b/GUI/src/main/java/cz/fidentis/analyst/gui/resources/selectPoints.png new file mode 100644 index 0000000000000000000000000000000000000000..f4e6c251c13fee841185bb1d6005015ae3e20a39 Binary files /dev/null and b/GUI/src/main/java/cz/fidentis/analyst/gui/resources/selectPoints.png differ diff --git a/GUI/src/main/java/cz/fidentis/analyst/gui/resources/show.png b/GUI/src/main/java/cz/fidentis/analyst/gui/resources/show.png new file mode 100644 index 0000000000000000000000000000000000000000..b4f8369e688f9e43e8e9c59b17dad800bb445674 Binary files /dev/null and b/GUI/src/main/java/cz/fidentis/analyst/gui/resources/show.png differ diff --git a/GUI/src/main/java/cz/fidentis/analyst/gui/resources/show2.png b/GUI/src/main/java/cz/fidentis/analyst/gui/resources/show2.png new file mode 100644 index 0000000000000000000000000000000000000000..df03fc3580d3becc5d74644bf5ceeac4e7b74100 Binary files /dev/null and b/GUI/src/main/java/cz/fidentis/analyst/gui/resources/show2.png differ diff --git a/GUI/src/main/java/cz/fidentis/analyst/gui/resources/showPlane.png b/GUI/src/main/java/cz/fidentis/analyst/gui/resources/showPlane.png new file mode 100644 index 0000000000000000000000000000000000000000..bb223da1ae986d266950254055cad86d5fb96222 Binary files /dev/null and b/GUI/src/main/java/cz/fidentis/analyst/gui/resources/showPlane.png differ diff --git a/GUI/src/main/java/cz/fidentis/analyst/gui/resources/showPlanePane.png b/GUI/src/main/java/cz/fidentis/analyst/gui/resources/showPlanePane.png new file mode 100644 index 0000000000000000000000000000000000000000..5b233935c9cd88b33810b0fab32abb82b338a323 Binary files /dev/null and b/GUI/src/main/java/cz/fidentis/analyst/gui/resources/showPlanePane.png differ diff --git a/GUI/src/main/java/cz/fidentis/analyst/gui/resources/showPlanePressed.png b/GUI/src/main/java/cz/fidentis/analyst/gui/resources/showPlanePressed.png new file mode 100644 index 0000000000000000000000000000000000000000..c92818e64874dd61c0170c19d1be4adab470c486 Binary files /dev/null and b/GUI/src/main/java/cz/fidentis/analyst/gui/resources/showPlanePressed.png differ diff --git a/GUI/src/main/java/cz/fidentis/analyst/gui/resources/symetry.png b/GUI/src/main/java/cz/fidentis/analyst/gui/resources/symetry.png new file mode 100644 index 0000000000000000000000000000000000000000..bd64a79dec36702f6eca21c9b09fa692c8aee0af Binary files /dev/null and b/GUI/src/main/java/cz/fidentis/analyst/gui/resources/symetry.png differ diff --git a/GUI/src/main/java/cz/fidentis/analyst/gui/resources/symetryCount.png b/GUI/src/main/java/cz/fidentis/analyst/gui/resources/symetryCount.png new file mode 100644 index 0000000000000000000000000000000000000000..58864d8fa5b9ab740c3bf9d5c1e77a9bbf76f820 Binary files /dev/null and b/GUI/src/main/java/cz/fidentis/analyst/gui/resources/symetryCount.png differ diff --git a/GUI/src/main/java/cz/fidentis/analyst/gui/resources/symetryCountClicked.png b/GUI/src/main/java/cz/fidentis/analyst/gui/resources/symetryCountClicked.png new file mode 100644 index 0000000000000000000000000000000000000000..8d4a9d0303d94c7731a6f5a45d5c31afa0b783b7 Binary files /dev/null and b/GUI/src/main/java/cz/fidentis/analyst/gui/resources/symetryCountClicked.png differ diff --git a/GUI/src/main/java/cz/fidentis/analyst/gui/resources/symetryGreen.png b/GUI/src/main/java/cz/fidentis/analyst/gui/resources/symetryGreen.png new file mode 100644 index 0000000000000000000000000000000000000000..18d8e8eed43e3332a89bc86672948ec2e2bc65ee Binary files /dev/null and b/GUI/src/main/java/cz/fidentis/analyst/gui/resources/symetryGreen.png differ diff --git a/GUI/src/main/java/cz/fidentis/analyst/gui/resources/symetryStart.png b/GUI/src/main/java/cz/fidentis/analyst/gui/resources/symetryStart.png new file mode 100644 index 0000000000000000000000000000000000000000..9423bccd70b3d9bd3002e620851aa3b7973f8dff Binary files /dev/null and b/GUI/src/main/java/cz/fidentis/analyst/gui/resources/symetryStart.png differ diff --git a/GUI/src/main/java/cz/fidentis/analyst/gui/resources/symetryStartMoved.png b/GUI/src/main/java/cz/fidentis/analyst/gui/resources/symetryStartMoved.png new file mode 100644 index 0000000000000000000000000000000000000000..182a20e18874970e67893f21607c840cf3587af7 Binary files /dev/null and b/GUI/src/main/java/cz/fidentis/analyst/gui/resources/symetryStartMoved.png differ diff --git a/GUI/src/main/java/cz/fidentis/analyst/gui/resources/symetryStartP.png b/GUI/src/main/java/cz/fidentis/analyst/gui/resources/symetryStartP.png new file mode 100644 index 0000000000000000000000000000000000000000..5c6b58dd1f579b11290a69a26628ab08a228353e Binary files /dev/null and b/GUI/src/main/java/cz/fidentis/analyst/gui/resources/symetryStartP.png differ diff --git a/GUI/src/main/java/cz/fidentis/analyst/gui/resources/symetryStartPanel.png b/GUI/src/main/java/cz/fidentis/analyst/gui/resources/symetryStartPanel.png new file mode 100644 index 0000000000000000000000000000000000000000..39658d54cc1a8267ef87ab6374eacc82ae4e292a Binary files /dev/null and b/GUI/src/main/java/cz/fidentis/analyst/gui/resources/symetryStartPanel.png differ diff --git a/GUI/src/main/java/cz/fidentis/analyst/gui/resources/texture.png b/GUI/src/main/java/cz/fidentis/analyst/gui/resources/texture.png new file mode 100644 index 0000000000000000000000000000000000000000..a0b4cd702ca59b2cb2cb76fa4fa61a961c5ea769 Binary files /dev/null and b/GUI/src/main/java/cz/fidentis/analyst/gui/resources/texture.png differ diff --git a/GUI/src/main/java/cz/fidentis/analyst/gui/resources/texture2.png b/GUI/src/main/java/cz/fidentis/analyst/gui/resources/texture2.png new file mode 100644 index 0000000000000000000000000000000000000000..ce29eaa971730b8f86562567ff5d323d0a372d62 Binary files /dev/null and b/GUI/src/main/java/cz/fidentis/analyst/gui/resources/texture2.png differ diff --git a/GUI/src/main/java/cz/fidentis/analyst/gui/resources/upButton.png b/GUI/src/main/java/cz/fidentis/analyst/gui/resources/upButton.png new file mode 100644 index 0000000000000000000000000000000000000000..38e5e597f5e7c97b151d1c2d697ba5f7e285a687 Binary files /dev/null and b/GUI/src/main/java/cz/fidentis/analyst/gui/resources/upButton.png differ diff --git a/GUI/src/main/java/cz/fidentis/analyst/gui/resources/upButtonPressed.png b/GUI/src/main/java/cz/fidentis/analyst/gui/resources/upButtonPressed.png new file mode 100644 index 0000000000000000000000000000000000000000..270726c75260e4370f5536b3b27313c48158b94f Binary files /dev/null and b/GUI/src/main/java/cz/fidentis/analyst/gui/resources/upButtonPressed.png differ diff --git a/GUI/src/main/java/cz/fidentis/analyst/gui/resources/whiteBackroundCanvas.png b/GUI/src/main/java/cz/fidentis/analyst/gui/resources/whiteBackroundCanvas.png new file mode 100644 index 0000000000000000000000000000000000000000..2392d79948755cb2681db19304b6fc23faf15392 Binary files /dev/null and b/GUI/src/main/java/cz/fidentis/analyst/gui/resources/whiteBackroundCanvas.png differ diff --git a/GUI/src/main/java/cz/fidentis/analyst/gui/resources/whiteBackroundCanvasPressed.png b/GUI/src/main/java/cz/fidentis/analyst/gui/resources/whiteBackroundCanvasPressed.png new file mode 100644 index 0000000000000000000000000000000000000000..cbf866bba082635034362ab1345cd33d07ffcc2d Binary files /dev/null and b/GUI/src/main/java/cz/fidentis/analyst/gui/resources/whiteBackroundCanvasPressed.png differ diff --git a/GUI/src/main/java/cz/fidentis/analyst/gui/resources/wireframe.png b/GUI/src/main/java/cz/fidentis/analyst/gui/resources/wireframe.png new file mode 100644 index 0000000000000000000000000000000000000000..28efd055ab3380bf32718c9a8392a08367b32945 Binary files /dev/null and b/GUI/src/main/java/cz/fidentis/analyst/gui/resources/wireframe.png differ diff --git a/GUI/src/main/java/cz/fidentis/analyst/gui/resources/wireframe2.png b/GUI/src/main/java/cz/fidentis/analyst/gui/resources/wireframe2.png new file mode 100644 index 0000000000000000000000000000000000000000..40be817688e82594ba6ae92510324c6d9538c500 Binary files /dev/null and b/GUI/src/main/java/cz/fidentis/analyst/gui/resources/wireframe2.png differ diff --git a/MeshModel/MeshModel.iml b/MeshModel/MeshModel.iml index d7209f8e975db657bacc86e4b6f795a755009514..80a28bc560f1f11818d2264d101264ece491fcca 100644 --- a/MeshModel/MeshModel.iml +++ b/MeshModel/MeshModel.iml @@ -7,8 +7,10 @@ <sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" /> <sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/../application/src/test/java" isTestSource="true" /> + <sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" /> <excludeFolder url="file://$MODULE_DIR$/target" /> </content> + <content url="file://$MODULE_DIR$/../application/src/test/java" /> <orderEntry type="inheritedJdk" /> <orderEntry type="sourceFolder" forTests="false" /> <orderEntry type="library" scope="TEST" name="Maven: org.junit.jupiter:junit-jupiter:5.6.0" level="project" /> @@ -28,14 +30,14 @@ <orderEntry type="library" name="Maven: org.netbeans.api:org-netbeans-api-annotations-common:RELEASE82" level="project" /> <orderEntry type="library" name="Maven: com.github.mokiat:java-data-front:v2.0.0" level="project" /> <orderEntry type="library" name="Maven: javax.vecmath:vecmath:1.5.2" level="project" /> - <orderEntry type="library" scope="TEST" name="Maven: org.junit.jupiter:junit-jupiter:5.6.0" level="project" /> - <orderEntry type="library" scope="TEST" name="Maven: org.junit.jupiter:junit-jupiter-api:5.6.0" level="project" /> + <orderEntry type="library" scope="TEST" name="Maven: org.junit.jupiter:junit-jupiter:5.6.1" level="project" /> + <orderEntry type="library" scope="TEST" name="Maven: org.junit.jupiter:junit-jupiter-api:5.6.1" level="project" /> <orderEntry type="library" scope="TEST" name="Maven: org.apiguardian:apiguardian-api:1.1.0" level="project" /> <orderEntry type="library" scope="TEST" name="Maven: org.opentest4j:opentest4j:1.2.0" level="project" /> - <orderEntry type="library" scope="TEST" name="Maven: org.junit.platform:junit-platform-commons:1.6.0" level="project" /> - <orderEntry type="library" scope="TEST" name="Maven: org.junit.jupiter:junit-jupiter-params:5.6.0" level="project" /> - <orderEntry type="library" scope="TEST" name="Maven: org.junit.jupiter:junit-jupiter-engine:5.6.0" level="project" /> - <orderEntry type="library" scope="TEST" name="Maven: org.junit.platform:junit-platform-engine:1.6.0" level="project" /> + <orderEntry type="library" scope="TEST" name="Maven: org.junit.platform:junit-platform-commons:1.6.1" level="project" /> + <orderEntry type="library" scope="TEST" name="Maven: org.junit.jupiter:junit-jupiter-params:5.6.1" level="project" /> + <orderEntry type="library" scope="TEST" name="Maven: org.junit.jupiter:junit-jupiter-engine:5.6.1" level="project" /> + <orderEntry type="library" scope="TEST" name="Maven: org.junit.platform:junit-platform-engine:1.6.1" level="project" /> <orderEntry type="library" scope="TEST" name="Maven: org.testng:testng:7.1.0" level="project" /> <orderEntry type="library" scope="TEST" name="Maven: com.beust:jcommander:1.72" level="project" /> <orderEntry type="library" scope="TEST" name="Maven: com.google.inject:guice:no_aop:4.1.0" level="project" /> diff --git a/MeshModel/pom.xml b/MeshModel/pom.xml index 1436101ffb0f3812da17a969e56da6e74aea230b..917a9b069f39ce2502e9b5557c54e48632db87d4 100644 --- a/MeshModel/pom.xml +++ b/MeshModel/pom.xml @@ -16,6 +16,10 @@ <extensions>true</extensions> <configuration> <useOSGiDependencies>true</useOSGiDependencies> + <publicPackages> <!-- expose API/packages to other modules --> + <publicPackage>cz.fidentis.analyst.mesh.core.*</publicPackage> + <publicPackage>cz.fidentis.analyst.mesh.io.*</publicPackage> + </publicPackages> </configuration> </plugin> <plugin> @@ -48,34 +52,14 @@ </execution> </executions> </plugin> - <!-- Added based on tutorial project --> - <!--<plugin> - <artifactId>maven-compiler-plugin</artifactId> - <version>3.8.1</version> - </plugin> - <plugin> - <artifactId>maven-surefire-plugin</artifactId> - <version>3.0.0-M4</version> - </plugin>--> - <!-- https://dzone.com/articles/why-your-junit-5-tests-are-not-running-under-maven Fool proof solution--> <plugin> <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-surefire-plugin</artifactId> - <version>2.22.0</version> - <dependencies> - <dependency> - <groupId>org.junit.platform</groupId> - <artifactId>junit-platform-surefire-provider</artifactId> - <version>1.3.2</version> - </dependency> - </dependencies> - </plugin> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-failsafe-plugin</artifactId> - <version>2.22.0</version> + <artifactId>maven-compiler-plugin</artifactId> + <configuration> + <source>8</source> + <target>8</target> + </configuration> </plugin> - </plugins> </build> <repositories> @@ -106,7 +90,7 @@ <dependency> <groupId>javax.vecmath</groupId> <artifactId>vecmath</artifactId> - <version>1.5.2</version> + <version>${version.javax.vecmath}</version> </dependency> <!-- https://mvnrepository.com/artifact/junit/junit --> <dependency> diff --git a/MeshModel/src/main/java/cz/fidentis/analyst/mesh/core/MeshPoint.java b/MeshModel/src/main/java/cz/fidentis/analyst/mesh/core/MeshPoint.java index b594f84d5a2c30f6f1304c95f67704edd515ea49..6ba54c95d91e4243ca93418205f715a10f932135 100644 --- a/MeshModel/src/main/java/cz/fidentis/analyst/mesh/core/MeshPoint.java +++ b/MeshModel/src/main/java/cz/fidentis/analyst/mesh/core/MeshPoint.java @@ -103,6 +103,95 @@ public class MeshPoint { return new MeshPoint(new Vector3d(newPosition), normal, new Vector3d(texCoord)); } + /** + * returns new instance of MeshPoint with multiplied position by number + * + * @param number Number for multiplying + * @return multiplied MeshPoint + */ + public MeshPoint multiplyPosition(double number) { + if (normal != null) { + if (texCoord != null) + return new MeshPoint(new Vector3d(this.getPosition().x * number, + this.getPosition().y * number, this.getPosition().z * number), + new Vector3d(normal), new Vector3d(texCoord)); + else + return new MeshPoint(new Vector3d(this.getPosition().x * number, + this.getPosition().y * number, this.getPosition().z * number), + new Vector3d(normal), null); + } + return new MeshPoint(new Vector3d(this.getPosition().x * number, + this.getPosition().y * number, this.getPosition().z * number), + null, null); + } + + /** + * returns new instance of MeshPoint with divided position by number + * + * @param number Number for division + * @return divided MeshPoint + */ + public MeshPoint dividePosition(double number) { + if (normal != null) { + if (texCoord != null) + return new MeshPoint(new Vector3d(this.getPosition().x / number, this.getPosition().y / number, + this.getPosition().z / number), new Vector3d(normal), new Vector3d(texCoord)); + else + return new MeshPoint(new Vector3d(this.getPosition().x / number, this.getPosition().y / number, + this.getPosition().z / number), new Vector3d(normal), null); + } + return new MeshPoint(new Vector3d(this.getPosition().x / number, this.getPosition().y / number, + this.getPosition().z / number), null, null); + } + + /** + * Returns the cross product of two points. + * + * @param meshPoint Second argument of the cross product operation. + * @return MeshPoint representing the resulting vector. + */ + public MeshPoint crossProduct(MeshPoint meshPoint) { + if (normal != null) { + if (texCoord != null) + return new MeshPoint(new Vector3d + (this.position.y * meshPoint.position.z - this.position.z * meshPoint.position.y, + this.position.z * meshPoint.position.x - this.position.x * meshPoint.position.z, + this.position.x * meshPoint.position.y - this.position.y * meshPoint.position.x), + new Vector3d(normal), new Vector3d(texCoord)); + else + return new MeshPoint(new Vector3d + (this.position.y * meshPoint.position.z - this.position.z * meshPoint.position.y, + this.position.z * meshPoint.position.x - this.position.x * meshPoint.position.z, + this.position.x * meshPoint.position.y - this.position.y * meshPoint.position.x), + new Vector3d(normal), null); + } + return new MeshPoint(new Vector3d + (this.position.y * meshPoint.position.z - this.position.z * meshPoint.position.y, + this.position.z * meshPoint.position.x - this.position.x * meshPoint.position.z, + this.position.x * meshPoint.position.y - this.position.y * meshPoint.position.x), + null, null); + } + + /** + * returns the dot product of two points + * + * @param meshPoint Second argument of the dot product operation + * @return dot product of two instances of MeshPoint + */ + public double dotProduct(MeshPoint meshPoint) { + return (this.position.x * meshPoint.position.x + this.position.y * meshPoint.position.y + this.position.z * meshPoint.position.z); + } + + /** + * returns absolute value of MeshPoint + * + * @return absolute value of MeshPoint + */ + public double abs() { + return Math.sqrt(this.getPosition().x * this.getPosition().x + + this.getPosition().y * this.getPosition().y + this.getPosition().z * this.getPosition().z); + } + /** * returns new instance of MeshPoint with subtracted normal * diff --git a/MeshModel/src/main/java/cz/fidentis/analyst/mesh/io/MeshObjExporter.java b/MeshModel/src/main/java/cz/fidentis/analyst/mesh/io/MeshObjExporter.java new file mode 100644 index 0000000000000000000000000000000000000000..d3bed5084fa65398b8e1931b5d14ff4d69413968 --- /dev/null +++ b/MeshModel/src/main/java/cz/fidentis/analyst/mesh/io/MeshObjExporter.java @@ -0,0 +1,141 @@ +package cz.fidentis.analyst.mesh.io; + +import cz.fidentis.analyst.mesh.core.MeshFacet; +import cz.fidentis.analyst.mesh.core.MeshModel; +import java.io.BufferedWriter; +import java.io.File; +import java.io.FileWriter; +import java.io.IOException; +import java.text.DecimalFormat; +import java.text.DecimalFormatSymbols; +import java.util.Locale; + +/** + * Utility class for exporting model to .obj file (vertices, normals and triangles) + * + * @author Natalia Bebjakova + */ +public class MeshObjExporter { + /** + * Model to be exported + */ + MeshModel model; + + /** + * + * @param model model to be exported. + */ + public MeshObjExporter(MeshModel model) { + this.model = model; + } + + /** + * Exports all facets of the model to .obj file + * + * @param exportFile File to which model is exported + * @throws IOException + */ + public void exportModelToObj(File exportFile) throws IOException { + for(MeshFacet facet : model.getFacets()) { + exportFacetToObj(facet, exportFile); + } + } + + /** + * Exports facet to OBJ file. + * It writes vertices, normals and triangles to file + * + * @param facet Facet of the model to be exported, so far every model has one + * @param exportFile file for exporting. + * @throws java.io.IOException + */ + public void exportFacetToObj(MeshFacet facet, File exportFile) throws IOException { + int formatIndex = exportFile.getName().lastIndexOf("."); + String fileName; //name that is writen to file + + if (formatIndex < 0) { + fileName = exportFile.getName(); + } else { + fileName = exportFile.getName().substring(0, formatIndex); + } + + exportFile = new File(exportFile.getParent() + File.separator + fileName + ".obj"); + + try (BufferedWriter out = new BufferedWriter(new FileWriter(exportFile))) { + + DecimalFormatSymbols otherSymbols = new DecimalFormatSymbols(Locale.getDefault()); + otherSymbols.setDecimalSeparator('.'); //dot as separator for decimal numbers + DecimalFormat df = new DecimalFormat("#.####", otherSymbols); + + //writes vertices of the facet to file + for (int j = 0; j < facet.getNumberOfVertices(); j++) { + out.write("v " + df.format(facet.getVertices().get(j).getPosition().x) + " " + + df.format(facet.getVertices().get(j).getPosition().y) + " " + + df.format(facet.getVertices().get(j).getPosition().z)); + out.newLine(); + } + + //detects if first vertex has normal + boolean hasAllNormals = facet.getVertices().get(0).getNormal() != null; + + //writes normals if there are any + for (int i = 0; i < facet.getNumberOfVertices(); i++) { + if(facet.getVertex(i).getNormal() != null) { + out.write("vn " + df.format(facet.getVertices().get(i).getNormal().x) + " " + + df.format(facet.getVertices().get(i).getNormal().y) + " " + + df.format(facet.getVertices().get(i).getNormal().z)); + out.newLine(); + } + } + + for (int i = 0; i < facet.getCornerTable().getSize(); i += 3) { + int v1i = facet.getCornerTable().getRow(i).getVertexIndex(); + int v2i = facet.getCornerTable().getRow(i + 1).getVertexIndex(); + int v3i = facet.getCornerTable().getRow(i + 2).getVertexIndex(); + + out.write("f "); + if (facet.getVertex(v1i).getNormal() != null && hasAllNormals) { + out.write((v1i + 1) + "//" + (v1i + 1) + " " + + (v2i + 1) + "//" + (v2i + 1) + " " + + (v3i + 1) + "//" + (v3i + 1)); + out.newLine(); + } else { + out.write((v1i + 1) + " " + (v2i + 1) + " " + (v3i + 1)); + out.newLine(); + } + } + + out.write("#" + facet.getCornerTable().getSize() / 3 + " triangles"); + out.newLine(); + + /* + //computes triangles of facet + Triangle[] triangles = new Triangle[facet.getCornerTable().getSize() / 3]; + for (int i = 0; i < facet.getCornerTable().getSize(); i += 3) { + Triangle t = new Triangle(facet.getCornerTable().getRow(i).getVertexIndex(), + facet.getCornerTable().getRow(i + 1).getVertexIndex(), + facet.getCornerTable().getRow(i + 2).getVertexIndex()); + triangles[(i / 3)] = t; + } + + //writes triangles of facet + for (Triangle triangle : triangles) { + out.write("f "); + if (facet.getVertex(triangle.getVertex1()).getNormal() != null && hasAllNormals) { + out.write((triangle.getVertex1() + 1) + "//" + (triangle.getVertex1() + 1) + " " + + (triangle.getVertex2() + 1) + "//" + (triangle.getVertex2() + 1) + " " + + (triangle.getVertex3() + 1) + "//" + (triangle.getVertex3() + 1) + "\n"); + } else { + out.write((triangle.getVertex1() + 1) + " " + (triangle.getVertex2() + 1) + + " " + (triangle.getVertex3() + 1) + "\n"); + } + } + out.write("#" + triangles.length + " triangles" + "\n"); + out.write("\n"); + out.close(); + fstream.close(); + */ + } + } +} + diff --git a/MeshModel/src/main/java/cz/fidentis/analyst/mesh/io/ModelFileFilter.java b/MeshModel/src/main/java/cz/fidentis/analyst/mesh/io/ModelFileFilter.java new file mode 100644 index 0000000000000000000000000000000000000000..2507d8778dab9612a6cb0901d279105c2392b021 --- /dev/null +++ b/MeshModel/src/main/java/cz/fidentis/analyst/mesh/io/ModelFileFilter.java @@ -0,0 +1,53 @@ +package cz.fidentis.analyst.mesh.io; + +import javax.swing.filechooser.FileFilter; +import java.io.File; + +/** + * @author Natália Bebjaková + * + * Class that enables to choose just extensions we want in the filechooser + */ +public class ModelFileFilter extends FileFilter { + + private final String[] extension; + private final String description; + + /** + * + * @param extension Extentions of files + * @param description Description + */ + public ModelFileFilter(String[] extension, String description) + { + this.extension = extension; + this.description = description; + } + + /** + * + * @param f File + * @return Whether file has chosen extension or not + */ + @Override + public boolean accept(File f) + { + boolean accepted = false; + for (String extension1 : extension) { + if (f.isDirectory() || f.getName().endsWith(extension1)) { + accepted = true; + } + } + return accepted; + } + + /** + * + * @return description + */ + @Override + public String getDescription() { + return description; + } + +} \ No newline at end of file diff --git a/MeshModel/src/test/java/cz/fidentis/analyst/mesh/core/CornerTableRowTest.java b/MeshModel/src/test/java/cz/fidentis/analyst/mesh/core/CornerTableRowTest.java index 47d2449aad4fc131b83afeaa6adcfc1bcbaf6f2e..e6be5856e648e24bc68c2c47a2597140bde564da 100644 --- a/MeshModel/src/test/java/cz/fidentis/analyst/mesh/core/CornerTableRowTest.java +++ b/MeshModel/src/test/java/cz/fidentis/analyst/mesh/core/CornerTableRowTest.java @@ -41,4 +41,4 @@ public class CornerTableRowTest { row.setOppositeCornerIndex(21); assertEquals(21, row.getOppositeCornerIndex()); } -} \ No newline at end of file +} diff --git a/MeshModel/src/test/java/cz/fidentis/analyst/mesh/core/CornerTableTest.java b/MeshModel/src/test/java/cz/fidentis/analyst/mesh/core/CornerTableTest.java index 2aed1f8703f43bad9cb87830ad6b9b0abc9a527f..69f0f4b8e5d04fc3df9bc3baa73d82663f26a4bb 100644 --- a/MeshModel/src/test/java/cz/fidentis/analyst/mesh/core/CornerTableTest.java +++ b/MeshModel/src/test/java/cz/fidentis/analyst/mesh/core/CornerTableTest.java @@ -472,4 +472,4 @@ public class CornerTableTest { assertEquals(i, table.getRow(i).getVertexIndex()); } } -} \ No newline at end of file +} diff --git a/README.md b/README.md index 13178b4bfba112b72d76d5e4857a21ac504e8dfe..c4011cab0c12ac4022b457e26c7ea3f51371fc84 100644 --- a/README.md +++ b/README.md @@ -2,11 +2,11 @@ Software for processing and analysis of human faces. Re-implementation of [FIDENTIS Analyst](https://github.com/Fidentis/Analyst). -This project is being developed at Masaryk University, Brno as collaborative project between Human Computer Interaction Laboratory at Faculty of Informatics and Department of Anthropology at Faculty of Science. +This project is being developed at Masaryk University, Brno, as collaborative project between the Human Computer Interaction Laboratory at Faculty of Informatics and the Department of Anthropology at Faculty of Science. ## Requirements -* Java SE 8+ +* Java SE 13+ * [Maven](https://www.mkyong.com/maven/how-to-install-maven-in-windows/) for compilation * IDE for development, e.g. NetBeans or IntelliJ IDEA @@ -17,5 +17,13 @@ This project is being developed at Masaryk University, Brno as collaborative pro * **MeshModel:** The core model for triangle meshes. * **Renderer:** Rendering code. * **GUI:** GUI of the application. +* **Comparison:** Application logic for the comparison of human faces. + +## Installation and running + +* To build the application from scratch, run `mvn clean install`. +* To run the application + * go to the `application` directory`, + * either execute a binary file located in the `target/fidentisanalyst/bin/` or run `mvn nbm:run-platform` diff --git a/Renderer/Renderer.iml b/Renderer/Renderer.iml new file mode 100644 index 0000000000000000000000000000000000000000..14061d54f54906514b5fade1f5cb826df069c1f1 --- /dev/null +++ b/Renderer/Renderer.iml @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="UTF-8"?> +<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4"> + <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_7"> + <output url="file://$MODULE_DIR$/target/classes" /> + <output-test url="file://$MODULE_DIR$/target/test-classes" /> + <content url="file://$MODULE_DIR$"> + <sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" /> + <excludeFolder url="file://$MODULE_DIR$/target" /> + </content> + <orderEntry type="inheritedJdk" /> + <orderEntry type="sourceFolder" forTests="false" /> + <orderEntry type="library" name="Maven: org.netbeans.api:org-netbeans-api-annotations-common:RELEASE82" level="project" /> + </component> +</module> \ No newline at end of file diff --git a/application/FIDENTIS-Analyst-app.iml b/application/FIDENTIS-Analyst-app.iml index 29d467275709a7d720f2250b86584c2fd515ef97..f7dd0b482444d05c44bdb970a6886abacb5d6d5b 100644 --- a/application/FIDENTIS-Analyst-app.iml +++ b/application/FIDENTIS-Analyst-app.iml @@ -1,52 +1,111 @@ -<?xml version="1.0" encoding="UTF-8"?> -<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4"> - <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_9"> - <output url="file://$MODULE_DIR$/target/classes" /> - <output-test url="file://$MODULE_DIR$/target/test-classes" /> - <content url="file://$MODULE_DIR$"> - <sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" /> - <excludeFolder url="file://$MODULE_DIR$/target" /> - </content> - <content url="file://$MODULE_DIR$/src/test/java" /> - <orderEntry type="inheritedJdk" /> - <orderEntry type="sourceFolder" forTests="false" /> - <orderEntry type="module-library"> - <library> - <CLASSES> - <root url="jar://$APPLICATION_HOME_DIR$/lib/groovy-all-2.4.17.jar!/" /> - </CLASSES> - <JAVADOC /> - <SOURCES /> - </library> - </orderEntry> - <orderEntry type="library" name="Maven: org.netbeans.external:asm-all-5.0.1:RELEASE82" level="project" /> - <orderEntry type="library" name="Maven: org.netbeans.external:net-java-html-boot-fx:RELEASE82" level="project" /> - <orderEntry type="library" name="Maven: org.netbeans.external:net-java-html-boot-script:RELEASE82" level="project" /> - <orderEntry type="library" name="Maven: org.netbeans.external:net-java-html-boot:RELEASE82" level="project" /> - <orderEntry type="library" name="Maven: org.netbeans.external:net-java-html-geo:RELEASE82" level="project" /> - <orderEntry type="library" name="Maven: org.netbeans.external:net-java-html-json:RELEASE82" level="project" /> - <orderEntry type="library" name="Maven: org.netbeans.external:net-java-html-sound:RELEASE82" level="project" /> - <orderEntry type="library" name="Maven: org.netbeans.external:net-java-html:RELEASE82" level="project" /> - <orderEntry type="library" name="Maven: org.netbeans.external:org-netbeans-html-ko4j:RELEASE82" level="project" /> - <orderEntry type="library" name="Maven: org.netbeans.external:org-netbeans-html-xhr4j:RELEASE82" level="project" /> - <orderEntry type="module" module-name="FIDENTIS-Analyst-branding" /> - <orderEntry type="library" name="Maven: org.netbeans.api:org-netbeans-api-annotations-common:RELEASE82" level="project" /> - <orderEntry type="library" scope="TEST" name="Maven: org.netbeans.api:org-netbeans-modules-nbjunit:RELEASE113" level="project" /> - <orderEntry type="library" scope="TEST" name="Maven: org.netbeans.modules:org-netbeans-insane:RELEASE113" level="project" /> - <orderEntry type="library" scope="TEST" name="Maven: org.netbeans.api:org-netbeans-libs-junit4:RELEASE113" level="project" /> - <orderEntry type="library" scope="TEST" name="Maven: junit:junit:4.12" level="project" /> - <orderEntry type="library" scope="TEST" name="Maven: org.hamcrest:hamcrest-core:1.3" level="project" /> - <orderEntry type="module" module-name="MeshModel" /> - <orderEntry type="library" name="Maven: java3d:j3d-core-utils:1.3.1" level="project" /> - <orderEntry type="library" name="Maven: java3d:vecmath:1.3.1" level="project" /> - <orderEntry type="library" name="Maven: java3d:j3d-core:1.3.1" level="project" /> - <orderEntry type="library" name="Maven: com.github.mokiat:java-data-front:v2.0.0" level="project" /> - <orderEntry type="library" name="Maven: javax.vecmath:vecmath:1.5.2" level="project" /> - <orderEntry type="module" module-name="Renderer" /> - <orderEntry type="library" name="Maven: cz.findetis:GUI:2.0" level="project" /> - <orderEntry type="library" scope="TEST" name="Maven: org.junit.jupiter:junit-jupiter-api:5.6.0" level="project" /> - <orderEntry type="library" scope="TEST" name="Maven: org.apiguardian:apiguardian-api:1.1.0" level="project" /> - <orderEntry type="library" scope="TEST" name="Maven: org.opentest4j:opentest4j:1.2.0" level="project" /> - <orderEntry type="library" scope="TEST" name="Maven: org.junit.platform:junit-platform-commons:1.6.0" level="project" /> - </component> -</module> \ No newline at end of file +<?xml version="1.0" encoding="UTF-8"?> +<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4"> + <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_7"> + <output url="file://$MODULE_DIR$/target/classes" /> + <output-test url="file://$MODULE_DIR$/target/test-classes" /> + <content url="file://$MODULE_DIR$"> + <sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" /> + <excludeFolder url="file://$MODULE_DIR$/target" /> + </content> + <orderEntry type="inheritedJdk" /> + <orderEntry type="sourceFolder" forTests="false" /> + <orderEntry type="library" name="Maven: org.netbeans.external:asm-all-5.0.1:RELEASE82" level="project" /> + <orderEntry type="library" name="Maven: org.netbeans.api:org-openide-filesystems:RELEASE82" level="project" /> + <orderEntry type="library" name="Maven: org.netbeans.api:org-openide-modules:RELEASE82" level="project" /> + <orderEntry type="library" name="Maven: org.netbeans.api:org-openide-util:RELEASE82" level="project" /> + <orderEntry type="library" name="Maven: org.netbeans.api:org-openide-util-lookup:RELEASE82" level="project" /> + <orderEntry type="library" name="Maven: org.netbeans.modules:org-netbeans-bootstrap:RELEASE82" level="project" /> + <orderEntry type="library" name="Maven: org.netbeans.api:org-openide-util-ui:RELEASE82" level="project" /> + <orderEntry type="library" name="Maven: org.netbeans.api:org-netbeans-libs-asm:RELEASE82" level="project" /> + <orderEntry type="library" name="Maven: org.netbeans.modules:org-netbeans-core-startup-base:RELEASE82" level="project" /> + <orderEntry type="library" name="Maven: org.ow2.asm:asm-all:5.0.1" level="project" /> + <orderEntry type="library" name="Maven: org.netbeans.external:net-java-html-boot-fx:RELEASE82" level="project" /> + <orderEntry type="library" name="Maven: org.netbeans.external:net-java-html-boot-script:RELEASE82" level="project" /> + <orderEntry type="library" name="Maven: org.netbeans.external:net-java-html-boot:RELEASE82" level="project" /> + <orderEntry type="library" name="Maven: org.netbeans.external:net-java-html-geo:RELEASE82" level="project" /> + <orderEntry type="library" name="Maven: org.netbeans.external:net-java-html-json:RELEASE82" level="project" /> + <orderEntry type="library" name="Maven: org.netbeans.external:net-java-html-sound:RELEASE82" level="project" /> + <orderEntry type="library" name="Maven: org.netbeans.external:net-java-html:RELEASE82" level="project" /> + <orderEntry type="library" name="Maven: org.netbeans.external:swing-layout-1.0.4:RELEASE82" level="project" /> + <orderEntry type="library" name="Maven: org.netbeans.api:org-netbeans-libs-javafx:RELEASE82" level="project" /> + <orderEntry type="library" name="Maven: org.netbeans.api:org-openide-awt:RELEASE82" level="project" /> + <orderEntry type="library" name="Maven: org.netbeans.api:org-openide-dialogs:RELEASE82" level="project" /> + <orderEntry type="library" name="Maven: org.netbeans.api:org-openide-windows:RELEASE82" level="project" /> + <orderEntry type="library" name="Maven: org.netbeans.api:org-netbeans-api-intent:RELEASE82" level="project" /> + <orderEntry type="library" name="Maven: org.netbeans.api:org-netbeans-api-progress:RELEASE82" level="project" /> + <orderEntry type="library" name="Maven: org.netbeans.api:org-netbeans-api-progress-nb:RELEASE82" level="project" /> + <orderEntry type="library" name="Maven: org.netbeans.api:org-netbeans-modules-queries:RELEASE82" level="project" /> + <orderEntry type="library" name="Maven: org.netbeans.api:org-netbeans-swing-outline:RELEASE82" level="project" /> + <orderEntry type="library" name="Maven: org.netbeans.api:org-openide-actions:RELEASE82" level="project" /> + <orderEntry type="library" name="Maven: org.netbeans.api:org-openide-explorer:RELEASE82" level="project" /> + <orderEntry type="library" name="Maven: org.netbeans.api:org-openide-filesystems-nb:RELEASE82" level="project" /> + <orderEntry type="library" name="Maven: org.netbeans.api:org-openide-io:RELEASE82" level="project" /> + <orderEntry type="library" name="Maven: org.netbeans.api:org-openide-loaders:RELEASE82" level="project" /> + <orderEntry type="library" name="Maven: org.netbeans.api:org-openide-nodes:RELEASE82" level="project" /> + <orderEntry type="library" name="Maven: org.netbeans.api:org-openide-text:RELEASE82" level="project" /> + <orderEntry type="library" name="Maven: org.netbeans.modules:org-netbeans-core:RELEASE82" level="project" /> + <orderEntry type="library" name="Maven: org.netbeans.modules:org-netbeans-core-startup:RELEASE82" level="project" /> + <orderEntry type="library" name="Maven: org.netbeans.api:org-openide-execution:RELEASE82" level="project" /> + <orderEntry type="library" name="Maven: org.netbeans.modules:org-netbeans-core-windows:RELEASE82" level="project" /> + <orderEntry type="library" name="Maven: org.netbeans.api:org-netbeans-modules-options-api:RELEASE82" level="project" /> + <orderEntry type="library" name="Maven: org.netbeans.api:org-netbeans-swing-tabcontrol:RELEASE82" level="project" /> + <orderEntry type="library" name="Maven: org.netbeans.api:org-netbeans-modules-editor-mimelookup:RELEASE82" level="project" /> + <orderEntry type="library" name="Maven: org.netbeans.modules:org-netbeans-libs-jna:RELEASE82" level="project" /> + <orderEntry type="library" name="Maven: org.netbeans.modules:org-netbeans-libs-jna-platform:RELEASE82" level="project" /> + <orderEntry type="library" name="Maven: org.netbeans.api:org-netbeans-libs-osgi:RELEASE82" level="project" /> + <orderEntry type="library" name="Maven: org.netbeans.api:org-netbeans-modules-keyring:RELEASE82" level="project" /> + <orderEntry type="library" name="Maven: org.netbeans.api:org-openide-filesystems-compat8:RELEASE82" level="project" /> + <orderEntry type="library" name="Maven: org.netbeans.api:org-netbeans-api-io:RELEASE82" level="project" /> + <orderEntry type="library" name="Maven: org.netbeans.modules:org-netbeans-modules-options-keymap:RELEASE82" level="project" /> + <orderEntry type="library" name="Maven: org.netbeans.api:org-netbeans-swing-plaf:RELEASE82" level="project" /> + <orderEntry type="library" name="Maven: org.netbeans.api:org-netbeans-modules-sampler:RELEASE82" level="project" /> + <orderEntry type="library" name="Maven: org.netbeans.api:org-netbeans-spi-quicksearch:RELEASE82" level="project" /> + <orderEntry type="library" name="Maven: org.netbeans.api:org-netbeans-modules-settings:RELEASE82" level="project" /> + <orderEntry type="library" name="Maven: org.netbeans.external:org-netbeans-html-ko4j:RELEASE82" level="project" /> + <orderEntry type="library" name="Maven: org.netbeans.external:org-netbeans-html-xhr4j:RELEASE82" level="project" /> + <orderEntry type="library" name="Maven: org.apache.felix:org.apache.felix.main:4.2.1" level="project" /> + <orderEntry type="library" name="Maven: org.apache.felix:org.apache.felix.framework:4.2.1" level="project" /> + <orderEntry type="library" name="Maven: net.java.dev.jna:jna-platform:4.2.2" level="project" /> + <orderEntry type="library" name="Maven: net.java.dev.jna:jna:4.2.2" level="project" /> + <orderEntry type="library" name="Maven: junit:junit:4.12" level="project" /> + <orderEntry type="library" name="Maven: org.hamcrest:hamcrest-core:1.3" level="project" /> + <orderEntry type="library" name="Maven: org.netbeans.external:osgi.core-5.0.0:RELEASE82" level="project" /> + <orderEntry type="library" name="Maven: org.netbeans.external:osgi.cmpn-4.2:RELEASE82" level="project" /> + <orderEntry type="library" name="Maven: org.netbeans.external:testng-6.8.1-dist:RELEASE82" level="project" /> + <orderEntry type="library" name="Maven: org.netbeans.api:org-netbeans-modules-autoupdate-services:RELEASE82" level="project" /> + <orderEntry type="library" name="Maven: org.netbeans.api:org-netbeans-modules-sendopts:RELEASE82" level="project" /> + <orderEntry type="library" name="Maven: org.netbeans.external:updater:RELEASE82" level="project" /> + <orderEntry type="library" name="Maven: org.netbeans.modules:org-netbeans-core-ui:RELEASE82" level="project" /> + <orderEntry type="library" name="Maven: org.netbeans.modules:org-netbeans-libs-felix:RELEASE82" level="project" /> + <orderEntry type="library" name="Maven: org.netbeans.modules:org-netbeans-modules-autoupdate-cli:RELEASE82" level="project" /> + <orderEntry type="library" name="Maven: org.netbeans.api:org-netbeans-modules-autoupdate-ui:RELEASE82" level="project" /> + <orderEntry type="library" name="Maven: org.netbeans.modules:org-netbeans-modules-favorites:RELEASE82" level="project" /> + <orderEntry type="library" name="Maven: org.netbeans.modules:org-netbeans-modules-masterfs:RELEASE82" level="project" /> + <orderEntry type="library" name="Maven: org.netbeans.api:org-netbeans-modules-print:RELEASE82" level="project" /> + <orderEntry type="library" name="Maven: javax.help:javahelp:2.0.05" level="project" /> + <orderEntry type="library" name="Maven: org.netbeans.modules:org-netbeans-modules-keyring-fallback:RELEASE82" level="project" /> + <orderEntry type="library" name="Maven: org.netbeans.api:org-netbeans-core-netigso:RELEASE82" level="project" /> + <orderEntry type="library" name="Maven: org.netbeans.external:org.eclipse.osgi_3.9.1.v20140110-1610:RELEASE82" level="project" /> + <orderEntry type="library" name="Maven: org.netbeans.api:org-netbeans-api-htmlui:RELEASE82" level="project" /> + <orderEntry type="library" name="Maven: org.netbeans.api:org-netbeans-api-templates:RELEASE82" level="project" /> + <orderEntry type="library" name="Maven: org.netbeans.api:org-netbeans-lib-uihandler:RELEASE82" level="project" /> + <orderEntry type="module" module-name="FIDENTIS-Analyst-branding" /> + <orderEntry type="library" name="Maven: org.netbeans.api:org-netbeans-api-annotations-common:RELEASE82" level="project" /> + <orderEntry type="library" scope="TEST" name="Maven: org.netbeans.api:org-netbeans-modules-nbjunit:RELEASE82" level="project" /> + <orderEntry type="library" scope="TEST" name="Maven: org.netbeans.modules:org-netbeans-insane:RELEASE82" level="project" /> + <orderEntry type="library" name="Maven: org.netbeans.api:org-netbeans-libs-junit4:RELEASE82" level="project" /> + <orderEntry type="module" module-name="MeshModel" /> + <orderEntry type="library" name="Maven: java3d:j3d-core-utils:1.3.1" level="project" /> + <orderEntry type="library" name="Maven: java3d:vecmath:1.3.1" level="project" /> + <orderEntry type="library" name="Maven: java3d:j3d-core:1.3.1" level="project" /> + <orderEntry type="library" name="Maven: com.github.mokiat:java-data-front:v2.0.0" level="project" /> + <orderEntry type="library" name="Maven: javax.vecmath:vecmath:1.5.2" level="project" /> + <orderEntry type="module" module-name="Renderer" /> + <orderEntry type="module" module-name="GUI" /> + <orderEntry type="library" name="Maven: org.jogamp.jogl:jogl-all:2.0-rc11" level="project" /> + <orderEntry type="library" scope="TEST" name="Maven: org.junit.jupiter:junit-jupiter-api:5.6.0" level="project" /> + <orderEntry type="library" scope="TEST" name="Maven: org.apiguardian:apiguardian-api:1.1.0" level="project" /> + <orderEntry type="library" scope="TEST" name="Maven: org.opentest4j:opentest4j:1.2.0" level="project" /> + <orderEntry type="library" scope="TEST" name="Maven: org.junit.platform:junit-platform-commons:1.6.0" level="project" /> + </component> +</module> diff --git a/application/pom.xml b/application/pom.xml index 7748a6cc640dd291354e1fbb2c4f04fcf75b7106..1e63205f171f36d859bf7b4ac17fc49f720a3e62 100644 --- a/application/pom.xml +++ b/application/pom.xml @@ -60,6 +60,11 @@ <artifactId>GUI</artifactId> <version>${project.version}</version> </dependency> + <dependency> + <groupId>${project.groupId}</groupId> + <artifactId>Comparison</artifactId> + <version>${project.version}</version> + </dependency> <dependency> <groupId>org.junit.jupiter</groupId> <artifactId>junit-jupiter-api</artifactId> diff --git a/branding/FIDENTIS-Analyst-branding.iml b/branding/FIDENTIS-Analyst-branding.iml new file mode 100644 index 0000000000000000000000000000000000000000..14061d54f54906514b5fade1f5cb826df069c1f1 --- /dev/null +++ b/branding/FIDENTIS-Analyst-branding.iml @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="UTF-8"?> +<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4"> + <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_7"> + <output url="file://$MODULE_DIR$/target/classes" /> + <output-test url="file://$MODULE_DIR$/target/test-classes" /> + <content url="file://$MODULE_DIR$"> + <sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" /> + <excludeFolder url="file://$MODULE_DIR$/target" /> + </content> + <orderEntry type="inheritedJdk" /> + <orderEntry type="sourceFolder" forTests="false" /> + <orderEntry type="library" name="Maven: org.netbeans.api:org-netbeans-api-annotations-common:RELEASE82" level="project" /> + </component> +</module> \ No newline at end of file diff --git a/codestyle.xml b/codestyle.xml index c8d308e0c05808ae19941f8946b412df95b834a6..87b2b9619253a2ca3fc4951cb9964015f524b802 100644 --- a/codestyle.xml +++ b/codestyle.xml @@ -55,7 +55,7 @@ <!-- Checks for Size Violations. --> <!-- See http://checkstyle.sf.net/config_sizes.html --> <module name="LineLength"> - <property name="max" value="120"/> + <property name="max" value="220"/> </module> <module name="MethodLength"> <property name="max" value="50"/> diff --git a/pom.xml b/pom.xml index 9c9c4dd4bf9e9aff17f4446e74c61f6d0f418466..f76915168359ea9014848a6ed2d6a73e6b9080e3 100644 --- a/pom.xml +++ b/pom.xml @@ -11,11 +11,12 @@ <name>FIDENTIS-Analyst-2</name> <properties> - <netbeans.version>RELEASE82</netbeans.version> + <netbeans.version>RELEASE113</netbeans.version> <brandingToken>fidentisanalyst</brandingToken> <version.maven.plugin.checkstyle>2.17</version.maven.plugin.checkstyle> <version.plugin.checkstyle>8.5</version.plugin.checkstyle> <version.plugin.source>2.4</version.plugin.source> + <version.javax.vecmath>1.5.2</version.javax.vecmath> <checkstyle.fail>false</checkstyle.fail> <checkstyle.severity>warning</checkstyle.severity> </properties> @@ -82,6 +83,7 @@ <module>MeshModel</module> <module>Renderer</module> <module>GUI</module> + <module>Comparison</module> </modules> </project>