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

*** empty log message ***

parent 8cd4bf8a
No related branches found
No related tags found
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 // Copyright (C) 1997-2008 C. Geuzaine, J.-F. Remacle
// //
...@@ -142,7 +142,7 @@ GPoint GEdge::closestPoint(const SPoint3 & queryPoint) const ...@@ -142,7 +142,7 @@ GPoint GEdge::closestPoint(const SPoint3 & queryPoint) const
return GPoint(0, 0, 0); return GPoint(0, 0, 0);
} }
int GEdge::containsParam(double pt) const bool GEdge::containsParam(double pt) const
{ {
Range<double> rg = parBounds(0); Range<double> rg = parBounds(0);
return (pt >= rg.low() && pt <= rg.high()); return (pt >= rg.low() && pt <= rg.high());
......
...@@ -58,7 +58,7 @@ class GEdge : public GEntity { ...@@ -58,7 +58,7 @@ class GEdge : public GEntity {
virtual void setVisibility(char val, bool recursive=false); virtual void setVisibility(char val, bool recursive=false);
// true if the edge is a seam for the given face. // 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 // get the bounding box
virtual SBoundingBox3d bounds() const; virtual SBoundingBox3d bounds() const;
...@@ -76,7 +76,7 @@ class GEdge : public GEntity { ...@@ -76,7 +76,7 @@ class GEdge : public GEntity {
virtual GPoint closestPoint(const SPoint3 & queryPoint) const; virtual GPoint closestPoint(const SPoint3 & queryPoint) const;
// true if the edge contains the given parameter // 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 // get first derivative of edge at the given parameter
virtual SVector3 firstDer(double par) const = 0; virtual SVector3 firstDer(double par) const = 0;
......
// $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 // Copyright (C) 1997-2008 C. Geuzaine, J.-F. Remacle
// //
...@@ -581,15 +581,15 @@ GPoint GFace::closestPoint(const SPoint3 & queryPoint, const double initialGuess ...@@ -581,15 +581,15 @@ GPoint GFace::closestPoint(const SPoint3 & queryPoint, const double initialGuess
return GPoint(0, 0, 0); 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> uu = parBounds(0);
Range<double> vv = parBounds(1); Range<double> vv = parBounds(1);
if((pt.x() >= uu.low() && pt.x() <= uu.high()) && if((pt.x() >= uu.low() && pt.x() <= uu.high()) &&
(pt.y() >= vv.low() && pt.y() <= vv.high())) (pt.y() >= vv.low() && pt.y() <= vv.high()))
return 1; return true;
else else
return 0; return false;
} }
bool GFace::buildRepresentationCross() bool GFace::buildRepresentationCross()
......
...@@ -126,7 +126,7 @@ class GFace : public GEntity ...@@ -126,7 +126,7 @@ class GFace : public GEntity
virtual SPoint2 parFromPoint(const SPoint3 &) const; virtual SPoint2 parFromPoint(const SPoint3 &) const;
// true if the parameter value is interior to the face // 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 // return the point on the face closest to the given point
virtual GPoint closestPoint(const SPoint3 & queryPoint, const double initialGuess[2]) const; virtual GPoint closestPoint(const SPoint3 & queryPoint, const double initialGuess[2]) const;
......
...@@ -66,13 +66,15 @@ class GModel ...@@ -66,13 +66,15 @@ class GModel
// the fly if needed // the fly if needed
void _storeElementsInEntities(std::map<int, std::vector<MElement*> > &map); 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(); void _associateEntityWithMeshVertices();
// entity that is currently being meshed (used for error reporting) // entity that is currently being meshed (used for error reporting)
GEntity *_currentMeshEntity; GEntity *_currentMeshEntity;
// index of the current model // index of the current model (in the static list of all loaded
// models)
static int _current; static int _current;
protected: 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 // Copyright (C) 1997-2008 C. Geuzaine, J.-F. Remacle
// //
...@@ -105,7 +105,7 @@ SPoint2 OCCEdge::reparamOnFace(GFace *face, double epar, int dir) const ...@@ -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 // 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(); const TopoDS_Face *s = (TopoDS_Face*) face->getNativePtr();
BRepAdaptor_Surface surface(*s); BRepAdaptor_Surface surface(*s);
...@@ -114,7 +114,7 @@ int OCCEdge::isSeam(GFace *face) const ...@@ -114,7 +114,7 @@ int OCCEdge::isSeam(GFace *face) const
// if(surface.IsUPeriodic() || surface.IsVPeriodic()){ // if(surface.IsUPeriodic() || surface.IsVPeriodic()){
return BRep_Tool::IsClosed(c, *s); return BRep_Tool::IsClosed(c, *s);
// } // }
return 0; // return false;
} }
GPoint OCCEdge::point(double par) const GPoint OCCEdge::point(double par) const
......
...@@ -54,7 +54,7 @@ class OCCEdge : public GEdge { ...@@ -54,7 +54,7 @@ class OCCEdge : public GEdge {
virtual int minimumDrawSegments () const; virtual int minimumDrawSegments () const;
bool is3D() const { return !curve.IsNull(); } bool is3D() const { return !curve.IsNull(); }
void setTrimmed(OCCFace *); void setTrimmed(OCCFace *);
int isSeam(GFace *) const; bool isSeam(GFace *) const;
}; };
#endif #endif
......
...@@ -39,12 +39,12 @@ SPoint2 fourierFace::parFromPoint(const SPoint3 &p) const ...@@ -39,12 +39,12 @@ SPoint2 fourierFace::parFromPoint(const SPoint3 &p) const
return SPoint2(u, v); return SPoint2(u, v);
} }
int fourierFace::containsParam(const SPoint2 &pt) const bool fourierFace::containsParam(const SPoint2 &pt) const
{ {
const double tol = 1.e-6; const double tol = 1.e-6;
if(pt[0] < 0. - tol || pt[0] > 1. + tol) return 0; if(pt[0] < 0. - tol || pt[0] > 1. + tol) return false;
if(pt[1] < 0. - tol || pt[1] > 1. + tol) return 0; if(pt[1] < 0. - tol || pt[1] > 1. + tol) return false;
return 1; return true;
} }
SVector3 fourierFace::normal(const SPoint2 &param) const SVector3 fourierFace::normal(const SPoint2 &param) const
......
...@@ -19,7 +19,7 @@ class fourierFace : public GFace { ...@@ -19,7 +19,7 @@ class fourierFace : public GFace {
Range<double> parBounds(int i) const; Range<double> parBounds(int i) const;
virtual GPoint point(double par1, double par2) const; virtual GPoint point(double par1, double par2) const;
virtual SPoint2 parFromPoint(const SPoint3 &p) 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 SVector3 normal(const SPoint2 &param) const;
virtual GEntity::GeomType geomType() const; virtual GEntity::GeomType geomType() const;
virtual Pair<SVector3,SVector3> firstDer(const SPoint2 &param) 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 # Copyright (C) 1997-2008 C. Geuzaine, J.-F. Remacle
# #
......
...@@ -87,7 +87,7 @@ class PViewData { ...@@ -87,7 +87,7 @@ class PViewData {
// get the bounding box // get the bounding box
virtual SBoundingBox3d getBoundingBox(int step=-1) = 0; 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 getNumScalars(int step=-1){ return 0; }
virtual int getNumVectors(int step=-1){ return 0; } virtual int getNumVectors(int step=-1){ return 0; }
virtual int getNumTensors(int step=-1){ return 0; } virtual int getNumTensors(int step=-1){ return 0; }
......
...@@ -117,7 +117,7 @@ class stepData{ ...@@ -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 { class PViewDataGModel : public PViewData {
public: public:
enum DataType { enum DataType {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment