Skip to content
Snippets Groups Projects
Select Git revision
  • f55633bad0503ecf844c3a10072aaf1d9e92e2f8
  • master default protected
  • overlaps_tags_and_distributed_export
  • overlaps_tags_and_distributed_export_rebased
  • relaying
  • alphashapes
  • patches-4.14
  • steplayer
  • bl
  • pluginMeshQuality
  • fixBugsAmaury
  • hierarchical-basis
  • new_export_boris
  • oras_vs_osm
  • reassign_partitions
  • distributed_fwi
  • rename-classes
  • fix/fortran-api-example-t4
  • robust_partitions
  • reducing_files
  • fix_overlaps
  • gmsh_4_14_0
  • gmsh_4_13_1
  • gmsh_4_13_0
  • gmsh_4_12_2
  • gmsh_4_12_1
  • gmsh_4_12_0
  • gmsh_4_11_1
  • gmsh_4_11_0
  • gmsh_4_10_5
  • gmsh_4_10_4
  • gmsh_4_10_3
  • gmsh_4_10_2
  • gmsh_4_10_1
  • gmsh_4_10_0
  • gmsh_4_9_5
  • gmsh_4_9_4
  • gmsh_4_9_3
  • gmsh_4_9_2
  • gmsh_4_9_1
  • gmsh_4_9_0
41 results

GModelIO_STL.cpp

Blame
  • menuWindow.cpp 104.84 KiB
    // Gmsh - Copyright (C) 1997-2010 C. Geuzaine, J.-F. Remacle
    //
    // See the LICENSE.txt file for license information. Please report all
    // bugs and problems to <gmsh@geuz.org>.
    
    #include <string.h>
    #include <stdlib.h>
    #include <stdio.h>
    #include <time.h>
    #include <FL/Fl_Box.H>
    #include <FL/fl_ask.H>
    #include <FL/filename.H>
    #include "GmshConfig.h"
    #include "GmshMessage.h"
    #include "GmshSocket.h"
    #include "ConnectionManager.h"
    #include "FlGui.h"
    #include "menuWindow.h"
    #include "mainWindow.h"
    #include "graphicWindow.h"
    #include "optionWindow.h"
    #include "statisticsWindow.h"
    #include "messageWindow.h"
    #include "contextWindow.h"
    #include "visibilityWindow.h"
    #include "clippingWindow.h"
    #include "manipWindow.h"
    #include "fieldWindow.h"
    #include "pluginWindow.h"
    #include "solverWindow.h"
    #include "aboutWindow.h"
    #include "fileDialogs.h"
    #include "extraDialogs.h"
    #include "partitionDialog.h"
    #include "projectionEditor.h"
    #include "classificationEditor.h"
    #include "Options.h"
    #include "CommandLine.h"
    #include "GModel.h"
    #include "PView.h"
    #include "PViewData.h"
    #include "PViewOptions.h"
    #include "OS.h"
    #include "StringUtils.h"
    #include "OpenFile.h"
    #include "CreateFile.h"
    #include "findLinks.h"
    #include "GeoStringInterface.h"
    #include "Options.h"
    #include "Context.h"
    #include "Generator.h"
    #include "HighOrder.h"
    #include "Field.h"
    
    static void file_new_cb(Fl_Widget *w, void *data)
    {
     test:
      if(fileChooser(FILE_CHOOSER_CREATE, "New", "*")) {
        std::string name = fileChooserGetName(1);
        if(!StatFile(name)){
          if(fl_choice("File '%s' already exists.\n\nDo you want to erase it?",
                       "Cancel", "Erase", 0, name.c_str()))
            UnlinkFile(name);
          else
            goto test;
        }
        FILE *fp = fopen(name.c_str(), "w");
        if(!fp){
          Msg::Error("Unable to open file '%s'", name.c_str());
          return;