1 // Copyright (C) 2007-2021 CEA/DEN, EDF R&D, OPEN CASCADE
3 // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License, or (at your option) any later version.
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 // Lesser General Public License for more details.
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
23 // GEOM OBJECT : interactive object for Geometry entities visualization
24 // File : GEOM_OCCReader.h
25 // Author : Christophe ATTANASIO
28 #include "GEOM_OCCReader.h"
30 #include <GEOMUtils_Hatcher.hxx>
33 #include <vtkPoints.h>
34 #include <vtkCellArray.h>
36 #include <vtkObjectFactory.h>
37 #include <vtkPolyData.h>
38 #include <vtkInformation.h>
39 #include <vtkInformationVector.h>
41 // OpenCASCADE Includes
42 #include <Adaptor3d_HCurve.hxx>
43 #include <Poly_Triangulation.hxx>
44 #include <Poly_Polygon3D.hxx>
45 #include <Poly_PolygonOnTriangulation.hxx>
47 #include <TopoDS_Face.hxx>
48 #include <TopoDS_Edge.hxx>
49 #include <Precision.hxx>
50 #include <BRep_Tool.hxx>
51 #include <TColStd_Array1OfInteger.hxx>
52 #include <TColStd_Array1OfReal.hxx>
54 #include "utilities.h"
57 static Standard_Integer lastVTKpoint = 0;
58 static Standard_Integer PlotCount = 0;
59 static Standard_Real IsoRatio = 1.001;
60 static Standard_Integer MaxPlotCount = 5;
62 //=======================================================================
65 //=======================================================================
67 GEOM_OCCReader* GEOM_OCCReader::New()
69 vtkObject* ret = vtkObjectFactory::CreateInstance("GEOM_OCCReader");
71 return (GEOM_OCCReader*)ret;
73 return new GEOM_OCCReader;
76 //=======================================================================
77 // Function : GEOM_OCCReader
79 //=======================================================================
81 GEOM_OCCReader::GEOM_OCCReader()
83 //this->myShape = NULL;
85 this->forced = Standard_False;
86 this->discretiso = 15;
89 //=======================================================================
90 // Function : ~GEOM_OCCReader
92 //=======================================================================
94 GEOM_OCCReader::~GEOM_OCCReader()
99 //=======================================================================
100 // Function : RequestData
102 //=======================================================================
104 int GEOM_OCCReader::RequestData(vtkInformation *vtkNotUsed(request),
105 vtkInformationVector **/*inputVector*/,
106 vtkInformationVector *outputVector)
108 vtkInformation *outInfo = outputVector->GetInformationObject(0);
109 vtkPolyData *output = vtkPolyData::SafeDownCast(
110 outInfo->Get(vtkDataObject::DATA_OBJECT()));
112 vtkPoints* Pts = NULL;
113 vtkCellArray* Cells = NULL;
114 TopLoc_Location aLoc;
117 Pts = vtkPoints::New();
118 Cells = vtkCellArray::New();
120 //Compute number of triangles and points
121 Standard_Integer nbpoly=0,nbpts=0;
126 if(myShape.ShapeType() == TopAbs_FACE) {
128 const TopoDS_Face& aFace = TopoDS::Face(myShape);
129 Handle(Poly_Triangulation) aPoly = BRep_Tool::Triangulation(aFace,aLoc);
136 nbpts = aPoly->NbNodes();
137 nbpoly = aPoly->NbTriangles();
139 Pts->SetNumberOfPoints(nbpts);
140 Cells->Allocate(Cells->EstimateSize(nbpoly,3));
151 ComputeWireframe(Pts,Cells);
152 output->SetPoints(Pts);
153 output->SetLines(Cells);
157 if(myShape.ShapeType() == TopAbs_FACE) {
158 ComputeShading(Pts,Cells);
160 output->SetPoints(Pts);
161 output->SetPolys(Cells);
170 //=======================================================================
171 // Function : ComputeWireframe
172 // Purpose : Compute the shape in CAD wireframe mode
173 //=======================================================================
175 void GEOM_OCCReader::ComputeWireframe(vtkPoints* Pts,vtkCellArray* Cells){
177 // Check the type of the shape:
178 if(myShape.ShapeType() == TopAbs_FACE) {
180 TransferFaceWData(TopoDS::Face(myShape),Pts,Cells);
181 } else if(myShape.ShapeType() == TopAbs_EDGE) {
183 TransferEdgeWData(TopoDS::Edge(myShape),Pts,Cells);
185 if(myShape.ShapeType() == TopAbs_VERTEX) {
187 TransferVertexWData(TopoDS::Vertex(myShape),Pts,Cells);
192 //=======================================================================
193 // Function : TransferFaceWData
194 // Purpose : Transfer wireframe data for FACE
195 //=======================================================================
197 void GEOM_OCCReader::TransferFaceWData(const TopoDS_Face& aFace,
201 TopoDS_Face aCopyFace = aFace;
202 aCopyFace.Orientation (TopAbs_FORWARD);
203 createISO(aCopyFace,1,Pts,Cells);
206 //=======================================================================
207 // Function : createISO
208 // Purpose : Create ISO for Face Wireframe representation
209 //=======================================================================
211 void GEOM_OCCReader::createISO (const TopoDS_Face &TopologicalFace,
212 const Standard_Integer NbIsos,
216 GEOMUtils::Hatcher aHatcher(TopologicalFace);
218 aHatcher.Init(NbIsos);
221 if (aHatcher.IsDone()) {
222 // Push iso lines in vtk kernel
223 Standard_Integer pt_start_idx = 0;
225 createIsos(aHatcher, Standard_True, pt_start_idx, Pts, Cell);
226 createIsos(aHatcher, Standard_False, pt_start_idx, Pts, Cell);
230 //=======================================================================
231 // Function : createIsos
232 // Purpose : Create isolines obtained from hatcher.
233 //=======================================================================
234 void GEOM_OCCReader::createIsos(const GEOMUtils::Hatcher &theHatcher,
235 const Standard_Boolean IsUIso,
236 Standard_Integer &pt_start_idx,
240 // Push iso lines in vtk kernel
241 Handle(TColStd_HArray1OfInteger) anIndices;
242 Handle(TColStd_HArray1OfReal) aParams;
246 anIndices = theHatcher.GetUIndices();
247 aParams = theHatcher.GetUParams();
250 anIndices = theHatcher.GetVIndices();
251 aParams = theHatcher.GetVParams();
254 if (anIndices.IsNull() || aParams.IsNull()) {
256 MESSAGE("GEOMUtils_Hatcher: null U-isoline indices")
258 MESSAGE("GEOMUtils_Hatcher: null V-isoline indices")
261 const GeomAbs_IsoType aType = (IsUIso ? GeomAbs_IsoU : GeomAbs_IsoV);
262 Standard_Integer anIsoInd = anIndices->Lower();
264 for (; anIsoInd <= anIndices->Upper(); anIsoInd++) {
265 const Standard_Integer aHatchingIndex = anIndices->Value(anIsoInd);
267 if (aHatchingIndex != 0) {
268 const Standard_Real aParam = aParams->Value(anIsoInd);
269 const Standard_Integer aNbDomains =
270 theHatcher.GetNbDomains(aHatchingIndex);
272 if (aNbDomains < 0) {
274 MESSAGE("GEOMUtils_Hatcher: U iso of parameter: "<<aParam)
276 MESSAGE("GEOMUtils_Hatcher: V iso of parameter: "<<aParam)
279 switch (theHatcher.GetHatcher().Status (aHatchingIndex)) {
280 case HatchGen_NoProblem :
281 MESSAGE("No Problem") ; break ;
282 case HatchGen_TrimFailure :
283 MESSAGE("Trim Failure") ; break ;
284 case HatchGen_TransitionFailure :
285 MESSAGE("Transition Failure") ; break ;
286 case HatchGen_IncoherentParity :
287 MESSAGE("Incoherent Parity") ; break ;
288 case HatchGen_IncompatibleStates :
289 MESSAGE("Incompatible States") ; break ;
292 Standard_Integer anIDom = 1;
296 for (; anIDom <= aNbDomains; anIDom++) {
297 if (theHatcher.GetDomain(aHatchingIndex, anIDom, aV1, aV2)) {
298 DrawIso(aType, aParam, aV1, aV2, Pts, Cell,pt_start_idx);
307 //=======================================================================
309 // Purpose : Init VTK ISO PLOT
310 //=======================================================================
311 void GEOM_OCCReader::MoveTo(gp_Pnt P,
316 coord[0] = P.X(); coord[1] = P.Y(); coord[2] = P.Z();
317 lastVTKpoint = Pts->InsertNextPoint(coord);
321 //=======================================================================
323 // Purpose : Plot point in VTK
324 //=======================================================================
325 void GEOM_OCCReader::DrawTo(gp_Pnt P,
330 coord[0] = P.X(); coord[1] = P.Y(); coord[2] = P.Z();
331 Standard_Integer NewVTKpoint = Pts->InsertNextPoint(coord);
334 pts[0] = lastVTKpoint;
335 pts[1] = NewVTKpoint;
337 Cells->InsertNextCell(2,pts);
339 lastVTKpoint = NewVTKpoint;
343 //=======================================================================
344 // Function : DrawIso
345 // Purpose : Draw an iso on vtk
346 //=======================================================================
347 void GEOM_OCCReader::DrawIso(GeomAbs_IsoType T,
353 Standard_Integer& /*startidx*/)
356 Standard_Boolean halt = Standard_False;
357 Standard_Integer j,myDiscret = discretiso;
358 Standard_Real U1,U2,V1,V2,stepU=0.,stepV=0.;
362 const Handle(Geom_Surface)& S = BRep_Tool::Surface(TopoDS::Face(myShape),l);
364 BRepAdaptor_Surface S(TopoDS::Face(myShape),Standard_False);
366 GeomAbs_SurfaceType SurfType = S.GetType();
368 GeomAbs_CurveType CurvType = GeomAbs_OtherCurve;
370 Standard_Integer Intrv, nbIntv;
371 Standard_Integer nbUIntv = S.NbUIntervals(GeomAbs_CN);
372 Standard_Integer nbVIntv = S.NbVIntervals(GeomAbs_CN);
373 TColStd_Array1OfReal TI(1,Max(nbUIntv, nbVIntv)+1);
376 if (T == GeomAbs_IsoU) {
377 S.VIntervals(TI, GeomAbs_CN);
386 S.UIntervals(TI, GeomAbs_CN);
398 for (Intrv = 1; Intrv <= nbIntv; Intrv++) {
400 if (TI(Intrv) <= T1 && TI(Intrv + 1) <= T1)
402 if (TI(Intrv) >= T2 && TI(Intrv + 1) >= T2)
404 if (T == GeomAbs_IsoU) {
405 V1 = Max(T1, TI(Intrv));
406 V2 = Min(T2, TI(Intrv + 1));
407 stepV = (V2 - V1) / myDiscret;
410 U1 = Max(T1, TI(Intrv));
411 U2 = Min(T2, TI(Intrv + 1));
412 stepU = (U2 - U1) / myDiscret;
416 //-------------GeomAbs_Plane---------------
419 //----GeomAbs_Cylinder GeomAbs_Cone------
420 case GeomAbs_Cylinder :
422 if (T == GeomAbs_IsoV) {
423 for (j = 1; j < myDiscret; j++) {
431 //---GeomAbs_Sphere GeomAbs_Torus--------
432 //GeomAbs_BezierSurface GeomAbs_BezierSurface
433 case GeomAbs_Sphere :
435 case GeomAbs_OffsetSurface :
436 case GeomAbs_OtherSurface :
437 for (j = 1; j < myDiscret; j++) {
444 //-------------GeomAbs_BSplineSurface------
445 case GeomAbs_BezierSurface :
446 case GeomAbs_BSplineSurface :
447 for (j = 1; j <= myDiscret/2; j++) {
451 PlotIso ( S, T, U1, V1, (T == GeomAbs_IsoV) ? stepU*2. : stepV*2., halt, Pts, Cells);
456 //-------------GeomAbs_SurfaceOfExtrusion--
457 //-------------GeomAbs_SurfaceOfRevolution-
458 case GeomAbs_SurfaceOfExtrusion :
459 case GeomAbs_SurfaceOfRevolution :
460 if ((T == GeomAbs_IsoV && SurfType == GeomAbs_SurfaceOfRevolution) ||
461 (T == GeomAbs_IsoU && SurfType == GeomAbs_SurfaceOfExtrusion)) {
462 if (SurfType == GeomAbs_SurfaceOfExtrusion) break;
463 for (j = 1; j < myDiscret; j++) {
470 CurvType = (S.BasisCurve())->GetType();
474 case GeomAbs_Circle :
475 case GeomAbs_Ellipse :
476 for (j = 1; j < myDiscret; j++) {
483 case GeomAbs_Parabola :
484 case GeomAbs_Hyperbola :
485 case GeomAbs_BezierCurve :
486 case GeomAbs_BSplineCurve :
487 case GeomAbs_OffsetCurve:
488 case GeomAbs_OtherCurve :
489 for (j = 1; j <= myDiscret/2; j++) {
493 PlotIso ( S, T, U1, V1,(T == GeomAbs_IsoV) ? stepU*2. : stepV*2., halt, Pts, Cells);
507 //=======================================================================
508 // Function : PlotIso
509 // Purpose : Plot iso for other surface
510 //=======================================================================
512 void GEOM_OCCReader::PlotIso (BRepAdaptor_Surface& S,
517 Standard_Boolean& halt,
526 if (T == GeomAbs_IsoU) {
528 S.D0(U, V + Step/2., Pm);
529 S.D0(U, V + Step, Pr);
532 S.D0(U + Step/2., V, Pm);
533 S.D0(U + Step, V, Pr);
536 if (PlotCount > MaxPlotCount) {
537 DrawTo(Pr,Pts,Cells);
541 if (Pm.Distance(Pl) + Pm.Distance(Pr) <= IsoRatio*Pl.Distance(Pr)) {
542 DrawTo(Pr,Pts,Cells);
544 if (T == GeomAbs_IsoU) {
545 PlotIso ( S, T, U, V, Step/2, halt, Pts, Cells);
546 Standard_Real aLocalV = V + Step/2 ;
547 PlotIso ( S, T, U, aLocalV , Step/2, halt, Pts, Cells);
549 PlotIso ( S, T, U, V, Step/2, halt, Pts, Cells);
550 Standard_Real aLocalU = U + Step/2 ;
551 PlotIso ( S, T, aLocalU , V, Step/2, halt, Pts, Cells);
555 //=======================================================================
556 // Function : TransferEdgeWData
557 // Purpose : Transfer wireframe data for EDGE
558 //=======================================================================
560 void GEOM_OCCReader::TransferEdgeWData(const TopoDS_Edge& aEdge,
564 Handle(Poly_PolygonOnTriangulation) aEdgePoly;
565 Standard_Integer i = 1;
566 Handle(Poly_Triangulation) T;
567 TopLoc_Location aEdgeLoc;
568 BRep_Tool::PolygonOnTriangulation(aEdge, aEdgePoly, T, aEdgeLoc, i);
570 Handle(Poly_Polygon3D) P;
571 if(aEdgePoly.IsNull()) {
572 P = BRep_Tool::Polygon3D(aEdge, aEdgeLoc);
575 if(P.IsNull() && aEdgePoly.IsNull())
582 Standard_Boolean isidtrsf = true;
583 if(!aEdgeLoc.IsIdentity()) {
585 edgeTransf = aEdgeLoc.Transformation();
590 Standard_Integer nbnodes;
591 if (aEdgePoly.IsNull()) {
592 nbnodes = P->NbNodes();
593 const TColgp_Array1OfPnt& theNodesP = P->Nodes();
596 aP2 = theNodesP(nbnodes);
601 for(int j=1;j<nbnodes;j++) {
602 gp_Pnt pt1 = theNodesP(j);
603 gp_Pnt pt2 = theNodesP(j+1);
606 // apply edge transformation
607 pt1.Transform(edgeTransf);
608 pt2.Transform(edgeTransf);
612 coord[0] = pt1.X(); coord[1] = pt1.Y(); coord[2] = pt1.Z();
613 pts[0] = Pts->InsertNextPoint(coord);
616 coord[0] = pt2.X(); coord[1] = pt2.Y(); coord[2] = pt2.Z();
617 pts[1] = Pts->InsertNextPoint(coord);
619 // insert line (pt1,pt2)
620 Cells->InsertNextCell(2,pts);
623 nbnodes = aEdgePoly->NbNodes();
624 const TColStd_Array1OfInteger& Nodesidx = aEdgePoly->Nodes();
625 const TColgp_Array1OfPnt& theNodesPoly = T->Nodes();
627 aP1 = theNodesPoly(1);
628 aP2 = theNodesPoly(nbnodes);
633 for(int j=1;j<nbnodes;j++) {
634 Standard_Integer id1 = Nodesidx(j);
635 Standard_Integer id2 = Nodesidx(j+1);
637 gp_Pnt pt1 = theNodesPoly(id1);
638 gp_Pnt pt2 = theNodesPoly(id2);
641 // apply edge transformation
642 pt1.Transform(edgeTransf);
643 pt2.Transform(edgeTransf);
647 coord[0] = pt1.X(); coord[1] = pt1.Y(); coord[2] = pt1.Z();
648 pts[0] = Pts->InsertNextPoint(coord);
651 coord[0] = pt2.X(); coord[1] = pt2.Y(); coord[2] = pt2.Z();
652 pts[1] = Pts->InsertNextPoint(coord);
654 // insert line (pt1,pt2)
655 Cells->InsertNextCell(2,pts);
659 // vector representation has an arrow on its end
663 // apply edge transformation
664 aP1.Transform(edgeTransf);
665 aP2.Transform(edgeTransf);
669 gp_Vec aDirVec (aP1, aP2);
670 Standard_Real aDist = aDirVec.Magnitude();
671 if (aDist < gp::Resolution()) return;
672 gp_Dir aDirection (aDirVec);
674 Standard_Real anAngle = M_PI/180. * 5.;
675 Standard_Real aLength = aDist/10.;
677 Standard_Real dx,dy,dz;
678 aDirection.Coord(dx,dy,dz);
680 // Pointe de la fleche
681 Standard_Real xo,yo,zo;
684 // Centre du cercle base de la fleche
685 gp_XYZ aPc = aP2.XYZ() - aDirection.XYZ() * aLength;
687 // Construction d'un repere i,j pour le cercle
689 if (Abs(dx) <= Abs(dy) && Abs(dx) <= Abs(dz)) aDirN = gp::DX();
690 else if (Abs(dy) <= Abs(dz) && Abs(dy) <= Abs(dx)) aDirN = gp::DY();
691 else aDirN = gp::DZ();
693 gp_Dir aDirI = aDirection ^ aDirN;
694 gp_Dir aDirJ = aDirection ^ aDirI;
696 // Add points and segments, composing the arrow
697 Standard_Real cosinus, sinus, Tg = tan(anAngle);
700 coord[0] = xo; coord[1] = yo; coord[2] = zo;
702 int ptLoc = Pts->InsertNextPoint(coord);
710 for (int i = 1; i <= NbPoints; i++, ptPrev = ptCur)
712 cosinus = cos(2. * M_PI / NbPoints * (i-1));
713 sinus = sin(2. * M_PI / NbPoints * (i-1));
715 gp_XYZ aP = aPc + (aDirI.XYZ() * cosinus + aDirJ.XYZ() * sinus) * aLength * Tg;
721 ptCur = Pts->InsertNextPoint(coord);
728 // insert line (ptCur,ptPrev)
730 Cells->InsertNextCell(2,pts);
733 // insert line (ptCur,ptLoc)
735 Cells->InsertNextCell(2,pts);
738 // insert line (ptCur,ptFirst)
741 Cells->InsertNextCell(2,pts);
745 /* Standard_Integer nbnodes = aEdgePoly->NbNodes();
746 const TColStd_Array1OfInteger& Nodesidx = aEdgePoly->Nodes();
747 const TColgp_Array1OfPnt& theNodes = T->Nodes();
754 for(i=1;i<=nbnodes;i++) {
755 Standard_Integer id = Nodesidx(i);
756 gp_Pnt pt = theNodes(id);
759 if(!isidtrsf) pt.Transform(edgeTransf);
761 coord[0] = pt.X(); coord[1] = pt.Y(); coord[2] = pt.Z();
763 Pts->SetPoint(id-1,coord);
768 for(i=1;i<nbnodes;i++) {
770 Standard_Integer id1 = Nodesidx(i);
771 Standard_Integer id2 = Nodesidx(i+1);
774 pts[0] = id1-1; pts[1] = id2-1;
776 // insert line (pt1,pt2)
777 Cells->InsertNextCell(2,pts);
783 //=======================================================================
784 // Function : TransferVertexWData
785 // Purpose : Transfer wireframe data for VERTEX
786 //=======================================================================
788 void GEOM_OCCReader::TransferVertexWData(const TopoDS_Vertex& /*aVertex*/,
792 #define ZERO_COORD coord[0] = coord[1] = coord[2] = 0.0
794 // gp_Pnt P = BRep_Tool::Pnt( aVertex ); ??????????????????????????
795 float delta = 1, coord[3];
798 ZERO_COORD; coord[0] = +delta;
799 pts[0] = Pts->InsertNextPoint(coord);
801 pts[1] = Pts->InsertNextPoint(coord);
802 // insert line (pt1,pt2)
803 Cells->InsertNextCell(2,pts);
805 ZERO_COORD; coord[1] = +delta;
806 pts[0] = Pts->InsertNextPoint(coord);
808 pts[1] = Pts->InsertNextPoint(coord);
809 // insert line (pt1,pt2)
810 Cells->InsertNextCell(2,pts);
812 ZERO_COORD; coord[2] = +delta;
813 pts[0] = Pts->InsertNextPoint(coord);
815 pts[1] = Pts->InsertNextPoint(coord);
816 // insert line (pt1,pt2)
817 Cells->InsertNextCell(2,pts);
822 //=======================================================================
823 // Function : TransferEdgeSData(
824 // Purpose : Transfer shading data for EDGE
825 //=======================================================================
827 void GEOM_OCCReader::TransferEdgeSData(const TopoDS_Edge& /*aFace*/,
829 vtkCellArray* /*Cells*/)
834 //=======================================================================
835 // Function : TransferFaceSData
836 // Purpose : Transfer shading data for FACE
837 //=======================================================================
838 void GEOM_OCCReader::TransferFaceSData(const TopoDS_Face& aFace,
840 vtkCellArray* Cells) {
842 TopLoc_Location aLoc;
843 Handle(Poly_Triangulation) aPoly = BRep_Tool::Triangulation(aFace,aLoc);
844 if(aPoly.IsNull()) return;
848 Standard_Boolean identity = true;
849 if(!aLoc.IsIdentity()) {
851 myTransf = aLoc.Transformation();
854 Standard_Integer nbNodesInFace = aPoly->NbNodes();
855 Standard_Integer nbTriInFace = aPoly->NbTriangles();
857 const Poly_Array1OfTriangle& Triangles = aPoly->Triangles();
858 const TColgp_Array1OfPnt& Nodes = aPoly->Nodes();
861 for(i=1;i<=nbNodesInFace;i++) {
864 if(!identity) P.Transform(myTransf);
865 coord[0] = P.X(); coord[1] = P.Y(); coord[2] = P.Z();
866 Pts->SetPoint(i-1,coord);
869 for(i=1;i<=nbTriInFace;i++) {
872 Standard_Integer N1,N2,N3;
873 Triangles(i).Get(N1,N2,N3);
876 pts[0] = N1-1; pts[1] = N2-1; pts[2] = N3-1;
877 Cells->InsertNextCell(3,pts);
883 //=======================================================================
884 // Function : ComputeShading
885 // Purpose : Compute the shape in shading mode
886 //=======================================================================
887 void GEOM_OCCReader::ComputeShading(vtkPoints* Pts,vtkCellArray* Cells){
889 // Check the type of the shape:
890 if(myShape.ShapeType() == TopAbs_FACE) {
892 TransferFaceSData(TopoDS::Face(myShape),Pts,Cells);
895 if(myShape.ShapeType() == TopAbs_EDGE) {
897 TransferEdgeSData(TopoDS::Edge(myShape),Pts,Cells);
906 //=======================================================================
908 // Purpose : Set parameters
909 //=======================================================================
910 void GEOM_OCCReader::setDisplayMode(int thenewmode) {
914 void GEOM_OCCReader::setTopo(const TopoDS_Shape& aShape, bool isVector) {
916 myIsVector = isVector;
919 void GEOM_OCCReader::setForceUpdate(Standard_Boolean bol) {
923 //=======================================================================
925 // Purpose : Get parameters
926 //=======================================================================
927 const TopoDS_Shape& GEOM_OCCReader::getTopo() {
931 int GEOM_OCCReader::getDisplayMode() {