[cgma-dev] r4755 - in cgm/branches/merge-cubit12: geom/ACIS_SRC geom/OCC geom/testing test
jiangtao_ma at yahoo.com
jiangtao_ma at yahoo.com
Wed Apr 20 12:39:28 CDT 2011
Author: janehu
Date: 2011-04-20 12:39:28 -0500 (Wed, 20 Apr 2011)
New Revision: 4755
Modified:
cgm/branches/merge-cubit12/geom/ACIS_SRC/AcisModifyEngine.cpp
cgm/branches/merge-cubit12/geom/OCC/OCCModifyEngine.cpp
cgm/branches/merge-cubit12/geom/OCC/OCCQueryEngine.cpp
cgm/branches/merge-cubit12/geom/testing/main.cpp
cgm/branches/merge-cubit12/test/modify.cpp
Log:
Check the TopoDS_Edge to see if its two vertices are identical for sliver edges, and not generate curve on such edge in CGM, there's a corespoinding change in testcase cgm/test/modify.
Fixed the a bug in creating oriented brick, testcase is in cgm/geom/testing/CreateGeometry.
Removed unnecessary error count manipulation in geom/testing/main.cpp
Modified: cgm/branches/merge-cubit12/geom/ACIS_SRC/AcisModifyEngine.cpp
===================================================================
--- cgm/branches/merge-cubit12/geom/ACIS_SRC/AcisModifyEngine.cpp 2011-04-20 17:37:18 UTC (rev 4754)
+++ cgm/branches/merge-cubit12/geom/ACIS_SRC/AcisModifyEngine.cpp 2011-04-20 17:39:28 UTC (rev 4755)
@@ -3840,7 +3840,7 @@
// and size.
//
// Special Notes : Extension is equivalent to 1/2 width, depth, height.
-//
+// Center is the coordinates in global system.
// Creator : Steve Storm
//
// Creation Date : 10/09/00
Modified: cgm/branches/merge-cubit12/geom/OCC/OCCModifyEngine.cpp
===================================================================
--- cgm/branches/merge-cubit12/geom/OCC/OCCModifyEngine.cpp 2011-04-20 17:37:18 UTC (rev 4754)
+++ cgm/branches/merge-cubit12/geom/OCC/OCCModifyEngine.cpp 2011-04-20 17:39:28 UTC (rev 4755)
@@ -1457,6 +1457,7 @@
// Member Type: PUBLIC
// Description: create an OCC brick given center axes and extension
// extension is equvlent to (wid/2, dep/2, hi/2)
+// center should be given the coordinates in global system
// Author : Jane Hu
// Date : 03/08
//===============================================================================
@@ -1464,8 +1465,7 @@
const CubitVector axes[3],
const CubitVector &extension) const
{
- CubitVector left_corner = center - extension;
- gp_Pnt left_point(left_corner.x(), left_corner.y(), left_corner.z());
+ gp_Pnt left_point(0,0,0);
gp_Dir main_dir(axes[2].x(), axes[2].y(), axes[2].z());
gp_Dir x_dir(axes[0].x(), axes[0].y(), axes[0].z());
gp_Ax2 Axis(left_point, main_dir, x_dir);
@@ -1477,7 +1477,17 @@
if (lump == NULL)
return (BodySM*)NULL;
- return CAST_TO(lump, OCCLump)->get_body();
+ BodySM* body = CAST_TO(lump, OCCLump)->get_body();
+ if(body)
+ {
+ CubitVector center_point;
+ double volume;
+ OCCBody* occ_body = CAST_TO(body,OCCBody);
+ occ_body->mass_properties(center_point, volume);
+ CubitVector move_vec = center - center_point;
+ occ_body->move(move_vec.x(), move_vec.y(), move_vec.z());
+ return body;
More information about the cgma-dev
mailing list