Remove obsolete classes.

This commit is contained in:
jfa 2011-05-03 13:37:59 +00:00
parent f397db69cd
commit 54c20f308c
26 changed files with 22 additions and 1716 deletions

View File

@ -58,7 +58,6 @@
#include <NMTDS_IndexedDataMapOfShapeBndSphere.hxx>
#include <GEOMAlgo_IndexedDataMapOfIntegerShape.hxx>
#include <GEOMAlgo_Gluer.hxx>
#include <GEOMAlgo_PassKeyShape.hxx>
#include <GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape.hxx>
#include <GEOMAlgo_Tools.hxx>

View File

@ -1,70 +0,0 @@
-- Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
--
-- This library is free software; you can redistribute it and/or
-- modify it under the terms of the GNU Lesser General Public
-- License as published by the Free Software Foundation; either
-- version 2.1 of the License.
--
-- This library is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-- Lesser General Public License for more details.
--
-- You should have received a copy of the GNU Lesser General Public
-- License along with this library; if not, write to the Free Software
-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
--
-- See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
--
-- File: GEOMAlgo_Gluer1.cdl
-- Created: Wed Jan 24 11:37:31 2007
-- Author: Peter KURNEV
-- <pkv@irinox>
--
class Gluer1 from GEOMAlgo
inherits Gluer from GEOMAlgo
---Purpose:
uses
ListOfCoupleOfShapes from GEOMAlgo,
DataMapOfPassKeyShapeShape from GEOMAlgo
--raises
is
Create
returns Gluer1 from GEOMAlgo;
---C++: alias "Standard_EXPORT virtual ~GEOMAlgo_Gluer1();"
SetFacesToUnglue(me:out;
aLCS:ListOfCoupleOfShapes from GEOMAlgo);
FacesToUnglue(me)
returns ListOfCoupleOfShapes from GEOMAlgo;
---C++: return const&
GluedFaces(me)
returns ListOfCoupleOfShapes from GEOMAlgo;
---C++: return const&
RejectedFaces(me)
returns ListOfCoupleOfShapes from GEOMAlgo;
---C++: return const&
Perform(me:out)
is redefined;
UnglueFaces(me:out);
FillGluedFaces(me:out)
is protected;
fields
myGluedFaces :ListOfCoupleOfShapes from GEOMAlgo is protected;
myFacesToUnglue :ListOfCoupleOfShapes from GEOMAlgo is protected;
myRejectedFaces :ListOfCoupleOfShapes from GEOMAlgo is protected;
myMapGN :DataMapOfPassKeyShapeShape from GEOMAlgo is protected;
end Gluer1;

View File

@ -1,541 +0,0 @@
// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
// File: GEOMAlgo_Gluer1.cxx
// Created: Wed Jan 24 11:52:27 2007
// Author: Peter KURNEV
// <pkv@irinox>
//
#include <GEOMAlgo_Gluer1.ixx>
#include <Geom_Surface.hxx>
#include <TopLoc_Location.hxx>
#include <TopoDS.hxx>
#include <TopoDS_Shape.hxx>
#include <TopoDS_Face.hxx>
#include <TopoDS_Iterator.hxx>
#include <BRep_Builder.hxx>
#include <BRep_Tool.hxx>
#include <TopExp.hxx>
#include <TopTools_DataMapIteratorOfDataMapOfShapeShape.hxx>
#include <TopTools_DataMapIteratorOfDataMapOfShapeListOfShape.hxx>
#include <TopTools_ListOfShape.hxx>
#include <TopTools_ListIteratorOfListOfShape.hxx>
#include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
#include <TopTools_MapOfShape.hxx>
#include <TopTools_MapOfShape.hxx>
#include <TopTools_DataMapOfShapeShape.hxx>
#include <GEOMAlgo_CoupleOfShapes.hxx>
#include <GEOMAlgo_PassKeyShape.hxx>
#include <GEOMAlgo_ListIteratorOfListOfCoupleOfShapes.hxx>
#include <GEOMAlgo_DataMapOfPassKeyShapeShape.hxx>
#include <GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyShapeShape.hxx>
//=======================================================================
//class : GEOMAlgo_CoupleOfInteger
//purpose :
//=======================================================================
class GEOMAlgo_CoupleOfInteger {
//
public:
//
GEOMAlgo_CoupleOfInteger() {
myInt1=0;
myInt2=0;
}
//
~GEOMAlgo_CoupleOfInteger() {
}
//
void SetValues(const Standard_Integer aI1,
const Standard_Integer aI2) {
myInt1=aI1;
myInt2=aI2;
}
//
void SetValue1(const Standard_Integer aI1) {
myInt1=aI1;
}
//
void SetValue2(const Standard_Integer aI1) {
myInt1=aI1;
}
//
void Values(Standard_Integer& aI1,
Standard_Integer& aI2) const {
aI1=myInt1;
aI2=myInt2;
}
//
Standard_Integer Value1()const {
return myInt1;
}
//
Standard_Integer Value2()const {
return myInt2;
}
//
protected:
Standard_Integer myInt1;
Standard_Integer myInt2;
};
//
//=======================================================================
//
static
void SortShell(const Standard_Integer ,
GEOMAlgo_CoupleOfInteger* );
static
void RefineSolid(const TopoDS_Shape& ,
const TopTools_DataMapOfShapeShape& ,
TopTools_DataMapOfShapeShape& );
static
void MakeFaceToReplace(const TopoDS_Face& ,
TopoDS_Face& );
//
//=======================================================================
//function : GEOMAlgo_Gluer1
//purpose :
//=======================================================================
GEOMAlgo_Gluer1::GEOMAlgo_Gluer1()
:
GEOMAlgo_Gluer()
{
}
//=======================================================================
//function :
//purpose :
//=======================================================================
GEOMAlgo_Gluer1::~GEOMAlgo_Gluer1()
{
}
//=======================================================================
//function : SetFacesToUnglue
//purpose :
//=======================================================================
void GEOMAlgo_Gluer1::SetFacesToUnglue(const GEOMAlgo_ListOfCoupleOfShapes& aLCS)
{
myFacesToUnglue=aLCS;
}
//=======================================================================
//function : FacesToUnglue
//purpose :
//=======================================================================
const GEOMAlgo_ListOfCoupleOfShapes& GEOMAlgo_Gluer1::FacesToUnglue()const
{
return myFacesToUnglue;
}
//=======================================================================
//function : GluedFaces
//purpose :
//=======================================================================
const GEOMAlgo_ListOfCoupleOfShapes& GEOMAlgo_Gluer1::GluedFaces()const
{
return myGluedFaces;
}
//=======================================================================
//function : RejectedFaces
//purpose :
//=======================================================================
const GEOMAlgo_ListOfCoupleOfShapes& GEOMAlgo_Gluer1::RejectedFaces()const
{
return myRejectedFaces;
}
//=======================================================================
//function : Perform
//purpose :
//=======================================================================
void GEOMAlgo_Gluer1::Perform()
{
// 1.
GEOMAlgo_Gluer::Perform();
if (myErrorStatus) {
return;
}
//
FillGluedFaces();
if (myErrorStatus) {
return;
}
}
//=======================================================================
//function : FillGluedFaces
//purpose :
//=======================================================================
void GEOMAlgo_Gluer1::FillGluedFaces()
{
myErrorStatus=0;
//
Standard_Integer aNbIm, aNbS, i;
TopAbs_ShapeEnum aType;
TopTools_ListIteratorOfListOfShape aItLS;
TopTools_DataMapIteratorOfDataMapOfShapeListOfShape aItIm;
GEOMAlgo_CoupleOfShapes aCS;
GEOMAlgo_PassKeyShape aPKS;
//
myMapGN.Clear();
myGluedFaces.Clear();
//
aNbIm=myImages.Extent();
aItIm.Initialize(myImages);
for (; aItIm.More(); aItIm.Next()) {
const TopoDS_Shape& aSnew=aItIm.Key();
aType=aSnew.ShapeType();
if (aType!=TopAbs_FACE) {
continue;
}
//
const TopTools_ListOfShape& aLS=aItIm.Value();
aNbS=aLS.Extent();
if (aNbS!=2) {
continue;
}
//
TopoDS_Shape aSold[2];
aItLS.Initialize(aLS);
for (i=0; aItLS.More(); aItLS.Next(), ++i) {
// const TopoDS_Shape& aSi=aItLS.Value();
aSold[i]=aItLS.Value();
}
//
aCS.SetShapes(aSold[0], aSold[1]);
myGluedFaces.Append(aCS);
//
aPKS.Clear();
aPKS.SetShapes(aSold[0], aSold[1]);
myMapGN.Bind(aPKS, aSnew);
}
}
//=======================================================================
//function : UnglueFaces
//purpose :
//=======================================================================
void GEOMAlgo_Gluer1::UnglueFaces()
{
if (myErrorStatus) {
return;
}
//
Standard_Boolean bFound;
Standard_Integer i, aNbUN, aNbS, aNbF, iX;
TopTools_IndexedDataMapOfShapeListOfShape aMFSR, aMFS, aMSF;
TopTools_ListIteratorOfListOfShape aItLS, aItLS1;
GEOMAlgo_PassKeyShape aPKS;
GEOMAlgo_ListIteratorOfListOfCoupleOfShapes aItCS;
GEOMAlgo_DataMapOfPassKeyShapeShape aMapUN;
GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyShapeShape aItUN;
GEOMAlgo_CoupleOfInteger *pIx;
//
if (myResult.IsNull()) {
myErrorStatus=200; // no result
return;
}
myWarningStatus=0;
myRejectedFaces.Clear();
//
// 0. Fill map [Face]/Solid for myResult: aMFSR
TopExp::MapShapesAndAncestors(myResult, TopAbs_FACE, TopAbs_SOLID, aMFSR);
//
// 1. Fill Faces to process: aMapUN : [Fold1, Fold2] / Fnew
aNbUN=myFacesToUnglue.Extent();
if (!aNbUN) {
// all faces that can be unglued will be unglued
aMapUN=myMapGN;
myFacesToUnglue=myGluedFaces;
}
else {
aItCS.Initialize(myFacesToUnglue);
for (; aItCS.More(); aItCS.Next()) {
const GEOMAlgo_CoupleOfShapes& aCS=aItCS.Value();
const TopoDS_Shape& aS1=aCS.Shape1();
const TopoDS_Shape& aS2=aCS.Shape2();
aPKS.Clear();
aPKS.SetShapes(aS1, aS2);
if (!myMapGN.IsBound(aPKS)) {
//some faces, wanted to unglue, are not glued at all;
myWarningStatus=2;
myRejectedFaces.Append(aCS);
continue;
}
//
const TopoDS_Shape& aFN=myMapGN.Find(aPKS);
aMapUN.Bind(aPKS, aFN);
}
}
//
// 2 Fill map FN/Solids for myResult: aMFS
aNbUN=aMapUN.Extent();
aItUN.Initialize(aMapUN);
for (; aItUN.More(); aItUN.Next()) {
const TopoDS_Shape& aFN=aItUN.Value();
if (!aMFSR.Contains(aFN)) {
myWarningStatus=3; // how can it be
continue;
}
//
const TopTools_ListOfShape& aLS=aMFSR.FindFromKey(aFN);
aNbS=aLS.Extent();
if (aNbS!=2) {
// wrong result: More than 2 solids shared one face
myWarningStatus=4;
continue;
}
aMFS.Add(aFN, aLS);
}
//
// 3 Fill map Solids/FN for myResult: aMSF
aNbUN=aMFS.Extent();
for (i=1; i<=aNbUN; ++i) {
const TopoDS_Shape& aFN=aMFS.FindKey(i);
const TopTools_ListOfShape& aLS=aMFS(i);
aItLS.Initialize(aLS);
for (; aItLS.More(); aItLS.Next()) {
const TopoDS_Shape& aS=aItLS.Value();
if (aMSF.Contains(aS)) {
TopTools_ListOfShape& aLF=aMSF.ChangeFromKey(aS);
aLF.Append(aFN);
}
else {
TopTools_ListOfShape aLF;
aLF.Append(aFN);
aMSF.Add(aS, aLF);
}
}
}
//
// 4 Sort indices of aMSF
aNbS=aMSF.Extent();
if (aNbS<2) {
// wrong number of solids that have shared face
myWarningStatus=5;
}
//
pIx=new GEOMAlgo_CoupleOfInteger[aNbS];
//
for (i=1; i<=aNbS; ++i) {
const TopTools_ListOfShape& aLF=aMSF(i);
aNbF=aLF.Extent();
pIx[i-1].SetValues(aNbF, i);
}
SortShell(aNbS, pIx);
//
// 5 Refine solids
//
TopTools_DataMapOfShapeShape aMFNFN2, aMFNFD;
TopTools_DataMapIteratorOfDataMapOfShapeShape aItMSS;
TopTools_MapOfShape aMFNP;
TopTools_IndexedMapOfShape aMFD;
//
for (iX=aNbS-1; iX>=0; --iX) {
i=pIx[iX].Value2();
// solid from myResult aSN
const TopoDS_Shape& aSN=aMSF.FindKey(i);
//
// candidates to be faces to replace for aSN
const TopTools_ListOfShape& aLFN=aMSF(i);
aNbF=aLFN.Extent();
//
// original solid for aSN -> aSD
const TopTools_ListOfShape& aLSD=myImages.Find(aSN);
const TopoDS_Shape& aSD=aLSD.First();
//
// faces of original solid -> aMFD
aMFD.Clear();
TopExp::MapShapes(aSD, TopAbs_FACE, aMFD);
//
// faces to replace for aSN [FN]/FD -> aMFNFD
aMFNFD.Clear();
aItLS.Initialize(aLFN);
for (; aItLS.More(); aItLS.Next()) {
const TopoDS_Shape& aFN=aItLS.Value();
if (!aMFNP.Add(aFN)) {
continue;
}
//
// original face from original solid -> FD
TopoDS_Shape aFD;
//
bFound=Standard_False;
const TopTools_ListOfShape& aLFD=myImages.Find(aFN);
aItLS1.Initialize(aLFD);
for (; aItLS1.More(); aItLS1.Next()) {
const TopoDS_Shape& aFDx=aItLS1.Value();
if (aMFD.Contains(aFDx)) {
aFD=aFDx;
bFound=Standard_True;
break;
}
}
//if (!bFound) {...}
aMFNFD.Bind(aFN, aFD);
} // for (; aItLS.More(); aItLS.Next()) {
//
aNbF=aMFNFD.Extent();
if (!aNbF) {
// nothing to do here
continue;
}
// update solid SN (and its shells)
RefineSolid(aSN, aMFNFD, aMFNFN2);
//
// update myOrigins / myImages
aItMSS.Initialize(aMFNFD);
for (; aItMSS.More(); aItMSS.Next()) {
const TopoDS_Shape& aFN=aItMSS.Key(); // face removed from aSN
const TopoDS_Shape& aFD=aItMSS.Value(); // old face from aSD
const TopoDS_Shape& aFN2=aMFNFN2.Find(aFN);// face added to aSN
//
// myOrigins
myOrigins.ChangeFind(aFD)=aFN2;
//
// myImages
TopTools_ListOfShape aLFDx;
//
TopTools_ListOfShape& aLFD=myImages.ChangeFind(aFN);
aItLS.Initialize(aLFD);
for (; aItLS.More(); aItLS.Next()) {
const TopoDS_Shape& aFDx=aItLS.Value();
if (!aFDx.IsSame(aFD)) {
aLFDx.Append(aFDx);
}
}
aLFD=aLFDx;
//
aLFDx.Clear();
aLFDx.Append(aFD);
myImages.Bind(aFN2, aLFDx);
} // for (; aItMSS.More(); aItMSS.Next()) {
} // for (iX=aNbS-1; iX>=0; --iX) {
//
delete [] pIx;
}
//=======================================================================
// function: RefineSolid
// purpose : replace faces (aMFN) of solid aSd by new ones
//=======================================================================
void RefineSolid(const TopoDS_Shape& aSd,
const TopTools_DataMapOfShapeShape& aMFNFD,
TopTools_DataMapOfShapeShape& aMFNFN2)
{
TopoDS_Shape *pSh;
TopoDS_Face aF2;
TopoDS_Iterator aItSd, aItSh;
BRep_Builder aBB;
TopTools_ListOfShape aLF;
TopTools_ListIteratorOfListOfShape aItLF;
//
aItSd.Initialize(aSd);
for (; aItSd.More(); aItSd.Next()) {
const TopoDS_Shape& aSh=aItSd.Value();
pSh=(TopoDS_Shape *)&aSh;
pSh->Free(Standard_True);
aLF.Clear();
aItSh.Initialize(*pSh);
for (; aItSh.More(); aItSh.Next()) {
const TopoDS_Shape& aF=aItSh.Value();
if (aMFNFD.IsBound(aF)) {
aLF.Append(aF);
}
}
//
aItLF.Initialize(aLF);
for (; aItLF.More(); aItLF.Next()) {
const TopoDS_Face& aF=TopoDS::Face(aItLF.Value());
//
MakeFaceToReplace(aF, aF2);
//
aMFNFN2.Bind(aF, aF2);
aBB.Remove(*pSh, aF);
aBB.Add(*pSh, aF2);
}
pSh->Free(Standard_False);
}
}
//=======================================================================
//function : MakeFaceToReplace
//purpose :
//=======================================================================
void MakeFaceToReplace(const TopoDS_Face& aF,
TopoDS_Face& aFR)
{
Standard_Real aTol;
Handle(Geom_Surface) aS;
TopLoc_Location aLoc;
TopoDS_Face aFFWD, aFnew;
TopoDS_Iterator aItF;
BRep_Builder aBB;
//
aFFWD=aF;
aFFWD.Orientation(TopAbs_FORWARD);
aS=BRep_Tool::Surface(aFFWD, aLoc);
aTol=BRep_Tool::Tolerance(aFFWD);
//
aBB.MakeFace (aFnew, aS, aLoc, aTol);
aItF.Initialize(aFFWD);
for (; aItF.More(); aItF.Next()) {
const TopoDS_Shape& aW=aItF.Value();
aBB.Add(aFnew, aW);
}
aFnew.Orientation(aF.Orientation());
aFR=aFnew;
}
//=======================================================================
// function: SortShell
// purpose :
//=======================================================================
void SortShell(const Standard_Integer n,
GEOMAlgo_CoupleOfInteger* a)
{
Standard_Integer nd, i, j, l, d=1;
GEOMAlgo_CoupleOfInteger x;
//
while(d<=n) {
d*=2;
}
//
while (d) {
d=(d-1)/2;
//
nd=n-d;
for (i=0; i<nd; ++i) {
j=i;
m30:;
l=j+d;
if (a[l].Value1() < a[j].Value1()) {
x=a[j];
a[j]=a[l];
a[l]=x;
j-=d;
if (j > -1) {
goto m30;
}
}//if (a[l] < a[j]){
}//for (i=0; i<nd; ++i)
}//while (1)
}
//
// ErrorStatus
//
// 200; - result shape is Null

View File

@ -1,125 +0,0 @@
// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
#ifndef _GEOMAlgo_Gluer1_HeaderFile
#define _GEOMAlgo_Gluer1_HeaderFile
#ifndef _GEOMAlgo_ListOfCoupleOfShapes_HeaderFile
#include <GEOMAlgo_ListOfCoupleOfShapes.hxx>
#endif
#ifndef _GEOMAlgo_DataMapOfPassKeyShapeShape_HeaderFile
#include <GEOMAlgo_DataMapOfPassKeyShapeShape.hxx>
#endif
#ifndef _GEOMAlgo_Gluer_HeaderFile
#include <GEOMAlgo_Gluer.hxx>
#endif
class GEOMAlgo_ListOfCoupleOfShapes;
#ifndef _Standard_HeaderFile
#include <Standard.hxx>
#endif
#ifndef _Standard_Macro_HeaderFile
#include <Standard_Macro.hxx>
#endif
class GEOMAlgo_Gluer1 : public GEOMAlgo_Gluer {
public:
void* operator new(size_t,void* anAddress)
{
return anAddress;
}
void* operator new(size_t size)
{
return Standard::Allocate(size);
}
void operator delete(void *anAddress)
{
if (anAddress) Standard::Free((Standard_Address&)anAddress);
}
// Methods PUBLIC
//
Standard_EXPORT GEOMAlgo_Gluer1();
Standard_EXPORT virtual ~GEOMAlgo_Gluer1();
Standard_EXPORT void SetFacesToUnglue(const GEOMAlgo_ListOfCoupleOfShapes& aLCS) ;
Standard_EXPORT const GEOMAlgo_ListOfCoupleOfShapes& FacesToUnglue() const;
Standard_EXPORT const GEOMAlgo_ListOfCoupleOfShapes& GluedFaces() const;
Standard_EXPORT const GEOMAlgo_ListOfCoupleOfShapes& RejectedFaces() const;
Standard_EXPORT virtual void Perform() ;
Standard_EXPORT void UnglueFaces() ;
protected:
// Methods PROTECTED
//
Standard_EXPORT void FillGluedFaces() ;
// Fields PROTECTED
//
GEOMAlgo_ListOfCoupleOfShapes myGluedFaces;
GEOMAlgo_ListOfCoupleOfShapes myFacesToUnglue;
GEOMAlgo_ListOfCoupleOfShapes myRejectedFaces;
GEOMAlgo_DataMapOfPassKeyShapeShape myMapGN;
private:
// Methods PRIVATE
//
// Fields PRIVATE
//
};
// other Inline functions and methods (like "C++: function call" methods)
//
#endif

View File

@ -1,24 +0,0 @@
// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
#include <GEOMAlgo_Gluer1.jxx>

View File

@ -1,25 +0,0 @@
// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
#ifndef _GEOMAlgo_ListOfCoupleOfShapes_HeaderFile
#include <GEOMAlgo_ListOfCoupleOfShapes.hxx>
#endif
#ifndef _GEOMAlgo_Gluer1_HeaderFile
#include <GEOMAlgo_Gluer1.hxx>
#endif

View File

@ -224,9 +224,9 @@ void GEOMAlgo_Gluer2::MakeEdge(const TopoDS_Edge& aE,
Standard_Real aTol;
BRep_Builder aBB;
TopoDS_Edge E;
TopAbs_Orientation anOrE;
//TopAbs_Orientation anOrE;
//
anOrE=aE.Orientation();
//anOrE=aE.Orientation();
aTol=BRep_Tool::Tolerance(aE);
//
E=aEx;
@ -294,7 +294,7 @@ void GEOMAlgo_Gluer2::MakeVertex(const TopTools_ListOfShape& aLV,
void GEOMAlgo_Gluer2::MapBRepShapes(const TopoDS_Shape& aS,
TopTools_MapOfShape& aM)
{
Standard_Boolean bHasBRep;
//Standard_Boolean bHasBRep;
TopAbs_ShapeEnum aType;
TopoDS_Iterator aIt;
//

View File

@ -40,7 +40,7 @@
//=======================================================================
void GEOMAlgo_Gluer2::PrepareHistory()
{
Standard_Boolean bHasImage, bContainsSD;
//Standard_Boolean bHasImage, bContainsSD;
//
// 1. Clearing
GEOMAlgo_BuilderShape::PrepareHistory();

View File

@ -155,7 +155,7 @@ void GEOMAlgo_Gluer2::PerformShapesToWork()
// 1. Make pairs
aItDMSLS.Initialize(myShapesToGlue);
for (; aItDMSLS.More(); aItDMSLS.Next()) {
const TopoDS_Shape& aSkey=aItDMSLS.Key();
//const TopoDS_Shape& aSkey=aItDMSLS.Key();
const TopTools_ListOfShape& aLSG=aItDMSLS.Value();
aItLS1.Initialize(aLSG);
for (i=0; aItLS1.More(); aItLS1.Next(), ++i) {
@ -309,7 +309,7 @@ void GEOMAlgo_Gluer2::TreatPair(const NMTTools_CoupleOfShape& aCS,
// 3.
aItDMSLS.Initialize(aDMSLS);
for (; aItDMSLS.More(); aItDMSLS.Next()) {
const TopoDS_Shape& aSkey=aItDMSLS.Key();
//const TopoDS_Shape& aSkey=aItDMSLS.Key();
const TopTools_ListOfShape& aLS=aItDMSLS.Value();
aNbS=aLS.Extent();
if (aNbS!=2) {

View File

@ -81,7 +81,6 @@ dist_libGEOMAlgo_la_SOURCES = \
GEOMAlgo_Gluer2_2.cxx \
GEOMAlgo_Gluer2_3.cxx \
GEOMAlgo_GluerAlgo.cxx \
GEOMAlgo_Gluer1.cxx \
GEOMAlgo_HAlgo.cxx \
GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape_0.cxx \
GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape_0.cxx \
@ -223,9 +222,6 @@ salomeinclude_HEADERS = \
GEOMAlgo_Gluer.hxx \
GEOMAlgo_Gluer.ixx \
GEOMAlgo_Gluer.jxx \
GEOMAlgo_Gluer1.hxx \
GEOMAlgo_Gluer1.ixx \
GEOMAlgo_Gluer1.jxx \
GEOMAlgo_GlueDetector.hxx \
GEOMAlgo_Gluer2.hxx \
GEOMAlgo_GluerAlgo.hxx \
@ -381,7 +377,6 @@ CDL_FILES = \
GEOMAlgo_FinderShapeOn2.cdl \
GEOMAlgo_GlueAnalyser.cdl \
GEOMAlgo_Gluer.cdl \
GEOMAlgo_Gluer1.cdl \
GEOMAlgo_HAlgo.cdl \
GEOMAlgo_PassKey.cdl \
GEOMAlgo_PassKeyMapHasher.cdl \

View File

@ -18,7 +18,6 @@
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
#include <Standard_Stream.hxx>
@ -37,7 +36,7 @@
#include <ShHealOper_Sewing.hxx>
#include <ShHealOper_ShapeProcess.hxx>
#include <GEOMAlgo_Gluer.hxx>
//#include <GEOMAlgo_Gluer.hxx>
#include <BlockFix_BlockFixAPI.hxx>
#include "utilities.h"
@ -436,7 +435,6 @@ Standard_Integer GEOMImpl_BlockDriver::Execute(TFunction_Logbook& log) const
BRepTools_Quilt Glue;
if (aType == BLOCK_SIX_FACES) {
// Make block (hexahedral solid) from six faces
for (Standard_Integer ind = 1; ind <= nbshapes; ind++) {
if (anArgs(ind).ShapeType() != TopAbs_FACE) {
@ -445,8 +443,8 @@ Standard_Integer GEOMImpl_BlockDriver::Execute(TFunction_Logbook& log) const
Glue.Add(anArgs(ind));
}
} else {
}
else {
// Make block (hexahedral solid) from two opposite faces
if (anArgs(1).ShapeType() != TopAbs_FACE ||
anArgs(2).ShapeType() != TopAbs_FACE) {
@ -530,9 +528,8 @@ Standard_Integer GEOMImpl_BlockDriver::Execute(TFunction_Logbook& log) const
}
aShape = Sol;
BRepLib::SameParameter(aShape, 1.E-5, Standard_True);
} else if (aType == BLOCK_COMPOUND_GLUE) {
}
else if (aType == BLOCK_COMPOUND_GLUE) {
// Make blocks compound from a compound
if (anArgs(1).ShapeType() != TopAbs_COMPOUND &&
anArgs(2).ShapeType() != TopAbs_COMPSOLID) {
@ -541,23 +538,15 @@ Standard_Integer GEOMImpl_BlockDriver::Execute(TFunction_Logbook& log) const
TopoDS_Shape aCompound = anArgs(1);
// Glue coincident faces and edges (with Partition algorithm).
//NMTAlgo_Splitter1 PS;
//PS.AddShape(aCompound);
//PS.Compute();
//PS.SetRemoveWebs(Standard_False);
// PS.Build(aCompound.ShapeType());
//PS.Build(TopAbs_SOLID);
//aShape = PS.Shape();
GEOMAlgo_Gluer aGluer;
aGluer.SetShape(aCompound);
aGluer.SetCheckGeometry(Standard_True);
aGluer.Perform();
aShape = aGluer.Result();
} else {
// Glue coincident faces and edges
aShape = GEOMImpl_GlueDriver::GlueFaces(aCompound, Precision::Confusion(), Standard_True);
//GEOMAlgo_Gluer aGluer;
//aGluer.SetShape(aCompound);
//aGluer.SetCheckGeometry(Standard_True);
//aGluer.Perform();
//aShape = aGluer.Result();
}
else {
}
} else { // Multi-transformations and compound improving

View File

@ -28,8 +28,8 @@
#include <GEOM_Object.hxx>
#include <GEOM_Function.hxx>
#include <GEOMAlgo_Gluer.hxx>
#include "GEOMAlgo_Gluer1.hxx"
//#include <GEOMAlgo_Gluer.hxx>
//#include "GEOMAlgo_Gluer1.hxx"
#include "GEOMAlgo_Gluer2.hxx"
#include "GEOMAlgo_ListIteratorOfListOfCoupleOfShapes.hxx"
#include "GEOMAlgo_CoupleOfShapes.hxx"

View File

@ -50,7 +50,6 @@
#include "GEOMAlgo_FinderShapeOn2.hxx"
#include "GEOMAlgo_ClsfBox.hxx"
#include "GEOMAlgo_ClsfSolid.hxx"
#include "GEOMAlgo_Gluer1.hxx"
#include "GEOMAlgo_GlueDetector.hxx"
#include "GEOMAlgo_ListIteratorOfListOfCoupleOfShapes.hxx"
#include "GEOMAlgo_CoupleOfShapes.hxx"

View File

@ -15,7 +15,6 @@
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
#include <Standard_Stream.hxx>
@ -30,7 +29,6 @@
#include "GEOMAlgo_FinderShapeOn1.hxx"
#include "GEOMAlgo_FinderShapeOn2.hxx"
#include <GEOMAlgo_ClsfBox.hxx>
#include <GEOMAlgo_Gluer.hxx>
#include <TFunction_Logbook.hxx>
#include <StdFail_NotDone.hxx>

View File

@ -159,18 +159,3 @@ CDL_FILES = \
NMTTools_Tools.cdl
EXTRA_DIST += $(CDL_FILES)
########################################
# Non-used (obsolete?) files
########################################
# NMTTools_PCurveMaker.cdl
# NMTTools_PCurveMaker.cxx
# NMTTools_PCurveMaker.hxx
# NMTTools_PCurveMaker.ixx
# NMTTools_PCurveMaker.jxx
# NMTTools_PDSFiller.hxx
# NMTTools_DSFiller.cdl
# NMTTools_DSFiller.cxx
# NMTTools_DSFiller.hxx
# NMTTools_DSFiller.ixx
# NMTTools_DSFiller.jxx

View File

@ -1,100 +0,0 @@
-- Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
--
-- Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
--
-- This library is free software; you can redistribute it and/or
-- modify it under the terms of the GNU Lesser General Public
-- License as published by the Free Software Foundation; either
-- version 2.1 of the License.
--
-- This library is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-- Lesser General Public License for more details.
--
-- You should have received a copy of the GNU Lesser General Public
-- License along with this library; if not, write to the Free Software
-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
--
-- See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
--
-- File: NMTTools_DSFiller.cdl
-- Created: Fri Dec 5 13:57:03 2003
-- Author: Peter KURNEV
-- <pkv@irinox>
--
class DSFiller from NMTTools
---Purpose:
uses
Shape from TopoDS,
InterferencePool from BOPTools,
PInterferencePool from BOPTools,
ShapesDataStructure from NMTDS,
PShapesDataStructure from NMTDS,
PPaveFiller from NMTTools,
PaveFiller from NMTTools
--raises
is
Create
returns DSFiller from NMTTools;
Destroy (me:out);
---C++: alias ~
---Purpose: Destructor
--
-- Selectors/Modifiers
SetCompositeShape (me:out;
aS: Shape from TopoDS);
CompositeShape(me)
returns Shape from TopoDS;
---C++: return const&
SetNewFiller(me;
aFlag:Boolean from Standard);
IsNewFiller(me)
returns Boolean from Standard;
--
-- Perform the algo
Perform (me:out);
--
-- Protected section
Clear (me:out)
is protected;
--
-- Query section
DS (me)
returns ShapesDataStructure from NMTDS;
---C++: return const &
InterfPool (me)
returns InterferencePool from BOPTools;
---C++: return const &
IsDone(me)
returns Boolean from Standard;
PaveFiller(me)
returns PaveFiller from NMTTools;
---C++: return const &
ChangePaveFiller (me:out)
returns PaveFiller from NMTTools;
---C++: return &
fields
myCompositeShape : Shape from TopoDS is protected;
myDS : PShapesDataStructure from NMTDS is protected;
myInterfPool : PInterferencePool from BOPTools is protected;
myPaveFiller : PPaveFiller from NMTTools is protected;
myIsDone : Boolean from Standard is protected;
myIsNewFiller : Boolean from Standard is protected;
end DSFiller;

View File

@ -1,170 +0,0 @@
// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
// File: NMTTools_DSFiller.cxx
// Created: Fri Dec 5 14:06:34 2003
// Author: Peter KURNEV
// <pkv@irinox>
//
#include <NMTTools_DSFiller.ixx>
#include <NMTTools_PaveFiller.hxx>
//=======================================================================
// function: NMTTools_DSFiller::NMTTools_DSFiller
// purpose:
//=======================================================================
NMTTools_DSFiller::NMTTools_DSFiller()
{
myPaveFiller=NULL;
myInterfPool=NULL;
myDS=NULL;
myIsNewFiller=Standard_True;
myIsDone=Standard_False;
}
//=======================================================================
// function:Destroy
// purpose:
//=======================================================================
void NMTTools_DSFiller::Destroy()
{
Clear();
}
//=======================================================================
// function: Clear
// purpose:
//=======================================================================
void NMTTools_DSFiller::Clear()
{
if (myPaveFiller!=NULL) {
delete myPaveFiller;
}
if (myInterfPool!=NULL) {
delete myInterfPool;
}
if (myDS!=NULL) {
delete myDS;
}
myPaveFiller=NULL;
myInterfPool=NULL;
myDS=NULL;
}
//=======================================================================
// function: SetCompositeShape
// purpose:
//=======================================================================
void NMTTools_DSFiller::SetCompositeShape(const TopoDS_Shape& aS)
{
myCompositeShape=aS;
}
//=======================================================================
// function: CompositeShape
// purpose:
//=======================================================================
const TopoDS_Shape& NMTTools_DSFiller::CompositeShape()const
{
return myCompositeShape;
}
//=======================================================================
// function: SetNewFiller
// purpose:
//=======================================================================
void NMTTools_DSFiller::SetNewFiller(const Standard_Boolean aFlag) const
{
NMTTools_DSFiller* pDSFiller=(NMTTools_DSFiller*)this;
pDSFiller->myIsNewFiller=aFlag;
}
//=======================================================================
// function: IsNewFiller
// purpose:
//=======================================================================
Standard_Boolean NMTTools_DSFiller::IsNewFiller() const
{
return myIsNewFiller;
}
//=======================================================================
// function: DS
// purpose:
//=======================================================================
const NMTDS_ShapesDataStructure& NMTTools_DSFiller::DS () const
{
return *myDS;
}
//=======================================================================
// function: InterfPool
// purpose:
//=======================================================================
const BOPTools_InterferencePool& NMTTools_DSFiller::InterfPool () const
{
return *myInterfPool;
}
//=======================================================================
// function: IsDone
// purpose:
//=======================================================================
Standard_Boolean NMTTools_DSFiller::IsDone()const
{
return myIsDone;
}
//=======================================================================
// function: PaveFiller
// purpose:
//=======================================================================
const NMTTools_PaveFiller& NMTTools_DSFiller::PaveFiller()const
{
return *myPaveFiller;
}
//=======================================================================
// function: ChangePaveFiller
// purpose:
//=======================================================================
NMTTools_PaveFiller& NMTTools_DSFiller::ChangePaveFiller()
{
return *myPaveFiller;
}
//=======================================================================
// function: Perform
// purpose:
//=======================================================================
void NMTTools_DSFiller::Perform()
{
myIsDone=Standard_False;
//
if (myCompositeShape.IsNull()) {
return;
}
//
//
// Clear contents of the DS if it was before
Clear();
//
myIsNewFiller=Standard_True;
//
myDS = new NMTDS_ShapesDataStructure;
myDS->SetCompositeShape(myCompositeShape);
myDS->Init();
//
myInterfPool= new BOPTools_InterferencePool (*myDS);
//
myPaveFiller = new NMTTools_PaveFiller(*myInterfPool);
myPaveFiller->Perform();
myIsDone=myPaveFiller->IsDone();
}

View File

@ -1,160 +0,0 @@
// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
#ifndef _NMTTools_DSFiller_HeaderFile
#define _NMTTools_DSFiller_HeaderFile
#ifndef _TopoDS_Shape_HeaderFile
#include <TopoDS_Shape.hxx>
#endif
#ifndef _NMTDS_PShapesDataStructure_HeaderFile
#include <NMTDS_PShapesDataStructure.hxx>
#endif
#ifndef _BOPTools_PInterferencePool_HeaderFile
#include <BOPTools_PInterferencePool.hxx>
#endif
#ifndef _NMTTools_PPaveFiller_HeaderFile
#include <NMTTools_PPaveFiller.hxx>
#endif
#ifndef _Standard_Boolean_HeaderFile
#include <Standard_Boolean.hxx>
#endif
class TopoDS_Shape;
class NMTDS_ShapesDataStructure;
class BOPTools_InterferencePool;
class NMTTools_PaveFiller;
#ifndef _Standard_HeaderFile
#include <Standard.hxx>
#endif
#ifndef _Standard_Macro_HeaderFile
#include <Standard_Macro.hxx>
#endif
class NMTTools_DSFiller {
public:
void* operator new(size_t,void* anAddress)
{
return anAddress;
}
void* operator new(size_t size)
{
return Standard::Allocate(size);
}
void operator delete(void *anAddress)
{
if (anAddress) Standard::Free((Standard_Address&)anAddress);
}
// Methods PUBLIC
//
Standard_EXPORT NMTTools_DSFiller();
//! Destructor <br>
//! <br>
//! Selectors/Modifiers <br>
Standard_EXPORT void Destroy() ;
~NMTTools_DSFiller()
{
Destroy();
}
Standard_EXPORT void SetCompositeShape(const TopoDS_Shape& aS) ;
Standard_EXPORT const TopoDS_Shape& CompositeShape() const;
Standard_EXPORT void SetNewFiller(const Standard_Boolean aFlag) const;
Standard_EXPORT Standard_Boolean IsNewFiller() const;
Standard_EXPORT void Perform() ;
Standard_EXPORT const NMTDS_ShapesDataStructure& DS() const;
Standard_EXPORT const BOPTools_InterferencePool& InterfPool() const;
Standard_EXPORT Standard_Boolean IsDone() const;
Standard_EXPORT const NMTTools_PaveFiller& PaveFiller() const;
Standard_EXPORT NMTTools_PaveFiller& ChangePaveFiller() ;
protected:
// Methods PROTECTED
//
Standard_EXPORT void Clear() ;
// Fields PROTECTED
//
TopoDS_Shape myCompositeShape;
NMTDS_PShapesDataStructure myDS;
BOPTools_PInterferencePool myInterfPool;
NMTTools_PPaveFiller myPaveFiller;
Standard_Boolean myIsDone;
Standard_Boolean myIsNewFiller;
private:
// Methods PRIVATE
//
// Fields PRIVATE
//
};
// other Inline functions and methods (like "C++: function call" methods)
//
#endif

View File

@ -1,27 +0,0 @@
// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
#include <NMTTools_DSFiller.jxx>

View File

@ -1,37 +0,0 @@
// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
#ifndef _TopoDS_Shape_HeaderFile
#include <TopoDS_Shape.hxx>
#endif
#ifndef _NMTDS_ShapesDataStructure_HeaderFile
#include <NMTDS_ShapesDataStructure.hxx>
#endif
#ifndef _BOPTools_InterferencePool_HeaderFile
#include <BOPTools_InterferencePool.hxx>
#endif
#ifndef _NMTTools_PaveFiller_HeaderFile
#include <NMTTools_PaveFiller.hxx>
#endif
#ifndef _NMTTools_DSFiller_HeaderFile
#include <NMTTools_DSFiller.hxx>
#endif

View File

@ -1,57 +0,0 @@
-- Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
--
-- Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
--
-- This library is free software; you can redistribute it and/or
-- modify it under the terms of the GNU Lesser General Public
-- License as published by the Free Software Foundation; either
-- version 2.1 of the License.
--
-- This library is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-- Lesser General Public License for more details.
--
-- You should have received a copy of the GNU Lesser General Public
-- License along with this library; if not, write to the Free Software
-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
--
-- See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
--
-- File: NMTTools_PCurveMaker.cdl
-- Created:
-- Author: Peter KURNEV
-- <pkv@irinox>
--
class PCurveMaker from NMTTools
---Purpose:
-- Class provides computation p-curves for the edges and theirs
--- split parts
uses
PDSFiller from NMTTools
is
Create (aFiller:out PDSFiller from NMTTools)
returns PCurveMaker from NMTTools;
---Purpose:
--- Constructor
---
Do(me:out);
---Purpose:
--- Launch the processor
---
IsDone(me)
returns Boolean from Standard;
---Purpose:
--- Returns TRUE if Ok
---
fields
myDSFiller: PDSFiller from NMTTools is protected;
myIsDone : Boolean from Standard is protected;
end PCurveMaker;

View File

@ -1,130 +0,0 @@
// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
// File: NMTTools_PCurveMaker.cxx
// Created:
// Author: Peter KURNEV
// <pkv@irinox>
//
#include <NMTTools_PCurveMaker.ixx>
#include <gp_Pnt2d.hxx>
#include <Precision.hxx>
#include <Geom_Curve.hxx>
#include <Geom_TrimmedCurve.hxx>
#include <Geom2d_Curve.hxx>
#include <GeomAdaptor_Curve.hxx>
#include <GeomAdaptor_HCurve.hxx>
#include <TopoDS.hxx>
#include <TopoDS_Face.hxx>
#include <TopoDS_Edge.hxx>
#include <TopoDS_Vertex.hxx>
#include <TopExp.hxx>
#include <TopTools_IndexedMapOfShape.hxx>
#include <BRep_Tool.hxx>
#include <BRep_Builder.hxx>
#include <BRepAdaptor_HSurface.hxx>
#include <NMTDS_ShapesDataStructure.hxx>
#include <NMTTools_DSFiller.hxx>
#include <IntTools_Curve.hxx>
#include <BOPTools_InterferencePool.hxx>
#include <BOPTools_CArray1OfSSInterference.hxx>
#include <BOPTools_SSInterference.hxx>
#include <BOPTools_ListOfPaveBlock.hxx>
#include <BOPTools_ListIteratorOfListOfPaveBlock.hxx>
#include <BOPTools_PaveBlock.hxx>
#include <BOPTools_Tools2D.hxx>
#include <NMTTools_PaveFiller.hxx>
//=======================================================================
// function: NMTTools_PCurveMaker
// purpose:
//=======================================================================
NMTTools_PCurveMaker::NMTTools_PCurveMaker(NMTTools_PDSFiller& pDSFiller)
:
myIsDone(Standard_False)
{
myDSFiller=pDSFiller;
}
//=======================================================================
// function: IsDone
// purpose:
//=======================================================================
Standard_Boolean NMTTools_PCurveMaker::IsDone() const
{
return myIsDone;
}
//=======================================================================
// function: Do
// purpose:
//=======================================================================
void NMTTools_PCurveMaker::Do()
{
Standard_Integer i, aNb, nF1, nF2, nE;
BOPTools_ListIteratorOfListOfPaveBlock anIt;
TopoDS_Face aF1FWD, aF2FWD;
//
NMTTools_PaveFiller *pFiller=(NMTTools_PaveFiller*) &(myDSFiller->PaveFiller());
NMTDS_ShapesDataStructure *pDS=pFiller->DS();
//
BOPTools_CArray1OfSSInterference& aFFs=(pFiller->InterfPool())->SSInterferences();
//
aNb=aFFs.Extent();
for (i=1; i<=aNb; ++i) {
BOPTools_SSInterference& aFF=aFFs(i);
// Faces
aFF.Indices(nF1, nF2);
const TopoDS_Face& aF1=TopoDS::Face(pDS->Shape(nF1));
const TopoDS_Face& aF2=TopoDS::Face(pDS->Shape(nF2));
//
// 1.Forwarding the Faces
aF1FWD=aF1;
aF1FWD.Orientation(TopAbs_FORWARD);
aF2FWD=aF2;
aF2FWD.Orientation(TopAbs_FORWARD);
//
// 2. In, On parts processing
const BOPTools_ListOfPaveBlock& aLPBInOn=aFF.PaveBlocks();
anIt.Initialize(aLPBInOn);
for (; anIt.More(); anIt.Next()) {
const BOPTools_PaveBlock& aPB=anIt.Value();
const BOPTools_PaveBlock& aPBInOn=pFiller->RealPaveBlock(aPB);
//
nE=aPBInOn.Edge();
const TopoDS_Edge& aE=TopoDS::Edge(pDS->Shape(nE));
BOPTools_Tools2D::BuildPCurveForEdgeOnFace(aE, aF1FWD);
BOPTools_Tools2D::BuildPCurveForEdgeOnFace(aE, aF2FWD);
}
} // for (i=1; i<=aNb; i++)
myIsDone=Standard_True;
}

View File

@ -1,111 +0,0 @@
// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
#ifndef _NMTTools_PCurveMaker_HeaderFile
#define _NMTTools_PCurveMaker_HeaderFile
#ifndef _NMTTools_PDSFiller_HeaderFile
#include <NMTTools_PDSFiller.hxx>
#endif
#ifndef _Standard_Boolean_HeaderFile
#include <Standard_Boolean.hxx>
#endif
#ifndef _Standard_HeaderFile
#include <Standard.hxx>
#endif
#ifndef _Standard_Macro_HeaderFile
#include <Standard_Macro.hxx>
#endif
//! Class provides computation p-curves for the edges and theirs <br>
//! split parts <br>
class NMTTools_PCurveMaker {
public:
void* operator new(size_t,void* anAddress)
{
return anAddress;
}
void* operator new(size_t size)
{
return Standard::Allocate(size);
}
void operator delete(void *anAddress)
{
if (anAddress) Standard::Free((Standard_Address&)anAddress);
}
// Methods PUBLIC
//
//! Constructor <br>
Standard_EXPORT NMTTools_PCurveMaker(NMTTools_PDSFiller& aFiller);
//! Launch the processor <br>
Standard_EXPORT void Do() ;
//! Returns TRUE if Ok <br>
Standard_EXPORT Standard_Boolean IsDone() const;
protected:
// Methods PROTECTED
//
// Fields PROTECTED
//
NMTTools_PDSFiller myDSFiller;
Standard_Boolean myIsDone;
private:
// Methods PRIVATE
//
// Fields PRIVATE
//
};
// other Inline functions and methods (like "C++: function call" methods)
//
#endif

View File

@ -1,27 +0,0 @@
// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
#include <NMTTools_PCurveMaker.jxx>

View File

@ -1,25 +0,0 @@
// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
#ifndef _NMTTools_PCurveMaker_HeaderFile
#include <NMTTools_PCurveMaker.hxx>
#endif

View File

@ -1,30 +0,0 @@
// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
#ifndef _NMTTools_PDSFiller_HeaderFile
#define _NMTTools_PDSFiller_HeaderFile
class NMTTools_DSFiller;
typedef NMTTools_DSFiller* NMTTools_PDSFiller;
#endif