[cgma-dev] r2502 - in cgm/trunk/geom: . ACIS_SRC OCC facet
janehu at mcs.anl.gov
janehu at mcs.anl.gov
Tue Dec 30 13:54:24 CST 2008
Author: janehu
Date: 2008-12-30 13:54:22 -0600 (Tue, 30 Dec 2008)
New Revision: 2502
Modified:
cgm/trunk/geom/ACIS_SRC/AcisModifyEngine.cpp
cgm/trunk/geom/ACIS_SRC/AcisModifyEngine.hpp
cgm/trunk/geom/GeometryModifyEngine.hpp
cgm/trunk/geom/OCC/OCCModifyEngine.cpp
cgm/trunk/geom/OCC/OCCModifyEngine.hpp
cgm/trunk/geom/facet/FacetModifyEngine.cpp
cgm/trunk/geom/facet/FacetModifyEngine.hpp
Log:
Implemented webcut method in OCC, changed the signature of webcut from const to non-const, this function doesn't try to alter any memebers of the GeometryModifyEngine, I don't see the need of making it const, when calling 'section' function in it, 'section' is not a const.
Modified: cgm/trunk/geom/ACIS_SRC/AcisModifyEngine.cpp
===================================================================
--- cgm/trunk/geom/ACIS_SRC/AcisModifyEngine.cpp 2008-12-29 20:13:12 UTC (rev 2501)
+++ cgm/trunk/geom/ACIS_SRC/AcisModifyEngine.cpp 2008-12-30 19:54:22 UTC (rev 2502)
@@ -9855,7 +9855,7 @@
const CubitVector &vecVertex2,
const CubitVector &vecVertex3,
DLIList<BodySM*>& results_list,
- bool imprint ) const
+ bool imprint )
{
//int webcut_debug_flag = 18;
//int webcut_debug_flag_on = DEBUG_FLAG(webcut_debug_flag);
Modified: cgm/trunk/geom/ACIS_SRC/AcisModifyEngine.hpp
===================================================================
--- cgm/trunk/geom/ACIS_SRC/AcisModifyEngine.hpp 2008-12-29 20:13:12 UTC (rev 2501)
+++ cgm/trunk/geom/ACIS_SRC/AcisModifyEngine.hpp 2008-12-30 19:54:22 UTC (rev 2502)
@@ -461,7 +461,7 @@
const CubitVector &v2,
const CubitVector &v3,
DLIList<BodySM*>& results_list,
- bool imprint = false ) const ;
+ bool imprint = false ) ;
//R int
//R- Number of bodies that were webcut ( >= 0 )
//I webcut_body_list
Modified: cgm/trunk/geom/GeometryModifyEngine.hpp
===================================================================
--- cgm/trunk/geom/GeometryModifyEngine.hpp 2008-12-29 20:13:12 UTC (rev 2501)
+++ cgm/trunk/geom/GeometryModifyEngine.hpp 2008-12-30 19:54:22 UTC (rev 2502)
@@ -534,7 +534,7 @@
const CubitVector &v3,
DLIList<BodySM*>& results_list,
bool imprint = false
- ) const = 0;
+ ) = 0;
//R int
//R- Number of bodies that were webcut ( >= 0 )
//I webcut_body_list
Modified: cgm/trunk/geom/OCC/OCCModifyEngine.cpp
===================================================================
--- cgm/trunk/geom/OCC/OCCModifyEngine.cpp 2008-12-29 20:13:12 UTC (rev 2501)
+++ cgm/trunk/geom/OCC/OCCModifyEngine.cpp 2008-12-30 19:54:22 UTC (rev 2502)
@@ -1753,7 +1753,7 @@
stat = do_subtract(from_bodies, tool_bodies_copy, is_tool_volume,
tool_boxes, new_bodies, keep_old, imprint) ;
- //ok, we're done wih all cuts, delete unnecessaries.
+ //ok, we're done with all cuts, delete unnecessaries.
while (tool_boxes->size())
delete tool_boxes->pop();
delete tool_boxes;
@@ -1876,7 +1876,7 @@
new_bodies.append(bodysm);
}
- //ok, we're done wih all cuts, delete unnecessaries.
+ //ok, we're done with all cuts, delete unnecessaries.
if(keep_old)
{
int size = from_bodies_copy.size();
@@ -2582,7 +2582,7 @@
}
//===============================================================================
-// Function : get_the_shape_list
+// Function : get_shape_list
// Member Type: PRIVATE
// Description: get the TopoDS_Shape list for imprinting use.
// Author : Jane Hu
@@ -3413,7 +3413,7 @@
new_bodies.append(bodysm);
}
- //ok, we're done wih all cuts, delete unnecessaries.
+ //ok, we're done with all cuts, delete unnecessaries.
if(!keep_old)
OCCQueryEngine::instance()->delete_solid_model_entities(tool_body_ptr);
@@ -4440,18 +4440,38 @@
// Function : webcut
// Member Type: PUBLIC
// Description:
-// Author : John Fowler
-// Date : 10/02
+// Author : Jane Hu
+// Date : 12/08
//===============================================================================
CubitStatus OCCModifyEngine::webcut(DLIList<BodySM*>& webcut_body_list,
const CubitVector &v1,
const CubitVector &v2,
const CubitVector &v3,
DLIList<BodySM*>& results_list,
- bool imprint ) const
+ bool imprint )
{
- PRINT_ERROR("Option not supported for mesh based geometry.\n");
- return CUBIT_FAILURE;
+ CubitStatus stat;
+ DLIList<BodySM*> new_BodySMs;
+ stat = section(webcut_body_list, v1, v2, v3, new_BodySMs, true, true,false);
+ if(stat == CUBIT_FAILURE)
+ {
+ PRINT_ERROR("Can't webcut the bodies using a plane determined by 3 points.\n");
+ return stat;
+ }
+
+ stat = section(webcut_body_list, v1, v2, v3, new_BodySMs, false, false, false);
+ if(stat == CUBIT_FAILURE)
+ {
+ PRINT_ERROR("Can't webcut the bodies using a plane determined by 3 points.\n");
+ return stat;
+ }
+
+ if(imprint)
+ stat = this->imprint( new_BodySMs, results_list, false);
+
+ else
+ results_list = new_BodySMs;
+ return stat;
}
//===============================================================================
@@ -4612,7 +4632,7 @@
{
if (keep_both_sides == CUBIT_TRUE )
{
- PRINT_ERROR("keeping both sides of section is not implemented.\n");
+ PRINT_ERROR("Please use webcut to for keep both sides option.\n");
return CUBIT_FAILURE;
}
@@ -4769,7 +4789,7 @@
CubitStatus OCCModifyEngine::regularize_entity( GeometryEntity * /*old_entity_ptr*/,
BodySM *& /*new_body_ptr*/ )
{
- PRINT_ERROR("Option not supported for mesh based geometry.\n");
+ PRINT_ERROR("Option not supported for OCC based geometry.\n");
return CUBIT_FAILURE;
}
Modified: cgm/trunk/geom/OCC/OCCModifyEngine.hpp
===================================================================
--- cgm/trunk/geom/OCC/OCCModifyEngine.hpp 2008-12-29 20:13:12 UTC (rev 2501)
+++ cgm/trunk/geom/OCC/OCCModifyEngine.hpp 2008-12-30 19:54:22 UTC (rev 2502)
@@ -1,15 +1,14 @@
//-------------------------------------------------------------------------
// Filename : OCCModifyEngine.hpp
//
-// Purpose : ModifyEngine for faceted geometry
+// Purpose : ModifyEngine for OCC geometry
//
// Special Notes : Modeled after GeometryModifyEngine and AcisModifyEngine.
//
-// Creator : John Fowler
+// Creator : Jane Hu
//
-// Creation Date : 6/02
+// Creation Date : 6/08
//
-// Owner : John Fowler
//-------------------------------------------------------------------------
#ifndef OCC_MODIFY_ENGINE_HPP
@@ -312,7 +311,7 @@
const CubitVector &v2,
const CubitVector &v3,
DLIList<BodySM*>& results_list,
- bool imprint = false ) const;
+ bool imprint = false ) ;
virtual CubitStatus webcut(DLIList<BodySM*>& webcut_body_list,
BodySM const* tool_body,
Modified: cgm/trunk/geom/facet/FacetModifyEngine.cpp
===================================================================
--- cgm/trunk/geom/facet/FacetModifyEngine.cpp 2008-12-29 20:13:12 UTC (rev 2501)
+++ cgm/trunk/geom/facet/FacetModifyEngine.cpp 2008-12-30 19:54:22 UTC (rev 2502)
@@ -1883,7 +1883,7 @@
const CubitVector &v3,
DLIList<BodySM*>& results_list,
bool imprint
- ) const
+ )
{
MODIFY_CHECK_RETURN_FAILURE;
Modified: cgm/trunk/geom/facet/FacetModifyEngine.hpp
===================================================================
--- cgm/trunk/geom/facet/FacetModifyEngine.hpp 2008-12-29 20:13:12 UTC (rev 2501)
+++ cgm/trunk/geom/facet/FacetModifyEngine.hpp 2008-12-30 19:54:22 UTC (rev 2502)
@@ -325,7 +325,7 @@
const CubitVector &v3,
DLIList<BodySM*>& results_list,
bool imprint = false
- ) const;
+ ) ;
virtual CubitStatus webcut(DLIList<BodySM*>& webcut_body_list,
BodySM const* tool_body,
More information about the cgma-dev
mailing list