[cgma-dev] r1927 - in cgm/trunk/geom: . ACIS_SRC OCC facet
janehu at mcs.anl.gov
janehu at mcs.anl.gov
Wed Jun 25 13:34:20 CDT 2008
Author: janehu
Date: 2008-06-25 13:34:20 -0500 (Wed, 25 Jun 2008)
New Revision: 1927
Modified:
cgm/trunk/geom/ACIS_SRC/AcisModifyEngine.cpp
cgm/trunk/geom/ACIS_SRC/AcisModifyEngine.hpp
cgm/trunk/geom/GeometryModifyEngine.hpp
cgm/trunk/geom/GeometryModifyTool.cpp
cgm/trunk/geom/GeometryModifyTool.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:
change back the thicken interface for making thick solid, and added a hollow method of making thick solid.
Modified: cgm/trunk/geom/ACIS_SRC/AcisModifyEngine.cpp
===================================================================
--- cgm/trunk/geom/ACIS_SRC/AcisModifyEngine.cpp 2008-06-25 17:34:56 UTC (rev 1926)
+++ cgm/trunk/geom/ACIS_SRC/AcisModifyEngine.cpp 2008-06-25 18:34:20 UTC (rev 1927)
@@ -5922,6 +5922,16 @@
return CUBIT_SUCCESS;
}
+
+CubitStatus AcisModifyEngine::hollow( DLIList<BodySM*>& bodies,
+ DLIList<Surface*>& surfs_to_remove,
+ DLIList<BodySM*>& new_body_list,
+ double depth) const
+{
+ PRINT_ERROR( "This function is not available in ACIS engine.\n");
+ return CUBIT_FAILURE;
+}
+
//-------------------------------------------------------------------------
// Purpose : To thicken sheet bodies
//
@@ -5941,7 +5951,6 @@
return CUBIT_FAILURE;
#else
CubitStatus AcisModifyEngine::thicken( DLIList<BodySM*>& bodies,
- DLIList<Surface*>& surfs_to_remove,
DLIList<BodySM*>& new_body_list,
double depth,
bool both) const
Modified: cgm/trunk/geom/ACIS_SRC/AcisModifyEngine.hpp
===================================================================
--- cgm/trunk/geom/ACIS_SRC/AcisModifyEngine.hpp 2008-06-25 17:34:56 UTC (rev 1926)
+++ cgm/trunk/geom/ACIS_SRC/AcisModifyEngine.hpp 2008-06-25 18:34:20 UTC (rev 1927)
@@ -382,16 +382,23 @@
virtual CubitStatus thicken( DLIList<BodySM*>& bodies,
- DLIList<Surface*>& surfs_to_remove,
DLIList<BodySM*>& new_bodies,
double depth,
bool both = false) const;
//- Thicken a sheet body into a solid
- //- surfs_to_remove is a dummy input
//R CubitStatus
//R-the result of the thicken operation: Success or Failure
+ virtual CubitStatus hollow( DLIList<BodySM*>& bodies,
+ DLIList<Surface*>& surfs_to_remove,
+ DLIList<BodySM*>& new_bodies,
+ double depth) const;
+
+ //- Hollow a solid body into a thick body
+ //R CubitStatus
+ //R-the result of the hollow operation: Failure
+
virtual CubitStatus flip_normals( DLIList<Surface*>& face_list ) const;
//R CubitStatus
//R-the result of the flip_normals operation: Success or Failure
Modified: cgm/trunk/geom/GeometryModifyEngine.hpp
===================================================================
--- cgm/trunk/geom/GeometryModifyEngine.hpp 2008-06-25 17:34:56 UTC (rev 1926)
+++ cgm/trunk/geom/GeometryModifyEngine.hpp 2008-06-25 18:34:20 UTC (rev 1927)
@@ -412,7 +412,6 @@
virtual CubitStatus thicken( DLIList<BodySM*>& bodies,
- DLIList<Surface*>& surfs_to_remove,
DLIList<BodySM*>& new_body_list,
double depth,
bool both = false) const = 0;
@@ -420,9 +419,6 @@
//R-the result of the thicken operation: Success or Failure
//I bodies
//I-DLIList<Body*>: a list of Body pointers that will be thicken
- //I- or for OCC: a list of solid BodySM's that will be hollowed into a
- //I- thick solid.
- //I- surfs_to_remove: the faces to be removed from the original solid (OCC).
//O- new Bodies build by thicken operation on the list of Body pointers.
//- This function performs a thicken of sheet bodies and returns
//- the result through the output argument in_out_body. If the thicken
@@ -431,6 +427,23 @@
//- argument is assigned a NULL value and the function returns
//- CUBIT_FAILURE.
+ virtual CubitStatus hollow(DLIList<BodySM*>& bodies,
+ DLIList<Surface*>& surfs_to_remove,
+ DLIList<BodySM*>& new_bodies,
+ double depth) const = 0;
+ //R CubitStatus
+ //R-the result of the hollow operation: Success or Failure
+ //I body
+ //I- for OCC: a list of solid BodySM's that will be hollowed into a list of
+ //I- thick solids.
+ //I- surfs_to_remove: the faces to be removed from the original solid (OCC).
+ //O- new Bodies build by hollow operation on the body pointers.
+ //- This function performs a hollow of solid body and returns
+ //- the result through the output argument in_out_body. If the hollow
+ //- operation went through OK, the function returns CUBIT_SUCCESS. If,
+ //- for some reason, the hollow operation did not go well, the output
+ //- argument is assigned a NULL value and the function returns
+ //- CUBIT_FAILURE.
virtual CubitStatus flip_normals( DLIList<Surface*>& face_list ) const = 0;
//R CubitStatus
Modified: cgm/trunk/geom/GeometryModifyTool.cpp
===================================================================
--- cgm/trunk/geom/GeometryModifyTool.cpp 2008-06-25 17:34:56 UTC (rev 1926)
+++ cgm/trunk/geom/GeometryModifyTool.cpp 2008-06-25 18:34:20 UTC (rev 1927)
@@ -4155,12 +4155,10 @@
return CUBIT_SUCCESS;
}
-CubitStatus GeometryModifyTool::
- make_thick_solid( DLIList<Body*>& bodies,
- DLIList<RefFace*>& faces_to_remove,
- DLIList<Body*>& new_bodies,
- double depth,
- bool both )
+CubitStatus GeometryModifyTool::thicken( DLIList<Body*>& bodies,
+ DLIList<Body*>& new_bodies,
+ double depth,
+ bool both )
{
if (bodies.size() <= 0)
{
@@ -4188,24 +4186,11 @@
return CUBIT_FAILURE;
}
- DLIList<Surface*> surfs_to_remove;
- if(faces_to_remove.size() > 0)
- {
- GeometryModifyEngine* gme2 = common_modify_engine(faces_to_remove,
- surfs_to_remove);
- if(gme2 != gme)
- {
- PRINT_ERROR("Performing THICKEN with volumes containing geometry\n"
- " from different modeling engines is not allowed.\n"
- "Delete uncommon geometry on these volumes before operation.\n\n");
- return CUBIT_FAILURE;
- }
- }
DLIList<BodySM*> new_sms(count);
DLIList<BodySM*> body_sms(count);
CAST_LIST(bridge_list, body_sms, BodySM);
- CubitStatus result = gme->thicken( body_sms, surfs_to_remove, new_sms, depth, both);
+ CubitStatus result = gme->thicken( body_sms, new_sms, depth, both);
// check for resued entities, they have been moved and we need to notify observers
DLIList<RefEntity*> entities_to_update;
Modified: cgm/trunk/geom/GeometryModifyTool.hpp
===================================================================
--- cgm/trunk/geom/GeometryModifyTool.hpp 2008-06-25 17:34:56 UTC (rev 1926)
+++ cgm/trunk/geom/GeometryModifyTool.hpp 2008-06-25 18:34:20 UTC (rev 1927)
@@ -225,8 +225,7 @@
bool keep_old = false,
bool nonreg = false );
- CubitStatus make_thick_solid( DLIList<Body*>& bodies,
- DLIList<RefFace*>& faces_to_remove,
+ CubitStatus thicken( DLIList<Body*>& bodies,
DLIList<Body*>& new_bodies,
double depth,
bool both = false );
Modified: cgm/trunk/geom/OCC/OCCModifyEngine.cpp
===================================================================
--- cgm/trunk/geom/OCC/OCCModifyEngine.cpp 2008-06-25 17:34:56 UTC (rev 1926)
+++ cgm/trunk/geom/OCC/OCCModifyEngine.cpp 2008-06-25 18:34:20 UTC (rev 1927)
@@ -3580,23 +3580,29 @@
return CUBIT_SUCCESS;
}
+CubitStatus OCCModifyEngine::thicken( DLIList<BodySM*>& bodies,
+ DLIList<BodySM*>& new_bodies,
+ double depth,
+ CubitBoolean both) const
+{
+ PRINT_ERROR("Option not supported for OCC based geometry.\n");
+ return CUBIT_FAILURE;
+}
//===============================================================================
-// Function : thicken
+// Function : hollow
// Member Type: PUBLIC
// Description: Hollow existing solid body by remove one or several surfaces
// Can only take one body at a time.
-// No both (side) option.
// depth > 0, thick body going outside bodies
// depth < 0, thick body going inside bodies
// Author : Jane Hu
// Date : 06/08
//===============================================================================
-CubitStatus OCCModifyEngine::thicken(DLIList<BodySM*>& bodies,
+CubitStatus OCCModifyEngine::hollow( DLIList<BodySM*>& bodies,
DLIList<Surface*>& surfs_to_remove,
DLIList<BodySM*>& new_bodies,
- double depth,
- bool /*both*/) const
+ double depth) const
{
if(bodies.size() != 1 || surfs_to_remove.size() < 1)
{
Modified: cgm/trunk/geom/OCC/OCCModifyEngine.hpp
===================================================================
--- cgm/trunk/geom/OCC/OCCModifyEngine.hpp 2008-06-25 17:34:56 UTC (rev 1926)
+++ cgm/trunk/geom/OCC/OCCModifyEngine.hpp 2008-06-25 18:34:20 UTC (rev 1927)
@@ -201,11 +201,15 @@
bool keep_old = CUBIT_FALSE) const;
virtual CubitStatus thicken(DLIList<BodySM*>& bodies,
- DLIList<Surface*>& surfs_to_remove,
DLIList<BodySM*>& new_bodies,
double depth,
bool both = CUBIT_FALSE) const ;
+ virtual CubitStatus hollow( DLIList<BodySM*>& bodies,
+ DLIList<Surface*>& surfs_to_remove,
+ DLIList<BodySM*>& new_bodies,
+ double depth) const ;
+
virtual CubitStatus flip_normals( DLIList<Surface*>& face_list ) const;
virtual CubitStatus sweep_translational(
Modified: cgm/trunk/geom/facet/FacetModifyEngine.cpp
===================================================================
--- cgm/trunk/geom/facet/FacetModifyEngine.cpp 2008-06-25 17:34:56 UTC (rev 1926)
+++ cgm/trunk/geom/facet/FacetModifyEngine.cpp 2008-06-25 18:34:20 UTC (rev 1927)
@@ -1737,6 +1737,15 @@
}
+CubitStatus FacetModifyEngine::hollow( DLIList<BodySM*>& /*bodies*/,
+ DLIList<Surface*> & /*surfs*/,
+ DLIList<BodySM*>& /*new_bodies*/,
+ double /*depth*/) const
+{
+ PRINT_ERROR("Option not supported for mesh based geometry.\n");
+ return CUBIT_FAILURE;
+}
+
//===============================================================================
// Function : thicken
// Member Type: PUBLIC
@@ -1745,7 +1754,6 @@
// Date : 10/02
//===============================================================================
CubitStatus FacetModifyEngine::thicken(DLIList<BodySM*>& /*bodies*/,
- DLIList<Surface*> & /*surfs*/,
DLIList<BodySM*>& /*new_bodies*/,
double /*depth*/,
bool /*both*/) const
Modified: cgm/trunk/geom/facet/FacetModifyEngine.hpp
===================================================================
--- cgm/trunk/geom/facet/FacetModifyEngine.hpp 2008-06-25 17:34:56 UTC (rev 1926)
+++ cgm/trunk/geom/facet/FacetModifyEngine.hpp 2008-06-25 18:34:20 UTC (rev 1927)
@@ -216,11 +216,15 @@
bool keep_old = CUBIT_FALSE) const;
virtual CubitStatus thicken(DLIList<BodySM*>& bodies,
- DLIList<Surface*>& surfs_to_remove,
DLIList<BodySM*>& new_bodies,
double depth,
bool both = CUBIT_FALSE) const ;
+ virtual CubitStatus hollow(DLIList<BodySM*>& bodies,
+ DLIList<Surface*>& surfs_to_remove,
+ DLIList<BodySM*>& new_bodies,
+ double depth) const ;
+
virtual CubitStatus flip_normals( DLIList<Surface*>& face_list ) const;
virtual CubitStatus sweep_translational(
More information about the cgma-dev
mailing list