Skip to content
Snippets Groups Projects
Select Git revision
  • 7ceda2c282c0aa3199f9817811dd9b5c905dd5fd
  • master default
  • library-names
  • fix_script_header
  • fix_libdir
  • fix_cmake_hdf5
  • partition
  • cgnsUnstructured
  • partitioning
  • HighOrderBLCurving
  • gmsh_3_0_5
  • gmsh_3_0_4
  • gmsh_3_0_3
  • gmsh_3_0_2
  • gmsh_3_0_1
  • gmsh_3_0_0
  • gmsh_2_16_0
  • gmsh_2_15_0
  • gmsh_2_14_1
  • gmsh_2_14_0
  • gmsh_2_13_2
  • gmsh_2_13_1
  • gmsh_2_12_0
  • gmsh_2_11_0
  • gmsh_2_10_1
  • gmsh_2_10_0
  • gmsh_2_9_3
  • gmsh_2_9_2
  • gmsh_2_9_1
  • gmsh_2_9_0
30 results

ACISVertex.cpp

Blame
  • Forked from gmsh / gmsh
    Source project has a limited visibility.
    ACISVertex.cpp 1.23 KiB
    // Gmsh - Copyright (C) 1997-2013 C. Geuzaine, J.-F. Remacle
    //
    // See the LICENSE.txt file for license information. Please report all
    // bugs and problems to the public mailing list <gmsh@geuz.org>.
    
    #include "ACISVertex.h"
    #include "MPoint.h"
    
    #if defined(HAVE_ACIS)
    #include <point.hxx>
    
    ACISVertex::ACISVertex(GModel *m, int num, VERTEX *v)
      : GVertex(m, num), _v(v)
    {
      APOINT *p = _v->geometry();
      const SPAposition &pos = p->coords();
      _x = pos.coordinate(0);
      _y = pos.coordinate(1);
      _z = pos.coordinate(2);
    }
    
    void ACISVertex::setPosition(GPoint &p)
    {
      _x = p.x();
      _y = p.y();
      _z = p.z();
      if(mesh_vertices.size()){
        mesh_vertices[0]->x() = p.x();
        mesh_vertices[0]->y() = p.y();
        mesh_vertices[0]->z() = p.z();
      }
    }
    
    SPoint2 ACISVertex::reparamOnFace(const GFace *gf, int dir) const
    {
      // FIXME there is definitively a fastest way to do it and this is wring for seams!
      return gf->parFromPoint(SPoint3(x(),y(),z()));
    }
    
    GVertex *getACISVertexByNativePtr(GModel *model, VERTEX* toFind)
    {
      GModel::viter it =model->firstVertex();
      for (; it != model->lastVertex(); it++){
        ACISVertex *av = dynamic_cast<ACISVertex*>(*it);
        if (av){
          if (toFind == av->getVERTEX()){
    	return *it;
          }
        }
      }
      return 0;
    }
    
    #endif