Skip to content
Snippets Groups Projects
Select Git revision
  • be1117bc68966c7df6014f0fc4bc138fcb51bfca
  • master default protected
  • alphashapes
  • quadMeshingTools
  • cygwin_conv_path
  • macos_arm64
  • add-transfiniteautomatic-to-geo
  • patch_releases_4_10
  • HierarchicalHDiv
  • isuruf-master-patch-63355
  • hyperbolic
  • hexdom
  • hxt_update
  • jf
  • 1618-pythonocc-and-gmsh-api-integration
  • octreeSizeField
  • hexbl
  • alignIrregularVertices
  • getEdges
  • patch_releases_4_8
  • isuruf-master-patch-51992
  • 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
  • gmsh_4_8_4
  • gmsh_4_8_3
  • gmsh_4_8_2
  • gmsh_4_8_1
  • gmsh_4_8_0
  • gmsh_4_7_1
  • gmsh_4_7_0
41 results

GModelIO_UNV.cpp

Blame
  • Forked from gmsh / gmsh
    Source project has a limited visibility.
    fourierEdge.cpp 1.27 KiB
    #include "fourierEdge.h"
    #include "Context.h"
    
    extern Context_T CTX;
    
    #if defined(HAVE_FOURIER_MODEL)
    
    fourierEdge::fourierEdge(GModel *model, FM::TopoEdge* edge_, int tag,
    			 GVertex *v0, GVertex *v1) 
      : GEdge(model, tag, v0, v1), edge(edge_) 
    {
      //meshAttributes.Method = TRANSFINI; 
      //meshAttributes.coeffTransfinite = 1.;
      //meshAttributes.nbPointsTransfinite = 10;
    }
    
    Range<double> fourierEdge::parBounds(int i) const
    { 
      return(Range<double>(0.,1.));
    }
    
    GPoint fourierEdge::point(double p) const 
    {
      double x, y, z;
      edge->F(p,x,y,z);
      return GPoint(x,y,z);
    }
    
    double fourierEdge::parFromPoint(const SPoint3 &pt) const
    {
      double p;
      edge->Inverse(pt.x(),pt.y(),pt.z(),p);
      return p;
    }
    
    SVector3 fourierEdge::firstDer(double par) const
    {
      double x,y,z;
      edge->Dfdt(par,x,y,z);
      return SVector3(x,y,z);
    }
    
    int fourierEdge::minimumMeshSegments() const
    {
      if(geomType() == Line || geomType() == Unknown)
        return GEdge::minimumMeshSegments();
      else
        return 2; // always put at least one mid-point on non-straight lines
    }
    
    int fourierEdge::minimumDrawSegments() const
    {
      int n = GEdge::minimumDrawSegments();
    
      if(geomType() == Line)
        return n;
      else if(geomType() == Circle || geomType() == Ellipse)
        return CTX.geom.circle_points;
      else
        return 20 * n;
    }
    
    #endif