本文整理汇总了C++中TopTools_ListIteratorOfListOfShape::Value方法的典型用法代码示例。如果您正苦于以下问题:C++ TopTools_ListIteratorOfListOfShape::Value方法的具体用法?C++ TopTools_ListIteratorOfListOfShape::Value怎么用?C++ TopTools_ListIteratorOfListOfShape::Value使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TopTools_ListIteratorOfListOfShape
的用法示例。
在下文中一共展示了TopTools_ListIteratorOfListOfShape::Value方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: PrepareHistory
//=======================================================================
//function : PrepareHistory
//purpose :
//=======================================================================
void GEOMAlgo_Builder::PrepareHistory()
{
if(myShape.IsNull()) {
return;
}
//
Standard_Boolean bHasImage, bContainsSD;
TopAbs_ShapeEnum aType;
TopTools_MapOfShape aMS;
TopTools_ListIteratorOfListOfShape aIt;
TopTools_MapIteratorOfMapOfShape aItM;
//
// 1. Clearing
GEOMAlgo_BuilderShape::PrepareHistory();
//
// 2. myMapShape - all shapes of result with theirs sub-shapes
MapShapes(myShape, myMapShape);
//
// 3. MS - all argument shapes with theirs sub-shapes
aIt.Initialize(myShapes);
for (; aIt.More(); aIt.Next()) {
const TopoDS_Shape& aSx=aIt.Value();
MapShapes(aSx, aMS);
}
//
// 4. Treatment
aItM.Initialize(aMS);
for (; aItM.More(); aItM.Next()) {
const TopoDS_Shape& aSx=aItM.Key();
aType=aSx.ShapeType();
//modified by NIZNHY-PKV Thu Dec 7 11:34:05 2006f
//
// 4.1 .myImagesResult
TopTools_ListOfShape aLSx;
//
bHasImage=myImages.HasImage(aSx);
if (!bHasImage) {
if (myMapShape.Contains(aSx)) {
aLSx.Append(aSx);
myImagesResult.Add(aSx, aLSx);
}
}
else {
const TopTools_ListOfShape& aLSp=myImages.Image(aSx);
aIt.Initialize(aLSp);
for (; aIt.More(); aIt.Next()) {
const TopoDS_Shape& aSp=aIt.Value();
if (myMapShape.Contains(aSp)) {
aLSx.Append(aSp);
}
}
myImagesResult.Add(aSx, aLSx);
}
//
//modified by NIZNHY-PKV Thu Dec 7 11:34:10 2006t
//
// 4.2 As it was
if (!myHasDeleted) {
myHasDeleted=IsDeleted(aSx);//xx
}
//
if (!myHasGenerated || !myHasModified) {
if (aType==TopAbs_EDGE || aType==TopAbs_FACE ||
aType==TopAbs_VERTEX || aType==TopAbs_SOLID) {
//modified by NIZNHY-PKV Thu Dec 7 11:53:01 2006f
//bHasImage=myImages.HasImage(aSx);
//modified by NIZNHY-PKV Thu Dec 7 11:53:04 2006t
if (bHasImage) {
const TopTools_ListOfShape& aLSp=myImages.Image(aSx);
aIt.Initialize(aLSp);
for (; aIt.More(); aIt.Next()) {
const TopoDS_Shape& aSp=aIt.Value();
//
if (myMapShape.Contains(aSp)) {
bContainsSD=mySameDomainShapes.Contains(aSp);
//
if (!myHasGenerated) {
if (bContainsSD) {
myHasGenerated=Standard_True;
}
}
if (!myHasModified) {
if (!bContainsSD) {
myHasModified=Standard_True;
}
}
} // if (myMapShape.Contains(aSp))
}
}
}
}
}
}
示例2: DocumentObjectExecReturn
App::DocumentObjectExecReturn *Sweep::execute(void)
{
if (Sections.getSize() == 0)
return new App::DocumentObjectExecReturn("No sections linked.");
App::DocumentObject* spine = Spine.getValue();
if (!(spine && spine->getTypeId().isDerivedFrom(Part::Feature::getClassTypeId())))
return new App::DocumentObjectExecReturn("No spine linked.");
const std::vector<std::string>& subedge = Spine.getSubValues();
TopoDS_Shape path;
const Part::TopoShape& shape = static_cast<Part::Feature*>(spine)->Shape.getValue();
if (!shape._Shape.IsNull()) {
try {
BRepBuilderAPI_MakeWire mkWire;
for (std::vector<std::string>::const_iterator it = subedge.begin(); it != subedge.end(); ++it) {
TopoDS_Shape subshape = shape.getSubShape(it->c_str());
mkWire.Add(TopoDS::Edge(subshape));
}
path = mkWire.Wire();
}
catch (Standard_Failure) {
if (shape._Shape.ShapeType() == TopAbs_EDGE)
path = shape._Shape;
else if (shape._Shape.ShapeType() == TopAbs_WIRE)
path = shape._Shape;
else
return new App::DocumentObjectExecReturn("Spine is neither an edge nor a wire.");
}
}
try {
TopTools_ListOfShape profiles;
const std::vector<App::DocumentObject*>& shapes = Sections.getValues();
std::vector<App::DocumentObject*>::const_iterator it;
for (it = shapes.begin(); it != shapes.end(); ++it) {
if (!(*it)->isDerivedFrom(Part::Feature::getClassTypeId()))
return new App::DocumentObjectExecReturn("Linked object is not a shape.");
const TopoDS_Shape& shape = static_cast<Part::Feature*>(*it)->Shape.getValue();
if (shape.IsNull())
return new App::DocumentObjectExecReturn("Linked shape is invalid.");
// There is a weird behaviour of BRepOffsetAPI_MakePipeShell when trying to add the wire as is.
// If we re-create the wire then everything works fine.
// https://sourceforge.net/apps/phpbb/free-cad/viewtopic.php?f=10&t=2673&sid=fbcd2ff4589f0b2f79ed899b0b990648#p20268
if (shape.ShapeType() == TopAbs_WIRE) {
BRepBuilderAPI_MakeWire mkWire(TopoDS::Wire(shape));
profiles.Append(mkWire.Wire());
}
else if (shape.ShapeType() == TopAbs_EDGE) {
BRepBuilderAPI_MakeWire mkWire(TopoDS::Edge(shape));
profiles.Append(mkWire.Wire());
}
else if (shape.ShapeType() == TopAbs_VERTEX) {
profiles.Append(shape);
}
else {
return new App::DocumentObjectExecReturn("Linked shape is not a vertex, edge nor wire.");
}
}
Standard_Boolean isSolid = Solid.getValue() ? Standard_True : Standard_False;
Standard_Boolean isFrenet = Frenet.getValue() ? Standard_True : Standard_False;
BRepBuilderAPI_TransitionMode transMode;
switch (Transition.getValue()) {
case 1: transMode = BRepBuilderAPI_RightCorner;
break;
case 2: transMode = BRepBuilderAPI_RoundCorner;
break;
default: transMode = BRepBuilderAPI_Transformed;
break;
}
if (path.ShapeType() == TopAbs_EDGE) {
BRepBuilderAPI_MakeWire mkWire(TopoDS::Edge(path));
path = mkWire.Wire();
}
BRepOffsetAPI_MakePipeShell mkPipeShell(TopoDS::Wire(path));
mkPipeShell.SetMode(isFrenet);
mkPipeShell.SetTransitionMode(transMode);
TopTools_ListIteratorOfListOfShape iter;
for (iter.Initialize(profiles); iter.More(); iter.Next()) {
mkPipeShell.Add(TopoDS_Shape(iter.Value()));
}
if (!mkPipeShell.IsReady())
Standard_Failure::Raise("shape is not ready to build");
mkPipeShell.Build();
if (isSolid)
mkPipeShell.MakeSolid();
this->Shape.setValue(mkPipeShell.Shape());
return App::DocumentObject::StdReturn;
}
catch (Standard_Failure) {
Handle_Standard_Failure e = Standard_Failure::Caught();
return new App::DocumentObjectExecReturn(e->GetMessageString());
}
}
示例3: SortShapes
//=======================================================================
//function : SortShapes
//purpose :
//=======================================================================
void GEOMUtils::SortShapes (TopTools_ListOfShape& SL,
const Standard_Boolean isOldSorting)
{
#ifdef STD_SORT_ALGO
std::vector<TopoDS_Shape> aShapesVec;
aShapesVec.reserve(SL.Extent());
TopTools_ListIteratorOfListOfShape it (SL);
for (; it.More(); it.Next()) {
aShapesVec.push_back(it.Value());
}
SL.Clear();
CompareShapes shComp (isOldSorting);
std::stable_sort(aShapesVec.begin(), aShapesVec.end(), shComp);
//std::sort(aShapesVec.begin(), aShapesVec.end(), shComp);
std::vector<TopoDS_Shape>::const_iterator anIter = aShapesVec.begin();
for (; anIter != aShapesVec.end(); ++anIter) {
SL.Append(*anIter);
}
#else
// old implementation
Standard_Integer MaxShapes = SL.Extent();
TopTools_Array1OfShape aShapes (1,MaxShapes);
TColStd_Array1OfInteger OrderInd(1,MaxShapes);
TColStd_Array1OfReal MidXYZ (1,MaxShapes); //X,Y,Z;
TColStd_Array1OfReal Length (1,MaxShapes); //X,Y,Z;
// Computing of CentreOfMass
Standard_Integer Index;
GProp_GProps GPr;
gp_Pnt GPoint;
TopTools_ListIteratorOfListOfShape it(SL);
for (Index=1; it.More(); Index++)
{
TopoDS_Shape S = it.Value();
SL.Remove( it ); // == it.Next()
aShapes(Index) = S;
OrderInd.SetValue (Index, Index);
if (S.ShapeType() == TopAbs_VERTEX) {
GPoint = BRep_Tool::Pnt( TopoDS::Vertex( S ));
Length.SetValue( Index, (Standard_Real) S.Orientation());
}
else {
// BEGIN: fix for Mantis issue 0020842
if (isOldSorting) {
BRepGProp::LinearProperties (S, GPr);
}
else {
if (S.ShapeType() == TopAbs_EDGE || S.ShapeType() == TopAbs_WIRE) {
BRepGProp::LinearProperties (S, GPr);
}
else if (S.ShapeType() == TopAbs_FACE || S.ShapeType() == TopAbs_SHELL) {
BRepGProp::SurfaceProperties(S, GPr);
}
else {
BRepGProp::VolumeProperties(S, GPr);
}
}
// END: fix for Mantis issue 0020842
GPoint = GPr.CentreOfMass();
Length.SetValue(Index, GPr.Mass());
}
MidXYZ.SetValue(Index, GPoint.X()*999.0 + GPoint.Y()*99.0 + GPoint.Z()*0.9);
//cout << Index << " L: " << Length(Index) << "CG: " << MidXYZ(Index) << endl;
}
// Sorting
Standard_Integer aTemp;
Standard_Boolean exchange, Sort = Standard_True;
Standard_Real tol = Precision::Confusion();
while (Sort)
{
Sort = Standard_False;
for (Index=1; Index < MaxShapes; Index++)
{
exchange = Standard_False;
Standard_Real dMidXYZ = MidXYZ(OrderInd(Index)) - MidXYZ(OrderInd(Index+1));
Standard_Real dLength = Length(OrderInd(Index)) - Length(OrderInd(Index+1));
if ( dMidXYZ >= tol ) {
// cout << "MidXYZ: " << MidXYZ(OrderInd(Index))<< " > " <<MidXYZ(OrderInd(Index+1))
// << " d: " << dMidXYZ << endl;
exchange = Standard_True;
}
else if ( Abs(dMidXYZ) < tol && dLength >= tol ) {
// cout << "Length: " << Length(OrderInd(Index))<< " > " <<Length(OrderInd(Index+1))
// << " d: " << dLength << endl;
exchange = Standard_True;
}
else if ( Abs(dMidXYZ) < tol && Abs(dLength) < tol &&
aShapes(OrderInd(Index)).ShapeType() <= TopAbs_FACE) {
// PAL17233
// equal values possible on shapes such as two halves of a sphere and
// a membrane inside the sphere
Bnd_Box box1,box2;
//.........这里部分代码省略.........
示例4: while
//=======================================================================
// function: MakeConnexityBlock.
// purpose:
//=======================================================================
void GEOMAlgo_Tools3D::MakeConnexityBlock (const TopTools_ListOfShape& theLFIn,
const TopTools_IndexedMapOfShape& theMEAvoid,
TopTools_ListOfShape& theLCB)
{
Standard_Integer aNbF, aNbAdd1;
TopExp_Explorer aExp;
TopTools_IndexedDataMapOfShapeListOfShape aMEF;
TopTools_MapIteratorOfMapOfShape aItM, aItM1;
TopTools_MapOfShape aMCB, aMAdd, aMAdd1;
TopTools_ListIteratorOfListOfShape aIt;
//
// 1. aMEF
aNbF=theLFIn.Extent();
aIt.Initialize(theLFIn);
for (; aIt.More(); aIt.Next()) {
const TopoDS_Shape& aF=aIt.Value();
TopExp::MapShapesAndAncestors(aF, TopAbs_EDGE, TopAbs_FACE, aMEF);
}
//
// 2. aMCB
const TopoDS_Shape& aF1=theLFIn.First();
aMAdd.Add(aF1);
//
while(1) {
aMAdd1.Clear();
aItM.Initialize(aMAdd);
for (; aItM.More(); aItM.Next()) {
const TopoDS_Shape& aF=aItM.Key();
//
//aMAdd1.Clear();
aExp.Init(aF, TopAbs_EDGE);
for (; aExp.More(); aExp.Next()) {
const TopoDS_Shape& aE=aExp.Current();
if (theMEAvoid.Contains(aE)){
continue;
}
//
const TopTools_ListOfShape& aLF=aMEF.FindFromKey(aE);
aIt.Initialize(aLF);
for (; aIt.More(); aIt.Next()) {
const TopoDS_Shape& aFx=aIt.Value();
if (aFx.IsSame(aF)) {
continue;
}
if (aMCB.Contains(aFx)) {
continue;
}
aMAdd1.Add(aFx);
}
}//for (; aExp.More(); aExp.Next()){
aMCB.Add(aF);
}// for (; aItM.More(); aItM.Next()) {
//
aNbAdd1=aMAdd1.Extent();
if (!aNbAdd1) {
break;
}
//
aMAdd.Clear();
aItM1.Initialize(aMAdd1);
for (; aItM1.More(); aItM1.Next()) {
const TopoDS_Shape& aFAdd=aItM1.Key();
aMAdd.Add(aFAdd);
}
//
}//while(1) {
//
aNbF=aMCB.Extent();
aItM.Initialize(aMCB);
for (; aItM.More(); aItM.Next()) {
const TopoDS_Shape& aF=aItM.Key();
theLCB.Append(aF);
}
}
示例5: FindFacePairs
//=======================================================================
//function : FindFacePairs
//purpose :
//=======================================================================
Standard_Boolean FindFacePairs (const TopoDS_Edge& theE,
const TopTools_ListOfShape& thLF,
NMTTools_ListOfCoupleOfShape& theLCFF)
{
Standard_Boolean bFound;
Standard_Integer i, aNbCEF;
TopAbs_Orientation aOr, aOrC;
TopTools_MapOfShape aMFP;
TopoDS_Face aF1, aF2;
TopoDS_Edge aEL, aE1;
TopTools_ListIteratorOfListOfShape aItLF;
NMTTools_CoupleOfShape aCEF, aCFF;
NMTTools_ListOfCoupleOfShape aLCEF, aLCEFx;
NMTTools_ListIteratorOfListOfCoupleOfShape aIt;
//
bFound=Standard_True;
//
// Preface aLCEF
aItLF.Initialize(thLF);
for (; aItLF.More(); aItLF.Next()) {
const TopoDS_Face& aFL=TopoDS::Face(aItLF.Value());
//
bFound=GEOMAlgo_Tools3D::GetEdgeOnFace(theE, aFL, aEL);
if (!bFound) {
return bFound; // it can not be so
}
//
aCEF.SetShape1(aEL);
aCEF.SetShape2(aFL);
aLCEF.Append(aCEF);
}
//
aNbCEF=aLCEF.Extent();
while(aNbCEF) {
//
// aLCEFx
aLCEFx.Clear();
aIt.Initialize(aLCEF);
for (i=0; aIt.More(); aIt.Next(), ++i) {
const NMTTools_CoupleOfShape& aCSx=aIt.Value();
const TopoDS_Shape& aEx=aCSx.Shape1();
const TopoDS_Shape& aFx=aCSx.Shape2();
//
aOr=aEx.Orientation();
//
if (!i) {
aOrC=TopAbs::Reverse(aOr);
aE1=TopoDS::Edge(aEx);
aF1=TopoDS::Face(aFx);
aMFP.Add(aFx);
continue;
}
//
if (aOr==aOrC) {
aLCEFx.Append(aCSx);
aMFP.Add(aFx);
}
}
//
// F2
GEOMAlgo_Tools3D::GetFaceOff(aE1, aF1, aLCEFx, aF2);
//
aCFF.SetShape1(aF1);
aCFF.SetShape2(aF2);
theLCFF.Append(aCFF);
//
aMFP.Add(aF1);
aMFP.Add(aF2);
//
// refine aLCEF
aLCEFx.Clear();
aLCEFx=aLCEF;
aLCEF.Clear();
aIt.Initialize(aLCEFx);
for (; aIt.More(); aIt.Next()) {
const NMTTools_CoupleOfShape& aCSx=aIt.Value();
const TopoDS_Shape& aFx=aCSx.Shape2();
if (!aMFP.Contains(aFx)) {
aLCEF.Append(aCSx);
}
}
//
aNbCEF=aLCEF.Extent();
}//while(aNbCEF) {
//
return bFound;
}
示例6: PerformShapesToAvoid
//=======================================================================
//function :PerformShapesToAvoid
//purpose :
//=======================================================================
void GEOMAlgo_BuilderFace::PerformShapesToAvoid()
{
Standard_Boolean bFound;
Standard_Integer i, iCnt, aNbV, aNbE;
TopTools_IndexedDataMapOfShapeListOfShape aMVE;
TopTools_ListIteratorOfListOfShape aIt;
//
myShapesToAvoid.Clear();
//
iCnt=0;
while (1) {
++iCnt;
bFound=Standard_False;
//
// 1. MEF
aMVE.Clear();
aIt.Initialize (myShapes);
for (; aIt.More(); aIt.Next()) {
const TopoDS_Shape& aE=aIt.Value();
if (!myShapesToAvoid.Contains(aE)) {
TopExp::MapShapesAndAncestors(aE, TopAbs_VERTEX, TopAbs_EDGE, aMVE);
}
// else {
// int a=0;
// }
}
aNbV=aMVE.Extent();
//
// 2. myEdgesToAvoid
for (i=1; i<=aNbV; ++i) {
const TopoDS_Vertex& aV=TopoDS::Vertex(aMVE.FindKey(i));
//
TopTools_ListOfShape& aLE=aMVE.ChangeFromKey(aV);
aNbE=aLE.Extent();
if (!aNbE) {
continue;
}
//
const TopoDS_Edge& aE1=TopoDS::Edge(aLE.First());
if (aNbE==1) {
if (BRep_Tool::Degenerated(aE1)) {
continue;
}
if (aV.Orientation()==TopAbs_INTERNAL) {
continue;
}
bFound=Standard_True;
myShapesToAvoid.Add(aE1);
}
else if (aNbE==2) {
const TopoDS_Edge& aE2=TopoDS::Edge(aLE.Last());
if (aE2.IsSame(aE1)) {
TopoDS_Vertex aV1x, aV2x;
//
TopExp::Vertices(aE1, aV1x, aV2x);
if (aV1x.IsSame(aV2x)) {
continue;
}
bFound=Standard_True;
myShapesToAvoid.Add(aE1);
myShapesToAvoid.Add(aE2);
}
}
}// for (i=1; i<=aNbE; ++i) {
//
if (!bFound) {
break;
}
//
}//while (1)
//printf(" EdgesToAvoid=%d, iCnt=%d\n", EdgesToAvoid.Extent(), iCnt);
}
示例7: fillNgMesh
bool NETGENPlugin_Mesher::fillNgMesh(netgen::OCCGeometry& occgeom,
netgen::Mesh& ngMesh,
vector<SMDS_MeshNode*>& nodeVec,
const list< SMESH_subMesh* > & meshedSM)
{
TNode2IdMap nodeNgIdMap;
TopTools_MapOfShape visitedShapes;
SMESH_MesherHelper helper (*_mesh);
int faceID = occgeom.fmap.Extent();
_faceDescriptors.clear();
list< SMESH_subMesh* >::const_iterator smIt, smEnd = meshedSM.end();
for ( smIt = meshedSM.begin(); smIt != smEnd; ++smIt )
{
SMESH_subMesh* sm = *smIt;
if ( !visitedShapes.Add( sm->GetSubShape() ))
continue;
SMESHDS_SubMesh * smDS = sm->GetSubMeshDS();
switch ( sm->GetSubShape().ShapeType() )
{
case TopAbs_EDGE: { // EDGE
// ----------------------
const TopoDS_Edge& geomEdge = TopoDS::Edge( sm->GetSubShape() );
// Add ng segments for each not meshed face the edge bounds
TopTools_MapOfShape visitedAncestors;
const TopTools_ListOfShape& ancestors = _mesh->GetAncestors( geomEdge );
TopTools_ListIteratorOfListOfShape ancestorIt ( ancestors );
for ( ; ancestorIt.More(); ancestorIt.Next() )
{
const TopoDS_Shape & ans = ancestorIt.Value();
if ( ans.ShapeType() != TopAbs_FACE || !visitedAncestors.Add( ans ))
continue;
const TopoDS_Face& face = TopoDS::Face( ans );
int faceID = occgeom.fmap.FindIndex( face );
if ( faceID < 1 )
continue; // meshed face
// find out orientation of geomEdge within face
bool isForwad = false;
for ( TopExp_Explorer exp( face, TopAbs_EDGE ); exp.More(); exp.Next() ) {
if ( geomEdge.IsSame( exp.Current() )) {
isForwad = ( exp.Current().Orientation() == geomEdge.Orientation() );
break;
}
}
bool isQuad = smDS->GetElements()->next()->IsQuadratic();
// get all nodes from geomEdge
StdMeshers_FaceSide fSide( face, geomEdge, _mesh, isForwad, isQuad );
const vector<UVPtStruct>& points = fSide.GetUVPtStruct();
int i, nbSeg = fSide.NbSegments();
double otherSeamParam = 0;
helper.SetSubShape( face );
bool isSeam = helper.IsRealSeam( geomEdge );
if ( isSeam )
otherSeamParam =
helper.GetOtherParam( helper.GetPeriodicIndex() == 1 ? points[0].u : points[0].v );
// add segments
int prevNgId = ngNodeId( points[0].node, ngMesh, nodeNgIdMap );
for ( i = 0; i < nbSeg; ++i )
{
const UVPtStruct& p1 = points[ i ];
const UVPtStruct& p2 = points[ i+1 ];
netgen::Segment seg;
// ng node ids
seg.pnums[0] = prevNgId;
seg.pnums[1] = prevNgId = ngNodeId( p2.node, ngMesh, nodeNgIdMap );
// node param on curve
seg.epgeominfo[ 0 ].dist = p1.param;
seg.epgeominfo[ 1 ].dist = p2.param;
// uv on face
seg.epgeominfo[ 0 ].u = p1.u;
seg.epgeominfo[ 0 ].v = p1.v;
seg.epgeominfo[ 1 ].u = p2.u;
seg.epgeominfo[ 1 ].v = p2.v;
//seg.epgeominfo[ iEnd ].edgenr = edgeID; // = geom.emap.FindIndex(edge);
seg.si = faceID; // = geom.fmap.FindIndex (face);
seg.edgenr = ngMesh.GetNSeg() + 1; // segment id
ngMesh.AddSegment (seg);
if ( isSeam )
{
if ( helper.GetPeriodicIndex() == 1 ) {
seg.epgeominfo[ 0 ].u = otherSeamParam;
seg.epgeominfo[ 1 ].u = otherSeamParam;
swap (seg.epgeominfo[0].v, seg.epgeominfo[1].v);
} else {
//.........这里部分代码省略.........
示例8: CheckGProps
//=======================================================================
//function : CheckGProps
//purpose :
//=======================================================================
void GEOMAlgo_GetInPlace::CheckGProps(const TopoDS_Shape& aS1)
{
Standard_Boolean bOnlyClosed;
Standard_Integer iDim, aNbS2;
Standard_Real aMass1, aMass2, aD2, aTolCG2, dM;
TopAbs_ShapeEnum aType1;
gp_Pnt aCG1, aCG2;
TopoDS_Iterator aIt;
TopoDS_Compound aC2;
BRep_Builder aBB;
TopTools_ListIteratorOfListOfShape aItLS;
//
myErrorStatus=0;
//
aType1=aS1.ShapeType();
if (aType1==TopAbs_COMPOUND) {
aIt.Initialize(aS1);
for(; aIt.More(); aIt.Next()) {
const TopoDS_Shape& aS1x=aIt.Value();
CheckGProps(aS1x);
if (!myFound) {
return;
}
}
}
//
iDim=Dimension(aType1);
//
if (!myImages.IsBound(aS1)) {
// it should not be.
return;
}
const TopTools_ListOfShape& aLS2=myImages.Find(aS1);
aNbS2=aLS2.Extent();
if (!aNbS2) {
// it should not be.
return;
}
//
aBB.MakeCompound(aC2);
aItLS.Initialize(aLS2);
for (; aItLS.More(); aItLS.Next()) {
const TopoDS_Shape& aS2x=aItLS.Value();
aBB.Add(aC2, aS2x);
}
//-------------------------
GProp_GProps aG1, aG2;
//
aTolCG2=myTolCG*myTolCG;
bOnlyClosed=Standard_False;
//
if (iDim==0) {
PointProperties(aS1, aG1);
PointProperties(aC2, aG2);
}
else if (iDim==1) {
BRepGProp::LinearProperties(aS1, aG1);
BRepGProp::LinearProperties(aC2, aG2);
}
else if (iDim==2) {
BRepGProp::SurfaceProperties(aS1, aG1);
BRepGProp::SurfaceProperties(aC2, aG2);
}
else if (iDim==3) {
BRepGProp::VolumeProperties(aS1, aG1, bOnlyClosed);
BRepGProp::VolumeProperties(aC2, aG2, bOnlyClosed);
}
//
aMass1=aG1.Mass();
aMass2=aG2.Mass();
aCG1=aG1.CentreOfMass();
aCG2=aG2.CentreOfMass();
//
dM=fabs(aMass1-aMass2);
if (aMass1 > myTolMass) {
dM=dM/aMass1;
}
//
aD2=aCG1.SquareDistance(aCG2);
//
if ((dM > myTolMass) || (aD2 > aTolCG2)) {
myFound=Standard_False;
return;
}
myFound=Standard_True;
}
示例9: DetectVertices
//=======================================================================
//function : DetectVertices
//purpose :
//=======================================================================
void GEOMAlgo_GlueDetector::DetectVertices()
{
Standard_Integer j, i, aNbV, aNbVSD;
Standard_Real aTolV;
gp_Pnt aPV;
TColStd_ListIteratorOfListOfInteger aIt;
TopoDS_Shape aVF;
TopTools_IndexedMapOfShape aMV;
TopTools_MapOfShape aMVProcessed;
TopTools_ListIteratorOfListOfShape aItS;
TopTools_DataMapIteratorOfDataMapOfShapeListOfShape aItIm;
TopTools_DataMapOfShapeListOfShape aMVV;
GEOMAlgo_IndexedDataMapOfIntegerShape aMIS;
NMTDS_IndexedDataMapOfShapeBndSphere aMSB;
//
NMTDS_BndSphereTreeSelector aSelector;
NMTDS_BndSphereTree aBBTree;
NCollection_UBTreeFiller <Standard_Integer, NMTDS_BndSphere> aTreeFiller(aBBTree);
//
myErrorStatus=0;
//
TopExp::MapShapes(myArgument, TopAbs_VERTEX, aMV);
aNbV=aMV.Extent();
if (!aNbV) {
myErrorStatus=2; // no vertices in source shape
return;
}
//
for (i=1; i<=aNbV; ++i) {
NMTDS_BndSphere aBox;
//
const TopoDS_Vertex& aV=*((TopoDS_Vertex*)&aMV(i));
aPV=BRep_Tool::Pnt(aV);
aTolV=BRep_Tool::Tolerance(aV);
//
aBox.SetGap(myTolerance);
aBox.SetCenter(aPV);
aBox.SetRadius(aTolV);
//
aTreeFiller.Add(i, aBox);
//
aMIS.Add(i, aV);
aMSB.Add(aV, aBox);
}
//
aTreeFiller.Fill();
//
//---------------------------------------------------
// Chains
for (i=1; i<=aNbV; ++i) {
const TopoDS_Shape& aV=aMV(i);
//
if (aMVProcessed.Contains(aV)) {
continue;
}
//
Standard_Integer aNbIP, aIP, aNbIP1, aIP1;
TopTools_ListOfShape aLVSD;
TColStd_MapOfInteger aMIP, aMIP1, aMIPC;
TColStd_MapIteratorOfMapOfInteger aIt1;
//
aMIP.Add(i);
while(1) {
aNbIP=aMIP.Extent();
aIt1.Initialize(aMIP);
for(; aIt1.More(); aIt1.Next()) {
aIP=aIt1.Key();
if (aMIPC.Contains(aIP)) {
continue;
}
//
const TopoDS_Shape& aVP=aMIS.FindFromKey(aIP);
const NMTDS_BndSphere& aBoxVP=aMSB.FindFromKey(aVP);
//
aSelector.Clear();
aSelector.SetBox(aBoxVP);
//
aNbVSD=aBBTree.Select(aSelector);
if (!aNbVSD) {
continue; // it shoild not be so [at least IP itself]
}
//
const TColStd_ListOfInteger& aLI=aSelector.Indices();
aIt.Initialize(aLI);
for (; aIt.More(); aIt.Next()) {
aIP1=aIt.Value();
if (aMIP.Contains(aIP1)) {
continue;
}
aMIP1.Add(aIP1);
} //for (; aIt.More(); aIt.Next()) {
}//for(; aIt1.More(); aIt1.Next()) {
//
aNbIP1=aMIP1.Extent();
if (!aNbIP1) {
break;
//.........这里部分代码省略.........
示例10: update_OCC_entity
//----------------------------------------------------------------
// Function: TopoDS_Shape level function to update the core Body
// for any Boolean operation of the body.
// Author: Jane Hu
//----------------------------------------------------------------
CubitStatus OCCBody::update_OCC_entity(TopoDS_Shape& old_shape,
TopoDS_Shape& new_shape,
BRepBuilderAPI_MakeShape *op,
LocOpe_SplitShape* sp)
{
//set the Shells
TopTools_IndexedMapOfShape M;
TopExp::MapShapes(old_shape, TopAbs_SOLID, M);
TopTools_IndexedMapOfShape M_new;
TopExp::MapShapes(new_shape, TopAbs_SOLID, M_new);
TopTools_ListOfShape shapes;
TopoDS_Shape shape;
CubitBoolean updated = CUBIT_FALSE;
if(!old_shape.IsNull() && old_shape.ShapeType() == TopAbs_COMPOUND &&
!new_shape.IsNull() && new_shape.ShapeType() == TopAbs_COMPOUND &&
!old_shape.IsSame(new_shape))
{
//By updating underling solids, shells etc., the old_shape will get changed.
//trying to make sure the the number of each entity in the old and new
//shapes are the same, which means that nothing is delete, that we can
//update the map here. Otherwise, when deleting solids, it'll delete the
//the old body and create new body. This is Ok for general boolean operation //except imprint when booleans are called, usually the original body are
// supposed to be kept.
updated = CUBIT_TRUE;
OCCQueryEngine::instance()->update_OCC_map(old_shape, new_shape);
}
DLIList<int> new_solid_nums;
DLIList<int> unfound_nums;
for(int ii=1; ii<=M.Extent(); ii++)
{
TopoDS_Solid solid = TopoDS::Solid(M(ii));
TopTools_ListOfShape shapes;
if(op)
{
shapes.Assign(op->Modified(solid));
if(shapes.Extent() == 0)
shapes.Assign(op->Generated(solid));
}
else if(sp)
shapes.Assign(sp->DescendantShapes(solid));
if (shapes.Extent() == 1)
shape = shapes.First();
else if(shapes.Extent() > 1)
{
//update all attributes first.
TopTools_ListIteratorOfListOfShape it;
it.Initialize(shapes);
for(; it.More(); it.Next())
{
shape = it.Value();
OCCQueryEngine::instance()->copy_attributes(solid, shape);
}
shape = shapes.First();
}
else if(op->IsDeleted(solid))
{
if (M_new.Extent()== 1 && ii == 1)
shape = M_new(1);
else if(M_new.Extent()== 1 && ii > 1)
shape.Nullify();
else if(M_new.Extent() > 1)
{
GProp_GProps myProps;
BRepGProp::VolumeProperties(solid, myProps);
double bf_mass = myProps.Mass();
gp_Pnt old_center = myProps.CentreOfMass();
CubitBoolean found = CUBIT_FALSE;
for(int l = 1; l <= M_new.Extent(); l++)
{
BRepGProp::VolumeProperties(M_new(l), myProps);
double af_mass = myProps.Mass();
double dTol = OCCQueryEngine::instance()->get_sme_resabs_tolerance();
if(fabs(bf_mass-af_mass) < dTol) //unchanged
{
gp_Pnt new_center = myProps.CentreOfMass();
if(new_center.IsEqual(old_center, dTol))
{
found = CUBIT_TRUE;
shape = M_new(l);
new_solid_nums.append(l);
break;
}
}
}
if(!found)
{
unfound_nums.append(ii);
continue;
}
//.........这里部分代码省略.........
示例11: Perform
//=======================================================================
// function: Perform
// purpose:
//=======================================================================
void GEOMAlgo_WireSplitter::Perform()
{
myErrorStatus=2;
myNothingToDo=Standard_True;
Standard_Integer index, i, aNb, aCntIn, aCntOut;
Standard_Boolean anIsIn;
Standard_Real anAngle;
BOP_ListOfEdgeInfo emptyInfo;
TopTools_ListIteratorOfListOfShape anItList;
//
// 1.Filling mySmartMap
mySmartMap.Clear();
anItList.Initialize(myEdges);
for (; anItList.More(); anItList.Next()) {
const TopoDS_Edge& anEdge = TopoDS::Edge(anItList.Value());
//
if (!BOPTools_Tools2D::HasCurveOnSurface (anEdge, myFace)) {
continue;
}
//
TopExp_Explorer anExpVerts (anEdge, TopAbs_VERTEX);
for (; anExpVerts.More(); anExpVerts.Next()) {
const TopoDS_Shape& aVertex= anExpVerts.Current();
index = mySmartMap.FindIndex(aVertex);
if (!index) {
index=mySmartMap.Add(aVertex, emptyInfo);
}
BOP_ListOfEdgeInfo& aListOfEInfo=mySmartMap(index);
BOP_EdgeInfo aEInfo;
aEInfo.SetEdge(anEdge);
TopAbs_Orientation anOr=aVertex.Orientation();
if (anOr==TopAbs_FORWARD) {
aEInfo.SetInFlag(Standard_False);
}
else if (anOr==TopAbs_REVERSED) {
aEInfo.SetInFlag(Standard_True);
}
aListOfEInfo.Append(aEInfo);
}
}
//
aNb=mySmartMap.Extent();
//
// 2. myNothingToDo
myNothingToDo=Standard_True;
for (i=1; i<=aNb; i++) {
aCntIn=0;
aCntOut=0;
const BOP_ListOfEdgeInfo& aLEInfo= mySmartMap(i);
BOP_ListIteratorOfListOfEdgeInfo anIt(aLEInfo);
for (; anIt.More(); anIt.Next()) {
const BOP_EdgeInfo& anEdgeInfo=anIt.Value();
anIsIn=anEdgeInfo.IsIn();
if (anIsIn) {
aCntIn++;
}
else {
aCntOut++;
}
}
if (aCntIn!=1 || aCntOut!=1) {
myNothingToDo=Standard_False;
break;
}
}
//
// Each vertex has one edge In and one - Out. Good. But it is not enought
// to consider that nothing to do with this. We must check edges on TShape
// coinsidence. If there are such edges there is something to do with.
//
if (myNothingToDo) {
Standard_Integer aNbE, aNbMapEE;
TopTools_IndexedDataMapOfShapeListOfShape aMapEE;
aNbE=myEdges.Extent();
anItList.Initialize(myEdges);
for (; anItList.More(); anItList.Next()) {
const TopoDS_Shape& aE = anItList.Value();
if (!aMapEE.Contains(aE)) {
TopTools_ListOfShape aLEx;
aLEx.Append(aE);
aMapEE.Add(aE, aLEx);
}
else {
//.........这里部分代码省略.........
示例12: Perform
//=======================================================================
//function : Perform
//purpose :
//=======================================================================
void Partition_Loop::Perform()
{
TopTools_DataMapOfShapeListOfShape MVE;
TopTools_DataMapIteratorOfDataMapOfShapeListOfShape Mapit, Mapit1;
TopTools_ListIteratorOfListOfShape itl;
TopoDS_Vertex V1,V2;
//-----------------------------------
// Construction map vertex => edges
//-----------------------------------
for (itl.Initialize(myConstEdges); itl.More(); itl.Next()) {
TopoDS_Edge& E = TopoDS::Edge(itl.Value());
StoreInMVE(myFace,E,MVE);
}
//----------------------------------------------
// Construction of all the wires and of all the new faces.
//----------------------------------------------
TopTools_MapOfOrientedShape UsedEdges;
while (!MVE.IsEmpty()) {
TopoDS_Vertex VF,CV;
TopoDS_Edge CE,NE,EF;
TopoDS_Wire NW;
BRep_Builder B;
Standard_Boolean End= Standard_False;
B.MakeWire(NW);
//--------------------------------
// EF first edge.
//--------------------------------
Mapit.Initialize(MVE);
EF = CE = TopoDS::Edge(Mapit.Value().First());
TopExp::Vertices(CE,V1,V2);
//--------------------------------
// VF first vertex
//--------------------------------
if (CE.Orientation() == TopAbs_FORWARD) {
CV = VF = V1;
}
else {
CV = VF = V2;
}
if (!MVE.IsBound(CV)) continue;
for ( itl.Initialize(MVE(CV)); itl.More(); itl.Next()) {
if (itl.Value().IsEqual(CE)) {
MVE(CV).Remove(itl);
break;
}
}
int i = 0;
while (!End) {
//-------------------------------
// Construction of a wire.
//-------------------------------
TopExp::Vertices(CE,V1,V2);
if (!CV.IsSame(V1)) CV = V1; else CV = V2;
B.Add (NW,CE);
UsedEdges.Add(CE);
//--------------
// stop test
//--------------
if (!MVE.IsBound(CV) || MVE(CV).IsEmpty() || CV.IsSame(VF) ) {
if (CV.IsSame(VF)) {
if (MVE(CV).Extent() == 1 ) MVE.UnBind(CV);
else {
for ( itl.Initialize(MVE(CV)); itl.More(); itl.Next()) {
if (itl.Value().IsEqual(CE)) {
MVE(CV).Remove(itl);
break;
}
}
}
}
End=Standard_True;
}
//--------------
// select edge
//--------------
else {
Standard_Boolean find = SelectEdge(myFace,CE,CV,NE,MVE(CV));
if (find) {
CE=NE;
if (MVE(CV).IsEmpty()) MVE.UnBind(CV);
if (CE.IsNull() ) {
MESSAGE ( " CE is NULL !!! " )
End=Standard_True;
}
}
else {
MESSAGE ( " edge doesn't exist " )
//.........这里部分代码省略.........
示例13: SelectEdge
//=======================================================================
//function : SelectEdge
//purpose : Find the edge <NE> connected <CE> by the vertex <CV> in the list <LE>.
// <NE> Is erased of the list. If <CE> is too in the list <LE>
// with the same orientation, it's erased of the list
//=======================================================================
static Standard_Boolean SelectEdge(const TopoDS_Face& F,
const TopoDS_Edge& CE,
const TopoDS_Vertex& CV,
TopoDS_Edge& NE,
TopTools_ListOfShape& LE)
{
TopTools_ListIteratorOfListOfShape itl;
NE.Nullify();
for ( itl.Initialize(LE); itl.More(); itl.Next()) {
if (itl.Value().IsEqual(CE)) {
LE.Remove(itl);
break;
}
}
if (LE.Extent() > 1) {
//--------------------------------------------------------------
// Several possible edges.
// - Test the edges differents of CE
//--------------------------------------------------------------
Standard_Real cf, cl, f, l;
TopoDS_Face FForward = F;
Handle(Geom2d_Curve) Cc, C;
FForward.Orientation(TopAbs_FORWARD);
Cc = BRep_Tool::CurveOnSurface(CE,FForward,cf,cl);
Standard_Real dist,distmin = 100*BRep_Tool::Tolerance(CV);
Standard_Real uc,u;
if (CE.Orientation () == TopAbs_FORWARD) uc = cl;
else uc = cf;
gp_Pnt2d P2,PV = Cc->Value(uc);
Standard_Real delta = FindDelta(LE,FForward);
for ( itl.Initialize(LE); itl.More(); itl.Next()) {
const TopoDS_Edge& E = TopoDS::Edge(itl.Value());
if (!E.IsSame(CE)) {
C = BRep_Tool::CurveOnSurface(E,FForward,f,l);
if (E.Orientation () == TopAbs_FORWARD) u = f;
else u = l;
P2 = C->Value(u);
dist = PV.Distance(P2);
if (dist <= distmin){
distmin = dist;
}
}
}
Standard_Real anglemax = - PI;
TopoDS_Edge SelectedEdge;
for ( itl.Initialize(LE); itl.More(); itl.Next()) {
const TopoDS_Edge& E = TopoDS::Edge(itl.Value());
if (!E.IsSame(CE)) {
C = BRep_Tool::CurveOnSurface(E,FForward,f,l);
if (E.Orientation () == TopAbs_FORWARD) u = f;
else u = l;
P2 = C->Value(u);
dist = PV.Distance(P2);
if (dist <= distmin + (1./3)*delta){
gp_Pnt2d PC, P;
gp_Vec2d CTg1, CTg2, Tg1, Tg2;
Cc->D2(uc, PC, CTg1, CTg2);
C->D2(u, P, Tg1, Tg2);
Standard_Real angle;
if (CE.Orientation () == TopAbs_REVERSED && E.Orientation () == TopAbs_FORWARD) {
angle = CTg1.Angle(Tg1.Reversed());
}
else if (CE.Orientation () == TopAbs_FORWARD && E.Orientation () == TopAbs_REVERSED) {
angle = (CTg1.Reversed()).Angle(Tg1);
}
else if (CE.Orientation () == TopAbs_REVERSED && E.Orientation () == TopAbs_REVERSED) {
angle = CTg1.Angle(Tg1);
}
else if (CE.Orientation () == TopAbs_FORWARD && E.Orientation () == TopAbs_FORWARD) {
angle = (CTg1.Reversed()).Angle(Tg1.Reversed());
}
if (angle >= anglemax) {
anglemax = angle ;
SelectedEdge = E;
}
}
}
}
for ( itl.Initialize(LE); itl.More(); itl.Next()) {
const TopoDS_Edge& E = TopoDS::Edge(itl.Value());
if (E.IsEqual(SelectedEdge)) {
NE = TopoDS::Edge(E);
LE.Remove(itl);
break;
}
//.........这里部分代码省略.........
示例14: PerformLoops
//=======================================================================
//function : PerformLoops
//purpose :
//=======================================================================
void GEOMAlgo_BuilderFace::PerformLoops()
{
myErrorStatus=0;
//
Standard_Boolean bFlag;
Standard_Integer aNbEA;
TopTools_ListIteratorOfListOfShape aIt;
TopTools_MapIteratorOfMapOfOrientedShape aItM;
TopTools_IndexedDataMapOfShapeListOfShape aVEMap;
TopTools_MapOfOrientedShape aMAdded;
TopoDS_Iterator aItW;
BRep_Builder aBB;
GEOMAlgo_WireEdgeSet aWES;
GEOMAlgo_WESCorrector aWESCor;
//
// 1. Usual Wires
myLoops.Clear();
aWES.SetFace(myFace);
//
aIt.Initialize (myShapes);
for (; aIt.More(); aIt.Next()) {
const TopoDS_Shape& aE=aIt.Value();
if (!myShapesToAvoid.Contains(aE)) {
aWES.AddStartElement(aE);
}
}
//
aWESCor.SetWES(aWES);
aWESCor.Perform();
//
GEOMAlgo_WireEdgeSet& aWESN=aWESCor.NewWES();
const TopTools_ListOfShape& aLW=aWESN.Shapes();
//
aIt.Initialize (aLW);
for (; aIt.More(); aIt.Next()) {
const TopoDS_Shape& aW=aIt.Value();
myLoops.Append(aW);
}
//modified by NIZNHY-PKV Tue Aug 5 15:09:29 2008f
// Post Treatment
TopTools_MapOfOrientedShape aMEP;
//
// a. collect all edges that are in loops
aIt.Initialize (myLoops);
for (; aIt.More(); aIt.Next()) {
const TopoDS_Shape& aW=aIt.Value();
aItW.Initialize(aW);
for (; aItW.More(); aItW.Next()) {
const TopoDS_Shape& aE=aItW.Value();
aMEP.Add(aE);
}
}
//
// b. collect all edges that are to avoid
aItM.Initialize(myShapesToAvoid);
for (; aItM.More(); aItM.Next()) {
const TopoDS_Shape& aE=aItM.Key();
aMEP.Add(aE);
}
//
// c. add all edges that are not processed to myShapesToAvoid
aIt.Initialize (myShapes);
for (; aIt.More(); aIt.Next()) {
const TopoDS_Shape& aE=aIt.Value();
if (!aMEP.Contains(aE)) {
myShapesToAvoid.Add(aE);
}
}
//modified by NIZNHY-PKV Tue Aug 5 15:09:35 2008t
//
// 2. Internal Wires
myLoopsInternal.Clear();
//
aNbEA=myShapesToAvoid.Extent();
aItM.Initialize(myShapesToAvoid);
for (; aItM.More(); aItM.Next()) {
const TopoDS_Shape& aEE=aItM.Key();
TopExp::MapShapesAndAncestors(aEE, TopAbs_VERTEX, TopAbs_EDGE, aVEMap);
}
//
bFlag=Standard_True;
aItM.Initialize(myShapesToAvoid);
for (; aItM.More()&&bFlag; aItM.Next()) {
const TopoDS_Shape& aEE=aItM.Key();
if (!aMAdded.Add(aEE)) {
continue;
}
//
// make new wire
TopoDS_Wire aW;
aBB.MakeWire(aW);
aBB.Add(aW, aEE);
//
aItW.Initialize(aW);
for (; aItW.More()&&bFlag; aItW.Next()) {
const TopoDS_Edge& aE=TopoDS::Edge(aItW.Value());
//.........这里部分代码省略.........
示例15: BuildSplitFaces
//.........这里部分代码省略.........
//
aMFence.Clear();
//
// 2.1. Fill WES
GEOMAlgo_WireEdgeSet aWES;
aWES.SetFace(aFF);
//
// 2.1.1. Add Split parts
anExp.Init(aFF, TopAbs_EDGE);
for (; anExp.More(); anExp.Next()) {
const TopoDS_Edge& aE=TopoDS::Edge(anExp.Current());
anOriE=aE.Orientation();
//
if (!myImages.HasImage(aE)) {
if (anOriE==TopAbs_INTERNAL) {
aEE=aE;
aEE.Orientation(TopAbs_FORWARD);
aWES.AddStartElement(aEE);
aEE.Orientation(TopAbs_REVERSED);
aWES.AddStartElement(aEE);
}
else {
aWES.AddStartElement(aE);
}
continue;
}
//
bIsDegenerated=BRep_Tool::Degenerated(aE);
bIsClosed=BRep_Tool::IsClosed(aE, aF);
//
const TopTools_ListOfShape& aLIE=myImages.Image(aE);
aIt.Initialize(aLIE);
for (; aIt.More(); aIt.Next()) {
aSp=TopoDS::Edge(aIt.Value());
//
if (bIsDegenerated) {
aSp.Orientation(anOriE);
aWES.AddStartElement(aSp);
continue;
}
//
if (anOriE==TopAbs_INTERNAL) {
aSp.Orientation(TopAbs_FORWARD);
aWES.AddStartElement(aSp);
aSp.Orientation(TopAbs_REVERSED);
aWES.AddStartElement(aSp);
continue;
}
//
if (bIsClosed){
if (aMFence.Add(aSp)) {
//
if (!BRep_Tool::IsClosed(aSp, aF)){
BOPTools_Tools3D::DoSplitSEAMOnFace(aSp, aF);
}
//
aSp.Orientation(TopAbs_FORWARD);
aWES.AddStartElement(aSp);
aSp.Orientation(TopAbs_REVERSED);
aWES.AddStartElement(aSp);
}
continue;
}// if (aMFence.Add(aSp))
//
aSp.Orientation(anOriE);
bToReverse=BOPTools_Tools3D::IsSplitToReverse1(aSp, aE, aCtx);