2 #include "HEXABLOCK.hxx"
7 #include "hexa_base.hxx"
8 #include "HexQuad_impl.hxx"
9 #include "HexVertex_impl.hxx"
10 #include "HexEdge_impl.hxx"
11 #include "HexShape.hxx"
13 Quad_impl::Quad_impl( HEXA_NS::Quad *ptrCpp ):_quad_cpp(ptrCpp)
17 HEXA_NS::Quad* Quad_impl::GetImpl()
18 throw (SALOME::SALOME_Exception)
23 Edge_ptr Quad_impl::getEdge(::CORBA::Long n)
24 throw (SALOME::SALOME_Exception)
26 Edge_ptr result = Edge::_nil();
28 HEXA_NS::Edge* e = _quad_cpp->getEdge( n );
30 Edge_impl* servantCorba = new Edge_impl(e);
31 result = servantCorba->_this();
37 Vertex_ptr Quad_impl::getVertex(::CORBA::Long n)
38 throw (SALOME::SALOME_Exception)
40 Vertex_ptr result = Vertex::_nil();
42 HEXA_NS::Vertex* v = _quad_cpp->getVertex( n );
44 Vertex_impl* servantCorba = new Vertex_impl(v);
45 result = servantCorba->_this();
53 ::CORBA::Long Quad_impl::addAssociation( GEOM::GEOM_Object_ptr geom_object_2D)
54 throw (SALOME::SALOME_Exception)
57 TopoDS_Shape aShape = HEXABLOCK::GetHEXABLOCKGen()->geomObjectToShape( geom_object_2D );
59 string strBrep = shape2string( aShape );
60 HEXA_NS::Shape* s = new HEXA_NS::Shape( strBrep );
61 ok = _quad_cpp->addAssociation( s );
63 // _associations.push_back(GEOM::GEOM_Object::_duplicate( geom_object_2D ));
69 GEOM::ListOfGO* Quad_impl::getAssociations() //CS_NOT_SPEC
70 throw (SALOME::SALOME_Exception)
72 // GEOM::ListOfGO* result = new GEOM::ListOfGO;
73 // result->length( _associations.size() );
75 // CORBA::ULong i = 0;
76 // for ( std::vector<GEOM::GEOM_Object_ptr>::const_iterator iter = _associations.begin();
77 // iter != _associations.end();
79 // // (*result)[i++] = *iter;
80 // (*result)[i++] = GEOM::GEOM_Object::_duplicate( *iter );
86 const std::vector<HEXA_NS::Shape*> shapes = _quad_cpp->getAssociations();
88 GEOM::ListOfGO* result = new GEOM::ListOfGO;
89 result->length( shapes.size() );
91 HEXABLOCK_ORB::EdgeAssociation assoc;
93 for ( std::vector<HEXA_NS::Shape*>::const_iterator iter = shapes.begin();
96 aShape = string2shape( (*iter)->getBrep());
97 (*result)[ i++ ] = HEXABLOCK::GetHEXABLOCKGen()->shapeToGeomObject( aShape );
110 // void Quad_impl::setAssociation(GEOM::GEOM_Object_ptr geom_object_2D) throw (SALOME::SALOME_Exception)
114 // GEOM::GEOM_Object_ptr Quad_impl::getAssociation() throw (SALOME::SALOME_Exception)
118 // void Quad_impl::removeAssociation() throw (SALOME::SALOME_Exception)
122 void Quad_impl::setScalar( ::CORBA::Double val )throw (SALOME::SALOME_Exception)
124 _quad_cpp->setScalar(val);
127 void Quad_impl::dump() throw (SALOME::SALOME_Exception)
133 void Quad_impl::printName() throw (SALOME::SALOME_Exception)
135 _quad_cpp->printName();