
Form Fitting Tootbox Ellipse3d (Software)
Hi,
We would like to run FFTb <Ellipse3d> as a .bat file. Is this possible?
Due to some changes, the (old) source code does not work anymore with the current version. A new version can be found tmp. here: FormFittingToolboxConsole.zip
Let me know, how it works.
/Micha
/********************************************************************** * FormFittingToolboxConsole * ************************************************************************ * Copyright (C) by Michael Loesler, http//derletztekick.com * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 3 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, see <http://www.gnu.org/licenses/> * * or write to the * * Free Software Foundation, Inc., * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * * **********************************************************************/ package com.derletztekick.geodesy.formFittingToolbox.v2.console; import java.io.File; import java.util.Locale; import com.derletztekick.geodesy.formFittingToolbox.v2.form.Form; import com.derletztekick.geodesy.formFittingToolbox.v2.form.form3d.Circle3D; import com.derletztekick.geodesy.formFittingToolbox.v2.form.form3d.CircularCylinder; import com.derletztekick.geodesy.formFittingToolbox.v2.form.form3d.Cylinder; import com.derletztekick.geodesy.formFittingToolbox.v2.form.form3d.Ellipse3D; import com.derletztekick.geodesy.formFittingToolbox.v2.gui.FormManager; import com.derletztekick.geodesy.formFittingToolbox.v2.io.PointFileReader; public class FormFittingToolboxConsole { /** * @param args */ public static void main(String[] args) { System.setProperty("com.github.fommil.netlib.BLAS", "com.github.fommil.netlib.F2jBLAS"); System.setProperty("com.github.fommil.netlib.LAPACK", "com.github.fommil.netlib.F2jLAPACK"); System.setProperty("com.github.fommil.netlib.ARPACK", "com.github.fommil.netlib.F2jARPACK"); int dim = 3; double levmar = 0; String formType = args[0]; try {levmar = Double.parseDouble(args[1]);} catch(NumberFormatException nfe) {nfe.printStackTrace();} File pointFile = new File(args[2]); File exportFile = new File(args[3]); FormManager formManager = new FormManager(null, Locale.getDefault()); formManager.setDimension(dim); formManager.setLevMarDampingValue(Math.abs(levmar)); formManager.adjustUnknownParametersOnly(true); if (formType.equalsIgnoreCase("ELLIPSE3D")) formManager.setFormClass(Ellipse3D.class); else if (formType.equalsIgnoreCase("CYLINDER")) formManager.setFormClass(Cylinder.class); else if (formType.equalsIgnoreCase("CIRCULARCYLINDER")) formManager.setFormClass(CircularCylinder.class); else formManager.setFormClass(Circle3D.class); PointFileReader reader = new PointFileReader(pointFile, dim); reader.ignoreLinesWhichStartWith("#"); int status = -1; if (reader.readSourceFile()) { formManager.setPointGroup(reader.getPoints()); Form form = formManager.createForm(); status = form.estimateModel(); } System.out.println(status==1?"\n\nEstimation successfully finished!":"\n\nEstimation failed!"); if (status == 1) formManager.exportFormParametersToFile(exportFile); } }
--
kostenlose Scripte und Software nicht nur für Geodäten || Portal für Geodäten mit angeschlossenem Forum-Vermessung
gesamter Thread:
- Form Fitting Tootbox Ellipse3d -
ColinT,
31.01.2017, 06:27
- Form Fitting Tootbox Ellipse3d -
Micha,
04.02.2017, 10:23
- Form Fitting Tootbox Ellipse3d - ColinT, 13.02.2017, 09:11
- Form Fitting Tootbox Ellipse3d -
Micha,
04.02.2017, 10:23