[cgma-dev] r1872 - in cgm/trunk/itaps: . SIDL SIDL/gserver
kraftche at mcs.anl.gov
kraftche at mcs.anl.gov
Wed Jun 4 13:31:30 CDT 2008
Author: kraftche
Date: 2008-06-04 13:31:30 -0500 (Wed, 04 Jun 2008)
New Revision: 1872
Modified:
cgm/trunk/itaps/SIDL/gserver/iGeom_SIDL_GeomSidl_Impl.cc
cgm/trunk/itaps/SIDL/iGeom.sidl
cgm/trunk/itaps/iGeom.h
cgm/trunk/itaps/iGeom_CGMA.cc
Log:
add missing sphere create method
Modified: cgm/trunk/itaps/SIDL/gserver/iGeom_SIDL_GeomSidl_Impl.cc
===================================================================
--- cgm/trunk/itaps/SIDL/gserver/iGeom_SIDL_GeomSidl_Impl.cc 2008-06-04 13:33:47 UTC (rev 1871)
+++ cgm/trunk/itaps/SIDL/gserver/iGeom_SIDL_GeomSidl_Impl.cc 2008-06-04 18:31:30 UTC (rev 1872)
@@ -3977,6 +3977,23 @@
}
/**
+ * Method: Sphere[]
+ */
+void
+iGeom_SIDL::GeomSidl_impl::Sphere (
+ /* in */ double radius,
+ /* out */ void*& geom_entity )
+throw (
+ ::iBase::Error
+){
+ // DO-NOT-DELETE splicer.begin(iGeom_SIDL.GeomSidl.Sphere)
+ // Insert-Code-Here {iGeom_SIDL.GeomSidl.Sphere} (Sphere method)
+ iGeom_Sphere(igeomInstance, radius, &geom_entity);
+ PROCESS_ERROR;
+ // DO-NOT-DELETE splicer.end(iGeom_SIDL.GeomSidl.Sphere)
+}
+
+/**
* Method: Brick[]
*/
void
Modified: cgm/trunk/itaps/SIDL/iGeom.sidl
===================================================================
--- cgm/trunk/itaps/SIDL/iGeom.sidl 2008-06-04 13:33:47 UTC (rev 1871)
+++ cgm/trunk/itaps/SIDL/iGeom.sidl 2008-06-04 18:31:30 UTC (rev 1872)
@@ -989,6 +989,12 @@
interface Primitives extends Modify
{
+//==========================Sphere=================
+ /* Construct a Sphere with specified radius. */
+ void Sphere(in double radius,
+ out opaque geom_entity)
+ throws iBase.Error;
+
//==========================Brick=================
/* Construct a brick with specified dimensions. If both y and z are
* zero, a cube of dimension x is constructed.
Modified: cgm/trunk/itaps/iGeom.h
===================================================================
--- cgm/trunk/itaps/iGeom.h 2008-06-04 13:33:47 UTC (rev 1871)
+++ cgm/trunk/itaps/iGeom.h 2008-06-04 18:31:30 UTC (rev 1872)
@@ -2059,6 +2059,13 @@
iBase_EntityHandle,
int* err );
+ /**\brief Create a sphere centered on the origin
+ */
+ void iGeom_createSphere( iGeom_Instance,
+ double radius,
+ iBase_EntityHandle* sphere_handle_out,
+ int* err );
+
/**\brief
*
*/
Modified: cgm/trunk/itaps/iGeom_CGMA.cc
===================================================================
--- cgm/trunk/itaps/iGeom_CGMA.cc 2008-06-04 13:33:47 UTC (rev 1871)
+++ cgm/trunk/itaps/iGeom_CGMA.cc 2008-06-04 18:31:30 UTC (rev 1872)
@@ -5135,6 +5135,22 @@
}
void
+iGeom_createSphere( iGeom_Instance instance,
+ double radius,
+ iBase_EntityHandle *geom_entity,
+ int* err )
+{
+ if (radius <= 0.0) {
+ ERROR(iBase_INVALID_ARGUMENT, "Sphere radius must be must be positive.");
+ }
+
+ RefEntity* tmp_body = gmt->sphere( radius );
+ *geom_entity = tmp_body;
+ RETURN ((tmp_body ? iBase_SUCCESS : iBase_FAILURE));
+}
+
+
+void
iGeom_createBrick (iGeom_Instance instance,
/*in*/ double x,
/*in*/ double y,
More information about the cgma-dev
mailing list