2 #include "HEXABLOCK.hxx"
7 #include "hexa_base.hxx"
8 #include "HexVertex_impl.hxx"
9 #include "HexShape.hxx"
11 Vertex_impl::Vertex_impl( HEXA_NS::Vertex *ptrCpp ):
13 // _association( GEOM::GEOM_Object::_nil() )
17 HEXA_NS::Vertex* Vertex_impl::GetImpl()
22 CORBA::Double Vertex_impl::getX() throw(SALOME::SALOME_Exception)
24 return _vertex_cpp->getX();
27 CORBA::Double Vertex_impl::getY() throw(SALOME::SALOME_Exception)
29 return _vertex_cpp->getY();
32 CORBA::Double Vertex_impl::getZ() throw(SALOME::SALOME_Exception)
34 return _vertex_cpp->getZ();
38 void Vertex_impl::setX( CORBA::Double x ) throw(SALOME::SALOME_Exception)
42 void Vertex_impl::setY( CORBA::Double y ) throw(SALOME::SALOME_Exception)
47 void Vertex_impl::setZ( CORBA::Double z ) throw(SALOME::SALOME_Exception)
53 void Vertex_impl::setAssociation(GEOM::GEOM_Object_ptr geom_object_vertex)
54 throw (SALOME::SALOME_Exception)
56 // TopoDS_Shape shape = HEXABLOCK::GetHEXABLOCKGen()->geomObjectToShape(geom_object_vertex);
57 HEXABLOCK::HEXABLOCK* gen = HEXABLOCK::GetHEXABLOCKGen();
58 TopoDS_Shape shape = gen->geomObjectToShape(geom_object_vertex);
59 string strBrep = shape2string( shape );
60 HEXA_NS::Shape* s = new HEXA_NS::Shape( strBrep );
61 _vertex_cpp->setAssociation(s);
63 // _association = GEOM::GEOM_Object::_duplicate( geom_object_vertex );
67 GEOM::GEOM_Object_ptr Vertex_impl::getAssociation()
68 throw (SALOME::SALOME_Exception)
70 // GEOM::GEOM_Object_var result = GEOM::GEOM_Object::_nil();
71 // GEOM::GEOM_Object_ptr result = GEOM::GEOM_Object::_nil();
73 GEOM::GEOM_Object_var result; // = new GEOM::GEOM_Object;
75 HEXA_NS::Shape* s = _vertex_cpp->getAssociation();
77 std::cout << "getAssociation ->" << s << std::endl;
80 string strBrep = s->getBrep();
81 TopoDS_Shape shape = string2shape( strBrep );
82 result = HEXABLOCK::GetHEXABLOCKGen()->shapeToGeomObject(shape);
85 // // _vertex_cpp->getAssociation()->_topo;
86 // // result = HEXABLOCK::GetHEXABLOCKGen()->shapeToGeomObject(_shape);
89 return result._retn();
90 // return GEOM::GEOM_Object::_duplicate( _association );
95 // void Vertex_impl::removeAssociation()
96 // throw (SALOME::SALOME_Exception)
101 void Vertex_impl::setScalar( ::CORBA::Double val )throw (SALOME::SALOME_Exception)
103 _vertex_cpp->setScalar(val);
106 void Vertex_impl::dump() throw (SALOME::SALOME_Exception)
112 void Vertex_impl::printName()throw (SALOME::SALOME_Exception)
114 _vertex_cpp->printName();