Skip to content
Snippets Groups Projects
Select Git revision
  • ef83848c5821f68f049929795df615f2c57e8e22
  • 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

discreteFace.cpp

Blame
  • GModelIO_ACIS.cpp 6.84 KiB
    // Gmsh - Copyright (C) 1997-2019 C. Geuzaine, J.-F. Remacle
    //
    // See the LICENSE.txt file for license information. Please report all
    // issues on https://gitlab.onelab.info/gmsh/gmsh/issues.
    
    #include "GmshConfig.h"
    #include "GModel.h"
    #include "GmshMessage.h"
    #include "OS.h"
    #include "GModelIO_ACIS.h"
    #include "ACISVertex.h"
    #include "ACISEdge.h"
    #include "ACISFace.h"
    
    #if defined(HAVE_ACIS)
    
    #include <meshmg.hxx>
    #include <acis.hxx>
    #include <base.hxx>
    #include <license.hxx>
    #include <spa_unlock_result.hxx>
    #include <spa_lic_err_gui.hxx>
    #include <api.hxx>
    #include <kernapi.hxx>
    #include <mmgr.err>
    #include <lists.hxx>
    #include <acistype.hxx>
    #include "acis.hxx"
    #include "kernapi.hxx"
    #include "boolapi.hxx"
    #include "eulerapi.hxx"
    #include "cstrapi.hxx"
    #include "af_api.hxx"
    #include "intrapi.hxx"
    #include "ga_api.hxx"
    #include "spl_api.hxx"
    
    class GMSH_MESH_MANAGER : public MESH_MANAGER {
      GModel *_gm;
      GFace *_current;
    
    public:
      GMSH_MESH_MANAGER(GModel *gm) : _gm(gm) {}
      virtual ~GMSH_MESH_MANAGER() {}
      virtual void begin_mesh_output(ENTITY *entity, ENTITY *app_ref,
                                     ENTITY *format)
      {
        FACE *acisFace = dynamic_cast<FACE *>(entity);
        if(!acisFace) return;
        _current = getACISFaceByNativePtr(_gm, acisFace);
      }
      virtual void announce_counts(int npoly, int nnode, int nref)
      {
        _current->stl_vertices.resize(nnode);
        _current->stl_triangles.resize(nref);
      }
      virtual logical need_indexed_polygons() { return 1; }
      virtual void announce_indexed_polynode(int ipoly, int i, void *pnode);
      virtual void *announce_indexed_node(int inode, const SPApar_pos &pos,
                                          const SPAposition &X,
                                          const SPAunit_vector &N)
      {
        SPoint2 p(pos.u, pos.v);
        _current->stl_vertices[inode] = p;
        //    printf("node %d pos %g %g\n",inode,p.x(),p.y());
        return (void *)inode; // bad idea, but...
      }
      virtual void announce_indexed_polynode(ENTITY *E, int ipoly, int i, void *id,
                                             const double &edge_tpar,
                                             const SPApar_pos &uv,