mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-09-03 14:10:33 +03:00
0028417: Using PRECOMPILED HEADER to speed up compilation time
Use of Cotire tool is introduced for acceleration of CMake builds, by usage of precompiled headers. CMake option BUILD_USE_PCH is added to enable / disable use of precompiled headers When precompiled headers are used, additional compiler macros are defined globally in the build system to avoid problems due to different order of included files: - NOMINMAX is defined on Windows to prevent defining "min" and "max" as macros by windows.h - STRSAFE_NO_DEPRECATE and _SCL_SECURE_NO_WARNINGS are defined on Windows to prevent declaring functions of standard C library as deprecated by #pragma, and other warnings in system headers - GL_GLEXT_LEGACY and GLX_GLEXT_LEGACY are defined to ensure that only OCCT's own glext.h is used - __STDC_FORMAT_MACROS is defined to have standard C print format macros always defined Code is corrected to avoid conflicts with system headers and in case of compiling together as unity builds (partially): - Some locally defined variables in TKV3d, TKHLR are renamed to be unique - Duplicated definitions of macros and global functions are eliminated in TKSTEP - Useless header WNT_UInt.hxx is removed - Usage of local variables conflicting with X11 macro is avoided in Draw_Viewer.cxx - Local variables in AIS_ConcentricRelation.cxx are renamed to avoid conflict with macros defined in windows.h - HXX files containing code are renamed to PXX or merged with corresponding CXX files. IVtkTools classes are corrected to avoid compiler warnings disabled in non-PCH builds by inclusion of VTK headers. Useless pragmas disabling warnings on MSVC are removed
This commit is contained in:
@@ -186,9 +186,9 @@ void AIS_ConcentricRelation::ComputeTwoEdgesConcentric(const Handle(Prs3d_Presen
|
||||
|
||||
// choose the radius equal to 1/5 of the smallest radius of
|
||||
// 2 circles. Limit is imposed ( 0.02 by chance)
|
||||
Standard_Real rad1 = gcirc1->Radius();
|
||||
Standard_Real rad2 = gcirc2->Radius();
|
||||
myRad = (rad1 > rad2 ) ? rad2 : rad1;
|
||||
Standard_Real aRad1 = gcirc1->Radius();
|
||||
Standard_Real aRad2 = gcirc2->Radius();
|
||||
myRad = (aRad1 > aRad2 ) ? aRad2 : aRad1;
|
||||
myRad /= 5;
|
||||
if (myRad > 15.) myRad =15.;
|
||||
|
||||
|
@@ -56,7 +56,7 @@ typedef NCollection_DataMap<Handle(AIS_InteractiveObject), NCollection_Handle<Se
|
||||
|
||||
namespace
|
||||
{
|
||||
TopoDS_Shape AIS_myDummyShape;
|
||||
TopoDS_Shape AIS_InteractiveContext_myDummyShape;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
@@ -1679,7 +1679,7 @@ const TopoDS_Shape& AIS_InteractiveContext::DetectedCurrentShape() const
|
||||
|
||||
if (aCurrentShape.IsNull())
|
||||
{
|
||||
return AIS_myDummyShape;
|
||||
return AIS_InteractiveContext_myDummyShape;
|
||||
}
|
||||
|
||||
return aCurrentShape->Shape();
|
||||
|
@@ -54,7 +54,7 @@
|
||||
|
||||
namespace
|
||||
{
|
||||
TopoDS_Shape AIS_myDummyShape;
|
||||
TopoDS_Shape AIS_LocalContext_myDummyShape;
|
||||
}
|
||||
|
||||
//==================================================
|
||||
@@ -1209,10 +1209,10 @@ AIS_LocalContext::DetectedShape() const
|
||||
if(mylastindex != 0)
|
||||
{
|
||||
Handle(StdSelect_BRepOwner) BROwnr = Handle(StdSelect_BRepOwner)::DownCast(myMapOfOwner->FindKey (mylastindex));
|
||||
if(BROwnr.IsNull()) return AIS_myDummyShape;
|
||||
if(BROwnr.IsNull()) return AIS_LocalContext_myDummyShape;
|
||||
return BROwnr->Shape();
|
||||
}
|
||||
return AIS_myDummyShape;
|
||||
return AIS_LocalContext_myDummyShape;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
@@ -1476,7 +1476,7 @@ const TopoDS_Shape& AIS_LocalContext::DetectedCurrentShape() const
|
||||
|
||||
if (aCurrentShape.IsNull())
|
||||
{
|
||||
return AIS_myDummyShape;
|
||||
return AIS_LocalContext_myDummyShape;
|
||||
}
|
||||
|
||||
return aCurrentShape->Shape();
|
||||
|
@@ -19,10 +19,6 @@
|
||||
#include <BOPDS_PassKey.hxx>
|
||||
|
||||
#include <stdio.h>
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning( disable : 4101)
|
||||
#endif
|
||||
|
||||
|
||||
//=======================================================================
|
||||
//function : Dump
|
||||
|
@@ -25,10 +25,6 @@
|
||||
#include <algorithm>
|
||||
IMPLEMENT_STANDARD_RTTIEXT(BOPDS_PaveBlock,MMgt_TShared)
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning ( disable : 4291 )
|
||||
#endif
|
||||
|
||||
//=======================================================================
|
||||
//function :
|
||||
//purpose :
|
||||
|
@@ -223,11 +223,6 @@ ostream* myOStream;
|
||||
|
||||
};
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning (default : 4275)
|
||||
#endif
|
||||
|
||||
|
||||
// other inline functions and methods (like "C++: function call" methods)
|
||||
//
|
||||
#endif
|
||||
|
@@ -30,11 +30,6 @@
|
||||
#include <OSD_Path.hxx>
|
||||
#include <TCollection_AsciiString.hxx>
|
||||
|
||||
// avoid warnings on 'extern "C"' functions returning C++ classes
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(4:4190)
|
||||
#endif
|
||||
|
||||
//=======================================================================
|
||||
//function : AllComands
|
||||
//purpose :
|
||||
|
@@ -926,14 +926,13 @@ Draw_Display Draw_Viewer::MakeDisplay (const Standard_Integer id) const
|
||||
if (Draw_Batch) {Draw_Display dis;return dis;}
|
||||
curviewId = id;
|
||||
curview = myViews[id];
|
||||
int GXcopy = 0x3;
|
||||
nbseg = 0;
|
||||
Draw_Color initcol(Draw_blanc);
|
||||
// to force setting the color
|
||||
currentcolor = Draw_Color(Draw_rouge);
|
||||
Draw_Display dis;
|
||||
dis.SetColor(initcol);
|
||||
dis.SetMode(GXcopy);
|
||||
dis.SetMode(0x3 /*GXcopy*/);
|
||||
return dis;
|
||||
}
|
||||
|
||||
|
@@ -31,7 +31,6 @@
|
||||
|
||||
IMPLEMENT_STANDARD_RTTIEXT(Geom_Ellipse,Geom_Conic)
|
||||
|
||||
typedef Geom_Ellipse Ellipse;
|
||||
typedef gp_Ax1 Ax1;
|
||||
typedef gp_Ax2 Ax2;
|
||||
typedef gp_Pnt Pnt;
|
||||
@@ -47,7 +46,7 @@ typedef gp_XYZ XYZ;
|
||||
Handle(Geom_Geometry) Geom_Ellipse::Copy() const
|
||||
{
|
||||
Handle(Geom_Ellipse) E;
|
||||
E = new Ellipse (pos, majorRadius, minorRadius);
|
||||
E = new Geom_Ellipse(pos, majorRadius, minorRadius);
|
||||
return E;
|
||||
}
|
||||
|
||||
|
@@ -22,7 +22,7 @@
|
||||
|
||||
IMPLEMENT_STANDARD_RTTIEXT(Graphic3d_Texture1D,Graphic3d_TextureMap)
|
||||
|
||||
static const char *NameOfTexture_to_FileName[] =
|
||||
static const char *NameOfTexture1d_to_FileName[] =
|
||||
{
|
||||
"1d_elevation.rgb"
|
||||
};
|
||||
@@ -44,12 +44,12 @@ Graphic3d_Texture1D::Graphic3d_Texture1D (const TCollection_AsciiString& theFile
|
||||
// =======================================================================
|
||||
Graphic3d_Texture1D::Graphic3d_Texture1D (const Graphic3d_NameOfTexture1D theNOT,
|
||||
const Graphic3d_TypeOfTexture theType)
|
||||
: Graphic3d_TextureMap (NameOfTexture_to_FileName[theNOT], theType),
|
||||
: Graphic3d_TextureMap (NameOfTexture1d_to_FileName[theNOT], theType),
|
||||
myName (theNOT)
|
||||
{
|
||||
myPath.SetTrek (Graphic3d_TextureRoot::TexturesFolder());
|
||||
myTexId = TCollection_AsciiString ("Graphic3d_Texture1D_")
|
||||
+ NameOfTexture_to_FileName[theNOT];
|
||||
+ NameOfTexture1d_to_FileName[theNOT];
|
||||
}
|
||||
|
||||
// =======================================================================
|
||||
@@ -78,7 +78,7 @@ Graphic3d_NameOfTexture1D Graphic3d_Texture1D::Name() const
|
||||
// =======================================================================
|
||||
Standard_Integer Graphic3d_Texture1D::NumberOfTextures()
|
||||
{
|
||||
return sizeof(NameOfTexture_to_FileName)/sizeof(char*);
|
||||
return sizeof(NameOfTexture1d_to_FileName)/sizeof(char*);
|
||||
}
|
||||
|
||||
// =======================================================================
|
||||
@@ -92,7 +92,7 @@ TCollection_AsciiString Graphic3d_Texture1D::TextureName (const Standard_Integer
|
||||
throw Standard_OutOfRange("BAD index of texture");
|
||||
}
|
||||
|
||||
TCollection_AsciiString aFileName (NameOfTexture_to_FileName[theRank - 1]);
|
||||
TCollection_AsciiString aFileName (NameOfTexture1d_to_FileName[theRank - 1]);
|
||||
Standard_Integer i = aFileName.SearchFromEnd (".");
|
||||
return aFileName.SubString (4, i - 1);
|
||||
}
|
||||
|
@@ -20,7 +20,7 @@
|
||||
|
||||
IMPLEMENT_STANDARD_RTTIEXT(Graphic3d_Texture2D,Graphic3d_TextureMap)
|
||||
|
||||
static const char *NameOfTexture_to_FileName[] =
|
||||
static const char *NameOfTexture2d_to_FileName[] =
|
||||
{
|
||||
"2d_MatraDatavision.rgb",
|
||||
"2d_alienskin.rgb",
|
||||
@@ -63,12 +63,12 @@ Graphic3d_Texture2D::Graphic3d_Texture2D (const TCollection_AsciiString& theFile
|
||||
// =======================================================================
|
||||
Graphic3d_Texture2D::Graphic3d_Texture2D (const Graphic3d_NameOfTexture2D theNOT,
|
||||
const Graphic3d_TypeOfTexture theType)
|
||||
: Graphic3d_TextureMap (NameOfTexture_to_FileName[theNOT], theType),
|
||||
: Graphic3d_TextureMap (NameOfTexture2d_to_FileName[theNOT], theType),
|
||||
myName (theNOT)
|
||||
{
|
||||
myPath.SetTrek (Graphic3d_TextureRoot::TexturesFolder());
|
||||
myTexId = TCollection_AsciiString ("Graphic3d_Texture2D_")
|
||||
+ NameOfTexture_to_FileName[theNOT];
|
||||
+ NameOfTexture2d_to_FileName[theNOT];
|
||||
}
|
||||
|
||||
// =======================================================================
|
||||
@@ -88,7 +88,7 @@ Graphic3d_Texture2D::Graphic3d_Texture2D (const Handle(Image_PixMap)& thePixM
|
||||
// =======================================================================
|
||||
Standard_Integer Graphic3d_Texture2D::NumberOfTextures()
|
||||
{
|
||||
return sizeof(NameOfTexture_to_FileName)/sizeof(char*);
|
||||
return sizeof(NameOfTexture2d_to_FileName)/sizeof(char*);
|
||||
}
|
||||
|
||||
// =======================================================================
|
||||
@@ -111,7 +111,7 @@ TCollection_AsciiString Graphic3d_Texture2D::TextureName (const Standard_Integer
|
||||
throw Standard_OutOfRange("BAD index of texture");
|
||||
}
|
||||
|
||||
TCollection_AsciiString aFileName (NameOfTexture_to_FileName[theRank - 1]);
|
||||
TCollection_AsciiString aFileName (NameOfTexture2d_to_FileName[theRank - 1]);
|
||||
Standard_Integer i = aFileName.SearchFromEnd (".");
|
||||
return aFileName.SubString (4, i - 1);
|
||||
}
|
||||
|
@@ -25,7 +25,7 @@
|
||||
|
||||
IMPLEMENT_STANDARD_RTTIEXT(Graphic3d_TextureEnv,Graphic3d_TextureRoot)
|
||||
|
||||
static const char *NameOfTexture_to_FileName[] =
|
||||
static const char *NameOfTextureEnv_to_FileName[] =
|
||||
{
|
||||
"env_clouds.rgb",
|
||||
"env_cv.rgb",
|
||||
@@ -56,12 +56,12 @@ Graphic3d_TextureEnv::Graphic3d_TextureEnv (const TCollection_AsciiString& theFi
|
||||
// purpose :
|
||||
// =======================================================================
|
||||
Graphic3d_TextureEnv::Graphic3d_TextureEnv (const Graphic3d_NameOfTextureEnv theNOT)
|
||||
: Graphic3d_TextureRoot (NameOfTexture_to_FileName[theNOT], Graphic3d_TOT_2D_MIPMAP),
|
||||
: Graphic3d_TextureRoot (NameOfTextureEnv_to_FileName[theNOT], Graphic3d_TOT_2D_MIPMAP),
|
||||
myName (theNOT)
|
||||
{
|
||||
myPath.SetTrek (Graphic3d_TextureRoot::TexturesFolder());
|
||||
myTexId = TCollection_AsciiString ("Graphic3d_TextureEnv_")
|
||||
+ NameOfTexture_to_FileName[theNOT];
|
||||
+ NameOfTextureEnv_to_FileName[theNOT];
|
||||
|
||||
myParams->SetFilter (Graphic3d_TOTF_TRILINEAR);
|
||||
myParams->SetGenMode (Graphic3d_TOTM_SPHERE,
|
||||
@@ -98,7 +98,7 @@ Graphic3d_NameOfTextureEnv Graphic3d_TextureEnv::Name() const
|
||||
// =======================================================================
|
||||
Standard_Integer Graphic3d_TextureEnv::NumberOfTextures()
|
||||
{
|
||||
return sizeof(NameOfTexture_to_FileName)/sizeof(char*);
|
||||
return sizeof(NameOfTextureEnv_to_FileName)/sizeof(char*);
|
||||
}
|
||||
|
||||
// =======================================================================
|
||||
@@ -112,7 +112,7 @@ TCollection_AsciiString Graphic3d_TextureEnv::TextureName (const Standard_Intege
|
||||
throw Standard_OutOfRange("BAD index of texture");
|
||||
}
|
||||
|
||||
TCollection_AsciiString aFileName (NameOfTexture_to_FileName[theRank - 1]);
|
||||
TCollection_AsciiString aFileName (NameOfTextureEnv_to_FileName[theRank - 1]);
|
||||
Standard_Integer i = aFileName.SearchFromEnd(".");
|
||||
return aFileName.SubString (5, i - 1);
|
||||
}
|
||||
|
@@ -24,7 +24,7 @@
|
||||
IMPLEMENT_STANDARD_RTTIEXT(HLRAlgo_PolyData,MMgt_TShared)
|
||||
|
||||
#ifdef OCCT_DEBUG
|
||||
static Standard_Integer ERROR = Standard_False;
|
||||
static Standard_Integer HLRAlgo_PolyData_ERROR = Standard_False;
|
||||
#endif
|
||||
//=======================================================================
|
||||
//function : PolyData
|
||||
@@ -381,7 +381,7 @@ void HLRAlgo_PolyData::hideByOneTriangle (const HLRAlgo_BiPoint::PointsT& thePoi
|
||||
m[npi] = Multiple;
|
||||
}
|
||||
#ifdef OCCT_DEBUG
|
||||
else if (ERROR) {
|
||||
else if (HLRAlgo_PolyData_ERROR) {
|
||||
cout << " error : HLRAlgo_PolyData::HideByOneTriangle " << endl;
|
||||
cout << " ( more than 2 points )." << endl;
|
||||
}
|
||||
@@ -523,7 +523,7 @@ void HLRAlgo_PolyData::hideByOneTriangle (const HLRAlgo_BiPoint::PointsT& thePoi
|
||||
m[npi] = Multiple;
|
||||
}
|
||||
#ifdef OCCT_DEBUG
|
||||
else if (ERROR) {
|
||||
else if (HLRAlgo_PolyData_ERROR) {
|
||||
cout << " error : HLRAlgo_PolyData::HideByOneTriangle " << endl;
|
||||
cout << " ( more than 2 points )." << endl;
|
||||
}
|
||||
@@ -665,7 +665,7 @@ void HLRAlgo_PolyData::hideByOneTriangle (const HLRAlgo_BiPoint::PointsT& thePoi
|
||||
m[npi] = Multiple;
|
||||
}
|
||||
#ifdef OCCT_DEBUG
|
||||
else if (ERROR) {
|
||||
else if (HLRAlgo_PolyData_ERROR) {
|
||||
cout << " error : HLRAlgo_PolyData::HideByOneTriangle " << endl;
|
||||
cout << " ( more than 2 points )." << endl;
|
||||
}
|
||||
|
@@ -23,8 +23,8 @@
|
||||
IMPLEMENT_STANDARD_RTTIEXT(HLRAlgo_PolyInternalData,MMgt_TShared)
|
||||
|
||||
#ifdef OCCT_DEBUG
|
||||
static Standard_Integer TRACE = Standard_False;
|
||||
static Standard_Integer ERROR = Standard_False;
|
||||
static Standard_Integer HLRAlgo_PolyInternalData_TRACE = Standard_False;
|
||||
static Standard_Integer HLRAlgo_PolyInternalData_ERROR = Standard_False;
|
||||
#endif
|
||||
//=======================================================================
|
||||
//function : PolyInternalData
|
||||
@@ -325,7 +325,7 @@ HLRAlgo_PolyInternalData::AddNode (
|
||||
else {
|
||||
Nod3RValues.Normal = gp_XYZ(1., 0., 0.);
|
||||
#ifdef OCCT_DEBUG
|
||||
if (ERROR)
|
||||
if (HLRAlgo_PolyInternalData_ERROR)
|
||||
cout << "HLRAlgo_PolyInternalData::AddNode" << endl;
|
||||
#endif
|
||||
}
|
||||
@@ -414,7 +414,7 @@ HLRAlgo_PolyInternalData::UpdateLinks (const Standard_Integer ip1,
|
||||
if (find == 0) {
|
||||
myNbPISeg--;
|
||||
#ifdef OCCT_DEBUG
|
||||
if (ERROR) {
|
||||
if (HLRAlgo_PolyInternalData_ERROR) {
|
||||
cout << "HLRAlgo_PolyInternalData::UpdateLinks : segment error";
|
||||
cout << endl;
|
||||
}
|
||||
@@ -519,7 +519,7 @@ HLRAlgo_PolyInternalData::UpdateLinks (const Standard_Integer ip1,
|
||||
aNodIndices4.NdSg = myNbPISeg;
|
||||
}
|
||||
#ifdef OCCT_DEBUG
|
||||
else if (ERROR) {
|
||||
else if (HLRAlgo_PolyInternalData_ERROR) {
|
||||
cout << "HLRAlgo_PolyInternalData::UpdateLinks : triangle error ";
|
||||
cout << endl;
|
||||
}
|
||||
@@ -680,7 +680,7 @@ void HLRAlgo_PolyInternalData::IncTData(
|
||||
{
|
||||
if (myNbTData >= myMxTData) {
|
||||
#ifdef OCCT_DEBUG
|
||||
if (TRACE)
|
||||
if (HLRAlgo_PolyInternalData_TRACE)
|
||||
cout << "HLRAlgo_PolyInternalData::IncTData : " << myMxTData << endl;
|
||||
#endif
|
||||
Standard_Integer i,j,k;
|
||||
@@ -719,7 +719,7 @@ void HLRAlgo_PolyInternalData::IncPISeg(
|
||||
{
|
||||
if (myNbPISeg >= myMxPISeg) {
|
||||
#ifdef OCCT_DEBUG
|
||||
if (TRACE)
|
||||
if (HLRAlgo_PolyInternalData_TRACE)
|
||||
cout << "HLRAlgo_PolyInternalData::IncPISeg : " << myMxPISeg << endl;
|
||||
#endif
|
||||
Standard_Integer i,j,k;
|
||||
@@ -757,7 +757,7 @@ void HLRAlgo_PolyInternalData::IncPINod(
|
||||
{
|
||||
if (myNbPINod >= myMxPINod) {
|
||||
#ifdef OCCT_DEBUG
|
||||
if (TRACE)
|
||||
if (HLRAlgo_PolyInternalData_TRACE)
|
||||
cout << "HLRAlgo_PolyInternalData::IncPINod : " << myMxPINod << endl;
|
||||
#endif
|
||||
Standard_Integer i,j,k;
|
||||
|
@@ -41,8 +41,8 @@ extern Standard_Integer nbCal1Intersection; // pairs of unrejected edges
|
||||
extern Standard_Integer nbCal2Intersection; // true intersections (not vertex)
|
||||
extern Standard_Integer nbCal3Intersection; // curve-surface intersections
|
||||
|
||||
static Standard_Integer TRACE = Standard_True;
|
||||
static Standard_Integer TRACE10 = Standard_True;
|
||||
static Standard_Integer HLRBRep_InternalAlgo_TRACE = Standard_True;
|
||||
static Standard_Integer HLRBRep_InternalAlgo_TRACE10 = Standard_True;
|
||||
|
||||
//=======================================================================
|
||||
//function : HLRBRep_InternalAlgo
|
||||
@@ -744,7 +744,7 @@ void HLRBRep_InternalAlgo::HideSelected (const Standard_Integer I,
|
||||
HLRBRep_FaceData& fd = aFDataArray.ChangeValue(f);
|
||||
if (fd.Selected()) {
|
||||
if (fd.Side()) {
|
||||
if(TRACE10) {
|
||||
if(HLRBRep_InternalAlgo_TRACE10) {
|
||||
if(++QWE>QWEQWE) {
|
||||
QWE=0;
|
||||
if (myDebug)
|
||||
@@ -752,7 +752,7 @@ void HLRBRep_InternalAlgo::HideSelected (const Standard_Integer I,
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (myDebug && TRACE) {
|
||||
if (myDebug && HLRBRep_InternalAlgo_TRACE) {
|
||||
j++;
|
||||
cout << " OwnHiding " << j << " of face : " << f << endl;
|
||||
}
|
||||
@@ -864,14 +864,14 @@ void HLRBRep_InternalAlgo::HideSelected (const Standard_Integer I,
|
||||
HLRBRep_FaceData& fd = aFDataArray.ChangeValue(fi);
|
||||
if (fd.Selected()) {
|
||||
if (fd.Hiding()) {
|
||||
if(TRACE10 && TRACE==Standard_False) {
|
||||
if(HLRBRep_InternalAlgo_TRACE10 && HLRBRep_InternalAlgo_TRACE==Standard_False) {
|
||||
if(++QWE>QWEQWE) {
|
||||
if (myDebug)
|
||||
cout<<".";
|
||||
QWE=0;
|
||||
}
|
||||
}
|
||||
else if (myDebug && TRACE) {
|
||||
else if (myDebug && HLRBRep_InternalAlgo_TRACE) {
|
||||
static int rty=0;
|
||||
j++;
|
||||
printf("%6d",fi); fflush(stdout);
|
||||
|
@@ -26,6 +26,10 @@
|
||||
class Standard_Transient;
|
||||
class Interface_InterfaceModel;
|
||||
|
||||
// Avoid possible conflict with SetForm macro defined by windows.h
|
||||
#ifdef SetForm
|
||||
#undef SetForm
|
||||
#endif
|
||||
|
||||
class IGESSelect_IGESTypeForm;
|
||||
DEFINE_STANDARD_HANDLE(IGESSelect_IGESTypeForm, IFSelect_Signature)
|
||||
|
@@ -204,12 +204,6 @@ static Handle(PipelinePtr) PipelineByActorName (const TCollection_AsciiString& t
|
||||
return PipelineByActor (anActor);
|
||||
}
|
||||
|
||||
static Standard_Boolean IsEqual (const TopoDS_Shape& theLeft,
|
||||
const TopoDS_Shape& theRight)
|
||||
{
|
||||
return theLeft.IsEqual (theRight);
|
||||
}
|
||||
|
||||
#ifdef _WIN32
|
||||
|
||||
static Handle(WNT_Window)& GetWindow()
|
||||
@@ -373,7 +367,7 @@ void IVtkDraw::ViewerInit (Standard_Integer thePxLeft,
|
||||
|
||||
// Init picker
|
||||
GetPicker() = vtkSmartPointer<IVtkTools_ShapePicker>::New();
|
||||
GetPicker()->SetTolerance (0.025);
|
||||
GetPicker()->SetTolerance (0.025f);
|
||||
GetPicker()->SetRenderer (GetRenderer());
|
||||
|
||||
GetInteractor()->SetShapePicker (GetPicker());
|
||||
|
@@ -653,34 +653,34 @@ LRESULT CALLBACK ViewerWindowProc (HWND theHWnd,
|
||||
theInteractor->Render();
|
||||
break;
|
||||
case WM_SIZE:
|
||||
theInteractor->OnSize (theHWnd, theWParam, LOWORD(theLParam), HIWORD(theLParam));
|
||||
theInteractor->OnSize (theHWnd, (UINT)theWParam, LOWORD(theLParam), HIWORD(theLParam));
|
||||
break;
|
||||
case WM_LBUTTONDBLCLK:
|
||||
theInteractor->OnLButtonDown (theHWnd, theWParam, MAKEPOINTS(theLParam).x, MAKEPOINTS(theLParam).y, 1);
|
||||
theInteractor->OnLButtonDown (theHWnd, (UINT)theWParam, MAKEPOINTS(theLParam).x, MAKEPOINTS(theLParam).y, 1);
|
||||
break;
|
||||
case WM_LBUTTONDOWN:
|
||||
theInteractor->OnLButtonDown (theHWnd, theWParam, MAKEPOINTS(theLParam).x, MAKEPOINTS(theLParam).y, 0);
|
||||
theInteractor->OnLButtonDown (theHWnd, (UINT)theWParam, MAKEPOINTS(theLParam).x, MAKEPOINTS(theLParam).y, 0);
|
||||
break;
|
||||
case WM_LBUTTONUP:
|
||||
theInteractor->OnLButtonUp (theHWnd, theWParam, MAKEPOINTS(theLParam).x, MAKEPOINTS(theLParam).y);
|
||||
theInteractor->OnLButtonUp (theHWnd, (UINT)theWParam, MAKEPOINTS(theLParam).x, MAKEPOINTS(theLParam).y);
|
||||
break;
|
||||
case WM_MBUTTONDBLCLK:
|
||||
theInteractor->OnMButtonDown (theHWnd, theWParam, MAKEPOINTS(theLParam).x, MAKEPOINTS(theLParam).y, 1);
|
||||
theInteractor->OnMButtonDown (theHWnd, (UINT)theWParam, MAKEPOINTS(theLParam).x, MAKEPOINTS(theLParam).y, 1);
|
||||
break;
|
||||
case WM_MBUTTONDOWN:
|
||||
theInteractor->OnMButtonDown (theHWnd, theWParam, MAKEPOINTS(theLParam).x, MAKEPOINTS(theLParam).y, 0);
|
||||
theInteractor->OnMButtonDown (theHWnd, (UINT)theWParam, MAKEPOINTS(theLParam).x, MAKEPOINTS(theLParam).y, 0);
|
||||
break;
|
||||
case WM_MBUTTONUP:
|
||||
theInteractor->OnMButtonUp (theHWnd, theWParam, MAKEPOINTS(theLParam).x, MAKEPOINTS(theLParam).y);
|
||||
theInteractor->OnMButtonUp (theHWnd, (UINT)theWParam, MAKEPOINTS(theLParam).x, MAKEPOINTS(theLParam).y);
|
||||
break;
|
||||
case WM_RBUTTONDBLCLK:
|
||||
theInteractor->OnRButtonDown (theHWnd, theWParam, MAKEPOINTS(theLParam).x, MAKEPOINTS(theLParam).y, 1);
|
||||
theInteractor->OnRButtonDown (theHWnd, (UINT)theWParam, MAKEPOINTS(theLParam).x, MAKEPOINTS(theLParam).y, 1);
|
||||
break;
|
||||
case WM_RBUTTONDOWN:
|
||||
theInteractor->OnRButtonDown (theHWnd, theWParam, MAKEPOINTS(theLParam).x, MAKEPOINTS(theLParam).y, 0);
|
||||
theInteractor->OnRButtonDown (theHWnd, (UINT)theWParam, MAKEPOINTS(theLParam).x, MAKEPOINTS(theLParam).y, 0);
|
||||
break;
|
||||
case WM_RBUTTONUP:
|
||||
theInteractor->OnRButtonUp (theHWnd, theWParam, MAKEPOINTS(theLParam).x, MAKEPOINTS(theLParam).y);
|
||||
theInteractor->OnRButtonUp (theHWnd, (UINT)theWParam, MAKEPOINTS(theLParam).x, MAKEPOINTS(theLParam).y);
|
||||
break;
|
||||
case WM_MOUSELEAVE:
|
||||
{
|
||||
@@ -689,7 +689,7 @@ LRESULT CALLBACK ViewerWindowProc (HWND theHWnd,
|
||||
}
|
||||
break;
|
||||
case WM_MOUSEMOVE:
|
||||
theInteractor->OnMouseMove (theHWnd, theWParam, MAKEPOINTS(theLParam).x, MAKEPOINTS(theLParam).y);
|
||||
theInteractor->OnMouseMove (theHWnd, (UINT)theWParam, MAKEPOINTS(theLParam).x, MAKEPOINTS(theLParam).y);
|
||||
break;
|
||||
case WM_MOUSEWHEEL:
|
||||
{
|
||||
@@ -699,16 +699,16 @@ LRESULT CALLBACK ViewerWindowProc (HWND theHWnd,
|
||||
::ScreenToClient(theHWnd, &pt);
|
||||
if( GET_WHEEL_DELTA_WPARAM(theWParam) > 0)
|
||||
{
|
||||
theInteractor->OnMouseWheelForward (theHWnd, theWParam, pt.x, pt.y);
|
||||
theInteractor->OnMouseWheelForward (theHWnd, (UINT)theWParam, pt.x, pt.y);
|
||||
}
|
||||
else
|
||||
{
|
||||
theInteractor->OnMouseWheelBackward (theHWnd, theWParam, pt.x, pt.y);
|
||||
theInteractor->OnMouseWheelBackward (theHWnd, (UINT)theWParam, pt.x, pt.y);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case WM_TIMER:
|
||||
theInteractor->OnTimer (theHWnd, theWParam);
|
||||
theInteractor->OnTimer (theHWnd, (UINT)theWParam);
|
||||
break;
|
||||
}
|
||||
return DefWindowProc(theHWnd, theMsg, theWParam, theLParam);
|
||||
|
@@ -20,6 +20,11 @@
|
||||
#include <IVtkTools_SubPolyDataFilter.hxx>
|
||||
#include <NCollection_DataMap.hxx>
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable: 4251) // avoid warning C4251: "class needs to have dll-interface..."
|
||||
#endif
|
||||
|
||||
//! @class IVtkTools_DisplayModeFilter
|
||||
//! @brief Cells filter according to the selected display mode by mesh parts types.
|
||||
//! This filter is used to get parts of a shape according to different
|
||||
@@ -55,5 +60,9 @@ protected:
|
||||
bool myDoDisplaySharedVertices;
|
||||
};
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
|
||||
#endif // IVtkTOOLS_DISPLAYMODEFILTER_H
|
||||
|
||||
|
@@ -24,6 +24,11 @@
|
||||
class vtkIdTypeArray;
|
||||
class vtkPolyData;
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable: 4251) // avoid warning C4251: "class needs to have dll-interface..."
|
||||
#endif
|
||||
|
||||
//! @class IVtkTools_ShapeDataSource.
|
||||
//! @brief VTK data source for OCC shapes polygonal data.
|
||||
class IVtkTools_EXPORT IVtkTools_ShapeDataSource : public vtkPolyDataAlgorithm
|
||||
@@ -113,4 +118,8 @@ protected:
|
||||
|
||||
};
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
|
||||
#endif // __IVTKTOOLS_SHAPEDATA_H__
|
||||
|
@@ -27,6 +27,11 @@ class vtkDataSet;
|
||||
class vtkInformationObjectBaseKey;
|
||||
class IVtkTools_ShapeDataSource;
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable: 4251) // avoid warning C4251: "class needs to have dll-interface..."
|
||||
#endif
|
||||
|
||||
//! @class IVtkTools_ShapeObject
|
||||
//! @brief VTK holder class for OCC shapes to pass them through pipelines.
|
||||
//!
|
||||
@@ -82,4 +87,8 @@ private: // OCC
|
||||
static KeyPtr myKey;
|
||||
};
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
|
||||
#endif // __IVTKTOOLS_SHAPEOBJECT_H__
|
||||
|
@@ -25,6 +25,11 @@
|
||||
class vtkRenderer;
|
||||
class vtkActorCollection;
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable: 4251) // avoid warning C4251: "class needs to have dll-interface..."
|
||||
#endif
|
||||
|
||||
//! @class IVtkTools_ShapePicker
|
||||
//! @brief VTK picker for OCC shapes with OCC selection algorithm.
|
||||
class IVtkTools_EXPORT IVtkTools_ShapePicker : public vtkAbstractPropPicker
|
||||
@@ -158,4 +163,8 @@ private:
|
||||
float myTolerance; //!< Selectoin tolerance
|
||||
};
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
|
||||
#endif // __IVTKTOOLS_SHAPEPICKER_H__
|
||||
|
@@ -64,7 +64,7 @@ int IVtkTools_SubPolyDataFilter::RequestData (vtkInformation *vtkNotUsed(theRequ
|
||||
if (myDoFiltering)
|
||||
{
|
||||
vtkSmartPointer<vtkCellData> aCellData = anInput->GetCellData();
|
||||
int aSize = 0;
|
||||
vtkIdType aSize = 0;
|
||||
vtkSmartPointer<vtkIdTypeArray> aDataArray =
|
||||
vtkIdTypeArray::SafeDownCast (aCellData->GetArray (myIdsArrayName));
|
||||
|
||||
|
@@ -20,6 +20,11 @@
|
||||
|
||||
#include "vtkPolyDataAlgorithm.h"
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable: 4251) // avoid warning C4251: "class needs to have dll-interface..."
|
||||
#endif
|
||||
|
||||
//! @class IVtkTools_SubPolyDataFilter
|
||||
//! @brief Cells filter according to the given set of cells ids.
|
||||
class IVtkTools_EXPORT IVtkTools_SubPolyDataFilter : public vtkPolyDataAlgorithm
|
||||
@@ -65,4 +70,8 @@ protected:
|
||||
bool myDoFiltering;
|
||||
};
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
|
||||
#endif // IVtkTOOLS_SUBPOLYDATAFILTER_H
|
||||
|
@@ -377,7 +377,3 @@ namespace {
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning ( default : 4101 )
|
||||
#endif
|
||||
|
@@ -960,7 +960,3 @@ Standard_Integer AdaptiveDiscret (const Standard_Integer iDiscret,
|
||||
}
|
||||
return iDiscretNew;
|
||||
}
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning ( default : 4101 )
|
||||
#endif
|
||||
|
@@ -15,8 +15,8 @@
|
||||
#include <Message_ProgressScale.hxx>
|
||||
#include <TCollection_HAsciiString.hxx>
|
||||
|
||||
static const Standard_Real ZERO = 1e-10;
|
||||
static const Standard_Real INFINITE = 1e100;
|
||||
static const Standard_Real Message_ProgressScale_ZERO = 1e-10;
|
||||
static const Standard_Real Message_ProgressScale_INFINITE = 1e100;
|
||||
|
||||
//=======================================================================
|
||||
//function : Message_ProgressScale
|
||||
@@ -37,7 +37,7 @@ Message_ProgressScale::Message_ProgressScale () :
|
||||
Standard_Real Message_ProgressScale::LocalToBase (const Standard_Real val) const
|
||||
{
|
||||
if ( val <= myMin ) return myFirst;
|
||||
if ( myMax - myMin <= ZERO ) return myLast;
|
||||
if ( myMax - myMin <= Message_ProgressScale_ZERO ) return myLast;
|
||||
|
||||
if ( ! myInfinite ) {
|
||||
if ( val >= myMax ) return myLast;
|
||||
@@ -55,8 +55,8 @@ Standard_Real Message_ProgressScale::LocalToBase (const Standard_Real val) const
|
||||
|
||||
Standard_Real Message_ProgressScale::BaseToLocal (const Standard_Real val) const
|
||||
{
|
||||
if ( myLast - val <= ZERO )
|
||||
return myInfinite ? INFINITE : myMax;
|
||||
if ( myLast - val <= Message_ProgressScale_ZERO )
|
||||
return myInfinite ? Message_ProgressScale_INFINITE : myMax;
|
||||
if ( ! myInfinite )
|
||||
return myMin + ( myMax - myMin ) * ( val - myFirst ) / ( myLast - myFirst );
|
||||
// Standard_Real x = log ( ( val - myFirst ) / ( myLast - val ) ); // exponent
|
||||
|
@@ -111,7 +111,6 @@ void OSD_Chronometer::GetThreadCPU (Standard_Real& theUserSeconds,
|
||||
|
||||
//---------------------------- Systeme WNT --------------------------------
|
||||
|
||||
#define STRICT
|
||||
#include <windows.h>
|
||||
|
||||
//=======================================================================
|
||||
|
@@ -185,7 +185,6 @@ Standard_Integer OSD_DirectoryIterator::Error()const{
|
||||
//------------------------------------------------------------------------
|
||||
|
||||
|
||||
#define STRICT
|
||||
#include <windows.h>
|
||||
|
||||
|
||||
|
@@ -155,9 +155,6 @@ Standard_Integer OSD_Disk::Error()const{
|
||||
//---------------------------- Windows NT System --------------------------------
|
||||
//-------------------------------------------------------------------------------
|
||||
|
||||
#define STRICT
|
||||
|
||||
|
||||
#include <OSD_Disk.hxx>
|
||||
#include <OSD_OSDError.hxx>
|
||||
#include <OSD_Path.hxx>
|
||||
|
@@ -232,7 +232,6 @@ Standard_Integer OSD_Environment::Error() const
|
||||
//------------------- WNT Sources of OSD_Environment --------------------
|
||||
//------------------------------------------------------------------------
|
||||
|
||||
#define STRICT
|
||||
#include <windows.h>
|
||||
|
||||
#include <OSD_Environment.hxx>
|
||||
|
@@ -443,7 +443,6 @@ void OSD_Error::Perror() {
|
||||
//------------------- Windows NT sources for OSD_Error ------------------
|
||||
//------------------------------------------------------------------------
|
||||
|
||||
#define STRICT
|
||||
#include <OSD_Error.hxx>
|
||||
#include <OSD_ErrorList.hxx>
|
||||
#include <TCollection_ExtendedString.hxx>
|
||||
|
@@ -263,7 +263,6 @@ Standard_Integer OSD_FileIterator::Error()const{
|
||||
//------------------- Windows NT sources for OSD_FileIterator -----------
|
||||
//------------------------------------------------------------------------
|
||||
|
||||
#define STRICT
|
||||
#include <windows.h>
|
||||
|
||||
|
||||
|
@@ -362,7 +362,6 @@ Standard_Integer OSD_FileNode::Error()const{
|
||||
//------------------- WNT Sources of OSD_FileNode ---------------------------
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
#define STRICT
|
||||
#ifdef NONLS
|
||||
#undef NONLS
|
||||
#endif
|
||||
|
@@ -181,7 +181,6 @@ Standard_Integer OSD_Host::Error()const{
|
||||
//------------------- WNT Sources of OSD_Host ---------------------------
|
||||
//------------------------------------------------------------------------
|
||||
|
||||
#define STRICT
|
||||
#include <windows.h>
|
||||
|
||||
#include <OSD_Host.hxx>
|
||||
|
@@ -44,7 +44,6 @@ static inline Standard_Real GetWallClockTime ()
|
||||
#else
|
||||
//------------------- Windows NT ------------------
|
||||
|
||||
#define STRICT
|
||||
#include <windows.h>
|
||||
|
||||
//=======================================================================
|
||||
|
@@ -20,7 +20,6 @@
|
||||
#ifdef _WIN32
|
||||
//---------------------------- Windows NT System --------------------------------
|
||||
|
||||
#define STRICT
|
||||
#ifdef NOUSER
|
||||
#undef NOUSER
|
||||
#endif
|
||||
@@ -615,7 +614,8 @@ LONG _osd_debug ( void ) {
|
||||
#include <pthread.h>
|
||||
|
||||
#ifdef __linux__
|
||||
#include <fenv.h>
|
||||
#include <cfenv>
|
||||
//#include <fenv.h>
|
||||
static Standard_Boolean fFltExceptions = Standard_False;
|
||||
#endif
|
||||
|
||||
|
@@ -15,7 +15,9 @@
|
||||
|
||||
#if defined(__APPLE__) && !defined(MACOSX_USE_GLX)
|
||||
|
||||
#ifndef GL_GLEXT_LEGACY
|
||||
#define GL_GLEXT_LEGACY // To prevent inclusion of system glext.h on Mac OS X 10.6.8
|
||||
#endif
|
||||
|
||||
#import <TargetConditionals.h>
|
||||
|
||||
|
@@ -15,7 +15,9 @@
|
||||
|
||||
#if defined(__APPLE__) && !defined(MACOSX_USE_GLX)
|
||||
|
||||
#ifndef GL_GLEXT_LEGACY
|
||||
#define GL_GLEXT_LEGACY // To prevent inclusion of system glext.h on Mac OS X 10.6.8
|
||||
#endif
|
||||
|
||||
#import <TargetConditionals.h>
|
||||
|
||||
|
@@ -11,4 +11,4 @@ PLib_HermitJacobi.lxx
|
||||
PLib_JacobiPolynomial.cxx
|
||||
PLib_JacobiPolynomial.hxx
|
||||
PLib_JacobiPolynomial.lxx
|
||||
PLib_JacobiPolynomial_0.hxx
|
||||
PLib_JacobiPolynomial_Data.pxx
|
||||
|
@@ -17,13 +17,14 @@
|
||||
#include <math_Vector.hxx>
|
||||
#include <PLib.hxx>
|
||||
#include <PLib_JacobiPolynomial.hxx>
|
||||
#include <PLib_JacobiPolynomial_0.hxx>
|
||||
#include <Standard_ConstructionError.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
#include <TColStd_Array2OfReal.hxx>
|
||||
|
||||
IMPLEMENT_STANDARD_RTTIEXT(PLib_JacobiPolynomial,PLib_Base)
|
||||
|
||||
#include "PLib_JacobiPolynomial_Data.pxx"
|
||||
|
||||
// The possible values for NbGaussPoints
|
||||
const Standard_Integer NDEG8=8, NDEG10=10, NDEG15=15, NDEG20=20, NDEG25=25,
|
||||
NDEG30=30, NDEG40=40, NDEG50=50, NDEG61=61;
|
||||
|
@@ -16850,5 +16850,3 @@ static const Standard_Real MaxValuesDB_C2[53] = {
|
||||
2.68923766976735295746679957665724,
|
||||
2.71238965987606292679677228666411
|
||||
};
|
||||
|
||||
//#include <PLib_JacobiPolynomial_1.cxx>
|
@@ -16,10 +16,6 @@
|
||||
#include <Poly_CoherentNode.hxx>
|
||||
#include <Poly_CoherentTriangle.hxx>
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(disable:4996)
|
||||
#endif
|
||||
|
||||
//=======================================================================
|
||||
//function : Clear
|
||||
//purpose :
|
||||
|
@@ -13,8 +13,8 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
// supress "std::Equal1" warning suggesting using msvc "Checked Iterators"
|
||||
#if defined(_MSC_VER) && ! defined(_SCL_SECURE_NO_WARNINGS)
|
||||
// suppress "std::Equal1" warning suggesting using msvc "Checked Iterators"
|
||||
#define _SCL_SECURE_NO_WARNINGS
|
||||
#endif
|
||||
|
||||
|
@@ -30,9 +30,7 @@
|
||||
|
||||
IMPLEMENT_STANDARD_RTTIEXT(RWStepAP214_ReadWriteModule,StepData_ReadWriteModule)
|
||||
|
||||
//#include <Interface_Macros.hxx>
|
||||
#define DeclareAndCast(atype,result,start) \
|
||||
Handle(atype) result = Handle(atype)::DownCast (start)
|
||||
#include <MoniTool_Macros.hxx>
|
||||
|
||||
#include <StepBasic_Address.hxx>
|
||||
#include <StepShape_AdvancedBrepShapeRepresentation.hxx>
|
||||
|
@@ -304,17 +304,6 @@ TCollection_AsciiString AddrToString(const TopoDS_Shape& theShape)
|
||||
}
|
||||
#endif
|
||||
|
||||
//=======================================================================
|
||||
//function : IsEqual
|
||||
//purpose : global function to check equality of topological shapes
|
||||
//=======================================================================
|
||||
|
||||
inline Standard_Boolean IsEqual(const TopoDS_Shape& theShape1,
|
||||
const TopoDS_Shape& theShape2)
|
||||
{
|
||||
return theShape1.IsEqual(theShape2);
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : AllocateSubLabel
|
||||
//purpose :
|
||||
|
@@ -197,7 +197,7 @@ namespace
|
||||
NCollection_IndexedMap<Handle(Select3D_HBndBox3d)> myBoundings;
|
||||
};
|
||||
|
||||
static const Graphic3d_Mat4d THE_IDENTITY_MAT;
|
||||
static const Graphic3d_Mat4d SelectMgr_SelectableObjectSet_THE_IDENTITY_MAT;
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
@@ -360,7 +360,7 @@ void SelectMgr_SelectableObjectSet::UpdateBVH (const Handle(Graphic3d_Camera)& t
|
||||
{
|
||||
// construct adaptor over private fields to provide direct access for the BVH builder
|
||||
BVHBuilderAdaptorPersistent anAdaptor (myObjects[BVHSubset_2dPersistent],
|
||||
theCamera, theProjectionMat, THE_IDENTITY_MAT, theViewportWidth, theViewportHeight);
|
||||
theCamera, theProjectionMat, SelectMgr_SelectableObjectSet_THE_IDENTITY_MAT, theViewportWidth, theViewportHeight);
|
||||
|
||||
// update corresponding BVH tree data structure
|
||||
myBuilder[BVHSubset_2dPersistent]->Build (&anAdaptor, myBVH[BVHSubset_2dPersistent].get(), anAdaptor.Box());
|
||||
|
@@ -81,7 +81,7 @@ namespace {
|
||||
}
|
||||
}
|
||||
|
||||
static const Graphic3d_Mat4d THE_IDENTITY_MAT;
|
||||
static const Graphic3d_Mat4d SelectMgr_ViewerSelector_THE_IDENTITY_MAT;
|
||||
}
|
||||
|
||||
//==================================================
|
||||
@@ -476,7 +476,7 @@ void SelectMgr_ViewerSelector::TraverseSensitives()
|
||||
// define corresponding frustum builder parameters
|
||||
Handle(SelectMgr_FrustumBuilder) aBuilder = new SelectMgr_FrustumBuilder();
|
||||
aBuilder->SetProjectionMatrix (mySelectingVolumeMgr.ProjectionMatrix());
|
||||
aBuilder->SetWorldViewMatrix (THE_IDENTITY_MAT);
|
||||
aBuilder->SetWorldViewMatrix (SelectMgr_ViewerSelector_THE_IDENTITY_MAT);
|
||||
aBuilder->SetWindowSize (aWidth, aHeight);
|
||||
aMgr = mySelectingVolumeMgr.ScaleAndTransform (1, aTFrustum, aBuilder);
|
||||
}
|
||||
@@ -489,7 +489,7 @@ void SelectMgr_ViewerSelector::TraverseSensitives()
|
||||
const Graphic3d_Mat4d& aProjectionMat = mySelectingVolumeMgr.ProjectionMatrix();
|
||||
const Graphic3d_Mat4d& aWorldViewMat = aBVHSubset != SelectMgr_SelectableObjectSet::BVHSubset_2dPersistent
|
||||
? mySelectingVolumeMgr.WorldViewMatrix()
|
||||
: THE_IDENTITY_MAT;
|
||||
: SelectMgr_ViewerSelector_THE_IDENTITY_MAT;
|
||||
|
||||
const opencascade::handle<BVH_Tree<Standard_Real, 3> >& aBVHTree = mySelectableObjects.BVH (aBVHSubset);
|
||||
|
||||
|
@@ -15,6 +15,10 @@
|
||||
|
||||
#include <Standard_OutOfMemory.hxx>
|
||||
|
||||
#ifdef min
|
||||
#undef min
|
||||
#endif
|
||||
|
||||
#include <algorithm>
|
||||
#include <stdlib.h>
|
||||
|
||||
|
@@ -70,10 +70,5 @@ void StdDrivers::BindTypes (StdObjMgt_MapOfInstantiators& theMap)
|
||||
ShapePersistent::BindTypes (theMap);
|
||||
}
|
||||
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(disable:4190) /* disable warning on C++ type returned by C function; should be OK for C++ usage */
|
||||
#endif
|
||||
|
||||
// Declare entry point PLUGINFACTORY
|
||||
PLUGIN (StdDrivers)
|
||||
|
@@ -65,9 +65,5 @@ void StdLDrivers::BindTypes (StdObjMgt_MapOfInstantiators& theMap)
|
||||
StdLPersistent::BindTypes (theMap);
|
||||
}
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(disable:4190) /* disable warning on C++ type returned by C function; should be OK for C++ usage */
|
||||
#endif
|
||||
|
||||
// Declare entry point PLUGINFACTORY
|
||||
PLUGIN (StdLDrivers)
|
||||
|
@@ -29,6 +29,11 @@ class StepDimTol_HArray1OfToleranceZoneTarget;
|
||||
class TCollection_HAsciiString;
|
||||
class StepBasic_MeasureWithUnit;
|
||||
|
||||
// Avoid possible conflict with SetForm macro defined by windows.h
|
||||
#ifdef SetForm
|
||||
#undef SetForm
|
||||
#endif
|
||||
|
||||
class StepDimTol_ToleranceZone;
|
||||
DEFINE_STANDARD_HANDLE(StepDimTol_ToleranceZone, StepRepr_ShapeAspect)
|
||||
//! Representation of STEP entity ToleranceZone
|
||||
|
@@ -21,12 +21,5 @@ typedef NCollection_Map<TopoDS_Shape> TNaming_MapOfShape;
|
||||
typedef TNaming_MapOfShape::Iterator TNaming_MapIteratorOfMapOfShape;
|
||||
typedef NCollection_DataMap<TopoDS_Shape, TNaming_MapOfShape> TNaming_DataMapOfShapeMapOfShape;
|
||||
typedef TNaming_DataMapOfShapeMapOfShape::Iterator TNaming_DataMapIteratorOfDataMapOfShapeMapOfShape;
|
||||
//=======================================================================
|
||||
//function : NCollection => IsEqual
|
||||
//=======================================================================
|
||||
Standard_Boolean IsEqual (const TopoDS_Shape& S1, const TopoDS_Shape& S2)
|
||||
{
|
||||
return S1.IsEqual(S2);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@@ -150,8 +150,6 @@ static Handle(TNaming_NamedShape) BuildName (const TDF_Label& F,
|
||||
//=======================================================================
|
||||
static Standard_Integer RepeatabilityInContext(const TopoDS_Shape& Selection,
|
||||
const TopoDS_Shape& Context);
|
||||
//=======================================================================
|
||||
extern Standard_Boolean IsEqual (const TopoDS_Shape& S1, const TopoDS_Shape& S2);
|
||||
|
||||
//=======================================================================
|
||||
//function : Solve
|
||||
|
@@ -38,10 +38,6 @@
|
||||
#include <XmlTObjDrivers.hxx>
|
||||
|
||||
#include <stdio.h>
|
||||
// avoid warnings on 'extern "C"' functions returning C++ classes
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(4:4190)
|
||||
#endif
|
||||
|
||||
//=======================================================================
|
||||
// Section: General commands
|
||||
|
@@ -279,35 +279,8 @@ Standard_Boolean TopOpeBRep_FacesFiller::CheckLine(TopOpeBRep_LineInter& L) cons
|
||||
Standard_Real parB = B.ParameterOnLine();
|
||||
Standard_Boolean conf = (fabs(parA-parB) < tol1);
|
||||
if (conf) {
|
||||
//modified by NIZHNY-MZV Wed Dec 1 09:53:08 1999
|
||||
check = Msf;
|
||||
//modified by NIZHNY-MZV Wed Dec 1 09:53:18 1999 Standard_Boolean isp = L.IsPeriodic();
|
||||
//modified by NIZHNY-MZV Wed Dec 1 09:53:20 1999 if (isp) {
|
||||
//modified by NIZHNY-MZV Wed Dec 1 09:53:21 1999 Handle(Geom_Circle) C = Handle(Geom_Circle)::DownCast(L.Curve());
|
||||
//modified by NIZHNY-MZV Wed Dec 1 09:53:22 1999 Standard_Real per = C->Period();
|
||||
//modified by NIZHNY-MZV Wed Dec 1 09:53:23 1999 parB = parA + per;
|
||||
//modified by NIZHNY-MZV Wed Dec 1 09:53:25 1999 }
|
||||
}
|
||||
|
||||
//modified by NIZHNY-MZV Wed Dec 1 09:53:32 1999 Standard_Real t = 0.2567899311;
|
||||
//modified by NIZHNY-MZV Wed Dec 1 09:53:33 1999 Standard_Real p = (1-t)*parA + t*parB;
|
||||
//modified by NIZHNY-MZV Wed Dec 1 09:53:34 1999 Handle(Geom_Curve) GC = myLine->Curve();
|
||||
//modified by NIZHNY-MZV Wed Dec 1 09:53:34 1999 const TopoDS_Face& F1 = TopoDS::Face(myF1);
|
||||
//modified by NIZHNY-MZV Wed Dec 1 09:53:35 1999 const TopoDS_Face& F2 = TopoDS::Face(myF2);
|
||||
//modified by NIZHNY-MZV Wed Dec 1 09:53:36 1999 Handle(Geom_Surface) GS1 = BRep_Tool::Surface(F1);
|
||||
//modified by NIZHNY-MZV Wed Dec 1 09:53:36 1999 Handle(Geom_Surface) GS2 = BRep_Tool::Surface(F2);
|
||||
//modified by NIZHNY-MZV Wed Dec 1 09:53:37 1999 Handle(Geom2d_Curve) C1 = GeomProjLib::Curve2d(GC,parA,parB,GS1);
|
||||
//modified by NIZHNY-MZV Wed Dec 1 09:53:38 1999 Handle(Geom2d_Curve) C2 = GeomProjLib::Curve2d(GC,parA,parB,GS2);
|
||||
|
||||
//modified by NIZHNY-MZV Wed Dec 1 09:53:39 1999 gp_Pnt2d P1 = C1->Value(p);
|
||||
//modified by NIZHNY-MZV Wed Dec 1 09:53:44 1999 gp_Pnt2d P2 = C2->Value(p);
|
||||
//modified by NIZHNY-MZV Wed Dec 1 09:53:45 1999 TopOpeBRep_PointClassifier* pcl = (TopOpeBRep_PointClassifier*)((void*)&myPointClassifier);
|
||||
//modified by NIZHNY-MZV Wed Dec 1 09:53:46 1999 TopAbs_State staP1 = pcl->Classify(F1,P1,tol1);
|
||||
//modified by NIZHNY-MZV Wed Dec 1 09:53:47 1999 TopAbs_State staP2 = pcl->Classify(F2,P2,tol1);
|
||||
//modified by NIZHNY-MZV Wed Dec 1 09:53:48 1999Standard_Boolean ok1 = (staP1 == TopAbs_IN || staP1 == TopAbs_ON);
|
||||
//modified by NIZHNY-MZV Wed Dec 1 09:53:49 1999 Standard_Boolean ok2 = (staP2 == TopAbs_IN || staP2 == TopAbs_ON);
|
||||
//modified by NIZHNY-MZV Wed Dec 1 09:53:50 1999 check = (ok1 && ok2);
|
||||
|
||||
check = Standard_False;
|
||||
}
|
||||
}
|
||||
} // CIRCLE
|
||||
else if (t == TopOpeBRep_HYPERBOLA) {
|
||||
|
@@ -41,7 +41,6 @@ TopOpeBRepBuild_FaceBuilder.hxx
|
||||
TopOpeBRepBuild_fctwes.cxx
|
||||
TopOpeBRepBuild_ffsfs.cxx
|
||||
TopOpeBRepBuild_ffwesk.cxx
|
||||
TopOpeBRepBuild_Fill.pxx
|
||||
TopOpeBRepBuild_FREGU.cxx
|
||||
TopOpeBRepBuild_FuseFace.cxx
|
||||
TopOpeBRepBuild_FuseFace.hxx
|
||||
@@ -108,10 +107,6 @@ TopOpeBRepBuild_SolidAreaBuilder.cxx
|
||||
TopOpeBRepBuild_SolidAreaBuilder.hxx
|
||||
TopOpeBRepBuild_SolidBuilder.cxx
|
||||
TopOpeBRepBuild_SolidBuilder.hxx
|
||||
TopOpeBRepBuild_SplitEdge.hxx
|
||||
TopOpeBRepBuild_SplitFace.hxx
|
||||
TopOpeBRepBuild_SplitShapes.hxx
|
||||
TopOpeBRepBuild_SplitSolid.pxx
|
||||
TopOpeBRepBuild_SREGU.cxx
|
||||
TopOpeBRepBuild_Tools.cxx
|
||||
TopOpeBRepBuild_Tools.hxx
|
||||
|
@@ -23,6 +23,7 @@
|
||||
#include <gp_Pnt.hxx>
|
||||
#include <Precision.hxx>
|
||||
#include <Standard_NoSuchObject.hxx>
|
||||
#include <Standard_ProgramError.hxx>
|
||||
#include <TCollection_AsciiString.hxx>
|
||||
#include <TopExp.hxx>
|
||||
#include <TopoDS.hxx>
|
||||
@@ -67,19 +68,12 @@ extern Standard_Boolean TopOpeBRepBuild_GettraceCUV();
|
||||
extern Standard_Boolean TopOpeBRepBuild_GettraceSPF();
|
||||
extern Standard_Boolean TopOpeBRepBuild_GettraceSPS();
|
||||
extern Standard_Boolean TopOpeBRepBuild_GetcontextSF2();
|
||||
extern Standard_Boolean TopOpeBRepBuild_GettraceSHEX();
|
||||
Standard_EXPORT void debmarksplit(const Standard_Integer i) {cout<<"++ debmarksplit "<<i<<endl;}
|
||||
Standard_EXPORT void debchangesplit(const Standard_Integer i) {cout<<"++ debchangesplit "<<i<<endl;}
|
||||
Standard_EXPORT void debspf(const Standard_Integer i) {cout<<"++ debspf"<<i<<endl;}
|
||||
#endif
|
||||
|
||||
static Standard_Integer STATIC_SOLIDINDEX = 0;
|
||||
#include <TopOpeBRepBuild_SplitEdge.hxx>
|
||||
#include <TopOpeBRepBuild_SplitFace.hxx>
|
||||
#include "TopOpeBRepBuild_SplitSolid.pxx"
|
||||
#include <TopOpeBRepBuild_SplitShapes.hxx>
|
||||
#include "TopOpeBRepBuild_Fill.pxx"
|
||||
|
||||
Standard_EXPORT TopOpeBRepBuild_Builder* GLOBAL_PBUILDER;
|
||||
|
||||
//=======================================================================
|
||||
//function : TopOpeBRepBuild_Builder
|
||||
@@ -93,7 +87,6 @@ TopOpeBRepBuild_Builder::TopOpeBRepBuild_Builder(const TopOpeBRepDS_BuildTool& B
|
||||
myClassifyVal(Standard_True),
|
||||
myProcessON(Standard_False)
|
||||
{
|
||||
GLOBAL_PBUILDER = this;
|
||||
InitSection();
|
||||
}
|
||||
|
||||
@@ -747,3 +740,950 @@ TopOpeBRepDS_DataMapOfShapeListOfShapeOn1State& TopOpeBRepBuild_Builder::ChangeM
|
||||
else if (s == TopAbs_ON) return mySplitON;
|
||||
return mySplitIN;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : SplitEdge
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
void TopOpeBRepBuild_Builder::SplitEdge(const TopoDS_Shape& E,
|
||||
const TopAbs_State ToBuild1,
|
||||
const TopAbs_State ToBuild2)
|
||||
{
|
||||
#ifdef OCCT_DEBUG
|
||||
if ( TopOpeBRepBuild_GetcontextSF2() ) {
|
||||
SplitEdge2(E,ToBuild1,ToBuild2);
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
SplitEdge1(E,ToBuild1,ToBuild2);
|
||||
return;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : SplitEdge1
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
void TopOpeBRepBuild_Builder::SplitEdge1(const TopoDS_Shape& Eoriented,
|
||||
const TopAbs_State ToBuild1,
|
||||
const TopAbs_State ToBuild2)
|
||||
{
|
||||
// work on a FORWARD edge <Eforward>
|
||||
|
||||
TopoDS_Shape Eforward = Eoriented;
|
||||
Eforward.Orientation(TopAbs_FORWARD);
|
||||
|
||||
Standard_Boolean tosplit = ToSplit(Eoriented,ToBuild1);
|
||||
|
||||
#ifdef OCCT_DEBUG
|
||||
Standard_Integer iEdge; Standard_Boolean tSPS = GtraceSPS(Eoriented,iEdge);
|
||||
if(tSPS){
|
||||
cout<<endl;
|
||||
GdumpSHASTA(Eoriented,ToBuild1,"--- SplitEdge ");
|
||||
cout<<endl;
|
||||
}
|
||||
#endif
|
||||
|
||||
if ( ! tosplit ) return;
|
||||
|
||||
Reverse(ToBuild1,ToBuild2);
|
||||
Reverse(ToBuild2,ToBuild1);
|
||||
Standard_Boolean ConnectTo1 = Standard_True;
|
||||
Standard_Boolean ConnectTo2 = Standard_False;
|
||||
|
||||
// build the list of edges to split : LE1, LE2
|
||||
TopTools_ListOfShape LE1,LE2;
|
||||
LE1.Append(Eforward);
|
||||
FindSameDomain(LE1,LE2);
|
||||
|
||||
#ifdef OCCT_DEBUG
|
||||
if(tSPS){GdumpSAMDOM(LE1, (char *) "1 : ");}
|
||||
if(tSPS){GdumpSAMDOM(LE2, (char *) "2 : ");}
|
||||
if(tSPS){cout<<endl;}
|
||||
if(tSPS){cout<<"V of edge ";TopAbs::Print(Eforward.Orientation(),cout);}
|
||||
if(tSPS){cout<<endl;}
|
||||
if(tSPS){GdumpEDG(Eforward);}
|
||||
#endif
|
||||
|
||||
// SplitEdge on a edge having other same domained edges on the
|
||||
// other shape : do not reverse orientation of edges in FillEdge
|
||||
|
||||
// Make a PaveSet <PVS> on edge <Eforward>
|
||||
TopOpeBRepBuild_PaveSet PVS(Eforward);
|
||||
|
||||
// Add the points/vertices found on edge <Eforward> in <PVS>
|
||||
TopOpeBRepDS_PointIterator EPIT(myDataStructure->EdgePoints(Eforward));
|
||||
FillVertexSet(EPIT,ToBuild1,PVS);
|
||||
|
||||
TopOpeBRepBuild_PaveClassifier VCL(Eforward);
|
||||
Standard_Boolean equalpar = PVS.HasEqualParameters();
|
||||
if (equalpar) VCL.SetFirstParameter(PVS.EqualParameters());
|
||||
|
||||
// ------------------------------------------
|
||||
// before return if PVS has no vertices,
|
||||
// mark <Eforward> as split <ToBuild1>
|
||||
// ------------------------------------------
|
||||
MarkSplit(Eforward,ToBuild1);
|
||||
|
||||
PVS.InitLoop();
|
||||
if ( !PVS.MoreLoop() ) {
|
||||
#ifdef OCCT_DEBUG
|
||||
if(tSPS) {
|
||||
cout<<"NO VERTEX split "; TopAbs::Print(ToBuild1,cout);cout<<endl;
|
||||
}
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
|
||||
// build the new edges
|
||||
TopOpeBRepBuild_EdgeBuilder EBU(PVS,VCL);
|
||||
|
||||
// Build the new edges
|
||||
// -------------------
|
||||
TopTools_ListOfShape& EdgeList = ChangeMerged(Eforward,ToBuild1);
|
||||
MakeEdges(Eforward,EBU,EdgeList);
|
||||
|
||||
TopTools_ListIteratorOfListOfShape itLE1,itLE2;
|
||||
|
||||
// connect new edges as edges built <ToBuild1> on LE1 edge
|
||||
// --------------------------------------------------------
|
||||
for (itLE1.Initialize(LE1); itLE1.More(); itLE1.Next()) {
|
||||
TopoDS_Shape Ecur = itLE1.Value();
|
||||
MarkSplit(Ecur,ToBuild1);
|
||||
TopTools_ListOfShape& EL = ChangeSplit(Ecur,ToBuild1);
|
||||
if ( ConnectTo1 ) EL = EdgeList;
|
||||
}
|
||||
|
||||
// connect new edges as edges built <ToBuild2> on LE2 edges
|
||||
// --------------------------------------------------------
|
||||
for (itLE2.Initialize(LE2); itLE2.More(); itLE2.Next()) {
|
||||
TopoDS_Shape Ecur = itLE2.Value();
|
||||
MarkSplit(Ecur,ToBuild2);
|
||||
TopTools_ListOfShape& EL = ChangeSplit(Ecur,ToBuild2);
|
||||
if ( ConnectTo2 ) EL = EdgeList;
|
||||
}
|
||||
|
||||
} // SplitEdge1
|
||||
|
||||
//=======================================================================
|
||||
//function : SplitEdge2
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
void TopOpeBRepBuild_Builder::SplitEdge2(const TopoDS_Shape& Eoriented,
|
||||
const TopAbs_State ToBuild1,
|
||||
const TopAbs_State /*ToBuild2*/)
|
||||
{
|
||||
Standard_Boolean tosplit = ToSplit(Eoriented,ToBuild1);
|
||||
if ( ! tosplit ) return;
|
||||
|
||||
// work on a FORWARD edge <Eforward>
|
||||
TopoDS_Shape Eforward = Eoriented;
|
||||
myBuildTool.Orientation(Eforward,TopAbs_FORWARD);
|
||||
|
||||
#ifdef OCCT_DEBUG
|
||||
Standard_Integer iEdge; Standard_Boolean tSPS = GtraceSPS(Eoriented,iEdge);
|
||||
if(tSPS){cout<<endl;}
|
||||
if(tSPS){GdumpSHASTA(Eoriented,ToBuild1,"--- SplitEdge2 ");}
|
||||
#endif
|
||||
|
||||
// Make a PaveSet <PVS> on edge <Eforward>
|
||||
// Add the points/vertices found on edge <Eforward> in <PVS>
|
||||
TopOpeBRepBuild_PaveSet PVS(Eforward);
|
||||
|
||||
TopOpeBRepDS_PointIterator EPIT(myDataStructure->EdgePoints(Eforward));
|
||||
FillVertexSet(EPIT,ToBuild1,PVS);
|
||||
|
||||
TopOpeBRepBuild_PaveClassifier VCL(Eforward);
|
||||
Standard_Boolean equalpar = PVS.HasEqualParameters();
|
||||
if (equalpar) VCL.SetFirstParameter(PVS.EqualParameters());
|
||||
|
||||
// ------------------------------------------
|
||||
// before return if PVS has no vertices,
|
||||
// mark <Eforward> as split <ToBuild1>
|
||||
// ------------------------------------------
|
||||
MarkSplit(Eforward,ToBuild1);
|
||||
|
||||
PVS.InitLoop();
|
||||
if ( !PVS.MoreLoop() ) {
|
||||
#ifdef OCCT_DEBUG
|
||||
if(tSPS) {cout<<"NO VERTEX split ";TopAbs::Print(ToBuild1,cout);cout<<endl;}
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
|
||||
// build the new edges
|
||||
TopOpeBRepBuild_EdgeBuilder EBU(PVS,VCL);
|
||||
|
||||
// connect the new edges as split parts <ToBuild1> built on <Eforward>
|
||||
TopTools_ListOfShape& EL = ChangeSplit(Eforward,ToBuild1);
|
||||
MakeEdges(Eforward,EBU,EL);
|
||||
|
||||
} // SplitEdge2
|
||||
|
||||
//=======================================================================
|
||||
//function : SplitFace
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
void TopOpeBRepBuild_Builder::SplitFace(const TopoDS_Shape& Foriented,
|
||||
const TopAbs_State ToBuild1,
|
||||
const TopAbs_State ToBuild2)
|
||||
{
|
||||
#ifdef OCCT_DEBUG
|
||||
if(TopOpeBRepBuild_GetcontextSF2()){
|
||||
SplitFace2(Foriented,ToBuild1,ToBuild2);
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
SplitFace1(Foriented,ToBuild1,ToBuild2);
|
||||
return;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : SplitFace1
|
||||
//purpose : tout dans le meme edge set
|
||||
//=======================================================================
|
||||
|
||||
void TopOpeBRepBuild_Builder::SplitFace1(const TopoDS_Shape& Foriented,
|
||||
const TopAbs_State ToBuild1,
|
||||
const TopAbs_State ToBuild2)
|
||||
{
|
||||
// process connect connect
|
||||
// operation tobuild1 tobuild2 face F to 1 to 2
|
||||
// --------- -------- -------- ------- ------- -------
|
||||
// common IN IN yes yes yes
|
||||
// fuse OUT OUT yes yes yes
|
||||
// cut 1-2 OUT IN yes yes no
|
||||
// cut 2-1 IN OUT yes yes no
|
||||
//
|
||||
Standard_Boolean tosplit = ToSplit(Foriented,ToBuild1);
|
||||
if ( ! tosplit ) return;
|
||||
|
||||
Standard_Boolean RevOri1 = Reverse(ToBuild1,ToBuild2);
|
||||
Standard_Boolean RevOri2 = Reverse(ToBuild2,ToBuild1);
|
||||
Standard_Boolean ConnectTo1 = Standard_True;
|
||||
Standard_Boolean ConnectTo2 = Standard_False;
|
||||
|
||||
// work on a FORWARD face <Fforward>
|
||||
TopoDS_Shape Fforward = Foriented;
|
||||
myBuildTool.Orientation(Fforward,TopAbs_FORWARD);
|
||||
|
||||
// build the list of faces to split : LF1, LF2
|
||||
TopTools_ListOfShape LF1,LF2;
|
||||
LF1.Append(Fforward);
|
||||
FindSameDomain(LF1,LF2);
|
||||
Standard_Integer n1 = LF1.Extent();
|
||||
Standard_Integer n2 = LF2.Extent();
|
||||
|
||||
// SplitFace on a face having other same domained faces on the
|
||||
// other shape : do not reverse orientation of faces in FillFace
|
||||
if (!n2) RevOri1 = Standard_False;
|
||||
if (!n1) RevOri2 = Standard_False;
|
||||
|
||||
// Create an edge set <WES> connected by vertices
|
||||
// ----------------------------------------------
|
||||
TopOpeBRepBuild_WireEdgeSet WES(Fforward,this);
|
||||
|
||||
#ifdef OCCT_DEBUG
|
||||
Standard_Boolean tSPF=TopOpeBRepBuild_GettraceSPF();
|
||||
Standard_Integer iFace=myDataStructure->Shape(Foriented);
|
||||
if(tSPF){cout<<endl;GdumpSHASTA(Foriented,ToBuild1,"=== SplitFace ");}
|
||||
if(tSPF){GdumpSAMDOM(LF1, (char *) "1 : ");GdumpSAMDOM(LF2, (char *) "2 : ");}
|
||||
if(tSPF) debspf(iFace);
|
||||
#endif
|
||||
|
||||
TopTools_ListIteratorOfListOfShape itLF1,itLF2;
|
||||
|
||||
for (itLF1.Initialize(LF1); itLF1.More(); itLF1.Next()) {
|
||||
const TopoDS_Shape& Fcur = itLF1.Value();
|
||||
// myDataStructure->Shape(Fcur);//DEB
|
||||
FillFace(Fcur,ToBuild1,LF2,ToBuild2,WES,RevOri1);
|
||||
}
|
||||
|
||||
for (itLF2.Initialize(LF2); itLF2.More(); itLF2.Next()) {
|
||||
const TopoDS_Shape& Fcur = itLF2.Value();
|
||||
// myDataStructure->Shape(Fcur);//DEB
|
||||
FillFace(Fcur,ToBuild2,LF1,ToBuild1,WES,RevOri2);
|
||||
}
|
||||
|
||||
// Add the intersection edges to edge set WES
|
||||
// -----------------------------------------
|
||||
AddIntersectionEdges(Fforward,ToBuild1,RevOri1,WES);
|
||||
|
||||
#ifdef OCCT_DEBUG
|
||||
Standard_Integer iF; Standard_Boolean tSPS = GtraceSPS(Fforward,iF);
|
||||
if(tSPS) WES.DumpSS();
|
||||
#endif
|
||||
|
||||
// Create a Face Builder FBU
|
||||
// ------------------------
|
||||
TopOpeBRepBuild_FaceBuilder FBU;
|
||||
FBU.InitFaceBuilder(WES,Fforward,Standard_False); //forceclass = False
|
||||
|
||||
// Build the new faces
|
||||
// -------------------
|
||||
TopTools_ListOfShape& FaceList = ChangeMerged(Fforward,ToBuild1);
|
||||
MakeFaces(Fforward,FBU,FaceList);
|
||||
|
||||
// connect new faces as faces built <ToBuild1> on LF1 faces
|
||||
// --------------------------------------------------------
|
||||
for (itLF1.Initialize(LF1); itLF1.More(); itLF1.Next()) {
|
||||
TopoDS_Shape Fcur = itLF1.Value();
|
||||
MarkSplit(Fcur,ToBuild1);
|
||||
TopTools_ListOfShape& FL = ChangeSplit(Fcur,ToBuild1);
|
||||
if ( ConnectTo1 ) FL = FaceList;
|
||||
}
|
||||
|
||||
// connect new faces as faces built <ToBuild2> on LF2 faces
|
||||
// --------------------------------------------------------
|
||||
for (itLF2.Initialize(LF2); itLF2.More(); itLF2.Next()) {
|
||||
TopoDS_Shape Fcur = itLF2.Value();
|
||||
MarkSplit(Fcur,ToBuild2);
|
||||
TopTools_ListOfShape& FL = ChangeSplit(Fcur,ToBuild2);
|
||||
if ( ConnectTo2 ) FL = FaceList;
|
||||
}
|
||||
|
||||
} // SplitFace1
|
||||
|
||||
//=======================================================================
|
||||
//function : SplitFace2
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
void TopOpeBRepBuild_Builder::SplitFace2(const TopoDS_Shape& Foriented,
|
||||
const TopAbs_State ToBuild1,
|
||||
const TopAbs_State ToBuild2)
|
||||
{
|
||||
// process connect connect
|
||||
// operation tobuild1 tobuild2 face F to 1 to 2
|
||||
// --------- -------- -------- ------- ------- -------
|
||||
// common IN IN yes yes yes
|
||||
// fuse OUT OUT yes yes yes
|
||||
// cut 1-2 OUT IN yes yes no
|
||||
// cut 2-1 IN OUT yes yes no
|
||||
//
|
||||
Standard_Boolean tosplit = ToSplit(Foriented,ToBuild1);
|
||||
if ( ! tosplit ) return;
|
||||
|
||||
Standard_Boolean RevOri1 = Reverse(ToBuild1,ToBuild2);
|
||||
Standard_Boolean RevOri2 = Reverse(ToBuild2,ToBuild1);
|
||||
Standard_Boolean ConnectTo1 = Standard_True;
|
||||
Standard_Boolean ConnectTo2 = Standard_False;
|
||||
|
||||
// work on a FORWARD face <Fforward>
|
||||
TopoDS_Shape Fforward = Foriented;
|
||||
myBuildTool.Orientation(Fforward,TopAbs_FORWARD);
|
||||
|
||||
TopTools_ListOfShape LF1 ; //liste des faces de 1 samedomain
|
||||
TopTools_ListOfShape LF2 ; //liste des faces de 2 samedomain
|
||||
LF1.Append(Fforward);
|
||||
FindSameDomain(LF1,LF2);
|
||||
Standard_Integer n1 = LF1.Extent();
|
||||
Standard_Integer n2 = LF2.Extent();
|
||||
|
||||
#ifdef OCCT_DEBUG
|
||||
Standard_Boolean tSPF = TopOpeBRepBuild_GettraceSPF();
|
||||
// Standard_Integer iFace = myDataStructure->Shape(Foriented);
|
||||
if (tSPF) {
|
||||
cout<<endl;
|
||||
GdumpSHASTA(Foriented,ToBuild1,"=== SplitFace ");
|
||||
GdumpSAMDOM(LF1, (char *) "samedomain 1 : ");
|
||||
GdumpSAMDOM(LF2, (char *) "samedomain 2 : ");
|
||||
}
|
||||
#endif
|
||||
|
||||
// SplitFace on a face having other same domained faces on the
|
||||
// other shape : do not reverse orientation of faces in FillFace
|
||||
if (!n2) RevOri1 = Standard_False;
|
||||
if (!n1) RevOri2 = Standard_False;
|
||||
|
||||
TopTools_ListOfShape LFSO; //liste des faces de 1,2 samedomainsameorientation
|
||||
TopTools_ListOfShape LFOO; //liste des faces de 1,2 samedomainoppositeorient
|
||||
|
||||
// LFSO : faces des shapes 1 ou 2, de meme orientation que Fforward.
|
||||
// LFOO : faces des shapes 1 ou 2, d'orientation contraire que Fforward.
|
||||
LFSO.Append(Fforward);
|
||||
FindSameDomainSameOrientation(LFSO,LFOO);
|
||||
|
||||
TopTools_ListOfShape LFSO1,LFOO1; // same domain, same orientation, et du shape de F
|
||||
TopTools_ListOfShape LFSO2,LFOO2; // "" "",du shape autre que celui de F
|
||||
|
||||
// on construit les parties ToBuild1 de F
|
||||
Standard_Integer rankF = ShapeRank(Foriented);
|
||||
Standard_Integer rankX = (rankF) ? ((rankF == 1) ? 2 : 1) : 0;
|
||||
|
||||
FindSameRank(LFSO,rankF,LFSO1);
|
||||
FindSameRank(LFOO,rankF,LFOO1);
|
||||
FindSameRank(LFSO,rankX,LFSO2);
|
||||
FindSameRank(LFOO,rankX,LFOO2);
|
||||
|
||||
#ifdef OCCT_DEBUG
|
||||
if ( tSPF ) {
|
||||
GdumpSAMDOM(LFSO1, (char *) "LFSO1 : ");
|
||||
GdumpSAMDOM(LFOO1, (char *) "LFOO1 : ");
|
||||
GdumpSAMDOM(LFSO2, (char *) "LFSO2 : ");
|
||||
GdumpSAMDOM(LFOO2, (char *) "LFOO2 : ");
|
||||
}
|
||||
#endif
|
||||
|
||||
TopAbs_State tob1 = ToBuild1;
|
||||
TopAbs_State tob2 = ToBuild2;
|
||||
TopAbs_State tob1comp = (ToBuild1 == TopAbs_IN) ? TopAbs_OUT : TopAbs_IN;
|
||||
TopAbs_State tob2comp = (ToBuild2 == TopAbs_IN) ? TopAbs_OUT : TopAbs_IN;
|
||||
TopTools_ListIteratorOfListOfShape itLF ;
|
||||
|
||||
// --------------------------------------------------------------------
|
||||
// traitement des faces de meme orientation que Fforward dans WireEdgeSet WES1
|
||||
// --------------------------------------------------------------------
|
||||
TopOpeBRepBuild_WireEdgeSet WES1(Fforward,this);
|
||||
|
||||
// traitement des faces de 1 same domain, same orientation que F : LFSO1
|
||||
for (itLF.Initialize(LFSO1); itLF.More(); itLF.Next()) {
|
||||
const TopoDS_Shape& Fcur = itLF.Value();
|
||||
// myDataStructure->Shape(Fcur);//DEB
|
||||
// les wires de Fcur sont a comparer avec les faces de 2
|
||||
FillFace(Fcur,tob1,LF2,tob2,WES1,RevOri1);
|
||||
}
|
||||
|
||||
// traitement des faces de 2 same domain, same orientation que F : LFSO2
|
||||
for (itLF.Initialize(LFSO2); itLF.More(); itLF.Next()) {
|
||||
const TopoDS_Shape& Fcur = itLF.Value();
|
||||
// myDataStructure->Shape(Fcur);//DEB
|
||||
// les wires de Fcur sont a comparer avec les faces de 1
|
||||
FillFace(Fcur,tob2,LF1,tob1,WES1,RevOri2);
|
||||
}
|
||||
|
||||
// traitement des faces de 1 same domain, oppo orientation que F : LFOO1
|
||||
for (itLF.Initialize(LFOO1); itLF.More(); itLF.Next()) {
|
||||
const TopoDS_Shape& Fcur = itLF.Value();
|
||||
// myDataStructure->Shape(Fcur);//DEB
|
||||
// les wires de Fcur sont a comparer avec les faces de 2
|
||||
FillFace(Fcur,tob1comp,LF2,ToBuild2,WES1,!RevOri1);
|
||||
}
|
||||
|
||||
// traitement des faces de 2 same domain, oppo orientation que F : LFOO2
|
||||
for (itLF.Initialize(LFOO2); itLF.More(); itLF.Next()) {
|
||||
const TopoDS_Shape& Fcur = itLF.Value();
|
||||
// myDataStructure->Shape(Fcur);//DEB
|
||||
// les wires de Fcur sont a comparer avec les faces de 1
|
||||
FillFace(Fcur,tob2comp,LF1,ToBuild1,WES1,!RevOri2);
|
||||
}
|
||||
|
||||
// Add the intersection edges to edge set WES1
|
||||
// ------------------------------------------
|
||||
AddIntersectionEdges(Fforward,ToBuild1,RevOri1,WES1);
|
||||
|
||||
// Create a Face Builder FBU1
|
||||
// ------------------------
|
||||
TopOpeBRepBuild_FaceBuilder FBU1(WES1,Fforward);
|
||||
|
||||
// Build the new faces
|
||||
// -------------------
|
||||
TopTools_ListOfShape& FaceList1 = ChangeMerged(Fforward,ToBuild1);
|
||||
MakeFaces(Fforward,FBU1,FaceList1);
|
||||
|
||||
// connect new faces as faces built <ToBuild1> on LF1 faces
|
||||
// --------------------------------------------------------
|
||||
for (itLF.Initialize(LF1); itLF.More(); itLF.Next()) {
|
||||
TopoDS_Shape Fcur = itLF.Value();
|
||||
MarkSplit(Fcur,ToBuild1);
|
||||
TopTools_ListOfShape& FL = ChangeSplit(Fcur,ToBuild1);
|
||||
if ( ConnectTo1 ) FL = FaceList1;
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------
|
||||
// traitement des faces de meme orientation que Fforward dans WireEdgeSet WES2
|
||||
// --------------------------------------------------------------------
|
||||
TopOpeBRepBuild_WireEdgeSet WES2(Fforward,this);
|
||||
|
||||
// traitement des faces de 1 same domain, same orientation que F : LFSO1
|
||||
for (itLF.Initialize(LFSO1); itLF.More(); itLF.Next()) {
|
||||
const TopoDS_Shape& Fcur = itLF.Value();
|
||||
// myDataStructure->Shape(Fcur);//DEB
|
||||
// les wires de Fcur sont a comparer avec les faces de 2
|
||||
FillFace(Fcur,tob1comp,LF2,tob2,WES2,!RevOri1);
|
||||
}
|
||||
|
||||
// traitement des faces de 2 same domain, same orientation que F : LFSO2
|
||||
for (itLF.Initialize(LFSO2); itLF.More(); itLF.Next()) {
|
||||
const TopoDS_Shape& Fcur = itLF.Value();
|
||||
// myDataStructure->Shape(Fcur);//DEB
|
||||
// les wires de Fcur sont a comparer avec les faces de 1
|
||||
FillFace(Fcur,tob2comp,LF1,tob1,WES2,!RevOri2);
|
||||
}
|
||||
|
||||
// traitement des faces de 1 same domain, oppo orientation que F : LFOO1
|
||||
for (itLF.Initialize(LFOO1); itLF.More(); itLF.Next()) {
|
||||
const TopoDS_Shape& Fcur = itLF.Value();
|
||||
// myDataStructure->Shape(Fcur);//DEB
|
||||
// les wires de Fcur sont a comparer avec les faces de 2
|
||||
FillFace(Fcur,tob1,LF2,ToBuild2,WES2,RevOri1);
|
||||
}
|
||||
|
||||
// traitement des faces de 2 same domain, oppo orientation que F : LFOO2
|
||||
for (itLF.Initialize(LFOO2); itLF.More(); itLF.Next()) {
|
||||
const TopoDS_Shape& Fcur = itLF.Value();
|
||||
// myDataStructure->Shape(Fcur);//DEB
|
||||
// les wires de Fcur sont a comparer avec les faces de 1
|
||||
FillFace(Fcur,tob2,LF1,ToBuild1,WES2,RevOri2);
|
||||
}
|
||||
|
||||
// Add the intersection edges to edge set WES2
|
||||
// ------------------------------------------
|
||||
AddIntersectionEdges(Fforward,ToBuild2,RevOri2,WES2);
|
||||
|
||||
// Create a Face Builder FBU2
|
||||
// -------------------------
|
||||
TopOpeBRepBuild_FaceBuilder FBU2(WES2,Fforward);
|
||||
|
||||
// Build the new faces
|
||||
// -------------------
|
||||
TopTools_ListOfShape& FaceList2 = ChangeMerged(Fforward,ToBuild2);
|
||||
MakeFaces(Fforward,FBU2,FaceList2);
|
||||
|
||||
// connect new faces as faces built <ToBuild2> on LF2 faces
|
||||
// --------------------------------------------------------
|
||||
for (itLF.Initialize(LF2); itLF.More(); itLF.Next()) {
|
||||
TopoDS_Shape Fcur = itLF.Value();
|
||||
MarkSplit(Fcur,ToBuild2);
|
||||
TopTools_ListOfShape& FL = ChangeSplit(Fcur,ToBuild2);
|
||||
if ( ConnectTo2 ) FL = FaceList2;
|
||||
}
|
||||
|
||||
} // SplitFace2
|
||||
|
||||
//=======================================================================
|
||||
//function : SplitSolid
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
void TopOpeBRepBuild_Builder::SplitSolid(const TopoDS_Shape& S1oriented,
|
||||
const TopAbs_State ToBuild1,
|
||||
const TopAbs_State ToBuild2)
|
||||
{
|
||||
//modified by IFV for treating shell
|
||||
Standard_Boolean tosplit = Standard_False;
|
||||
Standard_Boolean IsShell = (S1oriented.ShapeType() == TopAbs_SHELL);
|
||||
if(IsShell) {
|
||||
TopExp_Explorer ex;
|
||||
ex.Init(S1oriented, TopAbs_FACE);
|
||||
for (; ex.More(); ex.Next()) {
|
||||
const TopoDS_Shape& sh = ex.Current();
|
||||
tosplit = ToSplit(sh,ToBuild1);
|
||||
if(tosplit) break;
|
||||
}
|
||||
}
|
||||
else tosplit = ToSplit(S1oriented,ToBuild1);
|
||||
|
||||
if ( ! tosplit ) return;
|
||||
// end IFV
|
||||
|
||||
Standard_Boolean RevOri1 = Reverse(ToBuild1,ToBuild2);
|
||||
Standard_Boolean RevOri2 = Reverse(ToBuild2,ToBuild1);
|
||||
Standard_Boolean ConnectTo1 = Standard_True;
|
||||
Standard_Boolean ConnectTo2 = Standard_False;
|
||||
|
||||
// work on a FORWARD solid <S1forward>
|
||||
TopoDS_Shape S1forward = S1oriented;
|
||||
myBuildTool.Orientation(S1forward,TopAbs_FORWARD);
|
||||
|
||||
// build the list of solids to split : LS1, LS2
|
||||
TopTools_ListOfShape LS1,LS2;
|
||||
LS1.Append(S1forward);
|
||||
FindSameDomain(LS1,LS2);
|
||||
Standard_Integer n1 = LS1.Extent();
|
||||
Standard_Integer n2 = LS2.Extent();
|
||||
|
||||
if (!n2) RevOri1 = Standard_False;
|
||||
if (!n1) RevOri2 = Standard_False;
|
||||
|
||||
// Create a face set <FS> connected by edges
|
||||
// -----------------------------------------
|
||||
TopOpeBRepBuild_ShellFaceSet SFS;
|
||||
|
||||
#ifdef OCCT_DEBUG
|
||||
Standard_Boolean tSPS = TopOpeBRepBuild_GettraceSPS();
|
||||
// Standard_Integer iSolid = myDataStructure->Shape(S1oriented);
|
||||
if (tSPS) {
|
||||
cout<<endl;
|
||||
GdumpSHASTA(S1oriented,ToBuild1,"___ SplitSolid ");
|
||||
GdumpSAMDOM(LS1, (char *) "1 : ");
|
||||
GdumpSAMDOM(LS2, (char *) "2 : ");
|
||||
}
|
||||
SFS.DEBNumber(GdumpSHASETindex());
|
||||
#endif
|
||||
|
||||
STATIC_SOLIDINDEX = 1;
|
||||
TopTools_ListIteratorOfListOfShape itLS1;
|
||||
for (itLS1.Initialize(LS1); itLS1.More(); itLS1.Next()) {
|
||||
TopoDS_Shape Scur = itLS1.Value();
|
||||
FillSolid(Scur,ToBuild1,LS2,ToBuild2,SFS,RevOri1);
|
||||
}
|
||||
|
||||
STATIC_SOLIDINDEX = 2;
|
||||
TopTools_ListIteratorOfListOfShape itLS2;
|
||||
for (itLS2.Initialize(LS2); itLS2.More(); itLS2.Next()) {
|
||||
TopoDS_Shape Scur = itLS2.Value();
|
||||
FillSolid(Scur,ToBuild2,LS1,ToBuild1,SFS,RevOri2);
|
||||
}
|
||||
|
||||
// Add the intersection surfaces
|
||||
// -----------------------------
|
||||
if (myDataStructure->NbSurfaces() > 0) {
|
||||
TopOpeBRepDS_SurfaceIterator SSurfaces = myDataStructure->SolidSurfaces(S1forward);
|
||||
for (; SSurfaces.More(); SSurfaces.Next()) {
|
||||
Standard_Integer iS = SSurfaces.Current();
|
||||
const TopTools_ListOfShape& LnewF = NewFaces(iS);
|
||||
for (TopTools_ListIteratorOfListOfShape Iti(LnewF); Iti.More(); Iti.Next()) {
|
||||
TopoDS_Shape aFace = Iti.Value();
|
||||
TopAbs_Orientation ori = SSurfaces.Orientation(ToBuild1);
|
||||
myBuildTool.Orientation(aFace,ori);
|
||||
|
||||
#ifdef OCCT_DEBUG
|
||||
if (tSPS){
|
||||
TCollection_AsciiString ss("--- SplitSolid ");
|
||||
ss = ss + SFS.DEBNumber() + " AddElement SFS+ face ";
|
||||
GdumpSHA(aFace,(Standard_Address)ss.ToCString());
|
||||
cout<<" ";TopAbs::Print(ToBuild1,cout)<<" : 1 face ";
|
||||
TopAbs::Print(ori,cout); cout<<endl;
|
||||
}
|
||||
#endif
|
||||
SFS.AddElement(aFace);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Create a Solid Builder SOBU
|
||||
// -------------------------
|
||||
TopOpeBRepBuild_SolidBuilder SOBU(SFS);
|
||||
|
||||
// Build the new solids on S1
|
||||
// --------------------------
|
||||
TopTools_ListOfShape& SolidList = ChangeMerged(S1oriented,ToBuild1);
|
||||
if(IsShell)
|
||||
MakeShells(SOBU,SolidList);
|
||||
else
|
||||
MakeSolids(SOBU,SolidList);
|
||||
|
||||
// connect list of new solids <SolidList> as solids built on LS1 solids
|
||||
// --------------------------------------------------------------------
|
||||
|
||||
for (itLS1.Initialize(LS1); itLS1.More(); itLS1.Next()) {
|
||||
TopoDS_Shape Scur = itLS1.Value();
|
||||
MarkSplit(Scur,ToBuild1);
|
||||
TopTools_ListOfShape& SL = ChangeSplit(Scur,ToBuild1);
|
||||
if ( ConnectTo1 ) SL = SolidList;
|
||||
|
||||
}
|
||||
|
||||
// connect list of new solids <SolidList> as solids built on LS2 solids
|
||||
// --------------------------------------------------------------------
|
||||
for (itLS2.Initialize(LS2); itLS2.More(); itLS2.Next()) {
|
||||
TopoDS_Shape Scur = itLS2.Value();
|
||||
MarkSplit(Scur,ToBuild2);
|
||||
TopTools_ListOfShape& SL = ChangeSplit(Scur,ToBuild2);
|
||||
if ( ConnectTo2 ) SL = SolidList;
|
||||
}
|
||||
|
||||
} // SplitSolid
|
||||
|
||||
static Standard_Boolean FUN_touched(const TopOpeBRepDS_DataStructure& BDS,const TopoDS_Edge& EOR)
|
||||
{
|
||||
TopoDS_Vertex vf,vl; TopExp::Vertices(EOR,vf,vl);
|
||||
Standard_Boolean hvf = BDS.HasShape(vf);
|
||||
Standard_Boolean hvl = BDS.HasShape(vl);
|
||||
return (hvf || hvl);
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : SplitShapes
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
void TopOpeBRepBuild_Builder::SplitShapes(TopOpeBRepTool_ShapeExplorer& Ex,
|
||||
const TopAbs_State ToBuild1,
|
||||
const TopAbs_State ToBuild2,
|
||||
TopOpeBRepBuild_ShapeSet& aSet,
|
||||
const Standard_Boolean RevOri)
|
||||
{
|
||||
TopoDS_Shape aShape;
|
||||
TopAbs_Orientation newori;
|
||||
|
||||
for (; Ex.More(); Ex.Next()) {
|
||||
aShape = Ex.Current();
|
||||
|
||||
// compute new orientation <newori> to give to the new shapes
|
||||
newori = Orient(myBuildTool.Orientation(aShape),RevOri);
|
||||
|
||||
TopAbs_ShapeEnum t = aShape.ShapeType();
|
||||
|
||||
if ( t == TopAbs_SOLID || t == TopAbs_SHELL )
|
||||
SplitSolid(aShape,ToBuild1,ToBuild2);
|
||||
else if ( t == TopAbs_FACE ) SplitFace(aShape,ToBuild1,ToBuild2);
|
||||
else if ( t == TopAbs_EDGE ) SplitEdge(aShape,ToBuild1,ToBuild2);
|
||||
else continue;
|
||||
|
||||
if ( IsSplit(aShape,ToBuild1) ) {
|
||||
TopoDS_Shape newShape;
|
||||
TopTools_ListIteratorOfListOfShape It;
|
||||
//----------------------- IFV
|
||||
Standard_Boolean IsLSon = Standard_False;
|
||||
//----------------------- IFV
|
||||
const TopTools_ListOfShape& LS = Splits(aShape,ToBuild1);
|
||||
//----------------------- IFV
|
||||
if(t == TopAbs_EDGE && ToBuild1 == TopAbs_IN && LS.Extent() == 0) {
|
||||
const TopTools_ListOfShape& LSon = Splits(aShape,TopAbs_ON);
|
||||
It.Initialize(LSon);
|
||||
IsLSon = Standard_True;
|
||||
}
|
||||
else {
|
||||
It.Initialize(LS);
|
||||
}
|
||||
//----------------------- IFV
|
||||
for (; It.More(); It.Next()) {
|
||||
newShape = It.Value();
|
||||
myBuildTool.Orientation(newShape,newori);
|
||||
#ifdef OCCT_DEBUG
|
||||
// TopAbs_ShapeEnum tns = TopType(newShape);
|
||||
#endif
|
||||
//----------------------- IFV
|
||||
if(IsLSon) {
|
||||
Standard_Boolean add = Standard_True;
|
||||
if ( !myListOfFace.IsEmpty()) { // 2d pur
|
||||
add = KeepShape(newShape,myListOfFace,ToBuild1);
|
||||
}
|
||||
if(add) aSet.AddStartElement(newShape);
|
||||
|
||||
}
|
||||
else {
|
||||
//----------------------- IFV
|
||||
aSet.AddStartElement(newShape);
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
// aShape n'a pas de devenir de split par ToBuild1
|
||||
// on construit les parties ToBuild1 de aShape (de S1)
|
||||
Standard_Boolean add = Standard_True;
|
||||
Standard_Boolean testkeep = Standard_False;
|
||||
Standard_Boolean isedge = (t == TopAbs_EDGE);
|
||||
Standard_Boolean hs = (myDataStructure->HasShape(aShape));
|
||||
Standard_Boolean hg = (myDataStructure->HasGeometry(aShape));
|
||||
|
||||
testkeep = isedge && hs && (!hg);
|
||||
|
||||
// xpu010399 : USA60299 (!hs)&&(!hg), but vertex on bound is touched (v7)
|
||||
// -> testkeep
|
||||
Standard_Boolean istouched = isedge && (!hs) && (!hg);
|
||||
if (istouched) istouched = FUN_touched(myDataStructure->DS(),TopoDS::Edge(aShape));
|
||||
testkeep = testkeep || istouched;
|
||||
|
||||
if (testkeep) {
|
||||
if ( !myListOfFace.IsEmpty()) { // 2d pur
|
||||
Standard_Boolean keep = KeepShape(aShape,myListOfFace,ToBuild1);
|
||||
add = keep;
|
||||
}
|
||||
else { // 3d
|
||||
// on classifie en solide uniqt si
|
||||
// E dans la DS et E a ete purgee de ses interfs car en bout
|
||||
TopoDS_Shape sol;
|
||||
if (STATIC_SOLIDINDEX == 1) sol = myShape2;
|
||||
else sol = myShape1;
|
||||
if ( !sol.IsNull() ) {
|
||||
Standard_Real first,last;
|
||||
Handle(Geom_Curve) C3D;
|
||||
C3D = BRep_Tool::Curve(TopoDS::Edge(aShape),first,last);
|
||||
if ( !C3D.IsNull() ) {
|
||||
Standard_Real tt = 0.127956477;
|
||||
Standard_Real par = (1-tt)*first + tt*last;
|
||||
gp_Pnt P3D = C3D->Value(par);
|
||||
Standard_Real tol3d = Precision::Confusion();
|
||||
BRepClass3d_SolidClassifier SCL(sol,P3D,tol3d);
|
||||
TopAbs_State state = SCL.State();
|
||||
add = (state == ToBuild1);
|
||||
}
|
||||
else {
|
||||
throw Standard_ProgramError("SplitShapes no 3D curve on edge");
|
||||
// NYI pas de courbe 3d : prendre un point sur (courbe 2d,face)
|
||||
}
|
||||
}
|
||||
else { // sol.IsNull
|
||||
add = Standard_True;
|
||||
}
|
||||
}
|
||||
}
|
||||
if ( add ) {
|
||||
myBuildTool.Orientation(aShape,newori);
|
||||
aSet.AddElement(aShape);
|
||||
}
|
||||
}
|
||||
|
||||
} // Ex.More
|
||||
|
||||
} // SplitShapes
|
||||
|
||||
//=======================================================================
|
||||
//function : FillShape
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
void TopOpeBRepBuild_Builder::FillShape(const TopoDS_Shape& S1,
|
||||
const TopAbs_State ToBuild1,
|
||||
const TopTools_ListOfShape& LS2,
|
||||
const TopAbs_State ToBuild2,
|
||||
TopOpeBRepBuild_ShapeSet& aSet,
|
||||
const Standard_Boolean In_RevOri)
|
||||
{
|
||||
Standard_Boolean RevOri = In_RevOri;
|
||||
TopAbs_ShapeEnum t = S1.ShapeType();
|
||||
TopAbs_ShapeEnum t1=TopAbs_COMPOUND,t11=TopAbs_COMPOUND;
|
||||
|
||||
if (t == TopAbs_FACE ) {
|
||||
t1 = TopAbs_WIRE;
|
||||
t11 = TopAbs_EDGE;
|
||||
}
|
||||
else if (t == TopAbs_SOLID || t == TopAbs_SHELL) {
|
||||
t1 = TopAbs_SHELL;
|
||||
t11 = TopAbs_FACE;
|
||||
}
|
||||
|
||||
// if the shape S1 is a SameDomain one, get its orientation compared
|
||||
// with the shape taken as reference for all of the SameDomain shape of S1.
|
||||
Standard_Boolean hsd = myDataStructure->HasSameDomain(S1);
|
||||
if (hsd) {
|
||||
TopOpeBRepDS_Config ssc = myDataStructure->SameDomainOrientation(S1);
|
||||
if ( ssc == TopOpeBRepDS_DIFFORIENTED ) {
|
||||
RevOri = ! RevOri;
|
||||
#ifdef OCCT_DEBUG
|
||||
// Standard_Integer iFace = myDataStructure->Shape(S1);
|
||||
// cout<<endl<<"********** ";
|
||||
// cout<<"retournement d'orientation de ";TopAbs::Print(t,cout);
|
||||
// cout<<" "<<iFace<<endl;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
// work on a FORWARD shape <aShape>
|
||||
TopoDS_Shape aShape = S1;
|
||||
myBuildTool.Orientation(aShape,TopAbs_FORWARD);
|
||||
|
||||
TopoDS_Shape aSubShape;
|
||||
TopAbs_Orientation newori;
|
||||
|
||||
// Explore the SubShapes of type <t1>
|
||||
for (TopOpeBRepTool_ShapeExplorer ex1(aShape,t1); ex1.More(); ex1.Next()) {
|
||||
aSubShape = ex1.Current();
|
||||
|
||||
if ( ! myDataStructure->HasShape(aSubShape) ) {
|
||||
// SubShape is not in DS : classify it with shapes of LS2
|
||||
Standard_Boolean keep = KeepShape(aSubShape,LS2,ToBuild1);
|
||||
if (keep) {
|
||||
newori = Orient(myBuildTool.Orientation(aSubShape),RevOri);
|
||||
myBuildTool.Orientation(aSubShape,newori);
|
||||
aSet.AddShape(aSubShape);
|
||||
}
|
||||
}
|
||||
else {
|
||||
// SubShape has geometry : split the <t11> SubShapes of the SubShape
|
||||
TopOpeBRepTool_ShapeExplorer ex11(aSubShape,t11);
|
||||
SplitShapes(ex11,ToBuild1,ToBuild2,aSet,RevOri);
|
||||
}
|
||||
} // exploration ot SubShapes of type <t1> of shape <S1>
|
||||
|
||||
} // FillShape
|
||||
|
||||
|
||||
//=======================================================================
|
||||
//function : FillFace
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
void TopOpeBRepBuild_Builder::FillFace(const TopoDS_Shape& F1,
|
||||
const TopAbs_State ToBuild1,
|
||||
const TopTools_ListOfShape& LF2,
|
||||
const TopAbs_State ToBuild2,
|
||||
TopOpeBRepBuild_WireEdgeSet& WES,
|
||||
const Standard_Boolean RevOri)
|
||||
{
|
||||
#ifdef OCCT_DEBUG
|
||||
Standard_Boolean tSPF = TopOpeBRepBuild_GettraceSPF();
|
||||
// Standard_Integer iFace = myDataStructure->Shape(F1);
|
||||
if(tSPF){cout<<endl;}
|
||||
if(tSPF){GdumpSHASTA(F1,ToBuild1,"=-= FillFace ");}
|
||||
#endif
|
||||
myListOfFace = LF2;
|
||||
FillShape(F1,ToBuild1,LF2,ToBuild2,WES,RevOri);
|
||||
myListOfFace.Clear();
|
||||
} // FillFace
|
||||
|
||||
|
||||
//=======================================================================
|
||||
//function : FillSolid
|
||||
//purpose : load shells and faces from the solid in the ShellFaceSet <aSet>
|
||||
//=======================================================================
|
||||
void TopOpeBRepBuild_Builder::FillSolid(const TopoDS_Shape& S1,
|
||||
const TopAbs_State ToBuild1,
|
||||
const TopTools_ListOfShape& LS2,
|
||||
const TopAbs_State ToBuild2,
|
||||
TopOpeBRepBuild_ShapeSet& aSet,
|
||||
const Standard_Boolean RevOri)
|
||||
{
|
||||
FillShape(S1,ToBuild1,LS2,ToBuild2,aSet,RevOri);
|
||||
} // FillSolid
|
||||
|
||||
|
||||
//=======================================================================
|
||||
//function : FillVertexSet
|
||||
//purpose : private
|
||||
//=======================================================================
|
||||
void TopOpeBRepBuild_Builder::FillVertexSet(TopOpeBRepDS_PointIterator& IT,
|
||||
const TopAbs_State ToBuild,
|
||||
TopOpeBRepBuild_PaveSet& PVS) const
|
||||
{
|
||||
for (; IT.More(); IT.Next()) {
|
||||
FillVertexSetOnValue(IT,ToBuild,PVS);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//=======================================================================
|
||||
//function : FillVertexSetOnValue
|
||||
//purpose : private
|
||||
//=======================================================================
|
||||
void TopOpeBRepBuild_Builder::FillVertexSetOnValue
|
||||
(const TopOpeBRepDS_PointIterator& IT,
|
||||
const TopAbs_State ToBuild,
|
||||
TopOpeBRepBuild_PaveSet& PVS) const
|
||||
{
|
||||
TopoDS_Shape V;
|
||||
|
||||
// ind = index of new point or existing vertex
|
||||
Standard_Integer ind = IT.Current();
|
||||
Standard_Boolean ispoint = IT.IsPoint();
|
||||
//**!
|
||||
//if (ispoint) V = NewVertex(ind);
|
||||
if (ispoint && ind <= myDataStructure->NbPoints()) V = NewVertex(ind);
|
||||
//**!
|
||||
else V = myDataStructure->Shape(ind);
|
||||
Standard_Real par = IT.Parameter();
|
||||
TopAbs_Orientation ori = IT.Orientation(ToBuild);
|
||||
|
||||
Standard_Boolean keep = Standard_True;
|
||||
// if (ori==TopAbs_EXTERNAL || ori==TopAbs_INTERNAL) keep = Standard_False;
|
||||
|
||||
if ( keep ) {
|
||||
myBuildTool.Orientation(V,ori);
|
||||
Handle(TopOpeBRepBuild_Pave) PV = new TopOpeBRepBuild_Pave(V,par,Standard_False);
|
||||
PVS.Append(PV);
|
||||
}
|
||||
|
||||
#ifdef OCCT_DEBUG
|
||||
const TopoDS_Edge& EDEB = PVS.Edge();
|
||||
Standard_Integer iE; Standard_Boolean tSPS = GtraceSPS(EDEB,iE);
|
||||
if (tSPS) {
|
||||
if (keep) cout<<"+"; else cout<<"-";
|
||||
if (ispoint) cout<<" PDS "; else cout<<" VDS ";
|
||||
cout<<ind<<" : "; GdumpORIPARPNT(ori,par,BRep_Tool::Pnt(TopoDS::Vertex(V)));
|
||||
cout<<endl;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
@@ -896,15 +896,12 @@ void TopOpeBRepBuild_BuilderON::GFillONPartsWES2(const Handle(TopOpeBRepDS_Inter
|
||||
|
||||
if (addFORREV) {
|
||||
newE.Orientation(TopAbs_FORWARD);
|
||||
// Standard_Boolean ok = FUN_tool_correctCLO(TopoDS::Edge(newE),FOR); // xpu201198 cto016*
|
||||
myPWES->AddStartElement(newE);
|
||||
|
||||
newE.Orientation(TopAbs_REVERSED);
|
||||
// ok = FUN_tool_correctCLO(TopoDS::Edge(newE),FOR); // xpu201198 cto016*
|
||||
myPWES->AddStartElement(newE);
|
||||
}
|
||||
else {
|
||||
// Standard_Boolean ok = FUN_tool_correctCLO(TopoDS::Edge(newE),FOR); // xpu201198 cto016*
|
||||
myPWES->AddStartElement(newE);
|
||||
}
|
||||
return;
|
||||
|
@@ -1,186 +0,0 @@
|
||||
// Created on: 1993-06-14
|
||||
// Created by: Jean Yves LEBEY
|
||||
// Copyright (c) 1993-1999 Matra Datavision
|
||||
// Copyright (c) 1999-2014 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef _TopOpeBRepBuild_Fill_HeaderFile
|
||||
#define _TopOpeBRepBuild_Fill_HeaderFile
|
||||
|
||||
//=======================================================================
|
||||
//function : FillShape
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
void TopOpeBRepBuild_Builder::FillShape(const TopoDS_Shape& S1,
|
||||
const TopAbs_State ToBuild1,
|
||||
const TopTools_ListOfShape& LS2,
|
||||
const TopAbs_State ToBuild2,
|
||||
TopOpeBRepBuild_ShapeSet& aSet,
|
||||
const Standard_Boolean In_RevOri)
|
||||
{
|
||||
Standard_Boolean RevOri = In_RevOri;
|
||||
TopAbs_ShapeEnum t = S1.ShapeType();
|
||||
TopAbs_ShapeEnum t1=TopAbs_COMPOUND,t11=TopAbs_COMPOUND;
|
||||
|
||||
if (t == TopAbs_FACE ) {
|
||||
t1 = TopAbs_WIRE;
|
||||
t11 = TopAbs_EDGE;
|
||||
}
|
||||
else if (t == TopAbs_SOLID || t == TopAbs_SHELL) {
|
||||
t1 = TopAbs_SHELL;
|
||||
t11 = TopAbs_FACE;
|
||||
}
|
||||
|
||||
// if the shape S1 is a SameDomain one, get its orientation compared
|
||||
// with the shape taken as reference for all of the SameDomain shape of S1.
|
||||
Standard_Boolean hsd = myDataStructure->HasSameDomain(S1);
|
||||
if (hsd) {
|
||||
TopOpeBRepDS_Config ssc = myDataStructure->SameDomainOrientation(S1);
|
||||
if ( ssc == TopOpeBRepDS_DIFFORIENTED ) {
|
||||
RevOri = ! RevOri;
|
||||
#ifdef OCCT_DEBUG
|
||||
// Standard_Integer iFace = myDataStructure->Shape(S1);
|
||||
// cout<<endl<<"********** ";
|
||||
// cout<<"retournement d'orientation de ";TopAbs::Print(t,cout);
|
||||
// cout<<" "<<iFace<<endl;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
// work on a FORWARD shape <aShape>
|
||||
TopoDS_Shape aShape = S1;
|
||||
myBuildTool.Orientation(aShape,TopAbs_FORWARD);
|
||||
|
||||
TopoDS_Shape aSubShape;
|
||||
TopAbs_Orientation newori;
|
||||
|
||||
// Explore the SubShapes of type <t1>
|
||||
for (TopOpeBRepTool_ShapeExplorer ex1(aShape,t1); ex1.More(); ex1.Next()) {
|
||||
aSubShape = ex1.Current();
|
||||
|
||||
if ( ! myDataStructure->HasShape(aSubShape) ) {
|
||||
// SubShape is not in DS : classify it with shapes of LS2
|
||||
Standard_Boolean keep = KeepShape(aSubShape,LS2,ToBuild1);
|
||||
if (keep) {
|
||||
newori = Orient(myBuildTool.Orientation(aSubShape),RevOri);
|
||||
myBuildTool.Orientation(aSubShape,newori);
|
||||
aSet.AddShape(aSubShape);
|
||||
}
|
||||
}
|
||||
else {
|
||||
// SubShape has geometry : split the <t11> SubShapes of the SubShape
|
||||
TopOpeBRepTool_ShapeExplorer ex11(aSubShape,t11);
|
||||
SplitShapes(ex11,ToBuild1,ToBuild2,aSet,RevOri);
|
||||
}
|
||||
} // exploration ot SubShapes of type <t1> of shape <S1>
|
||||
|
||||
} // FillShape
|
||||
|
||||
|
||||
//=======================================================================
|
||||
//function : FillFace
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
void TopOpeBRepBuild_Builder::FillFace(const TopoDS_Shape& F1,
|
||||
const TopAbs_State ToBuild1,
|
||||
const TopTools_ListOfShape& LF2,
|
||||
const TopAbs_State ToBuild2,
|
||||
TopOpeBRepBuild_WireEdgeSet& WES,
|
||||
const Standard_Boolean RevOri)
|
||||
{
|
||||
#ifdef OCCT_DEBUG
|
||||
Standard_Boolean tSPF = TopOpeBRepBuild_GettraceSPF();
|
||||
// Standard_Integer iFace = myDataStructure->Shape(F1);
|
||||
if(tSPF){cout<<endl;}
|
||||
if(tSPF){GdumpSHASTA(F1,ToBuild1,"=-= FillFace ");}
|
||||
#endif
|
||||
myListOfFace = LF2;
|
||||
FillShape(F1,ToBuild1,LF2,ToBuild2,WES,RevOri);
|
||||
myListOfFace.Clear();
|
||||
} // FillFace
|
||||
|
||||
|
||||
//=======================================================================
|
||||
//function : FillSolid
|
||||
//purpose : load shells and faces from the solid in the ShellFaceSet <aSet>
|
||||
//=======================================================================
|
||||
void TopOpeBRepBuild_Builder::FillSolid(const TopoDS_Shape& S1,
|
||||
const TopAbs_State ToBuild1,
|
||||
const TopTools_ListOfShape& LS2,
|
||||
const TopAbs_State ToBuild2,
|
||||
TopOpeBRepBuild_ShapeSet& aSet,
|
||||
const Standard_Boolean RevOri)
|
||||
{
|
||||
FillShape(S1,ToBuild1,LS2,ToBuild2,aSet,RevOri);
|
||||
} // FillSolid
|
||||
|
||||
|
||||
//=======================================================================
|
||||
//function : FillVertexSet
|
||||
//purpose : private
|
||||
//=======================================================================
|
||||
void TopOpeBRepBuild_Builder::FillVertexSet(TopOpeBRepDS_PointIterator& IT,
|
||||
const TopAbs_State ToBuild,
|
||||
TopOpeBRepBuild_PaveSet& PVS) const
|
||||
{
|
||||
for (; IT.More(); IT.Next()) {
|
||||
FillVertexSetOnValue(IT,ToBuild,PVS);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//=======================================================================
|
||||
//function : FillVertexSetOnValue
|
||||
//purpose : private
|
||||
//=======================================================================
|
||||
void TopOpeBRepBuild_Builder::FillVertexSetOnValue
|
||||
(const TopOpeBRepDS_PointIterator& IT,
|
||||
const TopAbs_State ToBuild,
|
||||
TopOpeBRepBuild_PaveSet& PVS) const
|
||||
{
|
||||
TopoDS_Shape V;
|
||||
|
||||
// ind = index of new point or existing vertex
|
||||
Standard_Integer ind = IT.Current();
|
||||
Standard_Boolean ispoint = IT.IsPoint();
|
||||
//**!
|
||||
//if (ispoint) V = NewVertex(ind);
|
||||
if (ispoint && ind <= myDataStructure->NbPoints()) V = NewVertex(ind);
|
||||
//**!
|
||||
else V = myDataStructure->Shape(ind);
|
||||
Standard_Real par = IT.Parameter();
|
||||
TopAbs_Orientation ori = IT.Orientation(ToBuild);
|
||||
|
||||
Standard_Boolean keep = Standard_True;
|
||||
// if (ori==TopAbs_EXTERNAL || ori==TopAbs_INTERNAL) keep = Standard_False;
|
||||
|
||||
if ( keep ) {
|
||||
myBuildTool.Orientation(V,ori);
|
||||
Handle(TopOpeBRepBuild_Pave) PV = new TopOpeBRepBuild_Pave(V,par,Standard_False);
|
||||
PVS.Append(PV);
|
||||
}
|
||||
|
||||
#ifdef OCCT_DEBUG
|
||||
const TopoDS_Edge& EDEB = PVS.Edge();
|
||||
Standard_Integer iE; Standard_Boolean tSPS = GtraceSPS(EDEB,iE);
|
||||
if (tSPS) {
|
||||
if (keep) cout<<"+"; else cout<<"-";
|
||||
if (ispoint) cout<<" PDS "; else cout<<" VDS ";
|
||||
cout<<ind<<" : "; GdumpORIPARPNT(ori,par,BRep_Tool::Pnt(TopoDS::Vertex(V)));
|
||||
cout<<endl;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
//#ifndef _TopOpeBRepBuild_Fill_HeaderFile
|
||||
#endif
|
@@ -17,34 +17,7 @@
|
||||
|
||||
#include <TopoDS_Shape.hxx>
|
||||
#include <TopOpeBRepBuild_ShapeListOfShape.hxx>
|
||||
|
||||
#define MTTdmiomoslos TopTools_DataMapIteratorOfDataMapOfShapeListOfShape
|
||||
#define MTTdmoslos TopTools_DataMapOfShapeListOfShape
|
||||
#define MTTmiomos TopTools_MapIteratorOfMapOfShape
|
||||
#define MTTmos TopTools_MapOfShape
|
||||
#define MTTliolos TopTools_ListIteratorOfListOfShape
|
||||
#define MTTlos TopTools_ListOfShape
|
||||
#define MTs TopoDS_Shape
|
||||
#define MTf TopoDS_Face
|
||||
#define MTe TopoDS_Edge
|
||||
#define MTv TopoDS_Vertex
|
||||
#define MDSlioloi TopOpeBRepDS_ListIteratorOfListOfInterference
|
||||
#define MDSloi TopOpeBRepDS_ListOfInterference
|
||||
#define MDShi Handle(TopOpeBRepDS_Interference)
|
||||
#define MDSi TopOpeBRepDS_Interference
|
||||
#define MDShssi Handle(TopOpeBRepDS_ShapeShapeInterference)
|
||||
#define MDSssi TopOpeBRepDS_ShapeShapeInterference
|
||||
#define MDSii TopOpeBRepDS_InterferenceIterator
|
||||
#define MDShds Handle(TopOpeBRepDS_HDataStructure)
|
||||
#define MDSds TopOpeBRepDS_DataStructure
|
||||
#define MDSk TopOpeBRepDS_Kind
|
||||
#define MDSsd TopOpeBRepDS_ShapeData
|
||||
#define MDSmosd TopOpeBRepDS_MapOfShapeData
|
||||
#define Msr Standard_Real
|
||||
#define Msi Standard_Integer
|
||||
#define Msb Standard_Boolean
|
||||
#define Mso Standard_Ostream
|
||||
#define Mtcas TCollection_AsciiString
|
||||
#include <TopOpeBRepTool_define.hxx>
|
||||
|
||||
//=======================================================================
|
||||
//function : TopOpeBRepBuild_ShapeListOfShape
|
||||
|
@@ -1,202 +0,0 @@
|
||||
// Created on: 1995-09-12
|
||||
// Created by: Jean Yves LEBEY
|
||||
// Copyright (c) 1995-1999 Matra Datavision
|
||||
// Copyright (c) 1999-2014 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef _TopOpeBRepBuild_SplitEdge_HeaderFile
|
||||
#define _TopOpeBRepBuild_SplitEdge_HeaderFile
|
||||
|
||||
//=======================================================================
|
||||
//function : SplitEdge
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
void TopOpeBRepBuild_Builder::SplitEdge(const TopoDS_Shape& E,
|
||||
const TopAbs_State ToBuild1,
|
||||
const TopAbs_State ToBuild2)
|
||||
{
|
||||
#ifdef OCCT_DEBUG
|
||||
if ( TopOpeBRepBuild_GetcontextSF2() ) {
|
||||
SplitEdge2(E,ToBuild1,ToBuild2);
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
SplitEdge1(E,ToBuild1,ToBuild2);
|
||||
return;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : SplitEdge1
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
void TopOpeBRepBuild_Builder::SplitEdge1(const TopoDS_Shape& Eoriented,
|
||||
const TopAbs_State ToBuild1,
|
||||
const TopAbs_State ToBuild2)
|
||||
{
|
||||
// work on a FORWARD edge <Eforward>
|
||||
|
||||
TopoDS_Shape Eforward = Eoriented;
|
||||
Eforward.Orientation(TopAbs_FORWARD);
|
||||
|
||||
Standard_Boolean tosplit = ToSplit(Eoriented,ToBuild1);
|
||||
|
||||
#ifdef OCCT_DEBUG
|
||||
Standard_Integer iEdge; Standard_Boolean tSPS = GtraceSPS(Eoriented,iEdge);
|
||||
if(tSPS){
|
||||
cout<<endl;
|
||||
GdumpSHASTA(Eoriented,ToBuild1,"--- SplitEdge ");
|
||||
cout<<endl;
|
||||
}
|
||||
#endif
|
||||
|
||||
if ( ! tosplit ) return;
|
||||
|
||||
Reverse(ToBuild1,ToBuild2);
|
||||
Reverse(ToBuild2,ToBuild1);
|
||||
Standard_Boolean ConnectTo1 = Standard_True;
|
||||
Standard_Boolean ConnectTo2 = Standard_False;
|
||||
|
||||
// build the list of edges to split : LE1, LE2
|
||||
TopTools_ListOfShape LE1,LE2;
|
||||
LE1.Append(Eforward);
|
||||
FindSameDomain(LE1,LE2);
|
||||
|
||||
#ifdef OCCT_DEBUG
|
||||
if(tSPS){GdumpSAMDOM(LE1, (char *) "1 : ");}
|
||||
if(tSPS){GdumpSAMDOM(LE2, (char *) "2 : ");}
|
||||
if(tSPS){cout<<endl;}
|
||||
if(tSPS){cout<<"V of edge ";TopAbs::Print(Eforward.Orientation(),cout);}
|
||||
if(tSPS){cout<<endl;}
|
||||
if(tSPS){GdumpEDG(Eforward);}
|
||||
#endif
|
||||
|
||||
// SplitEdge on a edge having other same domained edges on the
|
||||
// other shape : do not reverse orientation of edges in FillEdge
|
||||
|
||||
// Make a PaveSet <PVS> on edge <Eforward>
|
||||
TopOpeBRepBuild_PaveSet PVS(Eforward);
|
||||
|
||||
// Add the points/vertices found on edge <Eforward> in <PVS>
|
||||
TopOpeBRepDS_PointIterator EPIT(myDataStructure->EdgePoints(Eforward));
|
||||
FillVertexSet(EPIT,ToBuild1,PVS);
|
||||
|
||||
TopOpeBRepBuild_PaveClassifier VCL(Eforward);
|
||||
Standard_Boolean equalpar = PVS.HasEqualParameters();
|
||||
if (equalpar) VCL.SetFirstParameter(PVS.EqualParameters());
|
||||
|
||||
// ------------------------------------------
|
||||
// before return if PVS has no vertices,
|
||||
// mark <Eforward> as split <ToBuild1>
|
||||
// ------------------------------------------
|
||||
MarkSplit(Eforward,ToBuild1);
|
||||
|
||||
PVS.InitLoop();
|
||||
if ( !PVS.MoreLoop() ) {
|
||||
#ifdef OCCT_DEBUG
|
||||
if(tSPS) {
|
||||
cout<<"NO VERTEX split "; TopAbs::Print(ToBuild1,cout);cout<<endl;
|
||||
}
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
|
||||
// build the new edges
|
||||
TopOpeBRepBuild_EdgeBuilder EBU(PVS,VCL);
|
||||
|
||||
// Build the new edges
|
||||
// -------------------
|
||||
TopTools_ListOfShape& EdgeList = ChangeMerged(Eforward,ToBuild1);
|
||||
MakeEdges(Eforward,EBU,EdgeList);
|
||||
|
||||
TopTools_ListIteratorOfListOfShape itLE1,itLE2;
|
||||
|
||||
// connect new edges as edges built <ToBuild1> on LE1 edge
|
||||
// --------------------------------------------------------
|
||||
for (itLE1.Initialize(LE1); itLE1.More(); itLE1.Next()) {
|
||||
TopoDS_Shape Ecur = itLE1.Value();
|
||||
MarkSplit(Ecur,ToBuild1);
|
||||
TopTools_ListOfShape& EL = ChangeSplit(Ecur,ToBuild1);
|
||||
if ( ConnectTo1 ) EL = EdgeList;
|
||||
}
|
||||
|
||||
// connect new edges as edges built <ToBuild2> on LE2 edges
|
||||
// --------------------------------------------------------
|
||||
for (itLE2.Initialize(LE2); itLE2.More(); itLE2.Next()) {
|
||||
TopoDS_Shape Ecur = itLE2.Value();
|
||||
MarkSplit(Ecur,ToBuild2);
|
||||
TopTools_ListOfShape& EL = ChangeSplit(Ecur,ToBuild2);
|
||||
if ( ConnectTo2 ) EL = EdgeList;
|
||||
}
|
||||
|
||||
} // SplitEdge1
|
||||
|
||||
//=======================================================================
|
||||
//function : SplitEdge2
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
void TopOpeBRepBuild_Builder::SplitEdge2(const TopoDS_Shape& Eoriented,
|
||||
const TopAbs_State ToBuild1,
|
||||
const TopAbs_State /*ToBuild2*/)
|
||||
{
|
||||
Standard_Boolean tosplit = ToSplit(Eoriented,ToBuild1);
|
||||
if ( ! tosplit ) return;
|
||||
|
||||
// work on a FORWARD edge <Eforward>
|
||||
TopoDS_Shape Eforward = Eoriented;
|
||||
myBuildTool.Orientation(Eforward,TopAbs_FORWARD);
|
||||
|
||||
#ifdef OCCT_DEBUG
|
||||
Standard_Integer iEdge; Standard_Boolean tSPS = GtraceSPS(Eoriented,iEdge);
|
||||
if(tSPS){cout<<endl;}
|
||||
if(tSPS){GdumpSHASTA(Eoriented,ToBuild1,"--- SplitEdge2 ");}
|
||||
#endif
|
||||
|
||||
// Make a PaveSet <PVS> on edge <Eforward>
|
||||
// Add the points/vertices found on edge <Eforward> in <PVS>
|
||||
TopOpeBRepBuild_PaveSet PVS(Eforward);
|
||||
|
||||
TopOpeBRepDS_PointIterator EPIT(myDataStructure->EdgePoints(Eforward));
|
||||
FillVertexSet(EPIT,ToBuild1,PVS);
|
||||
|
||||
TopOpeBRepBuild_PaveClassifier VCL(Eforward);
|
||||
Standard_Boolean equalpar = PVS.HasEqualParameters();
|
||||
if (equalpar) VCL.SetFirstParameter(PVS.EqualParameters());
|
||||
|
||||
// ------------------------------------------
|
||||
// before return if PVS has no vertices,
|
||||
// mark <Eforward> as split <ToBuild1>
|
||||
// ------------------------------------------
|
||||
MarkSplit(Eforward,ToBuild1);
|
||||
|
||||
PVS.InitLoop();
|
||||
if ( !PVS.MoreLoop() ) {
|
||||
#ifdef OCCT_DEBUG
|
||||
if(tSPS) {cout<<"NO VERTEX split ";TopAbs::Print(ToBuild1,cout);cout<<endl;}
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
|
||||
// build the new edges
|
||||
TopOpeBRepBuild_EdgeBuilder EBU(PVS,VCL);
|
||||
|
||||
// connect the new edges as split parts <ToBuild1> built on <Eforward>
|
||||
TopTools_ListOfShape& EL = ChangeSplit(Eforward,ToBuild1);
|
||||
MakeEdges(Eforward,EBU,EL);
|
||||
|
||||
} // SplitEdge2
|
||||
|
||||
//#ifndef _TopOpeBRepBuild_SplitEdge_HeaderFile
|
||||
#endif
|
@@ -1,464 +0,0 @@
|
||||
// Created on: 1995-09-12
|
||||
// Created by: Jean Yves LEBEY
|
||||
// Copyright (c) 1995-1999 Matra Datavision
|
||||
// Copyright (c) 1999-2014 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef _TopOpeBRepBuild_SplitFace_HeaderFile
|
||||
#define _TopOpeBRepBuild_SplitFace_HeaderFile
|
||||
|
||||
#include <TopOpeBRepBuild_WireEdgeSet.hxx>
|
||||
#include <TopOpeBRepBuild_FaceBuilder.hxx>
|
||||
|
||||
#ifdef OCCT_DEBUG
|
||||
Standard_EXPORT void debspf(const Standard_Integer i) {cout<<"++ debspf"<<i<<endl;}
|
||||
#endif
|
||||
|
||||
//=======================================================================
|
||||
//function : SplitFace
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
void TopOpeBRepBuild_Builder::SplitFace(const TopoDS_Shape& Foriented,
|
||||
const TopAbs_State ToBuild1,
|
||||
const TopAbs_State ToBuild2)
|
||||
{
|
||||
#ifdef OCCT_DEBUG
|
||||
if(TopOpeBRepBuild_GetcontextSF2()){
|
||||
SplitFace2(Foriented,ToBuild1,ToBuild2);
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
SplitFace1(Foriented,ToBuild1,ToBuild2);
|
||||
return;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : SplitFace1
|
||||
//purpose : tout dans le meme edge set
|
||||
//=======================================================================
|
||||
|
||||
void TopOpeBRepBuild_Builder::SplitFace1(const TopoDS_Shape& Foriented,
|
||||
const TopAbs_State ToBuild1,
|
||||
const TopAbs_State ToBuild2)
|
||||
{
|
||||
// process connect connect
|
||||
// operation tobuild1 tobuild2 face F to 1 to 2
|
||||
// --------- -------- -------- ------- ------- -------
|
||||
// common IN IN yes yes yes
|
||||
// fuse OUT OUT yes yes yes
|
||||
// cut 1-2 OUT IN yes yes no
|
||||
// cut 2-1 IN OUT yes yes no
|
||||
//
|
||||
Standard_Boolean tosplit = ToSplit(Foriented,ToBuild1);
|
||||
if ( ! tosplit ) return;
|
||||
|
||||
Standard_Boolean RevOri1 = Reverse(ToBuild1,ToBuild2);
|
||||
Standard_Boolean RevOri2 = Reverse(ToBuild2,ToBuild1);
|
||||
Standard_Boolean ConnectTo1 = Standard_True;
|
||||
Standard_Boolean ConnectTo2 = Standard_False;
|
||||
|
||||
// work on a FORWARD face <Fforward>
|
||||
TopoDS_Shape Fforward = Foriented;
|
||||
myBuildTool.Orientation(Fforward,TopAbs_FORWARD);
|
||||
|
||||
// build the list of faces to split : LF1, LF2
|
||||
TopTools_ListOfShape LF1,LF2;
|
||||
LF1.Append(Fforward);
|
||||
FindSameDomain(LF1,LF2);
|
||||
Standard_Integer n1 = LF1.Extent();
|
||||
Standard_Integer n2 = LF2.Extent();
|
||||
|
||||
// SplitFace on a face having other same domained faces on the
|
||||
// other shape : do not reverse orientation of faces in FillFace
|
||||
if (!n2) RevOri1 = Standard_False;
|
||||
if (!n1) RevOri2 = Standard_False;
|
||||
|
||||
// Create an edge set <WES> connected by vertices
|
||||
// ----------------------------------------------
|
||||
TopOpeBRepBuild_WireEdgeSet WES(Fforward,this);
|
||||
|
||||
#ifdef OCCT_DEBUG
|
||||
Standard_Boolean tSPF=TopOpeBRepBuild_GettraceSPF();
|
||||
Standard_Integer iFace=myDataStructure->Shape(Foriented);
|
||||
if(tSPF){cout<<endl;GdumpSHASTA(Foriented,ToBuild1,"=== SplitFace ");}
|
||||
if(tSPF){GdumpSAMDOM(LF1, (char *) "1 : ");GdumpSAMDOM(LF2, (char *) "2 : ");}
|
||||
if(tSPF) debspf(iFace);
|
||||
#endif
|
||||
|
||||
TopTools_ListIteratorOfListOfShape itLF1,itLF2;
|
||||
|
||||
for (itLF1.Initialize(LF1); itLF1.More(); itLF1.Next()) {
|
||||
const TopoDS_Shape& Fcur = itLF1.Value();
|
||||
// myDataStructure->Shape(Fcur);//DEB
|
||||
FillFace(Fcur,ToBuild1,LF2,ToBuild2,WES,RevOri1);
|
||||
}
|
||||
|
||||
for (itLF2.Initialize(LF2); itLF2.More(); itLF2.Next()) {
|
||||
const TopoDS_Shape& Fcur = itLF2.Value();
|
||||
// myDataStructure->Shape(Fcur);//DEB
|
||||
FillFace(Fcur,ToBuild2,LF1,ToBuild1,WES,RevOri2);
|
||||
}
|
||||
|
||||
// Add the intersection edges to edge set WES
|
||||
// -----------------------------------------
|
||||
AddIntersectionEdges(Fforward,ToBuild1,RevOri1,WES);
|
||||
|
||||
#ifdef OCCT_DEBUG
|
||||
Standard_Integer iF; Standard_Boolean tSPS = GtraceSPS(Fforward,iF);
|
||||
if(tSPS) WES.DumpSS();
|
||||
#endif
|
||||
|
||||
// Create a Face Builder FBU
|
||||
// ------------------------
|
||||
TopOpeBRepBuild_FaceBuilder FBU;
|
||||
FBU.InitFaceBuilder(WES,Fforward,Standard_False); //forceclass = False
|
||||
|
||||
// Build the new faces
|
||||
// -------------------
|
||||
TopTools_ListOfShape& FaceList = ChangeMerged(Fforward,ToBuild1);
|
||||
MakeFaces(Fforward,FBU,FaceList);
|
||||
|
||||
// connect new faces as faces built <ToBuild1> on LF1 faces
|
||||
// --------------------------------------------------------
|
||||
for (itLF1.Initialize(LF1); itLF1.More(); itLF1.Next()) {
|
||||
TopoDS_Shape Fcur = itLF1.Value();
|
||||
MarkSplit(Fcur,ToBuild1);
|
||||
TopTools_ListOfShape& FL = ChangeSplit(Fcur,ToBuild1);
|
||||
if ( ConnectTo1 ) FL = FaceList;
|
||||
}
|
||||
|
||||
// connect new faces as faces built <ToBuild2> on LF2 faces
|
||||
// --------------------------------------------------------
|
||||
for (itLF2.Initialize(LF2); itLF2.More(); itLF2.Next()) {
|
||||
TopoDS_Shape Fcur = itLF2.Value();
|
||||
MarkSplit(Fcur,ToBuild2);
|
||||
TopTools_ListOfShape& FL = ChangeSplit(Fcur,ToBuild2);
|
||||
if ( ConnectTo2 ) FL = FaceList;
|
||||
}
|
||||
|
||||
} // SplitFace1
|
||||
|
||||
//=======================================================================
|
||||
//function : SplitFace2
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
void TopOpeBRepBuild_Builder::SplitFace2(const TopoDS_Shape& Foriented,
|
||||
const TopAbs_State ToBuild1,
|
||||
const TopAbs_State ToBuild2)
|
||||
{
|
||||
// process connect connect
|
||||
// operation tobuild1 tobuild2 face F to 1 to 2
|
||||
// --------- -------- -------- ------- ------- -------
|
||||
// common IN IN yes yes yes
|
||||
// fuse OUT OUT yes yes yes
|
||||
// cut 1-2 OUT IN yes yes no
|
||||
// cut 2-1 IN OUT yes yes no
|
||||
//
|
||||
Standard_Boolean tosplit = ToSplit(Foriented,ToBuild1);
|
||||
if ( ! tosplit ) return;
|
||||
|
||||
Standard_Boolean RevOri1 = Reverse(ToBuild1,ToBuild2);
|
||||
Standard_Boolean RevOri2 = Reverse(ToBuild2,ToBuild1);
|
||||
Standard_Boolean ConnectTo1 = Standard_True;
|
||||
Standard_Boolean ConnectTo2 = Standard_False;
|
||||
|
||||
// work on a FORWARD face <Fforward>
|
||||
TopoDS_Shape Fforward = Foriented;
|
||||
myBuildTool.Orientation(Fforward,TopAbs_FORWARD);
|
||||
|
||||
TopTools_ListOfShape LF1 ; //liste des faces de 1 samedomain
|
||||
TopTools_ListOfShape LF2 ; //liste des faces de 2 samedomain
|
||||
LF1.Append(Fforward);
|
||||
FindSameDomain(LF1,LF2);
|
||||
Standard_Integer n1 = LF1.Extent();
|
||||
Standard_Integer n2 = LF2.Extent();
|
||||
|
||||
#ifdef OCCT_DEBUG
|
||||
Standard_Boolean tSPF = TopOpeBRepBuild_GettraceSPF();
|
||||
// Standard_Integer iFace = myDataStructure->Shape(Foriented);
|
||||
if (tSPF) {
|
||||
cout<<endl;
|
||||
GdumpSHASTA(Foriented,ToBuild1,"=== SplitFace ");
|
||||
GdumpSAMDOM(LF1, (char *) "samedomain 1 : ");
|
||||
GdumpSAMDOM(LF2, (char *) "samedomain 2 : ");
|
||||
}
|
||||
#endif
|
||||
|
||||
// SplitFace on a face having other same domained faces on the
|
||||
// other shape : do not reverse orientation of faces in FillFace
|
||||
if (!n2) RevOri1 = Standard_False;
|
||||
if (!n1) RevOri2 = Standard_False;
|
||||
|
||||
TopTools_ListOfShape LFSO; //liste des faces de 1,2 samedomainsameorientation
|
||||
TopTools_ListOfShape LFOO; //liste des faces de 1,2 samedomainoppositeorient
|
||||
|
||||
// LFSO : faces des shapes 1 ou 2, de meme orientation que Fforward.
|
||||
// LFOO : faces des shapes 1 ou 2, d'orientation contraire que Fforward.
|
||||
LFSO.Append(Fforward);
|
||||
FindSameDomainSameOrientation(LFSO,LFOO);
|
||||
|
||||
TopTools_ListOfShape LFSO1,LFOO1; // same domain, same orientation, et du shape de F
|
||||
TopTools_ListOfShape LFSO2,LFOO2; // "" "",du shape autre que celui de F
|
||||
|
||||
// on construit les parties ToBuild1 de F
|
||||
Standard_Integer rankF = ShapeRank(Foriented);
|
||||
Standard_Integer rankX = (rankF) ? ((rankF == 1) ? 2 : 1) : 0;
|
||||
|
||||
FindSameRank(LFSO,rankF,LFSO1);
|
||||
FindSameRank(LFOO,rankF,LFOO1);
|
||||
FindSameRank(LFSO,rankX,LFSO2);
|
||||
FindSameRank(LFOO,rankX,LFOO2);
|
||||
|
||||
#ifdef OCCT_DEBUG
|
||||
if ( tSPF ) {
|
||||
GdumpSAMDOM(LFSO1, (char *) "LFSO1 : ");
|
||||
GdumpSAMDOM(LFOO1, (char *) "LFOO1 : ");
|
||||
GdumpSAMDOM(LFSO2, (char *) "LFSO2 : ");
|
||||
GdumpSAMDOM(LFOO2, (char *) "LFOO2 : ");
|
||||
}
|
||||
#endif
|
||||
|
||||
TopAbs_State tob1 = ToBuild1;
|
||||
TopAbs_State tob2 = ToBuild2;
|
||||
TopAbs_State tob1comp = (ToBuild1 == TopAbs_IN) ? TopAbs_OUT : TopAbs_IN;
|
||||
TopAbs_State tob2comp = (ToBuild2 == TopAbs_IN) ? TopAbs_OUT : TopAbs_IN;
|
||||
TopTools_ListIteratorOfListOfShape itLF ;
|
||||
|
||||
// --------------------------------------------------------------------
|
||||
// traitement des faces de meme orientation que Fforward dans WireEdgeSet WES1
|
||||
// --------------------------------------------------------------------
|
||||
TopOpeBRepBuild_WireEdgeSet WES1(Fforward,this);
|
||||
|
||||
// traitement des faces de 1 same domain, same orientation que F : LFSO1
|
||||
for (itLF.Initialize(LFSO1); itLF.More(); itLF.Next()) {
|
||||
const TopoDS_Shape& Fcur = itLF.Value();
|
||||
// myDataStructure->Shape(Fcur);//DEB
|
||||
// les wires de Fcur sont a comparer avec les faces de 2
|
||||
FillFace(Fcur,tob1,LF2,tob2,WES1,RevOri1);
|
||||
}
|
||||
|
||||
// traitement des faces de 2 same domain, same orientation que F : LFSO2
|
||||
for (itLF.Initialize(LFSO2); itLF.More(); itLF.Next()) {
|
||||
const TopoDS_Shape& Fcur = itLF.Value();
|
||||
// myDataStructure->Shape(Fcur);//DEB
|
||||
// les wires de Fcur sont a comparer avec les faces de 1
|
||||
FillFace(Fcur,tob2,LF1,tob1,WES1,RevOri2);
|
||||
}
|
||||
|
||||
// traitement des faces de 1 same domain, oppo orientation que F : LFOO1
|
||||
for (itLF.Initialize(LFOO1); itLF.More(); itLF.Next()) {
|
||||
const TopoDS_Shape& Fcur = itLF.Value();
|
||||
// myDataStructure->Shape(Fcur);//DEB
|
||||
// les wires de Fcur sont a comparer avec les faces de 2
|
||||
FillFace(Fcur,tob1comp,LF2,ToBuild2,WES1,!RevOri1);
|
||||
}
|
||||
|
||||
// traitement des faces de 2 same domain, oppo orientation que F : LFOO2
|
||||
for (itLF.Initialize(LFOO2); itLF.More(); itLF.Next()) {
|
||||
const TopoDS_Shape& Fcur = itLF.Value();
|
||||
// myDataStructure->Shape(Fcur);//DEB
|
||||
// les wires de Fcur sont a comparer avec les faces de 1
|
||||
FillFace(Fcur,tob2comp,LF1,ToBuild1,WES1,!RevOri2);
|
||||
}
|
||||
|
||||
// Add the intersection edges to edge set WES1
|
||||
// ------------------------------------------
|
||||
AddIntersectionEdges(Fforward,ToBuild1,RevOri1,WES1);
|
||||
|
||||
// Create a Face Builder FBU1
|
||||
// ------------------------
|
||||
TopOpeBRepBuild_FaceBuilder FBU1(WES1,Fforward);
|
||||
|
||||
// Build the new faces
|
||||
// -------------------
|
||||
TopTools_ListOfShape& FaceList1 = ChangeMerged(Fforward,ToBuild1);
|
||||
MakeFaces(Fforward,FBU1,FaceList1);
|
||||
|
||||
// connect new faces as faces built <ToBuild1> on LF1 faces
|
||||
// --------------------------------------------------------
|
||||
for (itLF.Initialize(LF1); itLF.More(); itLF.Next()) {
|
||||
TopoDS_Shape Fcur = itLF.Value();
|
||||
MarkSplit(Fcur,ToBuild1);
|
||||
TopTools_ListOfShape& FL = ChangeSplit(Fcur,ToBuild1);
|
||||
if ( ConnectTo1 ) FL = FaceList1;
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------
|
||||
// traitement des faces de meme orientation que Fforward dans WireEdgeSet WES2
|
||||
// --------------------------------------------------------------------
|
||||
TopOpeBRepBuild_WireEdgeSet WES2(Fforward,this);
|
||||
|
||||
// traitement des faces de 1 same domain, same orientation que F : LFSO1
|
||||
for (itLF.Initialize(LFSO1); itLF.More(); itLF.Next()) {
|
||||
const TopoDS_Shape& Fcur = itLF.Value();
|
||||
// myDataStructure->Shape(Fcur);//DEB
|
||||
// les wires de Fcur sont a comparer avec les faces de 2
|
||||
FillFace(Fcur,tob1comp,LF2,tob2,WES2,!RevOri1);
|
||||
}
|
||||
|
||||
// traitement des faces de 2 same domain, same orientation que F : LFSO2
|
||||
for (itLF.Initialize(LFSO2); itLF.More(); itLF.Next()) {
|
||||
const TopoDS_Shape& Fcur = itLF.Value();
|
||||
// myDataStructure->Shape(Fcur);//DEB
|
||||
// les wires de Fcur sont a comparer avec les faces de 1
|
||||
FillFace(Fcur,tob2comp,LF1,tob1,WES2,!RevOri2);
|
||||
}
|
||||
|
||||
// traitement des faces de 1 same domain, oppo orientation que F : LFOO1
|
||||
for (itLF.Initialize(LFOO1); itLF.More(); itLF.Next()) {
|
||||
const TopoDS_Shape& Fcur = itLF.Value();
|
||||
// myDataStructure->Shape(Fcur);//DEB
|
||||
// les wires de Fcur sont a comparer avec les faces de 2
|
||||
FillFace(Fcur,tob1,LF2,ToBuild2,WES2,RevOri1);
|
||||
}
|
||||
|
||||
// traitement des faces de 2 same domain, oppo orientation que F : LFOO2
|
||||
for (itLF.Initialize(LFOO2); itLF.More(); itLF.Next()) {
|
||||
const TopoDS_Shape& Fcur = itLF.Value();
|
||||
// myDataStructure->Shape(Fcur);//DEB
|
||||
// les wires de Fcur sont a comparer avec les faces de 1
|
||||
FillFace(Fcur,tob2,LF1,ToBuild1,WES2,RevOri2);
|
||||
}
|
||||
|
||||
// Add the intersection edges to edge set WES2
|
||||
// ------------------------------------------
|
||||
AddIntersectionEdges(Fforward,ToBuild2,RevOri2,WES2);
|
||||
|
||||
// Create a Face Builder FBU2
|
||||
// -------------------------
|
||||
TopOpeBRepBuild_FaceBuilder FBU2(WES2,Fforward);
|
||||
|
||||
// Build the new faces
|
||||
// -------------------
|
||||
TopTools_ListOfShape& FaceList2 = ChangeMerged(Fforward,ToBuild2);
|
||||
MakeFaces(Fforward,FBU2,FaceList2);
|
||||
|
||||
// connect new faces as faces built <ToBuild2> on LF2 faces
|
||||
// --------------------------------------------------------
|
||||
for (itLF.Initialize(LF2); itLF.More(); itLF.Next()) {
|
||||
TopoDS_Shape Fcur = itLF.Value();
|
||||
MarkSplit(Fcur,ToBuild2);
|
||||
TopTools_ListOfShape& FL = ChangeSplit(Fcur,ToBuild2);
|
||||
if ( ConnectTo2 ) FL = FaceList2;
|
||||
}
|
||||
|
||||
} // SplitFace2
|
||||
|
||||
|
||||
#if 0
|
||||
//=======================================================================
|
||||
//function : SplitFaceOK
|
||||
//purpose : tout dans le meme edge set
|
||||
//=======================================================================
|
||||
|
||||
void TopOpeBRepBuild_Builder::SplitFaceOK(const TopoDS_Shape& Foriented,
|
||||
const TopAbs_State ToBuild1,
|
||||
const TopAbs_State ToBuild2)
|
||||
{
|
||||
// process connect connect
|
||||
// operation tobuild1 tobuild2 face F to 1 to 2
|
||||
// --------- -------- -------- ------- ------- -------
|
||||
// common IN IN yes yes yes
|
||||
// fuse OUT OUT yes yes yes
|
||||
// cut 1-2 OUT IN yes yes no
|
||||
// cut 2-1 IN OUT yes yes no
|
||||
//
|
||||
Standard_Boolean tosplit = ToSplit(Foriented,ToBuild1);
|
||||
if ( ! tosplit ) return;
|
||||
|
||||
Standard_Boolean RevOri1 = Reverse(ToBuild1,ToBuild2);
|
||||
Standard_Boolean RevOri2 = Reverse(ToBuild2,ToBuild1);
|
||||
Standard_Boolean ConnectTo1 = Standard_True;
|
||||
Standard_Boolean ConnectTo2 = Standard_False;
|
||||
|
||||
// work on a FORWARD face <Fforward>
|
||||
TopoDS_Shape Fforward = Foriented;
|
||||
myBuildTool.Orientation(Fforward,TopAbs_FORWARD);
|
||||
|
||||
// build the list of faces to split : LF1, LF2
|
||||
TopTools_ListOfShape LF1,LF2;
|
||||
LF1.Append(Fforward);
|
||||
FindSameDomain(LF1,LF2);
|
||||
Standard_Integer n1 = LF1.Extent();
|
||||
Standard_Integer n2 = LF2.Extent();
|
||||
|
||||
// SplitFace on a face having other same domained faces on the
|
||||
// other shape : do not reverse orientation of faces in FillFace
|
||||
if (!n2) RevOri1 = Standard_False;
|
||||
if (!n1) RevOri2 = Standard_False;
|
||||
|
||||
// Create an edge set <WES> connected by vertices
|
||||
// ---------------------------------------------
|
||||
TopOpeBRepBuild_WireEdgeSet WES(Fforward,this);
|
||||
|
||||
#ifdef OCCT_DEBUG
|
||||
Standard_Boolean tSPF = TopOpeBRepBuild_GettraceSPF();
|
||||
Standard_Integer iFace = myDataStructure->Shape(Foriented);
|
||||
if(tSPF){cout<<endl;GdumpSHASTA(Foriented,ToBuild1,"=== SplitFaceOK ");}
|
||||
if(tSPF){GdumpSAMDOM(LF1,"1 : ");GdumpSAMDOM(LF2,"2 : ");}
|
||||
#endif
|
||||
|
||||
TopTools_ListIteratorOfListOfShape itLF1,itLF2;
|
||||
|
||||
for (itLF1.Initialize(LF1); itLF1.More(); itLF1.Next()) {
|
||||
const TopoDS_Shape& Fcur = itLF1.Value();
|
||||
Standard_Integer icur = myDataStructure->Shape(Fcur);//DEB
|
||||
FillFace(Fcur,ToBuild1,LF2,ToBuild2,WES,RevOri1);
|
||||
}
|
||||
|
||||
for (itLF2.Initialize(LF2); itLF2.More(); itLF2.Next()) {
|
||||
const TopoDS_Shape& Fcur = itLF2.Value();
|
||||
Standard_Integer icur = myDataStructure->Shape(Fcur);//DEB
|
||||
FillFace(Fcur,ToBuild2,LF1,ToBuild1,WES,RevOri2);
|
||||
}
|
||||
|
||||
// Add the intersection edges to edge set WES
|
||||
// -----------------------------------------
|
||||
AddIntersectionEdges(Fforward,ToBuild1,RevOri1,WES);
|
||||
|
||||
// Create a Face Builder FBU
|
||||
// ------------------------
|
||||
TopOpeBRepBuild_FaceBuilder FBU(WES,Fforward);
|
||||
|
||||
// Build the new faces
|
||||
// -------------------
|
||||
TopTools_ListOfShape& FaceList = ChangeMerged(Fforward,ToBuild1);
|
||||
MakeFaces(Fforward,FBU,FaceList);
|
||||
|
||||
// connect new faces as faces built <ToBuild1> on LF1 faces
|
||||
// --------------------------------------------------------
|
||||
for (itLF1.Initialize(LF1); itLF1.More(); itLF1.Next()) {
|
||||
TopoDS_Shape Fcur = itLF1.Value();
|
||||
MarkSplit(Fcur,ToBuild1);
|
||||
TopTools_ListOfShape& FL = ChangeSplit(Fcur,ToBuild1);
|
||||
if ( ConnectTo1 ) FL = FaceList;
|
||||
}
|
||||
|
||||
// connect new faces as faces built <ToBuild2> on LF2 faces
|
||||
// --------------------------------------------------------
|
||||
for (itLF2.Initialize(LF2); itLF2.More(); itLF2.Next()) {
|
||||
TopoDS_Shape Fcur = itLF2.Value();
|
||||
MarkSplit(Fcur,ToBuild2);
|
||||
TopTools_ListOfShape& FL = ChangeSplit(Fcur,ToBuild2);
|
||||
if ( ConnectTo2 ) FL = FaceList;
|
||||
}
|
||||
|
||||
} // SplitFaceOK
|
||||
|
||||
// #if 0
|
||||
#endif
|
||||
|
||||
//#ifndef _TopOpeBRepBuild_SplitFace_HeaderFile
|
||||
#endif
|
@@ -1,161 +0,0 @@
|
||||
// Created on: 1996-03-01
|
||||
// Created by: Modelistation
|
||||
// Copyright (c) 1996-1999 Matra Datavision
|
||||
// Copyright (c) 1999-2014 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef _TopOpeBRepBuild_SplitShapes_HeaderFile
|
||||
#define _TopOpeBRepBuild_SplitShapes_HeaderFile
|
||||
|
||||
#include <Standard_ProgramError.hxx>
|
||||
|
||||
|
||||
static Standard_Boolean FUN_touched(const TopOpeBRepDS_DataStructure& BDS,const TopoDS_Edge& EOR)
|
||||
{
|
||||
TopoDS_Vertex vf,vl; TopExp::Vertices(EOR,vf,vl);
|
||||
Standard_Boolean hvf = BDS.HasShape(vf);
|
||||
Standard_Boolean hvl = BDS.HasShape(vl);
|
||||
return (hvf || hvl);
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : SplitShapes
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
void TopOpeBRepBuild_Builder::SplitShapes(TopOpeBRepTool_ShapeExplorer& Ex,
|
||||
const TopAbs_State ToBuild1,
|
||||
const TopAbs_State ToBuild2,
|
||||
TopOpeBRepBuild_ShapeSet& aSet,
|
||||
const Standard_Boolean RevOri)
|
||||
{
|
||||
TopoDS_Shape aShape;
|
||||
TopAbs_Orientation newori;
|
||||
|
||||
for (; Ex.More(); Ex.Next()) {
|
||||
aShape = Ex.Current();
|
||||
|
||||
// compute new orientation <newori> to give to the new shapes
|
||||
newori = Orient(myBuildTool.Orientation(aShape),RevOri);
|
||||
|
||||
TopAbs_ShapeEnum t = aShape.ShapeType();
|
||||
|
||||
#ifdef OCCT_DEBUG
|
||||
if (TopOpeBRepBuild_GettraceSHEX()) GdumpEXP(Ex);
|
||||
#endif
|
||||
|
||||
if ( t == TopAbs_SOLID || t == TopAbs_SHELL )
|
||||
SplitSolid(aShape,ToBuild1,ToBuild2);
|
||||
else if ( t == TopAbs_FACE ) SplitFace(aShape,ToBuild1,ToBuild2);
|
||||
else if ( t == TopAbs_EDGE ) SplitEdge(aShape,ToBuild1,ToBuild2);
|
||||
else continue;
|
||||
|
||||
if ( IsSplit(aShape,ToBuild1) ) {
|
||||
TopoDS_Shape newShape;
|
||||
TopTools_ListIteratorOfListOfShape It;
|
||||
//----------------------- IFV
|
||||
Standard_Boolean IsLSon = Standard_False;
|
||||
//----------------------- IFV
|
||||
const TopTools_ListOfShape& LS = Splits(aShape,ToBuild1);
|
||||
//----------------------- IFV
|
||||
if(t == TopAbs_EDGE && ToBuild1 == TopAbs_IN && LS.Extent() == 0) {
|
||||
const TopTools_ListOfShape& LSon = Splits(aShape,TopAbs_ON);
|
||||
It.Initialize(LSon);
|
||||
IsLSon = Standard_True;
|
||||
}
|
||||
else {
|
||||
It.Initialize(LS);
|
||||
}
|
||||
//----------------------- IFV
|
||||
for (; It.More(); It.Next()) {
|
||||
newShape = It.Value();
|
||||
myBuildTool.Orientation(newShape,newori);
|
||||
#ifdef OCCT_DEBUG
|
||||
// TopAbs_ShapeEnum tns = TopType(newShape);
|
||||
#endif
|
||||
//----------------------- IFV
|
||||
if(IsLSon) {
|
||||
Standard_Boolean add = Standard_True;
|
||||
if ( !myListOfFace.IsEmpty()) { // 2d pur
|
||||
add = KeepShape(newShape,myListOfFace,ToBuild1);
|
||||
}
|
||||
if(add) aSet.AddStartElement(newShape);
|
||||
|
||||
}
|
||||
else {
|
||||
//----------------------- IFV
|
||||
aSet.AddStartElement(newShape);
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
// aShape n'a pas de devenir de split par ToBuild1
|
||||
// on construit les parties ToBuild1 de aShape (de S1)
|
||||
Standard_Boolean add = Standard_True;
|
||||
Standard_Boolean testkeep = Standard_False;
|
||||
Standard_Boolean isedge = (t == TopAbs_EDGE);
|
||||
Standard_Boolean hs = (myDataStructure->HasShape(aShape));
|
||||
Standard_Boolean hg = (myDataStructure->HasGeometry(aShape));
|
||||
|
||||
testkeep = isedge && hs && (!hg);
|
||||
|
||||
// xpu010399 : USA60299 (!hs)&&(!hg), but vertex on bound is touched (v7)
|
||||
// -> testkeep
|
||||
Standard_Boolean istouched = isedge && (!hs) && (!hg);
|
||||
if (istouched) istouched = FUN_touched(myDataStructure->DS(),TopoDS::Edge(aShape));
|
||||
testkeep = testkeep || istouched;
|
||||
|
||||
if (testkeep) {
|
||||
if ( !myListOfFace.IsEmpty()) { // 2d pur
|
||||
Standard_Boolean keep = KeepShape(aShape,myListOfFace,ToBuild1);
|
||||
add = keep;
|
||||
}
|
||||
else { // 3d
|
||||
// on classifie en solide uniqt si
|
||||
// E dans la DS et E a ete purgee de ses interfs car en bout
|
||||
TopoDS_Shape sol;
|
||||
if (STATIC_SOLIDINDEX == 1) sol = myShape2;
|
||||
else sol = myShape1;
|
||||
if ( !sol.IsNull() ) {
|
||||
Standard_Real first,last;
|
||||
Handle(Geom_Curve) C3D;
|
||||
C3D = BRep_Tool::Curve(TopoDS::Edge(aShape),first,last);
|
||||
if ( !C3D.IsNull() ) {
|
||||
Standard_Real tt = 0.127956477;
|
||||
Standard_Real par = (1-tt)*first + tt*last;
|
||||
gp_Pnt P3D = C3D->Value(par);
|
||||
Standard_Real tol3d = Precision::Confusion();
|
||||
BRepClass3d_SolidClassifier SCL(sol,P3D,tol3d);
|
||||
TopAbs_State state = SCL.State();
|
||||
add = (state == ToBuild1);
|
||||
}
|
||||
else {
|
||||
throw Standard_ProgramError("SplitShapes no 3D curve on edge");
|
||||
// NYI pas de courbe 3d : prendre un point sur (courbe 2d,face)
|
||||
}
|
||||
}
|
||||
else { // sol.IsNull
|
||||
add = Standard_True;
|
||||
}
|
||||
}
|
||||
}
|
||||
if ( add ) {
|
||||
myBuildTool.Orientation(aShape,newori);
|
||||
aSet.AddElement(aShape);
|
||||
}
|
||||
}
|
||||
|
||||
} // Ex.More
|
||||
|
||||
} // SplitShapes
|
||||
|
||||
#endif
|
@@ -1,168 +0,0 @@
|
||||
// Created on: 1995-09-12
|
||||
// Created by: Jean Yves LEBEY
|
||||
// Copyright (c) 1995-1999 Matra Datavision
|
||||
// Copyright (c) 1999-2014 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef TopOpeBRepBuild_SplitSolid_INCLUDED
|
||||
#define TopOpeBRepBuild_SplitSolid_INCLUDED
|
||||
|
||||
#include <TopOpeBRepBuild_ShellFaceSet.hxx>
|
||||
#include <TopOpeBRepBuild_SolidBuilder.hxx>
|
||||
#include <TopOpeBRepBuild_define.hxx>
|
||||
|
||||
#ifdef OCCT_DEBUG
|
||||
#define DEBSHASET(sarg,meth,shaset,str) TCollection_AsciiString sarg((meth));(sarg)=(sarg)+(shaset).DEBNumber()+(str);
|
||||
Standard_EXPORT Standard_Boolean TopOpeBRepDS_GettraceSTRANGE();
|
||||
Standard_EXPORT void debsplitf(const Standard_Integer i);
|
||||
Standard_EXPORT void debspanc(const Standard_Integer i);
|
||||
//Standard_IMPORT extern Standard_Integer GLOBAL_iexF;
|
||||
Standard_IMPORT Standard_Integer GLOBAL_iexF;
|
||||
#endif
|
||||
|
||||
//=======================================================================
|
||||
//function : SplitSolid
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
void TopOpeBRepBuild_Builder::SplitSolid(const TopoDS_Shape& S1oriented,
|
||||
const TopAbs_State ToBuild1,
|
||||
const TopAbs_State ToBuild2)
|
||||
{
|
||||
//modified by IFV for treating shell
|
||||
Standard_Boolean tosplit = Standard_False;
|
||||
Standard_Boolean IsShell = (S1oriented.ShapeType() == TopAbs_SHELL);
|
||||
if(IsShell) {
|
||||
TopExp_Explorer ex;
|
||||
ex.Init(S1oriented, TopAbs_FACE);
|
||||
for (; ex.More(); ex.Next()) {
|
||||
const TopoDS_Shape& sh = ex.Current();
|
||||
tosplit = ToSplit(sh,ToBuild1);
|
||||
if(tosplit) break;
|
||||
}
|
||||
}
|
||||
else tosplit = ToSplit(S1oriented,ToBuild1);
|
||||
|
||||
if ( ! tosplit ) return;
|
||||
// end IFV
|
||||
|
||||
Standard_Boolean RevOri1 = Reverse(ToBuild1,ToBuild2);
|
||||
Standard_Boolean RevOri2 = Reverse(ToBuild2,ToBuild1);
|
||||
Standard_Boolean ConnectTo1 = Standard_True;
|
||||
Standard_Boolean ConnectTo2 = Standard_False;
|
||||
|
||||
// work on a FORWARD solid <S1forward>
|
||||
TopoDS_Shape S1forward = S1oriented;
|
||||
myBuildTool.Orientation(S1forward,TopAbs_FORWARD);
|
||||
|
||||
// build the list of solids to split : LS1, LS2
|
||||
TopTools_ListOfShape LS1,LS2;
|
||||
LS1.Append(S1forward);
|
||||
FindSameDomain(LS1,LS2);
|
||||
Standard_Integer n1 = LS1.Extent();
|
||||
Standard_Integer n2 = LS2.Extent();
|
||||
|
||||
if (!n2) RevOri1 = Standard_False;
|
||||
if (!n1) RevOri2 = Standard_False;
|
||||
|
||||
// Create a face set <FS> connected by edges
|
||||
// -----------------------------------------
|
||||
TopOpeBRepBuild_ShellFaceSet SFS;
|
||||
|
||||
#ifdef OCCT_DEBUG
|
||||
Standard_Boolean tSPS = TopOpeBRepBuild_GettraceSPS();
|
||||
// Standard_Integer iSolid = myDataStructure->Shape(S1oriented);
|
||||
if (tSPS) {
|
||||
cout<<endl;
|
||||
GdumpSHASTA(S1oriented,ToBuild1,"___ SplitSolid ");
|
||||
GdumpSAMDOM(LS1, (char *) "1 : ");
|
||||
GdumpSAMDOM(LS2, (char *) "2 : ");
|
||||
}
|
||||
SFS.DEBNumber(GdumpSHASETindex());
|
||||
#endif
|
||||
|
||||
STATIC_SOLIDINDEX = 1;
|
||||
TopTools_ListIteratorOfListOfShape itLS1;
|
||||
for (itLS1.Initialize(LS1); itLS1.More(); itLS1.Next()) {
|
||||
TopoDS_Shape Scur = itLS1.Value();
|
||||
FillSolid(Scur,ToBuild1,LS2,ToBuild2,SFS,RevOri1);
|
||||
}
|
||||
|
||||
STATIC_SOLIDINDEX = 2;
|
||||
TopTools_ListIteratorOfListOfShape itLS2;
|
||||
for (itLS2.Initialize(LS2); itLS2.More(); itLS2.Next()) {
|
||||
TopoDS_Shape Scur = itLS2.Value();
|
||||
FillSolid(Scur,ToBuild2,LS1,ToBuild1,SFS,RevOri2);
|
||||
}
|
||||
|
||||
// Add the intersection surfaces
|
||||
// -----------------------------
|
||||
if (myDataStructure->NbSurfaces() > 0) {
|
||||
TopOpeBRepDS_SurfaceIterator SSurfaces = myDataStructure->SolidSurfaces(S1forward);
|
||||
for (; SSurfaces.More(); SSurfaces.Next()) {
|
||||
Standard_Integer iS = SSurfaces.Current();
|
||||
const TopTools_ListOfShape& LnewF = NewFaces(iS);
|
||||
for (TopTools_ListIteratorOfListOfShape Iti(LnewF); Iti.More(); Iti.Next()) {
|
||||
TopoDS_Shape aFace = Iti.Value();
|
||||
TopAbs_Orientation ori = SSurfaces.Orientation(ToBuild1);
|
||||
myBuildTool.Orientation(aFace,ori);
|
||||
|
||||
#ifdef OCCT_DEBUG
|
||||
if (tSPS){
|
||||
DEBSHASET(ss,"--- SplitSolid ",SFS," AddElement SFS+ face ");
|
||||
GdumpSHA(aFace,(Standard_Address)ss.ToCString());
|
||||
cout<<" ";TopAbs::Print(ToBuild1,cout)<<" : 1 face ";
|
||||
TopAbs::Print(ori,cout); cout<<endl;
|
||||
}
|
||||
#endif
|
||||
SFS.AddElement(aFace);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Create a Solid Builder SOBU
|
||||
// -------------------------
|
||||
TopOpeBRepBuild_SolidBuilder SOBU(SFS);
|
||||
|
||||
// Build the new solids on S1
|
||||
// --------------------------
|
||||
TopTools_ListOfShape& SolidList = ChangeMerged(S1oriented,ToBuild1);
|
||||
if(IsShell)
|
||||
MakeShells(SOBU,SolidList);
|
||||
else
|
||||
MakeSolids(SOBU,SolidList);
|
||||
|
||||
// connect list of new solids <SolidList> as solids built on LS1 solids
|
||||
// --------------------------------------------------------------------
|
||||
|
||||
for (itLS1.Initialize(LS1); itLS1.More(); itLS1.Next()) {
|
||||
TopoDS_Shape Scur = itLS1.Value();
|
||||
MarkSplit(Scur,ToBuild1);
|
||||
TopTools_ListOfShape& SL = ChangeSplit(Scur,ToBuild1);
|
||||
if ( ConnectTo1 ) SL = SolidList;
|
||||
|
||||
}
|
||||
|
||||
// connect list of new solids <SolidList> as solids built on LS2 solids
|
||||
// --------------------------------------------------------------------
|
||||
for (itLS2.Initialize(LS2); itLS2.More(); itLS2.Next()) {
|
||||
TopoDS_Shape Scur = itLS2.Value();
|
||||
MarkSplit(Scur,ToBuild2);
|
||||
TopTools_ListOfShape& SL = ChangeSplit(Scur,ToBuild2);
|
||||
if ( ConnectTo2 ) SL = SolidList;
|
||||
}
|
||||
|
||||
} // SplitSolid
|
||||
|
||||
//#ifndef TopOpeBRepBuild_SplitSolid_INCLUDED
|
||||
#endif
|
@@ -56,8 +56,6 @@
|
||||
static TCollection_AsciiString PRODINS("dins ");
|
||||
#endif
|
||||
|
||||
//Standard_IMPORT extern TopOpeBRepBuild_Builder* GLOBAL_PBUILDER;
|
||||
Standard_IMPORT TopOpeBRepBuild_Builder* GLOBAL_PBUILDER;
|
||||
#define MYBB ((TopOpeBRepBuild_BlockBuilder*)myBlockBuilder)
|
||||
|
||||
|
||||
|
@@ -13,7 +13,6 @@ TopOpeBRepTool_C2DF.cxx
|
||||
TopOpeBRepTool_C2DF.hxx
|
||||
TopOpeBRepTool_CLASSI.cxx
|
||||
TopOpeBRepTool_CLASSI.hxx
|
||||
TopOpeBRepTool_closing.cxx
|
||||
TopOpeBRepTool_connexity.cxx
|
||||
TopOpeBRepTool_connexity.hxx
|
||||
TopOpeBRepTool_CORRISO.cxx
|
||||
|
@@ -45,6 +45,8 @@
|
||||
extern Standard_Boolean TopOpeBRepTool_GettraceCORRISO();
|
||||
Standard_EXPORT TopTools_IndexedMapOfShape STATIC_PURGE_mapv;
|
||||
Standard_EXPORT TopTools_IndexedMapOfOrientedShape STATIC_PURGE_mapeds;
|
||||
extern void FUN_tool_trace(const Standard_Integer Index);
|
||||
extern void FUN_tool_trace(const gp_Pnt2d p2d);
|
||||
#endif
|
||||
|
||||
static void FUN_RaiseError()
|
||||
|
@@ -22,20 +22,8 @@
|
||||
|
||||
#ifdef OCCT_DEBUG
|
||||
extern void FUN_REINIT();
|
||||
extern Standard_Integer FUN_addepc(const TopoDS_Shape& ed,const TopoDS_Shape& f);
|
||||
extern Standard_Integer FUN_addcheckepc(const TopoDS_Shape& ed,const TopoDS_Shape& f);
|
||||
extern Standard_Integer FUN_adds(const TopoDS_Shape& s);
|
||||
extern void FUN_tool_trace(const Standard_Integer Index);
|
||||
extern void FUN_tool_trace(const gp_Pnt2d p2d);
|
||||
//extern Standard_Integer FUN_addepc(const TopoDS_Shape& ed,const TopoDS_Shape& f);
|
||||
#endif
|
||||
// ----------------------------------------------------------------------
|
||||
// TopOpeBRepTool_closing.cxx
|
||||
// ----------------------------------------------------------------------
|
||||
//Standard_IMPORT Standard_Boolean FUN_tool_UVonclosing(const TopoDS_Edge& E, const TopoDS_Face& F, const Standard_Boolean onU,
|
||||
// const Standard_Real xfirst, const Standard_Real xperiod,
|
||||
// const Standard_Real toluv);
|
||||
Standard_IMPORT Standard_Boolean FUN_tool_correctCLO(TopoDS_Edge& E, const TopoDS_Face& F);
|
||||
//Standard_IMPORT Standard_Boolean FUN_tool_getEclo(const TopoDS_Face& F, TopoDS_Edge& Eclo);
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
// TopOpeBRepTool_faulty.cxx
|
||||
|
@@ -21,9 +21,6 @@
|
||||
#include <TopOpeBRepTool_ShapeClassifier.hxx>
|
||||
#include <TopOpeBRepTool_PShapeClassifier.hxx>
|
||||
|
||||
#define MTLsc TopOpeBRepTool_ShapeClassifier
|
||||
#define MTLpsc TopOpeBRepTool_PShapeClassifier
|
||||
|
||||
Standard_EXPORT TopOpeBRepTool_ShapeClassifier& FSC_GetPSC(void);
|
||||
Standard_EXPORT TopOpeBRepTool_ShapeClassifier& FSC_GetPSC(const TopoDS_Shape& S);
|
||||
// ----------------------------------------------------------------------
|
||||
|
@@ -1180,24 +1180,3 @@ Standard_EXPORT Standard_Boolean FUN_tool_MakeWire(const TopTools_ListOfShape& l
|
||||
return Standard_True;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
Standard_EXPORT Standard_Boolean FUN_tool_getEclo(const TopoDS_Face& F, const Standard_Boolean UISO, TopoDS_Edge& Eclo)
|
||||
// purpose : get first edge Eclo / Eclo is uiso
|
||||
// F has closing edge Eclo
|
||||
{
|
||||
TopExp_Explorer ex(F, TopAbs_EDGE);
|
||||
for (; ex.More(); ex.Next()){
|
||||
const TopoDS_Edge& E = TopoDS::Edge(ex.Current());
|
||||
Standard_Boolean clo = BRep_Tool::IsClosed(E,F);
|
||||
if (clo) {
|
||||
Standard_Boolean isou,isov; gp_Pnt2d o2d; gp_Dir2d d2d;
|
||||
Standard_Real f,l,tol; Handle(Geom2d_Curve) PC = FC2D_CurveOnSurface(E,F,f,l,tol);
|
||||
TopOpeBRepTool_TOOL::UVISO(PC,isou,isov,d2d,o2d);
|
||||
if (UISO && isou) {
|
||||
Eclo=E;
|
||||
return Standard_True;
|
||||
}
|
||||
}
|
||||
}
|
||||
return Standard_False;
|
||||
}
|
||||
|
@@ -152,6 +152,4 @@ Standard_EXPORT void FUN_ds_CopyEdge(const TopoDS_Shape& Ein,TopoDS_Shape& Eou);
|
||||
Standard_EXPORT void FUN_ds_Parameter(const TopoDS_Shape& E,const TopoDS_Shape& V,const Standard_Real P);
|
||||
Standard_EXPORT Standard_Boolean FUN_tool_MakeWire(const TopTools_ListOfShape& loE,TopoDS_Wire& newW);
|
||||
|
||||
|
||||
Standard_EXPORT Standard_Boolean FUN_tool_getEclo(const TopoDS_Face& F, const Standard_Boolean UISO, TopoDS_Edge& Eclo);
|
||||
#endif
|
||||
|
@@ -1,128 +0,0 @@
|
||||
// Created on: 1998-11-24
|
||||
// Created by: Xuan PHAM PHU
|
||||
// Copyright (c) 1998-1999 Matra Datavision
|
||||
// Copyright (c) 1999-2014 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <TopOpeBRepTool_define.hxx>
|
||||
#include <TopOpeBRepTool_EXPORT.hxx>
|
||||
#include <TopOpeBRepTool_TOOL.hxx>
|
||||
#include <TopOpeBRepTool_2d.hxx>
|
||||
#include <Geom2d_Curve.hxx>
|
||||
#include <gp_Vec2d.hxx>
|
||||
#include <TopExp_Explorer.hxx>
|
||||
#include <BRep_Tool.hxx>
|
||||
#include <TopoDS.hxx>
|
||||
#include <TopExp.hxx>
|
||||
|
||||
//Standard_IMPORT void FUN_tool_ttranslate(const gp_Vec2d& tvector, const TopoDS_Face& fF, TopoDS_Edge& fyE);
|
||||
|
||||
Standard_EXPORT Standard_Boolean FUN_tool_UVonclosing(const TopoDS_Edge& E, const TopoDS_Face& F, const Standard_Boolean onU,
|
||||
const Standard_Real xfirst, const Standard_Real xperiod,
|
||||
const Standard_Real toluv)
|
||||
// purpose : returns TRUE if E has UVrep on F, on closing UVrep
|
||||
// prequesitory : F is x-closed, its x-2drep describes [xfirst,xfirst+xperiod]
|
||||
// if (onU=1), F is u-closed
|
||||
{
|
||||
// E :
|
||||
Standard_Real f,l,tol; Handle(Geom2d_Curve) PC = FC2D_CurveOnSurface(E,F,f,l,tol);
|
||||
Standard_Boolean isou,isov; gp_Pnt2d o2d; gp_Dir2d d2d;
|
||||
Standard_Boolean isouv = TopOpeBRepTool_TOOL::UVISO(PC,isou,isov,d2d,o2d);
|
||||
if (!isouv) return Standard_False;
|
||||
|
||||
Standard_Boolean onX = (onU && isou) || ((!onU) && isov);
|
||||
if (!onX) return Standard_False;
|
||||
|
||||
Standard_Real dxx=0;
|
||||
if (onU) dxx = Abs(o2d.X()-xfirst);
|
||||
else dxx = Abs(o2d.Y()-xfirst);
|
||||
|
||||
Standard_Boolean onclo = (dxx < toluv);
|
||||
onclo = onclo || (Abs(xperiod-dxx) < toluv);
|
||||
return onclo;
|
||||
}//FUN_UVonclosing
|
||||
|
||||
/*Standard_EXPORT Standard_Boolean FUN_tool_getEclo(const TopoDS_Face& F, TopoDS_Edge& Eclo)
|
||||
// purpose : get Eclo / closing edge of F
|
||||
// rep(Eclo,F) is x-iso, parx=xmin/xmax
|
||||
{
|
||||
Eclo.Nullify();
|
||||
TopExp_Explorer ex(F, TopAbs_EDGE);
|
||||
for (; ex.More(); ex.Next()){
|
||||
const TopoDS_Edge& e = TopoDS::Edge(ex.Current());
|
||||
Standard_Boolean clo = BRep_Tool::IsClosed(e,F);
|
||||
if (clo) {Eclo=e; return Standard_True;}
|
||||
}
|
||||
return Standard_False;
|
||||
}*/
|
||||
|
||||
Standard_EXPORT Standard_Boolean FUN_tool_correctCLO(TopoDS_Edge& E, const TopoDS_Face& F)
|
||||
// purpose : correcting "closing edges", returns Standard_True if E pcurve
|
||||
// is translated
|
||||
{
|
||||
TopoDS_Shape aLocalShape = F.Oriented(TopAbs_FORWARD);
|
||||
TopoDS_Face FFOR = TopoDS::Face(aLocalShape);
|
||||
// TopoDS_Face FFOR = TopoDS::Face(F.Oriented(TopAbs_FORWARD));
|
||||
// ************************************************************
|
||||
// prequesitory : in process add(E,F), we'll keep original
|
||||
// E orientation (orientation of E in FFORWARD)
|
||||
// ************************************************************
|
||||
Standard_Boolean inU; Standard_Real xmin,xper;
|
||||
Standard_Boolean closed = FUN_tool_closedS(F,inU,xmin,xper);
|
||||
if (!closed) return Standard_False; // F is not periodic
|
||||
Standard_Real tolu,tolv; FUN_tool_tolUV(TopoDS::Face(F),tolu,tolv);
|
||||
Standard_Real tolx = inU ? tolu : tolv;
|
||||
|
||||
Standard_Real dx=0.45678;
|
||||
// Standard_Real f,l,tolpc; Standard_Boolean trim3d = Standard_True;
|
||||
// Handle(Geom2d_Curve) PC = FC2D_CurveOnSurface(E,F,f,l,tolpc,trim3d);
|
||||
Standard_Real f,l,tol; Handle(Geom2d_Curve) PC;
|
||||
PC = FC2D_EditableCurveOnSurface(E,FFOR,f,l,tol);
|
||||
|
||||
Standard_Boolean isoU,isoV; gp_Pnt2d o2d; gp_Dir2d d2d;
|
||||
TopOpeBRepTool_TOOL::UVISO(PC,isoU,isoV,d2d,o2d);
|
||||
Standard_Boolean xiso = (inU && isoU)||((!inU) && isoV);
|
||||
if (!xiso) return Standard_False;
|
||||
Standard_Real par = dx*f + (1-dx)*l; gp_Vec2d dxx;
|
||||
|
||||
FUN_tool_getdxx(FFOR,E,par,dxx);
|
||||
|
||||
TopExp_Explorer ex(FFOR, TopAbs_EDGE);
|
||||
for (; ex.More(); ex.Next()){
|
||||
const TopoDS_Edge& e1 = TopoDS::Edge(ex.Current());
|
||||
Standard_Boolean closing = BRep_Tool::IsClosed(e1,F);
|
||||
if (!closing) continue;
|
||||
|
||||
// Standard_Real f1,l1; Handle(Geom2d_Curve) PC1 = BRep_Tool::CurveOnSurface(e1,F,f1,l1);
|
||||
Standard_Real f1,l1,tol1; Handle(Geom2d_Curve) PC1;
|
||||
PC1 = FC2D_EditableCurveOnSurface(e1,FFOR,f1,l1,tol1);
|
||||
|
||||
Standard_Boolean isoU1,isoV1; gp_Pnt2d o2d1; gp_Dir2d d2d1;
|
||||
TopOpeBRepTool_TOOL::UVISO(PC1,isoU1,isoV1,d2d1,o2d1);
|
||||
|
||||
// 2d(e1,FFOR) and 2d(E,FFOR) describe the same side of matter
|
||||
Standard_Real par1 = dx*f1 + (1-dx)*l1; gp_Vec2d dxx1;
|
||||
FUN_tool_getdxx(FFOR,e1,par1,dxx1);
|
||||
Standard_Real dot = dxx.Dot(dxx1);
|
||||
if (dot < 0.) continue;
|
||||
|
||||
gp_Vec2d aDxx; Standard_Real dd=0;
|
||||
if (inU) {dd = o2d1.X()-o2d.X(); aDxx = gp_Vec2d(dd,0.);}
|
||||
else {dd = o2d1.Y()-o2d.Y(); aDxx = gp_Vec2d(0.,dd);}
|
||||
|
||||
if (Abs(dd)<tolx) return Standard_False;
|
||||
TopOpeBRepTool_TOOL::TrslUVModifE(aDxx,FFOR,E); //FUN_tool_ttranslate(dxx,FFOR,E);
|
||||
} // ex(FFOR)
|
||||
return Standard_False;
|
||||
}
|
||||
|
@@ -41,39 +41,4 @@
|
||||
#include <TopoDS_Vertex.hxx>
|
||||
#include <TCollection_AsciiString.hxx>
|
||||
|
||||
#define MTAse TopAbs_ShapeEnum
|
||||
#define MTAo TopAbs_Orientation
|
||||
#define MTAs TopAbs_State
|
||||
#define MTTmiomos TopTools_MapIteratorOfMapOfShape
|
||||
#define MTTmos TopTools_MapOfShape
|
||||
#define MTTliolos TopTools_ListIteratorOfListOfShape
|
||||
#define MTTlos TopTools_ListOfShape
|
||||
#define MTTimos TopTools_IndexedMapOfShape
|
||||
#define MTTimoos TopTools_IndexedMapOfOrientedShape
|
||||
#define MTTdmoss TopTools_DataMapOfShapeShape
|
||||
#define MTTdmosi TopTools_DataMapOfShapeInteger
|
||||
#define MTTdmoosi TopTools_DataMapOfOrientedShapeInteger
|
||||
#define MTTdmiodmoss TopTools_DataMapIteratorOfDataMapOfShapeShape
|
||||
#define MTTdmiodmosi TopTools_DataMapIteratorOfDataMapOfShapeInteger
|
||||
#define MTTdmoslos TopTools_DataMapOfShapeListOfShape
|
||||
#define MTTdmiodmoslos TopTools_DataMapIteratorOfDataMapOfShapeListOfShape
|
||||
#define MTTidmoslos TopTools_IndexedDataMapOfShapeListOfShape
|
||||
#define MTTdmiodmoosi TopTools_DataMapIteratorOfDataMapOfOrientedShapeInteger
|
||||
#define MTs TopoDS_Shape
|
||||
#define MTf TopoDS_Face
|
||||
#define MTe TopoDS_Edge
|
||||
#define MTv TopoDS_Vertex
|
||||
#define Msr Standard_Real
|
||||
#define Msi Standard_Integer
|
||||
#define Msb Standard_Boolean
|
||||
#define Msf Standard_False
|
||||
#define Mst Standard_True
|
||||
#define Mso Standard_OStream
|
||||
#define Mtcas TCollection_AsciiString
|
||||
|
||||
#define MTLsc TopOpeBRepTool_ShapeClassifier
|
||||
#define MTLpsc TopOpeBRepTool_PShapeClassifier
|
||||
#define MTLoct TopOpeBRepTool_OutCurveType
|
||||
#define MTLc TopOpeBRepTool_connexity
|
||||
|
||||
#endif
|
||||
|
@@ -37,27 +37,10 @@
|
||||
extern TopTools_IndexedMapOfShape STATIC_PURGE_mapv;
|
||||
extern TopTools_IndexedMapOfOrientedShape STATIC_PURGE_mapeds;
|
||||
extern Standard_Boolean TopOpeBRepTool_GettracePURGE();
|
||||
Standard_EXPORT void FUN_REINIT()
|
||||
void FUN_REINIT()
|
||||
{
|
||||
STATIC_PURGE_mapv.Clear(); STATIC_PURGE_mapeds.Clear();
|
||||
}
|
||||
Standard_EXPORT Standard_Integer FUN_addepc(const TopoDS_Shape& ed,const TopoDS_Shape&)
|
||||
{
|
||||
Standard_Integer ie = STATIC_PURGE_mapeds.Add(ed);
|
||||
#ifdef DRAW
|
||||
// TCollection_AsciiString aa = TCollection_AsciiString("pc_"); FUN_tool_draw(aa,TopoDS::Edge(ed),TopoDS::Face(f),ie);
|
||||
// TCollection_AsciiString bb = TCollection_AsciiString("ed_"); FUN_tool_draw(bb,ed,ie);
|
||||
#endif
|
||||
return ie;
|
||||
}
|
||||
|
||||
Standard_EXPORT Standard_Integer FUN_addcheckepc(const TopoDS_Shape& ed,const TopoDS_Shape& f) {
|
||||
Standard_Integer ie = 0;
|
||||
ie = STATIC_PURGE_mapeds.FindIndex(ed);
|
||||
if (ie == 0) ie = FUN_addepc(ed,f);
|
||||
return ie;
|
||||
}
|
||||
Standard_IMPORT Standard_Integer FUN_adds(const TopoDS_Shape& s);
|
||||
|
||||
Standard_EXPORT void FUN_tool_tori(const TopAbs_Orientation Or)
|
||||
{
|
||||
|
@@ -23,14 +23,6 @@
|
||||
#include <TopAbs_State.hxx>
|
||||
#include <TopTrans_SurfaceTransition.hxx>
|
||||
|
||||
#define Msr Standard_Real
|
||||
#define Msi Standard_Integer
|
||||
#define Msb Standard_Boolean
|
||||
#define Msf Standard_False
|
||||
#define Mst Standard_True
|
||||
#define MTAo TopAbs_Orientation
|
||||
#define MTAs TopAbs_State
|
||||
|
||||
static Standard_Boolean STATIC_DEFINED = Standard_False;
|
||||
|
||||
static gp_Dir FUN_nCinsideS(const gp_Dir& tgC, const gp_Dir& ngS)
|
||||
|
@@ -40,25 +40,6 @@ IMPLEMENT_STANDARD_RTTIEXT(VrmlData_Geometry,VrmlData_Node)
|
||||
#pragma warning (disable:4996)
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//=======================================================================
|
||||
//function : Value
|
||||
//purpose :
|
||||
|
@@ -46,17 +46,6 @@
|
||||
#include <TShort_HArray1OfShortReal.hxx>
|
||||
#include <VrmlData_Appearance.hxx>
|
||||
|
||||
//=======================================================================
|
||||
//function : IsEqual
|
||||
//purpose : for NCollection_DataMap interface
|
||||
//=======================================================================
|
||||
|
||||
inline Standard_Boolean IsEqual (const TopoDS_Shape& one,
|
||||
const TopoDS_Shape& two)
|
||||
{
|
||||
return one == two;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : AddShape
|
||||
//purpose :
|
||||
|
@@ -1,7 +1,6 @@
|
||||
WNT_ClassDefinitionError.hxx
|
||||
WNT_Dword.hxx
|
||||
WNT_OrientationType.hxx
|
||||
WNT_Uint.hxx
|
||||
WNT_WClass.cxx
|
||||
WNT_WClass.hxx
|
||||
WNT_Window.cxx
|
||||
|
@@ -1,44 +0,0 @@
|
||||
// Copyright (c) 1996-1999 Matra Datavision
|
||||
// Copyright (c) 1999-2014 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef __WNT_Uint_HeaderFile
|
||||
# define __WNT_Uint_HeaderFile
|
||||
|
||||
// Purpose: Defines a Windows NT UINT type.
|
||||
|
||||
# ifndef __WINDOWS_H_INCLUDED
|
||||
# define __WINDOWS_H_INCLUDED
|
||||
# ifndef STRICT
|
||||
# define STRICT
|
||||
# endif /* STRICT */
|
||||
# define WIN32_LEAN_AND_MEAN
|
||||
# include <windows.h>
|
||||
|
||||
#ifdef DrawText
|
||||
#undef DrawText
|
||||
#endif
|
||||
|
||||
# ifdef THIS
|
||||
# undef THIS
|
||||
# endif // THIS
|
||||
# endif // __WINDOWS_H_INCLUDED
|
||||
|
||||
# ifndef __STANDARD_TYPE_HXX_INCLUDED
|
||||
# define __STANDARD_TYPE_HXX_INCLUDED
|
||||
# include <Standard_Type.hxx>
|
||||
# endif // __STANDARD_TYPE_HXX_INCLUDED
|
||||
|
||||
typedef UINT WNT_Uint;
|
||||
|
||||
#endif // __WNT_Uint_HeaderFile
|
@@ -30,7 +30,7 @@ IMPLEMENT_STANDARD_RTTIEXT(WNT_WClass, Standard_Transient)
|
||||
//=======================================================================
|
||||
WNT_WClass::WNT_WClass (const TCollection_AsciiString& theClassName,
|
||||
const Standard_Address theWndProc,
|
||||
const WNT_Uint& theStyle,
|
||||
const unsigned int theStyle,
|
||||
const Standard_Integer theClassExtra,
|
||||
const Standard_Integer theWindowExtra,
|
||||
const Aspect_Handle theCursor,
|
||||
@@ -43,7 +43,7 @@ WNT_WClass::WNT_WClass (const TCollection_AsciiString& theClassName,
|
||||
const TCollection_ExtendedString aClassNameW (theClassName);
|
||||
const TCollection_ExtendedString aMenuNameW (theMenuName);
|
||||
WNDCLASSW aWinClass;
|
||||
aWinClass.style = theStyle;
|
||||
aWinClass.style = (UINT)theStyle;
|
||||
aWinClass.lpfnWndProc = theWndProc != NULL ? (WNDPROC )theWndProc : DefWindowProcW;
|
||||
aWinClass.cbClsExtra = theClassExtra;
|
||||
aWinClass.cbWndExtra = theWindowExtra;
|
||||
|
@@ -28,7 +28,6 @@
|
||||
#include <Standard_Transient.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
#include <TCollection_AsciiString.hxx>
|
||||
#include <WNT_Uint.hxx>
|
||||
|
||||
//! This class defines a Windows NT window class.
|
||||
//! A window in Windows NT is always created based on a
|
||||
@@ -58,7 +57,7 @@ public:
|
||||
//! Creates a Windows NT window class and registers it.
|
||||
Standard_EXPORT WNT_WClass (const TCollection_AsciiString& theClassName,
|
||||
const Standard_Address theWndProc,
|
||||
const WNT_Uint& theStyle,
|
||||
const unsigned int theStyle,
|
||||
const Standard_Integer theClassExtra = 0,
|
||||
const Standard_Integer theWindowExtra = 0,
|
||||
const Aspect_Handle theCursor = NULL,
|
||||
|
@@ -68,11 +68,6 @@
|
||||
#include <XSDRAWSTLVRML_DataSource3D.hxx>
|
||||
#include <XSDRAWSTLVRML_DrawableMesh.hxx>
|
||||
|
||||
// avoid warnings on 'extern "C"' functions returning C++ classes
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(4:4190)
|
||||
#endif
|
||||
|
||||
#ifndef _STDIO_H
|
||||
#include <stdio.h>
|
||||
#endif
|
||||
|
@@ -34,7 +34,10 @@ class gp_XYZ;
|
||||
class gp_Ax1;
|
||||
class gp_Ax2;
|
||||
|
||||
|
||||
// Avoid possible conflict with SetForm macro defined by windows.h
|
||||
#ifdef SetForm
|
||||
#undef SetForm
|
||||
#endif
|
||||
|
||||
//! Defines a non-persistent transformation in 3D space.
|
||||
//! This transformation is a general transformation.
|
||||
|
@@ -35,6 +35,11 @@ class gp_Quaternion;
|
||||
class gp_Ax3;
|
||||
class gp_Vec;
|
||||
|
||||
// Avoid possible conflict with SetForm macro defined by windows.h
|
||||
#ifdef SetForm
|
||||
#undef SetForm
|
||||
#endif
|
||||
|
||||
//! Defines a non-persistent transformation in 3D space.
|
||||
//! The following transformations are implemented :
|
||||
//! . Translation, Rotation, Scale
|
||||
|
Reference in New Issue
Block a user