Skip to content
Snippets Groups Projects
Commit c3577425 authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

*** empty log message ***

parent 8cd4bf8a
Branches
Tags
No related merge requests found
// $Id: GEdge.cpp,v 1.50 2008-07-01 14:24:07 geuzaine Exp $
// $Id: GEdge.cpp,v 1.51 2008-07-04 12:03:50 geuzaine Exp $
//
// Copyright (C) 1997-2008 C. Geuzaine, J.-F. Remacle
//
......@@ -142,7 +142,7 @@ GPoint GEdge::closestPoint(const SPoint3 & queryPoint) const
return GPoint(0, 0, 0);
}
int GEdge::containsParam(double pt) const
bool GEdge::containsParam(double pt) const
{
Range<double> rg = parBounds(0);
return (pt >= rg.low() && pt <= rg.high());
......
......@@ -52,13 +52,13 @@ class GEdge : public GEntity {
void delFace(GFace *f);
// get the dimension of the edge (1)
virtual int dim() const {return 1;}
virtual int dim() const { return 1; }
// set the visibility flag
virtual void setVisibility(char val, bool recursive=false);
// true if the edge is a seam for the given face.
virtual int isSeam(GFace *face) const { return 0; }
virtual bool isSeam(GFace *face) const { return false; }
// get the bounding box
virtual SBoundingBox3d bounds() const;
......@@ -76,7 +76,7 @@ class GEdge : public GEntity {
virtual GPoint closestPoint(const SPoint3 & queryPoint) const;
// true if the edge contains the given parameter
virtual int containsParam(double pt) const;
virtual bool containsParam(double pt) const;
// get first derivative of edge at the given parameter
virtual SVector3 firstDer(double par) const = 0;
......@@ -128,7 +128,7 @@ class GEdge : public GEntity {
virtual void resetMeshAttributes();
// true if entity is periodic in the "dim" direction.
virtual bool periodic(int dim) const { return v0 == v1 ; }
virtual bool periodic(int dim) const { return v0 == v1; }
struct {
char Method;
......
......@@ -201,7 +201,7 @@ class GEntity {
virtual ModelType getNativeType() const { return UnknownModel; }
// get the native pointer of the particular representation
virtual void * getNativePtr() const { return 0; }
virtual void *getNativePtr() const { return 0; }
// the model owning this entity
GModel *model() const { return _model; }
......
// $Id: GFace.cpp,v 1.66 2008-07-01 14:24:07 geuzaine Exp $
// $Id: GFace.cpp,v 1.67 2008-07-04 12:03:50 geuzaine Exp $
//
// Copyright (C) 1997-2008 C. Geuzaine, J.-F. Remacle
//
......@@ -581,15 +581,15 @@ GPoint GFace::closestPoint(const SPoint3 & queryPoint, const double initialGuess
return GPoint(0, 0, 0);
}
int GFace::containsParam(const SPoint2 &pt) const
bool GFace::containsParam(const SPoint2 &pt) const
{
Range<double> uu = parBounds(0);
Range<double> vv = parBounds(1);
if((pt.x() >= uu.low() && pt.x() <= uu.high()) &&
(pt.y() >= vv.low() && pt.y() <= vv.high()))
return 1;
return true;
else
return 0;
return false;
}
bool GFace::buildRepresentationCross()
......
......@@ -126,7 +126,7 @@ class GFace : public GEntity
virtual SPoint2 parFromPoint(const SPoint3 &) const;
// true if the parameter value is interior to the face
virtual int containsParam(const SPoint2 &pt) const;
virtual bool containsParam(const SPoint2 &pt) const;
// return the point on the face closest to the given point
virtual GPoint closestPoint(const SPoint3 & queryPoint, const double initialGuess[2]) const;
......
......@@ -66,13 +66,15 @@ class GModel
// the fly if needed
void _storeElementsInEntities(std::map<int, std::vector<MElement*> > &map);
// loop over all vertices connected to elements and associate geo entity
// loop over all vertices connected to elements and associate geo
// entity
void _associateEntityWithMeshVertices();
// entity that is currently being meshed (used for error reporting)
GEntity *_currentMeshEntity;
// index of the current model
// index of the current model (in the static list of all loaded
// models)
static int _current;
protected:
......
// $Id: OCCEdge.cpp,v 1.39 2008-07-03 17:06:02 geuzaine Exp $
// $Id: OCCEdge.cpp,v 1.40 2008-07-04 12:03:50 geuzaine Exp $
//
// Copyright (C) 1997-2008 C. Geuzaine, J.-F. Remacle
//
......@@ -105,7 +105,7 @@ SPoint2 OCCEdge::reparamOnFace(GFace *face, double epar, int dir) const
}
// True if the edge is a seam for the given face
int OCCEdge::isSeam(GFace *face) const
bool OCCEdge::isSeam(GFace *face) const
{
const TopoDS_Face *s = (TopoDS_Face*) face->getNativePtr();
BRepAdaptor_Surface surface(*s);
......@@ -114,7 +114,7 @@ int OCCEdge::isSeam(GFace *face) const
// if(surface.IsUPeriodic() || surface.IsVPeriodic()){
return BRep_Tool::IsClosed(c, *s);
// }
return 0;
// return false;
}
GPoint OCCEdge::point(double par) const
......
......@@ -54,7 +54,7 @@ class OCCEdge : public GEdge {
virtual int minimumDrawSegments () const;
bool is3D() const { return !curve.IsNull(); }
void setTrimmed(OCCFace *);
int isSeam(GFace *) const;
bool isSeam(GFace *) const;
};
#endif
......
......@@ -39,12 +39,12 @@ SPoint2 fourierFace::parFromPoint(const SPoint3 &p) const
return SPoint2(u, v);
}
int fourierFace::containsParam(const SPoint2 &pt) const
bool fourierFace::containsParam(const SPoint2 &pt) const
{
const double tol = 1.e-6;
if(pt[0] < 0. - tol || pt[0] > 1. + tol) return 0;
if(pt[1] < 0. - tol || pt[1] > 1. + tol) return 0;
return 1;
if(pt[0] < 0. - tol || pt[0] > 1. + tol) return false;
if(pt[1] < 0. - tol || pt[1] > 1. + tol) return false;
return true;
}
SVector3 fourierFace::normal(const SPoint2 &param) const
......
......@@ -19,7 +19,7 @@ class fourierFace : public GFace {
Range<double> parBounds(int i) const;
virtual GPoint point(double par1, double par2) const;
virtual SPoint2 parFromPoint(const SPoint3 &p) const;
virtual int containsParam(const SPoint2 &pt) const;
virtual bool containsParam(const SPoint2 &pt) const;
virtual SVector3 normal(const SPoint2 &param) const;
virtual GEntity::GeomType geomType() const;
virtual Pair<SVector3,SVector3> firstDer(const SPoint2 &param) const;
......
# $Id: Makefile,v 1.488 2008-06-22 06:15:09 geuzaine Exp $
# $Id: Makefile,v 1.489 2008-07-04 12:03:50 geuzaine Exp $
#
# Copyright (C) 1997-2008 C. Geuzaine, J.-F. Remacle
#
......@@ -163,15 +163,15 @@ nodepend:
tag:
rm -f ${GMSH_VERSION_FILE}
echo "#define GMSH_MAJOR_VERSION ${GMSH_MAJOR_VERSION}" > ${GMSH_VERSION_FILE}
echo "#define GMSH_MAJOR_VERSION ${GMSH_MAJOR_VERSION}" > ${GMSH_VERSION_FILE}
echo "#define GMSH_MINOR_VERSION ${GMSH_MINOR_VERSION}" >> ${GMSH_VERSION_FILE}
echo "#define GMSH_PATCH_VERSION ${GMSH_PATCH_VERSION}" >> ${GMSH_VERSION_FILE}
echo "#define GMSH_EXTRA_VERSION \"${GMSH_EXTRA_VERSION}\"" >> ${GMSH_VERSION_FILE}
echo "#define GMSH_VERSION \"${GMSH_VERSION}\"" >> ${GMSH_VERSION_FILE}
echo "#define GMSH_DATE \"`date`\"" >> ${GMSH_VERSION_FILE}
echo "#define GMSH_HOST \"${HOSTNAME}\"" >> ${GMSH_VERSION_FILE}
echo "#define GMSH_PACKAGER \"`whoami`\"" >> ${GMSH_VERSION_FILE}
echo "#define GMSH_OS \"${UNAME}\"" >> ${GMSH_VERSION_FILE}
echo "#define GMSH_VERSION \"${GMSH_VERSION}\"" >> ${GMSH_VERSION_FILE}
echo "#define GMSH_DATE \"`date`\"" >> ${GMSH_VERSION_FILE}
echo "#define GMSH_HOST \"${HOSTNAME}\"" >> ${GMSH_VERSION_FILE}
echo "#define GMSH_PACKAGER \"`whoami`\"" >> ${GMSH_VERSION_FILE}
echo "#define GMSH_OS \"${UNAME}\"" >> ${GMSH_VERSION_FILE}
echo "#define GMSH_SHORT_LICENSE \"${GMSH_SHORT_LICENSE}\"" >> ${GMSH_VERSION_FILE}
initialtag:
......
......@@ -87,7 +87,7 @@ class PViewData {
// get the bounding box
virtual SBoundingBox3d getBoundingBox(int step=-1) = 0;
// get the number of elements of a giveb type, for a given step
// get the number of elements of a given type, for a given step
virtual int getNumScalars(int step=-1){ return 0; }
virtual int getNumVectors(int step=-1){ return 0; }
virtual int getNumTensors(int step=-1){ return 0; }
......
......@@ -117,7 +117,7 @@ class stepData{
}
};
// The data container using elements from a GModel.
// The data container using elements from one or more GModel(s).
class PViewDataGModel : public PViewData {
public:
enum DataType {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment